mirror of
https://github.com/metafy-social/python-scripts.git
synced 2025-02-20 07:12:05 +00:00
Merge pull request #140 from NishantPacharne/master
Added a new fake data generator script
This commit is contained in:
commit
2fb6e91b7b
32
README.md
32
README.md
|
@ -181,6 +181,13 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<sub><b>Null</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/NishantPacharne">
|
||||
<img src="https://avatars.githubusercontent.com/u/71060551?v=4" width="100;" alt="NishantPacharne"/>
|
||||
<br />
|
||||
<sub><b>Nishant Pacharne</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/thegeekyb0y">
|
||||
<img src="https://avatars.githubusercontent.com/u/84658112?v=4" width="100;" alt="thegeekyb0y"/>
|
||||
|
@ -208,15 +215,15 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<br />
|
||||
<sub><b>Siddhesh Bhupendra Kuakde</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/aswin2108">
|
||||
<img src="https://avatars.githubusercontent.com/u/72661784?v=4" width="100;" alt="aswin2108"/>
|
||||
<br />
|
||||
<sub><b>Aswin Shailajan</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/noobyysauraj">
|
||||
<img src="https://avatars.githubusercontent.com/u/81681419?v=4" width="100;" alt="noobyysauraj"/>
|
||||
|
@ -251,15 +258,15 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<br />
|
||||
<sub><b>Heshanthaka</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Mysterious-Owl">
|
||||
<img src="https://avatars.githubusercontent.com/u/66870959?v=4" width="100;" alt="Mysterious-Owl"/>
|
||||
<br />
|
||||
<sub><b>Mysterious-Owl</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/sarthakroy2002">
|
||||
<img src="https://avatars.githubusercontent.com/u/47187468?v=4" width="100;" alt="sarthakroy2002"/>
|
||||
|
@ -294,15 +301,15 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<br />
|
||||
<sub><b>Yash Nilesh Brid</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/mclmza">
|
||||
<img src="https://avatars.githubusercontent.com/u/7353871?v=4" width="100;" alt="mclmza"/>
|
||||
<br />
|
||||
<sub><b>Michele Mazza</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/mer747">
|
||||
<img src="https://avatars.githubusercontent.com/u/84189502?v=4" width="100;" alt="mer747"/>
|
||||
|
@ -330,13 +337,6 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
|
|||
<br />
|
||||
<sub><b>Sameer Sahu</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/NishantPacharne">
|
||||
<img src="https://avatars.githubusercontent.com/u/71060551?v=4" width="100;" alt="NishantPacharne"/>
|
||||
<br />
|
||||
<sub><b>Nishant Pacharne</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!-- readme: contributors -end -->
|
22
scripts/Fake Data Generator/generator.py
Normal file
22
scripts/Fake Data Generator/generator.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# pip install Faker
|
||||
from faker import Faker
|
||||
|
||||
fake = Faker()
|
||||
|
||||
print("--------- Generate ---------------")
|
||||
print("1. Name")
|
||||
print("2. Email")
|
||||
print("3. Job")
|
||||
print("4. Address")
|
||||
|
||||
options = {1: fake.name(), 2: fake.email(), 3: fake.job(), 4: fake.address()}
|
||||
|
||||
print("----------------------------------")
|
||||
user_input = int(input("Choose Option:- "))
|
||||
|
||||
print("----------------------------------")
|
||||
|
||||
if user_input in options:
|
||||
print(f"Result: {options[user_input]}")
|
||||
else:
|
||||
print("Please try again with a valid option.")
|
15
scripts/Fake Data Generator/readme.md
Normal file
15
scripts/Fake Data Generator/readme.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
|
||||
# Fake Data Generator
|
||||
super easy and simple python script to generate random data
|
||||
|
||||
## Perfect for beginners
|
||||
- usage of libraries
|
||||
- working with input
|
||||
- working with dictionaries
|
||||
|
||||
## Installation
|
||||
Install the dependencies
|
||||
|
||||
```sh
|
||||
pip install -r requirements.txt
|
||||
```
|
3
scripts/Fake Data Generator/requirements.txt
Normal file
3
scripts/Fake Data Generator/requirements.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Faker==15.0.0
|
||||
python-dateutil==2.8.2
|
||||
six==1.16.0
|
Loading…
Reference in New Issue
Block a user