Skip to content

Instantly share code, notes, and snippets.

View emakryo's full-sized avatar

Ryosuke Kamesawa emakryo

View GitHub Profile
#!/usr/bin/env pythonw
import os
import sys
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from PyQt5.QtWidgets import QApplication, QWidget, QFileDialog
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@emakryo
emakryo / local.jupyter.notebook.plist
Created October 22, 2016 04:25
LaunchAgent plist for jupyter notebook
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>local.jupyter.notebook</string>
<key>ProgramArguments</key>
<array>
var express = require('express');
var router = express.Router();
var fs = require('fs');
var pdfjs = require("pdfjs-dist")
var filepath = "/home/user/scalable-inference-for-gaussian-process-models-with-black-box-likelihoods.pdf";
var data = new Uint8Array(fs.readFileSync(filepath));
var extract_title = data => pdfjs.getDocument(data).then(doc =>
doc.getMetadata().then(meta => meta.info.Title));
@emakryo
emakryo / noftification.py
Last active January 3, 2016 03:02
Send simple notification in twitter
from requests_oauthlib import OAuth1Session
from time import time
class Notification:
"""
Notification class to specific user in twitter
"""
log_file = "notify.log"
@emakryo
emakryo / GLSLtest.html
Created June 8, 2015 15:09
something like GLSL sandbox (but little slow)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>GLSL test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js">
</script>
<script type="text/javascript">
var gl;
var canvas;
# coding=utf-8
import sys
from requests_oauthlib import OAuth1Session
from time import sleep
from random import randint, seed
from json import loads
oauth_key = {
"consumer_key" : "xxxxxxxxxxxxxxxxxxxxxxxxx",
"consumer_secret" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",