Skip to content

Instantly share code, notes, and snippets.

View kaddynator's full-sized avatar
Coffee and Poisoning Deep Models

Karthik Ravi kaddynator

Coffee and Poisoning Deep Models
View GitHub Profile
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active July 20, 2024 16:44
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

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!






\

@mommi84
mommi84 / awesome-kge.md
Last active July 4, 2024 09:07
Awesome Knowledge Graph Embedding Approaches

Awesome Knowledge Graph Embedding Approaches

Awesome

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.

Libraries

# 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)
@sagarnanduunc
sagarnanduunc / Creating timeline of pandas data frame based on time granularity using Time Grouper
Last active June 19, 2018 04:21
Grouping data in pandas based on date based column. Grouping can be done based on [seconds, hours, minutes, days, months and even years]. Results in a Time vs count data frame
# "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
@kaddynator
kaddynator / travel.gif
Last active June 26, 2019 21:14
My Travel
travel.gif
@kaddynator
kaddynator / social_media.gif
Last active June 26, 2019 20:53
social_media
social_media.gif
@kaddynator
kaddynator / aboutme.gif
Last active June 26, 2019 20:49
About_Me
aboutme.gif
@kaddynator
kaddynator / hackathon.gif
Last active June 26, 2019 21:13
Hackathons
hackathon.gif
# 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
"""