Saravanan666/pypi-org huggingface dataset:
Package: thpppt
Q: So, what’s this about then?Thpppt lets you make a quick start to your shiny new project by saving you tiresome typing.Q: So, like, a scaffolding/boilerplate/skeleton thing then?Exactly that.Q: So this would be what, the 54th PyPi project to solve this “problem” then?Yeah, about that. Not even counting all the versions of this in other languages…Q: Oh right. Well, I’ll let you knowTo be honest, Thpppt is more about writing a sample application for this other library [1] that I’ve
written than it is about “Solving” this “Problem”. You know, in order to DogFood the API.[1]https://github.com/davidmiller/ffsMeanwhile, back at the zoo:0.0.3 (Sep 11 2012)Experimental Backbone project support.
Added explicit dependencies to install_requires for system-wide installation.0.0.2Actually dsitribute file templates as part of the package.Add Elisp projects.
Add Licensing and build system stubs0.0.1Minimum viable product
Package: thppred
ThpPredA method for predicting therapeutic and non-therapeutic proteinsIntroductionThpPred is developed for predicting, designing and scanning therapeutic peptides. More information on ThpPred is available from its web serverhttp://webs.iiitd.edu.in/raghava/thppred. This page provides information about standalone version of ThpPred.Minimum USAGETo display the command line arguments, type the following command:thppred -hFull Usage:To run the code with your parameters, type the following command:thppred  -i |Input_File|  -m |Model|  -t |Threshold|Example Command:thppred - i file.fasta -m 1 -t 0.5Input File: It allow users to provide input in FASTA format. User should provide the file name along with its full path in case the input file is not in the same folder as the thppred_stand.py file.Model: In this program, four models have been incorporated;i) Model1 for predicting given input peptide/protein sequence as therapeutic and non-therapeutic peptide/proteins using XGBoost based on amino-acid composition of the peptide/proteins;ii) Model2 for predicting given input peptide/protein sequence as therapeutic and non-therapeutic peptide/proteins using Hybrid approach, which is the ensemble of XGBoost + Motif Score. It combines the scores generated from machine learning (XGB), and motif occurence as Hybrid Score, and the prediction is based on Hybrid Score.iii) Model3 for predicting given input peptide/protein sequence as therapeutic and non-therapeutic peptide/proteins using random forest based on dipeptide composition of the peptide/proteins;iv) Model4 for predicting given input peptide/protein sequence as therapeutic and non-therapeutic peptide/proteins using Hybrid approach, which is the ensemble of Random forest + Motif Score. It combines the scores generated from machine learning (RF), and motif occurence as Hybrid Score, and the prediction is based on Hybrid Score.User must enter model number(1,2,3 or 4) in the command line, else default value will be considered i.e. 2.Threshold: User should provide a threshold value that lies between 0 and 1, please note score is proportional to therapeutic potential of peptide.User must enter a valid threshold value in the command line, else default value will be considered i.e. 0.5.
Package: thquickjs
thquickjsPythonbinding forQuickJSJavaScript Engine.
QuickJS is a small and embeddableJavaScriptengine.
Safely evaluate untrusted JavaScript code.
Create and manipulate values inside the QuickJS runtime.
Expose host functions to the QuickJS runtime.InstallationpipinstallthquickjsSimple Usagefromthresultimportunwrapfromthquickjs.thquickjsimportQuickJSqjs=QuickJS()withunwrap():# call JS functioncode='''var f = (x) => {return [ x, x, x ];};'''qjs.eval(code)f:callable=qjs.get_function('f')result=f(10)assertresult==[10,10,10]Advanced Usagefromthresultimportunwrapfromthquickjs.thquickjsimportQuickJSqjs=QuickJS()withunwrap():# call JS functioncode='''var f = (x) => {return [ x ];};'''qjs.eval(code)f:callable=qjs.get_function('f')result=f(10)assertresult==[10]# register Python function inside JS runtimepy_name='pylam'py_func=lambdax:json.dumps([x*10])qjs.add_callable(py_name,py_func)# call Python function from JS runtimecode='''var g = (x) => {return [ JSON.parse(pylam(x)) ];};'''qjs.eval(code)g:callable=qjs.get_function('g')result=g(10)assertresult==[[100]]# call Python function registered in JS runtimepylam=qjs.get(py_name)result=pylam(5)assertresult==json.dumps([50])Testingdocker-composebuildthquickjs-test;docker-composerun--rmthquickjs-testCoveragedocker-composebuildthquickjs-coverage;docker-composerun--rm-v$PWD:/testthquickjs-coverageBuildingdocker-composebuildthquickjs-build;docker-composerun--rmthquickjs-buildLicensingthquickjsis licensed under the BSD 3 license.Check theLICENSEfor details.
Package: thr33p
Authenticating HTTP proxy for S3. Similar to these:s3proxys3-proxy-authngx_aws_authwhichmightbe better for you.quickstartCreate your config(s):$cat>~/.thr33p/config.py<<EOF
import certifi

http_pool_manager = {
   'cert_reqs': 'CERT_REQUIRED',
   'ca_certs': certifi.where(),
}

buckets =  {
   r'~.+-at-bernies': {
      'creds': {
         'access_key_id': 'EXAMPLE',
         'secret_access_key': 'EXAMPLEKEY',
      },
   }
}
EOF$cat>~/.thr33p/gunicorn.py<<EOF
import os

workers = 1

backlog = 1024

worker_class = 'gevent'

loglevel = 'info'

proc_name = 'thr33p'

def post_fork(server, worker):
    import thr33p

    config_path = os.path.abspath(os.path.join(__file__, '..', 'config.py'))
    thr33p.init(config_path)

EOFand run it withdocker:$sudodockerrun-p5000:8000-v$HOME/.thr33p/:/etc/thr33p/mayfieldrobotics/thr33p:latest--config=/etc/thr33p/gunicorn.py$curlhttp://127.0.0.1:5000/dead-1.jpeg--header"Host:weekend-at-bernies.s3.amazonaws.com"-vvvor ghetto dev style:$mkvirtualenvthr33p(thr33p)$pipinstallthr33p(thr33p)$thr33p-d-p5000~/.thr33p/config.py&(thr33p)$curlhttp://127.0.0.1:5000/dead-1.jpeg--header"Host:weekend-at-bernies.s3.amazonaws.com"-vvvconfigJust a python file like e.g. this:importosimportcertifi# passed to `urllib3.PoolManager`http_pool_manager={'cert_reqs':'CERT_REQUIRED','ca_certs':certifi.where(),}buckets={# authenticates buckets matching literal "wake-at-bernies" using temporary iam-role credsr'wake-at-bernies':{'creds':None}# authenticates buckets matching literal "evening-at-bernies" using env credsr'evening-at-bernies':{'creds':{'access_key_id':os.environ['AWS_ACCESS_KEY_ID'],'secret_access_key':os.environ['AWS_SECRET_ACCESS_KEY'],}}# authenticates buckets matching regex ".+-at-bernies" using baked credsr'~.+-at-bernies':{'creds':{'access_key_id':'EXAMPLE','secret_access_key':'EXAMPLEKEY',},}}devGet it:$gitclonegit@github.com:mayfieldrobotics/thr33p.git$cdthr33p$pipinstall-e.[tests]test it:$py.testtests/--covthr33p.pyand build docker images:$sudodockerbuild-t{your-account}/thr33p.releaseAll is well:$py.testtests/--covthr33p.pyso update__version__in:thr33p.pytag it (travis will publish it topypi):$gitcommit-am"release v{version}"$gittag-av{version}-m"release v{version}"$gitpush--tagsand register the tag withdockerso others can just:$sudodockerpullmayfieldrobotics/thr33p:{version}
Package: thrash-protect
The script attempts to detect thrashing situations and temporary stop rogue processes,
hopefully before things get too much out of control, hopefully giving a sysadm enough time
to investigate and handle the situation if there is a sysadm around, and if not - hopefully
allowing boxes to become just slightly degraded instead of completely thrashed, all until the offending
processes ends or the oom killer kicks in.As of 2014-09, the development seems to have stagnated - for the very simple reason that
it seems to work well enough for me.
Package: thraxisgamespatterns
This package is a collection of various programming patterns, adapted from Android code. They are useless by themselves - only by extending and completing them can they be useful to you. Good luck!Contained within:Constants interface (application.constants_interface)

Defaulting Dictionary (patterns.defaulting_dict)

Enumeration (enumeration)

    Matchers (enumeration.matcher.abstract_matcher)

    Value matcher (enumeration.matcher.abstract_value_matcher)

    Representables (enumeration.enums.abstract_representable)

    Visitor Pattern (enumeration.visitor.abstract_visitor)

Event Handling Pattern (eventhandling)

    Event Distributors

    Event Monitors (eventhandling.eventmonitoring.event_monitor)

    Event Trackers (eventhandling.abstract_event_tracker)

    Events (eventhandling.event)

    Reactions (eventhandling.abstract_reaction)

Executable Pattern (patterns.executable)

    Do-Nothing Executables (patterns.do_nothing_executable)

Factory Pattern (factories)

    Custom Factories (factories.abstract_custom_factory)

Listener Pattern (listeners)

    Dummy Listeners (listeners.dummy_listener)

    Listener Registry (listeners.abstract_listener_registry)

    Proxy Listeners (listeners.proxy_listener)

    Subject Listeners (abstract_event_subject_listener)

    No-Subject Listener (abstract_event_subject_unused_listener)

Matcher Pattern (enumeration.matcher.abstract_value_matcher)

Registry Pattern (application.abstract_registry)

    Context Based Registry Locator (application.base_context_registry_locator)

Rules and Rule Engine Patterns (rules)

    Logging Rules (rules.logging_rule_engine)

    Stateful Rules (rules.abstract_stateful_rule)

    Rule Engines (rules.rule_engine)

    Basic Rules (rules.abstract_rule)

Quicksort (sorting.abstract_quick_sorter)

Transformer Pattern (transforming)

    Populator Pattern (transforming.abstract_populator)Just extend the pattern you're looking to use, fill in the mandatory items, and there you go!
Package: thread
ThreadA python threading library extensionReport Bug·Request FeatureAbout The ProjectWraps around the python threading library and provides extra functionalityStrictly type-safeFully compatible with the threading library, this project hopes to provide a more out-of-the-box solution with multi-threaded processing and fetching values from a completed thread, etc.!! Important !!This project is in it's very early stages of development and bugs are to be expected.I hope thread will become your threading solution! ♡⸜(˶˃ ᵕ ˂˶)⸝♡(back to top)Getting StartedThis is an example of how you may give instructions on setting up your project locally.
To get a local copy up and running follow these simple example steps.PrerequisitesPython 3.9+InstallationBelow is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.Install the packagepipinstall-UthreadImport thread into your library!importthreadfromthreadimportThread,ParallelProcessing(back to top)DocumentationOur docs arehere!(back to top)Roadmapv0.1.3 ReleaseBug fixesNew featuresTestingNext release...See theopen issuesfor a full list of proposed features (and known issues).(back to top)ContributingContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make aregreatly appreciated. ( ˶ˆᗜˆ˵ )If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull Request(back to top)LicenseDistributed under the BSD-3-Clause License. SeeLICENSE.txtfor more information.(back to top)ContactAlex -junxiangng63@gmail.comProject Board:https://github.com/users/caffeine-addictt/projects/5Project Link:https://github.com/caffeine-addictt/thread(back to top)AcknowledgmentsChoose an Open Source LicenseGitHub Emoji Cheat SheetMalven's Flexbox CheatsheetMalven's Grid CheatsheetImg Shields(back to top)
Package: thread6
thread6Simple parallel processing interface for pythonWhy?Python's built in parallel processing and threading library is pretty simple to implement but sometimes you just want to chuck data at a function and make it run fasterRequirementsPython 3+InstallationQuickstartUse thethreadeddecorator to turn a method into a threaded method. That's it!@thread6.threaded()defthreaded_print():print("")return1Alternatively, userun_threadedfunctionthread6.run_threaded(threaded_print)Both thethreadeddecorator andrun_threadedmethod will return an instance ofResultThread. This allow you to optionally wait for the function to finish executing
and get the return value. To get the return value, use.await_output()result=threaded_print()result.await_output()# this will return 1If you have a function that needs to execute on a large list of data, userun_chunkeddefupdate_items(items):...items=[...]thread6.run_chunked(update_items,items).await_output()also work withrun_chunkedbut will return a list of return values insteadUsageTodothreaded function decoratorrun something in a separate thread functionsplit data into chunk and run in separate threadsadd way for errors to fail loudlyauto spawn to run fx on a set of dataexplore multi processing?
Package: threadactive
A simple utility help building multithread application through message queue.Examplesmain.py:import time
import threading
import threadactive


class BackWorker(threadactive.Agent):
    def tick(self):
        threadactive.Agent.tick(self)
        print("[%s][%d] front" % (threading.current_thread().getName(), time.clock()) )
        self.print_in_back()
        time.sleep(1)

    @threadactive.backend
    def print_in_back(self, *args, **kwargs):
        print("[%s][%d] back" % (threading.current_thread().getName(), time.clock()) )
        if time.clock() > 3:
            self.back_to_front()

    @threadactive.frontend
    def back_to_front(self, *args, **kwargs):
        print("[%s][%d] back to front" % (threading.current_thread().getName(), time.clock()) )


bw = BackWorker()
while True:
    bw.tick()output:[MainThread][0] front
[Thread-1][0] back
[MainThread][1] front
[Thread-1][1] back
[MainThread][2] front
[Thread-1][2] back
[MainThread][3] front
[Thread-1][3] back
[MainThread][4] back to front
[MainThread][4] front
[Thread-1][4] back
[MainThread][5] back to front
[MainThread][5] front
[Thread-1][5] back
...
Package: thread-decorator
Thread DecoratorSimple parallel processing interface for pythonWhy?Python's built in parallel processing and threading library is pretty simple to implement but sometimes you just want to chuck data at a function and make it run fasterRequirementsPython 3+Installation$pipinstallthread_decoratorQuickstartUse thethreadeddecorator to turn a method into a threaded method.@threaded()defmy_func():'''Your Code'''Alternatively, userun_threadedfunctionrun_threaded(my_func)Both thethreadeddecorator andrun_threadedmethod will return an instance ofResultThread. This allow you to optionally wait for the function to finish executing
and get the return value. To get the return value, use.await_output()result=threaded_print()result.await_output()# this will return 1If you have a function that needs to execute on a large list of data, userun_chunkeddefupdate_items(items):...items=[...]run_chunked(update_items,items).await_output()also work withrun_chunkedbut will return a list of return values insteadRun the testsRun tests withpythontests.pyTodothreaded function decoratorrun something in a separate thread functionsplit data into chunk and run in separate threadsadd way for errors to fail loudlyauto spawn to run fx on a set of dataexplore multi processing?
Package: threaded-buffered-pipeline
threaded-buffered-pipelineParallelise pipelines of Python iterablesInstallationpipinstallthreaded-buffered-pipelineUsage / What problem does this solve?If you have a chain of generators, only one runs at any given time. For example, the below runs in (just over) 30 seconds.importtimedefgen_1():forvalueinrange(0,10):time.sleep(1)# Could be a slow HTTP requestyieldvaluedefgen_2(it):forvalueinit:time.sleep(1)# Could be a slow HTTP requestyieldvalue*2defgen_3(it):forvalueinit:time.sleep(1)# Could be a slow HTTP requestyieldvalue+3defmain():it_1=gen_1()it_2=gen_2(it_1)it_3=gen_3(it_2)forvalinit_3:print(val)main()Thebuffered_pipelinefunction allows you to make to a small change, passing each generator through its return value, to parallelise the generators to reduce this to (just over) 12 seconds.importtimefromthreaded_buffered_pipelineimportbuffered_pipelinedefgen_1():forvalueinrange(0,10):time.sleep(1)# Could be a slow HTTP requestyieldvaluedefgen_2(it):forvalueinit:time.sleep(1)# Could be a slow HTTP requestyieldvalue*2defgen_3(it):forvalueinit:time.sleep(1)# Could be a slow HTTP requestyieldvalue+3defmain():buffer_iterable=buffered_pipeline()it_1=buffer_iterable(gen_1())it_2=buffer_iterable(gen_2(it_1))it_3=buffer_iterable(gen_3(it_2))forvalinit_3:print(val)main()Thebuffered_pipelineensures internal threads are stopped on any exception [the next time each thread attempts to pull from the iterator].Buffer sizeThe default buffer size is 1. This is suitable if each iteration takes approximately the same amount of time. If this is not the case, you may wish to change it using thebuffer_sizeparameter ofbuffer_iterable.it=buffer_iterable(gen(),buffer_size=2)FeaturesOne thread is created for eachbuffer_iterable, in which the iterable is iterated over, with its values stored in an internal buffer.All the threads of the pipeline are stopped if any of the generators raise an exception.If a generator raises an exception, the exception is propagated to calling code.The buffer size of each step in the pipeline is configurable.The "chaining" is not abstracted away. You still have full control over the arguments passed to each step, and you don't need to buffer each iterable in the pipeline if you don't want to: just don't pass those throughbuffer_iterable.AsyncioA version for async iterables is available athttps://github.com/michalc/asyncio-buffered-pipeline
Package: threaded-mvc
Threaded Model-View-Controller Design Pattern package for GUI & TUI programs.Free software: BSD licenseDocumentation:https://threaded-mvc.readthedocs.io.What is this repo or project?This is a solution to a common problem with MVC architecture: How do we
keep the View responsive when the model is i/o bound.How does it work?We do this by placing the model in its own thread, and using message
queues between the Controller and Model.As per the definition of the MVC design pattern:The model knows nothing about the view or the controller.The view knows nothing about the controller or the model.The controller knows everything about both the model and the view.Contoller  - starts or attaches to view & modelmodel      - signals events to controller which updates viewcontroller - sets model states when necessary.Who will use this repo or project?TODOWhat is the goal of this project?TODOFeaturesTODOHow to installTODOHow to useTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: threadedprocess
TheThreadedProcessPoolExecutorclass is anExecutorsubclass that uses a
pool of process with an inner pool of threads on each process to execute calls
asynchronously.ThreadedProcessPoolExecutoris formed by a modifiedProcessPoolExecutorthat processes (with at mostmax_processes) that use aThreadPoolExecutorinstance (with at mostmax_threads) to run the given tasks.Ifmax_processesisNoneor not given, it will default to the number
of processors on the machine.Ifmax_threadsisNoneor not given, it will default to the number of
processors on the machine, multiplied by5.Examplefromconcurrent.futuresimportas_completedimportmathfromthreadedprocessimportThreadedProcessPoolExecutorimportrequestsRNGURL="https://www.random.org/integers/?num=1&min=1&max=100000000&col=1&base=10&format=plain&rnd=new"defget_prime():n=int(requests.get(RNGURL).text)ifn%2==0:return(n,False)sqrt_n=int(math.floor(math.sqrt(n)))foriinrange(3,sqrt_n+1,2):ifn%i==0:return(n,False)return(n,True)withThreadedProcessPoolExecutor(max_processes=4,max_threads=16)asexecutor:futures=[]for_inrange(128):futures.append(executor.submit(get_prime))forfutureinas_completed(futures):print('%dis prime:%s'%future.result())
Package: threadedreturn
# threadedreturn

`threadedreturn` is a Python package that provides a simple extension to the built-in `Thread` class in the `threading` module. The `ThreadWithReturnValue` class in this package allows you to create threads with return values.

## Installation

You can install `threadedreturn` using `pip`:

```bash
pip install threadedreturn
```

## Usage

### ThreadWithReturnValue

`ThreadWithReturnValue` is a subclass of `Thread` that enables you to retrieve the return value of a function or method running in a separate thread.

#### Example

```python
from threadedreturn import ThreadWithReturnValue

# Define a function to be executed in a separate thread
def my_function(arg1, arg2):
    # Some time-consuming task
    result = arg1 + arg2
    return result

# Create a ThreadWithReturnValue instance
thread = ThreadWithReturnValue(target=my_function, args=(3, 5))

# Start the thread
thread.start()

# Wait for the thread to finish and retrieve the return value
result = thread.join()

print("Result:", result)
```

## Contributing

If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/DWAA1660/threadedreturn).
Package: threaded-task-executor
Threaded Task ExecutorAllows functions to be called in a seperate thread and executed in FIFO order.Possible Uses:For serial communication where send/recv order mattersRun background tasks in tkinter easily, without freezing guiAny application where background tasks are required to be executed in orderGettings Started:Installingpip install threaded-task-executorImportingfromthreaded_task_executorimportTask_Queue,TaskHow To Usetasks=Task_Queue()tasks.add_task(Task(print,args=("test 1")))tasks.add_task(Task(print,args=("test 2")))When this is run it should start the thread
and execute the tasks in FIFO order.Documentation:Task(func,callback=None,task_name="",args=(),kwargs={})func : the function that will be called when executedcallback : function that will be run when the task has started and finishedcallback("STARTED", task_name)callback("FINISHED", task_name)task_name : the name of the taskargs : tuple of arguments that will be given to the functionkwargs : dict of keyword arguments that will be given to the functionTask_Queue(daemon=None)daemon : (True, False, None) : Whether main thread has to wait for thread to finish before stopping main threadadd_task(new_task) : Adds a new task obj, if there is no threads running will start oneget_current_task() : Allows for the current task that is executing to be returnedtasks_left() : Returns the number of tasks left to be completed, includes currently executing task if any.add_from_func(callback, task_name) : used as a decorator which acts as add_task()Updates:1.1New decorator method that allows for adding to a Task_Queue obj1.0First version
Package: threader3000
Multi-threaded Python Port Scanner for use on Linux or Windows-----------------------------------------------------------------------Threader3000 is a script written in Python3 that allows multi-threaded 
port scanning. The program is interactive and simply requires you to run 
it to begin. Once started, you will be asked to input an IP address or a 
FQDN as Threader3000 does resolve hostnames. A full port scan should take 
three minutes or less depending on your internet connection.Check me out on Twitter @joehelle, Twitch at https://twitch.tv/themayor11/, 
on Github at https://github.com/dievus, or visit my cybersec Discord at 
https://discord.gg/DW4Q4pp.