Skip to content

Instantly share code, notes, and snippets.

@feiskyer
feiskyer / 12306AutoSubmit.user.js
Created January 10, 2012 13:52
12306 Auto Submit
/*
12306 Auto Submit => A javascript snippet to help you auto submit.
Copyright (C) 2011 Kevintop
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes 12306.user.js
@feiskyer
feiskyer / 12306AutoSubmit.user.js
Created January 10, 2012 13:53
12306 Auto Submit
/*
12306 Auto Submit => A javascript snippet to help you auto submit.
Copyright (C) 2011 Kevintop
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes 12306.user.js
@feiskyer
feiskyer / 12306.user.js
Created January 16, 2012 03:18 — forked from quietlynn/12306.user.js
12306 Auto Query => A javascript snippet to help you book ticket
/*
12306 Auto Query => A javascript snippet to help you book tickets online.
Copyright (C) 2011-2012 Jingqin Lynn
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js
@feiskyer
feiskyer / Srm144Lottery.cxx
Created March 7, 2012 13:00 — forked from anisaraf/Srm144Lottery.cxx
Solution to TopCoder:SRM144 Lottery
#include <sstream>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
unsigned long long factorialDivide(int num, int den){
unsigned long long rValue = 1;
@feiskyer
feiskyer / nth_prime.py
Created April 22, 2012 04:11 — forked from evansneath/nth_prime.py
Nth Prime
def nth_prime(n):
"""Finds the nth prime number.
Arguments:
n: The index of the saught after prime number.
Returns:
The value of the nth prime number.
"""
prime_table, counter = [], 2
prime_number, top, last = 0, 10000000, 0
@feiskyer
feiskyer / gist:4237860
Created December 8, 2012 00:42 — forked from fxsjy/gist:3550053
Bakup Weibo to Disk
package main
import (
"net/http"
"net/url"
"log"
"io/ioutil"
"regexp"
"fmt"
//"net/http/httputil"
@feiskyer
feiskyer / gist:43e2f4cad9d7b4b0a1e2
Created October 10, 2015 04:48 — forked from jeremyeder/gist:d3387fd7b34cac4af698
Smoke testing Clear Containers on RHEL7
Roughly the diff from upstream Docker-1.8:
https://github.com/docker/docker/compare/release/1.8...clearlinux:clr-1.8.1-submit
# uname -r
3.10.0-316.el7.x86_64
# getenforce
Enforcing
# cd /etc/yum.repos.d/
# wget http://download.opensuse.org/repositories/home:clearlinux:preview/CentOS_7/home:clearlinux:preview.repo
@feiskyer
feiskyer / pg-pong.py
Created January 4, 2017 13:54 — forked from karpathy/pg-pong.py
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
// Copyright 2016 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// Command caption reads an audio file and outputs the transcript for it.
package main
import (
"fmt"
"io"
env
dpdk: dpdk-stable-17.02.1
ovs: 6b1d46253362c0bad844cedf93e22e7bf94d55dc/2.7.0?
kernel: 4.11.5-200.fc25.x86_64
1, download and install dpd
$ wget http://dpdk.org/browse/dpdk-stable/snapshot/dpdk-stable-17.02.1.zip
$ unzip dpdk-stable-17.02.1.zip
$ cd dpdk-stable-17.02.1
$ export DPDK_DIR=`pwd`