Skip to content

Instantly share code, notes, and snippets.

View tqyq's full-sized avatar

altman tqyq

  • Earth
View GitHub Profile
@tqyq
tqyq / README.md
Created April 3, 2019 04:01 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@tqyq
tqyq / install_and_using.md
Created December 25, 2017 07:36 — forked from sangheestyle/install_and_using.md
Install and using numba on mac

Install and using numba on mac

  • Mac version: 10.11.3
  • Python version: 3.5.1

Install

$ brew tap homebrew/versions
$ brew install llvm37
@tqyq
tqyq / classifier_from_little_data_script_1.py
Created December 10, 2017 11:42 — forked from fchollet/classifier_from_little_data_script_1.py
使用非常少的数据建立强大的图像分类模型
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
@tqyq
tqyq / gist:34caca278fe7c6921b449e7fa293670f
Created November 28, 2017 03:47
oracle export to csv
CREATE OR REPLACE PROCEDURE SQL_TO_CSV
(
P_QUERY IN VARCHAR2, -- PLSQL文
P_DIR IN VARCHAR2, -- 导出的文件放置目录
P_FILENAME IN VARCHAR2 -- CSV名
)
IS
L_OUTPUT UTL_FILE.FILE_TYPE;
L_THECURSOR INTEGER DEFAULT DBMS_SQL.OPEN_CURSOR;
L_COLUMNVALUE VARCHAR2(4000);
@tqyq
tqyq / madlib-postgres-ubuntu.md
Last active April 19, 2023 09:04 — forked from jvawdrey/madlib-postgres-ubuntu.md
Instructions for installing MADlib and Postgres on Ubuntu 16.04

madlib-postgres-ubuntu

Instructions for installing MADlib and Postgres on Ubuntu 16.04

# Install Postgres 9.6, pl/r and dependencies for MADlib
sudo apt-get install -y cmake postgresql-9.6 postgresql-server-dev-9.6 postgresql-plpython-9.6 postgresql-9.6-plr libkrb5-dev postgresql-client postgresql-contrib

# grab madlib rpm
cd /home/gpadmin/tmp
@tqyq
tqyq / gist:cbdb34680cd890a6a4bb663b99abeefc
Last active August 31, 2017 03:14
docker fake command shell
vi /usr/bin/xlsx
#!/bin/bash
docker run --rm -v /root/upload:/upload -v /data:/data xlsx xlsx $1 $2
vi /usr/bin/ssconvert
#!/bin/bash
docker run --rm -v /root/upload:/upload ssconvert ssconvert $1 $2 $3
apt install python-pip pypy
pip install xlsx2csv
vi /usr/local/bin/xlsx2csv
#!/usr/bin/python -> #!/usr/bin/pypy
xlsx2csv -a test.xlsx test
# method 2
npm install -g xlsx
xlsx test.xlsx -o test.csv
apt install nuitka
nuitka --recurse-all xlsx2csv.py
@tqyq
tqyq / gist:3811d7259c5fea95f7655cf33a4fdbfa
Created July 17, 2017 05:47
git merge branch to master
git checkout master
git pull origin master
git merge v1.2.2
git push origin master
@tqyq
tqyq / gist:ae28d4c8a1def9ddd663a21c0f4f88d3
Created July 11, 2017 09:35
postgresql optimize query parallel
set max_worker_processes = 64;
set max_parallel_workers_per_gather = 16;
#设置强制并行,建议off,避免不必要的使用worker
#set force_parallel_mode = on;