Skip to content

Instantly share code, notes, and snippets.

View fanjin-z's full-sized avatar
😃
Happy ~!

Fanjin Z fanjin-z

😃
Happy ~!
View GitHub Profile
@fanjin-z
fanjin-z / rrt.py
Created May 20, 2019 06:19
Python Implementation of Rapidly-exploring random tree (RRT) Path-planning Algorithm
'''
MIT License
Copyright (c) 2019 Fanjin Zeng
This work is licensed under the terms of the MIT license, see <https://opensource.org/licenses/MIT>.
'''
import numpy as np
from random import random
import matplotlib.pyplot as plt
from matplotlib import collections as mc
@fanjin-z
fanjin-z / diff.py
Created May 15, 2019 19:54
Python Implementation of Myers Diff Algorithm
'''
MIT License
Copyright (c) 2019 Fanjin Zeng
This work is licensed under the terms of the MIT license, see <https://opensource.org/licenses/MIT>.
'''
import numpy as np
def diff(a, b):
@fanjin-z
fanjin-z / de_novo.py
Created May 10, 2019 22:53
De Novo peptide sequencing algorithm (python)
'''
MIT License
Copyright (c) 2019 Fanjin Zeng
This work is licensed under the terms of the MIT license, see <https://opensource.org/licenses/MIT>.
'''
class Peak():
'''
Nodes that store peak info
'''
@fanjin-z
fanjin-z / mesh-to-point-cloud.py
Last active August 13, 2021 09:00
Convert mesh to point cloud using furthest point sampling
'''
MIT License
Copyright (c) 2018 Fanjin Zeng
This work is licensed under the terms of the MIT license, see <https://opensource.org/licenses/MIT>.
'''
import numpy as np
import pymesh # pymesh is used to load mesh obj files.
# compute triangle mesh surface area
@fanjin-z
fanjin-z / sliding_window_view.py
Last active November 21, 2023 16:40
Create sliding window views of the N dimensions array with the given window shape
'''
MIT License
Copyright (c) 2018 Fanjin Zeng
This work is licensed under the terms of the MIT license, see <https://opensource.org/licenses/MIT>.
'''
def sliding_window_view(x, shape, step=None, subok=False, writeable=False):
"""
Create sliding window views of the N dimensions array with the given window
shape. Window slides across each dimension of `x` and provides subsets of `x`
@fanjin-z
fanjin-z / hungary.py
Last active May 13, 2018 00:30
An Python Implementation of Hungarian Algorithm. This implementation is based on http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html
import numpy as np
class hungrary():
def __init__(self, weight):
self.n = weight.shape[0]
self.w = np.copy(weight)
# cost matrix
self.c = np.copy(weight)
@fanjin-z
fanjin-z / autoexec.cfg
Last active May 27, 2018 22:58
An Example CSGO Settings (2018.05)
exec keybinds.cfg
exec buybinds.cfg
exec gamesets.cfg
exec guisets.cfg
exec networksets.cfg
@fanjin-z
fanjin-z / csgo-server-guide.md
Last active November 11, 2023 17:20
Complete Guide for Hosting CS:GO Dedicated Servers

Complete Guide for Hosting a CS:GO Dedicated Server

Creative Commons License.

I tested the setup on Debian Stretch (naive installation) and Jessie (LinuxGSM installation). The setup should work on Debian 8 (Jessie), Debian 9 (Stretch) and Ubuntu (16.04). However, If you're running on Windows or other non-debian based Linux OS (e.g. CentOS, openSUSE), this guide doesn't apply to you.

My Servers:

I'm hosting FFA warm-up and HvH(soon) servers in San Francisco, welcome to join by:

IPv4: 159.89.154.137   
Ipv6: 2604:a880:2:d0::20ad:2001