<commit_before>require 'uri'
require 'net/http'
require 'openssl'
require 'json'
require 'open-uri'

index = 10
while 1 < 2	
	peticion = "opendata/api/red/radar/regional/va"
	api_key = "<KEY>"
	url = URI("https://opendata.aemet.es/"+peticion+"/?api_key="+api_key)

	http = Net::HTTP.new(url.host, url.port)
	http.use_ssl = true
	http.verify_mode = OpenSSL::SSL::VERIFY_NONE

	request = Net::HTTP::Get.new(url)
	request["cache-control"] = 'no-cache'
	response = http.request(request)
	data = JSON.parse(response.body)
	url_image = data["datos"] +""
	#image = url_image.split("/")[5]
	#url_image = url_image[0,(url_image.length-8)]
	puts url_image
	#puts image

	OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
	open(url_image) {|f|
	   File.open("./ruby_images/image"+index.to_s+".gif","wb") do |file|
	     file.puts f.read
	   end
	}
	index = index + 1
	sleep(120)
end<commit_msg>the name of images are the time where they whre obtined<commit_after>require 'uri'
require 'net/http'
require 'openssl'
require 'json'
require 'open-uri'

index = 100
while 1 < 2	
	peticion = "opendata/api/red/radar/regional/va"
	api_key = "<KEY>"
	url = URI("https://opendata.aemet.es/"+peticion+"/?api_key="+api_key)

	http = Net::HTTP.new(url.host, url.port)
	http.use_ssl = true
	http.verify_mode = OpenSSL::SSL::VERIFY_NONE

	request = Net::HTTP::Get.new(url)
	request["cache-control"] = 'no-cache'
	response = http.request(request)
	data = JSON.parse(response.body)
	url_image = data["datos"] +""
	puts url_image
	time = Time.new()
	file_name = ""+(time.year).to_s+(time.month).to_s+(time.day).to_s+(time.hour).to_s+(time.min).to_s
	puts file_name
	OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
	open(url_image) {|f|
	   File.open("./ruby_images/"+file_name+".gif","wb") do |file|
	     file.puts f.read
	   end
	}
	index = index + 1
	sleep(600)
end
{'fraction_non_alphanumeric': 0.17891891891891892, 'fraction_numerical': 0.010810810810810811, 'mean_word_length': 4.677914110429448, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6481978', 'n_tokens_mistral': 774, 'n_tokens_neox': 749, 'n_words': 131}