Skip to main content

Posts

Showing posts from 2016

Python stoppable thread

How to create Stopable thread in python:- just copy and paste:) Learning:- #!/usr/bin/python2 import threading import time def myfunction(say):     print "my first thread is runnning"     while 1:         print say         time.sleep(1) thread = threading.Thread(target=myfunction,args=("hello sir",)) print "Thread is alive: ",thread.isAlive() t = threading.Event()                 #must after instance is created thread.daemon = True                 #must after threading.event and before start the event thread.start()                         #start the thread time.sleep(1) print "Check flag: ",t.isSet()         #Check flag before stopping time.sleep(1)                         #after 1 second delay stop thread print "Attempting to stop thread" t.set()                               #stop thread print "Thread event: ",t.isSet()     #Check thread is stopped or not print "thread is alive :",thread.isAlive() #i dont

How to make stoppable thread in python

Python multi threading: stoppable thread:     many of you heard about threading in python is very bad. its not easy to stop it but there are several method to do that thing happen .     so lets get started.     create file name called <filename>.py then paste this code in your text editor. import threading import time ##writer = Robokishan ##stopable thread class ThreadingExample(object):     """ Threading example class     The run() method will be started and it will run in the background     until the application exits.     """     #NOTE: STOPING THREAD IS BAD METHOD     def __init__(self, interval=1):         """ Constructor         :type interval: int         :param interval: Check interval, in seconds         """         self.interval = interval         thread = threading.Thread(target=self.run, args=())         self._stop = threading.Event()         thread.daemon = True                        

How to install arch linux offline ( without internet connection )

How to install arch linux offline without internet connection pacbang : - http://sh.st/1abTo obx linux : -http://sh.st/4jl0Z

Why drone is banned in india ?

SO Now a days drone is very popular technology in world companies are growing very well startups are growing on drone buisness,             But what happen here in India well honestly pepople are so intelligent in india they find the way of using technology that none of people in any country can .             Well they are so smart but the thing is ., drones have live camera, perfect stablization and 4K cameras , nice interface to do any thing .             "ANYTHING"...........            This technology is awesome honestly when i fly My drone. ( HOME MADE based on arduino )  feels like iron man            but there is a risk drones can fly up to some feet where we can easily examine whats happening around the city             drones can goes up to 30km as well, this technolgy can change the way we live. but in india it banne WHAT /????/??????? the greatest tech got banned yes             well as i said people are in india are awesome they find the way of using th

HOW TO DETECT FACES IN PYTHON USING OPENCV (face detection in python)

hello guys in this tutorial we will take a look at how to detect faces in python using opencv code : - ########################################### #robokishan #don't just copy and paste it will never work  install opencv and also modules required for it #then just download opencv from git and copy this file "haarcascade_frontalface_default.xml" #if you have such a brain this code speaks lot more than i show just figure out what else you can do #uncomment some useful stuffs #!/usr/bin/python import cv2 import numpy as np face_cascade = cv2.CascadeClassifier("haarcascade_frontalface_default.xml") # eye_cascade = cv2.CascadeClassifier("haarcascade_eye.xml") # smile = cv2.CascadeClassifier("haarcascade_smile.xml") cap = cv2.VideoCapture(0) while True: ret , frame  = cap.read() gray = cv2.cvtColor(frame , cv2.COLOR_BGR2GRAY) faces = face_cascade.detectMultiScale(gray , 1.3 , 5) for (x,y,w,h) in faces: cv2.rectangle

Top 10 Download Manager For Linux

10. Fatrat yaourt -S fatrat (Arch users) 9. Axel paman -S axel (Arch users) 8.curl  already intalled in all distros pacman -S curl (Arch users) 7.Flareget yaourt flareget (Arch users) 6. wget Already installed in All distros 5.Xdm (Xtreme download manager) yaourt -S xdman (Arch users) 4. uGet http://sh.st/1QB02 3.jDownloader yaourt -S jdownloader2 (Arch users) 2.Aria2 yaourt -S aria2 or yaourt -S aria2-fast 1.Persepolis (Best Download manager I have ever seen) git:-  http://sh.st/1QNeb zip : -  http://sh.st/1QNPd or "git clone  https://github.com/alireza-amirsamimi... " How to install Persepolis : -  https://youtu.be/__bS9EBc58s

How to Install best Download manager In Linux , Arch linux , Ubuntu , Li...

  Hey Guys i have heard lot about internet download manager in windows so for Linux i will show you how to install best download manager for Linux

Chat Application in Android , Python , Java and more

Real time chat Application in Android, python , java and more is coming comment want more features opensource code is coming soon.

Chat Application in python

Hey Guys i have made chat application in python let me know if some features i have to add to it i will then upload a code to it. thank you if you like +1 comment share

Real time chat app

Hey guys   after getting  29 subscribers in you tube some people have mailed me that how to make real time chat app in python . so if any one else want that mail me the features so that i can add that features . tutorial coming soon mail id :  ----      robokishan.blogspot@gmail.com subscribe to my channel for tutorials: coming soon tutorial : 1. real time chat app like whatsapp in python and java. 2. real time chat app in java 3. real time chat app in android 4. access led and motors and embedded system in raspberry pi 5. opensource music player made by me youtube channel : -       www.youtube.com/KishanJoshi_robokishan Thank you

Python Reads gmail

This is tutorial on how to read gmail emails with python programme : ----------------- #!/usr/bin/python __author__ = 'Robokishan' import email import imaplib import ctypes import getpass mail = imaplib.IMAP4_SSL('imap.gmail.com',993) unm = raw_input("insert Email : ") #pwd = raw_input("insert password : ") pwd = getpass.getpass("input : ") mail.login(unm,pwd) mail.select("INBOX") def loop():    mail.select("INBOX")    n=0    (retcode, messages) = mail.search(None, '(UNSEEN)')    if retcode == 'OK':             for num in messages[0].split() :          #print 'Processing '          n=n+1          print n          typ, data = mail.fetch(num,'(RFC822)')          for response_part in data:             if isinstance(response_part, tuple):                 original = email.message_from_string(response_part[1])                 print original['From']        

Raspberry pi vnc server (Tutorial 5)

In this video tutorial i will show you how to install vnc server to raspberry pi and vnc client to linux client this tutorial is for those user who cannot access to display directly hope it will help please comment and share !

Raspberry pi vnc server (Tutorial 5)

In this video tutorial i will show you how to install vnc server to raspberry pi and vnc client to linux client this tutorial is for those user who cannot access to display directly hope it will help please comment and share !

Raspberry pi ssh and tweaking

In this video learn how to connect to raspberry pi via ssh and tweaking some terminal stuff4 #robokishan

Linux how to make own linux command using python

this is post on how to make own linux command just like other linux odinary commands just like cd , cp , apt-get , pacman etc.  but we are using python because its easy to make thing happen in linux shell scripts but people have to also know how to done using other programming languages also. so we are going to step by step. 1. First create a programme like programme.py and enter this text print"python" 2. then save it . then open your terminal and type; and now we will make .pyc file for already compiled file of python python then  also type  import py_compile py_compile.compile( "programme.py " ) exit() and now copy in the folder in which you are there is a programme.pyc now copy this programme.pyc to /bin folder of linux and then type in terminal programme.pyc and then it will work ! and video tutorial is also available for this. so that you can learn perfectly. if you have any question