I treat your data very seriously.
We do not store any data.
We will delete it even before you ask -- but if you ask, we'll delete it again.
def calculate_pushes(a_x, b_x, a_y, b_y, prize_x, prize_y) -> tuple[int, int]: | |
""" | |
Using matrix multiplication | |
if A . [x,y] = [prize_x, prize_y] | |
then [x,y] = A^-1 . [prize_x, prize_y[] | |
""" | |
A = np.array([[a_x, b_x], [a_y, b_y]]) | |
P = np.array([prize_x, prize_y]) | |
a_pushes, b_pushes = np.linalg.solve(A, P).round().astype(int) |
prize_x, prize_y = 8400, 5400 | |
a_x, a_y = 94, 34 | |
b_x, b_y = 22, 67 | |
token_counts = [] | |
for a_pushes in 100: | |
for b_pushes in 100: | |
if a_pushes * a_x + b_pushes * b_x == prize_x: | |
if a_pushes * a_y + b_pushes * b_y == prize_y: |
I treat your data very seriously.
We do not store any data.
We will delete it even before you ask -- but if you ask, we'll delete it again.
import boto3 | |
iam = boto3.resource('iam') | |
def list_users() -> list: | |
""" | |
List all users in an account | |
:return: list of usernames | |
""" |
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab | |
au! BufNewFile,BufReadPost *.{yaml,yml} set filetype=yaml foldmethod=indent | |
let g:indentLine_color_term = 100 |
import boto3 | |
# Create your own session | |
my_session = boto3.session.Session(region_name="regionA", profile_name="profileA") | |
client = my_session.client('dynamodb') | |
paginator = client.get_paginator('scan') | |
# Option 1, paginate through paginator, a bit clunky, but possibly better performance | |
response_iterator = paginator.paginate( | |
TableName="kl.Klayers-prodp38.db" |
https://s3-ap-southeast-1.amazonaws.com/govscan.info/cypress.zip |
import requests | |
import json | |
import csv | |
base_url = "https://aws.amazon.com/api/dirs/items/search" | |
params = { | |
"item.directoryId": "this-is-my-architecture", | |
"sort_by": "item.additionalFields.airDate", | |
"sort_order": "desc", |
from aws_lambda_powertools.logging import Logger | |
logger = Logger() | |
@logger.inject_lambda_context | |
def handler(event, context): | |
important_list = [1,2,3] | |