Skip to content

Instantly share code, notes, and snippets.

View afparsons's full-sized avatar
🏠
Working from home

Andrew Parsons afparsons

🏠
Working from home
  • Boston, Massachusetts
  • 05:00 (UTC -05:00)
View GitHub Profile
@daattali
daattali / linkedin.R
Created March 5, 2016 11:11
Scraping Twitter and LinkedIn info in R
# Get a person's name, location, summary, # of connections, and skills & endorsements from LinkedIn
# URL of the LinkedIn page
user_url <- "https://www.linkedin.com/in/daattali"
# since the information isn't available without being logged in, the web
# scraper needs to log in. Provide your LinkedIn user/pw here (this isn't stored
# anywhere as you can see, it's just used to log in during the scrape session)
username <- "yourusername"
password <- "yourpassword"
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 5, 2025 16:18
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@adam-p
adam-p / README.md
Created October 1, 2014 13:50
Patching Python code at runtime

A rather dirty way to patch module code at runtime.

@Zearin
Zearin / python_decorator_guide.md
Last active November 6, 2025 16:16
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@norcal82
norcal82 / state_names.py
Last active June 17, 2025 15:46
python array of US state names
state_names=["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"]
@rafszul
rafszul / neo4j and graphs links.md
Created August 13, 2014 11:36
neo4j and graphs links
@ul
ul / Заряница.md
Last active December 10, 2022 03:11
Заряница. Язык просветов

Заряница. Язык просветов

Теория символизма является частью Узоров Актики и рассматривается в разделе Просветов, познакомиться с которым можно в этой презентации:

Узоры Актики. Просветы

Вместе с изложением теории символизма в этом разделе создаётся особенный язык просветов — символический язык.

«Заряница» — это визуальный символический язык, созданный на основе матрицы традиционного белорусского народного орнамента.

@soheilhy
soheilhy / nginxproxy.md
Last active July 5, 2025 15:29
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@alanhamlett
alanhamlett / api.py
Last active October 21, 2024 14:30
Serialize SQLAlchemy Model to dictionary (for JSON output) and update Model from dictionary attributes.
import uuid
import wtforms_json
from sqlalchemy import not_
from sqlalchemy.dialects.postgresql import UUID
from wtforms import Form
from wtforms.fields import FormField, FieldList
from wtforms.validators import Length
from flask import current_app as app
from flask import request, json, jsonify, abort
@daemox
daemox / 10-monitor.conf
Created August 23, 2013 23:45
/etc/X11/xorg.conf.d/10-monitor.conf for Dual monitor NVIDIA driver setup. Screen1 is rotated and above screen0.
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 325.15 (buildmeister@swio-display-x64-rhel04-03) Wed Jul 31 19:04:13 PDT 2013
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 1280
Screen 1 "Screen1" 448 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"