Skip to content

Instantly share code, notes, and snippets.

View FMCalisto's full-sized avatar
🎲
Researching

Francisco Maria Calisto FMCalisto

🎲
Researching
View GitHub Profile
@Raman1121
Raman1121 / llava_med_inference.py
Last active April 4, 2025 05:21
Running inference on a single image using LLaVA-Med
# From: https://github.com/microsoft/LLaVA-Med/blob/main/llava/eval/model_vqa_med.py
import argparse
from transformers import AutoTokenizer, AutoModelForCausalLM, AutoConfig
import torch
import os
import json
from tqdm import tqdm
import shortuuid
@Kiechlus
Kiechlus / changes.json
Created June 15, 2019 03:24
Orthanc additional image after stable study
{
"Changes" : [
{
"ChangeType" : "NewInstance",
"Date" : "20190615T041429",
"ID" : "0c7a4f9b-e037cf9a-d8ef9386-db692e07-7324e87f",
"Path" : "/instances/0c7a4f9b-e037cf9a-d8ef9386-db692e07-7324e87f",
"ResourceType" : "Instance",
"Seq" : 1
},
@mpj
mpj / monad-stream-example.js
Last active September 14, 2022 06:42
This is the code from Monads - episode #21 of FunFunFunction (https://www.youtube.com/playlist?list=PL0zVEGEvSaeFSwPn06GKArptSxiP1Gff8)
const fetch = require('node-fetch')
const Bacon = require('baconjs')
function getInPortuguese(word) {
// Google Translate API is a paid (but dirt cheap) service. This is my key
// and will be disabled by the time the video is out. To generate your own,
// go here: https://cloud.google.com/translate/v2/getting_started
const apiKey =
'AIzaSyB4DyRHIsNhogQXmH16YKbZfR-lTXrQpq0'
const url =
@FMCalisto
FMCalisto / DbaseClean.java
Created February 24, 2016 20:37 — forked from pedroreissantos/DbaseClean.java
Exemplos de introdução aos componentes do projeto (Engenharia de Software, IST, 2016)
/*
* DbaseClean
* Drop a database, if exists, and create a new empty one.
* Collect database info from a resource file.
*
* When using embeded in an application must be called outside a transaction
* (@Atomic) or connection to the same database server!
*
* javac DbaseClean.java
* java -cp mysql-connector-java-5.1.38.jar:. DbaseClean
@FMCalisto
FMCalisto / drive.xml
Created February 24, 2016 20:37 — forked from pedroreissantos/drive.xml
Exemplos do projecto myDrive (Engenharia de Software, IST, 2016)
<?xml version="1.0" encoding="UTF-8"?>
<myDrive>
<user username="jtb">
<password>fernandes</password>
<name>Joaquim Teófilo Braga</name>
<home>/home/jtb</home>
<mask>rwxdr-x-</mask>
</user>
<user username="mja">
<name>Manuel José de Arriaga</name>
@FMCalisto
FMCalisto / MysqlDataTruncation
Created February 24, 2016 20:36
MysqlDataTruncation em mysql 5.7 (Engenharia de Software, IST, 2016)
A versão 2.6.0 da fénix-framework tem um problema de MysqlDataTruncation com o mysql 5.7.
Este problema pode ser resolvido alterando no pom.xml a versão da fénix-framework de 2.6.0 para 2.6.2.
Alternativamente, o vosso colega Daniel da Costa encontrou uma solução que implica alterar a dimensão da variável LAST_UPDATE da base de dados (de cada um dos projetos):
A solução que descobri para resolver o problema:
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: '20160223108645' for column 'LAST_UPDATE' at row 1
@FMCalisto
FMCalisto / default maven plugin settings
Created February 24, 2016 20:36 — forked from pedroreissantos/default maven plugin settings
Default maven settings (Engenharia de Software, IST, 2016)
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
@FMCalisto
FMCalisto / fenix-framework-jvstm-ojb.properties
Created February 24, 2016 20:36 — forked from pedroreissantos/fenix-framework-jvstm-ojb.properties
Setup do projeto )Engenharia de Software, IST, 2016)
# using special INFER_APP_NAME to do just that
appName=INFER_APP_NAME
# FIXME: replace DBASE USER PASSWD
dbAlias=//localhost:3306/DBASE?useUnicode=true&amp;characterEncoding=UTF-8&amp;clobCharacterEncoding=UTF-8&amp;zeroDateTimeBehavior=convertToNull
dbUsername=USER
dbPassword=PASSWD
@pedroreissantos
pedroreissantos / drive.xml
Created February 21, 2016 15:03
Exemplos do projecto myDrive (Engenharia de Software, IST, 2016)
<?xml version="1.0" encoding="UTF-8"?>
<myDrive>
<user username="jtb">
<password>fernandes</password>
<name>Joaquim Teófilo Braga</name>
<home>/home/jtb</home>
<mask>rwxdr-x-</mask>
</user>
<user username="mja">
<name>Manuel José de Arriaga</name>
@pedroreissantos
pedroreissantos / default maven plugin settings
Last active February 24, 2016 20:36
Default maven settings (Engenharia de Software, IST, 2016)
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at