Skip to content

Instantly share code, notes, and snippets.

@diitaz93
diitaz93 / github_traffic_modelling.py
Created March 31, 2023 08:10
Statistical mechanics approach to model probability of merge conflict in collaborative project
#!/usr/bin/env python
# coding: utf-8
import argparse
from math import comb, ceil
from matplotlib import pyplot as plt
import seaborn as sns
import numpy as np
@diitaz93
diitaz93 / global_functions.py
Created July 15, 2022 11:11
Useful python functions for data analysis
""" GLOBAL functions: Functions used over several projects.
* group_with_freq
Author: Juan Sebastian Diaz Boada
juansdb93@gmail.com
"""
import numpy as np
import pandas as pd
from collections import defaultdict
#---------------------------------------------------------------------------------------------------#
def group_with_freq(df,col,group_unique=False,new_name=None):