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
# encoding: utf-8 | |
# Install: pipenv install requests bs4 --python 3 | |
# Usage: python mailer.py https://arxiv.org/abs/1805.12076 | |
# Always supply an arxiv ABS page!!! | |
import sys | |
import os | |
import smtplib | |
import requests |
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
# Define some special things | |
SPECIAL = '*|' | |
ALPHABET = '10' | |
EPSILON = None | |
# functions | |
def automaton_print(automaton): | |
"Neatly prints the automaton" | |
states, alphabet, start, final, transfer = automaton | |
print('STATES : ', states) |
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 requests | |
payload = {"text": "Mytext", "style": 0, "bias": 0.1} | |
url = "https://handwriting-generator.herokuapp.com/write" | |
page = requests.post(url, json=payload) | |
with open("x.png", "wb") as fl: | |
fl.write(page.content) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
def get_flag(): | |
con = None | |
flag = None | |
while True: | |
try: | |
con = swat.CAS() if con is None else con | |
flag = con.CASTable() if flag is None else flag | |
except Exception: | |
con = flag = None | |
else: |
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
d = { | |
"a1": { | |
"b1": { | |
"c1": {4, 5}, | |
"c2": "123", | |
"c3": tuple(), | |
"c4": 100_000, | |
"c5": 1 ** 200000, | |
}, | |
"b2": "something else", |
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
upstream api_servers { | |
localhost:8080; | |
localhost:8081; | |
} | |
server { | |
server_name www.deb.com; | |
root /www; | |
location / { |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 torch import nn | |
from torch import optim | |
from tqdm import tqdm | |
from tensorboardX import SummaryWriter | |
import torch | |
n = 100 | |
inp = torch.Tensor([[0, 0], | |
[0, 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
// ==UserScript== | |
// @name ArxivPdfNoRedirect | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://arxiv.org/abs/* | |
// @grant none | |
// @require https://code.jquery.com/jquery-3.2.1.min.js |
NewerOlder