This walkthrough installs Sphinx and configures it to output HTML and PDF from .md
.
If you install it on a VM, allocate over 25GB storage and multiple processors.
You'll need Ubuntu 16.04 LTS, an internet connection, and sudo
rights.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use nix::sys::ptrace; | |
use nix::sys::signal::Signal; | |
use nix::sys::wait::{WaitStatus, wait}; | |
use nix::unistd::{fork, ForkResult, Pid}; | |
use std::collections::HashMap; | |
use std::ffi::c_void; | |
use std::os::unix::process::CommandExt; | |
use std::process::{Command, exit}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_valid_state(state): | |
# check if it is a valid solution | |
return True | |
def get_candidates(state): | |
return [] | |
def search(state, solutions): | |
if is_valid_state(state): | |
solutions.append(state.copy()) |
We can't make this file beautiful and searchable because it's too large.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id,username,password,when,country,host_id | |
21,admin,7ujMko0admin,2019-02-02 10:39:27,China,0 | |
22,pi,jdd,2019-02-02 10:40:09,United Kingdom,1 | |
23,pi,kkk,2019-02-02 10:40:11,United Kingdom,1 | |
24,pi,lk,2019-02-02 10:40:13,United Kingdom,1 | |
25,pi,kk',2019-02-02 10:40:16,United Kingdom,1 | |
26,pi,kjj,2019-02-02 10:40:18,United Kingdom,1 | |
27,pi,fds,2019-02-02 10:42:55,United Kingdom,1 | |
28,pi,eee,2019-02-02 10:42:56,United Kingdom,1 | |
29,pi,fds,2019-02-02 10:42:57,United Kingdom,1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
# docs can be found at http://gspread.readthedocs.io/en/latest/ | |
import gspread | |
from oauth2client.service_account import ServiceAccountCredentials | |
def get_googlesheet_worksheet(json_keyfile_name, sheet_name, worksheet_name): | |
scope = ['https://spreadsheets.google.com/feeds'] | |
creds = ServiceAccountCredentials.from_json_keyfile_name(json_keyfile_name, scope) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Robust B-Spline regression with scikit-learn | |
""" | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import scipy.interpolate as si | |
from sklearn.base import TransformerMixin | |
from sklearn.pipeline import make_pipeline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import asyncio | |
import uvloop | |
from aiohttp.web import Application, MsgType, WebSocketResponse | |
def add_socket(app, socket, user_id): | |
if user_id in app['connections']: | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from multiprocessing.pool import ThreadPool as Pool | |
from multiprocessing import Queue as PQueue | |
import Queue | |
my_dict = { | |
'url1': 'url2', | |
'url3': 'url4', | |
} | |
my_q = PQueue() |
GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
NewerOlder