Skip to content

Instantly share code, notes, and snippets.

View AndrusAsumets's full-sized avatar

Andrus Asumets AndrusAsumets

View GitHub Profile
import sys
sys.path.insert(0,'/Users/andrusasumets/Projects/perceptual-quality')
print(sys.path)
from perceptual_quality import pim
import tensorflow as tf
import tflite_runtime.interpreter as tflite
import time
https://askubuntu.com/a/1038118
sudo nano /usr/share/X11/xorg.conf.d/50-mtrack.conf
Section "InputClass"
MatchIsTouchpad "on"
Identifier "Touchpads"
Driver "mtrack"
Option "TapDragTime" "150"
Option "Sensitivity" "1"
// Webhook (optional):
// Update 'Web hook url' under Management -> Vendor -> Edit
// Installation:
// npm install crypto fetch express
// Make a folder named 'documents' that contains following images:
// 'face.jpg' for face portrait
// 'document-front.jpg' for document's front
// 'document-back.jpg' for documents' back
# process-image.py
# usage:
# python process.py lena.jpg lena 00:00:00 00:10:00
import os, sys
url = sys.argv[1]
file_name = sys.argv[2]
from_location = sys.argv[3]
duration = sys.argv[4]
import os
import sys
import numpy as np
import matplotlib.image as mpimg
import wave
from array import array
input_path = sys.argv[1]
output_path = sys.argv[2]
var PouchDB = require('pouchdb')
var database = new PouchDB('http://user:password@localhost:5984/my_database')
function Database() {
this.find = async (id) => {
return await database.get(id).catch( () => null )
}
this.update = async (id, data = {}) => {
// check if object exists
//html
<div class="walkthrough image">
iPhone screenshot here
<div class="walkthrough picture fade-out"></div>
</div>
//css
.fade-out {
opacity: 0;
//redux middleware for socket.io > 0.0.1
////frontend
//feed.js
import { fromSocket, TO_SOCKET} from '../actions/actions';
import io from 'socket.io-client';
let socket = null;
export default function feed({ dispatch }) {