This file contains hidden or 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
| // dataset = ds | |
| // Deleting all the nodes | |
| MATCH (n) | |
| DETACH DELETE n; | |
| // Deleteing all the edges | |
| MATCH ()-[r]->() | |
| DELETE r; |
This file contains hidden or 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
| # Download the 'train_embeddings.pkl' from https://files.fm/f/76h5d4229 | |
| # Run the code in the folder where 'train_embeddings.pkl' is located. | |
| import io | |
| import compress_pickle as pickle | |
| import numpy as np | |
| import tensorflow as tf | |
| from keras import Sequential | |
| from keras.callbacks import ModelCheckpoint, ReduceLROnPlateau, EarlyStopping |
This file contains hidden or 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
| \RequirePackage{tikz} | |
| \documentclass[varwidth]{standalone} | |
| \usepackage{import} | |
| \usepackage{pgfplots} | |
| \usepgfplotslibrary{groupplots} | |
| \pgfplotsset{compat=newest} |
This file contains hidden or 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
| -- Dataset available from http://multimedia-commons.s3-website-us-west-2.amazonaws.com/?prefix=tools/etc/ in Sqlite3 database format ('yfcc100m_dataset.sql' file) | |
| SET NAMES utf8; | |
| SET time_zone = '+00:00'; | |
| SET foreign_key_checks = 0; | |
| SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; | |
| DROP TABLE IF EXISTS `yfcc100m_dataset`; | |
| CREATE TABLE `yfcc100m_dataset` ( | |
| `photoid` int NOT NULL, |
This file contains hidden or 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
| # Loading PySpark modules | |
| from pyspark.sql import DataFrame | |
| from pyspark.sql.types import * | |
| #from pyspark.context import SparkContext | |
| #from pyspark.sql.session import SparkSession | |
| # sc = SparkContext('local') | |
| # spark = SparkSession(sc) |
This file contains hidden or 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
| -- 'xxx.stackexchange.com' is the name of the database | |
| -- `xxx.stackexchange.com`.badges definition | |
| CREATE TABLE `badges` ( | |
| `Id` int(11) NOT NULL, | |
| `UserId` int(11) NOT NULL, | |
| `Name` varchar(30) NOT NULL, | |
| `Date` datetime NOT NULL, | |
| `Class` int(11) NOT NULL, |
This file contains hidden or 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
| // Loading the posts | |
| LOAD CSV WITH HEADERS FROM 'file:///posts_all_csv.csv' AS row | |
| WITH toInteger(row[0]) AS postId, row[5] AS postBody, toInteger(row[3]) AS postScore | |
| RETURN count(row); | |
| LOAD CSV WITH HEADERS FROM 'file:///posts_all_csv.csv' AS row FIELDTERMINATOR '\t' | |
| WITH row[0] AS postId, row[3] AS postScore, row[5] AS postBody | |
| MERGE (p:Post {postId: postId}) | |
| SET p.postBody = postBody, p.postScore = postScore | |
| RETURN p; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| a | |
| about | |
| above | |
| after | |
| again | |
| against | |
| ain | |
| all | |
| am | |
| an |