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 operator import itemgetter, attrgetter | |
w = [3,4,1,7,6,8,9] | |
p = [4,5,2,5,5,8,11] | |
item = [[3,4],[4,5],[1,2],[7,5],[6,5],[8,8],[9,11]] | |
i=0 | |
while i<len(item): | |
hasil = item[i][1]/item[i][0] | |
item[i].append(hasil) | |
i += 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
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import style | |
style.use("ggplot") | |
keuntungan = [7000000, 10000000, 7500000, 5000000, 17000000, 7000000, 14000000] | |
laba = [3000000, 4000000, 2000000, 1200000, 5000000, 2000000, 5000000] | |
def linearRegresion(data): | |
''' | |
indeks[0] -> response variable -> x |
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
private void button1_Click(object sender, EventArgs e) | |
{ | |
Bitmap bmp = new Bitmap(pictureBox1.Image); | |
Bitmap bmp2 = new Bitmap(pictureBox1.Image); | |
int r, g, b; | |
Color c; | |
int val = (int)Convert.ToInt16(textBox1.Text); | |
Cursor = Cursors.WaitCursor; | |
for(int i=0; i < bmp.Width; i++) | |
{ |
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
/*Sufyan Saori | |
xsufyan@gmail.com | |
Log Data Moisture Sensor V.0.001*/ | |
#include <TimeLib.h> | |
#define PIN1 A0 | |
#define PIN2 A1 | |
#define PIN3 A2 | |
#define PIN4 A3 |
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
''' | |
Source Code For Make Graph from data sensor | |
xsufyan@gmail.com / github.com/lol97 | |
''' | |
import matplotlib.pyplot as plt | |
import numpy as np | |
time,s1,s2,s3,t,ku,ic = np.loadtxt('hasil1.1.txt',dtype='str',delimiter=';',unpack=True) | |
s1 = s1.astype(np.int) | |
s2 = s2.astype(np.int) |
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
void setup() | |
{ | |
Serial.begin(9600); | |
Serial.println("Check Arduino with Sublime"); | |
delay(1000); | |
} | |
int i = 0; | |
void loop() | |
{ |
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
''' | |
Trapezioda Integral | |
Sufyan Saori | |
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): |
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
Show hidden characters
{ | |
"shell": true, | |
"cmd": ["fpc", "${file_path}/${file_base_name}", "&&", "start", "cmd", "/c", "$file_base_name.exe", "&", "pause"], | |
"selector": "source.pascal", | |
"variants": [ | |
{ | |
"cmd": ["start", "cmd", "/c", "$file_base_name.exe & pause"], | |
"name": "Run", | |
"shell": true | |
}, |
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
def linearSeach(data,key): | |
for i in range(len(data)): | |
if data[i] == key: | |
return i | |
return -1 | |
def makeList(lenData): | |
data = [] | |
for x in range(lenData): | |
lol = int(input()) |
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 <I2Cdev.h> | |
#include <MPU6050.h> | |
#include <Wire.h> | |
MPU6050 gy_521; | |
int16_t ax, ay, az; | |
int16_t gx, gy, gz; | |
int ACCX,ACCY; | |
int GYRX,GYRY,GYRZ,sensitif; |
OlderNewer