Skip to content

Instantly share code, notes, and snippets.

View CEZERT's full-sized avatar

MARC YERANOSYAN CEZERT

View GitHub Profile
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname='23-0241ACA_LOT_7' AND pid <> pg_backend_pid();
create database "23-0242ACA_LOT_8" template "23-0241ACA_LOT_7";
Initial Inquiry: "Hi, thank you for reaching out. I've read your requirements and I'm confident I can help with your QlikSense dashboard. Let's discuss more about your project so I can better understand your needs."
Discussing Details: "Thanks for sharing these details. It helps me understand your project better. Could you also provide some information about the specific KPIs you're interested in?"
Project Timeline: "Based on your requirements, I anticipate this project will take approximately X days to complete. I'll be able to give a more accurate estimate once we finalize the project details."
Data Confidentiality: "Rest assured, your data's security is my top priority. I adhere to strict data privacy protocols and will only use your data for this specific project."
Project Updates: "I wanted to update you on the project. The data modeling is complete and I've started working on the dashboard. I'll keep you posted with further updates."
for %X in (*.shp) do ogr2ogr -skipfailures -clipsrc
c:\data\PhiladelphiaBaseLayers\clipFeature\city_limits.shp
c:\data\PhiladelphiaBaseLayers\clipped\%X
c:\data\PhiladelphiaBaseLayers\%X
The QGIS expression is designed to split a string (found in the "Code_ouvra" field) by underscores ('_'), and then recombine the first three elements of the resulting array into a new string, again separated by underscores.
```qgis
array_to_string(array_slice(string_to_array("Code_ouvra", '_'), 0, 2), '_')
```
This expression does the following:
1. `string_to_array("Code_ouvra", '_')`: Splits the "Code_ouvra" string into an array using '_' as the separator.
2. `array_slice(..., 0, 2)`: Takes a slice of the array from the first element (index 0) to the third element (index 2).
3. `array_to_string(..., '_')`: Converts the sliced array back into a string, with elements separated by '_'.
@CEZERT
CEZERT / notes.md
Last active November 18, 2024 10:13

STATIQUE

'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:="longueur", filter:=( "ft"  like '%_DET_DETECT%')),2)) || ' m ----- Detection OK ---'  ||  '\n' || 
'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:= "longueur",filter:=("ft" LIKE '%_DETECTION_PERT%')),2)) || ' m ----- Perturbée ---' ||  '\n'  || 
'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:= "longueur",filter:="ft" LIKE '%INACCESSIBLE%'),2)) || ' m ----- Inaccessible ---' ||  '\n'  || 
'- ' || to_string(round(aggregate( layer:='Reception_terrain', aggregate:='sum',expression:= "longueur",filter:="ft" LIKE '%CULTURE%'),2)) || ' m ----- Zone culture ---' ||  '\n'  || 

Afficher stst des lignes par rapport des polygones

"nom_com" || '_' ||  "CODE_INSEE"  ||  '\n'  ||  '\n'  || 
to_string(round(coalesce(aggregate(
	layer:='stat',
import subprocess
subprocess.check_call(['pip', 'install', 'opencv-python', 'pytesseract', 'easyocr', 'pillow'])
Profondeur:
to_real(
replace(
substr(
"Text",
strpos("Text",'(') + 1,
strpos("Text",')') - strpos("Text",'(') - 1
),
',', '.'
)
-- It's a query that take alny datast where DESIGNATOR fiels is less or equals 10000--
SELECT
LINE_ID, LINE_GUID, DESIGNATOR, DESCRIPTION, TYPE_CL,
PRODUCT_TYPE_SCL, PRODUCT_SUBTYPE_SCL, OPERATING_STATUS_GCL,
SYSTEM_TYPE_CL, INTERSTATE_LF
FROM
ALEU_PODS.pods.LINE
WHERE
-- 1. NETTOYAGE : Exclure les valeurs non-numériques dans le champ DESCRIPTION (pour éviter l'erreur de conversion)
DESCRIPTION NOT LIKE '%AIR LIQUIDE EUROPE%'