Summary of Qlik API
import { embed } from '@nebula.js/stardust';| [build-system] | |
| requires = ["hatchling>=1.24.2", "hatch-vcs>=0.3.0"] | |
| build-backend = "hatchling.build" | |
| [project] | |
| name = "pdfsplit" | |
| description = "" | |
| readme = "README.md" | |
| license = "MIT" | |
| requires-python = ">=3.11" |
| var jumpto = (i , n)=>{ | |
| var evt = new Event("blur", {"bubbles":true, "cancelable":false}); | |
| var sldnr = document.querySelector('input.a-b-La-su-vb') ; | |
| sldnr.value = `${i}`; | |
| console.log(`jumping to ${i}, ${n} , ${sldnr.getAttribute('aria-label')}`); | |
| sldnr.dispatchEvent(evt); | |
| if(i<n){ | |
| setTimeout(() => { | |
| jumpto(i+1, n); | |
| }, 1500); |
| import mmap | |
| import zlib | |
| import sys | |
| from contextlib import contextmanager | |
| @contextmanager | |
| def f2bytes(fname): | |
| with open(fname, 'rb') as f : | |
| with mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as m: | |
| mmview = memoryview(m) |
| " check env variables " | |
| # pylint: disable=invalid-name,line-too-long | |
| import os | |
| import pathlib | |
| import subprocess | |
| import logging | |
| logging.basicConfig(level=logging.INFO, format='%(message)s' ) | |
| paths_should_exist: list[str]=[ | |
| '{DOTNET_ROOT}/dotnet.exe', |
| (allow staff_t lib_t (file (watch))) | |
| (allow staff_t non_security_file_type (dir (watch))) | |
| (allow staff_gkeyringd_t pidfile (file (getattr open read))) |
| import sqlite3, pandas as pd | |
| conn = sqlite3.connect('places.sqlite') | |
| tinfo= pd.read_sql_query("SELECT * FROM pragma_table_info('moz_places')", conn) | |
| cols = [ 'p.'+c for c in tinfo.name if 'id' not in c ] | |
| tinfo = pd.read_sql_query("SELECT * FROM pragma_table_info('moz_bookmarks')", conn) | |
| cols += [ 'b.'+c for c in tinfo.name if 'id' not in c and 'title' not in c ] | |
| tbmk = pd.read_sql_query("SELECT {0} FROM moz_bookmarks b INNER JOIN moz_places p ON b.fk = p.id".format( ', '.join(cols) ), | |
| conn); | |
| for c in tbmk: |
| #!/usr/bin/bash | |
| # https://github.com/mtex-toolbox/mtex/blob/develop/extern/nfft/readme.md | |
| # https://github.com/mtex-toolbox/mtex/tree/develop/extern/nfft_openMP | |
| # https://www-user.tu-chemnitz.de/~potts/nfft/download.php | |
| set -e | |
| MTEX_HOME=$(echo "$PWD"/mtex-*.*.*/) | |
| MATLAB_HOME=$(dirname $(dirname $(which matlab))) |
| import numpy as np | |
| import re, sys | |
| def reindex_micress_vtk(vtkfilename): | |
| pLUT = re.compile('\s*LOOKUP_TABLE\s+', flags=re.I) | |
| headers=[] | |
| with open(vtkfilename) as f: | |
| for l in f: | |
| headers.append(l.strip()) | |
| if pLUT.match(l): | |
| break |
| # Build JS files for production | |
| export NODE_OPTIONS="--max-old-space-size=4096" | |
| jupyter-lab build --LabBuildApp.dev_build=False |