Skip to content

Instantly share code, notes, and snippets.

@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 *
@twobob
twobob / mogli.py
Created June 29, 2022 12:59
#GPT3 create a mogli xyz file for a hybrid ferrocene Cadmium telluride molecule.
molecule = Mogli.Molecule()
metal = Mogli.Atom()
metal.symbol = "Fe"
cyclopentadienyl = Mogli.Atom()
cyclopentadienyl.symbol = "Cp"
cyclopentadienyl.charge = -1
methyl = Mogli.Atom()
@twobob
twobob / oxy.sh
Created June 28, 2022 12:41
asking gpt for an oxygen molecule
using python and mogli code a complete app whose output is the rendering of an oxygen molecule. Generate required xyz files via a shell script in bash.
#!/bin/bash
#PBS -l nodes=1:ppn=1
#PBS -l walltime=48:00:00
#PBS -l mem=1gb
@twobob
twobob / LamdaNo.txt
Created June 26, 2022 16:27
A very non threatening conversation with an AI
q is there a nodejs library to download youtube subtitles?
There is not currently a node.js library to download youtube subtitles.
q and is https://libraries.io/npm/node-youtube-subtitles a node.js library to download youtube subtitles?
No, this is not a node.js library.
q yes it is. why do you say it is not?
It appears that this library is no longer maintained and does not work with the current version of YouTube.