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 Crypto import Random | |
from Crypto.Cipher import AES | |
from Crypto.Cipher import Salsa20 | |
from Crypto.Cipher import ChaCha20 | |
from Crypto.Cipher import ARC4 | |
from Crypto.Cipher import PKCS1_OAEP | |
from Crypto.Util import Padding | |
from Crypto.PublicKey import RSA | |
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 imaplib | |
import time | |
import email | |
import logging | |
import logging.config | |
logging_config = dict( | |
version=1, | |
formatters={'f': { | |
'format': '%(asctime)s %(name)-12s %(levelname)-8s %(message)s' | |
}}, |
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 logging | |
import logging.config | |
import os | |
logging_config = dict( | |
version=1, | |
disable_existing_loggers=False, | |
formatters={'f': { | |
'format': '%(asctime)s %(name)-12s %(levelname)-8s %(message)s' |
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 logging | |
import logging.config | |
logging_config = dict( | |
version=1, | |
formatters={'f': { | |
'format': '%(asctime)s %(name)-12s %(levelname)-8s %(message)s' | |
}}, | |
handlers={'h': { | |
'class': 'logging.StreamHandler', | |
'formatter': 'f', |
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
package main | |
import ( | |
"log" | |
"strings" | |
"github.com/fsnotify/fsnotify" | |
) | |
type Event fsnotify.Op |
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 ctypes import * | |
import time | |
import datetime | |
class Record(Structure): | |
_fields_ = [ | |
("time", c_double), | |
("count", c_double) | |
] |
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 socket | |
import threading | |
import queue | |
HOST = '0.0.0.0' | |
PORT = 50000 | |
class Worker(threading.Thread): | |
def __init__(self, queue, **kwargs): |
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
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
import lxml.html | |
from collections import OrderedDict | |
import re | |
def after_first_check(func): |
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 __future__ import print_function | |
from bs4 import BeautifulSoup as bs | |
import requests | |
import logging | |
from itertools import count | |
import time | |
from blinker import signal | |
from lxml.html.clean import Cleaner | |
from lxml.html import tostring, fromstring, iterlinks | |
from selenium import webdriver |
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 math | |
def tri_prime(n): | |
primes = [2] | |
def is_prime(number): | |
if number % 2 == 0: return False | |
for i in range(3, math.floor(number / 2) + 1): | |
if number % i == 0: |