Saravanan666/pypi-org huggingface dataset:
Package: ref2tex
ref2tex: Covert Inline Citations to Latex Cite CommandIntroductionConverting inline citations in a Word document to Latex is not an easy task. Even if you have all the references in bibtex, you still need to replace each citation, which requires searching for each reference in the list of bibliography then finding that reference's bibtex entry and getting its key, then finally replacing the citation i.e. [1] to \cite{bibkey}.This repository contains the code of ref2tex package that automatically  converts inline citations (e.g. [1] or (Sahraoui et al. 2023)) to latex cite command (e.g. \cite{refkey2023}).Input:File that contains original text with inline citations (.txt or .tex,NOTin .doc or .docx)Text file that contains list of references (bibliography)Bibtex file that contains all bib entries of the references listed in bibliography fileOutput:
The original text where inline citations are replaced with \cite commandsSupported stylesThe following styles are supported:APA (which uses (AuthorName Year) format)IEEE (which uses ([number]) format)If your source documents is in difference style, converting it to APA or IEEE styles should be straightforward using reference management software such as Mendeley or Endnote.UsageYou can directly run the script corresponding to the source citation style, for example, if the source document is using APA style:python ieee2tex.py -i sourceFile -r refsFile -b bibtexFile [-o OutputFile]

-i input file that contains orginal text with inline citations (e.g. [1] for IEEE or (Sahraoui et al. 2023) for APA)
-r txt file that contains a list of references (bibliography)
-b bib file that contains all bib entries of the references listed in bibliography file
-o [optional] the output tex file that will contain the converted inline citations (e.g. \cite{keyX2023}). If not specified, the output file is named output_cited.texExample:python ieee2tex.py -i myFile.tex -r myRefs.txt -b mybib.bibInstalationpip install ref2teximport ref2tex.ieee2tex as ieee2tex
ieee2tex.ieee2tex('inputRefs.txt','inputFile.tex','bibFile.bib','my_out_file.tex')Ongoing improvementsbibtex entry generation, in case it is missing in the provided bibtex library.Deep learning based reference identification (author,year,journal/conference ...etc.) rather than parsingprovide a web-based service for online citation convertingLicenceLicensed under the MIT license.
Package: refac
refacA tool for moving and refactoring python code. It supports moving files or entire directories (refac file). Also supports moving specific symbols inside a file (refac symbol) or specific imports (refac import).Quickstartpipinstallrefac
refacfile/path/to/src.py/path/to/dst.pyand add the following to your.libcst.codemod.yamlat the root of your project:modules:-"refac.visitors"usage:refac[file|symbol|import]<src><dst>examples:refacfile/path/to/src.py/path/to/dst.pyrefacsymbolpath.to.SrcClasspath.to.DstClassrefacsymbolpath.to.src_func1,path.to.src_func2path.to.dst_func1,path.to.dst_func2refacimportpath.to.src_importpath.to.dst_importContributingContributions are welcomed and appreciated. Check out ARCHITECTURE.md for an overview of the codebase.To run tests:# Must be using Python >3.9python-mpipinstall-rrequirements.txt
python-munittesttests/**/*.pyPlease file GitHub issues for any bugs.
Package: refaclass
refa-classSingle Responsibility PrinciplecheckerDescriptionThis library detects classes in your source code that may violate the Single Responsibility Principle. If a method does not exist in a class, that class is ignored.Getting StartedNoticeThe first run will take some time as the model needs to be downloaded.Installingrefa-class can be installed using pip:pip install refaclasslocal environmentIf you want to run the code locally, or change or modify it, you can install from the repo directly:git clone https://github.com/hirokazuniimoto/refa-class.git  
cd refa-class  
pip install -r requirements.txt
pip install -r requirements.dev.txtrun in local environmentpython3 -m refaclass.main

The following arguments are optional:
-d --dir            directory path
-o --output         output [terminal csv]
-t --threshold      cosine similarity threshold between [method and method] [class and method] (detects below threshold) default: 0.5you can useVisual Studio Code Dev Containers extensionto create containerExecuting programyou can check pythonclassjust like this:cd [project]
refaclass

The following arguments are optional:
  -d --dir            directory path
  -o --output         output [terminal csv]
  -t --threshold      cosine similarity threshold between [method and method] [class and method] (detects below threshold) default: 0.5ResultOKClasses that are not considered to violate the Single Responsibility PrincipleNGClasses considered to violate the Single Responsibility PrincipleShow detected methodsTestrun testpython -m unittest discover testsmeasure coveragepython -m coverage run -m unittest discover tests
python -m coverage report -mSetting FileThis project utilizes configuration filesrefaclass.inito customize its behavior and settings. Configuration files play a crucial role in tailoring the application to your specific needs.File Location: The configuration files arelocated at the root of the project.Configuration Sectionsrefaclass-[class name]refaclass-[file name]refaclass-[directory name]you can also use regular expressionsConfiguration Parametersignore_checks: if set toTrue,  ignore file or class specified in that sectionis_file: if set toTruethen the content of the section is considered a file (if set toFalseor nois_fileparameters then class)is_dir: if set toTruethen the content of the section is considered a directory (if set toFalseor nois_fileparameters then class)Example[refaclass-test_.*.py]
is_file = True
ignore_checks = True

[refaclass-Test.*]
ignore_checks = True

[refaclass-tests/test_core.*]
is_dir = True
ignore_checks = TrueAuthorHirokazu NiimotoVersion History1.5.1GitHubPyPI2.2.1GitHubPyPILicenseThis project is licensed under the MIT License - see the LICENSE file for detailsReference paperDesign Principles and Design Patterns機械学習を用いたメソッド抽出リファクタリングの推薦手法自然言語処理を用いたデータベーススキーマの再構成支援ツールの開発
Package: refactor
RefactorSimple, hassle-free, dependency-free, AST based fragmental source code refactoring
and transformation toolkit.Why?Our framework is primarily built on the principle of "simple but effective
transformations". We focus on refactorings that target a small span of
source code, and work our way out from it. What this enables for us is
being able to operate directly on a single format for both analyses and
transformations. This is what we shine at compared to other similar tools.How?Let's not get into too much details, but just to give a sneak peek we
can try to write a rule that would replace the identifierplaceholderwith42.importastfromrefactorimportRule,Replace,run# Each refactor transformer inherits from "refactor.Rule"classFillPlaceholders(Rule):# And each rule implements a "match()" method, which would# receive every node in the tree in a breadth-first order.defmatch(self,node:ast.AST)->Replace:# This is where things get interesting. Instead of just writing# filters with if statements, you can use the following assert# based approach (a contract of transformation).# For this case, our contract is going to be: if the given node# is an identifier with the name of "placeholder", it will be# replaced with literal "42".assertisinstance(node,ast.Name)assertnode.id=="placeholder"# And this is where we choose what action we are taking for the# given node (which we have verified with our contract). There# are multiple transformation actions, but in this case what we# need is something that replaces a node with another one.replacement=ast.Constant(42)returnReplace(node,replacement)if__name__=="__main__":# And finally in here, we just use the default CLI that comes# bundled with refactor. When provided with a bunch of rules,# it creates a simple interface that can process given files# show the diff for changes and even apply them.run(rules=[FillPlaceholders])If we run the rule above on a file, we can see how it performs:--- test_file.py+++ test_file.py@@ -1,11 +1,11 @@def main():-    print(placeholder * 3 + 2)+    print(42 * 3 + 2)-    print(2 +               placeholder      + 3)+    print(2 +               42      + 3)# some comments-    placeholder # maybe other comments+    42 # maybe other commentsif something:other_thing-    print(placeholder)+    print(42)if __name__ == "__main__":main()For learning more, check ourdocumentationout!
Package: refactordoc
[![Build Status](https://travis-ci.org/enthought/refactordoc.svg?branch=master)](https://travis-ci.org/enthought/refactordoc)
[![Coverage Status](https://img.shields.io/coveralls/enthought/refactordoc.svg)](https://coveralls.io/r/enthought/refactordoc?branch=master)The RefactorDoc extension parses the function and class docstrings as
they are retrieved by the autodoc extension and refactors the section
blocks into sphinx friendly rst. The extension shares similarities
with alternatives (such as numpydoc) but aims at reflecting the
original form of the docstring.Key aims of RefactorDoc are:Do not change the order of sections.Allow sphinx directives between (and inside) section blocks.Easier to debug (native support for debugging) and extend
(future versions).RepositoryThe RefactorDoc extension lives at Github. You can clone the repository
using:$ git clone https://github.com/enthought/refactordoc.gitInstallationInstallrefactordocfrom pypi using pip:$ pip install reafactordocAdd refactor-doc to the extensions variable of your sphinxconf.py:extensions = [
    ...,
    'refactordoc',
    ...,
]
Package: refactorguide
Refactor GuideCommandline tools for refactorFree software: MIT licenseDocumentation:https://refactorguide.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-12-23)First release on PyPI.
Package: refalchecker
RefalcheckБиблиотека вывода и верификации форматов функций в языке РЕФАЛ-5. Она позволяет проверить корректность вызовов функции и определить для них типУстановкаДля установки библиотеки необходимо запуститьустановщик:pythonsetup.pyinstallКак использоватьНа вход подается имя файла *.ref, который содержит программу, написанную на РЕФАЛ-5, и файлы *.type, содержащие форматы используемых функций. Например:refalcheckR05-Parser.refLibraryEx.typeR05-Lexer.typeРезультат программы можно перенаправить в файл (например, Result.ref):refalcheckR05-Parser.refLibraryEx.typeR05-Lexer.typeR05-Parser.type>Result.refВ файлеconstants.pyиспользуются константы, конфигурируемые при запуске верификатора.ТестированиеДля проверки работоспособности верификатора необходимо запустить тесты:pythonsetup.pytestПри успешной работы вывод должен быть таким:========================================================================================testsessionstarts========================================================================================platformdarwin--Python3.7.0,pytest-4.5.0,py-1.8.0,pluggy-0.11.0
rootdir:/Users/geoiva/Desktop/Учеба/Учеба(8сем)/Диплом
collected1itemtests/refal_test.py.[100%]=====================================================================================1passedin0.37seconds======================================================================================
Package: refchaser
Refchaser Provisional User GuideThis package is developed as a toolbox for conducting literature reviews and systematic reviews. It allows downloading full text articles in batches. It can parse the reference lists of pdf articles for searching reference list.The latest version is 0.0.3Currently, it only support Windows systems.Although the use of python packages usually requires some programming knowledge, refchaser provides quick APIs to be called in commandline, which even lay people can use.What do I need to install before using refchaser?You need to install the following programming languages.python 3JavaRAlthough this is a python module, it works by calling third-party applications written in the other two languages.
Make sure to add the executables of these languages toPATH environment variableHow to install refchaser?After you have installed python 3, open cmd.exe.Run command:pip install refchaserHow to get help?Open cmd.exeRun command:python -m refchaser -hHow to batch-download articles?Open cmd.exeRun command:python -m refchaser A -p C://directory/containing/bibliographical/files/ -t C://directory/where/you/want/fulltexts/saved/The-pparameter should contain nothing else than bibiographic files of citations you want to download.
The-tis a folder where you want to save all the downloaded PDF articles.Alternatively, you can just run this command:python -m refchaser AAnd a graphic user interface will guide you through.How to parse reference lists of pdf articles and generate queries?Open cmd.exeRun command:python -m refchaser B -p C://directory/containing/pdf/files/ -t C://directory/where/you/want/queries/saved -x WOS PubMedThe database names pass to the-xcan be numberspython -m refchaser B -p C://directory/containing/pdf/files/ -t C://directory/where/you/want/queries/saved -x 1 2The mapping relationships are as follows:1 - WOS - Web of Science
2 - PubMed -PubMed
3 - EMBASE - EMBASE
4 - Scopus - Scopus
5 - GS - Google ScholarThe-pparameter should contain nothing else than PDF files you want parsed.The-tis a folder where you want to save forward search queries (consisting of titles of parsed articles) and backward search queries (consisting of titles of references) in .txt format.The-xparameter is the databases you want to search with the forward and backward query, respectively. The package can create queries according to search rules of different databases.Alternatively, you can just run this command:python -m refchaser BAnd a graphic user interface will guide you through.
Package: refchef
RefChefRefChef is a reference management tool used to (1) document the exact
steps undertaken in the retrieval of genomic references, (2) maintain
the associated metadata, (3) provide a mechanism for automatically
reproducing retrieval and creation of an exact copy of genomic
references.InstallationTo install from PyPI usingpip:pip install refchefTo install usingAnaconda Python:conda install-ccompbiocore refchefDevelopmentTo install adevelopment versionfrom the current directory:gitclonehttps://github.com/compbiocore/refchef.gitcdrefchefpipinstall-e.Run unit tests as:python setup.py testSet up.envfile with GitHub Access TokenSensitive environment variables are stored in the .env file. This file
is included in .gitignore intentionally, so that it is never committed.
- Create a.envfile and copy into it the contents of.env.template- Get yourGitHub Access
Tokenand add to the.envfile.ContributingContributions consistent with the style and quality of existing code are
welcome. Be sure to follow the guidelines below.Check the issues page of this repository for available work.CommittingThis project usescommitizento ensure that commit messages remain well-formatted and consistent
across different contributors.Before committing for the first time, install commitizen and readConventional
Commits.pip install commitizenTo start work on a new change, pull the latestdevelopand create a
newtopic branch(e.g.feature-resume-model,chore-test-update,bugfix-bad-bug).git add .To commit, run the following command (instead ofgit commit) and
follow the directions:cz commitContactContactcbc-help@brown.edu- this is our general help line, so please
specify that your issue is with this site’s contents
Package: refchooser
Tools to help choose a reference from a list of assemblies.The refchooser project was developed by the United States Food
and Drug Administration, Center for Food Safety and Applied Nutrition.Free softwareDocumentation:https://refchooser.readthedocs.ioSource Code:https://github.com/CFSAN-Biostatistics/refchooserPyPI Distribution:https://pypi.python.org/pypi/refchooserFeaturesPrint a table of metrics to help choose an assembly from a collection.N50N90Number of contigsAssembly lengthMean mash distance to all other assembliesCiting refchooserTo cite refchooser, please reference the refchooser GitHub repository:https://github.com/CFSAN-Biostatistics/refchooserLicenseSee the LICENSE file included in the refchooser distribution.History0.2.1 (2019-08-20)Detect and exclude empty assemblies.0.2.0 (2019-07-12)Add N50 and N90 metrics.Calculate a simple “Score” for each assembly, the N50/Distance ratio.Combine all metrics in a single table sortable by any column.0.1.0 (2019-06-21)Initial version.
Package: refclone
Refclonerefcloneis a wrapper forgit clonecommand, that helps keeping cloned git
repos organized.Installationpip3 install --user git+https://alcm-b@bitbucket.org/alcm-b/refclone.gitUsagerefclone.py --repohome=/home/username/ref https:/gitserver.example.com/user/projectYou'll probably want to keep the samerepohomedirectory for all git projects
you clone. This can be achieved by creating this pair of aliases in~/.bashrc:alias refclone='refclone --repohome=/home/username/ref'
alias cdref='cd /home/username/ref'After that, you can start usingrefclonelike this:refclone https://gitserver.example.com/user/project
cdrefDescriptionrefcloneshaves off a couple of commands I have to run each time I want to
take a look at the source code of one more open source project.Effectively, this utility is a shortcut for these two UNIX shell commands:mkdir -p "/<repohome>/<server-url>/<username>/<project-name>/"
git clone <git-url> /<repohome>/<server-url/<username>/<project-name>/, where<repohome>is provided in command line option--repohome.
Package: refconfig
RefConfigPowered bySmartDict.UsageConfigure with referencesInstallpip install refconfigDescription# ./data/zhihu.yamldataset:zhihustore:data_dir:data/FANS/${config.dataset}save_dir:saving/${config.dataset}/${exp.model}-E${config.model_config.hidden_size}/model_config:hidden_size:64num_hidden_layers:3num_attention_heads:8# ./exp/train.yamlexp:step-${exp.tasks.0.params.steps}model:bertmode:trainfreeze_emb:falsetasks:-name:mlmparams:steps:5store:interval:10policy:epoch:200importrefconfigconfig=refconfig.parse_yaml(exp='./exp/train.yaml',config='./data/zhihu.yaml',)print(config['config']['store']['data_dir'])# => data/FANS/zhihuprint(config['config']['store']['save_dir'])# => saving/zhihu/bert-E64/print(config['exp']['exp'])# => step-5# use with the Oba library to achieve a smoother effectfromobaimportObjconfig=Obj(config)config,exp=config.config,config.expprint(config.store.data_dir)# => data/FANS/zhihuprint(config.store.save_dir)# => saving/zhihu/bert-E64/print(exp.exp)# => step-5# ./data/any.yamlstore:data_dir:data/FANS/${dataset}save_dir:saving/${dataset}/${exp.model}-E${config.model_config.hidden_size}/model_config:hidden_size:64num_hidden_layers:3num_attention_heads:8fromrefconfigimportRefConfigconfig=RefConfig().add_yaml(exp='./exp/train.yaml',config='./data/any.yaml',).add_raw(dataset='youtube',).parse()fromobaimportObjconfig=Obj(config)config,exp=config.config,config.expprint(config.store.data_dir)# => data/FANS/youtubeprint(config.store.save_dir)# => saving/youtube/bert-E64/print(exp.exp)# => step-5
Package: refcontainer
Reference ContainerThis library implements a simple container which holds a single value.
The container is completely typed, supports an optional default value,
supports readonly mode, and does runtime type checking.ExamplesfromrefcontainerimportRef,ReadOnlyError# Initialize with valuestr_ref=Ref('hello')assertstr_ref.current=='hello'delstr_ref.current_=str_ref.current# raises AttributeErrorstr_ref.current='world'assertstr_ref.current=='world'str_ref.current=0# raises TypeErrorstr_ref.engrave('hello')str_ref.current='world'# raises ReadOnlyError# Initialize as readonly (engraved)str_ref=Ref.readonly('hello')delstr_ref.current# raises ReadOnlyErrorassertstr_ref.current=='hello'# Initialize with type tagsref=Ref[str|int]('hello')assertref.current=='hello'ref.current='world'ref.current=0withraises(TypeError):ref.current=0.# Disable type checkingref=Ref[Any]('hello')# Initialize with type but without valuenum_ref=Ref[float]()withraises(AttributeError):_=num_ref.currentnum_ref.current=0.assertnum_ref.current==0num_ref.current='hello'# raises TypeErrorInstallationFrom PyPI:pip install refcontainerFrom source:git clone git@github.com:balintmaci/python-ref.git
cd python-ref
pip install .Use-ewith install to link sources to installationBuild:python -m build .Push to PyPI:python3 -m twine upload --repository pypi dist/*
Package: refcuckoo
Cuckoo FilterOverviewCuckoo filter is a Bloom filter replacement for approximated set-membership queries. While Bloom filters are well-known space-efficient data structures to serve queries like "if item x is in a set?", they do not support deletion. Their variances to enable deletion (like counting Bloom filters) usually require much more space.Cuckoo filters provide the ﬂexibility to add and remove items dynamically. A cuckoo filter is based on cuckoo hashing (and therefore named as cuckoo filter).  It is essentially a cuckoo hash table storing each key's fingerprint. Cuckoo hash tables can be highly compact, thus a cuckoo filter could use less space than conventional Bloom filters, for applications that require low false positive rates (< 3%).For details about the algorithm and citations please use:"Cuckoo Filter: Practically Better Than Bloom"in proceedings of ACM CoNEXT 2014 by Bin Fan, Dave Andersen and Michael KaminskyAPIThe filter is wrapped in a Python extension and packaged for cross-platform installation.CuckooFilterobjects support the following operations:f.add(item) -> int: insert an item to the filterf.contains(item) -> int: return if item is already in the filter. Note that this method may return false positive results like Bloom filtersf.remove(item) -> int: delete the given item from the filter. Note that to use this method, it must be ensured that this item is in the filter (e.g., based on records on external storage); otherwise, a false item may be deleted.f.item_count -> int: return the total number of items currently in the filterf.memory_size -> int: return the filter size in bytesf.victim -> Optional[tuple[int, int]]: return metadata about any victimFilter implementation authorsBin Fanbinfan@cs.cmu.eduDavid G. Andersendga@cs.cmu.eduMichael Kaminskymichael.e.kaminsky@intel.com