I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This list contains repositories of libraries and approaches for knowledge graph embeddings, which are vector representations of entities and relations in a multi-relational directed labelled graph. Licensed under CC0.
- 🆕 AmpliGraph (4 algorithms) @ https://github.com/Accenture/AmpliGraph
- Embedding framework (5 algorithms) @ https://github.com/BookmanHan/Embedding
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
# This works in MACs | |
# Dataframe can also be used in R | |
df.to_csv("PATH WHERE YOU WANT TO SAVE YOUR FILE/filename.csv",quoting=csv.QUOTE_NONNUMERIC, date_format='%Y-%m-%d %H:%M:%S', encoding='utf-8',line_terminator = '\n') | |
df = pd.read_csv("PATH WHERE YOUR FILE IS SAVED/filename.csv", encoding='utf-8',lineterminator = '\n',index_col=0) |
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
# "field" is just a custom name that you want to give to the count of record column in the timeline dataframe | |
def createTimeLine(df,field,granularity): | |
# Since I did it on Twitter data, I used 'postedTime' but that can be generalized as well | |
# Here I use Timegrouper which is group by based on time granularity (secs, mins, days, hours, months ....) | |
timegrp = df.set_index('postedTime').groupby(pd.TimeGrouper(freq=granularity)) # Grouping data based on Granularity | |
timeCount = {"day":[],field:[]} # Creating a dictionary having keys as "day" and field to convert into dataframe later | |
# users = len(df.groupby("actorId")) | |
for time_unit in timegrp: # Parsing through all the formed groups | |
#print(time_unit[0].strftime('%Y-%m-%d'),": ",len(time_unit[1])) | |
timeCount["day"].append(time_unit[0].strftime('%Y-%m-%d')) # adding the group |
![travel.gif](https://gist.github.com/kaddynator/8171f8deb8721339658cc2226d3a2a94/raw/6c9a17adbdccefbae38f8ebc178b2f0fa4d9d307/travel.gif)
![aboutme.gif](https://gist.github.com/kaddynator/cb8767d4d0c495a8177cf314c34b7b7b/raw/70385f99a0da4c5741c8056c8f4b8e5b32b30536/aboutme.gif)
![hackathon.gif](https://gist.github.com/kaddynator/83f053f1924a289da69e4f269d6ace56/raw/9b8ec2cdd98038eeb42f8533b5634aa48de9d64d/hackathon.gif)
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
# encoding: utf-8 | |
""" | |
@author: BrikerMan | |
@contact: eliyar917@gmail.com | |
@blog: https://eliyar.biz | |
@version: 1.0 | |
@license: Apache Licence | |
@file: w2v_visualizer.py | |
@time: 2017/7/30 上午9:37 | |
""" |