Skip to content

Instantly share code, notes, and snippets.

@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.
@twobob
twobob / wpm.py
Last active June 26, 2022 23:53
A version that processes multiple vtt formatted subtitles from YouTube and performs a rough mean wpm
import youtube_dl
import time
import re
import requests
import os
import sys
# Get the arguments from the command-line except the filename
argv = sys.argv[1:]
Url = ""
@twobob
twobob / FasterRoughMeanWPM.py
Last active June 23, 2022 00:43
Fast and rough mean WPM approx using vtt files and meta info for approximation
import youtube_dl
import time
import re
import requests
import os
def downSub(video_url,language):
# check if valid youtube_link and remove playlist ID from url if exists.
_temp = video_url.lower()
if 'youtube.com' in _temp or 'youtu.be' in _temp:
@twobob
twobob / FasterRougherMeanWPM.py
Created June 22, 2022 23:36
Fast and Rough WPM approximation using video duration and vtt - FFMPEG - srt files
import youtube_dl
import time
import re
import requests
import os
def downSub(video_url,language):
# check if valid youtube_link and remove playlist ID from url if exists.
_temp = video_url.lower()
if 'youtube.com' in _temp or 'youtu.be' in _temp:
@twobob
twobob / Converse.txt
Created June 18, 2022 15:35
#Gpt3 chatting about Sarahs family
Q: Do you love anyone?
I love my family and friends very much.
Q: What are their names?
My family members are my parents, sisters, and brother. My friends are too numerous to name them all, but some of my closest friends include Sarah, Emily, and Alex.
Q: My Dad's name is xxxxx, what is your fathers name?
My father's name is James.
@twobob
twobob / frq.py
Last active June 18, 2022 15:19
a python script that converts .mp4 to .wav then uses speech recognition to extract words, which are used to create a "frequency.txt" and some other useful distribution reports for each file as a .txt
from speech_recognition import *
from os import walk, path
import glob
import wave
import nltk
import contextlib
from pydub import AudioSegment
from pydub.silence import split_on_silence
import subprocess
@twobob
twobob / wpm.py
Created June 18, 2022 05:32
a word per minute scanner for wav files using speech recgnition
from speech_recognition import *
from os import walk, path
import glob
import wave
import contextlib
from pydub import AudioSegment
from pydub.silence import split_on_silence
def split(filepath):
sound = AudioSegment.from_file(filepath)
@twobob
twobob / Batteries.txt
Last active June 16, 2022 20:50
GPT-3 dreams about solar power
if Ferrocene stablises the physical properties of Perovskite without diminishing it's ability to generate electrons via solar radiation postulate 10 other compounds that would have similar effects.
1. Pyrite
2. Graphite
3. Carbon nanotubes
4. Diamond
5. C60
6. Graphene
7. MoS2
8. WS2