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 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 | |
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
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" |
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
// 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 |
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
# 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] |
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 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] |
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
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 |
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
//html | |
<div class="walkthrough image"> | |
iPhone screenshot here | |
<div class="walkthrough picture fade-out"></div> | |
</div> | |
//css | |
.fade-out { | |
opacity: 0; |
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
//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 }) { |