Skip to content

Instantly share code, notes, and snippets.

@scheckley
scheckley / twecoll
Created February 26, 2018 17:01 — forked from lucahammer/twecoll
Modified version of twecoll to generate GDF files for use with Gephi. Use "python twecoll.py edgelist -g -m USERNAME"
#!/usr/bin/env python
'''
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@scheckley
scheckley / getsheets.py
Last active August 4, 2017 13:30 — forked from scottming/getsheets.py
modified to convert to csv with corrected utf8 encoding in pandas
# -*- coding: utf-8 -*-
import click
import os
import pandas as pd
def file_split(file):
s = file.split('.')
name = '.'.join(s[:-1]) # get directory name
return name