define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var PDDLHighlightRules = function() {
var keywordMapper = this.createKeywordMapper({
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
language: ruby | |
rvm: | |
- 2.0.0 | |
env: | |
global: | |
- USER="username" | |
- EMAIL="username@mail.com" | |
- REPO="name of target repo" | |
- FILES="README.md foo.txt bar.txt" | |
- GH_REPO="github.com/${USER}/${REPO}.git" |
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
# Based on https://eregon.me/blog/2018/02/11/trick-sudoku.html | |
S = <<PUZZLE.lines.map { |l| l.chomp.chars.map(&:to_i)} | |
19___8__5 | |
__2_5__89 | |
8_674____ | |
_____4_92 | |
_23_7_81_ | |
56_8_____ | |
____279_3 | |
93__8_1__ |
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
# Based on http://www.graphviz.org/content/generate-directory-tree-dot | |
def treedot(tree) | |
nodes = Hash.new {|h,k| h[k] = "node#{h.size}"} | |
dot = 'digraph tree{ | |
fixedsize=true | |
splines=ortho | |
node [style="rounded,filled", fillcolor="#E5E5E5", concentrate=true]' | |
tree.each {|name,subtree| add(dot, name, subtree, nodes)} | |
dot << "\n}" | |
end |
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
#encoding: ascii-8bit | |
puts [ | |
# ... | |
33.chr == '!', | |
34.chr == '"', | |
35.chr == '#', | |
36.chr == '$', | |
37.chr == '%', | |
38.chr == '&', | |
39.chr == "'", |
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
// ==UserScript== | |
// @name Emojis | |
// ==/UserScript== | |
window.addEventListener('load', function() { | |
var emojis = document.getElementsByClassName("emoji") | |
//console.log("Emojis:") | |
//console.log(logos.length) | |
for(var i = 0; i < emojis.length; ++i) | |
{ |
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 python | |
# More info at http://solver.planning.domains/ | |
import urllib2, json, sys | |
HELP = """planning.domains.py | |
Usage: | |
planning.domains.py domain.pddl problem.pddl [mode=save|compare plan] | |
Options | |
mode - specify if it saves to or compares with plan file |
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
require 'yaml' | |
module Assistant | |
extend self | |
def test(filename) | |
data = YAML.load_file(filename) | |
case data['language'] | |
when 'ruby' then test_ruby(data) | |
else puts "Language #{data['language']} is unknown" |
Unexpected output from [x86-x64 GCC 7 -O3] only fully optimizes func3
, proof that compilers still require good programmers.
func(int):
mov edx, edi
imul edx, edi
imul edx, edi
imul edx, edx