Skip to content

Instantly share code, notes, and snippets.

View vepo's full-sized avatar
💻
/bin/bash

Victor Osório vepo

💻
/bin/bash
View GitHub Profile
@Path("/user") // JAX-RS
@ApplicationScoped // CDI
public class UserEndpoint {
@GET
@Produces(MediaType.APPLICATION_JSON)
public UserListResponse listUsers() {
// List os usuários
}

Análise de sequências biológicas utilizando modelos probabilísticos

Victor Emanuel Perticarrari Osório

Antes de assistir essa palestra o meu conhecimento de bioinformática era um pouco superficial. Eu acreditava que o trabalho se resumia a algoritmos de buscas em sequências genéticas. Mas fui surpreendido com a aplicação de Modelos Probabilísticos para associação entre regiões do DNA ou RNA com funções metabólicas ou codificação de proteínas.

Uma das perguntas de pesquisa é se uma sequencia de RNA codifica proteína ou não.

GenericRecord someRecord = /* reading from some place */
int someInt = someRecord.getInt("intValue");
String someString = someRecord.getString("stringValue");
// These are the most important
GenericRecord.Array<Integer> someIntArray = someRecord.getArray("intArrayValue", Integer.class);
GenericRecord.Array<GenericRecord> someRecordArray = someRecord.getArray("recordArrayValue", GenericRecord.class);
from TwitterAPI import TwitterAPI, TwitterOAuth, HydrateType
import time
import pandas as pd
from pymongo import MongoClient
import pymongo
import os
EXPANSIONS = 'author_id,referenced_tweets.id,referenced_tweets.id.author_id,in_reply_to_user_id,attachments.media_keys,attachments.poll_ids,geo.place_id,entities.mentions.username'
TWEET_FIELDS='author_id,conversation_id,created_at,entities,geo,id,lang,public_metrics,source,text'
USER_FIELDS='created_at,description,entities,location,name,profile_image_url,public_metrics,url,username'
public class Car {
public static CarBuilder builder() {
return new CarBuilder();
}
public static class CarBuilder {
private CarType type;
private int seats;
private Engine engine;
private Transmission transmission;
class Media {
void mediaImperativa(int[] valores) {
int soma = 0;
for (int valor : valores) {
soma += valor;
}
return soma / valores.length;
}
void mediaDeclarativa(int[] valores) {
@vepo
vepo / curl-with-java-keystore.md
Last active March 13, 2024 08:52 — forked from Hakky54/curl-with-java-keystore.md
Curl with Java KeyStore

cURL with Java Keystore/Truststore

Curl doesn't have support for java keystore file, so therefor the file should be converted to a PEM format. It consists of the following multiple steps:

  1. Convert keystore to p12 file
  2. Convert p12 file to pem file
  3. Run curl command with pem files

Convert keystore to p12 file

@vepo
vepo / AvroConverter.java
Last active December 10, 2021 12:56
Convert POJO/Map to AVRO GenericRecord
import org.apache.avro.generic.GenericData;
import org.apache.avro.Schema;
import org.apache.avro.io.DecoderFactory;
import org.apache.avro.io.Decoder;
import org.apache.avro.io.DatumReader;
import org.apache.avro.generic.GenericDatumReader;
public class AvroConverter {
public static GenericData.Record parseJson(String data, Schema schema) throws IOException {
Decoder decoder = DecoderFactory.get().jsonDecoder(schema, data);
@vepo
vepo / gist:3f20b433fb266679ee41cca82a0bb328
Created July 20, 2021 18:18 — forked from digitaljhelms/gist:3761873
Git/GitHub commit standards & conventions

Committing Code

General Rules

  • Make atomic commits of changes, even across multiple files, in logical units. That is, as much as possible, each commit should be focused on one specific purpose.
  • As much as possible, make sure a commit does not contain unnecessary whitespace changes. This can be checked as follows:
$ git diff --check
@vepo
vepo / Formatter.xml
Last active December 5, 2022 17:54
My Eclipse Formatter for Java.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="21">
<profile kind="CodeFormatterProfile" name="MyFormatter" version="21">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>