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 | |
| random_number_file = open('rnd100k.txt', 'w') | |
| digits = 100000 # number of digits | |
| for count in range (digits): | |
| number = random.randint(0,9) # random number between 0 and 9 | |
| random_number_file.write(str(number)) | |
| random_number_file.close() |
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 RPi.GPIO as GPIO | |
| import os | |
| import sys | |
| from subprocess import Popen | |
| GPIO.setmode(GPIO.BCM) | |
| GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_UP) | |
| airstrip = ("/home/pi/Videos/airstrip.mp4") | |
| takeoff = ("/home/pi/Videos/takeoff.mp4") |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| # | |
| from imdb import IMDb # https://imdbpy.readthedocs.io | |
| import sys | |
| ia = IMDb() | |
| if len(sys.argv) > 1: | |
| movies = ia.search_movie(sys.argv[1]) |
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
| -- | |
| -- Dette programmet lar deg opprette en database | |
| -- over filmer. Algoritmer for sortering, listing | |
| -- til bøde skjerm og tekstfil, legge til nye filmer, | |
| -- og søk er inkludert som egne prosedyrer. | |
| -- | |
| -- Dette programmet er skrevet av Ørjan Vøllestad | |
| -- Dato fullført: 03.04.2003 | |
| -- | |
| with Ada.Text_Io; use Ada.Text_Io; |
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
| #!/usr/bin/env python | |
| #-*- coding:utf-8 -*- | |
| import time | |
| import sys | |
| import os | |
| from turtle import * | |
| ''' | |
| pi-tau-art.py - Copyright 2019 Ørjan Hoyd H. Vøllestad <hoyd@earth> | |
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 | |
| # CROP IMAGE INTO HD FORMAT 1080X720 FROM CENTRE | |
| convert $1 -resize 1080x1080 resized-$1 | |
| convert resized-$1 -gravity center -crop 1080x720 cropped-$1 | |
| # GET FIVE MOST DOMINANT HEX COLORS FROM ANY IMAGE | |
| convert cropped-$1 +dither -colors 5 -unique-colors txt: | awk '{ print $3 }' | grep '#' > hex.tmp | |
| # CREATE A RECTANGLE FROM EACH HEX COLOR WITH HEX CODE AS TEXT IN THE MIDDLE |
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 | |
| # Thanks to https://github.com/sbutcher/ripomatic | |
| INPUT_DEV=/dev/sr0 | |
| OUTPUT_FOLDER=`pwd` | |
| SERIES=01 | |
| STARTS_FROM=01 | |
| # 900 is 15 mins | |
| MINLENGTH="900" | |
| # 4200 is 1hr 10 mins |
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 | |
| # Thanks to https://github.com/sbutcher/ripomatic | |
| INPUT_DEV=/dev/sr0 | |
| OUTPUT_FOLDER=$(pwd) | |
| PRESET="High Profile" | |
| LSDVDOUTPUT=$(lsdvd "$INPUT_DEV") | |
| TITLE=$(echo "$LSDVDOUTPUT" | grep -i Disc | sed 's/Disc Title: //g') | |
| LONGEST_TITLE=$(echo "$LSDVDOUTPUT" | sed '$!d' | sed 's/.*\(..\)/\1/') |
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 | |
| URL="http://www.fetteresso.org/media/sermons" | |
| FILE="url_$(date +%d-%m-%Y).txt" | |
| if [ ! -f "$FILE" ]; then | |
| # Get the mp3 urls | |
| curl $URL > $FILE | |
| cat $FILE | \ | |
| awk '/{title/{getline; print}' | \ |