Skip to content

Instantly share code, notes, and snippets.

@rnaimehaom
rnaimehaom / howto-forward-x11-to-win10-via-putty-vcxsrv.md
Created September 29, 2022 15:02 — forked from vietlq/howto-forward-x11-to-win10-via-putty-vcxsrv.md
Code2Pro: How to Forward X11 to Windows 10 via PuTTY & vcxsrv

Code2Pro: How to Forward X11 to Windows 10 via PuTTY & vcxsrv

Scope

Tested on Windows 10 & Ubuntu 16.

Steps

  1. Check that sshd on Ubuntu is properly configured
@PatWalters
PatWalters / parallel_descriptors.py
Last active November 21, 2022 20:01
Calculate RDKit descriptors with Dask
#!/usr/bin/env python
import sys
import pandas as pd
import dask.dataframe as dd
from rdkit import Chem
from rdkit.Chem import Descriptors
import numpy as np
import time
import multiprocessing
@rosherbal
rosherbal / drugBank_tree_structure.txt
Last active April 1, 2025 05:31
Extract information from DrugBank xml file
DRUG
->drugbank-id
->drugbank-id
->drugbank-id
->name
->description
->cas-number (5)
->unii
->state
->groups
@amanjuman
amanjuman / SoftEther VPN for Ubuntu 16.04 & 18.04
Last active March 6, 2025 01:43
SoftEther VPN for Ubuntu Server
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
sudo apt -y install build-essential wget curl gcc make wget tzdata git libreadline-dev libncurses-dev libssl-dev zlib1g-dev
sudo wget https://www.softether-download.com/files/softether/v4.41-9787-rtm-2023.03.14-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-x64-64bit.tar.gz
tar xzf softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-x64-64bit.tar.gz && rm softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-x64-64bit.tar.gz
cd vpnserver && sudo make
cd ..
sudo mv vpnserver /usr/local && cd /usr/local/vpnserver/
sudo chmod 600 *
@nacnudus
nacnudus / data.table-joins.R
Created August 21, 2017 09:20
How to do joins with data.table
library(data.table)
?`[.data.table`
DT <- data.table(x=rep(c("b","a","c"),each=3), y=c(1,3,6), v=1:9)
X <- data.table(x=c("c","b"), v=8:7, foo=c(4,2))
colnames(DT)
# [1] "x" "y" "v"
@leelasd
leelasd / convert_molecules.py
Created March 2, 2017 01:55
Convert Smiles code to 3D and save to SDF
import pandas as pd
from rdkit import Chem
from rdkit.Chem import AllChem
df = pd.read_csv('SMILES.csv')
mols = [Chem.MolFromSmiles(smi) for smi in df.SMILES]
hmols = [Chem.AddHs(m) for m in mols]
for mol in hmols:
AllChem.EmbedMolecule(mol,AllChem.ETKDG())
print(AllChem.UFFOptimizeMolecule(mol,1000))
smiles = list(df.SMILES)