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
module ThreadMetadata : sig | |
type t | |
val create : unit -> t | |
val get_insert_count : t -> int -> int (* t -> thread ID -> insert count *) | |
val get_delete_count : t -> int -> int (* t -> thread ID -> delete count *) | |
val update_insert_count : t -> int -> int -> unit (* t -> thread ID -> old insert count -> () *) | |
val update_delete_count : t -> int -> int -> unit (* t -> thread ID -> old delete count -> () *) | |
val get_sum : t -> int | |
end = struct |
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
module ThreadMetadata : sig | |
type t | |
val create : unit -> t | |
val get_insert_count : t -> int -> int | |
val get_delete_count : t -> int -> int | |
val update_insert_count : t -> int -> int -> unit | |
val update_delete_count : t -> int -> int -> unit | |
val get_sum : t -> int | |
end = struct |
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
from __future__ import annotations | |
from dataclasses import dataclass | |
@dataclass | |
class State: | |
transitions: dict[str, State] | |
def transition(self, input): |
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
from email.generator import Generator | |
from email.parser import Parser | |
from aiosmtpd.handlers import Message | |
class MailFile(Message): | |
def __init__(self, mail_file, message_class=None): | |
self.mail_file = mail_file | |
super().__init__(message_class=None) |
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
call plug#begin('~/.vim/plugged') | |
Plug 'dracula/vim' | |
Plug 'kyazdani42/nvim-web-devicons' " for file icons | |
Plug 'kyazdani42/nvim-tree.lua' | |
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } |
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
Dummy File Content |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
self.CHALLENGE_DATA_DIR = join( | |
self.BASE_TEMP_DIR, "compute/challenge_data/challenge_{challenge_id}" | |
) | |
self.PHASE_DATA_DIR = join( | |
self.CHALLENGE_DATA_DIR, "phase_data/phase_{phase_id}" | |
) | |
self.CHALLENGE_IMPORT_STRING = "challenge_data.challenge_{challenge_id}" |
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
def get_phase_annotation_file_path( | |
self, | |
challenge_id, | |
phase_id, | |
annotation_file): | |
"""Helper Method: Takes `challenge_id`, `phase_id` and `annotation_file` | |
as input and returns corresponding path to annotation file""" | |
annotation_file_name = os.path.basename(annotation_file.name) | |
return join(self.PHASE_DATA_DIR, "{annotation_file}").format( |
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
[[0.0024761009000009437, -2.99753], | |
[0.006177699600002029, -2.99386], | |
[0.008496555099998915, -3.99143], | |
[0.00997839359999908, -3.98992]] |
NewerOlder