Skip to content

Instantly share code, notes, and snippets.

@jmatt
jmatt / holoview_crossfilter_example.ipynb
Last active September 22, 2018 15:13
Holoviews Bokeh crossfilter example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@riku179
riku179 / python3_memo.md
Last active March 26, 2020 13:57
How to use OpenCV with Python3 in ArchLinux
  • procedure
$ sudo pacman -S opencv
$ sudo pip install numpy
  • check
$ python
>>> import cv2
anonymous
anonymous / subresource-integrity
Created February 1, 2016 14:58
Build a sub-resource integrity string (js | css). Usage: subresource-integrity cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.min.js
if [ ${1: -4} == ".css" ]; then h="<link href=\"//"$1"\""; f=" rel=\"stylesheet\">"; else h="<script src=\"//"$1"\""; f=" type=\"text/javascript\"></script>"; fi; echo $h" integrity=\"sha256-"`curl -s $1 | openssl dgst -sha256 -binary | openssl enc -base64 -A`" sha512-"`curl -s $1 | openssl dgst -sha512 -binary | openssl enc -base64 -A`"\" crossorigin=\"anonymous\""$f
@bishboria
bishboria / springer-free-maths-books.md
Last active March 22, 2024 11:19
Springer made a bunch of books available for free, these were the direct links
@Jarred-Sumner
Jarred-Sumner / comcast.js
Last active September 7, 2022 01:30
Comcast injects this into webpages to show copyright notices
// Comcast Cable Communications, LLC Proprietary. Copyright 2014.
// Intended use is to display browser notifications for critical and time sensitive events.
var _ComcastAlert = (function(){
return {
SYS_URL: '/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do'
, dragObj: {zIndex: 999999}
, browser: null
, comcastCheck: 1
, comcastTimer: null
, xmlhttp: null
@erikbern
erikbern / install-tensorflow.sh
Last active June 26, 2023 00:40
Installing TensorFlow on EC2
# Note – this is not a bash script (some of the steps require reboot)
# I named it .sh just so Github does correct syntax highlighting.
#
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5
#
# The CUDA part is mostly based on this excellent blog post:
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
# Install various packages
sudo apt-get update
@non
non / answer.md
Last active January 9, 2024 22:06
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

@yantonov
yantonov / install-ghc-ubuntu.md
Last active June 11, 2020 09:20
How to install latest GHC from source + latest stack + cabal + cabal-install on ubuntu

How to install GHC from source + latest stack + cabal + cabal-install on ubuntu

for your convinience this instuction is available as:
gist
git repo

preferred way install stack than install ghc

stack (package manager and build tool, preferrered way to manage dependencies)

# settings
@acrosby
acrosby / rtree_large_test.py
Last active December 9, 2020 15:50
Sample code for python rtree bulk loading of 10,000,000 points and a nearest neighbor query.
from rtree import index
from random import random
from datetime import datetime
timer = datetime.now()
# Create 10,000,000 random numbers between 0 and 1
rands = [random() for i in range(10000000)]
# Function required to bulk load the random points into the index