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 | |
MAXLABELCOUNT=4 | |
MINCONFIDENCE=90 | |
mkdir smallpics | |
# create smaller versions, that are both small and big enough for image recognition | |
parallel convert {} -resize 2048x2048 -quality 90 smallpics/{} ::: *.jpg |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Get-ChildItem | | |
Where-Object -Property "Name" -Like "*remove this part from the filename*" | # filtering | |
ForEach-Object { | |
# action to do. Case in point: rename the file. Note the parentheeses around the two parameters. | |
Move-Item ($_.Name) ([System.Text.RegularExpressions.Regex]::Replace($_.Name, "remove this part from the filename", "")) | |
} |
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
-- i_am_spatial.raw_gpx_data's gpx_xml column contains GPX data stored as XML. | |
-- below query lists the trackpoints from this table, along with the file_id they belong to. | |
-- | |
-- PostGIS is necessary to have the geometry data type available. Otherwise, the outermost SELECT can be removed. | |
SELECT | |
file_id,SELECT | |
file_id, | |
point_time, | |
lat, |
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
CREATE FUNCTION pseudorandom(seed DOUBLE PRECISION, n int) | |
RETURNS DOUBLE PRECISION AS $$ | |
-- Set the seed (optional). When recursing, this is obviously not done. | |
SELECT CASE WHEN seed IS NOT NULL THEN setseed(seed) END; | |
-- recurse until counter reaches 0 | |
SELECT CASE WHEN n>0 THEN pseudorandom(NULL, n-1) END; | |
-- run random() once. When counter reached 0, this will be the returned. |
OlderNewer