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
ls -1 | sort -n | head -2000 | xargs -i mv "{}" /dest/folder/ |
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
find `pwd` -maxdepth 1 > path.txt |
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
lsusb -v 2> /dev/null | grep -e "Apple Inc" -A 2 |
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 cv2 | |
>>> flags = [i for i in dir(cv2) if i.startswith('COLOR_')] | |
>>> print flags |
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++ -o test_1 test_1.cpp `pkg-config opencv --cflags --libs` |
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 mount /dev/sdb1 /mnt |
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
url = 'https://farm4.staticflickr.com/3943/15386021170_c2607cb639_z.jpg' | |
#\d+ match digits; \D+ match a non-digit which is "/" after the 1st 4 digits; (d\+) get the last set of digits, in group(6) | |
re.search(r'^(https://)?(farm4\.)?(staticflickr\.com/)?(\d+)?(\D+)(\d+)',url).group(6) | |
#returns 15386021170 |
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
Add the --no-x-check flag in terminal: | |
sudo ./NVIDIAxxxx.run --no-x-check |
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
mount -o remount, rw / |
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
NSURL *theURL = [NSURL URLWithString:@"yourURL"]; | |
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:theURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:20.0f]; | |
//Specify method of request(Get or Post) | |
[theRequest setHTTPMethod:@"GET"]; | |
//Pass some default parameter(like content-type etc.) | |
[theRequest setValue:@"application/json" forHTTPHeaderField:@"Accept"]; | |
[theRequest setValue:@"application/json; charset=UTF-8" forHTTPHeaderField:@"Content-Type"]; |
NewerOlder