This file contains 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 -*- | |
# 数据下载 http://www.tdx.com.cn/download | |
# 上海 http://www.tdx.com.cn/products/data/data/vipdoc/shlday.zip | |
# 深圳 http://www.tdx.com.cn/products/data/data/vipdoc/szlday.zip | |
# 通达信 K 线记录格式 | |
''' | |
日期, date | |
开盘, open |
This file contains 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
#!/bin/sh | |
# | |
ARCH=x86_64 | |
ARCH_TMP=/tmp/archlinux | |
ARCH_ROOT=/mnt/archlinux | |
mkdir $ARCH_TMP | |
cd $ARCH_TMP |
This file contains 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 os, exifread | |
from time import strftime, strptime | |
for x in os.listdir('.'): | |
print x | |
tags = exifread.process_file(open(x), details=False) | |
try: | |
#t = tags['EXIF DateTimeOriginal'].values | |
t = tags['Image DateTime'].values | |
print t | |
t = strptime(t, '%Y:%m:%d %H:%M:%S') |
This file contains 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
ACCEPT_KEYWORDS="~amd64" | |
FEATURES="ccache mini-manifest parallel-fetch" | |
CHOST="x86_64-pc-linux-gnu" | |
CFLAGS="-march=core2 -O2 -pipe" | |
MAKEOPTS="-j3" | |
GENTOO_MIRRORS="http://mirrors.sohu.com/gentoo" | |
# GENTOO_MIRRORS="http://mirrors.163.com/gentoo" | |
# FETCHCOMMAND="/usr/bin/axel -a -n5 \"\${URI}\" -o \"\${DISTDIR}/\${FILE}\"" |
This file contains 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
#!/bin/sh | |
# Funtoo Install Script Chroot Part for Virtualbox | |
# 更新环境变量 | |
source /etc/profile | |
export PS1="(chroot) $PS1" | |
# 设置时区和硬件时钟 | |
echo "-*- locale -*-" | |
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime |
This file contains 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
#!/bin/sh | |
# Funtoo Install Script Chroot Part for Virtualbox | |
# 校准系统, UTC标准时间 | |
echo "-*- Adjusting the time -*-" | |
ntpdate time1.google.com | |
# 创建分区 | |
echo "-*- Partitioning the disk -*-" | |
sgdisk \ |
This file contains 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/python | |
# -*- coding: utf-8 -*- | |
import struct | |
''' | |
同花顺自选股文件格式: | |
0000000: 0900 0721 3030 3039 3731 0711 3630 3036 ...!000971..6006 | |
0000010: 3738 0721 3030 3231 3134 0721 3030 3232 78.!002114.!0022 |
This file contains 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
<?php | |
$cmd = 'date'; | |
$desc = array( | |
0 => array('pipe', 'r'), | |
1 => array('pipe', 'w'), | |
2 => array('pipe', 'w') | |
); | |
$pwd = '~'; | |
$env = array(); |
This file contains 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
#include <stdio.h> | |
float InvSqrt(float x) | |
{ | |
float xhalf = 0.5f * x; | |
int i = *(int*)&x; | |
i = 0x5f375a86 - (i>>1); | |
printf("%d", i); | |
x = *(float*)&i; | |
printf("%f", x); |
This file contains 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
#!/bin/sh | |
# LiveISO Part of ArchLinux Virtualbox Guest Install Script | |
# system clock | |
# date `date +%m%d%H%M%Y.%S --date='-8 hour'` | |
ntpdate time.asia.apple.com | |
# partitions | |
sgdisk --zap-all /dev/sda | |
sgdisk \ |