Skip to content

Instantly share code, notes, and snippets.

View rudrathegreat's full-sized avatar
🎥
Running a YouTube Channel!

Rudra Sekhri rudrathegreat

🎥
Running a YouTube Channel!
View GitHub Profile
@rudrathegreat
rudrathegreat / CONTRIBUTING.md
Created October 21, 2020 03:40 — forked from briandk/CONTRIBUTING.md
A basic template for contributing guidelines that I adapted from Facebook's open source guidelines

Contributing to Transcriptase

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

  • Reporting a bug
  • Discussing the current state of the code
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

We Develop with Github

@rudrathegreat
rudrathegreat / Dice-Python-3.py
Last active January 1, 2019 13:50 — forked from davidlivingrooms/test.py
Dice Program for Python 3
'''
This program is designed for the original Python 3
and not for Python 2. Check out the original program
which is designed for Python 2.
Also check out my dice program fr the BBC MicroBit
here -
https://gist.github.com/rudrathegreat/f42e1ca01c81ea9973e4653b60c16085
https://gist.github.com/rudrathegreat/ed7db24af713ae8d42444bc0816d19c6
@rudrathegreat
rudrathegreat / Snipplr-29455.py
Last active December 28, 2018 09:28 — forked from lambdamusic/Snipplr-29455.py
Random Program for the Python 3 Random Function
from random import randint
for x in range(10):
print random()
print('=============================')
z = ['ciao', 'piccolo', 'bambino', 'sono', 'qua', 'io', 'in verita']
@rudrathegreat
rudrathegreat / Snipplr-25250.py
Last active December 28, 2018 09:19 — forked from lambdamusic/Snipplr-25250.py
Error Handling in Python - Python 3
## Error handling in Python is done through the use of exceptions that are caught in try blocks and handled in except blocks. If an error is encountered, a TRy block code execution is stopped and transferred down to the except block, as shown in the following syntax:
data = 'Hello and welcome to Earth (if you are an alien)'
try:
f = open("test.txt")
except IOError:
print("Cannot open file.")
## In addition to using an except block after the try block, you can also use the finally block. The code in the finally block will be executed regardless of whether an exception occurs.