Packed with features that the author, Osada, wants to use.
Project description
osada 1.2.1
Install
pip install osada
Description
This is a module for my own use.
It has some useful features to solve what I usually find troublesome. Please use it if you like.
The functions are as follows.
- Colored print
- Generation of sequence
If I'm writing Python and find it annoying, I'll add function more.
Usage
import osada
-
Colored print
osada.cprint(string, color, background, end, bloom, **kwarg)
osada.cprint("hello!", "orange", "white")
# # The writing below is the same as the sentence above
# osada.cprint("hello!", "ff8844", "ffffff")
# osada.cprint("hello!", color="ff8844", background="ffffff")
osada.colored(string, color, background, bloom)
print(f"The three primary colors of light are \
{osada.colored('red', color='red')}, \
{osada.colored('green', color='green')}、\
{osada.colored('blue', color='blue')}.")
-
Generation of sequence
osada.array(inf, sup, number)
inf : start number
sup : end number
number : element count
osada.array(1, 2, 2)
# [1.0, 2.0]
osada.array(1, 2, 5)
# [1.0, 1.25, 1.5, 1.75, 2.0]
osada.array(1, 2, 11)
# [1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7000000000000002, 1.8, 1.9, 2.0]
osada.randomArray(inf, sup, number, isint)
inf : start number
sup : end number
number : element count
isint : is integer value
osada.randomArray(0, 1, 5)
# [0.8081470327591642, 0.8900165197747789, 0.3057814178026007, 0.005010722833622361, 0.7636094070498007]
osada.array(1, 10, 10, True)
# [5, 8, 2, 10, 9, 4, 10, 3, 5, 6]
osada.Mahjong.calc_reward(fu, han, oya, tsumo)
osada.beep(frequency, duration)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file osada-1.2.1.tar.gz.
File metadata
- Download URL: osada-1.2.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f3391fcb16291475c301ab4869338d44620aee9318a1f9e2ad649add81c515e
|
|
| MD5 |
458a37ff768fef839b931a84aca67970
|
|
| BLAKE2b-256 |
6a0b343c0ecac2df944d485d096cb449f9ae03df59377fac5d6eeaf2cc6cb02b
|
File details
Details for the file osada-1.2.1-py3-none-any.whl.
File metadata
- Download URL: osada-1.2.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8117813c65bb25d45617b0924da274b43d03da2124714b5f4bdabc1f87b14fef
|
|
| MD5 |
0d6f18075e1d80f92d24000188cccba6
|
|
| BLAKE2b-256 |
838d9f0e1a92042cf95b6ca627aebcaed0e478d86e550c42dbc0c963138a8a99
|