Skip to content

Instantly share code, notes, and snippets.

Avatar

deepklim deepklim

  • CSPS
View GitHub Profile
@deepklim
deepklim / Rename_Python.ipynb
Last active Jun 20, 2018
Comparison: Renaming files in Python 3 vs. VBA
View Rename_Python.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deepklim
deepklim / scipy_sparse.ipynb
Created Jun 5, 2018
Sparse matrix operations in Python with SciPy
View scipy_sparse.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deepklim
deepklim / Regex_Python.py
Last active Jun 15, 2018
Comparison: Regular expressions in Python 3 vs. VBA
View Regex_Python.py
import re
text = 'I am going to take G110 and C451 next week.'
# Pass pattern as raw string
# Common methods: .findall (returns a list), .finditer (returns an iterator), .sub, .split
regex = re.compile(pattern=r'[a-zA-Z]{1}\d{3}')
# .findall
print(regex.findall(text))