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
| import requests | |
| from typing import TypeVar, Generic, Type, Optional, Dict, Any, List | |
| from urllib.parse import urljoin | |
| from pydantic import BaseModel, ConfigDict | |
| T = TypeVar('T', bound=BaseModel) | |
| class APIClient(Generic[T]): | |
| """A generic API client wrapper using Pydantic for validation.""" |
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 __future__ import annotations | |
| from typing import Any, TypeVar, get_type_hints | |
| from datetime import datetime, timezone | |
| from pydantic import BaseModel, Field, EmailStr, field_validator, create_model | |
| import json | |
| from typing import cast | |
| from rich.console import Console | |
| from rich.syntax import Syntax | |
| from rich.pretty import Pretty | |
| from difflib import unified_diff |
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
| { | |
| // "extensionsGallery": { | |
| // "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", | |
| // "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index", | |
| // "itemUrl": "https://marketplace.visualstudio.com/items" | |
| // }, | |
| // Basic editor settings | |
| "editor.tabSize": 4, | |
| "editor.insertSpaces": false, |
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/sh | |
| # Script to append a prefix to the commit message | |
| commitMsgIn="$1" | |
| commitType="$2" | |
| branchName="$(git rev-parse --abbrev-ref HEAD)" | |
| echo "Commit msg in = '$( cat "${commitMsgIn}")'" | |
| echo "Commit type = '${commitType}'" |
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
| [user] | |
| email = [email protected] | |
| name = Kanelis Elias | |
| [init] | |
| defaultBranch = master | |
| [core] | |
| editor = emacsclient -t -create-frame --alternate-editor= | |
| quotepath = false | |
| pager = diff-so-fancy | less --tabs=4 -RF | |
| # pager = delta |
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
| // ------------------------------------------------------------------------ | |
| #include "CddTemplate.h" | |
| #include "Std_Types.h" | |
| // ------------------------------------------------------------------------ | |
| /** Uncomment to enable debugging aid */ | |
| //#define CDDTEMPLATE_ENABLE_DEBUG |
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
| #ifndef CDDTEMPLATE_H | |
| #define CDDTEMPLATE_H | |
| #include "Std_Types.h" | |
| /** \brief Driver Initialization. */ | |
| extern void CddTemplate_Init( void ); | |
| /** \brief Driver De-initialization. */ | |
| extern void CddTemplate_Deinit( void ); |
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
| #include <stdbool.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <assert.h> | |
| static bool bitmask_writeU32( uint32_t *const address, const uint32_t mask, | |
| const uint32_t pos, const uint32_t value ) | |
| { | |
| const bool success = ( ( address != NULL ) && ( pos < 32U ) ); |
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
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <sys/time.h> | |
| typedef struct | |
| { | |
| float dampingFactor; | |
| float dampingCoeff; | |
| float target; |
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
| #include <stdio.h> | |
| #include <stdint.h> | |
| void printb(const char* name, const uint16_t value) { | |
| printf("%s: 0b", name); | |
| for (int i = 15; i >= 0; --i) { | |
| printf("%d", (value >> i) & 1); | |
| } | |
| printf("\n"); | |
| } |
NewerOlder