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 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) |
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 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: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| d = { | |
| "a1": { | |
| "b1": { | |
| "c1": {4, 5}, | |
| "c2": "123", | |
| "c3": tuple(), | |
| "c4": 100_000, | |
| "c5": 1 ** 200000, | |
| }, | |
| "b2": "something else", |
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
| upstream api_servers { | |
| localhost:8080; | |
| localhost:8081; | |
| } | |
| server { | |
| server_name www.deb.com; | |
| root /www; | |
| location / { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 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 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
| // ==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 |
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 numpy as np | |
| from tqdm import tqdm | |
| from multiprocessing import Pool | |
| file_name = "test.gro" #Should be changed | |
| frame_count = 14 #Should be changed | |
| line_count = 4014 #Should be changed | |
| Lz = 2.84 #Should be changed | |
| Lx = 6.95 |
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 tqdm import tqdm | |
| from multiprocessing import Pool | |
| def myfn(x): | |
| return x ** 2 | |
| with Pool() as pool: | |
| args = list(range(1_000_000)) | |
| work = pool.imap_unordered(myfn, args, chunksize=100) |
NewerOlder