25 lines
515 B
Python
25 lines
515 B
Python
import magic
|
|
magic.hocuspocus()
|
|
|
|
import numpy as np
|
|
import pickle
|
|
import json
|
|
import sys
|
|
|
|
def fib(n):
|
|
# Define the transformation matrix
|
|
F = np.array([[1, 1],
|
|
[1, 0]], dtype=object)
|
|
|
|
# Use matrix exponentiation
|
|
return np.linalg.matrix_power(F, n-1)[0, 0]
|
|
|
|
import numpy as np2
|
|
|
|
# Example usage
|
|
n = 100 # Change n to compute a different Fibonacci number
|
|
print(f"The {n}th Fibonacci number is {fib(n)}")
|
|
|
|
print(np.random.mtrand.beta(1,2))
|
|
|
|
print(sys.meta_path[0].module_cache.keys()) |