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
U-Boot latest-2022.10-1-4debc57a-00007-gb923c1b6 (Mar 06 2023 - 15:54:16 +0000) | |
SoC: Rockchip rk3399 | |
Reset cause: POR | |
Model: Radxa ROCK 4C+ | |
DRAM: 3.9 GiB | |
PMIC: RK8090 (on=0x80, off=0x10) | |
Core: 283 devices, 27 uclasses, devicetree: separate | |
MMC: mmc@fe310000: 2, mmc@fe320000: 1, mmc@fe330000: 0 | |
Loading Environment from MMC... Card did not respond to voltage select! : -110 |
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
#### UPDATE | |
FOR RPI CLIENTS SOLVED WITH | |
sudo mkdir -p /srv/tftp/srv; sudo ln -s ../.. /srv/tftp/srv/tftp | |
as suggested by alkisg at IRC CHANNEL | |
More information available also at | |
https://irclogs.ltsp.org/?d=2022-05-16 |
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
In this example, gm_previo is where the points are stored and acoustic_transect where the lines live | |
select | |
t1.survey, | |
t2.evaluation_code, | |
t1.interv, | |
(t1.date_m||' '||t1.time_m)::timestamp as interv_tmp, | |
t1.radial, | |
t2.species_code, |
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
# RASPBERRY PI OUTPUT | |
root@raspberrypi:~# cat /proc/cmdline /proc/mounts | |
coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=1024 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 ip=dhcp root=/dev/nfs nfsroot=192.168.2.1:/srv/ltsp/raspios,vers=3,tcp,nolock init=/usr/share/ltsp/client/init/init ltsp.image=images/raspios.img console=ttyS0,115200 console=tty1 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles modprobe.blacklist=bcm2835_v4l2 | |
192.168.2.1:/srv/ltsp/raspios / nfs rw,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.2.1,mountvers=3,mountproto=tcp,local_lock=all,addr=192.168.2.1 0 0 | |
devtmpfs /dev devtmpfs rw,relatime,size=439912k,nr_inodes=109978,mode=755 0 0 | |
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 | |
proc /proc proc rw,relatime 0 0 | |
securityfs /sys/kernel/security securityfs rw,n |
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 have this hard-coded label template, to simplify something like | |
label="""My label title is %s. | |
And %s likes it. | |
""" %(title, name) | |
return label | |
# Question: How could I load a similar template from a file but still being able to interpolate the strings? | |
# First thought is something like | |
# file template.txt content should be something liie |
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
# Thanks to ne2k from #postgresql IRC for the tips on quoting and getting data into the db | |
#!/usr/bin/bash | |
access_db_name=$1 | |
destination_db=$2 | |
user=$3 | |
postgres_db_name=${access_db_name,,} | |
#echo "$postgres_db_name" |
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
# Aspecto final de la función siguiendo consejos de Octavio/Jaime Casanova | |
CREATE or replace FUNCTION updatevar(dat jsonb, variable varchar,newval numeric) | |
RETURNS jsonb AS | |
$BODY$ | |
DECLARE | |
update_query varchar; | |
newjson jsonb; | |
BEGIN |
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 or replace FUNCTION alk5(year int, quarter int, species_code varchar) | |
RETURNS setof mytype AS | |
$BODY$ | |
DECLARE | |
fields_query varchar; | |
fields_list varchar; | |
alk_query varchar; | |
type_query varchar; | |
type2_query varchar; | |
ages record; |
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
Supongamos que partimos de la siguiente tabla o, en este caso, vista: | |
Vista «public.alk_05» | |
Columna | Tipo | | |
--------------+-----------------------+ | |
survey | character varying(20) | | |
year | double precision | | |
quarter | numeric | | |
month | integer | | |
species_code | character varying(5) | |
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 | |
from PyQt5 import QtCore, QtGui, QtSql, QtWidgets | |
import sys | |
import os | |
class SpeciesChooser(QtWidgets.QWidget): | |
def __init__(self, survey, vessel, db): | |
super().__init__() | |
self.db=db |