Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
silkaj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
silkaj
Commits
a18f3354
Commit
a18f3354
authored
6 years ago
by
Moul
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev_mato' into 'dev'
#122
: display relative to average money share See merge request
!96
parents
f5e8c097
5374bd30
No related branches found
No related tags found
1 merge request
!96
#122: display relative to average money share
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
silkaj/money.py
+18
-1
18 additions, 1 deletion
silkaj/money.py
with
18 additions
and
1 deletion
silkaj/money.py
+
18
−
1
View file @
a18f3354
...
@@ -33,6 +33,7 @@ def show_amount_from_pubkey(pubkey, value):
...
@@ -33,6 +33,7 @@ def show_amount_from_pubkey(pubkey, value):
currency_symbol
=
CurrencySymbol
().
symbol
currency_symbol
=
CurrencySymbol
().
symbol
ud_value
=
UDValue
().
ud_value
ud_value
=
UDValue
().
ud_value
average
,
monetary_mass
=
get_average
()
if
totalAmountInput
-
amount
!=
0
:
if
totalAmountInput
-
amount
!=
0
:
print
(
"
Blockchain:
"
)
print
(
"
Blockchain:
"
)
print
(
"
-----------
"
)
print
(
"
-----------
"
)
...
@@ -61,9 +62,25 @@ def show_amount_from_pubkey(pubkey, value):
...
@@ -61,9 +62,25 @@ def show_amount_from_pubkey(pubkey, value):
"
UD
"
,
"
UD
"
,
currency_symbol
,
currency_symbol
,
)
)
print
(
"
Total Quantitative =
"
,
round
(
totalAmountInput
/
100
,
2
),
currency_symbol
)
print
(
print
(
"
Total Quantitative =
"
,
round
(
totalAmountInput
/
100
,
2
),
currency_symbol
+
"
\n
"
"
Total Relative to average money share =
"
,
round
(
totalAmountInput
/
average
,
2
),
"
× M/N
"
,
)
)
print
(
"
Total Relative to monetary mass =
"
,
round
((
totalAmountInput
/
monetary_mass
)
*
100
,
3
),
"
% M
"
+
"
\n
"
,
)
def
get_average
():
head
=
HeadBlock
().
head_block
monetary_mass
=
head
[
"
monetaryMass
"
]
members_count
=
head
[
"
membersCount
"
]
average
=
monetary_mass
/
members_count
return
average
,
monetary_mass
def
get_amount_from_pubkey
(
pubkey
):
def
get_amount_from_pubkey
(
pubkey
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment