Skip to content

Instantly share code, notes, and snippets.

View ariffyasri's full-sized avatar

Muhammad Ariff Yasri ariffyasri

View GitHub Profile
@sloria
sloria / bobp-python.md
Last active July 24, 2024 02:53
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
# -*- 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
@slowkow
slowkow / Apache www-data setup
Last active June 27, 2024 09:25 — forked from milo/github-webhook-handler.php
Github webhook handler in PHP.
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 ...
@shahril96
shahril96 / domjudge-setup.sh
Last active July 19, 2023 14:31
A helper script to automatically setup a DOMjudge server in 10 minutes, go get yourself a coffee.
#!/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:
@LorePep
LorePep / multi_file_task.py
Last active July 17, 2020 07:48
A luigi pipeline with multiple files
import luigi
NUMBER_OF_FILES = 50
class WritePipelineTask(luigi.Task):
def output(self):
return luigi.LocalTarget("data/_DONE_WRITE_PIPELINE_TASK")