i have documented here how to do it with env vars: https://gist.github.com/sloev/a5c1a5091abde30a70c14bad37e35a76
it says:
a response to python-poetry/poetry#910
$ cat pyproject.toml
# You can use the builtin json lib to iteratively encode a json object | |
# but encoding a json array iteratively requires the iterable to be list-like | |
# No worries we just subclass list and pretend to be a list while being able to ingest | |
# whatever you want | |
import json | |
import sys | |
class IteratorAsList(list): |
#!/usr/bin/python | |
import subprocess | |
import json | |
URL = "https://www.google.com" | |
get_browser_bundle_id = "cat ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist | plutil -convert json -r -o - -- -" |
i have documented here how to do it with env vars: https://gist.github.com/sloev/a5c1a5091abde30a70c14bad37e35a76
it says:
a response to python-poetry/poetry#910
$ cat pyproject.toml
import csv | |
from io import StringIO | |
class ArgsToCsv: | |
def __init__(self, seperator=","): | |
self.seperator = seperator | |
self.buffer = StringIO() | |
self.writer = csv.writer(self.buffer) |
from sqlalchemy.pool import QueuePool | |
from sqlalchemy import create_engine | |
from contextlib import closing, contextmanager, ExitStack | |
from sqlalchemy.sql import text | |
import asyncio | |
import logging | |
import time | |
class AsyncMysqlDatabase: |
pip install -r requirements.txt
import requests | |
requests_get = requests.get | |
import OpenSSL | |
def get( | |
*args, retries=5, **kwargs, | |
): |
try: | |
import requests | |
import cdx_toolkit | |
import tqdm | |
import OpenSSL | |
from lxml import html | |
except: | |
print("you need to do some installs first:\npip install requests cdx_toolkit tqdm pyOpenSSL lxml") | |
exit(1) |
const { encode, decode } = require('base2048'); | |
const jsonCipher = require('json-cipher') | |
createCrypto = (secret, algorithm = 'aes-256-cbc') => { | |
const { cipher, decipher, hmac } = jsonCipher(secret, algorithm) | |
return { | |
stringify: object => encode(cipher(object)), | |
parse: string => decipher(decode(string)), | |
cipher, | |
decipher, |