Skip to content

Instantly share code, notes, and snippets.

Avatar

Jackie Yang valkjsaaa

View GitHub Profile
@valkjsaaa
valkjsaaa / axis-gear.config
Created Nov 9, 2019
old axis gear config
View axis-gear.config
metadata {
definition (name: "AXIS Gear-V3", namespace: "axis", author: "AXIS Labs") {
capability "Actuator"
capability "Configuration"
capability "Switch"
capability "Switch Level"
capability "Refresh"
capability "Battery"
capability "HealthCheck"
capability "Window Shade"
@valkjsaaa
valkjsaaa / multi_range.py
Last active Sep 1, 2019
MultiRange: an implementation of multi ranges concatenated together in a Sequence interface
View multi_range.py
from __future__ import annotations
import itertools
from abc import ABC
from collections import Sequence, deque
import typing
from overload import overload
@valkjsaaa
valkjsaaa / HCI.md
Created Nov 16, 2018
List of stuff that HCI research do earlier than product
View HCI.md

List of stuff that HCI research do earlier than product

  1. Multiple Selection and Edits

HCI Paper: Interactive Simultaneous Editing of Multiple Text Regions by Robert C. Miller and Brad A. Myers

Product: Sublime Text, Atom, and Visual Studio Code...

View word predictor
import numpy as np
np.random.seed(42)
import tensorflow as tf
tf.set_random_seed(42)
from keras.models import Sequential, load_model
from keras.layers import Dense, Activation
from keras.layers import LSTM, Dropout
from keras.layers import TimeDistributed
from keras.layers.core import Dense, Activation, Dropout, RepeatVector
from keras.optimizers import RMSprop
@valkjsaaa
valkjsaaa / Program.cs
Created Mar 28, 2018
DroneControlCLI
View Program.cs
using System;
using System.Collections;
using System.Collections.Generic;
using NetMQ;
using NetMQ.Sockets;
namespace DroneControlCLI
{
struct Vector3
{
@valkjsaaa
valkjsaaa / patch-oldglibc.patch
Last active Nov 7, 2016
Patch to compile libiconv in older glibc
View patch-oldglibc.patch
--- a/srclib/stdio.in.h
+++ b/srclib/stdio.in.h
@@ -695,7 +695,9 @@ _GL_CXXALIASWARN (gets);
/* It is very rare that the developer ever has full control of stdin,
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
+# if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+# endif
#endif
@valkjsaaa
valkjsaaa / CVImageBuffer_deepcopy.swift
Created May 19, 2016
deep copy of a CVImageBuffer
View CVImageBuffer_deepcopy.swift
extension CVPixelBuffer {
func deepcopy() -> CVPixelBuffer? {
let width = CVPixelBufferGetWidth(self)
let height = CVPixelBufferGetHeight(self)
let format = CVPixelBufferGetPixelFormatType(self)
var pixelBufferCopyOptional:CVPixelBuffer?
CVPixelBufferCreate(nil, width, height, format, nil, &pixelBufferCopyOptional)
if let pixelBufferCopy = pixelBufferCopyOptional {
CVPixelBufferLockBaseAddress(self, kCVPixelBufferLock_ReadOnly)
CVPixelBufferLockBaseAddress(pixelBufferCopy, 0)
@valkjsaaa
valkjsaaa / libmf.rb
Created Apr 19, 2016
Homebrew formula for libmf
View libmf.rb
class Libmf < Formula
desc "open source tool for approximating an incomplete matrix."
homepage "https://www.csie.ntu.edu.tw/~cjlin/libmf/"
url "http://www.csie.ntu.edu.tw/~cjlin/libmf/libmf-2.01.zip"
sha256 "75bb98a4e8f1a318d7d07556583727b4e301759904570bf527972d964d34ef30"
patch :DATA
def install
system "make"
system "make", "lib"
@valkjsaaa
valkjsaaa / features.md
Last active Sep 3, 2015
features in the IOT system
View features.md

Feature and progress report of the IoT system

Here I listed most of the features of the IoT system that I have implemented or I'm goint to implement. Tick in the checkbox means that it is done, empty checkbox means that it is still under development.

Overall Progress

  • Desktop system
  • Mobile system
@valkjsaaa
valkjsaaa / scenario.md
Created Aug 1, 2015
Scenarios and design of IOT programming environment
View scenario.md

Targeted scenario

lower the volume around me if there is a phone call notify me

problems about moving around priority of actions

You can’t perform that action at this time.