Skip to content

Instantly share code, notes, and snippets.

View xinydev's full-sized avatar

Xin Yang xinydev

  • 09:57 (UTC +08:00)
View GitHub Profile
@thomasdullien
thomasdullien / inception_annoy.py
Created June 11, 2017 21:06
Inception for feature extraction, ANNoy for nearest-neighbor search
"""
Simple, hacked-up image similarity search using Tensorflow + the inception
CNN as feature extractor and ANNoy for nearest neighbor search.
Requires Tensorflow and ANNoy.
Based on gist code under
https://gist.github.com/david90/e98e1c41a0ebc580e5a9ce25ff6a972d
"""
from annoy import AnnoyIndex
@meirbon
meirbon / Dell XPS 15 9560 Manjaro Setup instructions
Last active May 13, 2024 02:39
Small, quick guide to set up Manjaro on the XPS 15 9560
# 1. First of all of course get Manjaro:
https://manjaro.org/get-manjaro/
# I recommend using Etcher to copy the image to your USB:
https://etcher.io/
# 2. Before installing make sure:
# - Secure boot is disabled in BIOS
# - Your SSD, HDD or NVME drive is set to AHCI instead of RAID
# - Fastboot should be on Auto or minimal, but this shouldn't matter to much
@MaxBareiss
MaxBareiss / frechet.py
Last active July 7, 2023 13:36
Fréchet Distance in Python
# Euclidean distance.
def euc_dist(pt1,pt2):
return math.sqrt((pt2[0]-pt1[0])*(pt2[0]-pt1[0])+(pt2[1]-pt1[1])*(pt2[1]-pt1[1]))
def _c(ca,i,j,P,Q):
if ca[i,j] > -1:
return ca[i,j]
elif i == 0 and j == 0:
ca[i,j] = euc_dist(P[0],Q[0])
elif i > 0 and j == 0:
@UniIsland
UniIsland / SimpleHTTPServerWithUpload.py
Created August 14, 2012 04:01
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""