This file contains 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 math | |
import re | |
from typing import Literal | |
import numpy as np | |
import pandas as pd | |
import requests | |
import multiprocessing | |
from multiprocessing.pool import ThreadPool | |
import os |
This file contains 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
''' | |
Auto stub generator for cython files. | |
LIMITATIONS: | |
Can only parse declared cdef variables with public/readonly keywords | |
Cannot parse plain defined variables (ex: "my_var = 2") | |
Cannot parse special members imported from C/C++ | |
Cannot parse ctypedef types | |
Can only parse functions prefixed with 'def' and 'cpdef | |
This file contains 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
using UnityEngine; | |
using UnityEngine.EventSystems; | |
using UnityEngine.Rendering; | |
using UnityEngine.UIElements; | |
#if ENABLE_INPUT_SYSTEM | |
using UnityEngine.InputSystem.UI; | |
#endif | |
#if UNITY_EDITOR | |
using UnityEditor; |
This file contains 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
/* | |
This is a really simple text editor to be used within Unity | |
It's useful to write memos, notes or ideas inside your Unity Editor window | |
Kinda like Blender's Text Editor | |
*/ | |
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.IO; |
This file contains 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
// TUPLE MICRO-BENCHMARKS, based on https://www.dotnetperls.com/tuple-keyvaluepair | |
// | |
// Tuples are generally fastest. | |
// ValueTuple is fastest in the particular case of GetHashCode. | |
// KeyValuePair is always worst. | |
// | |
// | |
// RAW RESULTS | |
// Numbers in milliseconds (lower is better) | |
// |
This file contains 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
#!/usr/bin/env python3 | |
""" -*- coding: utf-8 -*- | |
Example Python3 Raise Exception without Traceback | |
Example Python3 Hide Traceback | |
Python3 Custom Exception Class | |
Python3 custom exception suppress traceback example | |
Python3 custom exception without traceback example | |
Example Python Raise Exception without Traceback | |
Example Python Hide Traceback | |
Python Custom Exception Class |
This file contains 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
// GWLlosa's answer in http://stackoverflow.com/questions/521687/c-sharp-foreach-with-index | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace EnumerateTest { | |
class Program { | |
static void Main(string[] args) { | |
List<int> list = new List<int> {4, 2, 3, 1, 8}; |