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
scp [email protected]:/home/test/carambola/bin/ramips/openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin /tmp | |
sysupgrade -v -n /tmp/openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin |
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
#!/bin/bash | |
# Prepare | |
# Install dropbox_iploader.sh script from https://github.com/andreafabrizi/Dropbox-Uploader | |
# Add [* * * * * /usr/bin/dropbox_action.sh] to crontab | |
# Usage | |
# Create file /remote/input.txt un your dropbox folder | |
# Put single line in this file to run in remote Caramola (without new line) | |
# Read result after minute or so in output.txt file |
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
import os | |
def execution_directory(): | |
exec_place = os.getcwd() | |
script_place = os.path.dirname(os.path.realpath(__file__)) | |
arguments_place = str(sys.argv[0]) | |
arguments_place = ("\\").join(arguments_place.split('\\')[0:-1]) | |
return exec_place, script_place, arguments_place | |
print execution_folders() |
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
import os | |
import fnmatch | |
def recursive_glob(treeroot, pattern): | |
results = [] | |
for base, dirs, files in os.walk(treeroot): | |
goodfiles = fnmatch.filter(files, pattern) | |
results.extend(os.path.join(base, f) for f in goodfiles) | |
return results |
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
-- Duomenys: | |
-- zigmas | |
-- zigmas | |
-- petras | |
-- Rezultatai: | |
-- zigmas 2 | |
-- petras 1 | |
select name, count(*) as n FROM orders order by n GROUP BY name |
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
def dict2obj(d): | |
if isinstance(d, list): | |
d = [dict2obj(x) for x in d] | |
if not isinstance(d, dict): | |
return d | |
class C(object): | |
pass | |
o = C() | |
for k in d: | |
o.__dict__[k] = dict2obj(d[k]) |
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
import cv2 | |
import sys | |
import numpy as np | |
camera = cv2.VideoCapture("video.avi") | |
# Setup BlobDetector | |
detector = cv2.SimpleBlobDetector_create() | |
params = cv2.SimpleBlobDetector_Params() | |
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
from moviepy.editor import * | |
start = 0.0 | |
end = 10.0 | |
width = 500 | |
fps = 20 | |
speedx = 2 | |
file_in = "video.avi" | |
file_out = "img.gif" |
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
import cv2 | |
from tqdm import trange | |
cap = cv2.VideoCapture('10.avi') | |
f = open('results.txt', 'w') | |
frame_count = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) | |
for i in trange(frame_count, unit=' frames', leave=False, dynamic_ncols=True, desc='Calculating blur ratio'): |
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
# -*- coding: utf-8 -*- | |
__author__ = "Saulius Lukse" | |
__copyright__ = "Copyright 2016, kurokesu.com" | |
__version__ = "0.1" | |
__license__ = "GPL" | |
from PyQt4 import QtCore, QtGui, uic | |
import sys |
OlderNewer