text
stringlengths
2
104M
meta
dict
#pragma once #include <bits/stdc++.h> using namespace std; // Union Find by size supporting undos // Indices are 0-indexed // Constructor Arguments: // N: the number of elements in the set // Fields: // UF: a vector of integers representing the parent of each element in the // tree, or the negative of the size...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Weighted Union Find by size with path compression // Indices are 0-indexed // Template Arguments: // T: the type of the weight // Op: a struct with the cumulative operation to combine weights // Required Functions: // operator (l, r): combines...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Union Find by size with path compression // Indices are 0-indexed // Constructor Arguments: // N: the number of elements in the set // Fields: // UF: a vector of integers representing the parent of each element in the // tree, or the negative of the...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Weighted Union Find by size supporting undos // Indices are 0-indexed // Template Arguments: // T: the type of the weight // Op: a struct with the cumulative operation to combine weights // Required Functions: // operator (l, r): combines the ...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> #include "../../search/BinarySearch.h" using namespace std; // Union Find by size supporting queries for a past version of // the data structure but only allowed for updates to the latest version // Constructor Arguments: // N: the number of elements in the set // Fields: // ...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Persistent Array where copy assignment/constructor creates // a new version of the data structure // Indices are 0-indexed // Template Arguments: // T: the type of each element // Constructor Arguments: // N: the size of the array // A: a vector of ...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Builds a cartesian tree where all vertices j in vertex i's subtree have // !cmp(A[i], A[j]) and (cmp(A[j], A[i]) or j < i) // Indices are 0-indexed // Template Arguments: // T: the type of each element in the array // Cmp: the comparator to compare tw...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Binary Trie // Template Arguments: // T: the type of the values being inserted and queried // Constructor Arguments: // MX: the maximum value of v for any function call // Functions: // empty(): returns whether the trie is empty or not // insert(v):...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> #include "Splay.h" using namespace std; // Operations on ranges of a dynamic array, backed by a splay tree // Supports point/range updates/queries, range reversals, // and binary searching as long as Node contains the appropriate flags // Also supports insertion and erasing at a...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Sample node structs for Splay, DynamicRangeOperations, // and LinkCutTree with different required fields required for each // Sample node class for a single value of type T, supporting range reversals, // and point assignment // Template Arguments: // ...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Generic Splay Tree node operations supporting a generic node class (such // as the structs in BSTNode) // Can be used in conjunction with DynamicRangeOperations to support // range operations using splay node operations // Indices are 0-indexed and rang...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Bottom up 2D segment tree supporting point updates and range queries // Indices are 0-indexed and ranges are inclusive // Template Arguments: // C: struct to combine data and lazy values // Required Fields: // Data: the data type // Lazy: ...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Top down segment tree supporting point updates and range queries, // with a lazy template argument to enable range updates // Indices are 0-indexed and ranges are inclusive // Template Arguments: // LAZY: boolean to indicate whether or not range updates...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Top down segment tree supporting advanced range updates and queries // Indices are 0-indexed and ranges are inclusive // Template Arguments: // C: struct to combine data and lazy values // Required Fields: // Data: the data type // Lazy: t...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Bottom up segment tree supporting range updates and range queries // Indices are 0-indexed and ranges are inclusive // Template Arguments: // C: struct to combine data and lazy values // Required Fields: // Data: the data type // Lazy: the...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Bottom up segment tree supporting point updates and range queries // Indices are 0-indexed and ranges are inclusive // Template Arguments: // C: struct to combine data and lazy values // Required Fields: // Data: the data type // Lazy: the...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Top down dynamic segment tree supporting range updates and range queries // Indices are 0-indexed and ranges are inclusive // Template Arguments: // IndexType: the type of the index of the array // LAZY: boolean to indicate whether or not range updates ...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Segment Tree supporting range updates with updates in the form of // adding m + b, 2m + b, 3m + b, ... to the interval [l, r], // and range sum queries // Indices are 0-indexed and ranges are inclusive // Template Arguments: // T: the type of the elem...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Fenwick Tree or Binary Indexed Tree supporting point updates // and range queries over a cumulative functor, such as sum, max, and min, // in any number of dimensions // Indices are 0-indexed and ranges are inclusive // Template Arguments: // D: the n...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Fenwick Tree or Binary Indexed Tree supporting range updates // and point queries, over a cumulative functor, such as sum, max, and min, // in any number of dimensions // Indices are 0-indexed and ranges are inclusive // Order of arguments for update di...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> #include "../../PolicyBasedDataStructures.h" #include "../../sqrt/SqrtBufferSimple.h" #include "../../sqrt/SqrtBuffer.h" using namespace std; using namespace __gnu_pbds; // A collection of sparse fenwick trees implemented in various methods // Some are only sparse in 1 dimension, ...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> #include "FenwickTree1D.h" #include "../../../math/LagrangePolynomialInterpolation.h" using namespace std; // FenwickTree supporting range updates with updates in the form of // adding v, 2^k v, 3^k v, ... to the range [l, r], and range sum queries // Indices are 0-indexed and r...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> #include "FenwickTreeRangePoint.h" using namespace std; // Supports range additions and range sum queries in 2D where // Indices are 0-indexed and ranges are inclusive // Template Arguments: // T: the type of the element of the grid // Constructor Arguments: // N: the size of ...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Fenwick Tree or Binary Indexed Tree supporting point updates // and range queries over a cumulative function or functor, // such as max and min, in K dimensions, even if K is not known at // compile time // Indices are 0-indexed and ranges are inclusi...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> #include "FenwickTreeRangePoint1D.h" using namespace std; // Fenwick Tree supporting range updates with updates in the form of // adding m + b, 2m + b, 3m + b, ... to the range [l, r], // and range sum queries // Indices are 0-indexed and ranges are inclusive // numeric_limits...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Fenwick Tree or Binary Indexed Tree supporting range updates // and point queries, over a cumulative functor, such as sum, max, and min, // in 1 dimension // Indices are 0-indexed and ranges are inclusive // Order of arguments for update differs slightl...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> #include "../../PolicyBasedDataStructures.h" using namespace std; using namespace __gnu_pbds; // A collection of sparse fenwick trees implemented in various methods // If bsearch is not required and online is enforced, then SqrtBufferSimple and // SqrtBuffer should be used inste...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Fenwick Tree or Binary Indexed Tree supporting point updates // and range queries over a cumulative function or functor, // such as sum, max, and min, in 1 dimension // Indices are 0-indexed and ranges are inclusive // Template Arguments: // T: the ty...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> #include "FenwickTree1D.h" using namespace std; // Fenwick Tree or Binary Indexed Tree supporting range updates // and range sum queries in 1 dimension // Indices are 0-indexed and ranges are inclusive // numeric_limits<T>::max() * N must not overflow // Template Arguments: // ...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> using namespace std; // Fenwick Tree supporting range sum queries where all values are 0 or 1, // and values can be updated after they are set // Indices are 0-indexed and ranges are inclusive // Constructor Arguments: // N: the size of the array // Functions: // set(i, v): ...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> #if __cplusplus < 201402L #include "../../../utils/MakeUnique.h" #endif using namespace std; // Skew Heap supporting merges // Template Arguments: // T: the type of each element // Cmp: the comparator to compare two values of type T, // convention is same as std::priorit...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> #include "../../../utils/Random.h" using namespace std; // Persistent Heap supporting merges where copy assignment/constructor creates // a new version of the data structure // Template Arguments: // T: the type of each element // Cmp: the comparator to compare two values of...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> #include "../../../utils/Random.h" using namespace std; // Persistent Heap supporting merges and increments where // copy assignment/constructor creates a new version of the data structure // Template Arguments: // T: the type of each element // Cmp: the comparator to compar...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
#pragma once #include <bits/stdc++.h> #if __cplusplus < 201402L #include "../../../utils/MakeUnique.h" #endif using namespace std; // Skew Heap supporting merges and increments // Template Arguments: // T: the type of each element // Cmp: the comparator to compare two values of type T, // convention is same ...
{ "repo_name": "wesley-a-leung/Resources", "stars": "34", "repo_language": "C++", "file_name": "SkewHeapIncremental.h", "mime_type": "text/x-c++" }
cmake_minimum_required(VERSION 3.4) project(FeatureDetector CXX) add_subdirectory(src/x86) target_include_directories(FeatureDetector PUBLIC src) if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) add_executable(FeatureDetector_main src/Main.cpp) target_link_libraries(FeatureDetector_main PUBLIC FeatureDetector) end...
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
Program('bin/FeatureDetector', ['src/Main.cpp', 'src/x86/cpu_x86.cpp'])
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
 Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FeatureDetector", "FeatureDetector\FeatureDetector.vcxproj", "{5AF4062D-386F-48AA-B824-2C10A4B1BA97}" EndPr...
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
# FeatureDetector A simple app that detects what hardware features are supported by the host CPU and operating system. ----- Sample output for a Haswell processor: ```` CPU Vendor String: GenuineIntel CPU Vendor: AMD = No Intel = Yes OS Features: 64-bit = Yes OS AVX = Yes ...
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
/* Main.cpp * * Author : Alexander J. Yee * Date Created : 04/17/2015 * Last Modified : 04/17/2015 * */ #include <iostream> using std::cout; using std::endl; #include "x86/cpu_x86.h" using namespace FeatureDetector; int main(){ cout << "CPU Vendor String: " << cpu_x86::get_vendor_string...
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
/* cpu_x86_Linux.ipp * * Author : Alexander J. Yee * Date Created : 04/12/2014 * Last Modified : 04/12/2014 * */ //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// ///////////////////...
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
/* cpu_x86.h * * Author : Alexander J. Yee * Date Created : 04/12/2014 * Last Modified : 04/12/2014 * */ #pragma once #ifndef _cpu_x86_H #define _cpu_x86_H //////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////...
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
/* cpu_x86.cpp * * Author : Alexander J. Yee * Date Created : 04/12/2014 * Last Modified : 04/12/2014 * */ //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /////////////////////////...
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
/* cpu_x86_Windows.ipp * * Author : Alexander J. Yee * Date Created : 04/12/2014 * Last Modified : 04/12/2014 * */ //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /////////////////...
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
add_library(FeatureDetector cpu_x86.cpp cpu_x86.h cpu_x86_Linux.ipp cpu_x86_Windows.ipp)
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform...
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup /> </Project>
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <Filter Include="Source Files"> <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx...
{ "repo_name": "Mysticial/FeatureDetector", "stars": "246", "repo_language": "C++", "file_name": "FeatureDetector.vcxproj.filters", "mime_type": "text/xml" }
## Contributor License Agreement By contributing you agree to the [LICENSE](https://github.com/simonebrunozzi/open-guide-to-learning-tech-geek-nerdy-stuff/blob/master/LICENSE) of this repository. ## Contributor Code of Conduct By contributing you agree to respect the [Code of Conduct](https://github.com/simonebrunozzi...
{ "repo_name": "simonebrunozzi-zz/open-guide-to-learning-tech-geek-nerdy-stuff", "stars": "51", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
# Contributor Code of Conduct As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other acti...
{ "repo_name": "simonebrunozzi-zz/open-guide-to-learning-tech-geek-nerdy-stuff", "stars": "51", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
# Open Guide To Learning Tech/Geek/Nerdy Stuff A list of resources to learn tech/geek/nerdy related topics, e.g. programming languages, android development, math, korean language and the like. ## Introduction Over time I've built a decent list of links to web resources which contain good material to learn stuff. Wha...
{ "repo_name": "simonebrunozzi-zz/open-guide-to-learning-tech-geek-nerdy-stuff", "stars": "51", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
 Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Express 2013 for Windows Desktop VisualStudioVersion = 12.0.21005.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tetris-win32", "tetris-win32.vcxproj", "{278AC16E-53B1-4910-BAD7-5B146DAF9...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Pla...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
Classic tetris game implemented with Win32 API. ![Screenshot](https://raw.github.com/eliangcs/tetris-win32/master/screenshot.png)
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
#ifndef GAME_H #define GAME_H #include "Level.h" #include "PieceSet.h" #include "Piece.h" // // Game flow. // Only Game and DrawEngine are exposed to main(). // class Game { public: Game(DrawEngine &de); ~Game(); // Restarts the game void restart(); // Handles player's key pr...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
#include "PieceSet.h" PieceSet::PieceSet() { for (int i = 0; i < NUM_PIECES; i++) for (int j = 0; j < NUM_ROTATIONS; j++) pieces[i][j] = 0; POINT apt[NUM_ROTATIONS]; // 0, I piece, red apt[0].x = 0; apt[0].y = 0; apt[1].x = 0; apt[1].y = 1; apt[2].x = 0;...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
#include "Piece.h" #include <iostream> using namespace std; Piece::Piece(int pieceId, int pieceRotation, COLORREF pieceColor, const POINT *apt, int numPoints) : id(pieceId), rotation(pieceRotation), nPoints(numPoints), color(pieceColor), width(0), height(0) { POINT bottomLeft = apt[0]; ...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
#ifndef DRAW_ENGINE_H #define DRAW_ENGINE_H #include "Piece.h" #include <windows.h> // // Draw engine implemented with Win32 API GDI. // class DrawEngine { public: // hdc: handle to DC // hwnd: handle to window // pxPerBlock: cell size in pixels // width & height: level width and height...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
#include "Level.h" #include <ctime> Level::Level(DrawEngine &de, int width, int height) : de(de), width(width), height(height), lastTime(0.0), speed(500), score(-1) { srand(time(0)); // Allocate the drawing board board = new COLORREF*[width]; for (int i = 0; i < width; i++) { b...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
#include "Game.h" #include <iostream> using namespace std; Game::Game(DrawEngine &de) : de(de), isPaused(false) { level = new Level(de, 10, 20); } Game::~Game() { delete level; } void Game::restart() { delete level; level = new Level(de, 10, 20); isPaused = false; repa...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
#include "Piece.h" #include "Game.h" #include <windows.h> #include <iostream> using namespace std; const int PX_PER_BLOCK = 25; // Cell size in pixels const int SCREEN_WIDTH = 10; // Level width in cells const int SCREEN_HEIGHT = 20; // Level height in cells const int GAME_SPEED = 33; // Update...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
#ifndef LEVEL_H #define LEVEL_H #include "DrawEngine.h" #include "PieceSet.h" #include <windows.h> // // Level stores current snapshot of the game, including the dropping piece, // the next piece, the piece generator (PieceSet), the position of the // dropping piece, the width and height of the level, the d...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
#include "DrawEngine.h" DrawEngine::DrawEngine(HDC hdc, HWND hwnd, int pxPerBlock, int width, int height) : hdc(hdc), hwnd(hwnd), width(width), height(height) { GetClientRect(hwnd, &rect); SaveDC(hdc); // Set up coordinate system SetMapMode(hdc, MM_ISOTROPIC); S...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
#ifndef PIECE_H #define PIECE_H #include <windows.h> // // A piece in Teris game. This class is only used by PieceSet. Other classes // access Piece through PieceSet. // // Every piece is composed by 4 POINTs, using Cartesian coordinate system. // That is, the most bottom left point is (0, 0), the values on...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
#ifndef PIECESET_H #define PIECESET_H #include "Piece.h" // // PieceSet generates 7 types of pieces. Each piece has 4 rotations, so there // are 7 x 4 = 28 configurations in total. // // All 28 configurations are kept in memory after you new PieceSet(). To get // get piece, use getPiece() or getRandomPiece(...
{ "repo_name": "eliangcs/tetris-win32", "stars": "30", "repo_language": "C++", "file_name": "PieceSet.h", "mime_type": "text/x-c++" }
--- title: "Fundamentals of RMarkdown" author: "Mike Frank & Chris Hartgerink" date: "July 31st, 2017" output: revealjs::revealjs_presentation: theme: black highlight: pygments incremental: true center: true transition: slide reveal_options: slideNumber: t...
{ "repo_name": "libscie/rmarkdown-workshop", "stars": "27", "repo_language": "HTML", "file_name": "README.md", "mime_type": "text/plain" }
%% This BibTeX bibliography file was created using BibDesk. %% http://bibdesk.sourceforge.net/ %% Created for Michael Frank at 2017-07-31 09:31:00 -0400 %% Saved with string encoding Unicode (UTF-8) @article{nuijten2016, Author = {Nuijten, Mich{\`e}le B and Hartgerink, Chris HJ and van Assen, Marcel ALM and E...
{ "repo_name": "libscie/rmarkdown-workshop", "stars": "27", "repo_language": "HTML", "file_name": "README.md", "mime_type": "text/plain" }
Version: 1.0 RestoreWorkspace: Default SaveWorkspace: Default AlwaysSaveHistory: Default EnableCodeIndexing: Yes UseSpacesForTab: Yes NumSpacesForTab: 2 Encoding: UTF-8 RnwWeave: Sweave LaTeX: pdfLaTeX
{ "repo_name": "libscie/rmarkdown-workshop", "stars": "27", "repo_language": "HTML", "file_name": "README.md", "mime_type": "text/plain" }
--- title: "RMarkdown for writing reproducible scientific papers" author: '[Mike Frank](mailto:mcfrank@stanford.edu) & [Chris Hartgerink](mailto:chris@libscie.org)' date: '`r Sys.Date()`' output: tufte::tufte_html: toc: yes toc_depth: 1 tufte::tufte_handout: citation_package: natbib latex_engine: pd...
{ "repo_name": "libscie/rmarkdown-workshop", "stars": "27", "repo_language": "HTML", "file_name": "README.md", "mime_type": "text/plain" }
# A workshop for rmarkdown Content for RMarkdown workshop at SIPS 2017. `handout.Rmd` is the tutorial content. You can find the HTML version [here](https://libscie.github.io/rmarkdown-workshop/handout.html) or the PDF version [here](https://libscie.github.io/rmarkdown-workshop/handout.pdf) You'll need [RStudio](http...
{ "repo_name": "libscie/rmarkdown-workshop", "stars": "27", "repo_language": "HTML", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="2e3440ff" base_type_color="8fbcbbff" bookmark_color="147dfaff" brace_mismatch_color="ff786bff" breakpoint_color="ff786bff" caret_background_color="000000ff" caret_color="ffffffff" code_folding_color="ffffffb3" comment_color="63708aff" completion_background_color="333b4fff" completion_ex...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="002b36ff" completion_background_color="3d3d3dff" completion_selected_color="ffffff11" completion_existing_color="ffffff23" completion_scroll_color="ffffff11" completion_font_color="cececeff" caret_color="ffffffff" caret_background_color="000000ff" line_number_color="586e75ff" text_color...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="242424ff" completion_background_color="343434ff" completion_selected_color="464646ff" completion_existing_color="dfdfdf21" completion_scroll_color="ffffffff" completion_font_color="aaaaaaff" caret_color="aaaaaaff" caret_background_color="2c2c2cff" line_number_color="666666ff" text_color...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="282c34ff" completion_background_color="21252bff" completion_selected_color="2c313aff" completion_existing_color="314365ff" completion_scroll_color="2c313aff" completion_font_color="abb2bfff" caret_color="f8f8f0ff" caret_background_color="000000ff" line_number_color="495162ff" safe_line_...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="282828ff" completion_background_color="3d3d3dff" completion_selected_color="ffffff11" completion_existing_color="ffffff23" completion_scroll_color="ffffff11" completion_font_color="cececeff" caret_color="a89984ff" caret_background_color="000000ff" line_number_color="928374ff" text_color...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] symbol_color="bcbcbcff" keyword_color="8fafd7ff" base_type_color="8787afff" engine_type_color="8787afff" user_type_color="8787afff" comment_color="6c6c6cff" string_color="87af87ff" background_color="262626ff" completion_background_color="444444ff" completion_selected_color="6c6c6cff" completion_existi...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="25252aff" completion_background_color="2c2a32ff" completion_selected_color="434244ff" completion_existing_color="dfdfdf21" completion_scroll_color="ffffffff" completion_font_color="aaaaaaff" caret_color="ffffffff" caret_background_color="000000ff" line_number_color="aaaaaa66" text_color...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="ffffffff" base_type_color="af00dbff" bookmark_color="147dfaff" brace_mismatch_color="ff3333ff" breakpoint_color="cccc6633" caret_background_color="000000ff" caret_color="000000ff" code_folding_color="808080ff" comment_color="008000ff" completion_background_color="eeeeeeff" completion_ex...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="282828ff" completion_background_color="3d3d3dff" completion_selected_color="ffffff11" completion_existing_color="ffffff23" completion_scroll_color="ffffff11" completion_font_color="cececeff" caret_color="f8f8f0ff" caret_background_color="000000ff" line_number_color="aaaaaa66" text_color...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="282b34ff" completion_background_color="3d3d3dff" completion_selected_color="ffffff11" completion_existing_color="ffffff23" completion_scroll_color="ffffff11" completion_font_color="cececeff" caret_color="528affff" caret_background_color="000000ff" line_number_color="6a717eff" text_color...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
# Theme previews ## Atom Dark ![Atom Dark](https://archive.hugo.pro/.public/godot-syntax-themes/atom-dark.png) ## Darcula ![Darcula](https://archive.hugo.pro/.public/godot-syntax-themes/darcula.png) ## Dracula ![Dracula](https://archive.hugo.pro/.public/godot-syntax-themes/dracula.png) ## Gruvbox Dark ![Gruvbox...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="1f2430ff" base_type_color="5ce6ccff" bookmark_color="73d0ffff" brace_mismatch_color="ff786bff" breakpoint_color="f28779ff" caret_background_color="1f2430ff" caret_color="ffcc66ff" code_folding_color="ffffffb3" comment_color="5c6773ff" completion_background_color="333b4fff" completion_ex...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="282a36ff" completion_background_color="2c2a32ff" completion_selected_color="434244ff" completion_existing_color="dfdfdf21" completion_scroll_color="ffffffff" completion_font_color="aaaaaaff" caret_color="aeafadff" caret_background_color="000000ff" line_number_color="6272a4ff" text_color...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="f5f5f5ff" completion_background_color="e5e5e5ff" completion_selected_color="d5d5d5ff" completion_existing_color="dfdfdf21" completion_scroll_color="959595ff" completion_font_color="454545ff" caret_color="54494bff" caret_background_color="000000ff" line_number_color="9da39aff" text_color...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="1d1f21ff" base_type_color="99cc99ff" bookmark_color="147dfaff" brace_mismatch_color="ff3333ff" breakpoint_color="ff4d56ff" caret_background_color="000000ff" caret_color="ffffffff" code_folding_color="808080ff" comment_color="7c7c7cff" completion_background_color="3d3d3dff" completion_ex...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="1C1E26ff" completion_background_color="2E303E80" completion_selected_color="6C6F9380" completion_existing_color="D5D8DA20" completion_scroll_color="232530ff" completion_font_color="D5D8DAff" caret_color="e95378ff" caret_background_color="1C1E26ff" line_number_color="D5D8DA80" text_color...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="fdf6e3ff" completion_background_color="ede6d3ff" completion_selected_color="ddd6b3ff" completion_existing_color="dfdfdf21" completion_scroll_color="657b83ff" completion_font_color="444444ff" caret_color="657b83ff" caret_background_color="000000ff" line_number_color="2b91afff" text_color...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
[color_theme] background_color="1e1e1eff" base_type_color="c586c0ff" bookmark_color="147dfaff" brace_mismatch_color="ff3333ff" breakpoint_color="cccc6633" caret_background_color="000000ff" caret_color="aeafadff" code_folding_color="808080ff" comment_color="608b4eff" completion_background_color="2c2a32ff" completion_ex...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
# Godot syntax themes for Godot 4.x ![Screenshot](https://archive.hugo.pro/.public/godot-syntax-themes.png) *The Darcula theme in action.* This repository contains many syntax themes for Godot, for use in the built-in script editor. **This branch contains themes *only* compatible with Godot 4.x.** These themes will...
{ "repo_name": "godotengine/godot-syntax-themes", "stars": "267", "repo_language": "None", "file_name": "README.md", "mime_type": "text/plain" }
status ====== [![Join the chat at DiscordApp](https://img.shields.io/badge/discord-support-blue.svg)](https://discord.gg/vu6Vt9d) My name is r-lyeh and I code videogames :neckbeard: This repo is meant to be a semi-conclusive list of projects in which the author is / has participated in. - The list below is archived...
{ "repo_name": "r-lyeh-archived/statvs", "stars": "343", "repo_language": "None", "file_name": "README.md", "mime_type": "text/html" }
@echo off git fetch origin git reset --hard main "libs/pythonlib/python.exe" -m pip install --force-reinstall -r requirements.txt
{ "repo_name": "Rubiksman78/RenAI-Chat", "stars": "46", "repo_language": "Python", "file_name": "parsing.py", "mime_type": "text/x-script.python" }
# Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of...
{ "repo_name": "Rubiksman78/RenAI-Chat", "stars": "46", "repo_language": "Python", "file_name": "parsing.py", "mime_type": "text/x-script.python" }
@echo off "libs/pythonlib/python.exe" -m pip install numpy==1.23.0 "libs/pythonlib/python.exe" main.py
{ "repo_name": "Rubiksman78/RenAI-Chat", "stars": "46", "repo_language": "Python", "file_name": "parsing.py", "mime_type": "text/x-script.python" }
import os,sys import tkinter as tk import json import yaml # Configuration args = sys.argv[1:] save_ids = os.path.exists("save_text.txt") root = tk.Tk() root.title("RenAI Chat Login") root.geometry("700x250") root.configure(background='#333333') def get_input(): global GAME_PATH global USE_TTS global CHA...
{ "repo_name": "Rubiksman78/RenAI-Chat", "stars": "46", "repo_language": "Python", "file_name": "parsing.py", "mime_type": "text/x-script.python" }
from chatbot.prompting import build_prompt_for from chatbot.model import run_raw_inference import typing as t import logging logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def inference_fn(model,tokenizer,history: str, user_input: str, generation_settings: t.Dict[st...
{ "repo_name": "Rubiksman78/RenAI-Chat", "stars": "46", "repo_language": "Python", "file_name": "parsing.py", "mime_type": "text/x-script.python" }
from pathlib import Path from TTS.utils.manage import ModelManager from TTS.utils.synthesizer import Synthesizer class TTS: """TODO: Add voice conversion and Capacitron support.""" def __init__(self, model_name: str = None, progress_bar: bool = True, gpu=False): """🐸TTS python interface that allows...
{ "repo_name": "Rubiksman78/RenAI-Chat", "stars": "46", "repo_language": "Python", "file_name": "parsing.py", "mime_type": "text/x-script.python" }
import torch from pathlib import Path def infer(spec_gen_model, vocoder_model, str_input, speaker=None): """ Synthesizes spectrogram and audio from a text string given a spectrogram synthesis and vocoder model. Args: spec_gen_model: Spectrogram generator model (FastPitch in our case) v...
{ "repo_name": "Rubiksman78/RenAI-Chat", "stars": "46", "repo_language": "Python", "file_name": "parsing.py", "mime_type": "text/x-script.python" }
from socket import AF_INET, socket, SOCK_STREAM from threading import Thread import os,sys import subprocess import time import simpleaudio as sa try: from tts_api import my_TTS except: my_TTS = None import torch import numpy as np import IPython.display as ipd from login_screen import CONFIG import re impo...
{ "repo_name": "Rubiksman78/RenAI-Chat", "stars": "46", "repo_language": "Python", "file_name": "parsing.py", "mime_type": "text/x-script.python" }
playwright~=1.31.0 simpleaudio~=1.0.4 IPython~=8.10.0 tensorflow-macos~=2.11.0 opencv-python~=4.7.0.72 transformers~=4.26.1 Pillow~=9.4.0 SpeechRecognition~=3.9.0 git+https://github.com/openai/whisper.git tk~=0.1.0 bitsandbytes~=0.37.0 numpy==1.23.0
{ "repo_name": "Rubiksman78/RenAI-Chat", "stars": "46", "repo_language": "Python", "file_name": "parsing.py", "mime_type": "text/x-script.python" }
playwright~=1.31.0 #simpleaudio-1.0.4-cp38-cp38-win_amd64.whl IPython~=8.10.0 tensorflow~=2.11.0 opencv-python~=4.7.0.72 transformers~=4.26.1 Pillow~=9.4.0 SpeechRecognition~=3.9.0 git+https://github.com/openai/whisper.git tk~=0.1.0 bitsandbytes~=0.37.0 numpy==1.23.0 PyAudio
{ "repo_name": "Rubiksman78/RenAI-Chat", "stars": "46", "repo_language": "Python", "file_name": "parsing.py", "mime_type": "text/x-script.python" }
<h1 align="center"> :email: RenAI Chat </h1> <p align="center"> <a href="https://github.com/Rubiksman78/RenAI-Chat/releases/latest"> <img alt="Latest release" src="https://img.shields.io/github/v/release/Rubiksman78/RenAI-Chat"> </a> </p> This project aims to create a fun interface to use conversational model...
{ "repo_name": "Rubiksman78/RenAI-Chat", "stars": "46", "repo_language": "Python", "file_name": "parsing.py", "mime_type": "text/x-script.python" }