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
// This file is automatically generated. | |
// Please do not change this file! | |
type Message0<T extends MessagesKey0> = { | |
id: T | |
value: T | |
attributes: Record<string, T> | |
} | |
type Message1<T extends MessagesKey1> = { |
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
/** | |
* This algorithm returns the biggest sequence from an array that repeats at least two times. | |
* | |
* Example: | |
* - [1, 1, 2, 2, 1, 1] -> ['1,1', 2] | |
* - [1, 1, 1, 1, 1, 1, 1, 1] -> ['1,1,1,1,1,1,1', 2] | |
* - [1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 4, 5, 5, 5] -> ['1,1,1,2', 2] | |
* | |
* The idea is very simple: | |
* - firstly, we should split the array on all subsequences with at least two elements; |
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
const Jimp = require('jimp') | |
const { drop, splitEvery } = require('ramda') | |
const binary = require('binary') // fiquei em duvida entre ela e a qunpack | |
const fs = require('fs') | |
const data = drop(3, fs.readFileSync('dump/level-1/tilemap')) | |
// const data = drop(3, fs.readFileSync('dump/level-2/tilemap')) | |
const globalOam = splitEvery(44, fs.readFileSync('dump/level-1/global-oam')) | |
const objectsPos = [] |
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
foo | |
bar | |
baz |
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
// cargo-deps: rand="0.5.5" | |
extern crate rand; | |
use std::io; | |
use std::collections::HashSet; | |
use rand::Rng; | |
use std::iter::FromIterator; | |
struct State { | |
life: i8, |
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
import qualified Data.Set as Set | |
import Data.Random | |
import Data.Random.Extras | |
data State = State { word :: String, typed :: [Char] } | |
randomWords :: [String] | |
randomWords = ["banana", "uva", "abacaxi"] | |
getRandomWord :: IO String |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Regras Resumidas: | |
1 - Este é o grupo oficial (sério) gerido pelos membros do CA. | |
Não é permitido tópicos fora desse escopo: | |
1.1 - Informes, avisos, eventos da área, links de video aulas, cursos online, certificações, produtos/curso da área em promoções, link de matérias do curso ou pertinentes ao mesmo. | |
1.2 - Dúvidas ou questionamentos sejam sobre professores, disciplinas do curso, relatos de experiências no mesmo. Mas não fugindo do limite sobre falar algo pertinente e falar algo fora do contexto. | |
1.3 - Outras coisas relevantes, tudo com o bom e velho bom senso sobre o que vai compartilhar. | |
1.4 - Compartilhamento de videos permitido se for algo pertinente ao curso.(Recomendado links) | |
2 - Não uso de memes (mesmo que seja de professor). | |
3 - Proibido comentários racistas, homofóbicos, sexistas, condição social, etc. | |
4 - Discussão sobre política, religião, futebol. |
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
# Download of captcha's image: https://www.dropbox.com/s/6dbo7k4vuqlqiqr/captchar.zip | |
# Post in my blog about this code (in Brazillian Portuguese): http://localhost:8000/output/estudo-de-caso-quebrando-um-captcha.html | |
import copy | |
import numpy as np | |
import cv2 as cv | |
import pyslibtesseract | |
tesseract_config = pyslibtesseract.TesseractConfig(psm=pyslibtesseract.PageSegMode.PSM_SINGLE_CHAR) | |
tesseract_config.add_variable('tessedit_char_whitelist', 'QWERTYUIOPASDFGHJKLZXCVBNM') |
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
// Many thanks to Code Different: http://stackoverflow.com/a/42749141/3440266 | |
import Foundation | |
struct ClassInfo : CustomStringConvertible, Equatable { | |
let classObject: AnyClass | |
let classNameFull: String | |
let className: String | |
init?(_ classObject: AnyClass?) { | |
guard classObject != nil else { return nil } |
NewerOlder