This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| class ListNode: | |
| def __init__(self, v=None, next=None): | |
| self.v = v | |
| self.next = next | |
| class LinkedList: | |
| def __init__(self): | |
| self.head = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| i = [] | |
| while True: | |
| try: | |
| i.append(input()) | |
| except EOFError: | |
| break | |
| parts = ''.join(i).split('"') | |
| print(''.join([parts[i] for i in range(1, len(parts), 2)])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| xhost +SI:localuser:lightdm | |
| sudo -u lightdm gsettings set com.canonical.unity-greeter draw-grid false | |
| sudo -u lightdm gsettings set com.canonical.unity-greeter draw-user-backgrounds false | |
| sudo -u lightdm gsettings set com.canonical.unity-greeter background $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def strfloat(f): | |
| return str(round(f, 3)) | |
| f = open('path.txt', 'r') | |
| path=f.read().split(' ') | |
| f.close() | |
| i = 0 | |
| x, y = 0, 0 | |
| while i < len(path): | |
| if path[i] not in ['M', 'L', 'A', 'Q', 'Z']: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const key = 0x90; | |
| function protect_email(email) { | |
| bytes = [] | |
| for (char of email) { | |
| bytes.push(String.fromCharCode(char.charCodeAt(0) ^ key)); | |
| } | |
| return btoa(bytes.join('')); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const zero = '+[]'; // 1 | |
| const one = '+!![]'; // 1 | |
| const two = '('+ one + one +')'; // 2 | |
| const three = '('+ one + one + one +')'; // 3 | |
| const four = '('+ one + one + '<<' + one +')'; // 3 | |
| const five = '('+ four + one +')'; // 4 | |
| const six = '('+ one + one + one + '<<' + one +')'; // 4 | |
| const seven = '('+ six + one +')'; | |
| const eight = '('+ one + one + '<<' + one + one +')'; // 4 | |
| const int_lits = {0: zero, 1: one, 2: two, 3: three, 4: four, 5: five, 6: six, 7: seven, 8: eight}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function decode(s) { | |
| const len = s.length; | |
| const apad = 'abcdefghijklmnopqrstuvwxy1234567z'; | |
| let v,x,r=0,bits=0,c,o=''; | |
| s = s.toUpperCase(); | |
| for(i=0;i<len;i+=1) { | |
| v = apad.indexOf(s.charAt(i)); | |
| if (v>=0 && v<32) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <unistd.h> | |
| #include <getopt.h> | |
| #include <stdio.h> | |
| const struct option longopts[] = { | |
| {"chdir", no_argument, NULL, 'd'}, | |
| {"noclose", no_argument, NULL, 'n'}, | |
| {"log-stdout", required_argument, NULL, '1'}, | |
| {"log-stderr", required_argument, NULL, '2'}, | |
| {0, 0, 0, 0} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Boost < Formula | |
| desc "Collection of portable C++ source libraries" | |
| homepage "https://www.boost.org/" | |
| url "https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.bz2" | |
| sha256 "8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406" | |
| head "https://github.com/boostorg/boost.git" | |
| bottle do | |
| cellar :any | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cross(w, e). | |
| cross(e, w). | |
| execmove([F, W, G, C], 0, [NF, NW, NG, NC]) :- F = W, | |
| cross(F, NF), | |
| cross(W, NW), | |
| NG = G, | |
| NC = C. | |
| execmove([F, W, G, C], 1, [NF, NW, NG, NC]) :- F = G, | |
| cross(F, NF), |
NewerOlder