This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ing | |
er | |
a | |
ly | |
ed | |
i | |
es | |
re | |
tion | |
in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import itertools | |
import multiprocessing.pool | |
def process_large_csv( | |
filename, | |
per_row, | |
worker_pool, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""A basic PyTorch ConvNet implementation on the MNIST dataset | |
From http://adventuresinmachinelearning.com/convolutional-neural-networks-tutorial-in-pytorch/ | |
""" | |
import os | |
from torch.utils.data import DataLoader | |
import torchvision.transforms as transforms | |
import torchvision.datasets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bokeh.plotting import figure, output_file, show | |
import numpy as np | |
x = [1, 2, 3, 4, 5] | |
y = [6, 7, 2, 4, 5] | |
# Output to static HTML file | |
output_file("lines.html") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""Multidimensional discrete <-> continuous conversions | |
Copyright 2018 Aaron Snoswell | |
""" | |
import math | |
import collections | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Acts as a proxy for apt-get - downloads packages on the local (devlopment) | |
# machine, then copies them to movo1 and movo2 and installs them | |
# It is suggested you run this in a temporary folder, as it downloads packages | |
# to the current working directory | |
# Caveat: Your movo-dev machine must be running the same ubuntu version and | |
# architecture as the movo machines (14.x, x86_64), otherwise it won't grab the | |
# correct packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The below code is designed to be injected into any GitHub page with a | |
* markdown document, e.g. from a bookmarklet | |
*/ | |
// Build list of parent and child elements (don't hide these) | |
var mdel = document.querySelector("article.markdown-body"); | |
var el = mdel; | |
var els = []; | |
while (el) { | |
els.unshift(el); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Demonstrates the batch_perception binary classification algorithm | |
(Rosenblatt 1958) from p190 of Shavel-Shwartz, 2014 "Understanding Machine | |
Learning" | |
Requires: | |
* Python 3 | |
* numpy | |
* scikit-learn | |
* matplotlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Toggles a VPN connection and does some other things | |
:: [e.g. connect/disconnect shared drives] | |
:: To set up a new VPN: type "rasphone /a" in the Run dialog [Win+R] | |
set vpn_name="EAIT VPN Connection" | |
ipconfig | find /i %vpn_name% && ( | |
:: Disconnect VPN | |
net use G: /delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple testcase for compiler-specific behaviour with the defined() C++ operator | |
* The spec states that if defined() appears as part of macro expansion, the behaviour is undefined | |
* | |
* On GNU cpp treats it as a genuine define() operator. Visual C++ doensn't. | |
* This generates many warnings when compiling e.g. the BSON library under Windows | |
* | |
* See https://gcc.gnu.org/onlinedocs/cpp/Defined.html for details | |
* | |
* On Visual C++ this program generates the following; |
NewerOlder