javascript:(function(){
allowCopyAndPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('copy', allowCopyAndPaste, true);
document.addEventListener('paste', allowCopyAndPaste, true);
document.addEventListener('onpaste', allowCopyAndPaste, true);
})();
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://www.python.org/ftp/python/3.4.5/Python-3.4.5.tgz | |
tar -zxvf Python-3.4.5.tgz | |
cd Python-3.4.5/ | |
./configure --with-pydebug --prefix=/home/<USERNAME>/<LOCALPROGRAMDIR> | |
make altinstall -s -j<CPU_CORES--CHECK_WITH_NPROC_TO_SEE_HOW_MANY_YOU_HAVE> | |
ln -s /home/USERNAME/<LOCALPROGRAMDIR>/python3.4 /home/USERNAME/<LOCALPROGRAMDIR>/python3 | |
# DONE -- make sure your path looks in /home/<USERNAME>/<LOCALPROGRAMDIR> first | |
# e.g. echo "export PATH=/home/<USERNAME>/<LOCALPROGRAMDIR>:$PATH" >> ~/bash_profile | |
# followed by source ~/bash_profile |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
- There are always 24 hours in a day.
- February is always 28 days long.
- Any 24-hour period will always begin and end in the same day (or week, or month).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# from https://chromium.woolyss.com/ | |
# and https://gist.github.com/addyosmani/5336747 | |
# and https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md | |
sudo apt-get update | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:canonical-chromium-builds/stage | |
sudo apt-get update | |
sudo apt-get install chromium-browser | |
chromium-browser --headless --no-sandbox http://example.org/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
import cv2 | |
img = cv2.imread('/Users/mustafa/test.jpg') | |
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
plt.imshow(gray) | |
plt.title('my picture') | |
plt.show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import http.server | |
import socketserver | |
from http import HTTPStatus | |
class Handler(http.server.SimpleHTTPRequestHandler): | |
def do_GET(self): | |
self.send_response(HTTPStatus.OK) | |
self.end_headers() | |
self.wfile.write(b'Hello world') |
- Checkout your repository wiki via git.
- You can find the URL at the lower-right of your wiki page (look for the label "Clone this wiki locally") - Now that you have pulled down a local copy of your github repo wiki, create a new file in the repo called
_Sidebar.md
- Note that other names might not work. - Within the newly created
_Sidebar.md
file, you can add appropriate [[link]] markdown syntax. - Add your new file to the local repository, and push via git push origin master.
With the same procedure, you can add a header(_Header.md
) and footer(_Footer.md
) file.