Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
| #!/usr/bin/env python3 | |
| import argparse, os, gc, json, random, csv | |
| os.environ.setdefault("PYTORCH_CUDA_ALLOC_CONF", "expandable_segments:True") | |
| # os.environ.setdefault("CUDA_LAUNCH_BLOCKING", "1") | |
| import numpy as np | |
| import torch | |
| import torch.nn.functional as F | |
| from datasets import load_dataset |
| /* | |
| Graph implementation following tutorial http://www.geeksforgeeks.org/graph-and-its-representations/ | |
| */ | |
| #include<iostream> | |
| #include<cstdlib> | |
| using namespace std; | |
| //struct for an adjacency list node | |
| struct AdjListNode{ | |
| int data; |
| /* AVL Tree Implementation in C++ */ | |
| /* Harish R */ | |
| #include<iostream> | |
| using namespace std; | |
| class BST | |
| { |
| #include <iostream> | |
| #include <math.h> | |
| using namespace std; | |
| template <class T> | |
| struct Node { | |
| T value; | |
| Node *left; | |
| Node *right; |
| #include <iostream> | |
| using namespace std; | |
| struct node{ | |
| int value; | |
| node *left; | |
| node *right; | |
| }; |
| #include <cstring> | |
| class Disjoint_Union | |
| { | |
| public: | |
| Disjoint_Union(const int & n); | |
| int create(); | |
| void merge(int i , int j); | |
| int find(const int & i); | |
| int size(){ |