Saravanan666/pypi-org huggingface dataset:
Package: fencepy
Standardized fencing off of python virtual environments on a per-project
basis. The idea is to take a directory as an input and create and manage
a python virtual environment in a known location.Master on LinuxMaster on WindowsThis has proven to be an unstable build environment. Keeping it here for
ease of checking up on the status manually.How does it work?fencepyis fairly simple. After parsing arguments, it calls out to the
correct copy ofvirtualenv(based on the location of the running python
interpreter) with a pre-generated base directory. Upon successful creation
of the virtual environment, it applies various modifications based on the
contents of the directory from which it was run.Opinionated hooksThe goal is to make this framework attractive to users of other
compatible products. For instance, as a user of git and sublime text, I
added functionality related to those.gitIf the directory provided as input (defaults to cwd) is part of a git
repository, the virtual environment created will be relative to the root
of that repository.sublime textThe sublime linter plugin is very easy to configure. Pointing it to a
particular installation of python is as simple as putting some json into
a configuration file. If there is a.sublime-projectfile in the
input directory, then it will be configured to respect the virtual
environment that is being created.requirements.txtAs a helpful shortcut, if there is arequirements.txtfile in the
input directory, then those requirements will be installed upon
virtualenv creation.oh-my-zshIf you useoh-my-zsh, when you set up your first fencepy environment, it will
configure some shortcuts for you:fpadd -> fencepy create
fpnew -> fencepy create
fpsrc -> . `fencepy activate`
fpup  -> fencepy update
fpdel -> fencepy eraseUsagefencepy create: Create a new virtual environment. `fencepy activate`: Activate the virtual environment in a bash-like shellsource (fencepy activate): Activate the virtual environment in fish shell. $(fencepy activate): Activate the virtual environment in windows powershellfencepy update: Re-run all plugins on an existing fencepyfencepy erase: Remove the virtual environmentfencepy nuke: Remove all of fencepy’s virtual environments (for the obsessive cleaners out there)fencepy genconfig: Create a config file with defaults in fencepy’s root directoryfencepy help: Get help on these and other optional argumentsAdditional notesPython versionsBoth python 2 and 3 are supported. Additionally, both can be used for
one project, as they will be stored in separate directories.Cross-platform supportBoth Windows and UNIX shells are supported! I have not yet figured out how
to activate in one command from within CMD.exe. If anyone knows the solution,
please let me know!Extending fencepyAdditional functionality should be very easy to implement. Each of the hooks
mentioned above is implemented as a “plugin” that takes the full dict of parsed
arguments as input. Additionally, inverse cleanup methods are planned for the
future.Alternativesvirtualenvwrapper
Package: fencer
FencerAutomated API security testing tool.DO NOT run this against production!!Fencer is an automated API security testing tool. It's an experimental project to see how much of the API
security testing process can be automated. I believe that API security testing requires a holistic approach.
An API is part of a bigger system, and the security configuration of the whole system affects the security of
the API. However, it's also true that many security tests on APIs are easy to formalize and hence automate. The
goal of this project is to capture all those formal test cases.The starting point is theOWASP Top 10 API Security Threatschecklist. The goal is to create automated tests for each of those threats. Once we've covered OWASP, the goal
is to move beyond the checklist and add more tests for all sorts of common API security vulnerabilities. If you
have suggestions about cases that should be covered and don't appear in the OWASP checklist, please raise an issue!Use fencer responsibly. I suggest running fencer against development environments, or even better, against
ephemeral environments in which you can do no harm to your systems. I'd generally advise against running fencer
directly against production.LimitationsFencer is still pretty much work in progress. I'm adding new features every day, but there's still a long way to go.
I very much welcome contributions to make progress faster. At the moment, these are the most important limitations:Only works with Python 3.10 and upwards for nowOnly works with API specifications available as local files in JSON or YAMLOnly works with OpenAPI 3.X.X and probably has missing featuresA lot of tests are missing, e.g. noSQL injection, command injection, JWT tests, and so on. I'll include them as
soon as I can.The CLI is super simple at the moment but will soon get better.Failing tests are stored under a folder named.fencer/relative to the directory from which you run the tool.
As soon as I can, I'll add commands to work with those tests and be able to visualise them and storage will be
optional too.RequirementsPython 3.10+InstallationTo install fencer, run the following command:$pipinstall-UfencerRunning fencerAfter installation, you can run fencer directly from the command line. The basic test suite runs like this:$fencer--oas-file<path_to_openapi_spec>--base-url<base_url>Replace<path_to_openapi_spec>with the path to the OpenAPI specification for your API in your local machine.
It only works with JSON specs at the moment. Replace also<base_url>with the base URL of the server you want
to test against.For example:$fencerrun--oas-fileopenapi.json--base-urlhttp://localhost:5000ContributingClone the repository and install it locally by running:$pipenvinstall-e.I'm just getting started with this project, and I could use some help! I'll be uploading a contribution guideline
in the coming days, but if you have suggestions in the meantime, please raise an issue and let's have a chat!
Package: fences
FencesFences is a python tool which lets you create test data based on schemas.For this, it generates a set ofvalid sampleswhich fullfil your schema.
Additionally, it generates a set ofinvalid sampleswhich intentionally violate your schema.
You can then feed these samples into your software to test.
If your software is implemented correctly, it must accept all valid samples and reject all invalid ones.Unlike other similar tools, fences generate samples systematically instead of randomly.
This way, the valid / invalid samples systematically cover all boundaries of your input schema (like placingfences, hence the name).InstallationUse pip to install Fences:python -m pip install fencesFences is a self contained library without any external dependencies.
It usesLarkfor regex parsing, but in the standalone version where a python file is generated from the grammar beforehand (Mozilla Public License, v. 2.0).UsageGenerate samples for regular expressions:fromfencesimportparse_regexgraph=parse_regex("a+(c+)b{3,7}")foriingraph.generate_paths():sample=graph.execute(i.path)print("Valid:"ifi.is_validelse"Invalid:")print(sample)Generate samples for json schema:fromfencesimportparse_json_schemaimportjsongraph=parse_json_schema({'properties':{'foo':{'type':'string'},'bar':{'type':'boolean'}}})foriingraph.generate_paths():sample=graph.execute(i.path)print("Valid:"ifi.is_validelse"Invalid:")print(json.dumps(sample,indent=4))Generate samples for XML schema:fromfencesimportparse_xml_schemafromxml.etreeimportElementTreefromxml.domimportminidomet=ElementTree.fromstring("""<?xml version="1.0" encoding="UTF-8" ?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name = 'class'><xs:complexType><xs:sequence><xs:element name = 'student' type = 'StudentType' minOccurs = '0' maxOccurs = 'unbounded' /></xs:sequence></xs:complexType></xs:element><xs:complexType name = "StudentType"><xs:sequence><xs:element name = "firstname" type = "xs:string"/><xs:element name = "lastname" type = "xs:string"/><xs:element name = "nickname" type = "xs:string"/><xs:element name = "marks" type = "xs:positiveInteger"/></xs:sequence><xs:attribute name = 'rollno' type = 'xs:positiveInteger'/></xs:complexType></xs:schema>""")graph=parse_xml_schema(et)foriingraph.generate_paths():sample=graph.execute(i.path)s=ElementTree.tostring(sample.getroot())print("Valid:"ifi.is_validelse"Invalid:")print(minidom.parseString(s).toprettyxml(indent="   "))Real-World ExamplesFind some real-world examples in theexamplesfolder.LimitationsGeneral:Fences does not check if your schema is syntactically correct.
Fences is designed to be as permissive as possible when parsing a schema but will complain if there is an aspect it does not understand.For XML:Python's default XML implementationxml.etree.ElementTreehas a very poor support for namespaces (https://docs.python.org/3/library/xml.etree.elementtree.html#parsing-xml-with-namespaces).
This might lead to problems when using thetargetNamespaceattribute in your XML schema.
Package: fenci
fenci中文分词模块：继承了jieba分词的基本算法逻辑，进行了全方位的代码优化，还额外提供了HMM算法的训练功能支持。设计数据存储格式不使用marshal，这并不规范，也不使用pickle，在某些情况下确实使用pickle是必要的，但至少在这里数据格式还没必要上pickle。而是使用更通用和更安全的json数据存储格式。模型数据就存放在\AppData\Local\Temp里面的fenci.cache，其就是一个json文件。读写速度模型文件未建立需要1秒多，模型文件建立正常读写文件需要0.3秒多，值得一提的是本程序经过优化只要你一直调用s=Segment()同一对象，则读取模型只会读取一次，也就是后面多次cut则前面的0.3秒加载时间几乎可以忽略笔记。USAGElcut or cutfrom fenci.segment import Segment
segment = Segment()
res = segment.lcut("这是一段测试文字。")load_userdictfrom fenci.segment import Segment
s = Segment()
s.load_userdict('tests/test_dict.txt')training指定root和regexp来搜索指定文件夹下的文本，其中的文本格式如下：’  我  扔  了  两颗  手榴弹  ，  他  一下子  出  溜  下去  。即该分词的地方空格即可。def training(self, root=None, regexp=None):
        """
        根据已经分好词的内容来训练
        :param root:
        :param regexp:
        :return:
        """注意training之后词典库还只是on-fly模式，要保存到模型需要调用方法save_modeltraining_hmm训练HMM模型，如果设置update_dict=True,则语料库的词语数据也会刷入进来。def training_hmm(self, root=None, regexp=None, update_dict=False):save_model所有on-fly的词库都导入到模型里面def save_model(self, save_hmm=False):add_worddef add_word(self, word, freq=1):tokenize 和 lcut给nltk调用提供的接口hmm_segment默认内部构建的hmm分词器self.hmm_segment = HMMSegment(traning_root=traning_root,
                                  traning_regexp=traning_regexp,
                                  cache_file=self.cache_file)HMMSegmenttraining指定root和regexp来搜索指定文件夹下的文本，其中的文本格式如下：’  我  扔  了  两颗  手榴弹  ，  他  一下子  出  溜  下去  。即该分词的地方空格即可。def training(self, root=None, regexp=None, training_mode='update'):提供了两种训练模式 update 和 replace 。update模式将在原有HMM训练数据基础上继续训练，注意训练之后的模型数据仍是on-fly的。保存需要调用save_model方法。save_model将hmm_segment分词器的模型保存下来。self.hmm_segment.save_model()CHANGELOG0.3.2移除原线程锁，使用文件锁，多进程多线程对于模型的共用问题都能很好地解决。0.3.1更安全的文件写方式0.3.0一番整理，现在本模块不再依赖其他模块。0.2.2使用简化版本的simple_nltk。0.2.0彻底脱离原jieba分词项目结构，整体重新设计。0.1.2加入HMM训练，重新训练数据，原字典数据较小。
Package: f-encrypt
f-encryptA simple tool to encrypt and decrypt files from the command-line.Currently only AES-256 in CBC mode is supported.General UsageSetting the KeyThe key can also be defined using the environment variableF_ENCRYPT_KEY# Option 1: enter your key with an optionf-encrypt<file>--key<key># Option 2: Prompt for passwordf-encrypt<file>
EnterKey:<key># Decrypting uses the same --key and env-var setupf-decrypt<file>Setting the output filef-encrypt<path>-o<newpath>
f-encrypt<path>--output<newpath>
f-decrypt<path>-o<newpath>ConfigurationThe following environment variables are supported to further configure the tool.
The shown values are their defaults.exportF_ENCRYPT_KEY=example# Set the encryption key so --key is not neededexportF_ENCRYPT_SILENT=true# Enable Silent mode - do not confirm or print anythingexportF_ENCRYPT_VERBOSITY=1# Set the level of verbosity for output text (1 to 5)exportF_ENCRYPT_OUTPUT_SUFFIX=".ct"# When -o is not used, output to <path><suffix>exportF_ENCRYPT_RM=false# Override --keep/--rm when set to "true", to rm source fileInstallationFrom sourcevirtualenv--python=python3env/sourceenv/bin/activate
pipinstall.
Package: fenerbahce
Fenerbahcefenerbahce is a command line tool to fetch information regarding past and future games of Fenerbahçe's Professional Football TeamInstallationInstall with pip:pip install fenerbahceCommandsfenerbahce next-> Fetches next match informationfenerbahce last-> Fetches last match informationDependenciesfenerbahce depends on the following packages:BeautifulSoup4lxmlclickclick-help-colorsrequestspytestcoverage.pyRunning locallyThe project is built by using poetry and Python3. So to be able to run this project locally, make sure you have a running Python3 instance and a working poetry distribution.In order to run the project locally, after cloning the repository, use the command:poetry run fenerbahceCommands described above can also be executed, but with little caveats:poetry run fenerbahce next-> Fetches next match informationpoetry run fenerbahce last-> Fetches last match informationTestingTo run tests, run the command:poetry run pytestTo calculate coverage, run these commands consecutively:poetry run coverage run -m pytest
poetry run coverage reportAlternatively, an HTML report can also be generated:poetry run coverage run -m pytest
poetry run coverage htmlFuture IdeasColourful messagesLive scores
Package: feng-big
韩灵稚打包测试Hanlingzhi's Package PyPi Demo
##工程结构说明.
├── LICENSE.txt    	// 证书文件
├── README.md		// MD文件
├── hanlingzhi
│   ├── __init__.py
│   └── math_h.py
├── setup.py			// 打包配置
└── string_h
    ├── __init__.py
    └── reverse.py##测试服务器打包流程升级setuptools和wheel包python3 -m pip install --user --upgrade setuptools wheel打包到本地文件python3 setup.py sdist bdist_wheel
会生成build、dist、hanlingzhi_test.egg-info文件，其中dist文件就是制品
├── dist
│   ├── hanlingzhi-test-0.0.1.tar.gz
│   └── hanlingzhi_test-0.0.1-py3-none-any.whl分发到PyPi私服(pypi提供的测试版 test.pypi.org)，首先安装twinepip3 install twine
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Uploading distributions to https://test.pypi.org/legacy/
Enter your username: hanlingzhi  // 私服注册的用户名
Enter your password:                 // 私服注册的密码
Uploading hanlingzhi_test-0.0.1-py3-none-any.whl
100%|████| 7.96k/7.96k [00:16<00:00, 486B/s]
Uploading hanlingzhi-test-0.0.1.tar.gz
100%|████| 7.28k/7.28k [00:01<00:00, 4.34kB/s]下载依赖最好在虚拟环境下测试  python3 -m venv venv
python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps hanlingzhi_test
Looking in indexes: https://test.pypi.org/simple/
Collecting hanlingzhi_test
  Downloading https://test-files.pythonhosted.org/packages/a7/ca/3e5ecda3c564a721642a756e31ec2f6f340067cfa4dddb119e2eb2c98dd0/hanlingzhi_test-0.0.1-py3-none-any.whl
Installing collected packages: hanlingzhi-test
Successfully installed hanlingzhi-test-0.0.1测试python3
>>> from hanlingzhi import math_h
>>> math_h.addition(3,4)
7			// 成功上传正式服务python3 -m twine upload --repository-url https://upload.pypi.org/legacy/  dist/*
Package: fengluB
Fenglu's Utils for Python如何使用$ pip3 install fengluB在py文件中引入from fengluU import n2u调用n2u.number2upper(123456789)n2u number2upper将输入的数字按照中文的书写方式返回(支持的数字长度是65536位数字)例如：传入：123456789传出：一亿二千三百四十五万六千七百八十九算法如下：算法采用的是上数法，数穷则变，即：万万曰亿，亿亿曰兆，兆兆曰京...数字从右往左数，可以获取到每个数字的编号，起始编号为0用该位数字编号和4取模,若有余，余1为十，余2为百，余3为千若整除，则用该位数字编号与4整除，若结果为奇数，则该位单位为万若结果为偶数::  先判断该结果是否是2的整数次方,若是，该位单位是CN_UNIT[次方]：若不是:从亿位开始作为检测标记位，用结果和(2^检测标记位下标)取余若能整除，并且商为奇数则单位是CN_INIT[标记检测位下标]否则标记检测位+1另外，我这个方法支持的数字真的非常大，我可以不判断数字长度吗？
每添加一个更大的单位在上面的CN_UNIT列表的最后面，您就可以将当前的长度扩充一倍添加方法:n2u.append_unit('更大的单位')参数：:param num: int 一个整型数字返回值:return: 返回数字的中文书写方式用法fromfengluUimportn2uprint(n2u(123456789))$一亿二千三百四十五万六千七百八十九rmb2u rmb2upper将输入的数字按照人民币大写的书写方式返回(支持16位)例如：
123456789壹亿贰仟叁佰肆拾伍万陆仟柒佰捌拾玖元整参数:param num: str 人民币小写金额返回值:return: 返回人民币大写的形式用法fromfengluUimportrmb2uprint(rmb2u('1234567.89'))$壹佰贰拾叁万肆仟伍佰陆拾柒元捌角玖分MySQLHelperMySQLHelper MySQL工具类，便于数据库连接池及连接的管理和增删改查MySQL AlterMySQLAlter MYSQL对比表不同工具类，便于比较不同环境的数据库表，并生成改表语句
Package: fengyong
IntroductionMIPS-Simulator runs MIPS32 programs. Unlike real simulator, which
assembles the instructions into machine code and executes them,
MIPS-Simulator just parse the instructions and runs them using python
code. In other words, MIPS-simulator actually interprets mips
instructions.NoteThis project is in its early stage, which means some functions may
not supported yet.InstallWith pip :pip3 install fengyongWith src : Clone or fork this project, then build it withpython3 setup.py installUsageShellAfter install, you can run a mips shell withmips-shellcommand.AssemblefromfengyongimportAssemblerinstructions="""
j 10000
add $s0,$a1,$t7
sw $s1,10($s2)"""machine_code=Assembler.encode(instructions)print(machine_code.bin)print(machine_code.value_base(16))DisAssemblefromfengyongimportDisAssemblerfromfengyongimportRegDatamachine_code=RegData("0x8002710af820ae51000a")instructions=DisAssembler.decode(machine_code)print(instructions)Simulate - RUN!fromfengyongimportSimulator# Run mips instruction in lineSimulator.run_line("addi $s0, $s1, 10")# Run asm fileSimulator.run_file("../test/drings.asm")Simulate - DebugfromfengyongimportRegistersfromfengyongimportRegData# Set the register dataRegisters.reg_set("$s0",RegData(100))# Get the register datares=Registers.reg_get("$s0")# print all the "s" registersRegisters.print("s")# print all registersRegisters.print()ExampleSample1ContributingReadCONTRIBUTINGfor more information.
Package: fenics
Author-email:fenics-dev@googlegroups.comMaintainer-email:fenics-dev@googlegroups.comLicense: LGPL version 3 or later
Description: UNKNOWN
Platform: Windows
Platform: Linux
Platform: Solaris
Platform: Mac OS-X
Platform: Unix
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Package: fenics-basix
BasixBasix is a finite element definition and tabulation runtime library.
Basix allows users to:evaluate finite element basis functions and their derivatives at a set
of points;access geometric and topological information about reference cells;apply push forward and pull back operations to map data between a
reference cell and a physical cell;permute and transform DOFs to allow higher-order elements to be use on
arbitrary meshes; andinterpolate into a finite element space and between finite element
spaces.Basix includes a range of built-in elements, and also allows the user to define
their own custom elements.Basix is one of the components of FEniCSx, alongsideUFL,FFCx, andDOLFINx.Installing BasixTo install the latest stable version of Basix frompypi.org:pip install fenics-basixWe currently build binary wheels for Linux and macOS x86-64 architectures.To install themain(development) branch of Basix:pip install git+https://github.com/FEniCS/basix.gitFor advanced installation instructions see the detailedinstall
instructionsDocumentationDocumentation of Basix can be found athttps://docs.fenicsproject.org/basix/main/.SupportIf you find a bug in Basix, you can report it on theGitHub issue tracker.Questions about using Basix can be asked on theFEniCS discourse group.ContributingInformation about how to contribute to Basix can be foundhere.Supported elementsIntervalIn Basix, the sub-entities of the reference interval are numbered as
follows:The following elements are supported on an interval:LagrangeBubbleSerendipityHermiteisoTriangleIn Basix, the sub-entities of the reference triangle are numbered as
follows:The following elements are supported on a triangle:LagrangeNédélec first kindRaviart-ThomasNédélec second kindBrezzi-Douglas-MariniReggeHellan-Herrmann-JohnsonCrouzeix-RaviartBubbleHermiteisoQuadrilateralIn Basix, the sub-entities of the reference quadrilateral are numbered
as follows:The following elements are supported on a quadrilateral:LagrangeNédélec first kindRaviart-ThomasNédélec second kindBrezzi-Douglas-MariniBubbleDPCSerendipityisoTetrahedronIn Basix, the sub-entities of the reference tetrahedron are numbered as
follows:The following elements are supported on a tetrahedron:LagrangeNédélec first kindRaviart-ThomasNédélec second kindBrezzi-Douglas-MariniReggeCrouzeix-RaviartBubbleHermiteisoHexahedronIn Basix, the sub-entities of the reference hexahedron are numbered as
follows:The following elements are supported on a hexahedron:LagrangeNédélec first kindRaviart-ThomasNédélec second kindBrezzi-Douglas-MariniBubbleDPCSerendipityisoPrismIn Basix, the sub-entities of the reference prism are numbered as
follows:The following elements are supported on a prism:LagrangePyramidIn Basix, the sub-entities of the reference pyramid are numbered as
follows:The following elements are supported on a pyramid:Lagrange
Package: fenics-beat
fenics-beatA simplified version ofcbcbeatfor running cardiac electrophysiology simulations.Source code:https://github.com/finsberg/fenics-beatDocumentation:https://finsberv.github.io/fenics-beatInstallYou can install the library with pippython3 -m pip install fenics-beatGetting startedTBWLicenseMITNeed help or having issuesPlease submit anissue
Package: fenics-ffc
Martin Sandve Alnæs, Hans Petter Langtangen, Kent-Andre Mardal,
Ola Skavhaug, et al.Author-email:fenics-dev@googlegroups.comMaintainer-email:fenics-dev@googlegroups.comLicense: LGPL version 3 or later
Download-URL:https://bitbucket.org/fenics-project/ffc/downloads/fenics-ffc-2019.1.0.post0.tar.gzDescription: UNKNOWN
Platform: Windows
Platform: Linux
Platform: Solaris
Platform: Mac OS-X
Platform: Unix
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Code Generators