Skip to content

Instantly share code, notes, and snippets.

View charlesreid1's full-sized avatar
💭
🍒 🍍 🍓 🍊 🍌

Chaz Reid charlesreid1

💭
🍒 🍍 🍓 🍊 🍌
View GitHub Profile
@dlareau
dlareau / fetchGameData.py
Created August 26, 2020 00:53
fetchGameData
import requests
import json
import sseclient
def getGameDay():
response = requests.get("https://www.blaseball.com/events/streamGameData", stream=True)
client = sseclient.SSEClient(response)
singleEvent = next(client.events())
client.close()
@dlareau
dlareau / graph.py
Last active August 26, 2020 02:33
Plot rescored games
import json
import glob
import requests
from matplotlib import pyplot as plt
from itertools import accumulate
# Load original season 3 games
with open("season3games.json", "r") as f:
line = f.read()
games = json.loads(line)
@dlareau
dlareau / gist:26431f6337b44f7ce91cc4bf7d4328cb
Created August 19, 2020 02:43
datablase player, team, and game draft
CREATE TABLE IF NOT EXISTS player(
player_id varchar(36) PRIMARY KEY, /* Use the uuid as the primary key */
captured_at timestamp /* The timestamp when this player data was fetched from the site. */
/* Or better yet if we can get it the timestamp the change took effect */
name text
deceased boolean
/* blaserunning */
base_thirst decimal
continuation decimal
@lilserf
lilserf / single-game.json
Last active August 26, 2020 02:59
Results for a random single game
[
{
"gameId": "258ed83f-19f3-4ddd-bb7e-9bb85768b8fd",
"eventType": "WALK",
"eventIndex": 0,
"inning": 0,
"outsBeforePlay": 0,
"batterId": "7310c32f-8f32-40f2-b086-54555a2c0e86",
"batterTeamId": "36569151-a2fb-43c1-9df7-2df512424c82",
"pitcherId": "9965eed5-086c-4977-9470-fe410f92d353",
*READ THIS TOP TO BOTTOM BEFORE STARTING TO COOK*
*DO NOT BLINDLY FOLLOW THIS RECIPE WITHOUT READING IT END TO END FIRST*
*croissants are weird.*
500g all purpose flour
10g salt
80g sugar
10g yeast
300ml cool water
300g butter (NICE BUTTER. get salted kerrygold, or "european style" butter. this is where MOST of the flavor comes from. don't skimp here.
@a6y3ap
a6y3ap / JosephusProblem.java
Last active July 3, 2021 11:49
Josephus Problem using Bitwise Operation (Java)
/*
* Solution of Josephus Problem using Bitwise Operation
* Shifting the most-significant set bit of n to the
* least significant bit will return the safe position.
*
* ====================== EXPLANATION ======================
*
* n (41) the number of people standing in the circle
* n = 101001
*
@devils-ey3
devils-ey3 / webdev_online_resources.md
Created July 16, 2018 20:11 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@daybreaker
daybreaker / reactions.rb
Last active May 11, 2022 12:41
Ruby script to check slack reaction counts
require 'slack-ruby-client' # first, make sure you do: gem install slack-ruby-client
require 'date'
# Add your Slack API token here
token = [YOUR TOKEN HERE]
Slack.configure do |config|
config.token = token
end
@hcmiya
hcmiya / install-tor-instance.md
Last active August 16, 2019 04:05
Example of building Tor instance
  • Install to Debian Buster
  • All of services needed to run Mastodon instance (tor, postgresql, redis, nginx) will be installed to the same server.

Install packages

# apt install postgresql redis nodejs npm ruby tor ffmpeg imagemagick git \
  nginx wget bundler protobuf-compiler iptables-persistent ncurses-term vim \
  gcc g++ make patch ruby-dev libprotobuf-dev libidn11-dev libpq-dev libicu-dev libxml2-dev libxslt1-dev 
@betatim
betatim / Kubernetes cluster monitoring (binder-prod)-1516879011895.json
Created January 25, 2018 11:19
State of the grafana.mybinder.org panels.
{
"__inputs": [],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "4.6.3"
},
{