Skip to content

Instantly share code, notes, and snippets.

View shipof123's full-sized avatar

shipof123

View GitHub Profile
@shipof123
shipof123 / intstrUDL.cpp
Last active July 5, 2018 14:21
UDL for converting ints into std::strings and char * (online link http://cpp.sh/8bju7)
#include <deque> // if you use vectors instead you have to add them to the string in reverse order (no push_front())
#include <string>
#include <iostream> // for testing types
#include <cxxabi.h> // ditto
#include <typeinfo> // also for testing types
char * Demangle(const char* Object)
{
int status;
char * RealName;
const readline = require('readline')
const Discord = require('discord.js');
const client = new Discord.Client();
var rl = readline.createInterface({
input : process.stdin,
output : process.stdout,
@shipof123
shipof123 / sv.cpp
Last active December 2, 2020 18:24
#include <sstream>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <utility>
/*
* Small, generalized utility for converting *-sv (*-seperated value) files to html tables
* C++11 or higher
#!/bin/python
# Connell Paxton
from __future__ import print_function
from random import SystemRandom
rand = SystemRandom()
# utility func for data collection & error handling
import sys
def eprint(*args, **kwargs):
#!/bin/bash
# Connell Paxton
# Bash (Bourne Again SHell) doesn't support floating point math, so `bc` is used
float_scale=2
function float_math()
{
local stat=0
local result=0.0
#!/bin/python
# Connell Paxton
import plotly as pl
import plotly.graph_objs as go
from sys import argv
from random import randint
crx = [] # [0]
mut = [] # [1]
gav= [] # [2]
#!/bin/python
# Connell Paxton
import sys
input = open(sys.argv[1], "r")
row = 1
max_lines = []
lines = input.readlines()
chunk_sofar = 0
#!/bin/python
import plotly as pl
import plotly.graph_objs as go
from sys import argv
crx = [] # [0]
mut = [] # [1]
#gav= [] # [2]
avg = [] # [3]
"""gst = [] # [4]
#include <algorithm>
#include <iostream>
#include <string>
#include <fstream>
#include <cctype>
#include <array>
#include <set>
void fixText(std::string& s) {
std::transform(s.begin(), s.end(), s.begin(),
char* process_cards(char deck[162]) {
char new_deck[54];
bool _JA = false;
bool _JB = false;
for (unsigned char i = 0, j = 0; i < 164; j++) {
switch(deck[i]) {
case 'J':
switch (deck[(i*3)+1]) {
case 'A':
JA_pos = j;