BILANȚ DE la data de 3 Entitatea: PICANT ABATOR SI PRELUCRAREA CARN Județ 29: Prahova, Localitate: Albești Paleologu, Str. - n Număr din registrul comerțului: J29/1447/1997 Cod unic de înregistrare: 9993706 Forma de proprietate: 34 - Societăți comerciale pe acțiu Activitatea preponderentă (cod și denumire clasa CAEN PRELUCRAREA CARNII - S.A. LICHIDARE
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
defmodule Day1 do | |
def read_input do | |
"input.txt" | |
|> File.stream!() | |
|> Stream.map(&String.trim/1) | |
|> Stream.map(&String.to_integer/1) | |
end | |
def combine_freq(input) do | |
Enum.reduce(input, &Kernel.+/2) |
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
CREATE IF NOT EXISTS EXTENSION btree_gist; | |
CREATE TABLE split_vat ( | |
cif varchar, | |
interval daterange NOT NULL, | |
applies_split_vat boolean NOT NULL, | |
EXCLUDE USING | |
gist (interval WITH &&, cif WITH =) | |
); |
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
<?php | |
$ch = curl_init(); | |
$api_key = getenv('OPENAPI_KEY'); | |
$sample_cif = '13548146'; | |
curl_setopt($ch, CURLOPT_URL, "https://api.openapi.ro/api/companies/$sample_cif"); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); | |
curl_setopt($ch, CURLOPT_HEADER, FALSE); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array( |
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 apiKey = prompt('Introdu cheia ta API. Aceasta o gasesti in contul tau openapi') | |
var testCIF = prompt('Introdu un CIF valid sau lasa gol pentru un CIF de test') || '13548146' | |
const xhr = new XMLHttpRequest() | |
xhr.open('GET', `https://api.openapi.ro/v1/companies/${testCIF}`, true) | |
xhr.setRequestHeader('x-api-key', apiKey) | |
xhr.send() | |
const processResponse = (e) => { | |
if (xhr.readyState == 4) { |
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
\set QUIET 1 | |
\pset null '¤' | |
\set PROMPT1 '%[%033[1m%][%/] # ' | |
-- SELECT * FROM<enter>. %R shows what type of input it expects. | |
\set PROMPT2 '... > ' | |
\timing | |
\x auto |
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
mtarnovan@vps1 ~ # curl --progress-bar -L --fail --retry 3 --retry-delay 1 --connect-timeout 5 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/cedar-14/ruby-2.3.0.tgz -O | |
######################################################################## 100.0% | |
mtarnovan@vps1 ~ # md5sum ruby-2.3.0.tgz | |
dd963e5a41247a7d4e8817efe95e8123 ruby-2.3.0.tgz | |
mtarnovan@vps2:~$ curl --progress-bar -L --fail --retry 3 --retry-delay 1 --connect-timeout 5 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/cedar-14/ruby-2.3.0.tgz -O | |
######################### 35.0%Warning: Transient problem: timeout Will retry in 1 seconds. 3 retries left. | |
Throwing away 6370974 bytes | |
###################### 31.3%Warning: Transient problem: timeout Will retry in 1 seconds. 2 retries left. | |
Throwing away 5692062 bytes |
I hereby claim:
- I am mtarnovan on github.
- I am mtarnovan (https://keybase.io/mtarnovan) on keybase.
- I have a public key whose fingerprint is 28D4 3A99 DD98 7344 211C 4682 5246 B8DE 571A 1E21
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
defmodule CifValidator do | |
@test_key "753217532" | |
def valid_cif?(cif) do | |
well_formed?(cif) && control_sum_matches?(cif) | |
end | |
defp control_sum_matches?(cif) do | |
test_key = @test_key | |
|> to_integer_list |
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
# a mapping from turkish to romanian code points | |
# Ş => Ș etc | |
TURKISH_TO_ROMANIAN = { | |
350 => 536, | |
351 => 537, | |
354 => 538, | |
355 => 539 | |
}.freeze | |
def turkish_to_romanian(string) |
NewerOlder