Skip to content

Instantly share code, notes, and snippets.

View nimicent's full-sized avatar
🍬

Julia Flash nimicent

🍬
  • Dallas, Texas
View GitHub Profile
@fideloper
fideloper / update_curl.sh
Last active December 15, 2025 05:03
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
@chucknado
chucknado / write_posts.py
Last active November 23, 2020 07:41
Sample script for "Write large data sets in Excel with Python and pandas" at https://support.zendesk.com/hc/en-us/articles/212227138
import dateutil.parser
import pandas as pd
topic = pd.read_pickle('my_serialized_data')
posts_df = pd.DataFrame(topic['posts'], columns=['id', 'title', 'created_at', 'author_id'])
users_df = pd.DataFrame(topic['users'], columns=['id', 'name']).drop_duplicates(subset=['id'])
posts_df['created_at'] = posts_df['created_at'].apply(lambda x: dateutil.parser.parse(x).date())
@JonathanReeve
JonathanReeve / brown-corpus-categories
Created May 3, 2015 22:48
Export Brown Corpus categories to text files using NLTK.
import nltk
from nltk.corpus import brown
for category in brown.categories():
words = brown.words(categories=category)
text = " ".join(words)
filename = category + '.txt'
outfile = open(filename, 'w')
outfile.write(text)
outfile.close()
@willurd
willurd / web-servers.md
Last active April 27, 2026 07:10
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jwebcat
jwebcat / gist:5122366
Last active March 26, 2026 23:26 — forked from lemenkov/gist:1674929
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1
@wrunk
wrunk / jinja2_file_less.py
Last active December 16, 2025 13:19
python jinja2 examples
#!/usr/bin/env/python
#
# More of a reference of using jinaj2 without actual template files.
# This is great for a simple output transformation to standard out.
#
# Of course you will need to "sudo pip install jinja2" first!
#
# I like to refer to the following to remember how to use jinja2 :)
# http://jinja.pocoo.org/docs/templates/
#