A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| import luigi | |
| NUMBER_OF_FILES = 50 | |
| class WritePipelineTask(luigi.Task): | |
| def output(self): | |
| return luigi.LocalTarget("data/_DONE_WRITE_PIPELINE_TASK") |
| #!/usr/bin/env bash | |
| # | |
| # This is a script that can automatically | |
| # setup DOMjudge server & judgehost, inside a same server. | |
| # | |
| # As a bonus, this script will also setup a beautiful DOMjudge | |
| # interface made using React, which it will listen on port 8080. | |
| # | |
| # This script assumes that: |
| sudo mkdir -m 0700 /var/www/.ssh | |
| sudo chown -R www-data:www-data /var/www/.ssh | |
| sudo -u www-data ssh-keygen (empty passphrase) | |
| # On Github, paste public key into "Deploy keys" | |
| sudo -u www-data bash | |
| cd /path/to/repo | |
| git clone ... |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Fri May 05 04:12:36 2017 | |
| @author: ADubey4 | |
| """ | |
| from __future__ import unicode_literals, print_function | |
| import gensim | |
| from gensim.parsing import PorterStemmer |