This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# readRecordNew.tcl | |
# ----------------------------------------------------------------------------- | |
# | |
# Written by: fmk | |
# Date: July, 2010 | |
# | |
# Modified by: wnduan (mostly based on fmk version) | |
# Date: Apr 25, 2018 | |
# | |
# Description: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# ~/Nutstore/matplotlib-notes/notebook/09 | |
# | |
# version: 0.1 | |
import numpy as np | |
from matplotlib import colors, cm | |
import matplotlib.pyplot as plt | |
fig = plt.figure(figsize=(5,3)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This script will list sizes of different types of data on a certain platform. */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
#include <float.h> | |
int main(void) { | |
printf("SIZEOF char : %2lu / %3lu\n", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% CTeX with XeLaTeX can use any Mac OS X font. See the setromanfont command below. | |
% Input to XeLaTeX is full Unicode, so Unicode characters can be typed directly into the source. | |
%!TEX TS=program = xelatex | |
%!TEX encoding = UTF=8 Unicode | |
\documentclass[UTF8, no=math]{ctexart} | |
\usepackage[a4paper]{geometry} | |
\geometry{left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Asymptote 3D graph | |
// Draw lines (NOT surface) to show a hyperbolid of one sheet | |
// use very basic functions to draw a simple one. | |
// by: wnduan | |
settings.outformat="png"; | |
settings.render=16; | |
//import solids; | |
import three; | |
size(12cm,0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage[% | |
backend=biber, | |
style=gb7714-2015ay, % author-year style | |
% style=gb7714-2015, % numerical style | |
% `align` only works with numerical sytle: `style=gb7714-215`, | |
% avilable values include: right, left, gb7714-2015, default value: right | |
% align=left, | |
gbpub=true, | |
gbnoauthor=false | |
]{biblatex} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Asymptote 3D graph | |
// Draw a hyperbolic paraboloid | |
// use very basic functions to draw a simple one. | |
// by: wnduan | |
settings.outformat="png"; | |
settings.render=16; | |
import three; | |
import graph3; | |
size(12cm,0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
def data_gen(t=0): | |
cnt = 0 | |
while cnt < 5000: | |
cnt += 1 | |
t += .02 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
t1 = [{'id':1, 'abc':'2'}, {'id':1, 'abc':'3'}, {'id':2, 'abc':'2'}] | |
t2 = [] | |
ids = [] | |
# Get all id values | |
for item in t1: | |
ids.append(item['id']) | |
ids = sorted(list(set(ids))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You can download this config from: http://surge.run/config-example/ios.conf | |
# Edit with your computer and copy back to iOS device via iTunes, URL, AirDrop | |
# or iCloud Drive | |
# Version 2.0 | |
[General] | |
# Log level: warning, notify, info, verbose (Default: notify) | |
loglevel = notify | |
# Skip domain or IP range. These hosts will not be processed by Surge Proxy. | |
# (In macOS version when Set as System Proxy enabled, these hosts will be |