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
| import pyspark.sql.functions as F | |
| from pyspark import SparkConf | |
| from pyspark.sql import SparkSession | |
| sparkConf = SparkConf() | |
| sparkConf = sparkConf.set('spark.hadoop.fs.gs.requester.pays.mode', 'AUTO') | |
| sparkConf = sparkConf.set('spark.hadoop.fs.gs.requester.pays.project.id', | |
| 'open-targets-eu-dev') | |
| # establish spark connection |
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
| library(tidyverse) | |
| library(cowplot) | |
| library(ggrepel) | |
| df <- bind_rows( | |
| read_csv("~/Projects/ot-release-metrics/data/21.06.5.csv"), | |
| read_csv("~/Projects/ot-release-metrics/data/21.09.2.csv") | |
| ) | |
| df %>% |
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
| import pyspark.sql.functions as F | |
| from pyspark import SparkConf | |
| from pyspark.sql import SparkSession | |
| from pyspark.sql.window import Window | |
| sparkConf = SparkConf() | |
| sparkConf = sparkConf.set('spark.hadoop.fs.gs.requester.pays.mode', 'AUTO') | |
| sparkConf = sparkConf.set('spark.hadoop.fs.gs.requester.pays.project.id', | |
| 'open-targets-eu-dev') |
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
| library("tidyverse") | |
| library("googleAnalyticsR") | |
| library("zoo") | |
| library("lubridate") | |
| date_range <- c("2019-01-01", as.character(Sys.Date() - 1)) | |
| # Authorisation | |
| ga_auth() |
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
| from pymol import cmd | |
| cmd.load("/Users/ochoa/Downloads/AF-Q9HC29-F1-model_v1.cif") | |
| cmd.bg_color("grey95") | |
| cmd.set_color("veryHigh", [0, 83, 214]) | |
| cmd.set_color("confident", [101, 203, 243]) | |
| cmd.set_color("low", [255, 219, 19]) | |
| cmd.set_color("veryLow", [255, 125, 69]) |
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
| import pyspark.sql.functions as F | |
| from pyspark import SparkConf | |
| from pyspark.sql import SparkSession | |
| sparkConf = SparkConf() | |
| spark = ( | |
| SparkSession.builder | |
| .config(conf=sparkConf) |
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
| import pyspark.sql.functions as F | |
| from pyspark import SparkConf | |
| from pyspark.sql import SparkSession | |
| sparkConf = SparkConf() | |
| sparkConf = sparkConf.set('spark.hadoop.fs.gs.requester.pays.mode', 'AUTO') | |
| sparkConf = sparkConf.set('spark.hadoop.fs.gs.requester.pays.project.id', 'open-targets-eu-dev') | |
| spark = ( | |
| SparkSession.builder |
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
| import pyspark.sql.functions as F | |
| from pyspark import SparkConf | |
| from pyspark.sql import SparkSession | |
| sparkConf = SparkConf() | |
| spark = ( | |
| SparkSession.builder | |
| .config(conf=sparkConf) | |
| .master('local[*]') |
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
| from pyspark.sql import SparkSession | |
| from pyspark.context import SparkContext | |
| from pyspark.sql import functions as F | |
| from pyspark.ml.feature import Word2VecModel | |
| from pyspark.sql.types import DoubleType | |
| from pyspark.ml.feature import Normalizer | |
| # establish spark connection | |
| spark = ( | |
| SparkSession.builder |
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
| #!/usr/bin/env python3 | |
| # Import relevant libraries for HTTP request and JSON formatting | |
| import requests | |
| import json | |
| # Set gene_id variable | |
| gene_id = "ENSG00000244734" | |
| # Build query string |