This file contains hidden or 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 tkinter import * | |
| from tkinter import messagebox,filedialog | |
| from nltk.tokenize import word_tokenize, sent_tokenize | |
| def prosesPilihanNew(): | |
| messagebox.showinfo("Informasi", "Cuma coba-coba") | |
| def prosesPilihanOpen(): | |
| nama = filedialog.askopenfile() | |
| messagebox.showinfo | |
| dataRead = str(nama.read()) |
This file contains hidden or 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
| ''' | |
| integral trapezioda | |
| Warteg Dust | |
| xsufyan@gmail.com | |
| ''' | |
| x = [0, 0.2, 0.4, 0.6, 0.8, 1.0] | |
| y = [2, 3, 6, 5, 4, 1] | |
| def trapezioda(x, y): | |
| def cekSelisih(x): |
This file contains hidden or 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
| void setup() { | |
| // put your setup code here, to run once: | |
| Serial.begin(9600); | |
| } | |
| void loop() { | |
| // put your main code here, to run repeatedly: | |
| Serial.println("Hello"); | |
| delay(100); | |
| } |
This file contains hidden or 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 serial | |
| arduino = serial.Serial('com4',9600) #contohnya ada di COM4 dan baudrate 9600 | |
| def doSomething(): | |
| data = int(arduino.readline()) | |
| print(data) | |
| try: | |
| while (True): |
This file contains hidden or 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
| #define LED 13 | |
| void setup() { | |
| // put your setup code here, to run once: | |
| pinMode(LED,OUTPUT); | |
| Serial.begin(9600); | |
| } | |
| void loop() { | |
| // put your main code here, to run repeatedly: |
This file contains hidden or 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 serial | |
| arduino = serial.Serial('com4',9600) | |
| def ledController(): | |
| cmd = input('type on/off/dc : ') | |
| cmd = str.lower(cmd) | |
| if(cmd == "on"): | |
| arduino.write('H'.encode()) | |
| print("Lampu Nyala") |
This file contains hidden or 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
| def string_splosion(data): | |
| for x in range(len(data)): | |
| print(data[:x+1],end="") | |
| string_splosion("lele") |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Check Javascript</title> | |
| </head> | |
| <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> | |
| <body> | |
| <input type="number" name="caps_id" id="caps_id" min="1"> | |
| </body> | |
| <script type="text/javascript"> |
This file contains hidden or 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
| /* | |
| Blink | |
| Turns on an LED on for one second, then off for one second, repeatedly. | |
| This example code is in the public domain. | |
| */ | |
| // Pin 13 has an LED connected on most Arduino boards. | |
| // give it a name: | |
| int led = 13; |
This file contains hidden or 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 sklearn.svm import SVC | |
| from sklearn.cluster import KMeans | |
| import random | |
| import numpy as np | |
| def createFeature(banyak_data): | |
| feature = [] | |
| for x in range(banyak_data): | |
| feature.append([random.randrange(50,98)]) | |
| feature = np.array(feature) |