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 json | |
import mechanize | |
import os | |
import re | |
import sys | |
from getpass import getpass | |
# Inputs | |
USERNAME = os.environ.get("FOUNDRY_USERNAME") or input("Username?") |
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
(function (flipX=true, flipY=true){ | |
// Note, Wall PlaceableObjects | |
const walls = canvas.walls.controlled; | |
if (walls.length === 0){ | |
return; | |
} | |
let xBounds = [walls[0].data.c[0], walls[0].data.c[2]]; | |
let yBounds = [walls[0].data.c[1], walls[0].data.c[3]]; |
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
; MIT License | |
; | |
; Copyright (c) 2020 Clay Sweetser | |
; | |
; 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
""" | |
Sample fixture pattern for data generation. | |
Note that this is merely a pattern, not a complete implementation. | |
Provides two fixtures: | |
- A `pet_generator` fixture that allows a test to generate arbitrary pets. | |
- A `pet` fixture that represents a single pet. | |
Both fixtures clean up resources. |
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
type | |
OneType = object | |
fieldA: string | |
TwoType = ref object | |
{.genProcedures.} | |
fieldB: int |
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
type | |
OneType = object | |
fieldA: string | |
TwoType {.genProcedures.} = ref object | |
fieldB: int |
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
_dsl = regexes.to_regex(r""" | |
(?(DEFINE) | |
# Divider for syntactical elements | |
(?P<syntax_edge> \s+ ) | |
# Divider for statements | |
(?P<statement_edge> (?: | |
# A syntax edge | |
( | |
**syntax_edge |
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
# Compile with --gc:arc | |
import ngxcmod, strutils | |
proc init(ctx: ContextCycle) {.exportc: "ngx_link_func_init_cycle", dynlib, cdecl.} = | |
setupForeignThreadGc() | |
ctx.cyc_log(INFO, "hello from Nim") | |
proc exit(ctx: ContextCycle) {.exportc: "ngx_link_func_exit_cycle", dynlib, cdecl.} = | |
setupForeignThreadGc() | |
ctx.cyc_log(WARN, "goodbye, from Nim w/ <3") |
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
package org.flowable.rest.app; | |
import java.util.Arrays; | |
import java.util.stream.StreamSupport; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.context.event.ContextRefreshedEvent; | |
import org.springframework.context.event.EventListener; | |
import org.springframework.core.env.AbstractEnvironment; |
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
proc this: void {.cdecl, exportc, dynlib.} = | |
var i = 1 | |
var a = 2 | |
var z = 3 | |
proc foo(): int = | |
echo "here" | |
return i + a + z + 65 |