Saravanan666/pypi-org huggingface dataset:
Package: petrelic
petrelicis a Python wrapper aroundRELIC. It provides a simple python interface to the BLS-381 pairing and RELIC’s big number class. Our goals is to make it easy to prototype new cryptographic applications in Python using RELIC as the backend. In the future we aim to support a few other pairing curves as well.petrelicprovides native, multiplicative and additive interfaces toRELIC. You can use the one that you find most comfortable.petrelicoverloads Python’s binary operators to make computation with pairings easy. For example, here is how you would compute and verify a BLS signature using the multiplicative interface:>>>frompetrelic.multiplicative.pairingimportG1,G2,GT>>>sk=G1.order().random()>>>pk=G2.generator()**sk>>># Create the signature>>>m=b"Some message">>>signature=G1.hash_to_point(m)**sk>>># Verify the signature>>>signature.pair(G2.generator())==G1.hash_to_point(m).pair(pk)TrueYou can find more information in thedocumentation.You can installpetrelicon Linux using:$pipinstallpetrelicFor full details seethe installation documentation.WarningPlease don’t use this software for anything mission-critical. It is designed
for rapid prototyping of cryptographic primitives usingRELIC. We offer no
guarantees that thepetrelicbindings are secure. We echoRELICown
warning: “RELIC is at most alpha-quality software. Implementations may not be
correct or secure and may include patented algorithms. … Use at your own risk.”
Package: petri
petri: free your python code from 12-factor boilerplate.Python VersionCode StyleReleaseDownloadsBuild StatusDocsMaintainabilityLicenseCoverageDepsSummaryImporting petri equips your app/pacakage with:Dotenv file handling usingpython-dotenv.Package metadata (for installed packages), usingimportlib-metadata.Settings usingpydantic.Logging config usingstructlog.Environment switching (prod/dev/test) handling via ENV environment variable.MotivationIn order to have same code for dev/production, it all starts with an innocentsettings.py.In order to switch between them, it’s agoodideatouse env vars…But sometimes, you want to overrride a single variable.But sometimes, you want to overrride several variables.Plus, colored logs while developing are pretty.Plus, structured logs in production look smart.Features[X] Sane defaults for logging:[X] json logs for production.[X] user-friendly (spaced) + colored for development.[X] Enforce root logger’s formatting.[X] Easy settings:[X] Toggle between configurations using a signle env var.[X] Define default configuration in case the env var is not present.[X] Granular settings override using environment variables.[X] Batch settings override by loading a.env.Read package metadata (author, version, etc):[X] Lazy-loaded to avoid reading files during imports.[X] For installed packages only.InstallInstall using
poetrypoetry add petrior
pippip install petrior
(for dev)pip installgit+https://github.com/pwoolvett/petri.Optionally, also install thecolorextra for colored logs usingcolorama.UsageJust define configuration setting(s) and instantiatepetri.Petri:#  my_package/__init__.pyfrompetriimportPetrifrompetri.settingsimportBaseSettingsfrompetri.logginimportLogFormatter,LogLevelclassSettings(BaseSettings):SQL_CONNECTION_STRING='sqlite:///database.db'# example settingclassProduction(Settings):LOG_FORMAT=LogFormatter.JSONLOG_LEVEL=LogLevel.TRACEclassDevelopment(Settings):LOG_FORMAT=LogFormatter.COLOR# requires coloramaLOG_LEVEL=LogLevel.WARNINGpkg=Petri(__file__)# demo logspkg.log.info("log away info level",mode=pkg.settings,version=pkg.meta.version)pkg.log.warning("this will show",kewl=True)That’s it!. Watch the animation above for results runningpython -c “import my_package”Optionally, define an environment variable namedenv_file, to override
the settings:Its value must be the path to a valid, existing file.Its contents must have name=value pairs.The names must be of the form[MY_PACKAGE]_[SETTING_NAME](Watch the animation above).To select which of your settings classes to use, you can:Point the selector envvar (eg: formy-pkg, this would beMY_PKG_CONFIG=my_pkg.settings:Production),
orUse thedefault_configkwarg when instantiatingpetri.Petri(eg: usepkg = Petri(__file__, default_config=”my_pkg.settings:Production”)in the example above).Of course, you can use both. Petri will attempt to load the selecto envvar,
and if not found, default to the defined kwarg.For more info, check thedocs.
Package: petrify-bdt
"They took all the trees, and put em in a tree museum...
And they charged the people a dollar and a half to see them"
— Joni Mitchell, "Big Yellow Taxi"Boosted decision trees are widely used in HEP, particularly in data analyses for
making complex, multivariate nested cuts to separate signal events from background ones.While powerful, the complexity of their training makes BDT (and therefore
analysis) preservation troublesome: BDTs get stored in different formats, which
may not be forwards-compatible with future versions of their framework
libraries. So now we start talking about dragging around Docker containers just
to make sure the rightversionof the right framework is used. Plus those
libraries have to be included in any user code, adding unwelcome dependencies
and complexity, and perhaps even being incompatible with the target language
(e.g. applying a BDT from a Python framework in a C++ application).This is ridiculous, because BDTs are actually absurdly simple objects. The
framework complexity is needed for training, but not for execution. This package
provideds a set of utilities for converting sklearn and TMVA boosted decision
trees, for either classification or regression, from their custom formats to
vanilla C++ and Python code that hasnodependencies, can be safely used
forever without risk of format or framework breaking-changes, and by virtue of
being static code can execute more quickly and with less memory overhead than
the original form.
Package: petrobuffer
PetroBufferA python package for performing geochemical redox calculations and buffer conversions.The current implementation has been developed in Python 3 and tested on Windows.PetroBuffer currently only supports a small number of functions. The aim is to expand this package over time.DocumentationPetroBuffer's documentation is hosted onRead the Docs.Installation/Usage:pip install petrobufferAlternatively, to access the most up-to-datedevelopmentversion, you can clone this repository into the same root directory as your project files where you wish to usePetroBuffer.The package can then be pip installed by runningpip install PetroBuffer/from your project root, and imported in your files in the same way as other packages, usingimport petrobufferCheck out the documentation for usageexamples.AcknowledgementsThe testing of this package made heavy use of the excellent Excel tools from Kayla Iacovino: anfO2 buffer calculatorand aFerric/Ferrous converter.
Package: petrodc
IntroductionPetroDC is a LGPL licensed tool to get datasets from public sources.
New sources are added as they are tested; suggestions and contributions of
all kinds are very welcome.DocumentationCheck here for thecomplete petrodc package documentation.Getting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.Get petrodcUsers: Wheels for Python fromPyPIpip install petrodcDevelopers: Source code fromGithubgit clone https://github.com/pro-well-plan/petrodcQuick Useimport petrodc.npd as dcdataframe = dc.wellbore(3)3 is the dataset with lithostratigraphy, checkhereto see the respective number for the different datasets.LicenseThis project is licensed under the GNU Lesser General Public License v3.0 - see theLICENSEfile for detailsfor further information contactjuan@prowellplan.com
Package: petroeval
Formation Evaluation PackageFormation evaluation module for geoscientists, petrophysicists for easy and quick quantitative petrophysical analysis.Features include:Calculating petrophysical parameters for reservoir quantization:
Parameters like Total Porosity, Effective Porosity, Water Saturation, Oil SaturationEstimating Reservoir Volumes:Gross rock VolumeNet to Gross VolumeNet Pay of Reservoir sectionPredicting well lithofacies and lithology values using machine learningData preparation and preprocessing for machine learning us useVisualizing well logsReading las filesResolving missing values in well logsAutomatic correction of estimated propertiesQUICK TUTORIAL## reading a single lasio file 
from petroeval import read_lasio
las = read_lasio('WLC_PETRO_COMPUTED_INPUT_1.LAS')
df = las.df()

## reading multiple lasio files
from petroval import read_lasios
las1='WLC_PETRO_COMPUTED_INPUT_1.LAS'
las2='WLC_PETRO_COMPUTED_INPUT_1.LAS'
las=read_lasios(las1,las2) =>returns a list of the read lasio objects<br>

## import modules and functions
import numpy
from petroeval import evaluate_reservoir
from petroeval.visualizations import summary, log_plot

# Create an instance of the reservoir section passing in required arguments
from evaluate_reservoir import FormationEvaluation
...Tutorial repo link:https://github.com/olawaleibrahim/beta-tests/tree/main/petroeval
Package: petrofit
PetroFitPetroFit is a package for calculating Petrosian properties, such as radii and concentration indices, as well as fitting
galaxy light profiles. In particular, PetroFit includes tools for performing accurate photometry, segmentations,
Petrosian profiling, and Sérsic fitting. Please see thepetrofit documentationfor installation instructions and a guide to thepetrofitmodule.LicenseThis project is Copyright (c) The PetroFit Team and licensed under
the terms of the BSD 3-Clause license. This package is based upon
theAstropy package templatewhich is licensed under the BSD 3-clause license. See the licenses folder for
more information.ContributingWe love contributions! petrofit is open source,
built on open source, and we’d love to have you hang out in our community.Imposter syndrome disclaimer: We want your help. No, really.There may be a little voice inside your head that is telling you that you’re not
ready to be an open source contributor; that your skills aren’t nearly good
enough to contribute. What could you possibly offer a project like this one?We assure you - the little voice in your head is wrong. If you can write code at
all, you can contribute code to open source. Contributing to open source
projects is a fantastic way to advance one’s coding skills. Writing perfect code
isn’t the measure of a good developer (that would disqualify all of us!); it’s
trying to create something, making mistakes, and learning from those
mistakes. That’s how we all improve, and we are happy to help others learn.Being an open source contributor doesn’t just mean writing code, either. You can
help out by writing documentation, tests, or even giving feedback about the
project (and yes - that includes giving feedback about the contribution
process). Some of these contributions may be the most valuable to the project as
a whole, because you’re coming to the project with fresh eyes, so you can see
the errors and assumptions that seasoned contributors have glossed over.Note: This disclaimer was originally written byAdrienne Lowefor aPyCon talk, and was adapted by
petrofit based on its use in the README file for theMetPy project.
Package: petrolib
Petrolib: Petrophysical Evaluation PackageThis is a python package designed to help users perform petrophysical analysis by estimating petrophysical parameters such as:* Volume of Shale using various methods like Clavier, Stieber and Larionov methods
* Porosity - Effective and Total porosities using the density and Wyllie's sonic methods.
* Water Saturation - using both archie and simmandoux methods
* PermeabilityIn addition to estimating these parameters, log plots are automatically displayed for proper interpretation. Also a pay summary result/dataframe is produced to help quantify the over-all quality of the reservoirs. Cutoff such as the porosity, shale volume and water saturation are applied to flag pay regions. The pay summary include:net, gross and not net thicknesses% net-to-grossaverage volume of shaleaverage porositybulk volume of waterwater saturation.Interestingly, the parameters are computed and displayed only for the zones of interest picked. Plots such as neutron-density and pickett are available for reservoir assessment. Geolocations of the wells can also be visualised.FunctionalitiesThe package is designed to handle:Loading of well dataProcessing of well log dataStatistical analysis such as log frequencies and correlationWell log visualisationPlot well locations on an actual mapFacilitates the loading of well tops.Plot log curves along with zonation tracksNeutron-density cross plotPickett PlotInstallationpip install -U petrolibQuick tutorial#import necessaries
from pathlib import Path
from petrolib import procs
from petrolib import file_reader as fr
from petrolib.workflow import Quanti
from petrolib.plots import tripleCombo, Zonation, plotLog

#load data
well_path = Path(r"./15_9-19.las")
tops_path = Path(r'./well tops.csv')

df, las = fr.load_las(well_path, return_csv=True, curves=['GR', 'RT', 'NPHI', RHOB'])

#process data
df = procs.process_data(df, 'GR', 'RT', 'NPHI', 'RHOB')

#triple combo
%matplotlib inline
tripleCombo(df, 'DEPTH', 'GR', 'RT', 'NPHI', 'RHOB', ztop=3300,
               zbot=3450, res_thres=10, fill='right', palette_op='rainbow', limit='left')
               
#zone plot
zones = Zonation(df, path=tops_path)
zones.plotZone('DEPTH', ['GR', 'RT', 'RHOB', 'NPHI', 'CALI'], 3300, 3600, '15_9-19')
plotLog('DEPTH', ['GR', 'RT', 'RHOB', 'NPHI', 'CALI'], 3300, 3600, '15_9-19')

#calling the zonation object to extra info
ztop, zbot, zn, fm = zones()

#Petrophysics
pp = Quanti(df, zn, ztop, zbot, fm, 'DEPTH', 'GR', 'RT', 'NPHI', 'RHOB', use_mean=True)
vsh = pp.vshale(method='clavier', show_plot=True, palette_op='cubehelix', figsize=(9,12))
por = pp.porosity(method='density', show_plot=True, figsize=(10, 12))
sw = pp.water_saturation(method='archie', show_plot=True, figsize=(10, 12))
perm = pp.permeability(show_plot=True, figsize=(9, 10))
flags = pp.flags(por_cutoff=.12, vsh_cutoff=.5, sw_cutoff=0.8, show_plot=True, palette_op='cubehelix', figsize=(20, 15))

ps = pp.paySummary(name='15-9_F1A')

#save results to excel
pp.save(file_name='Pay Summary')Tutorial repolink
Package: petrolprices-sdk
PetrolPrices PythonAn SDK to easily work with thePetrolPrices APIInstallVia Pippipinstallpetrolprices-sdkUsagefrompetrolpricesimportPetrolPrices,FuelType,SortMethodpetrolprices=PetrolPrices(api_token="your-token")nearby=petrolprices.search(latitude=123,longitude=456,fuel_type=FuelType.Unleaded,sort_method=SortMethod.Cheapest)Available MethodsDescriptionpetrolprices.search(...)Retrieve aSearchEntriesCollectiondict with details about nearby fuel stations.Change logPlease seeCHANGELOGfor more information on what has changed recently.Testinghatchshell

hatchruntestSecurityIf you discover any security related issues, please emailsecurity@voke.devinstead of using the issue tracker.CreditsOwen VokeAll ContributorsLicenseThe MIT License (MIT). Please seeLicense Filefor more information.TreewareYou're free to use this package, but if it makes it to your production environment you are required to buy the world a tree.It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you support this package and contribute to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.You can buy treeshere.Read more about Treeware attreeware.earth.
Package: petronas-common-utils
Petronas Common UtilsWelcome to thePetronas Common Utilsrepository. Here, you'll find essential source codes for basic and common utilities that can be applied accross multiple fields and areas within Petronas.FeaturesGasWithin this category, you'll find functionalities tailored for thenatural gas refiningsector. Some key components include:Natural Gas- Allows you to define a gas and its composition and other functionalities such as unit conversion, gas treatment or gas blending.
Here's an example for unit conversion:frompetronas_common_utils.gas.natural_gasimportNaturalGas,Component# Create natural gas objectnatural_gas=NaturalGas()natural_gas.add_component(Component.C1,0.9)natural_gas.add_component(Component.C2,0.05)natural_gas.add_component(Component.C3,0.03)natural_gas.add_component(Component.C4,0.01)natural_gas.add_component(Component.C5,0.005)natural_gas.add_component(Component.CO2,0.035)natural_gas.build()# Calculate amount for given component for a total flow of 10 tphcalculated_amount=natural_gas.get_amount(component=Component.C1,total_flow=(10,'tph'),to_units='mmscfd')More categories and functionalities to be added soon.Installation and usageTo install this package, simply usepip install petronas-common-utils.Additional detailed documentation on the different modules is expected to be included in subsequent versions.ContributionWe welcome contributions! If you'd like to add new functionalities or improve existing ones, please follow ourcontribution guidelines.
Package: petrone
petrone<br>PyPIhttps://pypi.python.org/pypi/petrone<br>BYROBOT Devhttp://dev.byrobot.co.kr/<br>Documentshttp://dev.byrobot.co.kr/documents/en/products/petrone/library/python/petrone/<br>Forumhttps://groups.google.com/d/forum/byrobot<br>BYROBOT
Package: petrone-v2
petrone_v2PyPIhttps://pypi.python.org/pypi/petrone_v2BYROBOT Devhttp://dev.byrobot.co.kr/Documentshttps://byrobot.github.io/documents/kr/products/petrone_v2/library/python/petrone_v2/Forumhttps://groups.google.com/d/forum/byrobotBYROBOT
Package: petro-python
petro_pyv1.0.2A python package  created by Ahmed alkhatim for petroleum computations with two sub modules forReservoirProductionBeside :Oilfied Module: for gitting general and quick information about oilfield dataInstallationpip install petro-pythonHow it worksimportpetro_pyasptrInitializing an Oil Field modulefield=ptr.OilField("path_to_file")TheOilFieldmodule instantiate an OilField class and thenan_oil_fieldvariable can access all the API of ofOilFieldsuch as:field.wellsfield.number_of_wellsfield.n_production_wellsfield.injection_wellsfield.n_injection_wellsfield.converted_wellsas well as quick_view() method that give a quick view about your fieldExapmlefor Volve dataset the output will bevolve=ptr.OilField(file)volve.number_of_wells# 7volve.production_wells# array(['15/9-F-1 C', '15/9-F-11', '15/9-F-12', '15/9-F-14', '15/9-F-15 D', '15/9-F-5'], dtype=object)volve.n_production_wells# 6volve.injection_wells# array(['15/9-F-4', '15/9-F-5'], dtype=object)volve.n_injection_wells# 2volve.converted_wells# ['15/9-F-5']volve.quick_view()# number_of_wells : 7 number_of_columns : 18 number_of_records: 15634
Package: petrosim
PetroSimPetroSim is a collection of petrological simulation tools.InstallationPetroSim can be installed from the source or withpipas follows:pip install petrosimEC-AFCThe EC-AFC1model is a tool for simulating the evolution of the geochemical composition of a magma body as it intrudes into country rock, assimilating wallrock into the melt and fractionally crystallizing out cumulates.EC-RAFCThe EC-RAFC2model is a tool for simulating the evolution of the geochemical composition of a magma body as it and subsequent recharges intrude into country rock, assimilating wallrock into the melt and fractionally crystallizing out cumulates.UsageAn EC-AFC simulation is run with the standalone driver script using the command below, taking the initial parameters via a YAML formattedinput.infile and outputting the results in theoutput.csvCSV file:python3 -m petrosim.models.ecafc.driver input.in output.csvLikewise, an EC-RAFC simulation can be run by replacingpetrosim.models.ecafc.driverwithpetrosim.models.ecrafc.driverin the command above.Example input files are located atpetrosim/models/<model_type>/example.in. This file may be generated at any location by running the utility script from the desired location in the following manner by specifyting the model type (either "ecafc" or "ecrafc"):python3 -m petrosim.utils.generate_example_input <model_type>Running the simulation is by default silent and only outputs the CSV file, but this may be changed to also print to screen the first and lastNlines of the results by adding the-print <N>flag in the command.Basic visualization of the simulation results may be achieved with the included plotter, where one passes the resulting CSV file, the x-axis column name and the y-axis column name. An example of how to use the plotter on the resulting CSV file is below.python3 -m petrosim.results.plotter output.csv -x Tm -y "Sr Cm"This will both show a figure on screen and write a PNG file namedTm-Sr_Cm.png. To turn off saving to file, pass the-nosaveflag, and to turn off showing the figure on screen, pass the-noshowflag in the command.ReferencesSpera, F. J.; Bohrson, W. A. Energy-Constrained Open-System Magmatic Processes I. General Model and Energy-Constrained Assimilation and Fractional Crystallization (EC-AFC) FormulationJ. Petrol.,2001,42, 999-1018, DOI:10.1093/petrology/42.5.999Spera, F. J.; Bohrson, W. A. Energy-Constrained Open-System Magmatic Processes 3. Energy-Constrained Recharge, Assimilation and Fractional Crystallization (EC-RAFC)Geochem. Geophys. Geosyst.,2002,3, 8001, DOI:10.1029/2007GC001781
Package: petrovisor
PetroVisor APIPython interface to PetroVisor REST API.This lib is currently in development and is subject to change.InstallInstallpetrovisorpackage frompippip install petrovisoror from the sourcepython -m pip install .Make sure thatpip,setuptoolsandbuildare up to datepython -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install --upgrade buildUninstallUninstallpetrovisorpackagepython -m pip uninstall petrovisorDependenciesREST API interface is implemented usingrequestsOther dependencies includepandasnumpyDocumentationDetails of the API endpoints and data models can be found in the Swagger links below, which are always up-to-date.PetroVisor Web API (US1)PetroVisor Web API (EU1)Other documentation can be found by the following link.PetroVisor REST APIHow to useAuthorizationIf one uses Jupyter notebook or running Python script from console for authorization the user required to specify theworkspaceanddiscovery_url.# workspaceworkspace='Workspace Name'# urldiscovery_url=r'https://identity.us1.petrovisor.com'# US# discovery_url = r'https://identity.eu1.petrovisor.com' # EU (alternative)usernameandpasswordcredentials can be entered either by using the login dialogpv_api=pv.PetroVisor(workspace=workspace,discovery_url=discovery_url)or by specifyingusernameandpasswordarguments directlypv_api=pv.PetroVisor(workspace=workspace,discovery_url=discovery_url,username=username,password=password)Examples: Get, Post, Put, Delete requestsBasic API requests such asget,post,put,deleteconsist of main URL/route part,
as well as an optionaldataandquerystring arguments.dataandqueryarguments can presented by the built-in Python dictionary.Put requestname='Well'pv_api.put(f'Entities/{name}',data={'Name':name,'EntityTypeName':'Well','Alias':'Well Alias','IsOpportunity':False,})Post requestold_name='Well'new_name='New Well'pv_api.post(f'Entities/Rename',query={'OldName':old_name,'NewName':new_name,})Get requestname='New Well'pv_api.get(f'Entities/{name}')Delete requestname='New Well'pv_api.delete(f'Entities/{name}')More examples can be found in theexamplesdirectory of the repository.
Package: petrovna
petrovnaБиблиотека для валидации БИК, ИНН, КПП, ОГРН, ОГРНИП, Корр. счета, Номера р/с, СНИЛСУстановкаpipinstallpetrovnaimportpetrovnabic_is_valid:bool=petrovna.validate_bic('<БИК>')inn_is_valid:bool=petrovna.validate_inn('<ИНН>')kpp_is_valid:bool=petrovna.validate_kpp('<КПП>')corr_account_is_valid:bool=petrovna.validate_ks('<КОРРЕСПОНДЕНТСКИЙ_СЧЕТ>','<БИК>')ogrn_is_valid:bool=petrovna.validate_ogrn('<ОГРН>')ogrnip_is_valid:bool=petrovna.validate_ogrnip('<ОГРНИП>')account_number_is_valid:bool=petrovna.validate_rs('<НОМЕР_Р/С>','<БИК>')snils_is_valid:bool=petrovna.validate_snils('<СНИЛС>')# Для возврата валидатором списка ошибок, помимо признака валидности, следует указать аргумент 'errors=True'valid,error=petrovna.validate_bic('<БИК>',errors=True)