Skip to content

Instantly share code, notes, and snippets.

View iamjinlei0312's full-sized avatar
💭
I may be slow to respond.

Jinlei iamjinlei0312

💭
I may be slow to respond.
View GitHub Profile
@iamjinlei0312
iamjinlei0312 / falsehoods-programming-time-list.md
Created February 4, 2024 02:37 — forked from timvisee/falsehoods-programming-time-list.md
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@iamjinlei0312
iamjinlei0312 / hellchef.py
Last active July 24, 2020 02:30
Jinlei's assignment #1
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Describe :
# @Time : 2020/7/23 10:36
# @Author : Jinlei
import random
import argparse
import re
from PIL import Image
https://press.one/p/address/v?s=131436d874341dc7d8b6335d8d1e6dc3bae69cc82c71481505041b958cb9f82f2bf02ecd409f6182ee51534c681df5d16f0281c857a23102e3df3accce05d2390&h=a250985f2e5a039690d7ccb3c19917c4dc860b378ad467c43297bcdc67619dcf&a=e7e49f595bc96062c67483105edc87202315c5fb&f=P1&v=2
https://press.one/p/address/v?s=131436d874341dc7d8b6335d8d1e6dc3bae69cc82c71481505041b958cb9f82f2bf02ecd409f6182ee51534c681df5d16f0281c857a23102e3df3accce05d2390&h=a250985f2e5a039690d7ccb3c19917c4dc860b378ad467c43297bcdc67619dcf&a=e7e49f595bc96062c67483105edc87202315c5fb&f=P1&v=2
{"sig":"1fd3bb1c6be8cb821af8479199369023f106a64819412bf46753471f97e08a5e6c21446e7446c1ca07da6591cdef32623604b8b32391e33afb04f22e40012eb10","msghash":"5b6d609b913200469bcff597e7e4974588354f33d37e95a266217e3e22f422e4"}
@iamjinlei0312
iamjinlei0312 / min-char-rnn.py
Created July 9, 2017 13:34 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@iamjinlei0312
iamjinlei0312 / rnn-lstm.py
Created June 14, 2017 12:30 — forked from monikkinom/rnn-lstm.py
Tensorflow RNN-LSTM implementation to count number of set bits in a binary string
#Source code with the blog post at http://monik.in/a-noobs-guide-to-implementing-rnn-lstm-using-tensorflow/
import numpy as np
import random
from random import shuffle
import tensorflow as tf
# from tensorflow.models.rnn import rnn_cell
# from tensorflow.models.rnn import rnn
NUM_EXAMPLES = 10000