Skip to content

Instantly share code, notes, and snippets.

View malcolmgreaves's full-sized avatar

Malcolm Greaves malcolmgreaves

View GitHub Profile
@aparrish
aparrish / spacy_intro.ipynb
Last active March 14, 2025 21:43
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mcg1969
mcg1969 / circle.yml
Last active July 11, 2019 16:47
Cached Miniconda in CircleCI
machine:
environment:
MINICONDA: "$HOME/miniconda"
MINICONDA_PATH: "$MINICONDA/bin"
PATH: "$MINICONDA_PATH:$PATH"
CONDA: "$MINICONDA_PATH/conda"
ANACONDA: "$MINICONDA_PATH/anaconda"
# This ensures we don't accidentally pull in ~/.condarc
# if it happens to be there for some strange reason
CONDARC: "$MINICONDA/condarc.none"
UNDERSTANDING HASH FUNCTIONS
by Geoff Pike
Version 0.2 --- early draft --- comments and questions welcome!
References appear in square brackets.
1 INTRODUCTION
Hashing has proven tremendously useful in constructing various fast
data structures and algorithms. It is typically possible to simplify
@malcolmgreaves
malcolmgreaves / os_fp.py
Last active June 29, 2017 00:27
Listing all files from a given directory using functional programming.
from functools import partial
from operator import concat
from os.path import isfile
from fold import foldl
def _list_files_from(part, prev):
current = "%s/%s" % (prev, part)
if isfile(current):
@malcolmgreaves
malcolmgreaves / fold.py
Created June 29, 2017 00:25
Fold left and fold right for Python.
def foldl(zero, combine, elements):
if callable(zero):
result = zero()
else:
result = zero
for x in elements:
result = combine(result, x)
return result
def foldr(zero, combine, elements):
@eamartin
eamartin / notebook.ipynb
Last active April 22, 2025 08:11
Understanding & Visualizing Self-Normalizing Neural Networks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@venik
venik / build_tf.sh
Last active February 22, 2024 06:12
Bash script for local building TensorFlow on Mac/Linux with all CPU optimizations (default pip package has only SSE)
#!/usr/bin/env bash
# Author: Sasha Nikiforov
# source of inspiration
# https://stackoverflow.com/questions/41293077/how-to-compile-tensorflow-with-sse4-2-and-avx-instructions
# Detect platform
if [ "$(uname)" == "Darwin" ]; then
# MacOS
@fchollet
fchollet / new_stacked_rnns.py
Last active August 13, 2019 15:23
New stacked RNNs in Keras
import keras
import numpy as np
timesteps = 60
input_dim = 64
samples = 10000
batch_size = 128
output_dim = 64
# Test data.
@smitshilu
smitshilu / Tensorflow_Build_GPU.md
Last active June 9, 2020 18:27
Tensorflow 1.4 Mac OS High Sierra 10.13 GPU Support

Tensorflow

System information

  • OS - High Sierra 10.13
  • Tensorflow - 1.4
  • Xcode command line tools - 8.2 (Download from here: Xcode - Support - Apple Developer & Switch to different clang version: sudo xcode-select --switch/Library/Developer/CommandLineTools & check version: clang -v)
  • Cmake - 3.7
  • Bazel - 0.7.0
@santisbon
santisbon / Search my gists.md
Last active November 26, 2025 13:48
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html