Saravanan666/pypi-org huggingface dataset:
Package: combocurve-api-v1
ComboCurve client for PythonAuthorizationcombocurve_apirequires the API key and service account provided by ComboCurve, as shown in the example below:fromcombocurve_api_v1importServiceAccount,ComboCurveAuth# Use this to create your service account manuallyservice_account=ServiceAccount(client_email='YOUR_CLIENT_EMAIL',client_id='YOUR_CLIENT_ID',private_key='YOUR_PRIVATE_KEY',private_key_id='YOUR_PRIVATE_KEY_id')# Or use this to load it from a JSON file# service_account = ServiceAccount.from_file("PATH_TO_JSON_FILE")# Set your API keyapi_key='YOUR_API_KEY'combocurve_auth=ComboCurveAuth(service_account,api_key)# Get auth headersauth_headers=combocurve_auth.get_auth_headers()combocurve_auth.get_auth_headers()should be called before every request so that the token can be
refreshed if it's about to expire. After getting the authentication headers, they can be used with any HTTP client
library. Below is an example using theRequestslibrary:importrequestsdata=[{'wellName':'well 1','dataSource':'internal','chosenID':'1234'},{'wellName':'well 2','dataSource':'internal','chosenID':'4321'}]auth_headers=combocurve_auth.get_auth_headers()url='https://api.combocurve.com/v1/wells'response=requests.put(url,headers=auth_headers,json=data)print(response.json())Content-TypeThe ComboCurve API only accepts data serialized as JSON and theContent-Typeheader must beapplication/json. Luckily,Requestswill take care of both things when the data is passed using thejsonparameter, as you saw in the example above. Using thedataparameter would be less convenient but it works too:importjsonresponse=requests.put(url,headers={**auth_headers,'Content-Type':'application/json'},data=json.dumps(data))More information here:https://docs.python-requests.org/en/latest/user/quickstart/#more-complicated-post-requestsPaginationWhen the number of records to be returned for a request is larger than the maximum number of records that can be retrieved in a single response, the requester will need to "paginate", i.e., make multiple requests while there are more records to be returned.This package provides a helper to assist with that. It parses the response headers and returns a new URL for the next request, if another request is needed. See this example using theRequestslibrary:fromcombocurve_api_v1.paginationimportget_next_page_url# See Authorization sectionauth_headers=combocurve_auth.get_auth_headers()# Additional filters are allowed, it is preferred not specify skip if its value is 0url='https://api.combocurve.com/v1/wells?take=200'# First requesthas_more=True# Keep fetching while there are more records to be returnedwhilehas_more:response=requests.get(url,headers=headers)# Process responseurl=get_next_page_url(response.headers)has_more=urlisnotNone
Package: combogen
combogenCombination generator for filename, either prefix or suffixThis function takes 7 arguments:generate_combination(nums, fixed_string="", location="middle", isUpper=True, isLower=True, digits=True, specialChar=True)Generates random combination of characters based upon arguments and return fixed_string with combinationParameters:nums: intLength of random combinationfixed_string (Optional): strdefault: ""String in which random combination will be includedlocation (Optional): strdefault: "start"values: "start", "middle", "end"Location of fixed string in the combinationisUpper (Optional): booldefault: TrueUppercase characters included in the combinationisLower (Optional): booldefault: TrueLowercase characters included in the combinationdigits (Optional): booldefault: TrueDigits included in the combinationspecialChar (Optional): booldefault: FalseSpecial Characters included in the combinationReturns:str: fixed_string with random combination as per locationprint(generate_combination(4, fixed_string="ABC", location="start"))
        Output: ABCt857
    
    print(generate_combination(4, fixed_string="ABC", location="middle"))
        Output: t8ABC57
    
    print(generate_combination(4, fixed_string="ABC", location="end"))
        Output: t857ABC--
Package: combogrid
combogridcombogridmakes it easier to draw combo charts in a grid, using matplotlibCombo charts are useful for comparing two different 'y' variables.
Grids of charts (aka 'facet grids') are useful for comparing data
between groups.Perhaps you want to see how a single stock's price and volume changed day by day.
And you are following multiple stocks, so you want one chart per stock.Requirementspython 3.71 or abovepandasInstallpipinstallcombogridHelpimportcombogridhelp(combogrid.plot)Useimportpandasaspdimportcombogriddf=pd.read_csv("sample.csv")df["date"]=pd.to_datetime(df["date"])plt=combogrid.plot(df,"date","volume","price","color")plt.show()Output
Package: combo-lock
Combo LockThe combo-lock is a combination of a process lock and a thread lock. Usable in cases both multiple threads and multiple processes are sharing the same resource such as a file in the file system.The module utilizes the FileLock fromfilelockand the standardLockfrom threading.The FileLock uses a filesystem lock so the initialization of the class requires a path for the lock file.Examplefromcombo_lockimportComboLocklock=ComboLock('/tmp/my.lock')withlock:write_my_shared_resource()ANamedLockwill save the lock file to shared memory usingmemory-tempfilefromcombo_lockimportNamedLocklock=NamedLock('some_name')withlock:write_my_shared_resource()HistoryThe combo-lock was originally created forMycroft-corebut as it's been useful in other projects a separate release seemed appropriate.
Package: combomethod
Python has instance methods, class methods (@classmethod), and static
methods (@staticmethod). But it doesn’t have a clear way to invoke a method
on either a classorits instances. Withcombomethod, it does.from combomethod import combomethod

class A(object):

    @combomethod
    def either(receiver, x, y):
        return x + y

a = A()
assert a.either(1, 3) == 4
assert A.either(1, 3) == 4Voila!You method now takes either the class or the instance–whichever
one you want to call it with.DiscussionIn some cases, you can fake@combomethodwith@classmethod. In
the code above, for example, there is no real reference to the class
or instance, andeithercould have been designated a@classmethod,
since they can be called with either classes or instances. But, there’s a
problem: Class methodsalwayspass the class to the method, even if they’re
called with an instance. With this approach, you can never access the
instance variables. Ouch!Alternatively,eithercould have been designated a@staticmethod,
had itsreceiverparameter been removed. But while it would then be
callable from either an instance or a class, in neither case would it pass
the object the method was called from. There’d never be a way to access
either the class or instance variables. Ouch again!As useful as@classmethodand@staticmethodare, they don’t handle the
(occasionally important) corner case where you need to call with either the
class or an instanceandyou need genuine access to the object doing the
call. Here’s an example that needs this:class Above(object):

    base = 10

    def __init__(self, base=100):
        self.base = base

    @combomethod
    def above_base(receiver, x):
        return receiver.base + x

a = Above()
assert a.above_base(5) == 105
assert Above.above_base(5) == 15

aa = Above(12)
assert aa.above_base(5) == 17
assert Above.above_base(5) == 15When you need to call with either an instance or a class, and you also care
about the object doing the calling,@combomethodrocks and rolls.NotesThis module is primarily a convenient packaging, testing,
and documentation of insights and code from Mike Axiak’sStack Overflow post.
Thank you, Mike!Automated multi-version testing managed withpytest,pytest-cov,coverage, andtox.
Continuous integration testing
withTravis-CI.
Packaging linting withpyroma.Successfully packaged for, and tested against, all late-model versions of
Python: 2.6, 2.7, 3.3, 3.4, 3.5, 3.6, and 3.7 pre-release as well as the latest
PyPy and PyPy3 builds.SeeCHANGES.ymlfor the complete Change Log.The author,Jonathan Euniceor@jeunice on Twitterwelcomes your comments and suggestions.InstallationTo install or upgrade to the latest version:pip install -U combomethodYou may need to prefix these withsudoto authorize installation. In
environments without super-user privileges, you may want to usepip’s--useroption, to install only for a single user, rather than system-wide.
You may also need Python-version-sepecificpip2orpip3installers,
depending on your system configuration. In cases wherepipisn’t
well-configured for a specific Python instance you need, a useful fallback:python3.6 -m pip install -U combomethod
Package: comboparse
comboparseDrop-in replacement for argparse with support for environment variables.How does it workIf environment variables are present that fit a certain schema they are internally appended
as if you had added them as CLI arguments.UsageAs a drop in replacement just use comboparser instead of argparse:importcomboparse# notice the different classname its not argparse.ArgumentParserparser=comboparse.ComboParser(prog='ProgramName',description='What the program does',epilog='Text at the bottom of help')parser.add_argument('filename')parser.add_argument('-c','--count')parser.add_argument('-v','--verbose',action='store_true')args=parser.parse_args()If the environment variables FILENAME, COUNT or VERBOSE (for flags set them with 1, true or y) these
values will be set accordinglyPrefix environment variablesObviously for the sake of sanity we might want to prefix our environment variables, simply add
the following parameter to the constructor:importcomboparse# notice the different classname its not argparse.ArgumentParserparser=comboparse.ComboParser(# ...env_prefix="combo",# please note that this will be upper cased)# ...and now the env vars from before would be COMBO_FILENAME, COMBO_COUNT, COMBO_VERBOSELimitationsEnvironment variable namesThe names can't be adjusted beyond setting the prefix and determined by the actions "dest" value.
Aka whatever argparse would determine your "args.NAME" to be like.Mixing CLI arguments and environment variablesWhile this should work as this tool simply adds its own CLI arguments to argparser, if you
do something like$COUNT=10my-tool--count5--verboseThe verbose flag will work as expected, but which count is taken isn't guaranteed by thiis library.
(aka while now maybe the environment variable has precedence, in the future this might randomly
change so don't rely on this!)Action Type: countCount actions are usually provided like this:$my-cli-tool-vvv
Namespace(verbose=3)but as an env variable you have to provide the number as is$VERBOSE=3my-cli-tool
Namespace(verbose=3)Action Type: append_constThis works a bit like a normal store_true/store_false you have to use 1, true etc.LicenseMIT
Package: combos-stat
CombosStat: A utility tool designed to compute shared data statistics for given combinations of data samplesInstallationpython3-mpipinstallcombos_statUsagecombos_stat-h1. statUsage: python -m combos_stat.bin.main stat [OPTIONS]

  Calculate statistics for shared data counts based on combinations of samples.

Options:
  -i, --input-file PATH           Path to the input data file  [required]
  -o, --output-file PATH          Path where the results will be saved  [default: output_stat.txt]
  -n, --num-samples INTEGER       Number of samples to compute  [required]
  -t, --share_type [intersection|union]
                                  Type of share to compute
  --header INTEGER                Row number to use as the column names  [default: 0]
  --sep TEXT                      Delimiter to use for reading the input file (e.g., "\t" for tab)
  --start-col INTEGER             Column index to start reading sample data from  [default: 1]
  --show-progress BOOLEAN         Show progress
  --chunksize INTEGER             The chunksize lines to read
  --chunk INTEGER                 The index of chunk
  -h, -?, --help                  Show this message and exit.


examples:
    combos_stat stat -h
    combos_stat stat -i input.txt -o output.txt -n 13 -t intersection
    combos_stat stat -i input.txt -o output.txt -n 13 -t intersection --chunksize 100 --chunk 2 [read 101-200 lines]2. plotUsage:python-mcombos_stat.bin.mainplot[OPTIONS]RESULT_DIRGenerateBoxplotwithstatisticsresults

Options:-R,--RscriptTEXTPathtotheexecutableRscript[default:Rscript]-w,--writeTEXTWritetheRcodetoafile--optionTEXTOptionsintheformatkey=valueforboxplot,eg.title="Demo Stats",x_lab="Shared_Numbers",y_lab="Data"-h,-?,--helpShowthismessageandexit.



examples:combos_statplot-hcombos_statplotout/resultcombos_statplotout/result--writeboxplot.Rcombos_statplotout/result--writeboxplot.R--optionx_lab=XXX--optionwidth=30--optiondpi=500defaultoptions:infile='processed_stats.tsv'output='boxplot'x_lab='Genomes'y_lab='Families'title='BoxPlot'legend_title='Type'dpi=300width=14height=73. batchUsage:python-mcombos_stat.bin.mainbatch[OPTIONS]GeneratebatchshellsandSJMjob

Options:-i,--input-filePATHPathtotheinputdatafile-sep,--sepTEXTDelimitertouseforreadingtheinputfile(e.g.,"\t"fortab)-s,--start-colINTEGERColumnindextostartreadingsampledatafrom[default:1]-t,--thresholdINTEGERThethresholdtodividethecombinations[default:200000]-O,--output-dirPATHPathtotheoutputdirectory[default:.]--jobTEXTGenerateSJMJob--no-checkDonotcheckqueuesforSJM-h,-?,--helpShowthismessageandexit.


examples:combos_statbatch-hcombos_statbatch-iinput.txt-t200000-Ooutcombos_statbatch-iinput.txt-t200000--jobrun.jobResultprefixx: intersectiony: unionshell directoryshell/
├── plot.sh
├── x2
│   └──stat.x2_1.sh
├── y2
│   └──stat.y2_1.sh
...
├── x14
│   ├── stat.x14_1.sh
│   ├── stat.x14_2.sh
│   ├── ...
│   └── stat.x14_100.sh
...
└── y29
    └──stat.y29_1.shresult directoryresult/
├── x2
│   └──x2_1.txt
├── y2
│   └──y2_1.txt
...
├── x14
│   ├── x14_1.txt
│   ├── x14_2.txt
│   ├── ...
│   └── x14_100.txt
...
└── y29
    └──y29_1.txt
Package: combox
Encrypts files and scatters them across storage provided by Google
Drive and Dropbox.The ideas for this program is based oncombobox.etymologycomboxis a lazy contraction of the word “combo box”.comboxis pronounced as “combo box”.installationInstallcomboxwithpip:$ pip install comboxcanonical repo$ git clone git://ricketyspace.net/combox.gitruns onGNU/LinuxOS Xlicensecomboxis licensed under theGNU General Public License version 3
or later. See COPYING.Thecomboxlogo is underPublic Domain.
Package: comb-py
A minimal package for configuring and exploring parametercombinations of machine learning experiments.combis a small and simplistic library.combis able toquickly and cleanly define grid searches and random searches, and handle parameter dependenciesadd configuration options to existing projects. Existing modules and packages can be turned into a registry, enabling python classes to become accessible and searchable via a string name.For more complicated workflows, configuration packages likehydraare better suited.InstallationInstallcomb-pyfrompypi:$pipinstallcomb-pyand import it viaimportcombcombdoes not have any dependencies beyond the python standard library. It works forpython>=3.7.Defining an experiment (comb.sweep)In your project, create sweeps directly in python ─ create the following file undersweep/my_first_experiment.pyfromcombimportsweepfromcomb.typesimportzipped,grid@sweep.register("example-sweep")classMyExperiment(sweep.Sweep):@propertydefscript(self):return"my/exp.py"defget_random_args(self):returndict(# define a method to sample arguments fromfoo=np.random.choice([42,73]))defget_fixed_args(self):returndict(# zip N dependen arguments togetherbar=zipped("hello","check out"),baz=zipped("world","comb"),# define a search grid (1x2 combinations)# over two parametersblubb=grid("star"),blubb2=grid("wars","treck"),)and generate a joblist using$python-mcombexample-sweep
exp.py--barhello--bazworld--blubbstar--blubb2wars--foo73exp.py--barhello--bazworld--blubbstar--blubb2treck--foo73exp.py--barcheckout--bazcomb--blubbstar--blubb2wars--foo73exp.py--barcheckout--bazcomb--blubbstar--blubb2treck--foo73Parametrizing an experiment (comb.registry)combmakes it very easy to reference design choices within your experiment by names. Suppose you wanted to add a few datasets and loss functions to a machine learning experiment.Turn your python module packages or packages into registries by a simple call tocomb.registry.add_helper_functions:# datasets.pyfromcombimportregistryregistry.add_helper_functions(__name__)@register("mnist")classMNIST():pass@register("svhn")classSVHN():pass# loss_functions.pyfromcombimportregistryregistry.add_helper_functions(__name__)@register("mse")classMeanSquaredError():pass@register("infonce")classInfoNCE():passAfterwards, you can easily list and instantiate your functions:>>>importdatasets>>>datasets.get_options("*")mnistsvhn>>>datasets.init("mnist")MNIST()Scheduling experimentscombdoes not attempt to provide ways to actually launch these experiments ─ there are plenty tools better suited for this.
To name a few suggestions, the following workflows are possible:Using GNU parallelScheduling a maximum of 2 consecutive jobs viaGNU parallel(similar results can be achived via e.g.xargs):$python-mcombbash-example||exit1|parallel--jobs2'echo Scheduling job {#}; eval {}'Using SLURMScheduling a job array via slurm:mkdir-psubmitted
python-mcombbash-example>jobs.lstnum_jobs=$(wc-ljobs.lst)jobid=$(sbatch-a1-${num_jobs}--wrap'job=$(sed -n ${SLURM_ARRAY_TASK_ID}p jobs.lst); srun ${job}')mvjobs.lstsubmitted/{jobid}.lstLicensecombis released under an MIT License.
Package: combpyter
combpyterA lightweight Python library for generating and analyzing combinatorial objects.InstallationThe latest release is simply pip-installable via PyPI. Simply runpipinstallcombpyterto install the library.FeaturesPlease note that this is a personal and mostly research-driven project.
As such, the implemented combinatorial structures span, for the time being,
a narrow scope.Currently,combpytersupports the following combinatorial objects:Dyck paths (elements:DyckPath, generator:DyckPaths)Example usageThis snippet iterates over all Dyck paths of semi-length 8 and computes
the distribution of the number of peaks (which is a statistic described
byNarayana numbers).>>>fromcombpyterimportDyckPaths>>>fromcollectionsimportdefaultdict>>>peak_distribution=defaultdict(int)>>>forpathinDyckPaths(8):...num_peaks=len(path.peaks())...peak_distribution[num_peaks]+=1...>>>fornum_peaks,num_pathsinpeak_distribution.items():...print(f"There are{num_paths}Dyck paths with{num_peaks}peaks.")...Thereare1Dyckpathswith1peaks.Thereare28Dyckpathswith2peaks.Thereare196Dyckpathswith3peaks.Thereare490Dyckpathswith4peaks.Thereare490Dyckpathswith5peaks.Thereare196Dyckpathswith6peaks.Thereare28Dyckpathswith7peaks.Thereare1Dyckpathswith8peaks.
Package: combu
combuExecute your method with combination parameters.Use casesTestingTest pattern.Machine learningModel validation.Grid search.Web ScrapingQuery parameters pattern.InstallpipinstallcombuUsageOne time loopimportcombudeffunc(v1,v2):returnv1+v2params={'v1':['a','b'],'v2':['A','B']}forres,paramincombu.execute(func,params):print(res,param)# Output'''aA {'v1': 'a', 'v2': 'A'}aB {'v1': 'a', 'v2': 'B'}bA {'v1': 'b', 'v2': 'A'}bB {'v1': 'b', 'v2': 'B'}'''# Set loop orderorder=['v2','v1']forres,paramincombu.execute(func,params,order=order):print(res,param)# Output'''aA {'v2': 'A', 'v1': 'a'}bA {'v2': 'A', 'v1': 'b'}aB {'v2': 'B', 'v1': 'a'}bB {'v2': 'B', 'v1': 'b'}'''Reloopable by using classimportcombudeffunc(v1,v2):returnv1+v2comb=combu.Combu(func)# You can set order on initializer.# comb = combu.Combu(func, order=['v2', 'v1'])# If you want to show progress bar.# comb = combu.Combu(func, progress=True)params={'v1':['a','b'],'v2':['A','B']}forres,paramincomb.execute(params):print(res,param)params={'v1':['x','y'],'v2':['X','Y']}forres,paramincomb.execute(params):print(res,param)# You can set order on Combu.execute().forres,paramincomb.execute(params,order=['v2','v1']):print(res,param)HooksHooks floworder = [A, B]

before_a()
for a in A:
   before_b()
   before_each_a()
   for b in B:
      before_each_b()
      func()
      after_each_b()
   after_each_a()
   after_b()
after_a()Define hooks.deffunc(v1,v2):passdefbefore_v1(v1,v2):pass# Initialize with hooks.# Available:# * before# * after# * before_each# * after_eachcomb=Comb(func,before={'v1':before_v1})# Set a hook after initialized.# Available:# * set_before(k, func)# * set_after(k, func)# * set_before_each(k, func)# * set_after_each(k, func)comb.set_before('v1',before_v1)Parallel# Use n_jobs parameter.forres,paramincombu.execute(func,params,n_jobs=2):print(res,param)# Use combu.CombuParallel and n_jobs.# n_jobs=-1 mean "use all cores."comb=combu.CombuParallel(func,n_jobs=-1)UtilityCreate parameter combination (not execute any functions).combu.create_valuesCount combinations.combu.util.countShuffle parameters.combu.util.shuffle_paramsAliasescombu.exec -> combu.executecombu.values -> combu.create_valuesExamplesAvailable on./examples.DevelopmentRequirements: poetry, pyenv# Setuppoetryinstall# Lint & Testmkdirreport
poetryrunflake8--format=html--htmldir=report/flake-reportsrc/tests/
poetryrunmypysrc/tests/combu/
poetryrunpytesttests/
poetryrunpytesttests/--cov-reporthtml:report/coverage# Build and publishpoetryrunpythoncreate_badges.py
poetrybuild
poetrypublish
Package: combustion-ble
🔥combustion_bleThis package enables communication withCombustion Inc.Predictive Thermometers. It usesbleakto provide asychronous, cross-platform support.Discovered probes show up as instances of the Probe class in theDeviceManager.probesdictionary, and their temperatures and other data are continually updated by incoming BLE advertising messages. Additionally, calling connect() on an individualProbeobject will cause the framework to maintain a connection to that device, and will automatically download all logged temperature records on the device.This SDH was heavily inspired byCombustion Inc.'s Swift SDK. As such, the API is very similar, and the documentation for that SDK is a good reference for this one. The architecture may not be "pythonic" in every respect, but the primary design goal is to make subsequent updaets to this SDH as easy as possible, by tracking the diffs from the "upstream" Swift SDH.DocumentationDocs for this project are in-progress, and are located athttps://combustion-ble.readthedocs.io/UsageDocs are still in-progress. In the meantime, see theexamplesdirectory for some sample code.
Package: combustivel
CÃ¡lculo de ViagemDesciÃ§Ã£o
O pacote combustivel Ã© usado para calcular a quantidade de litros gastos em uma viagemInstalaÃ§Ã£oUse o gerenciador de pacotespippara instalar combustivelpipinstallcombustivelUtilizaÃ§Ã£ofromcombustivelimportcalc_combustivelcalc_combustivel.calcula_litros()AutorSamuel FabianoLicenseMIT
Package: comby
Python bindings forComby.InstallationComby must be installed:https://github.com/comby-tools/combyTo install the latest release from PyPI:$pipinstallcombyor to install from source:$pipinstall.Getting StartedTo perform a basic match-rewrite on a given source text:fromcombyimportCombycomby=Comby()match='print :[[1]]'rewrite='print(:[1])'source_old='print "hello world"'source_new=comby.rewrite(source_old,match,rewrite)# -> 'print("hello world")MIT LicenseCopyright (c) 2019 Christopher TimperleyPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.