Skip to content

Instantly share code, notes, and snippets.

View val314159's full-sized avatar

val314159 val314159

View GitHub Profile
@val314159
val314159 / Makefile
Last active January 1, 2020 02:35 — forked from kylemcdonald/three.js.shader.html
Minimal three.js shader example.
all:
open three.js.shader.html
@val314159
val314159 / +README.md
Created December 9, 2018 19:21 — forked from quiver/README.md
Who says PostgreSQL can't Pub/Sub like Redis?

Pub/Sub pattern with PostgreSQL's LISTEN/NOTIFY command

This is a simple chat-like program using pub-sub pattern, backed by PostgreSQL's LISTEN/NOTIFY command.

Publish

publish message to foo channel from user nickname.

$ python pub.py foo nickname
PUBLISH to channel #foo
@val314159
val314159 / circle_detection.py
Created July 23, 2017 01:53 — forked from martinsik/circle_detection.py
Circle detection with OpenCV 3.0
import cv2
import time
import math
import numpy as np
capture = cv2.VideoCapture(0)
print capture.get(cv2.CAP_PROP_FPS)
t = 100
w = 640.0
@val314159
val314159 / classifier_from_little_data_script_3.py
Last active February 22, 2018 12:26 — forked from fchollet/classifier_from_little_data_script_3.py
Fine-tuning a Keras model. Updated to the Keras 2.0.5 API.
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@val314159
val314159 / gist:27cd0d55f81adc9e1e8333fb5cb7c8f2
Last active June 7, 2016 19:32 — forked from PaulHuygen/gist:10016200
Install Virtuoso 7.1.0 on a clean Centos 6.5 system.
#!/bin/bash
# The following script installs Virtuoso on a clean Centos 6.5 system.
yum -y update
yum -y install autoconf automake libtool flex bison gperf git openssl-devel readline-devel
export VIRTUOSO_NAME=virtuoso-opensource
export VIRTUOSO_VERSION=7.1.0
export VIRTUOSO_FULLNAME=$VIRTUOSO_NAME-$VIRTUOSO_VERSION
export VIRTUOSO_TARBALL=$VIRTUOSO_FULLNAME.tar.gz
@val314159
val314159 / HEY-YOU.md
Last active September 14, 2015 21:39 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import sys
import base64
key = ""
class AuthHandler(SimpleHTTPRequestHandler):
''' Main class to present webpages and authentication. '''
def do_HEAD(self):
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import sys
import base64
key = ""
class AuthHandler(SimpleHTTPRequestHandler):
''' Main class to present webpages and authentication. '''
def do_HEAD(self):
@val314159
val314159 / index.htm
Last active August 29, 2015 14:08 — forked from bennadel/index.htm
<!doctype html>
<html ng-app="Demo" ng-controller="DemoController">
<head>
<meta charset="utf-8" />
<title>
Using Controllers With ngRepeat In AngularJS
</title>
<style type="text/css">
@val314159
val314159 / websse.py
Last active August 29, 2015 14:06 — forked from werediver/websse.py
"""
Simple demonstration of how to implement Server-sent events (SSE) in Python
using Bottle micro web-framework.
SSE require asynchronous request handling, but it's tricky with WSGI. One way
to achieve that is to use gevent library as shown here.
Usage: just start the script and open http://localhost:8080/ in your browser.
Based on: