Skip to content

Instantly share code, notes, and snippets.

View new5558's full-sized avatar

Norapat Buppodom new5558

  • Bangkok, Thailand
View GitHub Profile
@new5558
new5558 / keras_example.py
Last active March 14, 2022 13:43
Singularity Tutorial
import numpy as np
from tensorflow import keras
from tensorflow.keras import layers
# Model / data parameters
num_classes = 10
input_shape = (28, 28, 1)
# the data, split between train and test sets
# (x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()
investment_money = float(input()) #k
remaining_life = int(input()) #n
withdraw_money = 0.09*investment_money #w
my_mean = float(input())/100
my_std = float(input())/100
import numpy as np
loss_time = 0
CALCULATIONS = 10000
for i in range(CALCULATIONS):
x = np.random.normal(loc=my_mean, scale=my_std, size=remaining_life)
@new5558
new5558 / Anagram.java
Last active May 12, 2019 20:50
Anagram Workhard Edition
import java.util.Arrays;
public class Anagram {
public static void main(String[] args) {
System.out.println(Arrays.toString(subAnagram("dirty", 1)));
}
public static String[] subAnagram(String input, int n) {
int inputLength = input.length();
String[][] result = new String[inputLength][];
<!DOCTYPE html>
<html>
<head>
<title>Search</title>
</head>
<body>
<img src="https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Teaser/google-search-t.jpg" width="300" height="150">
<form method="GET">
<strong>type your search message here</strong>
<input type="text" name="q" maxlength="2083" required="true"><br>
@new5558
new5558 / lab8_task3.ino
Last active October 17, 2018 17:02
lab8
// Another bug fixed
// final2
#include <M5Stack.h>
// for next 1 second timeout
uint32_t targetTime = 0;
uint32_t tempTime = 1000;
uint8_t hh = 0, mm = 0, ss = 1; // Get H, M, S from compile time
#include <M5Stack.h>
#define TFT_GREY 0x5AEB
uint32_t targetTime = 0; // for next 1 second timeout
static uint8_t conv2d(const char* p); // Forward declaration needed for IDE 1.6.x
uint8_t hh = conv2d(__TIME__), mm = conv2d(__TIME__ + 3), ss = conv2d(__TIME__ + 6); // Get H, M, S from compile time