Skip to content

Instantly share code, notes, and snippets.

@sishida21
sishida21 / get_file_from_google_drive.sh
Created March 5, 2019 03:11
Shell script for downloading file from Google Drive.
#!/bin/bash
# Description:
# * Download big size file from Google Drive. To use, specify FILE_ID and OUTPUT.
# * This script is based on the following link. [https://qiita.com/namakemono/items/c963e75e0af3f7eed732]
FILE_ID="FILE ID"
OUTPUT="OUTPUT FILE NAME"
curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=${FILE_ID}" > /dev/null
CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)"
curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=${FILE_ID}" -o ${OUTPUT}
@sishida21
sishida21 / get_summary.py
Created March 5, 2019 03:23
Script for getting the summary of the chemical data set.
"""
File name: get_summary.py
Author: Shoichi Ishida
Description: Script for getting the summary of the chemical data set.
Date: 5 March 2019
"""
import argparse
import pandas as pd
@sishida21
sishida21 / template.md
Created June 30, 2019 13:10
README template.

Repository Name

Dependency

  • language: version
  • library: version

Setup

Usage

@sishida21
sishida21 / draw_molecule.py
Created January 7, 2020 07:44
Draw a molecule in a black color using RDkit.
from IPython.display import SVG
from rdkit import Chem
from rdkit.Chem import rdDepictor
from rdkit.Chem.Draw import rdMolDraw2D
from rdkit.Chem.Draw.MolDrawing import DrawingOptions
mol = Chem.MolFromSmiles("CC1(C(N2C(S1)C(C2=O)NC(=O)CC3=CC=CC=C3)C(=O)O)C") # Penicillin
rdDepictor.Compute2DCoords(mol) # for generating conformer ID
# create a drawer container
drawer = rdMolDraw2D.MolDraw2DSVG(300, 300)
@sishida21
sishida21 / role_assignment.gs
Last active January 27, 2020 12:31
Google Apps Script for Slack bot to randomly assign roles for members in Google Sheets.
function doPost(e) {
// Setting
const spreadSheetId = '';
const sheetName = ''
const pickNum = 2; // The number of members you wanna pick up
const slackWebhookUrl = '';
const isTest = true // set 'false' to deploy
// Get Spread Sheet (Slack ID, User name, Mask label)
const masterSheet = SpreadsheetApp.openById(spreadSheetId).getSheetByName(sheetName);
import twitter
import json
def main():
api = twitter.Api(
consumer_key="",
consumer_secret="",
access_token_key="",
access_token_secret="",
from logging import getLogger, StreamHandler, FileHandler, Formatter, INFO, DEBUG
def get_logger(level):
# logger
logger = getLogger(__name__)
logger.setLevel(level)
logger.propagate = False
# formatter
formatter = Formatter("%(asctime)s : %(levelname)s : %(message)s ")
@sishida21
sishida21 / elements_in_periodic_table.smi
Created June 10, 2020 14:49
All elements in periodic table
H
He
Li
Be
B
C
N
O
F
Ne
@sishida21
sishida21 / colabdefmap-ipynb.ipynb
Last active December 4, 2024 10:28
ColabDEFMap.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sishida21
sishida21 / eman2_for_defmap.ipynb
Last active May 19, 2023 10:55
EMAN2_for_DEFMap.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.