This file contains hidden or 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
{ | |
"assistant": { | |
"default_model": { | |
"provider": "ollama", | |
"model": "qwen2.5:7b" | |
}, | |
"version": "2" | |
}, | |
"languages": { | |
"Python": { |
This file contains hidden or 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
from PIL import Image | |
def resize_and_crop(img, size=(255, 255)): | |
img = Image.open(img) | |
img_ratio = img.size[0] / img.size[1] | |
ratio = size[0] / size[1] | |
if ratio > img_ratio: | |
img = img.resize((size[0], int(size[0] * img.size[1] / img.size[0])), |
This file contains hidden or 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 os | |
import cv2 | |
import numpy as np | |
from tensorflow.python.keras.preprocessing.image import load_img, img_to_array | |
from tensorflow.python.keras.models import load_model | |
from resize import resize_and_crop | |
width, height = 224, 224 | |
dimension = f'{ width }px' |
This file contains hidden or 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 sys | |
from predict import predict | |
def make_predictions(filename): | |
result = [] | |
for i in range(3): | |
result.append(predict(filename, model=i)) |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
"""Modelo_Acc+80.ipynb | |
Automatically generated by Colaboratory. | |
Original file is located at | |
https://colab.research.google.com/drive/1kLQn4QbQKLGSHXhAsmKrIMBcKLWHNWvg | |
""" | |
import matplotlib |
This file contains hidden or 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
<?php | |
$active_group = 'default'; | |
$query_builder = TRUE; | |
$db['default'] = array( | |
'dsn' => '', | |
'hostname' => 'database.host.local', | |
'username' => 'username', | |
'password' => 'hackme', | |
'database' => 'database_name', | |
'dbdriver' => 'pdo', |
This file contains hidden or 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
func returnsError() error { | |
if bad() { | |
return ErrBad | |
} | |
return nil | |
} |
This file contains hidden or 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
func returnsError() error { | |
var p *MyError = nil | |
if bad() { | |
p = ErrBad | |
} | |
return p // Will always return a non-nil error. | |
} |
This file contains hidden or 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
package main | |
import "fmt" | |
func main() { | |
messages := make(chan string) | |
signals := make(chan bool) | |
select { | |
case msg := <-messages: | |
fmt.Println("received message", msg) |
This file contains hidden or 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
#!/bin/bash | |
go test -cpuprofile cpu.prof -memprofile mem.prof -bench . | |
pprof -http=:6060 -alloc_objects mem.prof | |
pprof -http=:6060 cpu.prof |
NewerOlder