Skip to content

Instantly share code, notes, and snippets.

@nova77
nova77 / clip_magic.py
Last active October 24, 2023 18:50
copy to clipboard ipython magic
"""
Add copy to clipboard from IPython!
To install, just copy it to your profile/startup directory, typically:
~/.ipython/profile_default/startup/
Example usage:
%clip hello world
# will store "hello world"
@conradlee
conradlee / edgelist2pajek.py
Created November 1, 2011 16:48
Converts edgelists to pajek files. Works for very large files.
#!/usr/bin/env python
import os
import sys
import subprocess
import optparse
import tempfile
# Special feature: can convert files so large that they
# don't fit in memory. Works for weighted/unweighted,
# directed/undirected edges.