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
// ==UserScript== | |
// @name Disable Google Search rewrite | |
// @version 1.01 | |
// @description Disables the rewrite of links in Google Search results. | |
// @author XP1 (https://github.com/XP1/) | |
// @namespace https://gist.github.com/1780197/ | |
// @include http*://google.*/search?* | |
// @include http*://*.google.*/search?* | |
// ==/UserScript== |
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
# create_sample24.py | |
# Author: Warren Weckesser | |
# License: BSD 3-Clause (http://opensource.org/licenses/BSD-3-Clause) | |
import numpy as np | |
import wave | |
def create_sample(): | |
# 27 bytes (1 channel, 9 frames, 3 bytes per frame) |
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
// ==UserScript== | |
// @name StackOverflow List Button | |
// @description Additional list toolbar button for StackOverflow editor windows | |
// @version 1.0 | |
// | |
// @match *://stackoverflow.com/* | |
// @match *://meta.stackoverflow.com/* | |
// @match *://pt.stackoverflow.com/* | |
// | |
// @match *://serverfault.com/* |
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
# This is Dan Allan's setting of Professor Robert Leheny's plotting style preferences. | |
# Updated October 2014 | |
# | |
# Invoke in Python matplotlib like so: | |
# | |
# import matplotlib as mpl | |
# | |
# mpl.style.use('https://gist.github.com/danielballan/be066529de85e87a5fe7/raw') | |
# | |
# This feature is only available in matplotlib version 1.4 or higher. |
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
// Highlight Shadow | |
// Aluminium #eeeeec #d3d7cf #babdb6 | |
// Butter #fce94f #edd400 #c4a000 | |
// Chameleon #8ae234 #73d216 #4e9a06 | |
// Orange #fcaf3e #f57900 #ce5c00 | |
// Chocolate #e9b96e #c17d11 #8f5902 | |
// Sky Blue #729fcf #3465a4 #204a87 | |
// Plum #ad7fa8 #75507b #5c3566 | |
// Slate #888a85 #555753 #2e3436 | |
// Scarlet Red #ef2929 #cc0000 #a40000 |
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
#!/usr/bin/env python | |
""" | |
PIP can stand for PIP Installs packages Programmatically, too! | |
(and here's how) | |
Requires: | |
* Python 2.6 or higher (for print-as-a-function) | |
* PIP 0.8.2 | |
""" |
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 matplotlib | |
matplotlib.use('Agg') | |
from matplotlib import pyplot | |
import numpy | |
from flask import Flask, send_file | |
from cStringIO import StringIO | |
app = Flask(__name__) |
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
def cartpi(seq): | |
""" A depth-first cartesian product for a sequence of iterables; | |
i.e., all values of the last iterable are consumed before advancing the | |
preceding ones. Like itertools.product(), but supports infinite sequences. | |
>>> from itertools import islice, count | |
>>> list(islice(cartpi([count(), count()]), 9)) | |
[(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8)] | |
""" | |
if seq: |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Modified on Mon Oct 10 23:29:41 2016 | |
@author: craffel, edited by nbeuchat (Nicolas Beuchat) | |
""" | |
import matplotlib.pyplot as plt |
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 matplotlib.pyplot as plt | |
def draw_neural_net(ax, left, right, bottom, top, layer_sizes,Theta0,Theta1): | |
''' | |
Public Gist from craffel | |
https://gist.github.com/craffel/2d727968c3aaebd10359 | |
Draw a neural network cartoon using matplotilb. | |
I (theScinder) modified the function to accept neural network weights and adjust connection line widths accordingly, in order to create an animation of NN learning |