Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
infrastructure
Hackspace Device Info
Commits
da052bd7
Commit
da052bd7
authored
May 21, 2014
by
Markus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified hack_count added requirementsfile
parent
9cb69ea6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
hack_count
hack_count
+7
-1
requirements.txt
requirements.txt
+1
-0
No files found.
hack_count
View file @
da052bd7
...
...
@@ -32,7 +32,12 @@ if __name__ == '__main__':
while
True
:
##fetch usercount
var
=
urllib
.
urlopen
(
"http://hack-hro.de/api/users"
)
device_count
=
json
.
loads
(
var
.
read
().
decode
())[
'deviceCount'
]
#var = urllib.urlopen("http://172.16.42.107:3000/api/users")
json_string
=
var
.
read
()
json_dict
=
json
.
loads
(
json_string
)
device_count
=
json_dict
[
'deviceCount'
]
users
=
json_dict
[
'users'
]
#####create cache folder if not exsits####
...
...
@@ -43,6 +48,7 @@ if __name__ == '__main__':
####fetch cached vals
try
:
cached_data_dict
=
json
.
loads
(
open
(
CACHE_PATH
).
read
())
count_changed
=
False
except
:
open
(
CACHE_PATH
,
'a'
).
close
()
cached_data_dict
=
{
...
...
requirements.txt
0 → 100644
View file @
da052bd7
notify2
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment