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
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
# file: unzip.py | |
import zipfile,os,sys | |
if len(sys.argv)==2: | |
fname=sys.argv[1] | |
else: | |
print "Usage: python %s filename\n\n" % sys.argv[0] | |
sys.exit() |
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
# System Info: | |
1. `uname -a`: | |
Linux gsc-arch 3.10.33-1-lts #1 SMP Fri Mar 7 12:51:18 UTC 2014 x86_64 GNU/Linux | |
2. `lsb_release`: | |
`lsb_release` not found. | |
3. `/etc/lsb-release`: |
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
# | |
# mexopts.sh Shell script for configuring MEX-file creation script, | |
# mex. These options were tested with the specified compiler. | |
# | |
# usage: Do not call this file directly; it is sourced by the | |
# mex shell script. Modify only if you don't like the | |
# defaults after running mex. No spaces are allowed | |
# around the '=' in the variable assignment. | |
# | |
# Note: For the version of system compiler supported with this release, |
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
import org.apache.spark.rdd.NewHadoopRDD | |
import org.apache.hadoop.hbase.mapreduce.TableInputFormat | |
import org.apache.hadoop.hbase.HBaseConfiguration | |
import org.apache.hadoop.hbase.client.Result | |
import org.apache.hadoop.hbase.io.ImmutableBytesWritable | |
import scala.collection.JavaConversions._ | |
import scala.collection.JavaConverters._ | |
import org.apache.spark.mllib.recommendation.ALS | |
import org.apache.spark.mllib.recommendation.Rating | |
import scala.collection.mutable.ArrayBuffer |
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
Jun 27 00:51:26 gsc-arch gnome-session[3822]: (gnome-shell:3893): GLib-GObject-WARNING **: gsignal.c:2569: instance '0x334c700' has no handler with id '124312' | |
Jun 27 00:51:32 gsc-arch systemd-logind[577]: Power key pressed. | |
Jun 27 00:51:32 gsc-arch NetworkManager[573]: <info> sleep requested (sleeping: no enabled: yes) | |
Jun 27 00:51:32 gsc-arch NetworkManager[573]: <info> sleeping... | |
Jun 27 00:51:32 gsc-arch NetworkManager[573]: <info> (wlp2s0): device state change: unavailable -> unmanaged (reason 'sleeping') [20 10 37] | |
Jun 27 00:51:32 gsc-arch NetworkManager[573]: <info> NetworkManager state is now ASLEEP | |
Jun 27 00:51:32 gsc-arch kernel: IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready | |
Jun 27 00:51:32 gsc-arch gnome-session[1250]: Window manager warning: Failed to set power save mode for output LVDS9: Permission denied | |
Jun 27 00:51:32 gsc-arch gnome-session[1250]: Window manager warning: Failed to set power save mode for output VGA15: Permission denied | |
Jun 27 00:51:35 gsc-arch systemd-logind[577]: |
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
# | |
# mexopts.sh Shell script for configuring MEX-file creation script, | |
# mex. These options were tested with the specified compiler. | |
# | |
# usage: Do not call this file directly; it is sourced by the | |
# mex shell script. Modify only if you don't like the | |
# defaults after running mex. No spaces are allowed | |
# around the '=' in the variable assignment. | |
# | |
# Note: For the version of system compiler supported with this release, |
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 <ctime> | |
#include <iostream> | |
#include <boost/date_time/gregorian/gregorian.hpp> | |
#include <boost/date_time/posix_time/posix_time.hpp> | |
//============================================================================== | |
//! Convert date part of Unix timestamp (time_t) to boost date | |
//! |
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
# ... more above ... | |
# wsfl bash is not a login shell | |
if [ -d "$HOME/bin" ] ; then | |
PATH="$HOME/bin:$PATH" | |
fi | |
# ssh-agent configuration | |
if [ -z "$(pgrep ssh-agent)" ]; then | |
rm -rf /tmp/ssh-* |
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 | |
tail -n0 -F "$1" | while read LINE; do | |
(echo "$LINE" | grep -e "$3") && curl -X POST --silent --data-urlencode \ | |
"payload={\"text\": \"$(echo $LINE | sed "s/\"/'/g")\"}" "$2"; | |
done |
OlderNewer