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 java.awt.*; | |
import java.awt.event.InputEvent; | |
public class Cheater { | |
private static final int SKY_MIN_BLUE = 250; | |
private static final int default_x1 = 790; | |
private static final int default_x2 = 950; | |
private static final int default_y = 292; |
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 multiprocessing | |
import random | |
import time | |
import telepot | |
from telepot.loop import MessageLoop | |
import config | |
bot = telepot.Bot(config.token) |
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 multiprocessing | |
import time | |
class Cell: | |
def __init__(self): | |
self.left = None | |
self.right = None | |
self.value = 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
import multiprocessing | |
import time | |
def execute(code): | |
if code == 'S': | |
time.sleep(15) | |
print('Finished executing "{}".'.format(code)) | |
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 asyncio | |
import time | |
class Cell: | |
def __init__(self): | |
self.left = None | |
self.right = None | |
self.value = 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 BubbleSort: | |
def __init__(self, items): | |
self.items = items | |
self.operations = 0 | |
def sort(self): | |
while not self.sorted(): | |
for i in range(1, len(self.items)): | |
self.operations += 1 | |
a, b = self.items[i - 1:i + 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
from math import sqrt, erf, erfc | |
from scipy.special import erfinv, erfcinv | |
class Table: | |
def __init__(self, precision=4): | |
self.precision = precision | |
def below(self, z_score): |
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 java.util.HashMap; | |
public class Euler014 { | |
private HashMap<Integer, Integer> solvedCollatz = new HashMap<>(); | |
private Integer collatzLength(Integer start) { | |
Integer len = 1; | |
Integer num = start; | |
while (num != 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 main(): | |
print("I'm gonna generate a brainfuck program to print your text. It will be horribly inefficient, but it's faster", | |
"than writing it yourself…") | |
my_string = input('Enter the output string: ') | |
print(encode_string_to_brainfuck(my_string)) | |
def encode_string_to_brainfuck(my_string): |
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 Cell: | |
def __init__(self): | |
self.left = None | |
self.right = None | |
self.value = 0 | |
def increment(self): |