Skip to content

Instantly share code, notes, and snippets.

View mpds's full-sized avatar
👾

Matheus Müller mpds

👾
  • National Laboratory for Scientific Computing (LNCC/MCTI)
  • Rio de Janeiro, Brazil
View GitHub Profile
@mpds
mpds / voxel_grid_mol_representation.ipynb
Last active November 24, 2022 05:06
Represent molecules with voxel grids
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mpds
mpds / CustomizeFileUpload.gs
Last active March 3, 2023 19:03
Organize file uploads from Google Forms
/**
* Crie uma nova pasta no Drive e mude PARENT_FOLDER_ID para o ID da nova pasta.
*
* Cada resposta do formulário terá uma subpasta específica dentro de PARENT_FOLDER_ID,
* onde serão salvos todos os arquivos de upload daquela resposta.
*
* O nome de cada subpasta será definido como a resposta de alguma das perguntas do formulário.
* Mude o valor da variável FOLDER_NAME para o título da pergunta desejada, e.g.:
* FOLDER_NAME = 'EMAIL'; dessa forma cada pasta será nomeada com o e-mail do respondente.
*
@mpds
mpds / cut_binding_pocket.py
Last active April 20, 2023 19:10
Extract and export the protein binding pocket
"""Extract and export the protein binding pocket.
Use `python cut_pocket.py -h` for info.
"""
from typing import List, TextIO
import argparse
import numpy as np # python3 -m pip install numpy
def configure_argparser() -> argparse.ArgumentParser:
@mpds
mpds / 0101_perceptron.py
Last active October 13, 2021 02:19
Item 1 - Perceptron
import numpy as np
def generate_dataset(N: int, p1: list, p2: list, seed: int = 42):
"""Generate a random dataset with size N from p1 and p2."""
p1_ = np.tile(p1, reps=int(N // 2)).reshape(N // 2, 2)
p2_ = np.tile(p2, reps=int(N // 2)).reshape(N // 2, 2)
rng = np.random.default_rng(seed) # random number generator