├── .gitignore ├── Database Schema for Tracking Liquidity Data (SQL) ├── LICENSE ├── Udav └── main.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Build and Release Folders 2 | bin-debug/ 3 | bin-release/ 4 | [Oo]bj/ 5 | [Bb]in/ 6 | 7 | # Other files and folders 8 | .settings/ 9 | 10 | # Executables 11 | *.swf 12 | *.air 13 | *.ipa 14 | *.apk 15 | 16 | # Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` 17 | # should NOT be excluded as they contain compiler settings and other important 18 | # information for Eclipse / Flash Builder. 19 | -------------------------------------------------------------------------------- /Database Schema for Tracking Liquidity Data (SQL): -------------------------------------------------------------------------------- 1 | -- Liquidity Data Tracking Database Schema 2 | 3 | CREATE TABLE Companies ( 4 | company_id SERIAL PRIMARY KEY, 5 | name VARCHAR(255) NOT NULL, 6 | market_cap DECIMAL(20,2) 7 | ); 8 | 9 | CREATE TABLE LiquidityMetrics ( 10 | metric_id SERIAL PRIMARY KEY, 11 | company_id INT REFERENCES Companies(company_id), 12 | current_assets DECIMAL(20,2), 13 | current_liabilities DECIMAL(20,2), 14 | inventory DECIMAL(20,2), 15 | cash DECIMAL(20,2), 16 | trading_volume DECIMAL(20,2), 17 | bid_price DECIMAL(10,2), 18 | ask_price DECIMAL(10,2), 19 | timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP 20 | ); 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2025, Korg 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /Udav: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | 3 | # Sample stock market data 4 | data = { 5 | "Stock": ["AAPL", "TSLA", "MSFT"], 6 | "Bid Price": [149.8, 702.5, 280.3], 7 | "Ask Price": [150.2, 703.0, 280.8], 8 | "Trading Volume": [30000000, 25000000, 22000000], 9 | "Market Cap": [2500000000000, 900000000000, 2200000000000] 10 | } 11 | 12 | df = pd.DataFrame(data) 13 | 14 | # Calculate Bid-Ask Spread and Turnover Ratio 15 | df["Bid-Ask Spread"] = df["Ask Price"] - df["Bid Price"] 16 | df["Turnover Ratio"] = df["Trading Volume"] / df["Market Cap"] 17 | 18 | # Display results 19 | print(df[["Stock", "Bid-Ask Spread", "Turnover Ratio"]]) 20 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import random 2 | import string 3 | import math 4 | 5 | def generate_random_string(length=10): 6 | """Generate a random string of given length.""" 7 | return ''.join(random.choices(string.ascii_letters + string.digits, k=length)) 8 | 9 | def fibonacci(n): 10 | """Generate a Fibonacci sequence up to n.""" 11 | sequence = [0, 1] 12 | while len(sequence) < n: 13 | sequence.append(sequence[-1] + sequence[-2]) 14 | return sequence 15 | 16 | def is_prime(num): 17 | """Check if a number is prime.""" 18 | if num < 2: 19 | return False 20 | for i in range(2, int(num ** 0.5) + 1): 21 | if num % i == 0: 22 | return False 23 | return True 24 | 25 | def generate_random_numbers(count=10, lower=1, upper=100): 26 | """Generate a list of random numbers.""" 27 | return [random.randint(lower, upper) for _ in range(count)] 28 | 29 | def reverse_string(s): 30 | """Reverse a given string.""" 31 | return s[::-1] 32 | 33 | def factorial(n): 34 | """Calculate factorial of a number.""" 35 | if n == 0: 36 | return 1 37 | return n * factorial(n - 1) 38 | 39 | def count_vowels(s): 40 | """Count the number of vowels in a string.""" 41 | return sum(1 for char in s.lower() if char in "aeiou") 42 | 43 | def sort_numbers(numbers): 44 | """Sort a list of numbers in ascending order.""" 45 | return sorted(numbers) 46 | 47 | def find_max(numbers): 48 | """Find the maximum number in a list.""" 49 | return max(numbers) if numbers else None 50 | 51 | def find_min(numbers): 52 | """Find the minimum number in a list.""" 53 | return min(numbers) if numbers else None 54 | 55 | def calculate_mean(numbers): 56 | """Calculate the mean of a list of numbers.""" 57 | return sum(numbers) / len(numbers) if numbers else None 58 | 59 | def calculate_median(numbers): 60 | """Calculate the median of a list of numbers.""" 61 | sorted_numbers = sorted(numbers) 62 | n = len(sorted_numbers) 63 | if n % 2 == 1: 64 | return sorted_numbers[n // 2] 65 | else: 66 | mid1, mid2 = sorted_numbers[n // 2 - 1], sorted_numbers[n // 2] 67 | return (mid1 + mid2) / 2 68 | 69 | def calculate_standard_deviation(numbers): 70 | """Calculate the standard deviation of a list of numbers.""" 71 | mean = calculate_mean(numbers) 72 | variance = sum((x - mean) ** 2 for x in numbers) / len(numbers) 73 | return math.sqrt(variance) 74 | 75 | def is_palindrome(s): 76 | """Check if a string is a palindrome.""" 77 | return s == s[::-1] 78 | 79 | def main(): 80 | sample_numbers = generate_random_numbers() 81 | print("Random String:", generate_random_string(12)) 82 | print("Fibonacci Sequence:", fibonacci(10)) 83 | print("Prime Check (17):", is_prime(17)) 84 | print("Random Numbers:", sample_numbers) 85 | print("Reversed String:", reverse_string("Hello World")) 86 | print("Factorial (5):", factorial(5)) 87 | print("Sorted Numbers:", sort_numbers(sample_numbers)) 88 | print("Max Number:", find_max(sample_numbers)) 89 | print("Min Number:", find_min(sample_numbers)) 90 | print("Mean:", calculate_mean(sample_numbers)) 91 | print("Median:", calculate_median(sample_numbers)) 92 | print("Standard Deviation:", calculate_standard_deviation(sample_numbers)) 93 | print("Vowel Count in 'Cryptography':", count_vowels("Cryptography")) 94 | print("Is 'racecar' a palindrome?", is_palindrome("racecar")) 95 | 96 | if __name__ == "__main__": 97 | main() 98 | --------------------------------------------------------------------------------