Skip to content

Instantly share code, notes, and snippets.

View octaflop's full-sized avatar

Faris Chebib octaflop

View GitHub Profile
@octaflop
octaflop / start_ds_project.py
Created June 12, 2017 23:41
start a datascience project with a lovely folder structure and general guidelines.
#!/usr/bin/python
"""
Command line utilities to help start a clean boilerplate project
Requirements:
- Click command line: `pip install Click`
Examples taken from https://www.svds.com/jupyter-notebook-best-practices-for-data-science/ # noqa
library(ggplot2)
library(ggthemes)
library(scales)
# Grab data from here: https://data.stackexchange.com/stackoverflow/query/596780/language-trends-questions-per-tag-per-month
# setwd() <-- You may need this
df <- read.csv('LanguageComparisonOverTime.csv')
str(df)

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

from django.test import TestCase, Client
class SomeTestCase(TestCase):
def test_post_success(self):
client = Client()
data = {
'api_key': self.rod_client.api_key,
'username': 'test_user1',
'hero_name': 'test_hero1',
'zone_index': 1,
@agconti
agconti / fabfile.py
Last active January 29, 2019 11:10
Fabfile for django 1.7 + for easily deploying on heroku.
import os
import random
import string
from fabric.api import env, local, require, lcd
from fabric.colors import cyan
from fabric.operations import prompt
current_dir = os.getcwd()
env.project_name = '{{cookiecutter.app_name}}'
@KonradIT
KonradIT / readme.md
Last active July 11, 2024 20:46
GoPro Studio for Linux
@kyledrake
kyledrake / ferengi-plan.txt
Last active July 10, 2024 18:51
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@lrvick
lrvick / flask_geventwebsocket_example.py
Created September 1, 2011 07:17
Simple Websocket echo client/server with Flask and gevent / gevent-websocket
from geventwebsocket.handler import WebSocketHandler
from gevent.pywsgi import WSGIServer
from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')