This file contains 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 sqlite3 | |
import time | |
import random; | |
import sys; | |
locker_dbpath = "dummy_locker.db"; | |
locker_tablename = "dummy_table"; | |
locker_conn = None; | |
#public domain |
This file contains 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
# A simple script to load OBJ file in PyMOL. | |
# "debug.obj" is the OBJ file made by SurfStamp https://github.com/yamule/SurfStamp-public . | |
# Because OBJ file is very flexible, the files which are created by other programs may not be loaded. | |
# Usage: | |
# 1. Save this script in the same directory with your OBJ. | |
# 2. Launch PyMOL. | |
# 3. Load this script from File-> Open (All Files (*)) | |
# 4. Type the following command in the command field (The text field which have PyMOL> label). | |
# cmd.load_callback(myOBJCallback("debug.obj"),'unique_name'); |
This file contains 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 python | |
# coding: utf-8 | |
# In[1]: | |
""" | |
Copyright 2022 yamule | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at |
This file contains 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
use std::collections::{HashMap, HashSet}; | |
use std::io; | |
use std::cmp::Reverse; | |
use std::cmp::Ordering; | |
use std::collections::BinaryHeap; | |
use std::i64; | |
use std::f64; | |
#[allow(unused_imports)] | |
use rand::prelude::*; |
This file contains 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
//------------ argparse | |
import argparse; | |
def check_bool(v): | |
v = v.lower(); | |
if v == "true" or v == "1": | |
return True; | |
if v == "false" or v == "0": | |
return False; | |
raise Exception("true or false or 1 or 0 are expected."); |