Skip to content

Instantly share code, notes, and snippets.

import RPi.GPIO as GPIO #Import GPIO library
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM) # programming the GPIO by BCM pin numbers
# set tigger and echo pins for the ultrasonic sensor
TRIG = 17
ECHO = 27

Google Summer of Code 2017: Final Report

by Manvendra Singh

Hey everyone! I'm Manvendra, a Google Summer of Code '17 student developer. This summer, I worked on Common Workflow Language Project which comes under OBF Org. This is a summary report on what I managed to do in the past three months.

My major deliverables were:

  • Adding Python 3 compatibility to CWL Tool, Schema Salad and CWL Test projects.
  • Improving mypy annotations and upgrading mypy dependency for CWL Tool and Schema Salad.
  • Reducing issue backlog and misc enhancements.
@manu-chroma
manu-chroma / gsoc-pres.md
Created August 25, 2017 11:23
Slides used by me for presentation on GSoC

--

GSoC 2017

--

About me

  • I'm Eklavya Sharma, a 3rd year CS student at BITS.
  • I participated in GSoC 2016 under Zulip.
@manu-chroma
manu-chroma / Unicode.md
Created July 18, 2017 15:04 — forked from gornostal/Unicode.md
Python 2.7. Unicode Errors Simply Explained

Python 2.7. Unicode Errors Simply Explained

I know I'm late with this article for about 5 years or so, but people are still using Python 2.x, so this subject is relevant I think.

Some facts first:

  • Unicode is an international encoding standard for use with different languages and scripts
  • In python-2.x, there are two types that deal with text.
    1. str is an 8-bit string.
  1. unicode is for strings of unicode code points.

Keybase proof

I hereby claim:

  • I am manu-chroma on github.
  • I am manuchroma (https://keybase.io/manuchroma) on keybase.
  • I have a public key whose fingerprint is 1BE5 4A82 E6E4 37EF 90D4 5C02 C490 AB91 1635 1C3C

To claim this, I am signing this object:

@manu-chroma
manu-chroma / cwltool failing test in py3.md
Last active June 19, 2017 19:36
tests/test_ext.py::TestListing::test_listing_deep
/home/manu/github/cwltool/venv3/bin/python3.5 /home/manu/Downloads/pycharm-2016.3.2/helpers/pydev/pydevd.py --multiproc --qt-support --client 127.0.0.1 --port 36690 --file /home/manu/github/cwltool/setup.py test
pydev debugger: process 19584 is connecting

Connected to pydev debugger (build 171.4163.6)
running pytest
Searching for mock>=2.0.0
Best match: mock 2.0.0
Processing mock-2.0.0-py3.5.egg
(zenodo) manu@hp:~/src/zenodo$ ./scripts/setup-assets.sh
/home/manu/Envs/zenodo/local/lib/python2.7/site-packages/dojson/contrib/to_marc21/model.py:22: UserWarning: MARC21 undo feature is experimental
  warnings.warn('MARC21 undo feature is experimental')
[2017-03-13 20:00:25,032] ERROR in app: Failed to initialize entry point: invenio_deposit_rest = invenio_deposit:InvenioDepositREST
Traceback (most recent call last):
  File "/home/manu/Envs/zenodo/bin/zenodo", line 11, in <module>
    load_entry_point('zenodo', 'console_scripts', 'zenodo')()
  File "/home/manu/Envs/zenodo/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
@manu-chroma
manu-chroma / pr.md
Created October 4, 2016 18:43 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@manu-chroma
manu-chroma / .gitconfig
Created September 24, 2016 17:21 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
@manu-chroma
manu-chroma / gist:4bc34ce39452cc47855aade121baca29
Created April 2, 2016 16:14 — forked from ryanuber/gist:9014174
Vagrant re-import box from files on local system

If you find that vagrant box list somehow does not contain a box you previously had, you can sometimes add the box back if you still have the sources for it in ~/.vagrant.d/boxes.

$ cd ~/.vagrant.d/boxes/precise64/0/virtualbox/
$ tar czf ~/precise64.box .
$ vagrant box add precise64 ~/precise64.box 
Downloading box from URL: file:/Users/ryanuber/precise64.box
Extracting box...te: 417M/s, Estimated time remaining: --:--:--)
Successfully added box 'precise64' with provider 'virtualbox'!