Skip to content

Instantly share code, notes, and snippets.

View suvodeep-pyne's full-sized avatar

Suvodeep Pyne suvodeep-pyne

View GitHub Profile
@suvodeep-pyne
suvodeep-pyne / rh_pdf_csv
Created January 4, 2022 05:40
Convert a spreadsheet from pdf to csv
import pandas as pd
import tabula
def rh_pdf_to_csv(pdf_filepath, csv_filepath):
df_list = tabula.read_pdf(pdf_filepath, pages='all', pandas_options={'header': None})
df = pd.concat(df_list, axis=0, ignore_index=True)
# Take the first row as header
new_header = df.iloc[0] # grab the first row for the header
@suvodeep-pyne
suvodeep-pyne / getter-with-optional.template
Created March 28, 2018 06:14
Intellij Getter template for generating getters with Optional
#if($field.modifierStatic)
static ##
#end
Optional<$field.type> ##
#set($name = $StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project))))
#if ($field.boolean && $field.primitive)
is##
#else
get##
#end