Skip to content

Instantly share code, notes, and snippets.

View anhpt379's full-sized avatar

Anh Pham anhpt379

View GitHub Profile
{"lastUpload":"2019-12-18T07:14:03.625Z","extensionVersion":"v3.4.3"}
# clone the project
git clone http://github.com/wandenberg/nginx-push-stream-module.git
NGINX_PUSH_STREAM_MODULE_PATH=$PWD/nginx-push-stream-module
cd nginx-push-stream-module
# build with 1.1.x, 1.0.x, 0.9.x, 0.8.x series
./build.sh master 1.1.15
cd build/nginx-1.1.15
# install and finish
<form action="http://upload2.vcmedia.vn/upload" method="post" enctype="multipart/form-data">
<input type="hidden" name="policy" value="YOUR_POLICY_DOCUMENT_BASE64_ENCODED">
<input type="hidden" name="signature" value="YOUR_CALCULATED_SIGNATURE">
File to upload to VS3:
<input name="file" type="file">
<br>
@anhpt379
anhpt379 / tf_idf_final.py
Created January 13, 2012 07:51 — forked from marcelcaraciolo/tf_idf_final.py
tf-idf example
#-*- coding: utf-8 -*-
import re
import nltk
from nltk.tokenize import RegexpTokenizer
from nltk import bigrams, trigrams
import math
stopwords = nltk.corpus.stopwords.words('portuguese')
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
# Basic text search with relevancy for MongoDB.
# See http://blog.tty.nl/2010/02/08/simple-ranked-text-search-for-mongodb/
# Copythingie 2010 - Ward Bekker - [email protected]
#create (or empty) a docs collection
doc_col = MongoMapper.connection.db('example_db').collection('docs')
doc_col.remove({})
#add some sample data
doc_col.insert({ "txt" => "it is what it is"})