Here ~/ means the repository main folder.
- Define ~/requirements.txt with all your Python Dependencies. For instance:
flask
numpy
pandas
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 | |
=== |
% 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 |
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') |