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 typing import List, Dict | |
class AllocationError(Exception): | |
"""Custom exception for allocation errors.""" | |
pass | |
def validate_parameters( | |
num_stocks: int, | |
factor: float, | |
last_stock_cap: float, |
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
// bytbil.com - Get average car price (including VAT) for all cars on a given page with console. | |
var arr = $(".car-price-main").toArray().map((x) => parseInt(x.innerText.replace(/\s|kr/g, ''))); console.log(arr); (arr.reduce((a, b) => a + b, 0)) / arr.length; |
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
""" | |
pip install click | |
""" | |
import click | |
import itertools | |
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
# -*- coding: utf-8 -*- | |
""" | |
Flask-Login example | |
=================== | |
This is a small application that provides a trivial demonstration of | |
Flask-Login, including remember me functionality. | |
:copyright: (C) 2011 by Matthew Frazier. | |
:license: MIT/X11, see LICENSE for more details. | |
""" |
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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme", | |
"default_line_ending" : "unix", | |
"font_options": "subpixel_antialias", | |
"font_size": 14, | |
"gutter" : true, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": |
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
{ | |
"user": { | |
"debug": false, | |
"delay": 0.25, | |
"error_color": "D02000", | |
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Danish Royalty/Danish Royalty.gutter-theme", | |
"gutter_theme_excludes": [], | |
"lint_mode": "load/save", | |
"linters": { | |
"htmltidy": { |
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
[alias] | |
# Basic commands | |
ignored = git ls-files -v | grep \"^[[:lower:]]\" | |
st = status -s | |
stat = status | |
ci = commit | |
co = checkout | |
br = branch | |
brav = branch -av | |
unstage = reset HEAD -- |