Skip to content

Instantly share code, notes, and snippets.

@haoliplus
haoliplus / clash-sample.yaml
Created January 18, 2024 09:21
clash-sample
port: 7890
socks-port: 7891
redir-port: 7892
mixed-port: 7893
allow-lan: true
tcp-concurrent: true
unified-delay: false
mode: Rule
log-level: info
external-controller: ":9990"
#! /bin/sh
#
# install.sh
# Copyright (C) 2019 lihao <haoliplus@gmail.com>
#
# Distributed under terms of the MIT license.
#
set -e
# update: 2019-5-11
import sys
import os
import time
from bs4 import BeautifulSoup
import requests
import pdfkit
def main(url):
output_path = ...
name: "DORN"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 385
input_dim: 513
layer {
%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}
% 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}
# 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
@haoliplus
haoliplus / vim-2space-4space.txt
Created July 29, 2017 09:13
Convert 2space to 4space using vim
:set ts=2 sts=2 noet
:retab!
:set ts=4 sts=4 et
:retab
# -*- 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 :
#################################################################################
@haoliplus
haoliplus / save_restore_param.py
Created January 15, 2017 08:39
lasagne save&restore params
# -*- coding: utf-8 -*-
#
import cPickle as pickle
import os
import lasagne
def read_model_data(model, filename):