Skip to content

Instantly share code, notes, and snippets.

View pboos's full-sized avatar

Patrick Boos pboos

View GitHub Profile
@pboos
pboos / README.md
Last active February 19, 2023 20:51
Plex IPTV - TV7
@pboos
pboos / 1_create_model.py
Last active October 18, 2018 06:39
Tensorflow Lite Android
from __future__ import division, print_function, absolute_import
# library for optmising inference
from tensorflow.python.tools import optimize_for_inference_lib
from tensorflow.python.tools import freeze_graph
import tensorflow as tf
# Higher level API tflearn
import tflearn
from tflearn.data_utils import shuffle, to_categorical
from tflearn.layers.core import input_data, dropout, fully_connected
from tflearn.layers.conv import conv_2d, max_pool_2d
@pboos
pboos / _general.txt
Last active March 13, 2018 23:34
#14 Tokyo Android Meetup
Time: 7:00 PM to 9:30 PM
Location: TenTen's Office | 東京都渋谷区神宮前4丁目22番3号 パレスジン301 · Tokyo
How to find us: On Arrival: Press 301 on the panel near the door and use stairs to 3rd floor.
@pboos
pboos / .conkyrc
Last active February 8, 2017 15:06
Conky Config
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo
Any original torsmo code is licensed under the BSD license
All code written since the fork of torsmo is licensed under the GPL
Please see COPYING for details
@pboos
pboos / _README.md
Last active July 6, 2020 08:56
gradle-s3-upload

Android publish APK to S3

build.gradle in your project which generates the apk:

apply from:'https://gist.githubusercontent.com/pboos/c4ae04b62641d7e9897c/raw/45515edf3cf00925b59a51d0ca893c44a2b06851/gradle-s3-upload.gradle'

~/.gradle/gradle.properties

@pboos
pboos / monkeyrunner.py
Last active December 20, 2015 15:18
monkeyrunner
# For setup:
# adb -d forward tcp:1080 tcp:1080
# adb -d shell monkey --port 1080
import sys
import time
import telnetlib
tn = telnetlib.Telnet("localhost", 1080, 5)
require 'httparty'
require 'json'
class Crashlytics
include HTTParty
base_uri 'https://api.crashlytics.com/api/v2'
def session(email, password)
self.class.post('/session.json',
body: {email: email, password:password}.to_json,
@pboos
pboos / showmap.js
Created July 8, 2013 07:26
Script to show results on http://www.alle-immobilien.ch/ on a map. Takes a while to load the locations (limitation google maps api). Copy paste all the code into the javascript console and enjoy.
// we can use jquery since site has it added
// 1. add header
document.oldWrite = document.write;
document.write = function(text) {
var parser = new DOMParser();
var element = parser.parseFromString(text, "text/xml");
var child = element.firstChild;
var element = document.createElement("script");
element.src = child.getAttribute('src');
element.type= "text/javascript";
@pboos
pboos / annotation-processor-build.gradle
Last active August 7, 2020 06:38
Gradle stuff for Android
configurations {
apt
}
dependencies {
compile 'com.squareup.dagger:dagger:1.1.0'
apt 'com.squareup.dagger:dagger-compiler:1.1.0'
}
android.applicationVariants.all { variant ->
@pboos
pboos / plug.dj.playlist.extractor.js
Last active September 24, 2020 20:30
Extract the playlists of plug.dj
var playlists = JSON.parse(localStorage.getItem("playlist"));
for (var key in playlists) {
var playlist = playlists[key];
console.log(playlist.name);
for (var index in playlist.items) {
console.log("http://www.youtube.com/watch?v=" + playlist.items[index].substr(2));
}
}