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
def obj_from_id(obj_id: int): | |
# <https://stackoverflow.com/a/15702647> | |
return ctypes.cast(obj_id, ctypes.py_object).value | |
def print_referrers_tree(obj_id: int, level=0, prev_ids: set[int] | None = None) -> None: | |
if prev_ids is None: | |
prev_ids = set[int]() | |
if level > 20: | |
return |
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
#include <iostream> | |
#include <string> | |
#include <string_view> | |
#include "WsfPythonNaming.hpp" | |
void Foo() | |
{ | |
} |
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
struct FuncHolder | |
{ | |
std::function<void(double)> mFunc; | |
}; | |
py::class_<FuncHolder> funcHolder(aModule, "FuncHolder"); | |
aModule.def("AddCallback", [](std::function<void(double)> func, py::list aHolder) | |
{ | |
FuncHolder* holder = new FuncHolder{ func }; |
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
#include <iostream> | |
#define PYBIND11_HANDLE_REF_DEBUG | |
#include <pybind11/pybind11.h> | |
#include <pybind11/operators.h> | |
namespace py = pybind11; | |
using namespace pybind11::literals; |
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
from bs4 import Tag, BeautifulSoup | |
import requests | |
from pathlib import Path | |
def get_todays_page(): | |
page = requests.get('https://www.astrobin.com/iotd/archive/') | |
soup = BeautifulSoup(page.content, 'html.parser') | |
image_html: Tag = soup.find('div', class_="iotd-archive-image") |
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
#include <iostream> | |
struct AuxData | |
{ | |
virtual ~AuxData() = default; | |
virtual void PrintAuxData() | |
{ | |
std::cout << "AuxData a: " << a << " b: " << b << std::endl; |
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
cmake_minimum_required(VERSION 3.12) | |
function(print_list lines header) | |
message(STATUS "** ${header} ***") | |
foreach(line ${lines}) | |
message(STATUS "\t" ${line}) | |
endforeach() | |
message(STATUS "** End ${header} ***") | |
endfunction(print_list) |
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
<Location /kibana/> | |
ProxyPass http://kibana:5601/ | |
ProxyPassReverse http://kibana:5601/ | |
</Location> |
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
# Logspout portion of the ELK Demo locally | |
# Maintainer: Gary A. Stafford <[email protected]> | |
version: '3.1' | |
services: | |
elk: | |
image: garystafford/custom-elk:latest | |
ports: | |
- "5601:5601/tcp" # Kibana web interface | |
- "9200:9200/tcp" # Elasticsearch JSON interface |
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
# This is the CMakeCache file. | |
# For build in directory: c:/Users/battl/OneDrive/Documents/Work/vcpkg/buildtrees/osgearth/x64-windows-dbg | |
# It was generated by CMake: C:/Program Files/CMake/bin/cmake.exe | |
# You can edit this file to change values found and used by cmake. | |
# If you do not want to change any of the values, simply exit the editor. | |
# If you do want to change a value, simply edit, save, and exit the editor. | |
# The syntax for the file is as follows: | |
# KEY:TYPE=VALUE | |
# KEY is the name of a variable in the cache. | |
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. |
NewerOlder