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 csv | |
| import math | |
| def safe_float(x): | |
| try: | |
| return float(x) | |
| except (ValueError, TypeError): | |
| return None | |
| def safe_div(x, y): |
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 <FastLED.h> | |
| #define NUM_LEDS 60 | |
| #define LED_PIN 2 | |
| struct LEDState { | |
| CRGB* leds; | |
| int count; | |
| CHSV baseColor; |
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 <FastLED.h> | |
| #define NUM_LEDS 30 | |
| #define LED_PIN 2 | |
| #define YELLOW_BTN_PIN 3 | |
| #define BLUE_BTN_PIN 4 | |
| const int LAST_MODE = 18; | |
| int current_mode = 0; | |
| CRGB leds[NUM_LEDS]; |
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
| # Higher order function and recursive combined. | |
| count = lambda x, counter, func: counter == x if counter else count(x, func(counter), func) | |
| # some variations using the above function | |
| increment = lambda x: x + 1 | |
| increment_by_two = lambda x: x + 2 | |
| double = lambda x: x * 2 | |
| decrement_by_x = lambda x: lambda y: x - y | |
| decrement = lambda x: decrement_by_x(x)(1) |
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 <Wire.h> | |
| #include <LiquidCrystal_I2C.h> | |
| #include <DHT11.h> | |
| // INPUT PINS | |
| const int SOIL_MOISTURE_PIN = 0; | |
| const int WATER_LEVEL_PIN = 1; | |
| const int BUTTON_PIN = 7; | |
| // Density, Humidity and Temperature sensor (DHT11) |
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
| using Microsoft.EntityFrameworkCore; | |
| using Microsoft.Extensions.Logging; | |
| // Webshop database | |
| public class Company | |
| { | |
| public int Id { get; set; } | |
| public string Name { get; set; } = null!; | |
| public string? Country { get; set; } | |
| } |
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
| export interface Func<a, b> { | |
| f: (_: a) => b | |
| then: <c>(this: Func<a, b>, g: Func<b, c>) => Func<a, c> | |
| repeat: (this: Func<a, a>) => Func<number, Func<a, a>> | |
| repeatUntil: (this: Func<a, a>) => Func<Func<a, boolean>, Func<a, a>> | |
| } | |
| export let Func = <a, b>(f: (_: a) => b): Func<a, b> => { | |
| return { | |
| f: f, |
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
| const game_grid = document.getElementById('game-grid'); | |
| const grid_size = 3; | |
| const player_x = document.getElementById('player-x') | |
| const player_o = document.getElementById('player-o') | |
| const header = document.getElementById('header'); | |
| const reset_button = document.getElementById('reset'); | |
| let current_player = player_x; |
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
| 1. 11111011 = 251 1. 73 = 01001001 | |
| 2. 11011100 = 220 2. 131 = 10000011 | |
| 3. 01101110 = 110 3. 82 = 01010010 | |
| 4. 01011101 = 93 4. 16 = 00010000 | |
| 5. 01101000 = 104 5. 118 = 01110110 | |
| 6. 01110001 = 113 6. 79 = 01001111 | |
| 7. 11010111 = 215 7. 178 = 10110010 | |
| 8. 00100110 = 38 8. 1 = 00000001 | |
| 9. 11101011 = 235 9. 52 = 00110100 | |
| 10. 10100000 = 160 10. 83 = 01010011 |
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-agent: * | |
| Disallow: / | |
| User-agent: ia_archiver | |
| Disallow: / | |
| User-agent: Googlebot | |
| Disallow: / | |
| User-agent: Facebot |
NewerOlder