This file contains 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 sys, socket, os | |
from enum import Enum | |
from cli import cli | |
class Config: | |
SERVER_HOST = '0.0.0.0' | |
SERVER_PORT = 8000 | |
FILES = '../doc' | |
class Status(Enum): |
This file contains 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
package main | |
import "fmt" | |
type Stack []string | |
func (s *Stack) IsEmpty() bool { | |
return len(*s) == 0 | |
} |
This file contains 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
# The halting problem, will this program | |
# terminate or run forever? | |
def main(): | |
mx = j = - 1 | |
for i in range(1, int(input('N: ')) + 1): | |
# start at every number between [1, N] | |
steps = 0; curr = i | |
while curr != 1: | |
if curr & 1: |
This file contains 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 string import Template | |
def main(): | |
x = 'world' | |
# I. | |
print(f'hello {x}!') | |
# II. | |
print('hello {}!'.format(x)) |
This file contains 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
test integration_tests::accept_candidate_with_message ... Aug 20 23:20:05.787 DEBUG twilight_http::client: URL: "https://discord.com/api/v8/gateway/bot" | |
Aug 20 23:20:05.787 DEBUG twilight_http::ratelimiting: getting bucket for path: GatewayBot | |
Aug 20 23:20:05.787 DEBUG twilight_http::ratelimiting: making new bucket for path: GatewayBot | |
Aug 20 23:20:05.788 DEBUG twilight_http::ratelimiting::bucket: starting to get next in queue path=GatewayBot | |
Aug 20 23:20:05.788 DEBUG background queue task{path=GatewayBot}: twilight_http::ratelimiting::bucket: starting to wait for response headers | |
Aug 20 23:20:05.906 DEBUG twilight_http::ratelimiting::bucket: updating bucket path=GatewayBot | |
Aug 20 23:20:05.906 DEBUG twilight_http::ratelimiting::bucket: starting to get next in queue path=GatewayBot | |
Aug 20 23:20:05.906 DEBUG twilight_http::client: URL: "https://discord.com/api/v8/gateway/bot" | |
Aug 20 23:20:05.906 DEBUG twilight_http::ratelimiting: getting bucket for path: GatewayBot | |
Aug 20 23:20:05.906 DEBUG twilight_http::ratel |
This file contains 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 gcd | |
class ID: | |
def __init__(self, p = 53, q = 59): | |
self.__p = p | |
self.__q = q | |
@property | |
def __phi(self) -> int: | |
return (self.__p - 1) * (self.__q - 1) |
This file contains 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 argparse | |
from unittest import TestCase | |
A = { | |
1000: 'M', | |
900: 'CM', | |
500: 'D', | |
400: 'CD', | |
100: 'C', | |
90: 'XC', |
This file contains 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 random | |
random.seed(69420) | |
print( | |
''.join( | |
chr(random.randrange(256) ^ c) | |
for c in | |
bytes.fromhex('EA8760D97CD68CB754E490D68D37606E97BBC1BD2B25C605CDC0D532BE') | |
if random.randrange(2) |
OlderNewer