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
$app = "web_app2" | |
$directory = "WebApp2" | |
poetry new --name $app --src $directory | |
cd $directory | |
poetry shell | |
poetry add -G dev mypy pytest black isort flake8 assertpy pre-commit flake8-class-attributes-order pytest-asyncio pytest-cov flake8-pyproject | |
echo "[tool.black]` | |
line-length = 120` | |
target-version = ['py310']` | |
` |
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
$directory = "PythonApp1" | |
$app = "python_app1" | |
mkdir $directory | |
cd $directory | |
pipenv install --dev mypy pytest black isort flake8 assertpy pre-commit | |
mkdir src & mkdir src\$app & mkdir tests | |
echo "[tool.black]` | |
line-length = 120` | |
target-version = ['py310']` # https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html?highlight=target-version#command-line-options |
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 ast | |
from dataclasses import dataclass | |
from functools import reduce | |
from pathlib import Path | |
from types import TracebackType | |
from typing import Self, TextIO | |
@dataclass | |
class Symbols: |
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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"final_space": true, | |
"osc99": true, | |
"console_title": true, | |
"console_title_style": "folder", | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", |
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
- pwsh: | | |
if ($env:PACKAGEVERSIONTYPE -eq '' -and $env:BUILD_SOURCEBRANCHNAME -ne 'main') { | |
Write-Host "##vso[task.setvariable variable=PACKAGEVERSIONTYPE]-alpha" | |
} |
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
// <Project Sdk="Microsoft.NET.Sdk"> | |
// <PropertyGroup> | |
// <OutputType>Exe</OutputType> | |
// <TargetFramework>netcoreapp2.2</TargetFramework> | |
// <LangVersion>latest</LangVersion> | |
// </PropertyGroup> | |
// <ItemGroup> | |
// <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.6" /> |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netcoreapp2.2</TargetFramework> | |
<LangVersion>latest</LangVersion> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.6" /> |
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
param( | |
[Parameter(Mandatory = $True)] | |
[string]$RootPath, | |
[Parameter(Mandatory = $True)] | |
[string]$BucketName, | |
[Parameter(Mandatory = $True)] | |
[string]$AccessKey, | |
[Parameter(Mandatory = $True)] | |
[string]$SecretKey, | |
[switch]$RemoveRootPathFromS3Key |
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
//<Project Sdk="Microsoft.NET.Sdk"> | |
// <PropertyGroup> | |
// <OutputType>Exe</OutputType> | |
// <TargetFramework>netcoreapp2.2</TargetFramework> | |
// </PropertyGroup> | |
// <ItemGroup> | |
// <PackageReference Include="CsvHelper" Version="12.1.2" /> | |
// <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.6" /> | |
// <PackageReference Include="TinyCsvParser" Version="2.5.2" /> | |
// <PackageReference Include="WindowsAzure.Storage" Version="9.3.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
function memoize(fn: any): any { | |
console.log('memoize'); | |
const cache = {}; | |
return function () { | |
const key: string = JSON.stringify(arguments); | |
if (cache[key]) { | |
console.log(`${key} found in cache`); | |
return cache[key]; | |
} | |
else { |
NewerOlder