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
// | |
// codebot : virtual robotics programming | |
// by patrick kage | |
// pkb.h : pkbasic interpreter | |
// | |
// this file was created from a mainfile of an old program. this file is a goddamn mess. | |
#ifndef CB_INTRP | |
#define CB_INTRP |
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
package org.kagelabs; | |
import java.awt.Color; | |
import java.awt.geom.Point2D; | |
import java.util.HashMap; | |
import java.util.Random; | |
import robocode.AdvancedRobot; | |
import robocode.ScannedRobotEvent; |
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
from PIL import Image | |
import numpy as np | |
import glob, os | |
g3 = 'g3' | |
g4c = 'g4c' | |
g4nc = 'g4nc' | |
np = 'np' | |
filename = 'Prostate_Cancer_Data' |
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
# json pretty print with compacted leaf arrays | |
# @author patrick kage | |
import json | |
def makeindent(level): | |
return '\t' * level; | |
# check if argument needs to be exploded | |
def contains_complex(arr): |
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
--- utilities for converting base | |
-- @author patrick kage | |
module BaseConvert where | |
import Data.Char | |
import Data.List | |
import Data.Maybe | |
import Data.Tuple | |
import Control.Monad |
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
#! /usr/bin/env python3 | |
# this requires packages requests, beautifulsoup4 | |
import requests | |
from datetime import datetime | |
from bs4 import BeautifulSoup | |
# download the webpage, assuming it's using HTTP Basic Auth | |
r = requests.get('http://192.168.0.1/#!/home/status', auth=('user', 'pass')) |
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
/** | |
* Networking learning project - static server | |
* @author Patrick Kage | |
*/ | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netdb.h> | |
#include <stdio.h> | |
#include <string.h> |
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
/** | |
* BFF - jit compiled bf | |
* @author Patrick Kage | |
*/ | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#define MEMORY_SIZE 30000 |
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
alias l="ls -AFG" | |
alias ll="ls -lAFGh" | |
alias vi="nvim" | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias res="cd ~/repositories" | |
# get the git branch | |
parse_git_branch() { |
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
#! /usr/bin/env python3 | |
# | |
# 2-Dimensional Array Example | |
# @author Patrick Kage | |
# | |
# pretty-printing module, so that printing the array looks nice | |
from pprint import pprint |
OlderNewer