Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tor-circumvention-analytics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
tor-circumvention-analytics
Commits
1ed29404
Verified
Commit
1ed29404
authored
7 years ago
by
Torsten Grote
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit
parents
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
countries-that-block-tor.py
+20
-0
20 additions, 0 deletions
countries-that-block-tor.py
with
20 additions
and
0 deletions
countries-that-block-tor.py
0 → 100755
+
20
−
0
View file @
1ed29404
#!/usr/bin/env python3
import
csv
import
urllib.request
import
codecs
url
=
'
http://labs.ooni.io/data/vanilla-tor/20171130-vanilla_tor-stats.csv
'
stream
=
urllib
.
request
.
urlopen
(
url
)
data
=
csv
.
DictReader
(
codecs
.
iterdecode
(
stream
,
'
utf-8
'
))
blocked_countries
=
[]
for
row
in
data
:
if
int
(
row
[
'
total_count
'
])
<
5
:
continue
if
float
(
row
[
'
success_perc
'
])
>
0.5
:
continue
blocked_countries
.
append
(
row
[
'
probe_cc
'
])
print
(
blocked_countries
)
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