Skip to content

Instantly share code, notes, and snippets.

@notionparallax
notionparallax / SparkHist.js
Last active August 29, 2015 13:56
This is a limited unicode-histogram for use in a Google Spreadsheet.
function sparkHist(inputRange){
//this is what we have to work with from the unicode block elements
//▀▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▐░▒▓▔▕▖▗▘▙▚▛▜▝▞▟
//▁▂▃▄▅▆▇█ is the useful bit
var bars=["░","▁","▂","▃","▄","▅","▆","▇","█"];
//var inputRange = [10,10,8,10,10,10,10,10,1,1,,8,5,10,'name@email.com',,,5,10,7,10,10,1,1,8,7,,7,8,9,9,4,10,,,5,,10,8,8,5,8,10,8,,8,2,10,8,8,8,10,10,8,10,10,5,10,10,5,9,10,8,8,5,,5,,,,,,,,,,10,10,10,9,1,4,8,5,7,,,,8,5,8,,,];
var filtered = filterNonNum(inputRange[0]);//Logger.log("filtered").log(filtered);
var binned = bin(filtered); //Logger.log(binned);
var vals = valueArray(binned); //Logger.log(vals);
function studPick() {
var studentList = ["Daniel", "Judge","Jonathan", "John", "Amethyst", "Noah", "Antonio", "Ramon", "Aidan", "Manuel", "Ingrid", "Anastasia", "Annabella", "Christella", "La'Kym", "Isabella", "Hadiyah", "Jersey S", "Aviana", "Zion", "Carlos", "Loren", "Irie", "Trinidad", "Jersey W", "Stella"]
var random = Math.ceil(Math.random() * studentList.length);
console.log("random = " + random + ".");
student = studentList[random];
alert("Randomly picked student: " + student + ".")
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20140519T223000Z
DTEND:20140519T233000Z
DTSTAMP:20140311T231657Z
ORGANIZER;CN=Syd Appraisals:mailto:n.com.au_fvku@group.calendar.google.com
Sub InsertPictures()
Dim Pict() As Variant
Dim ImgFileFormat As String
Dim PictCell As Range
Dim Ans As Integer
Dim newPicture As Shape
Dim lRow As Long, lLoop As Long
Dim lTop As Long
Dim sShape As Shape
var forms = {
Registration: [
{
inputType : 'text',
modelName : 'registration_set',
typeAhead : 'registrationOrganisation',
inputName : 'registrationOrganisation',
inputLabel : 'Organisation',
popoverText: 'This is organisation that you are registered with.'
},
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
#from selenium.webdriver.common.by import By
import pandas as pd
bodyStats = pd.read_csv('fitbit_export_20140406.csv') #get your data csv (I cheated and deleted the top row)
@notionparallax
notionparallax / workoutsDSL.rb
Created May 24, 2014 02:31
This is a very quick go at trying to use ruby syntax to describe crossfit workouts.
def fran()
for i in [21,15,9]
thruster(weight:40.kg, reps:i)
pull-up(reps:i)
end
end
def ‘Sixty Sixes'()
notes = "In 3’s (pair up otherwise, no 4’s)"
type="AMRAP"
@notionparallax
notionparallax / keymapping.js
Created July 3, 2014 03:25
an object that maps the key codes of strange keys to a string so that they can be logged more easily.
var keyMappings = {
8:"backspace",
9:"tab",
13:"enter",
16:"shift",
17:"ctrl",
18:"alt",
19:"pause break",
20:"caps lock",
27:"escape",
baseURL = "http://your.IP.add.ress"
password = "password"
username = "username"
require 'net/http'
require "uri"
require 'json'
def ask_oa(request, baseURL, params, username, password)
import rhinoscriptsyntax as rs
import Rhino.Geometry as rg
#from clr import AddReference as addr
#addr("Grasshopper")
#from System import Object
#from Grasshopper import DataTree
#from Grasshopper.Kernel.Data import GH_Path
import random