Skip to content

Instantly share code, notes, and snippets.

View captainjackrana's full-sized avatar

Yashveer Rana captainjackrana

  • Bangalore, India
View GitHub Profile
@captainjackrana
captainjackrana / electrical_conductivity_ml.py
Last active October 21, 2021 22:02
Routine for predicting electrical conductivity of materials using the matminer library.
from matminer.datasets import load_dataset
from pymatgen.core import Composition
from matminer.featurizers.structure import DensityFeatures
from matminer.featurizers.conversions import StrToComposition
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_absolute_error
from sklearn.dummy import DummyRegressor
import pprint
from automatminer import MatPipe
@captainjackrana
captainjackrana / weighted-page-rank.cypher
Last active December 2, 2017 07:19
Weighted Page Rank Algorithm in Neo4j using Cypher
/* we have to go through all nodes */
MATCH (node:Page)
WITH
COLLECT(distinct node) AS pages
UNWIND pages as dest
/* let's find all source citations for a given node */
MATCH (source:Page)-[:NEXT]->(dest)
WITH
COLLECT(DISTINCT source) AS sources,
dest AS dest