docker exec -u 0 -ti <container-id> bash -c "apt-get update && apt-get install -y procps"
docker exec -u 0 -ti cbe1c06b96c7 bash -c "apt-get update && apt-get install -y procps"
docker exec -ti <container-id> pip install py-spy
#!/bin/bash | |
# List the S3 buckets in an account | |
aws s3api list-buckets | jq '[.Buckets[]] | map({ (.Name): .Name }) | add' |
import nltk | |
import pandas as pd | |
from nltk.tokenize import word_tokenize | |
from collections import defaultdict | |
nltk.download('wordnet') | |
nltk.download('punkt') | |
nltk.download('averaged_perceptron_tagger') | |
nltk.download('universal_tagset') |
I enrolled in the just concluded Redislabs course.
I didn't want to install redis locally because of storage contraints on my computer for the assignments and exams, and set to doing it all using Docker containers.
I document the steps for my setup for the courseware. The course also provides this image for the courseware on Docker Hub.
Start up server using host network mode.
WITH -- Get information for shift in given schedules | |
shift_info AS ( | |
SELECT | |
DISTINCT s.id AS shift_id | |
,s.scheduled_at | |
,s.vehicle_license_plate AS license_plate | |
,s.organization_id | |
,s.operating_period_id | |
,s.region_id | |
FROM |
#!/bin/env python | |
import time | |
from itertools import islice | |
def process_sequence_in_chunks(fn, seq, chunk_size=100): | |
""" | |
Apply function to sequence in chunks. | |
Params | |
------ |
Amazon announced EOL for Amazon Linux AMI.
https://aws.amazon.com/de/amazon-linux-ami/
It's important to do an audit of all instance reservations in your platform and migrate away from these images before the announce date.
The steps below should provide a list of instance reservations still using Amazon Linux AMI
It sets taskinstance state in the following transition
State.SCHEDULED -> State.QUEUED
Task dependencies are not checked until task is running :(
There is no direct way to change delay scheduling of a TaskInstance
using a custom dependency that subclasses BaseTiDep
unless
dep_context.QUEUED_DEPS
is patched during run time.
First, I ran setup target defined in Makefile
as per documentation
make setup
Error logs
Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:424: container init caused \"rootfs_linux.go:58: mounting \\\"/home/beebox/d2d-data-challenge-master/app/init_db.py\\\" to rootfs \\\"/var/lib/docker/overlay2/701b781612fb56ef3bc68cffefa7d7deacd10c9e0957cdd667f00ccc69f88eb4/merged\\\" at \\\"/var/lib/docker/overlay2/701b781612fb56ef3bc68cffefa7d7deacd10c9e0957cdd667f00ccc69f88eb4/merged/data/app/init_db.py\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
make: *** [Makefile:16: initdb] Error 1