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.
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.
| 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}), ...] |
I hereby claim:
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 |
| # 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: |
This document attempts to refine Python's PEP 440 to include the principles of Semantic Versioning.
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 |
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")