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
#include <stdio.h> | |
#include <stdlib.h> | |
#define C10(x) if((x)==num)printf("%s = %d\n",#x,num); | |
#define C9(x) C10(x##9);C10(x+9);C10(x-9); | |
#define C8(x) C9(x##8);C9(x+8);C9(x-8); | |
#define C7(x) C8(x##7);C8(x+7);C8(x-7); | |
#define C6(x) C7(x##6);C7(x+6);C7(x-6); | |
#define C5(x) C6(x##5);C6(x+5);C6(x-5); | |
#define C4(x) C5(x##4);C5(x+4);C5(x-4); |
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' { |
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
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
#!/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
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
\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
//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
<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
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]), |