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
| SPARK NEC — Privacy Policy | |
| Last updated: April 23, 2026 | |
| SPARK NEC ("SPARK," "the App") is developed by Spark Benchmark. This policy explains what data we collect, how we use it, and your rights. | |
| What We Collect | |
| SPARK collects the following data when you use the app: | |
| Photos you submit for analysis. When you take or select a photo for an NEC inspection, that image is sent to our server for AI analysis. Photos are processed in real time and stored on our server to improve inspection accuracy. | |
| Inspection data. The AI-generated verdicts, NEC code citations, and any corrections or feedback you provide are stored to improve the system. |
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
| import random | |
| def randSelect (array, rank): | |
| print("Looking for value with rank %s in the array:" % rank) | |
| print(array) | |
| i = random.randint(0, len(array)-1) | |
| array, pos = inPlacePartition(array, i) | |
| direction = getDirection(rank, pos) | |
| print("Selected %s as the pivot; its rank is %s; Thus, we recurse on %s" % (array[0], pos, direction)) |
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 <functional> | |
| #include <iostream> | |
| void print(const int &i) | |
| { | |
| std::cout << i << '\n'; | |
| } | |
| int main() | |
| { |
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
| var insert = function(array, rightIndex, value) { | |
| var i = 0; | |
| for (var j = 1; array[j] < array[i]; j++) { | |
| var tmp = array[i]; | |
| array[i] = array[j]; | |
| array[j] = tmp; | |
| i++; | |
| break; | |
| } | |
| for (i = rightIndex; value < array[i] && i >= 0; 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
| /* Returns either the index of the location in the array, | |
| or -1 if the array did not contain the targetValue */ | |
| var doSearch = function(array, targetValue) { | |
| var min = 0; | |
| var max = array.length - 1; | |
| var guess; | |
| var guessCount = 0; | |
| while (max >= min) { | |
| guessCount ++; | |
| guess = Math.floor((min + max)/2); |
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
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Wed Dec 9 14:55:43 2015 | |
| This script is to convert the txt annotation files to appropriate format needed by YOLO | |
| @author: Guanghan Ning | |
| Email: gnxr9@mail.missouri.edu | |
| """ | |
| import os | |
| from os import walk, getcwd |
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
| void insertionSort(Array * S, int n) { | |
| if (n <= 1) return; // 1. Base case: Return if last (null) mem point | |
| insertionSort(S, n-1); // 2. recursively go through each element in array, starting with last | |
| int last = S[n-1]; // 3. set current last element | |
| int j = n-2; // 4. Run through each previous element | |
| while (j >= 0 && S[j] > last) { // 5. While that element is bigger than the last element | |
| S[j+1] = S[j]; // 6. Move its location forward in the array. | |
| j--; // 7. Go on to the next element in array. | |
| } | |
| S[j+1] = last; // 8. set last element to the final point in the array. |
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
| // Simple Splay | |
| #include<iostream> | |
| using namespace std; | |
| template<class T> | |
| struct Node { | |
| T value; | |
| Node *l, *r, *p; |
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
| #ifndef SPLAY_TREE_H | |
| #define SPLAY_TREE_H | |
| #include <utility> | |
| #include <iostream> | |
| #include "Array.h" | |
| #include "bst.h" | |
| #include <cassert> | |
| using namespace std; |
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
| // If exp is even, split in half twice and call each recursively | |
| // otherwise, split in half twice and call each recursively AND multiply x | |
| // Questions: | |
| // What if exponent is 1? -- Then it will return x*1*1 | |
| // What if exponent is 3+? -- If even, split. If odd, multiply next split value to x | |
| int power(int base, int exponent) { | |
| if (exponent == 0) return 1; | |
| else if (exponent%2 == 0) // if even |
NewerOlder