Skip to content

Instantly share code, notes, and snippets.

View mvgolom's full-sized avatar

Marcos Golom mvgolom

  • campo mourao
View GitHub Profile
@mvgolom
mvgolom / run_python_script_in_conda_env.bat
Created November 30, 2023 10:48 — forked from maximlt/run_python_script_in_conda_env.bat
Run a Python script in a conda environment from a batch file
@echo OFF
rem How to run a Python script in a given conda environment from a batch file.
rem It doesn't require:
rem - conda to be in the PATH
rem - cmd.exe to be initialized with conda init
rem Define here the path to your conda installation
set CONDAPATH=C:\ProgramData\Miniconda3
rem Define here the name of the environment
@mvgolom
mvgolom / spacenet_segnet.py
Created July 23, 2023 12:21 — forked from rdelassus/spacenet_segnet.py
a segnet-like architecture for building detection in the spacenet dataset
#from __future__ import absolute_import
from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img
from keras.callbacks import ModelCheckpoint
from keras.models import Sequential
from keras.layers import Convolution2D, MaxPooling2D
from keras.layers import Layer, Dense, Dropout, Activation, Flatten, Reshape, Merge, Permute
from keras.layers import ZeroPadding2D, UpSampling2D
from keras.layers.normalization import BatchNormalization
import sys
from matplotlib import pyplot as plt
import cv2
img = cv2.imread('/Users/mustafa/test.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
plt.imshow(gray)
plt.title('my picture')
plt.show()
@mvgolom
mvgolom / app.py
Created January 21, 2022 01:26 — forked from huiliu/app.py
Flask Streaming from Templates
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Flask, stream_with_context, request, Response, flash
from time import sleep
app = Flask(__name__)
def stream_template(template_name, **context):
Years Bird Budgie Bull Cat Cow Deer Dog Ferret Fish Fox Goat Hamster Hedgehog Horse Lamb Lizard Pigeon Rabbit Sheep Snake Squirrel Tortoise Unknown
2009 89 0 0 263 0 8 131 0 0 16 0 0 1 19 0 1 0 1 1 3 4 0 30
2010 99 0 1 297 2 9 122 0 2 17 0 3 0 15 1 1 0 2 0 0 5 0 35
2011 120 1 0 309 0 9 103 2 0 26 0 3 0 22 0 0 0 0 0 0 4 0 21
2012 112 0 0 305 3 7 100 1 0 14 0 0 0 27 1 0 0 0 1 0 4 0 20
2013 85 0 0 313 0 7 93 0 0 25 0 3 0 15 0 0 1 0 0 2 7 0 33
2014 110 0 0 298 1 5 90 0 0 22 1 1 0 11 0 0 1 3 0 0 2 0 37
2015 106 0 0 263 0 6 88 1 0 21 0 0 0 11 0 0 0 0 1 0 5 1 36
2016 120 0 0 297 1 14 107 0 0 29 0 4 0 12 0 0 0 2 1 1 3 0 13
2017 124 0 0 258 0 11 81 0 0 33 0 0 0 10 0 0 1 0 0 1 5 0 15
import socket
HOST = '127.0.0.1' # Endereco IP do Servidor
PORT = 5000 # Porta que o Servidor esta
tcp = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
dest = (HOST, PORT)
tcp.connect(dest)
print 'Para sair use CTRL+X\n'
msg = raw_input()
while msg <> '\x18':
tcp.send (msg)
- Nome do projeto X
- Informação de um **pull request** fechado
- Número de linhas modificadas, removidas e adicionadas X
- Quantidade de arquivos alterados, removidos e adicionados X
- Existem testes (caminhos dos arquivos contém "test")
- O pull request foi aceito X
@mvgolom
mvgolom / hello.c
Created March 12, 2020 17:42
paradigma comput paralela
#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
int main(){
#pragma omp parallel
{
//fpc 3.0.0
program HelloWorld;
var
Meunome: String;
Idade: Integer;
begin
writeln('Informe seu Nome');
read(Meunome);
writeln('Informe sua Idade');
read(Idade);
50 50
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 2 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0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