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
["1", "3", "5", "7"] |
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
def load_npy_files(path, range_val=(), row_col=(0,0)): | |
total_rows = 0 | |
total_cols = 0 | |
max_cols = 0 | |
max_rows = 0 | |
row_size_list = [] | |
dataset_list = [] |
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 <stdio.h> | |
#include <stdlib.h> | |
void trickme(FILE *f) | |
{ | |
char buf[24]; | |
long i, fsize, read_size; | |
puts("How many bytes do you want to read? (max: 24)"); | |
scanf("%ld", &i); |
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 https://github.com/golang/go/blob/7e394a2/src/net/http/h2_bundle.go#L998-L1043 | |
// Buffer chunks are allocated from a pool to reduce pressure on GC. | |
// The maximum wasted space per dataBuffer is 2x the largest size class, | |
// which happens when the dataBuffer has multiple chunks and there is | |
// one unread byte in both the first and last chunks. We use a few size | |
// classes to minimize overheads for servers that typically receive very | |
// small request bodies. | |
// | |
// TODO: Benchmark to determine if the pools are necessary. The GC may have |
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 ( | |
"sync" | |
"net" | |
) | |
const MaxPacketSize = 4096 | |
var bufPool = sync.Pool { |
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
import datetime | |
import requests | |
cookies = { | |
'phpbb2mysql_data': 'a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bs%3A1%3A%222%22%3B%7D', | |
'phpbb2mysql_sid': '3710d7a0fb22e2763fc19ed2b2ef2842', | |
'phpbb2mysql_t': 'a%3A4%3A%7Bi%3A2%3Bi%3A1543061709%3Bi%3A3%3Bi%3A1543061714%3Bi%3A4%3Bi%3A1543061719%3Bi%3A5%3Bi%3A1543062076%3B%7D' | |
} | |
params = {} |
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
Host users.ncl.sg | |
User jcena096 | |
LocalForward 5901 n1.network2.CS4238-18-01.ncl.sg:5901 | |
LocalForward 5902 n2.network2.CS4238-18-01.ncl.sg:5902 | |
LocalForward 11002 n1.network2.CS4238-18-01.ncl.sg:11002 | |
LocalForward 11003 n1.network2.CS4238-18-01.ncl.sg:11003 | |
LocalForward 11004 n1.network2.CS4238-18-01.ncl.sg:11004 | |
LocalForward 11005 n1.network2.CS4238-18-01.ncl.sg:11005 | |
LocalForward 11006 n1.network2.CS4238-18-01.ncl.sg:11006 | |
LocalForward 11007 n1.network2.CS4238-18-01.ncl.sg:11007 |
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 https://www.wains.be/pub/networking/tcpdump_advanced_filters.txt | |
tcpdump advanced filters | |
======================== | |
Sebastien Wains <sebastien -the at sign- wains -dot- be> | |
http://www.wains.be | |
################################################################### | |
This page is not updated anymore and contains mistakes and typos. | |
Please check the updated link: |
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
def triggeredBy = "---" | |
def iterateCause(b) { | |
upstreamcause = b.getCause(hudson.model.Cause.UpstreamCause.class) | |
if (upstreamcause != null) { | |
job = Jenkins.getInstance().getItemByFullName(upstreamcause.getUpstreamProject(), hudson.model.Job.class) | |
if (job != null) { | |
upstream = job.getBuildByNumber(upstreamcause.getUpstreamBuild()) | |
if (upstream != null) { | |
iterateBuild(upstream) |
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 -x | |
OLD_IFS="${IFS}" | |
IFS=" | |
" | |
LIMIT=2 | |
cmd_buff="`cat command_list.txt`" | |
declare -a cmd_list=($cmd_buff) |
NewerOlder