<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="et">
	<id>http://www.lambda.ee/w/index.php?action=history&amp;feed=atom&amp;title=Sample_Gemini_code_and_prompt</id>
	<title>Sample Gemini code and prompt - Redigeerimiste ajalugu</title>
	<link rel="self" type="application/atom+xml" href="http://www.lambda.ee/w/index.php?action=history&amp;feed=atom&amp;title=Sample_Gemini_code_and_prompt"/>
	<link rel="alternate" type="text/html" href="http://www.lambda.ee/w/index.php?title=Sample_Gemini_code_and_prompt&amp;action=history"/>
	<updated>2026-10-28T14:31:35Z</updated>
	<subtitle>Selle lehekülje redigeerimiste ajalugu</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>http://www.lambda.ee/w/index.php?title=Sample_Gemini_code_and_prompt&amp;diff=22014&amp;oldid=prev</id>
		<title>Riina: Uus lehekülg: &#039;&lt;pre&gt; #!/usr/bin/env python3  from google import genai import os  api_key = os.environ[&quot;GEMINI_API_KEY&quot;] client = genai.Client(api_key=api_key)  #cities = [&quot;Tartu&quot;, &quot;Saue&quot;, &quot;Jõg...&#039;</title>
		<link rel="alternate" type="text/html" href="http://www.lambda.ee/w/index.php?title=Sample_Gemini_code_and_prompt&amp;diff=22014&amp;oldid=prev"/>
		<updated>2025-02-26T15:35:34Z</updated>

		<summary type="html">&lt;p&gt;Uus lehekülg: &amp;#039;&amp;lt;pre&amp;gt; #!/usr/bin/env python3  from google import genai import os  api_key = os.environ[&amp;quot;GEMINI_API_KEY&amp;quot;] client = genai.Client(api_key=api_key)  #cities = [&amp;quot;Tartu&amp;quot;, &amp;quot;Saue&amp;quot;, &amp;quot;Jõg...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Uus lehekülg&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/env python3&lt;br /&gt;
&lt;br /&gt;
from google import genai&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
api_key = os.environ[&amp;quot;GEMINI_API_KEY&amp;quot;]&lt;br /&gt;
client = genai.Client(api_key=api_key)&lt;br /&gt;
&lt;br /&gt;
#cities = [&amp;quot;Tartu&amp;quot;, &amp;quot;Saue&amp;quot;, &amp;quot;Jõgeva&amp;quot;, &amp;quot;Türi&amp;quot;, &amp;quot;Võhma&amp;quot;, &amp;quot;Kuressaare&amp;quot;, &amp;quot;Paldiski&amp;quot;, &amp;quot;Võru&amp;quot;, &amp;quot;Rakvere&amp;quot;, &amp;quot;Kärdla&amp;quot;, &amp;quot;Rapla&amp;quot;, &amp;quot;Põlva&amp;quot;, &amp;quot;Haapsalu&amp;quot;, &amp;quot;Pärnu&amp;quot;, &amp;quot;Kohtla-Järve&amp;quot;, &amp;quot;Narva&amp;quot;, &amp;quot;Viljandi&amp;quot;, &amp;quot;Valga&amp;quot;, &amp;quot;Tallinn&amp;quot;, &amp;quot;Paide&amp;quot;]&lt;br /&gt;
cities = [&amp;quot;Rapla&amp;quot;, &amp;quot;Saue&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
for city in cities:&lt;br /&gt;
    response = client.models.generate_content(&lt;br /&gt;
        model=&amp;quot;gemini-2.0-flash&amp;quot;, contents=f&amp;quot;What are capacity and other information about the buildings in {city}, Estonia? \&lt;br /&gt;
            Give your answers about the facts as RDF triples, where every triple is on a separate line. Use prefix format for subject, predicate and object. Use prefix llm: as a default prefix. \&lt;br /&gt;
            Use schema.org where possible. Include a triple about schema:location. Output only triples. Do not add comments! Do not add quotes around the numbers!&amp;quot;&lt;br /&gt;
    )&lt;br /&gt;
    print(response.text.strip(&amp;quot;```&amp;quot;).strip(&amp;quot;turtle&amp;quot;))&lt;br /&gt;
    print(f&amp;quot;llm:{city} owl:sameAs yago:{city} .&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Riina</name></author>
	</entry>
</feed>