Skip to content

Instantly share code, notes, and snippets.

View markroxor's full-sized avatar

Mohit Rathore markroxor

View GitHub Profile
#Imports
import pygame,time,random,cv2
from detectionFunction import fingerCount
from multiprocessing.pool import ThreadPool
from collections import Counter
#Threading and Opencv
pool = ThreadPool(processes=1)
cap = cv2.VideoCapture(0)
#
import cv2,time,thread,threading
import numpy as np,pygame
from collections import Counter
clk = pygame.time.Clock()
def fingerCount(cap,openSecs):
ret,img = cap.read()
import cv2,pygame
from detectionFunction import fingerCount
capture = cv2.VideoCapture(0)
k = fingerCount(capture,2)
print k
pygame.time.wait(3000)
@markroxor
markroxor / test.py
Last active October 22, 2015 16:13
from detectionFunction import fingerCount
import thread,threading,time,cv2
from multiprocessing.pool import ThreadPool
pool = ThreadPool(processes=1)
cap = cv2.VideoCapture(0)
# cap = 1
async_result = pool.apply_async(fingerCount, (cap,1, )) # tuple of args for foo
@markroxor
markroxor / PRIME1.cpp
Created January 23, 2016 12:27
prime generator
//(҂>_<)
//<,︻╦╤─ ҉ ---- -M-A-R-K-!!!-R-O-X-O-R- ------
// /﹋\" BRATATATATATAT!!
#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
//#include<stdio.h>
#include<time.h>
import urllib # URL functions
import urllib2 # URL functions
# Set YOUR TextLocal username
username = '[email protected]'
# Set YOUR unique API hash
# It is available from the docs page
# https://control.txtlocal.co.uk/docs/
---------------------------------------------------
constituent[0]: file:/usr/share/maven/lib/eclipse-aether-connector-basic.jar
constituent[1]: file:/usr/share/maven/lib/maven-repository-metadata-3.x.jar
constituent[2]: file:/usr/share/maven/lib/maven-artifact-3.x.jar
constituent[3]: file:/usr/share/maven/lib/plexus-sec-dispatcher.jar
constituent[4]: file:/usr/share/maven/lib/slf4j-api.jar
constituent[5]: file:/usr/share/maven/lib/plexus-component-annotations.jar
constituent[6]: file:/usr/share/maven/lib/maven-core-3.x.jar
constituent[7]: file:/usr/share/maven/lib/commons-lang3.jar
constituent[8]: file:/usr/share/maven/lib/maven-builder-support-3.x.jar
Coding/gensim [TF*] » python tftest.py
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:937] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties:
name: GeForce GTX 1060 3GB
major: 6 minor: 1 memoryClockRate (GHz) 1.797
Coding/gensim [TF*] » python tftest.py
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally
E tensorflow/stream_executor/cuda/cuda_driver.cc:509] failed call to cuInit: CUDA_ERROR_NO_DEVICE
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:158] retrieving CUDA diagnostic information for host: thehive
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:165] hostname: thehive
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] libcuda reported version is: 367.57.0
running install
running bdist_egg
running egg_info
writing requirements to gensim.egg-info/requires.txt
writing gensim.egg-info/PKG-INFO
writing top-level names to gensim.egg-info/top_level.txt
writing dependency_links to gensim.egg-info/dependency_links.txt
reading manifest file 'gensim.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'COPYING.LESSER'