MOVE TO HERE
首先确定已经安装完成 docker,如果没有安装可以使用以下脚本快速安装并配置:
| # | |
| # This small example shows you how to access JS-based requests via Selenium | |
| # Like this, one can access raw data for scraping, | |
| # for example on many JS-intensive/React-based websites | |
| # | |
| from time import sleep | |
| from selenium import webdriver | |
| from selenium.webdriver import DesiredCapabilities |
| #!/usr/bin/env python | |
| # requires Python 2 | |
| # (Python 3 version: https://gist.github.com/glowinthedark/174df43f469c7ef05f6358f53afe05c6) | |
| # Recursively generate index.html files for | |
| # all subdirectories in a directory tree | |
| ########################################################################## | |
| ## ❗️❗️❗️ WARNING: This version is outdated and unmaintained! |
| /* Create a WiFi access point and provide a web server on it. */ | |
| #include <ESP8266WiFi.h> | |
| #include <ESP8266WebServer.h> | |
| IPAddress apIP(42, 42, 42, 42); // Defining a static IP address: local & gateway | |
| // Default IP in AP mode is 192.168.4.1 | |
| /* This are the WiFi access point settings. Update them to your likin */ | |
| const char *ssid = "ESP8266"; |
首先确定已经安装完成 docker,如果没有安装可以使用以下脚本快速安装并配置:
| # The script is intended to demonstrate how to fetch data from UCSC easily | |
| # (without mysql) in a way which will enable reproducibility of the download. | |
| # It is NOT INTENDED as a generic tool for programmatic access to UCSC; | |
| # Please respect UCSC request of avoiding issuing heavy queries as described in mysql usage manual; | |
| # for more information on conditions of use, see: http://genome.ucsc.edu/goldenPath/help/mysql.html | |
| # For advanced programmatic access you may be interested in setting you own local copy of UCSC database | |
| # and using other, existing tools like: PyUCSC (see: https://pyucsc.readthedocs.io/en/latest) |
| # Copyright (c) 2016, James Jackson | |
| # All rights reserved. | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # 1. Redistributions of source code must retain the above copyright notice, this | |
| # list of conditions and the following disclaimer. | |
| # 2. Redistributions in binary form must reproduce the above copyright notice, | |
| # this list of conditions and the following disclaimer in the documentation |
| !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-selection"),require("d3-drag")):"function"==typeof define&&define.amd?define(["exports","d3-selection","d3-drag"],n):n(t.d3=t.d3||{},t.d3,t.d3)}(this,function(t,n,r){"use strict";function e(t,n){return n={exports:{}},t(n,n.exports),n.exports}function o(){function t(t){function u(){p=[],h="",_.attr("d",null),m.attr("d",null),r.nodes().forEach(function(t){t.__lasso.possible=!1,t.__lasso.selected=!1,t.__lasso.hoverSelect=!1,t.__lasso.loopSelect=!1;var n=t.getBoundingClientRect();t.__lasso.lassoPoint=[Math.round(n.left+n.width/2),Math.round(n.top+n.height/2)]}),s&&r.on("mouseover.lasso",function(){this.__lasso.hoverSelect=!0}),i.start()}function l(){var t,n;"touchmove"===d3.event.sourceEvent.type?(t=d3.event.sourceEvent.touches[0].clientX,n=d3.event.sourceEvent.touches[0].clientY):(t=d3.event.sourceEvent.clientX,n=d3.event.sourceEvent.clientY);var s=d3.mouse(this)[0],u=d3.mouse(this)[1];""===h?(h=h+"M "+s+" "+u,v=[t,n],d=[s, |
| # Ask for the user password | |
| # Script only works if sudo caches the password for a few minutes | |
| sudo true | |
| # Install kernel extra's to enable docker aufs support | |
| # sudo apt-get -y install linux-image-extra-$(uname -r) | |
| # Add Docker PPA and install latest version | |
| # sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
| # sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
| import multiprocessing | |
| import os | |
| import time | |
| from functools import partial | |
| import pyinotify | |
| def is_alive(pid): | |
| try: | |
| os.kill(pid, 0) |
| /* | |
| * I add this to html files generated with pandoc. | |
| */ | |
| html { | |
| font-size: 100%; | |
| overflow-y: scroll; | |
| -webkit-text-size-adjust: 100%; | |
| -ms-text-size-adjust: 100%; | |
| } |