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
#============================================================================== | |
# Pixel Offset | |
# by IMP1 | |
#------------------------------------------------------------------------------ | |
# This script allows events' locations on screen to be offset. | |
# | |
# Usage: | |
# In an event, create a new comment. | |
# Add either of the following: | |
# MOVE 0, 0 |
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
#============================================================================== | |
# Storage Boxes Addon: Readonly Boxes | |
# by IMP1 | |
#------------------------------------------------------------------------------ | |
# THIS SCRIPT REQUIRES THE 'STORAGE BOXES' SCRIPT BY IMP1, AT LEAST v1.11 | |
# | |
# Now boxes can be set to only have their items removed, and none may be added. | |
# | |
#------------------------------------------------------------------------------ | |
# Compatability: |
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
#type in the command window | |
#conda install -c plotly plotly spyder | |
import pandas as pd | |
import plotly.graph_objects as go | |
import plotly.offline as pyo | |
import numpy | |
#import csv | |
# from datetime import datetime |
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
%YAML 1.2 | |
--- | |
# See http://www.sublimetext.com/docs/3/syntax.html | |
file_extensions: | |
- conv | |
scope: source.conv | |
variables: | |
ident: '\b[\w]+\b' | |
label: ':{{ident}}' | |
type: '(?:str|int|bool)' |
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
# wry | |
class Array | |
def indices(&block) | |
return self.map.with_index { |item, i| [item, i] }.select(&block).map { |item, i| i } | |
end | |
def map_with(n, &block) | |
if block.nil? | |
return self.each_slice(n) | |
else |
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
# https://github.com/lucaspiller/dcpu-specifications/blob/master/dcpu16.txt | |
# https://gist.github.com/jonpovey/2608343 | |
# https://www.reddit.com/r/dcpu16/comments/t5wu5/behavior_of_int_a_relating_to_interrupt_queueing/ | |
# http://www.dcpu-ide.com/ | |
# | |
class Ram | |
def initialize(size) | |
@max_index = size - 1 |
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
class HeapObject | |
attr_accessor :value | |
attr_reader :type | |
def initialize(value, type) | |
@value = value | |
@type = type | |
end | |
def get_pointer | |
return $heap.get_pointer(self) | |
end |
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
class Roll | |
attr_reader :die_values | |
attr_reader :command | |
attr_reader :count | |
attr_reader :die_size | |
def initialize(n, d) | |
@count = n | |
@die_size = d |
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
local unit = {} | |
unit.__index = unit | |
function unit.new(amount, ...) | |
local self = {} | |
setmetatable(self, unit) | |
self.amount = amount | |
self.dimens = {} | |
for _, dimen in pairs({...}) do | |
self.dimens[dimen] = 1 |
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
require 'net/http' | |
require 'json' | |
require 'ostruct' | |
class Mask | |
EMPTY_PATTERN = /[\s\.\_]/ | |
attr_reader :width | |
attr_reader :height |
NewerOlder