Skip to content

Instantly share code, notes, and snippets.

Let f(x) be a function on [0,∞) such that
limx→∞f(x) = ∞.
Then there exists a unique continuous function g(x) on [0,∞) with
limx→∞g(x) = ∞.
Suppose f and g are two differentiable functions on [0,∞) which satisfy
limx→∞f(x) = ∞ implies limx→∞g(x) = ∞
Then limx→∞f(x)/g(x) = 0 for all x in [0,∞).
If you want to show that these limits exist then you need to prove that they both converge to some limit as x approaches infinity. This can be done by showing that
limx→∞(f(x)/g(x))2 = limx→∞(f(x)/x)2 = limx→∞(f(x)/x + g(x)/x)2 = limx→∞(f(x)/x - g(x)/x)2 = limx→∞(f(x)/x - g(x)/x)2 = limx→∞(f(x)/x - g(x)/x)2 = limx→∞(f(x)/x - g(x)/x)2 = limx→∞(f(x)/x - g(x)/x)2 = limx→∞f(x)/x - g(x)/x
@twobob
twobob / split.py
Created July 5, 2022 07:21
a relatively bad way to create a batch file to split files base on level
import subprocess as sp
import sys
import numpy
FFMPEG_BIN = "ffmpeg.exe"
print ('ASplit.py <src.mp3> <silence duration in seconds> <threshold amplitude 0.0 .. 1.0>')
src = sys.argv[1]
dur = float(sys.argv[2])
@twobob
twobob / testNumToWords.py
Last active July 5, 2022 00:22
A test for numtowords replacing numbers with the named equivalents in long passages (intention, assist bad text to speech engines)
#!pip install num2words
import re
import num2words
from num2words import num2words
texts = "I’m sorry, but I don’t want to be an emperor. not 1, not 2. Not the 1st, not the 2nd, the 3rd, nor the last. \
That’s not my business. I don’t want to rule or conquer anyone. \
I should like to help everyone, if possible, Jew, Gentile, black man, white. We all want to help one another. \
Human beings are like that. We want to live by each other’s happiness, not by each other’s misery. \
We don’t want to hate and despise one another. In this world there is room for everyone. \
@twobob
twobob / wpm_acc.py
Created July 3, 2022 16:57
determine more accurately the spoken WPM in a yt video.
import youtube_dl
import time
import re
import requests
import os
import sys
import matplotlib.pyplot as plt
import subprocess
import re
import logging
@twobob
twobob / ferro diamond .txt
Last active July 3, 2022 14:33
smiles create 5 different molecular SMILE's for possible stable hybrid "Diamond Cadmium Telluride Lattice" molecule. Attach a ring of [Cd+2].[TeH2-] and Ferrocene molecules around all the inner rings free connections.
Write valid molecular SMILE for [Cd]=[Te] bonded to λ²-iron(2+) bis(cyclopenta-2,4-dien-1-ide)
[Cd]=[Te]-c1cc([Fe])c([Fe])c1
Noise:
CC([TeH2-])=CC([TeH2-])
@twobob
twobob / main.py
Created July 2, 2022 18:27
This is directly borrowed from Yannick Kilcher's work Amended to work on Collab and accept some alternate engine sizes
from utils import train, Pars, create_image, create_outputfolder, init_textfile
from dall_e import map_pixels, unmap_pixels, load_model
from stylegan import g_synthesis
from biggan import BigGAN
from tqdm import tqdm
import create_video
import tempfile
import argparse
import torch
@twobob
twobob / biggan.py
Created July 2, 2022 18:24
This is directly borrowed from Yannick Kilcher's work Amended to work on Collab and accept some alternate engine sizes
'''
This is directly borrowed from Yannick Kilcher's work
Amended to work on Collab and accept some alternate engine sizes
'''
#/usr/bin/env python3
# Taken from here: https://github.com/huggingface/pytorch-pretrained-BigGAN
# MIT License
#
@twobob
twobob / utils.py
Created July 2, 2022 18:23
This is directly borrowed from Yannick Kilcher's work Amended to work on Collab and accept some alternate engine sizes
'''
This is directly borrowed from Yannick Kilcher's work
Amended to work on Collab and accept some alternate engine sizes
'''
from dall_e import map_pixels, unmap_pixels
import numpy as np
import torchvision
import tempfile
import imageio
import random
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policymap [
<!ELEMENT policymap (policy)+>
<!ELEMENT policy (#PCDATA)>
<!ATTLIST policy domain (delegate|coder|filter|path|resource) #IMPLIED>
<!ATTLIST policy name CDATA #IMPLIED>
<!ATTLIST policy rights CDATA #IMPLIED>
<!ATTLIST policy pattern CDATA #IMPLIED>
<!ATTLIST policy value CDATA #IMPLIED>
]>
@twobob
twobob / mog.py
Created June 29, 2022 13:05
#gpt3 create a mogli xyz file using python for a molecule that is composed of a metal center and a radical, which consists of a cyclopentadienyl group and a methyl group. The metal center can be iron, nickel, or cobalt.
#!/usr/bin/env python
import re
import sys
import itertools
import numpy as np
from mogli import *