Skip to content

Instantly share code, notes, and snippets.

Michal Srb xixixao

Block or report user

Report or block xixixao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View testfile.js
/**
* Given the starting source, starting position, and the ending source this
* function guesses where the cursor should move to.
*/
function updateCursor(
startSource: string,
startPosition: {row: number, column: number},
endSource: string,
): {row: number, column: number} {
for (const accuracy of ACCURACIES) {
View gist:e8b74ff74e98bdd0c137
Rules (type (Map Char String))
System (record angle: Num base: (List Char) rules: Rules)
tree (fn [angle] (System angle
{\M}
(Map
\M "N[-M][+M][NM]"
\N "NN"
\[ "["
\] "]"
View gist:4fb78f5f9569b40c01fc
+ (macro [x y]
(: (Fn Num Num Num))
(Js.binary "+" x y))
- (macro [what from]
(: (Fn Num Num Num))
(Js.binary "-" from what))
* (macro [x y]
(: (Fn Num Num Num))
View simpler-gump.coffee
{task, watch, serve} = require 'gump'
bower = require 'gulp-bower-files'
flatten = require 'gulp-flatten'
stylus = require 'gulp-stylus'
jade = require 'gulp-jade'
clean = require 'gulp-clean'
task 'default',
'clean'
-> watch 'sources'
View tables.coffee
render: ->
_.table _,
_.thead _,
_.tr _,
_.th "BV"
_.th "x1"
_.th "x2"
_.th "x3"
_.th "x4"
_.th "RHS"
View Simplex Algorithm.coffee
#I = [5, 6, 7]
#matrix = [
# [1, 10, -57, -9, -24, 0, 0, 0, 0]
# [0, 0.5, -5.5, -2.5, 9, 1, 0, 0, 0]
# [0, 0.5, -1.5, -0.5, 1, 0, 1, 0, 0]
# [0, 1, 0, 0, 0, 0, 0, 1, 1]
#]
I = [4, 7, 6, 8]
matrix = [
View -
I = [5, 6, 7]
matrix = [
[1, 10, -57, -9, -24, 0, 0, 0, 0]
[0, 0.5, -5.5, -2.5, 9, 1, 0, 0, 0]
[0, 0.5, -1.5, -0.5, 1, 0, 1, 0, 0]
[0, 1, 0, 0, 0, 0, 0, 1, 1]
]
max = (array) ->
View -
I = [5, 6, 7]
matrix = [
[1, 10, -57, -9, -24, 0, 0, 0, 0]
[0, 0.5, -5.5, -2.5, 9, 1, 0, 0, 0]
[0, 0.5, -1.5, -0.5, 1, 0, 1, 0, 0]
[0, 1, 0, 0, 0, 0, 0, 1, 1]
]
max = (array) ->
View -
I = [5, 6, 7]
matrix = [
[1, 10, -57, -9, -24, 0, 0, 0, 0]
[0, 0.5, -5.5, -2.5, 9, 1, 0, 0, 0]
[0, 0.5, -1.5, -0.5, 1, 0, 1, 0, 0]
[0, 1, 0, 0, 0, 0, 0, 1, 1]
]
max = (array) ->
View CoffeeScript.tmLanguage
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>CoffeeScript</string>
<key>fileTypes</key>
<array>
<string>coffee</string>
<string>Cakefile</string>
You can’t perform that action at this time.