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
using Godot; | |
// Attach to an Area3D | |
// listens to collisions with area3d (use area3d's collision mask to select what objects should walk thru holes) | |
// sets or unsets the cutLayer (see in editor after attaching this script) | |
// dont forget to build C# project once to see the editor field for PhysicsHole) | |
public partial class PhysicsHole : Area3D { | |
[Export] |
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
import { Tensor, layers, sequential, tensor, train } from "@tensorflow/tfjs-node"; | |
function create_model () { | |
const model = sequential(); | |
model.add(layers.dense({ | |
units: 16, | |
activation: "relu", | |
inputShape: [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
set number | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
call plug#begin('~/.vim/plugged') | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'} | |
call plug#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
interface EventCallback<T> { | |
(evt: T): boolean|void; | |
} | |
class EventDispatcher<EventMap> { | |
listeners: Map<string, Set<EventCallback<keyof EventMap>>>; | |
constructor () { | |
this.listeners = new Map(); |
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
# first, turn off anything that has adobe in the task name to get some instant speed boosts | |
echo Ending tasks with Adobe in the name | |
ps -A | grep Adobe | cut -f2 -d" " - | xargs kill | |
echo Done | |
echo Currently running tasks with Adobe in the name: | |
ps -A | grep Adobe | xargs echo |
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
export interface QueryInfo { | |
[key: string]: string|Array<string>; | |
} | |
export interface URLInfo { | |
base: string; | |
query: string; | |
queryParams: QueryInfo; | |
} | |
export function decomposeUrl (urlStr: string, allowDuplicateParamKeys: boolean = true) { |
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
/** x and y are your 2d coordinates, width is the width of your chunk, all should be integers | |
* Returns an integer inside of an 1d array with size (width*height) | |
*/ | |
export function _2dTo1d (x: number, y: number, width: number) { | |
return x + width * y; | |
} | |
/** given an index in an array w/ size (width * height) and the width of the chunk | |
* Returns the X coordinate inside the width, height of the chunk | |
*/ |
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
package comm.rep.json; | |
import java.util.*; | |
import static comm.rep.json.Lexer.lex; | |
public class JSON { | |
public static class JsonValue { | |
} |
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
package comm.rep; | |
import java.awt.event.MouseEvent; | |
import java.awt.event.MouseListener; | |
import java.awt.event.MouseMotionListener; | |
/** | |
* Make using MouseListener and MouseMotionListener not painful, use lambas! | |
* | |
* Example: |
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
/** | |
* An accurate simulation of the elytra item as of Minecraft 15w41b | |
*/ | |
public class ElytraModel | |
{ | |
public int glideTime; | |
public int damageTaken; | |
public double posX; | |
public double posY; |