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
| ''' | |
| Using OpenCV takes a mp4 video and produces a number of images. | |
| Requirements | |
| ---- | |
| You require OpenCV 3.2 to be installed. | |
| Run | |
| ---- | |
| Open the main.py and edit the path to the video. Then run: |
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-get update | |
| sudo apt-get install bcmwl-kernel-source | |
| sudo modprobe wl | |
| Opensuse: | |
| Add repo: | |
| zypper ar -f -n packman http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_42.2/ packman |
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 -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz |
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 | |
| # Distributed under the GNU GPL | |
| # Check if user is root | |
| if [ "$EUID" -ne 0 ] | |
| then echo "Please run as root" | |
| exit | |
| fi | |
| # Get path |
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 | |
| from PyQt5 import QtWidgets | |
| def window(): | |
| app = QtWidgets.QApplication(sys.argv) | |
| w = QtWidgets.QWidget() | |
| w.setWindowTitle('PYQt5 lesson 1') | |
| w.show() | |
| sys.exit(app.exec_()) |
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/sh -x ## or just ` curl -Ls http://git.io/vRozn | sh `. | |
| ## Downloads the Mac OS X 10.10 Recovery Partition update, | |
| ## Copy's over the 10.10 version of Disk Utility.app, then | |
| ## use git to apply a binary patch so it will run on 10.11+. | |
| cd /tmp | |
| rm -rf DU1010 | |
| mkdir DU1010 |
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 http://stackoverflow.com/questions/13483430/how-to-make-rounded-percentages-add-up-to-100 | |
| function foo(l, target) { | |
| var off = target - _.reduce(l, function(acc, x) { return acc + Math.round(x) }, 0); | |
| return _.chain(l). | |
| sortBy(function(x) { return Math.round(x) - x }). | |
| map(function(x, i) { return Math.round(x) + (off > i) - (i >= (l.length + off)) }). | |
| value(); | |
| } |
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
| echo "Fixing ownership and permissions..." | |
| chmod -R 755 /System/Library/Extensions/* | |
| chown -R root:wheel /System/Library/Extensions/* | |
| chown root:admin / | |
| echo "Rebuilding kext cache..." | |
| kextcache -system-prelinked-kernel | |
| kextcache -system-caches |
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
| /* | |
| ** Binary Search Tree implementation in C++ | |
| ** Harish R | |
| */ | |
| #include<iostream> | |
| using namespace std; | |
| class BST { | |
| struct node { |