Skip to content

Instantly share code, notes, and snippets.

@RJ722
RJ722 / basic_server.js
Created January 16, 2017 16:47 — forked from iamareebjamal/basic_server.js
Basic Node Server to capture images and display in multipart using boundary
/* Node Server
* Captures image and displays them using multipart and boundary headers
* 16th Jan 2016
* Author : Areeb Jamal, Rahul Jha
*/
var fs = require('fs'),
http = require('http'),
express = require('express'),
NodeWebcam = require("node-webcam");
@RJ722
RJ722 / livecam.js
Last active January 19, 2017 19:44
Enables live streaming of webcam on a webserver which can furthur be harnessed for access over LAN
// This would enable the user to stream webcam's output to a URL which could be accessed over a network
// Major code from: https://github.com/sepehr-laal/livecam
var ip = '127.0.0.1'; // Please Replace with your IP, otherwise you would not be able to serve it over on network!
const LiveCam = require('livecam');
const webcam_server = new LiveCam
({
// address and port of the webcam UI
'ui_addr' : ip,
@RJ722
RJ722 / livecam.js
Last active January 19, 2017 20:00
changes in livecam module for windows support
// Original File: https://github.com/sepehr-laal/livecam/blob/master/livecam.js
// Revised, because it was not working on widows, so I just wanted the author to know wethet it was me or something else is broken.
/*!
* @class GstLaunch
* @brief Class that encapsulates "gst-launch" executable.
*/
function GstLaunch() {
const gst_launch_executable = 'gst-launch-1.0';
from itertools import chain
import unittest
class AspectInstanceTest(unittest.TestCase):
def test_tastes(
self, SubAspect, SubAspect_tastes, SubAspect_taste_values
):
===================================================================================== test session starts ======================================================================================
platform linux -- Python 3.5.2, pytest-3.0.6, py-1.4.32, pluggy-0.4.0
rootdir: /home/im_ishan/Desktop/Rahul/coala, inifile: setup.cfg
plugins: xdist-1.15.0, timeout-1.2.0, mock-1.5.0, env-0.6.0, cov-2.4.0
timeout: 35.0s method: signal
collected 613 items
coalib/bearlib/__init__.py ..
coalib/bearlib/abstractions/Linter.py .
coalib/bearlib/aspects/__init__.py .
@RJ722
RJ722 / gsoc_plan.md
Last active March 21, 2017 15:28
This file contaics all the gsoc projects I want to contribute to along with any reviews and notes

Potential Organisations

Organisations Notes
Coala Beginner friendly
Zenodo
Ceph           Can also work with outreachy, so pretty centralized for me
Cadasta         Outreachy Page link
Open Astronomy Ideas Page - Look into Jupyter widgets for Astronomy
from RPi.GPIO import *
import time
setmode(BCM)
setwarnings(False)
# Physical Pins:
low_pins =
# Physocal Pins:
@RJ722
RJ722 / acquire_source.py
Created June 1, 2017 19:40
Source range acquisition from a given node
st='''import things\nclass foo:\n #There are comments\n print "hello" \n\ndef bla():\n a = 1\n b = 2\n c= a+b\n print c'''
import ast
tree = ast.parse(st)
for entry in tree.body:
if isinstance(entry, ast.FunctionDef):
lastBody = entry.body[-1]
while isinstance (lastBody,(ast.For,ast.While,ast.If)):
lastBody = lastBody.Body[-1]
Bootstrapping bodhi...
Trying 'rm -rf bodhi-python2.7'
Trying 'virtualenv --no-site-packages -p /usr/bin/python2.7 bodhi-python2.7'
New python executable in /Users/rahuljha/Documents/bodhi/bodhi-python2.7/bin/python
Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/bin/python2.7
running develop
running egg_info
writing bodhi.egg-info/PKG-INFO
writing top-level names to bodhi.egg-info/top_level.txt
writing dependency_links to bodhi.egg-info/dependency_links.txt
reading manifest file 'bodhi.egg-info/SOURCES.txt'
reading manifest template 'BODHI_MANIFEST.in'
writing manifest file 'bodhi.egg-info/SOURCES.txt'
running build_ext
Creating /Users/rahuljha/Documents/bodhi/bodhi-python2.7/lib/python2.7/site-packages/bodhi.egg-link (link to .)