Instantly share code, notes, and snippets.
🤨
Electronics/Firmware/DSP engineer. (See also GitHub Gist.)
endolith /generate.py
Last activeMay 20, 2025 21:53 — forked fromgordonjcp/generate.py
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
| #!/usr/bin/python | |
| # Copyright (c) 2016, Gordon JC Pearce <gordon@gjcp.net> | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # | |
| # 1. Redistributions of source code must retain the above copyright notice, | |
| # this list of conditions and the following disclaimer. |
endolith /.gitignore
Last activeSeptember 20, 2024 00:21
I tried to plot AGI on the Chatbot Arena Elo scale by comparing to "both bad" and "tie" votes 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
| *.json | |
| *checkpoint.ipynb |
endolith /whisper_transcribe.py
CreatedMarch 27, 2023 02:33
Transcribe a long audio recording using OpenAI Whisper API 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
| """ | |
| Break up a long recording to fit within the Whisper API's limits, with some | |
| overlap, so no words are missed, and then feed to OpenAI Whisper API to | |
| transcribe it to .txt file. Written by endolith and ChatGPT-4. | |
| """ | |
| importopenai | |
| importmath | |
| importos | |
| importsubprocess |
endolith /db_to_gpx.py
CreatedSeptember 9, 2022 01:08
Maprika sqlite database to GPX track converter 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
| """ | |
| WrittenbyGPT3fromthisEnglishprompt (withonetweaktotheprompt,toget | |
| thetimestampparametertonoterrorout,andPEP8fixes): | |
| ---- | |
| 1.Openasqlitedatabasewithanamelike`2022-07-17 17.48.19.db`or | |
| `2021-04-11 08.44.16.db` | |
| 2.Insideisatablecalled`locations`,withheaders [LOCTYPEINTEGER, | |
| TIMESTAMPBIGINT,LATITUDEREAL,LONGITUDEREAL,ALTITUDEREAL,ACCURACY |
endolith /estimated_variance_of_estimated_probability.py
Last activeDecember 13, 2023 18:20
Confirm the formula for estimating the variance of an estimated probability. (Trying to understand error bars forhttps://github.com/endolith/elsim/issues/13) 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
| """ | |
| Confirm the formula for estimating the variance of an estimated probability. | |
| Created on Fri May 27 11:06:43 2022 | |
| """ | |
| importnumpyasnp | |
| deffunc(x): | |
| """ |
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
| """ | |
| Train a neural network to learn an FIR filter. | |
| Created on Fri Aug 3 15:00:40 2018 | |
| """ | |
| fromtensorflow.keras.modelsimportSequential | |
| fromtensorflow.keras.layersimportDense | |
| fromtensorflow.keras.callbacksimportCallback | |
| importnumpyasnp | |
| fromscipyimportsignal |
NewerOlder
