Skip to content

Instantly share code, notes, and snippets.

MatthiasWinkelmann /
Last active May 20, 2019 — forked from smitshilu/
Tensorflow 1.7 Mac OS Sierra 10.12 GPU Support


System information

  • OS - Sierra 10.12
  • Tensorflow - 1.7.0
  • 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.11
  • Bazel - 0.11.1
alanpeabody / my_app.ex
Last active Jan 31, 2022
Websockets in Elixir with Cowboy and Plug
View my_app.ex
defmodule MyApp do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [
dispatch: dispatch
dulacp /
Created Feb 28, 2015
Download & Compile Libjpeg for iOS (all architectures)
# Builds a Libjpeg framework for the iPhone and the iPhone Simulator.
# Creates a set of universal libraries that can be used on an iPhone and in the
# iPhone simulator. Then creates a pseudo-framework to make using libjpeg in Xcode
# less painful.
# To configure the script, define:
# IPHONE_SDKVERSION: iPhone SDK version (e.g. 8.1)
# Then go get the source of the libjpeg you want to build, shove it in the
# same directory as this script, and run "./". Grab a cuppa. And voila.
grantr / curvecp_handshake.rb
Last active Jul 19, 2018
CurveCP handshake protocol in Ruby
View curvecp_handshake.rb
# A demonstration of the CurveCP handshake protocol. This protocol has many
# favorable security properties described at
# In addition to its security advantages, it has the following favorable properties:
# * Needs only 2 messages (1 from client, 1 from server) before application
# messages can be exchanged (3 before the server can send application messages)
# * Does not require the server to keep protocol state between handshake messages.
# An overview of the protocol:
lembacon / luna_pinyin.emoji.dict.yaml
Last active Jul 4, 2020
Pinyin-Emoji Dictionary for Squirrel
View luna_pinyin.emoji.dict.yaml
# Rime dictionary
# encoding: utf-8
name: luna_pinyin.emoji
version: "2017.02.10"
sort: by_weight
use_preset_vocabulary: true
gburd / async_nif.h
Last active Aug 9, 2021
Technique for running Erlang NIFs functions asynchronously, not on scheduler threads.
View async_nif.h
* async_nif: An async thread-pool layer for Erlang's NIF API
* Copyright (c) 2012 Basho Technologies, Inc. All Rights Reserved.
* Author: Gregory Burd <> <>
* This file is provided to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
AndrewRadev / diffsplit.vim
Last active May 22, 2018
Split a git diff in separate files to mirror the original repo layout
View diffsplit.vim
" Put this in plugin/diffsplit.vim.
" Executing :Diffsplit on a file, containing a git diff would open up a new
" tab, cd to a temporary directory, and distribute the changes into separate
" files, mirroring the repo layout. You can then use NERDTree or whatever you
" like to browse through the changes.
" Using it straight from the command-line is fairly simple and aliasable:
" git diff whatever | vim - -R +Diffsplit
View gist:389875
import re
from metaphone import dm as double_metaphone
# get the Redis connection
from jellybean.core import redis
import models
# Words which should not be indexed