Saravanan666/pypi-org huggingface dataset:
Package: pysqream-blue-sqlalchemy
RequirementsPython > 3.9.SQLAlchemy == 1.3.18SQream Blue DB-API Connector >= 1.0.42InstallationInstall from the PyPi repository usingpip:pip3.9install--upgradepysqream_blue_sqlalchemyUsageIntegrating with SQLAlchemyimportsqlalchemyassa_access_token="ACCESS TOKEN"conn_str=f"sqream_blue://domain:443/database"connect_args={'access_token':_access_token}engine=sa.create_engine(conn_string,connect_args=connect_args)conn=engine.connect()res=conn.execute("select 'Success' as Test").fetchall()print(res)Integrating with the IPython/Jupyter SQL Magic%load_extsql%configSqlMagic.autocommit=False%configSqlMagic.displaycon=False%configSqlMagic.autopandas=True%sqlsqream_blue://product.isqream.com/master?access_token=<ACCESS_TOKEN>%sqlselect'Success'asTestConnection Stringsqream_blue://<domain>:443/<db_name>ParametersParameterDescriptiondomainSpecifies the domainportSpecifies the port numberdatabaseSpecifies the database nameLimitationsParameterized QueriesSQream SQLAlchemy supports only theBULK INSERTstatement.
Package: pysqream-log-analyzer
# Analyzer SQream LogsThe log analyzer has the ability to help us find the correct logs faster and in a more intuitive way.Version:0.0.3RequirementsPython 3.9+How to use the toolrun either:./sq_log_analyzer.py –help
python3 sq_log_analyzer.py –helpThis will show the full syntax with all options and acronyms, as well as, help details if you are not sure of the use.Please note, using –help (or -h) will override any other arguments, which can help when in doubtFlags1.Load logsThe tool needs to know which files to use, we can specify a directory or a specific file:–file-path (-p), requires a specific file path
specify the full path (e.g. /media/weka_delivery/ti_folder/sqream_20230830_results.csv)
specify just file name, the tool will search in the current directory
Usage: –file-path=”sqream_20230830_results.csv” or –file-path=”/media/weka_delivery/ti_folder/sqream_20230830_results.csv”—dir-path (-P), require a specific directory path
specify the full path (e.g. /media/weka_delivery/ti_folder/10082023)
specify just file name, the tool will search in the current directory
Usage: –file-path=”10082023” or –file-path=”/media/weka_delivery/ti_folder/10082023”the tool will search in all the subdirectories for sqream_logs filesUse the file filters (–file-date-filter/-fdf or –file-month-filter/-fmf) to help the tool search only the relevant files2.FiltersUse as many filters as relevant to your search:–from-date/–to-date: date and time filters
–message-filter: any message in the logs, including, queries, known phrases (e.g. query before parsing)
–info-level: INFO, ERROR or DEBUG (most logs are info)
–ip-address: the server ip address
–worker-port: the worker port
–statement-id: the statement id if you are looking for a specific statement
–connection-id: the connection id
–service-name: service name
–message-type: the number of the message, like 200 for execution plan3.Additional ParametersThe tool support querying the results using mysql syntax:use –query=”specific query” or –query-file=”file_path.sql” for query in a fileif you use column names with space in the name (like “statement id”), you must use the query file as the name must come in double quotes.The tool support saving results to file:use –output-dir=”directory_name” to save the file as out.csv in the directory
use –output-path=”file_path.csv” to save to a specific fileplease note, using the same directory dir will override old filesImportantThe tool currently supports only the SQreamDB logs (the one inside the cluster)The tool will only read files with the pattern: sqream_yyyymmdd_*.logWhen specifying a directory or a file, it will search in the current directory unless a full path is specified.The name of the table if you add a query is df, alwaysWhen running a query a warning may appear (“UserWarning: the ‘timedelta’ type is not supported”), ignore itQueries may take long to run, so make sure it runs on the smallest dataset possible
Package: pysqream-sqlalchemy
PrerequisitesPython > 3.9+SQLAlchemy = 1.4.46SQream DB-API Connector = 3.2.5Cython (optional - improves performance)Installing SQream SQLAlchemypip3.9installpysqream-sqlalchemy-UVerifying Installationimportsqlalchemyassaimportpandasaspdconn_str="sqream://sqream:sqream@localhost:3108/master"engine=sa.create_engine(conn_str,connect_args={"clustered":True})engine.execute('create or replace table test (ints int)')engine.execute('insert into test values (5), (6)')df=pd.read_sql('select * from test',engine)print(df)Connection Stringsqream://<user_login_name>:<password>@<host>:<port>/<db_name>ParametersParameterDescriptionusernameUsername of a role to use for connectionpasswordSpecifies the password of the selected rolehostSpecifies the hostnameportSpecifies the port numberport_sslAn optional parameterdatabaseSpecifies the database nameclusteredEstablishing a multi-clustered connection. Input values:True,False. Default isFalseserviceSpecifies service queue to useExamplePulling a Table into PandasThe following example shows how to pull a table in Pandas. This example uses the URL method to create the connection string:importsqlalchemyassafromsqlalchemy.engine.urlimportURLimportpandasaspdengine_url=URL('sqream',username='sqream',password='12345',host='127.0.0.1',port=3108,database='master')engine=sa.create_engine(engine_url,connect_args={"clustered":True,"service":"admin"})table_df=pd.read_sql("select * from nba",con=engine)LimitationsParameterized QueriesSQream SQLAlchemy supports only theBULK INSERTstatement.
Package: pysqrtrootof3taker
pysqrtrootof3takerPySqrtRootOf3Taker - A top class package to compute the square root of 3 in a local environment. (For an industrial environment use ThreeToTheOneHalfPy.)InstructionsInstallpip install pysqrtrootof3takerCompute the square root of 3:frompysqrtof3takerimportpysqrtrootof3taker# Compute the square root of 3print(pysqrtof3taker.compute_square_root_of_3())
Package: pysqs-extended-client
Boto3 SQS Extended Client Library for PythonTheAmazon SQS Extended Client Library for Python has been modelled after the original Amazon SQS Extended client libraryThis python library enables you to manage Amazon SQS message payloads with Amazon S3. This is especially useful for storing and retrieving messages with a message payload size greater than the current SQS limit of 256 KB, up to a maximum of 2 GB. Specifically, you can use this library to:Specify whether message payloads are always stored in Amazon S3 or only when a message's size exceeds 256 KB.Send a message that references a single message object stored in an Amazon S3 bucket.Get the corresponding message object from an Amazon S3 bucket.Delete the corresponding message object from an Amazon S3 bucket.Getting StartedSign up for AWS-- Before you begin, you need an AWS account. For more information about creating an AWS account and retrieving your AWS credentials, see [AWS Account and Credentials.Sign up for Amazon SQS-- Go to the AmazonSQS consoleto sign up for the service.Minimum requirements-- To use the sample application, you'll need python 3 (and above)Further information- Read theAPI documentation.Usageimport base64

    from pysqs_extended_client.SQSClientExtended import SQSClientExtended
    
    # from string import ascii_letters, digits
    # from random import choice
    
    from pysqs_extended_client.config import (AWS_SQS_QUEUE_URL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION)
    
    if __name__ == '__main__':
    
        sqs = SQSClientExtended(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION, 'tiptapcode-sqs-data')
    
        # _100mb_large_string = ''.join([choice(ascii_letters + digits) for i in range(104857600)])
    
        # message = "_100mb_large_string"
    
        message = None
        with open("C:\\DjangoCourse\\Courses\\celery\\introduction-promo.mp4", "rb") as image_file:
            encoded_string = base64.b64encode(image_file.read())
            message = encoded_string.decode("utf-8")
    
        sqs.send_message(AWS_SQS_QUEUE_URL, message)
    
        res = sqs.receive_message(AWS_SQS_QUEUE_URL)
    
        for message in res:
            sqs.delete_message(AWS_SQS_QUEUE_URL, message.get('ReceiptHandle'))FeedbackGive feedbackhere.If you'd like to contribute a new feature or bug fix, go ahead submit a pull request.
Package: pysquale
pysqualeUseful lib for text processing in Portuguese.The name of the lib was inspired by the name of the famous Brazilian TeacherPasqualeUsagefrompysquale.common.pipelineimportReducerPipelinefrompysquale.words.cleaningimportremove_accentuation,remove_punctuation,to_lowerfunc_list=[to_lower,remove_accentuation,remove_punctuation]text="Olá, quem é você?"pipe=ReducerPipeline(target=text,items=func_list)output=pipe.run()print(output)# Should print:# ola quem e voce"ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: pysqueezebox
pysqueezebox - Asynchronous control of squeezeboxesThis a library to control a Logitech Media Server asynchronously, intended for
integration with Home Assistant.Much of the code was adapted from the Home Assistant squeezebox integration.
The current convention is for all API-specific code to be part of a third
party library hosted on PyPi, so I created a separate library.The function names track the terms used by the LMS API, so they do not all
match the old Home Assistant squeezebox integration.Thank you to the original author of the squeezebox integration. If it is you,
please let me know so I can credit you here.UsageInstall pysqueezebox from github, or using PyPi via pip.$pip3installpysqueezeboxImportsImport the Server() and Player() classes from this module. You will also need
to create an aiohttp.ClientSession() that the module will use to communicate
with the Logitech Media Server.You can use Server.async_get_players() to retrieve a list of connected players,
or get a specific player using Server.async_get_player(name="PlayerName").
Remember that any method starting with "async_" is a coroutine that must be
preceded by an await to run.For more information on using aiohttp.ClientSession(), seehttps://aiohttp.readthedocs.io/en/stable/client_reference.html.frompysqueezeboximportServer,PlayerimportaiohttpimportasyncioSERVER='192.168.1.2'# ip address of Logitech Media Serverasyncdefmain():asyncwithaiohttp.ClientSession()assession:lms=Server(session,SERVER)player=awaitlms.async_get_player(name="Bedroom")awaitplayer.async_update()print(player.album)awaitplayer.async_play()loop=asyncio.get_event_loop()loop.run_until_complete(main())Player.async_update()The Player object stores information about the current status of the player.
This allows you to retrieve the player's properties without any I/O. Remember
to call Player.async_update() prior to retrieving properties if you want the
most up-to-date information.Player() classMost of the useful functions are in the Player class. More documentation to
follow, but in the meantime, the docstrings should be instructive.
Package: pysquel
PySquelPOC for linting SQL statements in Python.Relying onsqlfluff.The name is inspired by Czech wordpaskvilwhich meansmessed up.ConceptUsingstrsubclass calledsqlto mark all SQL statements for linting.
It causes avoidance of parsing the SQL statements from all strings.frompysquelimportsqlmy_sql=sql("SELECT * FROM table")# `sql` is a just subclass of the str>>>type(my_sql)<class'str'>>>>sql("SELECT * FROM{table}").format(table="super_table")'SELECT * FROM super_table'It could be betterin the future:tagstrsql"SELECT FROM table"sql_f"SELECT FROM{table}"dedentsql_d"""SELECTFROM table"""sql_df"""SELECTFROM{table}"""Usage# tests/test_lint.pyfrompysquelimportsqlbad_sql=sql("""SELECT *FROMtable""")Runpysquel .to lint allsqlstatements in the current directory:tests/test_lint.py :
--------------------------------------------------------------------------------
  SELECT * 
FROM 
          table

--------------------------------------------------------------------------------
{'line_no': 1, 'line_pos': 1, 'code': 'LT01', 'description': "Expected only single space before 'SELECT' keyword. Found '  '.", 'name': 'layout.spacing'}
{'line_no': 1, 'line_pos': 1, 'code': 'LT02', 'description': 'First line should not be indented.', 'name': 'layout.indent'}
{'line_no': 1, 'line_pos': 1, 'code': 'LT13', 'description': 'Files must not begin with newlines or whitespace.', 'name': 'layout.start_of_file'}
{'line_no': 1, 'line_pos': 3, 'code': 'AM04', 'description': 'Query produces an unknown number of result columns.', 'name': 'ambiguous.column_count'}
{'line_no': 1, 'line_pos': 11, 'code': 'LT01', 'description': 'Unnecessary trailing whitespace.', 'name': 'layout.spacing'}
{'line_no': 2, 'line_pos': 5, 'code': 'LT01', 'description': 'Unnecessary trailing whitespace.', 'name': 'layout.spacing'}
{'line_no': 3, 'line_pos': 1, 'code': 'LT02', 'description': 'Expected indent of 4 spaces.', 'name': 'layout.indent'}
================================================================================TODOconfigexclude rulesexclude dirsnoqasqlfluffconfig (dialect, templating, ...)custom token instead ofsql?lint missingsqlprefix for potential SQL statements
Package: pysquishy
squishy 🐻‍❄️A collection of new (LLVM 15) passes to compile normal-looking code to a callable, jump-to-able blob. Also includes a python library that provides
a python interface to produce a blob for any architecture triple.Inspired by SheLLVM, but should address some of the outdated issues with
that project. Thanks to SheLLVM for the inspiration :)InstallingDependenciesLLVM-15: Install withwget -qO - https://apt.llvm.org/llvm.sh | sudo bash -s 15Meson 0.63+: Install withpip install -U mesonand add~/.localto your pathTo set up LLVM-15 as alternatives you can runscripts/set-alternatives.shThe easiest way to installsquishy 🐻‍❄️is from PyPi (sorry about the name, PyPi has weird rules). If an sdist is installed,mesonmust be installed andllvm-15must be available.python3 -m pip install pysquishy>=0.1.16Buildingsquishy 🐻‍❄️uses themesonmodern build system. To
build, first ensure thatmesonandninjaare installed, and that you have
an installation ofllvm-15which you can gethere.Then, invoke:meson build
cd build
meson compileto produce thelibrary.PassesAggressive Inliner: Recursively applies alwaysinline and inlines function
calls and global variables into the main function.
Package: py-sr25519-bindings
py-sr25519-bindingsPython bindings for sr25519 library:https://github.com/w3f/schnorrkelReference tohttps://github.com/LocalCoinSwap/kusama-reference-implementation/tree/improve-trading-tests/bindingsandhttps://gitlab.com/kauriid/schnorrpy/for the initial workDocumentationhttps://docs.rs/py-sr25519-bindingsInstallationInstall from PyPIpip install py-sr25519-bindingsCompile for local developmentpip install -r requirements.txt
maturin developBuild wheelspip install -r requirements.txt

# Build local OS wheel
maturin build

# Build manylinux1 wheel
docker build . --tag polkasource/maturin
docker run --rm -i -v $(pwd):/io polkasource/maturin buildUsageimportbip39importsr25519message=b"test"# Get private and public key from seedseed=bip39.bip39_to_mini_secret('daughter song common combine misery cotton audit morning stuff weasel flee field','')public_key,private_key=sr25519.pair_from_seed(bytes(seed))# Generate signaturesignature=sr25519.sign((public_key,private_key),message)print('Signature',signature.hex())# Verify message with signatureifsr25519.verify(signature,message,public_key):print('Verified')Licensehttps://github.com/polkascan/py-sr25519-bindings/blob/master/LICENSE
Package: py-sr25519-bindings-fork
py-sr25519-bindingsPython bindings for sr25519 library:https://github.com/w3f/schnorrkelReference tohttps://github.com/LocalCoinSwap/kusama-reference-implementation/tree/improve-trading-tests/bindingsandhttps://gitlab.com/kauriid/schnorrpy/for the initial workDocumentationhttps://docs.rs/py-sr25519-bindingsInstallationInstall from PyPIpip install py-sr25519-bindingsCompile for local developmentpip install -r requirements.txt
maturin developBuild wheelhousespip install -r requirements.txt

# Build local OS wheelhouse
maturin build

# Build manylinux1 wheelhouse
docker build . --tag polkasource/maturin
docker run --rm -i -v $(pwd):/io polkasource/maturin buildUsageimportbip39importsr25519message=b"test"# Get private and public key from seedseed=bip39.bip39_to_mini_secret('daughter song common combine misery cotton audit morning stuff weasel flee field','')public_key,private_key=sr25519.pair_from_seed(bytes(seed))# Generate signaturesignature=sr25519.sign((public_key,private_key),message)print('Signature',signature.hex())# Verify message with signatureifsr25519.verify(signature,message,public_key):print('Verified')Licensehttps://github.com/polkascan/py-sr25519-bindings/blob/master/LICENSE
Package: pySRA
pySRASite response analyses implemented in Python. This Python packages aims
to implement many of the features found inStrata. These features include:Input motion characterization:Time seriesRandom vibration theoryWave propagation or site amplification:linearequivalent-linearequivalent-linear with frequency dependent propertiesquarter wavelengthNonlinear curve models:Darendeli (2001)Menq (2004)Kishida (2012)Site and soil property uncertainty:Toro (1994) Vs correlation modelG/Gmax and D uncertainty:Darendeli (2001)EPRI SPID (2013)Development of this software is on-going and any contributions are
encouraged.Installationpysrais available viapipand can be installed with:pip install pysraIf you are usingcondaand a create apysraspecific environmental make sure you installipykernelsandnb_conda_kernelsso that the environment is discoverable byJupyterwith:conda install ipykernel nb_conda_kernelsCitationPlease cite this software using the followingDOI.ExamplesThere are a variety of examples of usingpysrawithin theexamples
directory. An interactive Jupyter interface of these examples is available on.Historyv0.5.0 (2022-06-14)Renamed topyStrata.v0.4.11 (2020-03-31)Added: Depth dependent velocity variation modelAdded: Output plotting functionalityAdded: Ability to exclude soil type variation from bedrockv0.4.10 (2020-03-27)Fixed: Error in SPID variation of G/GmaxAdded: Scaling during read of SMC and AT2 input motionsv0.4.9 (2020-03-09)Add InitialVelProfile and CompatVelProfile outputsv0.4.8 (2019-12-11)Remove Cython and cyko as dependenciesAdded a numba based Konno-Ohmachi smoothingv0.4.6 (2019-11-12)FIXED #11: Dependencies missing on install.v0.4.5 (2019-10-24)FIXED #9: Wrong stress for some Menq components.v0.4.4 (2019-05-22)Incremented version because of issue with automated builds.v0.4.3 (2019-05-22)FIXED: Bug in MANIFEST.inv0.4.2 (2019-05-22)Incremented version because of issue with automated builds.v0.4.1 (2019-05-22)Fixed strain profile to usemax_strain.Changed README and HISTORY to markdown.v0.4.0 (2019-03-11)Added smoothed FourierAmplitudeSpectrum output.v0.3.2 (2018-12-02)Fixed building of docs.Removed stickler.Version double increment due to pypi naming conflict.v0.3.0 (2018-11-30)Converted all damping to decimal.Added tests for KishidaSoilType.Added tests against Deepsoil.v0.0.1 (2016-04-30)First release on PyPI.
Package: pysrc3
pysrc3Opens the source file of Python modules in an editor, a pager, or any other program of choice.Free software: MIT licenseDocumentation:https://pysrc3.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.3 (2017-10-24)Retire Python 3.3; add Python 3.6 and PyPy3.0.1.2 (2016-11-10)Ensure compatibility with Python 3.3 and 3.4.Add a “pysrc3” wrapper script.Upgrade dev dependencies.Fix Flake8 warnings.0.1.1 (2016-11-10)First release on PyPI.
Package: pySRE
Experimental Python wrapper forSimple-RFC1738-Encoderwritten in JavasScript.More info about Simple-RFC1738-Encoder:https://github.com/RDCH106/Simple-RFC1738-EncoderWhat can I do with pySRE?The same as original library of Simple-RFC1738-EncoderInstallationYou can install or upgrade pySRE with:$ pip install pySRE--upgradeOr you can install from source with:$ git clonehttps://github.com/RDCH106/pySRE.git--recursive$ cd pySRE$ pip install-rrequirements.txtQuick example---------------------------------frompySREimportpySRE# Choose your Engine using:#    pySRE.SUPPORTED_ENGINES## Example:#    pySRE.PySRC(pySRE.SUPPORTED_ENGINES.Node)pySRE=pySRE.PySRC()# automatically picks the best runtimeprint("\nCurrrent engine:%s\n"%pySRE.execjs_engine)my_url="http://mascandobits.es?fullname=Rubén de Celis Hernández"print("Original URL:%s"%my_url)my_url=pySRE.convert_to_url(my_url)print("RFC1738 URL:%s"%my_url)my_url=pySRE.convert_to_string(my_url)print("Decoded RFC1738 URL:%s"%my_url)my_url=pySRE.convert_to_url_with_utf8(my_url)print("RFC1738 URL with UTF8:%s"%my_url)my_url=pySRE.convert_to_string_with_utf8(my_url)print("Decoded RFC1738 URL with UTF8:%s"%my_url)
Package: pysrim-docker
pysrim-dockerDocker executor for PySRIMGetting StartedTo use this package, simply replace yourSRorTRIMimports with those fromsrim.docker, e.g.fromsrim.dockerimportTRIMtrim=TRIM(...)Out of the box,pysrim-dockeruses thecostrouc/srimDocker image, and writes the input and output files to a temporary directory.How Does it Work?pysrim-dockeroverrides therun()method of theSRandTRIMclasses with one that executes a bash script in a particular Docker image.
This script simply copies the inputs to the appropriate directory, runs the required binary, and returns the results.Why?Since using Docker, I have seen its utility in hiding obscure build steps behind a simple container image.
However, I prefer to write code that might be part of an analysis pipeline, rather than standalone Python modules, and so it is prefereable to
have the input file generation peformed on the host. An additional benefit of this is that thepysriminstallation can be updated indepently of the Docker image.
Package: pysrim-executor
pysrim-dockerDocker executor for PySRIMGetting StartedTo use this package, simply remove calls torun()method ofSRandTRIM, and replace them with a call to the executorrundispatch method, e.g.:fromsrim.executorimportDockerExecutorfromsrimimportTRIMexecutor=DockerExecutor()trim=TRIM(...)result=executor.run(trim)Out of the box, theDockerExecutoruses thecostrouc/srimDocker image, and writes the input and output files to a temporary directory.Examplefromsrim.executorimportDockerExecutorfromsrimimportIon,Layer,Target,TRIMfrommatplotlibimportpyplotasplt# Construct a 3MeV Nickel ionion=Ion('Ni',energy=3.0e6)# Construct a layer of nick 20um thick with a displacement energy of 30 eVlayer=Layer({'Ni':{'stoich':1.0,'E_d':30.0,'lattice':0.0,'surface':3.0}},density=8.9,width=20000.0)# Construct a target of a single layer of Nickeltarget=Target([layer])# Initialize a TRIM calculation with given target and ion for 25 ions, quick calculationtrim=TRIM(target,ion,number_ions=25,calculation=1)# Create executor and run TRIMexecutor=DockerExecutor()result=executor.run(trim)# Pull out ionizationioniz=result.ioniz# Plot results_,ax=plt.subplots()ax.plot(ioniz.depth,ioniz.ions,label='Ionization from Ions')ax.plot(ioniz.depth,ioniz.recoils,label='Ionization from Recoils')plt.show()Why?There are a number of different ways that SRIM can be invoked to run simulations. Unix-like OS users have the option of usingwinewith or withoutxvfb.
Windows users can directly call the binaries. Docker users can choose to defer to a pre-built SRIM container.By abstracting the executor from the SRIM input file generation, executors can easily be swapped in and out, or extended as necessary.