Skip to content

Instantly share code, notes, and snippets.

View parthpower's full-sized avatar
:shipit:

Parth Parikh parthpower

:shipit:
View GitHub Profile
@parthpower
parthpower / RPiGPIOServer.py
Last active February 18, 2016 13:03
Simple Raspberry Pi HTTP GPIO Control
__author__ = 'Parth'
import BaseHTTPServer
import urlparse
import RPi.GPIO as GPIO
PORT = 8000
class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
args = {}
@parthpower
parthpower / A.py
Last active March 9, 2016 20:29
TCS CodeVita Solutions I don't remember problem statements:p
#Copyright (c) 2016 Parth V. Parikh
#Freely distributable under MIT lincese.
__author__ = 'Parth'
def alternate(num, target):
if int(num)<3:
return False
found = False
occ = []