This repository contains a web app/API for chatbots for Age of Empires II streams. The API is developed in Python, and is designed to run on a remote server. Bots can then query pages for game and player information in response to viewer-issued commands.
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
// Basic Types | |
let id: number = 5 | |
let company: string = 'Traversy Media' | |
let isPublished: boolean = true | |
let x: any = 'Hello' | |
let ids: number[] = [1, 2, 3, 4, 5] | |
let arr: any[] = [1, true, 'Hello'] | |
// Tuple |
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
use rand::{Rng, thread_rng}; | |
const ZALGO_UP: [char; 50] = | |
[ | |
'\u{030e}', /* ̎ */ '\u{0304}', /* ̄ */ '\u{0305}', /* ̅ */ | |
'\u{033f}', /* ̿ */ '\u{0311}', /* ̑ */ '\u{0306}', /* ̆ */ '\u{0310}', /* ̐ */ | |
'\u{0352}', /* ͒ */ '\u{0357}', /* ͗ */ '\u{0351}', /* ͑ */ '\u{0307}', /* ̇ */ | |
'\u{0308}', /* ̈ */ '\u{030a}', /* ̊ */ '\u{0342}', /* ͂ */ '\u{0343}', /* ̓ */ | |
'\u{0344}', /* ̈́ */ '\u{034a}', /* ͊ */ '\u{034b}', /* ͋ */ '\u{034c}', /* ͌ */ | |
'\u{0303}', /* ̃ */ '\u{0302}', /* ̂ */ '\u{030c}', /* ̌ */ '\u{0350}', /* ͐ */ |
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
use futures::{Async, Future, Poll}; | |
use tokio::io::{AsyncRead, AsyncWrite, Error, ReadHalf, WriteHalf}; | |
use tokio::net::TcpStream; | |
use warp::{path, Filter, Stream}; | |
struct Receiver { | |
rx: ReadHalf<TcpStream>, | |
} | |
impl Stream for Receiver { | |
type Item = String; |
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
[opcache] | |
; Determines if Zend OPCache is enabled | |
opcache.enable=1 | |
; Determines if Zend OPCache is enabled for the CLI version of PHP | |
;opcache.enable_cli=1 | |
; The OPcache shared memory storage size. | |
opcache.memory_consumption=512 |
Macro hygiene is the concept of macros that work in all contexts; they don't affect and aren't affected by anything around them. Ideally all macros would be fully hygienic, but there are lots of pitfalls and traps that make it all too easy to accidentally write unhygienic macros. This guide attempts to provide a comprehensive resource for writing the most hygienic macros.
First, a little aside on the details of Rust's module system, and specifically paths; it is
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
use secrecy::{ExposeSecret, Secret}; | |
#[derive(Debug)] | |
struct EncryptionKey(Secret<[u8; 32]>); | |
fn get_encryption_key() -> EncryptionKey { | |
let key = EncryptionKey(Secret::new(*b"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")); | |
println!("Pointer at creation: {:p}", key.0.expose_secret().as_ptr()); | |
key | |
} |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
"""[application description here]""" | |
# Prevent Python 2.x PyLint from complaining if run on this | |
from __future__ import (absolute_import, division, print_function, | |
with_statement, unicode_literals) | |
__author__ = "Stephan Sokolow (deitarion/SSokolow)" | |
__appname__ = "[application name here]" |
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 2c6dbb25bb8bbd57c8e14fe3e9f6abfbd09a6545 Mon Sep 17 00:00:00 2001 | |
From: heinezen <[email protected]> | |
Date: Fri, 17 Apr 2020 04:07:07 +0200 | |
Subject: [PATCH] output single frames | |
--- | |
openage/convert/texture.py | 24 ++++++++++++++---------- | |
1 file changed, 14 insertions(+), 10 deletions(-) | |
diff --git a/openage/convert/texture.py b/openage/convert/texture.py |
NewerOlder