Estimated time: 10 minutes
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 torch | |
from torch import LongTensor | |
from torch.nn import Embedding, LSTM | |
from torch.autograd import Variable | |
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence | |
## We want to run LSTM on a batch of 3 character sequences ['long_str', 'tiny', 'medium'] | |
# | |
# Step 1: Construct Vocabulary | |
# Step 2: Load indexed data (list of instances, where each instance is list of character indices) |
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 ply.lex, argparse, io | |
# modified from https://gist.github.com/amerberg/a273ca1e579ab573b499 | |
#Usage | |
# python stripcomments.py input.tex > output.tex | |
# python stripcomments.py input.tex -e encoding > output.tex | |
# Modification: | |
# 1. Preserve "\n" at the end of line comment |
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 tensorflow as tf | |
import numpy as np | |
import os | |
import zconfig | |
import utils | |
class RBM(object): |
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 ply.lex, argparse, io | |
#Usage | |
# python stripcomments.py input.tex > output.tex | |
# python stripcomments.py input.tex -e encoding > output.tex | |
#This utility is released under the WTFPL license: http://www.wtfpl.net/about/ | |
def strip_comments(source): | |
tokens = ( |
As you know, Twitch has made a weird decision to mute VODs if it finds copyrighted content in videos.
Here's how to enjoy VODs without this annoying mute feature.
- Install Fiddler (tested on 4.4.9.2 on Windows).
- Enable HTTPS decryption. If you are using Firefox, you will need to do this.
Rules -> Customize Rules...
- Paste the following code in the
OnBeforeResponse
method:
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
--- a/setup.py 2014-03-17 03:31:31.000000000 +0100 | |
+++ b/setup.py 2014-03-17 19:06:03.000000000 +0100 | |
@@ -750,10 +750,8 @@ | |
exts.append( Extension('_socket', ['socketmodule.c'], | |
depends = ['socketmodule.h']) ) | |
# Detect SSL support for the socket module (via _ssl) | |
- search_for_ssl_incs_in = [ | |
- '/usr/local/ssl/include', | |
- '/usr/contrib/ssl/include/' | |
- ] |
Below are the instructions for installing YouCompleteMe on Mac OS X
- Download the perforce visual tool suite from here: http://www.perforce.com/perforce/downloads/index.html
- Copy only the p4merge.app file into your /Applications/ directory