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
{ | |
"theme": "Rosé Pine", | |
"ui_font_size": 16, | |
"buffer_font_size": 14, | |
"inlay_hints": { | |
"enabled": false, | |
"show_type_hints": true, | |
"show_parameter_hints": true, | |
"show_other_hints": true | |
}, |
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
game_total_power = 0 | |
with open('input.txt', 'r') as file: | |
for line in file: | |
sets = line.split(';') | |
game_max_red = 0 | |
game_max_green = 0 | |
game_max_blue = 0 | |
game_power = 0 | |
for set in sets: |
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
max_red = 12 | |
max_green = 13 | |
max_blue = 14 | |
game_id_sum = 0 | |
with open('input.txt', 'r') as file: | |
for line in file: | |
sets = line.split(';') | |
game_id = sets[0].split(':')[0].split(' ')[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
words = ['1', '2', '3', '4', '5', '6', '7', '8', '9', | |
'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] | |
numbers = { | |
'1': '1', | |
'2': '2', | |
'3': '3', | |
'4': '4', | |
'5': '5', | |
'6': '6', |
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
def get_first_digit(str): | |
for char in str: | |
if char.isdigit(): | |
return char | |
return None | |
def get_last_digit(str): | |
for char in reversed(str): | |
if char.isdigit(): | |
return char |
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 os | |
import re | |
# Paths for header, footer, and the views and destination directories | |
header_path = '../src/includes/header.html' | |
footer_path = '../src/includes/footer.html' | |
views_dir = '../src/views/' | |
destination_dir = '../docs/' | |
# Read the content of the header and footer files with UTF-8 encoding |
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
-- Pull in the wezterm API | |
local wezterm = require 'wezterm' | |
-- This table will hold the configuration. | |
local config = {} | |
-- In newer versions of wezterm, use the config_builder which will | |
-- help provide clearer error messages | |
if wezterm.config_builder then | |
config = wezterm.config_builder() |
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
function localStorageTest(){ | |
var test = 'test'; | |
try { | |
localStorage.setItem(test, test); | |
localStorage.removeItem(test); | |
return true; | |
} catch(e) { | |
return 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
//http://www.w3.org/TR/notifications/ | |
//https://developer.mozilla.org/en-US/docs/Web/API/notification | |
//Notifier.isSupported | |
// | |
//Notifier.permission //"granted", "denied", or "default" | |
// | |
//Notifier.requestPermission([callback]) //first argument of callback is the current permission | |
// | |
//Notifier.notify(title[, options]) |
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
$gridgutter: 30; | |
$gridpadding: 30; | |
$gridsize: 978 + ($gridpadding*2); | |
$gridcolsize: (($gridsize - ($gridgutter * 11)) / 12); | |
.grid { | |
width: 100%; | |
max-width: $gridsize+px; | |
margin: 0 auto; | |
padding-left: $gridpadding+px; | |
padding-right: $gridpadding+px; |
NewerOlder