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 flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return 'Hello, World!' | |
if __name__ == '__main__': | |
app.run(host='0.0.0.0', port=5000, debug=True) |
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 cv2 | |
from cv2 import cuda | |
cuda.printCudaDeviceInfo(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 cv2 | |
count = cv2.cuda.getCudaEnabledDeviceCount() | |
print(count) |
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
//Función que devuelve el índice de una cadena dentro de otra | |
// es equivalente a la función de strutils: position := AnsiIndexStr(source, ['BRIAN', 'JIM', 'HENRY']); | |
function StrIdx(str:string;StrArr:array of string):integer; | |
var n,i:integer; | |
begin | |
result:=-1; | |
n:=high(strarr); | |
if length(str)<1 then exit; | |
for i:=0 to n do |
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
function token(var cad:string;sep:string):string; | |
var p,n:integer; | |
begin | |
p:=pos(sep,cad); | |
if p>0 then | |
n:=p-1 | |
else | |
n:=length(cad); | |
result:=copy(cad,1,n); | |
delete(cad,1,n+length(sep)); |
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
Procedure transli(min,max,mip,map:real;var a,b:real); | |
begin | |
a:=(mip-map)/(min-max); | |
b:=(min*map-mip*max)/(min-max); | |
end; |