Skip to content

Instantly share code, notes, and snippets.

View lijiansong's full-sized avatar
🛠️
造轮子...

Json Lee lijiansong

🛠️
造轮子...
View GitHub Profile
@lijiansong
lijiansong / install-nodejs-ubuntu.txt
Created January 7, 2018 07:29
Install node.js v6.10.2 and npm 3.10.10 for Ubuntu 14.04 for Try Typescript for Codingforenterpreuners
### nvm installation
$ curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh
### run script
$ bash install_nvm.sh
$ source ~/.profile
$ nvm ls
$ nvm install 6.10.2
### set default node
@lijiansong
lijiansong / mgoExample.go
Created January 11, 2018 16:11 — forked from border/mgoExample.go
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
@lijiansong
lijiansong / main.go
Created January 14, 2018 02:09 — forked from chadlung/main.go
An example Go (golang) REST service that uses JWT (JSON Web Tokens) and Negroni http://www.giantflyingsaucer.com/blog/?p=5994
package main
// Generate RSA signing files via shell (adjust as needed):
//
// $ openssl genrsa -out app.rsa 1024
// $ openssl rsa -in app.rsa -pubout > app.rsa.pub
//
// Code borrowed and modified from the following sources:
// https://www.youtube.com/watch?v=dgJFeqeXVKw
// https://goo.gl/ofVjK4
@lijiansong
lijiansong / main.go
Created January 14, 2018 08:07 — forked from alyssaq/main.go
GET and POST golang API
/*
* Sample API with GET and POST endpoint.
* POST data is converted to string and saved in internal memory.
* GET endpoint returns all strings in an array.
*/
package main
import (
"encoding/json"
"flag"
@lijiansong
lijiansong / main.py
Created June 12, 2019 02:02 — forked from littlecodersh/main.py
Main script behind itchat robot
#coding=utf8
import itchat
# tuling plugin can be get here:
# https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling
from tuling import get_response
@itchat.msg_register('Text')
def text_reply(msg):
if u'作者' in msg['Text'] or u'主人' in msg['Text']:
return u'你可以在这里了解他:https://github.com/littlecodersh'
@lijiansong
lijiansong / license-badges.md
Created December 18, 2019 05:05 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

@lijiansong
lijiansong / TaskConcurrencyManifesto.md
Created December 18, 2019 05:07 — forked from lattner/TaskConcurrencyManifesto.md
Swift Concurrency Manifesto
@lijiansong
lijiansong / tmux-cheatsheet.markdown
Created February 1, 2020 13:52 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@lijiansong
lijiansong / TENSORFLOW_DEBUG.md
Created August 11, 2020 03:04 — forked from Mistobaan/TENSORFLOW_DEBUG.md
Tensorflow Internals Debugging Techniques

Machine Setup August 2016

Linux Ubuntu 2016.

  • 1080 GTX
  • SDK 8.0
  • CuDNN 5.1

ENABLE Core dumps

ulimit -c unlimited
"""TensorFlow 2.0 implementation of vanilla Autoencoder."""
import numpy as np
import tensorflow as tf
__author__ = "Abien Fred Agarap"
np.random.seed(1)
tf.random.set_seed(1)
batch_size = 128
epochs = 10