Saravanan666/pypi-org huggingface dataset:
Package: primer
Brute force functions for teaching purposes. Not performant.To use as a package:>>> import primer
>>> primer.primes(10)
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
>>> primer.prime(10)
29
>>> primer.primorial(10)
6469693230
>>> primer.sieve(40)
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]
>>>To use as a script:$ python -m primer [-h] [-t] [N]Display the first N primes.positional arguments:N           Number of primes to generate (default: 100)optional arguments:-h,--helpshow this help message and exit-tDisplay elapsed time (default: False)Version 1.4.4        2015-04-09Factor out generator function. (cbc)Version 1.4.3        2015-04-02Refactor functions into module. (cbc)Refactor main namespace in tests. (cbc)Added VERSION.txt. (cbc)Added download_url to setup. (cbc)Version 1.4.2        2015-04-01Make installed tests runnable as script. (cbc)Version 1.4.1        2015-04-01Make reduce readable. HAFD. (cbc)Version 1.4          2015-03-26Single version for Python 2/3. (cbc)Version 1.3          2015-03-25Add sieve function. (cbc)Rename test methods. (cbc)Version 1.2.1        2015-03-25Update README. (cbc)Version 1.2          2015-03-25Mark prime generator function private. (cbc)Update docstrings. (cbc)Fix test module name. (cbc)Rename test data. (cbc)Version 1.1.1        2015-03-25Update README. (cbc)Version 1.1          2015-03-25Add primorial function. (cbc)Version 1.0.2        2015-03-25Fix keywords. (cbc)Version 1.0.1        2015-03-25Release testing. (cbc)Version 1.0          2015-03-23Initial release. (cbc)
Package: primer-2020Godwin
primer_2020primer_2020 is a prime number library. It provides functions
for generating primes and factorization.Installation$ git clone https://github.com/MartinThoma/primer_2020.git
$ cd primer_2020
$ pip install -e .Usage>>> import primer_2020
>>> primer_2020.factorize(28)
>>> [2, 2, 7]
Package: primer-2020-krzysiek
primer_2020primer_2020 is a prime number library. It provides functions
for generating primes and factorization.Installation$ git clone https://github.com/MartinThoma/primer_2020.git
$ cd primer_2020
$ pip install -e .Usage>>> import primer_2020
>>> primer_2020.factorize(28)
>>> [2, 2, 7]
Package: primer3plus
Primer3PlusPrimer3Plus is a Python DNA primer design tool based off of Primer3 and the
Python primer3 wrapper (https://pypi.org/project/primer3-py/).importjsondesign=Design()template="""TCATGTAATTAGTTATGTCACGCTTACATTCACGCCCTCCCCCCACATCCGCTCTAACCGAAAAGGAAGGAGTTAGACAACCTGAAGTCTAGGTCCCTATTTATTTTTTTATAGTTATGTTAGTATTAAGAACGTTATTTATATTTCAAATTTTTCTTTTTTTTCTGTACAGACGCGTGTACGCATGTAACATTATACTGAAAACCTTGCTTGAGAAGGTTTTGGGACGCTCGAAGGCTTTAATTTGC"""template=template.replace('\n','').replace(' ','')design.settings.template(template)design.settings.as_cloning_task()design.settings.primer_num_return(1)results,explain=design.run()print(json.dumps(results,indent=1))print(json.dumps(explain,indent=1)){"0":{"PAIR":{"PENALTY":11.204301707622733,"COMPL_ANY_TH":0.0,"COMPL_END_TH":0.0,"PRODUCT_SIZE":248},"LEFT":{"PENALTY":9.027129166714644,"SEQUENCE":"TCATGTAATTAGTTATGTCACGCTTAC","location":[0,27],"TM":57.972870833285356,"GC_PERCENT":33.333333333333336,"SELF_ANY_TH":0.0,"SELF_END_TH":0.0,"HAIRPIN_TH":0.0,"END_STABILITY":2.34},"RIGHT":{"PENALTY":2.1771725409080886,"SEQUENCE":"GCAAATTAAAGCCTTCGAGCG","location":[247,21],"TM":58.82282745909191,"GC_PERCENT":47.61904761904762,"SELF_ANY_TH":0.0,"SELF_END_TH":0.0,"HAIRPIN_TH":38.006257959698985,"END_STABILITY":5.03}}}{"PRIMER_LEFT_EXPLAIN":"considered 10, low tm 9, ok 1","PRIMER_RIGHT_EXPLAIN":"considered 10, low tm 3, high tm 4, ok 3","PRIMER_PAIR_EXPLAIN":"considered 1, ok 1","PRIMER_LEFT_NUM_RETURNED":1,"PRIMER_RIGHT_NUM_RETURNED":1,"PRIMER_INTERNAL_NUM_RETURNED":0,"PRIMER_PAIR_NUM_RETURNED":1}Installationpip install primer3plus -URequirementspython >= 3.5
Package: primer3-py
primer3-py: simple oligo analysis and primer designPrimer3-pyis a Python-abstracted API for the popular Primer3 library. The
intention is to provide a simple and reliable interface for automated oligo
analysis and design.Routine oligo analysis is simple::>>> import primer3
>>> primer3.calc_tm('GTAAAACGACGGCCAGT')
49.16808228911765
>>> primer3.calc_hairpin('CCCCCATCCGATCAGGGGG')
ThermoResult(structure_found=True, tm=34.15, dg=337.09, dh=-36300.00, ds=-118.13)... andfast(~1000Xfaster than traditional subprocess wrappers)::In[1]:importprimer3

In[2]:importtests.wrapper

In[3]:%timeitprimer3.calc_tm('GTAAAACGACGGCCAGT')100000loops,bestof3:4.74usperloop

In[4]:%timeittest.wrappers.calc_tm('GTAAAACGACGGCCAGT')100000loops,bestof3:5.78msperloopPrimer3-pyalso includes bindings for the Primer3primer design engineif you'd prefer to use an established pipeline. The IO parameters mirror those
of the original Primer3.**Please note that while we provide bindings, we do not provide support for
the Primer3 design engine. Please contact the Primer3 dev team with your
questions:https://github.com/primer3-org/primer3**A copy of the Primer3 2.6.1 design parameters manual can be found at:primer3 v2.6.1 manualFor documentation of the bindings, seehttps://libnano.github.io/primer3-py
Package: primer-coin-game
Python Implementation of Primer Coin GamePython implementation of Primer's Coin Game which can be used for testing and simulations.
To find out more about the game seePrimer's videoand try theoriginal game.Getting StartedDependenciesTo run the simulator you just need Python 3.6+ installed.InstallingGo tohttps://www.python.org/for instruction how to install Python on your machine.
The package can be found onPyPiso you can use pip to install the package:# python -m pip install --upgrade primer-coin-gameAnother way to install it is by manually cloning the repo. To clone you can use:# git clone https://github.com/ErikKarlen/primer-coin-game-python.gitExecuting programTry running the example simulator in a terminal, e.g using:# cd primer-coin-game-python
# python simulate.pyIt will simulate the game many times using the generate_action function to determine what to do in different cases and finally print the max score it managed to get.
Feel free to try and implement your own generate_action function to see if you can make it more efficient and get a higher score.AuthorsErik KarlénVersion History1.0Initial working game and simulatorLicenseThis project is licensed under the MIT License - see the LICENSE file for detailsAcknowledegmentsPrimer- Thanks for creating the original game and making awesome videos!
Package: primerdriver
PrimerDriver: Automated design of mutagenic PCR primersIntroductionPrimerDriveris a user-friendly bioinformatics platform specifically designed to generate primers for site-directed
mutagenesis experiments into workflows with an easy-to-use command-line interface. “Traversing” PrimerDriver lanes,
users can generate possible mutagenic primers upon input of a DNA sequence (DNA), design primers for an array of species
codon expression systems through direct mutation of the amino acid (PRO), characterize and report user-designed
primers (CHAR).UsageA. Running standaloneYou can access and download the CLI from thereleases page. Currently, we only have prebuilt binaries for
64-bit Windows and Linux. For other OS/architectures, see the section on Building from Source, under Developing Locally.Run the program in a terminal usingprimerdriver-hThis will run the help program. For first-time users, the program can be run in
interactive mode by passing the-iflag:primerdriver-iThis will walk you through each option step-by-step.
Batch design can be performed by includingprimerdriveras part of a shell script.B. Running as Python modulePrerequisitesPython 3.8.1+PoetryGitSetupClone the repo to your local devicegitclonehttps://github.com/kvdomingo/primerdriver.gitInstall dependencies:poetryinstallRun the program as follows:poetryrunpython-mprimerdriver-hC. Running from DockerRun as follows:dockerrun-it--entrypointpythonkvdomingo/primerdriver-mprimerdriver-hWeb applicationFor a more interactive experience, visit theweb application.DocumentationThe documentation is available athttps://kvdomingo.github.io/primerdriver/.ContributingOpen a PR or raise anissue.
You may also email Nomer or Kenneth, depending on the nature of the issue.Developing locallyPrerequisitesDockerTaskInstallingA step by step series of examples that tell you how to get a
development environment runningClone the repo.Install backend dependencies:poetryinstallWait a few minutes for all the containers to start, then access the
local server in your browser athttp://localhost:8000.Building from sourceRun the script:# On a Linux machine, will build for Linux x64 only# On a Windows machine, will build for Windows and Linux x64taskbuildDeploymentgitadd.
gitcommit-m"DESCRIPTIVE_COMMIT_MESSAGE"gitpushoriginyour_feature_branchwhereyour_feature_branchshould summarize the changes you are implementing
(e.g.,feature/implementing-xxxx-feature,bugfix/crush-critical-yyyy-bug).AuthorsNumeriano Amer "Nomer" E. Gutierrez- Project Lead, Molecular
Biologist -Email|GitHubKenneth V. Domingo- Lead Developer, Technical
Consultant -Email|Website|GitHubShebna Rose D. Fabilloren- Technical Consultant -EmailCarlo M. Lapid- Project Adviser -EmailVersioningThis project complies withSemVerfor versioning. For
all available versions, seetags.LicenseThis project is licensed under theGPLv3 License.
Package: primer-explorer2
Primer explorer2A small library to help seleting primers for K-Seq users .Authors: P.Ziarsolo, V. Garcia-Carpintero, J.BlancaThis small library provides various scripts to help the user to select the best kmers for your experiment.Installationa) pip install primer_explorer2

b) python setup.py installprimer_xp.pyIt tries to select the best 10 primers for a K-Seq experiment and predicts the outcome of all 10 primer combinations.

The outcome consist in two file:
    * An excel file with some stats for each primer combinations.
    * A database with the predicted pcr products for each pair combination. This can be use as input for other provided scripts.
           
You can use the script to look for primers in different ways. 

You can choose the length of the primer. The bigger is the length of the primer, less sites in the genome will find, thus generating less pcr products
You can define regions in witch you prefer to have less primers. P.ej: heterocromating, repetitive...generate_prediction_beds.pyIt generates a bed file for each combination of primer pair in the pcr_products pickle database.draw_pcr_product_size_distribution.pyIt draws the insert size distribution of the predicted pcr products.count_gff_features.pyGiven the prediction in bed files. It counts how many predicted pcr_products are in the gff features. By default in only counts pcr_produts in exons and genes. It can be changed.
Package: primer-kit
PrimerPrimer is a lightweight toolkit for debugging and benchmarking Python code.With only one line inserted, primer improves your coding experience.fromprimerimportdebug,profile,performanceInstallRequirementsPython >= 3.5pipinstallprimer-kitDebugException hook helps you debug your code whenever exception is raise.debug.setup_hook()Call decorator monitors every call to the function and its arguments.@debug.calldefmy_function(args):ProfileTime and memory profilers measure the duration and memory allocation for some code.withprofile.time(),profile.memory():They can also be used as decorators over functions. A log frequency of 10 outputs results once per 10 calls.@profile.time(log_frequency=10)defmy_function(args):PerformanceSlot decorator converts all member variables to static slots, which saves memory and runs faster.@performance.slotclassMyClass(object):Shared ndarray can be passed across processes without copy, which saves memory by several times and runs faster.importnumpyasnpimportmultiprocessingasmparrays=[performance.SharedNDArray(np.random.rand(100000))for_inrange(4)]results=mp.Pool(4).map(np.sum,arrays)
Package: primes-eip-f
Este paquete contiene dos funciones encargadas de calcular los numeros primos hasta un numero dado, una de ellas esta hecha con python
y la otra funcion con R-studio integrado en python. Este es un ejercicio que pertenece a la Escuela Internacional de Posgrados, master avanzado de
programacion en python para Hacking, BigData y Machine Learning.This program is free software: You can redistribute it and/or modify it under terms of license by the Free Software Foundation, either version 3 of the License(at your option) any other version
Package: primesense
OfficialPrimeSensePython-bindings forOpenNI2andNiTE2.This package provides only the Python bindings; be sure to install OpenNI (and optionally NiTE) first.Example:from primesense import openni2

openni2.initialize()     # can also accept the path of the OpenNI redistribution

dev = openni2.Device.open_any()
print dev.get_sensor_info()

depth_stream = dev.create_depth_stream()
depth_stream.start()
frame = depth_stream.read_frame()
frame_data = frame.get_buffer_as_uint16()
depth_stream.stop()

openni2.unload()NoteRefer to the C API for documentation
Package: prime-sieve
Prime SieveAn understandable prime sieve implementation in numpy or pure python.
The focus is providing a sieve that is easy to understand rather than the absolute fastest implementation.
Though the numpy implementation is reasonably quick,
being able to compute the first 100 million primes in 30 seconds on my mid-tier laptop.This library implements a version of thesegmented sieve of Eratosthenes.First take a look at the pure python implementation inprime_sieve/list.py.
Then see the numpy implementation inprime_sieve/array.py.
Sieve operations that are independent of the actual computation of primes,
such as looking up the nth-prime number,
are found inprime_sieve/base.py.Free software: MIT licenseDocumentation:https://prime-sieve.readthedocs.io.Usage# Use a numpy or pure python implementationfromprime_sieve.arrayimportPrimeArraySieve# from prime_sieve.list import PrimeListSievesieve=PrimeArraySieve()# sieve = PrimeListSieve()print(sieve.nth_prime(0))# 2print(sieve[4])# 7print(sieve.index_of(7))# 4print(sieve[:100])# [2, 3, ..., 541]print(sieve[1:6])# [3, 5, 7, 11, 13]print(86*97insieve)# Falseprint(sieve.is_prime(2**13-1))# True# ranges are like python ranges, inclusive start, exclusive stopprint(sieve.primes_in_range(10,20))# [11, 13, 17, 19]print(sieve.primes_in_range(10,19))# [11, 13, 17]print(sieve.count_primes_in_range(3,7))# 2print(sieve.count_primes_in_range(3,8))# 3print(sieve.next_prime_greater_than(100))# 101print(sieve.next_prime_greater_than(101))# 103print(sieve.prev_prime_less_than(8))# 7print(sieve.prev_prime_less_than(7))# 5print(sieve.count_primes_less_or_equal(10**7))# 664579forpinsieve.iter_all_primes():# infinite loopprint(p)# see sieve internalsprint(len(sieve))# how many primes have currently been computedprint(sieve.primes)# read-only view of already computed primesCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2021-05-02)First release on PyPI.
Package: prime-test
prime_testThis module provides the functiontest(n)that returnsTrueifnis a prime number, andFalseif it is composite (note that this test is probabilistic so that it can test extremely large numbers very fast for RSA). The function also has an optional variablek(defaults to 40) which is the iterations of the test, more information on that can be foundhere. Below is an example of how to use the module.fromprime_testimportprimeprime.test(167)
Package: primeTester
primeTesterprimeTester is a collection of Python modules consisting differentprimality tests.Link to package on PyPI:primeTester.Tests IncludedFermat TestMiller Rabin TestSolovay StrassenAKS TestTrial DivisionInstallpip3 install PrimeTesterUsageImport the test function from the python modules installed. Camel case is used for the functions names.from millerRabin import millerRabinFor probability based tests (Fermat, Miller Rabin, Solovay Strassen) those functions take in two arguments.
The first argument takes in a number to be tested as prime, the second is the number of test iterations.print(fermat(5,100))All the test functions will return a true or false value. A returned true value indicates that the inputted number is a prime. A returned false value indicates that the inputted number is not a prime.
Package: primetext
primetextpython package for indexing text datasets for fast word frequency analysisUsagefromprimetextimportprimetextdata=["black cat on mat","black hat for you","cat sat on you"]# initiate primetextpt=primetext.primetext()# indexing datapt.index(data)# finding wordsrecordsWithCat=pt.find(['cat'])# returns boolean vector : [True,False,True]recordsWithCatAndSat=pt.find(['cat','sat'])# returns boolean vector : [False,False,True]
Package: primetools
primetoolsa prime number toolset for python, written in rust/PyO3This project is currently in development.
To install, runpipinstallprimetools>>>importprimetools>>>primetools.get_primes_to(10)[3, 5, 7]>>>primetools.is_prime(42)False>>>primetools.is_prime(97)TrueMore functionality coming soon (tm)
Package: primeutility
Este paquete contiene el código necesario para buscar y listar todos los números primos entre 1 y n.
Donde n es un parámetro suministrado por el usuario.
El código regresa una lista con los números primos hasta n.This program is free software: You can redistribute it and/or modify it under the terms of license by the Free Software Foundation, either version 3 of the License(at your option) any other version.
Package: primeutils
Este es un ejemplo simple de un paquete Python.
Este paquete contiene una funciÃ³n que devuelve una lista de nÃºmeros primos desde el 2 hasta un nÃºmero dado.
This program is free software: You can redistribute it and/or modify it under the terms of license by the Free Software Foundation, either version 3 of the License(at your option) any other version.
Package: primify
PrimifyTransform any image into a prime number that looks like the image if glanced upon from far away.How does it workWe proceed in 5 steps:We resize the image to contain at most a--max-digitsamount of pixels.Run various image processing steps like edge enhancement and smoothing before converting the image into grey-scale.We then quantise the image into just having 5 to 10 greyness levels.Now we map each greyness level to a digit, et voila, we have embedded the picture into a number.It now remains to tweak some of the digits until we find a prime number that still looks like the image.Note: According to the prime number theorem, the density of prime numbers is asymptotically of order 1/log(n). Hence, if we have some number n with m digits, the number of primality tests that we expect to do until we hit a prime number is roughly proportional to m. Since we use the Baillie–PSW primality test, the overall expected computational complexity of our prime searching procedure is O(n*log(n)³).How to useSimply get theprimifycommand line tool viapip install primify.
You can also import thePrimeImageclass fromprimify.baseor usecli.pyas a command-line script.Command-line toolusage: primify [-h] [--image IMAGE_PATH] [--max-digits MAX_DIGITS]
               [--output-file OUTPUT_FILE]

Command-line tool for converting images to primes

optional arguments:
  -h, --help            show this help message and exit
  --image IMAGE_PATH, -i IMAGE_PATH
                        Source image to be converted
  --max-digits MAX_DIGITS, -d MAX_DIGITS
                        Maximal number of digits the prime can have
  --output-file OUTPUT_FILE, -o OUTPUT_FILE
                        File name of the file containing the prime.

Made by Levi B.Thus, if you have the source image at./source.pngand you want to convert it into a prime contained in./prime.txtwhich has at most 5000 digits. Then you should run:primify -v --image ./source.png --max-digits 5000 --output-file prime.txtImporting the PrimeImage classYou can also simply import thePrimeImageclass fromprimify.baseand use that class in your own code. Check thedocumentationfor details on how to interact with the underlying API.Additional MaterialDaniel Temkinwrote a lovely article on his blogesoteric.codesgiving some interesting insight and background for this tool. You can read ithere.
Package: primitiv
FeaturesDynamic and incremental graph constructionOn-demand memory allocationAutomatic minibatch broadcastingMostly device-independentSimple usageInstallPrerequisites:Python 3 (3.5 or later)NumPy (1.11.0 or later)Cython (0.27 or later)scikit-build (0.6.1 or later, only for building)(optional) CUDA (7.5 or later)(optional) OpenCL (1.2 or later) and OpenCL C++ binding v2Install dependencies:pip3 install numpy cython scikit-buildInstall primitiv without CUDA and OpenCL:pip3 install primitivInstall primitiv with CUDA and/or OpenCL support:# Enable only CUDA
pip3 install primitiv --global-option --enable-cuda

# Enable both CUDA and OpenCL
pip3 install primitiv --global-option --enable-cuda --global-option --enable-openclResourcesHomepageExamples
Package: primitiveDB
Primitive-Database (primitveDB)About PrimitiveDBPrimitive-Database is a lightweight databasing library written in Python3. It uses CSV(Comma Separated Values) file(s) to store data, making it easy to perform simple and minimalistic tasks with great and stable performance.Using PrimitiveDBServerCreating a simple vertical databasefromprimitiveDB.serverimportServerServer.init.db(<CSVFILE>)Server.init.id(<SPEICALIDFORTHESERVER>)Server.init.columns(["Name",#Title for column 1"Age",#Title for column 2"Address"])#Title for column 3Server.init.auth(<AUTHENTICATIONKEY>)#                  IP             PORTServer.init.uri("0.0.0.0",8080)#Server IP is `http://localhost:8080` or `http://127.0.0.1:8080`Server.run()ClientConnecting to the databasefromprimitiveDB.clientimportClientDB=client.connect(<IP>)DB.set_auth(<AUTHENTICATIONKEY>)Fetching data from the databasefromprimitiveDB.clientimportClientDB=client.connect(<IP>)DB.set_auth(<AUTHENTICATIONKEY>)DB_data=DB.fetch()#returns a pandas.datafraemprint(DB_data)Inserting data into the databasefromprimitiveDB.clientimportClientDB=client.connect(<IP>)DB.set_auth(<AUTHENTICATIONKEY>)DB_data=DB.fetch()DB_data["Name"]=["Jack",# Adding `Jack` to first row into Names"James"]# Adding `Jill` to second row into NamesDB_data["Age"]=[10,# Adding the age for `Jack`07]# Adding the age for  `James`DB_data["Adress"]=["123 NAME ST",# Adding the adress for `Jack`"123 MAIN ST"]# Adding the adress for `James`DB.insert(DB_data)Github:https://github.com/FahimFerdous1/primitiveDB