Skip to content

Instantly share code, notes, and snippets.

View coding-to-music's full-sized avatar
🚀

Tom Connors coding-to-music

🚀
View GitHub Profile
@coding-to-music
coding-to-music / admin_sa_binding.yaml
Created August 26, 2021 06:05 — forked from kenmoini/admin_sa_binding.yaml
Deploy an All-in-One Kubernetes host on DigitalOcean
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
@coding-to-music
coding-to-music / RobotPlayer.java
Created January 17, 2021 04:14 — forked from j-mao/RobotPlayer.java
Battlecode 2021 Pathfinding lecture
/*
* Battlecode 2021
* Pathfinding Lecture - sample code
*
* Bug pathing and communication strategies. Run this on the map "Quadrants" for a sense of how
* this strategy behaves: watch the red robots in the bottom-left corner.
*
* https://www.battlecode.org/
* https://github.com/battlecode/battlecode21
*/
@coding-to-music
coding-to-music / dials_algorithm_pseudocode.txt
Created January 17, 2021 04:14 — forked from j-mao/dials_algorithm_pseudocode.txt
Battlecode 2021 pathfinding lecture
DIAL'S ALGORITHM - PSEUDOCODE
Input:
Source = starting location
TimeToTravel[u, v] = how long to travel from u to v
C = maximum possible time a single step takes (for example, 10)
Initialize Q = list of C+1 collections of locations
If a location we want to expand has distance d, it will be stored in Q[d % (C+1)]
Initialize Expanded = an array of Booleans for the map, all false
telegraf:
image: telegraf
restart: always
environment:
HOST_PROC: /rootfs/proc
HOST_SYS: /rootfs/sys
HOST_ETC: /rootfs/etc
hostname: localhost
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
@coding-to-music
coding-to-music / docker-help.md
Created July 7, 2020 04:07 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@coding-to-music
coding-to-music / bq_easy.py
Created October 26, 2019 02:13 — forked from korakot/bq_easy.py
Using bigquery easily in Google Colab. Focus on a single table.
import re
import pandas as pd
from google.cloud import bigquery
from google.colab import auth
PROJECT_ID = 'sql-hunt' # change to your own project
class BqTable:
def __init__(self, table, dataset='samples', active_project='bigquery-public-data', client=None):