This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Original script by Zesty McLime https://github.com/zestymclime/RGLStats/blob/master/grablogs.py | |
#Modifed by CaptainZidgel for readability, functionality, and removal of pandas/numpy as dependency in the scraping section | |
from bs4 import BeautifulSoup | |
import cfscrape | |
import re | |
season3_divs = {'invite':'404','div1':'405','div2':'430','main':'406','intermediate':'407','amateur':'410','newcomer':'411'} | |
season2_divs = {'invite': '360', 'advanced': '361', 'main': '362', 'intermediate': '363', 'amateur': '359', 'newcomer': '364'} | |
def scrape_teams(divisions, div_ids = season3_divs, season_id = '70', league_id = '40'): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import sys | |
import ipaddress | |
def unfurl_relays(src="NetworkDatagramConfig.json", psep=":"): | |
l = [] | |
with open(src, "r") as f: | |
servers = json.loads(f.read()) | |
for pop in servers['pops']: | |
key, pop = pop, servers['pops'][pop] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A script to swap distributions for imported scripts <production / development> | |
# Written by Zidgel for the public domain on 5/11/2020 | |
# Usage: ./sw.sh [file] [library] [mode] | |
# Modes: d - Development | p - Production | |
# If you want to know what a line does, let me know. | |
lua -e " | |
print([[sw.sh: Executing swap]]) | |
local dict = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ffi = require("ffi") | |
local lfs = require("lfs") | |
local time_format = function(str) | |
local t = {} | |
string.gsub(str, '(%d%d%d%d)%-(%d%d)%-(%d%d)', function(y, m, d) | |
t.year = y | |
t.month = m | |
t.day = d | |
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This code is from | |
//https://github.com/norman/hello-lua/blob/master/hello.c | |
//Thanks Norman! | |
//Unfortunately you forgot to actually document it so I'm adding comments as I learn. This is written for Lua 5.1.*, the API will change with versions, of course. | |
#include "lua.h" | |
#include "lauxlib.h" | |
#define MESSAGE "hello world!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://pythonprogramming.net/go/sync-goroutines-go-language-programming-tutorial/?completed=/go/goroutines-go-language-programming-tutorial/ | |
//https://godoc.org/github.com/go-redis/redis#example-PubSub | |
package main | |
import ( | |
"github.com/go-redis/redis/v7" //this is so hard to install :D | |
"fmt" | |
"sync" | |
"time" | |
) |
NewerOlder