Skip to content

Instantly share code, notes, and snippets.

@jetztgradnet
jetztgradnet / eb-create-app.sh
Created February 3, 2011 02:43
Script to start an Amazon ElasticBeanstalk application with configuration parameters
#!/bin/sh
########################################################
# history
########################################################
#
# 0.3 (2011-02-08)
# - create/update configuration template 'InitialConfig' instead
# of 'Default', which is not editable
#
@philayres
philayres / display-indicator.py
Created October 24, 2011 19:21
Unity indicator for simple clock and date display
#!/usr/bin/env python
# Unity indicator for evolution-less clock and date display
# author: phil ayres
# 24 Oct 2011
import gobject
import gtk
import appindicator
import os, sys
import time
@devoncrouse
devoncrouse / clean_audio.sh
Created May 7, 2013 17:02
Using Sox (http://sox.sourceforge.net) to remove background noise and/or silence from audio files (individually, or in batch).
# Create background noise profile from mp3
/usr/bin/sox noise.mp3 -n noiseprof noise.prof
# Remove noise from mp3 using profile
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21
# Remove silence from mp3
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5%
# Remove noise and silence in a single command
@kevinburke
kevinburke / haproxy.config
Created October 10, 2013 17:34
twilio haproxy config
# Twilio HTTP HAProxy Configuration
# Version: 0.1
global
daemon
log 127.0.0.1 local0 info
maxconn 60000
spread-checks 3
@tompave
tompave / nginx.conf
Last active August 6, 2024 13:21
commented nginx.conf for Ruby on Rails
# A commented nginx configuration file for Ruby on Rails
#
# Author: Tommaso Pavese
# [email protected]
# http://tommaso.pavese.me
#
# License: http://www.wtfpl.net/
#
#
# Tested with:
@raingo
raingo / ops.py
Last active March 30, 2021 16:50
multi dimensional softmax with tensorflow
import tensorflow as tf
"""
Multi dimensional softmax,
refer to https://github.com/tensorflow/tensorflow/issues/210
compute softmax along the dimension of target
the native softmax only supports batch_size x dimension
"""
def softmax(target, axis, name=None):
@phansch
phansch / yardoc_cheatsheet.md
Last active September 22, 2024 02:17 — forked from chetan/yardoc_cheatsheet.md
Improved YARD cheatsheet
@philayres
philayres / pattern-masker.js
Last active December 12, 2017 15:37
Convert HTML5 input pattern attribute to jQuery-Mask-Plugin mask
/* (Released under MIT License, copyright Phil Ayres, see LICENSE file for full license)
Convert HTML5 input pattern attribute to a jQuery-Mask-Plugin compatible mask.
This follows some basic common regex patterns, but by no means all that could be applied to
HTML5 inputs. It is sufficient for simple cases.
Obviously you will need the jQuery-Mask-Plugin
Get it from: https://github.com/igorescobar/jQuery-Mask-Plugin
Usage:
@maxim5
maxim5 / pretrained_word2vec_lstm_gen.py
Last active July 2, 2023 10:40
Text generator based on LSTM model with pre-trained Word2Vec embeddings in Keras
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
__author__ = 'maxim'
import numpy as np
import gensim
import string