Skip to content

Instantly share code, notes, and snippets.

View dotfile-installer.sh
#! /bin/sh
#
# install.sh
# Copyright (C) 2019 lihao <haoliplus@gmail.com>
#
# Distributed under terms of the MIT license.
#
set -e
View capture-wechat.py
# update: 2019-5-11
import sys
import os
import time
from bs4 import BeautifulSoup
import requests
import pdfkit
def main(url):
output_path = ...
View DORN_KITTI
name: "DORN"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 385
input_dim: 513
layer {
View code-block-py.tex
%python
%=================Python
% Default fixed font does not support bold face
\DeclareFixedFont{\ttb}{T1}{txtt}{bx}{n}{12} % for bold
\DeclareFixedFont{\ttm}{T1}{txtt}{m}{n}{12} % for normal
% Custom colors
\usepackage{color}
\definecolor{deepblue}{rgb}{0,0,0.5}
\definecolor{deepred}{rgb}{0.6,0,0}
View code-block.tex
% Two package we need
% for the code block
\usepackage{listings}
% for the color
\usepackage{xcolor}
\begin{lstlisting}[language=C,keywordstyle=\color{blue!70},commentstyle=\color{red!50!green!50!blue!50},frame=single, rulesepcolor=\color{red!20!green!20!blue!20}]
int main(int argc, char ** argv)
\end{lstlisting}
View tfrecord2.py
# coding: utf-8
# In[13]:
import tensorflow as tf
import numpy as np
def make_record(item_list, rating_list, label):
# The object we return
View basic_framework.py
# -*- coding:utf-8 -*-
#! /usr/bin/env python
#################################################################################
# File Name : csv_reader.py
# Created By : Hao Li
# Creation Date : [2017-02-24 20:41]
# Last Modified : [2017-02-25 10:09]
# Description :
#################################################################################
@DarryO
DarryO / vim-2space-4space.txt
Created Jul 29, 2017
Convert 2space to 4space using vim
View vim-2space-4space.txt
:set ts=2 sts=2 noet
:retab!
:set ts=4 sts=4 et
:retab
@DarryO
DarryO / save_restore_param.py
Created Jan 15, 2017
lasagne save&restore params
View save_restore_param.py
# -*- coding: utf-8 -*-
#
import cPickle as pickle
import os
import lasagne
def read_model_data(model, filename):
@DarryO
DarryO / PurineModel.py
Created May 13, 2016
Using Purine model to predict
View PurineModel.py
#! /usr/bin/env python
#################################################################################
# File Name : PlateModel.py
# Created By : Hao Li
# Creation Date : [2016-04-19 16:27]
# Last Modified : [2016-04-23 15:17]
# Description :
#################################################################################
from pymongo import MongoClient
import os
You can’t perform that action at this time.