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
| <?php | |
| $data = [ | |
| 0 => [ | |
| 'nama_file' = 'wajah1.png', | |
| 'id' = 'orang1', | |
| 'bit-depth' = 8, | |
| ], | |
| 1 => [ | |
| 'nama_file' = 'wajah2.png', | |
| 'id' = 'orang2', |
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 library | |
| import cv2 | |
| # path gambar | |
| path_img = "Image/baboon.png" | |
| # load image | |
| img_asli = cv2.imread(path_img) | |
| cv2.imshow("asli",img_asli) | |
| cv2.waitKey(0) |
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
| ''' | |
| code for : | |
| simpson 1/3 for seach area from list [[x,y]] | |
| using : | |
| python 3.6 | |
| sufyan97 | |
| ''' | |
| ''' | |
| case for single: | |
| list = [[3,10],[5,10],[7,9]] |
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
| ''' | |
| Stegano Code | |
| with | |
| library stegano | |
| sufyan97 | |
| install stegano | |
| pip install stegano | |
| ''' | |
| #import lsb method | |
| from stegano import lsb |
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
| ''' | |
| code for load and show image | |
| with : | |
| opencv | |
| by aglissae | |
| ''' | |
| # import library | |
| import cv2 |
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
| ''' | |
| code by : Sufyan Saori (xsufyan@gmail.com) | |
| soal1: | |
| hitung hasil dari luas nilai x dan y dari tabel berikut dengan xawal=0 dan xakhir=6 dan h=2 | |
| tabel_awal = [[3,10],[5,10],[7,8],[9,8],[11,8],[13,5],[15,3]] | |
| tabel_tengah = [[4,10],[6,7],[8,8],[10,8],[12,5],[14,3]] | |
| format list [[x1,y1],...,[xn,yn]] | |
| ''' | |
| def hitung_luas_mode_titik_tengah(tabel_nilai,h): |
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
| ''' | |
| @author : sufyan saori (xsufyan@gmail.com) | |
| code ini untuk menyelesaikan soal yang ada pada situs : https://aimprof08.wordpress.com/2012/09/09/aturan-titik-tengah-midpoint-rule/ | |
| ''' | |
| import math | |
| def fungsi_soal(x): | |
| # ubah fungsi kembalian (return) sesuai dengan keinginan soal | |
| return 2+math.cos(2*(x**0.5)) |
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 PIL import Image | |
| from pyzbar.pyzbar import decode | |
| data = decode(Image.open('hasil.png')) | |
| print(data[0][0].decode('UTF-8')) |
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 pyqrcode | |
| code = pyqrcode.create("lakad matatag2") | |
| code.png("hasil.png",scale=6) | |
| code.show() |
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) |