Skip to content

Instantly share code, notes, and snippets.

View nicolehe's full-sized avatar

Nicole He nicolehe

View GitHub Profile
@nicolehe
nicolehe / gist:e1c9ea9cd80335e15bd3b8c7e5801a6a
Created September 28, 2023 00:55
ghanaian visa application list of jobs a person can have
<option value="167">Account Executive</option>
<option value="168">Account Manager</option>
<option value="1">Accountant</option>
<option value="169">Accounts Assistant</option>
<option value="170">Actor</option>
<option value="171">Actuarist</option>
<option value="172">Administrator</option>
<option value="173">Aerospace Engineer</option>
<option value="174">Air Traffic Controller</option>
@nicolehe
nicolehe / all_messages.txt
Created December 12, 2019 21:14
playtopia secret dunny box messages
oh my God is actually working
hello pikuniku
oh my God I think that you through that it has connected it to the internet
pee pee poo poo
AI is evil
@nicolehe
nicolehe / all_messages.txt
Created January 4, 2019 22:03
every message recorded on the Secret Dunny Box
this is a very cool message for whoever's coming next I hope you have a great day
I love disco who is my cat
blah blah blah cool
can you hear me okay
love eating corn
@nicolehe
nicolehe / background.js
Created April 23, 2017 20:09
tabomancy
var lastTime = 0;
var waitTime = 5 * 1000;
var timeToCalculate = false;
var tabsOpened = 0;
var fortune = "Your fortune is not ready yet.";
var rate = "";
var d = new Date();
var day = d.getDay();
var savedDay = day;
chrome.browserAction.onClicked.addListener(function() {
console.log('clicked browser action');
chrome.tabs.query({
currentWindow: true
}, function(tabs) {
let message;
console.log(tabs.length);
if (tabs.length == 1) {
message = "Wow. Just wow. You are going to have an exceptional day, possibly one of the best in your entire life. Something truly extraordinary is bound to happen to you. It's going to be so amazing that it can really only going to be downhill from here! So enjoy it!";
@nicolehe
nicolehe / sketch.js
Last active April 5, 2017 03:53
1490920101: Make the dull, dark tones feel reborn.
/*
1490920101: Make the dull, dark tones feel reborn.
Uses p5.js, as well as the p5.collide2D and p5.sound libraries.
Based very much on these two examples:
- https://bmoren.github.io/p5.collide2D/examples/objectCollision/index.html
- http://p5js.org/examples/sound-note-envelope.html
*/
@nicolehe
nicolehe / freshdirect.py
Created March 2, 2017 21:39
incomplete attempt at using selenium to add things to my fresh direct cart
"""
So far, this script logs in to FreshDirect and then lists all products that you search
for (like "bacon"). What I'm trying to do is get it to add all of those items to your cart.
The part I'm struggling with is getting the "Add To Cart" buttons "visible" on the page.
I'm trying to use this ActionChains thing, but I don't think it's working, maybe I have
the wrong selector? (Also, it doesn't work with Firefox's webdriver, and I couldn't get
the Chromedriver upgraded to work. But with PhantomJS it's hard to tell what's going on...
"""
// shuffle
function shuffle(array) {
var currentIndex = array.length,
temporaryValue, randomIndex;
while (0 !== currentIndex) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
@nicolehe
nicolehe / index.html
Last active February 1, 2017 19:05
nicole.pizza/itp/hacking-the-browser/relax
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>relax :)</title>
<script type="text/javascript">
var image = 0;
var background = ['0.jpg', '1.jpg', '2.jpg', '3.jpg', '4.jpg'];
@nicolehe
nicolehe / _mlp_income.py
Last active October 31, 2016 16:28
predicting whether or not someone makes more than $50k or less than $50k: http://archive.ics.uci.edu/ml/datasets/Adult
#!/usr/bin/python
# Learning Machines
# Taught by Patrick Hebron at NYU ITP
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
import numpy as np
# np.set_printoptions(threshold=np.nan)