Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
williamgilpin committed Sep 19, 2024
1 parent b81ac69 commit b31f347
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 31 deletions.
2 changes: 1 addition & 1 deletion howto_ffmpeg.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Various commands and shortcuts for working with ffmpeg

### Turn folder of frames into a timelapse video

ffmpeg -r 20 -i pic%03d.png -vcodec libx264 -pix_fmt yuv420p -crf 25 my_video.mov
ffmpeg -r 20 -i frame%03d.png -vcodec libx264 -pix_fmt yuv420p -crf 25 my_video.mov

`-r` specifies the frame rate
`%03d` says that the images have three digits
Expand Down
18 changes: 17 additions & 1 deletion howto_pypi.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,24 @@ If the dry-run is successful, upload to PyPI
twine upload dist/*


## Updating existing package using pyproject.toml

## Updating existing package
Update `pyproject.toml` to the latest version number. Pay attention to the number of digits after the decimal: 1.3 will be counted as a lower release number than 1.299

Update and push the new version number to GitHub

$ git tag 0.5 -m "latest version"
$ git push --tags origin master

In your current environment, install the buildtools if neededed via `pip install buildtools`. Now build the package

$ python -m build

Install twine using pip if needed via `pip install twine`. Now upload the new distribution via twine

$ python3 -m twine upload --skip-existing -r pypi dist/* --verbose

## Updating existing package using setup.py (not recommended)

Update `setup.py` to the latest version number. Pay attention to the number of digits after the decimal: 1.3 will be counted as a lower release number than 1.299

Expand Down
67 changes: 38 additions & 29 deletions howto_pythononwindows.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,60 @@
# Python on Windows

## Without another installed shell
## Using Windows Subsystem for Linux (WSL)

Install Anaconda from the .exe installer available on the Anaconda website
Most modern versions of Windows have the Windows Subsystem for Linux (WSL) pre-installed. This allows you to run a full Linux distribution on your Windows machine. This is the current recommended way to run Python on Windows. You can enable WSL by opening a PowerShell terminal as an administrator and running the following command:

Use the included Anaconda shell
```powershell
wsl --install
```
This will install the latest version of WSL and the Ubuntu distribution. You can then open a WSL Terminal by typing `wsl` or `Ubuntu` in the Windows search bar. You can find detailed instructions from Microsoft [here](https://learn.microsoft.com/en-us/windows/wsl/setup/environment).

Update the installed version
Once you have installed WSL, you can use the WSL Terminal to install Python and other common packages. You will also use it to run any bash or Terminal commands that you encounter in documentation. On macOS systems, one often installs packages using `sudo brew install`. On WSL, you will use `sudo apt install`.

> conda update --all
We will start by installing Python. You can install Python 3 and pip by running the following commands in the WSL Terminal:
```bash
sudo apt update
sudo apt install python3 python3-pip
```

Change to to data drive on Windows
We next will install git, which is a version control system that is commonly used in conjunction with GitHub, an online hosting service for code. You can install git by running the following command in the WSL Terminal:
```bash
sudo apt install git
```
You may receive a message that git is already installed. This is fine.

> D:\William
We will now install a text editor. You can install `nano` by running the following command in the WSL Terminal:
```bash
sudo apt install nano
```
You may receive a message that `nano` is already installed. You may also install other text editors like `vim` or `emacs` if you prefer.

Change directories on drive
## DEPRECATED: Anaconda shell

> cd code
Install Anaconda from the .exe installer available on the Anaconda website. Open the included Anaconda shell app, and then update the installed version

Activate conda env
> conda update --all

> activate py3env
To change to a data drive on Windows

> D:\William

## Using git bash (current preferred method)
To change directories on drive

Try the instructions here:
> cd code

https://scotch.io/tutorials/get-a-functional-and-sleek-console-in-windows
To activate conda env

We ran into some issues with Anaconda, where the solution was to manually put the environment on the path:
https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/VxL6QmcKgv4
> activate py3env

## Using Cygwin

Download and install the full Cygwin suite
## DEPRECATED: Using git bash

Open up the Cygwin Terminal
We originally used git bash to run Python on Windows, via the instructions [here](https://scotch.io/tutorials/get-a-functional-and-sleek-console-in-windows). However, we ran into [some issues](https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/VxL6QmcKgv4) with Anaconda, and the only solution was to manually put the environment on the path.

Go to the drive of interest. For the "C:" drive:
## DEPRECATED: Using Cygwin

Download and install the full Cygwin suite from their website. Open up the Cygwin Terminal application and go to the drive of interest. For the "C:" drive:

$ cd /cygdrive/C

Expand All @@ -47,16 +63,9 @@ To run a program in the shell, make sure to use the "-i" flag
$ python -i


## Using MinGW and msys

msys is a bash shell, but you have to add Anaconda to the path by creating a .bashrc or .bashprofile in the home directory (wherever the shell starts you out when if first opens). Note: there is a later version, msys2, that may have more active development
## DEPRECATED: Using MinGW and msys

+ Install MinGW
+ Install msys
+ edit msys apearance by right clicking the top bar of an open shell window
+ Install Emacs for Windows:
+ Download 7zip archive from SourceForge and right click to extract with 7zip
+ ?????
msys is the MinGW bash shell, but you have to add Anaconda to the path by creating a `.bashrc` or `.bashprofile` in your home directory (wherever the shell starts you out when if first opens). There is also a successor, msys2, that may have more active development



Expand Down

0 comments on commit b31f347

Please sign in to comment.