Skip to content

Instantly share code, notes, and snippets.

View donflopez's full-sized avatar
🏠
Working from home

Francisco López donflopez

🏠
Working from home
View GitHub Profile
@donflopez
donflopez / alpaca-lora-llama-index.txt
Created April 2, 2023 22:29
Improved alpaca-lora llama-index prompt.
INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total LLM token usage: 0 tokens
INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total embedding token usage: 0 tokens
INFO:root:___________Promt:____________
INFO:root:Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
What do you think of Facebook's LLaMa?
Answer:
INFO:root:_________Normal model____________
/home/donflopez/.local/lib/python3.10/site-packages/transformers/generation/utils.py:1219: UserWarning: You have modified the pretrained model configuration to control generation. This is a deprecated strategy to control generation and will be removed soon, in a future version. Please use a generation configuration file (see https://huggingface.co/docs/transformers/main_classes/text_generation)
warnings.warn(
@donflopez
donflopez / alpaca-lora-llama-index.txt
Created April 2, 2023 22:05
Alpaca-lora + llama index output.
INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total LLM token usage: 0 tokens
INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total embedding token usage: 0 tokens
INFO:root:___________Promt:____________
INFO:root:Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
What do you think of Facebook's LLaMa?
Answer:
INFO:root:_________Normal model____________
/home/donflopez/.local/lib/python3.10/site-packages/transformers/generation/utils.py:1219: UserWarning: You have modified the pretrained model configuration to control generation. This is a deprecated strategy to control generation and will be removed soon, in a future version. Please use a generation configuration file (see https://huggingface.co/docs/transformers/main_classes/text_generation)
warnings.warn(
@donflopez
donflopez / .block
Created September 14, 2018 09:14 — forked from mbostock/.block
Treemap
border: no
height: 600
license: gpl-3.0
// Request
{
"pinPositions": [5, 1, 6]
}
// Response
{
"ticket": "longhashstring",
"timeoutInSeconds": 600,
"rememberMeToken": "longtoken"
}
// Login information
{
"loginDocument": {
"document": "11223344N",
"documentType": 0
},
"birthday": "20/10/1011"
}
// Response
{
# convert the input file to RGB
img = Image.open(fil).convert(‘RGB’)
# get an array of pixeles as [(255, 255, 255),...]
data = img.getdata()
# create a numpy array
narr = numpy.array(data)
# flatten the array [255, 255, 255,...]
narr = narr.flatten()
# normalize the rgb channels now [0. - 1.]
narr = [ (255-j)*1.0/255.0 for j in narr ]
cameras:
perspective:
type: perspective
vanishing_point: [0, -500]
lights:
directional1:
type: directional
direction: [.1, .5, -1]
diffuse: .7
ambient: .5
@donflopez
donflopez / index.html
Last active January 31, 2017 11:57
Race condition Tangram
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Race Condition Tangram</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.0.1/dist/leaflet.js"></script>
<script src="https://precog.mapzen.com/tangrams/tangram/selection-null/dist/tangram.debug.js" charset="utf-8"></script>
@donflopez
donflopez / dabblet.css
Created January 16, 2013 19:54 — forked from anonymous/dabblet.css
Untitled
.rounded {
width:100px;
height:100px;
border: 1px solid black;
border-radius:30px;
}
@donflopez
donflopez / dooreffect.js
Created September 17, 2012 17:49
Script for door effect
$('.button').mousedown(function(){
$(this).addClass("rotate"); //añade la clase con la transición al botón.
setTimeout(function(){
$('.button').addClass("del"); //Añade la clase del al botón tras 1900 milisegundos.
},1900);
$('.leftdoor').addClass("moveleft"); //Añade la clase con la transición a la puerta izq.
$('.rightdoor').addClass("moveright"); //Añade la clase con la transición a la puerta der.
setTimeout(function(){
$('.rightdoor').addClass("del"); //Elimina la puerta derecha tras 4 segundos.
},4000);