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
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| // Note that the Halton bases must consist of coprime integers. | |
| // Learn more about the Halton sequence: https://en.wikipedia.org/wiki/Halton_sequence | |
| // Learn more about low discrepancy sequences: https://en.wikipedia.org/wiki/Low-discrepancy_sequence | |
| // Learn more about coprime numbers: https://en.wikipedia.org/wiki/Coprime_integers |
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
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
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
| library(microdatasus) | |
| library(tidyverse) | |
| estados<- c("AC","AL","AM", "AP", "BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB", "PR","PE","PI","RJ","RS","RN","RO","RR","SC","SP","SE","TO") | |
| download.file("ftp://ftp.datasus.gov.br/dissemin/publicos/SIHSUS/200801_/Doc/IT_SIHSUS_1603.pdf", destfile = "documentacao.pdf", mode= "wb", method = "libcurl" ) | |
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
| custom_scripts/ | |
| .vscode/ | |
| pyproject.toml | |
| poetry.lock | |
| *.equi | |
| *.cst |
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
| #!/usr/bin/env python3 | |
| # uv run lemire.py --token <your_github_token> --user <github_username> | |
| # | |
| # To generate a GitHub Personal Access Token: | |
| # 1. Go to https://github.com/settings/tokens | |
| # 2. Click "Generate new token (classic)" | |
| # 3. Give it a name, e.g., "GitHub Search Script" | |
| # 4. Select scopes: For public repositories, select "public_repo". For private, select "repo". | |
| # 5. Click "Generate token" | |
| # 6. Copy the token and use it as --token argument. |
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
| from collections import defaultdict | |
| from graphlib import TopologicalSorter | |
| from heapq import heappush, heappop, heapify | |
| def topo_lex(pairs): | |
| deps = defaultdict(set) # node -> set(dependencies) | |
| for a, b in pairs: | |
| deps.setdefault(a, set()) | |
| deps[b].add(a) |
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
| # Os dados estão presentes no repositório big query da base dos dados | |
| SELECT id_municipio, | |
| count(*) as quantidade_nivel_superior, | |
| ( select count(*) | |
| from `basedosdados.br_me_rais.microdados_vinculos` vinc_sub | |
| where vinc_sub.id_municipio = vinc.id_municipio and | |
| ano = 2023 and | |
| vinculo_ativo_3112 ="1" and | |
| natureza_juridica = "1244") as total_servidores_municipio, #1244= município |
NewerOlder