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
pisang-train/ | |
pisang-kepok/ | |
kepok-pisang(1).jpg | |
… | |
kepok-manis(45).jpg | |
pisang-tanduk/ | |
pisang-tanduk(1).jpg | |
… | |
tanduk(45).jpg | |
pisang-test/ |
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 keras.applications import densenet | |
from keras.preprocessing import image | |
from keras.applications.densenet import preprocess_input, decode_predictions | |
import numpy as np | |
from keras.layers import Dense, GlobalAveragePooling2D | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras.models import Model | |
from keras.optimizers import Adam | |
import os |
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 selenium import webdriver | |
# path_to_chromedriver = '/home/tbmreza/development/chromedriver_linux64/chromedriver' | |
browser = webdriver.Chrome('/home/tbmreza/development/chromedriver_linux64/ | |
chromedriver') | |
browser.get("https://www.google.com/") |
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
# https://www.youtube.com/watch?v=5SlYTF2ovGg&list=PLNtxQuOxJ0p29Ry5jp3AiOJpk0UiSSlts&index=6 | |
import pygame | |
# Setup | |
pygame.init() | |
clock = pygame.time.Clock() | |
screenSize = (500,500) | |
screen = pygame.display.set_mode(screenSize) | |
# Player data |
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
# Modified from a stackoverflow answer. https://stackoverflow.com/a/52147997 | |
import imgaug as ia | |
from imgaug import augmenters as iaa | |
import numpy as np | |
import imageio | |
import os | |
number_of_output = 4 | |
result_folder = 'imgaug/' |
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 collections import namedtuple | |
import re | |
''' TXT structure sample: | |
"PROVINSI"(489,185),(652,185),(652,219),(489,219) | |
"JAWA"(658,185),(747,185),(747,219),(658,219) | |
"BARAT"(758,185),(866,185),(866,219),(758,219) | |
"KABUPATEN"(508,220),(704,220),(704,252),(508,252) | |
"BEKASI"(724,220),(848,220),(848,252),(724,252) |
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
<script> | |
export let display; | |
import ModalInternals from "./ModalInternals.svelte"; | |
let closeModal = false; | |
const handleClose = () => { | |
display = false; | |
}; | |
</script> |
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
export function objectCopy(obj) { | |
if (typeof obj === "object") { | |
return JSON.parse(JSON.stringify(obj)); | |
} else { | |
console.log(obj); | |
} | |
} |
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
-- https://www.ma.imperial.ac.uk/~buzzard/xena/natural_number_game/ | |
-- 1. TUTORIAL | |
-- world=1&level=1 "using refl" | |
example : forall x : Nat, x = x := by | |
intro x | |
exact Eq.refl x | |
-- world=1&level=2 "using rw" | |
example |
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
func Deref(s *string) string { | |
if s != nil { | |
return *s | |
} | |
return "" | |
} | |
func ParseInt64OrDefault(s string) int64 { | |
n, strconvErr := strconv.ParseInt(s, 10, 64) | |
if strconvErr != nil { |
OlderNewer