Created
November 8, 2023 13:10
-
-
Save gilberto-009199/6f76ae29df250a44c2ae0efb2aec50c5 to your computer and use it in GitHub Desktop.
phopreta_bloquear_numeros_ja_sorteados_funcionando.ipynb
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
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"provenance": [], | |
"authorship_tag": "ABX9TyN607Bvsms+2iSFg8eE+DoX", | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"language_info": { | |
"name": "python" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/gilberto-009199/6f76ae29df250a44c2ae0efb2aec50c5/phopreta_bloquear_numeros_ja_sorteados_funcionando.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"# Phopreta Tests" | |
], | |
"metadata": { | |
"id": "boGchH5TugtB" | |
} | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"import os\n", | |
"import pandas as pd\n", | |
"from IPython.display import display, HTML" | |
], | |
"metadata": { | |
"id": "JkfIPOS819i8" | |
}, | |
"execution_count": 1, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"## Como Testar:\n", | |
"\n", | |
" Suba o seu **dataset** no **Gist** e cole a url **Abaixo**:\n", | |
"\n", | |
"+ **Passo** 1(Copiar a tabela, Ctrl + A, Ctrl + C):\n", | |
" ![Copiar a Tabela](https://filedn.com/l3HMwWFeFPE7q4xHdixbsqH/phopreta/EXAMPLE01.png)\n", | |
"\n", | |
"+ **Passo** 2(Criar um gist):\n", | |
" </br> visite o site [gist github](https://gist.github.com/)\n", | |
" ![Copiar a Tabela](https://filedn.com/l3HMwWFeFPE7q4xHdixbsqH/phopreta/EXAMPLE02.png)\n", | |
" Talves seja necessario **criar** uma **conta**\n", | |
"\n", | |
"+ **Passo** 3(Criar um arquivo .txt):\n", | |
" </br> Escreva no campo data.txt,\n", | |
" ![Copiar a Tabela](https://filedn.com/l3HMwWFeFPE7q4xHdixbsqH/phopreta/EXAMPLE03.gif)\n", | |
"\n", | |
"+ **Passo** 4(Criar):\n", | |
" </br> Crie um gist **publico**\n", | |
" ![Copiar a Tabela](https://filedn.com/l3HMwWFeFPE7q4xHdixbsqH/phopreta/EXAMPLE04.gif)\n", | |
"\n", | |
"+ **Passo** 5(Copie a URL):\n", | |
" ![Copiar a Tabela](https://filedn.com/l3HMwWFeFPE7q4xHdixbsqH/phopreta/EXAMPLE06.gif)\n", | |
"\n", | |
"+ **Passo** 6(Copie a URL):\n", | |
" ![Postar URL](https://filedn.com/l3HMwWFeFPE7q4xHdixbsqH/phopreta/EXAMPLE07.gif)\n" | |
], | |
"metadata": { | |
"id": "DgGONZXU51ES" | |
} | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"## Bloquear numeros que já sairam\n", | |
"\n", | |
"![form](https://filedn.com/l3HMwWFeFPE7q4xHdixbsqH/phopreta/CONCURSOSREPETIDOS.gif)" | |
], | |
"metadata": { | |
"id": "EN6kuHKLum_k" | |
} | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"URL_DOS_CONCURSOS=\"https://gist.github.com/gilberto-009199/04a8e07673a424000091f0b169b3354a/raw/64f8be38d055c0243f506ea8fcb5bc264aba7c6f/draws.csv\" # @param {type:\"string\"}\n", | |
"concursos = pd.read_csv(URL_DOS_CONCURSOS, delimiter= ',',header= None,names = ['1°', '2°', '3°', '4°', '5°', '6°', '7°', '8°', '9°', '10°', '11°', '12°', '13°', '14°', '15°'])" | |
], | |
"metadata": { | |
"id": "eqosMcQH1JZO" | |
}, | |
"execution_count": 2, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# @markdown ## **Combinações geradas != resultados dos concursos anteriores?**\n", | |
"URL_DAS_COMBINAÇÕES=\"https://gist.github.com/gilberto-009199/04a8e07673a424000091f0b169b3354a/raw/64f8be38d055c0243f506ea8fcb5bc264aba7c6f/data_not_duplicate_old_result.txt\" # @param {type:\"string\"}\n", | |
"df = pd.read_csv(URL_DAS_COMBINAÇÕES, delimiter= '\\t',header= None ,names = ['combinação', '1°', '2°', '3°', '4°', '5°', '6°', '7°', '8°', '9°', '10°', '11°', '12°', '13°', '14°', '15°'])\n", | |
"\n", | |
"df = df.drop(columns=['combinação'])\n", | |
"\n", | |
"colunas_combinacoes = [f\"{i}°\" for i in range(1, 16)]\n", | |
"\n", | |
"combinacoes_presentes = df.merge( concursos, on=colunas_combinacoes, how='inner')\n", | |
"\n", | |
"# Verifique se há combinações presentes\n", | |
"if not combinacoes_presentes.empty:\n", | |
" print(\"\\n\\t Combinações geradas que ocorreram em concursos anteriores:\\n\")\n", | |
" display(HTML(combinacoes_presentes.to_html()))\n", | |
"else:\n", | |
" print(\"\\n\\tNenhuma combinação gerada ocorreu em concursos anteriores.\")\n" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "zhOQNYRxz0Ay", | |
"outputId": "f9674d72-3223-4e9a-ee91-8fc3db5b0ad2" | |
}, | |
"execution_count": 3, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"\n", | |
"\tNenhuma combinação gerada ocorreu em concursos anteriores.\n" | |
] | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# @markdown ## **Combinações geradas != resultados dos concursos anteriores?**\n", | |
"URL_DAS_COMBINAÇÕES=\"https://gist.github.com/gilberto-009199/311aa96891eb54e84697117def24897d/raw/8140c2e582a3c2c28ecb20c896d3358cbd77185a/data2.txt\" # @param {type:\"string\"}\n", | |
"df = pd.read_csv(URL_DAS_COMBINAÇÕES, delimiter= '\\t',header= None ,names = ['combinação', '1°', '2°', '3°', '4°', '5°', '6°', '7°', '8°', '9°', '10°', '11°', '12°', '13°', '14°', '15°'])\n", | |
"\n", | |
"df = df.drop(columns=['combinação'])\n", | |
"\n", | |
"colunas_combinacoes = [f\"{i}°\" for i in range(1, 16)]\n", | |
"\n", | |
"combinacoes_presentes = df.merge( concursos, on=colunas_combinacoes, how='inner')\n", | |
"\n", | |
"# Verifique se há combinações presentes\n", | |
"if not combinacoes_presentes.empty:\n", | |
" print(\"\\n\\t Combinações geradas que ocorreram em concursos anteriores:\\n\")\n", | |
" display(HTML(combinacoes_presentes.to_html()))\n", | |
"else:\n", | |
" print(\"\\n\\tNenhuma combinação gerada ocorreu em concursos anteriores.\")\n" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "Es6NyV2FCf1x", | |
"outputId": "77811a6b-35e2-479d-ab25-6f5a59274451" | |
}, | |
"execution_count": 6, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"\n", | |
"\tNenhuma combinação gerada ocorreu em concursos anteriores.\n" | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment