This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" AWS Secrets Manager Source | |
This is a custom source for pydantic settings that will read from | |
AWS Secrets Manager. There are some particulars that make the | |
scenario a little more complex than a simple environment variable. | |
S3 bucket names have to be unique across a region, to facilitate this | |
use we a hash appended to the bucket name, this makes it impossible | |
for us to know the bucket name at build time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var map = null; | |
function initMapKit() { | |
console.log("Initialising MapKit"); | |
} | |
function showBasicMap() { | |
const centerCoordinate = new mapkit.Coordinate(37.7749, -122.4194); // San Francisco | |
const span = new mapkit.CoordinateSpan(0.1, 0.1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This demonstrates the deployment of our application via a helm chart | |
# which is hosted in Github container registry | |
resource "helm_release" "lab-python-mock-server" { | |
name = "lab-python-mock-server" | |
repository = "oci://ghcr.io/anomaly/charts" | |
chart = "lab-python-mock-server" | |
namespace = "lab-python-mock-server" | |
create_namespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let counter=1;\ | |
for filename in *; do\ | |
new_filename=$(printf "%03d.png" $counter);\ | |
print "$filename -> $new_filename";\ | |
let counter=counter+1;\ | |
mv "${filename}" $new_filename;\ | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We've been trying to figure out how to run async code from | |
# Celery until it gets support for it | |
# | |
# This is an extracted example which should fit into | |
# https://github.com/anomaly/lab-python-server | |
import asyncio | |
from uuid import UUID | |
from sqlalchemy.ext.asyncio import AsyncSession | |
from ...celery import app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import PropTypes from "prop-types" | |
import { Helmet } from "react-helmet" | |
import { useStaticQuery, graphql } from "gatsby" | |
function Seo({ description, lang, meta, image: metaImage, title, pathname }) { | |
const { site } = useStaticQuery( | |
graphql` | |
query { | |
site { | |
siteMetadata { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created for internal project automation, might not be releveant for others | |
# except as a learning exercise for bash tricks | |
# Portions require revision to make it more efficient - produciton like :) | |
# Please use a template for your own work. | |
# Change names of directories | |
FROM="proj1"; TO="proj2"; for FROM_DIR in `find . -name $FROM`; do if [ -d $FROM_DIR ]; then TARGET_DIR=`echo $FROM_DIR | sed "s/$FROM/$TO/g"`; echo $FROM_DIR ">" $TARGET_DIR; mv $FROM_DIR $TARGET_DIR; fi ; done | |
# Replace references to package names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.google.com.au/maps/place/Upstairs+Startup+Hub/@-33.4193161,149.5785152,17z/data=!3m1!4b1!4m5!3m4!1s0x6b11e43377353da3:0x82364adf2642ade1!8m2!3d-33.4193161!4d149.5807039 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section class="blog-summary"> | |
{% assign postsByYear = site.posts | group_by_exp:"post", "post.date | date: '%Y'" %} | |
{% for year in postsByYear %} | |
<h3>{{ year.name }}</h3> | |
{% assign postsByMonth = year.items | group_by_exp:"post", "post.date | date: '%B'" %} | |
{% for month in postsByMonth %} | |
<div class="blog-summary-month"> | |
<h4>{{ month.name }}</h4> | |
<ol class="blog-post-list"> |
NewerOlder