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
| 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
| import Ai from "./Ai" | |
| export default class AutomatonAi extends Ai { | |
| constructor(agent) { | |
| super(agent) | |
| this.addAction('Walk to target', action => { | |
| action.score('Fixed 50', ({ wState, agent }) => 50) | |
| action.do(({ wState, agent }) => { | |
| agent.goToTarget() | |
| agent.turnBlack() |
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 fA = function (toPrt, cb) { | |
| console.log('fA: ' + toPrt) | |
| cb() | |
| } | |
| var fB = function(toPrt) { | |
| console.log('fB: ' + toPrt) | |
| } | |
| fA('oi',fB('tchau')) |
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
| (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
| var ganetics = require('./genetics.js'); | |
| var sm = require('simple-statistics'); | |
| var csvWriter = require('csv-write-stream'); | |
| var fs = require('fs'); | |
| function NGW(options) { | |
| this.populationSize = options.populationSize || 10000; | |
| this.targetScore = options.targetScore; | |
| if (!options.targetScore) throw Error("Target Score needs to be set!"); |
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 array = [1,2,3]; | |
| // Esta coisa feia: | |
| var arrayOneUp = []; | |
| for(var i=0;i<array.length;i++){ | |
| arrayOneUp[i] = array[i] + 1; | |
| } | |
| console.log(arrayOneUp); | |
| // Pode ser feita assim |
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
| #!comment: This is a list of the top 100,000 most frequently-used English words | |
| #!comment: according to Wiktionary. | |
| #!comment: | |
| #!comment: It was compiled in August 2005 and coalesced into a handy list for | |
| #!comment: use in John the Ripper. | |
| #!comment: | |
| #!comment: | |
| #!comment: Pull date: Sun Jan 15 22:03:54 2012 GMT | |
| #!comment: | |
| #!comment: Sources: |
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
| { | |
| "email":"SEU@EMAIL.com", | |
| "pass":"pass", | |
| "k1":"https://cleverbot.io/ <--- SEE HERE", | |
| "k2":"https://cleverbot.io/ <--- SEE HERE" | |
| } |
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 percursos; | |
| public class Percursos { | |
| public void preOrdemRec(Node root) { | |
| if (root != null) { | |
| visit(root); | |
| preOrdemRec(root.getNoE()); | |
| preOrdemRec(root.getNoD()); | |
| } | |
| } | |
| public void posOrdem(Node root) { |
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
| public static void fullRender(Grid grid,int sLevel){ | |
| String[] paleta = {" ",".",":","+","!","J","I","M","Q","#",}; | |
| double[][] data = grid.getGrid(); | |
| for(double[] r:data){ | |
| for(double v:r){ | |
| int point = (int) (10*v); | |
| if(point-1>sLevel){ | |
| System.out.print(paleta[point-1]); | |
| } else { | |
| System.out.print(paleta[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
| package qfrac.fractalizator; | |
| import java.util.Random; | |
| public class Grid { | |
| private final double ANCHOR = 0.5; | |
| private int DATA_SIZE; | |
| private double[][] grid; | |
| private double h = 0.5; |
NewerOlder