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 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 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 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
| 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 praw | |
| import time | |
| from datetime import datetime, timedelta | |
| def hours_posted(submission): | |
| """Gets the time that passed (in hours) from when the post was made. (All time is converted to UTC)""" | |
| time_created = submission.created_utc | |
| current_time = datetime.utcnow() | |
| time_posted = datetime.utcfromtimestamp(time_created) | |
| time_difference_in_hours = (current_time - time_posted)/timedelta(hours=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
| $ python3 setup.py test | |
| running test | |
| running egg_info | |
| writing pycaching.egg-info/PKG-INFO | |
| writing dependency_links to pycaching.egg-info/dependency_links.txt | |
| writing requirements to pycaching.egg-info/requires.txt | |
| writing top-level names to pycaching.egg-info/top_level.txt | |
| reading manifest file 'pycaching.egg-info/SOURCES.txt' | |
| writing manifest file 'pycaching.egg-info/SOURCES.txt' | |
| running build_ext |
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
| $ python3 setup.py test | |
| running test | |
| running egg_info | |
| creating pycaching.egg-info | |
| writing pycaching.egg-info/PKG-INFO | |
| writing dependency_links to pycaching.egg-info/dependency_links.txt | |
| writing requirements to pycaching.egg-info/requires.txt | |
| writing top-level names to pycaching.egg-info/top_level.txt | |
| writing manifest file 'pycaching.egg-info/SOURCES.txt' | |
| reading manifest file 'pycaching.egg-info/SOURCES.txt' |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Telegram Bot API</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta property="description" content="The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. | |
| To learn how to create…"> | |
| <meta property="og:title" content="Telegram Bot API"> | |
| <meta property="og:image" content=""> |
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 json | |
| import os | |
| with open('inline_query_results.json', 'r') as f: | |
| types = json.load(f) | |
| FORM = """ | |
| from .inline_query_result import InlineQueryResult | |