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
| #if defined (__MINGW32__) | |
| #define d4_OS_H "win.h" | |
| #elif defined (MSDOS) && defined (__GNUC__) | |
| #define q4_DOS 1 | |
| #elif (defined(unix) || defined(__unix__) || defined(__GNUC__) || \ | |
| defined(_AIX) || defined(__hpux)) && (!defined(_WIN32)) | |
| #define q4_UNIX 1 | |
| #elif defined (__VMS) | |
| #define q4_VMS 1 | |
| #elif defined (macintosh) |
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 recursive_function(s): | |
| # we have to go through the string | |
| for c in s: | |
| pass | |
| if s == "odd": | |
| return "d" | |
| if s == "even" | |
| return "" |
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 urllib2 | |
| import json | |
| def authenticate(region, username, password): | |
| authenticate_urls = { | |
| "euw": "https://lq.eu.lol.riotgames.com/login-queue/rest/queue/authenticate", | |
| "eun": "https://lq.eun1.lol.riotgames.com/login-queue/rest/queue/authenticate", | |
| "na": "https://lq.na1.lol.riotgames.com/login-queue/rest/queue/authenticate" | |
| } | |
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 irclib | |
| import ircbot | |
| import socket | |
| import collections | |
| import time | |
| import json | |
| import logging | |
| import pyipinfodb | |
| class IDBot(ircbot.SingleServerIRCBot): |
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 <windows.h> | |
| #include <tlhelp32.h> | |
| const char LOLCLIENT_EXECUTABLE[] = "lolclient.exe"; | |
| const char INGAMECLIENT_EXECUTABLE[] = "league of legends.exe"; | |
| void set_lol_priority() { | |
| HANDLE snapshot; | |
| PROCESSENTRY32 process; | |
| int ingameclient_found; |
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
| with open("init_vector.h", "w") as f: | |
| f.write("""template<class C> | |
| inline C init_container() { | |
| return C(); | |
| } | |
| """) | |
| for i in range(1, 100): | |
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
| some_list = [ | |
| 1, | |
| 3, | |
| 2, | |
| [ | |
| "nested!", | |
| True, | |
| ], | |
| 100, | |
| ] |
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 <stdint.h> | |
| const uint16_t squares[] = { | |
| 0, 1, 4, 9, | |
| 16, 25, 36, 49, | |
| 64, 81, 100, 121, | |
| 144, 169, 196, 225, | |
| 256, 289, 324, 361, | |
| 400, 441, 484, 529, | |
| 576, 625, 676, 729, |
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 uint16_t squares[] = { | |
| 0, 1, 4, 9, | |
| 16, 25, 36, 49, | |
| 64, 81, 100, 121, | |
| 144, 169, 196, 225, | |
| 256, 289, 324, 361, | |
| 400, 441, 484, 529, | |
| 576, 625, 676, 729, | |
| 784, 841, 900, 961, | |
| 1024, 1089, 1156, 1225, |
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
| inline int isqrt(uint32_t x) { | |
| const uint32_t *p = squares; | |
| int i = 32768; | |
| while (i) { | |
| if (p[i] <= x) p += i; | |
| i >>= 1; | |
| } | |
| return p - squares; |