I hereby claim:
- I am vhogemann on github.
- I am vhogemann (https://keybase.io/vhogemann) on keybase.
- I have a public key ASA_DuDI3YD6ZS9-IW0PaaZvm-8G0teGzybzSob-JYRsbwo
To claim this, I am signing this object:
#! /bin/bash | |
# String retornada pelo reg.exe em caso de update com sucesso | |
REG_UP_OK="The operation completed successfully" | |
# Checa se existe lista de hosts não atualizados | |
if [ -e mortos.txt ]; then | |
# Se existe, renomeia para tmp.txt e o utiliza... | |
# criando uma nova lista para as maquinas que não atualizarem | |
mv mortos.txt tmp.txt | |
HOST_LIST="tmp.txt" | |
else |
export function Debounce(wait: number) { | |
return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) { | |
let timeout; | |
const original:Function = descriptor.value; | |
const debounced = function() { | |
const context = this; | |
const args = arguments; | |
const later = function() { | |
timeout = null; | |
original.apply(context, args); |
/** | |
* Use like *ngFor="let key of ( object | keys )" | |
*/ | |
@Pipe({ name: 'keys', pure: false }) | |
export class KeysPipe implements PipeTransform { | |
transform(value: any, args: any[] = null): any { | |
if(!value) return []; | |
return Object.keys(value); | |
} | |
} |
//@ts-check | |
const fs = require("fs"); | |
const axios = require("axios").default; | |
let bearerToken = process.env.TWITTER_BEARER_TOKEN; | |
const headers = { 'Authorization': `Bearer ${bearerToken}` }; | |
const client = axios.create({baseURL : 'https://api.twitter.com/1.1/tweets/search/', headers : headers}) |
namespace Test | |
module RandomPort = | |
open System | |
open System.Net.NetworkInformation | |
let isFree port = | |
let props = | |
IPGlobalProperties.GetIPGlobalProperties() | |
let tcpListeners = | |
props.GetActiveTcpListeners() |
I hereby claim:
To claim this, I am signing this object:
// Em resposta a https://x.com/zanfranceschi/status/1819413388360810601 | |
/* | |
O que eu estou fazendo aqui é converter a string em um array de char usando | |
o método Reverse(), e fazendo cast direto de char pra int. Cada dígito vai | |
corresponder ao seu valor ASCII. Os números na tabela ASCII começam em 0, com o | |
valor decimal 48. Então eu só diminuo 48 do valor do caracter pra ter o valor | |
numérico de 0 até 9. | |
*/ | |
double parse(string value) { |
open System.IO | |
let load () = | |
let envFile = Path.Combine(__SOURCE_DIRECTORY__, ".env") | |
if File.Exists(envFile) then | |
File.ReadAllLines(envFile) | |
|> Array.map (fun line -> line.Split('=')) | |
|> Array.map (fun parts -> parts.[0], parts.[1]) | |
|> Map | |
else |
A questão que você está levantando é muito interessante e traz à tona o problema de como as distribuições de probabilidade influenciam o desempenho de modelos como o ChatGPT, que são treinados em dados de linguagem natural, onde as palavras seguem uma distribuição de Lei de Potência (como a Lei de Zipf).
#!/usr/bin/env sh | |
if [ ! -f "./legislaturas.json" ]; then | |
# downloads the file legislaturas.json | |
curl -s "https://dadosabertos.camara.leg.br/arquivos/legislaturas/json/legislaturas.json" > "./legislaturas.json" | |
fi | |
if [ ! -f "./deputados.json" ]; then | |
# downloads the file deputados.json | |
curl -s "https://dadosabertos.camara.leg.br/arquivos/deputados/json/deputados.json" > "./deputados.json" |