This document provides guidelines for maintaining high-quality Python code. These rules MUST be followed by all AI coding agents and contributors.
All code you write MUST be fully optimized.
"Fully optimized" includes:
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.4; | |
| import "@openzeppelin/contracts/utils/Counters.sol"; | |
| import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
| import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
| import "hardhat/console.sol"; | |
| contract NFTMarketplace is ERC721URIStorage { |
| pragma solidity >=0.8.0 <0.9.0; | |
| // SPDX-License-Identifier: MIT | |
| /// [MIT License] | |
| /// @title Base64 | |
| /// @notice Provides a function for encoding some bytes in base64 | |
| /// @author Brecht Devos <[email protected]> | |
| library Base64 { | |
| bytes internal constant TABLE = | |
| "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
On M1 machines, Docker for Mac is running a lightweight linux ARM VM, then running containers within that, so containers are essentially running natively. Don't be fooled by the fact the UI or binary CLI tools (e.g. docker) might require Rosetta.
Within that VM is an emulation layer called QEmu. This can be used by docker to run Intel containers. This does not use Rosetta at all, and has a roughly 5-6X performance penalty. (If you just upgraded your CPU this may result in a similar performance to your old machine!)
Many images in public registries are multi-architecture. For instance at the time of writing on Docker Hub the php:8.0-cli image has the following digests:
| import Amplify from 'aws-amplify'; | |
| const { AppsyncCdkAppStack } = require('./outputs.json'); | |
| import config from './aws-exports'; | |
| Amplify.configure({ | |
| ...config, | |
| aws_appsync_graphqlEndpoint: AppsyncCdkAppStack.GraphQLAPIURL, | |
| aws_appsync_apiKey: AppsyncCdkAppStack.GraphQLAPIKey | |
| }) |
| export class BaseStack extends cdk.Stack { | |
| public readonly stageName?: string; | |
| public readonly serviceName?: string; | |
| constructor(scope: cdk.Construct, id: string, props: IBaseStack) { | |
| const superProps = { | |
| ...(props.stageName && { stackName: `${props.stageName}-${id}` }), | |
| ...props, | |
| }; | |
| super(scope, id, superProps); |
You know how it goes. SSH is something that nearly every developer uses every day, however, they only set it up a couple of times and then forget about it. And whenever you need to authenticate with SSH again, you just look up how to do it, never remembering how to do it because why would you?
SSH, which stands for Secure Shell, is a network protocol that enables a client to securely connect to a remote server. All user authentication, commands, outputs, and file transfers are encrypted to protect against attacks in the network. It is a more secure alternative to non-protected login protocols such as FTP.
--> A beginner's guide to nflfastR <--
I get a lot of questions about how to get nflscrapR up and running. This guide is intended to help new users build interesting tables or charts from the ground up, taking the raw nflscrapR data.
Quick word if you're new to programming: all of this is happening in R. Obviously, you need to install R on your computer to do any of this. Make sure you save what you're doing in a script (in R, File --> New script) so you can save your work and run multiple lines of code at once. To run code from a script, highlight what you want, right click, and select Run line. As you go through your R journey, you might get stuck and have to google a bunch of things, but that's totally okay and normal. That's how I wrote this thing!
| func submit() { | |
| guard let name = nameField.text else { | |
| show("No name to submit") | |
| return | |
| } | |
| guard let address = addressField.text else { | |
| show("No address to submit") | |
| return | |
| } |