Maximum Positive Signed 32-bit Integer: (2^31) - 1 = 2,147,483,647
Maximum Positive Signed 64-bit Integer: (2^63) - 1 = 9,223,372,036,854,775,807
Speed of Light: 299,792,458 m/s
| public static void tryToWin(int num) { | |
| num++; | |
| if (num >= 6) { | |
| System.out.print("You're a winner"); | |
| } | |
| System.out.print("You lose"); | |
| } |
| /** | |
| * A bicycle consists of a chain assembly, a handle assembly, and a frame. | |
| * This class can be used to simulate a bicycle. | |
| */ | |
| public class Bicycle { | |
| private BrakeAssembly brakeAssembly; | |
| private ChainAssembly chainAssembly; | |
| private HandleAssembly handleAssembly; | |
| /** |
| import speech_recognition as sr | |
| from pydub import AudioSegment | |
| import os | |
| AudioSegment.converter = r"C:\Users\Jeremy Grifski\AppData\Roaming\JetBrains\PyCharmCE2020.1\scratches\ffmpeg.exe" | |
| r = sr.Recognizer() | |
| for i, filename in enumerate(os.listdir('audio')): | |
| sound = AudioSegment.from_mp3(f'audio/{filename}') | |
| sound.export(f"dump/{filename[:-4]}.wav", format="wav") |
| from PIL import Image | |
| import numpy | |
| def color_diff(color1, color2): | |
| return numpy.sum((color1 - color2) ** 2) ** 1/2 | |
| def hsv(rgb): | |
| hue = numpy.array(rgb) / 255 | |
| value_index = numpy.argmax(hue) | |
| value = hue[value_index] |