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 os | |
import requests | |
import io | |
import random | |
import time | |
import warnings | |
from PIL import Image | |
from stability_sdk import client | |
import stability_sdk.interfaces.gooseai.generation.generation_pb2 as generation |
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
# 2024-01-14 MIT LICENSE | |
Mortem in Abbatia | |
A text-based adventure game inspired by Lucas Arts adventure games. The game is set in the hauntingly atmospheric Byland Abbey during the 12th century, a period ripe with history and mystery. The player assumes the role of Brother Aelfric who was born into a family of hunters and woodsmen in a small village on the outskirts of a great forest. Growing up, he learned the skills of tracking, hunting, and surviving in the wilderness from his father and grandfather. However, as he grew older, Aelfric began to question the morality of hunting and killing animals for sport. During a trip to a nearby monastery, Aelfric was struck by the peaceful and contemplative lifestyle of the monks he met there. He was particularly drawn to their devotion to God and the pursuit of knowledge and enlightenment. After much soul-searching, Aelfric decided to abandon his former way of life and become a monk himself. A amonk that likes to discover secrets and uses his haunting skills for sol |
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 unittest | |
#Function takes an array of arbitrarily nested arrays of int and flattens it | |
#into a 1 dimensional array containing the same integers. | |
def flatten_array(array_to_flatten): | |
new_array = [] | |
#we check each element, if it's an INT we append it into the output arr | |
#if it's not an int, we recursively call the function to flattern it | |
for element in array_to_flatten: | |
if type(element) is int: |
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
using System; | |
using System.Collections.Generic; | |
public class Test | |
{ | |
public static void Main() | |
{ | |
// your code goes here | |
// your code goes here | |
string s = "kincenvizh"; |
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/python3 | |
''' | |
Colleen is turning n years old! Therefore, she has n candles of | |
various heights on her cake, and candle i has height . | |
Because the taller candles tower over the shorter ones, Colleen can only blow out the tallest candles. | |
Given the n for each individual candle, find and print the number of candles she can successfully blow out. | |
''' | |
import sys |
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/python3 | |
''' | |
Given five positive integers, find the minimum and maximum values | |
that can be calculated by summing exactly four of the five integers. | |
Then print the respective minimum and maximum values as a single line | |
of two space-separated long integers. | |
''' | |
import sys |
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/python3 | |
''' | |
Consider a staircase of size n=4: | |
# | |
## | |
### | |
#### | |
Observe that its base and height are both equal to , and the image |
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/python3 | |
''' | |
Given an array of integers, calculate which fraction of its elements are positive, | |
which fraction of its elements are negative, and which fraction of its elements are zeroes, | |
respectively. Print the decimal value of each fraction on a new line. | |
''' | |
import sys | |
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/python3 | |
#Given a square matrix of size NxN , calculate the absolute difference between the sums of its diagonals. | |
import sys | |
n = int(input().strip()) | |
a = [] | |
for a_i in range(n): |
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
<?php | |
class FileOwners | |
{ | |
public static function groupByOwners($files) | |
{ | |
$file_return = []; | |
$files_copy = $files; | |
print_r($files); | |
NewerOlder