Discover gists
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
[ | |
{ | |
"district": "Dhaka", | |
"areas": [ | |
"Mohammadpur (Dhaka)", | |
"Dhanmondi - Rd 3", | |
"Gulshan", | |
"Kallyanpur", | |
"Shyamoli", | |
"Adabor", |
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
class TimeLimitedPaginator(Paginator): | |
""" | |
Paginator that enforced a timeout on the count operation. | |
When the timeout is reached a "fake" large value is returned instead, | |
Why does this hack exist? On every admin list view, Django issues a | |
COUNT on the full queryset. There is no simple workaround. On big tables, | |
this COUNT is extremely slow and makes things unbearable. This solution | |
is what we came up with. | |
""" |
Det er mulig å legge til strømpris som en sensor i Home Assistant takket være https://www.hvakosterstrommen.no/ .
Dette vil ikke reflektere ditt abonnement, men gjør det enkelt å få et estimat i forbruksdata / energi panelet.
Tilgjenglige områder:
This is the resource repositry for my memory managment lecture / workshop series at Breda University of applied sciences - Games. It is mainly targeted for game developers
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
# tar_custom_format_arrow.R | |
# store as parquet, load as an Arrow Table | |
format_arrow_table <- function() {targets::tar_format( | |
read = function(path) {arrow::read_parquet(path, as_data_frame = FALSE)}, | |
write = function(object, path) {arrow::write_parquet(object, path, version = "2.0")}, | |
marshal = function(object) as.data.frame(object), | |
unmarshal = function(object) arrow::Table$create(object), | |
repository = "default" |
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
#!/bin/bash | |
# Author: Shoaloak (Axel Koolhaas) 2024 | |
# Description: Fix iOS binary entitlements/access for "Operation not permitted" | |
ENTITLEMENT="com.apple.private.security.container-manager" | |
binaries=("sh" "bash" "zsh" "dash" # Shell | |
"ls" "cat" "find" "cp" "mv" # File management | |
"rm" "mkdir" "rmdir" "touch" | |
"file" "ln" "du" "scp" | |
"chmod" "chown" "chgrp" # Permissions |
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
struct ContentView: View { | |
@State var titles = ["Cell #1", "Cell #2", "Cell #3", "Cell #4"] | |
var body: some View { | |
NavigationView { | |
ScrollView { | |
VStack(spacing: 0) { | |
ForEach(self.titles, id: \.self) { title in | |
HStack { | |
Text(title) |
NewerOlder