Saravanan666/pypi-org huggingface dataset:
Package: semicpy
Semicpy : Semiconductor physics calculation and modelingWhat is it?Semicpyis a python package that allows you to model semiconductors and perform calculations with them.Main Featuresinstantiate semiconductors as objects for calculations and modelingperform data analysis on semiconductorsetc.Installationpip install semicpyFuture considerationsTry implementing some form of machine learning/deep learningMagnetic SemiconductorsNew device topologiesNew materials!Source CodeThe source code is currently hosted onGitHubDependenciesNumpypandasPintScipyPlotlyMatplotlibseabornLicenseMITDocumentationDocumentation for this package will be hosted on ReadTheDocs soon.AuthorThis package is written byNithin Kumar Santha KumarBackgroundThis package was started as a result of the author's desire for an open source library that could provide a comprehensive calculation and modeling system that would be useful for everyone from university students to industry professionals.ContributionsAll contributors are welcome! Please emailme!Bugs and IssuesHead on over toIssues trackerReferencesReferences
Package: semidbm
OverviewSemidbm is a fast, pure python implementation of a dbm, which is a
persistent key value store. It allows you to get and set keys through
a dict interface:import semidbm
db = semidbm.open('testdb', 'c')
db['foo'] = 'bar'
print db['foo']
db.close()These values are persisted to disk, and you can later retrieve
these key/value pairs:# Then at a later time:
db = semidbm.open('testdb', 'r')
# prints "bar"
print db['foo']It was written with these things in mind:Pure python, supporting python 2.6, 2.7, 3.3, and 3.4.Cross platform, works on Windows, Linux, Mac OS X.Supports CPython, pypy, and jython (versions 2.7-b3 and higher).Simple and Fast (SeeBenchmarking Semidbm).Supported Python VersionsSemidbm supports python 2.6, 2.7, 3.3, and 3.4.Official DocsRead thesemidbm docsfor more information
and how to use semidbm.FeaturesSemidbm originally started off as an improvement over thedumbdbmlibrary in the python standard library.  Below are a list of some of the
improvements over dumbdbm.Single Data FileInstead of an index file and a data file, the index and data have been
consolidated into a single file.  This single data file is always appended to,
data written to the file is never modified.Data File CompactionSemidbm uses an append only file format.  This has the potential to grow to
large sizes as space is never reclaimed.  Semidbm addresses this by adding acompact()method that will rewrite the data file to a minimal size.PerformanceSemidbm is significantly faster than dumbdbm (keep in mind both are pure python
libraries) in just about every way.  The documentation shows theresultsof semidbm vs. other dbms, along with how to run the benchmarking
script yourself.LimitationsNot thread safe; can’t be accessed by multiple processes.The entire index must fit in memory.  This essentially means that all of the
keys must fit in memory.Post feedback and issues ongithub issues, or check out the
latest changes at the githubrepo.
Package: semidiscrete1
Python bindings for the semidiscrete RT model of Gobron et al.Note this version includes adjoint code developed by N Gobron, T Kaminski,
P Lewis and J Gomez-Dans derived from the original NADIM/semidiscrete. These
modifications were funded by the ESAEOLDASproject.The original semidiscrete code can be foundhereThe copyright for the original code isCopyrights
(c) Nadine Gobron, Bernard Pinty, and Michel M. Verstraete 1997 The copyrights for these 8 files, including the computer codes, remain with their authors, Drs. Nadine Gobron, Bernard Pinty and Michel M. Verstraete.Academic users
You are authorized to use this code for your research and teaching, but you must acknowledge use of this routine explicitly and refer to the paper above in any publication or work for which you used these codes.
You may distribute, free of charge, the unmodified version of these codes to colleagues involved in similar activities, provided you include all the in-line documentation. They, in turn, must agree with and abide by the same rules.
You may not sell this code to anybody, and you may not distribute it to commercial interests under any circumstances.Commercial and other users
Use of this code (NADIM) in commercial applications is strictly forbidden without the written approval of the authors. Even with such an authorization to use the code, you may not distribute or sell it to any other commercial or business partners under any circumstances.
Package: semidiscrete2
Python bindings for the semidiscrete RT model of Gobron et al.Note this version includes adjoint code developed by N Gobron, T Kaminski,
P Lewis and J Gomez-Dans derived from the original NADIM/semidiscrete. These
modifications were funded by the ESAEOLDASproject.The original semidiscrete code can be foundhereThe copyright for the original code isCopyrights
(c) Nadine Gobron, Bernard Pinty, and Michel M. Verstraete 1997 The copyrights for these 8 files, including the computer codes, remain with their authors, Drs. Nadine Gobron, Bernard Pinty and Michel M. Verstraete.Academic users
You are authorized to use this code for your research and teaching, but you must acknowledge use of this routine explicitly and refer to the paper above in any publication or work for which you used these codes.
You may distribute, free of charge, the unmodified version of these codes to colleagues involved in similar activities, provided you include all the in-line documentation. They, in turn, must agree with and abide by the same rules.
You may not sell this code to anybody, and you may not distribute it to commercial interests under any circumstances.Commercial and other users
Use of this code (NADIM) in commercial applications is strictly forbidden without the written approval of the authors. Even with such an authorization to use the code, you may not distribute or sell it to any other commercial or business partners under any circumstances.
Package: semidiscrete3
Python bindings for the semidiscrete RT model of Gobron et al.Note this version includes adjoint code developed by N Gobron, T Kaminski,
P Lewis and J Gomez-Dans derived from the original NADIM/semidiscrete. These
modifications were funded by the ESAEOLDASproject.The original semidiscrete code can be foundhereThe copyright for the original code isCopyrights
(c) Nadine Gobron, Bernard Pinty, and Michel M. Verstraete 1997 The copyrights for these 8 files, including the computer codes, remain with their authors, Drs. Nadine Gobron, Bernard Pinty and Michel M. Verstraete.Academic users
You are authorized to use this code for your research and teaching, but you must acknowledge use of this routine explicitly and refer to the paper above in any publication or work for which you used these codes.
You may distribute, free of charge, the unmodified version of these codes to colleagues involved in similar activities, provided you include all the in-line documentation. They, in turn, must agree with and abide by the same rules.
You may not sell this code to anybody, and you may not distribute it to commercial interests under any circumstances.Commercial and other users
Use of this code (NADIM) in commercial applications is strictly forbidden without the written approval of the authors. Even with such an authorization to use the code, you may not distribute or sell it to any other commercial or business partners under any circumstances.
Package: semidiscrete4
Python bindings for the semidiscrete RT model of Gobron et al.Note this version includes adjoint code developed by N Gobron, T Kaminski,
P Lewis and J Gomez-Dans derived from the original NADIM/semidiscrete. These
modifications were funded by the ESAEOLDASproject.The original semidiscrete code can be foundhereThe copyright for the original code isCopyrights
(c) Nadine Gobron, Bernard Pinty, and Michel M. Verstraete 1997 The copyrights for these 8 files, including the computer codes, remain with their authors, Drs. Nadine Gobron, Bernard Pinty and Michel M. Verstraete.Academic users
You are authorized to use this code for your research and teaching, but you must acknowledge use of this routine explicitly and refer to the paper above in any publication or work for which you used these codes.
You may distribute, free of charge, the unmodified version of these codes to colleagues involved in similar activities, provided you include all the in-line documentation. They, in turn, must agree with and abide by the same rules.
You may not sell this code to anybody, and you may not distribute it to commercial interests under any circumstances.Commercial and other users
Use of this code (NADIM) in commercial applications is strictly forbidden without the written approval of the authors. Even with such an authorization to use the code, you may not distribute or sell it to any other commercial or business partners under any circumstances.
Package: seminal-root-angle
Seminal root angle extractionUsed for high-throughput phenotyping of rhizobox images.InstallThe latest version is available via PyPI (https://pypi.org/project/seminal-root-angle) for convenient installation with pippip install seminal-root-angleExample usageAssuming the following folder structure:output
data
├── photos
│   ├── photo1.JPG
│   ├── photo2.JPG
│   └── ....
├── root_segmentations
│   ├── photo1.png
│   ├── photo2.png
│   └── ....
└── seed_segmentations
    ├── photo1.png
    └── photo2.png
    └── ....Then the angles can be extracted to the output/angles.csv with the following python code:fromseminal_root_angle.extractimportextract_all_anglesextract_all_angles(root_seg_dir='data/root_segmentations',im_dataset_dir='data/photos',seed_seg_dir='data/seed_segmentations',max_seed_points_per_im=2,debug_image_dir='output/debug_images',output_csv_path='output/angles.csv',error_csv_path='output/errors.csv')
Package: semirings
# SemiringsWarning: This package in under construction!Semirings are a powerful abstraction for dynamic programming algorithms.From an overview of semirings, please see chapter 3.3 of[Automating the Analysis and Improvement of Dynamic Programming Algorithms with Applications to Natural Language Processing](http://timvieira.github.io/doc/2023-timv-dissertation.pdf).
Tim Vieira.
PhD Dissertation. 2023
Package: semiring-torch
semiring_torchRun your pytorch code on any semiring with a single line of code!
Semiring_torch is built on top ofautoray.Warning: this is a proof of concept. Expect bugs and missing features.ExampleBy using the logarithmic semiring, you can easily write numerically stable code.
In the following example, we compute a matrix product in log-space.Regular torchsemiring_torchimporttorchx1=torch.tensor([[0.1,0.6],[0.1,0.4]])x2=torch.tensor([[0.5,0.3],[0.2,0.1]])x1=x1.log()x2=x2.log()result=x1[:,:,None]+x2[None,:,:]result=torch.logsumexp(result,dim=1)result=result.exp()fromautorayimportnumpyastorchfromsemiring_torchimportlogarithmic_semiringwithlogarithmic_semiring:x1=torch.tensor([[0.1,0.6],[0.1,0.4]])x2=torch.tensor([[0.5,0.3],[0.2,0.1]])result=x1@x2Supported semiringsCurrently only the logarithmic semiring is supported, but more semirings can be added easily.
Package: semistructuredtxt2df
semistructuredtxt2dfThis Python package reads a text file with unknown rows of headers (e.g., when skiprows can vary) and returns a pandas DataFrame object.
With this package, you can "skip first couple of lines while reading lines in Python" (https://stackoverflow.com/questions/9578580/skip-first-couple-of-lines-while-reading-lines-in-python-file).LicenseInstallationInstall my-project with npmpipinstallsemistructuredtxt2dfUsage/ExamplesFor example, this package can read this sample file as a pandas DataFrame by skipping headers that can vary.Arguments, data types, and default values if anyfilepath_or_buffer: strcolumn_names: str, list, tuple, or setThe first row in the text file that contains all of the elements in it is recognized as the dataframe column names, so you do not have to specify all the columns unless you want to. The order of the column names does not matter.max_rows_to_try: int = Noneseparator: str = ","encode: str = "utf-8"is_commented: bool = FalseSample file (sample_data/sample_text_file.csv)"Game Is FIFA World Cup"
"Year Is 2022"
"Group Is E"
"Timestamp: 1669866143"

"This is a random comment."
"This is also a random comment."
"Country, is also included in this row, but this row will be skipped."

"Country","MP","W","D","L","GF","GA","GD","Pts"
"Spain",1,1,1,0,8,1,7,4
"Japan",2,1,0,1,2,2,0,3
"Costa Rica",2,1,0,1,1,7,-6,3
"Germany",2,0,1,1,2,3,-1,1Sample code# Import the packagefromsemistructuredtxt2dfimportread_txt# Try reading sample files with different column_namesdf1=read_txt(r"sample_text_file.csv","Country")df2=read_txt(r"sample_text_file.csv",["Country"])df3=read_txt(r"sample_text_file.csv",["Country","Pts"])# Check if df1, df2, and df3 are the sameprint(df1.equals(df2))print(df1.equals(df3))print(df1)OutputTrue
True
      Country  MP  W  D  L  GF  GA  GD  Pts
0       Spain   1  1  1  0   8   1   7    4
1       Japan   2  1  0  1   2   2   0    3
2  Costa Rica   2  1  0  1   1   7  -6    3
3     Germany   2  0  1  1   2   3  -1    1

Process finished with exit code 0
Package: semisupervised
SemiSupervisedDescribeThis is a Semi-supervised learning framework of Python. You can use it
for classification task in machine learning.Installpip install semisupervisedAPIWe have implemented following semi-supervised learning algorithm.LabelPropagationreference
codeS3VMreference
codeStatementSome of the code comes from the Internet.Examplesfrom__future__importabsolute_importimportnumpyasnpfromsklearnimportdatasetsfromsklearnimportmetricsfromsklearn.model_selectionimporttrain_test_split# normalizationdefnormalize(x):return(x-np.min(x))/(np.max(x)-np.min(x))defget_data():X,y=datasets.load_breast_cancer(return_X_y=True)X=normalize(X)X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.6,random_state=0)rng=np.random.RandomState(42)random_unlabeled_points=rng.rand(len(X_train))<0.1y_train[random_unlabeled_points]=-1#index,=np.where(y_train!=-1)label_X_train=X_train[index,:]label_y_train=y_train[index]index,=np.where(y_train==-1)unlabel_X_train=X_train[index,:]unlabel_y=-1*np.ones(unlabel_X_train.shape[0]).astype(int)returnlabel_X_train,label_y_train,unlabel_X_train,unlabel_y,X_test,y_testlabel_X_train,label_y_train,unlabel_X_train,unlabel_y,X_test,y_test=get_data()# importfromsemisupervisedimportSKTSVMmodel=SKTSVM()model.fit(np.vstack((label_X_train,unlabel_X_train)),np.append(label_y_train,unlabel_y))# predictpredict=model.predict(X_test)acc=metrics.accuracy_score(y_test,predict)# metricprint("accuracy",acc)
Package: semisync
What is semisync.py?Some problems are best solved synchronously, while others are a better
fit for the asynchronous paradigm. Most problems fall somewhere in
between – they could benefit from asynchronous execution, but require
some events to happen in a certain order. This module seeks to make
blending the two paradigms a bit easier by introducing a concept of
dependencies. If one process must not run until another process has
completed, that process is said to be “dependent” on the second process.
Semisync.py was built using python’s multiprocessing library and a
liberal dose of decorator syntax.InstallationInstall via pipsudo pip install semisyncor via setup.pysudo python setup.py installLet’s See Some Codefrom semisync import semisync
from multiprocessing import Manager
from random import random, randint
from time import sleep

# shared data between processes
shared = Manager().Namespace()

# a demo callback function
def output(field, value):
  print field + ": $" + str(value)

# simple callback syntax
@semisync(callback=output)
def revenue():
  # simulated api call
  sleep(random())
  shared.revenue = randint(1, 1000)
  return "Revenue", shared.revenue

@semisync(callback=output)
def expenses():
  # simulated api call
  sleep(random())
  shared.expenses = randint(1, 500)
  return "Expenses", shared.expenses

# will run only when revenue() and expenses() have completed
@semisync(callback=output, dependencies=[revenue, expenses])
def profit():
  shared.profit = shared.revenue - shared.expenses
  return "Profit", shared.profit

# queue function calls
revenue()
expenses()
profit()

# executes queued calls semi-synchronously
semisync.begin()To repeat the process, simply clear the cache of function calls by using
semisync.clear() after each iterationfor i in range(10):
  revenue()
  expenses()
  profit()
  semisync.begin()
  semisync.clear()In this simple example, moving from synchronous to semi-synchronous
execution cuts the average execution time from 1.00 seconds to .700
seconds. And although the example used is trivial, dependency trees can
be arbitrarily complex.Additional NotesIn order to make the module more flexible, few assumptions are made
about how you choose to deal with shared data. Although Manager() from
the multiprocessing library is used in the example, you’re free to use
whatever format you desire. You’re also in charge of locking shared data
if multiple processes access the same variable. With great flexibility
comes great responsibility.
Package: seml
SEML: Slurm Experiment Management LibrarySEMLis the missing link between the open-source workload scheduling systemSlurm, the experiment management toolsacred, and aMongoDBexperiment database. It is lightweight, hackable, written in pure Python, and scales to thousands of experiments.Keeping track of computational experiments can be annoying and failure to do so can lead to lost results, duplicate running of the same experiments, and lots of headaches.
While workload scheduling systems such asSlurmmake it easy to run many experiments in parallel on a cluster, it can be hard to keep track of which parameter configurations are running, failed, or completed.sacredis a great tool to collect and manage experiments and their results, especially when used with aMongoDB. However, it is lacking integration with workload schedulers.SEMLenables you tovery easily define hyperparameter search spaces using YAML files,run these hyperparameter configurations on a compute cluster usingSlurm,and to track the experimental results usingsacredandMongoDB.In addition,SEMLoffers many more features to make your life easier, such asautomatically saving and loading your source code for reproducibility,easy debugging on Slurm or locally,automatically checking your experiment configurations,extending Slurm with local workers,and keeping track of resource usage (experiment runtime, RAM, etc.).Get startedTo get started, installSEMLeither viapip:pipinstallsemlorconda(the conda version may be outdated, we highly recommend the pypi version!):condainstall-cconda-forgesemlThen configure your MongoDB via:semlconfigure--mongodb# provide your MongoDB credentialsDevelopmentIf you want to developsemlplease clone the repository and install it viapipinstall-e.[dev]and install pre-commit hooks viapre-commitinstallDocumentationDocumentation is available in ourdocs.mdor via the CLI:seml--helpExampleSee our simpleexampleto get familiar with howSEMLworks.CLI completionSEML supports command line completion. To install this feature run:seml--install-completion{shell}If you are using the zsh shell, you might have to appendcompinit -Dto the~/.zshrcfile (see thisissue).Slurm versionSEML should work with Slurm 18.08 and above out of the box. Version 17.11 and earlier do not have a SIGNALING job state, which you have to remove from the SLURM_STATES defined in SEML's settings (seml/settings.py). Earlier versions have not been tested and might have other issues.ContactContact us atzuegnerd@in.tum.de,johannes.gasteiger@tum.de, orn.gao@tum.defor any questions.CiteWhen you use SEML in your own work, please cite the software along the lines of the following bibtex:@software{seml_2023,
  author = {Z{\"u}gner, Daniel and Gasteiger, Johannes and Gao, Nicholas and Dominik Fuchsgruber},
  title = {{SEML: Slurm Experiment Management Library}},
  url = {https://github.com/TUM-DAML/seml},
  version = {0.4.0},
  year = {2023}
}Copyright (C) 2023
Daniel Zügner, Johannes Gasteiger, Nicholas Gao, Dominik Fuchsgruber
Technical University of Munich
Package: semmo
# Semmo, your simple semantic friend
Semmo is a basic text-analysis library for your everyday needs.Facilitates:
* synonym mining and other text-normalisation techniques such a lemmatisation
* N-gram mining and TFIDF-scoring
* basic text-mining using regex
* basic text-filtering using regex
* Word embeddingsWant to haves:
* learn regex patterns using LSTM’s
* text-dimension reduction techniques such as NMF/LDA/LSA etc.Built on top of
* SpaCy
* Gensim
* TextPipe
* Sklearn
Package: semmy
🐊 SemmySemantic versioningmade easy for Python.FeaturesPrerequisitesInstallUsageImportingInitializing a raw objectInitializing from stringExporting as tupleValidating inputComparing versionsBumping versionsContributingFeaturesWithsemmyyou can...Parse semantic version domain objects from valid stringsCheck if two versions are equalCheck if version is greater (newer) or lesser (older) than other versionCheck if version is a pre-releaseBump (pre-)major, (pre-)minor, and (pre-)patch versionsPrerequisitesPython>=3.8 or laterInstallpoetryaddsemmyAlternatively, for older projects.pipinstallsemmy
pipfreeze>requirements.txtUsageBelow are the most common use cases. Please, checkthe unit testsfor complete examples.Importing>>>fromsemmyimportSemverInitializing a raw objectPlain objects are easy to initialize given three semantic version components.>>>Semver(1,2,3)Version(1.2.3)Keyword arguments are supported, too.>>>Semver(major=1,minor=2,patch=3)Version(1.2.3)Versions may contain pre-release tag and build number.>>>Semver(1,0,0,pre_release="rc-1")Version(1.0.0-rc-1)>>>Semver(1,0,0,build="6c231887917e472da7f299c934b20f29")Version(1.0.0+6c231887917e472da7f299c934b20f29)Initializing from stringYou can pass a string and have it transformed to a valid object.>>>Semver.from_string("1.0.0")Version(1.0.0)Exporting as tupleVersions can be exported as integer tuples.>>>Semver(1,2,3).as_tuple()(1,2,3)Validating inputI recommend usingSemver.from_string()whenever possible as it includes a strict input validation.For invalid inputs, instance ofSemverExceptionis raised, which should be caught.>>>fromsemmyimportSemver,SemverException>>>try:...Semver.from_string("not-a-version")...exceptSemverExceptionase:...print(e)...Versionstringnot-a-versionisnotavalidsemanticversionComparing versionsTwo versions are ordered by comparing their major, minor, and patch numbers respectively.>>>Semver.from_string("1.2.3")==Semver(1,2,3)True>>>Semver.from_string("1.1.0")>Semver(1,0,0)True>>>Semver.from_string("0.9.0")<Semver(0,9,1)TrueYou may also want to sort a list of versions where Python's tuple ordering is helpful.>>>versions:list[Semver]=[...Semver(1,2,3),...Semver(2,0,0),...Semver(0,1,0),...]>>>>>>sorted(versions,key=lambdav:v.as_tuple(),reverse=True)[Version(2.0.0),Version(1.2.3),Version(0.1.0)]Bumping versionsTypically, you want to bump major version for breaking changes, minor version for new features, and patch version for new fixes. These are supported.>>>Semver(0,1,0).bump_major()Version(1.0.0)>>>Semver(1,0,0).bump_minor()Version(1.1.0)>>>Semver(1,1,0).bump_patch()Version(1.1.1)ContributingSeeherefor instructions.