Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Blockchain Forensics using OSINT and Graph Temporal Logic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mohamed feroz khan D
Blockchain Forensics using OSINT and Graph Temporal Logic
Commits
91d1d2ad
Commit
91d1d2ad
authored
Jun 9, 2023
by
Mohamed feroz khan D
Browse files
Options
Downloads
Patches
Plain Diff
Syncing with Github project repo
parent
34e4ea40
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Assets/Temporal_Graph/Bitcoin/Bitcoin_Code_Style/Bitcoin_code_style.py
+76
-0
76 additions, 0 deletions
...al_Graph/Bitcoin/Bitcoin_Code_Style/Bitcoin_code_style.py
with
76 additions
and
0 deletions
Assets/Temporal_Graph/Bitcoin/Bitcoin_Code_Style/Bitcoin_code_style.py
0 → 100644
+
76
−
0
View file @
91d1d2ad
####################################################################################################################
# Program Name : code_style.py
# Description : Python code for Temporal Graph Visualisation
# Author : Mohamed Feroz Khan and Ramaguru sir
# Created Date : 27-Nov-2022
# Last Updated : 13-April-2023
# Execution : Python code_style.py
####################################################################################################################
import
networkx
as
nx
import
matplotlib.pyplot
as
plt
import
pandas
as
pd
import
pathpy
as
pp
df
=
pd
.
read_excel
(
'
Backup_BCT_BTC_500.xlsx
'
)
t
=
pp
.
TemporalNetwork
()
[
t
.
add_edge
(
df
[
'
address
'
][
i
],
df
[
'
balance
'
][
i
],
int
(
df
[
'
time
'
][
i
]))
for
i
in
range
(
len
(
df
))]
# style for first node
style1
=
{
'
ts_per_frame
'
:
1
,
'
ms_per_frame
'
:
2000
,
'
look_ahead
'
:
2
,
'
look_behind
'
:
2
,
'
node_size
'
:
15
,
'
inactive_edge_width
'
:
2
,
'
active_edge_width
'
:
4
,
'
label_color
'
:
'
#ffffff
'
,
'
label_size
'
:
'
24px
'
,
'
label_offset
'
:
[
0
,
5
],
'
active_node_color
'
:
'
#003800
'
}
# style for second node
style2
=
{
'
ts_per_frame
'
:
1
,
'
ms_per_frame
'
:
2000
,
'
look_ahead
'
:
2
,
'
look_behind
'
:
2
,
'
node_size
'
:
15
,
'
inactive_edge_width
'
:
2
,
'
active_edge_width
'
:
4
,
'
label_color
'
:
'
#ffffff
'
,
'
label_size
'
:
'
24px
'
,
'
label_offset
'
:
[
0
,
5
],
}
stylenode
=
{
'
ts_per_frame
'
:
1
,
'
ms_per_frame
'
:
2000
,
'
look_ahead
'
:
2
,
'
look_behind
'
:
2
,
'
node_size
'
:
15
,
'
inactive_edge_width
'
:
2
,
'
active_edge_width
'
:
4
}
# loop and style for the node
i
=
0
for
i
in
range
(
len
(
df
)):
if
df
[
'
time
'
][
i
]
==
1
:
pp
.
visualisation
.
plot
(
t
,
**
style1
)
elif
df
[
'
time
'
][
i
]
==
2
:
pp
.
visualisation
.
plot
(
t
,
**
style2
)
else
:
pp
.
visualisation
.
plot
(
t
,
**
style1
)
# visualisation for the given dataset
pp
.
visualisation
.
export_html
(
t
,
'
my_temporal_network_sample.html
'
)
\ No newline at end of file
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