2024年6月21日星期五

nvidia-smi, not enough memory for the allocation

 [ 1484.096449] __vm_enough_memory: pid: 2966, comm: nvidia-smi, not enough memory for the allocation

[ 1484.096456] __vm_enough_memory: pid: 2966, comm: nvidia-smi, not enough memory for the allocation

[ 1484.096457] __vm_enough_memory: pid: 2966, comm: nvidia-smi, not enough memory for the allocation

[ 1500.015549] __vm_enough_memory: pid: 2967, comm: nvidia-smi, not enough memory for the allocation

[ 1500.015558] __vm_enough_memory: pid: 2967, comm: nvidia-smi, not enough memory for the allocation

[ 1500.015560] __vm_enough_memory: pid: 2967, comm: nvidia-smi, not enough memory for the allocation

[ 1520.960394] __vm_enough_memory: pid: 2970, comm: nvidia-smi, not enough memory for the allocation

[ 1520.960402] __vm_enough_memory: pid: 2970, comm: nvidia-smi, not enough memory for the allocation

[ 1520.960403] __vm_enough_memory: pid: 2970, comm: nvidia-smi, not enough memory for the allocation

[ 1732.930913] __vm_enough_memory: pid: 3027, comm: nvidia-smi, not enough memory for the allocation

[ 1732.930919] __vm_enough_memory: pid: 3027, comm: nvidia-smi, not enough memory for the allocation

[ 1732.930921] __vm_enough_memory: pid: 3027, comm: nvidia-smi, not enough memory for the allocation

2024年6月12日星期三

ogr2ogr 使用sql 从 gpkg 中导出属性表

 ogr2ogr   -f   CSV  aa.csv    mdf.gpkg  -sql "select x, y, '1' as code from table002"

ogr2ogr -f CSV out.csv  -sql "select st_x(pt.geom), st_y(pt.geom), '1' as code from Vertices as pt" in.gpkg

ogr2ogr -f CSV out.csv  -sql "select st_x(pt.geom), st_y(pt.geom), pt.marker as code from Vertices as pt" in.gpkg

输出的csv文件中,最后一列,总是被双引号包起来,怎么去掉呢?

添加选项   -lco STRING_QUOTING=IF_NEEDED

https://gis.stackexchange.com/questions/470855

2024年6月11日星期二

qgis 算法

 QGIS/src/analysis/processing/qgsalgorithmlineintersection.cpp



2024年5月25日星期六

禁用chrome的缓存

 通过wireguard访问webserver,chrome浏览器有的网页能打开,有的打不开,以为网络有问题,反复尝试,都没找到原因。最后发现是wireguard连接不成功,chrome用的竟然是缓存的页面!!!

2024年3月7日星期四

Check Python version

>>> import sys

>>> print(sys.version)

3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]


python3   --version


为什么安装'joinmultiplelines',会调用qgis2web

 Couldn't load plugin 'joinmultiplelines' due to an error when calling its classFactory() method 


TypeError: qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has unexpected type 'str' 

Traceback (most recent call last):

  File "C:\PROGRA~1/QGIS32~1.3/apps/qgis/./python\qgis\utils.py", line 423, in _startPlugin

    plugins[packageName] = package.classFactory(iface)

  File "C:\Users/27096/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\joinmultiplelines\__init__.py", line 3, in classFactory

    from .joinmultiplelines import joinmultiplelines

  File "C:\PROGRA~1/QGIS32~1.3/apps/qgis/./python\qgis\utils.py", line 888, in _import

    mod = _builtin_import(name, globals, locals, fromlist, level)

  File "C:\Users/27096/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\joinmultiplelines\joinmultiplelines.py", line 61, in 

    import resources

  File "C:\PROGRA~1/QGIS32~1.3/apps/qgis/./python\qgis\utils.py", line 888, in _import

    mod = _builtin_import(name, globals, locals, fromlist, level)

  File "C:\Users/27096/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis2web\resources.py", line 1251, in 

    qInitResources()

  File "C:\Users/27096/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis2web\resources.py", line 1242, in qInitResources

    QtCore.qRegisterResourceData(0x01, qt_resource_struct,

TypeError: qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has unexpected type 'str'


2023年12月24日星期日

WireGuard在windows中使用命令行切换隧道

 

  1. 执行该命令必须拥有管理员权限
  2. conf必须使用完整的路径名。
  3. 需要先 wireguard.exe  /uninstalltunnelservice  TUNNEL_NAME 现在的vpn。
  4. wireguard.exe  /installtunnelservice  “C:\Program Files\WireGuard\Data\Configurations\office.conf.dpapi”
  5. wireguard.exe  /uninstalltunnelservice office 
  6. at命令概述(at命令在Windows11中,已经弃用,使用schtasks)
  7. schtasks
  8. schtasks /create /tn wg01 /sc once /st 16:55 /sd 2024-10-17   /tr  "wireguard.exe  /installtunnelservice   'C:\Program Files\WireGuard\Data\Configurations\amd_7600g_wg0.conf.dpapi'"
  9. 能不能使用timeout命令,延迟几秒后,执行切换命令?  timeout /t 5 && start notepad
  10. timeout /t 5   &&   wireguard.exe  /uninstalltunnelservice home_vpn &&   wireguard.exe  /installtunnelservice   "C:\Program Files\WireGuard\Data\Configurations\office.conf.dpapi"