Skip to content

Instantly share code, notes, and snippets.

@Alex3917
Alex3917 / celery_configs
Created September 1, 2020 01:47
How to configure Celery using Elastic Beanstalk with Amazon Linux 2
# In .ebextensions/01_celery.config
files:
"/etc/systemd/system/celery.service":
mode: "000644"
owner: celery
group: celery
content: |
[Unit]
Description=Celery Service
-- Isolate building features and height attributes
WITH buildings AS (
SELECT
feature_type,
osm_id,
osm_timestamp,
ST_Centroid(geometry) AS centroid,
(
SELECT
value
Readme: In the following pseudo code, [] indicates a subroutine.
Sometimes I choose to write the subroutine inline under the [] in order to maintain context.
One important fact about the way rollbacks are handled here is that we are storing state for every frame.
In any real implementation you only need to store one game state at a time. Storing a game
state for every frame allows us to only rollback to the first frame where the predicted inputs don't match the true ones.
==Constants==
MAX_ROLLBACK_FRAMES := Any Positive Integer # Specifies the maximum number of frames that can be resimulated
FRAME_ADVANTAGE_LIMIT := Any Positive Integer # Specifies the number of frames the local client can progress ahead of the remote client before time synchronizing.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@melanieimfeld
melanieimfeld / cityshapes.py
Last active April 27, 2022 23:15
Ordering Cities using Python
import argparse
import requests
import json
import geopandas as gpd
import pandas as pd
from shapely import affinity
from shapely.geometry import Polygon, Point, MultiPolygon
from matplotlib import pyplot as plt
import numpy as np
from osmtogeojson import osmtogeojson
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active April 26, 2024 11:50
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

Apple’s bugs

I still enjoy using Apple products and prefer them over alternatives, but in recent years, an increasing number of small bugs has made using them less pleasant. No single bug is fatal, but they add up. I wanted to document them to make it more likely that they will be fixed.

There are two main topics:

  • Many small unnecessary bugs
  • Strategy tax

Small unnecessary bugs

@raftheunis87
raftheunis87 / hyperjs.md
Last active January 2, 2024 14:04
Hyper.js + Hyper.js Plugins + ZSH + Starship + Fira Code + Dark Theme - (macOS)

Hyper.js

@Saafke
Saafke / gsoc19_dnn_superres.md
Last active March 28, 2022 13:55
[GSoC '19] Learning-based Super-Resolution in OpenCV

Google Summer of Code 2019 with OpenCV

Learning-based Super Resolution

Student: Xavier Weber
Mentors: Vladimir Tyan & Yida Wang
Student on the same project: Fanny Monori

Link to accomplished work:

@lopespm
lopespm / levenshtein_regex_recursion_memo.py
Last active December 28, 2021 09:25
Levenshtein distance between regex expression and target string - Recursion with memoization (Python)
# (Variant #4 for exercise 16.2 on EPI (Elements of Programming Interviews)) (September 2018 edition)
# The core idea is calculate the levenshtein distance, while taking into account the special cases of the regex expression
# *, +, ? and . were taken into account for the regex expression. Expression blocks are not supported
# This algorithm uses recursion with memoization (could be transposed to a DP solution), yielding a O(mn) time complexity, O(mn) auxiliary space for cache and O(max(m,n)) function call stack
# (m and n are the lengths of regex and target strings respectively)
#
# Version using dynamic programming: https://gist.github.com/lopespm/2362a77e7bd230a4622a43709c195826
def regex_dist(regex: str, target: str):
def regex_dist_aux(r_i, t_i):