Skip to content

Collection of helpful and not so helpful but funny small scripts

License

Notifications You must be signed in to change notification settings

GrHalbgott/just_scripts

Repository files navigation

Just_Scripts

This repository functions as a collection of some helpful and not so helpful but funny small scripts regarding everything from administration/organisation over calculation in GIS and statistics to simply funny stuff.

Stuff

whisper_transcribe (Python): Transcription using Whisper AI

This small script queries OpenAI's Whisper AI and writes the response to file.
Automated transcription!

random_pwd (Python): Generate a random password

This script generates a random password for you by using different characters (letters, digits, punctuation).
The small commandline-tool even talks to you if you put in wrong answers!

worktime_calculator (C++): Calculate weirdly unuseful worktimes

You can calculate how long a large task consisting of multiple tasks will need to be accomplished depending on helping hands, number of smaller tasks and how much time a small task takes up. Will this ever be useful to anyone?

datediff_calculator (Python): Calculate differences between two dates

This script can calculate the difference between two dates in multiple time units. Interactive.

midi_length_sum (Python): Sum up the length of multiple midi files

Well it does what it says. Sums up the seconds and coverts them to a readable time format.

GIS scripts

ohsome_landuse (Batch): Download landuse OSM data from the ohsome-API

With the help of this script you can download multiple landuse files at once.
If you want to adapt it to your application, you should change the bounding box, the time and the name of the output files (line 2, 3 and 5 of each block).

roi_extractor (Batch/GDAL): Extract region of interest from GADM (Germany) dataset

Your input (region) is handled like a variable and gets implemented in the command. By changing "DEU" in the command to your country of interest, you can use the command for every region in the world.
GADM datasets are found under https://gadm.org/download_country.html.
This can be implemented for example in a clip operation (next one).

clip (Batch/GDAL): Clip a raster with a shapefile

Well it does what it says.

dem_diff (Python): Calculate difference between two raster images

If you have two raster images of the same area but during different times, you can use this script to calculate the differences between them.
Adapting it to your application works by chaning paths and file names.

query_ohsome_api (Python): Query OSM data using Ohsome API for a list of aois

This python script is the basic template to query OSM data using the Ohsome API. You can specify the list of aois, the filters and the time.