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
# - Find Boost | |
# | |
# Copyright (c) 2016 Thiago Barroso Perrotta | |
# | |
# 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
#version 450 core | |
// get color from geometry shader | |
in vec4 gs_color; | |
// output color | |
out vec4 color; | |
void main(void) | |
{ |
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
// Image-read library | |
// https://github.com/nothings/stb/blob/master/stb_image.h | |
#define STB_IMAGE_IMPLEMENTATION | |
#define STBI_ONLY_PNG | |
#include "stb_image.h" | |
// Image-write-library | |
// https://github.com/nothings/stb/blob/master/stb_image_write.h | |
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#include "stb_image_write.h" |
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
/* Grr, Amazon's documentation sucks! | |
* Their own documentation: https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html | |
* says that you're allowed to return strings, but that always results in "Internal Server Error"! | |
* In reality, your result has to be structured like the one you see below. | |
*/ | |
exports.handler = async (event, context) => { | |
return { | |
statusCode: 200, | |
headers: { |
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
#include <stdio.h> | |
// Iterations for exp(x) approximation. Higher = more accurate, but higher likelihood of running into inf. | |
#define EXP_ITERATIONS 100 | |
// Iterations for ln(x) approximation. Higher = more accurate, but slower. | |
#define LN_ITERATIONS 10000 | |
// Returned if invalid input entered. | |
#define ERROR_RESULT -999999999 |
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
// Similar to std::equal_to but dereferences pointers `derefs` times before comparing | |
template<class T, const int derefs> | |
struct deref_equal_to | |
{ | |
constexpr bool operator()(const T& lhs, const T& rhs) const | |
{ | |
static_assert(derefs >= 0); | |
if constexpr (derefs >= 1) | |
{ | |
static_assert(std::is_pointer_v<T>); |
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
#include <functional> | |
#include <typeinfo> | |
#include <type_traits> | |
namespace std17 | |
{ | |
class bad_any_cast : public std::bad_cast | |
{ | |
public: | |
bad_any_cast() noexcept = default; |
This file has been truncated, but you can view the full file.
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
{ | |
"id": "UUK3kaNXbB57CLcyhtccV_yw", | |
"videos": { | |
"t9OC2ToZIQ0": { | |
"id": "t9OC2ToZIQ0", | |
"title": "Yearly Channel Doctor's Appointment", | |
"description": "You thought I ran out of Spider-Man games? \n\n2nd Channel\nhttps://www.youtube.com/channel/UCL7DDQWP6x7wy0O6L5ZIgxg\n\nTwitch\nhttp://www.twitch.tv/jerma985\n\nTwitter\nhttp://www.twitter.com/jerma985", | |
"thumbnail": "https://i.ytimg.com/vi/t9OC2ToZIQ0/hqdefault.jpg?sqp=-oaymwEZCNACELwBSFXyq4qpAwsIARUAAIhCGAFwAQ==&rs=AOn4CLBqzhvyJZO0NP_N8-7VJ-UNBWyjFQ", | |
"date": "20170829", | |
"duration": 554 |
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 this class instead of QThread | |
class QThread2(QThread): | |
# Use this signal instead of "started" | |
started2 = Signal() | |
def __init__(self): | |
QThread.__init__(self) | |
self.started.connect(self.onStarted) | |
def onStarted(self): |
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
from PySide2.QtCore import QObject, QTimer | |
from PySide2.QtWidgets import QApplication, QDialog | |
import sys | |
class Form(QDialog): | |
def __init__(self, parent=None): | |
super(Form, self).__init__(parent) | |
self.setWindowTitle("My Form") | |
self.setStyleSheet(""" |
OlderNewer