Skip to content

Instantly share code, notes, and snippets.



  • Between the radio ether and you.
View GitHub Profile
eabase / main.css
Created October 12, 2022 16:27
One button controls for multiple youtube videos in a 2x3 grid
View main.css
/* main.css */
header, footer {
font: 14px Arial, sans-serif;
padding: 8px;
color: white;
background-color: black;
clear: left;
text-align: left;
eabase /
Last active June 8, 2022 14:26
fancycompleter is Python REPL colorizer. This is the patched standalone version.
#!/usr/bin/env python -u
# -*- coding: UTF-8 -*-
# Filename:
# Author: Antonio Cuni
# Mods: EABASE
# Last: 2022-01-30
# License: BSD (from: in original repo)
eabase /
Last active January 16, 2022 11:23
Bash 24-bit HSV Color & Gray Scale
# Author: EABASE
# Date: 2022-01-16
# Version: 1.1
# History:
# The original file was taken from iterm2 [1], and later modified
# by EABASE in [2].
eabase /
Created December 20, 2021 02:10
Get additional PegRations using yfinance (package) and yahoo scraping api
# To resolve issue #903 in yfinance
# Date: 2021-12-19
# The PEG Ratio Yahoo Finance Paths:
# The working curl:
# curl -s{FE}/key-statistics?p={FE} | grep "root.App.main = " | sed -e "s/root.App.main = //" |sed 's/.$//'> dafuck_ok.json
eabase / HelloSDL2.cpp
Last active January 28, 2023 13:09
A minimal Hello World C++ example for using SDL2 to render text in a native Windows window.
View HelloSDL2.cpp
// Name: HelloSDL2.cpp
// Author: EAML
// Date: 2021-05-16
// Description:
// A minimal PoC for producing a native SDL2 Windows app that can
// be ran from either Windows Explorer or from Powershell console.
// It's designed to use minimal command line, compiler options,
// and dependencies... It will display a gray window for 2 sec's.
eabase /
Created May 15, 2021 19:06 — forked from karpathy/
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
eabase /
Created May 15, 2021 18:51 — forked from sharavsambuu/
Template for live algo with MetaTrader5 and Python
# References :
# -
import pytz
import pandas as pd
import MetaTrader5 as mt5
import time
from datetime import datetime
from threading import Timer
eabase /
Created December 18, 2020 23:15
pip search removed - The Return (How hard can it be?)
# Basic pip search function provided by:
import sys
from urllib import request
from tabulate import tabulate
def search () :
f = request.urlopen('' % sys.argv[1])
View dlib and face_recognition on raspberry

Install dlib and face_recognition on a Raspberry Pi

Instructions tested with a Raspberry Pi 2 with an 8GB memory card. Probably also works fine on a Raspberry Pi 3.


Download the latest Raspbian Jessie Light image. Earlier versions of Raspbian won't work.

Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.

eabase /
Created November 27, 2020 10:05 — forked from rwb27/
Internet access for a Raspberry Pi on a hidden network

Setting up a SOCKS proxy on a Raspberry Pi

My problem: I have a bunch of Raspberry Pi computers, all connected via a network switch and USB ethernet port to a "gateway" Raspberry Pi. However, I don't particularly want them all to be internet-connected all of the time, because (1) it's possible there is a slight security risk and (2) my IT folk at work might not like it. OK, I should also mention (3) I tried and failed to get NAT and dnsmasq to work, and don't have time to finish debugging it.

My solution: I SSH in to my "gateway" Pi (is it ok to call it a gateway even though it's resolutely failing to route any traffic? Never mind...), and from there I can connect to my hidden Pi(s), let's say for arguments sake it's called hiddenpi.local.

ssh pi@hiddenpi.local

Now, I can SSH back again, setting up a SOCKS proxy: