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
#ifndef CHI_SQUARE_SELECTOR_H_ | |
#define CHI_SQUARE_SELECTOR_H_ | |
#include "FeatureSelector.h" | |
namespace zdcp { | |
class ChiSquareSelector: public FeatureSelector { | |
protected: | |
#if 0 |
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
for access_log in /export/logback/www*/app_m_access.log.2015-04-*.gz; do | |
( | |
csv_file="`mktemp $root/tmp/access_log-XXXXXX.csv`" | |
: > $csv_file | |
echo "processing $access_log -> $csv_file" | |
$root/scripts/parse_access_log_v2.py --source xxxxxxxx --access-log $access_log > $csv_file | |
echo "\COPY m_access_log FROM '$csv_file' WITH CSV" | connect_postgres | |
rm -f $csv_file | |
) & | |
done |
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 | |
# filename : with_local.sh | |
# created at : 2015-05-04 11:28:24 | |
# author : Jianing Yang <jianingy.yang@gmail.com> | |
if [ "$#" -lt 2 ]; then | |
echo "Usage: $(basename $0) lockfile command" | |
echo "Prevent process from running when lock file exists." | |
echo |
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/sh | |
if [ "`id -u`" != "0" ]; then | |
invoke-sudo.sh $0 $@ | |
fi | |
modprobe -r iwlmvm | |
#modprobe -r iwlwifi | |
#modprobe -r mac80211 | |
#modprobe -r cfg80211 |
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
;; An Example of Emacs Script | |
;; Find all kernel processes | |
(defmacro |> (x &rest funcs) | |
`(reduce #'(lambda (z f) (apply f (list z))) (list ,@funcs) :initial-value ,x)) | |
(|> (shell-command-to-string "ps awux") | |
#'(lambda (x) (split-string x "\n")) | |
#'(lambda (x) (mapcar 'split-string x)) | |
#'(lambda (x) (remove-if-not #'(lambda (x) (string-match "^\\[" (or (car (last x)) ""))) x)) |
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
(ns sqlcharts.core.layouts | |
(:require [clojure.string :as string] | |
[hiccup.page :refer :all] | |
[noir.validation :as vali])) | |
(defn navbar-top | |
[] | |
[:nav.navbar.navbar-default.navbar-static-top | |
[:div.container | |
[:div.navbar-header |
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 create_app(): | |
app = Flask(__name__) | |
# setup database | |
db_api.init() | |
# set app debug mode | |
app.debug = CONF.debug | |
# request context |
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
/* | |
* filename : burst.go | |
* created at : 2014-09-02 11:19:13 | |
* author : Jianing Yang <jianingy.yang@gmail.com> | |
*/ | |
package main | |
import ( | |
"flag" | |
"fmt" |
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
PATH=/opt/uw-imap/bin:/usr/local/bin:/usr/bin:/bin | |
MAILDIR=$HOME/mailbox | |
LOGFILE=$HOME/.procmail.log | |
LOCKFILE=$HOME/.mail.lock | |
:0 :.me.lock | |
* ^To:\s+jianing.yang | |
| dmail +INBOX | |
:0 :.INBOX.lock |
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
poll [mailserver] protocol IMAP | |
user "jianing.yang" is jianing.yang here password '[password]' | |
options fetchall ssl mda "/usr/bin/procmail -f %F -d %T"; |