This article covers the following topics:
- Introduction
- Installation
- Configuration
- Making your first call
- [Making API calls from the command line](#making-api-calls-from-the command-line)
- Parsing responses with
jq
.ddns.org | |
.findhere.com | |
.freeservers.com | |
.zzn.com | |
0-mail.com | |
007addict.com | |
020.co.uk | |
0815.ru | |
0clickemail.com | |
0sg.net |
import argparse | |
# this first bit is to enable multiline help text. apparently this is a known problem with argparse. | |
# Solution jacked from http://stackoverflow.com/questions/3853722/python-argparse-how-to-insert-newline-in-the-help-text | |
import textwrap as _textwrap | |
class MultilineFormatter(argparse.HelpFormatter): | |
def _fill_text(self, text, width, indent): | |
text = self._whitespace_matcher.sub(' ', text).strip() | |
paragraphs = text.split('|n ') |
This article covers the following topics:
jq
from IPython.display import HTML | |
def _repr_html_(self, figsize=(17,10), **kwargs): | |
"""Displays in the notebook a folium.folium.Map object. | |
""" | |
self._build_map(**kwargs) | |
width, height = figsize | |
iframe = '<iframe src="data:text/html;base64,{html}" width="{width}" height="{height}"></iframe>'\ |
# Initialize the scroll | |
page = es.search( | |
index = 'yourIndex', | |
doc_type = 'yourType', | |
scroll = '2m', | |
search_type = 'scan', | |
size = 1000, | |
body = { | |
# Your query's body | |
}) |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
#!/bin/sh | |
# installation of Oracle Java JDK. | |
sudo apt-get -y update | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get -y update | |
sudo apt-get -y install oracle-java7-installer | |
# Installation of commonly used python scipy tools |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="author" content="Galenic"> | |
<script src="js/jquery-1.9.1.js"></script> | |
<script src="js/knockout-2.1.0.js"></script> | |
<script src="js/Chart.js"></script> | |
<link rel="stylesheet" href="pure-min.css"> |