Skip to content

Instantly share code, notes, and snippets.

View orlp's full-sized avatar
⚠️
This user's social credit score is unknown.

Orson Peters orlp

⚠️
This user's social credit score is unknown.
View GitHub Profile
#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)
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 ""
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"
}
import irclib
import ircbot
import socket
import collections
import time
import json
import logging
import pyipinfodb
class IDBot(ircbot.SingleServerIRCBot):
#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;
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):
some_list = [
1,
3,
2,
[
"nested!",
True,
],
100,
]
#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,
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,
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;