Skip to content

Instantly share code, notes, and snippets.

View hoseinit's full-sized avatar

Hosein Hamedi hoseinit

  • PAYBACK GmbH
  • Munich
View GitHub Profile
@dee-walia20
dee-walia20 / string_cleaning.py
Last active August 31, 2020 18:46
Data Cleaning
import nltk
import string
import re
from nltk.stem.snowball import SnowballStemmer
stopwords=nltk.corpus.stopwords.words('english')
snowball_stemmer=SnowballStemmer(language='english')
def treat_text(text):
edited_text=re.sub('\W'," ",text) #replace any sumbol with whitespace
@wojteklu
wojteklu / clean_code.md
Last active April 26, 2024 16:51
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@EvanHahn
EvanHahn / app.js
Last active September 29, 2023 14:14
Do you love anime?
// Start Express
const express = require("express");
const app = express();
// Set the view directory to /views
app.set("views", __dirname + "/views");
// Let's use the Pug templating language
app.set("view engine", "pug");