cees@cees-XPS-13-9380:~/code/space-monitor$ python3 -m venv venv
cees@cees-XPS-13-9380:~/code/space-monitor$ source venv/bin/activate
(venv) cees@cees-XPS-13-9380:~/code/space-monitor$ which python3
/home/cees/code/space-monitor/venv/bin/python3
(venv) cees@cees-XPS-13-9380:~/code/space-monitor$ python3 -m pip install logdna
Processing /home/cees/.cache/pip/wheels/af/ce/e9/fccf04ebc826e8cff5ec031f8ecc0c3b4092b44bc692f22a3f/logdna-1.5.3-py3-none-any.whl
Collecting requests
Using cached requests-2.23.0-py2.py3-none-any.whl (58 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2020.4.5.1-py2.py3-none-any.whl (157 kB)
Collecting idna<3,>=2.5
Using cached idna-2.9-py2.py3-none-any.whl (58 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Using cached urllib3-1.25.9-py2.py3-none-any.whl (126 kB)
Collecting chardet<4,>=3.0.2
Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Installing collected packages: certifi, idna, urllib3, chardet, requests, logdna
Successfully installed certifi-2020.4.5.1 chardet-3.0.4 idna-2.9 logdna-1.5.3 requests-2.23.0 urllib3-1.25.9
(venv) cees@cees-XPS-13-9380:~/code/space-monitor$ python3 -m pip freeze > requirements.txt
(venv) cees@cees-XPS-13-9380:~/code/space-monitor$ cat requirements.txt
certifi==2020.4.5.1
chardet==3.0.4
idna==2.9
logdna==1.5.3
requests==2.23.0
urllib3==1.25.9
(venv) cees@cees-XPS-13-9380:~/code/space-monitor$ python3 -m pip install -r requirements.txt
Requirement already satisfied: certifi==2020.4.5.1 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (2020.4.5.1)
Requirement already satisfied: chardet==3.0.4 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (3.0.4)
Requirement already satisfied: idna==2.9 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (2.9)
Requirement already satisfied: logdna==1.5.3 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 4)) (1.5.3)
Requirement already satisfied: requests==2.23.0 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 5)) (2.23.0)
Requirement already satisfied: urllib3==1.25.9 in ./venv/lib/python3.7/site-packages (from -r requirements.txt (line 6)) (1.25.9)
(venv) cees@cees-XPS-13-9380:~/code/space-monitor$ deactivate
cees@cees-XPS-13-9380:~/code/space-monitor$
Cees's Blog
Highlight
2020-05-29
Keep your system and project tidy with a Python virtual environment folder
2020-02-27
2019-05-07
2016-12-13
More info
I tend to more easily post tech news at GitHub Gist, Google+, and older Google+ now. See also my old snippets and user styles.
2015-10-14
My Firefox won't paste text! A workaround using AutoHotkey.
In Firefox I often find myself unable to paste into Facebook or YouTube comment boxes. I've been a Mozilla fan since 3.0, but bugs like these make Firefox a pain. Here's a workaround that works in my 64-bit Windows 7:
- Install AutoHotkey.
- Save this script as "type_clipboard.ahk":
; http://www.autohotkey.com/board/topic/76296-type-out-text-in-clipboard/ ; ctrl+win+v ^#v:: sendraw %clipboard% return
- Run the script and press Ctrl+Win+V to have AutoHotkey type your clipboard text into Firefox.
2015-03-05
#TheDress
The dress is Coffee and Cool grey according to my new script:
What's that color?
Try these context-dependent colors: rgb(113,94,58) and rgb(135,154,189)
2014-11-04
Cyrillic to Latin
Tired of unreadable Russian characters? Try this JavaScript:
var Cyrillic_Latin = { "А":"A", "а":"a", "Б":"B", "б":"b", "В":"V", "в":"v", "Г":"G", "г":"ɡ", "Д":"D", "д":"d", "Е":"Je", "е":"e", "Ё":"Jo", "ё":"jo", "Ж":"S", "ж":"s", "З":"Z", "з":"z", "И":"I", "и":"i", "Й":"J", "й":"j", "К":"K", "к":"k", "Л":"L", "л":"l", "М":"M", "м":"m", "Н":"N", "н":"n", "О":"O", "о":"o", "П":"P", "п":"p", "Р":"R", "р":"r", "С":"S", "с":"s", "Т":"T", "т":"t", "У":"U", "у":"u", "Ф":"F", "ф":"f", "Х":"X", "х":"x", "Ц":"Ts", "ц":"ts", "Ч":"Tj", "ч":"tj", "Ш":"Sh", "ш":"sh", "Щ":"Sh", "щ":"sh", "Ъ":"", "ъ":"", "Ы":"E", "ы":"e", "Ь":"ʲ", "ь":"ʲ", "Э":"E", "э":"e", "Ю":"Ju", "ю":"ju", "Я":"Ja", "я":"ja", "І":"I", "і":"i", "Ѳ":"F", "ѳ":"f", "Ѣ":"E", "ѣ":"e", "Ѵ":"I", "ѵ":"i", "Ѕ":"Z", "ѕ":"z", "Ѯ":"Ks", "ѯ":"ks", "Ѱ":"Ps", "ѱ":"ps", "Ѡ":"O", "ѡ":"o", "Ѫ":"Ju", "ѫ":"ju", "Ѧ":"Ja", "ѧ":"ja", "Ѭ":"Ju", "ѭ":"ju", "Ѩ":"Ja", "ѩ":"ja" } function Cyr2Lat(text){ var out = "" for(i in text) out += Cyrillic_Latin[text[i]] || text[i] return out }Example:
Cyr2Lat("чем") "tjem" Cyr2Lat("форма") "forma"
Here it is as a bookmarklet that converts the current page (thanks to this snippet):
javascript:(function(){function t(t){var n="";for(var i in t)n+=e[t[i]]||t[i];return n}function n(e){if(e.nodeType==3&&e.nodeValue.trim()!=""){e.nodeValue=t(e.nodeValue)}else{for(var i=e.childNodes.length-1;i>=0;--i){n(e.childNodes[i])}}}var e={"А":"A","а":"a","Б":"B","б":"b","В":"V","в":"v","Г":"G","г":"ɡ","Д":"D","д":"d","Е":"Je","е":"e","Ё":"Jo","ё":"jo","Ж":"S","ж":"s","З":"Z","з":"z","И":"I","и":"i","Й":"J","й":"j","К":"K","к":"k","Л":"L","л":"l","М":"M","м":"m","Н":"N","н":"n","О":"O","о":"o","П":"P","п":"p","Р":"R","р":"r","С":"S","с":"s","Т":"T","т":"t","У":"U","у":"u","Ф":"F","ф":"f","Х":"X","х":"x","Ц":"Ts","ц":"ts","Ч":"Tj","ч":"tj","Ш":"Sh","ш":"sh","Щ":"Sh","щ":"sh","Ъ":"","ъ":"","Ы":"E","ы":"e","Ь":"ʲ","ь":"ʲ","Э":"E","э":"e","Ю":"Ju","ю":"ju","Я":"Ja","я":"ja","І":"I","і":"i","Ѳ":"F","ѳ":"f","Ѣ":"E","ѣ":"e","Ѵ":"I","ѵ":"i","Ѕ":"Z","ѕ":"z","Ѯ":"Ks","ѯ":"ks","Ѱ":"Ps","ѱ":"ps","Ѡ":"O","ѡ":"o","Ѫ":"Ju","ѫ":"ju","Ѧ":"Ja","ѧ":"ja","Ѭ":"Ju","ѭ":"ju","Ѩ":"Ja","ѩ":"ja"};n(document)})()
Subscribe to:
Posts (Atom)