Download data.zip programmatically for "Loophole-free Bell-inequality violation using electron spins separated by 1.3 kilometres" experiment

Advertisements I would like to create a gist or a Jupyter notebook analyzing the data located at Loophole-free Bell-inequality violation using electron spins separated by 1.3 kilometres. The site has this download button which right-clicking to copy-paste the link tells me it associated with the URL https://data.4tu.nl/ndownloader/files/24056582. If I copy-paste this URL into Firefox it… Read More Download data.zip programmatically for "Loophole-free Bell-inequality violation using electron spins separated by 1.3 kilometres" experiment

SQL Join Using REGEXP_SUBSTR and Wildcard

Advertisements I’m trying to join two tables in Snowflake using REGEX_SUBSTR and a wildcard but having no luck. Here is what I have: SELECT P.NAME, ACL.CONTENT_NAME, REGEXP_SUBSTR(CONTENT_NAME, ‘/([^/]+(\\.pdf))$’, 1, 1, ‘e’, 1) AS PDFS FROM ACTIVITY_DOWNLOAD AD JOIN PROGRAM P ON P.NAME LIKE ‘%’ || REGEXP_SUBSTR(CONTENT_NAME, ‘/([^/]+(\\.pdf))$’, 1, 1, ‘e’, 1) || ‘%’ Running the… Read More SQL Join Using REGEXP_SUBSTR and Wildcard

Export Postgresql Table to excel with header in Python

Advertisements My code works but it doesn’t bring the header with the names, it only brings the numbers 0 1 … 10 , what can I do ? Utils_db.py def consulta_sql(sql): try: connection = psycopg2.connect(user="postgres", password="postgres", host="localhost", port="5432", database="tb_cliente") cursor = connection.cursor() except (Exception, psycopg2.Error) as error: try: cursor.execute(sql) connection.commit() except (Exception, psycopg2.Error) as error:… Read More Export Postgresql Table to excel with header in Python

How to handle "The given header was not found" when paging records in c# API GET request?

Advertisements I’m requesting data from an API that requires paging records based on a custom header called "cursor". Only 100 records may be retrieved per call and as such I’ve created a while loop to execute. The loop functions… until it doesn’t. Once all records are paged, the headers get dropped and my program errors… Read More How to handle "The given header was not found" when paging records in c# API GET request?