🏠
Working from home
Python and GIS and a little bit of Javascript
-
Hire Me!
- Tokyo area
- http://ryan.robotrodeo.net/
Pinned Loading
-
email.blog
email.blog Publica flask bloging platform. Listen to an imap folder and then post the messages as blog posts.
Python 1
-
Normally you can't remove items from...
Normally you can't remove items from a dictionary while you are iterating over it. But if you convert it to a list first, there are no problems. 1origDict = {
2'First name': 'Ryan',
3'Last name': 'M',
4'Subject': 'AI',
5'task': 'Cleaning Data'
-
a python regex to grab every japanes...
a python regex to grab every japanese word from an HTML file 1import re
23with open(rootdir + "something in japanese.html", encoding='utf-8', errors='ignore') as reader:
4for line in reader:
5words = re.findall(r"[一-龯ぁ-んァ-ン!:/・()ー]*", line)
-
simple email regex
simple email regex 1[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n]+
23[^@ \\t\\r\\n] matches for anything other than @, space, tab, new lines repetitions of a non-whitespace character.
45https://ihateregex.io/expr/email/ (04/17/2022)
-
Use this code in the top cell of you...
Use this code in the top cell of your colab notebook to read data from google drive. It if you are loading thousands of image files or thousands of small files it is slower than just a few larger files. 1from google.colab import drive
2drive.mount('/content/drive/')
34data_dir = '/content/drive/My Drive/Colab Notebooks/<your assets>/'
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.