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 logging | |
| import psycopg2 | |
| from emily_backend import settings # pass Your settings here | |
| db_config = settings.DATABASES.get('default') | |
| logger = logging.getLogger(__name__) | |
| try: | |
| conn = psycopg2.connect(f"" |
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 | |
| LENGTH=300 # length in seconds | |
| INPUT="./music.mp3" # path to input file | |
| for i in {0..180..5}; do | |
| ffmpeg -i $INPUT -t $LENGTH -ss $[$i * 60] -acodec copy "./$i.mp3" | |
| done |
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
| docker rm $(docker ps -a --format "table {{.ID}}\t{{.Status}}" | grep -v "Exited (0)" | awk '{print $1}' | grep -v "CONTAINER") |
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
| docker rmi $(docker images | grep "<none>" | awk '{print $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
| #!/bin/bash | |
| PLATFORM=linux64 # Change this line if You're using other platform | |
| VERSION=$(curl http://chromedriver.storage.googleapis.com/LATEST_RELEASE) | |
| curl http://chromedriver.storage.googleapis.com/$VERSION/chromedriver_$PLATFORM.zip -LOk | |
| unzip chromedriver_* | |
| rm chromedriver_* |
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 | |
| sleep 20 | |
| export DISPLAY=':0.0' | |
| while [ 1 ]; do | |
| xdotool mousemove 677 382 click 1 | |
| xdotool mousemove 10000 10000 | |
| sleep 10 | |
| xdotool mousemove 940 390 click 1 | |
| xdotool mousemove 10000 10000 |
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 microbit import display, Image, button_a, button_b, pin0, running_time | |
| import random | |
| class Utils: | |
| @staticmethod | |
| def deepcopy(arr): | |
| return [row[:] for row in arr] | |
| @staticmethod |
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 random | |
| import radio | |
| from microbit import display, Image, button_a, button_b, pin0, running_time | |
| class Utils: | |
| @staticmethod | |
| def deepcopy(arr): | |
| return [row[:] for row in arr] |
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 random | |
| import radio | |
| from microbit import display, Image, button_a, button_b, pin0, running_time | |
| class Utils: | |
| @staticmethod | |
| def deepcopy(arr): | |
| return [row[:] for row in arr] |
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 consts.resource_paths | |
| import cv2 | |
| import depthai | |
| if not depthai.init_device(consts.resource_paths.device_cmd_fpath): | |
| raise RuntimeError("Error initializing device. Try to reset it.") | |
| p = depthai.create_pipeline(config={ | |
| "streams": ["metaout", "previewout"], | |
| "ai": { |
OlderNewer