Skip to content

Instantly share code, notes, and snippets.

View shinshiner's full-sized avatar
🏠
Working from home

Shin shinshiner

🏠
Working from home
View GitHub Profile
@josimard
josimard / InterpolationLibrary.cpp
Last active September 11, 2023 09:13
UE4 - Critically Damped Spring Interpolation Smoothing for Unreal Engine (Similar to SmoothDamp)
#include "InterpolationLibrary.h"
#include "Kismet/KismetMathLibrary.h"
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Critically Damped Spring Interpolations (ie: Similar to Unity's SmoothDamp, but will less operations)
// Inspired from Keijiro's code: https://github.com/keijiro/SmoothingTest
// Math reference: http://mathproofs.blogspot.jp/2013/07/critically-damped-spring-smoothing.html
FVector UInterpolationLibrary::VectorSpringInterpCD(FVector Current, FVector Target, FVector& Velocity, float DeltaTime, float InterpSpeed, float MaxVelocity)
{
@cxy1997
cxy1997 / plot.py
Created October 18, 2018 01:06
Plot curves with matplotlib
# -*- coding: utf-8 -*-
from __future__ import division, print_function
import numpy as np
import copy
import matplotlib.pyplot as plt
import seaborn
def smooth(array, m=3):
_array = copy.deepcopy(array)
@daisenryaku
daisenryaku / 3DIoU.py
Last active June 6, 2020 08:36
3D IoU (Intersection over Union)
# 3D IoU python Implementation
# [IoU](https://www.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/)
def IoU(box0, box1):
# box0: [x, y, z, d]
r0 = box0[3] / 2
s0 = box0[:3] - r0
e0 = box0[:3] + r0
r1 = box1[3] / 2
s1 = box1[:3] - r1
@kevinkindom
kevinkindom / Python Socket 编程详细介绍.md
Last active April 7, 2024 01:11
Python Socket 编程详细介绍

Python Socket 编程详细介绍

Python 提供了两个基本的 socket 模块:

  • Socket 它提供了标准的BSD Socket API。
  • SocketServer 它提供了服务器重心,可以简化网络服务器的开发。

下面讲解下 Socket模块功能。

Socket 类型

@vratiu
vratiu / .bash_aliases
Last active April 22, 2024 01:54
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname