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
| //g++ -std=c++11 -Wall vectorvsset.cpp -g -pg -o vectorvsset | |
| //https://stackoverflow.com/questions/24968258/which-is-approach-is-faster-vector-inserted-then-sorted-or-set | |
| #include <time.h> | |
| #include <iostream> | |
| #include <vector> | |
| #include <set> | |
| #include <algorithm> | |
| using namespace std; | |
| void GenRandom(vector<int32_t> &original) |
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 os | |
| if __name__ == "__main__": | |
| fiList = list(os.listdir(".")) | |
| for fina in fiList: | |
| print fina | |
| os.rename(fina, fina.replace("3.0", "3.3")) | |
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
| <p>This is a test page - please return to the <a href="https://portsmouth.greenparty.org.uk">home page</a> to continue</p> | |
| <div id="posts">Loading...</div> | |
| <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script> | |
| <script type="text/javascript" src="https://portsmouth.greenparty.org.uk/assets/js/local_parties/portsmouth/wpapi/wpapi.js"></script> | |
| <script type="text/javascript">// <![CDATA[ | |
| var wp = new WPAPI({endpoint: 'https://greenpompey.org.uk/shades-of-green/wp-json'}); | |
| var blogName = "Shades of Green" | |
| wp.posts().get(function( err, data ) { |
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
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| // boost::geometry | |
| #include <boost/geometry.hpp> | |
| #include <boost/geometry/algorithms/intersection.hpp> | |
| #include <boost/geometry/geometries/geometries.hpp> | |
| #include <boost/geometry/geometries/point_xy.hpp> | |
| typedef boost::geometry::model::d2::point_xy<double> Point; |
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 math | |
| import xml.etree.ElementTree as ET | |
| import matplotlib.pyplot as plt | |
| from pyo5m import OsmData | |
| if __name__=="__main__": | |
| tree = ET.parse("/home/tim/Desktop/CampingMapping/20170709.gpx") | |
| root = tree.getroot() | |
| prevPos = None |
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
| http://unix.stackexchange.com/questions/46122/how-can-i-create-a-deb-package-with-my-compiled-opencv-build | |
| Inspired by https://launchpad.net/~sbadia/+archive/ubuntu/opencv | |
| Interesting: https://github.com/sbadia/opencv-deb | |
| In CMakeCache.txt | |
| //Enable to build Debian packages | |
| CPACK_BINARY_DEB:BOOL=ON |
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 sys | |
| import os | |
| import shutil | |
| if __name__ == "__main__": | |
| if len(sys.argv) < 4: | |
| print ("Usage: {} src_folder dst_folder ith_frame".format(sys.argv[0])) | |
| exit(0) | |
| ithFrame = int(sys.argv[3]) |
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
| #sudo apt install libimage-exiftool-perl | |
| from __future__ import print_function | |
| from PIL import Image | |
| import sys | |
| import os | |
| if __name__ == "__main__": | |
| if len(sys.argv) < 4: | |
| print ("Usage: {} src_folder dst_folder target_size".format(sys.argv[0])) | |
| exit(0) |
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
| #Hash files under working folder recursively | |
| #for hard drive read test. | |
| #Released as CC0 | |
| from __future__ import print_function | |
| import hashlib | |
| import os | |
| import time | |
| if __name__=="__main__": | |
| while 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
| //By Tim Sheerman-Chase, 2017 | |
| //This code may be used under the CC0 license. | |
| #ifndef QUICKSORT_H | |
| #define QUICKSORT_H | |
| #include <iostream> | |
| #include <vector> | |
| #include <cstdlib> | |
| #include <time.h> |