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
/* Discretionary Round Robin | |
A DFQ tries to achieve the same criterias as in a Round Robin Queue | |
1. No starvation. | |
2. Traffic Shaping: throughput and burst guarantee | |
Instead of controlling _when_ to send as in normal traffic shaping queue, | |
DRR decides whether to send. When a sender wants to send a packet, it first | |
calls Flow.send(size). DRR either returns "Yes. You can send now" or "No. | |
Check with me again after t seconds." | |
*/ |
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
Naive Bayes | |
Logistic Regression | |
Sequential Minimal Optimization | |
Laxy-Ibk | |
Random Committee | |
Decision Table | |
PART | |
J48 | |
LMT | |
Random Forest Tree |
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 <windows.h> | |
#include <psapi.h> // for GetMappedFileName | |
#include <stdio.h> | |
static const struct memprot_name_type { | |
unsigned int value; | |
const char *short_name; | |
const char *desc; | |
} memprot_names[] = { | |
{PAGE_NOACCESS, "noa", "PAGE_NOACCESS"}, |
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 <windows.h> | |
#include <psapi.h> // for GetMappedFileName | |
#include <stdio.h> | |
static const struct memprot_name_type { | |
unsigned int value; | |
const char *short_name; | |
const char *desc; | |
} memprot_names[] = { | |
{PAGE_NOACCESS, "noa", "PAGE_NOACCESS (cannot dump)"}, |
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
def gendpage (cards, linesPerPage): | |
nitem = linesPerPage*2; | |
if len(cards) < nitem: | |
co = cards + [("", "", "")]*(nitem-len(cards)) | |
cards = [] | |
else: | |
co = cards[0:nitem] | |
cards = cards[nitem:] | |
for i in range(0, linesPerPage): |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 12. in line 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
no11 | |
400.perlbench,9770,342.737275,28.505799,1,S,,,,,NR,"SelectedIteration (base #2)" | |
401.bzip2,9650,496.388853,19.440404,1,S,,,,,NR,"SelectedIteration (base #2)" | |
403.gcc,8050,301.848171,26.669037,1,S,,,,,NR,"SelectedIteration (base #1)" | |
429.mcf,9120,271.583367,33.580849,1,S,,,,,NR,"SelectedIteration (base #1)" | |
445.gobmk,10490,462.053761,22.702986,1,S,,,,,NR,"SelectedIteration (base #2)" | |
456.hmmer,9330,429.788319,21.708361,1,S,,,,,NR,"SelectedIteration (base #2)" | |
458.sjeng,12100,513.934958,23.543835,1,S,,,,,NR,"SelectedIteration (base #3)" | |
462.libquantum,20720,367.549355,56.373381,1,S,,,,,NR,"SelectedIteration (base #2)" | |
464.h264ref,22130,552.763484,40.035206,1,S,,,,,NR,"SelectedIteration (base #2)" |
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
#!/bin/bash | |
# change this | |
user=SMRT_Singapore | |
while true ; do | |
if [ -f crawl-0.json ] ; then | |
pos=`cat crawl-*.json | tr ',' '\n' | grep 'min_position.:.[0-9]' | sed -e 's/.*:"//' -e 's/".*//' | sort -n | head -n 1` | |
url="https://twitter.com/i/profiles/show/$user/timeline/tweets?include_available_features=1&include_entities=1&max_position=$pos&reset_error_state=false" | |
else |
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
C:\Users\v>cd Desktop\aimage\walleye-opm1.171019.011 | |
C:\Users\v\Desktop\aimage\walleye-opm1.171019.011>flash-all.bat | |
target reported max download size of 536870912 bytes | |
sending 'bootloader_a' (38644 KB)... | |
OKAY [ 0.833s] | |
writing 'bootloader_a'... | |
(bootloader) Updating: partition:0 @00002000 sz=0000B000 | |
FAILED (remote: Command Flash Error) | |
finished. total time: 0.841s |
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
# Usage: python3 p5-bayes.py z4-mark z4-noma | |
import sys | |
import numpy as np | |
import scipy.stats | |
def load_data(path): | |
nr_fields = None | |
ids = list() | |
vecs = list() |
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
LANGUAGE=en_SG:en | |
HOME=/home/yz | |
LOGNAME=yz | |
PATH=/usr/bin:/bin | |
LANG=en_SG.UTF-8 | |
SHELL=/bin/sh | |
PWD=/home/yz | |
LANGUAGE=en_SG:en | |
HOME=/home/yz | |
LOGNAME=yz |