Skip to content

Instantly share code, notes, and snippets.

View HaveF's full-sized avatar
🎯
Focusing

HaveF HaveF

🎯
Focusing
View GitHub Profile
@HaveF
HaveF / .git-commit-template.txt
Last active September 28, 2020 01:05 — forked from jmaxhu/.git-commit-template.txt
一份建议的git commit模板
<类型>: <主题> (最多50个字)
# 解释为什么要做这些改动
# |<---- 请限制每行最多72个字 ---->|
# --- 提交 结束 ---
# 类型值包含
# feat (新特性)
# fix (bug修复)
# docs (文档改动)
@HaveF
HaveF / cube_net_value.js
Last active March 29, 2017 12:11
雪球 关注的人组合水平 查询
aList = $('.users-list>li>div.headpic>a');
aList.toArray().map(node => {
fetch(`https://xueqiu.com/cubes/list.json?user_id=${node.getAttribute("data-id")}&_=${Date.now()}`, {
credentials: 'include'
})
.then(res=>{
return res.json()
})
.then(res=>{
let b = res.list.map(cube=>{
@HaveF
HaveF / test.js
Created August 20, 2016 04:01 — forked from miguelmota/test.js
Node SuperTest simple example
var test = require('tape');
var request = require('supertest');
var server = require('../../server');
test('barcode route', function(t) {
request(server)
.get('/api/1/code')
.expect(200)
.expect('Content-Type', /json/)
.expect({"code":{"code":"1M4A67AE3H94RS6GG74M"}})
@HaveF
HaveF / gulpfile.js
Last active November 19, 2015 10:01 — forked from cgmartin/gulpfile.js
Node ES6 istanbul, isparta, mocha-co gulpfile example
'use strict';
var gulp = require('gulp');
var del = require('del');
var mocha = require('gulp-mocha-co');
var istanbul = require('gulp-istanbul');
var isparta = require('isparta');
var coverageEnforcer = require('gulp-istanbul-enforcer');
var paths = {
server: {
@HaveF
HaveF / youtube_sub
Created November 11, 2014 09:55
Youtube Subtitle Downloader
// ==UserScript==
// @name Youtube Subtitle Downloader
// @include http://*youtube.com/watch*
// @include https://*youtube.com/watch*
// @author Tim Smart
// @copyright 2009 Tim Smart; 2011 gw111zz; 2013 Cheng Zheng;
// @license GNU GPL v3.0 or later. http://www.gnu.org/copyleft/gpl.html
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @version 0.0.1.20140930025401
// @namespace https://greasyfork.org/users/5711
var express = require('express');
var app = express.createServer(express.logger());
app.get('/', function(request, response) {
response.send('Hello World!');
});
var port = process.env.PORT || 5000;
app.listen(port, function() {
@HaveF
HaveF / error
Created May 14, 2013 12:47
blas.ldflags= -LC:\Anaconda\MinGW\x86_64-w64-mingw32\lib
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-8811626b82bb> in <module>()
----> 1 theano.misc.check_blas.test()
D:\OpenCourses\ufldl\ref\Theano\theano\misc\check_blas.pyc in test()
110
111 def test():
--> 112 execute()
@HaveF
HaveF / check_blas.py
Created May 14, 2013 12:29
check_blas.py
D:\OpenCourses\ufldl\ref\Theano\theano\misc>python check_blas.py
Forcing DISTUTILS_USE_SDK=1
WARNING (theano.tensor.blas): Failed to import scipy.linalg.blas. Falling back o
n slower implementations (DLL load failed: 找不到指定的模块。)
Some results that you can compare against. They were 10 executions
of gemm in float64 with matrices of shape 2000x2000 (M=N=K=2000).
All memory layout was in C order.
CPU tested: Xeon E5345(2.33Ghz, 8M L2 cache, 1333Mhz FSB),
@HaveF
HaveF / theano.misc.check_blas.test()
Created May 14, 2013 12:22
after set library path: blas.ldflags= -LC:\Anaconda\MinGW\lib -lopenblas
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-8811626b82bb> in <module>()
----> 1 theano.misc.check_blas.test()
D:\OpenCourses\ufldl\ref\Theano\theano\misc\check_blas.pyc in test()
110
111 def test():
--> 112 execute()
113
import numpy
import random
from numpy import arange
#from classification import *
from sklearn import metrics
from sklearn.datasets import fetch_mldata
from sklearn.ensemble import RandomForestClassifier
from sklearn.utils import shuffle
import time