UserScripts
-- Shotwell photo.db SQLITE VIEW to query by tag_name | |
-- | |
-- Usage after creating the view: | |
-- SELECT * from v_tagged_photos WHERE tag_name LIKE '%slo%'; | |
-- | |
-- (the view is as hellish as the db layout of Shotwell) | |
-- | |
-- thx @ https://gist.github.com/ChiChou/97a53caa2c0b49c1991e?permalink_comment_id=4721301#gistcomment-4721301 | |
-- thx @ https://stackoverflow.com/questions/46483859/split-values-in-parts-with-sqlite |
a block with length 0.35m, width 0.25m, height 0.35m weighs 12kg. How deep does it sink in sea water?
To determine how deep the block sinks in sea water, we need to consider the buoyant force acting on the block and compare it to the weight of the block.
The buoyant force is equal to the weight of the water displaced by the block. In this case, the block is submerged in sea water, which has a density of approximately 1,025 kg/m³.
""" | |
Written by GPT3 from this English prompt (with one tweak to the prompt, to get | |
the timestamp parameter to not error out, and PEP8 fixes): | |
---- | |
1. Open a sqlite database with a name like `2022-07-17 17.48.19.db` or | |
`2021-04-11 08.44.16.db` | |
2. Inside is a table called `locations`, with headers [LOCTYPE INTEGER, | |
TIMESTAMP BIGINT, LATITUDE REAL, LONGITUDE REAL,ALTITUDE REAL, ACCURACY |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/ipc.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
void touch(char *file_name) { | |
FILE *fp; | |
if ((fp = fopen(file_name, "w")) == NULL) { |
candump -t A can0 | sed -e 's/ (.* \(.*\)\.\(...\).*) *can. *\([0-9A-F]*\) *\[.*\] */\1.\2 R \3 /g' -e 's/[\r\n]*$/\r/' | nc -l -p 1457 2>&1 | sed -u -n -e 's/^\([^ ]*\) /\1#/g;s/ //g;s/\r//g;/^$/!p;' | while IFS="" read CMD ; do cansend can0 $CMD ; done | |
/* | |
NASAClipper_I2C_to_NMEA v0.5.2 | |
Decode the NASA Clipper Data into a NMEA compatible serial string | |
written by Peter Holtermann | |
with additions from Victor Klein | |
In einer Abbildung im Manual kann man auf der Buchse ein "LTW" lesen, also AmphenolLTW als Hersteller. Das Kabel könnte dann ABU-12BFFM-LL7A__ sein.
Mit den Platinenbildern der FCC Anmeldung kann man nachvollziehen, an welche Pins die NMEA-Datenleitungspaare gehen. Ausserdem kann man die Leitungen der "silent" Pins in Richtung eines ICs sehen, der ein Optokoppler sein könnte, was zur Funktion passen würde.
Die Litzenfarben des Amphenol-Pigtails entsprechen denen aus dem Handbuch des AIS Senders.
#!/usr/bin/env python3 | |
import tr064 | |
import argparse | |
import configparser | |
from os import path | |
from socket import gethostbyname_ex | |
from time import sleep | |
args = {} |