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 numpy as np | |
from sklearn.datasets import load_digits | |
from sklearn.metrics import roc_auc_score | |
import lightgbm as lgbm | |
if __name__ == '__main__': | |
np.random.seed(4242) | |
d = load_digits() |
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
bool video_recorder::setup_videoio(cv::Mat & mat, double fps) { | |
std::string cmdline = ffmpeg_path_.string() + | |
" -framerate " + std::to_string(static_cast<int>(fps)) + | |
" -f image2pipe -vcodec png -i - -c:v libx264 -pix_fmt yuv444p" + | |
" -preset faster " + | |
//" -preset ultrafast " + | |
" -crf 14" + | |
//" -qp 0 " + | |
" -vf drawtext=\"fontcolor = white:fontfile = " + |
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
def offset_version_detection(quality_string = ''): | |
"""Tries to detect phred score offset automatically. | |
Args: | |
quality_string used to estimate format version and offset | |
Returns: | |
Phred offset | |
Raises: | |
ValueError: Cannot evaluate empty quality string | |
ValueError: Cannot evaluate phred offset | |
""" |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Mar 21 08:36:44 2018 | |
@author: user | |
""" | |
import cv2 | |
import numpy as np | |
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
# -*- coding: utf-8 -*- | |
""" | |
@author: goraj | |
""" | |
import lightgbm as lgbm | |
from sklearn.datasets import load_digits | |
import numpy as np | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import roc_auc_score |
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
def ic50_in_nM_to_pic50(nM): | |
try: | |
return 9.0 - math.log10(float(nM)) | |
except Exception as e: | |
return 0.0 | |
def ic50_in_uM_to_pic50(uM): | |
nM = uM * 1000 | |
return ic50_in_nM_to_pic50(nM) | |
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
def make_window_borderless(self): | |
""" | |
Requires: pywin32 | |
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32 | |
import win32gui as wg | |
import win32api as wa | |
import win32con as wc | |
Based on: https://github.com/howardjohn/pyty/blob/master/src/window_api.py | |
""" |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Aug 10 21:41:24 2018 | |
@author: goraj | |
""" | |
import numpy as np | |
from sklearn.ensemble import RandomForestClassifier | |
from warnings import warn |
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
''' | |
>>> dask.__version__ | |
'1.0.0' | |
>>> umap.__version__ | |
'0.3.7' | |
''' | |
from dask.distributed import Client | |
def do_run(arg1, arg2): |
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
-bash-4.2$ ./Miniconda3-latest-Linux-x86_64.sh -b -p ~/m3_centos7 | |
PREFIX=/home/username/m3_centos7 | |
installing: python-3.7.0-hc3d631a_0 ... | |
Python 3.7.0 (default, Jun 28 2018, 13:15:42) | |
[GCC 7.2.0] | |
installing: ca-certificates-2018.03.07-0 ... | |
installing: conda-env-2.6.0-1 ... | |
installing: libgcc-ng-8.2.0-hdf63c60_1 ... |
OlderNewer