Skip to content

Instantly share code, notes, and snippets.

import rhinoscriptsyntax as rs
step = 0.00000001
pApos = rs.EvaluateCurve(x,0)
pBpos = rs.EvaluateCurve(x,0.00000001)
pA = rs.AddPoint(pApos)
pB = rs.AddPoint(pBpos)
a = []
right = False
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
<div ng-repeat="person in people">
<p>{{p.name.first}}</p>
<slider-box
title-text="{{p.name.first}} {{p.name.last}}"
body-text="Some body text"
img-src="{{ person.employee.photo.colour}}"
more-link="#"></slider-box>
</div>
</div>
@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"