Skip to content

Instantly share code, notes, and snippets.

View jitvimol's full-sized avatar

Jitvimol jitvimol

View GitHub Profile
{
"title": "Atomic Habits",
"author": "James Clear",
"year_published": 2018,
"genres": ["Self-help", "Psychology", "Business"],
"summary": "Atomic Habits offers a proven framework for improving every day. James Clear, one of the world's leading experts on habit formation, reveals practical strategies that will teach you exactly how to form good habits, break bad ones, and master the tiny behaviors that lead to remarkable results.",
"publisher": "Avery",
"isbn": "978-0735211292",
"pages": 320,
"language": "English",
@jitvimol
jitvimol / fix_locale
Last active March 8, 2024 08:31
fix NotImplementedError: A UTF-8 locale is required. Got ANSI_X3.4-1968 #colab #python
import locale
# check exist setting
print(locale.getpreferredencoding())
def getpreferredencoding(do_setlocale = True):
return "UTF-8"file:///D:/Program%20Files/Lepton/resources/app.asar/index.html#
locale.getpreferredencoding = getpreferredencoding
@jitvimol
jitvimol / keras_example.py
Last active August 13, 2022 17:54 — forked from new5558/keras_example.py
[Singularity Tutorial] #python
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()