The gist is:
- install the normal python from python.org
- install everything into a venv
- copy the venv into python embed.
unzip python-3.8.0-embed-amd64.zip| # Copyright: (c) 2018, Jordan Borean (@jborean93) <[email protected]> | |
| # MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
| Add-Type -TypeDefinition @' | |
| using Microsoft.Win32.SafeHandles; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Runtime.ConstrainedExecution; | |
| using System.Runtime.InteropServices; |
| #!/bin/bash | |
| # Sync two git LFS remotes. This is very useful when you | |
| # have two remotes (e.g. upstream and fork) and they have | |
| # different files on the LFS storage. Trying git lfs fetch --all | |
| # yields an error for missing objects if the two repos are not | |
| # synced. The purpose of this script is to overcome this issue | |
| # with Git LFS | |
| # | |
| # Usage: git-lfs-sync.sh source destination branch | |
| # |
| /// Make CPUs usage as a sin wave | |
| #include <math.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/time.h> | |
| #include <unistd.h> | |
| const float PI = 3.1415926; | |
| const int TIME_SLICE = 40000; // 40 ms |
| import sys | |
| import asyncio | |
| import base64 | |
| import copy | |
| import pprint | |
| # pip3 install winrt | |
| from winrt.windows.media.ocr import OcrEngine | |
| from winrt.windows.globalization import Language | |
| from winrt.windows.graphics.imaging import * | |
| from winrt.windows.security.cryptography import CryptographicBuffer |
I like writing well-formed git commits that explain the intention behind why a code change was made.
Check out Chris Beams excellent How to Write a Git Commit Message if you haven't read it.
Anyway, for a project I've been working on I've gathered up 900+ commits that hold up a pretty high quality (except for one 😁). Let's look at some trends about these commits!
This document lays out a set of Python packaging practices. I don't claim they are best practices, but they fit my needs, and might fit yours.
This document has been superseded as of July 2020.
This was written in July 2019. As of this writing Python 2.7 and Python 3.5 still have not
| function Get-CinebenchScore { | |
| $source = "http://http.maxon.net/pub/cinebench/CinebenchR20.zip" | |
| $out = "C:\CinebenchR20.zip" | |
| $cbfolder = "C:\cinebench\" | |
| $cbpath = Join-Path $cbfolder "cinebench.exe" | |
| $log = Join-Path $cbfolder "log.txt" | |
| if(-not (Test-Path $cbpath)) { | |
| # Download | |
| Invoke-WebRequest -Uri $source -OutFile $out |
| // This file was initially generated by Windows Terminal 0.11.1333.0 | |
| // It should still be usable in newer versions, but newer versions might have additional | |
| // settings, help text, or changes that you will not see unless you clear this file | |
| // and let us generate a new one for you. | |
| // To view the default settings, hold "alt" while clicking on the "Settings" button. | |
| // For documentation on these settings, see: https://aka.ms/terminal-documentation | |
| { | |
| "$schema": "https://aka.ms/terminal-profiles-schema", | |
| "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", | |
| // You can add more global application settings here. |
| [merge] | |
| tool = vimdiff | |
| [mergetool] | |
| keepBackup = false | |
| [mergetool "vimdiff"] | |
| cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J' |