Skip to content

Instantly share code, notes, and snippets.

View joeld1's full-sized avatar

JD joeld1

View GitHub Profile
@joeld1
joeld1 / Dockerfile
Last active April 28, 2021 15:46
Installing Poetry on Docker Image - tiangolo/uvicorn-gunicorn-fastapi:python3.8
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
RUN pip install --upgrade pip
ARG poetry_version="master"
# install-poetry.py and get-poetry.py are options; but get-poetry.py is deprecated though!
ARG poetry_script_name="install-poetry.py"
ARG debug_poetry="true"
ENV PATH="/opt/poetry/bin:${PATH}"
# Install Poetry
@joeld1
joeld1 / conda_poetry.sh
Last active April 22, 2023 14:06
Create Conda Virtual Envs for your Poetry Projects (Ideal for Mac M1 users)
#!/bin/bash
ENV_NAME=$1
PYTHON_VERSION=$2
CONDA_BASE=$(conda info --base)/"etc/profile.d/conda.sh"
CONDA_ENV_PATH=$(conda info --base)/"envs/$ENV_NAME"
echo "$CONDA_BASE"
echo "$CONDA_ENV_PATH"
@joeld1
joeld1 / poetry_add_ocrmypdf_issue.txt
Created March 8, 2021 14:15
poetry_add_ocrmypdf_issue
Using virtualenv: /Users/jd/Dropbox/Python Scripts/code_to_share/.venv
Using version ^11.7.1 for ocrmypdf
Updating dependencies
Resolving dependencies...
1: fact: code_to_share is 0.1.0
1: derived: code_to_share
1: fact: code_to_share depends on fastapi (^0.63.0)
1: fact: code_to_share depends on uvicorn (^0.13.4)
1: fact: code_to_share depends on httpx (^0.17.0)
@joeld1
joeld1 / pyproject.toml
Created March 8, 2021 13:58
poetry add ocrmypdf isssue
[tool.poetry]
name = "code_to_share"
version = "0.1.0"
description = ""
authors = ["JD <10216562+joeld1@users.noreply.github.com>"]
license = "MIT"
[tool.poetry.dependencies]
python = "^3.9"
fastapi = "^0.63.0"
@joeld1
joeld1 / new_dev_computer_choco_installations.md
Last active August 19, 2021 13:33
New dev computer environment setup using Chocolatey!

Install Chocolatey first

Bottom line up front (BLUF)

Full Choco Setup (no IDEs)

Run this to install dependencies, re-run this if the installer requires a reboots

choco install visualstudio2019buildtools visualstudio2019-workload-vctools git jre8 nvm cmder sublimetext4 docker-desktop

@joeld1
joeld1 / NVDA_Choco_Installations.md
Last active February 25, 2021 23:58
NVDA - Notes on Translating
@joeld1
joeld1 / docx_hyperlink_snippets.py
Last active November 15, 2020 14:36
Collection of python-docx hyperlink snippets
@joeld1
joeld1 / requirements_to_poetry.md
Last active October 24, 2020 18:57
Notes on ways to import requirements.txt files into Poetry

Original StackOverflow Post

  • Solution - 1

    • "poetry doesn't support this directly. But if you have a handmade list of required packages (at best without any version numbers), that only contain the main dependencies and not the dependencies of a dependency you could do this:"
      • cat requirements.txt|xargs poetry add
  • Solution - 2

    • Another Solution
  • for item in $(cat requirements.txt); do poetry add "${item}"; done

@joeld1
joeld1 / applayout.html
Created October 22, 2020 13:04
Pluralsight - Django Templates Course - Ticketing App Templates
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ticketing App - {% block title %} {% endblock %}</title>
</head>
<body>
<nav>
<a href="/">Home</a>
<a href="/tickets">View Tickets</a>