Skip to content

Instantly share code, notes, and snippets.

View shaypal5's full-sized avatar
🐢
Working away...

Shay Palachy-Affek shaypal5

🐢
Working away...
View GitHub Profile
@shaypal5
shaypal5 / deepchecks-phishing-single-dataset-integrity.py
Created January 16, 2022 16:41
Deepchecks Phishing URLs Example: Running the Single Dataset Integrity Suite
from deepchecks.suites import single_dataset_integrity
integ_suite = single_dataset_integrity()
integ_suite.run(test_dataset=df)
@shaypal5
shaypal5 / deepchecks-phishing-dataload.py
Created January 16, 2022 15:21
Deepchecks Phishing URLs Example: Loading the data
import pandas as pd; import deepchecks;
from deepchecks.datasets.classification.phishing import load_data
df = load_data(data_format='dataframe', as_train_test=False)
df.head(5)
@shaypal5
shaypal5 / gist:4522797c5971a48c628b56fe9b1b4b8e
Last active October 12, 2021 09:56 — forked from dotrung/gist:a32aad56ddbb5f218b7c3ec51639b6f0
Install Vim 8 with Python, Python 3 support on Ubuntu 16.04
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install build-essential cmake
sudo apt-get install python-dev python3-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
@shaypal5
shaypal5 / lifecycle_core.sh
Last active February 3, 2021 13:04
The core component of my Sagemaker lifecycle template for DS
#!/bin/bash
# --- script documentation
# recieves two arrays as input using the length prefix convention. See:
# https://stackoverflow.com/questions/43686878/pass-multiple-arrays-as-arguments-to-a-bash-script
# add mandatory packages here
# packages+=("pandas")
echo ">>> conda_envs: ${conda_envs[@]}"
@shaypal5
shaypal5 / conftest.py
Created October 6, 2020 17:22
Temp environment variables for pytest
import os
import pytest
try:
from.temp_env_var import TEMP_ENV_VARS, ENV_VARS_TO_SUSPEND
except ImportError:
TEMP_ENV_VARS = {}
ENV_VARS_TO_SUSPEND = []
@shaypal5
shaypal5 / bitbucket-pipelines.yml
Created July 30, 2020 13:14
Bitbucket status badges
image: python:3.8.3
# pipeline stages definitions
test: &test
step:
name: test
caches:
- pip
script:
- python --version
@shaypal5
shaypal5 / test_gilad.py
Created August 3, 2019 13:25
pytest parameterize example for Gilad
@pytest.mark.parametrize("parallelize", [True, False])
def test_rubin(parallelize):
if parallelize:
run_parallel()
else:
foo()
@shaypal5
shaypal5 / .vimrc
Created July 31, 2019 16:12
My current .vimrc
" :echom "Loading Shay's .vimrc!"
" === vim-plug plugin manager ===
" automatic installation of vim-plug itself, if missing
if empty(glob('~/.vim/autoload/plug.vim'))
:echom "vim-plug is missing. Installing vim-plug..."
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
@shaypal5
shaypal5 / .travis.yml
Last active July 16, 2019 16:34
Travis: Python 3.5.4 on Windows
matrix:
include:
- name: "Python 3.5.4 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
before_install:
- choco install python --version 3.5.4
- python --version
- python -m pip install --upgrade pip
- pip3 install --upgrade pytest
@shaypal5
shaypal5 / .travis.yml
Created July 16, 2019 14:58
Travis: Python 2.7.14 on macOS 10.13
matrix:
include:
- name: "Python 2.7.14 on macOS 10.13"
os: osx
osx_image: xcode9.3 # Python 2.7.14_2 running on macOS 10.13
language: shell # 'language: python' errors on Travis CI macOS
before_install:
- python --version
- pip install pytest --user
- pip install codecov --user