This file contains hidden or 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
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
This file contains hidden or 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
""" | |
An attempt at an implementation of inside_string() using parso | |
inside_string(s, row, col) should return True if (row, col) is inside a string in the (partial) Python code s. (row is 1-based and col is 0-based) | |
Here is a version using tokenize that I am pretty sure is correct (it has tests) https://github.com/asmeurer/mypython/blob/796a33c8b029f5ee7096bf153db9d59a8220bb01/mypython/tokenize.py#L140 | |
Two bugs I found so far: | |
- parso counts the newline as col 0 after the first line |
This file contains hidden or 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
server { | |
listen [::]:80; | |
listen 80; | |
server_name app.example.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { |
This file contains hidden or 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 | |
import os | |
import json | |
import grooveshark | |
client = grooveshark.Client() | |
client.init() | |
This file contains hidden or 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
# ------------------------------------------------------- | |
# Makefile to build whatever you want. | |
# It tries to find all the sources you have and builds | |
# dependencies, to detect header file changes. | |
# This is especially helpful for C/C++ beginners, | |
# who don't want to edit a Makefile. | |
# https://gist.github.com/2552967 | |
# Written by David Halter <[email protected]> | |
# ------------------------------------------------------- | |
CC=g++ |