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 | |
| for i in *.wmv; do | |
| avconv -same_quant -i i.wmv converted/i.mkv | |
| rm i.wmv | |
| ln -s i.wmv converted/i.mkv | |
| 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
| sudo nano /boot/config.txt | |
| - add this line: | |
| decode_WVC1=YOUR_LICENSE | |
| sudo reboot | |
| - reboot the computer | |
| vcgencmd codec_enabled WVC1 | |
| - check if the codec is enabled |
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
| omxplayer -p -o hdmi --win 'x1 y1 x2 y2' FILENAME.wmv | |
| #-o --adev device Audio out device : e.g. hdmi/local/both/alsa[:device] | |
| #-p --passthrough Audio passthrough | |
| # --win 'x1 y1 x2 y2' Set position of video window | |
| # --aspect-mode type Letterbox, fill, stretch. Default: stretch if win is specified, letterbox otherwise | |
| # --dbus_name name default: org.mpris.MediaPlayer2.omxplayer |
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 requests | |
| #add flask/routes | |
| #need to implement oauth2, send access token | |
| r = requests.get('https://graph.facebook.com/v2.9/Spurs/photos') | |
| images = [] | |
| for image in r['data']: | |
| # example image: https://graph.facebook.com/v2.9/10154433099266981/picture?type=large | |
| images.append("https://graph.facebook.com/v2.9/{}/picture?type=large".format(image["id"])) |
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
| dl aeskeydb.bin | |
| magnet:?xt=urn:btih:18b3a17f78e2376e05feaa150749d9fd689b25dc&dn=aeskeydb.bin&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=http%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Fzer0day.ch%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=http%3A%2F%2Fexplodie.org%3A6969%2Fannounce&tr=udp%3A%2F%2Fexplodie.org%3A6969%2Fannounce&tr=udp%3A%2F%2F9.rarbg.com%3A2710%2Fannounce&tr=udp%3A%2F%2Fp4p.arenabg.com%3A1337%2Fannounce&tr=http%3A%2F%2Fp4p.arenabg.com%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.aletorrenty.pl%3A2710%2Fannounce&tr=http%3A%2F%2Ftracker.aletorrenty.pl%3A2710%2Fannounce&tr=http%3A%2F%2Ftracker1.wasabii.com.tw%3A6969%2Fannounce&tr=http%3A%2F%2Ftracker.baravik.org%3A6970%2Fannounce&tr=http%3A%2F%2Ftracker.tfile.me%2Fannounce&tr=udp%3A%2F%2Ftorrent.gresille.org%3A80%2Fannounce&tr=http%3A%2F%2Ftorrent.gresille.org%2Fannounce&tr=udp%3A%2F%2Ftracker.yoshi210.com%3A6969%2Fann |
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 app import app, db | |
| from app.models import Queue | |
| questions = Queue.query.get(15).images.all() | |
| answers = Queue.query.get(16).images.all() | |
| print("# of questions: {}".format(len(questions))) | |
| print("# of answers: {}".format(len(answers))) | |
| trivia = Queue("trivia") |
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
| # all probe requests for this node for last 30 mins | |
| # count number of mac addresses | |
| # avg rssi mac address for each mad_address for last 30 mins | |
| # if avg rssi >= 60 for > 5mins within 20min timeframe: | |
| # mac_address is a visitor | |
| # else: | |
| # mac_address is a passerby | |
| graph # of visitors vs passerbys |
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
| # smtp library that does it all for you! | |
| import smtplib as s | |
| # organic whole range smtp server goes here | |
| smtpServer = "" | |
| # usually 25, 465, 587 | |
| smtpPort = | |
| username = "" | |
| password = "" |
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
| #https://github.com/schollz/howmanypeoplearearound | |
| startDate = datetime.today() - datetime.timedelta(days=1) # today - 1day aka yesterday | |
| endDate = datetime.today() | |
| strengthThreshold = -60 | |
| probes = Probe.query.filter_by(Probe.first_seen > startDate) # first_seen > startDate | |
| .filter_by(Probe.last_seen < endDate) # last_seen < endDate | |
| .filter_by(Probe.rssi > strengthThreshold).all() # rssi > strengthThreshold | |
| macs = [] |
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 https://www.dataiku.com/learn/guide/code/reshaping_data/sessionization.html | |
| import dataiku | |
| import pandas as pd | |
| from datetime import timedelta | |
| # define treshold value | |
| T = timedelta(seconds=30*60) | |
| # load dataset | |
| toy_data = dataiku.Dataset("toy_data").get_dataframe() |