Investigate parameterized INSERT statements with RETURNING clauses using node-postgres.
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
| """ | |
| About | |
| ----- | |
| Investigate connection pooling with "crate-python" when | |
| running within a multi-threaded environment. | |
| This covers both cases using DBAPI and going through SQLAlchemy. | |
| See also https://github.com/crate/crate-python/pull/373. | |
| Setup |
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
| import duckdb | |
| import pandas as pd | |
| from pandas._testing import assert_frame_equal | |
| def test_category(): | |
| """ | |
| This test uses a Pandas category datatype making DuckDB croak. | |
| """ |
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
| FROM rabbitmq:3 | |
| ADD rabbitmq.conf /etc/rabbitmq/ | |
| ADD definitions.json /etc/rabbitmq/ | |
| RUN chown rabbitmq:rabbitmq /etc/rabbitmq/rabbitmq.conf /etc/rabbitmq/definitions.json |
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
| """ | |
| Setup:: | |
| virtualenv .venv2 --python=python2 | |
| source .venv2/bin/activate | |
| pip install requests | |
| pip install git+https://github.com/KokocGroup/sitemap_parser | |
| Synopsis:: |
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
| # Summarize JSON output of Vale using jq. | |
| # cat vale-report.json | jq --from-file vale-summary.jq > vale-summary.json | |
| to_entries | map({ | |
| file: .key, | |
| errors: .value | [ .[] | select(.Severity | contains("error")) ] | length, | |
| warnings: .value | [ .[] | select(.Severity | contains("warning")) ] | length, | |
| suggestions: .value | [ .[] | select(.Severity | contains("suggestion")) ] | length, | |
| }) |
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
| """ | |
| Demo for accessing https://opendata.dwd.de/ using fsspec, optionally using caching. | |
| Setup | |
| ===== | |
| :: | |
| pip install fsspec requests aiohttp | |
| Resources |
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
| from flask import Flask, request, jsonify, json, abort | |
| from flask_cors import CORS, cross_origin | |
| import pandas as pd | |
| app = Flask(__name__) | |
| cors = CORS(app) | |
| app.config['CORS_HEADERS'] = 'Content-Type' |
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
| """ | |
| Investigate problems when scanning huge directory | |
| tree of DWD CDC HTTP server. | |
| This repro will reveal that fsspec seems to randomly | |
| include a single folder within its results list:: | |
| python fsspec-dwd.py | grep -v zip | |
| The result varies between single-line outputs of e.g.: |
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
| """ | |
| About | |
| ===== | |
| Proof that ``update_dashboard`` will respawn the dashboard within the "General" folder:: | |
| before: {'folderId': 1, 'folderTitle': 'testdrive', 'folderUrl': '/dashboards/f/RJS5vK-Mz/testdrive'} | |
| after: {'folderId': 0, 'folderTitle': 'General', 'folderUrl': ''} | |
| Synopsis |