Skip to content

Instantly share code, notes, and snippets.

@sverhoeven
sverhoeven / spec.json
Created September 11, 2020 09:53
newtonraphson-equation
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"width": 800,
"height": 600,
"title": {"text": "2x^3 - 4x^2 + 6", "fontSize": 20, "fontWeight": "normal"},
"layer": [
{
"data": {"sequence": {"start": -4, "stop": 4, "step": 0.1, "as": "x"}},
"transform": [
{
@sverhoeven
sverhoeven / spec.json
Last active September 3, 2020 13:46
newtonraphson-iterations
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"width": 800,
"height": 600,
"layer": [
{
"data": {"sequence": {"start": -20, "stop": 20, "step": 0.1, "as": "x"}},
"transform": [
{
"calculate": "datum.x * datum.x * datum.x - datum.x * datum.x + 2",
[tool.poetry]
name = "evaluate-gc"
version = "0.1.0"
description = ""
authors = ["Stefan Verhoeven <stefan.verhoeven@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.6"
celery = {extras = ["redis"], version = "^4.4.5"}
@sverhoeven
sverhoeven / README.md
Last active June 4, 2020 06:34
entangled tangle not working

Snippet

date
def simfun1(factor=3.0):
# just some nonsense to demonstrate usage of a parameter
# when comparing 2 spectrums
def implementation(spectrum, reference_spectrum):
print(spectrum)
print(reference_spectrum)
print(factor)
return (max(spectrum) + max(reference_spectrum) ) * factor;
#!/usr/bin/env python3
import argparse
import os
import yaml
from ecmwfapi import ECMWFDataServer
parser = argparse.ArgumentParser(description='''
Script to download era-interim files so it can be cmorized and used by esmvaltool recipes.
@sverhoeven
sverhoeven / README.md
Last active April 25, 2018 16:07
rsd-install steps
. ~/miniconda3/bin/activate rsd
# in new shell
git clone git@github.com:research-software-directory/auth-github.git
cd auth-github
# Created Github oauth app with http://localhost:8000 as callback
# Filled .env with random JWT_SECRET and GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET
pip install -r requirements.txt 
export $(cat .env | xargs)
python app.py
"""Script to swap donor/acceptor in pharmacophore database file
original enum is
Enum({'LIPO': 0, 'POSC': 1, 'HACC': 4, 'NEGC': 2, 'AROM': 5, 'HDON': 3})
corrected enum is
Enum({'LIPO': 0, 'POSC': 1, 'HACC': 3, 'NEGC': 2, 'AROM': 5, 'HDON': 4})
"""
import sys
@sverhoeven
sverhoeven / README.md
Last active November 30, 2017 14:13
eEcology-Annotation-demo for odessei
@sverhoeven
sverhoeven / align-pharmacophore-pair.ipynb
Created June 23, 2017 09:08
Align 2 kripo pharmacophores and transform
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.