This file contains hidden or 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
from dataclasses import dataclass, field | |
from typing import Any, Dict, Protocol, runtime_checkable | |
from redis import Redis | |
@runtime_checkable | |
class ICacheBackend(Protocol): | |
""" | |
Defines an interface for cache backends. Any class that implements this protocol | |
must provide `set`, `get`, and `aclose` methods. This allows for flexibility in | |
the cache implementation, as different storage mechanisms can be used as long as |
This file contains hidden or 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
"""Generate and validate starting positions for Fischer Random Chess, | |
also known as Chess960. Fischer Random Chess is a variant of | |
traditional chess invented by the former World Chess Champion Bobby | |
Fischer. It was introduced to add variety to the game and reduce the | |
reliance on opening memorization by randomly shuffling the positions | |
of the back-row pieces (rooks, knights, bishops, queen, and king) | |
while adhering to certain rules to ensure the game remains balanced | |
and playable. | |
Fischer Random Chess follows these specific rules for setting up the |
This file contains hidden or 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
identity: http://onto-ns.com/entity/v1/demo#a77e5e81-2107-45f9-9dde-1f559d961d0a | |
description: Demonstration | |
dimensions: | |
N: Number of items | |
properties: | |
lat: | |
type: float | |
shape: ["N"] | |
description: Latitude |
This file contains hidden or 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
{ | |
"name": "TextFile", | |
"version": "0.1", | |
"namespace": "http://onto-ns.com/meta", | |
"meta": "http://onto-ns.com/meta/0.3/EntitySchema", | |
"description": "Representation an experimental image.", | |
"dimensions": [], | |
"properties": [ | |
{ | |
"name": "data", |
This file contains hidden or 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
languages: | |
- af : Afrikaans | |
- af-ZA : Afrikaans (South Africa) | |
- ar : Arabic | |
- ar-AE : Arabic (U.A.E.) | |
- ar-BH : Arabic (Bahrain) | |
- ar-DZ : Arabic (Algeria) | |
- ar-EG : Arabic (Egypt) | |
- ar-IQ : Arabic (Iraq) |
This file contains hidden or 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 | |
read -p "Enter runner name [my-runner]: " name | |
read -p "Enter registration token: " token | |
read -p "Enter gitlab url: " url | |
volume_name=gitlab-volume-$name | |
runner_name=gitlab-runner-$name | |
docker volume create $volume_name |
This file contains hidden or 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
;;; Code: | |
(add-to-list 'load-path "~/.emacs.d/lisp/") | |
(add-to-list 'load-path ".") | |
(setq c-basic-indent 2) | |
(setq tab-width 4) | |
(setq indent-tabs-mode nil) | |
(require 'org) |
This file contains hidden or 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
program binSearchTest | |
integer :: idx | |
real, allocatable :: v(:) | |
integer, allocatable :: v2(:) | |
interface binarySearch | |
procedure binarySearch_real | |
procedure binarySearch_int | |
end interface binarySearch |
This file contains hidden or 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
NEWLINE = $$escape_expand(\\n\\r\\t) | |
!isEmpty(MODULE_DIR){ | |
MODFLAGS += -J$$MODULE_DIR | |
INCLUDEPATH += $$MODULE_DIR | |
} | |
F90 = ifort | |
MKDIR = $$quote($(MAKEFILE)) |
This file contains hidden or 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
isEmpty( fortran_compiler ) { | |
# gfortran.prf | |
# Adds gfortran as extra compiler to the qmake build system. | |
# | |
# This file must reside in the path of QMAKEFEATURES | |
# | |
# Thomas Hagelien | |
# | |
F90 = gfortran |
NewerOlder