Skip to content

Instantly share code, notes, and snippets.

View zrt's full-sized avatar
🐟
摸鱼中

Ruotian Zhang zrt

🐟
摸鱼中
View GitHub Profile
#cloud-config
users:
- name: louchenyao
groups: sudo
shell: /bin/bash
sudo: ['ALL=(ALL) NOPASSWD:ALL']
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCudAF5jQCs+HTk9ST93yyhXNUFtxldah+D9gU7xSKXW4c6xC1ZuVHZuBvrorArDUbXwByrB/bnjC8fQy4VH0JaS3qfjofroXnLWwHqQS4RC6N1H20EYm5+fsMu0GzzbgoCJOO99QT85UghN661iPzLd7gCdc96O/AiYmDliBlsYCMVblcHkD2D9VTzeKYKmCDjl4d1kjMBdK4H8xbzpbvrhRO5Xtexm+D5foH/elB7aB3CtoCSaHl+GHFOQWidI9MIwVNlYj0i+97fYbhk0V0dir3DuIaHHy5h2PCm0ruoeESKp2e0UirEH8NwkHS/dbiC4UlrAvSHFetSJdfEabMl louchenyao
runcmd:
import sys
import os
import requests
import subprocess
import shutil
from logging import getLogger, StreamHandler, INFO
logger = getLogger(__name__)
logger.addHandler(StreamHandler())
@deehzee
deehzee / autoreload.md
Last active December 1, 2021 19:48
Auto reload of modules in jupyter notebook

Module autoreload

To auto-reload modules in jupyter notebook (so that changes in files *.py doesn't require manual reloading):

# for auto-reloading external modules
# see http://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython
%load_ext autoreload
%autoreload 2
@CaiJimmy
CaiJimmy / index.html
Last active April 29, 2024 08:43
Disqus点击加载
<button id="load-disqus" onclick="disqus.load();">
加载Disqus
</button>
<div id="disqus_thread"></div>
@deiu
deiu / webcryptoapi.html
Last active January 7, 2024 21:18
Web Crypto API example: RSA keygen & export & import & sign & verify & encrypt & decrypt
<!-- MIT License -->
<html>
<head>
<script>
function generateKey(alg, scope) {
return new Promise(function(resolve) {
var genkey = crypto.subtle.generateKey(alg, true, scope)
genkey.then(function (pair) {
resolve(pair)
})
@geotheory
geotheory / stickman.pde
Created April 12, 2013 15:47
Processing stickman
// Code for a walking stickman
// by geotheory.co.uk (2013)
Stickman Stanley;
int grnd;
void setup() {
size(200, 200);
grnd = height-20;
frameRate(30);
smooth();