def formula(x, y, z):
return (x <= (y == z)) == ((x <= y) == (x <= z))
test_cases = [
(False, False, False), #1
(False, False, True), #2
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
| #!/bin/bash | |
| # Function to check if a command exists | |
| command_exists() { | |
| command -v "$1" >/dev/null 2>&1 | |
| } | |
| # Function to log messages | |
| log() { | |
| echo "[$(date +'%Y-%m-%d %H:%M:%S')] $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
| import os | |
| import sys | |
| import requests | |
| import logging | |
| import argparse | |
| from typing import Optional | |
| from dotenv import load_dotenv | |
| from dataclasses import dataclass | |
| # Configure root logger |
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 math | |
| def is_simple_number(n): | |
| if n < 2: | |
| return False | |
| elif n == 2: | |
| return True | |
| elif n % 2 == 0: | |
| return False | |
| else: |
def pierce_arrow(a, b):
return not(a or b)| a | b | f |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 0 |
def schaeffers_stroke(a, b):
return not (a and b)| a | b | f |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 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
| 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: |
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 sys | |
| import traceback | |
| from collections import namedtuple | |
| from pathlib import Path | |
| import re | |
| import torch | |
| import torch.hub |
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
| 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(".") |
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
| # Set the email server and login credentials | |
| $smtpServer = "smtp.gmail.com" | |
| $username = "username@gmail.com" | |
| $password = "password" | |
| $sendTo = "username@gmail.com" | |
| # Create a PSCredential object using the login credentials | |
| $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $(ConvertTo-SecureString -String $password -AsPlainText -Force) |
NewerOlder
