Skip to content

Instantly share code, notes, and snippets.

View Roon's full-sized avatar

Aaron Mayzes Roon

View GitHub Profile
@Roon
Roon / python_development_environment.md
Created June 14, 2021 16:52 — forked from awesomebytes/python_development_environment.md
My development environment, how to install it

Python development environment (with ROS!)

Install pip

The package manager of python packages is called pip.

sudo apt-get install python-pip

If you need a pip package as a debian you can use Victor's debian from pip.

Install ipython

@Roon
Roon / ego_graph.py
Created June 21, 2020 18:46 — forked from davidADSP/ego_graph.py
ego_graph
import networkx as nx
# SAMPLE DATA FORMAT
#nodes = [('tensorflow', {'count': 13}),
# ('pytorch', {'count': 6}),
# ('keras', {'count': 6}),
# ('scikit', {'count': 2}),
# ('opencv', {'count': 5}),
# ('spark', {'count': 13}), ...]

Keybase proof

I hereby claim:

  • I am roon on github.
  • I am roon (https://keybase.io/roon) on keybase.
  • I have a public key ASDrX7u_E2cP_rGF3I4WV_oXnWgqpHV_h4dLGz-QVnzLCQo

To claim this, I am signing this object:

# This function takes a vector x and returns a factor representation of the same vector.
# The key advantage of factorize is that you can assign levels for infrequent categories,
# as well as empty and NA values. This makes it much easier to perform
# multidimensional/thematic analysis on your largest population subsets.
factorize <- function(
x, # vector to be transformed
min_freq = .01, # all levels < this % of records will be bucketed
min_n = 1, # all levels < this # of records will be bucketed
NA_level = '(missing)', # level created for NA values
blank_level = '(blank)', # level created for "" values
@Roon
Roon / Writing Tools Writeup.markdown
Created January 8, 2019 16:14 — forked from mojavelinux/Writing Tools Writeup.markdown
How To Write A Technical Book (One Man's Modest Suggestions)
@Roon
Roon / graphql_example.py
Created November 5, 2018 18:24 — forked from gbaman/graphql_example.py
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section.
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
if request.status_code == 200:
@Roon
Roon / pep-440-semver.md
Created September 14, 2018 17:43 — forked from colinvh/pep-440-semver.md
440 Semantic

PEP-440-Compatible Semantic Versioning

This document attempts to refine Python's PEP 440 to include the principles of Semantic Versioning.

Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

import urllib2, csv
import matplotlib.pyplot as plt
import datetime
import seaborn
import numpy, scipy.stats, math
f = urllib2.urlopen('https://raw.githubusercontent.com/datasets/s-and-p-500/master/data/data.csv')
csv = csv.reader(f)
csv.next() # headers
@Roon
Roon / Unattended Encrypted Incremental Backup to Amazon S3.md
Created August 2, 2016 16:32 — forked from janikvonrotz/Unattended Encrypted Incremental Backup to Amazon S3.md
Ubuntu: Unattended Encrypted Incremental Backup to Amazon S3#AmazonAWS#Markdown

Introduction

For this task we are going to configure a duplicity script wrapper. Unregarded of the installation instructions it's expected that you have already signed up for an Amazon account and know how to use their services.

Requirements

  • Ubuntu server
  • duplicity, Git, GnuPG
  • MySQL
@Roon
Roon / README.md
Created December 9, 2015 18:50 — forked from sebkopf/README.md
wolfram alpha from R

Wolfram Alpha API from R

The attached code file provides an easy basic interface to the Wolfram Alpha API. Inspired by the wolframalpha module available for Python.

source("wa_lib.R")

Initialize client