Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Pull this file down, make it executable and run it with sudo
# wget https://gist.githubusercontent.com/Eldar7/ce277f6e90a1466f2c41/raw/install_idea_13.1.3.sh
# chmod u+x install_idea_13.1.3.sh
# sudo ./install_idea_13.1.3.sh
apt-get install openjdk-7-jdk
if [ $(id -u) != "0" ]; then
echo "You must be the superuser to run this script" >&2
@sammatuba
sammatuba / splitPandasSeriesOfTuplesIntoPandasDataframe.py
Last active November 12, 2023 14:52
quickHow: how to split a column of tuples into a pandas dataframe
# Given a pandas dataframe containing a pandas series/column of tuples B,
# we want to extract B into B1 and B2 and assign them into separate pandas series
# Method 1: (faster)
# use pd.Series.tolist() method to return a list of tuples
# use pd.DataFrame on the resulting list to turn it into a new pd.DataFrame object, while specifying the original df index
# add to the original df
import pandas as pd
import time