Saravanan666/pypi-org huggingface dataset:
Package: quicksocket
quicksocketA simple WebSocket server built in Rust usingtokio,tokio-tungstenite, andpyo3. Supports Windows, macOS, and Linux. Still unstable!pipinstallquicksocketCheck out example-usage/quicksocket_with_types.py for an example of a wrapper WebsocketServer class around the quicksocket API and also provides type annotations for e.g. autocompletion in your IDE.Not stable, a bit verbose, and a bit messy!The server listens for WebSocket connections on port50808, and currently this is not configurable. (see src/server/tokio_server.rs).quicksocket's code is originally designed for use with Ultraleap's Web Visualizer project, and as such is intended for a console python visualizer server and leverages plainprintln!s for logging purposes.At some point in the future it'll make sense to switch to some proper env logging system. Pardon the mess :)Building LocallyYou'll needRustand access to some python.exe of version 3.6 or greater.You'll also need OpenSSL. See the Ubuntu section for installation details on Ubuntu. OpenSSL is slightly trickier for Windows. You can use Chocolatey or vcpkg, or download a binary distribution of OpenSSL. You may need to set$Env:OPENSSL_DIR(PowerShell syntax) to your installation directory for your Windows build session if using Chocolatey, or a binary install, or if vcpkg isn't activated for your session. macOS should have it by default.Once Rust is installed:cargobuild--releaseThis will output an .so or a .pyd depending on your OS into thetarget/releasedirectory.To build a wheel for your python/OS combo:pipinstallmaturin
maturinbuildThere's CI for Windows, macOS, and Linux for Pythons 3.6 through 3.9. Check out the Actions tab for now (proper release tags coming "soon").Targeting builds to specific Python versionsIf you're targeting a specific python version, or if you don't have python on your PATH, you can setPYTHON_SYS_EXECUTABLEto the python executable in your machine with that version.e.g., on Windows via Git Bash:PYTHON_SYS_EXECUTABLE=/c/my/path/to/python.execargobuild--releaseUbuntuMake sure you have libssl and libpython installed:sudoapt-getinstalllibssl-dev
sudoapt-getinstalllibpython3-devIf you encounter errors buildingpyo3, you may need to check whether it can find your python and any related python dev dependencies:https://pyo3.rs/v0.10.1/building_and_distribution.htmlTodos:Little utility HTML via github pagesCould expose this through Github Pages so it's easy for a new user to test their server usage:https://github.com/nickjbenson/quicksocket/blob/main/archive/examples/wip01_basic_websocket_client.html
Package: quicksqlconnector
Developers are struggling to execute a query and what if you need to execute another query somewhere else? That's a lot of code to rewrite again. You don't have to do this because QuickSQLConnector got you covered!.Quick SQL Connectoris a python library that lets you execute MySQL, PostgreSQL, and SQLite queries with just one line of code.Reducing 80% lines of code and get more done and it's all done in the same syntax with all SQL databases mentioned.Installation 💿USING PIPpip install quicksqlconnectorFOR LINUX FRIENDSpython3 pip install quicksqlconnectorTo update Quick SQL Connector to the latest version, add --upgrade flag to the above commands.Write your first query.Use 'quicksqlconnector' keyword to importfrom quicksqlconnector import quicksqlconnectorCreating instance of moduleDB = quicksqlconnector('database','host', port, 'username', 'password')

NOTE : If you're using SQLite, you must provide database file name as follows.

DB = quicksqlconnector('sqlite3', database_name='my_example_database')For database, it has 3 options (case-sensitive).mysqlsqlite3postgresquicksqlconnector only have one method which is 'query'.DB.query('query','parameters:optional')

FOR SQLite, you don't need to use parameterized quieries as it is not supported in SQLite.It has two arguments, query and parameters, parameters are optional.# EXAMPLES FOR 'MYSQL'

DB.query("SELECT * FROM test where id= %s", (input_user,))
DB.query("SELECT * FROM test")
DB.query('CREATE TABLE test(name varchar(10), id int(10))')
DB.query("INSERT INTO test values(%s, %s)", ('harry', 13))

# EXAMPLES FOR 'SQLITE'

DB.query('DROP TABLE movie')
DB.query("CREATE TABLE movie(title varchar(1), year int(1), score int(1))")

# EXAMPLE FOR 'POSTGRESQL'

DB.query('SELECT datname FROM pg_database')Seetest.pyformore examples.🔗Useful LinksRouteLinkBuy me a CoffeeVisitEmailVisitPyPiVisitWebsiteVisit
Package: quick-start
QuickStartCria um projeto baseado em um modeloInstalaçãoLinux:$pythonsetup.pyinstall--user$~/.local/bin/quickstart_installerExemplo de uso$pyinitnome_do_projetoConfiguração para Desenvolvimentopythonsetup.pydevelopHistórico de lançamentos* Trabalho em andamentoMetaSeu Nome –@ztzandre–andreztz@gmail.comDistribuído sob a licença XYZ. VejaLICENSEpara mais informações.https://github.com/andreztz/quick-install
Package: quickstart-django
Quickstart_djangoA small python package which will help you to quickly start your django project. It will create a django project with all the necessary files and folders in just single command.Istallationpy-mpipinstallquickstart-djangoUsagepy-mquickstart_djangoproject_nameapplication_nameRun LocallyInstall dependenciespy-mpipinstallDjangoClone the projectgitclonehttps://github.com/jaythorat/quickstart_djangoExecute the commandpy./quickstart_django/src/quickstart_django/quickstart_django.pyproject_nameapplication_nameThis will create a working django application with all the initial setup which is needed to run the app. Just change directory to project directory and runpy manage.py runserverAuthors@jaythorat
Package: quickstartlog
A simple log utility, write log into console & file(TimedRotatingFileHandler)Examplesmain.py:import quickstartlog as qslog
qslog.debug('this is debug')
qslog.info('this is info')
qslog.warn('this is warning')
qslog.error('this is error')
qslog.info_ex(qslog.LIGHT_GREEN)('this is info with LIGHT_GREEN')console output & ./var/log/main.log:[19:30:07 INFO ] this is info
[19:30:07 WARNI] this is warning
[19:30:07 ERROR] this is error
[19:30:07 INFO ] this is info with LIGHT_GREEN
Package: quickstats
SetupClone the repository:git clone ssh://git@gitlab.cern.ch:7999/clcheng/quickstats.git1. CERN UserTo set up from lxplus, just dosource setup.sh2. Genearl UserTo set up locally, make sure you have pyROOT 6.24+ installed (using conda is recommended), and dopip install quickstatsInstalling pyROOTSimplest way to install pyROOT is via condaconda install -c conda-forge ROOTImportant: First-time compilationTo compile c++ dependencies, do this for first time usequickstats compileCommand Line ToolsRun Nuisance Parameter Pulls and Rankingquickstats run_pulls -i <input_ws_path> -d <dataset_name> -p <np_name/pattern> --poi <poi_name> --parallel -1 -o <output_dir>The following options are availableOptionDescriptionDefault-i/--input_filePath to the input workspace file--w/--workspaceName of workspace. Auto-detect by default.None-m/--model_configName of model config. Auto-detect by default.None-d/--dataName of dataset"combData"-p/--parameterNuisance parameter(s) to run pulls on. Multiple parameters are separated by commas. Wildcards are accepted. All NPs will be run over by default""-x/--poiPOIs to measure. If empty, impact on POI will not be calculated.""-r/--profileParameters to profile""-f/--fixParameters to fix""-s/--snapshotName of initial snapshot"nominalNuis"-o/--outdirOutput directory"pulls"-t/--minimizer_typeMinimizer type"Minuit2"-a/--minimizer_algoMinimizer algorithm"Migrad"-c/--num_cpuNumber of CPUs to use per parameter1--binned/--unbinnedWhether to use binned likelihoodTrue-q/--precisionPrecision for scan0.001-e/--epsTolerance1.0-l/--log_levelLog level"INFO"--eigen/--no-eigenCompute eigenvalues and vectorsFalse--strategyDefault fit strategy0--fix-cache/--no-fix-cacheFix StarMomentMorph cacheTrue--fix-multi/--no-fix-multiFix MultiPdf level 2True--offset/--no-offsetOffset likelihoodTrue--optimize/--no-optimizeOptimize constant termsTrue--max_callsMaximum number of function calls-1--max_itersMaximum number of Minuit iterations-1--parallelParallelize job across different nuisanceparameters using N workers. Use -1 for N_CPU workers.0--cache/--no-cacheCache existing resultTrue--excludeExclude NPs (wildcard is accepted)""Plot Nuisance Parameter Pulls and Rankingquickstats plot_pulls --helpLikelihood Fit (Best-fit)quickstats likelihood_fit --helpRun Likelihood Scanquickstats likelihood_scan --helpAsymptotic CLs Limitquickstats cls_limit --helpCLs Limit Scanquickstats limit_scan --helpGenerate Asimov datasetquickstats generate_standard_asimov --helpInspect Workspacequickstats inspect_workspace --helpCreate Workspace from XML Cardsquickstats build_xml_ws --helpModify Workspace from XML Cards or Json Configquickstats modify_ws --helpCombine Workspace from XML Cards or Json Configquickstats combine_ws --helpCompare Workspacesquickstats compare_ws --helpRun Event Loop from Custom Config Filequickstats process_rfile --help
Package: quickstockdata
QuickStockDataA python module that returns stock price data and stock symbols.InstallationInstallquickstockdatausingpip:$ pip install quickstockdataDescription of functionsget_prices :Input:symbol: Symbol of stock (string)intv: Interval of time (string, optional, default=1d)rng: Range of time (string, optional, default=1wk)intvandrngboth takes values from1m,2m,5m,15m,30m,60m,90m,1h,1d,5d,1wk,1moand3mo.ohlc: Specify High, Low, Open and Close prices (string, optional, default='high')stock_exc: specify stock exchange to get data from (string, optional, default='nse')Output:
list: A list of lists containing the timestamp and corresponding price for each data point.get_nse_symbols :Input: NoneOutput: A list of dictionaries containing the stock names and symbols of nse.get_nasdaq_symbols :Input: NoneOutput: A list of dictionaries containing the stock names and symbols of nasdaq.find_nse_stock :Input:search_term: search term to search for stock symbol in nse (string)Output: A list of dictionaries containing the stock names and symbols of nse.find_nasdaq_stock :Input:search_term: search term to search for stock symbol in nse (string)Output: A list of dictionaries containing the stock names and symbols of nasdaq.
Package: quick-styles
quick_stylesAn unbelievably lightweight Python library for effortlessly applying ANSI escape color & style codes to Windows CMD and other ANSI-supported terminalsDescriptionquick_styles enhances the experience of using the current unintuitive ANSI escape code system for text styling in Python. With quick_styles, you can easily generate ANSI codes with set parameters, save styles for future use, and implement custom codes for personalized styles.DownloadFrom PyPI usingpip:pipinstallquick-stylesUsageExample programBefore we proceed to the explict info regarding the library's functionality, here's a preview of the core functions of quick_styles to get a sense of its capabilities:importquick_stylesasqsprint("Hi there! I'm a boring print statement. By default, I am unable to be styled and my appearance is immutable. ""Womp womp!")print("\033[34mTypically, you would have to manually surround me with ANSI escape codes. Not only is this method of ""styling tedious, but also makes the text less readable and does not clearly indicate what styles are being ""applied to the person inspecting the code.\033[0m")qs.xprint("Well, well, what do we have here? I'm a styled print statement as well, but there are no ANSI codes ""visible. It's just an additional parameter!",color="blue")ex_input=qs.xinput("This applies to inputs too!")qs.xprint("This works for applying a text style as well.",styles="bold")qs.xprint("Or multiple...",styles=["bold","underline"])# To apply a particular assortment of styles to multiple strings, you can create custom ANSI codes to apply in the futureqs.custom_codes["red_title"]=qs.create_code(color="black",bgcolor="red",styles="bold")qs.xprint("Not only do I possess the previously listed styles",custom_code="red_title")qs.xprint("but I do as well!",custom_code="red_title")# There are also modifiers for the content of the string itself, such asqs.xprint("a warning format,",modifier="warning")# ! a warning format, !qs.xprint("or prepending the text with the current time!",modifier="time_display")# [14:19:21] or prepending the text with the current time!# Default values can also be modifiedqs.defaults.values["color"]="red"qs.defaults.values["styles"]="bold"qs.defaults.values["modifier"]="warning"# Subsequent calls without explicit values resort to default valuesqs.xprint("I'm styled, yet the parameters aren't directly stated!")# Specified values override defaultsqs.xprint("I'm still special!",color="green")# Reset function returns defaults to initial valuesqs.defaults.reset()# Strings can also be styled without being immediately printedstyled_string=qs.style_string("You can't see me...",styles="italic")
Package: quicktake
QuickTakeOff-the-shelf computer vision ML models. Yolov5, gender and age determination.The goal of this repository is to provide, easy to use, abstracted, APIs to powerful computer vision models.Models$3$ models are currently available:Object detectionGender determinationAge determinationModel EngineThe modelsYoloV5: Object detection. This forms the basis of the other models. Pretrained onCOCO. DocumentationhereGender:ResNet18is used as the models backend. Transfer learning is applied to model gender. The additional gender training was done on thegender classification dataset, using code extract fromhere.Age: The age model is an implementation of theSSR-Netpaper:SSR-Net: A Compact Soft Stagewise Regression Network for Age Estimation. ThepyTorchmodel was largely derived fromoukohou.Getting StartedInstall the package with pip:pip install quicktakeUsageBuild an instance of the class:fromquicktakeimportQuickTakeImage InputEach model is designed to handle $3$ types of input:raw pixels (torch.Tensor): raw pixels of a single image. Used when streaming video input.image path (str): path to an image. Used when processing a single image.image directory (str): path to a directory of images. Used when processing a directory of images.Expected UseGenderandagedetermination models are trained on faces. They work fine on a larger image, however, will fail to make multiple predictions in the case of multiple faces in a single image.The API is currently designed to chain models:yolois used to identify objects.IFa person is detected, thegenderandagemodels are used to make predictions.This is neatly bundled in theQuickTake.yolo_loop()method.Getting StartedLaunch a webcam stream:QL=QuickTake()QL.launchStream()Note: Each model returns the resultsresults_as well as the runtimetime_.Run on a single frame:fromIPython.displayimportdisplayfromPILimportImageimportcv2# example imagesimg='./data/random/dave.png'# to avoid distractionsimportwarningswarnings.filterwarnings('ignore')# init modulefromquicktakeimportQuickTakeqt=QuickTake()# extract frame from raw image pathframe=qt.read_image(img)We can now fitqt.age(<frame>)orqt.gender(<frame>)on the frame. Alternatively we can cycle through the objects detected  byyoloand if a person is detected, fitqt.age()andqt.gender():# generate pointsfor_label,x0,y0,x1,y1,colour,thickness,results,res_df,age_,gender_inqt.yolo_loop(frame):_label=QuickTake.generate_yolo_label(_label)QuickTake.add_block_to_image(frame,_label,x0,y0,x1,y1,colour=colour,thickness=thickness)The result is an image with the bounding boxes and labels, confidence (in yolo prediction), age, and gender if a person is detected..The staged output is also useful:.For a more comprehensiveexampledirectory.FutureI have many more models; deployment methods & applications in the pipeline.If you wish to contribute, please email me@zachcolinwolpe@gmail.com.
Package: quicktests
quicktestsA library for python for easy testing.ExampleExample 1: TestBasefromquicktestsimportprint_report,TestBaseclassTest(TestBase):deftest_one_equals_one(self):assert1==1,"One does not equal one"deftest_one_equals_one_str(self):assert"One"=="One","\"One\"does not equal\"One\""if__name__=='__main__':print_report(Test())The code above provides the following information:Ran 2 tests.
Running tests took 4.887580871582031e-05 seconds.
No failed tests.
No errors were found. Add more code to verify your code is working.Example 2: MiniTestfromquicktestsimportprint_report,MiniTestif__name__=='__main__':defcomplex_test():returnFalseprint_report(MiniTest(test_true=[lambda:True,"Returns True"],test_false=[lambda:False,"Returns False"],test_error=[lambda:1/0,"This is wrong"],test_complex=[complex_test,"This is complex"],test_with_really_long_name=[lambda:False,"This is a long name",]))The code above provides the following information:Ran 5 tests.
Running tests took 4.076957702636719e-05 seconds.
4 failed tests:
1. test 'complex':               <class 'AssertionError'> -> This is complex
2. test 'error':                 <class 'ZeroDivisionError'> -> division by zero
3. test 'false':                 <class 'AssertionError'> -> Returns False
5. test 'with really long name': <class 'AssertionError'> -> This is a long name
Package: quicktex
QuicktexA python library for using DDS filesQuicktex is a python library and command line tool for encoding and decoding DDS files.
It is based on theRGBCX encoder, which is currently
one of thehighest quality S3TC encoders available.
Quicktex has a python front end, but the encoding and decoding is all done in C++ for speed
comparable to the original library.InstallationFrom Wheel (Easiest)To install, runpipinstallquicktexIf you are on macOS, You need to install openMP from homebrew:brewinstalllibompFrom SourceTo build from source, first clone this repo and cd into it, then run:gitsubmoduleupdate--init
pipinstall.and setuptools will take care of any dependencies for you.If you are on macOS, it is recommended to first install openMP from homebrew to enable
multithreading, since it is not included in the default Apple Clang install:brewinstalllibompThe package also makes tests, stub generation, and docs available. To install the
required dependencies for them, install with options like so:pipinstall.[tests,stubs,docs]UsageUsage: quicktex [OPTIONS] COMMAND [ARGS]...

  Encode and Decode various image formats

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  decode  Decode DDS files to images.
  encode  Encode images to DDS files of the given format.To decode DDS files to images, use thedecodesubdommand, along with a glob or a
list of files to decode.To encode images to DDS files, use theencodesubcommand, plus an additional
subcommand for the format. For example,quicktex encode bc1 bun.pngwill encode
bun.png in the current directory to a bc1/DXT1 dds file next to it.encodeanddecodeboth accept several common parameters:-f, --flip / -F, --no-flip:  Vertically flip image before/after converting.
[default: True]-r, --remove: Remove input images after converting.-s, --suffix TEXT: Suffix to append to output filename(s).
Ignored ifoutputis a single file.-o, --output:  Output file or directory. If outputting to a file, input filenames
must be only a single item. By default, files are converted in place.
Package: quicktimekeeper
QuickTimeKeeperQuickTimeKeeper is a small Python library for timing how long functions take to run.UsageSimply import QuickTimeKeeper and call thetime_functionmethod to time any function you pass in as the parameter. It returns how long the function took to run. Optionally, you can pass in extra args totime_functionwhich will be passed into the function to time.importquicktimekeeperasquicktimerdeffibonacci(n):ifn<2:returnnelse:returnfibonacci(n-1)+fibonacci(n-2)time_taken=quicktimer.time_function(fibonacci,n=10)print(f"It took{time_taken}ms to run fibonacci(10)")
Package: quicktimer
TimerAn easy to use python package to handle time measurements in code.Instantiate theTimerclass and insert one-liners withtake_time()between your existing code to take timestamps.Call thefancy_print()function to print a nicely formatted overview of how much time has passed overall, how much time has passed between thetake_time()calls, including percentage per step and passed step-descriptions.InstallationThe package is available onPyPi:pip install quicktimerUsageThe entire functionality is documented in-depth onreadthedocs.
In the following a quick overview of the basic functionality is shown.The two main commands aretake_time()andfancy_print().Both can be used without any parameters, although you should pass at least a description totake_time("Finished_x!")to add some context to your measurements.You can either make use of the default output method (printto the console) or you can pass a custom function: for instance to pass the messages to a logger.Using the default output method (print)When nooutput_funcparameter is passed during instantiation, it defaults toprintthe messages to the console as follows:importtimefromquicktimerimportTimerT=Timer()# take the starting timeT.take_time(description="The description of the first function-call is not displayed!")time.sleep(1.1)# code substitute: parsing the dataT.take_time("Parsed the data")time.sleep(0.02)# code substituteT.take_time()time.sleep(0.1)# code substitute: Storing the dataT.take_time("Stored the data",True)T.fancy_print()Output of the code in the console:> Stored the data
> ------ Time measurements ------
> Overall: 0:00:01.254049
> Step 0: 0:00:01.113962 -  88.83 % - Description: Parsed the data
> Step 1: 0:00:00.030001 -   2.39 % - Description: 
> Step 2: 0:00:00.110086 -   8.78 % - Description: Stored the dataUsing a logger as output methodInstead ofprintingto the console, you can also pass your own function to the module.
This can be used with an easily configuredloggerto write the messages to your log.importtimeimportloggingfromquicktimerimportTimer# setting up a loggermy_format="%(asctime)s[%(levelname)-5.5s]%(message)s"logging.basicConfig(filename='test.log',level=logging.INFO,format=my_format)logger=logging.getLogger()# logger.info will be used as the output function instead of printT=Timer(output_func=logger.info)T.take_time()# take the starting timetime.sleep(0.5)# code substitute: parsing the dataT.take_time("Parsed the data")time.sleep(0.1)# code substitute: Storing the dataT.take_time("Stored the data",True)T.fancy_print()Your log would look like this:2021-06-24 13:35:43,275 [INFO ]  Stored the data
2021-06-24 13:35:43,275 [INFO ]  ------ Time measurements ------
2021-06-24 13:35:43,275 [INFO ]  Overall: 0:00:00.624691
2021-06-24 13:35:43,275 [INFO ]  Step 0: 0:00:00.512639 -  82.06 % - Description: Parsed the data
2021-06-24 13:35:43,275 [INFO ]  Step 1: 0:00:00.112052 -  17.94 % - Description: Stored the data
Package: quick-torch
Quick, Torch!Quick, Torch! is a simple package that provides a"Quick, Draw!"dataset using the abstract classVisionDataset, provided bytorchvisionAPI. This package mirrors theMNISTdataset provided in torchvision.You can install this package withpip install quick-torch --upgradeExampleHere are a simple example of usage:fromquick_torchimportQuickDrawimporttorchvision.transformsasTds=QuickDraw(root="dataset",categories="face",download=True,transform=T.Resize((128,128)))print(f"{len(ds)= }")first_data=ds[0]first_data>>>Downloadinghttps://storage.googleapis.com/quickdraw_dataset/full/numpy_bitmap/face.npy>>>>>>len(ds)=161666>>>(<PIL.Image.Imageimagemode=Lsize=128x128>,108)For more examples, please refer to the notebookexample.ipynbReferencesThis work was mainly inspired by the following repositories:MNIST from torchvisionThe dataset of this notebook
Package: quicktrash
ExampleCommand:python3 -m quicktrash file0.txt file1.pdf folderOutput:/home/user/.quicktrash/0x2/home/user/Documents/file0.txt
/home/user/.quicktrash/0x2/home/user/Documents/file1.pdf
/home/user/.quicktrash/0x2/home/user/Documents/folderPython ExamplesUsing context:importquicktrashwithquicktrash.Trash("example-trashdir")astrash:trash.recycle("example-file.txt")Using next()importquicktrashtr=quicktrash.Trash("example-trashdir")trlet:quicktrash.Trashlet=next(tr)trlet.recycle("example-file.txt")