python -OO -m py_compile <your program.py>
This file contains 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
# (Lines after and before keyword) | |
grep -A5 -B5 keyword | |
# Find empty lines | |
grep -E --line-number --with-filename '^$' file.txt |
This file contains 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
#include <iostream> | |
#include <string> | |
#include <curl/curl.h> | |
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) | |
{ | |
((std::string*)userp)->append((char*)contents, size * nmemb); | |
return size * nmemb; | |
} |
This file contains 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
[Desktop Entry] | |
Encoding=UTF-8 | |
Version=1.0 | |
Type=Application | |
Terminal=false | |
Exec=/path/to/executable | |
Name=Name of Application | |
Icon=/path/to/icon | |
# Store in ~/.local/share/applications |
This file contains 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
#include <chrono> | |
#include <iostream> | |
#include <thread> | |
class Timer { | |
private: | |
std::chrono::time_point<std::chrono::high_resolution_clock> mStart; | |
public: | |
Timer() { mStart = std::chrono::high_resolution_clock::now(); } |
This file contains 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
''' | |
Adopted from https://stackoverflow.com/questions/19504350/how-to-convert-numbers-to-words-without-using-num2word-library for Turkish | |
''' | |
import re | |
ones = { | |
0: '', 1: 'bir', 2: 'iki', 3: 'üç', 4: 'dört', 5: 'beş', 6: 'altı', | |
7: 'yedi', 8: 'sekiz', 9: 'dokuz', 10: 'on', 11: 'onbir', 12: 'oniki', |
OlderNewer