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 MCP: | |
def reference_voltage(self) -> float: | |
"""Returns the MCP3xxx's reference voltage as a float.""" | |
raise NotImplementedError | |
def read(self, pin: int | None = None, is_differential=False) -> int: | |
""" | |
read a voltage or voltage difference using the MCP3102. |
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
import { writable, type Writable } from "svelte/store"; | |
import axios from "axios"; | |
export type Token = "Authenticated" | "Unauthenticated"; | |
export class UserDataCredentials { | |
private readonly accessToken: string; | |
private readonly status: Token; |
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
DB_NAME=neo4j | |
DB_USERNAME=neo4j | |
DB_PASSWORD=my-secret-password | |
DB_PORT=7687 | |
DB_HOST=graph-db | |
DB_URL="bolt://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}" |
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
<!DOCTYPE html> | |
<html lang="en" class="tui-bg-cyan-white"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="icon" type="image/x-icon" href="https://images.vexels.com/media/users/3/140866/isolated/preview/96676393ee3780e2827a827587feee79-logo-de-msdos.png"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" |
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
import type { StorybookConfig } from "@storybook/react-vite"; | |
import { mergeConfig } from 'vite'; | |
import path from 'path'; | |
const config: StorybookConfig = { | |
stories: [ | |
"../stories/**/*.mdx", | |
"../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)", | |
], | |
addons: [ |
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
import itertools | |
all_components = 'AB', 'CD', 'EF' | |
first = all_components[0] | |
for r in itertools.product(first, *all_components[1:]): | |
print(*r) |
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
import collections | |
import enum | |
NUMBERS = "".join(map(str, range(10))) | |
FLOAT = ".," | |
OPERATOR = "+-*/" | |
PARENTHESIS = "()" | |
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
#include <stdio.h> | |
#include <pico/stdlib.h> | |
#include "hardware/pwm.h" | |
#include "hardware/adc.h" | |
#define LED_PIN_BUILT 25 | |
#define DEFAULT_WRAP_PWM 4096 | |
#define DEFAULT_DIV_PWM 3 |
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
""" | |
MIT License | |
Copyright (c) 2023 D. Sealtiel Valderrama | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import abc | |
import math | |
import functools | |
import pygame | |
import pygame.locals | |
import pygame.math |
NewerOlder