Skip to content

Instantly share code, notes, and snippets.

View friskit-china's full-sized avatar

Botian Shi friskit-china

View GitHub Profile
@sdhzdmzzl
sdhzdmzzl / bj-unicom-iptv.m3u
Last active April 23, 2024 07:10
北京联通iptv列表
#EXTM3U name="bj-unicom-iptv"
#EXTINF:-1,CCTV1
rtp://239.3.1.1:8000
#EXTINF:-1,CCTV2
rtp://239.3.1.2:8004
#EXTINF:-1,CCTV4
rtp://239.3.1.4:8216
#EXTINF:-1,CCTV7
rtp://239.3.1.7:8024
#EXTINF:-1,CCTV9
@HarshTrivedi
HarshTrivedi / pad_packed_demo.py
Last active May 4, 2024 07:10 — forked from Tushar-N/pad_packed_demo.py
Minimal tutorial on packing (pack_padded_sequence) and unpacking (pad_packed_sequence) sequences in pytorch.
import torch
from torch import LongTensor
from torch.nn import Embedding, LSTM
from torch.autograd import Variable
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
## We want to run LSTM on a batch of 3 character sequences ['long_str', 'tiny', 'medium']
#
# Step 1: Construct Vocabulary
# Step 2: Load indexed data (list of instances, where each instance is list of character indices)
@mfalkvidd
mfalkvidd / nginx-thingsboard
Last active February 7, 2024 17:02
Thingsboard nginx reverse proxy with websocket and HTTPS support (Let's Encrypt)
server {
listen 80;
server_name EXTERNAL_THINGSBOARD_DOMAIN.com;
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
}
server {
@terrydang
terrydang / install_nvidia_driver_in_ubuntu1604.md
Last active August 8, 2022 09:31
Ubuntu 16.04 安装英伟达(Nvidia)显卡驱动

Ubuntu 16.04 安装英伟达(Nvidia)显卡驱动

配有英伟达显卡的主机,装完 Ubuntu 16.04 后出现闪屏现象,是由于没有安装显卡驱动。

显卡型号
NVIDIA Corporation GM204 [GeForce GTX 970]

@huyng
huyng / infercaffe.py
Created May 19, 2015 08:14
simple inference for caffe
import sys
import caffe
from PIL import Image
import numpy as np
pimga = Image.open("a.jpg")
pimgb = Image.open("b.jpg")
nimga = np.array(pimga).reshape(1,256,256,3).transpose(0,3,1,2)
nimgb = np.array(pimgb).reshape(1,256,256,3).transpose(0,3,1,2)