Run with Python:
pip-2.7 install cffi PYTHON=python2.7 sh go.sh
Run with PyPy:
pip-pypy install cffi PYTHON=pypy sh go.sh
#!/usr/bin/env sh | |
## I don't have any devices running Android OS now. These settings may have been outdated but I cannot verify it. | |
adb shell settings put global captive_portal_fallback_url http://g.cn/generate_204 | |
adb shell settings put global captive_portal_http_url http://www.google.cn/generate_204 | |
adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204 | |
adb shell settings put global captive_portal_other_fallback_urls http://www.qualcomm.cn/generate_204 |
[Unit] | |
Description=supervisord - Supervisor process control system for UNIX | |
Documentation=http://supervisord.org | |
After=network.target | |
[Service] | |
Type=forking | |
ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf | |
ExecReload=/usr/bin/supervisorctl reload | |
ExecStop=/usr/bin/supervisorctl shutdown |
#!/usr/bin/env python3 | |
import ast | |
from setuptools import setup | |
def parse_version(pkg_init_path, version_name='__version__'): | |
with open(pkg_init_path) as pkg_init_file: | |
pkg_init_ast = ast.parse(pkg_init_file.read()) |
#!/bin/bash | |
set -e | |
if [[ $1 == t* ]]; then | |
exec gti "${1#t}" | |
fi | |
>&2 printf 'command not found: gi\n' | |
exit 127 |
import os | |
import signal | |
import collections | |
import logging | |
import resource | |
logging.basicConfig(level=logging.DEBUG) | |
Run with Python:
pip-2.7 install cffi PYTHON=python2.7 sh go.sh
Run with PyPy:
pip-pypy install cffi PYTHON=pypy sh go.sh
http://digitocero.com/en/blog/exporting-and-visualizing-gccs-abstract-syntax-tree-ast
There is a source file named hello.c
.
try: | |
from StringIO import StringIO as BytesIO | |
except ImportError: | |
from io import BytesIO | |
import matplotlib.pyplot as plt | |
def render_latex(formula, fontsize=12, dpi=300, format_='svg'): | |
"""Renders LaTeX formula into image.""" |
#!/usr/bin/env bash | |
set -e | |
IMAGE="docker.io/continuumio/miniconda3:latest" | |
HOST_CONDA_DIR="/opt/conda" | |
HOST_NOTEBOOK_DIR="${PWD}" | |
HOST_NOTEBOOK_PORT="8888" | |
podman_cmd=("${@:-/bin/bash}") |
""" | |
ZooKeeper Monitor | |
================= | |
This is a simple script to monitor ZooKeeper node by "mntr" command. The | |
command response will be collected to the statsd server. | |
""" | |
import argparse | |
import logging |