Skip to content

Instantly share code, notes, and snippets.

View hanfengsunshine's full-sized avatar
💭
I may be slow to respond.

fred hanfengsunshine

💭
I may be slow to respond.
View GitHub Profile
@vincentarelbundock
vincentarelbundock / example_predict.ipynb
Created August 26, 2012 23:28
Statsmodels example: Out of sample prediction
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pkerpedjiev
pkerpedjiev / SelectableForceDirectedGraph
Last active May 25, 2023 04:59
D3 Selectable Force-Directed Graph
.
@dapangmao
dapangmao / bb1.txt
Last active January 1, 2020 01:34
Bloomberg 全体展览
【===========算法============】
【*****leetcode/lintcode*****】
same tree, Binary tree inorder iterator, inorder & postorder traverse BST, binary tree level order traversal(print指定level的binary tree), tree upside down, add next to every tree node, Convert Sorted Array to BST, binary tree的maxSumPath, reverse linkedlist, linkedlist输出倒数K个node的值, linked list取中值, linked list做减法/加法(反序), valid BST, linkedlist找merge point, copy linkedlist with random pointer, flatten BST to linkedlist(把BST替换为2Dlinkedlist,本质不变), depth, interseciton of linked list(一个一步一个多步是否可以(复杂度高)) LRUCache, upside down, recover binary tree from inorder and preorder,
word search I, min stack, stock transaction I(buy date is needed) & II, two sum, subset, unique paths II, merge two/k sorted array/linked list, Find kth largest number(quickselect, array partition), sort colors, remove duplicate from a sorted array, search in sorted rotated array(binary search), search for a range and delete it in array, next permutation, find peak element(一个先降后升的数组,怎么在这个数组中找到
@yjiro0403
yjiro0403 / UnityandKinectV2_ColoredPointCloud.cs
Created June 27, 2016 03:02
Unity And Kinect V2 Point Cloud
using UnityEngine;
using Windows.Kinect;
//fileIO
using System.IO;
public class ColoredParticle2 : MonoBehaviour {
public GameObject MultiSourceManager;
public Color color = Color.green;
@swayson
swayson / kulback_leibler_divergence.py
Last active September 28, 2022 07:21
Numpy and scipy ways to calculate KL Divergence.
"""
Specifically, the Kullback–Leibler divergence from Q to P, denoted DKL(P‖Q), is
a measure of the information gained when one revises one's beliefs from the
prior probability distribution Q to the posterior probability distribution P. In
other words, it is the amount of information lost when Q is used to approximate
P.
"""
import numpy as np
from scipy.stats import entropy
@doggy8088
doggy8088 / Angular 18 Dev Setup.md
Last active March 29, 2025 14:04
Angular 18 開發環境說明

Angular 18 開發環境說明

為了能讓大家能夠順利的建立起 Angular 18 開發環境,以下是需要安裝的相關軟體與安裝步驟與說明。

Angular LOGO

[ 作業系統 ]

  • Windows 10 以上版本
  • Mac OS X 10.6 以上版本
@18182324
18182324 / Pairs Trading Strategy Backtest for copula method [Python Code]
Last active February 7, 2023 02:57
Pairs Trading Strategy Backtest for copula method [Python Code]
import numpy as np
from scipy import stats
from statsmodels.distributions.empirical_distribution import ECDF
from scipy.stats import kendalltau, pearsonr, spearmanr
from scipy.optimize import minimize
from scipy.integrate import quad
import sys
from collections import deque