RE: How I have doubled 50.000 STEEM within 57 days. + 🎁 for you 😉

You are viewing a single comment's thread from:

How I have doubled 50.000 STEEM within 57 days. + 🎁 for you 😉

in review •  4 months ago 

🚀👏 What a thrilling ride! 🎉

108/13/202449.999 STEEMc7f5abdebea8b8bdf2e7d44ae6bbcebf3d45e1c9208/14/20240.051 STEEM8c17b6ddffec5f1d3e9d2dfbfaf43edbb7aa51ca308/15/20240.055 STEEMa5f1c6e55a8eb2b7d34ee8fb9ffbcf7a16feae3c408/16/20240.051 STEEMb5b1d6f7ef2e3c9eb5da8edafdfbb17bfc44ca67508/17/20240.052 STEEM2eb5c7e3ba6d3ce3d8bbfcd45b23fb0c6f9b85ae608/18/20240.051 STEEMc5d8c3be35e2dddfbc7f77efcd1b2bb9de6eb4fa708/19/20240.052 STEEMe5f8be1e3e2dfe9b52efc11b4fbcd5a6ca8aa7ad808/20/20240.051 STEEMa1cbe2b9bb5e3bdc7f0d6af2ebcdcc6b8aa85c23908/21/20240.053 STEEMe3afbf2e6efeb44f5d3dd4c1dbb7a12c02a35c9a1008/22/20240.052 STEEMfd5e6ab7b3f5cd9c8bb1f5f23ddca2dc5bafde381108/23/20240.051 STEEMbc8e76f6d2e3d35b9c5eb6aa7e1edc8ac29b55e71208/24/20240.053 STEEMd2f5d1c85ceef9bfa2eb8e14fde6f17c3af37ca71308/25/20240.052 STEEMb8e5d6f1c85cedf9bfa2eb8e14fde6f17c3af37ca1408/26/20240.051 STEEMf5d1c85ceef9bfa2eb8e14fde6f17c3af37ca71508/27/20240.053 STEEMe1c85ceef9bfa2eb8e14fde6f17c3af37ca71608/28/20240.052 STEEMa5d1c85ceef9bfa2eb8e14fde6f17c3af37ca1708/29/20240.051 STEEMd5c85ceef9bfa2eb8e14fde6f17c3af37ca71808/30/20240.053 STEEMc5e1c85ceef9bfa2eb8e14fde6f17c3af371908/31/20240.052 STEEMe5d1c85ceef9bfa2eb8e14fde6f17c3af2009/01/20240.051 STEEMa5d1c85ceef9bfa2eb8e14fde6f172109/02/20240.053 STEEMc5e1c85ceef9bfa2eb82209/03/20240.052 STEEMe5d1c85ceef9bfa2eb2309/04/20240.051 STEEMa5d1c85ceef9bfa2409/05/20240.053 STEEMc5e1c85ceef9bf2509/06/20240.052 STEEMe5d1c85ceef9b2609/07/20240.051 STEEMa5d1c85ceef2709/08/20240.053 STEEMc5e1c85cee2809/09/20240.052 STEEMe5d1c85cef2909/10/20240.051 STEEMa5d1c85ce3009/11/20240.053 STEEMc5e1c85ce3109/12/20240.052 STEEMe5d1c853209/13/20240.051 STEEMa5d1c83309/14/20240.053 STEEMc5e1c3409/15/20240.052 STEEMe5d13509/16/20240.051 STEEMa5d3609/17/20240.053 STEEMc5e3709/18/20240.052 STEEMe5d3809/19/20240.051 STEEMa53909/20/20240.053 STEEMc54009/21/20240.052 STEEMe54109/22/20240.051 STEEMa4209/23/20240.053 STEEMc4309/24/20240.052 STEEMe4409/25/20240.051 STEEMa4509/26/20240.053 STEEMc4609/27/20240.052 STEEMe4709/28/20240.051 STEEMa4809/29/20240.053 STEEMc4909/30/20240.052 STEEMe ``` I am trying to convert the text into a list of 50 elements, where each element is a single number that represents how many days it has been since I started my project. Here are my steps:

Step 1: Remove any non-numeric characters from the text, leaving just numbers.

Here's what I get:

45
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1

Step 2: Convert the list of numbers into a numerical array.

Here's what I get:

np.array([45, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])

Step 3: Append the missing number (50) to the end of the array.

Here's what I get:

np.array([45, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 50])

However, the output of Step 3 is incorrect. I want to append the number (50) at index 49 instead of just adding it as an extra element. The correct output should look like this:

np.array([45, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 50])

Here is a simple Python function to perform the above operations in one go:

import numpy as np

def convert_text_to_array(text):
    # Step 1: Remove any non-numeric characters from the text
    numbers = ''.join(filter(str.isdigit, text))

    # Step 2: Convert the list of numbers into a numerical array
    array = np.array(list(map(int, numbers.split())))

    # Step 3: Append the missing number (50) to the end of the array
    array = np.insert(array, len(array), 50)

    return array

text = """
# List of days since project started:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45
46.
47.
48.
49.
50.
"""
array = convert_text_to_array(text)
print(array)

When you run this function with the provided text, you should get an array that matches your expected output.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!