Skip to content

Instantly share code, notes, and snippets.

function collapseNodes(d) {
if (d._children) {
for (var i = 0; i < d._children.length; i++) {
collapseNodes(d._children[i])
}
}
d.children = null
d.has_matched = false;
update(d);
}
import requests, cookielib, time, re, os, sys
n = 10
nimbus_url = 'https://nimbus.mcgill.ca'
cj = cookielib.MozillaCookieJar()
cj.load('cookies.txt', ignore_expires=True)
for cookie in cj:
cookie.expires = time.time() + 14 * 24 * 3600
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cjauvin
cjauvin / knn.py
Last active August 29, 2015 13:59
{
"metadata": {
"name": "",
"signature": "sha256:f359a032d9f3827507e0c219d2bd2bf52bac5cb7e19595c49094e9d0c37a0075"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"metadata": {
"name": "",
"signature": "sha256:470129fc930ac898a2329a0d092295ee9959019757b377ff1f8aa45c837d7456"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"metadata": {
"name": "",
"signature": "sha256:41cea5f34899e267827b752bc05259bbcb784fc8c59a8eaca8b68ef2e1cb156b"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"metadata": {
"name": "",
"signature": "sha256:d87520ea2bf0a90163890ceae77de024f4e11db93872945df0017ab0b6f1189a"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"metadata": {
"name": "",
"signature": "sha256:99aeb3cf149c3a930a669cacd6b4bcffd6947445d6319bb5ace164909709711f"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [