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
# | |
# Himawari-8 Downloader | |
# | |
# | |
# | |
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image, | |
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background. | |
# | |
# http://himawari8.nict.go.jp/himawari8-image.htm | |
# |
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
# first mount the samba share (use the gui) | |
# then link the mounted smb share somewhere more convientent | |
# sudo ln -s /run/user/1000/gvfs/smb-share:server=dlink-71f6dd,share=volume_1-1 /mnt/network | |
# then run as usual | |
# python avgEpisode.py /mnt/network/TV\ Shows/That\ \'70s\ Show/ output.avi | |
import os | |
import sys |
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 | |
# robust_pca_project.py | |
# | |
# Author: Kevin Hughes | |
# Date: May 2013 | |
""" | |
An Implementation of the robust subspace projection technique described in: |
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
/* Using OpenCV and Shogun Machine Learning | |
* gist by Kevin Hughes | |
*/ | |
#include <opencv2/core/core.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <shogun/base/init.h> | |
#include <shogun/lib/common.h> | |
#include <shogun/lib/SGMatrix.h> |
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
using namespace Eigen; | |
typedef Matrix< float64_t, Dynamic, Dynamic, ColMajor > EMatrix; | |
using std::cout; | |
using std::endl; | |
void print(EMatrix A) | |
{ | |
int n = A.rows(); | |
int m = A.cols(); |
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 | |
set -e | |
cd $(readlink -f $(dirname $0)) | |
exec ./exe $* |
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
cmake_minimum_required(VERSION 2.8 FATAL_ERROR) | |
project(HelloWorld) | |
set(EXE HelloWorld) | |
find_package(PCL 1.6 REQUIRED) | |
include_directories(${PCL_INCLUDE_DIRS}) | |
link_directories(${PCL_LIBRARY_DIRS}) | |
add_definitions(${PCL_DEFINITIONS}) |
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 bash | |
# add to cron tab | |
# crontab -e | |
# then append: | |
# */30 * * * * /home/kevin/coding-timer.sh | |
# need to have: | |
# xhost local:mpromber > /dev/null | |
# in bashrc |
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 myfitnesspal # pip install myfitnesspal | |
import ipdb | |
print 'logging in ...' | |
client = myfitnesspal.Client('username', 'password') | |
days = [] | |
for i in range(2, 18+1): | |
print 'fetching 2015, 6,', i | |
days.append( client.get_date(2015, 6, i) ) |
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
// run by pasting the function into dev console then call it | |
// can also use something like Custom JavaScript for websites: | |
// https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija | |
// name and field are set by Zuluru | |
function scrape() { | |
data = "" | |
fields.forEach(function(field){ |