Skip to content

Instantly share code, notes, and snippets.

View hereismari's full-sized avatar
🎸
Focusing

Marianne Monteiro hereismari

🎸
Focusing
View GitHub Profile
@hereismari
hereismari / inference_time_pruning_with_keras.ipynb
Last active May 27, 2019 16:50
inference_time_pruning_with_keras.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import torch
import pandas as pd
import numpy as np
import syft as sy
import copy
hook = sy.TorchHook(torch)
from torch import nn
import torch.nn.functional as F
from torch import optim
function Square(props) {
return (
<button className="square" onClick={props.onClick} style={ props.highlight ? { background: 'green' } : { background: 'white' } }>
{props.value}
</button>
);
}
class Board extends React.Component {
# -*- coding: utf-8 -*-
"""nlp_estimators.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1oXjNYSJ3VsRvAsXN4ClmtsVEgPW_CX_c
Classifying text with TensorFlow Estimators
===
@hereismari
hereismari / satellite_classifier.ipynb
Created September 26, 2018 13:16
simple satellite image classifier
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Deploying Flask on Heroku

Here ~/ means the repository main folder.

  1. Define ~/requirements.txt with all your Python Dependencies. For instance:
flask
numpy
pandas
% funcao auxiliar que corta uma palavra adequadamente para flexiona-la
reduzir(VERBO, VERBO_REDUZIDO, N) :-
% tamanho do verbo eh TAM_VERBO
string_length(VERBO, TAM_VERBO),
% devemos retirar as ultimas N letras do verbo
FIM_VERBO is TAM_VERBO-N,
% o resultado eh guardado em VERBO_REDUZIDO
sub_atom(VERBO, 0, FIM_VERBO, _, VERBO_REDUZIDO).
% EU
@hereismari
hereismari / msi-gtx1060-ubuntu-18.04-deeplearning.md
Last active December 3, 2023 17:14
Setting up a MSI laptop with GPU (gtx1060), Installing Ubuntu 18.04, CUDA, CDNN, Pytorch and TensorFlow
import json
from urllib2 import Request, urlopen
html = Request('http://codeforces.com/api/problemset.problems')
response = urlopen(html)
x = response.read()
data = json.loads(x)
print len(data['result']['problems']) # dict with data from ~ 3912 problems
html = Request('http://codeforces.com/api/user.ratedList')