Skip to content

Instantly share code, notes, and snippets.

View xylcbd's full-sized avatar
🎯
Focusing

xylcbd xylcbd

🎯
Focusing
View GitHub Profile
@zxp
zxp / SCITV_UDPXY.M3U
Last active January 2, 2024 04:52
[四川电信ITV 190个频道的组播表] 四川电信IPTV 190个频道的组播表,截取于2017年8月 #scitv #iptv #sichuan
#EXTM3U name="四川电信IPTV"
#EXTINF:-1,CCTV-1高清
http://192.168.2.2/rtp/239.93.0.184:5140
#EXTINF:-1,CCTV-2高清
http://192.168.2.2/rtp/239.93.1.23:6000
#EXTINF:-1,CCTV-3高清
http://192.168.2.2/rtp/239.93.1.11:2223
#EXTINF:-1,CCTV-5高清
http://192.168.2.2/rtp/239.93.1.12:2224
#EXTINF:-1,CCTV-6高清
@royshil
royshil / AndroidCamera2TouchToFocus.java
Last active April 9, 2024 16:20
How to implement Touch-to-Focus in Android using Camera2 APIs
//Override in your touch-enabled view (this can be differen than the view you use for displaying the cam preview)
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
final int actionMasked = motionEvent.getActionMasked();
if (actionMasked != MotionEvent.ACTION_DOWN) {
return false;
}
if (mManualFocusEngaged) {
Log.d(TAG, "Manual focus already engaged");
return true;
@karpathy
karpathy / min-char-rnn.py
Last active April 23, 2024 17:55
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@shingchi
shingchi / Unicode中文和特殊字符的编码范围
Created January 6, 2015 06:39
Unicode中文和特殊字符的编码范围
根据Unicode5.0整理如下:
1)标准CJK文字
http://www.unicode.org/Public/UNIDATA/Unihan.html
2)全角ASCII、全角中英文标点、半宽片假名、半宽平假名、半宽韩文字母:FF00-FFEF
http://www.unicode.org/charts/PDF/UFF00.pdf
3)CJK部首补充:2E80-2EFF
http://www.unicode.org/charts/PDF/U2E80.pdf
@neubig
neubig / lstm-lm.py
Last active August 23, 2017 09:18
This is a minimal implementation of training for a language model using long short-term memory (LSTM) neural networks
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This is a simplified implementation of the LSTM language model (by Graham Neubig)
#
# LSTM Neural Networks for Language Modeling
# Martin Sundermeyer, Ralf Schlüter, Hermann Ney
# InterSpeech 2012
#
# The structure of the model is extremely simple. At every time step we
@edokeh
edokeh / index.js
Last active April 18, 2024 08:07
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@aras-p
aras-p / preprocessor_fun.h
Last active April 12, 2024 17:24
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@reklis
reklis / makefatlib.sh
Created July 25, 2012 20:46
Make a simulator+device .a file with headers
# http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
TARGET_NAME=<< name of your target or an environment variable >>
CONFIGURATION=Release
DEVICE=iphoneos
SIMULATOR=iphonesimulator
FAT=universal
OUTPUT=build
LIBRARY_NAME=lib${TARGET_NAME}.a
@eiiches
eiiches / bk-tree.hpp
Created March 11, 2012 12:17
BK-tree implementation in C++
/*
* BK-tree implementation in C++
* Copyright (C) 2012 Eiichi Sato
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,