This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@author: TheRealMentor | |
@date: 28/06/2019 | |
''' | |
import math | |
def sieve(A): | |
if A < 2: | |
return [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@author: TheRealMentor | |
@date: 28/06/2019 | |
''' | |
import math | |
def allFactors(A): | |
res = [] | |
if A == 0 or A == 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@author: TheRealMentor | |
@date: 28/06/2019 | |
''' | |
import math | |
def isPrime(A): | |
#Check if A = 1 | |
if A == 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Time.h> | |
const int LEDpins[] = {9,8,7,6,5,4,3,2}; | |
int rows= 8; | |
const int charHeight = 8; | |
const int charWidth = 5; | |
const unsigned char font[95][5] = { | |
{0x00,0x00,0x00,0x00,0x00}, // 0x20 32 | |
{0x00,0x00,0x6f,0x00,0x00}, // ! 0x21 33 | |
{0x00,0x07,0x00,0x07,0x00}, // " 0x22 34 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;======================== | |
;File: decade_counter.asm | |
;Author: TheRealMentor | |
;Created on: 10/04/17 | |
;======================== | |
;======================================== | |
;INCLUDING HEADER FILE FOR Chip ATmega328P | |
;======================================== | |
.include "/usr/share/avra/m328Pdef.inc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;======================== | |
;File: circle.asm | |
;Author: TheRealMentor | |
;Created on: 07/04/17 | |
;======================== | |
;======================================== | |
;INCLUDING HEADER FILE FOR Chip ATmega328P | |
;======================================== | |
.include "/usr/share/avra/m328Pdef.inc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyaudio | |
import wave | |
#Defining Chunk | |
chunk = 1024 | |
#Female voice, for male voice file_name = 'brian.wav' | |
file_name = 'amy.wav' | |
#Opening file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#importing the packages | |
import numpy as np | |
import matplotlib.pyplot as plt | |
#Defining the delta function | |
def delta(n): | |
if n == 0: | |
return 1 | |
else: | |
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Importing packages | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from array import * | |
import math as math | |
import cmath as cm | |
#Defining arrays | |
f=array('f') |