Skip to content

Instantly share code, notes, and snippets.

View eabase's full-sized avatar


  • Between the radio ether and you.
View GitHub Profile
eabase /
Created September 25, 2020 21:54 — forked from mgeeky/
Various Powershell Download Cradles purposed as one-liners

Download Cradles

0) Extra goodies

  • Obfuscated FromBase64String with -bxor nice for dynamic strings deobfuscation:
  • The same as above but for UTF-16 base64 encoded strings:
eabase /
Created September 29, 2020 11:02 — forked from elibroftw/
A Python file to help me get quick statistics on the stock market. It's always evolving.
Investing Quick Analytics
Author: Elijah Lopez
Version: 1.10.3
Created: April 3rd 2020
Updated: September 28th 2020
import calendar
from contextlib import suppress
import csv
eabase / typsetf.ps1
Created October 4, 2020 11:05
Trying to create a Powershell (pwsh.exe) equivalent to the Bash internal "typset -f"
# Trying to create a PoSh equivalent to the Bash internal "typset -f"
# Trying to create a Powershell (pwsh.exe) equivalent to the Bash internal "typset -f"
# From:
# Usage:
# Write-Host [System.String[]]$FX_DEFS = Get-ScriptFunctionDefinitions -Path "$($PSCommandPath | Split-Path)/Functions.ps1"
# Write-Host [System.String[]]$FX_DEFS = Get-ScriptFunctionDefinitions -Path "$($PSCommandPath | Split-Path)/Microsoft.PowerShell_profile.ps1"
eabase / MemoryAllocationHFT.cpp
Created October 23, 2020 18:54 — forked from silahian/MemoryAllocationHFT.cpp
Pre allocated vs dynamic arrays performance for low latency / high frequency trading systems
// Example program
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
// ***********************************
// This is for measuring CPU clocks
#if defined(__i386__)
static __inline__ unsigned long long rdtsc(void)
eabase /
Created November 11, 2020 12:39
GitHub Collapsible Content

Examples of Collapsible Content

Style 1

Click to see more:
Given the following python code
from pychartjs import BaseChart

class myChart(BaseChart):
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:

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 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 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 /
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])