This file contains 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
// ==UserScript== | |
// @name mis.USTC Helper | |
// @namespace mis.ustc.edu.cn | |
// @version 0.0 | |
// @description delete login information for USTC mis automatically | |
// @author H.Zhang | |
// @match http://mis.teach.ustc.edu.cn/ | |
// @match http://mis.teach.ustc.edu.cn/index.jsp | |
// @grant none | |
// ==/UserScript== |
This file contains 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
pool = [] | |
pool.push([1,1]) | |
plus = async (a,b)=>await a+ await b | |
time = async (a)=>2* await a | |
main = async() =>{ | |
for(var i=1;i<=10;i++){ | |
pool.push([ | |
plus(pool[i-1][0], pool[i-1][1]), |
This file contains 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
<script> | |
window.onload = function(){ | |
var Name = document.registerElement("name-div",{ | |
prototype: Object.create(HTMLDivElement.prototype,{ | |
createdCallback: { | |
value: function(){ | |
this.shadow = this.createShadowRoot(); | |
} | |
}, | |
attributeChangedCallback: { |
This file contains 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
//convert callback function to async function | |
var asyncalize = (func) => | |
function(){ | |
console.log(func) | |
return new Promise( | |
(callback)=>func(...arguments,callback) | |
) | |
} |
This file contains 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
\documentclass{article} | |
\usepackage{xcolor} | |
\begin{document} | |
{\centering | |
\count2=10\def\content{O} | |
\count0=0\loop\ifnum\count0<\count2{ | |
\count1=0\loop \ifnum\count1<\the\numexpr \count2-\count0 { | |
{\color{white}\content} | |
}\advance\count1 by 1\repeat | |
\count1=0\loop \ifnum\count1<\the\numexpr 2*\count0-1{ |
This file contains 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
function exprst{ | |
taskkill /f /im explorer.exe | |
taskkill /f /im SynTPEnh.exe | |
& "explorer.exe" | |
& "C:\Program Files\Synaptics\SynTP\SynTPEnh.exe" | |
} | |
function linux_{ | |
bash -c ("DISPLAY=:0 "+($args -join " ")) | |
} | |
function linux{ |
This file contains 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 | |
import tensorflow as tf | |
from tensorflow.python import debug as tf_debug | |
D = 2 | |
t = -0.001 | |
with tf.name_scope("constant"): |
This file contains 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
sleep = (ms)=> new Promise(resolve => setTimeout(resolve, ms)) | |
function bsleep(millis){ | |
var date = new Date() | |
var curDate = null | |
do {curDate = new Date()} | |
while(curDate-date < millis) | |
} | |
print = console.log | |
foo = async (i)=>{ |
This file contains 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 functools | |
import sympy | |
from scipy import optimize | |
n = 3 # n 个人 | |
m = 3 # m 个坑 | |
def sol(n,m): | |
v = sympy.symbols(" ".join([str(i) for i in range(m)])) |
This file contains 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
menuentry 'ubuntu live' { | |
set rootuuid=709ba2df-2ded-4a27-83fe-34093fe97ce7 | |
search --no-floppy --fs-uuid --set=root $rootuuid | |
set isofile='/img/ubuntu-18.04.1-desktop-amd64.iso' | |
loopback loop $isofile | |
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile | |
initrd (loop)/casper/initrd.lz | |
} | |
menuentry 'debian live' { |
OlderNewer