This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"config": { | |
"zf": { | |
"component": "GetStream\\Stream" | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
'stream' => [ | |
// Heroku connection url: | |
'url' => getenv('STREAM_URL'), | |
// Just regular key and secret found in your app dashboard: https://getstream.io/dashboard | |
'app_key' => getenv('STREAM_APP_KEY'), | |
'app_secret' => getenv('STREAM_APP_SECRET'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return [ | |
... | |
'GetStream\Zend', | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer require get-stream/stream-zend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create social graph and calculate pagerank | |
G = nx.from_pandas_dataframe(df_global, 'src_id', 'dst_id') | |
#calculate personalized pagerank | |
perzonalization_dict = dict(zip(G.nodes(), [0]*len(G.nodes()))) | |
perzonalization_dict[user_id] = 1 | |
ppr = nx.pagerank(G, personalization=perzonalization_dict) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ dig crates.io @ns-a4.io +norecurse | |
; <<>> DiG 9.11.2 <<>> crates.io @ns-a4.io +norecurse | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 43223 | |
;; flags: qr aa; QUERY: 1, ANSWER: 0, AUTHORITY: 1, | |
ADDITIONAL: 1 | |
;; OPT PSEUDOSECTION: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ dig crates.io @ns-a1.io +norecurse | |
; <<>> DiG 9.11.2 <<>> crates.io @ns-a1.io +norecurse | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18874 | |
;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 3, | |
ADDITIONAL: 1 | |
;; OPT PSEUDOSECTION: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
all_images = top_graph_img + images_top_tags | |
for image in random.sample(all_images, 6): | |
display(image) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
images_top_tags = [] | |
for tag in top_tags.index: | |
img = Image(top_tags.loc[tag]['urls'], format='jpeg') | |
display(img) | |
print(tag) | |
images_top_tags.append(img) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interest_dict = {} | |
for tag in top_hashtags.index: | |
api.getHashtagFeed(tag) | |
result = api.LastJson | |
interest_dict[tag] = result | |
urls = [] | |
num_likes = [] | |
tags = [] | |
for tag in interest_dict.keys(): |
NewerOlder