Saravanan666/pypi-org huggingface dataset:
Package: duckingit
A framework to leverage the endless capabilities of serverless computing powered by DuckDB.Please note that the framework currently supports only AWS Lambda functions. To use the framework, you must first create a Lambda layer of DuckDB that can be used within a Lambda function. Additionally, you must create a Lambda Executor function that can execute the actual DuckDB SQL. Once you've completed these setup steps, you can leverage the power of serverless functions through the SDK written in Python to perform analytics on a Data Lake.While Apache Spark can perform similar (and more advanced) functions, the cost of running Spark clusters can be prohibitively expensive. As a result, a much more affordable alternative is to use a cluster of serverless functions, such as Lambda functions, to perform the same actions as Spark, without the need to turn them off manually.InstallationTo install the Python SDK from PyPI execute the command below. Nonetheless, it's recommended that you first review thesetupsection in order to properly utilize the package.pipinstallduckingitSetupBefore setting up the infrastructure, please make sure that you have installed both Docker and Terraform.To interact with the DuckDB instances, the entire infrastructure must be set up first because the SDK functions as an entryway to the serverless function cluster. DuckDB is packaged as a layer to be pre-installed in AWS Lambda, similar to other packages. Docker must be installed to create the layer.Running the command below will generate a duckdb-layer.zip file in the image/release/ folder:makerelease-imageTo set up the infrastructure on AWS, follow the commands below:makerelease-infraAfter waiting for a minute or two, the infrastructure should be set up, and you can check for the presence of a Lambda function called DuckExecutor and a lambda layer called duckdb under Lambda layers.Once you have verified the above components, the infrastructure should be set up and fully operational.UsageThe developer API is inspired by the API of Spark, but it uses Python's naming conventions because the framework is implemented in Python.fromduckingitimportDuckSession,DuckConfigquery="SELECT * FROM READ_PARQUET(['s3://BUCKET_NAME/2023/*'])"# Following command will print possible configurationsDuckConfig.show_configurations()# Configurationconf=DuckConfig()\.set("aws_lambda.FunctionName","TestFunc")\.set("aws_lambda.MemorySize",256)\.set("aws_lambda.WarmUp",True)# Creates an entrypoint to use serverless DuckDB instancessession=DuckSession(conf=conf)# Create a Dataset from the queryds=session.sql(query=query)# Execute SQL queryds.show()... To be continuedContributionThank you for taking an interest in my project on GitHub. I am always looking for new contributors to help me improve and evolve my codebase. If you're interested in contributing, feel free to fork the repository and submit a pull request with your changes.I welcome all kinds of contributions, from bug fixes to feature additions and documentation improvements. If you're not sure where to start, take a look at the issues tab or reach out to us for guidance.Let's collaborate and make our project better together!
Package: duckiter
DuckiterDuckiter will Automatically dockerize your Django projects.Requirements :- python version : python version 3.6 or upper version
- OS : 
    - linux
    - MacOS
    - windows ( drop support )
- docker engine installed in your machine and already run through the usage of packageInstallation :clone project:pip install duckiterUsage :Duckiter has two individual steps:
1- initialize Dockerfile
2- build image from created DockerfileTo initialize Dockerfile (step 1) :in terminal hit to your project directory ( where manage.py is in root ):duckiter --initThis will create Dockerfile and config.cfg in the root of the project, and you can manipulate those files before Duckiter creates an image.
If you are ok with our configurations, you can just pass '-build' to immediately build the image right after creating the Dockerfile.duckiter --init -buildTo build image (step 2) :To build an image from the Dockerfile that has been created in the last step, you need enter:duckiter main.py -buildthis will look for config.cfg in project directory and then build the image.Troubleshooting :if you get blow error while your docker engine is already run :[ WARNNING !!!! ] It seems your docker engine doesn't run, please run the Docker engine.​		you can fix this issue , just enter these commands :$ sudo groupadd docker
$ sudo usermod -aG docker $USER
$ newgrp dockernow problem fixed and you can run command again.if you got error like :duckiter : command not foundyou can fix this issue by adding your python package directory into you PATH.Contribution :feel free to contribute to this project, but first contact me about the idea :)
Package: duckling-chinese
中文 Duckling简介中文 Duckling (duckling-chinese) 是基于 Jpype1 的duckling-fork-chinese的 Python 封装版本，提供例如时间、日期、数字等中文解析服务。使用中文 Duckling 利用 Jpype1 调用 duckling-fork-chinese，需要系统正确安装配置 JVM，再通过pip安装最新版本。pip install duckling-chinese具体使用方式详见文档：https://duckling.leovan.tech。参考Haskell 原始版本：DucklingScala 中文版本：duckling-fork-chinese许可The MIT License (MIT)
Package: duck-orm
DuckORMTheDuck-ORMpackage is an asynchronous ORM for Python, with support forPostgresandSQLite. ORM is built with:databasesRequirements: Python 3.8+Duck-ORM is still under development.Installation$pipinstallduck-orm!!! note
Don't forget to installdatabasesbefore installingduck-orm.QuickstartFor this example we will create a connection to the SQLite database and create a model.$pipinstalldatabases[sqlite]$pipinstallipythonNote that we want to useipythonhere, because it supports using await expressions directly from the console.Creating the connection to the SQLite database:fromdatabasesimportDatabasefromduck_orm.modelimportModeldb=Database('sqlite:///example.db')awaitdb.connect()Defining a model:fromduck_orm.sqlimportfieldsasFieldclassPerson(Model):__tablename__='persons'__db__=dbid:int=Field.Integer(primary_key=True,auto_increment=True)first_name:str=Field.String(unique=True)last_name:str=Field.String(not_null=True)age:int=Field.BigInteger(min_value=18)# Table creation in the database.awaitPerson.create()The__tablename__attribute is used to define the table's name in the database.The__db__attribute is the instance of the database connection.And then the definition of the fields, their types and restrictions.And finally, the table creation in the database.AuthorRich Ramalho -@richecr-@richzinho_ecrLicenseDuckORMis built as an open-source tool and remains completely free(MIT license).
Package: duckpond
A [semantic data lake](http://cacm.acm.org/news/200095-the-data-lake-concept-is-maturing/fulltext) can
be thought of a set of resources annotated with semantics (i.e., triples or quads).  In the context of big data,
a “data lake” is a massive repository of data, structured or unstructured, of which we gain knowledge of
its contents by examining the semantic graphs derived from their contents.That’s a big idea.  This project is about asemantic data lakeat a much smaller
scale: a pond. I also like ducks and so it is aduck pond.We can paddle around in our content, just like a duck, and harvest a bit knowledge
to derive local value.  In this case, we use the semantic pond to understand the
content, its inter-relations, ordering, and other such content relations.  From
that, we can derive a useful presentation on the Web.
Package: duckpy
A simple Python module for searching on DuckDuckGo.InstallationDuckpy can be installed using pip with this commandpipinstall-UduckpyAlternatively, you can install the most recent version from gitpipinstall-Ugit+https://github.com/AmanoTeam/duckpyIf you are using Debian or Ubuntu, you can install with this command (Currently only in Debian Unstable and Ubuntu 20.10+)sudoaptinstallpython3-duckpyUsagefromduckpyimportClientclient=Client()results=client.search("Python Wikipedia")# Prints first result titleprint(results[0].title)# Prints first result URLprint(results[0].url)# Prints first result descriptionprint(results[0].description)We also provide an asynchronous version inside theAsyncClientclassimportasynciofromduckpyimportAsyncClientclient=AsyncClient()asyncdefget_results():results=awaitclient.search("Python Wikipedia")# Prints first result titleprint(results[0].title)# Prints first result URLprint(results[0].url)# Prints first result descriptionprint(results[0].description)loop=asyncio.get_event_loop()loop.run_until_complete(get_results())The resultPython (programming language) - Wikipedia
https://en.wikipedia.org/wiki/Python_(programming_language)
Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991...Advanced usageYou can also set up proxies or set up custom User-Agent strings depending on your needs.Setting up proxiesDuckDuckGo may temporarily block your request IP or return empty results, especially if you are using the library for scraping, bots and other stuff that generate many requests. This is not a duckpy issue and can be prevented using proxies.You can pass a list with proxies in the Client object, then duckpy will use these proxies to make requests:importduckpyclient=duckpy.Client(proxies=['http://123.45.67.89:80','https://98.76.54.32:443'])If you pass more than one proxy, they will be randomly chosen every time you use the .search() method.Setting up custom User-Agentsimportduckpyuser_agents=["Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36"]client=duckpy.Client(default_user_agents=user_agents)Again, if you pass more than one User-Agent, they will be randomly chosen every time you use the .search() method.DisclaimerWe are not affiliated, associated, authorized, endorsed by, or in any way officially connected with DuckDuckGo, or any of its subsidiaries or its affiliates. The official DuckDuckGo website can be found athttps://duckduckgo.com.
Package: duckql-django
duckql-django 🐥backboneQL bindings intoDjangoORM and permissions system. This package suppose
to provide:Database introspectionAbility to grant permissions to models and their propertiesCustom back-end query validationResourcesHow Django Uses Metaclasses For Data ModellingAdvanced Python through Django: metaclassesMade with ☕️ and ❤️ by Jakub Dubec &BACKBONE s.r.o.Changelog0.8.1 : 2022-06-07Fixed: Fixed JOIN type types (mapping using entity name instead of properties)0.8.0 : 2022-06-07Added: Possibility to specify JOIN type0.7.2 : 2021-10-26Fixed:DateTimefields hasfunctions.Maxaggregation by default0.7.1 : 2021-07-20Changed: Upgrade toduckql-python0.9.10.7.0 : 2021-06-25Changed: Upgrade toduckql-python0.9.0Changed:update_forward_refs0.6.6 : 2020-10-15Changed: Upgrade toduckql-python0.8.20.6.5 : 2020-10-15Changed: Upgrade toduckql-python0.8.10.6.4 : 2020-10-14Changed: Upgrade toduckql-python0.8.00.6.3 : 2020-08-28Changed: Upgrade toduckql-python0.7.20.6.2 : 2020-08-27Changed: Upgrade toduckql-python0.7.10.6.1 : 2020-08-25Fixed: Fixed key error in schema permission checking0.6.0 : 2020-08-25Added: Callable permission checker for entityFixed:Schema._check_permissions_for_fieldis not always returning True now0.5.0 : 2020-08-25Added: Callable permission checkers for fields0.4.2 : 2020-08-13Changde: Moved metadata to according field without merge0.4.1 : 2020-08-13Changed: Moved metadata to according field0.4.0 : 2020-08-13Added: Field metadata in schemaAddedInitial formatters support0.3.3 : 2020-08-04Added: Upgrade toduckql-python0.6.1 (Python 3.8 compatibility)0.3.2 : 2020-07-23Changed: Upgrade toduckql-python0.6.00.3.1 : 2020-07-22Changed: Upgrade toduckql-python0.5.00.3.0 : 2020-06-15Added:PermissionsMixininQueryWrapperinputAdded:available_columnsinSchema0.2.0 : 2020-06-03Added: Permission checkers inSchema0.1.5 : 2020-05-19Added: Pass base model in Schema__init__0.1.4 : 2020-05-19Fixed: Fixed invalid import0.1.3 : 2020-05-19Fixed: Invalid typing inBaseReportConfig0.1.2 : 2020-05-19Changed: Use inheritance instead of meta-classes inReportConfig(temporary)0.1.1 : 2020-04-29Changed: Shiny imports from mainduckql_djangomodule0.1.0 : 2020-04-29Initial release
Package: ducks
Index your Python objects for fast lookup by their attributes.Installpip install ducksUsageThe main container in ducks is called Dex.from ducks import Dex

# make some objects
objects = [
    {'x': 3, 'y': 'a'},
    {'x': 6, 'y': 'b'},
    {'x': 9, 'y': 'c'}
]

# Create a Dex containing the objects.
# Index on x and y.
dex = Dex(objects, ['x', 'y'])

# match objects
dex[{
    'x': {'>': 5, '<': 10},  # where 5 < x < 10
    'y': {'in': ['a', 'b']}  # and y is 'a' or 'b'
}]
# result: [{'x': 6, 'y': 'b'}]This is a Dex of dicts, but the objects can be any type.Dex supports ==, !=, in, not in, <, <=, >, >=.The indexes can be dict keys, object attributes, or custom functions.Is Dex fast?Yes. Here’s how Dex compares to other object-finders on an example task.Benchmark sourceThe closest thing to a Dex is an in-memory SQLite. While SQLite is a fantastic database, it requires
more overhead. As such, Dex is generally faster.DocsThere’s more to ducks than making a Dex of dicts.Continue in the docs.
Package: duckstruct
git init# duckstructDependencies:NoneDeveloper:Emmanouil (Manios) KrasanakisContant:maniospas@hotmail.comQuickstartfromduckstructimportTypeListenerimportnumpyasnpx=np.array([1,2,3])y=np.array([5,6])z=np.array([7.])x=TypeListener(x)y=TypeListener(y)z=TypeListener(z)print(x)print(x+1+y.sum()+z.sum())After running the code, you can show the structure a new variable
should have to replace all others inyamlformat.print(x.type()&y.type()&z.type())This yields the minimum necessary structure for the code to run:object:
  __str__: 
    returns:
      class: str
  __add__: 
    returns:
      class: ndarray
  sum: 
    returns:
      -  class: int32
      -  class: float64
Package: duckt
ducktA small Python package facilitating duck typing through attribute traverse utilitiesThis replaces try/except chains when trying to call different methods:fromducktimportDuck,DuckCallclassLion:defroar(self):return"roar!"creature=Lion()assertDuck(creature).attr_call(DuckCall("make_sound",["woof"]),# tries to call creature.make_sound("woof")DuckCall("make_sound",["buzz",100]),# tries to call creature.buzz("buzz", 100)DuckCall("bark"),# creature.bark()DuckCall("roar"),# creature.roar()DuckCall("speak",["Hello "],{"times":3})# creature.speak("Hello ", times=3))=="roar!"# returns the output of the first successfull call# if none of the call attempts was successful then the last raised error will be thrownDuckCallclass is fully replacable here with any custom callable accepting single argument. This argument is theDuck-wrapped object, so you can implement custom attribute extracting and/or calling behavior here.AttributeErrors andTypeErrors thrown from this callable is handled by theDuckinstance.Simplified interface for property extraction:fromducktimportDuckclassPerson:full_name="John Doe"some_person=Person()name=Duck(some_person).attr('first_name','name','full_name')# name now is equal to the first present attribute# otherwise AttributeError is thrownYou may also useDuckas wrapper to a callable:fromducktimportDuckdeffoo(some_string):print(some_string)duck=Duck(foo)duck.call(["hello","world"],# foo("hello", "world")["hello world"],# foo("hello world")[[],{"hello":"world"}]# foo(hello="world"))InstallationpipinstallducktThat's it.
Package: ducktest
ducktest is a command line tool to generate type hints from unit tests.ducktest executes tests in given folders and collects the types of call parameters and return values. Then it writes
that information into the corresponding method docstrings.github:https://github.com/markuswissinger/ducktestpy/documentation:https://github.com/markuswissinger/ducktestpy/blob/master/doc/doc.rst
Package: ducktoolkit
DuckToolkitEncoding Tools for Rubber Ducky.
The duck tools are available in the browser athttps://ducktoolkit.com. From here you can also generate payloads from a selection of predefined scripts and templates.DisclaimerThe Duck Toolkit is an open source Penetration Testing tool for authorized network auditing and security analysis purposes only where permitted. Users are solely responsible for compliance with all laws of their locality. The Duck Toolkit software developers and affiliates claim no responsibility for unauthorized or unlawful use.InstallationDownload the release and install withpython setup.py installOrsudo pip install --upgrade ducktoolkitThere are no external dependencies other than python.
This has been tested on Ubuntu and Windows 10UsageThe DuckToolkit is provided with a script that will allow you to easily encode and decode your files.EncodeTo encode point the script at your duckcode.txt file, select an output and a language as show in the example below:ducktools.py -e -l gb /path/to/duck_text.txt /path/to/output.binDecodeTo decode point the script at your inject.bin file, select an output and a language as show in the example below:ducktools.py -d -l gb /path/to/inject.bin /path/to/output.txtLibraryThe toolkit can also be imported as a library.from ducktoolkit import encoder

duck_text = 'STRING Hello'
language = 'gb'
duck_bin = encoder.encode_script(duck_text, language)LimitationsThe encoder can only deal with certain Command keys and key combinations. Please seehttps://usbrubberducky.comfor details on supported commands.The decoder is a best effort decoder. It will attempt to restore all command keys and strings. But its a lot harder going backwards. You will NOT be able to generate
a valid duck script from an inject.binToDoSupport more keyboard layouts / languages.Improve the decoder.Pip Installation
Package: ducktools
ducktoolsThis is a namespace project that will installallducktools modules.This mostly exists to make sure that 'ducktools' on pip installs all ducktools namespaced projects in the case
that someone typespip install ducktools.If you are using one of the modules in a project it is highly recommended to depend on that module directly.Modules are not versioned under this meta package, it will always install the newest version
of all included modules.Included modules:ducktools-lazyimporterducktools-jsonkitducktools-scriptmetadataducktools-pythonfinderLicensingIndividual components of ducktools may be licensed under more permissive (non-copyleft) licences
this namespace package uses GPLv3 as the least permissive license any included project may use.
Package: ducktypes
RationaleAllows working with objects depending on their current behaviour, not their type or their registered (ABC-like) interface.Quick example:from ducktypes.ducktype import Duck

class MyObject(object):
    def some_method(self, a, b):
        pass
    def another_method(self, x):
        pass


class AnotherObject(object):
    def some_method(self, a, b):
        pass
    def another_method(self, a):
        pass

class AnotherDifferentObject(object):
    def some_method(self, a, b, c):
        pass
    def another_method(self, a):
        pass

duck = Duck(MyObject())

print "AnotherObject instances implement MyObject interface: ", duck.maybe_implemented_by(AnotherObject())
print "AnotherDifferentObject instances implement MyObject interface:", duck.maybe_implemented_by(AnotherDifferentObject())Output:AnotherObject instances implement MyObject interface:  True
AnotherDifferentObject instances implement MyObject interface: FalseGotchaspositional arguments are supposed to be called as positional arguments, and keyword arguments  are supposed to be called as positional arguments. If your client code calls keyword arguments as positional ones, signature matching may fail.proxy-everything methods, i.e.(*args, **kwargs)-like signature, will of course deceive our signature detection system.Todo__getattr__ / __getattribute__ overriding functionssubclasses exposing special methods with different signatureC-declared functions that don’t expose their signature.implement optional strict checking.
Package: duco
ducoDUCO (Duino Coin) is a cryptocurrency created to be mined on small low powered, low cost devices such as Arduino (hence (Ar)DuinoCoin). More about the coin can be found on thewebsite.This is a simple Python package that helps you connect to the REST API, allowing you to get all data about current miners, balances, transactions, and server statistics.Installationpython3 -m pip install ducoUsagefromducoimportDUCOd=DUCO()balances=d.fetch_balances()Fetch MinersDescription:The function used to retrieve all miners from the REST API.Signature:fetch_miners(self, filters: List[Filter] = None)Arguments:filters: a list ofFilterobjects used to narrow down results. (Optional)Returns:Fetch MinerDescription:The function used to retrieve a single miner by it'sthreadidfrom the REST API.Signature:def fetch_miner(self, threadid: str)Arguments:-threadid: the thread id of the miner you wish to getReturns:- aMinerobjectFetch TransactionsDescription:The function used to retrieve all transactions from the REST API.Signature:def fetch_transactions(self, filters: List[Filter] = None, sort: Sort = None, limit: Limit = None)Arguments:-filters: a list ofFilterobjects used to narrow down results. (Optional)
-sort: a singleSortobject detailing how the response should be sorted. (Optional)
-limit: a singleLimitobject detailing how many objects should be in the response. (Optional)Returns:- a list ofTransactionobjectsFetch TransactionDescription:The function used to retrieve a single transaction by it'shashfrom the REST API.Signature:def fetch_transaction(self, hash_id: str)Arguments:-hash_id: the hash of the transaction you wish to getReturns:- aTransactionobjectFetch BalancesDescription:The function used to retrieve all balances from the REST API.Signature:def fetch_balances(self, filters: List[Filter] = None, sort: Sort = None, limit: Limit = None)Arguments:-filters: a list ofFilterobjects used to narrow down results. (Optional)
-sort: a singleSortobject detailing how the response should be sorted. (Optional)
-limit: a singleLimitobject detailing how many objects should be in the response. (Optional)Returns:- a list ofBalanceobjectsFetch BalanceDescription:The function used to retrieve a single balance for a user from the REST API.Signature:def fetch_balance(self, username: str)Arguments:-username: the username of the balance you wish to getReturns:- aBalanceobjectFetch StatisticsDescription:The function used to retrieve the statistics from the REST API.Signature:def fetch_statistics(self)Returns:- aStatisticsobject