Skip to content

Instantly share code, notes, and snippets.

View mrtj's full-sized avatar

Janos Tolgyesi mrtj

View GitHub Profile
@alskipp
alskipp / ignoreNil.swift
Created May 6, 2016 00:04
How to ignore `nil` values using RxSwift without using❗️
// Create an `Observable` of Optional<Int>
let values: Observable<Int?> = [1, 2, .None, 3, .None, 4, 5].toObservable()
// Method 1: using a free function
// Requires passing the function to `flatMap`
func ignoreNil<A>(x: A?) -> Observable<A> {
return x.map { Observable.just($0) } ?? Observable.empty()
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GilLevi
GilLevi / README.md
Last active June 17, 2023 20:58
Emotion Recognition in the Wild via Convolutional Neural Networks and Mapped Binary Patterns

Gil Levi and Tal Hassner, Emotion Recognition in the Wild via Convolutional Neural Networks and Mapped Binary Patterns

Convolutional neural networks for emotion classification from facial images as described in the following work:

Gil Levi and Tal Hassner, Emotion Recognition in the Wild via Convolutional Neural Networks and Mapped Binary Patterns, Proc. ACM International Conference on Multimodal Interaction (ICMI), Seattle, Nov. 2015

Project page: http://www.openu.ac.il/home/hassner/projects/cnn_emotions/

If you find our models useful, please add suitable reference to our paper in your work.

@tetkuz
tetkuz / README.md
Last active February 13, 2024 16:49
GStreamer stream to HTML5

Description

[Server] GStreamer ---> HTML [Client]

Require

  • gstreamer-1.x
  • Browser which supports video tag of HTML5

debian

@michaellihs
michaellihs / twisted.md
Last active April 7, 2024 17:47
Write your own ssh Server with the Python Twisted library

SSH Server with the Python Twisted Library

Installing the library

Assuming you have Python installed on your system:

pip install twisted
pip install pyOpenSSL
pip install service_identity
@ryanfitz
ryanfitz / indexAccountsToCloudsearch.js
Created July 17, 2015 18:46
index dynamodb data to cloudsearch using AWS Lambda
var AWS = require('aws-sdk');
exports.handler = function(event, context) {
var cloudsearchdomain = new AWS.CloudSearchDomain({endpoint: 'doc-dev-cinch-accounts-ltmqj5gt5mjb5hg5eyqaf2v5hu.us-east-1.cloudsearch.amazonaws.com'});
var documents = event.Records.map(function(record) {
var data = {id : record.dynamodb.Keys.id.S};
if (record.eventName === 'REMOVE') {
data.type = 'delete'
@ianschenck
ianschenck / new_app.py
Last active July 30, 2023 03:00
Run your flask app under twisted wsgi, ALWAYS.
if __name__ == "__main__":
reactor_args = {}
def run_twisted_wsgi():
from twisted.internet import reactor
from twisted.web.server import Site
from twisted.web.wsgi import WSGIResource
resource = WSGIResource(reactor, reactor.getThreadPool(), app)
site = Site(resource)
@midwire
midwire / reset_routing_table.sh
Last active January 4, 2024 20:01
[Reset routing table on OSX] #osx #devops #networking
#!/usr/bin/env bash
# Reset routing table on OSX
# display current routing table
echo "********** BEFORE ****************************************"
netstat -r
echo "**********************************************************"
for i in {0..4}; do
sudo route -n flush # several times
@springmeyer
springmeyer / mapnik-ios-sdk.md
Last active December 22, 2015 14:26
Setup Mapnik iOS SDK v2.2.0

Setup and Test Mapnik iOS SDK v2.2.0

First set up a project directory to hold your work:

cd ~/projects
mkdir mapnik-ios-test
cd mapnik-ios-test
@mbinna
mbinna / podforceupdate.sh
Created December 4, 2012 09:43
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update