Skip to content

Instantly share code, notes, and snippets.

View arnaudsj's full-sized avatar

Sébastien Arnaud arnaudsj

View GitHub Profile
import http.client, urllib.request, urllib.parse, urllib.error, base64
import json
import csv
names = ['YOUR LIST OF NAMES']
companies = ['YOUR LIST OF COMPANIES FOR EACH NAME']
YOUR_API_KEY = 'YOUR_API_KEY'
linkedin = []
@soumith
soumith / gist:01da3874bf014d8a8c53406c2b95d56b
Last active March 28, 2022 16:53
Install PillowSIMD+libjpeg-turbo on Conda
conda uninstall --force pillow -y
# install libjpeg-turbo to $HOME/turbojpeg
git clone https://github.com/libjpeg-turbo/libjpeg-turbo
pushd libjpeg-turbo
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/turbojpeg
make
make install
@W4ngatang
W4ngatang / download_glue_data.py
Last active October 31, 2024 02:08
Script for downloading data of the GLUE benchmark (gluebenchmark.com)
''' Script for downloading all GLUE data.
Note: for legal reasons, we are unable to host MRPC.
You can either use the version hosted by the SentEval team, which is already tokenized,
or you can download the original data from (https://download.microsoft.com/download/D/4/6/D46FF87A-F6B9-4252-AA8B-3604ED519838/MSRParaphraseCorpus.msi) and extract the data from it manually.
For Windows users, you can run the .msi file. For Mac and Linux users, consider an external library such as 'cabextract' (see below for an example).
You should then rename and place specific files in a folder (see below for an example).
mkdir MRPC
cabextract MSRParaphraseCorpus.msi -d MRPC
@ahoereth
ahoereth / awstf.py
Last active June 28, 2018 17:44
Find cheapest p2.xlarge spot instance availability zone and provide docker-machine command to lunch it with a ready-to-use nvidia-docker AMI.
#!/usr/bin/env python3
"""Script locating the cheapest AWS GPU compute spot instance for docker."""
from argparse import ArgumentParser
from datetime import datetime, timedelta
from itertools import groupby
from operator import itemgetter
import boto3
import numpy as np
@Brainiarc7
Brainiarc7 / build-tensorflow-from-source.md
Last active September 9, 2024 22:48
Build Tensorflow from source, for better performance on Ubuntu.

Building Tensorflow from source on Ubuntu 16.04LTS for maximum performance:

TensorFlow is now distributed under an Apache v2 open source license on GitHub.

On Ubuntu 16.04LTS+:

Step 1. Install NVIDIA CUDA:

To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit as shown:

@diffficult
diffficult / chromeos-crosh-custom-setup.md
Last active October 4, 2024 08:41 — forked from bramford/chromeos-crosh-custom-setup.md
Customize your ChromeOS fonts - working April 2017

Customize Chromebook Chrosh Shell Environment

Requirement: Chromebook, Common Sense, Commandline Ablity, 1 hour of time

Dear developers with a spare Chromebook lets inject a little personalization into your Crosh shell with custom fonts, the solarized theme, and extra secure shell options.

Also, keep in mind that the terms Chrosh, Chrosh Window, and Secure Shell all refer to various versions and extentions built around the ChromeOS terminal. Settings that affect the ChromeOS terminal are global.

Custom Fonts

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
def move_to_dir(old, new):
"""Converts using e.g. old position (1,1) and new position (2, 1) to a direction (RIGHT)"""
if old[0] < new[0]:
return "RIGHT"
if old[1] < new[1]:
return "DOWN"
if old[0] > new[0]:
return "LEFT"
return "UP"
@whophil
whophil / jupyter.service
Last active October 8, 2024 00:42 — forked from doowon/jupyter_systemd
A systemd script for running a Jupyter notebook server.
# After Ubuntu 16.04, Systemd becomes the default.
# It is simpler than https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/home/phil/Enthought/Canopy_64bit/User/bin/jupyter-notebook --config=/home/phil/.jupyter/jupyter_notebook_config.py
@daveliepmann
daveliepmann / bootstrapping.markdown
Created May 27, 2016 08:11
Implementing Sugar & James’ paper, "Finding the number of clusters in a data set: An information theoretic approach" in Clojure — Part 4

Implementing the k-means jump method: Part Four

This fourth and final part of our exploration into the jump method wraps things up by following a basic application of the technique through to a search for results we can be confident in.

We'll reuse functions from rest of the series (Part One, Part Two, Part Three). You'll also want the original paper handy to refer back to their charts.

First, we're going to return to several prior data sets: