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 / perceptron.py
Created October 16, 2016 19:25
a perceptron that can work with "and" and "or" gates
import numpy as np
import random
import sys
and_gate = [
# [(inputs), expected output]
[(1, 1), 1],
[(1, -1), -1],
[(-1, 1), -1],
[(-1, -1), -1]
@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 / index.html
Created March 30, 2016 14:11
week8-webrtc
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Arvo' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="peer.min.js"></script>
<script type="text/javascript">
var counter = 0;
var mypeerid = null;
var peer = null;
@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;
@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
*/
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 / 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;