diff --git a/pastes/pastes_20231017180558.csv b/pastes/pastes_20231017180558.csv new file mode 100644 index 0000000..becf4e7 --- /dev/null +++ b/pastes/pastes_20231017180558.csv @@ -0,0 +1,5193 @@ +id,title,username,language,date,content +UvUjQLQs,10263 - Railway,MiinaMagdy,C++,Tuesday 17th of October 2023 01:00:42 PM CDT,"#include +#include +#include + +using namespace std; +using namespace __gnu_pbds; +#define ordered_set tree, rb_tree_tag, tree_order_statistics_node_update> +#define multi_ordered_set tree, rb_tree_tag, tree_order_statistics_node_update> +#define endl ""\n"" +#define MOD 1000000007 +#define INF 2000000000 +#define all(s) s.begin(), s.end() +#define rall(s) s.rbegin(), s.rend() +#define sz(x) int(x.size()) +#define crossProd(A,B) ((conj(A)*(B)).imag()) +#define dotProd(A,B) ((conj(A)*(B)).real()) + +typedef long long ll; +typedef long double ld; +typedef unsigned long long ull; + +#define EPS 1e-9 +#define PI acos(-1) +#define X real() +#define Y imag() +#define normalize(a) (a) / length(a) +#define lengthSqr(p) dot_prod(p, p) +#define rotateO(p, ang) p * exp(point(0, ang)) +#define rotateA(p, about, ang) rotateO(vector((about), (p)), ang) + (about) +#define reflicatO(v, m) conj(v / m) * m +#define reflicatA(v, about, m) conj(vector(about, v) / vector(about, m)) * vector(about, m) + about + +template +class point { +public: + T x, y; + point() { + x = y = 0; + } + point(T _x, T _y) { + x = _x; + y = _y; + } + point(const point &p) { + x = p.x; + y = p.y; + } + // vector from point a to point b + point(const point &a, const point &b) { + *this = b - a; + } + point operator=(const point &p) { + x = p.x; + y = p.y; + return *this; + } + point operator+(const point &p) const { + return point(x + p.x, y + p.y); + } + point operator-(const point &p) const { + return point(x - p.x, y - p.y); + } + // dot product + T operator*(const point &p) const { + return x * p.x + y * p.y; + } + // cross product + T operator^(const point &p) const { + return x * p.y - y * p.x; + } + point operator*(const T &factor) const { + return point(x * factor, y * factor); + } + point operator/(const T &factor) const { + return point(x / factor, y / factor); + } + friend istream &operator>>(istream &is, point &p) { + is >> p.x >> p.y; + return is; + } + friend ostream &operator<<(ostream &os, const point &p) { + os << p.x << "" "" << p.y; + return os; + } + bool operator==(const point &p) const { + return (x == p.x && y == p.y); + } + bool operator!=(const point &p) const { + return (x != p.x || y != p.y); + } + ld arg() const { + return atan2l(y, x); + } + T lenSqr() const { + return x * x + y * y; + } + double len() const { + return hypot(x, y); + } + // distance + double dist(const point &p) const { + return hypot(x - p.x, y - p.y); + } + // distance squared + T distSqr(const point &p) const { + return (x - p.x) * (x - p.x) + (y - p.y) * (y - p.y); + } + // returns 1 for counterclockwise order + // returns -1 for clockwise order + // returns 0 if the points are collinear + int orientation(const point &p, const point &q) const { + T val = (q - p) ^ (*this - q); + if (val == 0) { + return 0; + } + return (val > 0) ? 1 : -1; + } + // check intersection between line segment p1q1 and line segment p2q2 + static bool intersect_ab_cd(point a, point b, point c, point d, point &intersect) { + point u(a, b); + point v(c, d); + point w(c, a); + T d1 = u ^ v; + T d2 = v ^ w; + T d3 = u ^ w; + if (d1 == 0) + return false; + double t1 = d2 / d1; + double t2 = d3 / d1; + intersect = a + u * t1; + return t1 >= EPS && t2 >= EPS && t2 <= 1 + EPS; // e.g ab is a ray, cd is a segment + } +}; + +// ab segment, c point +double segPointDist(point a, point b, point c, point &ans) { + point u(a, b), v(b, c), w(a, c); + double d1, d2; + if ((d1 = w * u) < -EPS) { + ans = a; + return a.dist(c); + } + if ((d2 = u * u) <= d1) { + ans = b; + return b.dist(c); + } + double t = d1 / d2; + ans = a + u * t; + return ans.dist(c); +} + +void solve() { + cout << fixed << setprecision(4); + point m; + while (cin >> m) { + int n; + cin >> n; + vector> points(n + 1); + double dist = 1e18; + point ans; + for (int i = 0; i <= n; i++) { + cin >> points[i]; + if (i) { + point temp; + if (dist > segPointDist(points[i - 1], points[i], m, temp)) { + dist = segPointDist(points[i - 1], points[i], m, temp); + ans = temp; + } + } + } + cout << ans.x << endl << ans.y << endl; + } +} + +int main(void) +{ + ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); + int testcase = 1; + // cin >> testcase; + while (testcase--) + solve(); + return 0; +}" +vm0UnKSN,Nigerian scammers [17-10-1/2023],bombaires,AIMMS,Tuesday 17th of October 2023 12:57:54 PM CDT,"westernunion22291@yahoo.com +keystoneb.jeffwilkinson@googlemail.com +keystoneb.jeffwilkinson+9343@googlemail.com +keystoneb.jeffwilkinson+10219@googlemail.com +keystoneb.jeffwilkinson+30495@googlemail.com +keystoneb.jeffwilkinson+14328@googlemail.com +keystoneb.jeffwilkinson+623@googlemail.com +keystoneb.jeffwilkinson+1469@googlemail.com +keystoneb.jeffwilkinson+10925@googlemail.com +keystoneb.jeffwilkinson+31131@googlemail.com +keystoneb.jeffwilkinson+27660@googlemail.com +keystoneb.jeffwilkinson+9609@googlemail.com +keystoneb.jeffwilkinson+25552@googlemail.com +keystoneb.jeffwilkinson+8538@googlemail.com +keystoneb.jeffwilkinson+25118@googlemail.com +keystoneb.jeffwilkinson+26612@googlemail.com +keystoneb.jeffwilkinson+28141@googlemail.com +keystoneb.jeffwilkinson+28348@googlemail.com +keystoneb.jeffwilkinson+11619@googlemail.com +keystoneb.jeffwilkinson+22481@googlemail.com +keystoneb.jeffwilkinson+26820@googlemail.com +keystoneb.jeffwilkinson+16134@googlemail.com +keystoneb.jeffwilkinson+26773@googlemail.com +keystoneb.jeffwilkinson+7083@googlemail.com +keystoneb.jeffwilkinson+26452@googlemail.com +keystoneb.jeffwilkinson+30240@googlemail.com +keystoneb.jeffwilkinson+30155@googlemail.com +keystoneb.jeffwilkinson+18063@googlemail.com +keystoneb.jeffwilkinson+10381@googlemail.com +keystoneb.jeffwilkinson+4942@googlemail.com +keystoneb.jeffwilkinson+23860@googlemail.com +keystoneb.jeffwilkinson+29605@googlemail.com +keystoneb.jeffwilkinson+22866@googlemail.com +keystoneb.jeffwilkinson+12682@googlemail.com +keystoneb.jeffwilkinson+4023@googlemail.com +keystoneb.jeffwilkinson+18231@googlemail.com +keystoneb.jeffwilkinson+18425@googlemail.com +keystoneb.jeffwilkinson+23096@googlemail.com +keystoneb.jeffwilkinson+12682@googlemail.com +keystoneb.jeffwilkinson+26703@googlemail.com +keystoneb.jeffwilkinson+20752@googlemail.com +keystoneb.jeffwilkinson+23770@googlemail.com +keystoneb.jeffwilkinson+16057@googlemail.com +keystoneb.jeffwilkinson+21577@googlemail.com +keystoneb.jeffwilkinson+471@googlemail.com +keystoneb.jeffwilkinson+24933@googlemail.com +keystoneb.jeffwilkinson+29867@googlemail.com +keystoneb.jeffwilkinson+9945@googlemail.com +keystoneb.jeffwilkinson+24825@googlemail.com +keystoneb.jeffwilkinson+19893@googlemail.com +keystoneb.jeffwilkinson+9603@googlemail.com +keystoneb.jeffwilkinson+14105@googlemail.com +keystoneb.jeffwilkinson+8651@googlemail.com +keystoneb.jeffwilkinson+21378@googlemail.com +keystoneb.jeffwilkinson+8190@googlemail.com +keystoneb.jeffwilkinson+27910@googlemail.com +keystoneb.jeffwilkinson+24282@googlemail.com +keystoneb.jeffwilkinson+9143@googlemail.com +keystoneb.jeffwilkinson+26699@googlemail.com +keystoneb.jeffwilkinson+17964@googlemail.com +keystoneb.jeffwilkinson+23613@googlemail.com +keystoneb.jeffwilkinson+26847@googlemail.com +keystoneb.jeffwilkinson+3848@googlemail.com +keystoneb.jeffwilkinson+12840@googlemail.com +keystoneb.jeffwilkinson+13619@googlemail.com +keystoneb.jeffwilkinson+23374@googlemail.com +keystoneb.jeffwilkinson+10684@googlemail.com +keystoneb.jeffwilkinson+11053@googlemail.com +keystoneb.jeffwilkinson+19221@googlemail.com +keystoneb.jeffwilkinson+18902@googlemail.com +keystoneb.jeffwilkinson+21113@googlemail.com +keystoneb.jeffwilkinson+21995@googlemail.com +keystoneb.jeffwilkinson+19876@googlemail.com +keystoneb.jeffwilkinson+1288@googlemail.com +keystoneb.jeffwilkinson+23303@googlemail.com +keystoneb.jeffwilkinson+3879@googlemail.com +keystoneb.jeffwilkinson+729@googlemail.com +keystoneb.jeffwilkinson+10102@googlemail.com +keystoneb.jeffwilkinson+4344@googlemail.com +keystoneb.jeffwilkinson+5063@googlemail.com +keystoneb.jeffwilkinson+9885@googlemail.com +keystoneb.jeffwilkinson+8290@googlemail.com +keystoneb.jeffwilkinson+18165@googlemail.com +keystoneb.jeffwilkinson+12@googlemail.com +keystoneb.jeffwilkinson+815@googlemail.com +keystoneb.jeffwilkinson+17724@googlemail.com +keystoneb.jeffwilkinson+1959@googlemail.com +keystoneb.jeffwilkinson+22675@googlemail.com +keystoneb.jeffwilkinson+32318@googlemail.com +keystoneb.jeffwilkinson+15944@googlemail.com +keystoneb.jeffwilkinson+1290@googlemail.com +keystoneb.jeffwilkinson+18976@googlemail.com +keystoneb.jeffwilkinson+27968@googlemail.com +keystoneb.jeffwilkinson+4868@googlemail.com +keystoneb.jeffwilkinson+19174@googlemail.com +keystoneb.jeffwilkinson+26644@googlemail.com +keystoneb.jeffwilkinson+21230@googlemail.com +keystoneb.jeffwilkinson+29634@googlemail.com +keystoneb.jeffwilkinson+31861@googlemail.com +keystoneb.jeffwilkinson+4553@googlemail.com +keystoneb.jeffwilkinson+6070@googlemail.com +keystoneb.jeffwilkinson+15344@googlemail.com +agentvictorokle@googlemail.com +agentvictorokle+11972@googlemail.com +agentvictorokle+32291@googlemail.com +agentvictorokle+9896@googlemail.com +agentvictorokle+16488@googlemail.com +agentvictorokle+17358@googlemail.com +agentvictorokle+4661@googlemail.com +agentvictorokle+12079@googlemail.com +agentvictorokle+29922@googlemail.com +agentvictorokle+14349@googlemail.com +agentvictorokle+4797@googlemail.com +agentvictorokle+13752@googlemail.com +agentvictorokle+26182@googlemail.com +agentvictorokle+1837@googlemail.com +agentvictorokle+23168@googlemail.com +agentvictorokle+2982@googlemail.com +agentvictorokle+23764@googlemail.com +agentvictorokle+14652@googlemail.com +agentvictorokle+13418@googlemail.com +agentvictorokle+31158@googlemail.com +agentvictorokle+5511@googlemail.com +agentvictorokle+12720@googlemail.com +agentvictorokle+27935@googlemail.com +agentvictorokle+21597@googlemail.com +agentvictorokle+7302@googlemail.com +agentvictorokle+32125@googlemail.com +agentvictorokle+28341@googlemail.com +agentvictorokle+8879@googlemail.com +agentvictorokle+16252@googlemail.com +agentvictorokle+32410@googlemail.com +agentvictorokle+5904@googlemail.com +agentvictorokle+28504@googlemail.com +agentvictorokle+32415@googlemail.com +agentvictorokle+20029@googlemail.com +agentvictorokle+14362@googlemail.com +agentvictorokle+27636@googlemail.com +agentvictorokle+504@googlemail.com +agentvictorokle+25389@googlemail.com +agentvictorokle+17837@googlemail.com +agentvictorokle+10439@googlemail.com +agentvictorokle+5002@googlemail.com +agentvictorokle+23420@googlemail.com +agentvictorokle+13247@googlemail.com +agentvictorokle+28677@googlemail.com +agentvictorokle+11087@googlemail.com +agentvictorokle+7130@googlemail.com +agentvictorokle+10700@googlemail.com +agentvictorokle+27004@googlemail.com +agentvictorokle+26115@googlemail.com +agentvictorokle+21613@googlemail.com +agentvictorokle+23117@googlemail.com +agentvictorokle+8657@googlemail.com +agentvictorokle+1716@googlemail.com +agentvictorokle+3054@googlemail.com +agentvictorokle+30518@googlemail.com +agentvictorokle+3316@googlemail.com +agentvictorokle+8929@googlemail.com +agentvictorokle+13778@googlemail.com +agentvictorokle+30467@googlemail.com +agentvictorokle+8519@googlemail.com +agentvictorokle+14051@googlemail.com +agentvictorokle+26515@googlemail.com +agentvictorokle+220@googlemail.com +agentvictorokle+2401@googlemail.com +agentvictorokle+25403@googlemail.com +agentvictorokle+22326@googlemail.com +agentvictorokle+6329@googlemail.com +agentvictorokle+2940@googlemail.com +agentvictorokle+25061@googlemail.com +agentvictorokle+21965@googlemail.com +agentvictorokle+15549@googlemail.com +agentvictorokle+9785@googlemail.com +agentvictorokle+4593@googlemail.com +agentvictorokle+30351@googlemail.com +agentvictorokle+29479@googlemail.com +agentvictorokle+18148@googlemail.com +agentvictorokle+10621@googlemail.com +agentvictorokle+31577@googlemail.com +agentvictorokle+4111@googlemail.com +agentvictorokle+6664@googlemail.com +agentvictorokle+15805@googlemail.com +agentvictorokle+8661@googlemail.com +agentvictorokle+18794@googlemail.com +agentvictorokle+4962@googlemail.com +agentvictorokle+21122@googlemail.com +agentvictorokle+3583@googlemail.com +agentvictorokle+18033@googlemail.com +agentvictorokle+10568@googlemail.com +agentvictorokle+31977@googlemail.com +agentvictorokle+30234@googlemail.com +agentvictorokle+1941@googlemail.com +agentvictorokle+14218@googlemail.com +agentvictorokle+31616@googlemail.com +agentvictorokle+4707@googlemail.com +agentvictorokle+3981@googlemail.com +agentvictorokle+19548@googlemail.com +agentvictorokle+25221@googlemail.com +agentvictorokle+19728@googlemail.com +agentvictorokle+16482@googlemail.com +agentvictorokle+2048@googlemail.com +agentvictorokle+18530@googlemail.com +" +4wB0SDvx,Task3,Seredenko-V,C++,Tuesday 17th of October 2023 12:47:03 PM CDT,"#include + +using namespace std; + +int** MemoryAllocation(int str, int col) { + // выделение памяти + int** matrix = new int*[str]; + for (int i = 0; i < str; ++i) { + matrix[i] = new int[col]; + } + return matrix; +} + +void MemoryClear(int** matrix, int str) { + // освобождение памяти + for (int i = 0; i < str; ++i) { + delete[] matrix[i]; + } + delete[] matrix; +} + +int FindMinElement(int* arr, int size) { + int min_value = arr[0]; + for (int i = 1; i < size; ++i) { + if (min_value > arr[i]) { + min_value = arr[i]; + } + } + return min_value; +} + +int main() { + int str = 5; + int col = 10; + int** matrix = MemoryAllocation(str, col); + + + MemoryClear(matrix, str); + return 0; +} +" +LqHGunq9,Programa C Ler 10 valores,hercioneto,C,Tuesday 17th of October 2023 12:37:22 PM CDT,"// Online C compiler to run C program online +/* +Ler 10 valores, um de cada vez, e contar quantos deles estão no intervalo [10,50] e +quantos deles estão fora deste intervalo, mostrando estas informações. +*/ +#include + +int main() { + +int valor, valorEntre=0, valorFora=0; +for (int i=0;i<=9; i++) { + printf(""Digite um número. ""); + scanf(""%i"",&valor); + if (valor>10 && valor<=50 ) { + printf(""Está entre 10 e 50 \n""); + valorEntre++; + } + else { + printf(""Não está entre 10 e 50 \n ""); + valorFora++; + } +} + printf("" %i estao acima e %i abaixo "",valorEntre,valorFora); +return 0; +} + +" +8CBtjYLj,Lab2. Dynamic arr,Seredenko-V,C++,Tuesday 17th of October 2023 12:19:00 PM CDT,"#include + +using namespace std; + +void ReadArr(double* arr, int size) { + for (int i = 0; i < size; ++i) { + cout << ""arr[""s << i << ""] = ""s; + cin >> arr[i]; + } +} + +void PrintArr(double* arr, int size) { + for (int i = 0; i < size; ++i) { + cout << ""arr[""s << i << ""] = ""s << arr[i] << endl; + } +} + +int FindIndexMaxElement(double* arr, int size) { + int index_max_element = 0; + int max_value = arr[0]; + for (int i = 1; i < size; ++i) { + int abs_element = std::abs(arr[i]); + if (max_value < abs_element) { + max_value = abs_element; + index_max_element = i; + } + } + return index_max_element; +} + +int FindIndexMinElement(double* arr, int size) { + int index_min_element = 0; + int min_value = arr[0]; + for (int i = 1; i < size; ++i) { + int abs_element = std::abs(arr[i]); + if (min_value > abs_element) { + min_value = abs_element; + index_min_element = i; + } + } + return index_min_element; +} + +double CalculateMultOnSegment(double* arr, int left_bound, int right_bound) { + double result = 1; + for (int i = left_bound; i <= right_bound; ++i) { + result *= arr[i]; + } + return result; +} + +int main() { + int size = 0; + cout << ""Enter size array: ""s; + cin >> size; + double* arr = new double[size]; + ReadArr(arr, size); + cout << ""Your array:""s << endl; + PrintArr(arr, size); + cout << endl; + int max_element_pos = FindIndexMaxElement(arr, size); + int min_element_pos = FindIndexMinElement(arr, size); + int result = 0; + if (max_element_pos > min_element_pos) { + result = CalculateMultOnSegment(arr, min_element_pos, max_element_pos); + } else { + result = CalculateMultOnSegment(arr, max_element_pos, min_element_pos); + } + cout << ""Result = ""s << result << endl; + delete[] arr; + return 0; +}" +HMnmVU1x,Untitled,Josif_tepe,C++,Tuesday 17th of October 2023 12:18:44 PM CDT,"#include + +using namespace std; +int n; +int mat[105][105]; +int dp[105][105]; +int min_sum(int i, int j) { + if(i == 0 and j == 0) { + return mat[i][j]; + } + if(dp[i][j] != -1) { + return dp[i][j]; + } + int result = 1e9; + if(i - 1 >= 0) { + result = min(result, min_sum(i - 1, j) + mat[i][j]); + if(j - 1 >= 0) { + result = min(result, min_sum(i - 1, j - 1) + mat[i][j]); + } + + } + if(j - 1 >= 0) { + result = min(result, min_sum(i, j - 1) + mat[i][j]); + } + return dp[i][j] = result; +} +int main() { + cin >> n; + for(int i = 0; i < n; i++) { + for(int j = 0; j < n; j++) { + mat[i][j] = -1; + dp[i][j] = -1; + } + } + + for(int i = 0; i < n; i++) { + for(int j = 0; j < n - i; j++) { + cin >> mat[i][j]; + } + } + int result = 1e9; + int ri, rj; + for(int i = 0; i < n; i++) { + if(result > min_sum(i, n - i - 1)) { + result = min_sum(i, n - i - 1); + ri = i; + rj = n - i - 1; + } + } + cout << result << endl; + cout << ri + 1 << "" "" << rj + 1 << endl; + return 0; +} +// f(0, 0) = f(1, 0) f(0, 1) +// f(1, 0) = f(2, 0) f(1, 1) +// f(0, 1) = f(1, 1) f(2, 0) +" +qaU5N0Ry,Untitled,kingbode,Python,Tuesday 17th of October 2023 12:05:00 PM CDT,"char_dict = { + ""a"": 1, + ""b"": 2, + ""c"": 3, + ""d"": 4, + ""e"": 5, + ""f"": 6, + ""g"": 7, + ""h"": 8, + ""i"": 9, + ""j"": 10, + ""k"": 11, + ""l"": 12, + ""m"": 13, + ""n"": 14, + ""o"": 15, + ""p"": 16, + ""q"": 17, + ""r"": 18, + ""s"": 19, + ""t"": 20, + ""u"": 21, + ""v"": 22, + ""w"": 23, + ""x"": 24, + ""y"": 25, + ""z"": 26, + "" "": ""_"", + ""!"": 27, + ""@"": 28, + ""#"": 29, + ""$"": 30, + ""%"": 31, + ""^"": 32, + ""&"": 33, + ""*"": 34, + ""("": 35, + "")"": 36, + ""_"": 37, + ""+"": 38, + ""-"": 39, + ""/"": 40, + ""?"": 41, + "">"": 42, + ""<"": 43, + "","": 44, + ""."": 45, + ""`"": 46, + ""~"": 47, + ""|"": 48, + ""{"": 49, + ""}"": 50, + ""["": 51, + ""]"": 52, + ""1"": 53, + ""2"": 54, + ""3"": 55, + ""4"": 56, + ""5"": 57, + ""6"": 58, + ""7"": 59, + ""8"": 60, + ""9"": 61, + ""0"": 62, + ""A"": 63, + ""B"": 64, + ""C"": 65, + ""D"": 66, + ""E"": 67, + ""F"": 68, + ""G"": 69, + ""H"": 70, + ""I"": 71, + ""J"": 72, + ""K"": 73, + ""L"": 74, + ""M"": 75, + ""N"": 76, + ""O"": 77, + ""P"": 78, + ""Q"": 79, + ""R"": 80, + ""S"": 81, + ""T"": 82, + ""U"": 83, + ""V"": 84, + ""W"": 85, + ""X"": 86, + ""Y"": 87, + ""Z"": 88, + "":"": 89, + "";"": 90, + ""="": 91 +} +" +EMGiGHVX,mysql,Sergiyco,Python,Tuesday 17th of October 2023 12:04:24 PM CDT,"import mysql.connector + +# З'єднання з MySQL сервером +connection = mysql.connector.connect( + host=""localhost"", + user=""root"", + password=""1234"" # Вкажіть ваш пароль +) + +cursor = connection.cursor() + +# Створення тестової бази даних +# cursor.execute(""CREATE DATABASE test_db"") + +# З'єднання з новоствореною базою даних +connection.database = ""test_db"" + +# Створення тестової таблиці +# cursor.execute("""""" +# CREATE TABLE test_table_python ( +# id INT AUTO_INCREMENT PRIMARY KEY, +# name VARCHAR(255) NOT NULL, +# age INT +# ) +# """""") + +# Заповнення таблиці даними +sql = ""INSERT INTO test_db (name, age) VALUES (%s, %s)"" +values = [ + ('Anna', 25), + ('John', 30), + ('Mike', 28), + ('Ivanna', 15), + ('Peter', 22) + +] + +cursor.executemany(sql, values) + +# # Збереження змін +# connection.commit() + +# CRUD - +# CREATE +# READ +# UPDATE +# DELETE + +sql_statement = ""SELECT * FROM test_db"" +cursor.execute(sql_statement) + +data = cursor.fetchall() + +print(data) + + +# sql = ""DELETE FROM test_table_python WHERE id = 3"" +# +# cursor.execute(sql) +# +# connection.commit() +# +# print(cursor.rowcount, ""record(s) deleted"") + +# for x in data: +# print(x) + +# Закриття з'єднання +cursor.close() +connection.close() + + +" +sJqFDgqF,Untitled,kingbode,Python,Tuesday 17th of October 2023 12:04:11 PM CDT," +from characterDict import char_dict +def get_decrypted(_text): + # get the count of words in the encrypted text + wordsList = _text.replace(""_"","" "").strip().split("" "") + decrypted_text = """" + + # loop through the words and decrypt them + for word in wordsList: + # strip the key from the encrypted word + key = word[0] + word[-1] + word = word[1:-1] + + # decrypt the word + decrypted_word = """" + lettersList = word.replace(""|"","" "").strip().split() + for letter in lettersList: + if letter != """": + decrypted_word += """".join([k for k,v in char_dict.items() if str(v) == letter]) + decrypted_text += decrypted_word + "" "" + return decrypted_text + + +encrypted_text = ""_1|70|5|12|12|15|3_2|16|25|20|8|15|14|6_3|16|18|15|7|18|1|13|13|5|18|19|9_5|47|27|28|29|30|31|32|33|34|91|2"" +print() +print(get_decrypted(encrypted_text)) + + + + +" +2S6PZYHP,Untitled,Josif_tepe,C++,Tuesday 17th of October 2023 12:02:50 PM CDT,"#include + +using namespace std; +int n, m; +int mat[55][55]; +int dp[55][55]; +int max_sum(int i, int j) { + if(i == n - 1 and j == m - 1) { + return mat[i][j]; + } + if(dp[i][j] != -1) { + return dp[i][j]; + } + int result = 0; + if(i + 1 < n) { + result = max(result, max_sum(i + 1, j) + mat[i][j]); + } + if(j + 1 < m) { + result = max(result, max_sum(i, j + 1) + mat[i][j]); + } + return dp[i][j] = result; +} +int main() { + cin >> n >> m; + + for(int i = 0; i < n; i++) { + for(int j = 0; j < m; j++) { + cin >> mat[i][j]; + dp[i][j] = -1; + } + } + cout << max_sum(0, 0) << endl; + return 0; +} +// f(0, 0) = f(1, 0) f(0, 1) +// f(1, 0) = f(2, 0) f(1, 1) +// f(0, 1) = f(1, 1) f(2, 0) +" +NwHTtrpE,Untitled,Skos_Martren,C++,Tuesday 17th of October 2023 12:01:42 PM CDT,"#include +#include + +using namespace std; + +class Solution { + +private: + + struct PairHash { + size_t operator()(const pair p) const { // передавать pair по ссылке или нет? + + return (size_t)(h_i_1(p.first) * 37 * 37 + h_i_1(p.second) * 37 + 117); + } + hash h_i_1; + hash h_i_2; + }; + + + // тип cnt <-- ""-108 <= points[i][j] <= 10^8"" + // ""const"" будет ошибкой, так как можем обратится к несущест-у элементу в ""PointToExist[{cnt - point[0], point[1]}]"" + bool CheckCoordinate(const vector>& points, /*const*/ unordered_map, bool, PairHash>& PointToExist, const int cnt/* = x_min + x_max*/) { + for (/*const*/ auto point : points) { // ""const"" будет ошибкой, так как можем обратится к несущест-у элементу в ""PointToExist[{cnt - point[0], point[1]}]"" + + if (!PointToExist[{cnt - point[0], point[1]}]) { return false; } + } + return true; + } + + /* + Если расположить PairHash ниже CheckCoordinate, то в MSVS будет ошибка: Error (active) E0308 more than one instance of overloaded function ""CheckCoordinate"" matches the argument list: + */ + +public: + + bool isReflected(const vector>& points) { + if (points.empty()) { return true; } // проверка пустого points -- такой тест есть в тестирующей системе + int x_min = points.front().front(); + int x_max = points.back().front(); + unordered_map, bool, PairHash> PointToExist; // необходимо для реализации CheckCoordinate + + for (const auto& point : points) { + + const int x = point[0]; + const int y = point[1]; + x_min = min(x_min, x); + x_max = max(x_max, x); + if (!PointToExist[{x, y}]) { PointToExist[{x, y}] = true; } + + } // отрезок, проходящий через (x_min, y*) и (x_max, y*) будет иметь максимальную длину. Примечательно, что не получатся рассуждения через поиск концов отрезка минимальной длины! + + //if(PointToExist.size() % 2 == 1){return false;} // error: { {0,0} } true + return CheckCoordinate(points, PointToExist, x_min + x_max); + } + +}; + +int main() { + + cout << Solution().isReflected({ {1,1},{-1,1} }) << '\n'; + cout << Solution().isReflected({ {1,1},{-1,-1} }) << '\n'; + cout << Solution().isReflected({ {0,0} }) << '\n'; + +}" +tJDvzagb,Untitled,Arch_of_Triumph,C++,Tuesday 17th of October 2023 12:01:03 PM CDT,"#define _CRT_SECURE_NO_WARNINGS +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +//#define Assert assert +#define Assert(x) + +constexpr int MaxN = 10'000, MaxA = 10'000; + +typedef long long int llint; +typedef double Flt; + +Flt Error(const vector &a, vector &x) +{ + llint sum = 0; for (llint ai : a) sum += ai * ai; + Flt d = sqrt(Flt(sum)); + int n = a.size(); if (x.size() != n) x.resize(n); + int i = 0, k = 0; + for (int j = 0; j < n; ++j) { x[j] = a[j] / d; if (x[j] < x[i]) i = j; else if (x[j] > x[k]) k = j; } + Flt maxErr = 0; + for (int j = 0; j < n; ++j) { Flt aj = a[i] * x[j] / x[i]; + Flt err = abs(aj - a[j]); maxErr = max(maxErr, err); } + return maxErr; +} + +int ErrorTest() +{ + printf(""sizeof(Flt) = %d, eps = %g\n"", int(sizeof(Flt)), double(numeric_limits::epsilon())); + Flt maxErr = 0; int n = MaxN; + vector a(n); vector x(n); + for (int i = 0; i < n; ++i) a[i] = (i == 0) ? 1 : MaxA; + maxErr = max(maxErr, Error(a, x)); printf(""%g\n"", (double) maxErr); + for (int nIter = 280000; ; ++nIter) + { + mt19937_64 r(123 + nIter); + for (int i = 0; i < n; ++i) a[i] = uniform_int_distribution(0, MaxA - 1)(r); + Flt err = Error(a, x); if (err > maxErr) { + maxErr = err; printf(""%d: %.15e \n"", nIter, (double) maxErr); fflush(stdout); + } + if (nIter % 1000 == 0) { printf(""%d %.15e %.15e \r"", nIter, (double) err, (double) maxErr); fflush(stdout); } + } + return 0; +} + +int main() +{ + //return ErrorTest(); + //freopen(""normalization99.in"", ""rt"", stdin); + //freopen(""normalization-tests\\norm05.in"", ""rt"", stdin); + int n, ok_; ok_ = scanf(""%d"", &n); Assert(ok_ == 1); Assert(2 <= n); Assert(n <= MaxN); + vector X(n); for (auto &x : X) { ok_ = scanf(""%Lf"", &x); Assert(ok_ == 1); Assert(x > 0); Assert(x < 1); } + long double xMin = X[0], xMax = X[1]; for (auto &x : X) if (x < xMin) xMin = x; else if (x > xMax) xMax = x; + vector A(n); + long double ratio = xMin / xMax; + const long double eps = 1e-6; + long double error = 0, maxRoundingErrAbs = 0, maxRoundingErrRel = 0; + for (int aMax = 1; aMax <= MaxA; ++aMax) + { + long double aMinF = ratio * aMax; + long double aMinR = round(aMinF); + if (aMinR < 1) continue; + if (abs(aMinR - aMinF) * 2e5 > aMax) continue; + llint d2 = 0; + bool ok = true; + maxRoundingErrAbs = 0; maxRoundingErrRel = 0; + for (int i = 0; i < n; ++i) + { + long double aF = X[i] * aMax / xMax; + long double aR = round(aF); if (abs(aR - aF) * 2e5 > aMax) { + ok = false; break; + } + A[i] = int(aR); d2 += llint(A[i]) * A[i]; + maxRoundingErrAbs = max(maxRoundingErrAbs, abs(aF - aR)); + maxRoundingErrRel = max(maxRoundingErrRel, abs(aF - aR) / xMax); + } + if (! ok) continue; + long double d = sqrt((long double) d2); + error = 0; + for (int i = 0; i < n; ++i) + { + long double x = A[i] / d; + error = max(error, abs(x - X[i])); + if (abs(x - X[i]) > eps) { + //fprintf(stderr, ""Note: aMax = %d (max rounding err = %.15Le) failed secondary check.\n"", aMax, maxRoundingErr); + ok = false; + break; + } + } + if (ok) break; + } + fprintf(stderr, ""max |x[i] - normalized r[i]| = %.6Le, max first-phase rounding err = %.6Le abs, %.6Le rel\n"", error, maxRoundingErrAbs, maxRoundingErrRel); + for (int i = 0; i < n; ++i) printf(""%d\n"", A[i]); return 0; +}" +ZDSVjEgh,Mu Online,Pijomir,JavaScript,Tuesday 17th of October 2023 12:00:10 PM CDT,"function manageMuOnline(input) { + let rooms = input.split('|'); + let health = 100; + let bitcoins = 0; + let bestRoom = 0 + while (rooms.length > 0) { + bestRoom++; + let [currentCommand, num] = rooms.shift().split(' '); + num = Number(num); + switch (currentCommand) { + case 'potion': + console.log(`You healed for ${health + num <= 100 ? num : 100 - health} hp.`); + health + num > 100 ? health = 100 : health += num; + console.log(`Current health: ${health} hp.`); + break; + case 'chest': + bitcoins += num; + console.log(`You found ${num} bitcoins.`); + break; + default: + health -= num; + if (health > 0) { + console.log(`You slayed ${currentCommand}.`); + } else { + console.log(`You died! Killed by ${currentCommand}.`); + console.log(`Best room: ${bestRoom}`); + return; + } + } + } + + console.log('You\'ve made it!'); + console.log(`Bitcoins: ${bitcoins}`); + console.log(`Health: ${health}`); +}" +WKrGPtjv,Untitled,Josif_tepe,C++,Tuesday 17th of October 2023 11:41:55 AM CDT,"#include + +using namespace std; + +int broj_na_deliteli(int n, int idx) { + if(idx > n) { + return 0; + } + bool deliv = ((n % idx) == 0); + + return broj_na_deliteli(n, idx + 1) + deliv; +} +int k_deliv(int x, int idx, int k) { + if(idx < x - k or idx == 0) { + return 1; + } + if(broj_na_deliteli(idx, 1) >= broj_na_deliteli(x, 1)) { + return 0; + } + return k_deliv(x, idx - 1, k); +} +int sum(int a, int b, int k) { + if(a > b) { + return 0; + } + int dodadi = 0; + if(k_deliv(a, a - 1, k)) { + dodadi = a; + } + return sum(a + 1, b, k) + dodadi; +} + +int main() { + int a, b, k; + cin >> a >> b >> k; + cout << sum(a, b, k) << endl; + return 0; +} +" +7KU5YZFP,Advanced AND - Donald AND Duck AND Hello,wheresTheAnyKey,C,Tuesday 17th of October 2023 11:31:49 AM CDT,"Pasted at: 17/10/2023 17:31 +Test data generated by 98823c9ce7f73d22c0e84a43ab6f6ed3 + +DATA_ID_TESTDATATOFIND +hello, donald was a duck + +5502491997132108 + +Fuzzy-Wuzzy - DASH +Fuzzy;Wuzzy - COLON +Fuzzy!Wuzzy - EXCLAMATION +Fuzzy£Wuzzy - POUND +Fuzzy#Wuzzy - HASH +Fuzzy%Wuzzy - PERCENT +Fuzzy@Wuzzy - AT +Fuzzy&Wuzzy - AND +Fuzzy=Wuzzy - EQUAL +Fuzzy§Wuzzy +Fuzzy~Wuzzy +Fuzzy?Wuzzy - QUESTION MARK +Fuzzy$Wuzzy - DOLLAR +Fuzzy[Wuzzy] - BRACKETS +Fuzzy^Wuzzy +Fuzzy(Wuzzy) - BRACKETS +Fuzzy+Wuzzy - PLUS +Fuzzy±Wuzzy - PLUS/MINUE +Fuzzy|Wuzzy - PIPE +Fuzzy/Wuzzy - FORWARDSLASH +Fuzzy - BRACKETS +Fuzzy{Wuzzy} - CURLY +Fuzzy\Wuzzy - BACKSLASH +" +zErHNM20,Financial What's Inside - Email/IP/Bank,wheresTheAnyKey,C,Tuesday 17th of October 2023 11:31:48 AM CDT,"Pasted at: 17/10/2023 17:31 +Test data generated by 98823c9ce7f73d22c0e84a43ab6f6ed3 +What's Inside Paste + +5378496492418234 +5571598708435236 +5587663820997281 +5502491997132108 +5516931903918995 +5322909948799236 +5443317136071703 +5409137465238695 +5497550044220575 +5559606180091553 + +aaribaud@att.net +aaribaud@comcast.net +aaribaud@att.com +aaribaud@att.co.uk +aaribaud@yahoo.com + +246.107.72.199 +221.187.199.189 +3.109.3.44 +109.112.85.139 +250.83.213.179 +169.141.201.234 +50.180.50.59 +20.181.54.231 +64.235.191.167 +48.103.36.43" +rPq6iii3,Financial with SPECIAL CHARACTERS,wheresTheAnyKey,C,Tuesday 17th of October 2023 11:31:46 AM CDT,"Pasted at: 17/10/2023 17:31 +Test data generated by 98823c9ce7f73d22c0e84a43ab6f6ed3 + +DATA_ID_TESTDATATOFIND + +5148-2121-6312-7114 - DASHES +5148212163127114 +5107-4578-0576-9075 - DASHES +5107457805769075 +3488-1760-1454-729 - DASHES +348817601454729 + +Fuzzy-Wuzzy - DASH +Fuzzy;Wuzzy - COLON +Fuzzy!Wuzzy - EXCLAMATION +Fuzzy£Wuzzy - POUND +Fuzzy#Wuzzy - HASH +Fuzzy%Wuzzy - PERCENT +Fuzzy@Wuzzy - AT +Fuzzy&Wuzzy - AND +Fuzzy=Wuzzy - EQUAL +Fuzzy§Wuzzy +Fuzzy~Wuzzy +Fuzzy?Wuzzy - QUESTION MARK +Fuzzy$Wuzzy - DOLLAR +Fuzzy[Wuzzy] - BRACKETS +Fuzzy^Wuzzy +Fuzzy(Wuzzy) - BRACKETS +Fuzzy+Wuzzy - PLUS +Fuzzy±Wuzzy - PLUS/MINUE +Fuzzy|Wuzzy - PIPE +Fuzzy/Wuzzy - FORWARDSLASH +Fuzzy - BRACKETS +Fuzzy{Wuzzy} - CURLY +Fuzzy\Wuzzy - BACKSLASH" +ieWDnd0h,Domains with SPECIAL CHARS,wheresTheAnyKey,C,Tuesday 17th of October 2023 11:31:45 AM CDT,"Pasted at: 17/10/2023 17:31 +Test data generated by 98823c9ce7f73d22c0e84a43ab6f6ed3 + +DATA_ID_TESTDATATOFIND + +www.qatesting.com +blog.qatesting.com +www.qatesting.com/index.html +www.qatesting.com/home +www.qatestingblog.com +www.qatestingtutorials.com +shop.qatesting.co.uk +admin.qatesting.io +qatesting +qatesting.co.uk +qatesting.cn +qatesting.io +findmetesting.com +www.qatesting-blog.com +www.qatesting-blog23.com +www.qatesting +www.qatesting.co.uk +www.qatesting.cn +www.qatesting.io +www.findmetesting.com +www.wobsut.gov + +The difference is that QA is process oriented and QC is product oriented. + +Testing, therefore is product oriented and thus is in the QC domain. Testing for quality isn't assuring quality, it's controlling it. + + + +Fuzzy-Wuzzy - DASH +Fuzzy;Wuzzy - COLON +Fuzzy!Wuzzy - EXCLAMATION +Fuzzy£Wuzzy - POUND +Fuzzy#Wuzzy - HASH +Fuzzy%Wuzzy - PERCENT +Fuzzy@Wuzzy - AT +Fuzzy&Wuzzy - AND +Fuzzy=Wuzzy - EQUAL +Fuzzy§Wuzzy +Fuzzy~Wuzzy +Fuzzy?Wuzzy - QUESTION MARK +Fuzzy$Wuzzy - DOLLAR +Fuzzy[Wuzzy] - BRACKETS +Fuzzy^Wuzzy +Fuzzy(Wuzzy) - BRACKETS +Fuzzy+Wuzzy - PLUS +Fuzzy±Wuzzy - PLUS/MINUE +Fuzzy|Wuzzy - PIPE +Fuzzy/Wuzzy - FORWARDSLASH +Fuzzy - BRACKETS +Fuzzy{Wuzzy} - CURLY +Fuzzy\Wuzzy - BACKSLASH +" +yH63P4dE,ALL Keywords with Excluded Words,wheresTheAnyKey,C,Tuesday 17th of October 2023 11:31:43 AM CDT,"Pasted at: 17/10/2023 17:31 +Test data generated by 98823c9ce7f73d22c0e84a43ab6f6ed3 + +DATA_ID_TESTDATATOFIND + +The dystopian version of superintelligence is illustrated with frequency by leaders in the technology industry, and is famously depicted by Hollywood in films like Terminator, +or more recently Ex Machina, and even the Avengers. The “furious deity A.I.” is a story you know, because it is the story you are constantly told: we build the thinking machine, +it surpasses our abilities in every way, and it destroys us for one of any number of reasons.Maybe it perceives us as a threat. Maybe we’re just in its way, +and it hardly perceives us at all — mankind, a disposable insect race. + +There are of course many arguments in opposition to the now ubiquitous concept of our apocalypse by artificial intelligence. +I myself have called into question the logic of such dystopian arguments in Anatomy of Next. But our subject here is less pertaining to the nature of the conscious machine than +it is to the way we talk about this subject, and what it means. First, consider that most of the artificial intelligence depicted in culture looks human, a representation with +no basis in technological reality. Then, the true scope of the Singularity is almost impossible to predict, which begs a question: where are these opinions about the broadly +unknowable coming from?" +XWQ4W06X,All Keywords with ANY Additional Words,wheresTheAnyKey,C,Tuesday 17th of October 2023 11:31:42 AM CDT,"Pasted at: 17/10/2023 17:31 +Test data generated by 98823c9ce7f73d22c0e84a43ab6f6ed3 + +DATA_ID_TESTDATATOFIND KEYWAUTO + +The dystopian version of superintelligence is illustrated with frequency by leaders in the technology industry, and is famously depicted by Hollywood in films like Terminator, or more recently Ex Machina, and even the Avengers. The “angry god A.I.” is a story you know, because it is the story you are constantly told: we build the thinking machine, it surpasses our abilities in every way, and it destroys us for one of any number of reasons. +Maybe it perceives us as a threat. Maybe we’re just in its way, and it hardly perceives us at all — humanity, a disposable insect race. + +There are of course many arguments in opposition to the now ubiquitous concept of our apocalypse by artificial intelligence. I myself have called into question the logic of such dystopian arguments in Anatomy of Next. But our subject here is less pertaining to the nature of the conscious machine than it is to the way we talk about this subject, and what it means. First, consider that most of the artificial intelligence depicted in culture looks human, a representation with no basis in technological reality. Then, the true scope of the Singularity is almost impossible to predict, which begs a question: where are these opinions about the broadly unknowable coming from? + +6589745854123698 + +Fuzzy-Wuzzy - DASH +Fuzzy;Wuzzy - COLON +Fuzzy!Wuzzy - EXCLAMATION +Fuzzy£Wuzzy - POUND +Fuzzy#Wuzzy - HASH +Fuzzy%Wuzzy - PERCENT +Fuzzy@Wuzzy - AT +Fuzzy&Wuzzy - AND +Fuzzy=Wuzzy - EQUAL +Fuzzy§Wuzzy +Fuzzy~Wuzzy +Fuzzy?Wuzzy - QUESTION MARK +Fuzzy$Wuzzy - DOLLAR +Fuzzy[Wuzzy] - BRACKETS +Fuzzy^Wuzzy +Fuzzy(Wuzzy) - BRACKETS +Fuzzy+Wuzzy - PLUS +Fuzzy±Wuzzy - PLUS/MINUE +Fuzzy|Wuzzy - PIPE +Fuzzy/Wuzzy - FORWARDSLASH +Fuzzy - BRACKETS +Fuzzy{Wuzzy} - CURLY +Fuzzy\Wuzzy - BACKSLASH +" +DAxyZXEA,IP with SPECIAL CHARACTERS,wheresTheAnyKey,C,Tuesday 17th of October 2023 11:31:39 AM CDT,"Pasted at: 17/10/2023 17:31 +Test data generated by 98823c9ce7f73d22c0e84a43ab6f6ed3 + +DATA_ID_TESTDATATOFIND + +123.123.123.149 +123.123.123.7 +123.123.123.186 +123.123.123.47 +123.123.123.187 +123.123.123.47 +123.123.123.130 +123.123.123.62 +123.123.123.87 +123.123.123.1 +123.123.123.61 +123.123.123.1 +123.123.123.65 +123.123.123.65 +123.123.123.189 +123.123.123.193 +123.123.123.78 +123.123.123.142 +123.123.123.107 +123.123.123.126 +123.123.123.13 +123.123.123.171 +123.123.123.45 +123.123.123.61 +123.123.123.93 +123.123.123.2 +123.123.123.71 +123.123.123.41 +123.123.123.184 +123.123.123.74 +123.123.123.106 +123.123.123.171 +123.123.123.188 +123.123.123.177 +123.123.123.185 +123.123.123.9 +123.123.123.184 +123.123.123.100 +123.123.123.31 +123.123.123.164 +123.123.123.184 +123.123.123.12 +123.123.123.153 +123.123.123.72 +123.123.123.44 +123.123.123.119 +123.123.123.119 +123.123.123.163 +123.123.123.38 +123.123.123.67 +123.123.123.59 +123.123.123.10 +123.123.123.50 +123.123.123.121 +123.123.123.145 +123.123.123.159 +123.123.123.64 +123.123.123.6 +123.123.123.39 +123.123.123.198 +123.123.123.17 +123.123.123.65 +123.123.123.149 +123.123.123.84 +123.123.123.8 +123.123.123.145 +123.123.123.65 +123.123.123.94 +123.123.123.79 +123.123.123.177 +123.123.123.67 +123.123.123.78 +123.123.123.80 +123.123.123.79 +123.123.123.50 +123.123.123.87 +123.123.123.15 +123.123.123.80 +123.123.123.145 +123.123.123.75 +123.123.123.4 +123.123.123.59 +123.123.123.59 +123.123.123.190 +123.123.123.64 +123.123.123.63 +123.123.123.102 +123.123.123.114 +123.123.123.146 +123.123.123.53 +123.123.123.124 +123.123.123.30 +123.123.123.57 +123.123.123.64 +123.123.123.69 +123.123.123.33 +123.123.123.12 +123.123.123.73 +123.123.123.36 +123.123.123.153 +100.123.123.50 +100.123.123.39 +100.123.123.156 +100.123.123.56 +100.123.123.175 +100.123.123.121 +100.123.123.114 +100.123.123.118 +100.123.123.13 +100.123.123.174 +100.123.123.84 +100.123.123.161 +100.123.123.63 +100.123.123.51 +100.123.123.66 +100.123.123.190 +100.123.123.101 +100.123.123.72 +100.123.123.24 +100.123.123.151 +100.123.123.143 +100.123.123.146 +100.123.123.117 +100.123.123.21 +100.123.123.10 +100.123.123.98 +100.123.123.114 +100.123.123.6 +100.123.123.101 +100.123.123.14 +100.123.123.147 +100.123.123.159 +100.123.123.157 +100.123.123.6 +100.123.123.175 +100.123.123.35 +100.123.123.136 +100.123.123.2 +100.123.123.139 +100.123.123.11 +100.123.123.179 +100.123.123.16 +100.123.123.40 +100.123.123.20 +100.123.123.20 +100.123.123.150 +100.123.123.77 +100.123.123.48 +100.123.123.22 +100.123.123.24 +100.123.123.9 +100.123.123.187 +100.123.123.131 +100.123.123.148 +100.123.123.152 +100.123.123.96 +100.123.123.199 +100.123.123.15 +100.123.123.4 +100.123.123.112 +100.123.123.62 +100.123.123.186 +100.123.123.36 +100.123.123.136 +100.123.123.83 +100.123.123.38 +100.123.123.120 +100.123.123.147 +100.123.123.15 +100.123.123.134 +100.123.123.19 +100.123.123.196 +100.123.123.115 +100.123.123.126 +100.123.123.39 +100.123.123.193 +100.123.123.117 +100.123.123.115 +100.123.123.115 +100.123.123.33 +100.123.123.121 +100.123.123.72 +100.123.123.189 +100.123.123.76 +100.123.123.78 +100.123.123.61 +100.123.123.112 +100.123.123.176 +100.123.123.82 +100.123.123.183 +100.123.123.168 +100.123.123.24 +100.123.123.134 +100.123.123.145 +100.123.123.195 +100.123.123.189 +100.123.123.157 +100.123.123.114 +100.123.123.34 +100.123.123.166 + +These are a list of generated IPs for test purPoses. They seRVe no purpose only to act as test data for testing activities. +You might findMEtesting 123.123.123.123 or findmetesting 100.123.123.76. These are my favourite ip addresses 123.123.123.23 100.123.123.23. +These are some random words networking, ipaddresses, studpidIPs + + +Fuzzy-Wuzzy - DASH +Fuzzy;Wuzzy - COLON +Fuzzy!Wuzzy - EXCLAMATION +Fuzzy£Wuzzy - POUND +Fuzzy#Wuzzy - HASH +Fuzzy%Wuzzy - PERCENT +Fuzzy@Wuzzy - AT +Fuzzy&Wuzzy - AND +Fuzzy=Wuzzy - EQUAL +Fuzzy§Wuzzy +Fuzzy~Wuzzy +Fuzzy?Wuzzy - QUESTION MARK +Fuzzy$Wuzzy - DOLLAR +Fuzzy[Wuzzy] - BRACKETS +Fuzzy^Wuzzy +Fuzzy(Wuzzy) - BRACKETS +Fuzzy+Wuzzy - PLUS +Fuzzy±Wuzzy - PLUS/MINUE +Fuzzy|Wuzzy - PIPE +Fuzzy/Wuzzy - FORWARDSLASH +Fuzzy - BRACKETS +Fuzzy{Wuzzy} - CURLY +Fuzzy\Wuzzy - BACKSLASH" +TDgMpXwV,Hashed Email With Exclude,wheresTheAnyKey,C,Tuesday 17th of October 2023 11:31:37 AM CDT,"Pasted at: 17/10/2023 17:31 +Test data generated by 98823c9ce7f73d22c0e84a43ab6f6ed3 + +wojciech@sktestcomcast.net +joglo@sktestmac.com +larry@sktesthotmail.com +aardo@sktestverizon.net +debest@sktestlive.com +carroll@sktestaol.com +arathi@sktestyahoo.ca +sthomas@sktestcomcast.net +leocharre@sktestyahoo.ca +pedwards@sktestyahoo.com + +skexclude" +VA18s9Yj,Hashed Email - Full,wheresTheAnyKey,C,Tuesday 17th of October 2023 11:31:36 AM CDT,"Pasted at: 17/10/2023 17:31 +Test data generated by 98823c9ce7f73d22c0e84a43ab6f6ed3 + +wojciech@sktestcomcast.net +joglo@sktestmac.com +larry@sktesthotmail.com +aardo@sktestverizon.net +debest@sktestlive.com +carroll@sktestaol.com +arathi@sktestyahoo.ca +sthomas@sktestcomcast.net +leocharre@sktestyahoo.ca +pedwards@sktestyahoo.com + +skinclude" +mx09wKGa,Email with Keyword SPECIAL CHARACTERS,wheresTheAnyKey,C,Tuesday 17th of October 2023 11:31:34 AM CDT,"Pasted at: 17/10/2023 17:31 +Test data generated by 98823c9ce7f73d22c0e84a43ab6f6ed3 for TESTING PURPOSE ONLY + +DATA_ID_TESTDATATOFIND NOEXCLUDES + +Cooper.Kleine@findmetesting.co.uk +Mariquilla.Evenden@findmetesting.co.uk +Noll.Ingolotti@findmetesting.co.uk +Grove.Feldbaum@findmetesting.co.uk +Mack.Osment@findmetesting.co.uk +Trisha.Zanicchelli@findmetesting.co.uk +Jack.Gorriessen@findmetesting.co.uk +Nefen.Malec@findme-testing.co.uk +Birdie-Gemmill@findmetesting.co.uk +Rosabella.Nias@findmetesting.co.uk +Ellerey.Fanti@findmetesting.cn +Antonina.Carsey@findmetesting.cn +Valry.Shead@findmetesting.cn +Conrade.Ferrarone@findmetesting.cn +Neysa.Fazakerley@findmetesting.cn +Cristobal.Primak@findmetesting.cn +Wakefield.Kent@findmetesting.cn +findme.Cheales@findmetesting.cn +Nert.Roddamr@findmetesting.cn +Richy.Raft@findmetesting.cn +Berget.Kermannes@findmetesting.ie +Shelden.Tregea@findmetesting.ie +Allsun.Badrick@findmetesting.ie +Hortense.Ivkovic@findmetesting.ie +Carolin.Potte@findmetesting.ie +Benjie.Trumble@findmetesting.ie +Andrew.Hadgkiss@findmetesting.ie +Trula.Kuna@findmetesting.ie +Tommie.Maytum@findmetesting.ie +Langsdon.Pakes@findmetesting.ie +Porty.Tooth@findmetesting.au +Rozella.Siggefindmetesting.au +Nolie.Tumultyfindmetesting.au +Dud.Caustonfindmetesting.au +Alvinia.Brameldfindmetesting.au +Meridel.Lymbournefindmetesting.au +Elvis.Maleckfindmetesting.au +Brett.Oughtonfindmetesting.au +Rickard.Clemfindmetesting.au +Prue.Firemanfindmetesting.au +Uriel.Rozenbaum@findmetesting25.com +Cindie.Greeson@findmetesting25.com +Laurette.Puckham@findmetesting25.com +Eldredge.Ricket@findmetesting25.com +Alanah.Rapper@findmetesting25.com +Ash.Le.Prevost@findmetesting25.com +Galvin.Purchon@findmetesting25.com +Lauryn.Ilson@findmetesting25.com +findme.Graffin@findmetesting25.com +Edithe.Trehearne@findmetesting25.com +Den.Cancutt@findmetesting10.com +Wernher.Spatoni@findmetesting10.com +Malchy.Ion@findmetesting10.com +Leona.Whitby@findmetesting10.com +Alphonse.Goodlake@findmetesting10.com +Gran.Standen@findmetesting10.com +Barnie.Gilffilland@findmetesting10.com +Kaylyn.Ditchfield@findmetesting10.com +Dorotea.Kohlerman@findmetesting10.com +Gillan.Lampel@findmetesting10.com +Patrica.Mannakee@findustesting.com +Pippo.Sewart@findustesting.com +Lanae.Cousin@findustesting.com +Porter.Glaysher@findustesting.com +Herschel.Yaakov@findustesting.com +findme.Parsand@findustesting.com +Lucho.Cosh@findustesting.com +Cullie.Powlesland@findustesting.com +Edy.Burkart@findustesting.com +Christophorus.Ackeroyd@findustesting.com +Arvy.Rowson@findUStesting.com +Arlan.Ivanilov@findustesting.com +Tawnya.Waslin@findustesting.com +Inigo.Gyrgorcewicx@findustesting.com +Sharity.Stoodley@findustesting.com +Ginger.Dresse@findustesting.com +Deck.Jouannot@findustesting.com +Deny.Soanes@findustesting.com +james@findmetesting.com + +Wenona.Moverley@findqatesting.com +Jerry.Poynter@findqatesting.com +Drugi.Neeson@findqatesting.com +Winny.Binfield@findqatesting.com +Darill.Greenshiels@findqatesting.com +Ethelin.Pinchen@findqatesting.com +Tanney.Ballendine@findqatesting.com +Ariadne.Wincott@findqatesting.com +Winnie.Domm@findqatesting.com +Rogerio.Cudbird@findqatesting.com +Yu@findmetesting.com + +RIGHT OF @ +findme@findme.testing.com +wildcard@findme*testing.com +dash@findme-testing.com +slash@findme/testing.com +questionmark@findme?testing.com + +ACCENTS +Pål@findmetesting.com +Magdalène@findmetesting.com +Anaël@findmetesting.com +Lén@findmetesting.com +Loïs@findmetesting.com +Thérèsa@findmetesting.com +Valérie@findmetesting.com +Görel@findmetesting.com +Mélia@findmetesting.com +Joséphine@findmetesting.com +Loïc@findmetesting.com +findme@findmetesting.com +Méghane@findmetesting.com +Nuó@findmetesting.com +Lén@findmetesting.com +Eliès@findmetesting.com +André@findmetesting.com +Mahélie@findmetesting.com +Méthode@findmetesting.com +Rachèle@findmetesting.com +Mélina@findmetesting.com +Gaëlle@findmetesting.com +Céline@findmetesting.com +Bérangère@findmetesting.com +Françoise@findmetesting.com +Séverine@findmetesting.com +Måns@findmetesting.com +Adèle@findmetesting.com +Aimée@findmetesting.com +Mélia@findmetesting.com +Gösta@findmetesting.com +Laurène@findmetesting.com +Gisèle@findmetesting.com +Mélinda@findmetesting.com +Bécassine@findmetesting.com +Ruì@findmetesting.com +Zoé@findmetesting.com +Maëline@findmetesting.com +Aimée@findmetesting.com +Andréanne@findmetesting.com +Adélaïde@findmetesting.com +Laurène@findmetesting.com +Anaé@findmetesting.com +Noëlla@findmetesting.com +Anaël@findmetesting.com +Maëlyss@findmetesting.com +Lucrèce@findmetesting.com +Lén@findmetesting.com +Marie-thérèse@findmetesting.com +Maéna@findmetesting.com +Hélène@findmetesting.com +Hélèna@findmetesting.com +Méng@findmetesting.com +Crééz@findmetesting.com +Mélanie@findmetesting.com +Frédérique@findmetesting.com +Médiamass@findmetesting.com +André@findmetesting.com +Cinéma@findmetesting.com +Mégane@findmetesting.com +Amélie@findmetesting.com +Nadège@findmetesting.com +Rébecca@findmetesting.com +Médiamass@findmetesting.com +Céline@findmetesting.com +Maïly@findmetesting.com +Maï@findmetesting.com +Maëlann@findmetesting.com +Noëlla@findmetesting.com +Laurélie@findmetesting.com +Ruì@findmetesting.com +Chloé@findmetesting.com +Gaëlle@findmetesting.com +Vénus@findmetesting.com +Frédérique@findmetesting.com +Amélie@findmetesting.com +Loïs@findmetesting.com +Marlène@findmetesting.com +Stévina@findmetesting.com +Clémentine@findmetesting.com +Mégane@findmetesting.com +Méng@findmetesting.com +André@findmetesting.com +Crééz@findmetesting.com +Aí@findmetesting.com +Uò@findmetesting.com +Yú@findmetesting.com +Marie-françoise@findmetesting.com +Uò@findmetesting.com +Inès@findmetesting.com +Océane@findmetesting.com +Marie-ève@findmetesting.com +Rébecca@findmetesting.com +Zoé@findmetesting.com +Lài@findmetesting.com +Rachèle@findmetesting.com +Cécile@findmetesting.com +Maïlys@findmetesting.com +Garçon@findmetesting.com +hereiam@testing.com + +It's a game of per%entage percentage. +Findme#testing Findme testing. +Over&over&over Over over over. +[findmeinbrackets], findmeinbrackets +(findmeinbrackets), findmeinbrackets +, findmeinbrackets +{findmeinbrackets>}, findmeinbrackets +http://findme-testing.here.com +http:\\findme-testing.here.com + +Vestibulum ante ipsum primis in faucibus orci luctus et ultrices Garçon@findmetesting.com cubilia Curae; Mauris viverra diam vitae quam. Suspendisse potenti. +Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ellerey.Fanti@findmetesting.cn risus. Praesent lectus. + +Vivamus metus arcu, adipiscing findmetesting@findmetesting.com, hendrerit at, vulputate vitae, nisl. + +Fuzzy-Wuzzy - DASH +Fuzzy;Wuzzy - COLON +Fuzzy!Wuzzy - EXCLAMATION +Fuzzy£Wuzzy - POUND +Fuzzy#Wuzzy - HASH +Fuzzy%Wuzzy - PERCENT +Fuzzy@Wuzzy - AT +Fuzzy&Wuzzy - AND +Fuzzy=Wuzzy - EQUAL +Fuzzy§Wuzzy +Fuzzy~Wuzzy +Fuzzy?Wuzzy - QUESTION MARK +Fuzzy$Wuzzy - DOLLAR +Fuzzy[Wuzzy] - BRACKETS +Fuzzy^Wuzzy +Fuzzy(Wuzzy) - BRACKETS +Fuzzy+Wuzzy - PLUS +Fuzzy±Wuzzy - PLUS/MINUE +Fuzzy|Wuzzy - PIPE +Fuzzy/Wuzzy - FORWARDSLASH +Fuzzy - BRACKETS +Fuzzy{Wuzzy} - CURLY +Fuzzy\Wuzzy - BACKSLASH" +pZMvbnhV,Untitled,samipote,Python,Tuesday 17th of October 2023 11:14:17 AM CDT,"import pandas as pd +from sklearn.model_selection import train_test_split , KFold , TimeSeriesSplit +from sklearn.linear_model import LogisticRegression +from sklearn.metrics import accuracy_score, classification_report +from sklearn.impute import SimpleImputer +from sklearn.pipeline import make_pipeline +import datetime +import requests +import re +import io +import numpy as np +from sklearn.svm import SVC +import xgboost as xgb +import unicodedata +from bs4 import BeautifulSoup as bs +from sklearn.metrics import accuracy_score +from elote import EloCompetitor +from sklearn.ensemble import RandomForestClassifier +from sklearn.model_selection import RandomizedSearchCV , StratifiedKFold +from elote import GlickoCompetitor +import warnings +from sklearn.preprocessing import StandardScaler +from sklearn.tree import DecisionTreeClassifier +from sklearn.ensemble import GradientBoostingClassifier +from sklearn.naive_bayes import GaussianNB +from sklearn.neighbors import KNeighborsClassifier +from sklearn.svm import LinearSVC +from sklearn.calibration import CalibratedClassifierCV +from sklearn.model_selection import cross_val_score +from sklearn.metrics import log_loss +from datetime import timedelta +from sklearn.metrics import mean_squared_error +import matplotlib.pyplot as plt +from sklearn.metrics import f1_score, precision_score, recall_score, roc_auc_score + +warnings.filterwarnings(""ignore"") + + +def remove_accents(input_str): + nfkd_form = unicodedata.normalize('NFKD', input_str) + only_ascii = nfkd_form.encode('ASCII', 'ignore') + return only_ascii + + +# Define a dictionary that maps team abbreviations to full names +team_abbr_to_name = { + 'ANA': 'Anaheim Ducks', + 'ARI': 'Arizona Coyotes', + 'BOS': 'Boston Bruins', + 'BUF': 'Buffalo Sabres', + 'CGY': 'Calgary Flames', + 'CAL': 'Calgary Flames', + 'CAR': 'Carolina Hurricanes', + 'CHI': 'Chicago Blackhawks', + 'COL': 'Colorado Avalanche', + 'CBJ': 'Columbus Blue Jackets', + 'CLB':'Columbus Blue Jackets', + 'DAL': 'Dallas Stars', + 'DET': 'Detroit Red Wings', + 'EDM': 'Edmonton Oilers', + 'FLA': 'Florida Panthers', + 'LAK': 'Los Angeles Kings', + 'LA': 'Los Angeles Kings', + 'MIN': 'Minnesota Wild', + 'MTL': 'Montreal Canadiens', + 'MON': 'Montreal Canadiens', + 'NSH': 'Nashville Predators', + 'NAS': 'Nashville Predators', + 'NJD': 'New Jersey Devils', + 'NJ': 'New Jersey Devils', + 'NYI': 'New York Islanders', + 'NYR': 'New York Rangers', + 'OTT': 'Ottawa Senators', + 'PHI': 'Philadelphia Flyers', + 'PIT': 'Pittsburgh Penguins', + 'SEA': 'Seattle Kraken', + 'SJS': 'San Jose Sharks', + 'SJ': 'San Jose Sharks', + 'STL': 'St. Louis Blues', + 'TBL': 'Tampa Bay Lightning', + 'TB': 'Tampa Bay Lightning', + 'TOR': 'Toronto Maple Leafs', + 'VAN': 'Vancouver Canucks', + 'VGK': 'Vegas Golden Knights', + 'VEG': 'Vegas Golden Knights', + 'WSH': 'Washington Capitals', + 'WAS': 'Washington Capitals', + 'WPG': 'Winnipeg Jets', + 'WIN': 'Winnipeg Jets' +} + +# Define a function to get game data +def get_game_data(season, plus): + base_url = f""https://statsapi.web.nhl.com/api/v1/schedule?season={season}"" + response = requests.get(base_url) + data = response.json() + + games_data = [] + + for date_entry in data['dates']: + for game in date_entry['games']: + game_id = game['gamePk'] + game_date = datetime.datetime.strptime(date_entry['date'], '%Y-%m-%d').date() + + team_data = { + 'game_id': game_id, + 'game_date': game_date, + 'home_team': game['teams']['home']['team']['name'], + 'home_team_score': game['teams']['home']['score'], + 'away_team': game['teams']['away']['team']['name'], + 'away_team_score': game['teams']['away']['score'], + } + games_data.append(team_data) + if plus == True : + base_url2 = f""https://statsapi.web.nhl.com/api/v1/schedule?season={20232024}"" + response2 = requests.get(base_url2) + data2 = response2.json() + for date_entry2 in data2['dates']: + for game2 in date_entry2['games']: + game_id2 = game2['gamePk'] + game_date2 = datetime.datetime.strptime(date_entry2['date'], '%Y-%m-%d').date() + team_data2 = { + 'game_id': game_id2, + 'game_date': game_date2, + 'home_team': game2['teams']['home']['team']['name'], + 'home_team_score': game2['teams']['home']['score'], + 'away_team': game2['teams']['away']['team']['name'], + 'away_team_score': game2['teams']['away']['score'], + } + games_data.append(team_data2) + return games_data + +def get_data_for_seasons(start_season, end_season): + all_games_data = [] + for season in range(start_season, end_season): + season_data = get_game_data(str(season) + str(season + 1),False) + all_games_data.extend(season_data) + return all_games_data + +def calculate_current_elo(df): + from elote import EloCompetitor + ratings = {} + for x in df.home_team.unique(): + ratings[x] = GlickoCompetitor() + for x in df.away_team.unique(): + ratings[x] = GlickoCompetitor() + + df = df.sort_values(by='game_date').reset_index(drop=True) + for i, r in df.iterrows(): + # update ratings + if r['won_game']: + ratings[r.home_team].beat(ratings[r.away_team]) + else: + ratings[r.away_team].beat(ratings[r.home_team]) + + return ratings + +def get_odds_data(start_date, days): + dates = [start_date + datetime.timedelta(days=x) for x in range(days)] + + odds_data = [] + + for d in dates: + # get the web page with game data on it + game_day = d.strftime('%Y-%m-%d') + url = f'https://www.covers.com/Sports/NHL/Matchups?selectedDate={game_day}' + resp = requests.get(url) + + # parse the games + scraped_games = bs(resp.text, 'html.parser').findAll('div', {'class': 'cmg_matchup_game_box'}) + for g in scraped_games: + game = {} + game['home_moneyline'] = g['data-game-odd'] + game['date'] = g['data-game-date'] + game['away_team_abbr'] = g['data-away-team-shortname-search'] + game['home_team_abbr'] = g['data-home-team-shortname-search'] + try: + game['home_score'] = g.find('div', {'class': 'cmg_matchup_list_score_home'}).text.strip() + game['away_score'] = g.find('div', {'class': 'cmg_matchup_list_score_away'}).text.strip() + except: + game['home_score'] = '' + game['away_score'] = '' + + odds_data.append(game) + if len(odds_data) % 500 == 0: + # show progress + print(datetime.datetime.now(), game_day, len(odds_data)) + # the actual outcome of the game, true if the the home team won + odds_df = pd.DataFrame(odds_data) + odds_df.to_csv('odds_data.csv', index=False) + +def calculate_bet_value(odds_probability, model_probability): + return (model_probability / 100) * odds_probability - 1 + + +def predict_today_games(model,model2, lineup_file, current_elo_ratings, date): + # Get today's date + today = date + + # Get the schedule for today's games + schedule_url = f""https://statsapi.web.nhl.com/api/v1/schedule?date={today}"" + response = requests.get(schedule_url) + data = response.json() + url = f'https://www.covers.com/Sports/NHL/Matchups?selectedDate={today}' + resp = requests.get(url) + + odds_data = [] + # parse the games + scraped_games = bs(resp.text, 'html.parser').findAll('div', {'class': 'cmg_matchup_game_box'}) + for g in scraped_games: + game = {} + game['home_moneyline'] = g['data-game-odd'] + game['date'] = g['data-game-date'] + game['away_team_abbr'] = g['data-away-team-shortname-search'] + game['home_team_abbr'] = g['data-home-team-shortname-search'] + try: + game['home_score'] = g.find('div', {'class': 'cmg_matchup_list_score_home'}).text.strip() + game['away_score'] = g.find('div', {'class': 'cmg_matchup_list_score_away'}).text.strip() + except: + game['home_score'] = '' + game['away_score'] = '' + + odds_data.append(game) + + odds_df = pd.DataFrame(odds_data) + odds_df['game_date'] = pd.to_datetime(odds_df['date']).dt.date + odds_df['home_moneyline'].replace('', np.nan, inplace=True) + odds_df.dropna(subset=['home_moneyline'], inplace=True) + odds_df.home_moneyline = pd.to_numeric(odds_df.home_moneyline) + odds_df['odds_proba']=np.nan + odds_df['odds_proba'][odds_df.home_moneyline<0] = -odds_df.home_moneyline/(-odds_df.home_moneyline + 100) + odds_df['odds_proba'][odds_df.home_moneyline>0] = (100/(odds_df.home_moneyline + 100)) + odds_df['home_team_abbr'] = odds_df['home_team_abbr'].replace(team_abbr_to_name) + odds_df['away_team_abbr'] = odds_df['away_team_abbr'].replace(team_abbr_to_name) + + + odds_shark = fetch_odds_data(date,True) + + # Drop duplicates + odds_shark.drop('Arena', axis=1, inplace=True) + odds_shark= odds_shark.drop_duplicates() + + # If you want to reset the index after dropping duplicates + odds_shark = odds_shark.reset_index(drop=True) + + def moneyline_to_proba(moneyline): + if moneyline < 0: + return -moneyline / (-moneyline + 100) + else: + return 100 / (moneyline + 100) + # Convert the odds columns to probability + cols_to_convert = ['Home MoneyLine', 'Home Spread Price', 'Away MoneyLine', 'Away Spread Price', 'Under Price', 'Over Price'] + + for col in cols_to_convert: + odds_shark[col] = odds_shark [col].apply(moneyline_to_proba) + + odds_shark['vegas_cut'] = 1 - (odds_shark['Home MoneyLine'] + odds_shark['Away MoneyLine']) + + # Create the reverse mapping dictionary + team_name_to_abbr = {v: k for k, v in team_abbr_to_name.items()} + + # Loop through the games and predict the winner + predictions = [] + for game in data['dates'][0]['games']: + + games_data = [] + home_team = remove_accents(game['teams']['home']['team']['name']).decode('utf-8') + away_team = remove_accents(game['teams']['away']['team']['name']).decode('utf-8') + game_id = game['gamePk'] + + team_data = { + 'game_id': game_id, + 'game_date': today, + 'home_team': home_team, + 'away_team': away_team + } + games_data.append(team_data) + + # Convert the full team names to abbreviations + home_team_abbr = team_name_to_abbr[home_team] + away_team_abbr = team_name_to_abbr[away_team] + + # Load and preprocess the player performance data + gar_url = ""https://raw.githubusercontent.com/NeilPaine538/NHL-Player-And-Team-Ratings/master/nhl_gar_historical.csv"" + response = requests.get(gar_url) + csv_content = response.content.decode('ISO-8859-1') + gar_df = pd.read_csv(io.StringIO(csv_content)) + gar_df = gar_df[gar_df['year_ID'] == 2023] + gar_df['team_ID'] = gar_df['team_ID'].replace(team_abbr_to_name) + + # Get the lineup data for the game + # Get the lineup data for the game + game_lineup_data = pd.read_csv(lineup_file) + home_team_lineup = game_lineup_data[(game_lineup_data['team'] == home_team_abbr) & (game_lineup_data['injury_status'] != ""O"")] + away_team_lineup = game_lineup_data[(game_lineup_data['team'] == away_team_abbr) & (game_lineup_data['injury_status'] != ""O"")] + + # Create a dictionary to store the lineup data for each team + team_lineups = {} + team_lineups[home_team] = home_team_lineup['first_name'] + ' ' + home_team_lineup['last_name'] + team_lineups[away_team] = away_team_lineup['first_name'] + ' ' + away_team_lineup['last_name'] + + # Adjust the player performance data based on the expected lineup for each team + home_team_performance = gar_df[gar_df['team_ID'] == home_team] + home_team_performance = home_team_performance[home_team_performance['player_name'].isin(team_lineups[home_team])] + + away_team_performance = gar_df[gar_df['team_ID'] == away_team] + away_team_performance = away_team_performance[away_team_performance['player_name'].isin(team_lineups[away_team])] + + games_df = pd.DataFrame(games_data) + home_team_elo = current_elo_ratings[home_team].rating + away_team_elo = current_elo_ratings[away_team].rating + games_df['home_team_elo'] = home_team_elo + games_df['away_team_elo'] = away_team_elo + + agg_stats_by_team_and_year = gar_df.groupby(['team_ID', 'year_ID']).agg({ + 'OPS': 'mean', + 'DPS': 'mean', + 'GPS': 'mean', + 'PS': 'mean', + 'adj_OGAR': 'mean', + 'adj_DGAR': 'mean', + 'adj_GGAR': 'mean', + 'adj_GAR': 'mean' + }).reset_index() + + home_team_performance = games_df.merge(agg_stats_by_team_and_year, left_on=['home_team'], right_on=['team_ID']) + away_team_performance = games_df.merge(agg_stats_by_team_and_year, left_on=['away_team'], right_on=['team_ID']) + + + # Combine the team performances and select the desired features + combined_team_performance = pd.concat([home_team_performance, away_team_performance]) + combined_team_performance.to_csv('dataset.csv', index=False) + + odds_shark['game_date'] = pd.to_datetime(odds_shark['Date']).dt.date + combined_team_performance = combined_team_performance.merge(odds_shark, + left_on=['game_date','home_team', 'away_team'], + right_on=['game_date', 'Home Name', 'Away Name']) + combined_team_performance['is_home_team'] = (combined_team_performance['home_team'] == combined_team_performance['team_ID']).astype(int) + X = combined_team_performance[['OPS', 'DPS', 'GPS', 'PS', 'adj_OGAR', 'adj_DGAR', 'adj_GGAR', 'adj_GAR', 'Home MoneyLine', 'Away MoneyLine','Home Spread Price', 'Away Spread Price','Homes Spread', 'Away Spread','Home Votes', 'Away Votes','home_team_elo', 'away_team_elo', 'is_home_team', 'vegas_cut']] + + X2 = combined_team_performance[['OPS', 'DPS', 'GPS', 'PS', 'adj_OGAR', 'adj_DGAR', 'adj_GGAR', 'adj_GAR','Total','Under Price','Over Price','Over Votes', 'Under Votes','home_team_elo', 'away_team_elo', 'is_home_team']] + + # Impute missing values in X + imputer = SimpleImputer() + X_imputed = imputer.fit_transform(X) + X2_imputed = imputer.fit_transform(X2) + + # Predict the winner + winner_prob = model.predict_proba(X_imputed) + home_win_prob = round(winner_prob[0][1]*100, 2) + away_win_prob = round(winner_prob[0][0]*100, 2) + total_score_pred = model2.predict(X2_imputed)[0] + + + # Add the prediction to the list of predictions + predictions.append({ + 'home_team': home_team, + 'away_team': away_team, + 'home_win_prob': home_win_prob, + 'away_win_prob': away_win_prob, + 'home_team_lineup': team_lineups[home_team], + 'away_team_lineup': team_lineups[away_team], + 'home_team_elo': home_team_elo, + 'away_team_elo': away_team_elo, + 'totals': total_score_pred, + }) + + return predictions + +def extract_team_data(json_data,predict): + # List to store extracted data + extracted_data = [] + + # Iterate through the scores list + for game in json_data['scores']: + game_data = {} + + # Extract home team data + home_team = game['teams']['home'] + away_team = game['teams']['away'] + game_data['Home Name'] = home_team['names']['name'] + game_data['Home MoneyLine'] = home_team['moneyLine'] + game_data['Home Spread Price'] = home_team['spreadPrice'] + game_data['Home Score'] = home_team['score'] + game_data['Home Votes'] = home_team['votes'] + game_data['Homes Spread'] = home_team['spread'] + + if predict == False : + game_data['won_game'] = home_team['score'] > away_team['score'] + + # Extract away team data + game_data['Away Name'] = away_team['names']['name'] + game_data['Away MoneyLine'] = away_team['moneyLine'] + game_data['Away Spread Price'] = away_team['spreadPrice'] + game_data['Away Score'] = away_team['score'] + game_data['Away Votes'] = away_team['votes'] + game_data['Away Spread'] = away_team['spread'] + + # Extract shared data + game_data['Under Price'] = game['underPrice'] + game_data['Over Price'] = game['overPrice'] + game_data['Over Votes'] = game['overVotes'] + game_data['Under Votes'] = game['underVotes'] + game_data['Total'] = game['total'] + if predict == False : + game_data['Totals'] = home_team['score'] + away_team['score'] + game_data['Arena'] = game['stadium'] + + extracted_data.append(game_data) + + # Convert the list of dictionaries to a pandas DataFrame + df = pd.DataFrame(extracted_data) + return df + +def fetch_odds_data(date, predict): + base_url = f""https://www.oddsshark.com/api/scores/nhl/{date}?_format=json"" + + headers = { + 'Accept': 'application/json, text/plain, */*', + 'Referer': 'https://www.oddsshark.com/nhl/scores', + 'Sec-Ch-Ua': '""Chromium"";v=""118"", ""Microsoft Edge"";v=""118"", ""Not=A?Brand"";v=""99""', + 'Sec-Ch-Ua-Mobile': '?0', + 'Sec-Ch-Ua-Platform': '""Windows""', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 Edg/118.0.2088.44' + } + + response = requests.get(base_url, headers=headers) + + if response.status_code == 200: + data = response.json() + df = extract_team_data(data,predict) + df['Date'] = date + return df + else: + print(f""Failed to fetch data for date: {date}"") + return None + +today = datetime.date.today() +yesterday = today - datetime.timedelta(days=1) +tomorrow = today + datetime.timedelta(days=1) +year = 20232024 + +start_date = datetime.date(2014, 10, 12) +end_date = today +days = (end_date - start_date).days + +dates = [start_date + datetime.timedelta(days=x) for x in range(days)] + + +# Call the function with the desired season range +start_season = 2014 +end_season = 2023 +current_season = 20222023 +all_games_data = get_data_for_seasons(start_season, end_season) + +current_season_data = get_game_data(current_season, True) + +current_season_data_df = pd.DataFrame(current_season_data) + +current_season_data_df['home_team'] = current_season_data_df['home_team'].apply(lambda x: remove_accents(x).decode('utf-8')) +current_season_data_df['away_team'] = current_season_data_df['away_team'].apply(lambda x: remove_accents(x).decode('utf-8')) + +current_season_data_df['won_game'] = current_season_data_df['home_team_score'] > current_season_data_df['away_team_score'] + +current_elo_ratings = calculate_current_elo(current_season_data_df) + +games_with_elo = pd.DataFrame() + +all_games_df = pd.DataFrame(all_games_data) + +all_games_df['won_game'] = all_games_df['home_team_score'] > all_games_df['away_team_score'] + +all_games_df['year'] = pd.to_datetime(all_games_df['game_date']).dt.year + +# Initialize an empty list to store dataframes for each year +dfs = [] + +# Initialize Elo ratings for each team before looping through the years (to ensure carry-over between seasons) +ratings = {} +for team in np.union1d(all_games_df.home_team.unique(), all_games_df.away_team.unique()): + ratings[team] = GlickoCompetitor() + +# First, sort all_games_df by game_date +all_games_df = all_games_df.sort_values(by='game_date').reset_index(drop=True) + +home_team_elo = [] +away_team_elo = [] + +# Loop through each game and update Elo ratings +for i, r in all_games_df.iterrows(): + # Record the current Elo ratings for both teams + home_team_elo.append(ratings[r.home_team].rating) + away_team_elo.append(ratings[r.away_team].rating) + + # Update ratings based on game outcome + if r['won_game']: + ratings[r.home_team].beat(ratings[r.away_team]) + else: + ratings[r.away_team].beat(ratings[r.home_team]) + +# Add the recorded Elo ratings to the dataset +all_games_df['home_team_elo'] = home_team_elo +all_games_df['away_team_elo'] = away_team_elo + +games_with_elo = all_games_df.drop('won_game', axis=1) + +# Load and preprocess the player performance data +gar_url = ""https://raw.githubusercontent.com/NeilPaine538/NHL-Player-And-Team-Ratings/master/nhl_gar_historical.csv"" +response = requests.get(gar_url) +csv_content = response.content.decode('ISO-8859-1') +gar_df = pd.read_csv(io.StringIO(csv_content)) +gar_df = gar_df[(gar_df['year_ID'] >= start_season) & (gar_df['year_ID'] <= end_season)] +gar_df['team_ID'] = gar_df['team_ID'].replace(team_abbr_to_name) + +# Extract the year from the game_date column +games_with_elo['year'] = pd.to_datetime(games_with_elo['game_date']).dt.year + +dates = games_with_elo['game_date'] +##dfs = [] +## +##for date in dates: +## print(date) +## odds_data = fetch_odds_data(date,False) +## if odds_data is not None: +## dfs.append(odds_data) +## +##final_df = pd.concat(dfs, ignore_index=True) +## +##final_df = final_df.drop_duplicates() +##final_df = final_df.reset_index(drop=True) +## +##final_df.to_csv('dataset3.csv', index=False) + +odds_shark = pd.read_csv('dataset3.csv') + +##odds_shark.drop('Arena', axis=1, inplace=True) +odds_shark= odds_shark.drop_duplicates() +games_df = odds_shark + +# Function to convert moneyline to implied probability +def moneyline_to_proba(moneyline): + if moneyline < 0: + return -moneyline / (-moneyline + 100) + else: + return 100 / (moneyline + 100) + +# Convert the odds columns to probability +cols_to_convert = ['Home MoneyLine', 'Home Spread Price', 'Away MoneyLine', 'Away Spread Price', 'Under Price', 'Over Price'] + +for col in cols_to_convert: + odds_shark[col] = odds_shark [col].apply(moneyline_to_proba) + +odds_shark['vegas_cut'] = 1 - (odds_shark['Home MoneyLine'] + odds_shark['Away MoneyLine']) + +gar_df.to_csv('test1.csv', index=False) + +agg_stats_by_team_and_year = gar_df.groupby(['team_ID', 'year_ID']).agg({ + 'OPS': 'mean', + 'DPS': 'mean', + 'GPS': 'mean', + 'PS': 'mean', + 'adj_OGAR': 'mean', + 'adj_DGAR': 'mean', + 'adj_GGAR': 'mean', + 'adj_GAR': 'mean' +}).reset_index() + +home_team_performance = games_with_elo.merge(agg_stats_by_team_and_year, left_on=['home_team'], right_on=['team_ID']) +away_team_performance = games_with_elo.merge(agg_stats_by_team_and_year, left_on=['away_team'], right_on=['team_ID']) + +combined_team_performance = pd.concat([home_team_performance, away_team_performance]) + +combined_team_performance = combined_team_performance.drop_duplicates() +odds_shark['game_date'] = pd.to_datetime(odds_shark['Date']).dt.date + +combined_team_performance = combined_team_performance.merge(odds_shark, + left_on=['game_date', 'home_team', 'away_team'], + right_on=['game_date', 'Home Name', 'Away Name']) + + + +combined_team_performance['is_home_team'] = (combined_team_performance['home_team'] == combined_team_performance['team_ID']).astype(int) + +combined_team_performance = combined_team_performance.sort_values(by='game_date') + +### Identify duplicates for checking +duplicates = combined_team_performance[combined_team_performance.duplicated(subset=['game_date', 'home_team', 'away_team'], keep=False)] +## +# Resolve duplicates (e.g., by keeping the first occurrence) +combined_team_performance = combined_team_performance.drop_duplicates(subset=['game_date', 'home_team', 'away_team'], keep='first') + + +combined_team_performance.to_csv('test.csv', index=False) + +feature_cols = [ + 'OPS', 'DPS', 'GPS', 'PS', 'adj_OGAR', + 'adj_DGAR', 'adj_GGAR', 'adj_GAR', 'Home MoneyLine', + 'Away MoneyLine','Home Spread Price', 'Away Spread Price','Homes Spread', 'Away Spread','Home Votes', 'Away Votes','home_team_elo', 'away_team_elo', 'is_home_team', 'vegas_cut' +] +target_col = 'won_game' + +# Splitting Data first +split_idx = int(0.9 * combined_team_performance.shape[0]) +train_data = combined_team_performance.iloc[:split_idx] +test_data = combined_team_performance.iloc[split_idx:] + +# Perform imputation on train_data +imputer = SimpleImputer() +X_train = train_data[feature_cols] +y_train = train_data[target_col] +X_train_imputed = imputer.fit_transform(X_train) + +# Apply the same imputation transformation to test_data +X_test = test_data[feature_cols] +y_test = test_data[target_col] +X_test_imputed = imputer.transform(X_test) + +# Model Training +model = xgb.XGBClassifier(use_label_encoder=False, eval_metric='logloss', n_estimators = 100) +model.fit(X_train_imputed, y_train)" +6sUc2WWQ,invComp,Lag_____,Lua,Tuesday 17th of October 2023 11:12:12 AM CDT,"rednet.open('right') +bridge = peripheral.wrap('left') +inventory = peripheral.wrap('back') + +while true do + +id1,signal = rednet.receive() +if signal == 'sendStripper' then + id2,signal = rednet.receive('possible') + if signal then + + + a = {0,0,0} + a[1] = bridge.getItem({name = 'computercraft:turtle_normal'}) + a[2] = bridge.getItem({name = 'minecraft:diamond_pickaxe'}) + a[3] = bridge.getItem({name = 'advancedperipherals:chunk_controller'}) + + possible = true + for i = 1,3 do + if a[i]['amount'] == 1 then + b = bridge.craftItem({name = a[i]['name'],count=1}) + if b == false then + possible = false + end + end + end + if possible == false then + rednet.send(id1,'impossible') + else + + bridge.exportItem({name = 'computercraft:turtle_normal',count=1},'back') + bridge.exportItem({name = 'minecraft:diamond_pickaxe',count=1},'back') + bridge.exportItem({name = 'advancedperipherals:chunk_controller',count=1},'back') + rednet.send(id1,'done') + rednet.send(99,'ready','crafting') + end + else + + rednet.send(id1,'impossible') + end +end + + + + +end" +dwybnbC8,GEOLUTE-UPDATE,micmaree,GetText,Tuesday 17th of October 2023 10:45:36 AM CDT,https://repo.xtream-romania.eu/ +fCPdVz0n,ShoppingCasrtItem.java,macca0612,Java,Tuesday 17th of October 2023 10:43:36 AM CDT,"package cart; + +import entity.Product; + +public class ShoppingCartItem { + private Product product; + private int quantity; + + public ShoppingCartItem(Product product) { + this.product = product; + this.quantity = 1; + } + + public Product getProduct() { + return product; + } + + public int getQuantity() { + return quantity; + } + + public void setQuantity(int quantity) { + this.quantity = quantity; + } + + public double getTotal() { + return product.getPrice() * quantity; + } +} +" +8ZVXPa62,ShoppingCart.java,macca0612,Java,Tuesday 17th of October 2023 10:43:05 AM CDT,"package cart; + +import entity.Product; +import java.util.*; +import java.util.ArrayList; +import java.util.List; + +public class ShoppingCart { + private final List cartItems; + + public ShoppingCart() { + cartItems = new ArrayList(); + } + + public synchronized void addItem(Product product) { + // Cerca se l'elemento è già presente nel carrello + for (ShoppingCartItem item : cartItems) { + if (item.getProduct().equals(product)) { + // Se l'elemento è già presente, incrementa la quantità + item.setQuantity(item.getQuantity() + 1); + return; + } + } + + // Se l'elemento non è nel carrello, aggiungilo come nuovo elemento + ShoppingCartItem newItem = new ShoppingCartItem(product); + cartItems.add(newItem); + } + + public synchronized void update(Product product, int quantity) { + for (ShoppingCartItem item : cartItems) { + if (item.getProduct().equals(product)) { + if (quantity!= 0 && quantity > 0){ + item.setQuantity(quantity); + } + else{ + cartItems.remove(item); + } + + return; + } + } + } + + public synchronized List getItems() { + return cartItems; + } + + public synchronized int getNumberOfItems() { + int totalItems = 0; + for (ShoppingCartItem item : cartItems) { + totalItems += item.getQuantity(); + } + return totalItems; + } + + public synchronized double getTotal() { + double total = 0; + for (ShoppingCartItem item : cartItems) { + total += item.getTotal(); + } + return total; + } + + public synchronized void clear() { + cartItems.clear(); + } +} +" +MRSh5uFt,Untitled,kirkarr,Lua,Tuesday 17th of October 2023 10:29:29 AM CDT,"term.clear() +while true do + local x,y,z = gps.locate() + if x ~= nil then + term.setCursorPos(1,1) + term.write(""Pocket GPS"") + term.setCursorPos(1,2) + term.write(x.."",""..y.."",""..z) + end + sleep(0.01) +end" +Vtpys1BW,Search For A Number,Pijomir,JavaScript,Tuesday 17th of October 2023 10:23:17 AM CDT,"function searchForANumber(arr, commands) { + let [elsToTake, elsToDelete, numToSearchFor] = commands; + let newArr = arr.slice(0, elsToTake); + newArr.splice(0, elsToDelete); + let filteredArr = newArr.filter(a => a === numToSearchFor); + console.log(`Number ${numToSearchFor} occurs ${filteredArr.length} times.`); +}" +69m8K3gd,Email checker,swte,PHP,Tuesday 17th of October 2023 09:46:18 AM CDT,"\r\n""); + $response = fread($socket, 1024); + if (!preg_match('/^250/', $response)) return false; + + // RCPT TO request + fwrite($socket, ""RCPT TO: <$email>\r\n""); + $response = fread($socket, 1024); + if (!preg_match('/^250/', $response)) return false; + + // QUIT request + fwrite($socket, ""QUIT\r\n""); + fclose($socket); + + return true; +} + +// Verify email on order creation and update post meta +add_action('woocommerce_new_order', 'verify_email_on_order_created'); + +function verify_email_on_order_created($order_id) { + $order = wc_get_order($order_id); + $email = $order->get_billing_email(); + $email_exists = check_email_existence($email); + + if (!$email_exists) { + update_post_meta($order_id, '_billing_email_invalid', 'yes'); + } else { + update_post_meta($order_id, '_billing_email_valid', 'yes'); + } +} + +// Add meta box to display email verification status in the admin order edit page +add_action('add_meta_boxes', 'add_email_checker_meta_box'); + +function add_email_checker_meta_box() { + add_meta_box('email-checker-meta-box', 'Email Verification', 'email_checker_meta_box_content', 'shop_order', 'side', 'high'); +} + +function email_checker_meta_box_content($post) { + $email_valid = get_post_meta($post->ID, '_billing_email_valid', true); + $email_invalid = get_post_meta($post->ID, '_billing_email_invalid', true); + + if ($email_valid) { + echo ""Email is valid.""; + } elseif ($email_invalid) { + echo ""Email is invalid.""; + } else { + echo ""Email hasn't been checked yet.""; + } +} +" +t3REZpRH,"cmd args, environment variables, getting pid and ppid, simple fork",Sephinroth,C,Tuesday 17th of October 2023 09:29:48 AM CDT,"#include +#include +#include + +int main(int argc, char **argv) +{ + printf(""argc = %d\n\n"", argc); + for (int i = 0; i < argc; i++) + printf(""argv[%d]: %s\n"", i, argv[i]); + return 0; +} + +#include + +int main(int argc, char **argv, char **env){ + while (*env != 0) + printf(""%s\n"", *env++); + return 0; +} + +#include +#include +#define NAME ""PATH"" + +int main(){ + char *s; + s = getenv(NAME); + (s == 0) ? printf(""Variable not defined!\n"") : printf(""%s = %s\n"", NAME, s); + return 0; +} + + +#include + +extern char **environ; + +int main(){ + for (int i = 0; environ[i] != 0; i++) + printf(""%s\n"", environ[i]); + return 0; +} + +#include +#include +#include + +int main(){ + pid_t pid, ppid; + pid = getpid(); + ppid = getppid(); + printf(""PID = %d, PPID = %d\n"", pid, ppid); + return 0; +} + +#include +#include +#include + +int main(){ + pid_t pid; + printf(""Parent\n""); + pid = fork(); + if (pid == 0) + printf(""Hello, child %d\n"", getpid()); + else + printf(""Hello, parent %d\n"", getpid()); + return 0; +} +" +jg2A8A10,DFT107,claudiusmarius,C++,Tuesday 17th of October 2023 09:20:53 AM CDT,"#include + + #define CLK1 D5 + #define DIO1 D4 + + TM1637Display display1(CLK1, DIO1); + + int MonInsensite = 0; + int LastMonInsensite = 0; + int PotentiometerFine = 0; + const int numReadings = 10; // Nombre d'échantillons pour la moyenne mobile + int readings[numReadings]; // Tableau pour stocker les échantillons + int readIndex = 0; // Index de lecture dans le tableau + int total = 0; // Somme des échantillons + + unsigned long lastUpdateTime = 0; + unsigned long updateInterval = 800; // Mettre ici la durée souhaitée en millisecondes + + void setup() + { + analogReadResolution(10); + display1.setBrightness(0x0A); // Luminosité maximale + analogWriteResolution(10); // Résolution du DAC (10 bits) + } + + void loop() + { + MonInsensite = analogRead(A6); // Potentiomètre principal + PotentiometerFine = analogRead(A7); // Potentiomètre ""fin"" + + // Limiter la plage du potentiomètre ""fin"" entre 0 et 1023 + PotentiometerFine = constrain(PotentiometerFine, 0, 1023); + + // Ajuster la plage de la valeur lue du potentiomètre ""fin"" à -100 à +100 + //PotentiometerFine = map(PotentiometerFine, 0, 1023, -100, 100); + PotentiometerFine = map(PotentiometerFine, 0, 1023, -30, 30); + + // Ajouter la valeur du potentiomètre ""fin"" à la valeur principale + int adjustedValue = MonInsensite + PotentiometerFine; + + // Assurer que la valeur affichée reste dans la plage 0-1000 + int displayValue = constrain(adjustedValue, 0, 1000); + + // Mettre à jour le tableau des échantillons + total = total - readings[readIndex]; + readings[readIndex] = displayValue; + total = total + readings[readIndex]; + readIndex = (readIndex + 1) % numReadings; + + // Calculer la moyenne mobile + int averageValue = total / numReadings; + + // Limiter la plage de averageValue entre 0 et 1023 + averageValue = constrain(averageValue, 0, 1023); + + unsigned long currentTime = millis(); + + // Mettre à jour l'affichage uniquement si la valeur change significativement + if (abs(averageValue - LastMonInsensite) > 2) + { + display1.showNumberDec(displayValue, false, 4, 0); // Afficher la valeur ajustée + LastMonInsensite = averageValue; + lastUpdateTime = currentTime; + } + + // Mettre à jour le DAC pour générer une tension proportionnelle + // en fonction de la valeur de MonInsensite (0-1023) + //analogWrite(A0, map(displayValue, 0, 1000, 0, 1023)); // Mettre à jour la sortie DAC + analogWrite(A0, map(displayValue, 0, 1000, 0, 975)); // Mettre à jour la sortie DAC et ajustement pour tenir compte des incerrtitudes et tolérances + }" +cUSPrRz4,parse.rs,dennoh,Rust,Tuesday 17th of October 2023 09:18:46 AM CDT,"use std::sync::Arc; + +use ethers::{ + abi::AbiDecode, + prelude::abigen, + providers::Middleware, + types::{Address, Transaction, U256}, +}; + +use crate::types::{PoolState, TargetTransaction}; + +abigen!( + IUniswapV2, + ""abi/IUniswapV2.router.abi""; + IUniswapV3, + ""abi/IUniswapV3.router.abi""; + +); + +#[cfg(test)] +mod tests { + use crate::parser::get_amount_out; + + #[test] + fn test_get_amount_out() { + let amount_in = f64::from(100); + + let reserve_in = f64::from(1000); + let reserve_out = f64::from(10000); + let pool = get_amount_out(amount_in, reserve_in, reserve_out, None); + + assert_eq!(pool.amount_out, 907.024323709934); + assert_eq!(pool.reserve_in, 1100.0); + assert_eq!(pool.reserve_out, 9092.975676290066); + } +} + +/** + * Uniswap V2; x * y = k formula + * How much amout out do we get if we swap `amount_in`? + */ +pub fn get_amount_out( + amount_in: f64, + reserve_in: f64, + reserve_out: f64, + fee: Option, +) -> PoolState { + let fee = fee.unwrap_or(9975.0); + let amount_in_with_fee = amount_in * fee; + let numerator = amount_in_with_fee * reserve_out; + let denominator = reserve_in * 10000.0 + amount_in_with_fee; + + let amount_out = numerator / denominator; + + PoolState { + amount_out, + reserve_in: reserve_in + amount_in, // new_reserve_in, + reserve_out: reserve_out - amount_out, // new_reserve_out, + } +} + +pub async fn get_amounts_out( + client: Arc, + amount_in: U256, + router: Address, + path: Vec
, +) -> anyhow::Result { + let router = IUniswapV2::new(router, client.clone()); + + let amounts = router.get_amounts_out(amount_in, path).call().await?; + + Ok(amounts[amounts.len() - 1]) +} + +pub fn parse_transaction(transaction: Transaction) -> anyhow::Result { + // match function selector + match transaction.input.get(..4) { + // Uniswap V2 + Some([127, 243, 106, 181]) => { + let input = SwapExactETHForTokensCall::decode(transaction.input)?; + + Ok(TargetTransaction { + hash: transaction.hash, + path: input.path, + amount_in: transaction.value, + amount_out_min: input.amount_out_min, + deadline: input.deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.to, + fee: None, + }) + } + Some([182, 249, 222, 149]) => { + let input = + SwapExactETHForTokensSupportingFeeOnTransferTokensCall::decode(transaction.input)?; + + Ok(TargetTransaction { + hash: transaction.hash, + path: input.path, + amount_in: transaction.value, + amount_out_min: input.amount_out_min, + deadline: input.deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.to, + fee: None, + }) + } + Some([56, 237, 23, 57]) => { + let input = SwapExactTokensForTokensCall::decode(transaction.input)?; + Ok(TargetTransaction { + hash: transaction.hash, + path: input.path, + amount_in: input.amount_in, + amount_out_min: input.amount_out_min, + deadline: input.deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.to, + fee: None, + }) + } + Some([92, 17, 215, 149]) => { + let input = SwapExactTokensForTokensSupportingFeeOnTransferTokensCall::decode( + transaction.input, + )?; + Ok(TargetTransaction { + hash: transaction.hash, + path: input.path, + amount_in: input.amount_in, + amount_out_min: input.amount_out_min, + deadline: input.deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.to, + fee: None, + }) + } + Some([251, 59, 219, 65]) => { + let input = SwapETHForExactTokensCall::decode(transaction.input)?; + Ok(TargetTransaction { + hash: transaction.hash, + path: input.path, + amount_in: transaction.value, + amount_out_min: input.amount_out, + deadline: input.deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.to, + fee: None, + }) + } + Some([156, 246, 137, 17]) => { + let input = SwapExactBNBForTokensCall::decode(transaction.input)?; + Ok(TargetTransaction { + hash: transaction.hash, + path: input.path, + amount_in: transaction.value, + amount_out_min: input.amount_out_min, + deadline: input.deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.to, + fee: None, + }) + } + Some([80, 226, 125, 243]) => { + let input = + SwapExactBNBForTokensSupportingFeeOnTransferTokensCall::decode(transaction.input)?; + Ok(TargetTransaction { + hash: transaction.hash, + path: input.path, + amount_in: transaction.value, + amount_out_min: input.amount_out_min, + deadline: input.deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.to, + fee: None, + }) + } + Some([131, 50, 169, 99]) => { + let input = SwapBNBForExactTokensCall::decode(transaction.input)?; + Ok(TargetTransaction { + hash: transaction.hash, + path: input.path, + amount_in: transaction.value, + amount_out_min: input.amount_out, + deadline: input.deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.to, + fee: None, + }) + } + Some([82, 124, 168, 142]) => { + let input = SwapExactMATICForTokensCall::decode(transaction.input)?; + + Ok(TargetTransaction { + hash: transaction.hash, + path: create_path(input.routes), + amount_in: transaction.value, + amount_out_min: input.amount_out_min, + deadline: input.deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.to, + fee: None, + }) + } + Some([162, 92, 159, 127]) => { + let input = SwapExactMATICForTokensSupportingFeeOnTransferTokensCall::decode( + transaction.input, + )?; + + Ok(TargetTransaction { + hash: transaction.hash, + path: create_path(input.routes), + amount_in: transaction.value, + amount_out_min: input.amount_out_min, + deadline: input.deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.to, + fee: None, + }) + } + Some([152, 231, 77, 198]) => { + let input = UnsafeSwapExactTokensForTokensCall::decode(transaction.input)?; + + Ok(TargetTransaction { + hash: transaction.hash, + path: create_path(input.routes), + amount_in: input.amounts[0], + amount_out_min: input.amounts[input.amounts.len() - 1], + deadline: input.deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.to, + fee: None, + }) + } + + // Uniswap V3 + Some([90, 228, 1, 220]) => { + let input = MulticallCall::decode(transaction.input)?; + let deadline = input.deadline; + let input = &input.data[0]; + match input.get(..4) { + Some([184, 88, 24, 63]) => { + let input = ExactInputCall::decode(input)?.params; + + println!(""ExactInputCall: {:?}"", input); + Ok(TargetTransaction { + hash: transaction.hash, + path: vec![], + amount_in: input.amount_in, + amount_out_min: input.amount_out_minimum, + deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.recipient, + fee: None, + }) + } + Some([4, 228, 90, 175]) => { + let input = ExactInputSingleCall::decode(input)?.params; + println!(""ExactInputSingleCall: {:?}"", input); + + Ok(TargetTransaction { + hash: transaction.hash, + path: vec![input.token_in, input.token_out], + amount_in: input.amount_in, + amount_out_min: input.amount_out_minimum, + deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.recipient, + fee: Some(input.fee), + }) + } + Some([9, 184, 19, 70]) => { + let input = ExactOutputCall::decode(input)?.params; + + println!(""{:?}"", input); + + Ok(TargetTransaction { + hash: transaction.hash, + path: vec![], + amount_in: input.amount_in_maximum, + amount_out_min: input.amount_out, + deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.recipient, + fee: None, + }) + } + Some([80, 35, 180, 223]) => { + let input = ExactOutputSingleCall::decode(input)?.params; + + println!(""{:?}"", input); + + Ok(TargetTransaction { + hash: transaction.hash, + path: vec![input.token_in, input.token_out], + amount_in: input.amount_in_maximum, + amount_out_min: input.amount_out, + deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.recipient, + fee: Some(input.fee), + }) + } + Some([71, 43, 67, 243]) => { + let input = SwapExactTokensForTokensCall::decode(input)?; + + println!(""{:?}"", input); + + Ok(TargetTransaction { + hash: transaction.hash, + path: vec![], + amount_in: input.amount_in, + amount_out_min: input.amount_out_min, + deadline, + router: transaction.to, + nonce: transaction.nonce, + gas_price: transaction.gas_price, + gas_limit: transaction.gas, + maker: input.to, + fee: None, + }) + } + // Some([66, 113, 42, 103]) => { + // println!(""{:?}"", input); + // let input = SwapTokensForExactTokensCall::decode(input)?; + + // Ok(TargetTransaction { + // hash: transaction.hash, + // path: vec![input.token_in, input.token_out], + // amount_in: input.amount_in, + // amount_out_min: input.amount_out_minimum, + // deadline, + // router: transaction.to, + // nonce: transaction.nonce, + // gas_price: transaction.gas_price, + // gas_limit: transaction.gas, + // maker: input.recipient, + // fee: Some(input.fee), + // }) + // } + _ => Err(anyhow::anyhow!({ + // ""Unknown selector {:?}"", + let input = input.to_string(); + if input.len() > 10 { + input[..10].to_string() + } else { + input + } + })), + } + } + + // TODO: Aggregators + + // TODO: MetaMask + // Some([95, 87, 85, 41]) => { + // let input = crate::parser::IMetaMaskCalls::decode(transaction.input)?; + + // Ok(TargetTransaction { + // hash: transaction.hash, + // path: input.path, + // amount_in: input.amount_in, + // amount_out_min: input.amount_out_min, + // deadline: input.deadline, + // router: transaction.to, + // nonce: transaction.nonce, + // gas_price: transaction.gas_price, + // gas_limit: transaction.gas, + // maker: input.to, + // fee: None, + // }) + // } + + // Some([107, 104, 118, 76]) => { + + // } + _ => Err(anyhow::anyhow!({ + // ""Unknown selector {:?}"", + let input = transaction.input.to_string(); + if input.len() > 10 { + input[..10].to_string() + } else { + input + } + })), + } +} + +/// Create a path from routes +fn create_path(routes: Vec) -> Vec
{ + let mut path: Vec
= vec![]; + + routes.iter().for_each(|r| { + path.push(r.from); + path.push(r.to); + }); + + path +} +" +0SMkhj9D,Untitled,Skos_Martren,C++,Tuesday 17th of October 2023 09:16:29 AM CDT,"#include +#include + +using namespace std; + +class Solution { + +private: + + struct PairHash { + size_t operator()(const pair p) const { // передавать pair по ссылке или нет? + + return (size_t)(h_i_1(p.first) * 37 * 37 + h_i_1(p.second) * 37 + 117); + } + hash h_i_1; + hash h_i_2; + }; + + + // тип cnt <-- ""-108 <= points[i][j] <= 10^8"" + // ""const"" будет ошибкой, так как можем обратится к несущест-у элементу в ""PointToExist[{cnt - point[0], point[1]}]"" + bool CheckCoordinate(const vector>& points, /*const*/ unordered_map, bool, PairHash>& PointToExist, const int cnt/* = x_min + x_max*/) { + for (/*const*/ auto point : points) { // ""const"" будет ошибкой, так как можем обратится к несущест-у элементу в ""PointToExist[{cnt - point[0], point[1]}]"" + + if (!PointToExist[{cnt - point[0], point[1]}]) { return false; } + } + return true; + } + + /* + Если расположить PairHash ниже CheckCoordinate, то в MSVS будет ошибка: Error (active) E0308 more than one instance of overloaded function ""CheckCoordinate"" matches the argument list: + */ + +public: + + bool isReflected(const vector>& points) { + if (points.empty()) { return true; } // проверка пустого points -- такой тест есть в тестирующей системе + int x_min = points.front().front(); + int x_max = points.back().front(); + unordered_map, bool, PairHash> PointToExist; // необходимо для реализации CheckCoordinate + + for (const auto& point : points) { + + const int x = point[0]; + const int y = point[1]; + x_min = min(x_min, x); + x_max = max(x_max, x); + if (!PointToExist[{x, y}]) { PointToExist[{x, y}] = true; } + + } // отрезок, проходящий через (x_min, y*) и (x_max, y*) будет иметь максимальную длину. Примечательно, что не получатся рассуждения через поиск концов отрезка минимальной длины! + + if(PointToExist.size() % 2 == 1){return false;} // check it! + return CheckCoordinate(points, PointToExist, x_min + x_max); + } + +}; + +int main() { + + cout << Solution().isReflected({ {1,1},{-1,1} }) << '\n'; + cout << Solution().isReflected({ {1,1},{-1,-1} }) << '\n'; + +}" +QDv0Kreb,first,uhq9e,Lua,Tuesday 17th of October 2023 09:15:02 AM CDT,"function Foo() + turtle.down(); + for i = 1, 3, 1 do + local ok, _ = turtle.dig(); + turtle.forward(); + turtle.turnLeft(); + end +end + +while true do + local ok, _ = turtle.digDown(); + if ok then + Foo(); + else + local exists, info = turtle.inspectDown(); + if exists then + if info.name == ""minecraft:water"" then + Foo(); + end + end + break; + end +end" +CZG1avCY,js3,Mojeuwu,JavaScript,Tuesday 17th of October 2023 09:13:12 AM CDT," +// 1 +function calcAreaRectangulo(){ + let a = parseFloat(prompt(""Ingrese base en metros: "")); + let b = parseFloat(prompt(""Ingrese altura en metros: "")); + console.log(""El area es: "" + (a*b) + ""m2""); +} + +// 2 +function esPrimo(){ + let a; + while(true){ + a = parseFloat(prompt(""Ingrese numero: "")); + if(a%2==0){ + console.log(""Es Primo""); + break; + }else{ + console.log(""No es Primo""); + break; + } + } +} + +// 3 +function encontrarM(){ + let a = parseFloat(prompt(""Ingrese numero 1: "")); + let b = parseFloat(prompt(""Ingrese numero 2: "")); + + if(a0 && a<=10){ + switch(a){ + case 1: + calcAreaRectangulo(); + break; + case 2: + esPrimo(); + break; + case 3: + encontrarM(); + break; + case 4: + Prom(); + break; + case 5: + calcAreaCuadrado(); + break; + case 6: + Random(); + break; + case 7: + esBiciesto(); + break; + case 8: + calcularPerimetroCuadrado(); + break; + case 9: + calcularCirc(); + break; + case 10: + exit = false; + break; + } + }else{ + console.log(""Numero invalido.""); + } +}" +2wYz89aG,offer,Korzunov,HTML,Tuesday 17th of October 2023 09:08:48 AM CDT," + + + + + + + + + + + + + + + + + + + + +
Назва курсу теорії ПДРЦіна, грн
+ + Стандарт + + 6 500 грн.
+ + Преміум-лайт + Онлайн + + 7 000 грн.
+ + Преміум-формат + Онлайн + + 7 500 грн.
" +SJwYCqFd,News Oct17 23,Newscaster_Ned,Email,Tuesday 17th of October 2023 08:59:49 AM CDT,".‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎T‎e‎s‎t‎ ‎1‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎ +.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎T‎e‎s‎t‎ ‎2‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎ +.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎T‎e‎s‎t‎ ‎3‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎ +.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎ ‎T‎e‎s‎t‎ ‎c‎o‎m‎p‎l‎e‎t‎e‎.‎ + +H‎e‎r‎e‎'‎s‎ ‎t‎h‎e‎ ‎n‎e‎w‎s‎.‎ + +U‎.‎N‎.‎ ‎S‎e‎c‎u‎r‎i‎t‎y‎ ‎C‎o‎u‎n‎c‎i‎l‎ ‎P‎a‎r‎a‎l‎y‎z‎e‎d‎ ‎b‎y‎ ‎R‎u‎s‎s‎i‎a‎n‎,‎ ‎C‎h‎i‎n‎e‎s‎e‎ ‎E‎f‎f‎o‎r‎t‎s‎ ‎t‎o‎ ‎D‎e‎f‎e‎n‎d‎ ‎H‎a‎m‎a‎s‎ +P‎a‎l‎a‎c‎e‎ ‎o‎f‎ ‎V‎e‎r‎s‎a‎i‎l‎l‎e‎s‎ ‎E‎v‎a‎c‎u‎a‎t‎e‎d‎ ‎A‎g‎a‎i‎n‎ ‎A‎f‎t‎e‎r‎ ‎A‎n‎o‎t‎h‎e‎r‎ ‎B‎o‎m‎b‎ ‎T‎h‎r‎e‎a‎t‎ +R‎e‎t‎a‎i‎l‎ ‎S‎a‎l‎e‎s‎ ‎E‎x‎p‎l‎o‎d‎e‎ ‎H‎i‎g‎h‎e‎r‎,‎ ‎R‎a‎i‎s‎i‎n‎g‎ ‎I‎n‎f‎l‎a‎t‎i‎o‎n‎ ‎R‎i‎s‎k‎s‎ +A‎l‎l‎e‎g‎e‎d‎ ‎F‎r‎a‎n‎c‎e‎ ‎S‎c‎h‎o‎o‎l‎ ‎A‎t‎t‎a‎c‎k‎e‎r‎ ‎P‎l‎e‎d‎g‎e‎d‎ ‎A‎l‎l‎e‎g‎i‎a‎n‎c‎e‎ ‎t‎o‎ ‎I‎S‎I‎S‎ +H‎u‎n‎d‎r‎e‎d‎s‎ ‎P‎r‎o‎t‎e‎s‎t‎ ‎O‎u‎t‎s‎i‎d‎e‎ ‎B‎B‎C‎ ‎H‎Q‎ ‎o‎v‎e‎r‎ ‎R‎e‎f‎u‎s‎a‎l‎ ‎t‎o‎ ‎C‎a‎l‎l‎ ‎H‎a‎m‎a‎s‎ ‎'‎T‎e‎r‎r‎o‎r‎i‎s‎t‎s‎'‎ +I‎s‎r‎a‎e‎l‎ ‎D‎e‎l‎a‎y‎ ‎i‎n‎ ‎G‎r‎o‎u‎n‎d‎ ‎I‎n‎v‎a‎s‎i‎o‎n‎ ‎o‎f‎ ‎G‎a‎z‎a‎ ‎P‎r‎o‎m‎p‎t‎s‎ ‎S‎p‎e‎c‎u‎l‎a‎t‎i‎o‎n‎ +G‎e‎t‎ ‎A‎l‎l‎ ‎B‎r‎e‎i‎t‎b‎a‎r‎t‎ ‎N‎e‎w‎s‎ ‎H‎e‎r‎e‎ +C‎l‎a‎i‎m‎:‎ ‎2‎,‎0‎0‎0‎ ‎U‎.‎S‎.‎ ‎T‎r‎o‎o‎p‎s‎ ‎G‎i‎v‎e‎n‎ ‎‘‎P‎r‎e‎p‎a‎r‎e‎-‎t‎o‎-‎D‎e‎p‎l‎o‎y‎’‎ ‎O‎r‎d‎e‎r‎s‎ ‎t‎o‎ ‎S‎u‎p‎p‎o‎r‎t‎ ‎I‎s‎r‎a‎e‎l‎ ‎i‎n‎ ‎W‎a‎r‎ ‎w‎i‎t‎h‎ ‎H‎a‎m‎a‎s‎ + +P‎e‎n‎t‎a‎g‎o‎n‎ ‎D‎o‎e‎s‎n‎’‎t‎ ‎D‎e‎n‎y‎ +A‎ ‎U‎S‎ ‎f‎l‎a‎g‎ +T‎h‎e‎ ‎P‎e‎n‎t‎a‎g‎o‎n‎ ‎o‎n‎ ‎M‎o‎n‎d‎a‎y‎ ‎d‎i‎d‎ ‎n‎o‎t‎ ‎d‎e‎n‎y‎ ‎a‎ ‎r‎e‎p‎o‎r‎t‎ ‎t‎h‎a‎t‎ ‎s‎a‎i‎d‎ ‎r‎o‎u‎g‎h‎l‎y‎ ‎2‎,‎0‎0‎0‎ ‎U‎.‎S‎.‎ ‎t‎r‎o‎o‎p‎s‎ ‎w‎e‎r‎e‎ ‎t‎o‎l‎d‎ ‎t‎o‎ ‎b‎e‎ ‎“‎p‎r‎e‎p‎a‎r‎e‎d‎ ‎t‎o‎ ‎d‎e‎p‎l‎o‎y‎”‎ ‎i‎f‎ ‎n‎e‎e‎d‎e‎d‎ ‎t‎o‎ ‎a‎s‎s‎i‎s‎t‎ ‎I‎s‎r‎a‎e‎l‎ ‎i‎n‎ ‎i‎t‎s‎ ‎w‎a‎r‎ ‎a‎g‎a‎i‎n‎s‎t‎ ‎H‎a‎m‎a‎s‎.‎ + +N‎e‎i‎t‎h‎e‎r‎ ‎J‎o‎r‎d‎a‎n‎ ‎n‎o‎r‎ ‎E‎g‎y‎p‎t‎ ‎W‎i‎l‎l‎ ‎A‎c‎c‎e‎p‎t‎ ‎R‎e‎f‎u‎g‎e‎e‎s‎ ‎F‎l‎e‎e‎i‎n‎g‎ ‎G‎a‎z‎a‎ +N‎e‎i‎t‎h‎e‎r‎ ‎J‎o‎r‎d‎a‎n‎ ‎n‎o‎r‎ ‎E‎g‎y‎p‎t‎ ‎W‎i‎l‎l‎ ‎A‎c‎c‎e‎p‎t‎ ‎R‎e‎f‎u‎g‎e‎e‎s‎ ‎F‎l‎e‎e‎i‎n‎g‎ ‎G‎a‎z‎a‎ +3‎0‎2‎ +J‎u‎d‎g‎e‎ ‎G‎a‎g‎s‎ ‎D‎o‎n‎a‎l‎d‎ ‎T‎r‎u‎m‎p‎ ‎i‎n‎ ‎J‎a‎n‎u‎a‎r‎y‎ ‎6‎ ‎C‎a‎s‎e‎ ‎f‎r‎o‎m‎ ‎'‎P‎u‎b‎l‎i‎c‎l‎y‎ ‎T‎a‎r‎g‎e‎t‎i‎n‎g‎'‎ +J‎u‎d‎g‎e‎ ‎G‎a‎g‎s‎ ‎D‎o‎n‎a‎l‎d‎ ‎T‎r‎u‎m‎p‎ ‎i‎n‎ ‎J‎a‎n‎u‎a‎r‎y‎ ‎6‎ ‎C‎a‎s‎e‎ ‎f‎r‎o‎m‎ ‎'‎P‎u‎b‎l‎i‎c‎l‎y‎ ‎T‎a‎r‎g‎e‎t‎i‎n‎g‎'‎ +1‎0‎,‎8‎0‎7‎ + +G‎r‎a‎s‎s‎r‎o‎o‎t‎s‎ ‎E‎n‎e‎r‎g‎i‎z‎e‎ ‎f‎o‎r‎ ‎G‎O‎P‎ ‎U‎n‎i‎t‎y‎ ‎B‎e‎h‎i‎n‎d‎ ‎J‎i‎m‎ ‎J‎o‎r‎d‎a‎n‎ ‎S‎p‎e‎a‎k‎e‎r‎s‎h‎i‎p‎ ‎B‎i‎d‎ +4‎,‎5‎3‎0‎ +J‎a‎m‎e‎s‎ ‎C‎o‎m‎e‎r‎:‎ ‎J‎o‎e‎ ‎B‎i‎d‎e‎n‎ ‎P‎o‎t‎e‎n‎t‎i‎a‎l‎l‎y‎ ‎R‎e‎t‎a‎i‎n‎e‎d‎ ‎S‎e‎n‎s‎i‎t‎i‎v‎e‎ ‎D‎o‎c‎s‎ +J‎a‎m‎e‎s‎ ‎C‎o‎m‎e‎r‎:‎ ‎J‎o‎e‎ ‎B‎i‎d‎e‎n‎ ‎P‎o‎t‎e‎n‎t‎i‎a‎l‎l‎y‎ ‎R‎e‎t‎a‎i‎n‎e‎d‎ ‎S‎e‎n‎s‎i‎t‎i‎v‎e‎ ‎D‎o‎c‎s‎ +3‎,‎4‎4‎0‎ +R‎e‎p‎o‎r‎t‎:‎ ‎H‎H‎S‎ ‎I‎m‎p‎o‎s‎e‎s‎ ‎G‎e‎n‎d‎e‎r‎ ‎I‎d‎e‎n‎t‎i‎t‎y‎ ‎P‎r‎o‎n‎o‎u‎n‎ ‎M‎a‎n‎d‎a‎t‎e‎ ‎o‎n‎ ‎E‎m‎p‎l‎o‎y‎e‎e‎s‎ +R‎e‎p‎o‎r‎t‎:‎ ‎H‎H‎S‎ ‎I‎m‎p‎o‎s‎e‎s‎ ‎G‎e‎n‎d‎e‎r‎ ‎I‎d‎e‎n‎t‎i‎t‎y‎ ‎P‎r‎o‎n‎o‎u‎n‎ ‎M‎a‎n‎d‎a‎t‎e‎ ‎o‎n‎ ‎E‎m‎p‎l‎o‎y‎e‎e‎s‎ +7‎6‎6‎ +R‎e‎p‎o‎r‎t‎s‎:‎ ‎H‎a‎m‎a‎s‎ ‎K‎i‎l‎l‎s‎ ‎F‎l‎e‎e‎i‎n‎g‎ ‎P‎a‎l‎e‎s‎t‎i‎n‎i‎a‎n‎ ‎C‎i‎v‎i‎l‎i‎a‎n‎s‎;‎ ‎W‎o‎n‎'‎t‎ ‎L‎e‎t‎ ‎A‎m‎e‎r‎i‎c‎a‎n‎s‎ ‎O‎u‎t‎ +R‎e‎p‎o‎r‎t‎s‎:‎ ‎H‎a‎m‎a‎s‎ ‎K‎i‎l‎l‎s‎ ‎F‎l‎e‎e‎i‎n‎g‎ ‎P‎a‎l‎e‎s‎t‎i‎n‎i‎a‎n‎ ‎C‎i‎v‎i‎l‎i‎a‎n‎s‎;‎ ‎W‎o‎n‎'‎t‎ ‎L‎e‎t‎ ‎A‎m‎e‎r‎i‎c‎a‎n‎s‎ ‎O‎u‎t‎ +3‎,‎4‎7‎2‎ +'‎T‎h‎e‎ ‎P‎r‎i‎n‎c‎e‎s‎s‎ ‎B‎r‎i‎d‎e‎'‎ ‎S‎t‎a‎r‎ ‎W‎a‎l‎l‎a‎c‎e‎ ‎S‎h‎a‎w‎n‎ ‎P‎r‎o‎t‎e‎s‎t‎s‎ ‎I‎s‎r‎a‎e‎l‎i‎ ‎R‎e‎s‎p‎o‎n‎s‎e‎ ‎t‎o‎ ‎H‎a‎m‎a‎s‎ +'‎T‎h‎e‎ ‎P‎r‎i‎n‎c‎e‎s‎s‎ ‎B‎r‎i‎d‎e‎'‎ ‎S‎t‎a‎r‎ ‎W‎a‎l‎l‎a‎c‎e‎ ‎S‎h‎a‎w‎n‎ ‎P‎r‎o‎t‎e‎s‎t‎s‎ ‎I‎s‎r‎a‎e‎l‎i‎ ‎R‎e‎s‎p‎o‎n‎s‎e‎ ‎t‎o‎ ‎H‎a‎m‎a‎s‎ +3‎3‎8‎ +M‎o‎r‎r‎i‎s‎:‎ ‎N‎Y‎T‎ ‎N‎o‎r‎m‎i‎e‎s‎ ‎S‎u‎d‎d‎e‎n‎l‎y‎ ‎R‎e‎a‎l‎i‎z‎e‎ ‎H‎u‎n‎t‎e‎r‎ ‎I‎s‎ ‎C‎o‎o‎l‎ +M‎o‎r‎r‎i‎s‎:‎ ‎N‎Y‎T‎ ‎N‎o‎r‎m‎i‎e‎s‎ ‎S‎u‎d‎d‎e‎n‎l‎y‎ ‎R‎e‎a‎l‎i‎z‎e‎ ‎H‎u‎n‎t‎e‎r‎ ‎I‎s‎ ‎C‎o‎o‎l‎ +1‎2‎3‎ + +N‎e‎w‎ ‎B‎i‎l‎l‎ ‎P‎u‎s‎h‎e‎d‎ ‎b‎y‎ ‎S‎e‎n‎.‎ ‎D‎u‎r‎b‎i‎n‎ ‎W‎i‎l‎l‎ ‎I‎n‎c‎r‎e‎a‎s‎e‎ ‎F‎i‎n‎a‎n‎c‎i‎a‎l‎ ‎F‎r‎a‎u‎d‎ +7‎9‎ +'‎S‎i‎n‎i‎s‎t‎e‎r‎'‎:‎ ‎I‎D‎F‎ ‎B‎l‎a‎s‎t‎s‎ ‎H‎a‎m‎a‎s‎ ‎f‎o‎r‎ ‎S‎t‎o‎p‎p‎i‎n‎g‎ ‎G‎a‎z‎a‎n‎ ‎C‎i‎v‎i‎l‎i‎a‎n‎s‎ ‎f‎r‎o‎m‎ ‎E‎v‎a‎c‎u‎a‎t‎i‎n‎g‎ +'‎S‎i‎n‎i‎s‎t‎e‎r‎'‎:‎ ‎I‎D‎F‎ ‎B‎l‎a‎s‎t‎s‎ ‎H‎a‎m‎a‎s‎ ‎f‎o‎r‎ ‎S‎t‎o‎p‎p‎i‎n‎g‎ ‎G‎a‎z‎a‎n‎ ‎C‎i‎v‎i‎l‎i‎a‎n‎s‎ ‎f‎r‎o‎m‎ ‎E‎v‎a‎c‎u‎a‎t‎i‎n‎g‎ + +L‎i‎b‎e‎r‎i‎a‎n‎ ‎N‎e‎g‎r‎o‎ ‎A‎r‎r‎e‎s‎t‎e‎d‎ ‎f‎o‎r‎ ‎W‎a‎r‎ ‎C‎r‎i‎m‎e‎s‎ ‎A‎g‎a‎i‎n‎s‎t‎ ‎t‎h‎e‎ ‎U‎S‎.‎ + +I‎t‎'‎s‎ ‎a‎l‎w‎a‎y‎s‎ ‎t‎h‎o‎s‎e‎ ‎n‎e‎g‎r‎o‎e‎s‎,‎ ‎i‎s‎n‎'‎t‎ ‎i‎t‎?‎ + + +W‎o‎m‎a‎n‎ ‎H‎o‎m‎e‎l‎e‎s‎s‎ ‎A‎f‎t‎e‎r‎ ‎P‎i‎c‎k‎p‎o‎c‎k‎e‎t‎i‎n‎g‎ ‎G‎r‎o‎i‎d‎ ‎T‎a‎k‎e‎s‎ ‎A‎l‎l‎ ‎H‎e‎r‎ ‎M‎o‎n‎e‎y‎.‎ + + +N‎i‎g‎ ‎K‎i‎l‎l‎s‎ ‎H‎i‎s‎ ‎G‎i‎r‎l‎f‎r‎i‎e‎n‎d‎ ‎A‎f‎t‎e‎r‎ ‎B‎e‎i‎n‎g‎ ‎F‎r‎e‎e‎d‎ ‎f‎r‎o‎m‎ ‎R‎i‎k‎e‎r‎s‎ ‎J‎a‎i‎l‎.‎ + + +N‎e‎g‎r‎o‎ ‎F‎r‎a‎u‎d‎s‎t‎e‎r‎ ‎A‎r‎r‎e‎s‎t‎e‎d‎ ‎f‎o‎r‎ ‎S‎c‎a‎m‎m‎i‎n‎g‎ ‎W‎a‎l‎l‎ ‎S‎t‎r‎e‎e‎t‎ ‎B‎a‎n‎k‎e‎r‎s‎ ‎$‎3‎.‎5‎M‎.‎ + +.‎.‎.‎.‎.‎.‎.‎.‎.‎ ‎W‎e‎a‎t‎h‎e‎r‎.‎ + +T‎o‎d‎a‎y‎ +S‎u‎n‎n‎y‎ +7‎8‎°‎ +/‎4‎8‎°‎ +1‎%‎ +S‎S‎E‎ ‎5‎ ‎m‎p‎h‎ +T‎u‎e‎ ‎1‎7‎ ‎|‎ ‎D‎a‎y‎ +7‎8‎°‎ +1‎%‎ +S‎S‎E‎ +5‎ + ‎ +m‎p‎h‎ +S‎u‎n‎n‎y‎.‎ ‎H‎i‎g‎h‎ ‎7‎8‎F‎.‎ ‎W‎i‎n‎d‎s‎ ‎l‎i‎g‎h‎t‎ ‎a‎n‎d‎ ‎v‎a‎r‎i‎a‎b‎l‎e‎.‎ + +H‎u‎m‎i‎d‎i‎t‎y‎ +4‎1‎%‎ +U‎V‎ ‎I‎n‎d‎e‎x‎ +7‎ ‎o‎f‎ ‎1‎1‎ +S‎u‎n‎r‎i‎s‎e‎ +7‎:‎3‎3‎ ‎a‎m‎ +S‎u‎n‎s‎e‎t‎ +6‎:‎5‎7‎ ‎p‎m‎ +T‎u‎e‎ ‎1‎7‎ ‎|‎ ‎N‎i‎g‎h‎t‎ +4‎8‎°‎ +5‎%‎ +S‎ +6‎ + ‎ +m‎p‎h‎ +C‎l‎e‎a‎r‎ ‎s‎k‎i‎e‎s‎.‎ ‎L‎o‎w‎ ‎4‎8‎F‎.‎ ‎W‎i‎n‎d‎s‎ ‎S‎ ‎a‎t‎ ‎5‎ ‎t‎o‎ ‎1‎0‎ ‎m‎p‎h‎.‎ + +H‎u‎m‎i‎d‎i‎t‎y‎ +6‎2‎%‎ +U‎V‎ ‎I‎n‎d‎e‎x‎ +0‎ ‎o‎f‎ ‎1‎1‎ +M‎o‎o‎n‎r‎i‎s‎e‎ +1‎0‎:‎2‎1‎ ‎a‎m‎ +W‎a‎x‎i‎n‎g‎ ‎C‎r‎e‎s‎c‎e‎n‎t‎ +M‎o‎o‎n‎s‎e‎t‎ +8‎:‎4‎7‎ ‎p‎m‎ +W‎e‎d‎ ‎1‎8‎ +S‎u‎n‎n‎y‎ +8‎5‎°‎ +/‎5‎8‎°‎ +5‎%‎ +S‎S‎W‎ ‎1‎2‎ ‎m‎p‎h‎ +T‎h‎u‎ ‎1‎9‎ +S‎u‎n‎n‎y‎ +9‎2‎°‎ +/‎5‎8‎°‎ +1‎2‎%‎ +W‎S‎W‎ ‎9‎ ‎m‎p‎h‎ +F‎r‎i‎ ‎2‎0‎ +S‎u‎n‎n‎y‎ +9‎6‎°‎ +/‎5‎8‎°‎ +2‎%‎ +N‎W‎ ‎7‎ ‎m‎p‎h‎ +S‎a‎t‎ ‎2‎1‎ +P‎a‎r‎t‎l‎y‎ ‎C‎l‎o‎u‎d‎y‎ +9‎3‎°‎ +/‎6‎6‎°‎ +2‎%‎ +S‎S‎W‎ ‎7‎ ‎m‎p‎h‎ +S‎u‎n‎ ‎2‎2‎ +A‎M‎ ‎C‎l‎o‎u‎d‎s‎/‎P‎M‎ ‎S‎u‎n‎ +9‎1‎°‎ +/‎6‎7‎°‎ +1‎0‎%‎ +S‎ ‎1‎1‎ ‎m‎p‎h‎ +M‎o‎n‎ ‎2‎3‎ +A‎M‎ ‎S‎h‎o‎w‎e‎r‎s‎ +8‎7‎°‎ +/‎7‎1‎°‎ +3‎2‎%‎ +S‎S‎E‎ ‎1‎5‎ ‎m‎p‎h‎ +T‎u‎e‎ ‎2‎4‎ +S‎c‎a‎t‎t‎e‎r‎e‎d‎ ‎T‎h‎u‎n‎d‎e‎r‎s‎t‎o‎r‎m‎s‎ +8‎7‎°‎ +/‎7‎3‎°‎ +4‎5‎%‎ +S‎S‎E‎ ‎1‎8‎ ‎m‎p‎h‎ +W‎e‎d‎ ‎2‎5‎ +S‎c‎a‎t‎t‎e‎r‎e‎d‎ ‎T‎h‎u‎n‎d‎e‎r‎s‎t‎o‎r‎m‎s‎ +8‎6‎°‎ +/‎7‎2‎°‎ +4‎0‎%‎ +S‎S‎E‎ ‎1‎4‎ ‎m‎p‎h‎ +T‎h‎u‎ ‎2‎6‎ +A‎M‎ ‎T‎h‎u‎n‎d‎e‎r‎s‎t‎o‎r‎m‎s‎ +8‎4‎°‎ +/‎6‎6‎°‎ +5‎4‎%‎ +S‎S‎E‎ ‎1‎4‎ ‎m‎p‎h‎ +F‎r‎i‎ ‎2‎7‎ +S‎c‎a‎t‎t‎e‎r‎e‎d‎ ‎T‎h‎u‎n‎d‎e‎r‎s‎t‎o‎r‎m‎s‎ +7‎7‎°‎ +/‎6‎1‎°‎ +5‎0‎%‎ +E‎N‎E‎ ‎1‎3‎ ‎m‎p‎h‎ +S‎a‎t‎ ‎2‎8‎ +A‎M‎ ‎S‎h‎o‎w‎e‎r‎s‎ +7‎0‎°‎ +/‎5‎5‎°‎ +3‎9‎%‎ +N‎N‎E‎ ‎1‎3‎ ‎m‎p‎h‎ +S‎u‎n‎ ‎2‎9‎ +P‎a‎r‎t‎l‎y‎ ‎C‎l‎o‎u‎d‎y‎ +7‎0‎°‎ +/‎5‎3‎°‎ +1‎8‎%‎ +N‎N‎E‎ ‎1‎2‎ ‎m‎p‎h‎ +M‎o‎n‎ ‎3‎0‎ +P‎a‎r‎t‎l‎y‎ ‎C‎l‎o‎u‎d‎y‎ +7‎1‎°‎ +/‎5‎6‎°‎ +2‎2‎%‎ +N‎N‎E‎ ‎9‎ ‎m‎p‎h‎ +T‎u‎e‎ ‎3‎1‎ +P‎a‎r‎t‎l‎y‎ ‎C‎l‎o‎u‎d‎y‎ +7‎2‎°‎ +/‎5‎4‎°‎ +2‎4‎%‎ +N‎N‎E‎ ‎1‎0‎ ‎m‎p‎h‎ + +.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎ + +C‎u‎r‎r‎e‎n‎t‎ ‎t‎h‎r‎e‎a‎t‎:‎ ‎T‎h‎e‎ ‎S‎a‎n‎t‎a‎ ‎r‎a‎c‎e‎ ‎w‎a‎r‎.‎ ‎🎅🏼🎅🏿 + +.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎ + +L‎u‎c‎i‎a‎n‎ ‎H‎o‎d‎o‎b‎o‎c‎ +L‎u‎c‎i‎a‎n‎ ‎H‎o‎d‎o‎b‎o‎c‎ ‎(‎a‎l‎s‎o‎ ‎k‎n‎o‎w‎n‎ ‎a‎s‎ ‎A‎l‎a‎k‎a‎z‎a‎m‎,‎ ‎A‎l‎a‎,‎ ‎T‎h‎e‎L‎H‎S‎h‎o‎w‎C‎h‎a‎n‎n‎e‎l‎ ‎a‎n‎d‎ ‎L‎u‎c‎i‎a‎n‎ ‎P‎e‎d‎o‎b‎o‎c‎)‎ ‎i‎s‎ ‎a‎n‎ ‎o‎d‎d‎l‎y‎-‎p‎r‎o‎p‎o‎r‎t‎i‎o‎n‎e‎d‎ ‎R‎o‎m‎a‎n‎i‎a‎n‎ ‎p‎a‎e‎d‎o‎p‎h‎i‎l‎e‎ ‎a‎n‎d‎ ‎Y‎o‎u‎T‎u‎b‎e‎r‎ ‎w‎h‎o‎ ‎o‎w‎n‎s‎ ‎a‎ ‎s‎h‎i‎t‎t‎y‎ ‎w‎e‎b‎s‎i‎t‎e‎ ‎c‎a‎l‎l‎e‎d‎ ‎B‎e‎a‎u‎t‎i‎f‎u‎l‎F‎o‎r‎u‎m‎s‎.‎c‎o‎ ‎–‎ ‎I‎r‎o‎n‎i‎c‎ ‎c‎o‎n‎s‎i‎d‎e‎r‎i‎n‎g‎ ‎t‎h‎e‎ ‎f‎a‎c‎t‎ ‎t‎h‎a‎t‎ ‎h‎e‎ ‎h‎i‎m‎s‎e‎l‎f‎ ‎i‎s‎ ‎m‎o‎r‎e‎ ‎h‎i‎d‎e‎o‎u‎s‎ ‎t‎h‎a‎n‎ ‎Z‎o‎e‎ ‎Q‎u‎i‎n‎n‎'‎s‎ ‎n‎u‎d‎e‎s‎.‎ + +W‎h‎e‎n‎ ‎n‎o‎t‎ ‎m‎a‎k‎i‎n‎g‎ ‎v‎i‎d‎e‎o‎s‎ ‎o‎f‎ ‎h‎i‎m‎s‎e‎l‎f‎ ‎t‎a‎l‎k‎i‎n‎g‎ ‎a‎b‎o‎u‎t‎ ‎h‎i‎s‎ ‎f‎a‎v‎o‎u‎r‎i‎t‎e‎ ‎a‎n‎i‎m‎u‎ ‎o‎r‎ ‎p‎r‎e‎t‎e‎n‎d‎i‎n‎g‎ ‎t‎o‎ ‎b‎e‎ ‎a‎ ‎l‎i‎t‎t‎l‎e‎ ‎g‎i‎r‎l‎,‎ ‎L‎u‎c‎i‎a‎n‎ ‎c‎a‎n‎ ‎u‎s‎u‎a‎l‎l‎y‎ ‎b‎e‎ ‎f‎o‎u‎n‎d‎ ‎c‎r‎e‎e‎p‎i‎n‎g‎ ‎o‎n‎ ‎v‎u‎l‎n‎e‎r‎a‎b‎l‎e‎ ‎t‎e‎e‎n‎a‎g‎e‎ ‎g‎i‎r‎l‎s‎ ‎a‎n‎d‎ ‎d‎e‎f‎e‎n‎d‎i‎n‎g‎ ‎t‎h‎e‎ ‎v‎i‎r‎t‎u‎e‎s‎ ‎o‎f‎ ‎c‎h‎i‎l‎d‎ ‎p‎o‎r‎n‎o‎g‎r‎a‎p‎h‎y‎ ‎i‎n‎ ‎h‎i‎s‎ ‎w‎e‎b‎s‎i‎t‎e‎'‎s‎ ‎c‎h‎a‎t‎ ‎r‎o‎o‎m‎.‎ + +(‎(‎ ‎H‎O‎W‎ ‎D‎O‎ ‎Y‎O‎U‎ ‎D‎O‎,‎ ‎F‎E‎L‎L‎O‎W‎ ‎K‎I‎D‎S‎?‎ ‎)‎)‎ + +.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎ + ‎ +T‎h‎e‎ ‎H‎o‎l‎m‎d‎e‎l‎ ‎H‎o‎r‎n‎ ‎A‎n‎t‎e‎n‎n‎a‎ ‎i‎s‎ ‎a‎ ‎l‎a‎r‎g‎e‎ ‎m‎i‎c‎r‎o‎w‎a‎v‎e‎ ‎h‎o‎r‎n‎ ‎a‎n‎t‎e‎n‎n‎a‎ ‎t‎h‎a‎t‎ ‎w‎a‎s‎ ‎u‎s‎e‎d‎ ‎a‎s‎ ‎a‎ ‎s‎a‎t‎e‎l‎l‎i‎t‎e‎ ‎c‎o‎m‎m‎u‎n‎i‎c‎a‎t‎i‎o‎n‎ ‎a‎n‎t‎e‎n‎n‎a‎ ‎a‎n‎d‎ ‎r‎a‎d‎i‎o‎ ‎t‎e‎l‎e‎s‎c‎o‎p‎e‎ ‎d‎u‎r‎i‎n‎g‎ ‎t‎h‎e‎ ‎1‎9‎6‎0‎s‎ ‎a‎t‎ ‎B‎e‎l‎l‎ ‎T‎e‎l‎e‎p‎h‎o‎n‎e‎ ‎L‎a‎b‎o‎r‎a‎t‎o‎r‎i‎e‎s‎ ‎i‎n‎ ‎H‎o‎l‎m‎d‎e‎l‎ ‎T‎o‎w‎n‎s‎h‎i‎p‎,‎ ‎N‎e‎w‎ ‎J‎e‎r‎s‎e‎y‎,‎ ‎U‎n‎i‎t‎e‎d‎ ‎S‎t‎a‎t‎e‎s‎.‎ ‎I‎t‎ ‎w‎a‎s‎ ‎d‎e‎s‎i‎g‎n‎a‎t‎e‎d‎ ‎a‎ ‎N‎a‎t‎i‎o‎n‎a‎l‎ ‎H‎i‎s‎t‎o‎r‎i‎c‎ ‎L‎a‎n‎d‎m‎a‎r‎k‎ ‎i‎n‎ ‎1‎9‎8‎8‎ ‎b‎e‎c‎a‎u‎s‎e‎ ‎o‎f‎ ‎i‎t‎s‎ ‎a‎s‎s‎o‎c‎i‎a‎t‎i‎o‎n‎ ‎w‎i‎t‎h‎ ‎t‎h‎e‎ ‎r‎e‎s‎e‎a‎r‎c‎h‎ ‎w‎o‎r‎k‎ ‎o‎f‎ ‎t‎w‎o‎ ‎r‎a‎d‎i‎o‎ ‎a‎s‎t‎r‎o‎n‎o‎m‎e‎r‎s‎,‎ ‎A‎r‎n‎o‎ ‎P‎e‎n‎z‎i‎a‎s‎ ‎a‎n‎d‎ ‎R‎o‎b‎e‎r‎t‎ ‎W‎i‎l‎s‎o‎n‎,‎ ‎w‎h‎o‎ ‎u‎s‎e‎d‎ ‎i‎t‎ ‎t‎o‎ ‎d‎i‎s‎c‎o‎v‎e‎r‎ ‎t‎h‎e‎ ‎c‎o‎s‎m‎i‎c‎ ‎m‎i‎c‎r‎o‎w‎a‎v‎e‎ ‎b‎a‎c‎k‎g‎r‎o‎u‎n‎d‎ ‎r‎a‎d‎i‎a‎t‎i‎o‎n‎ ‎(‎C‎M‎B‎R‎)‎ ‎t‎h‎a‎t‎ ‎p‎e‎r‎m‎e‎a‎t‎e‎s‎ ‎t‎h‎e‎ ‎u‎n‎i‎v‎e‎r‎s‎e‎.‎ ‎T‎h‎i‎s‎ ‎h‎e‎l‎p‎e‎d‎ ‎c‎h‎a‎n‎g‎e‎ ‎t‎h‎e‎ ‎s‎c‎i‎e‎n‎c‎e‎ ‎o‎f‎ ‎c‎o‎s‎m‎o‎l‎o‎g‎y‎,‎ ‎t‎h‎e‎ ‎s‎t‎u‎d‎y‎ ‎o‎f‎ ‎t‎h‎e‎ ‎h‎i‎s‎t‎o‎r‎y‎ ‎o‎f‎ ‎t‎h‎e‎ ‎u‎n‎i‎v‎e‎r‎s‎e‎,‎ ‎f‎r‎o‎m‎ ‎a‎ ‎f‎i‎e‎l‎d‎ ‎f‎o‎r‎ ‎u‎n‎l‎i‎m‎i‎t‎e‎d‎ ‎t‎h‎e‎o‎r‎e‎t‎i‎c‎a‎l‎ ‎s‎p‎e‎c‎u‎l‎a‎t‎i‎o‎n‎ ‎i‎n‎t‎o‎ ‎a‎ ‎d‎i‎s‎c‎i‎p‎l‎i‎n‎e‎ ‎o‎f‎ ‎d‎i‎r‎e‎c‎t‎ ‎o‎b‎s‎e‎r‎v‎a‎t‎i‎o‎n‎.‎ ‎I‎n‎ ‎1‎9‎7‎8‎,‎ ‎P‎e‎n‎z‎i‎a‎s‎ ‎a‎n‎d‎ ‎W‎i‎l‎s‎o‎n‎ ‎r‎e‎c‎e‎i‎v‎e‎d‎ ‎t‎h‎e‎ ‎N‎o‎b‎e‎l‎ ‎P‎r‎i‎z‎e‎ ‎i‎n‎ ‎P‎h‎y‎s‎i‎c‎s‎ ‎f‎o‎r‎ ‎t‎h‎e‎i‎r‎ ‎d‎i‎s‎c‎o‎v‎e‎r‎y‎.‎ + +P‎h‎o‎t‎o‎g‎r‎a‎p‎h‎ ‎c‎r‎e‎d‎i‎t‎:‎ ‎N‎A‎S‎A‎;‎ ‎r‎e‎s‎t‎o‎r‎e‎d‎ ‎b‎y‎ ‎B‎a‎m‎m‎e‎s‎k‎ + +.‎.‎.‎.‎.‎.‎.‎.‎.‎.‎ + +B‎y‎e‎,‎ ‎g‎u‎y‎s‎.‎ ‎I‎'‎m‎ ‎g‎o‎n‎n‎a‎ ‎g‎o‎ ‎b‎a‎c‎k‎ ‎t‎o‎ ‎d‎o‎i‎n‎g‎ ‎w‎h‎a‎t‎ ‎I‎ ‎d‎o‎ ‎b‎e‎s‎t‎.‎ ‎F‎u‎c‎k‎i‎n‎g‎ ‎b‎a‎b‎i‎e‎s‎.‎ ‎G‎o‎d‎ ‎I‎ ‎l‎o‎v‎e‎ ‎t‎h‎e‎i‎r‎ ‎b‎a‎l‎d‎ ‎h‎e‎a‎d‎s‎ ‎r‎u‎b‎b‎i‎n‎g‎ ‎a‎g‎a‎i‎n‎s‎t‎ ‎m‎y‎ ‎d‎i‎c‎k‎.‎" +rHBHSGaK,Steve dead,NeaGigel2018,JSON,Tuesday 17th of October 2023 08:45:23 AM CDT,"""Steve died. What a shame!"", +""Steve died. Oh, well."", +""Steve died. Aaaanyway!"", +""It's just a scratch, Steve! Get up!"", +""You didn't had to die!"", +""You didn't even survive? Lame!"", +""Alexa, play the coffin music!"", +""You'd still be alive if you weren't dead!"", +""You think death favors you?"", +""You can't say 'Not today' forever."", +""I hope you don’t die again."", +""Fool! How did you let it happen?"", +""Tip: Don’t die!"", +""What’s that noise? Oh wait, it’s nothing. Your heart just stopped beating."", +""There is no word in the dictionary that could describe how applaudable your death was."", +""You had one job. It was to keep your health above 0."", +""Come on! Well there is always next time, right?"", +""Practice makes perfect!"", +""They were probably hacking!"", +""It was only a mistake."", +""‘Wow, that was great!’ - No one."", +""Life failed successfully."", +""____ <- Your heart beat."", +""Hey kid. You died."", +""So… what happened now?"", +""… I mean. You died. I’m tired of saying that you died over and over."", +""Do it the same, but better!"", +""Heeey, ya did it! ... ya failed"", +""Congratulations!"", +""That's not how you survive!"", +""Never lose hope! I know I did."", +""Hmm, you succeeded...in achieving the lowest score possible!"", +""Oh great! I tell my friends how talented you are, and you prove me wrong! Thank you! Thank you for that!"", +""Try harder!"", +""Skill issue!""" +fRMzhFH5,MADE BY JING EU,moe1325,Batch,Tuesday 17th of October 2023 08:43:14 AM CDT,"@echo off +color 02 +dir +setlocal enabledelayedexpansion +for /f ""tokens=2delims=:"" %%a in ('netsh wlan show profile ^|findstr "":""') do ( + set ""ssid=%%~a"" + call :getpwd ""%%ssid:~1%%"" +) +:getpwd +echo --------------------------------------------------- +echo ----------------- PASSWORD HACKED ----------------- +echo --------------------------------------------------- +echo hack attack has sended to the wifi +echo RESULTS: +set ""ssid=%*"" +for /f ""tokens=2delims=:"" %%i in ('netsh wlan show profile name^=""%ssid:""=%"" key^=clear ^| findstr /C:""Key Content""') do echo ssid: %ssid% pass: %%i +pause" +pWDYYUbC,Untitled,wintttr,Java,Tuesday 17th of October 2023 07:47:21 AM CDT,"int[] merge(int[] a, int[] b) { + int[] result = new int[a.size() + b.size()]; + + int i = 0, j = 0, k; + + for(k = 0; i < a.size() && j < b.size(); k++) { + if(a[i] < b[i]) { + result[k] = a[i]; + i++; + } + else { + result[k] = b[j]; + j++; + } + } + + for(; i < a.size(); k++, i++) result[k] = a[i]; + for(; j < b.size(); k++, j++) result[k] = b[j]; + + return result; +}" +H87XvUKZ,MineCrops,den1703,Lua,Tuesday 17th of October 2023 07:07:27 AM CDT,"--Скрипт для робота, для поднятия статов у кропсов или разведения дубликатов (режим задается константой mode) +--Автор: aka_zaratustra осень 2020 +local ver = ""1.1.3"" -- версия программы +--Историю версий см. в конце файла + +-- схема грядки +--|C1|M1|C2 +--|M2|C3|M3 +--|C4|M4|C5 +--|CH|P0|BR + +-- P0 - исходное положение робота. Робот находится на 1 блок выше кропсов (чтобы мог летать над ними), смотрит на север (в сторону грядок). В руках у робота должна быть лопатка Spade. В первом слоте инвентори робота или должны быть палки или он должен быть пустой (робот сам возьмет и положет туда палки) +-- С[n] - дочерние (разводимые) растения +-- M[n] - материнские растения +-- СН - chest, сундук, куда будут помещаться мешочки с семечками и урожай +-- BR - барель с кропсами(палками) + +-- В начале работы материнские кропсы должны быть высажены на грядку. Дочерние (разводимые) могут быть высажены, а может быть голая земля. +-- У робота должны в обязательном порядке присутстовать компоненты: Geolyzer, Inventory Upgrade, Inventory Controller Upgrade +-- Рекомендуется для удобства поместить файл с этим скриптом в папку /home/ , а имя файла скрипта добавить в файл /home/.shrc - тогда скрипт будет запускаться при включении робота автоматически +-- Если в бочке кончаются кропсы(палки), робот сломает пустые палки, если они есть на поле и завершит свою работу с ошибкой (чтобы всё поле не сожрали сорняки) +-- Максимальные статы кропсов, выше которых робот поднимать статы выводимых кропсов не будет, задаются константами max_grow и max_gain +-- Стат resistans робот не поднимает, а при возможости опускает до 0 +-- Начиная с версии 1.1.3 робот перестал быть уязвим к коллизиям. Нахождение игрока на пути следования робота больше не приводит к потере роботом маршрута. Робот после столкновения с игроком замирает на секунду, после чего продолжает попытку движения. +-- Механизм оценки приемлемости (качества) полученного растения менять в функции howInterestingIsThisCrop(с) +-- При наличии интернет карты в роботе, скрипт в робота можно загрузить командой `pastebin get cZY3P7As -f crop_stats.lua` + +-- mode: +-- 1 - режим поднятия статов кропсов +-- 2 - режим разведения дубликатов кропсов (НЕ ТЕСТИРОВАЛСЯ! НЕ ИСПОЛЬЗОВАТЬ!) +local mode = 1 +-- выше заданных здесь значений робот понимать статы не будет +local max_grow = 20 -- если больше 23, то кроп начинает вести себя как сорняк +local max_gain = 28 +local grow_kill = 24 -- значение стата grow, при котором и выше которого робот будет убивать растение на корню + +local robot = require(""robot"") +local computer = require(""computer"") +local component = require(""component"") +local geo = component.geolyzer +local cropname + +local c_cropname = {} --имена дочерних кропов +--статы дочерних кропов +local c_gain = {} +local c_grow = {} +local c_resistans = {} +local c_size = {} +local c_maxSize = {} + +-- статус может принимать значения: +-- ""unknown"" - неисследованный. назначается при старте, дальше не используется +-- ""double crop"" - жердочки +-- ""growing"" - растущий кроп, у которого статы или дошли до целевых или лучше материнских. после вырастания или отправится в сундук или может заменить собой материнский кроп +local c_status = {""unknown"", ""unknown"", ""unknown"", ""unknown"", ""unknown""} -- ""unknown"" для всех пяти дочерних кропов + + +local m_gain = {} +local m_grow = {} +local m_resistans = {} + +local error_string +local bestSeedsSlot --слот в инвентори робота с семенами с лучшими статами +local robotLocation -- текущее местонаходение робота. значение из списка: {""С1"", ""С2"", ... , ""С5"", ""M1"", ""M2"", ""M3"", ""M4"", ""P0""} + + +function robot_error(msg) + print(""Ошибка: "", msg) + computer.beep(1000,0.3) + computer.beep(1000,0.3) + computer.beep(1000,0.3) + os.exit() +end + +function robotTryForward() -- роботы пытается сделать шаг вперед, до тех пор, пока ему это не удастся + while robot.forward() == nil do + print(""Робот столкнулся с препятствием."") + os.sleep(1) -- останавливаем робота на 1 секунду + end +end +-------------------------------------- +function get_crop_stat(analyze_result, stat_name) --функция - просматривает таблицу скана блока и возвращает значение поля, имя которого передано в stat_name. если не находит, то возвращает nil + + --file = io.open(""log.txt"", ""a"") --файл для лога + + found = false + for name, v in pairs(analyze_result) do --просмотрим таблицу реультата анализа кропса + + pos = string.find(name, stat_name) + --print(pos) + if pos ~= nil then -- если строку в метадате нашли + found = true + --print(v) + return v + end + end + +end + +function robotMove_P0_M1() + --исходное положение P0 смотрит вверх + robotTryForward() + robotTryForward() + robotTryForward() + --конечное положение M1 смотрит вверх +end +function robotMove_M1_M2() + --начальное положение M1 смотрит вверх + robot.turnLeft() + robotTryForward() + robot.turnLeft() + robotTryForward() + --конечное положение M2 смотрит вниз +end +function robotMove_M2_M3() + --начальное положение M2 смотрит вниз + robot.turnLeft() + robotTryForward() + robotTryForward() + --конечное положение M3 смотрит вправо +end +function robotMove_M3_M4() + --начальное положение M3 смотрит вправо + robot.turnRight() + robotTryForward() + robot.turnRight() + robotTryForward() + --конечное положение M4 смотрит влево +end +function robotMove_M4_P0() + --начальное положение M4 смотрит влево + robot.turnLeft() + robotTryForward() + robot.turnAround() + --конечное положение P0 смотрит вверх +end +function robotMove_P0_C1() + --начальное положение P0 смотрит вверх + robotTryForward() + robotTryForward() + robotTryForward() + robot.turnLeft() + robotTryForward() + --конечное положение C1 смотрит влево +end +function robotMove_C1_C4() + --начальное положение C1 смотрит влево + robot.turnLeft() + robotTryForward() + robotTryForward() + --конечное положение C4 смотрит вниз +end +function robotMove_C4_C5() + --начальное положение C4 смотрит вниз + robot.turnLeft() + robotTryForward() + robotTryForward() + --конечное положение C5 смотрит вправо +end +function robotMove_C5_C2() + --начальное положение C5 смотрит вправо + robot.turnLeft() + robotTryForward() + robotTryForward() + --конечное положение C2 смотрит вверх +end +function robotMove_C2_C3() + --начальное положение C2 смотрит вверх + robot.turnLeft() + robotTryForward() + robot.turnLeft() + robotTryForward() + --конечное положение C3 смотрит вниз +end +function robotMove_C3_P0() + --начальное положение C3 смотрит вниз + robotTryForward() + robotTryForward() + robot.turnAround() + --конечное положение P0 смотрит вверх +end +function robotGoToParkFrom_M_Crop(m) --едем на парковку. ""m"" - номер материнского кропа с которого мы едем + if m == 1 then + --начальное положение M1 смотрит вверх + robot.turnAround() + robotTryForward() + robotTryForward() + robotTryForward() + robot.turnAround() + --конечное положение P0 смотрит вверх + end + if m == 2 then + --начальное положение M2 смотрит влево + robot.turnAround() + robotTryForward() + robot.turnRight() + robotTryForward() + robotTryForward() + robot.turnAround() + --конечное положение P0 смотрит вверх + end + if m == 3 then + --начальное положение M3 смотрит вправо + robot.turnAround() + robotTryForward() + robot.turnLeft() + robotTryForward() + robotTryForward() + robot.turnAround() + --конечное положение P0 смотрит вверх + end + if m == 4 then + --начальное положение M4 смотрит влево + robot.turnLeft() + robotTryForward() + robot.turnAround() + --конечное положение P0 смотрит вверх + end +end +function robotGoToPark(c) --едем на парковку. ""с"" - номер дочернего кропа с которого мы едем + if c == 1 then + --начальное положение C1 смотрит влево + robot.turnAround() + robotTryForward() + robot.turnRight() + robotTryForward() + robotTryForward() + robotTryForward() + robot.turnAround() + --конечное положение P0 смотрим вверх + end + if c == 2 then + --начальное положение C2 смотрит вверх + robot.turnLeft() + robotTryForward() + robot.turnLeft() + robotTryForward() + robotTryForward() + robotTryForward() + robot.turnAround() + --конечное положение P0 смотрим вверх + end + if c == 3 then + --начальное положение C3 смотрит вниз + robotTryForward() + robotTryForward() + robot.turnAround() + --конечное положение P0 смотрим вверх + end + if c == 4 then + --начальное положение C4 смотрит вниз + robot.turnLeft() + robotTryForward() + robot.turnRight() + robotTryForward() + robot.turnAround() + --конечное положение P0 смотрим вверх + end + if c == 5 then + --начальное положение C5 смотрит вправо + robot.turnAround() + robotTryForward() + robot.turnLeft() + robotTryForward() + robot.turnAround() + --конечное положение P0 смотрим вверх + end + +end +function robotGoTo_M_Crop_FromPark(m) --едем с парковки P0 к материнскому кропу. ""m"" - номер кропа к которому мы едем + if m==1 then + --исходное положение P0 смотрит вверх + robotTryForward() + robotTryForward() + robotTryForward() + --конечное положение M1 смотрит вверх + end + if m==2 then + --начальное положение P0 смотрит вверх + robotTryForward() + robotTryForward() + robot.turnLeft() + robotTryForward() + --конечное положение M2 смотрит влево + end + if m==3 then + --начальное положение P0 смотрит вверх + robotTryForward() + robotTryForward() + robot.turnRight() + robotTryForward() + --конечное положение M3 смотрит вправо + end + if m==4 then + --начальное положение P0 смотрит вверх + robotTryForward() + robot.turnLeft() + --конечное положение M4 смотрит влево + end +end +function robotGoTo_C_Crop_FromPark(c) --едем с парковки P0 к дочернему кропу. ""с"" - номер кропа к которому мы едем + if c == 1 then + --начальное положение P0 смотрим вверх + robotTryForward() + robotTryForward() + robotTryForward() + robot.turnLeft() + robotTryForward() + --конечное положение C1 смотрит влево + end + if c == 2 then + --начальное положение P0 смотрим вверх + robotTryForward() + robotTryForward() + robotTryForward() + robot.turnRight() + robotTryForward() + robot.turnLeft() + --конечное положение C2 смотрит вверх + end + if c == 3 then + --начальное положение P0 смотрим вверх + robotTryForward() + robotTryForward() + robot.turnAround() + --конечное положение C3 смотрит вниз + end + if c == 4 then + --начальное положение P0 смотрим вверх + robotTryForward() + robot.turnLeft() + robotTryForward() + robot.turnLeft() + --конечное положение C4 смотрит вниз + end + if c == 5 then + --начальное положение P0 смотрим вверх + robotTryForward() + robot.turnRight() + robotTryForward() + --конечное положение C5 смотрит вправо + end + +end +function grabCropsFromBarrel() --пополняем запас палок в роботе из бочки. + --возвращает true если после попытки взять палки, есть хотя бы одна палка в роботе + --возвращает false если палки в роботе и в бочке кончились + cropsStackSize = 62 --размер стака палок, который робот возит с собой. 62 потому что при уничтожения кропса робот выдерает из земли и палки, и они могут попасть в нецелевой слот + + --палки лежат в первом слоте + returnValue = true + itemCount = robot.count(1) + if itemCount < cropsStackSize then --если палок неполный стак, до доберем из бочки + robot.select(1) --активизируем слот, в котором лежат палки + robot.turnRight() --повернемся к бочке + --добираем палок до полного стака + robot.suck(cropsStackSize-itemCount) + itemCount = robot.count(1) --смотрим сколько палок в роботе + if itemCount == 0 then --если палки в роботе кончились + returnValue = false --возвращаем признак, что ПАЛКИ В РОБОТЕ И БОЧКЕ КОНЧИЛИСЬ + elseif itemCount < cropsStackSize then --если после попытки взять палки из бочки, мы имеем меньше стака палок в роботе + print(""В бочке закончились палки!"") + computer.beep(1000,1) + returnValue = true + else + returnValue = true + end + robot.turnLeft() --повернемся обратно к кропсам + end + return returnValue +end +function dropToChest() --все что есть в инвентори, скидываем в сундук + --начальная позиция - P0 смотрим вверх + robot.turnLeft() + for i=2,16 do + item = component.inventory_controller.getStackInInternalSlot(i) + if item then --если в слоте что-то есть + robot.select(i) + robot.drop() --сдаем все из текущего слота в сундук + end + end + robot.turnRight() --поворачиваемся к с0 + robot.select(1) +end +function destroyAllDoubleCrops() --уничтожим все двойные кропсы + --пройдемся по массиву статусов кропсов и у всех кропсов, у которых статус = ""жердочки"", съездим к ним и сломаем их + for c=1,5 do + if c_status[c] == ""double crop"" then + robotGoTo_C_Crop_FromPark(c) + robot.swingDown() --ломаем кропсы + robotGoToPark(c) + end + end + +end +function howInterestingIsThisCrop(c) --оценивает полезность нового растения сравнивая статы дочернего ростения [с] со статами материнский растений . тип растения во внимание не принимается +--возвращает: 0 - негодное +-- -1 - годно для сохранения +-- m - превосходит материнское, где 1= grow_kill then --если grow у дочернего растения достигло опасного значения, то это растение считаем негодным + return 0 + end + + --если статы нового растения больше максимально разрешенных + if (c_gain[c] > max_gain) or (c_grow[c] > max_grow) then + --то считаем это растение приемлемым + print(""Полученое растение, превышает максимальные статы."") + return -1 + end + + --сравним статы нового растения со статами материнских растений + maxDifference = 0 --самая лучшая разница в качестве + m_crop_maxDifference = 0 --материнский кроп с самой лучшей разницей в качестве + for m = 1, 4 do + --сравниваем статы полученного растения со статами материнских растений + difference = (c_gain[c] + c_grow[c] - c_resistans[c]) - (m_gain[m] + m_grow[m] - m_resistans[m]) + if (difference > 0) and (difference > maxDifference) then --если растение лучше и это лучшая разница в качестве + maxDifference = difference --обновим лучшую разницу в качестве + m_crop_maxDifference = m --материнский кроп с самой лучшей разницей в качестве + end + end + if maxDifference>0 then + --полученное растение лучше чем одно из материнских, а значит нужно пересадить (на самый слабый материнский кроп) + return m_crop_maxDifference --возвращаем материнский кроп с самой лучшей разницей в качестве + end + + --если мы здесь, значит новое растение не привысило максимальные статы и не лучше чем материнские растения + --а занчит РАСТЕНИЕ ПЛОХОЕ + return 0 + +end +function placeDoubleCrops() --ставит новые палки + component.inventory_controller.equip() --экипируем кропсы(палки) + robot.useDown() --ставим палку на землю + robot.useDown() --ставим палку (получаются жердочки для скрещивания) + component.inventory_controller.equip() --возвращаем в руки лопатку +end +function findSeedsInRobotInventory() --возвращает номер слота в инвентори робота с семечками, если нет семечек, то возвращает 0, а если вообще ничего нет, то возвращает -1 + foundAnything = false + for i=2,16 do + item = component.inventory_controller.getStackInInternalSlot(i) + if item then --если в слоте что-то есть + foundAnything = true + if item.name == ""IC2:itemCropSeed"" then --если в слоте семена + return i --возвращаем номер слота, в котором семена + end + end + end + if foundAnything then --если что-то нашли (обычно это урожай), но семян не было + return 0 + end + return -1 --вообще ничего нет +end +function analizeAndProceed(c) --функция анализа и обработки кропа. с - номер кропа. + + + analyze_result = geo.analyze(0) --анализируем блок под роботом + c_cropname[c] = get_crop_stat(analyze_result, ""crop:name"") + if c_cropname[c] ~= nil then -- если перед нами что-то вывелось, а не пустые палки + + + --получаем остальные статы кропа + c_gain[c] = get_crop_stat(analyze_result, ""crop:gain"") + c_grow[c] = get_crop_stat(analyze_result, ""crop:grow"") + c_resistans[c] = get_crop_stat(analyze_result, ""crop:resistance"") + c_size[c] = get_crop_stat(analyze_result, ""crop:size"") + c_maxSize[c] = get_crop_stat(analyze_result, ""crop:maxSize"") + + if c_status[c] == ""double crop"" or c_status[c] == ""unknown"" then --если статус растения был двойные палки, значит появилось новое растение + print(""Новый кроп С""..c.."": ""..c_cropname[c].."" ""..c_grow[c].."" ""..c_gain[c].."" ""..c_resistans[c]) -- ""Новый кроп С1: reed"" + --print(c_grow[c], c_gain[c], c_resistans[c], ""size: ""..c_size[c]..""/""..c_maxSize[c]) --""23 31 0 size: 2/3"" + end + + --если прокнуло растение другого вида, выкапываем его лопаткой и отвозим в сундук + if c_cropname[c] ~= cropname then + robot.useDown()--по умолчанию у нас в руках лопатка, юзаем ее + component.inventory_controller.equip() --экипируем кропсы(палки) + robot.useDown() --ставим палку (получаются жердочки для скрещивания) + component.inventory_controller.equip() --возвращаем в руки лопатку + c_status[c] = ""double crop"" --устанавливаем статус растения - жердочки + + --после копки проверим инвентори робота + foundAnything = false + for i=2,16 do + item = component.inventory_controller.getStackInInternalSlot(i) + if item then --если в слоте что-то есть + foundAnything = true + end + end + + if foundAnything or robot.count(1) == 0 then --если что-то выкопалось от этого непрофильного растения или закончились палки + robotGoToPark(c) --едем на парковку + if foundAnything then --если есть в инветори что-то выкопанное, сдаем в сундук + dropToChest() + end + --пополняем запас палок в роботе + if grabCropsFromBarrel() then + else --если палки кончились + destroyAllDoubleCrops() --уничтожим все двойные кропсы + robot_error(""ПАЛКИ КОНЧИЛИСЬ!"") --заканчиваем работу с ошибкой + end + robotGoTo_C_Crop_FromPark(c) + end + else--если растение нужного типа + if c_status[c] == ""double crop"" or c_status[c] == ""unknown"" then --если статус растения был двойные палки, значит появилось новое растение + --оценим полезность нового растения + interest = howInterestingIsThisCrop(c) + + --выведем инфу о новом кропе + interestString = """" + if interest == 0 then + interestString = ""негодное"" + elseif interest == -1 then + interestString = ""годное, статы дошли до целевых"" + else + interestString = ""превосходит материнское М""..interest + end + print(""Полезность:""..interestString) + + if interest == 0 then -- растение с плохими статами + --уничтожаем растение + robot.swingDown() --ломаем кропсы + placeDoubleCrops() --ставим новые палки + c_status[c] = ""double crop"" --устанавливаем статус растения - жердочки + --посмотрим, попали ли семечки в инвентори + seedSlot = findSeedsInRobotInventory() --находим слот с семечками + if seedSlot > 0 then --если семечки есть + --отвезем эти семечки домой + robotGoToPark(c) --едем на парковку + dropToChest() --сбрасываем всё в сундук + grabCropsFromBarrel() --добираем палок из бочки + robotGoTo_C_Crop_FromPark(c) --возвращаемся на кроп + end + else --растение со статами превышающими материнские или статы дошли до целевых + c_status[c] = ""growing"" --устанавливаем статус растущего кропа + --оставляем его в покое, пусть растет + end + + else -- c_status[c] == ""growing"" --растение уже ранее сканировалось + + if c_size[c] == c_maxSize[c] then --если растение доросло + robot.swingDown() --ломаем кропсы, собираем урожай + placeDoubleCrops() --ставим новые палки + c_status[c] = ""double crop"" --устанавливаем статус растения - жердочки + + --посмотрим, попали ли семечки в инвентори + seedSlot = findSeedsInRobotInventory() --находим слот с семечками + if seedSlot > 0 then --если семечки есть + --делаем повторную оценку полезности + interest = howInterestingIsThisCrop(c) + if interest == -1 then --годное, статы дошли до целевых + --везем в сундук + robotGoToPark(c) --едем на парковку + dropToChest() --сбрасываем всё в сундук + grabCropsFromBarrel() --добираем палок из бочки + robotGoTo_C_Crop_FromPark(c) --возвращаемся на кроп + + elseif interest > 0 then --превосходит материнское + --меняем материнское ростение на текущее дочернее + print(""Заменяем кроп М""..interest.."": ""..m_grow[interest].."" ""..m_gain[interest].."" ""..m_resistans[interest].."" -> ""..c_grow[c].."" ""..c_gain[c].."" ""..c_resistans[c]) + --обновляем статы материнского растения + m_grow[interest] = c_grow[c] + m_gain[interest] = c_gain[c] + m_resistans[interest] = c_resistans[c] + --едем менять материнское растение + robotGoToPark(c) --едем через паркинг. прямых маршрутов от С до M робот не знает + robotGoTo_M_Crop_FromPark(interest) --едем на материнский кропс, который будем менять + robot.swingDown() --ломаем кропсы, собираем урожай + component.inventory_controller.equip() --экипируем кропсы(палки) + robot.useDown() --ставим палку на землю + component.inventory_controller.equip() --возвращаем в руки лопатку + robot.select(seedSlot) --делаем активным слот с семенами, которые мы собираемся сажать + component.inventory_controller.equip() -- берем семена в руки + robot.useDown() --сажаем + component.inventory_controller.equip() -- берем обратно лопатку в руки + robot.select(1) + robotGoToParkFrom_M_Crop(interest) --едем на паркинг + dropToChest() --сбрасываем всё в сундук + grabCropsFromBarrel() --добираем палок из бочки + robotGoTo_C_Crop_FromPark(c) --возвращаемся на кроп + end + end + + + end + end + + + end + + + + + + + + else -- если перед нами или пустые палки или воздух + if c_status[c] == ""unknown"" then -- если мы сканируем этот кроп впервые + if get_crop_stat(analyze_result, ""name"") == ""IC2:blockCrop"" then --если перед нами двойные палки + c_status[c] = ""double crop"" + else --перед нами не растение и не двойные палки. значит перед нами воздух + --ставим палки + component.inventory_controller.equip() --экипируем кропсы(палки) + robot.useDown() --ставим палку на землю + robot.useDown() --ставим палку (получаются жердочки для скрещивания) + component.inventory_controller.equip() --возвращаем в руки лопатку + c_status[c] = ""double crop"" --устанавливаем статус растения - жердочки + end + + end + + end + +end + + + +---------------------------------------------------- +--Шаг 1 +--Начинаем работать +print(""--------------------------------------""); --выводим приветствие +print(""Скрипт для робота, для поднятия статов у кропсов или разведения дубликатов запущен.""); +print(""Версия: ""..ver) +if mode == 1 then -- 1 - режим поднятия статов кропсов + print(""Выбран режим поднятия статов кропсов.""); +else -- 2 - режим разведения дубликатов кропсов + print(""Выбран режим разведения дубликатов кропсов.""); +end +print(""Шаг 1. Проверка входящих условий.""); + +-- проверяем правильность входящий условий + +--В руках должна быть лопатка +robot.select(1) --выбираем первый слот инвентори, на случай если при начале работы был выбран другой слот +component.inventory_controller.equip() --убираем лопатку к себе в инвентори и смотрим, лопатка ли это? +item = component.inventory_controller.getStackInInternalSlot(1) +if item == nil then --если в слоте ничего нет + robot_error(""Нет лопатки в слоте для инструмента!"") +end +if item.name ~= ""minecraft:stick"" then --если в слоте что-то есть, но это не лопатка/палка + robot_error(""Нет лопатки в слоте для инструмента!"") +end +component.inventory_controller.equip() --лопатку возвращаем в слот для инструмента + +--print(""Входящие условия соблюдены."") + +---------------------------------------------------- +--Шаг 2 +if mode == 1 then -- 1 - режим поднятия статов кропсов + print(""Шаг 2. Сканируем материнские кропсы и запоминаем их статы."") + + --Сканируем материнские кропсы и запоминаем их статы + --Исходная позиция - робот стоит на P0 + + -- кроп M1 + robotMove_P0_M1() + analyze_result = geo.analyze(0) + cropname = get_crop_stat(analyze_result, ""crop:name"") + m_gain[1] = get_crop_stat(analyze_result, ""crop:gain"") + m_grow[1] = get_crop_stat(analyze_result, ""crop:grow"") + m_resistans[1] = get_crop_stat(analyze_result, ""crop:resistance"") + print(""M1:"", cropname, m_grow[1], m_gain[1], m_resistans[1]) + + -- кроп M2 + robotMove_M1_M2() + analyze_result = geo.analyze(0) + cropname = get_crop_stat(analyze_result, ""crop:name"") + m_gain[2] = get_crop_stat(analyze_result, ""crop:gain"") + m_grow[2] = get_crop_stat(analyze_result, ""crop:grow"") + m_resistans[2] = get_crop_stat(analyze_result, ""crop:resistance"") + print(""M2:"", cropname, m_grow[2], m_gain[2], m_resistans[2]) + + -- кроп M3 + robotMove_M2_M3() + analyze_result = geo.analyze(0) + cropname = get_crop_stat(analyze_result, ""crop:name"") + m_gain[3] = get_crop_stat(analyze_result, ""crop:gain"") + m_grow[3] = get_crop_stat(analyze_result, ""crop:grow"") + m_resistans[3] = get_crop_stat(analyze_result, ""crop:resistance"") + print(""M3:"", cropname, m_grow[3], m_gain[3], m_resistans[3]) + + -- кроп M4 + robotMove_M3_M4() + analyze_result = geo.analyze(0) + cropname = get_crop_stat(analyze_result, ""crop:name"") + m_gain[4] = get_crop_stat(analyze_result, ""crop:gain"") + m_grow[4] = get_crop_stat(analyze_result, ""crop:grow"") + m_resistans[4] = get_crop_stat(analyze_result, ""crop:resistance"") + print(""M4:"", cropname, m_grow[4], m_gain[4], m_resistans[4]) + + + robotMove_M4_P0() --возвращаем робота в исходное положение + +end +---------------------------------------------------- +--Шаг 3 +if mode == 1 then -- 1 - режим поднятия статов кропсов + print(""Шаг 3. Приступаем к поднятию статов.""); +else -- 2 - режим разведения дубликатов кропсов + print(""Шаг 2. Приступаем к разведению дубликатов кропсов.""); +end + +while true do --главный цикл + + --пополняем запас палок в роботе + if grabCropsFromBarrel() then + else --если палки кончились + destroyAllDoubleCrops() --уничтожим все двойные кропсы + robot_error(""ПАЛКИ КОНЧИЛИСЬ!"") + end + + --едем сканить дочерние кропсы + robotMove_P0_C1() + analizeAndProceed(1) + robotMove_C1_C4() + analizeAndProceed(4) + robotMove_C4_C5() + analizeAndProceed(5) + robotMove_C5_C2() + analizeAndProceed(2) + robotMove_C2_C3() + analizeAndProceed(3) + robotMove_C3_P0() --конечное положение P0 смотрим вверх + + --os.exit() + + + os.sleep(15) +end + +os.exit() + +--История версий: + +--Версия 1.1.3 +--Устранена уязвимость к коллизиям. Нахождение игрока на пути следования робота больше не приводит к потере роботом маршрута. Робот после столкновения с игроком замирает на секунду, после чего продолжает попытку движения +--Добавлена история версий в файл скрипта робота" +jKXzUiLE,palindrome,fsoc131y,PL/SQL,Tuesday 17th of October 2023 07:01:58 AM CDT,"Complete the following list of simple programs in PL/SQL + +1. Addition of two numbers +set serveroutput on +edit +edit file name +declare +a int; +b int; +c int; +begin +a:=&a; +b:=&b; +c:=a+b; +dbms_output.put_line('Sum of a and b is '||c); +end; +/ + +output: +SQL> @add +Enter value for a: 12 +old 6: a:=&a; +new 6: a:=12; +Enter value for b: 58 +old 7: b:=&b; +new 7: b:=58; +Sum of a and b is 70 + +PL/SQL procedure successfully completed. + +2. Area of Circle + +declare +r number; +pi number := 3.14; +area number; +begin +r:=&r; +area := pi * r * r; +dbms_output.put_line('Area of a circle: '||area); +end; +/ + +OUTPUT: + +SQL> edit area + +SQL> @area +Enter value for r: 5 +old 6: r:=&r; +new 6: r:=5; +Area of a circle: 78.5 + +PL/SQL procedure successfully completed. + + +3. Biggest of three numbers + +declare +a int; +b int; +c int; +begin +a:=&a; +b:=&b; +c:=&c; +if(a>b and a>c) then +dbms_output.put_line('a is greatest'); +elsif(b>a and b>c) then +dbms_output.put_line('b is greatest'); +elsif(c>b) then +dbms_output.put_line('c is greatest'); +else +dbms_output.put_line('a=b=c'); +end if; +end; +/ + +OUTPUT: +SQL> set serveroutput on +SQL> edit +SP2-0107: Nothing to save. +SQL> edit tgreat + +SQL> @tgreat +Enter value for a: 12 +old 6: a:=&a; +new 6: a:=12; +Enter value for b: 52 +old 7: b:=&b; +new 7: b:=52; +Enter value for c: 32 +old 8: c:=&c; +new 8: c:=32; +b is greatest + +PL/SQL procedure successfully completed. + +4. Printing 1 to n natural numbers using + (i) simple loop + (ii) While loop + (iii) For loop + +declare +a int; +b int:=1; +i int; +c int :=1; +begin +a:=&a; +dbms_output.put_line('Printing using simple loop'); +LOOP +exit when b>a; +dbms_output.put_line(b); +b:=b+1; +end LOOP; +dbms_output.put_line('Printing using while loop'); +WHILE (c<=a) LOOP +dbms_output.put_line(c); +c:=c+1; +end LOOP; +dbms_output.put_line('Printing using for loop'); +FOR b in 1..a LOOP +dbms_output.put_line(b); +end LOOP; +end; +/ + +OUTPUT: + +SQL> edit loop + +SQL> @loop +Enter value for a: 5 +old 7: a:=&a; +new 7: a:=5; +Printing using simple loop +1 +2 +3 +4 +5 +Printing using while loop +1 +2 +3 +4 +5 +Printing using for loop +1 +2 +3 +4 +5 + +PL/SQL procedure successfully completed. + + +5. Printing 1 to n natural numbers in reverse using + (i) simple loop + (ii) While loop + (iii) For loop + +declare +a int; +b int; +i int; +c int; +begin +a:=&a; +dbms_output.put_line('Printing using simple loop'); +LOOP +exit when a<1; +dbms_output.put_line(a); +a:=a-1; +end LOOP; +dbms_output.put_line('Printing using while loop'); +c:=&c; +WHILE (c>0) LOOP +dbms_output.put_line(c); +c:=c-1; +end LOOP; +dbms_output.put_line('Printing using for loop'); +i:=&i; +FOR b in REVERSE 1..i LOOP +dbms_output.put_line(b); +end LOOP; +end; +/ + +OUTPUT: +SQL> edit rloop + +SQL> @rloop +Enter value for a: 5 +old 7: a:=&a; +new 7: a:=5; +Enter value for c: 6 +old 15: c:=&c; +new 15: c:=6; +Enter value for i: 8 +old 21: i:=&i; +new 21: i:=8; +Printing using simple loop +5 +4 +3 +2 +1 +Printing using while loop +6 +5 +4 +3 +2 +1 +Printing using for loop +8 +7 +6 +5 +4 +3 +2 +1 + +PL/SQL procedure successfully completed. + +6. Printing Factorial of a number +declare +a int; +f int :=1; +begin +a:=&a; +WHILE a>0 LOOP +f:=f*a; +a:=a-1; +end LOOP; +dbms_output.put_line(f); +end; +/ + +OUTPUT: +SQL> edit fac + +SQL> @fac +Enter value for a: 5 +old 5: a:=&a; +new 5: a:=5; +120 + +PL/SQL procedure successfully completed. + +7. Printing Fibonacci series + +declare +a int:=0; +b int:=1; +n int; +t int; +i int; +begin +n:=&n; +dbms_output.put_line(a); +dbms_output.put_line(b); +for i in 2..n LOOP +t:=a+b; +a:=b; +b:=t; +dbms_output.put_line(t); +end LOOP; +end; +/ + +OUTPUT: +SQL> edit fib + +SQL> @fib +Enter value for n: 9 +old 8: n:=&n; +new 8: n:=9; +0 +1 +1 +2 +3 +5 +8 +13 +21 +34 + +PL/SQL procedure successfully completed. + +8.Printing Sum of Digits (Eg: I/P 425 O/P 4+2+5=11) + +declare +a int; +b int; +s int; +begin +a:=&a; +s:=0; +WHILE a > 0 LOOP +b:=MOD(a,10); +s:=s+b; +a:=FLOOR(a/10); +end LOOP; +dbms_output.put_line('The sum of digits is: '||s); +end; +/ + +OUTPUT: +SQL> edit sdigit + +SQL> @sdigit +Enter value for a: 234 +old 6: a:=&a; +new 6: a:=234; +The sum of digits is: 9 + +PL/SQL procedure successfully completed. + +9. Printing Palindrome. + +declare +a varchar2(20):='naman'; +b varchar2(20); +c varchar2(20); +begin +FOR i in REVERSE 1..Length(a) LOOP +b:=Substr(a,i,1); +c:=c||''||b; +end LOOP; +IF c = a +then +dbms_output.put_line(c||' is palndrome'); +ELSE +dbms_output.put_line(c||' is not palndrome'); +end IF; +end; +/ + +OUTPUT: + +SQL> edit plan + +SQL> @plan +naman is palndrome + +PL/SQL procedure successfully completed. + +10. Adding only the odd numbers from user input using loop. (Eg: I/P 4,8,7,2,3,9,6 O/P 7+3+9=19) + +DECLARE + input_string VARCHAR2(100) := '4,5,6,7'; + total_odd_sum NUMBER := 0; + num VARCHAR2(10); +BEGIN + LOOP + num := SUBSTR(input_string, 1, INSTR(input_string, ',') - 1); + input_string := SUBSTR(input_string, INSTR(input_string, ',') + 1); + IF MOD(TO_NUMBER(num), 2) = 1 THEN + total_odd_sum := total_odd_sum + TO_NUMBER(num); + END IF; + EXIT WHEN INSTR(input_string, ',') = 0; + END LOOP; + IF MOD(TO_NUMBER(input_string), 2) = 1 THEN + total_odd_sum := total_odd_sum + TO_NUMBER(input_string); + END IF; + + DBMS_OUTPUT.PUT_LINE('Sum of odd numbers: ' || total_odd_sum); +END; +/ + +OUTPUT: + +SQL> edit osum + +SQL> @osum +Sum of odd numbers: 12 + +PL/SQL procedure successfully completed. +DBMS Lab 9.txt +Displaying DBMS Lab 9.txt. +Lab 9 +Gayathry S Warrier Computer Science (Yeshwanthpur) +• +Oct 7 (Edited Oct 7) +100 points +Due Oct 7 +Dear students +Complete the following list of simple programs in PL/SQL +1. Addition of two numbers +2. Area of Circle +3. Biggest of three numbers +4. Printing 1 to n natural numbers using + (i) simple loop + (ii) While loop + (iii) For loop +5. Printing 1 to n natural numbers in reverse using + (i) simple loop + (ii) While loop + (iii) For loop +6. Printing Factorial of a number +7. Printing Fibonacci series +8.Printing Sum of Digits (Eg: I/P 425 O/P 4+2+5=11) +9. Printing Palindrome. +10. Adding only the odd numbers from user input using loop. (Eg: I/P 4,8,7,2,3,9,6 O/P 7+3+9=19) +Class comments +" +8RxhF0y1,Bisschen mehr Python,rric,Python,Tuesday 17th of October 2023 06:51:37 AM CDT,"# Etwas mehr Informationen zu Python [Mu: Python 3] +# Copyright 2021-2023 Roland Richter + +# Schreibe Text in die Konsole +print(""Hallo Welt!"") + +# QUIZ Jede dieser Zeilen ist fehlerhaft; siehst du, warum? +# Lösche ein '#'-Zeichen und beobachte, was passiert: +# pirnt(""Hallo Welt!"") +# print(""Hallo Welt!"" +# print(""Hallo Welt!) +# print(""Hallo Welt!"")) +# print(""Hallo Wlet!"") + +# TIPP Um deinen Code auf Fehler zu prüfen, drücke ""Prüfen""; +# oft ist es auch hilfreich, deinen Code mit ""Tidy"" aufzuräumen. + +# Noch einige Fakten über Python: +name = ""Guido van Rossum"" +year = 1991 +# `name` ist eine Variable und enthält Text; `year` ist auch eine Variable +# und enthält eine Zahl. print() kann sowohl Text als auch Zahlen ausgeben. +print(""Python wurde"", year, ""von"", name, ""entwickelt."") + +# TIPP Du kannst sowohl """" als auch '' als Anführungszeichen für Text verwenden +# 🠗 🠗 🠗 🠗 +print('2021 war Python ""Programmiersprache des Jahres"" des TIOBE Index') + +# TIPP Das ""Schlange""-Zeichen findest du auf https://old.unicode-table.com/en/1F40D/ +print(""Für Python wird oft das 'Schlange'-Zeichen verwendet"", ""🐍"") + +# Mit + kannst du nicht nur Zahlen addieren, sondern auch Text verbinden: +flying_circus = ""Monty Python"" +print(""aber der Name stammt von der britischen Komikergruppe "" + flying_circus) +print(""Die aktuelle Version der Sprache ist Python"", 1 + 1 + 1) + + +# ---------------------------------------------------------------------- +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +" +nKW7v9M7,Erstelle_deine_Formeln,rric,Python,Tuesday 17th of October 2023 06:49:16 AM CDT,"# Zeigt Berechnungen mit ganzen Zahlen und Kommazahlen +# Copyright 2022 Roland Richter + +print(""=== Arithmetische Operatoren ==="") + +print(""Addition: 42 + 3.14 ist"", 42 + 3.14) +print(""Subtraktion: 42 - 3.14 ist"", 42 - 3.14) +print(""Multiplikation: 42 * 3.14 ist"", 42 * 3.14) + +print(""Division: 17 / 5 ist"", 17 / 5) +print(""Ganzzahlige Division: 17 // 5 ist"", 17 // 5) +print(""Rest bei Division (modulo): 17 % 5 ist"", 17 % 5) + +print(""=== Zuweisungsoperatoren ==="") + +x = 42 +print(""mache 'x = 42', und x ist"", x) +x += 3.14 +print(""mache 'x += 3.14', und x ist jetzt"", x) + +y = 42 +print(""mache 'y = 42', und y ist"", y) +y -= 3.14 +print(""mache 'y -= 3.14', und y ist jetzt"", y) + +z = 42 +print(""mache 'z = 42', und z ist"", z) +z *= 3.14 +print(""mache 'z *= 3.14', und z ist jetzt"", z) + +print(""=== Vergleichsoperatoren ==="") + +if x == y: + print(""x ist gleich y:"", x, ""=="", y) +if x != y: + print(""x ist ungleich y:"", x, ""!="", y) +if x < y: + print(""x ist kleiner als y:"", x, ""<"", y) +if x > y: + print(""x ist größer als y:"", x, "">"", y) +if y <= z: + print(""y ist kleiner oder gleich z:"", y, ""<="", z) +if y >= z: + print(""y ist größer oder gleich z:"", y, "">="", z) + +print(""=== Ganze Zahlen (integers) ==="") + +print(""Die Antwort ist:"", 42) +print(""Die Zahl 42 als binäre Zahl:"", bin(42)) # starts with prefix 0b +print(""Die Zahl 42 als hexadezimale Zahl:"", hex(42)) # starts with prefix 0x + +print( + ""Größte natürliche 8-bit Zahl:"", + bin(0b11111111), + ""="", + 0b11111111, + ""="", + hex(0b11111111), +) + +# ---------------------------------------------------------------------- +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +" +8p93RzSf,Dunkelblauer_Meeresblick,rric,Python,Tuesday 17th of October 2023 06:48:21 AM CDT,"# Malt einen Meeresblick mit Kreisen und Rechtecken [Mu: Pygame Zero] +# Copyright 2023 Roland Richter + +# Erzeuge ein rechteckiges 800×500 Fenster +WIDTH = 800 +HEIGHT = 500 + +# PROBIERE die Größe des Fensters zu ändern + +def draw(): + # Setze den Hintergrund auf ""Light sky blue"" + screen.fill(""#87CEEB"") + + # Zeichne eine Insel in ""La Salle Green"" + screen.draw.filled_circle((0.5*WIDTH, HEIGHT), 0.3*HEIGHT, ""#087830"") + + # Male das Meer quer über den unteren Teil des Fensters in ""Dark cerulean"" + screen.draw.filled_rect(Rect((0, 0.8*HEIGHT), (WIDTH, HEIGHT)), ""#08457E"") + + # Male eine weiße Wolke ... + screen.draw.filled_circle((0.75*WIDTH, 0.30*HEIGHT), 42, ""white"") + screen.draw.filled_circle((0.72*WIDTH, 0.31*HEIGHT), 42, ""white"") + screen.draw.filled_circle((0.77*WIDTH, 0.28*HEIGHT), 42, ""white"") + screen.draw.filled_circle((0.79*WIDTH, 0.32*HEIGHT), 42, ""white"") + + # ... und die gelbe Sonne + screen.draw.filled_circle((850, 70), 45, ""yellow"") + + # Du kannst die Sonne nicht sehen? Hmm ... warum nicht? + # PROBIERE den Kreis an einer passenden Stelle zu malen + + # PROBIERE weitere Wolken zu malen; oder Vögel im Himmel; oder ... + +def update(): + pass + +# ---------------------------------------------------------------------- +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# Write your code here :-) +" +ibxQKBRc,Halloween,Guyyyyz,JSON,Tuesday 17th of October 2023 06:45:23 AM CDT,"['ลูกอม 1 เม็ด','ลูกอม 2 เม็ด','ลูกอม 13 เม็ด','ฟักทอง 1 ลูก','ลูกอมทองคำ','ลูกอมหน้าฟักทอง 1 เม็ด','ลูกอมบ๊วย','ช็อกบอมบ์','ลูกอม 1 เม็ด','ลูกอม 1 เม็ด','ลูกอม 3 เม็ด','ลูกอม 8 เม็ด','ลูกอม 14 เม็ด','ลูกกวาด 2 อัน','ช็อคโกแลต','ลูกอม 1 เม็ด','ลูกอม 1 เม็ด','ลูกอม 1 เม็ด','ลูกอม 1 เม็ด','ลูกอม 1 เม็ด','ลูกอม 4 เม็ด','ลูกอม 9 เม็ด','ลูกอม 15 เม็ด','ลูกกวาด 3 อัน','ฟังทองทองคำ','ลูกอม 1 เม็ด','ลูกอม 1 เม็ด','ลูกอม 1 เม็ด','ลูกอม 1 เม็ด','ลูกอม 1 เม็ด','ลูกอม 5 เม็ด','ลูกอม 10 เม็ด','อดได้ลูกอม','ลูกกวาด 4 อัน','ลูกกวาดทองคำ','ลูกอมกาแฟ','ลูกอม 1 เม็ด','ลูกอม 1 เม็ด','ลูกอม 1 เม็ด','ลูกอม 1 เม็ด','ลูกอม 6 เม็ด','ลูกอม 11 เม็ด','ความว่างเปล่า','ลูกกวาด 5 อัน','ลูกอม 1 เม็ด','M&M','ลูกอม 7 เม็ด','ลูกอม 12 เม็ด']" +Sqi2EtXq,keypad,Dalobie,Lua,Tuesday 17th of October 2023 06:36:41 AM CDT,"local screen =peripheral.wrap(""Back"") +pass = """" +Pass = ""777"" +k=3 +screen.clear() +screen.setTextColor(8192) +screen.setCursorPos(3,1) +screen.write(""789"") +screen.setCursorPos(3,2) +screen.write(""456"") +screen.setCursorPos(3,3) +screen.write(""123"") +screen.setCursorPos(4,4) +screen.write(""0 >"") +screen.setTextColor(16384) +screen.setCursorPos(2,4) +screen.write(""x"") +screen.setCursorPos(k,5) +screen.setCursorBlink(true) +screen.setTextColor(16) +while true do + if k>6 then + k=3 + pass="""" + screen.setCursorPos(k,5) + screen.clearLine() + end + local event, side, x, y = os.pullEvent(""monitor_touch"") + if x==4 and y==4 then + screen.setCursorPos(k,5) + screen.write(""*"") + pass=pass..""0"" + k=k+1 + end + if x==3 and y==3 then + screen.setCursorPos(k,5) + screen.write(""*"") + pass=pass..""1"" + k=k+1 + end + if x==4 and y==3 then + screen.setCursorPos(k,5) + screen.write(""*"") + pass=pass..""2"" + k=k+1 + end + if x==5 and y==3 then + screen.setCursorPos(k,5) + screen.write(""*"") + pass=pass..""3"" + k=k+1 + end + if x==3 and y==2 then + screen.setCursorPos(k,5) + screen.write(""*"") + pass=pass..""4"" + k=k+1 + end + if x==4 and y==2 then + screen.setCursorPos(k,5) + screen.write(""*"") + pass=pass..""5"" + k=k+1 + end + if x==5 and y==2 then + screen.setCursorPos(k,5) + screen.write(""*"") + pass=pass..""6"" + k=k+1 + end + if x==3 and y==1 then + screen.setCursorPos(k,5) + screen.write(""*"") + pass = pass..""7"" + k=k+1 + end + if x==4 and y==1 then + screen.setCursorPos(k,5) + screen.write(""*"") + pass=pass..""8"" + k=k+1 + end + if x==5 and y==1 then + screen.setCursorPos(k,5) + screen.write(""*"") + pass=pass..""9"" + k=k+1 + end + if x==2 and y==4 then + screen.setCursorPos(1,5) + screen.clearLine() + k=3 + pass = """" + screen.setCursorPos(k,5) + end + if x==6 and y==4 then + if pass==Pass then + pass="""" + k=3 + screen.setCursorPos(1,5) + screen.clearLine() + screen.setCursorPos(k,5) + print(""YAY"") + end + end +end"