Skip to content

Instantly share code, notes, and snippets.

Avatar
😄
( ´ ▽ ` )ノ

Lequn Chen abcdabcd987

😄
( ´ ▽ ` )ノ
View GitHub Profile
@abcdabcd987
abcdabcd987 / PortraitStyleTransfer.py
Created Apr 13, 2017 — forked from titu1994/PortraitStyleTransfer.py
Partial implementation of "Painting Style Transfer for Head Portraits using Convolutional Neural Networks".
View PortraitStyleTransfer.py
from scipy.misc import imread, imresize, imsave
from scipy.optimize import fmin_l_bfgs_b
import numpy as np
import time
import os
import argparse
import h5py
from keras.models import Sequential
from keras.layers.convolutional import Convolution2D, ZeroPadding2D, AveragePooling2D, MaxPooling2D
@abcdabcd987
abcdabcd987 / prog2_abp.c
Created Apr 28, 2017
Programming Assignment #2: Implementing a Reliable Transport Protocol (Alternating-Bit-Protocol)
View prog2_abp.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* ******************************************************************
ALTERNATING BIT AND GO-BACK-N NETWORK EMULATOR: VERSION 1.1 J.F.Kurose
This code should be used for PA2, unidirectional or bidirectional
data transfer protocols (from A to B. Bidirectional transfer of data
is for extra credit and is not required). Network properties:
@abcdabcd987
abcdabcd987 / prog2_gbn.c
Created Apr 28, 2017
Programming Assignment #2: Implementing a Reliable Transport Protocol (Go-Back-N)
View prog2_gbn.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* ******************************************************************
ALTERNATING BIT AND GO-BACK-N NETWORK EMULATOR: VERSION 1.1 J.F.Kurose
This code should be used for PA2, unidirectional or bidirectional
data transfer protocols (from A to B. Bidirectional transfer of data
is for extra credit and is not required). Network properties:
@abcdabcd987
abcdabcd987 / ICMPPinger.py
Created May 15, 2017
Socket Programming Assignment 5: ICMP Pinger
View ICMPPinger.py
import os
import sys
import struct
import time
import select
import socket
import binascii
ICMP_ECHO_REQUEST = 8
View bitbar-okcoin.py
#!/usr/local/bin/python3
import os
# os.environ['HTTP_PROXY'] = 'http://127.0.0.1:8081/'
# os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:8081/'
import sys
import hashlib
import requests
import sqlite3
from pprint import pprint
View bitbar-localbitcoins.py
#!/usr/local/bin/python2
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function, division
import os
# os.environ['HTTP_PROXY'] = 'http://127.0.0.1:8081/'
# os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:8081/'
import datetime
import hashlib
import requests
from pprint import pprint
View ojstat.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View sharding.cc
// g++-7 sharding.cc -Wall -std=c++17 -g -pthread -O2 -ltbb
#include <cassert>
#include <cstdlib>
#include <cstring>
#include <string>
#include <mutex>
#include <shared_mutex>
#include <optional>
#include <random>
View cache-prefetching.cc
// g++ cache-prefetching.cc -Wall -std=c++11 -g -pthread -O2
#include <string>
#include <vector>
#include <mutex>
#include <random>
#include <chrono>
#include <thread>
#include <iomanip>
#include <iostream>
View cs140e-os-branch-master.patch
diff -ruN orig/bootloader/Xargo.toml new/bootloader/Xargo.toml
--- orig/bootloader/Xargo.toml 2018-07-18 23:59:41.000000000 +0800
+++ new/bootloader/Xargo.toml 2018-07-19 22:31:03.000000000 +0800
@@ -2,10 +2,6 @@
core = {}
std_unicode = {}
-[dependencies.compiler_builtins]
-features = ["mem"]
-stage = 1