Instantly share code, notes, and snippets.

View gist:4a0c18ad0acb70d017de2ae75357fe91

Find all layers on the map map.getStyle().layers.reverse();

View council_districts.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View handler.py
import sys, os, json
here = os.path.dirname(os.path.realpath(__file__))
#sys.path.append(os.path.join(here, "./vendored"))
env_path = os.path.join(here, "./venv/lib/python2.7/site-packages/")
sys.path.append(env_path)
import requests
from contextlib import closing
View useful_pandas_snippets.py
# List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
# Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
# Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(valuelist)]
View cx_oracle_docker.md
View README.md

README is empty

View README.md

README is empty

View vptest.info
name = VoxPelli OAuth Test
core = 7.x
dependencies[] = oauth_common
dependencies[] = http_client
View buttontouchinside1.m
// Before
- (IBAction)buttonTouchUpInside:(id)sender {
UIButton *buttonPressed = (UIButton*)sender;
if (buttonPressed == self.messageButton) {
AYHTReceiverListTableViewController *receiverTableViewController = [[AYHTReceiverListTableViewController alloc] init];
FPPopoverController *peoplePopover = [[FPPopoverController alloc] initWithViewController:receiverTableViewController];
peoplePopover.tint = FPPopoverLightGrayTint;
[peoplePopover presentPopoverFromView:buttonPressed];
[peoplePopover setShadowsHidden:YES];