This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # install pyenv on centos 7 | |
| yum install -y gcc gcc-c++ make git patch openssl-devel zlib-devel readline-devel sqlite-devel bzip2-devel | |
| curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash | |
| echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> .zshrc | |
| echo 'eval "$(pyenv init -)"' >> .zshrc | |
| echo 'eval "$(pyenv virtualenv-init -)"' >> .zshrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "net" | |
| "net/http" | |
| "os" | |
| "os/exec" | |
| "os/signal" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # /etc/init.d/centrifugo | |
| # | |
| # Startup script for centrifugo | |
| # | |
| # chkconfig: 2345 20 80 | |
| # description: Starts and stops centrifugo | |
| # Source function library. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ Implementation of OKapi BM25 with sklearn's TfidfVectorizer | |
| Distributed as CC-0 (https://creativecommons.org/publicdomain/zero/1.0/) | |
| """ | |
| import numpy as np | |
| from sklearn.feature_extraction.text import TfidfVectorizer | |
| from scipy import sparse | |
| class BM25(object): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import logging | |
| import os | |
| import threading | |
| import time | |
| from multiprocessing import Process | |
| from queue import Queue | |
| from confluent_kafka import Consumer |
OlderNewer