Saravanan666/pypi-org huggingface dataset:
Package: edfio
edfioedfio is a Python package for reading and writingEDFandEDF+Cfiles.It requires Python>=3.9 and NumPy>=1.22 and is available on PyPI:pip install edfioSupport for EDF and EDF+C, including annotationsFast I/O thanks to NumPy - read and write GB-sized files in secondsFail late on read: Non-compliant header fields only raise an exception when the corresponding property is accessed.Fail early on write: Trying to create a new non-compliant EDF file raises an exception.Object-oriented design and type annotations for IDE autocompletionPure Python implementation and 100% test coverage to simplify contributionsFeaturesRead/write from/to files or file-like objectsModify signal and recording headersDrop EDF+ annotationsSlice recordings (by seconds or annotation texts)Drop individual signalsAnonymize recordingsKnown limitationsDiscontiguous files (EDF+D) are treated as contiguous ones.The maximum data record size of 61440 bytes recommended by theEDF specsis not enforced.To write an EDF with a non-integer seconds duration, the data record duration has to be manually set to an appropriate value.Slicing an EDF to a timespan that is not an integer multiple of the data record duration does not work.BDF files (BioSemi) are not supported.ContributingContributions are welcome and highly appreciated.
Check out thecontributing guidelinesto get started.UsageFurther information is available in theAPI referenceandusage examples.To read an EDF from a file, useedfio.read_edf:fromedfioimportread_edfedf=read_edf("example.edf")A new EDF can be created and written to a file as follows:importnumpyasnpfromedfioimportEdf,EdfSignaledf=Edf([EdfSignal(np.random.randn(30*256),sampling_frequency=256,label="EEG Fpz"),EdfSignal(np.random.randn(30),sampling_frequency=1,label="Body Temp"),])edf.write("example.edf")
Package: edfi-sql-adapter
edfi-sql-adapterLightweight wrapper to facilitate connections to SQL databases.Developer NotesThis package is light on unit tests, because the functions are well tested from
an integration perspective. Would be nice to add unit tests for error handling
in particular, but that would mean a lot of mocking of SQLAlchemy.Legal InformationCopyright (c) 2022 Ed-Fi Alliance, LLC and contributors.Licensed under theApache License, Version
2.0(the
"License").Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.SeeNOTICESfor additional copyright and license notifications.
Package: edfpy
Introductionedfpyis a minimal python library to read and write theEuropean Data
Format(EDF).  The main aim ofedflibis the fast
and accurate handling of EEG signals stored in EDF.  The library is designed to
be able to read fromMongoDB Grid
files.InstallTo install the module enterpip install -r requirements.txt
python setup.py installDevelopment and ContributionContributions are welcome.  Please create your own fork ofedfpyand a pull
request to the master branch starting with a title '[WIP] ...' that describes
what you are working on.  We'll review the changes once you switch the title
form '[WIP]' to '[MRG]'.  Make sure to run the tests before submitting and
switching the title.  We also useSemaphoreCI.To run the tests, first install the requirements-dev.txt file usingpip install -r requirements.txt
pip install -r requirements-dev.txtThis installspytest.  Before testing the package first install.pip install -e .
make checkContributorsThe module was initially created by John C. Snyder and is now maintained by
Justus Schwabedal.LicenseThe software is released under the MIT license.
Package: edfrd
edfrdedfrd is a Python 3 software library toreadandwriteEDF files.It is designed as a low-level library, that does not interpret the EDF data whenever possible. Therefore, edfrd can
read files even if non-standard values are contained in the header.Data records are loaded asint16arrays using numpy.Installationpip3install--useredfrdReading EDF Header and Data Recordsfromedfrdimportread_header,read_data_recordsfile_path='PATH/TO/FILE.edf'header=read_header(file_path)print(header)fordata_recordinread_data_records(file_path,header):# generator# iterate through data_recordsbreakforsignalindata_record:# iterate through signal arrays of a single data_recordprint(signal.size)forsignal_header,signalinzip(header.signals,data_record):# iterate through signal headers and signal arraysprint(signal_header.label,signal.size)If the header of your EDF file does not correctly specifiy the number of data records, you can use the following option
to calculate it from the file size.header=read_header(file_path,calculate_number_of_data_records=True)You can try parsing thestartdate_of_recordingandstarttime_of_recordingas integer tuples. If parsing fails the
original string will be returned.header=read_header(file_path,parse_date_time=True)day,month,year=header.startdate_of_recordinghours,minutes,seconds=header.starttime_of_recordingThe number of data records being read can be limited by specifying an optionalstartorendindex.fordata_recordinread_data_records(file_path,header,start=0,end=header.number_of_data_records):breakTo work with larger chunks of a signal than provided by a data record, consider creating a new numpy array as abuffer.importnumpyasnpfromedfrdimportread_header,read_data_recordsfile_path='PATH/TO/FILE.edf'header=read_header(file_path)start,end=2,4signal_index=0signal_header=header.signals[signal_index]buffer_length=(end-start)*signal_header.nr_of_samples_in_each_data_recordbuffer=np.empty(buffer_length,dtype=np.int16)pointer=0fordata_recordinread_data_records(start,end):buffer[pointer:pointer+signal_header.nr_of_samples_in_each_data_record]=data_record[signal_index]pointer+=signal_header.nr_of_samples_in_each_data_recordprint(buffer)You can also pass a file descriptor (fr) instead of a string (file_path). Note thatread_data_recordswill
continue from the current byte position, whereread_headerstopped, without performing an additional seek operation.withopen(file_path,'rb')asfr:header=read_header(fr)fordata_recordinread_data_records(fr,header):breakWriting EDF Header and Data Recordsfromedfrdimportread_header,read_data_records,write_header,write_data_recordsfile_path='PATH/TO/FILE.edf'new_file_path='PATH/TO/NEW_FILE.edf'header=read_header(file_path)data_records=read_data_records(file_path,header)write_header(file_path,header)write_data_records(file_path,data_records)Again, using file descriptors (frandfw) is possible.withopen(file_path,'rb')asfr:header=read_header(fr)data_records=read_data_records(fr,header)withopen(new_file_path,'wb')asfw:write_header(fw,header)write_data_records(fw,data_records)
Package: edfrw
edfrwedfrwis a Python library for reading and writing European Data
Format (EDF) files.EDF is a format for data storage that is particularly useful for
recording biological and physical signals. The format is described in
detail on theEDF website.RequirementsPython 3(>= 3.5)A recent version ofNumPyIn addition, if you want to try the examples, you may want to installMatplotlibfor plotting the data.Installationedfrwis available onPyPI. Thus, the easiest
way to install is withpip:python -m pip install edfrwAlternatively, you can download the code fromGitHuband place it somewhere on your
Python path, or install locally withpip.LinksThe documentation is availablehere.Thesource codeis on GitHub.The code is licensed under theGNU General Public License.
Package: edftpy
eDFTpy: Embedding & Multiscale Modeling in PythonA creation of PRGeDFTpycombines Kohn-Sham Density Functional Theory (KS-DFT) and orbital-free DFT (OF-DFT) in an embedding framework, where only weak intermolecular interactions are treated at the OF-DFT level, while strong intramolecular interactions are treated at the KS-DFT level. The code is based onDFTpyandQEpywhich have also been developed byPRGatRutgers University-Newark.RequirementsPython 3.6 or laterDFTpy(latest)NumpyScipyASEOptional (highly recommended):Libxcf90wrap(latest)ManualeDFTpymanual
Package: edgar-analyzer
edgar-analyzer- Textual Analysis with EDGAR filingsedgar-analyzeris a CLI tool to download SEC filings from EDGAR and perform textual analyses.Installationpipinstalledgar-analyzerWorkflowSetupDownload index files, which contain the firm CIK, name, filing date, type, and URL of the filing.edgar-analyzerdownload_index--user_agent"MyCompany name@mycompany.com"--output"./index"Build a databaseof the previously download index files for more efficient queries.edgar-analyzerbuild_database--inputdir"./index"--database"edgar-idx.sqlite3"Download filings, only filings in the database but not downloaded yet will be downloaded. Download speed will be auto throttled as per SEC's fair use policy.edgar-analyzerdownload_filings--user_agent"MyCompany name@mycompany.com"--output"./output"--database"edgar-idx.sqlite3"--file_type"8-K"-t4Run specific jobsThese tasks can be executed once the database of filings is built.Find event date❯edgar-analyzerfind_event_date-h
usage:edgar-analyzer[OPTION]...find_event_date[-h]-ddata_directory--file_typefile_type[-dbdatabsae][-tthreads]Findeventdatefromfilingsfromheaderdata

options:-h,--helpshowthishelpmessageandexit-tthreads,--threadsthreadsnumberofprocessestouse

requirednamedarguments:-ddata_directory,--data_dirdata_directorydirectoryoffilings--file_typefile_typetypeoffiling-dbdatabsae,--databasedatabsaesqlitedatabasetostoreresultsFind reported items❯edgar-analyzerfind_reported_items-h
usage:edgar-analyzer[OPTION]...find_reported_items[-h]-ddata_directory--file_typefile_type[-dbdatabsae][-tthreads]Findreporteditemsfromfilingsfromheaderdata

options:-h,--helpshowthishelpmessageandexit-tthreads,--threadsthreadsnumberofprocessestouse

requirednamedarguments:-ddata_directory,--data_dirdata_directorydirectoryoffilings--file_typefile_typetypeoffiling-dbdatabsae,--databasedatabsaesqlitedatabasetostoreresultsmore to be integratedExampleJust a simple example of the jobfind_event_date. Based on the 1,491,368 8K filings (2004-2022), the table below shows the reporting lags (date of filing minus date of event).We can find thatmostfilings are filed on the same day as the event reported, and that over 99.99% of filings are filed within 4 calendar days (SEC requires 4 business days).Filing lag   (calendar days)FrequencyPercentageCumulative0147008998.57%98.57%1207611.39%99.97%22850.02%99.98%3890.01%99.99%4470.00%99.99%5260.00%100.00%6140.00%100.00%760.00%100.00%840.00%100.00%930.00%100.00%10 or more440.00%100.00%NoteThis tool is a work in progress and breaking changes may be expected.ContactIf you identify any issue, please feel free to contact me atmingze.gao@sydney.edu.au.
Package: edgar-doc-parser
EDGAR-DOC-PARSERDocumentationFor more information read our documentation hostedhere.Installation GuideWe are available throughpip.pip install edgar-doc-parserQuick Start GuideDataLoaderfrom edgar import DataLoader

dataloader = edgar.DataLoader(tikrs=['nflx'], document_type='8-K', data_dir='data')

for text_8k in dataloader[:3]:
  print(text_8k)Currently Support Filing Types10-Q8-KWe plan on expanding the list in future releases
Package: edgaro
Explainable imbalanceD learninG compARatOrOverviewThe usage of many balancing methods like Random Undersampling, Random Oversampling, SMOTE, NearMiss is a very popular
solution when dealing with imbalanced data. However, a question can be posed of whether these techniques can change the
model behaviour or the relationships present in data.As there are many kinds of Machine Learning models, this package provides model-agnostic tools to investigate the model
behaviour and its changes. These tools are also known as Explainable Artificial Intelligence (XAI) tools and include
techniques such as Partial Dependence Profile (PDP), Accumulated Local Effects (ALE) and Variable Importance (VI).Apart from that, the package implements novel methods to compare the explanations, which areStandard Deviation of
Distances(for PDP and ALE) and the Wilcoxon statistical test (for VI).Generally speaking, this package aims to giving a user-friendly interface to investigate whether the described
phenomena take place.The package was written in Python and consists of four modules:dataset,balancing,modelandexplain.
It provides a simple and user-friendly interface which aims to automate the process of data balancing with different
methods, training Machine Learning models and calculating PDP/ALE/VI explanations. The package can be used for one input
dataset or for a number of datasets arranged in arrays or nested arrays.TechnologiesThe package was written in Python and was checked to be compatible with Python 3.8, Python 3.9 and Python 3.10.It uses most popular libraries for Machine Learning in Python:pandas, NumPyscikit-learn, xgboostimbalanced-learndalexscipy, statsmodelsmatplotlibopenmlUser ManualUser Manual is available as a part of the documentation,hereInstallationTheedgaropackage is available onPyPIand can be installed by:pip install edgaroDocumentationThe documentation is available atadrianstando.github.io/edgaroProject purposeThis package was created for the purpose of my Engineering Thesis"The impact of data balancing on model behaviour with
Explainable Artificial Intelligence tools in imbalanced classification problems".
Package: edgar-utils
Utils for EDGAR filings______    _                    _    _ _   _ _     
 |  ____|  | |                  | |  | | | (_) |    
 | |__   __| | __ _  __ _ _ __  | |  | | |_ _| |___ 
 |  __| / _` |/ _` |/ _` | '__| | |  | | __| | / __|
 | |___| (_| | (_| | (_| | |    | |__| | |_| | \__ \
 |______\__,_|\__, |\__,_|_|     \____/ \__|_|_|___/
               __/ |                                
              |___/Setting up DEV environmentCreating Python venv$ python3 -m venv venvActivating env$ source ./venv/bin/activateEnabling PyTest in VCS. The following parameter should be set to TRUEpython.testing.pyTestEnabledRunning testsActivate venv$ source ./venv/bin/activateRun tests manually$ pytestRun tests via make$ make deveop.testGenerating documentationInstall sphinx$ pip install sphinx
Package: edge-addons-api
Edge Addons APIAn API client for publishing addons to the Edge store.Based on thePlasmHQ Edge Addons API.UsageObtain the required options for your project. These can be obtained by following theMicrosoft Edge Add-Ons API guide.Once obtained you can submit you addon like below:fromedge_addons_api.clientimportOptions,Clientoptions=Options(product_id="Your product ID",client_id="Your client ID",client_secret="Your client secret",access_token_url="Your access token URL")client=Client(options)# Upload extensionoperation_id=client.submit(file_path="/path/to/extension.zip",notes="Your upload notes")# Check publish statusclient.fetch_publish_status(operation_id)LicenseMIT
Package: edgecast
The EdgeCast CDN exposes a RESTful API for forcefully loading and purging content from your CDN hosts. Theedgecastmodule provides a simple interface for performing those actions.Furthermore, thedjango_edgecastmodule provides a convient way to configure and access an application wide API client entity through your Django settings.InstallationTo installedgecastanddjango_edgecast, do yourself a favor and don’t use anything other thanpip:$pipinstalledgecastInstallation in DjangoAfter the module has been installed, you need to adddjango_edgecastto your list ofINSTALLED_APPSin your application configuration:INSTALLED_APPS=(...'django_edgecast',)You also need to add your account number, which can be found in the upper right corner of your control panel, and your token, which can be found under your account settings, to your application configuration:EDGECAST_ACCOUNT_NUMBER='..'EDGECAST_TOKEN='..'The Edgecast client can now be easily accessed from the entire application:fromdjango_edgecastimportclient...TestingTesting requires a set of valid credentials. All tests are performed against URLs in the/_testingpath for the CDN node your select. Credentials are loaded from the environment during testing for security:EDGECAST_CDN_DOMAINCDN domain to use for tests.EDGECAST_ACCOUNT_NUMBERAccount number (visible in the upper right corner of your control panel.)EDGECAST_TOKENToken (available under your account settings in your control panel.)
Package: edge-containers-cli
edge_containers_cliEdge containers command line interface: a tool for deploying and managing
IOCs and services in a beamline or accelerator cluster.For detailed documentation on the framework that this supports see:https://epics-containers.github.io/Sourcehttps://github.com/epics-containers/edge-containers-cliPyPIpip install edge-containers-cliReleaseshttps://github.com/epics-containers/edge-containers-cli/releasesTo discover the CLI commands, create a python virtual environment,
and perform the following::pip install edge-containers-cli
ec --version
Package: edgedb
edgedb-pythonis the official EdgeDB driver for Python.
It provides both blocking IO and asyncio implementations.The library requires Python 3.8 or later.DocumentationThe project documentation can be foundhere.InstallationThe library is available on PyPI.  Usepipto install it:$ pip install edgedbBasic Usageimportdatetimeimportedgedbdefmain():client=edgedb.create_client()# Create a User object typeclient.execute('''
        CREATE TYPE User {
            CREATE REQUIRED PROPERTY name -> str;
            CREATE PROPERTY dob -> cal::local_date;
        }
    ''')# Insert a new User objectclient.query('''
        INSERT User {
            name := <str>$name,
            dob := <cal::local_date>$dob
        }
    ''',name='Bob',dob=datetime.date(1984,3,1))# Select User objects.user_set=client.query('SELECT User {name, dob} FILTER .name = <str>$name',name='Bob')# *user_set* now contains# Set{Object{name := 'Bob', dob := datetime.date(1984, 3, 1)}}# Close the client.client.close()if__name__=='__main__':main()DevelopmentInstructions for installing EdgeDB and edgedb-python locally can be found atedgedb.com/docs/reference/dev.To run the test suite, run$ python setup.py test.Licenseedgedb-python is developed and distributed under the Apache 2.0 license.
Package: edgedb-pydantic-codegen
edgedb-pydantic-codegenThis tool generates Python typesafe async code for EdgeQL queries usingPydantic V2.The generated models can be directly used with other libraries such asFastAPI.This is an alternative to thebuilt-in code generatorof the officialedgedb-pythonlibrary.Installpip3installedgedb-pydantic-codegenUsageIn an EdgeDB initialized project, simply runedgedb-pydantic-codegen<directory>All*.edgeqlfiles in<directory>and its subdirectories will be processed and the generated code saved next to them.Generated code examplefromenumimportStrEnumfromedgedbimportAsyncIOExecutorfrompydanticimportBaseModel,TypeAdapterEDGEQL_QUERY=r"""withdiscord_id := <int64>$discord_id,moecoins := <optional int32>$moecoins,blood_shards := <optional int32>$blood_shards,updated := (update waicolle::Playerfilter .client = global client and .user.discord_id = discord_idset {moecoins := .moecoins + (moecoins ?? 0),blood_shards := .blood_shards + (blood_shards ?? 0),})select updated {game_mode,moecoins,blood_shards,user: {discord_id,discord_id_str,},}"""classWaicolleGameMode(StrEnum):WAIFU="WAIFU"HUSBANDO="HUSBANDO"ALL="ALL"classPlayerAddCoinsResultUser(BaseModel):discord_id:intdiscord_id_str:strclassPlayerAddCoinsResult(BaseModel):game_mode:WaicolleGameModemoecoins:intblood_shards:intuser:PlayerAddCoinsResultUseradapter=TypeAdapter(PlayerAddCoinsResult|None)asyncdefplayer_add_coins(executor:AsyncIOExecutor,*,discord_id:int,moecoins:int|None=None,blood_shards:int|None=None,)->PlayerAddCoinsResult|None:resp=awaitexecutor.query_single_json(EDGEQL_QUERY,discord_id=discord_id,moecoins=moecoins,blood_shards=blood_shards,)returnadapter.validate_json(resp,strict=False)
Package: edge-distance-aabb
Fast point-to-edge distancesComputes the distance and closest point from a set of points to a set of line segments relatively efficiently. The code is fast because:It is written in C++ (as a header-only library). It is exposed to Python with Cython.It uses axis-aligned bounding boxes for culling or in a hierarchy.ExampleThe Python function signatures are:def SlowDistances( Real[:,::1] P, Real[:,::1] Points, Index[:,::1] LineSegments ):
def AABBDistances( Real[:,::1] P, Real[:,::1] Points, Index[:,::1] LineSegments ):
def AABBTreeDistances( Real[:,::1] P, Real[:,::1] Points, Index[:,::1] LineSegments ):
    '''
    Given:
        P: An N-by-2 array of (2D) points whose distance to query.
        Points: A K-by-2 array of (2D) points involved in the line segments.
        LineSegments: An E-by-2 array of pairs of indices into `Points`, one for each line segment.
    Returns:
        A length-N array of distances, one for each point in `P`, from that point to the line segments.
        A length-N array of closest points, one for each point in `P`, from that point to the line segments.
    '''For example:import edge_distance_aabb

## Create some edges
Points = np.array( [ [ 0, 0 ], [ 1, 1 ], [ 2, 0 ] ], float )
LineSegments = np.array( [ [ 0, 1 ], [ 1, 2 ] ] )
print( "Points:", Points )
print( "LineSegments:", LineSegments )

## We want the distance to the following points
P = np.array( [ [ 0, 0 ], [ 0, 1 ], [ 1, 0 ], [ 2, 1 ], [ 2, 0 ] ], float )
print( "P:", P )

## Compute distances and closest points using AABB to cull edges.
distances, closest_points = edge_distance_aabb.AABBDistances( P, Points, LineSegments )
print( "distances (should be: 0, √2/2, √2/2, √2/2, 0):", distances )
print( "closest_points (should be: (0,0), (½,½), (½ or 1½,½), (1½,½), (2,0) ):", closest_points )InstallationFrom PyPI:pip install edge_distance_aabbFrom GitHub:pip install git+https://github.com/yig/edge_distance_aabb.gitBy copyingedge_distance_aabb.pyxandedge_distance_aabb.hinto your directory and runningcythonize --build edge_distance_aabb.pyx.DependenciesnumpyandCythonDistributionpython3 -m build
twine upload dist/*
Package: edgedriver-autoinstaller
edgedriver-autoinstallerAutomatically download and installedgedriverthat supports the currently installed version of edge. This installer supports Linux, MacOS and Windows operating systems.Installationpipinstalledgedriver-autoinstallerUsageJust typeimport edgedriver_autoinstallerin the module you want to use edgedriver.Examplefrom selenium import webdriver
import edgedriver_autoinstaller


edgedriver_autoinstaller.install()  # Check if the current version of edgedriver exists
                                      # and if it doesn't exist, download it automatically,
                                      # then add edgedriver to path

driver = webdriver.Edge(executable_path="msedgedriver.exe")
driver.get("http://www.python.org")
assert "Python" in driver.titleNoteForked from:python-chromedriver-autoinstallerMost of the work has been done byyeongbin-jo, i only adapted it for Edge.