semvec/pypi-packages huggingface dataset:
randstuff 0.0.5
Random functions and variables
Requires Python: >=2.7

This module provides some variables and functions for you to use.
## Installation
Run ```pip install randstuff```
## Examples
```py
import randstuff

randstuff.factors(8) # [1, 2, 4]
randstuff.multiples(8, 10) # [8, 16, 24, 32, 40, 48, 56, 64, ,72 80]
randstuff.digits # '0123456789'
randstuff.fizzbuzz(15) # ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', ']
```
## Documentation

### Functions
* ```factors(x) ==> list:integer```: returns the factors of 'x'
* ```multiples(x, t) ==> list:integer```: returns the first 't' multiples of 'x'
* ```fizzbuzz(x) ==> list:string```: returns a one to 'x' fizzbuzz
* ```listtostr(l, s=' ') ==> string```: returns 'l' as a string with 's' as buffer
* ```reverse(s) ==> string```: returns reversed 's'
* ```clear()```: clears the console
* ```animation(l, d=0.5)```: plays 'l' as an animation in console with the duration for each frame as 'd'
* ```option(argv, op, default=None) ==> string```: get sys.argv option. 'argv' to pass in sys.argv.
* ```randomletter(string) ==> string```: returns random letter from 'string'
* ```evenorodd(x) ==> string```: returns 'even' or 'odd' based on 'x'
* ```vowelcount(string) ==> dictionary```: returns vowel count of 'string'
* ```ispalindrome(string) ==> boolean```: if 'string' is a palindrome, it returns True,vice versa
* ```remove(string, char) ==> string```: removes 'char' from 'string'
* ```splitchar(string) ==> list:string```: splits 'string' every character
* ```alphabetcount(string) ==> dictionary```: returns alphabet count of 'string'
* ```numbercount(string) ==> dictionary```: returns number count of 'string'
* ```count(string, chars) ==> dictionary```: returns every instance of any char in 'chars' that is in 'string'
### Variables
* ```lowercase(string)```: all the lowercase letters
* ```uppercase(string)```: all the uppercase letters
* ```letters(string)```: all the letters(uppercase and lowercase)
* ```digits(string)```: all the digits
* ```whitspace(string)```: all the whitespaces
* ```ascii_digits(list:integer)```: all the digits in ascii
* ```ascii_lowercase(list:integer)```: all the lowercase letters in ascii
* ```ascii_uppercase(list:integer)```: all the uppercase letters in ascii
* ```ascii_letters(list:integer)```: all the letters in ascii
* ```bin_digits(list:string)```: all the digits in binary
* ```bin_lowercase(list:string)```: all the lowercase letters in binary
* ```bin_uppercase(list:string```: all the uppercase letters in binary
* ```bin_letters(list:string)```: all the letters in binary
* ```pi(float)```: archimedes' constant
* ```euler(float)```: euler's constant
* ```α(float)```: feigenbaum constants
* ```δ(float)```: feigenbaum constants
* ```apery(float)```: apéry's constant
* ```golden_ratio(float)```: the golden ratio
* ```euler_mascheroni(float)```: euler–Mmscheroni constant
* ```khinchin(float)```: khinchin's constant
* ```conway(float)```: conway's constant
* ```glaisher_kinkelin(float)```: glaisher–kinkelin constant
* ```vowels(string)```: all the vowels
datathief 0.3
Simple utility for extracting data from images
Keywords: data,imageextraction,thievery

=========
Datathief
=========

Small utility for retrieving data from figures. Inspired by the `Java package of the same name <https://datathief.org/>`__.


Installation
------------

The usual: ``pip install datathief``.


Usage
-----

Unlike the Java DataThief package and similar online tools, here the user **manually** annotates the figure with the data points of their choosing. This makes it more transparent how the data are being read and makes the results more reproducible. However, it might be annoying for a large amount of data. 

If you want to extract a lot of data, or extract data from a continuous line, you are better off using the original Java DataThief package, or one of the `many <http://www.graphreader.com/>`__ `online <https://automeris.io/WebPlotDigitizer/>`__ `tools <http://markummitchell.github.io/engauge-digitizer/>`__ that do exactly this.

To use this tool, first annotate the plot by adding a **single pixel** at the start and end of the x-axis in a specified color that does not exist anywhere else in the image (default color: pure blue). Do the same for the y-axis (default color: pure red). Then one pixel for each data point you wish to extract (default color: pure green). This function will then return the x and y coordinates of each data point. It will warn you if too many or too few pixels are detected.

For example, running this code:

.. code:: python

    import datathief as dt
    filename = 'du_fig1a_annotated.png'
    xlim = [-10, 20]
    ylim = [0, 15]
    data = dt.datathief(filename, xlim=xlim, ylim=ylim)

On this input (NB, you might need to zoom in to see the individual pixels):

|Input|

Extracts the data for this plot:

|Output|

See the examples folder for more information. (Figure courtesy Du et al., https://www.medrxiv.org/content/10.1101/2020.02.19.20025452v4) 

More questions? Email info@sciris.org.

.. |Input| image:: examples/du_fig1a_annotated.png 
.. |Output| image:: examples/example-output.png