Don't add comments where they are not suppoed to be. For e.g. -
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
public class Sample | |
{ | |
public static void main(String[] args) | |
{ | |
System.out.println("Welcome to Java"); | |
} | |
} |
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
public class Sample | |
{ | |
public static void main(String[] args) | |
{ | |
System.out.println("Welcome to Java"); | |
} | |
} |
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 pickle | |
from random import randint | |
from datetime import datetime | |
# LINES 6-18 ARE USED TO PICKLE SOMETHING TO DISK | |
present = datetime.now() | |
data_dict = { | |
'voltage': randint(1,5), | |
'current': randint(1,5), |
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
int led1 = D0; | |
int led2 = D3; | |
int led3 = D7; | |
int led1_status = 0; | |
int led2_status = 0; | |
int led3_status = 0; | |
void setup () { | |
pinMode(led1, OUTPUT); |
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
""" | |
This program is designed to create | |
and animate a simple loading animation. | |
""" | |
from sys import stdout as terminal | |
from time import sleep | |
from itertools import cycle | |
from threading import Thread |
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
''' | |
Copyright C RudratheGreat | |
This program records audio from its surroundings | |
displays it live on several plots showing the | |
spectrum and waveform of the data. It is then | |
processed and saved as both a spectrogram and | |
audio which can then be played/looked back at | |
for further analysis. |
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 numpy as np | |
from scipy.io.wavfile import write | |
sps = 44100 # Samples per Second | |
freq = 440 # Frequency is Hz | |
time = 5 # Duration of the audio in seconds | |
amp = 0.3 | |
# Create the Audio |
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
''' | |
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 |
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
from random import randint | |
for x in range(10): | |
print random() | |
print('=============================') | |
z = ['ciao', 'piccolo', 'bambino', 'sono', 'qua', 'io', 'in verita'] |