Skip to content

Instantly share code, notes, and snippets.

@shaybensasson
shaybensasson / pycharm64.vmoptions
Last active July 26, 2019 16:12
custom PyCharm VM options to increase memory of env
# custom PyCharm VM options
-Xms256m
-Xmx5120m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
@shaybensasson
shaybensasson / pycharm_update.sh
Last active February 24, 2020 17:52
PyCharm update script.
#!/bin/bash
#
# ---------------------------------------------------------------------
# PyCharm update script.
# ---------------------------------------------------------------------
#Originally from here:
#http://exponential.io/blog/2015/02/10/install-pycharm-on-ubuntu-linux/
VER=2019.3.3
FILE_NO_EXT=pycharm-professional-$VER
@shaybensasson
shaybensasson / python_quadcopter.bash
Created November 30, 2018 07:32
VirtualEnv Remote Interpreter script for Pycharm Professional Windows Client
#!/bin/bash
#DL cuda stuff
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export CUDA_HOME=/usr/local/cuda
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64
# if virtualenvwrapper.sh is in your PATH (i.e. installed with pip)
source /usr/local/bin/virtualenvwrapper_py3.sh
@shaybensasson
shaybensasson / assert_version.py
Created September 15, 2018 17:49
Python assert tf version using LooseVersion
from distutils.version import LooseVersion
import tensorflow as tf
# Check TensorFlow Version
assert LooseVersion(tf.__version__) >= LooseVersion('1.3'), 'Please use TensorFlow version 1.3 or newer'
print('TensorFlow Version: {}'.format(tf.__version__))
@shaybensasson
shaybensasson / PyCharm Tips and Tricks.ipynb
Last active September 6, 2018 08:32
PyCharm Tips and Tricks.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shaybensasson
shaybensasson / Versions of everything.ipynb
Last active September 15, 2018 17:50
Versions of everything - to compare two environments
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shaybensasson
shaybensasson / user.js
Last active August 28, 2018 13:07
Slack RTL support
// ==UserScript==
// @name Slack RTL
// @namespace http://blah
// @version 0.1
// @description Support RTL/Hebrew in slack.com, from here: https://github.com/gregvish/slackrtl
// @author
// @match https://*.slack.com/*
// @grant GPL
// ==/UserScript==
/* jshint -W097 */
@shaybensasson
shaybensasson / pet-snippet.toml
Last active February 12, 2025 10:03
description
[[snippets]]
description = "edit pet configs and snippets"
command = "code ~/.config/pet/snippet.toml"
tag = ["pet"]
output = ""
[[snippets]]
description = "edit snippets_menu jupyter plugin configuration"
command = "code ~/.local/share/jupyter/nbextensions/snippets_menu/my_snippets.js"
tag = ["python", "jupyter"]
@shaybensasson
shaybensasson / pip
Created August 9, 2018 09:22
pip script instead of pip_ROOT to force using a virtualenv
#!/bin/bash
echo "THIS IS THE ROOT 'pip'!"
echo "(The original was renamed to 'pip_ROOT')."
echo ""
echo "Please use a virtual environment to install packages!"
echo "You can activate a vm using 'workon'."
@shaybensasson
shaybensasson / .bashrc
Last active July 26, 2019 15:57
My terminal .bashrc suffix addition
#Trim terminal command prefix
#ORIGINAL:
#export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
export PS1="\[\033[01;34m\]\w\[\033[00m\]\$ " #path only
# ---------------------------------------------------------------------
# DL cuda stuff
# ---------------------------------------------------------------------
source /home/shay/DL_cuda_stuff.sh