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
#Copyright 2004 - 2009 Yost Engineering Inc. | |
##Permission is hereby granted, free of charge, to any person | |
##obtaining a copy of this software and associated documentation | |
##files (the "Software"), to deal in the Software without | |
##restriction, including without limitation the rights to use, | |
##copy, modify, merge, publish, distribute, sublicense, and/or sell | |
##copies of the Software, and to permit persons to whom the | |
##Software is furnished to do so, subject to the following | |
##conditions: |
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
# Author: Pierce Brooks | |
# https://gist.github.com/PierceLBrooks/d180e8445e3c59fe757e99c932257e9e | |
import os | |
import sys | |
import copy | |
import math | |
import cmath | |
import random |
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 sys | |
import logging | |
import traceback | |
try: | |
import jsbeautifier | |
import requests | |
import requests_file | |
except Exception as e: | |
sys.exit(print("{0}.. please download this module/s".format(e))) |
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
extends VisualInstance3D | |
var subworld : World3D = null | |
var subviewport : SubViewport = null | |
var texture : ViewportTexture = null | |
var billboard : Sprite3D = null | |
var clone : VisualInstance3D = null | |
var camera : Camera3D = null | |
var directions = [] | |
var angles = """ |
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
"use strict"; | |
var http = require('http'); | |
var url = require('url'); | |
var fs = require('fs'); | |
var mimetypes = { | |
'.dvb' : 'application/dvbsubs', | |
'.srt' : 'application/x-subrip', |
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 bash | |
# castanet.sh: Script to connect a chromecast to a WiFi network. | |
# | |
# Allows you to put your Chromecast on WiFi and do Chromecast initial setup | |
# without using the Google Home app at all, just using a normal Linux computer. | |
# | |
# You do need your Chromecast to be on Ethernet, or (untested) to join its setup WiFi | |
# network with your PC, and you also need to find out its IP yourself with e.g. | |
# Wireshark. |
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
# Title = Picture-Delta-Video | |
# Author = Pierce Brooks | |
# Usage = `python3 ./PicDelVid.py ./MyMP4.mp4` | |
# Reference = https://towardsdatascience.com/head-pose-estimation-using-python-d165d3541600 | |
import cv2 | |
import sys | |
import os | |
import numpy as np |
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
extends Node3D | |
# Called when the node enters the scene tree for the first time. | |
func _ready(): | |
var state = GLTFState.new() | |
var document = GLTFDocument.new() | |
var error = document.append_from_file("res://untitled.gltf", state) | |
if (error != OK): | |
print(str(error)) |
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
// Daniel Lemire in this article | |
// https://lemire.me/blog/2013/12/26/fastest-way-to-compute-the-greatest-common-divisor/ | |
// presented benchmark comparisons of different implementations of Stein's (binary) gcd algorithm. | |
// The wikipedia (iterative) implementation of the algorithm was noted to be very inefficient. | |
// Lemire presented benchmarked comparisons of various implementations, original code below. | |
// https://github.com/lemire/Code-used-on-Daniel-Lemire-s-blog/blob/master/2013/12/26/gcd.cpp | |
// I have modified the output to make it explicit and clear, modified the code in some functions | |
// to make them easier to follow and standardized variable names, and added the Ruby implementation. | |
// I also ordered the ouput to show fastest to slowest. | |
// The results: gcdwikipedia7fast32 is fastest by far; the implementation shown in widipedia is slowest. |
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
// https://hbfs.wordpress.com/2013/12/10/the-speed-of-gcd/ | |
/* | |
g++ ./the-speed-of-gcd.cpp -static-libstdc++ -std=c++11 -pthread -O3 -o ./the-speed-of-gcd | |
./the-speed-of-gcd | |
1000 3.3428e-05 5.77788e-05 3.3541e-05 6.12842e-05 3.4811e-05 | |
1000 1.90322e-05 3.82361e-05 1.8979e-05 4.174e-05 1.99548e-05 | |
1000 1.83879e-05 3.77061e-05 1.85562e-05 4.1613e-05 1.97229e-05 | |
1000 1.8762e-05 3.7532e-05 1.84731e-05 4.12971e-05 1.89309e-05 | |
1000 1.88318e-05 3.774e-05 1.82791e-05 4.15129e-05 1.88972e-05 |
OlderNewer