To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT
- Get PAT (personal access token)
Personal Settings > Developer settings > Personal access tokens
| # aliases | |
| alias -g ll='ls -al' | |
| alias -g subl='open -a "Sublime Text"' | |
| alias server='python3 -m http.server 8000 --bind 127.0.0.1' | |
| alias rmvenv='deactivate && rm -rf venv/' | |
| alias venv='python3 -m venv venv' | |
| alias activate='source venv/bin/activate' | |
| alias pipupgrade='python3 -m pip install --upgrade pip' | |
| alias requirements='python3 -m pip install -r requirements.txt' |
To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT
Personal Settings > Developer settings > Personal access tokens
| # -*- coding: utf-8 -*- | |
| """ | |
| *************************************************************************** | |
| * * | |
| * This program is free software; you can redistribute it and/or modify * | |
| * it under the terms of the GNU General Public License as published by * | |
| * the Free Software Foundation; either version 2 of the License, or * | |
| * (at your option) any later version. * | |
| * * | |
| *************************************************************************** |
this is a rough draft and may be updated with more examples
GitHub was kind enough to grant me swift access to the Copilot test phase despite me @'ing them several hundred times about ICE. I would like to examine it not in terms of productivity, but security. How risky is it to allow an AI to write some or all of your code?
Ultimately, a human being must take responsibility for every line of code that is committed. AI should not be used for "responsibility washing." However, Copilot is a tool, and workers need their tools to be reliable. A carpenter doesn't have to
| # Source: https://nurdabolatov.com/parallel-processing-large-file-in-python | |
| import multiprocessing as mp | |
| import time | |
| import os | |
| def process_line(line): | |
| # Count frequency for every character | |
| counter = {} |
| function Save-Download { | |
| <# | |
| .SYNOPSIS | |
| Given a the result of WebResponseObject, will download the file to disk without having to specify a name. | |
| .DESCRIPTION | |
| Given a the result of WebResponseObject, will download the file to disk without having to specify a name. | |
| .PARAMETER WebResponse | |
| A WebResponseObject from running an Invoke-WebRequest on a file to download | |
| .EXAMPLE | |
| # Download Microsoft Edge |
| # -*- coding: utf-8 -*- | |
| # QGIS 3.x / Python 3.x | |
| from math import sqrt, ceil | |
| from multiprocessing import Pool, Process, Queue | |
| from multiprocessing.pool import ThreadPool | |
| WORKERS = 2 | |
| def worker_task(number): |
Check current version
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.await import(…) from CommonJS instead of require(…).