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 sys | |
import os | |
import socket | |
import importlib | |
import subprocess | |
def _install_and_import(package, | |
alias=None, | |
version=None, | |
package_name=None, |
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 asyncio | |
import yt_dlp | |
def progress_hook(d): | |
if d['status'] == 'downloading': | |
print(f"Downloaded {d['downloaded_bytes']} bytes of {d['total_bytes']} bytes") | |
async def download_video(url): | |
ydl_opts = { | |
'format': 'best', |
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
LONG WINAPI VectoredHandler(EXCEPTION_POINTERS* ExceptionInfo) { | |
// Filter out only C++ exceptions | |
if (ExceptionInfo->ExceptionRecord->ExceptionCode == 0xE06D7363) { // MSVC C++ exception code | |
CONTEXT context = *ExceptionInfo->ContextRecord; | |
HANDLE process = GetCurrentProcess(); | |
HANDLE thread = GetCurrentThread(); | |
SymInitialize(process, NULL, TRUE); | |
STACKFRAME64 stackFrame; |
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 BEGIN_META_MAP(classname) \ | |
template<int id, int> friend struct CDescriptor; \ | |
private: \ | |
enum { ID_REFERENCE_POINT = __COUNTER__ }; \ | |
typedef classname TheClass; \ | |
template<int id, int=id> struct CDescriptor \ | |
{ \ | |
}; \ | |
template<int id> struct CDescriptor<id, 0> \ | |
{ \ |
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
double fast_atan(double x) { | |
return x / (1 + 0.3211 * x * x); | |
} | |
double do_fast_atan2(double y, double x, bool abs_x_lt_abs_y) { | |
if (abs_x_lt_abs_y) { | |
double z = x / y; | |
double atan_z = fast_atan(z); | |
if (y > 0.0) { |
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
inline double fast_atan(double x) { | |
// http://www-labs.iro.umontreal.ca/~mignotte/IFT2425/Documents/EfficientApproximationArctgFunction.pdf. | |
//constexpr auto scaling_constant = 0.28086; | |
//constexpr auto N2 = 0.273; | |
constexpr auto scaling_constant = 0.274; | |
constexpr auto N2 = 0.258; | |
return ((M_PI_4 + N2) / 2. - (N2 / 2.) * std::abs(x)) * x | |
+ x / (2. + (scaling_constant * 2.) * x * x); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>libdatachannel media receiver example</title> | |
</head> | |
<body> | |
<p>Please enter the offer provided to you by the receiver application: </p> | |
<textarea cols="80" rows="25"></textarea> |
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
/////////////////////////////////////////////////////////////////////////////////// | |
// // | |
// Blitz 2D // | |
// // | |
// Code to make easy use of DirectX / GDI+ to draw 2D graphics // | |
// // | |
// By Sean O'Connor 2010 // | |
// // | |
// Thanks to: // | |
// Wendy Jones - for the book "Beginning DirectX 9" // |
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
Edit: C:\opt\ros\noetic\x64\share\catkin\cmake\all.cmake | |
test/catkin_download_test_data | |
# test/gtest | |
test/nosetests | |
Edit: C:\opt\ros\noetic\x64\share\ros\core\rosbuild\private.cmake | |
- check_same_directories.py => check_same_directories | |
- added string(REPLACE "\\" "/" _pyl "${_pyl}") | |
- _rosbuild_cmakelist_to_pylist calls modified | |
macro(_rosbuild_cmakelist_to_pylist _cmakelist _pylist) |
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
// ansi2utf8.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <iostream> | |
#include <string> | |
#include <fstream> | |
#include <streambuf> | |
#include <atlcore.h> |
NewerOlder