-
Conecte-se ao MySQL com o usuário root.
-
Crie um usuário chamado 'dsi', por meio do comando:
CREATE USER 'dsi'@'localhost' IDENTIFIED BY 'banana';
Nesse caso, a senha do usuário dsi será banana.
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
# Superman March, by John Williams, played by a Raspberry Pi Pico | |
# Tutorial: Using buzzers with Raspberry Pi Pico - https://projects.raspberrypi.org/en/projects/introduction-to-the-pico/9 | |
# Music Scores: https://musicum.net/superman.pdf | |
# Video: https://youtu.be/u6veDQYzYYk | |
import time | |
from picozero import Speaker | |
BPM = 76 | |
BEAT = 60.0 / BPM |
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
codes = { | |
61: 'Brasilia', | |
71: 'Salvador', | |
11: 'Sao Paulo', | |
21: 'Rio de Janeiro', | |
32: 'Juiz de Fora', | |
19: 'Campinas', | |
27: 'Vitoria', | |
31: 'Belo Horizonte' | |
} |
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
package example; | |
import java.awt.BorderLayout; | |
import java.awt.CardLayout; | |
import java.awt.Color; | |
import java.awt.FlowLayout; | |
import java.awt.event.ActionEvent; | |
import java.util.Set; | |
import javax.swing.JButton; |
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 java.util.Scanner; | |
public class ExemploExcecao { | |
public static void main(String[] args) { | |
double[] precos = new double[] {3.95, 1.30, 2.80}; | |
System.out.println("Cotação de Preços"); | |
System.out.print("Fornecedor: "); | |
Scanner sc = new Scanner(System.in); |
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
# Elfos e seus códigos | |
# https://www.urionlinejudge.com.br/judge/pt/problems/view/2020 | |
import string | |
UPPERCASE_LETTERS = string.ascii_letters[26:] | |
list_num = 0 | |
while True: |
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 random | |
import time | |
equipes = [ | |
'@7L4$', | |
'#include<maratona.h>', | |
'A Pena do Ponteiro Solto', | |
'Reapers', | |
'Grupo Ah Moleque', | |
'Anonymous', |
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
#!/bin/bash | |
ADB="$ANDROID_HOME/platform-tools/adb" | |
if [ -z "$1" ]; then | |
echo "usage: $0 <filter> [rm]" | |
exit 1 | |
fi |
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 argparse | |
def main(): | |
parser = argparse.ArgumentParser( | |
description='Compute precision at k.') | |
parser.add_argument( | |
'-k', help='k, to compute precision@k', type=int, default=1) | |
parser.add_argument('qrels', help='TREC relevance file (qrels)') | |
parser.add_argument('topfile', help='TREC results file') |
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 mycosine(v1, v2): | |
""" | |
Calcular o cosseno do ângulo theta, formado pelos vetores v1 e v2. | |
""" | |
raise NotImplementedError | |
# -- BEGIN: não alterar -- | |
try: |
NewerOlder