def schaeffers_stroke(a, b):
return not (a and b)
a | b | f |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
# Prompt user to input start date, end date, and file name | |
# If no value is provided, use default values | |
if (!($startDate = Read-Host "Enter the start date (yyyy-mm-dd) [2022-12-01]")) { $startDate = "2022-12-01" } | |
if (!($endDate = Read-Host "Enter the end date (yyyy-mm-dd) [2022-12-31]")) { $endDate = "2022-12-31" } | |
if (!($fileName = Read-Host "Enter the file name [output.txt]")) { $fileName = "output.txt" } | |
$startTimeXPath = (Get-Date $startDate).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ss.fffffffZ') | |
$endTimeXPath = (Get-Date $endDate).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ss.fffffffZ') | |
# Set filters to retrieve events with Level 1 or 2 severity from specified date range |
' See Visual Basic'i skript loeb käsurea argumendina määratud tekstifaili ning töötleb teksti, | |
' et leida ja loendada failis kõige populaarsemad sõnad. Skript loob kõigepealt regulaaravaldise objekti, | |
' mida kasutatakse tekstis olevate üksikute sõnade tuvastamiseks. Seejärel itereerib ta teksti läbi, lisades iga sõna sõnastikuobjektile, | |
' mis salvestab iga sõna arvu. Kui kõik sõnad on töödeldud, sorteerib skript sõnastiku sõnade arvu alusel kahanevas järjekorras ja | |
' väljastab N kõige populaarsemat sõna, kus N on määratud teise käsurea argumendina. | |
' Seejärel teostab skript sarnase protsessi, et leida ja loendada sõnu, mis sisaldavad apostrofe. | |
' Ta kasutab nende sõnade tuvastamiseks teistsugust regulaaravaldist ning loendab ja sorteerib neid samamoodi nagu eelmises etapis. | |
' Lõpuks väljastab skript failis olevate sõnade koguarvu ja unikaalsete sõnade arvu. |
' Set the locale to US English | |
SetLocale(1033) | |
Set objArgs = WScript.Arguments | |
' Check if the number of arguments passed to the script is less than or equal to 1 | |
' If no arguments were passed, display a message and quit the script | |
If objArgs.Count <= 1 Then | |
Wscript.Echo "Enter directory of pictures and target directory" | |
WScript.Quit 1 |
@echo off | |
setlocal enabledelayedexpansion | |
:: Set character encoding to UTF-8 to support Estonian characters | |
@chcp 65001 | |
:: Check if argument was provided | |
if "%~1" == "" ( echo No arguments... & exit /b ) | |
:: Set string and initialize variables | |
set str=%1 |
# Set the email server and login credentials | |
$smtpServer = "smtp.gmail.com" | |
$username = "[email protected]" | |
$password = "password" | |
$sendTo = "[email protected]" | |
# Create a PSCredential object using the login credentials | |
$credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $(ConvertTo-SecureString -String $password -AsPlainText -Force) |
print(f"Enter 'exit' to close") | |
while(True): | |
text = input("Enter your promt: ") | |
if text == 'exit': | |
exit() | |
words = text.split() | |
num_words = len(words) | |
num_dots = text.count(".") |
import os | |
import sys | |
import traceback | |
from collections import namedtuple | |
from pathlib import Path | |
import re | |
import torch | |
import torch.hub |
import datetime | |
import os | |
import pandas as pd | |
import ijson | |
# Get a list of all JSON files in the current directory | |
json_files = [f for f in os.listdir('.') if f.endswith('.json')] | |
# If there are no JSON files, print an error message and exit | |
if not json_files: |
def schaeffers_stroke(a, b):
return not (a and b)
a | b | f |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
def pierce_arrow(a, b):
return not(a or b)
a | b | f |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 0 |