Here we demonstrate:
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
| var twtxt = require('twitter-text') | |
| // Input / output user facing elements | |
| var explanation = document.createElement('div') | |
| var input = document.createElement('input') | |
| var output = document.createElement('div') | |
| document.body.appendChild(explanation) | |
| document.body.appendChild(input) | |
| document.body.appendChild(output) |
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
| var twtxt = require('twitter-text') | |
| // Input / output user facing elements | |
| var explanation = document.createElement('div') | |
| var input = document.createElement('input') | |
| var output = document.createElement('div') | |
| document.body.appendChild(explanation) | |
| document.body.appendChild(input) | |
| document.body.appendChild(output) |
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
| # Warning: Operates on binary files - make sure to have all files in git to revert them! | |
| # remove trailing whitespace recursively in a repo | |
| find . -type f -not -iwholename '*.git*' | xargs sed -i -r 's/[ ]+$//' # [] contains a space and a tab | |
| # convert tabs to spaces: | |
| find . -type f -not -iwholename '*.git*' | xargs sed -i -r 's/ / /g' # s/1/2/g ... 1 is a tab, 2 is two spaces | |
| # revert binary files | |
| git diff | grep Binary | sed 's/^Binary files a\///' | sed 's/ and .*$//' | xargs git checkout |
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
| #!/usr/bin/env ruby | |
| # Find the index(es) in an array of integers where sums above and below are equal | |
| def solution(a) | |
| sum = a.reduce(:+) | |
| return -1 unless sum | |
| return 0 if sum - a[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
| //constructs a naive Bayes binary classifier | |
| public NaiveBayes(double in[][], boolean out[]){ | |
| int inputs = in[0].length ; | |
| //initialize sums and sums of squares for each class | |
| double[] poss = new double[inputs], poss2 = new double[inputs]; | |
| double[] negs = new double[inputs], negs2 = new double[inputs]; | |
| //calculate amount of each class, sums, and sums of squares | |
| for(int k=0;k<in.length;k++){//for each data point | |
| if(out[k]){ | |
| positives++;//keep track of total positives |
Coinbase has the best wallets around! Please use this link cause I get $5 referal bonus.
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
| <td width="<%= width %>"> | |
| <% if cell %> | |
| <%= render partial: cell_partial, object: cell %> | |
| <% end %> | |
| </td> |
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
| Content-type: text/html | |
| <title>JediSet</title><head><style type="text/css"> .bg { color: #00FF00; background: black; } </style></head><body class=bg><a href="http://github.com/jediknight304/jediset">JediSet Source at GitHub.com/Jediknight304</a><br /><pre>If looks like you aren't using any options, but options are kool | |
| After your url which should end in .pl type a ? then any or all of these things | |
| rows=7 or any number of columns you want besides 7 | |
| cards=81 81 is the maximum; more defaults back to 81 | |
| debug=4 numbers less than 4 will show less debug information | |
| version=1 this is 1 or 0, and will show the current version of the program | |
| help=1 this is also 1 or 0, and will show you a terminal manual page | |
| listsets=1 show all sets (CHEATER) |