Skip to content

Instantly share code, notes, and snippets.

View debugger22's full-sized avatar

Sudhanshu Mishra debugger22

View GitHub Profile
@debugger22
debugger22 / nbitripplecounter_example.py
Last active August 29, 2015 13:57
N Bit Ripple Counter Example
from __future__ import print_function
from BinPy.tools import Clock
from BinPy.Sequential.counters import NBitRippleCounter
from BinPy.Gates import Connector
toggle = Connector(1)
# Initialize the clock with leading edge = 1 and frequency = 1000Hz
clock = Clock(init_state=1, frequency=1000)
clock.start() #Start the clock
@debugger22
debugger22 / 4bitripplecounter_output.txt
Last active August 29, 2015 13:57
4 Bit Ripple Counter Output
INITIAL STATE
[0, 0, 0, 0]
TRIGGERING THE COUNTER SEQUENTIALLY 2^4 + 1 times
[0, 0, 0, 0]
[0, 0, 0, 1]
[0, 0, 1, 0]
[0, 0, 1, 1]
[0, 1, 0, 0]
[0, 1, 0, 1]
[0, 1, 1, 0]
@debugger22
debugger22 / NBitRippleCounter.py
Created March 13, 2014 17:02
NBitRippleCounter Code
class NBitRippleCounter(Counter):
"""
An N-Bit Ripple Counter
"""
def __init__(
self,
bits,
clock_connector,
@debugger22
debugger22 / 0_reuse_code.js
Created May 9, 2014 15:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@debugger22
debugger22 / sympy_pep8_errors.txt
Created May 29, 2014 19:36
SymPy PEP8 Errors
This file has been truncated, but you can view the full file.
This is a list of errors encountered by PEP8 checker in sympy after ignoring E501, E502, E121, E122, E124, E123, E125, E126, E127, E128, E129, E131, E262, E265 and E226.
./setup.py:107:1: E302 expected 2 blank lines, found 1
./setup.py:306:22: E201 whitespace after '{'
./setup.py:306:63: E202 whitespace before '}'
./examples/galgebra/eval_check.py:11:1: E302 expected 2 blank lines, found 1
./examples/galgebra/exp_check.py:9:1: E302 expected 2 blank lines, found 1
./examples/galgebra/mv_setup_options.py:9:1: E302 expected 2 blank lines, found 1
./examples/galgebra/mv_setup_options.py:31:1: E302 expected 2 blank lines, found 1
./examples/galgebra/mv_setup_options.py:34:1: E302 expected 2 blank lines, found 1
@debugger22
debugger22 / sympy_pep8_errors.txt
Last active August 29, 2015 14:01
SymPy PEP8 Errors
This is a list of errors encountered by PEP8 checker in sympy after ignoring E501, E502, E121,
E122, E124, E123, E125, E126, E127, E128, E129, E131, E262, E265 and E226.
./setup.py:107:1: E302 expected 2 blank lines, found 1
./setup.py:306:22: E201 whitespace after '{'
./setup.py:306:63: E202 whitespace before '}'
./examples/galgebra/eval_check.py:11:1: E302 expected 2 blank lines, found 1
./examples/galgebra/exp_check.py:9:1: E302 expected 2 blank lines, found 1
./examples/galgebra/mv_setup_options.py:9:1: E302 expected 2 blank lines, found 1
./examples/galgebra/mv_setup_options.py:31:1: E302 expected 2 blank lines, found 1
@debugger22
debugger22 / sympy_optics_refs.txt
Last active August 29, 2015 14:02
Sympy optics: references
Waves: http://www.ece.rice.edu/~daniel/262/pdf/lecture02.pdf
http://www.ece.rice.edu/~daniel/262/pdf/lecture03.pdf
http://www.ma.utexas.edu/users/uhlen/solitons/notes.pdf
@debugger22
debugger22 / gist:2891cde42448fe990d49
Created July 25, 2014 17:50
SymPy + BinPy! Voila!
In [21]: from BinPy import Connector
In [22]: from sympy import *
In [23]: from sympy.abc import x, y
In [24]: conn = Connector(Xor(True, x, y))
In [25]: conn
Out[25]: Not(Xor(x, y))
@debugger22
debugger22 / intro_to_python
Created August 21, 2014 23:07
Lecture 1 for CTE Python
{
"metadata": {
"kernelspec": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"display_name": "IPython (Python 2)",
"language": "python",
"name": "python2"
@debugger22
debugger22 / gsoc14_patch.diff
Last active August 29, 2015 14:05
My patch of work done in SymPy from 19 May 2014 to 17 Auhust 2014
commit 9bff894c5adff98632c6982d262910f1de49c45d
Author: Sudhanshu Mishra <mrsud94@gmail.com>
Date: Tue Aug 12 09:49:56 2014 +0530
Do not escape raw string literals
diff --git a/sympy/concrete/summations.py b/sympy/concrete/summations.py
index 570ba23..e90b88c 100644
--- a/sympy/concrete/summations.py
+++ b/sympy/concrete/summations.py