Skip to content

Instantly share code, notes, and snippets.

View hanifa2102's full-sized avatar

han hanifa2102

View GitHub Profile
https://k0nze.dev/posts/install-pyenv-venv-vscode/
pyenv update
pyenv install <3.11.5>
pyenv local 3.11.5
python -m venv .venv
.\.venv\Scripts\activate
@hanifa2102
hanifa2102 / gist:d555657cae0d527e295f6dc5e992ef2e
Created September 8, 2022 02:08
Completely Remove Jupyter
pip uninstall jupyter -y
pip uninstall jupyter_core -y
pip uninstall jupyter-client -y
pip uninstall jupyter-console -y
pip uninstall jupyterlab_pygments -y
pip uninstall notebook -y
pip uninstall qtconsole -y
pip uninstall nbconvert -y
pip uninstall nbformat -y
# Track which python to use for diff projs
pyenv install -l
pyenv install <python-version>
#Local (for folder specific) or Global Python
pyenv local 3.10.6
pyenv global 3.7.1
# Track which pip packages for diff projs
python -m venv .venv
# Create Branch
git checkout -b john_branch
# Push local branch to github
git push --set-upstream origin john_branch
# Update Local Branch to Master
git checkout master
git pull
git checkout john_branch
1.Download the Senzing API to the /opt/senzing/g2 OR
1.Get the docker file(Preferred for further setup of senzing projects)
--------------------------------------------------------------------------------------
https://github.com/Senzing/knowledge-base/blob/master/HOWTO/create-senzing-dir.md#using-docker
export SENZING_DIR=/opt/senzing
export SENZING_SUBCOMMAND=install
export SENZING_DOCKER_TAG=1.9.19155
sudo mkdir -p ${SENZING_DIR}
docker pull store/senzing/senzing-package:1.9.19155
sudo docker run \
@hanifa2102
hanifa2102 / PySpark CheatSheet
Last active April 18, 2019 06:01
PySpark Intro
- Create Spark Context to connect to Spark Cluster
- Have a spark session (use Static method to retrieve it)
@hanifa2102
hanifa2102 / condaenv.txt
Created February 18, 2019 13:06 — forked from pratos/condaenv.txt
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder