Skip to content

Instantly share code, notes, and snippets.

View jaceklaskowski's full-sized avatar
:octocat:
Enjoying developer life...

Jacek Laskowski jaceklaskowski

:octocat:
Enjoying developer life...
View GitHub Profile
@jaceklaskowski
jaceklaskowski / Rough Notes about CQRS and ES.md
Last active March 31, 2024 03:06
Rough Notes about CQRS and ES

Rough Notes about CQRS and ES

Once upon a time…

I once took notes (almost sentence by sentence with not much editing) about the architectural design concepts - Command and Query Responsibility Segregation (CQRS) and Event Sourcing (ES) - from a presentation of Greg Young and published it as a gist (with the times when a given sentence was heard).

I then found other summaries of the talk and the gist has since been growing up. See the revisions to know the changes and where they came from (aka the sources).

It seems inevitable to throw Domain Driven Design (DDD) in to the mix.

@jaceklaskowski
jaceklaskowski / langchain.md
Last active February 18, 2024 13:37
langchain

LangChain in Action

Install poetry

Install poetry to manage dependencies (langchain, jupyter)

Requires pipx

Create Project

@jaceklaskowski
jaceklaskowski / deployment-tool-ansible-puppet-chef-salt.md
Last active January 3, 2024 22:12
Choosing a deployment tool - ansible vs puppet vs chef vs salt

Requirements

  • no upfront installation/agents on remote/slave machines - ssh should be enough
  • application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
  • configuration templating
  • environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
  • deployment process run from Jenkins

Solution

@jaceklaskowski
jaceklaskowski / macos_maintenance.md
Last active December 23, 2023 20:19
macOS maintenance

macOS Maintenance

Various commands I've been using to manage the local development environment on macOS.

brew update && brew upgrade && brew cleanup

Tools

@jaceklaskowski
jaceklaskowski / keras.md
Last active November 18, 2023 22:43
Keras

Keras

Why Keras

Considered Keras and PyTorch to immerse into the mindset of Python and learn something brand new. Deep Learning seemed challenging enough 😉

Looked at the github repos and found that keras is 99.9% Python (with 0.1% Shell) while PyTorch at just 48.4% Python with tons of other languages.

I've also got the O'Reilly book about Keras by Aurelien Geron.

@jaceklaskowski
jaceklaskowski / python.md
Last active June 22, 2023 08:07
Random Python Notes
@jaceklaskowski
jaceklaskowski / dask.md
Last active February 19, 2023 14:55
Dask
@jaceklaskowski
jaceklaskowski / dask-pip-install.md
Created February 19, 2023 09:29
What `python -m pip install -e .` does

What python -m pip install -e . does

While installing dask-distributed, you can see the following output:

$ python -m pip install -e .
Obtaining file:///Users/jacek/dev/oss/dask/distributed
  Preparing metadata (setup.py) ... done
Requirement already satisfied: ...
...
@jaceklaskowski
jaceklaskowski / docker-for-the-impatient.md
Last active October 28, 2022 08:24
Docker for the Impatient

aka "Let's take some notes about using Docker on Mac OS X to turn deployment of Scala applications into a much better experience."

DISCLAIMER The doc is a compilation of different articles and videos found on the Internet. Almost nothing's mine - mostly layout. See CREDITS section below to know who to praise. All mistakes are mine and are not intended. Drop me an email at jacek@japila.pl if you spot any errors or just share what you think about the doc.

The document lives at https://gist.github.com/jaceklaskowski/ca55be80cb76e84ce478

Intro

I'm on Mac OS X and so you're going to see a lot of setup tweaks for the platform that are not necessarily needed for your environment, esp. Linux one. When you see boot2docker and you're on Linux, just disregard the line or even entire paragraph.

@jaceklaskowski
jaceklaskowski / spark-exercises.md
Last active June 26, 2022 12:04
Spark Exercises

Exercise 1

Union only those rows (from large table) with keys in left small table, i.e. union two dataframes together but only those with the key in my small table.

Exercise 2

Aggregation on an array of nested json = How to sum the quantities across all lines for a given order (which would give 1 + 3 = 4 for the below sample dataset):

{