This file contains hidden or 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 <iostream> | |
#include <vector> | |
#include <string> | |
#include <algorithm> | |
#include <assert.h> | |
#define REP(i,n) for(int i=0;i<n;i++) | |
using namespace std; | |
void vector_dump(std::vector<vector<bool> > vec) { | |
std::cout << "[ "; |
This file contains hidden or 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
v = [0]; x = [100]; a = [] | |
t = n = 0 | |
T = 5 | |
h = 1 | |
output_required_t = [] | |
while t < T: | |
a.append(-10) | |
if t % 1 == 0: | |
print(v[n], x[n]) | |
v.append(v[n] + a[n] * h) |
This file contains hidden or 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
v = [0]; x = [100]; a = [] | |
t = n = 0 | |
T = 5 | |
h = 1 | |
output_required_t = [] | |
while t < T: | |
a.append(-10) | |
if t % 1 == 0: |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
func check(a interface{}) bool { | |
fmt.Println(a) | |
This file contains hidden or 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
Send: "\e:w\n" |
This file contains hidden or 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
from socket import * | |
import sys | |
if len(sys.argv) != 2: | |
print("Please give me port number.") | |
else: | |
try: | |
port=int(sys.argv[1]) | |
except ValueError: | |
print('Invalid port number.') |
This file contains hidden or 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
.PHONY: up down url | |
up: | |
(cd docker/jupyter && ./up.sh) | |
down: | |
(cd docker/jupyter && ./down.sh) | |
url: | |
(cd docker/jupyter && docker-compose exec jupyter jupyter notebook list | grep http | sed -E 's/ .*//g') |
This file contains hidden or 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
#!/bin/bash | |
while read line; do | |
echo $line | |
go get $line | |
refsafe $line/... | |
done |
This file contains hidden or 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
{ | |
"go.formatTool": "goimports", | |
"editor.formatOnSave": true, | |
"go.useLanguageServer": true, | |
"files.autoSave": "afterDelay", | |
"terminal.integrated.shell.osx": "/usr/local/bin/bash", | |
"workbench.editor.enablePreview": false, | |
"go.gotoSymbol.includeImports": true, | |
"explorer.autoReveal": false, | |
} |
This file contains hidden or 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
#!/bin/bash | |
osascript <<EOF | tr ', ' '\n' | while read line; do open -a Google\ Chrome $line; done | |
tell application "Safari" | |
activate | |
windows's tab's URL | |
end tell | |
EOF |
OlderNewer