This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define EPS 1e-6 | |
| lat_h = floor(lat); | |
| lat_m = floor(60.0 * (lat - lat_h)); | |
| lat_s = 3600.0 * ((lat - lat_h) - (lat_m / 60.0)); | |
| if (fabs(lat_s - 60) < EPS) { | |
| lat_s = 0; | |
| lat_m++; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Cílem práce je naprogramovat ftp server. Server bude konfigurovatelný pomocí souboru. Konfigurovat půjde rozhraní, kde server naslouchá, kořeny FTP serveru, generovaný log přenosů a databáze uživatelů a jejich hesel. Server bude umožňovat vytvoření virtuálního filesystému. Virtuálním filesystémem se rozumí souborový systém, na který bude přistupovat ftp client a který se bude mapovat na nějaké adresáře/soubory na disku. Tzn. clientův adresářový strom bude vypadat následovně: /home/user1 mapuje na /mnt/x/home/user1 /www mapuje na /var/cache/www /home/user_list.txt mapuje na /var/ftpclient/user_list.txt Přihlášený uživatel tedy uvidí adresáře /home/user1 a /www a soubory /home/user_list.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Traceback (most recent call last): | |
| File "./run.py", line 38, in <module> | |
| main(sys.argv[1:]) | |
| File "./run.py", line 33, in main | |
| rnn.rnn.run() | |
| File "/home/samurai/Smiles/smiles-neural-network/rnn/rnn.py", line 569, in run | |
| epochsDone = train(model, trainIn, trainLabel, (testIn, testLabel)) | |
| File "/home/samurai/Smiles/smiles-neural-network/rnn/rnn.py", line 108, in train | |
| validation_data = (validation[0], formattedValid)) | |
| File "/home/samurai/.local/lib/python2.7/site-packages/keras/models.py", line 413, in fit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| #include <omp.h> | |
| using namespace std; | |
| int SIZE = 1e8; | |
| int main() { | |
| srand(time(NULL)); | |
| int * aligned = new int[SIZE], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 8.000, 0.002, 0.000, 0.000, 0.001, 0.001, 0.000, 0.000, 0.000, 0.402, 0.000, | |
| 7.000, 0.002, 0.007, 0.000, 0.001, 0.001, 0.001, 0.000, 0.700, 0.000, 0.003, | |
| 5.000, 0.000, 0.001, 0.000, 0.001, 0.004, 0.441, 0.001, 0.000, 0.001, 0.001, | |
| 0.000, 0.755, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.001, 0.003, 0.000, | |
| 0.000, 0.698, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.001, 0.006, 0.000, | |
| 5.000, 0.000, 0.002, 0.000, 0.001, 0.004, 0.604, 0.001, 0.001, 0.001, 0.001, | |
| 0.000, 0.703, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.005, 0.000, | |
| 5.000, 0.000, 0.001, 0.000, 0.001, 0.003, 0.334, 0.002, 0.000, 0.004, 0.000, | |
| 0.000, 0.732, 0.001, 0.000, 0.000, 0.000, 0.000, 0.000, 0.001, 0.003, 0.000, | |
| 8.000, 0.001, 0.000, 0.000, 0.001, 0.001, 0.001, 0.000, 0.000, 0.520, 0.000, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int N; | |
| struct Edge { int from, to, residue; }; | |
| vector<Edge> edges; | |
| vector<int> graph[N]; // graph[node] = indexes of outgoing edges | |
| void add_edge(int from, int to, int capacity) { | |
| graph[from].push_back(edges.size()); | |
| edges.push_back(Edge{from, to, capacity}); | |
| graph[to].push_back(edges.size()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| typedef unsigned long long u64; | |
| vector<u64> gen(u64 x, u64 k) { | |
| u64 bound = 1ULL << x; | |
| vector<u64> result; | |
| for (u64 i = 0; i < bound; i++) { | |
| if (__builtin_popcountll(i) == k) { | |
| result.push_back(i); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| typedef unsigned long long u64; | |
| vector<u64> gen(u64 x, u64 k) { | |
| u64 bound = 1ULL << x, p = 0; | |
| for (u64 i = 0; i < k; i++) | |
| p |= 1ULL << i; | |
| vector<u64> result; | |
| // courtesy of http://graphics.stanford.edu/~seander/bithacks.html#NextBitPermutation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [1] EREW / CREW / CRCW (priority, arbitrary, common) [4b] | |
| [2] typy schedulingu [4b] | |
| [3] definujte hranovy rez a bisekcnu sirku [4b] | |
| [4] preco je tento kod mergesortu pomaly? [8b] | |
| [5] synchronizacia pristupu [8b] | |
| [6] paralelna binarna scitacka / PPS [10b] | |
| [7] Cannon [12b] |
OlderNewer