Skip to content

Instantly share code, notes, and snippets.

View luistelmocosta's full-sized avatar

Luís Costa luistelmocosta

  • Porto, Portugal
View GitHub Profile
Using TensorFlow backend.
WARNING:tensorflow:From /opt/conda/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:1264: calling reduce_prod (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
WARNING:tensorflow:From /opt/conda/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:1349: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
Failed loading existing training data.
Unable to open file (truncated file: eof = 203175792, sblock->base_addr = 0, stored_eoa = 203176624)
Loading Trainer from Model_Original plugin...
def get_upsampling_weight(in_channels, out_channels, kernel_size):
"""Make a 2D bilinear kernel suitable for upsampling"""
factor = (kernel_size + 1) // 2
if kernel_size % 2 == 1:
center = factor - 1
else:
center = factor - 0.5
og = np.ogrid[:kernel_size, :kernel_size]
filt = (1 - abs(og[0] - center) / factor) * \
(1 - abs(og[1] - center) / factor)
def filter_rgb_to_hed(np_img, output_type="uint8"):
"""
Filter RGB channels to HED (Hematoxylin - Eosin - Diaminobenzidine) channels.
Args:
np_img: RGB image as a NumPy array.
output_type: Type of array to return (float or uint8).
Returns:
NumPy array (float or uint8) with HED channels.
"""
#t = Time()
player_df = df
player_df['mins_played'] = player_df['mins_played'].astype('int')
player_df['mins_played_2'] = player_df['mins_played'].astype('int')
player_df['ontarget_scoring_att'] = player_df['ontarget_scoring_att'].astype(
'int')
player_df['total_att_assist'] = player_df['total_att_assist'].astype('int')
player_df['aerial_won'] = player_df['aerial_won'].astype('int')
player_df['outfielder_block'] = player_df['outfielder_block'].astype('int')
player_df['ball_recovery'] = player_df['ball_recovery'].astype('int')
player_df['att_ibox_blocked'] = player_df['att_ibox_blocked'].astype('int')
@luistelmocosta
luistelmocosta / full_page.html
Created September 19, 2019 15:38
Html gist
<!doctype html>
<meta charset="utf-8">
<head>
<script type="text/javascript" src="{{ url_for('static', filename='jquery.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='jquery.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='openseadragon.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='openseadragon-scalebar.js') }}"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
This file has been truncated, but you can view the full file.
saved_model_schema_version: 1
meta_graphs {
meta_info_def {
stripped_op_list {
op {
name: "Add"
input_arg {
name: "x"
type_attr: "T"
}
import argparse
def main(args):
import os
import sys
import glob
import random
import pickle
import numpy as np
from PIL import Image
import torch
import torch.nn as nn
import torch.optim as optim
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
import torchvision
import torchvision.transforms as transforms
import os
import numpy as np
import argparse
# Path to oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Theme for zsh
ZSH_THEME="agnoster"
# oh-my-zsh framework plugins
plugins=(git)
source $ZSH/oh-my-zsh.sh
<?php
//This file is included in every .php file
session_start();
error_reporting(E_ERROR | E_WARNING);
//LOCAL
$BASE_DIR = '/home/luiscosta/PhpstormProjects/LBAW-FEUP/'; //CHANGE WITH YOURS
$BASE_URL = '/';