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 <thread> | |
#define GL_SILENCE_DEPRECATION | |
#include <OpenGL/gl.h> | |
#include <SDL2/SDL.h> | |
int main() | |
{ | |
SDL_Init(SDL_INIT_VIDEO); |
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 System; | |
using System.Reflection; | |
using Vintagestory.API.Client; | |
namespace GuiExtensions | |
{ | |
public class GuiScrollableArea : GuiElement | |
{ | |
public ElementBounds ClippingBounds { get; private init; } |
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
/* | |
*LegacyClonk | |
* | |
*Copyright (c) 2021, The LegacyClonk Team and contributors | |
* | |
*Distributed under the terms of the ISC license; see accompanying file | |
*"COPYING" for details. | |
* | |
*"Clonk" is a registered trademark of Matthes Bender, used with permission. | |
*See accompanying file "TRADEMARK" for details. |
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
<?xml version="1.0"?> | |
<doc> | |
<assembly> | |
<name>GuiCompositeSettingsEx</name> | |
</assembly> | |
<members> | |
<member name="T:GuiExtensions.GuiCompositeSettingsEx"> | |
<summary> | |
Allows the developer to add custom settings dialog panels. | |
Panels consist of a key, which is also used for translation, and a delegate that is called to create the UI. |
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 keyboard | |
import pyxinput | |
class Key(object): | |
__slots__ = "key", "mapping", "value_pressed", "value_released" | |
def __init__(self, key, mapping : str, value_pressed, value_released): | |
self.key = key | |
self.mapping = mapping | |
self.value_pressed = value_pressed |
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 | |
import youtube_dl, re, sys | |
from mpd import MPDClient | |
class SilentLogger(object): | |
def debug(self, msg): | |
pass | |
def warning(self, msg): | |
pass |
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 | |
import json, sys | |
from hashlib import md5 | |
import numpy as np | |
import matplotlib.pyplot as plot | |
from collections import defaultdict | |
vwa = "/home/tokgeo/Downloads/vwa.json" | |
vwa_options = "/home/tokgeo/Downloads/vwa_options.json" | |
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
def _redispatch_message_common(message, type): | |
target, text = get_target(message.params[0]), message.params[1] | |
user = get_user(message.source) if message.source else None | |
signal(type).send(message, user=user, target=target, text=text) | |
if target == message.client.nickname: | |
signal("private-{}".format(type)).send(message, user=user, target=target, text=text) | |
else: | |
signal("public-{}".format(type)).send(message, user=user, target=target, text=text) |
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 configparser | |
import os.path | |
class ClonkSection(configparser.SectionProxy): | |
def __getitem__(self, item): | |
try: | |
return super(ClonkSection, self)[item] | |
except KeyError: | |
return None |