Saravanan666/pypi-org huggingface dataset:
Package: ezds
![](resources/markovx_banner.png)### Intro ###[Markov Chains](https://en.wikipedia.org/wiki/Markov_chain) implementation <br>### Installation ###in your terminal:> pip install markovx### Examples ###Adding Chains```pythonfrom markovx.models import MarkovModelmx = MarkovModel()mx.add_one('123456')mx.add_one('qwerty')mx.add_many(['admin', 'root', 'user'])```Generating Chains```pythonmx.generate(6) # len of tokens in chain``````pythonmx.generate(6, random_init=True)# when True first token in chain would be assigned randomly# when False first token would be assigned based on observed firs tokens# default to False``````pythonmx.generate(6, smart_ending=True)# when False chain wouldn't be terminated before len(chain) == n even if model got to an end token# when True if model got to an end token while len(chain) < n chain would terminate# default to False```Ordinal Markov Chains (position dependent chains)```pythonfrom markovx.models import OrdinalMarkovModelmx = OrdinalMarkovModel()mx.add_one('123456')mx.add_one('123qwe')mx.add_many(['qwerty', 'qwe123', 'qwe123456'])mx.generate(6)```### Contact ###[Tal Peretz](https://www.linkedin.com/in/tal-per/)
Package: ezDT
ezDTsimple python functions for the datetime & time built-in packagestoday()
returns todays date in '%Y-%m-%d %H:%M:%S' formatunixToDatetime(epochTime)
convert unix epoch time to datetimedatetimeToUnix(ogDatetime)
convert datetime to unix epoch timeaddDays(ogDatetime, nDays):
add days to a datetimesubtractDays(ogDatetime, nDays):
subtract days from a datetime
Package: eze
ezeA super simple library for common tasks in python 3.No extra dependenciesrequired, you can go useeze.pyand that's it!Great for scripting something fast.You are free to copy implementations for specific functions (seeget_eze).TODO:add examples for each function, and a link to the implementation for usage outside of the lib.Usagepip install ezeimport eze as eStrings / JSON & CSVb64- base 64 encodes to a string (no bytes needed!)b64d- base 64 decodes a string/bytes- to stringb- to bytesregex- matchmatch = e.regex(r'hello (.*?)', 'hello world') # (' world', (' world'))json- json encodejsond- json decodecsv- dict/list to csvcsvd- decode a csv file/string into a dict.IOwrite- write something to a fileread- read something from a fileRuntimeeq- checks if two vars/objects/classes are the same in-memory (might be used for something else)stack- gets the stack up to here in a human-readable fashion.dir- shows all of the inherited functions of an object (no need to see__init_subclass__)break- poor man's breakpoint - will exit and print the current variables in a human-readable fashion.@timeitdecorator - prints the seconds it took to run a function.get_time- returns the seconds it took to run a function.Printing thingspp/pretty_print- pretty print objects/classes/functions.nl/new_line- create a new line string for terminal usagetbl/table- create an ascii table and print it out of lists/generators.diff- show the difference between vars/functions/classes/objects can also be colored.Importsimport_all- imports the whole directory - good for__init__.pyimport- imports a python file during runtimemodule = input('What module do you want?')
e.import(module)
# Use `module` functionsshow_loaded- shows the currently loaded modules.Webget- GET request to a URL.Concurrencytogether- run a function concurrently.def fetch_that(url):
  print(requests.get(url).text)
 
# together executes 
e.together(fetch_that, ['https://google.com', 'https://facebook.com'], {
  'tasks': 4,
  'done': done_callback
})Miscget_eze- prints out the implementation of a function here for production usage (without extra eze code).disable- disables all of velocity's functions - for production usage.
Package: ez-eda
ez-eda overviewThis library is a collection of simplified functions for visualizing dataframes quickly and easilyI started this project after needing more refined heatmaps to understanding correlationez correlation plotfrom ez_eda import ez_corr_heatmapThis function creates a cleaner seaborn-based heatmap to show correlations between numeric featuresParametersez_corr_heatmap(df: pd.DataFrame, color_min: float = None, color_max: float = None, color_center: float = 0)df: input pandas dataframecolor_min: minimum value for heatmap scale - defaults to corr() minimumcolor_max: maximum value for heatmap scale - defaults to corr() maximumcolor_center: center for heatmap color scale - defaults to midpoint between vmin and vmaxExample Correlation Heatmap Imageez 2D PCA Plotfrom ez_eda import ez_2d_pca_plotThis function creates a simplified 2D plot of the data in seaborn to show the overall structureParametersez_2d_pca_plot(df: pd.DataFrame, hue: str = None)df: input pandas dataframehue: color for scatter plot (Optional)
Package: ezedcfg
EZedCfgA basic configuration loading packageThis package’s primary purpose is to make it easier to change a programs default
configuration by loading a custom configuration file in either YAML format or
JSON Format.It does this by performing a dictionary update on a supplied default
configuration.InstallationpipinstallezedcfgUsagefrom ezedcfg import EZedCfg

default_configuration = {'item 1' : 1, 'item 2': False}
path_to_config = 'path/config.yml'

ezcfg = EZedCfg(default_configuration, path_to_config)

updated_configuration = ezcfg.load()If you intend using a json configuration file, add json to the object arguments:ezcfg = EZedCfg(default_configuration, path_to_config,'json')Free software: MIT licenseDocumentation:https://ezedcfg.readthedocs.io.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.5 (2017-09-20)0.1.4 (2017-09-20)Sundry fixes to allow Travis.ci to push a build to PyPi.0.1.3 (2017-09-20)Bugfix v2 for testing on python 3.3 and 3.4.0.1.2 (2017-09-20)Bugfix for testing on python 3.3 and 3.4.0.1.0 (2017-09-18)First release on PyPI.
Package: ezeeml
## EzeeML[![PyPI version](https://badge.fury.io/py/ezeeml.svg)](https://badge.fury.io/py/ezeeml)EzeeML is a high level library on top of popular machine learning frameworks such as
pandas, Pytorch and Tensorflow.
It gives a high layer abstraction of repetitive code used in machine learning for day-to-day data science tasks.## Installation` pip install ezeeml `or if you want to run this lib directly to have access to the examples clone this repository and run:` pip install-rrequirements.txt `to install the required dependencies.
Then install pytorch and torchvision from [here](http://pytorch.org/) if you want to use theezeeml.torchpackage and/or head over to the [Tensorflow install page](https://www.tensorflow.org/install/) if you want to
use theezeeml.tfpackage.## DocumentationFor now the library has no complete documentation but you can quickly get to know how
it works by looking at the examples in theexamples-*folders. This library is still in
alpha and few APIs may change in the future. The only things which will evolve at the same
pace as the library are the examples, they are meant to always be up to date with
the library.Few examples will generates folders/files such as saved models or tensorboard logs.
To visualize the tensorboard logs download Tensorflow’s tensorboard as well as
[Pytorch’s tensorboard](https://github.com/lanpa/tensorboard-pytorch) if you’re interested by
theezeeml.torchpackage. Then execute:` tensorboard--logdir=./tensorboard`## Packaging the project for Pypi deploy` pip install twine pip install wheel python setup.py sdist python setup.py bdist_wheel `[Create a pypi account](https://packaging.python.org/tutorials/distributing-packages/#id76) and create$HOME/.pypircwith:` [pypi] username = <username> password = <password> `Then upload the packages with:` twine upload dist/* `Or just:` pypi_deploy.sh `
Package: eze-example-plugin
IntroductionEze example plugin, provides a starter project for extending the capabilities of Eze, by adding new security tools or report types.Getting StartedEze Cli and it's sub-repos are powered by python and docker, make sure you have the latest versions installedHave you read theContributing Guide?Have you read theCode Of Conduct?Check out theexisting issuesto see if any issues you're interested in have already been raisedBuild and TestInstall Locally (via make)makeplugin-installInstall Locally (Manual via pip)rmdist/eze-example-plugin-*.tar.gz
pythonsetup.pysdist
pipinstalldist/eze-example-plugin-*.tar.gzTest installed correctlyezetoolslist
ezereporterslistContributeSeeCONTRIBUTING GUIDE
Package: ez-emoji
ez-emoji  :wave:We have some emoji data for you.  You can grab standard unicode emojis, in txt or json format above.  Also we maintain the a current set of the github markdown emojis.Fresh data  :tada:Fresh emoji data is always availabe here in the repository's root directory.FileDescriptionEZEMOJI_UNICODE.txtA simple txt file definition of each emoji.  This could easily be adapted to any language.EZEMOJI_UNICODE.jsonThis is a more detailed format using json with the structure illustrated below.EZEMOJI_GITHUB.mdThis is list of all the github markdown emojis, updated via Github's API.{"generated":1656354239,"generator_version":"0.1.3+build.83","unicode_version":"14.0","groups":["smileys_emotion","people_body","component","animals_nature"],"subgroups":{"smileys_emotion":["face-smiling","face-affection","face-tongue","face-hand"]},"emojis":{"grinning face":{"emoji":"\ud83d\ude00","name":"grinning face","annotations":["face","grin","grinning face"],"code_point_str":"1F600","subgroup":"face-smiling","group":"smileys_emotion","status":"fully qualified","version":"1.0","sentiment":"+","errors":[],}}Install your own copy  :floppy_disk:Github Actions is generating our data here via cron once a week, on Saturday night.  However, if you prefer, go ahead and usedownloader.pyto download your own emoji data whenever you desire.pythondownloader.py[optional_destination_directory]Unicode seems to release major version updates about once per year.  They also do some minor updates in between.Use  :muscle:Download and use our data, or download the entire package.  We have a few utilities as well which are a work in progress.  One is a python Log Formatter which uses emojis.  That utility also utilizes another which simply picks random emojis based on the sentiment desired.
Package: ezenum
Easy enums for Python.>>>RGB=StringEnum(['Red','Green','Blue'])>>>RGB.Red'Red'Contents1Installation2Features3Use4Contributing4.1Installing for development4.2Running the tests4.3Adding documentation5Credits1InstallationInstallezenumwith:pipinstallezenum2FeaturesPure Python.No package dependencies.Compatible with Python 3.4+.Easy creation of usefull enum objects.String enums with unified value and name attributes.3UseStringEnumEasilly get a string enum from a string list.4ContributingPackage author and current maintainer is Shay Palachy (shay.palachy@gmail.com); You are more than welcome to approach him for help.4.1Installing for developmentClone:gitclonegit@github.com:shaypal5/ezenum.gitInstall in development mode with test dependencies:cdezenumpipinstall-e".[test]"4.2Running the testsTo run the tests, use:pytestIf that doesn’t work, this should:python-mpytest--cov=ezenum4.3Adding documentationThis project is documented using thenumpy docstring conventions, which were chosen as they are perhaps the most widely-spread conventions that are both supported by common tools such as Sphinx and result in human-readable docstrings (in my personal opinion, of course). When documenting code you add to this project, please followthese conventions.Additionally, if you update thisREADME.rstfile,  usepython setup.py checkdocsto validate it compiles.5CreditsCreated by Shay Palachy (shay.palachy@gmail.com).
Package: ezephys
Easy IO, inspection, and manipulation of electrophysiological data in
Python.PhilosophyKeep things simple so you can spend your time running experiments
instead of learning a complicated API.Highlightsrectools.Recording: thinnp.ndarraywrapper with aplotmethod for visualizing recordingspltools.add_scalebar: add a set of automatically-sized scalebars
to amatplotlibplotstimtools: take your experiments beyond current steps with a
simple system for generating complicated electrophysiological stimuli
Package: ezexcel
EZ ExcelA simple class based xlsx serialization systemTable of contentsGoalsInstallationQuick-startAdditional DocumentationGoalsThis project has a few goals:Make OO projects easier to serialize to xlsxMake use of xlsx serialization and deserialization (coming soon) easierWrite the simplest to use api for xlsx serializationInstallationFrom PyPiRunpip install ezexcelorsudo pip3 install ezexcelFrom sourceClone this repo: (https://github.com/Descent098/ez-excel)Runpip install .orsudo pip3 install .in the root directoryQuick-startStore some animal instances in a spreadsheet called 'animals.xlsx'fromezexcelimportSpreadsheetclassAnimal():def__init__(self,name:str,conservation_status:str):self.name=nameself.conservation_status=conservation_statusleopard_gecko=Animal('Leopard Gecko','Least Concern')philippine_eagle=Animal('Philippine Eagle','Threatened')withSpreadsheet('animals.xlsx',Animal)asoutput_sheet:output_sheet.store(leopard_gecko,philippine_eagle)Store a list of instances into a spreadsheet called 'users.xlsx'fromezexcelimportSpreadsheetimportrandomimportstringfromdataclassesimportdataclass@dataclassclassUser():Name:strAge:intWeight:intFamily:list# Note that Iterables will be flattened to a string with newline seperatorsinstances=[]ranstring=lambda:''.join(random.choices(string.ascii_uppercase,k=10))# Generates a random 10 character stringforiinrange(1000):instances.append(User(ranstring(),random.randint(12,100),random.randint(75,400),[ranstring(),ranstring(),ranstring()]))withSpreadsheet('users.xlsx',User)asoutput_sheet:output_sheet.store(instances)Additional DocumentationAdditional documentation can be found athttps://kieranwood.ca/ezexcelFor details on how contributing to the project, please seeCONTRIBUTING.md, for details on upcoming changes seeour roadmap.For most recent changes seeCHANGELOG.md.Changelog0.1.1; September 25thFixed logo loading on PyPiBug fixesFixed loading issue with logo on PyPi0.1.0; September 25thInitial release of EZ ExcelFeaturesAbility to provide a class to instantiate a SpreadsheetAbility to pass instances in an iterable of class to Spreadsheet to be serializedAutomatically flatten Iterable attributes within instances to endline delimited stringsAdded testing suite for all existing functionalityDocumentation improvementsWrote all existing documentation :)
Package: ezfilelock
EZ File LockA simple cross-platform File LockQuick start:pipinstallezfilelockUsageUse just like builtin method open()fromezfilelockimportopenwithopen('xxx.txt','r')asf:print(f.read())Use FileLock instancefromezfilelockimportFileLockfrombuiltinimportopenwithFileLock('xxx.txt'):# do continuous things with lockwithopen('xxx.txt','w')asf:f.write('hello')withopen('xxx.txt','a')asf:f.write('world!')withopen('xxx.txt','r')asf:f.read()Read Write LockCannot Write when Reading.Cannot Read when Writing.Can Read by multiple threads at the same timefromezfilelockimportrwopenwithrwopen('xxx.txt',mode='w')asf:f.write('hello world')withrwopen('xxx.txt',mode='r')asf:print(f.read())
Package: ezfiles
ezfilesUtils to save your time on python codingLife is short we use ezutils !1. Installingpipinstallezfiles2. Using2.1 readlines:readlines(filename: str, strip_newline: bool = True)2.1.1 params:filename: the filename tobe read

strip_newline: strip the last space/newline2.1.2 return lines readed from file2.1.3 Example:lines=readlines(brother_path('cfg.txt'))print(lines)2.2 writelines:writelines(lines: List, filename, append_newline: bool = True)2.2.1 params:lines: lines tobe written
filename: file tobe written
append_newline: add a newline to each line writtend2.2.2 return NoneExample:lines=['hello','ezflines']writelines(lines,brother_path('cfg.txt'))2.3 readstr:readstr(filename: str) -> str2.3.1 params:filename: file tobe read2.3.2 return None2.4 readjson:readjson(filename: str) -> dict2.4.1 params:filename: file tobe read2.4.2 return dict from json parse3. Demo#!/usr/bin/env python3# -*- coding:utf-8 -*-importosfromezfilesimportreadlines,writelines,readstr,readjsondefbrother_path(filename):returnos.path.join(os.path.dirname(__file__),filename)defread_as_lines():lines1=readlines(brother_path('cfg.txt'))print(f"lines1:{lines1}")'''lines1:['hello', 'ezflines']'''lines2=readlines(brother_path('cfg.txt'),False)print(f"lines2:{lines2}")'''lines2:['hello\n', 'ezflines\n']'''defwrite_as_lines():lines=['hello','ezflines']writelines(lines,brother_path('cfg.txt'))'''cfg.txt:helloezflines'''writelines(lines,brother_path('cfg_oneline.txt'),False)'''cfg_oneline.txt:helloezflines'''defread_as_string():string=readstr(brother_path('cfg.txt'))print(f"read_as_string:\n{string}")defread_as_json():json_obj=readjson(brother_path('cfg.json'))print(f"read_as_json: type ={type(json_obj)}")images=json_obj["images"]forimageinimages:print(f"read_as_json: image ={image}")if__name__=="__main__":write_as_lines()read_as_lines()read_as_string()read_as_json()
Package: ezfintech
EZFintechPypi: ezfintech1. Introduction沪深股票数据数据来源包括: Netease,Sohu,StockStar数据API(ezfintech.stockData)日数据(当日、4日数据)年数据(一年的数据)周期数据(日/周/月数据)区间数据(起止日期内的数据)实时数据(未开发)多只股票合表数据(未开发)数据可视化(ezfintech.stockVisualization)K线图金叉死叉布林带数据分析(ezfintech.stockAnalysis)回归分析相关性分析股票金融相关知识(ezfintech.stockKnowledge)股票模型(ezfintech.stockAlgorithms.EZLSTM)2. 依赖包numpy,pandas,matplotlib,requests,mplfinance,pandas_datareader3. 使用方式3.1 安装python pip install ezfintech3.2 导入import ezfintech.stockData as ezdimport ezfintech.stockAnalysis as ezaimport ezfintech.stockVisualization as ezvimport ezfintech.stockKnowledge as ezkimport ezfintech.stockModels.EZLSTM as ezm3.3 使用(1) 获取股票数据日数据ezd.getStockByDay(stockCode,day="today",source="126")  
stockCode:"XXXXXXX"
day: "today" / "4d"  
source: "126"年数据ezd.getStockByYear(stockCode,year="2020",adjust="klinederc",source="126")  
stockCode:"XXXXXXX"
year: "YYYY"   
adjust: "kline" / "klinederc"    
source: "126"周期数据ezd.getStockByPeriod(stockCode,period="week",adjust="klinederc",source="126")  
stockCode:"XXXXXXX"
period: "day" / "week" / "month"  
adjust: "kline" / "klinederc"   
source: "126" / "stockstar"区间数据ezd.getStockByTwoDate(stockCode,startDate="20210301",endDate="20210308",source="sohu")  
stockCode:"XXXXXX"
startDate: "YYYYMMDD"  
endDate: "YYYYMMDD"  
source: "sohu"获取FamaFrench因子数据ezd.getFamaFrenchFactors(ffType="3factors",startDate="",endDate="")  
ffType: 3factors/5factors  
startDate: "YYYY-MM-DD"  
endDate: "YYYY-MM-DD"(2) 股票数据可视化K线图ezv.plotKLine(data,movingAvg=(3,6,9),plotType="candle",startDate="",endDate="")  
data: pd.Dataframe  
movingAvg: (X1,X2,X3) or X1    
plotType: "candle" / "line" / "renko" / "pnf"  
startDate: "YYYY-MM-DD"  
endDate: "YYYY-MM-DD"金叉死叉ezv.plotDoubleCross(data,priceType="Close",movingAvg=(5,40),startDate="",endDate="",returnData=False)  
data: pd.DataFrame with Date(index), Open/High/Low/Close/Volume(Columns)  
priceType: Close/Adj Close/Open/High/Low  
movingAvg: (period1,period2)  
startDate: "YYYY-MM-DD"   
endDate: "YYYY-MM-DD"  
returnData: True/False布林带ezv.plotBollingerBand(data,priceType="Close",n=2,movingAvg=40,startDate="",endDate="",returnData=False)  
data: pd.DataFrame with Date(index), Open/High/Low/Close/Volume(Columns)  
priceType: Close/Adj Close/Open/High/Low  
n: how many times of deviation   
movingAvg: period  # 移动平均时间  
startDate: "YYYY-MM-DD"  
endDate: "YYYY-MM-DD"  
returnData: True/False(3) 股票数据分析双股票回归分析eza.regression2Stocks(stock1,stock2,startDate="",endDate="",regressDeg=1)  
stock1/stock2: pd.DataFrame with Date(index), Open/High/Low/Close/Volume(Columns)  
startDate: "YYYY-MM-DD"  
endDate: "YYYY-MM-DD"  
regressDeg: num  # 线性回归的次方自定义OLS分析eza.OLS(X,Y)  
Y: T x 1  
X: T x N双股票相关性分析eza.correlation2Stocks(stock1,stock2,startDate="",endDate="")  
stock1/stock2: pd.DataFrame  
startDate: "YYYY-MM-DD"  
endDate: "YYYY-MM-DD"  
regressDeg: num(4) 股票知识股票知识ezk.getStockKnowledge()金融分析知识ezk.getFinanceAnalysisKnowledge()量化投资知识ezk.getQuantitativeInvestmentKnowledge()(4) 股票模型LSTMezm.EZLSTM(outputSize, returnSequence)  
outputsize: XX   # 数字  
returnSequence: False/True
Package: ezflags
A tool that makes creating command line flags super easy.Similar toargparse,
switching is no problem at all! You can even use the FlagParserExtended as if it
were a normal ArgumentParser for full integration with existing
arguments.Install with:pipinstallezflagsHere’s a simple example:# main.pyimportezflagsparser=ezflags.FlagParser()parser.add_flag('--flag','-f',value=True,help="A demo flag.")flags=parser.parse_flags()print(flags.flag)To integrate with ArgumentParser:fromezflags.extimportFlagParserExtendedparser=FlagParserExtended()parser.add_flag('--flag','-f',value=True,help="A demo flag.")parser.add_argument('--arg','-a',help="A demo argument.")args=parser.parse_args()# Flags are included, too!print(args.flag)print(args.arg)This can be invoked as such:pythonmain.py--flag# With ArgumentParser()pythonmain.py--flag--argargView the full documentationhere.SupportsSupports Python 3.6 and up.LicenseMIT license. See theLICENSEfile
for more details.
Package: ezflakehell
THE PROJECT IS ARCHIVEDForks:https://github.com/orsinium/forksIt's aFlake8wrapper to make it cool.Lint md, rst, ipynb, and more.Shareable and remote configs.Legacy-friendly: ability to get report only about new errors.Caching for much better performance.Use only specified plugins, not everything installed.Make output beautiful.pyproject.tomlsupport.Check that all required plugins are installed.Syntax highlighting in messages and code snippets.PyLintintegration.Powerful GitLab support.Codes management:Manage codes per plugin.Enable and disable plugins and codes by wildcard.Show codes for installed plugins.Show all messages and codes for a plugin.Allow codes intersection for different plugins.CompatibilityFlakeHell supports all flake8 plugins, formatters, and configs. However, FlakeHell has it's own beautiful way to configure enabled plugins and codes. So, options like--ignoreand--selectunsupported. You can have flake8 and FlakeHell in one project if you want but enabled plugins should be explicitly specified.Installationpython3-mpipinstall--userflakehellUsageFirst of all, let's createpyproject.tomlconfig:[tool.flakehell]# optionally inherit from remote config (or local if you want)base="https://raw.githubusercontent.com/life4/flakehell/master/pyproject.toml"# specify any flake8 options. For example, exclude "example.py":exclude=["example.py"]# make output niceformat="grouped"# 80 chars aren't enough in 21 centurymax_line_length=90# show line of source code in outputshow_source=true# list of plugins and rules for them[tool.flakehell.plugins]# include everything in pyflakes except F401pyflakes=["+*","-F401"]# enable only codes from S100 to S199flake8-bandit=["-*","+S1??"]# enable everything that starts from `flake8-`"flake8-*"=["+*"]# explicitly disable pluginflake8-docstrings=["-*"]Show plugins that aren't installed yet:flakehellmissedShow installed plugins, used plugins, specified rules, codes prefixes:flakehellpluginsShow codes and messages for a specific plugin:flakehellcodespyflakesRun flake8 against the code:flakehelllintThis command accepts all the same arguments as Flake8.Readflakehell.readthedocs.iofor more information.ContributingContributions are welcome! A few ideas what you can contribute:Improve documentation.Add more tests.Improve performance.Found a bug? Fix it!Made an article about FlakeHell? Great! Let's add it into theREADME.md.Don't have time to code? No worries! Just tell your friends and subscribers about the project. More users -> more contributors -> more cool features.A convenient way to run tests is usingDepHell:curl-Ldephell.org/install|python3
dephellvenvcreate--env=pytest
dephelldepsinstall--env=pytest
dephellvenvrun--env=pytestBug-tracker is disabled by-design to shift contributions from words to actions. Please, help us make the project better and don't stalk maintainers in social networks and on the street.Thank you :heart:The FlakeHell mascot (Flaky) is created by@illustrator.wayand licensed under theCC BY-SA 4.0license.