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 / Dice_Simplified.py
Last active November 23, 2018 10:16
Simplified Version of Dice.py
''' This program only works on the
BBC Microbit. If you would like to view
Dice.py, then just use the link below -
https://gist.github.com/rudrathegreat/ed7db24af713ae8d42444bc0816d19c6
'''
from microbit import *
import random
@rudrathegreat
rudrathegreat / Shutdown.bat
Created November 24, 2018 04:28
Program to help shutdown your Linux Machine
echo 'Do you want to shutdown the Raspberry Pi?'
read $variable
if [[$variable = 'Y']]; then
echo 'As you wish'
echo 'Goodbye!'
sudo shutdown -h now
elif [[$variable = 'N']]; then
echo 'Ok. As you wish'
@rudrathegreat
rudrathegreat / Fibonacci-Microbit.py
Created November 24, 2018 04:35
Compute Fibonacci Sequence With the BBC MicroBit
'''
This program will not display each individual number on the
microbit display. Instead, there is a different program to
show those numbers. This program needs a BBC Microbit to run.
The number of numbers my BBC MicroBit was able of calculate
in the Fibonacci Sequence was 9000 before it came across a
memory error, running out of memory to calculate any more.
'''
@rudrathegreat
rudrathegreat / Fibonacci-Evidence.py
Created November 24, 2018 04:41
A Program Designed to Prove That the BBC Microbit Is Indeed Computing the Fibonacci Sequence
'''
This program is designed to porve that
the BBC Microbit is actually calculating the
Fibonacci Sequence. The code for computing
Fibonacci Sequence up to a specific number
of numbers inthe sequence can be found using
the following link -
https://gist.github.com/rudrathegreat/bfafd7af975f0737458c8d63c0eda84d
@rudrathegreat
rudrathegreat / Calculator.py
Last active November 24, 2018 05:54
A Simple Calculator Using Python
import math
import numpy as np
class Calculator(object):
def __init__(self):
pass
def add(self, num1, num2):
try:
@rudrathegreat
rudrathegreat / Dice.py
Last active November 24, 2018 05:57
Dice Program For BBC Microbit
'''
This code is only meant to be run on the
BBC Microbit because this program uses
a slight deviation of the Original Python.
The language which is being use here is
MicroPython, which is designed for small
microprocessors and microcomputers.
'''
from microbit import *
@rudrathegreat
rudrathegreat / PyCalculator.py
Last active November 25, 2018 00:21
Simple Calculator with Functionality to Use Previous Answer
'''
This class is designed to be used for mathematical
calculations only.
This program has the functionality to remember the
previous answer which you needed to calculate.
This code was orginally proposed in this issue,
link below -
https://github.com/AceLewis/my_first_calculator.py/issues/24
@rudrathegreat
rudrathegreat / RPS.py
Created November 25, 2018 00:29
Rock Paper Scissors on the BBC Microbit
'''
This program is orginally designed for
uses when you feel bored and only runs
on the BBC Microbit.
The code is orginially from the following
repository, link below -
https://github.com/rudrathegreat/Microbit-Projects
@rudrathegreat
rudrathegreat / Menubar.html
Created November 25, 2018 00:45
Try for Yourself - Requires Jinja
<!DOCTYPE html>
<html lang="en">
<head>
{% block page %}
{% load staticfiles %}
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Rajdhani" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Questrial" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Gothic+A1" rel="stylesheet">
<title>Title</title>