This file contains 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
def solution(A): | |
all_bulbs_shine = 0 | |
accumulative_index = 0 | |
accumulative_bulb = 0 | |
for index, bulb in enumerate(A): | |
accumulative_index += index +1 | |
accumulative_bulb += bulb | |
if accumulative_index == accumulative_bulb: | |
all_bulbs_shine += 1 | |
print(index,bulb) |
This file contains 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
from collections import defaultdict | |
class Produto: | |
def __init__(self, preco, quantidade, descricao, foto, fornecedor): | |
preco = self.preco | |
quantidade = self.quantidade | |
fornecedor = self.fornecedor | |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am thaisviana on github. | |
* I am thaisviana (https://keybase.io/thaisviana) on keybase. | |
* I have a public key ASB_CkOQSosCgFpKlPZUoDG6hdPNCYhzkoGU0ijcmRgBKAo | |
To claim this, I am signing this object: |
This file contains 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 dropbox | |
from PIL import Image | |
import os, sys | |
import requests | |
from io import BytesIO | |
from PIL import TiffImagePlugin | |
#TiffImagePlugin.DEBUG = True | |
dbx = dropbox.Dropbox(key, timeout=120.0) |
This file contains 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
news = [ | |
'10001_DG1', | |
'10013_DGZ1', | |
'10013_DGZ2', | |
'10013_DGZ3', | |
'10013_DGZ4', | |
'10013_DGZ5', | |
'10013_DGZ6', | |
'10013_DGZ7', | |
'10574_DGZ1', |
This file contains 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
let exemplo = [[5,3,0,0,7,0,0,0,0], | |
[6,0,0,1,9,5,0,0,0], | |
[0,9,8,0,0,0,0,6,0], | |
[8,0,0,0,6,0,0,0,3], | |
[4,0,0,8,0,3,0,0,1], | |
[7,0,0,0,2,0,0,0,6], | |
[0,6,0,0,0,0,2,8,0], | |
[0,0,0,4,1,9,0,0,5], | |
[0,0,0,0,8,0,0,7,9]] |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="script.js"></script> | |
<link rel="stylesheet" href="style.css"> | |
<title>Sudoku</title> | |
</head> | |
<body onload="start()"> |
This file contains 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
const express = require('express'); | |
const router = express.Router(); | |
// @route POST api/user | |
// @desc Register user | |
// @access Public | |
router.get('/',[], async (req, res) => { | |
try { | |
res.send({'msg' : 'hello'}) |
This file contains 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
<template> | |
<div class="row"> | |
<div class="col-12 mt-5"> | |
<h3>Esse é o produto com o id {{ $route.params.id }}</h3> | |
<p>{{ filmeAtual }}</p> | |
</div> | |
</div> | |
</template> | |
<script> |
This file contains 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
rom django.contrib import admin | |
from django.contrib.auth.admin import UserAdmin | |
from django import forms | |
from django.contrib.auth.forms import (UserChangeForm, UserCreationForm, ) | |
from account.models import User, ROLES | |
class UserForm(UserChangeForm): | |
role = forms.MultipleChoiceField(choices=ROLES, widget=forms.SelectMultiple) | |
OlderNewer