Skip to content

Instantly share code, notes, and snippets.

View KenoLeon's full-sized avatar

Keno Leon KenoLeon

View GitHub Profile
@KenoLeon
KenoLeon / numerai-daily-scripts.ipynb
Created May 18, 2023 17:15
Numerai Daily Scripts.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KenoLeon
KenoLeon / package.json
Created August 2, 2022 20:07
package.json for hello world in electron
{
"name": "medium_electron",
"version": "1.0.0",
"description": "Hello World for Medium Article",
"main": "index.js",
"scripts": {
"start": "electron ."
},
"author": "",
"license": "ISC",
@KenoLeon
KenoLeon / index.js
Created August 2, 2022 20:03
Electron Hello World JS
const { app, BrowserWindow } = require('electron')
const createWindow = () => {
const win = new BrowserWindow({
width: 800,
height: 600,
})
win.loadFile('index.html')
}
@KenoLeon
KenoLeon / index.html
Created August 2, 2022 20:02
Hello World_
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self'"
/>
<meta
@KenoLeon
KenoLeon / twoTownsAllPaths.py
Last active June 5, 2022 20:15
two towns with all paths and stats
import networkx as nx
import matplotlib.pyplot as plt
# Extract all simple paths from
# one town to another and calculate
# some basic statistics.
# Init A Graph in networkx
G = nx.Graph()
@KenoLeon
KenoLeon / twoTownsRandomGraph.py
Last active June 4, 2022 21:04
Two town graph with weight data & random node position
import networkx as nx
import matplotlib.pyplot as plt
# Simple Two Town graph in networkx with weight data and random graph
# Init A Graph in networkx
G = nx.Graph()
# Townspeople and towns
@KenoLeon
KenoLeon / twoTownsWeights.py
Created June 3, 2022 01:56
Two town graph with weight in netowrkx
import networkx as nx
import matplotlib.pyplot as plt
# Simple Two Town graph in networkx with weight data
# Init A Graph in networkx
G = nx.Graph()
# Townspeople and towns
@KenoLeon
KenoLeon / twoTowns.py
Created June 2, 2022 20:22
Simple Two Town graph in networkx
import networkx as nx
import matplotlib.pyplot as plt
# Simple Two Town graph in networkx
# Init A Graph in networkx
G = nx.Graph()
# Townspeople and towns
@KenoLeon
KenoLeon / networkx_simplegraph.py
Last active June 2, 2022 01:22
simple graph in networkx
import networkx as nx
import matplotlib.pyplot as plt
# Basic Example for networkx
# Init A Graph in networkx
G = nx.Graph()
# Add Single Node:
G.add_node(1)
@KenoLeon
KenoLeon / coingeck_API_Call_ParseFilter.py
Created May 12, 2022 20:51
Parse and filter API response example
from pycoingecko import CoinGeckoAPI
import datetime as dt
# today in Timestamp
today = dt.datetime.today()
today_unix = today.timestamp()
# today minus 100 days in Timestamp
today_minus_100 = today - dt.timedelta(days=100)
today_minus_100_unix = today_minus_100.timestamp()