Saravanan666/pypi-org huggingface dataset:
Package: se-import
se-import: Modules import in a safe source protection, support for python module code and custom des encryption, ase decryption operation or custom decryption callback module loading# -*- coding: utf-8 -*-# @Time    : 2021/11/10 11:22'''模块的安全导入，对python模块代码支持des和自定义加密，运行des解密或者自定义解密回调'''se_import demo:# -*- coding: utf-8 -*-# @Time    : 2021/11/9 16:42importsysimportse_importprint(dir(se_import))#从内存加载模块deftest_load_mem():s="a = 100\nb=1000"#自定义模块名name='test_load_mem_test'ret=se_import.load_module(name,s,name+'.py')print(ret)print(dir(ret))print(ret.a)print(ret.b)#从内存加载模块，支持模块解密回调deftest_load_custom():#从内存加载模块s="a = 100\nb=1000"# 自定义模块名name='load_module_custom_test'ret=se_import.load_module_custom(name,s,name+'.py',lambdax:x+'\nadasdadada=1000')print(ret)print(dir(ret))print(ret.a)print(ret.b)#从本地 ase加密文件加载模块deftest_save_load_asefile():#模块ase 加密，保存到文件infile="./ase.py"outfile='./ase.pys'key=bytes([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])iv=bytes([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])#第一个参数类型是字符串 是文件名， bytes 则为二进制文件内容ret=se_import.dump_module_to_asefile(infile,key,iv)withopen(outfile,mode='wb')asf:f.write(ret)#从文件加载加密模块# 自定义模块名infile='./ase.pys'name='test_save_load_asefile_test'ret2=se_import.load_module_from_asefile(name,infile,name+'.py')print(ret2)print(dir(ret2))if__name__=='__main__':test_save_load_asefile()
Package: se-imports
se-imports: python source code encryption protection, it will decode in memrory and load modulese-importsencode codeimportshutildeftest_se_project(src_dir='/home/project',dst_dir='/home/project_se',package_name='serving'):fromse_importsimportse_project_crypto#目标文件夹存在则自动删除autoremove_dst_exists=False#删除空目录autoremove_dst_empty_dir=True#忽略复制文件，文件对工程运行没有用ignore=shutil.ignore_patterns('test','.git','.idea','setup.py')#package_name# 如果是pypi包，package_name 需要设置包名,否则可以设置None#加密接受规则accept_rules=['serving/utils/*','serving/run*','serving/http_client/http*']se_project_crypto(src_dir,dst_dir,is_use_root_name=False,autoremove_dst_exists=False,autoremove_dst_empty_dir=True,ignore=ignore,rules=accept_rules,key=bytes([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]),iv=bytes([1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]))test_se_project()run codeimportshutildefrun():importsys,osfromse_importsimportse_register_moduleroot_dir=os.path.abspath(os.path.join(os.path.dirname(__file__),os.pardir))se_register_module(root_dir=root_dir)fromserving.runnerimportmainmain()
Package: seinfeld
Python library for querying Seinfeld quotes.Depends on a database generated usingscripts by Colin Pollick.Installlibseinfeld is compatible with Python 2.7 and Python 3.3+.
You can install it from PyPI with the following command:$ pip install seinfeldlibseinfeld requires a local copy of the Seinfeld quote database.
You can build it by following the instructions on theseinfeld-scripts repo,
or you can download a prebuilt copy with the following command:$ wget https://noswap.com/pub/seinfeld.dbUsageFirst thing is to import libseinfeld and create a connection to the local
database:>>> from seinfeld import Seinfeld
>>> seinfeld = Seinfeld(<path to seinfeld.db>)To get information on individual episodes or seasons:>>> seinfeld.season(1).episodes.keys()
[1, 2, 3, 4]

>>> seinfeld.season(1).episodes[1].title
u'Good News, Bad News'

>>> seinfeld.season(1).episodes[1].writers[0]
u'Jerry Seinfeld'

>>> seinfeld.season(1).episodes[1].date
datetime.date(1990, 6, 14)Quotes can be retrieved by unique ID:>>> quote = seinfeld.quote(34665)
>>> quote.text
u'The show is about nothing.'

>>> quote.speaker.name
u'George'

>>> quote.episode.title
u'The Pitch'Searching for quotes is simple:>>> seinfeld.search(speaker='Jerry', subject='keys')
[Quote(...), ...]Searches are limited to ten quotes by default, but you can get more or less.
To get all the quotes, in order, for a given episode:>>> episode = seinfeld.season(1).episodes[1]
>>> quotes = seinfeld.search(episode=episode, limit=None)
>>> len(quotes)
209You can even get random quotes by search query:>>> seinfeld.random(speaker='George')
Quote(...)If you’d like context around an individual quote, you can get a passage:>>> passage = seinfeld.passage(quote)
>>> len(passage.quotes)
5LicenseCopyright 2016 John Reese, and licensed under the MIT license.
See theLICENSEfile for details.
Package: seipy
# seipyHelper functions for the python data science stack as well as spark, AWS, jupyter.## What is itThis library contains helpers and wrappers for common data science libraries in the python stack:- pandas- numpy- scipy- sklearn- matplotlib- pysparkThere are also functions that simplify common manipulations for machine learning and data sciencein general, as well as interfacing with the following tools:- s3- jupyter- aws- spark SQL## Installation```# PyPIpip install seipy```## Here are some examples### pandas#### Apply function to unique DataFrame entries only (for speedup)```from seipy import apply_uniqdf2 = apply_uniq(df, orig_col, new_col, _func)```This will return the same DataFrame as performing:`df[new_col] = df[orig_col].apply(_func)`but is much more performant when there are many duplicate entries in `orig_col`.It works by performing the function `_func` only on the unique entries and then merging with the original DataFrame.Originally answered on stack overflow:https://stackoverflow.com/questions/46798532/how-do-you-effectively-use-pd-dataframe-apply-on-rows-with-duplicate-values/#### Filtering DataFrame with multiple conditions```from seipy import filt# example with keyword argumentsfilt(df,season="summer",age=(">", 18),sport=("isin", ["Basketball", "Soccer"]),name=("contains", "Armstrong"))# example with dict notationa = {'season': "summer", 'age': (">", 18)}filt(df, **a)```### linear algebra```from seipy import distmatdistmat()```This will prints possible distance metrics such as "euclidean" "chebyshev", "hamming".```distmat(fframe, metric)```This generates a distance matrix using `metric`.Note, this function is a wrapper of scipy.spatial.distance.cdist### jupyter```from seipy import notebook_containsnotebook_contains(search_str,on_docker=False,git_dir='~/git/experiments/',start_date='2015-01-01', end_date='2018-12-31')```Prints a list of notebooks that contain the str `search_str`.Very useful for these situations: "Where's that notebook where I was trying that one thing that one time?"### s3```from seipy import s3zip_funcs3zip_func(s3zip_path, _func, cred_fpath=cred_fpath, **kwargs)```This one's kinda nice. It allows one to apply a function `_func` to each subfile in a zip file sitting on s3.I use it to filter and enrich some csv files that periodically get zipped to s3, for example.### spark and s3 on jupyter```from seipy import s3spark_initspark = s3spark_init(cred_fpath)```Returns `spark`, a `SparkSession` that makes it possible to interact with s3 from jupyter notebooks.`cred_fpath` is the file path to the aws credentials file containing your keys.### Miscellaneous```from seiji import merge_two_dictsmerge_two_dicts(dict_1, dict_2)```Returns the merged dict `{**dict_1, **dict_2}`.An extension for mulitple dicts is `reduce(lambda d1,d2: {**d1,**d2}, dict_args[0])`### Getting helpPlease either post an issue on this github repo, or email the author `seiji dot armstrong at gmail` with feedback,feature requests, or to complain that something doesn't work as expected.
Package: seiqrdp-model
COVID-19 mathematical modelingThis repository is aimed to contain the programs used for dynamical modeling of COVID-19 spread with SEIQRDP compartmental model. It is described inthis paperby Mohamed Taha Rouabah, Abdellah Tounsi, and Nacer Eddine Belaloui.This repository will also contain an agent-based program for epidemic spread simulation in the near future.seiqrdp_modelThis package includes computational tools to fit data, simulate and calibrate
parameters of the compartmental epidemiological SEIQRDP model using a genetic
fitting algorithm and parallel computing techniques.ArchitectureHow to installUsing pip(preferred way)Execute the following line in your command-line interface:pip install seiqrdp-modelUsing setup.pyDownload the repository then execute the following line in your command-line interface:python setup.py installYou need tocdinside the repository folder.Quick startThe module is fully documented and equiped with all necessary information
about the classes and methods.
Moreover, you are welcome to checklauncher.pyfile which shows an example of
how to use this module.DataWorld wide data is sourced and maintained by theJohn Hopkins University Center for Systems Science and EngineeringData for Algeria is provided byAlgerian Health MinistryandCDTALicenseThis work is licensed under theApache 2.0 License
Package: seira-craft
Seira CraftA Python package to help craft and manipulate sequences.Installationpipinstallseira-craftorpoetryaddseira-craftUsageBasic Examplefromdatetimeimportdatetimefromseira_craft.defaultimportDefaultCrafterfromseira_craft.seiraimportSequencefromdataclassesimportdataclass@dataclassclassSegment:start:datetimeend:datetimeval:strdefcopy(self):returnSegment(self.start,self.end,self.val)crafter=DefaultCrafter[Segment]()seq=Sequence[Segment](crafter)seq.insert(Segment(start=datetime(2023,1,1,1),end=datetime(2023,1,1,2),val="First Interval"))seq.insert(Segment(start=datetime(2023,1,1,1,30),end=datetime(2023,1,1,2,30),val="Second Interval"))print(seq.sequence())LicenseMIT License. SeeLICENSEfor more details.
Package: seiran
SeiranSeiran (/'seIran/, lit. blue-indigo) is a simple bookmarks manager. It's free software and cross-platform, built with Python and SQLite.Seiran storesyourbookmarks onyourmachine, where they belong. It's ideal if youare tired of slowing down your browser with huge bookmark fileshave bookmarks you don't trust others withreject proprietary, black-box "cloud" services on principlewant to back up your bookmarks regularly, in a format that will work with any browser, just in caseuse multiple different browsers or browser profileswant to be able to edit your bookmarks with familiar SQL tools instead of a slow in-browser PHP interfaceprefer terminals over GUIOr all of the above!Seiran does not connect to the Internet at any time. It does not download icons or validate your bookmarks. It does not automatically synchronize with anything. It doesn't even have an "open in browser" command. It may not bethatuseful, and it's certainly nothing fancy, but it does exactly what I want and need a bookmark manager to do.At present Seiran is text-only. I've considered making a GUI interface for it, but the command line one works fine for now.DependenciesPython >= 3.4appdirsThat's all!
Package: seirplus-es
Paquete seirsplus_esDescripciónEste paquete utiliza un modelo epidemiológico SEIR y redes de contactos (network) para modelar el comportamiento de la pandemia de covid-19.Está basado en el modelo creado por Ryan McGee con modificaciones hechas para ajustarlo a las condiciones específicas de El Salvador.Autores ✒️Ryan McGee-Trabajo Base-RyanVíctor Sandoval-Correcciones y modificaciones-SandovalLicenciaMIT LicenseCopyright (c) [year] [fullname]Permission 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.
Package: seis-acc
ACC: Auto-Correlogram Calculation in seismologyExtracting P-wave reflections between the free surface and the lithospheric discontinuities to image the subsurface structures.RequirementsPython 3python packages including: 'click', 'commentjson', 'geographiclib', 'matplotlib>=2', 'numpy', 'obspy>=1.0.3', 'pandas', 'setuptools', 'shapely', 'scipy>=0.19.0', 'tqdm'InstallationHere I offer two conventional ways to install the package. The first is downloading the code via git clone command.>>> git clone https://github.com/weijias-opensource/acc.gitand enter the main directory of the package where thesetup.pyfile is, then execute>>> python setup.py install. The second is just simply to execute the command of>>> pip install seis-accI strongly suggest you installAnaconda3first, sinceAnaconda Distribution is a free, easy-to-install package manager, environment manager, and Python distribution with a collection of 1,500+ open source packages with free community support. Anaconda is platform-agnostic, so you can use it whether you are on Windows, macOS, or Linux.This allow you to install the acc package using the second way above easily.TutorialsPlease go the the example directory and run>>> sh run.shfor a simple example of the Warramungga array data.More information can be found athttps://acc.readthedocs.io/en/latest/index.html.DeploymentThe package could be run on all operating systems, including Windows, Mac and Linux. But the package is well-tested on Ubuntu Linux (19.10) with Anaconda3 at now.AuthorsWeijia SunIf you have any suggestions to help improve the package, please let me know and I will try to carry them out as soon.ContributorsB. L. N. KennettHuaiyu YuanAcknowledgmentsThe author learned to write a flexible, practical and modern software for friendly usage from other packages. More, a small part of code in this package is also reproduced from other projects.rfseispyobspy
Package: seisflows
SeisFlowsSeisFlows is an open-source, Python-based waveform inversion package that tackles the problems of full waveform inversion, seismic migration, and adjoint tomography.With a user base in both academia and industry, this package has been used for production scale inversions, some with over a billion model parameters, for research problems related to oil and gas exploration, earthquake seismology and general nonlinear optimization problems.SeisFlows is under current active development, and is bundled with other inversion software under theadjTomo organization.Documentation, including install instructions, example problems and API, can be found onRead the Docs.If you find any issues, have questions, or would like to join the community, please feel free to open up aGitHub Issueorstart a discussion.ReferencesIf you use this package in your own research, please cite the following papers:Bryant Chow, Yoshihiro Kaneko, Carl Tape, Ryan Modrak, John Townend,An automated workflow for adjoint tomography     —waveform misfits and synthetic inversions for the North Island, New Zealand, Geophysical Journal International, Volume 223, Issue 3, December 2020, Pages 1461–1480,https://doi.org/10.1093/gji/ggaa381Ryan Modrak, Dmitry Borisov, Matthieu Lefebvre, Jeroen Tromp;SeisFlows—Flexible waveform inversion software, Computers & Geosciences, Volume 115, June 2018, Pages 88-95,https://doi.org/10.1016/j.cageo.2018.02.004The following paper can also be cited relative to this software:Ryan Modrak, Jeroen Tromp;Seismic waveform inversion best practices: regional, global and exploration test cases, Geophysical Journal International, Volume 206, Issue 3, 1 September 2016, Pages 1864–1889,https://doi.org/10.1093/gji/ggw202
Package: seislab
SeisLabSeisLab is a Python toolbox for seismic data i/o and analysis.Installationpip install --upgrade seislabRunRefer to the attached demoDevelopersSeisLab is developed byCognitive Geo.SupportContact usif you have any problem with using SeisLab.LicenseGNU Affero General Public License v3 or later (AGPLv3+)
Package: seismic
Monitoring Velocity Changes using Ambient Seismic NoiseSeisMIC (Seismological Monitoring using Interferometric Concepts) is a python software that emerged from the miic library.SeisMICprovides functionality to apply some concepts of seismic interferometry to different data of elastic waves. Its main use case is the monitoring of temporal changes in a mediums Green's Function (i.e., monitoring of temporal velocity changes).SeisMICwill handle the whole workflow to create velocity-change time-series including:Downloading raw dataAdaptable preprocessing of the waveform dataComputating cross- and/or autocorrelationsPlotting tools for correlationsDatabase management of ambient seismic noise correlationsAdaptable postprocessing of correlationsComputation of velocity change (dv/v) time seriesPostprocessing of dv/v time seriesPlotting of dv/v time-seriesInverting dv/v onto a spatial gridSeisMIChandles correlations and data in anObsPy-like manner.Installation of this packageInstallation from PyPi (pip install)SeisMICis  now deployed on PyPi and can simply be installed using:# We recommend installing mpi4py from the conda-forge channel instead of PyPicondainstall-cconda-forgempi4py

pipinstallseismicInstallation from Source CodeTo obtain the lates features, you can install SeisMIC from its source code, available on GitHub.Developers should download thedevbranchDownload this package via GitHub and install it via bash terminal (the few steps shown below) or using the graphical user interface# Download via wget or web-browserwgethttps://github.com/PeterMakus/SeisMIC/archive/refs/heads/main.zip# For developers download the dev branchwgethttps://github.com/PeterMakus/SeisMIC/archive/refs/heads/dev.zip# unzip the packageunzipmain.zip# or dev.zip# Change directory to the same directory that this repo is in (i.e., same directory as setup.py)cdSeisMIC-main# That's the standard name the folder should have# Create the conda environment and install dependenciescondainstall-cconda-forgempi4py
condaenvcreate-fenvironment.yml# Activate the conda environmentcondaactivateseismic# Install the package in editable modepipinstall-e.Getting startedAccess SeisMIC's documentationhere.SeisMIC comes with a few tutorials (Jupyter notebooks). You can find those in theexamples/directory.Acknowledging the Use of SeisMIC in your WorkIf you should use SeisMIC to create published scientific content please citeMakus, Peter; Sens-Schönfelder, Christoph (2022): Seismological Monitoring using Interferometric Concepts (SeisMIC). V. 0.1.27. GFZ Data Services. doi: 10.5880/GFZ.2.4.2022.002.Reporting Bugs / Contact the developersThis version is an early release. If you encounter any issues or unexpected behaviour, pleaseopen an issuehere on GitHub.Questions?If you have any questions that do not require any changes in the source code, please use thediscussions featureContributingThank you for contributing to SeisMIC! Have a look at ourguidelines for contributors
Package: seismic-canvas
Seismic-Canvas: interactive 3D seismic visualization toolSeismic-Canvas is an interactive 3D visualization tool mainly designed for seismic data, at the same time also can be useful for any 3D data.
This tool is based onVisPy, a Python library that leverages the computational power of GPUs through theOpenGLlibrary.InstallSimply run the following command to install from PyPI:pip install seismic_canvasUsageSlicingAdd any number of slices to view the slices of your volume usingseismic_canvas.volume_slicesfunction. For example:visual_nodes=volume_slices(volume,x_pos=[370,170,570,770],y_pos=810,z_pos=120,clim=(-2,2))CameraLeft click and drag to rotate the camera angle; right click and drag, or scroll mouse wheel, to zoom in and out. HoldShiftkey, left click and drag to pan move. PressSpacekey to return to the initial view. PressSkey to save a screenshot PNG file at any time. PressEsckey to close the window.DraggingMost elements are draggable. HoldCtrlkey, the selectable visual nodes will be highlighted when your mouse hovers over them; left click and drag to move the highlighted visual node. The volume slices will update their contents in real-time during dragging. You can also pressDkey to toggle the dragging mode on/off.MemMapCompatible tonumpy memory map. For example, reading in a binary data file contatining a 3D seismic volume with size 210x920x825 (608MB), Seismic-Canvas takes ~700MB RAM (Windows PyQt5 backend).volume=np.fromfile('./CostaRica_seismic.dat','>f4').reshape(825,920,210)Instead, reading in the same file using numpy memory map, Seismic-Canvas takes only ~82MB RAM (Windows PyQt5 backend), and significantly reduces the launch time.volume=np.memmap('./CostaRica_seismic.dat',dtype='>f4',mode='r',shape=(825,920,210))ReproducibilityWhen you drag and arrange everything on the canvas, pressAkey to print out a collection of useful parameters that can be used to reproduce the current canvas setting.DependenciesSeismic-Canvas depends onnumpyandvispyPython libraries.
The vispy library also depends on one of these backends to display a window on your OS: PyQt4/PySide, PyQt5/PySide2, glfw, pyglet, SDL, or wx.
We recommendPyQt5as it is the easiest to install and most compatible on different platforms.It is also recommended to installPyOpenGLandmatplotlib; they are optinal libraries that can enhance the visualization in various ways. For example,PyOpenGLallows for nice antialiased 3D line objects, andmatplotlibhelps render a much more useful colorbar than the vispy stock colorbar object.DemoSeesimple_demo.pyfor a simple demo.vispy/util/fetching.pywill automatically download this example data.Also tryosv_F3_demo.pyto check out the results from this research:xinwucwp/osv. You can download all the binary data volumes from thisGoogle Drive link.Using 2D markers to visualize a randomly generated well logs.Using triangle mesh surfaces to visualizeFaultSkins.A dark themed example with a z-axis-up axis legend:To-Do ListWell log visualizationReplace current colorbar with Matplotlib rendered colorbarDraw lines where slice planes intersect
Package: seismic-classifier
swagger-clientNo description provided (generated by Swagger Codegenhttps://github.com/swagger-api/swagger-codegen)This Python package is automatically generated by theSwagger Codegenproject:API version: 0.1.0Package version: 1.0.0Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegenRequirements.Python 2.7 and 3.4+Installation & Usagepip installIf the python package is hosted on Github, you can install directly from Githubpipinstallgit+https://github.com/GIT_USER_ID/GIT_REPO_ID.git(you may need to runpipwith root permission:sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)Then import the package:importswagger_clientSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)Then import the package:importswagger_clientGetting StartedPlease follow theinstallation procedureand then run the following:from__future__importprint_functionimporttimeimportswagger_clientfromswagger_client.restimportApiExceptionfrompprintimportpprint# create an instance of the API classapi_instance=swagger_client.DefaultApi(swagger_client.ApiClient(configuration))stream='stream_example'# str |try:# Predictapi_response=api_instance.predict_classifier_predict_stream_mseed_post(stream)pprint(api_response)exceptApiExceptionase:print("Exception when calling DefaultApi->predict_classifier_predict_stream_mseed_post:%s\n"%e)Documentation for API EndpointsAll URIs are relative to/ClassMethodHTTP requestDescriptionDefaultApipredict_classifier_predict_stream_mseed_postPOST/classifier/predict/stream/mseedPredictDocumentation For ModelsBodyPredictClassifierPredictStreamMseedPostClassifierResultsHTTPValidationErrorValidationErrorDocumentation For AuthorizationAll endpoints do not require authorization.Author