Skip to content

Instantly share code, notes, and snippets.

View jessienewell's full-sized avatar

Jessie N jessienewell

  • GetStream.io
  • Colorado
View GitHub Profile
"config": {
   "zf": {
       "component": "GetStream\\Stream"
   }
},
<?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'),
return [
   ...
   'GetStream\Zend',
];
@jessienewell
jessienewell / composer.sh
Last active January 25, 2018 22:32
Composer
composer require get-stream/stream-zend
#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)
$ 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:
$ 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:
import random
all_images = top_graph_img + images_top_tags
for image in random.sample(all_images, 6):
display(image)
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)
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():