Skip to content

Instantly share code, notes, and snippets.

Colten Jackson jazzyjackson

Block or report user

Report or block jazzyjackson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View clean_csv.py
#!/usr/env python3
import csv, sys, re
export = sys.argv[1] + "/export.csv"
clean = sys.argv[1] + "/clean.csv"
def clean(cell):
whitespace = re.compile('\s')
singlespace = ' '
return re.sub(whitespace, singlespace, cell).strip()
View eval.js
#!/usr/bin/env node
// exec and program aren't necessary, slice(2) skips those references
// let [targetfile, ...args] = process.argv.slice(2)
const realType = require('./lib/realType')
function merge(a,b){
return Object.assign(b, a)
}
View formatKey.js
let isRealNumber = key => /^[0-9]+$/.test(key)
let isOKforDotNotation = key => /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(key)
function wrapKey(key){
if(isOKforDotNotation(key)){
return `.${key}`
} else if(isRealNumber(key)){
return `[${key}]`
} else {
return `["${key}"]`
View millis.js
const start = Date.now()
module.exports = function millis(){
return String(Date.now() - start).padEnd(8)
}
View pathFromString.js
/**
this function is modified from
lodash/.internal/stringToPath.js
MIT License
**/
const reEscapeChar = /\\(\\)?/g
const rePropName = RegExp(
// Match anything that isn't a dot or bracket.
'[^.[\\]]+' + '|' +
View realType.js
// module.exports = function realType(anyType){
// return global[Object.prototype.toString.call(anyType).slice(8, -1)]
// }
const extractType = anyInput => Object.prototype.toString.call(anyInput).slice(8, -1)
module.exports = function realType(anyType){
let literalType = global[extractType(anyType)]
return {
literal: literalType,
View chess dropdown plain html
<style>
chess {
background: black;
display: block;
width: 75px;
height: 75px;
display: flex;
justify-content: center;
}
option {
View badservo.ino
#include "motors.h"
#include <Adafruit_TiCoServo.h>
MotorState motorState(9, 10);
void setup() {
}
void loop() {
View Workingclass.ino
#include "motors.h"
#include <Adafruit_TiCoServo.h>
Adafruit_TiCoServo servo_backdrop;
Adafruit_TiCoServo servo_stage;
MotorState motorState;
void setup() {
// put your setup code here, to run once:
You can’t perform that action at this time.