Um classificador naive Bayes é provavelmente o exemplo mais tradicional para ilustrar "Inteligência Artificial" na prática. É bastante utilizado na eterna tarefa de discernir entre spam e não-spam (ham).
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
# Define lua functions | |
init_by_lua_block { | |
function is_dir(path) | |
local f = io.open(path, "r") | |
if not f then | |
return false | |
end | |
local ok, err, code = f:read(1) | |
f:close() | |
return code == 21 |
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
0-25 R : Time flies like an arrow. <- S ::= NP VP period | |
0- 4 R : Time <- NP ::= NN | |
# token | |
0- 4 T : Time <- NN | |
# glade 0- 4: Time --- | |
- (NP (NN Time)) | |
5-24 R : flies like an arrow <- VP ::= VBZ PP | |
# token | |
5-10 T : flies <- VBZ |
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
package main | |
import ( | |
"log" | |
"os" | |
"time" | |
"github.com/fsnotify/fsnotify" | |
) |
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
ffmpeg -ss $INPUT_START_TIME -t $LENGTH -i $INPUT_FILENAME \ | |
-vf "fps=$OUTPUT_FPS,scale=$OUTPUT_WIDTH:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \ | |
-loop $NUMBER_OF_LOOPS $OUTPUT_FILENAME | |
# Change these placeholders: | |
# * $INPUT_START_TIME - number of seconds in the input video to start from. | |
# * $LENGTH - number of seconds to convert from the input video. | |
# * $INPUT_FILENAME - path to the input video. | |
# * $OUTPUT_FPS - ouput frames per second. Start with `10`. | |
# * $OUTPUT_WIDTH - output width in pixels. Aspect ratio is maintained. |
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
#!/opt/perl | |
use Mojolicious::Lite; | |
use JSON; | |
get '/' => sub { | |
my $self = shift; | |
$self->render("index"); | |
}; |
I start with a list and plan to create a comparison table.
http://www.w3.org/TR/WebCryptoAPI/
This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.
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
#!/bin/sh | |
# | |
# chkconfig: 2345 55 25 | |
# Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx | |
# For Debian, run: update-rc.d -f nginx defaults | |
# For CentOS, run: chkconfig --add nginx | |
# | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all |
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
Basic | |
===== | |
[Shift]+[Mod]+[Enter] - launch terminal. | |
[Mod]+[b] - show/hide bar. | |
[Mod]+[p] - dmenu for running programs like the x-www-browser. | |
[Mod]+[Enter] - push acive window from stack to master, or pulls last used window from stack onto master. | |
[Mod] + [j / k] - focus on next/previous window in current tag. |
NewerOlder