Saravanan666/pypi-org huggingface dataset:
Package: fakeable
fakeableBy: Denver Coneybeare <denver@sleepydragon.org>Aug 12, 2013Fakeable is a Python library that provides a facility for transparentlyreplacing objects with fake versions during unit testing.  The main advantageof Fakeable is that from the point of view of the production code there isnothing that needs to be done except to declare a specific metaclass to opt-into being faked.  Then, during testing the tests specify to use a fake versionof a specific class and then "magically" at runtime a fake version is used.Full documentation available at: https://fakeable.readthedocs.orgSource code available at: https://github.com/sleepydragonsw/fakeableFor example, consider the class below, which simply reads the contents of atext file and returns it:class FileReader(object):__metaclass__ = fakeable.Fakeabledef read_file(self, path):with io.open(path, "rt", encoding="utf8"):contents = f.read()return contentsThen consider this class from production code that makes use of it:def file_contains(path, s):reader = FileReader()contents = reader.read_file("config.ini")found = (s in contents)return foundWhen the file_contains() method is invoked outside of unit tests everythingwill work as expected: the real FileReader.read_file() method will be invoked.However, during unit tests, a fake version of the FileReader class can be usedinstead:class FakeFileReader(object):def read_file(self, path):raise IOError("file not found")class Test_FileReader(unittest.TestCase):def test_file_contains(self):fakeable.set_class("FileReader", FakeFileReader)with self.assertRaises(IOError):file_contains("blah_blah", "hey ho")When file_contains() is invoked after invoking fakeable.set_class() the call to"reader = FileReader()" will actually return an instance of FakeFileReaderinstead of an instance of the *real* FileReader class.This is achieved through the magic of metaclasses.See the documentation in the "doc" folder for more details.
Package: fake-agent
Fake AgentfromFakeAgentimportFake_Agentfa=Fake_Agent()print(fa.random())Fake-agent, generate fake browser user agents without a hassle!Links 🔗Documentation 📔Features 💪Installation ⬇️Usage 🤔License 👮Features 💪Easy to useWorks offlineNo need to install bunch of 3rd party packagesInstall ⬇️Stable frompypipip3 install fake-agentBleeding edge fromgithubpip3 install -U https://github.com/Itz-fork/Fake-agent/archive/master.zipUsage 🤔For more methods and detailed explanation, visitmethod documentationImport and initialize theFake_AgentclassfromFakeAgentimportFake_Agentfa=Fake_Agent()get()- Get user agents as a list or generator according to the browser that Fake_Agent class initialized withFor more info visit -Fake_Agent.get documentationrandom()- Randomly select user agentFor more info visit -Fake_Agent.random documentationLicense 👮Licensed underMIT License
Package: fake-bge-module
fake-bge-module is the collections of the fake Blender Game Engine (BGE)
Python API modules for the code completion in commonly used IDEs.Note: The similar project for Blender is available
onfake-bpy-modulewhich
targetsBlender.To realize the long support of this project, your support is helpful.You can support the development of this project viaGitHub
Sponsors.Seethe
contribution documentfor the detail ofthe
support.Requirementsfake-bge-module uses typing module and type hints which are available
from Python 3.7. Check your Python version is >= 3.7.Installfake-bge-module can be installed via a pip package, or pre-generated
modules. You can also generate and install modules manually.Install via pip packagefake-bge-module is registered to PyPI.You can install it as a pip package.Install a latest packageIf you install fake-bpy-module for Blender latest build (master branch
daily build powered bynutti/upbge-daily-build),
run below command.pipinstallfake-bge-moduleor, specify version “latest”.pipinstallfake-bge-module-latestInstall a version specific packageIf you want to install a version specific package, run below command.pipinstallfake-bge-module-<version>If you install fake-bge-module for UPBGE 0.2.5, run below command.pipinstallfake-bge-module-0.2.5Note: For PyCharm users, change the value
``idea.max.intellisense.filesize`` in ``idea.properties`` file to more
than 2600 because some modules have the issue of being too big for
intelliSense to work.Supported UPBGE VersionVersionPyPI0.2.5https://pypi.org/project/fake-bge-module-0.2.5/latesthttps://pypi.org/project/fake-bge-module/https://pypi.org/project/fake-bge-module-latest/Install via pre-generated modulesDownload Pre-generated modules fromRelease
page.The process of installation via pre-generated modules is different by
IDE. See the installation processes as follows for detail.PyCharmVisual Studio CodeAll Text Editor (Install as Python
module)Generate Modules ManuallyYou can also generate modules manually. SeeGenerate
Modulesfor detail.Change LogSeeCHANGELOG.mdBug report / Feature request / DisscussionsIf you want to report bug, request features or discuss about this
add-on, seeISSUES.md.ContributionIf you want to contribute to this project, seeCONTRIBUTING.md.Project AuthorsOwner@nuttiIndie Game/Application Developer.Especially, I spend most time to improve Blender and Unreal Game
Engine via providing the extensions.Support viaGitHub SponsorsCONTACTS:TwitterWEBSITE:Japanese Only
Package: fake-bge-module-0.2.5
fake-bge-module is the collections of the fake Blender Game Engine (BGE)
Python API modules for the code completion in commonly used IDEs.Note: The similar project for Blender is available
onfake-bpy-modulewhich
targetsBlender.To realize the long support of this project, your support is helpful.You can support the development of this project viaGitHub
Sponsors.Seethe
contribution documentfor the detail ofthe
support.Requirementsfake-bge-module uses typing module and type hints which are available
from Python 3.7. Check your Python version is >= 3.7.Installfake-bge-module can be installed via a pip package, or pre-generated
modules. You can also generate and install modules manually.Install via pip packagefake-bge-module is registered to PyPI.You can install it as a pip package.pipinstallfake-bge-module-<version>If you install fake-bge-module for UPBGE 0.2.5, run below command.pipinstallfake-bge-module-0.2.5If you install fake-bpy-module for Blender latest build (master branch
daily build powered bynutti/upbge-daily-build),
run below command.pipinstallfake-bge-module-latestNote: For PyCharm users, change the value
``idea.max.intellisense.filesize`` in ``idea.properties`` file to more
than 2600 because some modules have the issue of being too big for
intelliSense to work.Supported UPBGE VersionVersionPyPI0.2.5https://pypi.org/project/fake-bge-module-0.2.5/latesthttps://pypi.org/project/fake-bge-modulelatest/Install via pre-generated modulesDownload Pre-generated modules fromRelease
page.The process of installation via pre-generated modules is different by
IDE. See the installation processes as follows for detail.PyCharmVisual Studio CodeAll Text Editor (Install as Python
module)Generate Modules ManuallyYou can also generate modules manually. SeeGenerate
Modulesfor detail.Change LogSeeCHANGELOG.mdBug report / Feature request / DisscussionsIf you want to report bug, request features or discuss about this
add-on, seeISSUES.md.ContributionIf you want to contribute to this project, seeCONTRIBUTING.md.Project AuthorsOwner@nuttiIndie Game/Application Developer.Especially, I spend most time to improve Blender and Unreal Game
Engine via providing the extensions.Support viaGitHub SponsorsCONTACTS:TwitterWEBSITE:Japanese Only
Package: fake-bge-module-latest
fake-bge-module is the collections of the fake Blender Game Engine (BGE)
Python API modules for the code completion in commonly used IDEs.Note: The similar project for Blender is available
onfake-bpy-modulewhich
targetsBlender.To realize the long support of this project, your support is helpful.You can support the development of this project viaGitHub
Sponsors.Seethe
contribution documentfor the detail ofthe
support.Requirementsfake-bge-module uses typing module and type hints which are available
from Python 3.7. Check your Python version is >= 3.7.Installfake-bge-module can be installed via a pip package, or pre-generated
modules. You can also generate and install modules manually.Install via pip packagefake-bge-module is registered to PyPI.You can install it as a pip package.Install a latest packageIf you install fake-bpy-module for Blender latest build (master branch
daily build powered bynutti/upbge-daily-build),
run below command.pipinstallfake-bge-moduleor, specify version “latest”.pipinstallfake-bge-module-latestInstall a version specific packageIf you want to install a version specific package, run below command.pipinstallfake-bge-module-<version>If you install fake-bge-module for UPBGE 0.2.5, run below command.pipinstallfake-bge-module-0.2.5Note: For PyCharm users, change the value
``idea.max.intellisense.filesize`` in ``idea.properties`` file to more
than 2600 because some modules have the issue of being too big for
intelliSense to work.Supported UPBGE VersionVersionPyPI0.2.5https://pypi.org/project/fake-bge-module-0.2.5/latesthttps://pypi.org/project/fake-bge-module/https://pypi.org/project/fake-bge-module-latest/Install via pre-generated modulesDownload Pre-generated modules fromRelease
page.The process of installation via pre-generated modules is different by
IDE. See the installation processes as follows for detail.PyCharmVisual Studio CodeAll Text Editor (Install as Python
module)Generate Modules ManuallyYou can also generate modules manually. SeeGenerate
Modulesfor detail.Change LogSeeCHANGELOG.mdBug report / Feature request / DisscussionsIf you want to report bug, request features or discuss about this
add-on, seeISSUES.md.ContributionIf you want to contribute to this project, seeCONTRIBUTING.md.Project AuthorsOwner@nuttiIndie Game/Application Developer.Especially, I spend most time to improve Blender and Unreal Game
Engine via providing the extensions.Support viaGitHub SponsorsCONTACTS:TwitterWEBSITE:Japanese Only
Package: fake-blender-api-2.79
Fake Blender 2.79 Python API for code completion, including all modules documented on API.To use this API you just need a Python 3.x distribution and a text editor with advanced
code completion (PyCharm, PyScripter, Visual Studio Code with Python plugins, etc).This project is based on nutti’sfake-bpy-module, however it’s not auto-generated as the
former. It also includes some missing modules of the fake-bpy-module such as bge and id_prop,
and it aims to be more accurate in the data types.InstallationJust type in the command line of your computer:pip installfake-blender-api-2.79And you’re ready to take advantage of Blender code completion on your favorite text editor!
Just make sure you installed it on the same Python interpreter that your text is using.Enjoy!
Package: fake-camera
Code Example:>>> import time
>>> import cv2 as cv
>>> from fake_camera import Fake_Camera  # import the class
>>> fake_cam_object = FakeCamera().add_foreground_image().add_background_image().build() # create an instance of the fake camera class
>>> while True:
       snapshot = fake_cam_object.get_snapshot()  # get the next fake snapshot from from the fake camera
       cv.imshow("Moving Image", snapshot)
       time.sleep(1/10)
       if cv.waitKey(1) & 0xFF == ord("q"):
           break
Package: fake-coro
This module provides fake coroutines that are not coroutines but act like coroutines.>>> from fake_coro import fake_coro, yield_
>>> @fake_coro
... def fib(limit):
...     a, b = 1, 1
...     while a < limit:
...         yield_(a)
...         a, b = b, a + b
>>> list(fib(10))
[1, 1, 2, 3, 5, 8]Other features of classic coroutines are also supported:>>> @fake_coro
... def my_coro():
...     return 42
>>> next(my_coro())
Traceback (most recent call last):
  ...
StopIteration: 42Also.send,.throwand.close:>>> @fake_coro
... def average():
...     total = count = 0
...     num = yield_()
...     while True:
...         total += num
...         count += 1
...         num = yield_(total / count)
>>> coro = average()
>>> next(coro)
>>> coro.send(1)
1.0
>>> coro.send(6)
3.5
>>> coro.close()
>>> coro.send(7)
Traceback (most recent call last):
  ...
StopIterationAnd sub-coroutines:>>> from fake_coro import yield_from
>>> @fake_coro
... def chain(*iterables):
...     for iterable in iterables:
...         yield_from(iterable)
>>> list(chain(range(3), range(5)))
[0, 1, 2, 0, 1, 2, 3, 4]Fake coroutines are implemented by threads and obviously perform much worse than native classic coroutines. However, normal functions invoked by fake coroutines can also yield like coroutines:>>> @fake_coro
... def foo():
...     bar()
...     yield_(2)
>>> def bar():
...     yield_(1)  # bar is not a coroutine but can yield!
>>> list(foo())
[1, 2]
Package: fake-count
Fake Counter is a simple Django app for displaying a random number based on the time of day.Quick startAdd “fake_count” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'fake_count',
)Add these settings to “settings.py” file in your project:CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
        'LOCATION': os.path.join(BASE_DIR, 'fake_count_cache'),
    }
}
# optional
MAX_COUNT_DAY = integer value # default 500
MAX_COUNT_NIGHT = integer value # default 200Load “fake_count_tmpl” in your html template and use it like “fake_counter”:{% load fake_count_tmpl %}

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
        <p>Some text</p>
        <p>{% fake_counter %}</p>
    </body>
</html>
Package: fakedadosbr
fakedadosbrfakedadosbris a library to generate fake data to development and debug.FeaturesFake persons.Fake Companys.Fake vehicles.InstallationRunpip install fakedadosbrExxemplefromfakedadosbrimportfake_cidadao,fake_empresa,fake_veiculocidadao=fake_cidadao()company=fake_empresa()vehicle=fake_veiculo()print(cidadao)print(company)print(vehicle)Console Outputfoo@bar~/
$pythonfakedados_test.py{'nome':'Marcos Vinicius Manoel da Conceição','idade':27,'cpf':'34725101966','rg':'170814713','data_nasc':'19/02/1994','sexo':'Feminino','signo':'Aquário','mae':'Isabelly Ayla Alícia','pai':'Bernardo Tiago da Conceição','email':'marcosviniciusmanoeldaconceicao__marcosviniciusmanoeldaconceicao@gtx.ag','senha':'MWzTZ8QeEG','cep':'54315675','endereco':'4ª Travessa Ladeira da Igreja','numero':529,'bairro':'Guararapes','cidade':'Jaboatão dos Guararapes','estado':'PE','telefone_fixo':'8136207327','celular':'81994178412','altura':'1,77','peso':65,'tipo_sanguineo':'O-','cor':'laranja'}{'nome':'Bárbara e Anderson Entulhos Ltda','cnpj':'67656533000105','ie':'5129572770','data_abertura':'18/11/1994','site':'www.barbaraeandersonentulhosltda.com.br','email':'financeiro@barbaraeandersonentulhosltda.com.br','cep':'83215330','endereco':'Rua Buenos Aires','numero':'564','cidade':'Paranaguá','estado':'PR','telefone_fixo':'4126336328','celular':'41989684238'}{'marca':'AM Gen','modelo':'Hummer Open-Top 6.5 4x4 Diesel TB','ano':'1998','renavam':'41591742567','placa_veiculo':'NBA7300','cor':'Azul'}UpgradeRunpip install fakedadosbr --upgrade
Package: fakedata
FAKEDATAModulo para la generacion de informacion falsa!Este modulo fue creado con la finalidad de crearPRUEBAS, esta idea me surgio ya que en un proyecto necesitaba rellenar mi base de datos con informacion tipo placeholder para realizar pruebas.MetodosA continuacion se describiran los metodos que contiene el modulo.
Para utilizarlo solo importa la libreria.from  fakedata.fakedata  import  FakeDataFakeData.RandomName()Devuelve un nombre aleatoriamente de los siguientes formatos:Nombre Nombre Apellido Apellido
Nombre Apellido ApellidoFakeData.RandomOneName()Devuelve un nombre aleatoriamente en el siguiente formato:Nombre - Apellido - ApellidoFakeData.RandomTwoName()Devuelve un nombre aleatoreamente en el siguiente formato:Nombre Nombre Apellido ApellidoFakeData.CheckSex(nombreRandom)Devuelve el genero del nombre proporcionado.
Esta funcion solo funciona con los nombres generados por las funciones:FakeData.RandomOneName()
FakeData.RandomTwoName()
FakeData.RandomName()FakeData.RandomEmail(nombreRandom)Devuelve un email al pasarle un nombre, genera emails con los dominios:gmail, outlook, yahoo, yopmailY con los las siguientes terminaciones.com ,.net ,.es ,.mxFakeData.PersonalizedEmail(nombre, servidor_web)nombre : Cadena que contendra el nombre del cual se generara un email.
Ejemplo: Jose Angel Colin Najeraservidor_web : Cadena que contendrael servidor con el que cuente el email.
Ejemplo: gmail.com
Package: fake-data-for-learning
Interesting fake multivariate data is harder to generate than it should be.
Textbooks typically give definitions, two standard examples (multinomial and
multivariate normal) and then proceed to proving theorems and propositions.
True, one dimensional distributions can be combined, but here as well the
source of examples is also sparse, e.g. products of distributions or copulas
(typically Gaussian or t-copulas) applied to these 1-d examples.For machine learning experimentation, it is useful to have an unlimited supply
of interesting fake data, where by interesting I mean that we know certain
properties of the data and want to test if the algorithm can pick this up. A
great potential source of such data is graphical models.In the current release, we generate fake data with discrete Bayesian networks
(also known as directed graphical models).
Package: fake-dataset
Fake DatasetToolkit for generating fake datasets.Free software: MIT licenseDocumentation:https://matheusfsa.github.io/fake_datasetHow to Installpipinstallfake-datasetUsage>>> from fake_dataset import columns, generators

>>> data_gen = generators.DataGenerator(
...    vehicle=columns.CategoricalRandomColumn(categories=["car", "bus", "bicycle"], missing_rate=(0.2, 0.5), na_value="NA"),
...    year=columns.IntegerRandomColumn(values_range=(1950, 2010), missing_rate=(0.1, 0.2)),
...    value=columns.FloatRandomColumn(values_range=(10e4, 10e5), missing_rate=(0.0, 0.0)),
...    )

>>> data_gen.sample(3)
           value vehicle  year
0  823994.355388     car  2002
1  903007.903927      NA  1952
2  435372.320886      NA  NoneCreditsThis package was created withCookiecutterand thegiswqs/pypackageproject template.
Package: fakeemail
FakeEmail is an email server, for use in a development environment where routing email is either undesirable, or impossible to manage.The aim of the system is to open a port, accept SMTP connections and to display a list of the emails that it has received.
At no point will the emails route further on, so there is no requirement for the addresses to be valid, or to wait around waiting for the email to arrive in your inbox.InstallationVia pipFakeEmail is installable via pip:pip install fakeemailFrom SourceFakeEmail is installed using the setup.py and depends on Twisted for it’s server capabilites. Installation is as straight forward as possible:git clone git://github.com/tomwardill/FakeEmail.git
cd FakeEmail
python setup.py installUsageStartingIf you installed fakeemail via pip, then running is simple:fakeemail 2025 8080 0.0.0.0This will run on SMTP port2025, the web interface on8080and listen on all network interfaces. Running on port 25 is possible, but you will need to start with root privileges.OptionsThere are two options for the system:-s or –smtp_port : Which port to run the SMTP listener on (defaults to 2025)-w or –web_port : Which port to run the Web Server on (defaults to 8000)Use these options as shown below:fakeemail -s 1025 -w 8001Note that to run the SMTP listener on port 25 (the standard SMTP port), you may need to start the daemon with root privileges.Once the server is running, direct any email at the port that you specified, and then load uphttp://<servername>:webport (http://localhost:8000for example)DependenciesThe dependencies will be installed through the egg, but if you require them to be system installed, they are listed below:twistedjinja2python (2.4+)Known IssuesThe use ofsrcdocfor the iframe element of displaying HTML emails will not work in any current version of Internet Explorer.CreditsTom Wardill (original author) -https://github.com/tomwardillAndrew Plummer -https://github.com/plumdogJohn Carr -https://github.com/jc2kTapasweni Pathak -https://github.com/tapaswenipathakColin Watson -https://github.com/cjwatson
Package: fake-email
fake_emailto install:pipinstallfake-emailExamplefromfake_emailimportEmailmail=Email().Mail()print(mail)whileTrue:mass=Email(mail["session"]).inbox()ifmass:print(mass)breakFollow us on social media accountstelegram : @DIBIBl ; @TDTDIinstgram : @_v_gogithub :https://github.com/muntazir-halim
Package: fakefill
Airflow Fakefill MarkerDue to migrating to Kubernetes-host Airflow and using different backend, we need to find out a way to fill out all the history since its starting date for thousands of dags. To make this process going faster and easier, in the meantime, I didn't find this kind of tool on Github, so I implement this simple tool to help with marking dags assuccess.Hope it can also help others.InstallationsMethod 1$pipinstallfakefillMethod 2$pipinstallgit+https://git@github.com/benbenbang/airflow_fastfill.gitMethod 3$gitclonegit@github.com:benbenbang/airflow_fastfill.git
$cdairflow_fastfill
$pipinstall.Usages$fakefillIt takes 1 of 2 required argument, and 6 optional arguments. You can also define them in a yaml file and pass to the cli.OptionsRequired [1 / 2]:dag_id [-d][reqired]: can be a real dag id or "all" to fill all the dagsconfig_path [-cp][choose one]: path to the config yamlOptional:start_date [-sd]: starting date, default will be counted from 365 days agomaximum_day [-md]: maximum fill date per dag, rangint: [1, 180]maximum_unit [-mu]: maxium fill unit per dag, rangint: [1, 43200]ignore [-i]: still procceed auto fill even the dag ran recentlypause_only [-p]: pass true to fill dags which are pauseconfirm [-y]: pass true to bypass the prompt if dag_id is alltraceback [-v]: pass print our Airflow Database errorExamplesFill all the dags for the past 30 days without prompt, and only fill if all the dags which have status == pause$fakefill-dall-p-md30-yRun fastfill for dag id ==dag_aby counting default fakefill days == 365$fakefill-ddag_aRun fastfill with config yaml$fakefill-cpconfig.ymlThe yaml file needs to be defined with two dictonary types:dagsandsettings. Fordagssection, it needs to be alist, while thesettingssection isdictSample:dags:-dag_a-dag_b-dag_csettings:start_date:2019-01-01maximum:"365"traceback:falseconfirm:truepause_only:true
Package: fake-geo-images
fake-geo-imagesA module to programmatically create geotiff images which can be used for unit tests.The underlying idea is that in order to write unit tests for geospatial image processsing algorithms,
it is necessary to have an actual input image file or array. Organising these test images becomes a chore over time,
they should not be stored in git as they are large binary data and when stored outside, there always
is the danger that they are not updated according to changes in the code repo.fake-geo-imagesprovides a solution to the problem by providing simple code that allows to create
geospatial images (so far geotiffs) in a parameterised way.Install packagepipinstallfake-geo-imagesRun testspytestUsageIn the following an example unit test for a hypothetical NDVI function.importnumpyasnpimportrasterioasriofrompathlibimportPathfromrasterio.transformimportfrom_originfrommy_image_processingimportndvifromfake_geo_images.fakegeoimagesimportFakeGeoImagedeftest_ndvi():"""A unit test if an NDVI method works in general"""# Create 4-band image simulating RGBN as needed for NDVItest_image,_=FakeGeoImage(300,150,4,"uint16",out_dir=Path("/tmp"),crs=4326,nodata=0,nodata_fill=3,cog=False,).create(seed=42,transform=from_origin(13.428596,52.494384,0.000006,0.000006))ndvi_image=ndvi(test_image)withrio.open(str(ndvi_image))assrc:ndvi_array=src.read()# NDVI only has one band of same size as input bandsassertndvi_array.shape==(1,300,150)# NDVI has float values between -1 and 1assertndvi_array.dtype==np.floatassertndvi_array.min>=-1assertndvi_array.max<=1