Skip to content

Instantly share code, notes, and snippets.

View krlsdu's full-sized avatar

Carlos krlsdu

View GitHub Profile
Criar ou melhorar sistema web que recebe imagens de plantio de soja e através de machine learning faz analise e informa
- falha no plantio
- doencas no plantio (1 ou 2 para começar)
Obs: o software será livre, o serviço de analise será cobrado.
O que é preciso decidir
- 1° Avaliar viabilidade do projeto.
- Modelo de monetização.
- Analizar concorrentes.
---
- name: "Configure localhost docker"
hosts: "localhost"
become: True
vars:
oraclejdk_package: 'oracle-java9-installer'
oraclejdk_set_as_default: True
sublime_build: 3143
docker_edition: "ce"
@krlsdu
krlsdu / Jboss-cli
Last active February 21, 2018 15:21
[Referência: ](https://docs.jboss.org/author/display/AS71/CLI+Recipes#CLIRecipes-ScriptedConfiguration)
curl --create-dirs -o $JBOSS_HOME/modules/org/postgresql/main/postgresql-42.2.1.jar --url https://jdbc.postgresql.org/download/postgresql-42.2.1.jar
module add --name=org.postgresql --resources=wildfly/modules/org/postgresql/main/postgresql-42.2.1.jar --dependencies=javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=postgresql:add(driver-name=postgresql,driver-module-name=org.postgresql,driver-class-name=org.postgresql.Driver)
@krlsdu
krlsdu / gc.ex
Created April 23, 2018 22:54
rosalinda_computing_GC_content
defmodule Gc do
def gc_content(dataset) do
map =
String.replace(dataset, "\n", "")
|> String.split(">", trim: true)
|> Enum.map(fn x -> String.split_at(x, 13) end)
element = Enum.into(map, %{})
element_lenght = Enum.map(element, fn {k, v} -> {k, v, String.length(v)} end)
@krlsdu
krlsdu / gc_test.exs
Created April 23, 2018 22:56
rosalinda_test_rosalinda_computing_GC_content
defmodule GcTest do
use ExUnit.Case
doctest Gc
test "Computing GC Content" do
assert Gc.gc_content(">Rosalind_4140
TTTGCCTTATAACGTCTCTGAGGTAATCCTGCGTACGCCCGTTAAACATCGGTACCAAGC
TCTGTTGATCGTCGCGCAGTAATCTAGCGTATAGGTGGTCTCGCGTTGCGACATACCAGA
TTGGTGGGGTCGGGGCACACACCCCAGGCCATCGAGCACCTTTCTGACATATGCAATGCC
GGCACTAGCAGCTCCAATTGCACAGGAACCGGCTGCCTTATATCATCGGATGATGATCTT
File.stream!("lib/test.txt") |> Flow.from_enumerable() |> Flow.flat_map(&String.codepoints(&1)) |> Flow.partition() |> Flow.reduce(fn -> %{} end, fn word, acc -> Map.update(acc, word, 1, &(&1 + 1)) end) |> Enum.to_list() |> List.to_string()
@krlsdu
krlsdu / gist:31187b0151413a4a26f47a8cfa8de5a8
Last active August 29, 2018 10:25
Dockerfile to create jbake image
FROM openjdk:alpine as builder
RUN apk update \
&& apk add --no-cache zip curl bash
SHELL ["/bin/bash", "-c"]
RUN curl -s 'https://get.sdkman.io' | bash \
&& source "/root/.sdkman/bin/sdkman-init.sh" \
&& sdk install jbake
FROM openjdk:alpine
RUN apk add --no-cache bash
graph LR
subgraph Supcd Ambiente Prod
Tibico>Tibico]
postgres-transacional((postgres-transacional))
postgres-consulta((postgres-consulta))
postgres-emplaca((postgres-emplaca))
end
@startuml
!define SPRITESURL https://raw.githubusercontent.com/rabelenda/cicon-plantuml-sprites/v1.0/sprites
!define AWSPUML https://raw.githubusercontent.com/milo-minderbinder/AWS-PlantUML/release/18-2-22/dist
!define DEVICONS https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/v2.0.0
!include <cloudinsight/haproxy.puml>
!include <material/common>
!include <material/webpack>
@krlsdu
krlsdu / gist:b6d3124133b7082cf38a37fe714d7466
Created September 6, 2018 23:23
spring-boot-restassured-doc
= Spring REST Docs REST Assured Sample
Andy Wilkinson;
:doctype: book
:icons: font
:source-highlighter: highlightjs
:snippets: ../../../target/generated-snippets
Sample application demonstrating how to use Spring REST Docs with REST Assured.
`SampleRestAssuredApplicationTests` makes a call to a very simple service. The service