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
// @flow | |
import React, { PureComponent } from 'react'; | |
import { | |
TouchableWithoutFeedback, | |
Animated, | |
Easing, | |
Image, | |
} from 'react-native'; |
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 { Dimensions, Platform, PixelRatio } from 'react-native'; | |
const { width, height } = Dimensions.get('window'); | |
const getWidthFromDP = (widthPercentage) => { | |
const percentageDesired = parseFloat(widthPercentage); | |
const widthPercentageToDP = PixelRatio.roundToNearestPixel((width * percentageDesired) / 100); | |
return widthPercentageToDP; | |
}; |
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 pandas | |
import datetime | |
import numpy | |
import math | |
import csv | |
from scipy.stats import laplace | |
dataset = pandas.read_csv('income.csv', skiprows = 1, header = None, names = ['name', 'age', 'city', 'state', 'income']) | |
cities = set(dataset['city']) |
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 pandas | |
import datetime | |
import numpy | |
import math | |
import csv | |
dataset_background = pandas.read_csv('background.csv', skiprows = 1, header = None, names = ['nome', 'genero', 'data_nascimento', 'cidade', 'estado']) | |
dataset_diseases = pandas.read_csv('doencas.csv', skiprows = 1, header = None, names = ['genero', 'data_nascimento', 'cidade', 'estado', 'doenca']) | |
dataset_diseases_size = len(dataset_diseases) |
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 pandas | |
import datetime | |
import numpy | |
import math | |
import csv | |
dataset = pandas.read_csv('epidemias.csv', skiprows = 1, header = None, names = ['nome', 'genero', 'data_nascimento', 'cidade', 'estado', 'doencax']) | |
dataset_size = len(dataset) |
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 pandas | |
import datetime | |
import numpy | |
import math | |
import csv | |
from random import randint | |
dataset = pandas.read_csv('epidemias.csv', skiprows = 1, header = None, names = ['nome', 'genero', 'data_nascimento', 'cidade', 'estado', 'doencax']) |
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
dataset = pandas.read_csv('epidemias.csv', skiprows=1, header=None, names=['nome', 'genero', 'data_nascimento', 'cidade', 'estado', 'doencax']) | |
cities = set(dataset['cidade']) | |
states = set(dataset['estado']) | |
def get_gender_value(raw_gender): | |
gender = raw_gender.to_string() | |
index_substring = gender.rfind(' ') + 1 | |
return 0 if gender[index_substring:] == 'Female' else 1 |
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 React from 'react'; | |
import { Provider } from 'react-redux'; | |
import { PersistGate } from 'redux-persist/es/integration/react'; | |
import { View } from 'react-native'; | |
import { store, persistor } from './store'; | |
const App = () => ( |
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 { createStore, applyMiddleware, compose } from 'redux'; | |
import createSagaMiddleware from 'redux-saga'; | |
import { persistStore, persistCombineReducers } from 'redux-persist'; | |
import storage from 'redux-persist/es/storage'; | |
import rootSaga from './sagas'; | |
/* Reducers */ |
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
// Adicionando um user, isso é equivalente a um POST do REST | |
mutation { | |
addUser (userid:"24", name:"joao victor", age: 23) { | |
// Esses parâmetros são o que tu quer saber após o POST | |
userid | |
name | |
age | |
} | |
} |