File size: 41,066 Bytes
5697766 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | {"text": "\"\"\"\n# Euclid's Algorithm for GCD\n\ngreatest common divisor (GCD) is the greatest positive integer that able to divide all provided number evenly without remainder\n\n# Reference\n- Greatest Common Divisor -- https://brilliant.org/wiki/greatest-common-divisor/\n\n# Example\n```julia\ngcd_euclid_algorithm([30, 12, 6]) # returns 6\ngcd_euclid_algorithm([13, 48]) # returns 1\ngcd_euclid_algorithm([2, 4, 6, 8, 16]) # returns 2\n```\n\n\"\"\"\nfunction gcd_euclid_algorithm(arr::Vector{N})where N<:Integer\n\n result = arr[1]\n\n for i in 2:length(arr)\n result = find_gcd(result,arr[i])\n if result == 1\n break\n end\n end\n\n return result\nend\n\nfunction find_gcd(number1::Int,number2::Int)::Int\n while number2!=0\n number1, number2 = number2, number1 % number2\n end\n\n return number1\nend", "meta": {"hexsha": "5bca5d6cfe74b33ed9f24c5eb70f4a656afa308c", "size": 819, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/math/gcd_euclid_algorithm.jl", "max_stars_repo_name": "gohpeijin/Julia", "max_stars_repo_head_hexsha": "99866f5f6048919c67b28fdcfbffa83f470888f5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/math/gcd_euclid_algorithm.jl", "max_issues_repo_name": "gohpeijin/Julia", "max_issues_repo_head_hexsha": "99866f5f6048919c67b28fdcfbffa83f470888f5", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/math/gcd_euclid_algorithm.jl", "max_forks_repo_name": "gohpeijin/Julia", "max_forks_repo_head_hexsha": "99866f5f6048919c67b28fdcfbffa83f470888f5", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 22.1351351351, "max_line_length": 127, "alphanum_fraction": 0.6764346764, "num_tokens": 239, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.9783846716491915, "lm_q2_score": 0.9559813463747182, "lm_q1q2_score": 0.9353174956755806}}
{"text": "# 3x3 matrix A\na = [5 -3 11; 5 6 22; 8 19 0]\nprintln(\"Matrix A = \", a)\n\n# 3x3 matrix B\nb = [12 3 -4; 5 16 9; 8 -3 4]\nprintln(\"Matrix B = \", b)\n\n# Task 1: addition and subtraction\nprintln(\"\\n============ Task 1: matrix addition and subtraction ============\\n\")\n# expected results\nc_add_exp = [17 0 7; 10 22 31; 16 16 4]\nc_sub_exp = [-7 -6 15; 0 -10 13; 0 22 -4]\n\nc_add = a + b\nprint(\"A+B = \", c_add)\nc_sub = a - b\nprint(\"A-B = \", c_sub)\n\nprintln(\"Does addition work as expected? \", c_add == c_add_exp)\nprintln(\"Does subtracttion work as expected? \", c_sub == c_sub_exp)\n\n# Task 2: matrix multiplications\nprintln(\"\\n============ Task 2: matrix multiplication ============\\n\")\nc_mult_ab = a * b\nc_mult_ba = b * a\n\nprintln(\"A * B = \", c_mult_ab)\nprintln(\"B * A = \", c_mult_ba)\nprintln(\"==> A*B != B*A because rows from the first matrix will be multiplied with the columns from the seconds matrix. If those rows and columns are in different order, different values will result.\")\n\n# Task 3: matrix division\nprintln(\"\\n============ Task 3: matrix division ============\\n\")\nc_diff_1 = a / b\nprintln(\"A/B = \", c_diff_1)\nc_diff_2 = a \\ b\nprintln(\"A\\\\B = \", c_diff_2)\nprintln(\"==> A/B != A\\\\B, because the '\\\\' operator divides inverse which means that A\\\\B == B/A\")\n\n# Task 4: Single matrix operations\nprintln(\"\\n============ Task 4: single matrix operations ============\\n\")\na_incr = a + 1\nprintln(\"A+1 = \", a_incr)\na_decr = a - 1\nprintln(\"A-1 = \", a_decr)\na_double = a * 2\nprintln(\"A*2 = \", a_double)\na_half = a / 2\nprintln(\"A/2 = \", a_half)\n\n# Task 5: matrix and vector multiplication\nprintln(\"\\n============ Task 5: matrix and vector multiplication ============\\n\")\n# 3x4 matrix D\nd = [5 -3 11 5; 6 22 8 19; 1 5 8 11]\nprintln(\"Matrix D = \", d)\n# 4x vector V\nv = [2, 6, 9, 12]\nprintln(\"Vector V = \", v)\nresult = d * v\nprintln(\"D*V = \", result)\nprintln(\"==> The result from the multiplication of a 3x4 matrix with a 4-dimensional vector is a 3-dimensional vector!\")\n", "meta": {"hexsha": "ad9755a814e9e7e4921d0b159c2d1238be63b06a", "size": 1959, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "assessment_05/Julia/matrix_operations.jl", "max_stars_repo_name": "DominicSchiller/osmi-module-datascience", "max_stars_repo_head_hexsha": "b6413bcf6c8e2d4313cff284a01d3e2f475957b2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assessment_05/Julia/matrix_operations.jl", "max_issues_repo_name": "DominicSchiller/osmi-module-datascience", "max_issues_repo_head_hexsha": "b6413bcf6c8e2d4313cff284a01d3e2f475957b2", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assessment_05/Julia/matrix_operations.jl", "max_forks_repo_name": "DominicSchiller/osmi-module-datascience", "max_forks_repo_head_hexsha": "b6413bcf6c8e2d4313cff284a01d3e2f475957b2", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 31.5967741935, "max_line_length": 201, "alphanum_fraction": 0.6125574273, "num_tokens": 662, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9838471647042429, "lm_q2_score": 0.9324533088603709, "lm_q1q2_score": 0.9173915441413657}}
{"text": "\"\"\"\n sieve_of_eratosthenes(n::Int64)\n\nThe Sieve of Eratosthenes is one of the historical algorithms dedicated to finding all\nprime numbers up to any given limit. The algorithm is split into four steps:\n\n1. Create a list of sequential integers from 2 to n.\n2. Define initially `p=2` as the first prime number.\n3. Reconstruct all multiple combinations from `p=2`.\n4. Find the first number greater than p in the array that is not listed. Then decided:\n\t* If no number exists => stop. \n\t* `p` becomes equal to the number and go back to step 3.\n\nFor more information see: [https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes)\n\n\n# Arguments\n- `n::Int64`: Number of elements\n\n\n# Examples\n```julia-repl\njulia> import ClassicAlgorithmsCollections\njulia> ClassicAlgorithmsCollections.sieve_of_eratosthenes(50)\n[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]\n```\n\"\"\"\nfunction sieve_of_eratosthenes(n::Int64)\n prime = fill(true, n)\n p = 2\n while p^2 <= n\n\n\n if prime[p] == true\n\n # Update all multiples of p \n for i in p^2:p:n\n prime[i] = false\n end\n\n end\n p += 1\n end\n result = zeros(Int64, count(prime) - 1)\n i = 1\n for p in 2:n\n if prime[p]\n result[i] = p\n i += 1\n end\n end\n return result\nend\n", "meta": {"hexsha": "c3f4325d7e39736ea80e41fb384168050cd0dd0d", "size": 1381, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/NumberTheory/SieveOfEratosthenes.jl", "max_stars_repo_name": "Anselmoo/ClassicAlgorithmsCollections", "max_stars_repo_head_hexsha": "9f802c4f317492e19b0b8bb6d9020d8450e00772", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/NumberTheory/SieveOfEratosthenes.jl", "max_issues_repo_name": "Anselmoo/ClassicAlgorithmsCollections", "max_issues_repo_head_hexsha": "9f802c4f317492e19b0b8bb6d9020d8450e00772", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 21, "max_issues_repo_issues_event_min_datetime": "2020-09-03T06:47:45.000Z", "max_issues_repo_issues_event_max_datetime": "2020-11-20T06:58:58.000Z", "max_forks_repo_path": "src/NumberTheory/SieveOfEratosthenes.jl", "max_forks_repo_name": "Anselmoo/ClassicAlgorithmsCollections", "max_forks_repo_head_hexsha": "9f802c4f317492e19b0b8bb6d9020d8450e00772", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 25.5740740741, "max_line_length": 132, "alphanum_fraction": 0.641564084, "num_tokens": 416, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9828232869627774, "lm_q2_score": 0.9324533018213449, "lm_q1q2_score": 0.916436819035349}}
{"text": "\"\"\"\nJulia program to find the N'th Lucas Number.\nLucas Numbers is a sequence similar to Fibonacci numbers and is defined \nas the sum of its two immediately previous terms.\nThe first and second numbers in Lucas sequence are 2 and 1 respectively.\n\"\"\"\n\nfunction lucas_num(n)\n l1 = 2\n l2 = 1\n if(n == 0)\n return l1\n end\n\n for i in (2:n)\n next = l1 + l2\n l1 = l2\n l2 = next\n end\n return l2\nend\n\n\nprint(\"Enter the value of n(where you need the nth lucas number): \")\nn = readline()\nn = parse(Int, n)\nif(n < 0)\n print(\"Invalid Value of n !!!\")\n exit()\nend\nres = lucas_num(n)\nprint(\"The $n'th Lucas Number is $res.\")\n\n\n\"\"\"\nTime Complexity - O(n), where `n` is the given number.\nSpace Complexity - O(1)\n\nSAMPLE INPUT AND OUTPUT\n\nSAMPLE I\n\nEnter the value of n(where you need the nth lucas number): 25\nThe 25'th Lucas Number is 167761.\n\"\"\"\n", "meta": {"hexsha": "bdfbf3d235224643b373aebfa0b39020eb5c8f30", "size": 884, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Julia/math/lucas_number.jl", "max_stars_repo_name": "Khushboo85277/NeoAlgo", "max_stars_repo_head_hexsha": "784d7b06c385336425ed951918d1ab37b854d29f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 897, "max_stars_repo_stars_event_min_datetime": "2020-06-25T00:12:52.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-24T00:49:31.000Z", "max_issues_repo_path": "Julia/math/lucas_number.jl", "max_issues_repo_name": "adarshnjena/NeoAlgo", "max_issues_repo_head_hexsha": "77a92858d2bf970054ef31c2f55a6d79917a786a", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 5707, "max_issues_repo_issues_event_min_datetime": "2020-06-24T17:53:28.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-22T05:03:15.000Z", "max_forks_repo_path": "Julia/math/lucas_number.jl", "max_forks_repo_name": "adarshnjena/NeoAlgo", "max_forks_repo_head_hexsha": "77a92858d2bf970054ef31c2f55a6d79917a786a", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 1817, "max_forks_repo_forks_event_min_datetime": "2020-06-25T03:51:05.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-29T05:14:07.000Z", "avg_line_length": 19.2173913043, "max_line_length": 72, "alphanum_fraction": 0.6425339367, "num_tokens": 259, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9669140216112959, "lm_q2_score": 0.9449947136429407, "lm_q1q2_score": 0.9137286389699107}}
{"text": "\"\"\"\r\n bedaPusat(f, a; delta=10^-9)\r\nadalah fungsi yang digunakan untuk mencari nilai turunan `f` pada titik `a`\r\nmenggunakan formula beda pusat. Secara default, digunakan nilai toleransi `delta=1e-9`\r\n\r\n# Examples\r\n```jl\r\njulia> sol,flag,L = bedaPusat(sin,pi/3);\r\n\r\njulia> sol\r\n0.4999999999921733\r\n\r\njulia> flag\r\n0\r\n\r\njulia> L\r\n6×2 Array{Float64,2}:\r\n 0.420735 NaN\r\n 0.499167 0.0784316\r\n 0.499992 0.000824583\r\n 0.5 8.24996e-6\r\n 0.5 8.24996e-8\r\n 0.5 8.26006e-10\r\n\r\njulia> sol,flag,L = bedaPusat(sin,pi/3,delta=1e-12);\r\n\r\njulia> sol\r\n0.4999999999588666\r\n\r\njulia> flag\r\n2\r\n\r\njulia> L\r\n8×2 Array{Float64,2}:\r\n 0.420735 NaN\r\n 0.499167 0.0784316\r\n 0.499992 0.000824583\r\n 0.5 8.24996e-6\r\n 0.5 8.24996e-8\r\n 0.5 8.26006e-10\r\n 0.5 3.33067e-11\r\n 0.5 3.33067e-10\r\n```\r\nreturn solusi `sol` dengan `flag` bernilai 0 jika toleransi terpenuhi, `flag`\r\nbernilai 1 jika maksimum iterasi tercapai, `flag` bernilai 2 jika error minimum\r\ntelah tercapai namun tidak memenuhi toleransi. Serta, matriks `L` yang berisi\r\ncatatan tiap iterasi `[sol, error]`\r\n\"\"\"\r\nfunction bedaPusat(f, a; delta=10^-9)\r\n maxi = 15;\r\n flag = 1;\r\n h = 1;\r\n D = (f(a+h)-f(a-h))/(2*h);\r\n E = NaN;\r\n sol = NaN\r\n for k = 1:maxi\r\n h = h/10;\r\n D = [D (f(a+h)-f(a-h))/(2*h)]\r\n E = [E abs(D[k+1]-D[k])]\r\n if E[k+1]<delta\r\n flag = 0;\r\n sol = D[end];\r\n break\r\n end\r\n if E[k+1]>E[k]\r\n sol = D[k];\r\n flag = 2;\r\n break\r\n end\r\n end\r\n L = [D' E'];\r\n return sol, flag, L\r\nend\r\n", "meta": {"hexsha": "e6e99549abba985c7d7528bc76f47c09c75bc6f8", "size": 1562, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/bedaPusat.jl", "max_stars_repo_name": "mkhoirun-najiboi/metnum.jl", "max_stars_repo_head_hexsha": "a6e35d04dc277318e32256f9b432264157e9b8f4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/bedaPusat.jl", "max_issues_repo_name": "mkhoirun-najiboi/metnum.jl", "max_issues_repo_head_hexsha": "a6e35d04dc277318e32256f9b432264157e9b8f4", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/bedaPusat.jl", "max_forks_repo_name": "mkhoirun-najiboi/metnum.jl", "max_forks_repo_head_hexsha": "a6e35d04dc277318e32256f9b432264157e9b8f4", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 21.1081081081, "max_line_length": 87, "alphanum_fraction": 0.5691421255, "num_tokens": 645, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9532750413739076, "lm_q2_score": 0.9518632290540565, "lm_q1q2_score": 0.907387459058807}}
{"text": "\"\"\"\n factorial_iterative(n)\n\nFinds factorial of a number using Iterative method\n\n# Example\n```julia\nfactorial_iterative(5) # returns 120\nfactorial_iterative(0.1) # returns error\nfactorial_iterative(-1) # returns error\n```\n# Reference\n- factorial of a positive integer -- https://en.wikipedia.org/wiki/Factorial\n\nContributed By:- [Ashwani Rathee](https://github.com/ashwani-rathee)\n\"\"\"\nfunction factorial_iterative(n)\n if n != trunc(n) || n < 0\n throw(error(\"factorial_iterative() only accepts non-negative integral values\"))\n end\n factorial::BigInt = 1\n map(i -> factorial *= i, 1:n)\n return factorial\nend\n\n\"\"\"\n factorial_recursive(n)\n\nFinds factorial of anumber using recursive method\n\n# Example\n```julia\nfactorial_recursive(5) # returns 120\nfactorial_recursive(0.1) # returns error\nfactorial_recursive(-1) # returns error\n```\n# Reference\n- factorial of a positive integer -- https://en.wikipedia.org/wiki/Factorial\n\nContributed By:- [Ashwani Rathee](https://github.com/ashwani-rathee)\n\"\"\"\nfunction factorial_recursive(n)\n if n != trunc(n) || n < 0\n throw(error(\"factorial_iterative() only accepts non-negative integral values\"))\n end\n if n == 0 || n == 1\n return 1\n else\n factorial::BigInt = n * factorial_recursive(n - 1)\n return factorial\n end\nend\n", "meta": {"hexsha": "6366dbf672e77996ece7926dbcf7d57601005289", "size": 1347, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/math/factorial.jl", "max_stars_repo_name": "ashwani-rathee/Julia", "max_stars_repo_head_hexsha": "f02c1b07bb491a27e02599888a545db86305a97a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2020-05-22T18:32:05.000Z", "max_stars_repo_stars_event_max_datetime": "2020-05-22T18:32:05.000Z", "max_issues_repo_path": "src/math/factorial.jl", "max_issues_repo_name": "ashwani-rathee/Julia", "max_issues_repo_head_hexsha": "f02c1b07bb491a27e02599888a545db86305a97a", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/math/factorial.jl", "max_forks_repo_name": "ashwani-rathee/Julia", "max_forks_repo_head_hexsha": "f02c1b07bb491a27e02599888a545db86305a97a", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 25.4150943396, "max_line_length": 87, "alphanum_fraction": 0.6837416481, "num_tokens": 359, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9643214460461697, "lm_q2_score": 0.9399133494052117, "lm_q1q2_score": 0.9063786002565324}}
{"text": "# Finding greatest common divisor using Euclidean Algorithm\nfunction gcdFunction(a, b)\n if a == 0\n return b\n end\n return gcdFunction(b % a, a)\nend\nfunction power(x, y, m)\n if y == 0\n return 1\n end\n p = power(x, y / 2, m) % m\n p = (p * p) % m\n\n if y % 2 == 0\n return p\n else\n return (x * p) % m\n end\nend\nfunction modInverse(a, m)\n gcd = gcdFunction(a, m)\n\n if gcd != 1\n return -1\n else\n return power(a, m - 2, m)\n end\nend\n\na = 3\nm = 11\n\nans = modInverse(a, m)\n\nif ans == -1\n println(\"Inverse doesn't exist\")\nelse\n println(\"Modular multiplicative inverse is $(ans-1)\")\nend\n\n# Output\n\n#Modular multiplicative inverse is 4\n\n\n", "meta": {"hexsha": "e3e61d9908cd16a4e23fcbdf1eace1f2b2ebcaca", "size": 711, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Algo_Ds_Notes-master/Algo_Ds_Notes-master/Fermat_Little_Theorem/Fermat_Little_Theorem.jl", "max_stars_repo_name": "rajatenzyme/Coding-Journey-", "max_stars_repo_head_hexsha": "65a0570153b7e3393d78352e78fb2111223049f3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Algo_Ds_Notes-master/Algo_Ds_Notes-master/Fermat_Little_Theorem/Fermat_Little_Theorem.jl", "max_issues_repo_name": "rajatenzyme/Coding-Journey-", "max_issues_repo_head_hexsha": "65a0570153b7e3393d78352e78fb2111223049f3", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Algo_Ds_Notes-master/Algo_Ds_Notes-master/Fermat_Little_Theorem/Fermat_Little_Theorem.jl", "max_forks_repo_name": "rajatenzyme/Coding-Journey-", "max_forks_repo_head_hexsha": "65a0570153b7e3393d78352e78fb2111223049f3", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 15.1276595745, "max_line_length": 59, "alphanum_fraction": 0.5555555556, "num_tokens": 236, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9688561658682131, "lm_q2_score": 0.9324533097989076, "lm_q1q2_score": 0.9034131385828947}}
{"text": "# function _swap_rows(A::AbstractMatrix{NB}, i::T, nlines::T) where {T<:Int, NB<:Number}\n # for n ∈ (i+1):nlines # iterate in lines below to check if could be swap\n # if A[n,i] ≠ 0.0 # condition to swap row\n # L = copy(A[i,:]) # copy line to swap\n # A[i,:] = A[n,:] # swap occur\n # A[n,:] = L\n # break\n # end\n # end\n # return A\n# end\n\n\"\"\"\n gauss_jordan(A::AbstractMatrix{T}) where T<:Number\n\nGaussian elimination, also known as row reduction, is an algorithm for solving systems of linear equations. \nIt consists of a sequence of operations performed on the corresponding matrix of coefficients. \nThis method can also be used to compute the rank of a matrix, the determinant of a square matrix, and the inverse of an invertible matrix.\nhttps://en.wikipedia.org/wiki/Gaussian_elimination\n\n# Examples/Tests\n```julia\njulia> M1 = [1 2 3; 4 5 6];\njulia> M2 = [1 2 3; 4 8 12];\n\njulia> @test gauss_jordan(M1) == [1 0 -1; 0 1 2] # Test Passed\njulia> @test_throws AssertionError gauss_jordan(M2) # Test Passed - Thrown: AssertionError\n``` \n\n# Contributed By:- [AugustoCL](https://github.com/AugustoCL)\n\"\"\"\nfunction gauss_jordan(A::AbstractMatrix{T}) where {T<:Number}\n \n # convert to float to avoid InexactError: Int64()\n (T <: Integer) && (A = convert.(Float64, A))\n\n # check if matrix is singular\n m, n = size(A)\n if m == n\n @assert det(A) ≠ 0.0 \"Must insert a non-singular matrix\"\n else\n @assert det(A[:,1:end-1]) ≠ 0.0 \"Must insert a non-singular matrix or a system matrix [A b]\"\n end\n\n # execute the gauss-jordan elimination\n for i ∈ axes(A, 1)\n (A[i,i] == 0.0) && map([A,i,m]) do (x,y,z)\n for n ∈ (y+1):z # check if need swap rows -> this came from function `_swap_rows` (commented above)\n if x[n,y] ≠ 0.0 # Since it is used only once, an anonymous function with do-block should suffice.\n L = copy(x[y,:])\n x[y,:] = x[n,:]\n x[n,:] = L\n break\n end\n end\n return x\n end\n\n @. A[i,:] = A[i,:] ./ A[i,i] # divide pivot line by pivot element\n\n for j ∈ axes(A, 1) # iterate each line for each pivot column, except pivot line\n if j ≠ i # jump pivot line\n @. A[j,:] = A[j,:] - A[i,:]*A[j,i] # apply gauss jordan in each line\n end\n end\n end\n\n return A\nend\n", "meta": {"hexsha": "9cb9e15e23f00ef17d98a233dbd11da3627111b3", "size": 2650, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/matrix/gauss_jordan_elim.jl", "max_stars_repo_name": "eliascarv/Julia", "max_stars_repo_head_hexsha": "83fda6a9386801ef1d4bf9382d05474902597bce", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/matrix/gauss_jordan_elim.jl", "max_issues_repo_name": "eliascarv/Julia", "max_issues_repo_head_hexsha": "83fda6a9386801ef1d4bf9382d05474902597bce", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/matrix/gauss_jordan_elim.jl", "max_forks_repo_name": "eliascarv/Julia", "max_forks_repo_head_hexsha": "83fda6a9386801ef1d4bf9382d05474902597bce", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 37.8571428571, "max_line_length": 139, "alphanum_fraction": 0.5328301887, "num_tokens": 732, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9496693731004241, "lm_q2_score": 0.9511422217240587, "lm_q1q2_score": 0.9032706374340315}}
{"text": "#####################\n# Correlation calculated as given in:\n# Reference\n# Biddle Consulting Group (2019) http://www.biddle.com/documents/bcg_comp_chapter2.pdf\nusing Statistics # library for the function mean(X), the mean value of the vector X.\n\n# We can use any symbol for our functions.\n# Let's us the mathematical symbols for square root and sum.\n√ = sqrt\n∑ = sum\n\n# Given the vectors,\nX1 = [2.5, 3.6, 1.2, 0.8, 4.0, 3.4]\nX2 = [1.2, 1.0, 1.8, 0.9, 3.0, 2.2]\nX3 = [8.0, 15.0, 12.0, 6.0, 8.0, 10.0]\n\n# We want to find the correlations between the variable vectors:\n# X1 and X2, X1 and X3, X2 and X3 using correlation\n# coefficient approach.\n\n# First we implement the funktion for sample standard deviation as:\n\"\"\"\n S(X)\nCompute the sample standard deviation of X\n\n# Example\n```julia-repl\njulia> X1 = [2.5, 3.6, 1.2, 0.8, 4.0, 3.4]\n6-element Array{Float64,1}:\n 2.5\n 3.6\n 1.2\n 0.8\n 4.0\n 3.4\njulia> S(X1)\n1.3272779161376365\n```\n\"\"\"\nS(X)= √( ∑( map(i -> (X[i]-mean(X))^2, 1:length(X))) / (length(X)-1))\n\n# Next we implement the biased estimate of covariance as:\n\"\"\"\n S(X, Y)\nCompute the biased estimate of covariance betweem X and Y\n\n# Example\n```julia-repl\njulia> X1 = [2.5, 3.6, 1.2, 0.8, 4.0, 3.4]\n6-element Array{Float64,1}:\n 2.5\n 3.6\n 1.2\n 0.8\n 4.0\n 3.4\n\n julia> X2 = [1.2, 1.0, 1.8, 0.9, 3.0, 2.2]\n 6-element Array{Float64,1}:\n 1.2\n 1.0\n 1.8\n 0.9\n 3.0\n 2.2\n\n julia> S(X1, X2)\n 0.5736666666666667\n```\n\"\"\"\nS(X,Y)= ∑( map(i -> ((X[i]-mean(X))*(Y[i]-mean(Y))), 1:length(X))) / (length(X)-1)\n\nρ(X,Y)=S(X,Y)/(S(X)*S(Y))\n\nprint(\"\\n\\nCorrelation between X1 anx X2 is \", ρ(X1, X2))\nprint(\"\\n\\nCorrelation between X1 anx X3 is \", ρ(X1, X3))\nprint(\"\\n\\nCorrelation between X2 anx X3 is \", ρ(X2, X3))\nprint(\"\\n\\n\")\n", "meta": {"hexsha": "c5b8379d208a131080047c1548d62548b401d6e7", "size": 1719, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "assignment1/assignment1.jl", "max_stars_repo_name": "rakeroots/DV2574", "max_stars_repo_head_hexsha": "f8eb1aa14dcb677fa9d59fd1cc80515ee2c4c3fa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assignment1/assignment1.jl", "max_issues_repo_name": "rakeroots/DV2574", "max_issues_repo_head_hexsha": "f8eb1aa14dcb677fa9d59fd1cc80515ee2c4c3fa", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assignment1/assignment1.jl", "max_forks_repo_name": "rakeroots/DV2574", "max_forks_repo_head_hexsha": "f8eb1aa14dcb677fa9d59fd1cc80515ee2c4c3fa", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 21.7594936709, "max_line_length": 86, "alphanum_fraction": 0.6160558464, "num_tokens": 735, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9736446486833801, "lm_q2_score": 0.9273632906279589, "lm_q1q2_score": 0.9029223053053222}}
{"text": "#=\nP32 (**) Determine the greatest common divisor of two positive integer numbers.\nUse Euclid's algorithm.\nExample:\n* (gcd 36 63)\n9\n=#\n\nfunction gcd(a, b)\n if b == 0\n a\n else\n gcd(b, mod(a, b))\n end\nend\n\n@assert gcd(36, 63) == 9\n@assert gcd(108, 30) == 6\n@assert gcd(32, 5) == 1\n\nprintln(\"Tests passed: JL-32.jl\")\n", "meta": {"hexsha": "8146d396c214670c3542515549b86cf953281522", "size": 337, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "JL-32.jl", "max_stars_repo_name": "microamp/jl-99", "max_stars_repo_head_hexsha": "5d49a7e1617394e6cbc06f1a94fe6230b3025d73", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "JL-32.jl", "max_issues_repo_name": "microamp/jl-99", "max_issues_repo_head_hexsha": "5d49a7e1617394e6cbc06f1a94fe6230b3025d73", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "JL-32.jl", "max_forks_repo_name": "microamp/jl-99", "max_forks_repo_head_hexsha": "5d49a7e1617394e6cbc06f1a94fe6230b3025d73", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 15.3181818182, "max_line_length": 79, "alphanum_fraction": 0.5934718101, "num_tokens": 120, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.9766692291542525, "lm_q2_score": 0.9241418137109956, "lm_q1q2_score": 0.9025808728263308}}
{"text": "## Figures for the Quadratic Equation slides\nusing Plots\nusing LaTeXStrings\npyplot() # nicer output\ntheme(:dark)\n# Need for 3d arrow\nusing PyPlot\n\n##\nA = [3 -1.5; -1.5 2]\nb = [-1; 1]\nquadratic_ls(A,b) = x-> 0.5*x'*A*x - x'*b\nezsurf(x, y, f) = begin\n X = repeat(x', length(y), 1)\n Y = repeat(y, 1, length(x))\n # Evaluate each f(x, y)\n Z = map((x,y) -> f([x,y]), X, Y)\n plot(x, y, Z, st=:surface)\nend\nezsurf(-3:0.1:3,-3:0.1:3,\n quadratic_ls(A,b))\nplot!(colorbar=false,size=(500,450))\n# Show the gradient at x = [1,1]\nx = [-2,2]\ng = A*x - b\ng = 0.1.*g\n\nplot!([x[1],x[1]+g[1]],[x[2],x[2]+g[2]],[quadratic_ls(A,b)(x), quadratic_ls(A,b)(x+g)],\n line=(arrow=:arrow),label=\"\",color=2)\n plot!([x[1],x[1]-g[1]],[x[2],x[2]-g[2]],[quadratic_ls(A,b)(x), quadratic_ls(A,b)(x-g)],\n line=(arrow=:arrow),label=\"\",color=3)\n##\nanim = @animate for i=1:360\n plot!(camera=(i,30))\nend\ngif(anim, \"quadratic_ls1.gif\")\n##\nusing Printf\nusing LinearAlgebra\n\"\"\" Run gradient descent to solve a linear system of equations.\n\nThis function assumes that A is symmetric positive definite. \"\"\"\nfunction gradient_descent_linsys(A,b;step=0.1, maxiter=10*size(A,1),tol=1e-6)\n x = zeros(size(A,1)) # start at 0\n for i=1:maxiter\n g = A*x - b\n @printf(\"iteration %4i residual = %.3e\\n\", i, norm(g))\n if norm(g) <= tol\n break\n end\n x -= step*g\n end\n return x\nend\ngradient_descent_linsys(A,b)\n## Animate the algorithm\nezsurf(-0.5:0.025:0.5,-0.5:0.025:0.5,\n quadratic_ls(A,b))\nplot!(colorbar=false,size=(500,450))\nplot!(camera=(170,30))\nx = zeros(size(A,1)) # initialize\np = plot3d!(1, label=\"\", marker = 2)\nstep = 0.1\nanim = @animate for i=1:20\n global x\n g = A*x - b\n x -= step*g\n push!(p[1][2], x[1], x[2], quadratic_ls(A,b)(x))\n title!(@sprintf(\"Iteration %3i Residual = %.3e\", i, norm(g)))\nend\ngif(anim, \"gradient_descent_ls1.gif\")\n", "meta": {"hexsha": "c9a9da128ee07d6d7d0843e2732d29a4243586d2", "size": 1847, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "4-unit-3-demos/gradient-descent.jl", "max_stars_repo_name": "dgleich/cs590-ncds", "max_stars_repo_head_hexsha": "bd28821e2f805c2af1a1ae3cb7879e4e6e07bc56", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "max_stars_repo_stars_event_min_datetime": "2019-04-07T15:19:57.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-07T04:43:33.000Z", "max_issues_repo_path": "4-unit-3-demos/gradient-descent.jl", "max_issues_repo_name": "dgleich/cs590-ncds", "max_issues_repo_head_hexsha": "bd28821e2f805c2af1a1ae3cb7879e4e6e07bc56", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "4-unit-3-demos/gradient-descent.jl", "max_forks_repo_name": "dgleich/cs590-ncds", "max_forks_repo_head_hexsha": "bd28821e2f805c2af1a1ae3cb7879e4e6e07bc56", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 5, "max_forks_repo_forks_event_min_datetime": "2019-07-13T03:13:53.000Z", "max_forks_repo_forks_event_max_datetime": "2021-07-17T01:37:03.000Z", "avg_line_length": 25.6527777778, "max_line_length": 89, "alphanum_fraction": 0.6085544126, "num_tokens": 721, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9669140225647107, "lm_q2_score": 0.9334308133443092, "lm_q1q2_score": 0.9025473425165956}}
{"text": "#Gram-Schmidt Orthogonalization\n\nfunction normalized_orthogonal_projection(b,Z::AbstractArray)\n annihilator = I - Z * inv(Z'*Z) *Z'\n projection = annihilator*b\n return projection / norm(projection)\nend\n\nfunction gram_schmidt(x::AbstractArray)\n\n U = similar(x,Float64)\n\n for col in 1:size(U,2)\n b = X[:,col] # vector we're going to project\n Z = X[:,1:col - 1] # first i-1 columns of X\n U[:,col] = normalized_orthogonal_projection(b, Z)\n end\n return U\nend\n\ny = [1, 3, -3]\nX = [1 0; 0 -6; 2 2];\n\nPy1 = X * inv(X'X) * X' * y #ordinary projection\n\nU = gram_schmidt(X) #construct orthogonal set\n\nPy2 = U*U'*y #use orthonormal projection result\n\n\n#perform the same projection using QR decomposition\nQ, R = qr(X)\nQ = Matrix(Q)\nR = Matrix(R)\n\nPy3 = Q*Q'*y # Q is formed of columns from orthonormal basis of x\nbeta = inv(R)*Q'*y\n", "meta": {"hexsha": "be632605964a09426eb84e282335b0b8b867d7c4", "size": 866, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "GramSchmidt_Orthogonalization.jl", "max_stars_repo_name": "shanemcmiken/quantecon-notebooks-julia", "max_stars_repo_head_hexsha": "c9968403bc866fe1f520762619055bd21e09ad10", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "GramSchmidt_Orthogonalization.jl", "max_issues_repo_name": "shanemcmiken/quantecon-notebooks-julia", "max_issues_repo_head_hexsha": "c9968403bc866fe1f520762619055bd21e09ad10", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "GramSchmidt_Orthogonalization.jl", "max_forks_repo_name": "shanemcmiken/quantecon-notebooks-julia", "max_forks_repo_head_hexsha": "c9968403bc866fe1f520762619055bd21e09ad10", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 22.7894736842, "max_line_length": 65, "alphanum_fraction": 0.6466512702, "num_tokens": 279, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9777138131620183, "lm_q2_score": 0.9230391590112402, "lm_q1q2_score": 0.9024681358547423}}
{"text": "## Exercise 6-8\n## The greatest common divisor (GCD) of a and b is the largest number that divides both of them with no remainder.\n\n## One way to find the GCD of two numbers is based on the observation that if r is the remainder when a is divided by b, then gcd(a, b) = gcd(b, r). As a base case, we can use gcd(a, 0) = a.\n\n## Write a function called gcd that takes parameters a and b and returns their greatest common divisor.\nprintln(\"Ans: \")\n\nfunction gcd(a, b)\n remainder = a % b\n if remainder == 0\n return b\n end \n return gcd(b, remainder)\nend\n\nprintln(gcd(210, 55))\nprintln(gcd(12576, 4052))\nprintln(gcd(4, 3))\n\nprintln(\"End.\")\n", "meta": {"hexsha": "e8ed52d882deb2f014a473a1b82ab09ec2e336e6", "size": 653, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Chapter6/ex8.jl", "max_stars_repo_name": "yashppawar/ThinkJuliaExercises.jl", "max_stars_repo_head_hexsha": "72145b969dc51ebcac413a10004175ebc63cd5c2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_repo_stars_event_min_datetime": "2022-02-13T14:11:30.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-13T14:11:30.000Z", "max_issues_repo_path": "Chapter6/ex8.jl", "max_issues_repo_name": "yashppawar/ThinkJuliaExercises.jl", "max_issues_repo_head_hexsha": "72145b969dc51ebcac413a10004175ebc63cd5c2", "max_issues_repo_licenses": ["MIT"], "max_issues_count": null, "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Chapter6/ex8.jl", "max_forks_repo_name": "yashppawar/ThinkJuliaExercises.jl", "max_forks_repo_head_hexsha": "72145b969dc51ebcac413a10004175ebc63cd5c2", "max_forks_repo_licenses": ["MIT"], "max_forks_count": null, "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null, "avg_line_length": 29.6818181818, "max_line_length": 190, "alphanum_fraction": 0.6814701378, "num_tokens": 184, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES\n\n", "lm_q1_score": 0.9653811611608242, "lm_q2_score": 0.9334308114924604, "lm_q1q2_score": 0.9011165206618819}}
{"text": "# ------------------------------------------------------------------------------------------\n# ## How can we calculate $\\pi$?\n#\n# Given a square of length $2r$, the square's area is\n#\n# $$A_{square} = (2r)^2 = 4r^2$$\n#\n# whereas the area of a circle with radius $r$ is\n# $$A_{circle} = \\pi r^2$$\n#\n# <img src=\"images/area_ratio.png\" alt=\"Drawing\" style=\"width: 400px;\"/>\n#\n# Therefore the ratio of the area of the circle to that of the square above is\n#\n# $$\\frac{A_{circle}}{A_{square}} = \\frac{\\pi r^2}{4r^2} = \\frac{\\pi}{4}$$\n#\n# and we can define $\\pi$ as\n#\n# $$\\pi = 4\\frac{A_{circle}}{A_{square}}$$\n#\n# This suggests a way to calculate $\\pi$: if we have a square and the largest circle that\n# fits inside that square, we can determine the ratio of areas of a circle and a square. We\n# can calculate this ratio using a monte carlo simulation. We select random points inside a\n# square, and we keep track of how often those points also fall inside the circle that fits\n# perfectly inside that square.\n#\n# Given a large enough sampling points, $\\frac{A_{circle}}{A_{square}}$ will be equal to the\n# fraction of randomly chosen points inside the square that also fall inside the circle.\n# Then we can figure out $\\pi$!\n#\n# #### Pseudo-code\n#\n# Given the above, our algorithm for determining $\\pi$ looks like this:\n#\n# 1. For each of $N$ iterations,\n# 1. Select a random point inside a square of area $4r^2$ as Cartesian, $(x, y)$,\n# coordinates.\n# 1. Determine if the point also falls inside the circle embedded within this square of\n# area $\\pi r^2$.\n# 1. Keep track of whether or not this point fell inside the circle. At the end of $N$\n# iterations, you want to know $M$ -- the number of the $N$ random points that fell inside\n# the circle!\n# 1. Calculate $\\pi$ as $4\\frac{M}{N}$\n#\n# #### Exercise\n#\n# Write a function that calculates $\\pi$ using Julia.\n#\n# The algorithm above should work for any value of $r$ that you choose to use. Make sure you\n# make $N$ big enough that the value of $\\pi$ is correct to at least a couple numbers after\n# the decimal point!\n#\n# *Hint*:\n#\n# This will probably be easier if you center your circle and square at the coordinate (0, 0)\n# and use a radius of 1. For example, to choose random coordinates within your square at\n# position (x, y), you may want to choose x and y so that they are each a value between -1\n# and +1. Then any point within a distance of 1 from (0, 0) will fall inside the circle!\n#\n# <img src=\"images/hint.png\" alt=\"Drawing\" style=\"width: 400px;\"/>\n#\n# \n# ------------------------------------------------------------------------------------------\n\n\n", "meta": {"hexsha": "95350068cc02e5b7c398fb3a78d5e8543e807d2c", "size": 2624, "ext": "jl", "lang": "Julia", "max_stars_repo_path": ".nbexports/introductory-tutorials/intro-to-julia/calculate_pi.jl", "max_stars_repo_name": "grenkoca/JuliaTutorials", "max_stars_repo_head_hexsha": "3968e0430db77856112521522e10f7da0d7610a0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 535, "max_stars_repo_stars_event_min_datetime": "2020-07-15T14:56:11.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-25T12:50:32.000Z", "max_issues_repo_path": ".nbexports/introductory-tutorials/intro-to-julia/calculate_pi.jl", "max_issues_repo_name": "grenkoca/JuliaTutorials", "max_issues_repo_head_hexsha": "3968e0430db77856112521522e10f7da0d7610a0", "max_issues_repo_licenses": ["MIT"], "max_issues_count": 42, "max_issues_repo_issues_event_min_datetime": "2018-02-25T22:53:47.000Z", "max_issues_repo_issues_event_max_datetime": "2020-05-14T02:15:50.000Z", "max_forks_repo_path": ".nbexports/introductory-tutorials/intro-to-julia/calculate_pi.jl", "max_forks_repo_name": "grenkoca/JuliaTutorials", "max_forks_repo_head_hexsha": "3968e0430db77856112521522e10f7da0d7610a0", "max_forks_repo_licenses": ["MIT"], "max_forks_count": 394, "max_forks_repo_forks_event_min_datetime": "2020-07-14T23:22:24.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-28T20:12:57.000Z", "avg_line_length": 39.7575757576, "max_line_length": 92, "alphanum_fraction": 0.6391006098, "num_tokens": 715, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.9732407168145568, "lm_q2_score": 0.9252299632771662, "lm_q1q2_score": 0.9004714726781753}}
|