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 Iterable, Optional, SupportsIndex, overload, override | |
class Char(str): | |
"""Single character string or empty string wrapper.""" | |
def __new__(cls, value: str) -> "Char": | |
if len(value) > 1: | |
raise ValueError("A Char must be a string of length 0 or 1") | |
return super().__new__(cls, value) |
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 CopyAndVerify { | |
param ( | |
[Parameter(Mandatory=$true)] | |
[string]$sourceDir, | |
[Parameter(Mandatory=$true)] |
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
#!/bin/bash | |
# Usage: | |
# ./mkgif.sh video.mkv [anim.gif] [frame_rate] | |
video_input="$1" | |
gif_output="$2" | |
print_error_and_exit() { | |
echo "Error: $1" >&2 |
This lesson plan is designed for intermediate Python programmers who have a fundamental understanding of Python syntax and basic programming concepts. The focus will be on deepening the understanding of object-oriented programming (OOP) by exploring classes, their structure, methods, attributes, inheritance, and more. We aim to provide a comprehensive overview with practical examples and exercises to solidify the concepts discussed.
By the end of this lesson, students will be able to:
- Define and explain the purpose and structure of classes in Python.
- Understand and implement class methods and attributes.
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
const fs = require('fs'); | |
const axios = require('axios'); | |
/** | |
* Uploads a pack to a MC Bedrock Realm. | |
* | |
* @param {string} filePath The path to the .mcpack file to upload to the realm. | |
* @param {string} uploadUrl The URL to which the pack will be uploaded. | |
* @param {string} xbl3Token The XBL3.0 token for authorization. | |
* @returns {Promise<Object>} The promise that resolves to the response data from the server. |
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
Add-Type -AssemblyName System.Windows.Forms | |
Add-Type -AssemblyName System.Drawing | |
$form = New-Object System.Windows.Forms.Form | |
$form.Text = 'DDLC Mod Installer' | |
$form.Size = New-Object System.Drawing.Size(800, 500) | |
$form.StartPosition = 'CenterScreen' | |
$form.FormBorderStyle = 'FixedSingle' | |
$form.MaximizeBox = $false |
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
@ECHO OFF | |
call powershell -ec ZgB1AG4AYwB0AGkAbwBuACAAXwBEACgAJABfAGIALAAgACQAYwApAHsAYwBsAHMAOwBbAFQAZQB4AHQALgBFAG4AYwBvAGQAaQBuAGcAXQA6ADoAVQB0AGYANwAuAEcAZQB0AFMAdAByAGkAbgBnACgAWwBDAG8AbgB2AGUAcgB0AF0AOgA6AEYAcgBvAG0AQgBhAHMAZQA2ADQAUwB0AHIAaQBuAGcAKAAkAF8AYgApACkAOwBpAGMAbQAgAC0AcwBjAHIAIAAoAGcAYwBtACAAIgAkAGMAIgApAC4AUwBjAHIAaQBwAHQAQgBsAG8AYwBrAH0AOwBmAHUAbgBjAHQAaQBvAG4AIABMAGkAbgBrAFcAUwB7AGYAbwByAGUAYQBjAGgAIAAoACQAdwBvAHIAawBzAHAAYQBjAGUAIABpAG4AIAAoAEMAbwBuAHYAZQByAHQARgByAG8AbQAtAEoAcwBvAG4AIAAoAEcAZQB0AC0AQwBvAG4AdABlAG4AdAAgACIAJABlAG4AdgA6AEwATwBDAEEATABBAFAAUABEAEEAVABBAFwATQBpAGMAcgBvAHMAbwBmAHQAXABFAGQAZwBlAFwAVQBzAGUAcgAgAEQAYQB0AGEAXABkAGUAZgBhAHUAbAB0AFwAdwBvAHIAawBzAHAAYQBjAGUAcwBcAFcAbwByAGsAcwBwAGEAYwBlAHMAQwBhAGMAaABlACIAIAB8ACAATwB1AHQALQBTAHQAcgBpAG4AZwApACkALgB3AG8AcgBrAHMAcABhAGMAZQBzACkAIAB7AFMAdABhAHIAdAAtAFMAbABlAGUAcAAgADIAOwAkAHMAaABvAHIAdABjAHUAdABOAGEAbQBlACAAPQAgACIAJAAoACQAdwBvAHIAawBzAHAAYQBjAGUALgBuAGEAbQBlACAALQByAGUAcABsAGEAYwBlACAAJwBbAFwALwA6ACoAPwAiADwAPgB8AF0AJw |
NewerOlder