Skip to content

Instantly share code, notes, and snippets.

View liyzcj's full-sized avatar
🏠
Working from home

Alex Li liyzcj

🏠
Working from home
View GitHub Profile
@liyzcj
liyzcj / import_savedmodel_to_tensorboard.py
Created March 16, 2023 03:47 — forked from yinguobing/import_savedmodel_to_tensorboard.py
Import TensorFlow SavedModel to TensorBoard
"""Imports a SavedModel as a graph in Tensorboard."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import sys
from tensorflow.core.framework import graph_pb2
@liyzcj
liyzcj / timer_race.go
Last active July 5, 2022 16:22
There is a race condition when you want to reuse Timer instance with Reset method.
package main
import "time"
func main() {
for i := 0; i < 10000; i++ {
timer := time.NewTimer(time.Microsecond)
time.Sleep(time.Microsecond)
flat := false
@liyzcj
liyzcj / sun_checks.xml
Last active July 29, 2021 17:06
My checkStyle
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration that checks the sun coding conventions from:
- the Java Language Specification at
@liyzcj
liyzcj / checkstyle.xml
Created July 29, 2021 16:21 — forked from mxm/checkstyle.xml
Google Java Checkstyle modified using tabs (mapped to 2 spaces) and 120 line length
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration that checks the Google coding conventions from:
- Google Java Style
https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html
Checkstyle is very configurable. Be sure to read the documentation at
@liyzcj
liyzcj / webCrawler.go
Last active January 31, 2020 18:56
A Tour of Go: Exercise: Web Crawler
package main
import (
"fmt"
"sync"
// "time"
)
const fetching = "fetching"