Skip to content

Instantly share code, notes, and snippets.

View simon-mo's full-sized avatar
:shipit:

Simon Mo simon-mo

:shipit:
View GitHub Profile
pintos -v -k -T 10 --qemu --filesys-size=2 -p tests/userprog/args-none -a args-none -- -q -f run args-none < /dev/null 2> tests/userprog/args-none.errors > tests/userprog/args-none.output
perl -I../.. ../../tests/userprog/args-none.ck tests/userprog/args-none tests/userprog/args-none.result
pass tests/userprog/args-none
pintos -v -k -T 10 --qemu --filesys-size=2 -p tests/userprog/args-single -a args-single -- -q -f run 'args-single onearg' < /dev/null 2> tests/userprog/args-single.errors > tests/userprog/args-single.output
perl -I../.. ../../tests/userprog/args-single.ck tests/userprog/args-single tests/userprog/args-single.result
pass tests/userprog/args-single
pintos -v -k -T 10 --qemu --filesys-size=2 -p tests/userprog/args-multiple -a args-multiple -- -q -f run 'args-multiple some arguments for you!' < /dev/null 2> tests/userprog/args-multiple.errors > tests/userprog/args-multiple.output
perl -I../.. ../../tests/userprog/args-multiple.ck tests/userprog/args-multiple tests/userprog/args-multiple.resu
Executing 'tar fs.tar /':
[DEBUG] syscall 4: SYS_CREATE by thread tar
[DEBUG] syscall 6: SYS_OPEN by thread tar
[DEBUG] SYS_OPEN: File fs.tar is opened as fd 5 by thread tar
[DEBUG] syscall 6: SYS_OPEN by thread tar
[DEBUG] SYS_OPEN: File / is opened as fd 6 by thread tar
[DEBUG] syscall 20: SYS_INUMBER by thread tar
[DEBUG] syscall 20: SYS_INUMBER by thread tar
[DEBUG] syscall 19: SYS_ISDIR by thread tar
[DEBUG] SYS_ISDIR checking fd 6, result 1
@simon-mo
simon-mo / README.md
Created January 3, 2019 04:04
Share files inside a google drive folder to emails by matching names: aaa.tar.gz -> [email protected]
  1. Save crendentials.json according to step one in this doc
  2. Run authenticate.py
  3. Run share_dir.py -h to see how to use it. Then run the script
@simon-mo
simon-mo / Makefile
Created January 30, 2019 09:07
Dynamic Kernel Loading using CUDA Driver API
all: hello hello.fatbin hello.ptx dyload
hello: kernel.cu
nvcc -std=c++11 -arch sm_60 kernel.cu -o hello -lcuda
hello.fatbin: kernel.cu
nvcc -std=c++11 -arch sm_60 kernel.cu -o hello.fatbin --fatbin -lcuda
hello.ptx: kernel.cu
nvcc -std=c++11 -arch sm_60 kernel.cu -o hello.ptx -ptx
dyload: hello.fatbin load.cu
nvcc -std=c++11 -arch sm_60 load.cu -o dyload -lcuda
clean:
#include <cuda.h>
#include <iostream>
#include <chrono>
#include <cassert>
#include <vector>
#include "blocked_conv.h"
using namespace std::chrono;
@simon-mo
simon-mo / key.md
Created February 28, 2019 09:12
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

FROM python:3.6
RUN pip install pillow starlette[full] uvicorn numpy
COPY app.py test.py /
CMD ["uvicorn", "app:app"]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simon-mo
simon-mo / ray.serve.intro.ipynb
Created May 10, 2019 23:38
Basic introduction to ray.serve api
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simon-mo
simon-mo / parallel-sort.ipynb
Created June 26, 2019 21:19
Parallel Sorting in ray
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.