Skip to content

Instantly share code, notes, and snippets.

View dte's full-sized avatar
💭
dreaming

Dillon Erb dte

💭
dreaming
View GitHub Profile
@thomasantony
thomasantony / chatgpt_parser_md.py
Last active January 11, 2024 13:21
Convert saved HTML transcripts from ChatGPT to Markdown
# Save the transcripts using the "Save Page WE" Chrome Extension
# This script was generated by ChatGPT
import sys
from bs4 import BeautifulSoup
# Check if a file was provided as a command line argument
if len(sys.argv) < 2:
print("Please provide an HTML file as a command line argument.")
sys.exit(1)
import keyboard
import time
import random
prompt = str(input('Bir kavram girin: '))
if prompt == '':
prompt = "reglan arm cycling jersey design in bright green, yellow, blue, red, grey, white, black, purple, vivid colors, sharp, realistic, ultra detailed, 8k"
prompt = "cycling jersey design in pastel colors, sharp, realistic, ultra detailed, 8k"
@lg
lg / cloudy-gamer-launcher.sh
Last active April 28, 2021 14:25
Easily start/stop Paperspace and Parsec instances
#!/bin/bash
#
# CloudyGamerLauncher by Larry Gadea
# Easily start/stop Paperspace and Parsec instances
#
# Make sure to fill out the variables below. For the machine id, use the
# 8-letter identifier for the machine on Paperspace (ex. PS8RGDUY)
#
# Note: Requires Paperspace API key (generate one in account settings)
@CapCap
CapCap / tensorflow_opencv_ubuntu_deps.sh.txt
Last active January 3, 2023 20:28
Paperspace tensorflow+opencv setup for both python2 and python3 on ubuntu 16
#!/bin/bash
# Don't require you to constantly enter password for sudo:
sudo visudo
# In the bottom of the file, paste the following (without the `#`):
# paperspace ALL=(ALL) NOPASSWD: ALL
# Then press `ctl+o` then `enter` to save your changes, and `ctr+x` to exit nano
# Allow connection from your IP to any port- default seems to be just 22 (ssh)
@karpathy
karpathy / min-char-rnn.py
Last active May 6, 2024 16:42
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@makkes
makkes / gist:44675a0ef9c61aa88283
Last active August 29, 2015 14:07
wrtc DataChannel test
var wrtc = require('wrtc');
var pcs = [],
done = [],
MAX_PCS = 30;
pcoptions = {
iceServers: []
};
@ceejbot
ceejbot / proposal.md
Last active November 25, 2015 21:13
monitoring proposal

Go here for the latest + some code.

numbat

An alerting engine for a metrics & monitoring system.

This is the same approach I wanted in my initial spike, only instead of writing a custom collector & using an existing alerting engine (riemann), I'm proposing using an existing collector (hekad) and writing the alerting engine.

The system

@deandob
deandob / livestream
Created February 26, 2014 22:31
Node.JS function to remux mp4/h.264 video from an IP camera to a HTML5 video tag using FFMPEG
// Live video stream management for HTML5 video. Uses FFMPEG to connect to H.264 camera stream,
// Camera stream is remuxed to a MP4 stream for HTML5 video compatibility and segments are recorded for later playback
var liveStream = function (req, resp) { // handle each client request by instantiating a new FFMPEG instance
// For live streaming, create a fragmented MP4 file with empty moov (no seeking possible).
var reqUrl = url.parse(req.url, true)
var cameraName = typeof reqUrl.pathname === "string" ? reqUrl.pathname.substring(1) : undefined;
if (cameraName) {
try {
cameraName = decodeURIComponent(cameraName);
(ns scottdw.plot.demo
(:import [java.util Random]
[org.jzy3d.analysis AnalysisLauncher AbstractAnalysis]
[org.jzy3d.chart Chart]
[org.jzy3d.chart.factories AWTChartComponentFactory]
[org.jzy3d.colors Color ColorMapper]
[org.jzy3d.colors.colormaps ColorMapRainbow]
[org.jzy3d.maths Coord3d Range]
[org.jzy3d.plot3d.builder Builder Mapper]
[org.jzy3d.plot3d.builder.concrete OrthonormalGrid]
javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.3.2%22,function($,L)%7B$('%23header,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push,%20.wiki-actions,%20%23last-edit,%20.actions,%20.header').remove();%20$('%23files,%20.file').css(%7B%22background%22:%22none%22,%20%22border%22:%22none%22%7D);%20$('link').removeAttr('media');%7D);