tag:blogger.com,1999:blog-26041047244685845042024-03-13T13:49:09.099-07:00Life, the Universe and Everythingmy notes and legacy of what do i know and have doneLauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.comBlogger156125tag:blogger.com,1999:blog-2604104724468584504.post-91296040391547881282023-11-09T02:13:00.003-08:002023-11-09T02:14:01.385-08:00Things you do once in 10 years ...<p> I enjoy fixing things, setting them up, installing and configuring, breaking and testing too. And the things can be computer things and apps, and also physical things and devices and stuff. I am glad that I have digital competences so I can do most of the digital things by my own. But sometimes they also are quite challenging. </p><p>When more than 10 years ago (almost 15 years ago, omg...) I set up this blog, one of my proudest moments was when I bought a domain and made this blog availabe thru a domain name. Instead of typing lauvadidzis.blogspot.com I got unique with my lauvadidzis.com address. And I was proud. I like computers but in life I have to million other things for living. The problem with million things to do is the constant motion of the attention. So, I got familiar with Domain zones and zone records, but not in depth. I got an understanding in what way they are important. Got an idea of A and MX records. Primarily I use domain for a email and secondly for this blog. I got in in the Google suite while it was offered for free and I got used to google services pretty much. Made different accounts for me and my "million other things" and had a nice hierarchy of what I did in my life. When I started my company I even used google aliases for company`s email and I saved pretty much money with the things I managed to do with the googles help. And then came 2021. Google basically fucked their legacy users and I had a painful time to move away from google. Well, I found a local company which gave plenty of digital platform needs for me for the same price google started to ask per account. The best part was that on that local company`s platform I was able to "re-create" those many different accounts I had previously on google. So, in the end I was paying 6 times less as if I would have to pay to google if I would stay with it. </p><p>This was the second time when I had to work with domain name, zones and entries. But somehow I was successful with platform changes and everything worked fine. </p><p>Yesterday I was trying to reconfigure my email program on computer and thought I can set up webmail access too for my email. Ok, got it working fine. But while I was setting it up, I started to poke domain zone settings too. And when you start poking things like that and again fall for not doing backups for the settings, things can go terribly wrong. Well, I lost few hours to figuring how to get the domain name for my website (this blog) back, but most importantly, how to get the email MX records back...</p><p>So, few notes to add here - </p><p>when I connect this blog with a domain zones, I need two important CNAME entries - </p><p></p><ol style="text-align: left;"><li>for ghs.google.com and </li><li>for key:name pair.</li></ol><p></p><p></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEipifukUZYQdPeq_6qyGGIO5u1k1C-PcyARkiV8uhf6GMxqPyvFoFigJlByLLbtojBKlZkU6MswnUt8STXN2_4yVdTCTJIAJt97P6tbJpF2SWUg6WyMd-_i4C-ixvdQ1o3AS5LMZ0YhCPsK6JaB66t0Jz9lY1tNXvb5B9gI_-lS4Mst-1IqWhtMo2VOHSwW" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="313" data-original-width="984" height="204" src="https://blogger.googleusercontent.com/img/a/AVvXsEipifukUZYQdPeq_6qyGGIO5u1k1C-PcyARkiV8uhf6GMxqPyvFoFigJlByLLbtojBKlZkU6MswnUt8STXN2_4yVdTCTJIAJt97P6tbJpF2SWUg6WyMd-_i4C-ixvdQ1o3AS5LMZ0YhCPsK6JaB66t0Jz9lY1tNXvb5B9gI_-lS4Mst-1IqWhtMo2VOHSwW=w640-h204" width="640" /></a></div><br /><br /></div>The other thing which is important in my case is TXT records for mail delivery.<p></p><p><br />The TXT record is an SPF (Sender Policy Framework) record. SPF is a type of DNS record that identifies which mail servers are authorized to send email on behalf of a particular domain.</p><p><b>v=spf1</b>: This specifies the version of SPF being used, which is SPF version 1.</p><p><b>include:_spf.google.com:</b> This part indicates that the domain's SPF policy includes the SPF record of _spf.google.com. This means that the current domain's email can be sent through the servers listed in Google's SPF record.</p><p><b>~all: </b>This is the last part of the SPF record and signifies the action to be taken if the SPF check fails. In this case, the tilde (~) symbol indicates a soft fail, which means that the SPF check will not result in a hard rejection of the email, but the email might be marked or flagged as potentially suspicious.</p><p><br /></p><p>I also discovered a service mxtoolbox.com which allows to check the domain MX records. </p><p>So, now I have a backup notes for myself in case I poke the Domain zone entries again :) I know that I will do that... Maybe sooner than after 10 more years.</p>Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-47520292717080268382023-01-07T08:46:00.002-08:002023-01-07T08:46:34.637-08:00Making PCR-800 working under Windows 10<p> I bought PCR-800 back in 2008. So, today when I write this post, I own it for 14 years. I havent used it a lot in these years (nevertheless I substituted my main stage piano Kawai MP4 for one summer with this due to Kawai motherboard fried and I needed to replace it. Different story tho.) But when I used it, due to lack of driver support (last out of the box compatible OS is Windows 8.1 64bit) I kept it mostly in the bag and rarely connected it to my PC via Edirol FA-66 external sound card (also fried it once. Another different story tho.) using its MIDI port. Downside - I have to deal with power cable for my keyboard (but I am lazy person) instead of powering it using USB</p><p>During last Christmas break I found a time to research a little bit more about setting my PCR-800 for Windows 10. And some old Cakewalk forums had the info that Windows 8.1 drivers will work fine with one slight modification in the driver file. Without this driver my PCR-800 in the device manager was found as unknown hardware and windows did not offer any valid drivers for it.</p><p>Driver files often have their INF files which in plain text defines different details about the hardware and they are used to set the hardware up for the operating system. And that is also a problem. So, if the INF file is for Windows 8.1, then I have to modify the file so it is suitable also for Windows 10. </p><p>First thing - download those drivers locally. </p><p>Then - open INF file and find line which defines Manufacturer and replace the line</p><ol class="ini" style="background: rgb(255, 255, 255); box-sizing: border-box; color: #333333; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace, serif; font-size: 12px; margin: 0px !important; padding: 0px 10px; vertical-align: baseline;"><li class="li1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #acacac; list-style-type: decimal; margin: 0px 0px 0px -6px; padding: 0px; user-select: none; vertical-align: baseline;"><div class="de1" id="geom_inter_1673109332050_20_6" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: black; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top; white-space: pre-wrap;">%MfgName%<span class="sy0" style="box-sizing: border-box; color: #000066; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline;">=</span>Roland,NTamd64.6.2,NTamd64.7</div></li></ol><p>with the line </p><ol class="ini" style="background: rgb(255, 255, 255); box-sizing: border-box; color: #333333; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace, serif; font-size: 12px; margin: 0px !important; padding: 0px 10px; vertical-align: baseline;"><li class="li1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #acacac; list-style-type: decimal; margin: 0px 0px 0px -6px; padding: 0px; user-select: none; vertical-align: baseline;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: black; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top; white-space: pre-wrap;">%MfgName%<span class="sy0" style="box-sizing: border-box; color: #000066; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline;">=</span>Roland,NTamd64.10,NTamd64.7</div></li></ol><div><span style="font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, monospace, serif;"><span style="font-size: 12px; white-space: pre-wrap;"><br /></span></span></div><p>Or in other words it is visible that NTamd64.6.2 which corresponds to Windows 8 is now replaced to NTamd64.10 which seemingly corresponds to windows 10. There are interesting info when I googled about these numbers, mostly all of them related to Roland hardware.</p><p>The other changes need to be done under the particular NTamdxxx section - the section name itself has to be renamed:</p><ol class="ini" style="background: rgb(255, 255, 255); box-sizing: border-box; color: #333333; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace, serif; font-size: 12px; margin: 0px !important; padding: 0px 10px; vertical-align: baseline;"><li class="li1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #acacac; list-style-type: decimal; margin: 0px 0px 0px -6px; padding: 0px; user-select: none; vertical-align: baseline;"><div class="de1" id="geom_inter_1673109332050_80_8" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: black; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top; white-space: pre-wrap;"><span class="re0" style="box-sizing: border-box; color: #000066; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="br0" style="box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;">[</span>Roland.NTamd64.6.2<span class="br0" style="box-sizing: border-box; margin: 0px; padding: 0px; vertical-align: baseline;">]</span></span></div></li></ol><div><br /></div><div>needs to be replaced with this line</div><div><br /></div><div><ol class="ini" style="background: rgb(255, 255, 255); box-sizing: border-box; color: #333333; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace, serif; font-size: 12px; margin: 0px !important; padding: 0px 10px; vertical-align: baseline;"><li class="li1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #acacac; list-style-type: decimal; margin: 0px 0px 0px -6px; padding: 0px; user-select: none; vertical-align: baseline;"><div class="de1" id="geom_inter_1673109332050_80_8" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: black; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top; white-space: pre-wrap;"><span class="br0" style="box-sizing: border-box; color: #000066; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline;">[</span><span style="color: #000066; font-weight: bold;">Roland.NTamd64.10</span><span class="br0" style="box-sizing: border-box; color: #000066; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline;">]</span></div></li></ol><div><span style="color: #000066; font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, monospace, serif;"><span style="font-size: 12px; white-space: pre-wrap;"><b><br /></b></span></span></div></div><div>I havent experimented with would it work if the driver will install if the rest of the sections (Roland, Roland.NTamd64.7 would be deleted. Cant take that for granted.</div><div><br /></div><div>The last part is to disable the driver signature enforcement. There are some <i>powershell </i>and <i>bcdedit </i>techniques, but those did not work with my system. The last resort for me was to restart the windows 10 in advanced boot options (can be done through Update and Security dialogs or hitting F8 during the startup) and then select the option for booting the Windows 10 with driver signature enforcement turned off. That worked for me fine and I can now write my own sheet music in Sibelius.</div>Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-2413747321099014152022-10-30T08:29:00.000-07:002022-10-30T08:29:05.824-07:00Adding WiFi to HP Laserjet Pro M15a with Raspberry Pi B+<p></p><p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> I have an old Raspberry Pi B+ since 2014. Did some
experiments back then, even made it to broadcast a FM radio within 50m radius,
but now I`m giving to it a new, particular tasks to do - make my simple and
cheap HP LaserJet to be found in the local home network. <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">So, I will need a few things. Firstly, a fresh SD Card with
Legacy Raspbian OS, CLI. (While installing with Raspberry Pi imager, it is
convenient to set all the necessary settings like enabling ssh and home wifi ,
so no monitor and external keyboards will be neccessary.) Then, install
PuTTY. <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Finding the ip address of the pi can be done through home
router (if DNA automatically assigns it), or ... attach it to separate monitor
or keyboard.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Then, when you log in via ssh - first things - <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">sudo apt update <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">and <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">sudo apt upgrade<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">When repos are set, next thing is installing CUPS (Common
UNIX printing system). <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">sudo apt-get install cups <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">It is not enough tho. HP Laserjet Pro M15a will need hp
drivers. This is where hplip can be helpful.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">sudo apt-get install hplip<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">After HP drivers are installed, the CUPS needs to be
configured so its admin page is available from any computer within my network.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">So a CUPS configuration file needs a few modifications.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Editing /etc/cups/cupsd.conf:<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"># Listen on external interfaces for connections<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Listen <b>TheIPofMyRaspberryPI</b>:631<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Listen /var/run/cups/cups.sock<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"># Show shared printers on the local network.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Browsing On<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">BrowseOrder allow,deny<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">BrowseAllow all<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><b><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">BrowseAddress All</span></b><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"># Default authentication type, when authentication is
required...<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">DefaultAuthType Basic<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"># Restrict access to the server...<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><Location /><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> Order allow,deny<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> Allow localhost<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><b><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> Allow All</span></b><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"></Location><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"># Restrict access to the admin pages...<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><Location /admin><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> Order allow,deny<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><b><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> Allow All</span></b><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"></Location><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"># Restrict access to configuration files...<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><Location /admin/conf><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> AuthType Default<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> Require user @SYSTEM<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> Order allow,deny<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> <b> Allow All</b><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"></Location><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">And now I can restart the service.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">sudo service cups restart <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">or <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">sudo /etc/init.d/cups restart<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Now lets add Raspberry Pi user to the lpadmin group<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">sudo usermod -a -G lpadmin your-username<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Now the printer should be visible in the CUPS configuration
page.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Opening the CUPS conf page on the browser - CUPS port is
631 <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">http://raspberrypiIPaddress:631<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Navigate to add a printer. <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Now you should be able to see a printer in the list. <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">In the end let`s make a Raspberry Pi having a static ip
address. I have Mikrotik router. <o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Under the section </span><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">IP</span><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> find </span><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">DHCP server</span><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> and
select the </span><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Leases</span><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"> tab there. Find your RPi there, click
on it, and click on the button </span><span style="color: black; font-family: "Courier New"; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">"Make Static"</span><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="color: black; font-family: "Times New Roman",serif; font-size: 13.5pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Then add printer on your local devices. It should show up.<o:p></o:p></span></p>
<p align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; text-align: center;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgCJEUJSGxjHlbmQi5m7VqpXyi_fP5Y6aDuJWSsD2x81qZiyKeZmLJJ9N4DrPZ8bXin8pLufxPfylPZlhqLeHez1vDCg1Hy9YxHLHroEXjXg24QmmlS5WLYLOHELG7tvu7PMqHczjRw0d4MQT7e5-G03mi3eZY6NkCEVcPqyAxgKufxrNpQGZffhADlOA" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="421" data-original-width="806" height="334" src="https://blogger.googleusercontent.com/img/a/AVvXsEgCJEUJSGxjHlbmQi5m7VqpXyi_fP5Y6aDuJWSsD2x81qZiyKeZmLJJ9N4DrPZ8bXin8pLufxPfylPZlhqLeHez1vDCg1Hy9YxHLHroEXjXg24QmmlS5WLYLOHELG7tvu7PMqHczjRw0d4MQT7e5-G03mi3eZY6NkCEVcPqyAxgKufxrNpQGZffhADlOA" width="640" /></a></div><br /><br /><p></p>
<p align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0cm; text-align: center;"><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm;"><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;">Happy printing!<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0cm;"><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-font-kerning: 0pt; mso-ligatures: none;"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p><br /><p></p>Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-83840345876336315442022-08-26T03:30:00.001-07:002022-08-26T03:30:06.179-07:00Restoring some old P1 computer<p> Got a PC from a friend about year ago. Old, with Intel Pentium 100 processor on the <a href="https://theretroweb.com/motherboards/s/msi-ms-5124-si7">MSI mobo MSI MS-5124 </a></p><p>So it had a problem with accessing a HDD. First thought - dead or going to die HDD. Tested and realized HDD working fine, but not correctly recognized. Swapped cables, tried different other HDDs, but when detecting the HDD, some gibberish on screen instead of HDD model. So, it sounds like a mobo or chipset fault. I even swapped the bios. </p><p>Next thing I tried was some IDE controller cards. But those also without success.</p><p>And then I tried SCSI controller with SCSI disk. Well, it worked. SCSI disk size is 36.4 Gb. </p><p>Now transferring the system from Win 98 floppy.</p><p><br /></p><p>Some notes for me and for future.</p><p>To make the disk bootable the system must be transferred from floppy to <i>C </i>disk using the command <i>sys C</i></p><p>The <i>sys.com </i>executable is compressed in the cabinet file <i>ebd.cab </i>and must be extracted. Depends of the Win 98 boot disk. I had to extract it. I extracted all files on formatted C disk and then copied <i>sys.com</i> back to <i>A </i>disk and then ran the <i>sys C. </i>Most likely this could be done directly by extracting <i>sys</i> file to <i>A</i> disk, instead of <i>C </i>disk.</p><p>Things I used fo avoid floppy nightmare - Gotek floppy emulator (multiple floppy images on usb flash) https://www.gotekemulator.com/</p><p>Things to do next - have to get all Win95 floppy disk images, upload it on my flash and install Win95</p><p>Because, why not?</p><p><br /><br /><br /></p>Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-69946447320645570842022-08-26T03:13:00.000-07:002022-08-26T03:13:42.191-07:00Computer hardware abbreviation list<p> Starting new job - teaching those young people something about how computers work. In hardware level. This semester will be tough - will have to understand and simultaneously organise the course. </p><p>Moodle, of course, as a platform where to put all tasks, activities, tests, materials. Since university is still setting all of that up for me, had to save one of the activities somewhere. And - why not to share.</p><p>So here it is - computer <a href="https://docs.google.com/document/d/1GcHEyF4DsIoePED_u37t-4iUxKQri62T3L8x3cY6VTw" target="_blank">hardware abbreviation list</a> - task to give to studens so they find the definitions of abbreviations so often seen around.</p><p>And here the <a href="https://docs.google.com/document/d/12aXZl4eR5pujb_SrLuwsfnEY3UP-71yrhMbRFvW1Uks/edit?usp=sharing" target="_blank">same task in latvian</a>. </p>Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-52780598549808963462021-04-12T06:53:00.004-07:002021-04-12T06:53:30.056-07:00Kā iegūt bulk meteodatus no meteo.lv<p> </p><div class="cell border-box-sizing text_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="text_cell_render border-box-sizing rendered_html" style="border-style: none; box-sizing: border-box; outline: none; overflow: auto hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;"><h1 id="Darbam-ar-meteo.lv-datiem" style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 25.998px; line-height: 1; margin: 0.538em 0px 0px;">Darbam ar meteo.lv datiem<a class="anchor-link" href="file:///C:/Users/didzi/git%20projects/meteo.lv/MeteoDatuFetcheris.html#Darbam-ar-meteo.lv-datiem" style="box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;"></a></h1><p style="box-sizing: border-box; margin: 1em 0px 0px;">Izvēlies staciju, izvēlies parametrus, izvēlies laika intervālu (sākuma un beigu gadus) un dari ar datiem, ko vēlies.</p><h3 id="Staciju-ID" style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 18.004px; line-height: 1; margin: 1.55em 0px 0px;">Staciju ID<a class="anchor-link" href="file:///C:/Users/didzi/git%20projects/meteo.lv/MeteoDatuFetcheris.html#Staciju-ID" style="box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;"></a></h3><p style="box-sizing: border-box; margin: 1em 0px 0px;">30000 : Ainaži</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30004 : Alūksne</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30011 : Bauska</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10000120 : Dagda</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30018 : Dagda</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30021 : Daugavpils</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30022 : Dobele</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30034 : Gulbene</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30036 : Jelgava</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30040 : Kalnciems</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30046 : Kolka</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30048 : Kuldīga</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30058 : Lielpeči</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30060 : Liepāja</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10000118 : Liepāja piekraste</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30068 : Madona</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30072 : Mērsrags</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30081 : Piedruja</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30087 : Priekuļi</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30080 : Pāvilosta</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30099 : Rucava</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10000180 : Rēzekne</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30092 : Rēzekne</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30094 : Rīga</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30096 : Rīga - Universitāte</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30100 : Rūjiena</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30102 : Saldus</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30103 : Sigulda</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30105 : Skrīveri</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30106 : Skulte</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30111 : Stende</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30104 : Sīļi</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30128 : Ventspils</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30132 : Vičaki</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30141 : Zosēni</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">30140 : Zīlāni</p><h3 id="parametru-ID" style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 18.004px; line-height: 1; margin: 1.55em 0px 0px;">parametru ID<a class="anchor-link" href="file:///C:/Users/didzi/git%20projects/meteo.lv/MeteoDatuFetcheris.html#parametru-ID" style="box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;"></a></h3><p style="box-sizing: border-box; margin: 1em 0px 0px;">4514 : Aramkārtas temperatūra 10 cm dziļumā, faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4515 : Aramkārtas temperatūra 15 cm dziļumā, faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4516 : Aramkārtas temperatūra 20 cm dziļumā, faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4513 : Aramkārtas temperatūra 5 cm dziļumā, faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4167 : Atmosfēras spiediens stacijas līmenī, faktiskais</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4457 : Augsnes virsmas stāvoklis</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4459 : Augsnes virsmas temperatūra, faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4464 : Augsnes virsmas temperatūra, stundas maksimālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4462 : Augsnes virsmas temperatūra, stundas minimālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4327 : Augšējo mākoņu forma</p><p style="box-sizing: border-box; margin: 1em 0px 0px;"><strong style="box-sizing: border-box;">4001 : Gaisa temperatūra, faktiskā</strong></p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4008 : Gaisa temperatūra, maksimālā iepriekšējo 3 stundu laikā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4003 : Gaisa temperatūra, minimālā iepriekšējo 3 stundu laikā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4006 : Gaisa temperatūra, stundas maksimālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4004 : Gaisa temperatūra, stundas minimālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4002 : Gaisa temperatūra, stundas vidējā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4321 : Kopējais mākoņu daudzums</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10307 : Laika apstakļi 1. kods pēdējā 1 stundā;A</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10308 : Laika apstakļi 2. kods pēdējā 1 stundā;A</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10306 : Laika apstakļi, faktiskie;A</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4627 : Laika apstākļi novērojumu termiņā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4676 : Meteoroloģiskā redzamība</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">9954 : Meteoroloģiskā redzamība faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4674 : Meteoroloģiskā redzamība, stundas maksimālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4672 : Meteoroloģiskā redzamība, stundas minimālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4494 : Minimālā temperatūra zāles augstumā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4323 : Mākoņu augstums</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10193 : Mākoņu augstums 1</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10194 : Mākoņu augstums 2</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10195 : Mākoņu augstums 3</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10196 : Mākoņu daudzums 1</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10197 : Mākoņu daudzums 2</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10198 : Mākoņu daudzums 3</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">9536 : Nokrišņu daudzums 10 minūšu laika intervālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4568 : Nokrišņu daudzums starp termiņiem</p><p style="box-sizing: border-box; margin: 1em 0px 0px;"><strong style="box-sizing: border-box;">4570 : Nokrišņu daudzums, stundas summa</strong></p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4628 : Pagājušie laika apstākļi 1</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4629 : Pagājušie laika apstākļi 2</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4224 : Piekrastes vēja brāzmas, stundas maksimālās</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4317 : Piekrastes vēja virziens, faktiskais</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4220 : Piekrastes vēja ātrums, faktiskais</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4223 : Piekrastes vēja ātrums, stundas minimālās</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4670 : Redzamība jūras virzienā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4080 : Relatīvais mitrums, faktiskais</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4084 : Relatīvais mitrums, stundas maksimālais</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4082 : Relatīvais mitrums, stundas minimālais</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4606 : Saules spīdēšanas ilgums, stundas summa</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4342 : Sniega segas biezums</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4341 : Sniega segas biezums, stundas vidējais</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4343 : Sniega segas biezums, termiņā 18</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4344 : Sniega segas seguma pakāpe stacijas apkārtnē</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4530 : Summārā radiācija, stundas maksimālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4528 : Summārā radiācija, stundas minimālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4527 : Summārā radiācija, stundas vidējā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10188 : Temperatūra zem dabiskās veģetācijas virsmas 0.1 m dziļumā, faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4495 : Temperatūra zem dabiskās veģetācijas virsmas 0.2 m dziļumā, faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4496 : Temperatūra zem dabiskās veģetācijas virsmas 0.4 m dziļumā, faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4497 : Temperatūra zem dabiskās veģetācijas virsmas 0.8 m dziļumā, faktiskā termiņā 12</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10253 : Temperatūra zem dabiskās veģetācijas virsmas 1.6 m dziļuma, faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4499 : Temperatūra zem dabiskās veģetācijas virsmas 1.6 m dziļumā, faktiskā termiņā 12</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4500 : Temperatūra zem dabiskās veģetācijas virsmas 3.2 m dziļumā, faktiskā termiņā 12</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">9880 : Temperatūra zāles augstumā, faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">9883 : Temperatūra zāles augstumā, stundas maksimālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">9881 : Temperatūra zāles augstumā, stundas minimālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">9884 : Temperatūra zāles augstumā, stundas vidējā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10254 : Temperatūras zem dabiskās veģetācijas virsmas 3.2 m dziļuma, faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10252 : Temperatūta zem dabiskās veģetācijas virsmas 0.8 m dziļuma, faktiskā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4544 : Ultravioletā radiācija, stundas maksimālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4542 : Ultravioletā radiācija, stundas minimālā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4541 : Ultravioletā radiācija, stundas vidējā</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4330 : Vidējo mākoņu forma</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4212 : Vēja brāzmas, maksimālās starp termiņiem</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4218 : Vēja brāzmas, stundas maksimālās</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">10208 : Vēja virziens, faktiskais (10 minūšu vidējais)</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4313 : Vēja virziens, faktiskais (2 minūšu vidējais)</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4211 : Vēja ātrums, faktiskais</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4216 : Vēja ātrums, stundas minimālais</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4322 : Zemo mākoņu daudzums</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">4324 : Zemo mākoņu forma</p></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [1]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="kn" style="box-sizing: border-box; color: green; font-weight: bold;">import</span> <span class="nn" style="box-sizing: border-box; color: blue; font-weight: bold;">requests</span> <span class="k" style="box-sizing: border-box; color: green; font-weight: bold;">as</span> <span class="nn" style="box-sizing: border-box; color: blue; font-weight: bold;">reqs</span>
<span class="kn" style="box-sizing: border-box; color: green; font-weight: bold;">from</span> <span class="nn" style="box-sizing: border-box; color: blue; font-weight: bold;">requests.packages.urllib3.exceptions</span> <span class="kn" style="box-sizing: border-box; color: green; font-weight: bold;">import</span> <span class="n" style="box-sizing: border-box;">InsecureRequestWarning</span>
<span class="n" style="box-sizing: border-box;">reqs</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">packages</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">urllib3</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">disable_warnings</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">InsecureRequestWarning</span><span class="p" style="box-sizing: border-box;">)</span>
</pre></div></div></div></div></div><div class="cell border-box-sizing text_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;"></div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="text_cell_render border-box-sizing rendered_html" style="border-style: none; box-sizing: border-box; outline: none; overflow: auto hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;"><p style="box-sizing: border-box; margin: 0px;">Tā kā meteo.lv ir <code style="background-color: #eff0f1; border-radius: 2px; border: 0px; box-sizing: border-box; padding: 1px 5px; white-space: pre-wrap;">https</code>, tad, veidojot zināmu pieprasījumu, ignorēsim zināmu pieprasījumu.</p></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [2]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="n" style="box-sizing: border-box;">sc</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"https://www.meteo.lv/josso_security_check"</span>
<span class="n" style="box-sizing: border-box;">sec_check</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">reqs</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">post</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">sc</span><span class="p" style="box-sizing: border-box;">)</span>
<span class="n" style="box-sizing: border-box;">cookies</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">sec_check</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">cookies</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">get_dict</span><span class="p" style="box-sizing: border-box;">()</span>
<span class="n" style="box-sizing: border-box;">cookies</span><span class="p" style="box-sizing: border-box;">[</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"JSESSIONID"</span><span class="p" style="box-sizing: border-box;">]</span>
</pre></div></div></div></div><div class="output_wrapper" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;"><div class="output" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;"><div class="output_area" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;"><div class="prompt output_prompt" style="box-sizing: border-box; color: #d84315; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">Out[2]:</div><div class="output_text output_subarea output_execute_result" style="-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;"><pre style="border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 1px 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all;">'DB28619DC4248262E9EEDFFEA023CFAB'</pre></div></div></div></div></div><div class="cell border-box-sizing text_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;"></div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="text_cell_render border-box-sizing rendered_html" style="border-style: none; box-sizing: border-box; outline: none; overflow: auto hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;"><p style="box-sizing: border-box; margin: 0px;">Lai varētu lejuplādēt datus, nepieciešams <code style="background-color: #eff0f1; border-radius: 2px; border: 0px; box-sizing: border-box; padding: 1px 5px; white-space: pre-wrap;">cookie</code> ar nosaukumu <code style="background-color: #eff0f1; border-radius: 2px; border: 0px; box-sizing: border-box; padding: 1px 5px; white-space: pre-wrap;">JSESSIONID</code>. No pārlūka atverot datu meklēšanas lapu, tiek izveidots redirekts uz šo un atpakaļ uz datu meklēšanas lapu.</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">Tālāk jāsagatavo pieprasījums.</p><ol style="box-sizing: border-box; list-style-image: initial; list-style-position: initial; margin-bottom: 9px; margin-top: 1em; padding-left: 2em;"><li style="box-sizing: border-box;">Būs vajadzīga adrese <code style="background-color: #eff0f1; border-radius: 2px; border: 0px; box-sizing: border-box; padding: 2px 4px; white-space: pre-wrap;">url</code></li><li style="box-sizing: border-box;">Būs nepieciešamas vismaz dažas lietas iekš <code style="background-color: #eff0f1; border-radius: 2px; border: 0px; box-sizing: border-box; padding: 2px 4px; white-space: pre-wrap;">header</code></li></ol></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [3]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="n" style="box-sizing: border-box;">url</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"https://www.meteo.lv/meteorologija-datu-meklesana/?"</span>
<span class="n" style="box-sizing: border-box;">headers</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="p" style="box-sizing: border-box;">{</span>
<span class="s2" style="box-sizing: border-box; color: #ba2121;">"Content-Type"</span><span class="p" style="box-sizing: border-box;">:</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"application/x-www-form-urlencoded"</span><span class="p" style="box-sizing: border-box;">,</span>
<span class="s2" style="box-sizing: border-box; color: #ba2121;">"User-Agent"</span><span class="p" style="box-sizing: border-box;">:</span> <span class="s2" style="box-sizing: border-box; color: #ba2121;">"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"</span><span class="p" style="box-sizing: border-box;">,</span>
<span class="s2" style="box-sizing: border-box; color: #ba2121;">"Accept"</span><span class="p" style="box-sizing: border-box;">:</span> <span class="s2" style="box-sizing: border-box; color: #ba2121;">"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"</span><span class="p" style="box-sizing: border-box;">,</span>
<span class="s2" style="box-sizing: border-box; color: #ba2121;">"Referer"</span><span class="p" style="box-sizing: border-box;">:</span> <span class="s2" style="box-sizing: border-box; color: #ba2121;">"https://www.meteo.lv/meteorologija-datu-meklesana/?nid=461"</span><span class="p" style="box-sizing: border-box;">,</span>
<span class="s2" style="box-sizing: border-box; color: #ba2121;">"Cookie"</span><span class="p" style="box-sizing: border-box;">:</span> <span class="s2" style="box-sizing: border-box; color: #ba2121;">"JSESSIONID="</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="n" style="box-sizing: border-box;">cookies</span><span class="p" style="box-sizing: border-box;">[</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"JSESSIONID"</span><span class="p" style="box-sizing: border-box;">]</span>
<span class="p" style="box-sizing: border-box;">}</span>
</pre></div></div></div></div></div><div class="cell border-box-sizing text_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;"></div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="text_cell_render border-box-sizing rendered_html" style="border-style: none; box-sizing: border-box; outline: none; overflow: auto hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;"><p style="box-sizing: border-box; margin: 0px;">Noderīgi būs arī izveidot datu nosaukumu sarakstus. Tie sevī ietver novērojumu staciju nosaukumus un parametru nosaukumus</p></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [4]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="kn" style="box-sizing: border-box; color: green; font-weight: bold;">import</span> <span class="nn" style="box-sizing: border-box; color: blue; font-weight: bold;">json</span>
<span class="n" style="box-sizing: border-box;">saraksts</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">reqs</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">get</span><span class="p" style="box-sizing: border-box;">(</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"https://www.meteo.lv/klasifikatoru-filtrs/?iBy=station&iStation=&iParameter=4001&pMonitoringType=METEOROLOGY"</span><span class="p" style="box-sizing: border-box;">)</span>
<span class="n" style="box-sizing: border-box;">saraksts</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span> <span class="n" style="box-sizing: border-box;">json</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">loads</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">saraksts</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">text</span><span class="p" style="box-sizing: border-box;">)</span>
</pre></div></div></div></div></div><div class="cell border-box-sizing text_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;"></div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="text_cell_render border-box-sizing rendered_html" style="border-style: none; box-sizing: border-box; outline: none; overflow: auto hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;"><p style="box-sizing: border-box; margin: 0px;">Var redzēt, ka klasifikatoru sarakstu var iegūt pēc pieprasījuma, norādot, piemēram, parametra id. Tiks nofiltrētas tās stacijas, kurās tiek veikts šī parametra mērījums.</p></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [5]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="n" style="box-sizing: border-box;">stacijuSaraksts</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="p" style="box-sizing: border-box;">{}</span>
<span class="k" style="box-sizing: border-box; color: green; font-weight: bold;">for</span> <span class="n" style="box-sizing: border-box;">each</span> <span class="ow" style="box-sizing: border-box; color: #aa22ff; font-weight: bold;">in</span> <span class="n" style="box-sizing: border-box;">saraksts</span><span class="p" style="box-sizing: border-box;">[</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"stations"</span><span class="p" style="box-sizing: border-box;">][</span><span class="mi" style="box-sizing: border-box; color: #666666;">1</span><span class="p" style="box-sizing: border-box;">:]:</span>
<span class="n" style="box-sizing: border-box;">stacijuSaraksts</span><span class="p" style="box-sizing: border-box;">[</span><span class="n" style="box-sizing: border-box;">each</span><span class="p" style="box-sizing: border-box;">[</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"id"</span><span class="p" style="box-sizing: border-box;">]]</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">each</span><span class="p" style="box-sizing: border-box;">[</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"name"</span><span class="p" style="box-sizing: border-box;">]</span>
<span class="n" style="box-sizing: border-box;">parametruSaraksts</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="p" style="box-sizing: border-box;">{}</span>
<span class="k" style="box-sizing: border-box; color: green; font-weight: bold;">for</span> <span class="n" style="box-sizing: border-box;">each</span> <span class="ow" style="box-sizing: border-box; color: #aa22ff; font-weight: bold;">in</span> <span class="n" style="box-sizing: border-box;">saraksts</span><span class="p" style="box-sizing: border-box;">[</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"parameters"</span><span class="p" style="box-sizing: border-box;">][</span><span class="mi" style="box-sizing: border-box; color: #666666;">1</span><span class="p" style="box-sizing: border-box;">:]:</span>
<span class="n" style="box-sizing: border-box;">parametruSaraksts</span><span class="p" style="box-sizing: border-box;">[</span><span class="n" style="box-sizing: border-box;">each</span><span class="p" style="box-sizing: border-box;">[</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"id"</span><span class="p" style="box-sizing: border-box;">]]</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">each</span><span class="p" style="box-sizing: border-box;">[</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"name"</span><span class="p" style="box-sizing: border-box;">]</span>
</pre></div></div></div></div></div><div class="cell border-box-sizing text_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;"></div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="text_cell_render border-box-sizing rendered_html" style="border-style: none; box-sizing: border-box; outline: none; overflow: auto hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;"><p style="box-sizing: border-box; margin: 0px;">Tiek izveidotas <em style="box-sizing: border-box;">vārdnīcas</em>, kuras saturēs staciju un parametru nosaukumus - vēlāk būs ērti strādāt ciklā un glabāt failus, to nosaukumos norādot šo info.</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">Šajā brīdī viss ir sagatavots un var palaist galveno ciklu. Jānorāda stacijas ID, parametra ID, kā arī laika periods - sākuma un beigu gads.</p></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [7]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="c1" style="box-sizing: border-box; color: #408080; font-style: italic;">####</span>
<span class="n" style="box-sizing: border-box;">stationID</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="mi" style="box-sizing: border-box; color: #666666;">30022</span>
<span class="n" style="box-sizing: border-box;">paramID</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="mi" style="box-sizing: border-box; color: #666666;">4001</span>
<span class="n" style="box-sizing: border-box;">startYear</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="mi" style="box-sizing: border-box; color: #666666;">2016</span>
<span class="n" style="box-sizing: border-box;">endYear</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="mi" style="box-sizing: border-box; color: #666666;">2020</span>
<span class="c1" style="box-sizing: border-box; color: #408080; font-style: italic;">####</span>
<span class="k" style="box-sizing: border-box; color: green; font-weight: bold;">for</span> <span class="n" style="box-sizing: border-box;">year</span> <span class="ow" style="box-sizing: border-box; color: #aa22ff; font-weight: bold;">in</span> <span class="nb" style="box-sizing: border-box; color: green;">range</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">startYear</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">endYear</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="mi" style="box-sizing: border-box; color: #666666;">1</span><span class="p" style="box-sizing: border-box;">):</span>
<span class="n" style="box-sizing: border-box;">StartDate</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"01.01."</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">year</span><span class="p" style="box-sizing: border-box;">)</span>
<span class="n" style="box-sizing: border-box;">EndDate</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"31.12."</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">year</span><span class="p" style="box-sizing: border-box;">)</span>
<span class="n" style="box-sizing: border-box;">params</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"iBy=station&nid=461&pMonitoringType=METEOROLOGY&iStation="</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">stationID</span><span class="p" style="box-sizing: border-box;">)</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"&iParameter="</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">paramID</span><span class="p" style="box-sizing: border-box;">)</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"&iDateFrom="</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="n" style="box-sizing: border-box;">StartDate</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"&iDateTill="</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="n" style="box-sizing: border-box;">EndDate</span>
<span class="n" style="box-sizing: border-box;">fname</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">stacijuSaraksts</span><span class="p" style="box-sizing: border-box;">[</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">stationID</span><span class="p" style="box-sizing: border-box;">)]</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"_"</span> \
<span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="n" style="box-sizing: border-box;">parametruSaraksts</span><span class="p" style="box-sizing: border-box;">[</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">paramID</span><span class="p" style="box-sizing: border-box;">)]</span> <span class="o" style="box-sizing: border-box; color: #666666;">+</span> <span class="s2" style="box-sizing: border-box; color: #ba2121;">"_"</span> \
<span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="n" style="box-sizing: border-box;">StartDate</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"-"</span> \
<span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="n" style="box-sizing: border-box;">EndDate</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">".xls"</span>
<span class="nb" style="box-sizing: border-box; color: green;">print</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">fname</span><span class="p" style="box-sizing: border-box;">)</span>
<span class="n" style="box-sizing: border-box;">result</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">reqs</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">post</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">url</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">verify</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="kc" style="box-sizing: border-box; color: green; font-weight: bold;">False</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">data</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">params</span><span class="p" style="box-sizing: border-box;">,</span> <span class="n" style="box-sizing: border-box;">headers</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">headers</span><span class="p" style="box-sizing: border-box;">)</span>
<span class="k" style="box-sizing: border-box; color: green; font-weight: bold;">with</span> <span class="nb" style="box-sizing: border-box; color: green;">open</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">fname</span><span class="p" style="box-sizing: border-box;">,</span> <span class="s1" style="box-sizing: border-box; color: #ba2121;">'wb'</span><span class="p" style="box-sizing: border-box;">)</span> <span class="k" style="box-sizing: border-box; color: green; font-weight: bold;">as</span> <span class="n" style="box-sizing: border-box;">f</span><span class="p" style="box-sizing: border-box;">:</span>
<span class="n" style="box-sizing: border-box;">f</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">write</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">result</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">content</span><span class="p" style="box-sizing: border-box;">)</span>
</pre></div></div></div></div><div class="output_wrapper" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;"><div class="output" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;"><div class="output_area" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;"><div class="prompt" style="box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;"></div><div class="output_subarea output_stream output_stdout output_text" style="-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;"><pre style="border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 1px 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all;">Dobele_Gaisa temperatūra, faktiskā_01.01.2016-31.12.2016.xls
Dobele_Gaisa temperatūra, faktiskā_01.01.2017-31.12.2017.xls
Dobele_Gaisa temperatūra, faktiskā_01.01.2018-31.12.2018.xls
Dobele_Gaisa temperatūra, faktiskā_01.01.2019-31.12.2019.xls
Dobele_Gaisa temperatūra, faktiskā_01.01.2020-31.12.2020.xls
</pre></div></div></div></div></div><div class="cell border-box-sizing text_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;"></div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="text_cell_render border-box-sizing rendered_html" style="border-style: none; box-sizing: border-box; outline: none; overflow: auto hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;"><h1 id="Darbs-ar-saglabātajiem-failiem" style="box-sizing: border-box; color: inherit; font-family: inherit; font-size: 25.998px; line-height: 1; margin: 0.538em 0px 0px;">Darbs ar saglabātajiem failiem<a class="anchor-link" href="file:///C:/Users/didzi/git%20projects/meteo.lv/MeteoDatuFetcheris.html#Darbs-ar-saglab%C4%81tajiem-failiem" style="box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;"></a></h1><p style="box-sizing: border-box; margin: 1em 0px 0px;">Saglabātos failus būtu vērts apvienot. Lai to izdara <code style="background-color: #eff0f1; border-radius: 2px; border: 0px; box-sizing: border-box; padding: 1px 5px; white-space: pre-wrap;">pandas</code>.</p></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [8]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="kn" style="box-sizing: border-box; color: green; font-weight: bold;">import</span> <span class="nn" style="box-sizing: border-box; color: blue; font-weight: bold;">pandas</span> <span class="k" style="box-sizing: border-box; color: green; font-weight: bold;">as</span> <span class="nn" style="box-sizing: border-box; color: blue; font-weight: bold;">pd</span>
</pre></div></div></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [12]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="c1" style="box-sizing: border-box; color: #408080; font-style: italic;">####</span>
<span class="n" style="box-sizing: border-box;">stationID</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="mi" style="box-sizing: border-box; color: #666666;">30022</span>
<span class="n" style="box-sizing: border-box;">paramID</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="mi" style="box-sizing: border-box; color: #666666;">4001</span>
<span class="n" style="box-sizing: border-box;">startYear</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="mi" style="box-sizing: border-box; color: #666666;">2016</span>
<span class="n" style="box-sizing: border-box;">endYear</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="mi" style="box-sizing: border-box; color: #666666;">2020</span>
<span class="c1" style="box-sizing: border-box; color: #408080; font-style: italic;">####</span>
<span class="n" style="box-sizing: border-box;">df</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="p" style="box-sizing: border-box;">[]</span>
<span class="k" style="box-sizing: border-box; color: green; font-weight: bold;">for</span> <span class="n" style="box-sizing: border-box;">enum</span><span class="p" style="box-sizing: border-box;">,</span> <span class="n" style="box-sizing: border-box;">year</span> <span class="ow" style="box-sizing: border-box; color: #aa22ff; font-weight: bold;">in</span> <span class="nb" style="box-sizing: border-box; color: green;">enumerate</span><span class="p" style="box-sizing: border-box;">(</span><span class="nb" style="box-sizing: border-box; color: green;">range</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">startYear</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">endYear</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="mi" style="box-sizing: border-box; color: #666666;">1</span><span class="p" style="box-sizing: border-box;">)):</span>
<span class="n" style="box-sizing: border-box;">StartDate</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"01.01."</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">year</span><span class="p" style="box-sizing: border-box;">)</span>
<span class="n" style="box-sizing: border-box;">EndDate</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"31.12."</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">year</span><span class="p" style="box-sizing: border-box;">)</span>
<span class="n" style="box-sizing: border-box;">fname</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">stacijuSaraksts</span><span class="p" style="box-sizing: border-box;">[</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">stationID</span><span class="p" style="box-sizing: border-box;">)]</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"_"</span> \
<span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="n" style="box-sizing: border-box;">parametruSaraksts</span><span class="p" style="box-sizing: border-box;">[</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">paramID</span><span class="p" style="box-sizing: border-box;">)]</span> <span class="o" style="box-sizing: border-box; color: #666666;">+</span> <span class="s2" style="box-sizing: border-box; color: #ba2121;">"_"</span> \
<span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="n" style="box-sizing: border-box;">StartDate</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"-"</span> \
<span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="n" style="box-sizing: border-box;">EndDate</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">".xls"</span>
<span class="c1" style="box-sizing: border-box; color: #408080; font-style: italic;">#df[enum]=pd.read_excel(fname)</span>
<span class="n" style="box-sizing: border-box;">df</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">append</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">pd</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">read_excel</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">fname</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">skiprows</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="mi" style="box-sizing: border-box; color: #666666;">1</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">parse_dates</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="p" style="box-sizing: border-box;">[</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"Datums \ Laiks"</span><span class="p" style="box-sizing: border-box;">],</span><span class="n" style="box-sizing: border-box;">index_col</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="mi" style="box-sizing: border-box; color: #666666;">0</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">dayfirst</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="kc" style="box-sizing: border-box; color: green; font-weight: bold;">True</span><span class="p" style="box-sizing: border-box;">))</span>
<span class="n" style="box-sizing: border-box;">df</span><span class="p" style="box-sizing: border-box;">[</span><span class="n" style="box-sizing: border-box;">enum</span><span class="p" style="box-sizing: border-box;">][</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"vidējā"</span><span class="p" style="box-sizing: border-box;">]</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">df</span><span class="p" style="box-sizing: border-box;">[</span><span class="n" style="box-sizing: border-box;">enum</span><span class="p" style="box-sizing: border-box;">]</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">mean</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">axis</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="mi" style="box-sizing: border-box; color: #666666;">1</span><span class="p" style="box-sizing: border-box;">)</span>
<span class="c1" style="box-sizing: border-box; color: #408080; font-style: italic;">#df[enum]["summa"]=df[enum].sum(axis=1)</span>
</pre></div></div></div></div></div><div class="cell border-box-sizing text_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;"></div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="text_cell_render border-box-sizing rendered_html" style="border-style: none; box-sizing: border-box; outline: none; overflow: auto hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;"><p style="box-sizing: border-box; margin: 0px;">Ciklā tiek norādīti tie faili, no kuriem vajag apvienot datus, balstoties uz to nosaukumu, kas sastāv no stacijas, parametra un gadiem. Ir izveidots mainīgais <code style="background-color: #eff0f1; border-radius: 2px; border: 0px; box-sizing: border-box; padding: 1px 5px; white-space: pre-wrap;">df</code>, kas ir masīvs un satur visas <code style="background-color: #eff0f1; border-radius: 2px; border: 0px; box-sizing: border-box; padding: 1px 5px; white-space: pre-wrap;">pandas</code> tabulas. Pie reizes arī aprēķināta visu rindu vidējā vērtība (šajā piemērā - dienas vidējā temperatūra)</p><p style="box-sizing: border-box; margin: 1em 0px 0px;">ar <code style="background-color: #eff0f1; border-radius: 2px; border: 0px; box-sizing: border-box; padding: 1px 5px; white-space: pre-wrap;">pandas.concat()</code> palīdzību šis masīvs tiek apvienots vienā kopējā datu tabulā <code style="background-color: #eff0f1; border-radius: 2px; border: 0px; box-sizing: border-box; padding: 1px 5px; white-space: pre-wrap;">dataf</code></p></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [13]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="n" style="box-sizing: border-box;">dataf</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">pd</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">concat</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">df</span><span class="p" style="box-sizing: border-box;">)</span>
</pre></div></div></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [14]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="n" style="box-sizing: border-box;">dataf</span>
</pre></div></div></div></div><div class="output_wrapper" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;"><div class="output" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;"><div class="output_area" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;"><div class="prompt output_prompt" style="box-sizing: border-box; color: #d84315; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">Out[14]:</div><div class="output_html rendered_html output_subarea output_execute_result" style="-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;"><div style="box-sizing: border-box;"><table border="1" class="dataframe" style="border-collapse: collapse; border-spacing: 0px; border: none; color: black; font-size: 12px; margin-left: 0px; margin-right: 0px; margin-top: 1em; table-layout: fixed;"><thead style="border-bottom: 1px solid black; box-sizing: border-box; vertical-align: bottom;"><tr style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">00:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">01:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">02:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">03:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">04:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">05:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">06:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">07:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">08:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">09:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">...</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">15:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">16:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">17:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">18:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">19:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">20:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">21:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">22:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">23:00</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">vidējā</th></tr><tr style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">Datums \ Laiks</th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"></th></tr></thead><tbody style="box-sizing: border-box;"><tr style="background: rgb(245, 245, 245); border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">2016-01-01</th><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-14.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-12.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-12.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-11.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-11.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-10.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-11.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-11.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-10.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-10.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-8.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-9.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-9.3</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-9.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-9.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-9.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-9.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-9.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-11.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-10.183333</td></tr><tr style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">2016-01-02</th><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-13.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-14.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-15.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-15.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-16.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-16.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-16.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-16.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-17.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-16.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-14.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-15.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-16.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-16.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-16.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-17.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-17.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-17.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-18.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-16.208333</td></tr><tr style="background: rgb(245, 245, 245); border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">2016-01-03</th><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-19.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-19.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-20.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-20.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-20.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-18.3</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-16.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-14.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-13.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-11.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-8.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-8.3</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-8.3</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-8.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-8.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-8.3</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-8.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-7.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-7.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-12.404167</td></tr><tr style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">2016-01-04</th><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-6.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-6.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-7.3</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-7.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-7.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-6.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-6.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-7.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-9.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-10.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-9.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-9.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-10.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-10.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-10.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-10.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-10.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-11.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-11.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-8.983333</td></tr><tr style="background: rgb(245, 245, 245); border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">2016-01-05</th><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-11.3</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-11.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-11.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-12.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-14.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-14.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-15.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-14.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-13.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-14.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-13.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-14.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-13.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-13.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-15.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-16.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-17.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-18.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-18.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-14.187500</td></tr><tr style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">...</th><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td></tr><tr style="background: rgb(245, 245, 245); border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">2020-12-27</th><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-0.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-0.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-0.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-0.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-0.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-0.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-0.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-0.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-0.891667</td></tr><tr style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">2020-12-28</th><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-2.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-2.3</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-2.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-2.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-2.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-2.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-2.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-0.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">0.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">0.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-0.250000</td></tr><tr style="background: rgb(245, 245, 245); border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">2020-12-29</th><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">2.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">2.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">0.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">2.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">3.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.775000</td></tr><tr style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">2020-12-30</th><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">0.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">2.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">3.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">3.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">3.3</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">3.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">3.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">3.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">3.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">2.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">2.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">0.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">0.3</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">0.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">0.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">0.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.9</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">2.250000</td></tr><tr style="background: rgb(245, 245, 245); border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;"><th style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; text-align: right; vertical-align: middle;">2020-12-31</th><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.3</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.1</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.3</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">...</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.6</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">1.5</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">0.7</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">0.4</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-0.8</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.0</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">-1.2</td><td style="border: none; box-sizing: border-box; line-height: normal; max-width: none; padding: 0.5em; vertical-align: middle;">0.941667</td></tr></tbody></table><p style="box-sizing: border-box; margin: 1em 0px 0px;">1793 rows × 25 columns</p></div></div></div></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [16]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="n" style="box-sizing: border-box;">dataf</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">dataf</span><span class="p" style="box-sizing: border-box;">[[</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"vidējā"</span><span class="p" style="box-sizing: border-box;">]]</span>
</pre></div></div></div></div></div><div class="cell border-box-sizing text_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;"></div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="text_cell_render border-box-sizing rendered_html" style="border-style: none; box-sizing: border-box; outline: none; overflow: auto hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;"><p style="box-sizing: border-box; margin: 0px;">Saglabāsim tikai visu rindu vidējo vērtību un saglabāsim to <code style="background-color: #eff0f1; border-radius: 2px; border: 0px; box-sizing: border-box; padding: 1px 5px; white-space: pre-wrap;">excel</code> failā.</p></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [17]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="n" style="box-sizing: border-box;">fname2</span><span class="o" style="box-sizing: border-box; color: #666666;">=</span><span class="n" style="box-sizing: border-box;">stacijuSaraksts</span><span class="p" style="box-sizing: border-box;">[</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">stationID</span><span class="p" style="box-sizing: border-box;">)]</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"_"</span> \
<span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="n" style="box-sizing: border-box;">parametruSaraksts</span><span class="p" style="box-sizing: border-box;">[</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">paramID</span><span class="p" style="box-sizing: border-box;">)]</span> <span class="o" style="box-sizing: border-box; color: #666666;">+</span> <span class="s2" style="box-sizing: border-box; color: #ba2121;">"_"</span> \
<span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">startYear</span><span class="p" style="box-sizing: border-box;">)</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">"-"</span> \
<span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="nb" style="box-sizing: border-box; color: green;">str</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">endYear</span><span class="p" style="box-sizing: border-box;">)</span><span class="o" style="box-sizing: border-box; color: #666666;">+</span><span class="s2" style="box-sizing: border-box; color: #ba2121;">".xls"</span>
<span class="n" style="box-sizing: border-box;">dataf</span><span class="o" style="box-sizing: border-box; color: #666666;">.</span><span class="n" style="box-sizing: border-box;">to_excel</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">fname2</span><span class="p" style="box-sizing: border-box;">)</span>
</pre></div></div></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [18]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span><span class="n" style="box-sizing: border-box;">fname2</span>
</pre></div></div></div></div><div class="output_wrapper" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;"><div class="output" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;"><div class="output_area" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;"><div class="prompt output_prompt" style="box-sizing: border-box; color: #d84315; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">Out[18]:</div><div class="output_text output_subarea output_execute_result" style="-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;"><pre style="border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 1px 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all;">'Dobele_Gaisa temperatūra, faktiskā_2016-2020.xls'</pre></div></div></div></div></div><div class="cell border-box-sizing code_cell rendered" style="-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; outline: none; overflow: visible; padding: 5px; position: relative; width: 1110px;"><div class="input" style="-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;"><div class="prompt input_prompt" style="border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;">In [ ]:</div><div class="inner_cell" style="-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;"><div class="input_area" style="background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;"><div class=" highlight hl-ipython3" style="background: transparent; border: none; box-sizing: border-box; margin: 0.4em; padding: 0px;"><pre style="background-color: transparent; border-radius: 2px; border: none; box-sizing: border-box; color: #333333; font-size: inherit; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;"><span style="box-sizing: border-box;"></span> </pre></div></div></div></div></div>Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-72312546636293802552020-07-05T05:41:00.001-07:002020-08-12T01:31:28.000-07:00Gramblr - how I "hacked an Instagram" once<div dir="ltr" style="text-align: left;" trbidi="on">
<h4 style="text-align: left;">
Intro.</h4>
Back in the beginning of 2016 when I got my first smartphone and was introduced with smart-world I was looking for an options to upload the image in Instagram (IG) from the PC directly. And I found this partially crippled but so widely used system - Gramblr. It was built online but it has its own downloadable web client. It was more than just an image uploader for Instagram. It has its own lets-make-profit system with users earning credits by giving likes to other user IG images. It had this 2:1 system - you have to like two other images and then you got one credit. And you can spend this Gramblr credit exchanging it to a one "like". There was a list of 100 images loaded for you as an user to check whether you like an image or not. Of course, simple users were earning these credits by clicking on all images posted to maximize their credit profit. The whole system was flawed by this "earning credits" system but somebody got profit. If you want you could buy credits. If I`m not mistaken, 100 guaranteed likes (credits) costed 5 bucks.<br />
<img alt="Earn Coints to Get More Likes via Gramblr - Techtippr" height="449" src="https://techtippr.com/wp-content/uploads/2018/03/Earn-Coints-to-Get-More-Likes-via-Gramblr.jpg" width="640" /><br />
This is the moment where things got interesting for me. It should be possible to automatize this gaining credits algorithm. And how does the credit system work? And I started to explore.<br />
<h4 style="text-align: left;">
Tech</h4>
I was wondering how does this web client Gramblr.exe works. My antivirus and google chrome shows it as a dangerous malware software. I`m not a security expert at all, I just wanted to see, what the hell it is doing and how does it work and processes and etc. It was blended rather deep in the windows (Yea, I`m sitting on Win 7) automatic startup - it had its service, it had registry entries.<br />
And how does it communicate? How does the data is sent, encoded?<br />
<br />
Next finding was that my client is actually a simple web-server passing and receiving web requests to the Gramblr online webserver. Well, this gives a relatively simple approach to automatize requests. Of course, requests need analysis, whats in them, how do they work. And I started to play with Python 2.7. The required libraries were:<br />
<br />
<ol class="python" style="background: rgb(247, 247, 247); color: #acacac; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", monospace, serif; font-size: 12px; margin: 0px; padding: 0px 0px 0px 55px;">
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">import</span> requests</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">import</span> json</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">import</span> <span class="kw3" style="color: crimson;">random</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">import</span> <span class="kw3" style="color: crimson;">re</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">import</span> <span class="kw3" style="color: crimson;">time</span></div>
</li>
</ol>
<br />
so - how to connect? There is a login screen, so I have to be logged in. I was lazy and didnt make any login requests, I noticed that there is a cookie which changes every time I log in and log out and as I mostly stayed logged in, I cheated and logged in in the web client and copied cookie`s id from there for my script.<br />
This was all I need to do a handshake with a server.<br />
<br />
<ol class="python" style="background: rgb(247, 247, 247); color: #acacac; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", monospace, serif; font-size: 12px; margin: 0px; padding: 0px 0px 0px 55px;">
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">def</span> gramblr_req<span class="br0" style="color: black;">(</span><span class="kw2" style="color: green;">self</span><span class="br0" style="color: black;">)</span>:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;">"""</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;"> Does GET request to get basic info of user</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;"> """</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
headers <span class="sy0" style="color: #66cc66;">=</span> <span class="br0" style="color: black;">{</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;">"Accept-Encoding"</span>:<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">h_encoding</span><span class="sy0" style="color: #66cc66;">,</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;">"Accept-Language"</span>:<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">h_language</span><span class="sy0" style="color: #66cc66;">,</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;">"User-Agent"</span>:<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">h_useragent</span><span class="sy0" style="color: #66cc66;">,</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;">"Accept"</span>:<span class="st0" style="color: darkslateblue;">"application/json, text/plain, */*"</span><span class="sy0" style="color: #66cc66;">,</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;">"Referer"</span>:<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">localhost_url</span><span class="sy0" style="color: #66cc66;">,</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;">"Cookie"</span>:<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">h_cookie</span><span class="sy0" style="color: #66cc66;">,</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;">"Connection"</span>:<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">h_connection</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="br0" style="color: black;">}</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">try</span>:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
results <span class="sy0" style="color: #66cc66;">=</span> requests.<span class="me1" style="color: black;">get</span><span class="br0" style="color: black;">(</span><span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">gramblr_url</span><span class="sy0" style="color: #66cc66;">,</span> headers<span class="sy0" style="color: #66cc66;">=</span>headers<span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">coins</span><span class="sy0" style="color: #66cc66;">=</span>json.<span class="me1" style="color: black;">loads</span><span class="br0" style="color: black;">(</span>results._content<span class="br0" style="color: black;">)</span><span class="br0" style="color: black;">[</span><span class="st0" style="color: darkslateblue;">"coins"</span><span class="br0" style="color: black;">]</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">except</span>:</div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">gramblr_req</span><span class="br0" style="color: black;">(</span><span class="br0" style="color: black;">)</span></div>
</li>
</ol>
<br />
as I was lazy I didnt check was all header info actually needed.<br />
After successful handshake the result was a JSON file with all info about my profile. What I was after was credits in the system, called coins. 1 credit = 5 coins. From the script one can recognize a Python class.<br />
<br />
When I am authenticated in the system now, next thing was to get a list with an images and all necessary info which were posted by other users to gain likes. In the web client these images were loaded in the "Earn Coins" section. User could click on the images he/she likes and gain those coins. So, I had to emulate this request.<br />
<br />
<ol class="python" style="background: rgb(247, 247, 247); color: #acacac; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", monospace, serif; font-size: 12px; margin: 0px; padding: 0px 0px 0px 55px;">
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">def</span> GET_list<span class="br0" style="color: black;">(</span><span class="kw2" style="color: green;">self</span><span class="br0" style="color: black;">)</span>:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<br /></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<br /></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
results<span class="sy0" style="color: #66cc66;">=</span><span class="br0" style="color: black;">{</span><span class="br0" style="color: black;">}</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
results<span class="br0" style="color: black;">[</span><span class="st0" style="color: darkslateblue;">"list"</span><span class="br0" style="color: black;">]</span><span class="sy0" style="color: #66cc66;">=</span><span class="kw2" style="color: green;">False</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">try</span>:</div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
counter<span class="sy0" style="color: #66cc66;">=</span><span class="nu0" style="color: orangered;">0</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">while</span> <span class="kw1" style="color: #ff7700; font-weight: bold;">not</span> results<span class="br0" style="color: black;">[</span><span class="st0" style="color: darkslateblue;">"list"</span><span class="br0" style="color: black;">]</span>:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
results <span class="sy0" style="color: #66cc66;">=</span> requests.<span class="me1" style="color: black;">get</span><span class="br0" style="color: black;">(</span><span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">earn_coins_url</span><span class="sy0" style="color: #66cc66;">,</span> self.headers<span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">results</span><span class="sy0" style="color: #66cc66;">=</span>results</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
localtime <span class="sy0" style="color: #66cc66;">=</span> <span class="kw3" style="color: crimson;">time</span>.<span class="me1" style="color: black;">asctime</span><span class="br0" style="color: black;">(</span> <span class="kw3" style="color: crimson;">time</span>.<span class="me1" style="color: black;">localtime</span><span class="br0" style="color: black;">(</span><span class="kw3" style="color: crimson;">time</span>.<span class="kw3" style="color: crimson;">time</span><span class="br0" style="color: black;">(</span><span class="br0" style="color: black;">)</span><span class="br0" style="color: black;">)</span> <span class="br0" style="color: black;">)</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
counter<span class="sy0" style="color: #66cc66;">=</span>counter+<span class="nu0" style="color: orangered;">1</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
results<span class="sy0" style="color: #66cc66;">=</span>json.<span class="me1" style="color: black;">loads</span><span class="br0" style="color: black;">(</span>results._content<span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw3" style="color: crimson;">time</span>.<span class="me1" style="color: black;">sleep</span><span class="br0" style="color: black;">(</span><span class="nu0" style="color: orangered;">1</span><span class="br0" style="color: black;">)</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
fullstrings<span class="sy0" style="color: #66cc66;">=</span><span class="st0" style="color: darkslateblue;">""</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
iterstrings<span class="sy0" style="color: #66cc66;">=</span><span class="kw2" style="color: green;">iter</span><span class="br0" style="color: black;">(</span>results<span class="br0" style="color: black;">[</span><span class="st0" style="color: darkslateblue;">"list"</span><span class="br0" style="color: black;">]</span><span class="br0" style="color: black;">)</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<br /></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">for</span> each <span class="kw1" style="color: #ff7700; font-weight: bold;">in</span> iterstrings:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
fullstrings<span class="sy0" style="color: #66cc66;">=</span>fullstrings+<span class="st0" style="color: darkslateblue;">'{"id":'</span>+<span class="kw2" style="color: green;">str</span><span class="br0" style="color: black;">(</span>each<span class="br0" style="color: black;">[</span><span class="st0" style="color: darkslateblue;">"id"</span><span class="br0" style="color: black;">]</span><span class="br0" style="color: black;">)</span>+<span class="st0" style="color: darkslateblue;">'},'</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">liste</span><span class="sy0" style="color: #66cc66;">=</span><span class="st0" style="color: darkslateblue;">'{"liked":[],"skipped":[],"ignored":['</span>+fullstrings<span class="br0" style="color: black;">[</span>:-<span class="nu0" style="color: orangered;">1</span><span class="br0" style="color: black;">]</span>+<span class="st0" style="color: darkslateblue;">'],"ig_user":"myinstagramusername"}'</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<br /></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">results</span><span class="sy0" style="color: #66cc66;">=</span> <span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">results</span>._content</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">except</span>:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">GET_list</span><span class="br0" style="color: black;">(</span><span class="br0" style="color: black;">)</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">try</span>:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
outF<span class="sy0" style="color: #66cc66;">=</span><span class="kw2" style="color: green;">open</span><span class="br0" style="color: black;">(</span><span class="st0" style="color: darkslateblue;">"myOutFile.txt"</span><span class="sy0" style="color: #66cc66;">,</span><span class="st0" style="color: darkslateblue;">"r+"</span><span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
userlist<span class="sy0" style="color: #66cc66;">=</span><span class="kw2" style="color: green;">set</span><span class="br0" style="color: black;">(</span><span class="kw2" style="color: green;">str</span><span class="br0" style="color: black;">(</span>line.<span class="me1" style="color: black;">strip</span><span class="br0" style="color: black;">(</span><span class="br0" style="color: black;">)</span><span class="br0" style="color: black;">)</span> <span class="kw1" style="color: #ff7700; font-weight: bold;">for</span> line <span class="kw1" style="color: #ff7700; font-weight: bold;">in</span> outF<span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
outF.<span class="me1" style="color: black;">close</span><span class="br0" style="color: black;">(</span><span class="br0" style="color: black;">)</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">for</span> counter<span class="sy0" style="color: #66cc66;">,</span> each <span class="kw1" style="color: #ff7700; font-weight: bold;">in</span> <span class="kw2" style="color: green;">enumerate</span><span class="br0" style="color: black;">(</span>results<span class="br0" style="color: black;">[</span><span class="st0" style="color: darkslateblue;">"list"</span><span class="br0" style="color: black;">]</span><span class="br0" style="color: black;">)</span>:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
userlist.<span class="me1" style="color: black;">add</span><span class="br0" style="color: black;">(</span><span class="kw2" style="color: green;">str</span><span class="br0" style="color: black;">(</span>each<span class="br0" style="color: black;">[</span><span class="st0" style="color: darkslateblue;">"details"</span><span class="br0" style="color: black;">]</span><span class="br0" style="color: black;">[</span><span class="st0" style="color: darkslateblue;">"username"</span><span class="br0" style="color: black;">]</span><span class="br0" style="color: black;">)</span><span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
userlist<span class="sy0" style="color: #66cc66;">=</span><span class="kw2" style="color: green;">sorted</span><span class="br0" style="color: black;">(</span>userlist<span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
outF<span class="sy0" style="color: #66cc66;">=</span><span class="kw2" style="color: green;">open</span><span class="br0" style="color: black;">(</span><span class="st0" style="color: darkslateblue;">"myOutFile.txt"</span><span class="sy0" style="color: #66cc66;">,</span><span class="st0" style="color: darkslateblue;">"r+"</span><span class="br0" style="color: black;">)</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<br /></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">for</span> each <span class="kw1" style="color: #ff7700; font-weight: bold;">in</span> userlist:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
outF.<span class="me1" style="color: black;">write</span><span class="br0" style="color: black;">(</span>each<span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
outF.<span class="me1" style="color: black;">write</span><span class="br0" style="color: black;">(</span><span class="st0" style="color: darkslateblue;">"<span class="es0" style="color: #000099; font-weight: bold;">\n</span>"</span><span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
outF.<span class="me1" style="color: black;">close</span><span class="br0" style="color: black;">(</span><span class="br0" style="color: black;">)</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">except</span>:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">pass</span></div>
</li>
</ol>
<br />
This was kinda tricky. I noticed that when I was jumping between multiple web clients the list of images sometimes loaded incompletely, sometimes disappeared. From the code snipped one can see the recursion in case of failed requests. Yea, as I was interested in making an automation, its good as long as it works. And it worked.<br />
The other thing I was interested was unique users using Gramblr. That is why the last part of the script is doing - scraping the usernames and accumulating in the list. I managed to find 98`976 unique users which means max likes one could get is this number which is unrealistic.<br />
When I know which pictures are in list, I can move to "giving likes" request for each picture. But before there, notice the line 40 in previous snippet. A class variable "liste" in JSON format was prepared and this was crucial for the "giving likes" request:<br />
<br />
<ol class="python" style="background: rgb(247, 247, 247); color: #acacac; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", monospace, serif; font-size: 12px; margin: 0px; padding: 0px 0px 0px 55px;">
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">def</span> POST_list<span class="br0" style="color: black;">(</span><span class="kw2" style="color: green;">self</span><span class="br0" style="color: black;">)</span>:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
values<span class="sy0" style="color: #66cc66;">=</span><span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">liste</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
results <span class="sy0" style="color: #66cc66;">=</span> requests.<span class="me1" style="color: black;">post</span><span class="br0" style="color: black;">(</span><span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">give_like_url</span><span class="sy0" style="color: #66cc66;">,</span>values<span class="sy0" style="color: #66cc66;">,self.</span>headers<span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<br /></div>
</li>
</ol>
<br />
Just that simple. Previously prepared JSON data was sent to the server containing which images got likes, which did not. The whole list was passed to the server and it had a weird behavior and also consequences. Through experiments I found a flaw here. The order of requests was the key to successfully gain credits more than I expected with just a simple bot-like automation. It could be done manually with two web-clients open simultaneously too and by clicking on images with a mouse just in a right order.<br />
<br />
And this is the last request important for the whole "gaining free more than expected credits" story - request to give a like to some IG image. In reality it meant that this image showed up in the Gramblr image list for credits and everybody who wanted to gain some credits had to give a like to it to earn one credit.<br />
<br />
<ol class="python" style="background: rgb(247, 247, 247); color: #acacac; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", monospace, serif; font-size: 12px; margin: 0px; padding: 0px 0px 0px 55px;">
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">def</span> POST_like<span class="br0" style="color: black;">(</span><span class="kw2" style="color: green;">self</span><span class="sy0" style="color: #66cc66;">,</span>fname<span class="br0" style="color: black;">)</span>:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">pickIGfromFile</span><span class="br0" style="color: black;">(</span>fname<span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">try</span>:</div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
values<span class="sy0" style="color: #66cc66;">=</span><span class="st0" style="color: darkslateblue;">'{"ig_user":"myinstagramusername",'</span> \</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;">'"likes_qty":1,'</span> \</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;">'"local_likes":false,'</span> \</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;">'"media_pk":"'</span>+<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">igUser</span><span class="br0" style="color: black;">[</span><span class="st0" style="color: darkslateblue;">"media_pk"</span><span class="br0" style="color: black;">]</span>+<span class="st0" style="color: darkslateblue;">'",'</span> \</div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="st0" style="color: darkslateblue;">'"user_pk":'</span>+<span class="kw2" style="color: green;">str</span><span class="br0" style="color: black;">(</span><span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">igUser</span><span class="br0" style="color: black;">[</span><span class="st0" style="color: darkslateblue;">"user_pk"</span><span class="br0" style="color: black;">]</span><span class="br0" style="color: black;">)</span>+<span class="st0" style="color: darkslateblue;">'}'</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<br /></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
results <span class="sy0" style="color: #66cc66;">=</span> requests.<span class="me1" style="color: black;">post</span><span class="br0" style="color: black;">(</span><span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">add_likes_url</span><span class="sy0" style="color: #66cc66;">,</span>values<span class="sy0" style="color: #66cc66;">,self.</span>headers<span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">except</span>:</div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw2" style="color: green;">self</span>.<span class="me1" style="color: black;">POST_like</span><span class="br0" style="color: black;">(</span>fname<span class="br0" style="color: black;">)</span> <span class="co1" style="color: grey; font-style: italic;">#recursion</span></div>
</li>
</ol>
<br />
What one can see in this snippet is that I had IG links already prepared in a file and there is another helper function which just picks random link in that file and passes it to the Gramblr request.<br />
<br />
<br />
I already mentioned "The right order of requests" which was the successful key of gaining more than I expected of this automation. By sending requests in particular order they somewhat reset the credit counting and accumulation in the Gramblr online webserver.<br />
<br />
<ol class="python" style="background: rgb(247, 247, 247); color: #acacac; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", monospace, serif; font-size: 12px; margin: 0px; padding: 0px 0px 0px 55px;">
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">if</span> __name__<span class="sy0" style="color: #66cc66;">==</span><span class="st0" style="color: darkslateblue;">"__main__"</span>:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
G <span class="sy0" style="color: #66cc66;">=</span> Gramblrscripter<span class="br0" style="color: black;">(</span><span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
G.<span class="me1" style="color: black;">gramblr_req</span><span class="br0" style="color: black;">(</span><span class="br0" style="color: black;">)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
coins_b<span class="sy0" style="color: #66cc66;">=</span>G.<span class="me1" style="color: black;">coins</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
ii<span class="sy0" style="color: #66cc66;">=</span><span class="nu0" style="color: orangered;">1000</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="nu0" style="color: orangered;"><br /></span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">for</span> i <span class="kw1" style="color: #ff7700; font-weight: bold;">in</span> <span class="kw2" style="color: green;">range</span><span class="br0" style="color: black;">(</span>ii<span class="br0" style="color: black;">)</span>:</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<br /></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
G.<span class="me1" style="color: black;">GET_list</span><span class="br0" style="color: black;">(</span><span class="br0" style="color: black;">)</span> <span class="co1" style="color: grey; font-style: italic;">#loads image list </span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
G.<span class="me1" style="color: black;">POST_like</span><span class="br0" style="color: black;">(</span><span class="st0" style="color: darkslateblue;">'iglinks.txt'</span><span class="br0" style="color: black;">)</span> <span class="co1" style="color: grey; font-style: italic;">#gives one like to an IG image (link needed)</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
G.<span class="me1" style="color: black;">POST_list</span><span class="br0" style="color: black;">(</span><span class="br0" style="color: black;">)</span> <span class="co1" style="color: grey; font-style: italic;">#noposto listi #posts image list which got likes and which didnt</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<br /></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
G.<span class="me1" style="color: black;">gramblr_req</span><span class="br0" style="color: black;">(</span><span class="br0" style="color: black;">)</span></div>
</li>
<li class="li2" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de2" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
coins_e<span class="sy0" style="color: #66cc66;">=</span>G.<span class="me1" style="color: black;">coins</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
<span class="kw1" style="color: #ff7700; font-weight: bold;">print</span> <span class="st0" style="color: darkslateblue;">"gained likes: <span class="es0" style="color: #000099; font-weight: bold;">\t</span><span class="es0" style="color: #000099; font-weight: bold;">\t</span><span class="es0" style="color: #000099; font-weight: bold;">\t</span><span class="es0" style="color: #000099; font-weight: bold;">\t</span><span class="es0" style="color: #000099; font-weight: bold;">\t</span>|<span class="es0" style="color: #000099; font-weight: bold;">\t</span>"</span><span class="sy0" style="color: #66cc66;">,</span> <span class="br0" style="color: black;">(</span>coins_e-coins_b<span class="br0" style="color: black;">)</span>/<span class="nu0" style="color: orangered;">10</span></div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
</div>
</li>
<li class="li1" style="background: rgb(255, 255, 255); margin: 0px 0px 0px -6px; user-select: none;"><div class="de1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-left: 1px solid rgb(221, 221, 221); color: #333333; margin: 0px 0px 0px -7px; padding: 0px 8px; position: relative; user-select: text; vertical-align: top;">
coins_b<span class="sy0" style="color: #66cc66;">=</span>coins_e</div>
</li>
</ol>
<br />
Most likely this "giving like" request in between both image list requests made Gramblr system to reset credit counting/waiting/managing flag in their database.<br />
<br />
The final math and maximized credit gaining data flow would look like this:<br />
<br />
0) Lets say, I have 2 credits in the beginning<br />
<br />
1) Image List loaded with 100 images - max 100 credits waiting for me to get<br />
2) IG image liked -online system, db reset, 2 credits spent. Now I have 0 credits.<br />
3) modified Image List posted with first image getting only one like from me - I spend 2 credits, I gain 100 credits instead of 1.<br />
<br />
///cycle continues///Now I have 100 credits<br />
<br />
4) Image List loaded with 99 images (the one I previously gave like in the step 3 is already out of the list) - max 99 credits waiting for me to get<br />
5) IG image liked - online system, db reset. 2 credits spent. Now I have 98 credits.<br />
6) modified Image List posted with "next first" image getting only like from me - I spend 2 credits, I gain 99 credits instead of 1.<br />
Altogether I have 98+99 = 197 credits.<br />
<br />
// cycle continues until there is no image left in the loaded image list.<br />
<br />
<br />
Full python code can be found and analysed here - <a href="https://pastebin.com/vV9j1nSD">https://pastebin.com/vV9j1nSD</a><br />
<br />
<h4 style="text-align: left;">
Conclusions and final thoughts</h4>
<div>
I highly doubt that this is what killed Gramblr. The system by concept was having flaws, I did not manage to explore and analyse "gaining followers" part, but I had a suspicion that somewhat users were automatically added as followers. My IG account suddenly was following more than 3k users without my knowledge. That means the system is malware in my opinion. </div>
<div>
The amount of unique users (98`976) where most of them most likely were bots and commercial users. In the beginning I was choosing one of my own IG images to find how many likes that IG picture could get. It gained close to 9k likes which is 10% of users. At that time I noticed the system was used by ~30k users, which would say ~30% of the system users could be the actual amount of likes possible to get.</div>
<div>
The IG itself is also worth to mention. It has its artificial intelligence for sure. IG top picks and exploration I suspect originally was built on hashtags. But because of the bots and the systems which artificially increase the number of likes, some intellectual measures IG had to implement. Time as a crucial parameter can be measured. If the image in the IG got close to 500 likes within 5 seconds it has to be suspicious, spiking. Rate of change is a perfect indicator to flag unusual and suspicious activities. That was another flaw what Gramblr had. If I had 500 credits and I use them at once to boost my IG image, it may be flagged. Back in 2016 when I was experimenting, I noticed that my images with hashtag showed up in the search but over time they disappeared, suggesting me to think the IG had their preventive measures improved and giving no benefit of low IG users floating on the IG surface among most popular IG influencers. Thus by using Grambrl this did more harm than good to IG users. This is also a reason why I implement helper function <span class="kw2" face="" style="background-color: white; color: green; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", monospace, serif; font-size: 12px;">self</span><span face="" style="background-color: white; color: #333333; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", monospace, serif; font-size: 12px;">.</span><span class="me1" face="" style="background-color: white; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", monospace, serif; font-size: 12px;">pickIGfromFile</span><span class="br0" face="" style="background-color: white; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", monospace, serif; font-size: 12px;">(</span><span face="" style="background-color: white; color: #333333; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", monospace, serif; font-size: 12px;">fname</span><span class="br0" face="" style="background-color: white; font-family: consolas, menlo, monaco, "lucida console", "liberation mono", "dejavu sans mono", "bitstream vera sans mono", monospace, serif; font-size: 12px;">) </span>- to have a lot of random IG images and giving those likes with a random time interval thus reducing the rate of change of getting likes. Less suspicious for IG.</div>
<br /></div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-84076840690106614402019-09-19T14:54:00.000-07:002019-09-19T14:54:26.642-07:00Ignition coil circuit<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
Here`s an <a href="http://tinyurl.com/y4u4p6fh">ignition coil circuit </a>in falstad circuits.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-aqvrD3uwYs8/XYP5Bym_3cI/AAAAAAACNvo/qnaL3e0fkX8vIG2Iab7JbyohhnUurB2IwCLcBGAsYHQ/s1600/Capture.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="491" data-original-width="740" height="420" src="https://1.bp.blogspot.com/-aqvrD3uwYs8/XYP5Bym_3cI/AAAAAAACNvo/qnaL3e0fkX8vIG2Iab7JbyohhnUurB2IwCLcBGAsYHQ/s640/Capture.JPG" width="640" /></a></div>
<br /></div>
</div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-33550816215428378382019-02-18T10:42:00.000-08:002019-02-19T04:39:27.193-08:00555 timer examples in falstad circuits<div dir="ltr" style="text-align: left;" trbidi="on">
Few 555 timer chip examples built digitally in falstad circuit builder.<br />
<br />
This one is Schmitt trigger with 2/3 and 1/3 Vcc hysteresis.<br />
Check out extra sliders and see how current through led changes.<br />
<img height="291" src="https://i.imgur.com/Gmtn3mK.png" width="640" /><br />
Simulation is here - <a href="http://tinyurl.com/y4rnjs4o">http://tinyurl.com/y4rnjs4o</a><br />
<br />
<br />
Another one - LDR logic board. Similar, but without hysteresis as threshold pin is connected to stationary 10k resistor, so the output is passed on at strict threshold level chosen by adjusting the variable resistor.<br />
<img height="292" src="https://i.imgur.com/9MtNJoc.png" width="640" /><br />
And the simulation - <a href="http://tinyurl.com/y6l7blt2">http://tinyurl.com/y6l7blt2</a><br />
<br />
<br />
Here is a monostable circuit. Use switch as a push button and the LED will stay turned on for a certain time.<br />
<img height="351" src="https://i.imgur.com/2NzWeNe.png" width="640" /><br />
<a href="http://tinyurl.com/y6o47oxw">http://tinyurl.com/y6o47oxw</a></div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-34950866407461015712017-12-29T07:19:00.005-08:002017-12-29T14:13:23.028-08:00Telnet and ssh from cygwin on windows xp in virtualbox<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
Another way how to play with shell commands.<br />
By default new cygwin is not possible to install on Windows XP.<br />
<br />
1. Get a cygwin installation which suppors windows xp<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><a href="https://cygwin.com/ml/cygwin/2016-11/msg00071.html">https://cygwin.com/ml/cygwin/2016-11/msg00071.html</a></span><br />
<br />
2. Create shortcut for cygwin installation file and add -X (*capital X) in target field.<br />
<br />
3. Use fruitbat mirror where to get files from<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">32-bit ftp://www.fruitbat.org/pub/cygwin/circa/2016/08/30/104223</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">64-bit ftp://www.fruitbat.org/pub/cygwin/circa/64bit/2016/08/30/104235</span><br />
<br />
4. Add wget from mirror<br />
<br />
5. Backup cygwin1.dll from /bin folder<br />
<br />
6. wget apt-cyg<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">chmod +x apt-cyg</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">mv apt-cyg /usr/local/bin</span><br />
<br />
7. install telnet using apt-cyg (telnet is in inetutils package)<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">apt-cyg install inetutils</span><br />
<br />
8. install ssh using apt-cyg (ssh is in openssh package)<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">apt-cyg install openssh</span><br />
<br />
9. Enjoy!<br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: x-small;"><br /></span></div>
<iframe allow="encrypted-media" allowfullscreen="" frameborder="0" gesture="media" height="360" src="https://www.youtube.com/embed/-OwY3vH0Lww" width="640"></iframe></div>
Didzis Lauvahttp://www.blogger.com/profile/14336203707448766593noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-29644001200876973652016-08-25T01:56:00.000-07:002016-12-04T06:32:09.791-08:00That string is date or float?<div dir="ltr" style="text-align: left;" trbidi="on">
Got an interesting situation where I had to distinguish if the piece of string is float or date in Python 2.7. No problems to do that when there is dateutil.parse library in Python. But in my case the tricky situation was that piece of string which actually is float, can be interpreted as... date.<br />
So, I came to solution - let there be two separate functions.<br />
Checking if the string is float is straightforward.<br />
<pre style="background: url("http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif") rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 450.828px;"><code style="word-wrap: normal;">def is_number(s):
try:
float(s)
return True
except ValueError:
return False </code></pre>
Checking if the string is date - first of all, I check if it is a float. And if it is - lets return False.<br />
<pre style="background: url("http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif") rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 450.828px;"><code style="word-wrap: normal;"> def is_date(d):
if is_number(d):
return False
try:
parse(d)
print parse(d)
return True
except ValueError:
return False </code></pre>
And that`s it.</div>
Didzis Lauvahttp://www.blogger.com/profile/14336203707448766593noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-17245846406613827642016-05-12T00:35:00.002-07:002016-05-12T00:35:32.256-07:00Ridiculously long wave.<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/--YYEyH1_hIY/VzQyL0Py_bI/AAAAAAAAAOA/lsWAiyp-0xofyDaCgAuzfkZY-zKIE1ZyACLcB/s1600/sine.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="11" src="https://3.bp.blogspot.com/--YYEyH1_hIY/VzQyL0Py_bI/AAAAAAAAAOA/lsWAiyp-0xofyDaCgAuzfkZY-zKIE1ZyACLcB/s640/sine.png" width="640" /></a></div>
<br /></div>
Didzis Lauvahttp://www.blogger.com/profile/14336203707448766593noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-10403041514211402662016-03-06T11:09:00.000-08:002016-12-04T06:28:18.929-08:00Menmnonics. Anode VS Cathode<div dir="ltr" style="text-align: left;" trbidi="on">
How to remember which of those is positive and which is negative?<br />
Triple N could help.<br />
<br />
aNode Not Negative.<br />
<br />
<a href="http://1.bp.blogspot.com/-YjmWwVgMBag/WEQnz9sPU3I/AAAAAAABpfo/00eB9cQQ6KoU3whyQauHnzbD_DeiYxIFACK4B/s1600/p1mke.jpg" imageanchor="1"><img border="0" height="512" src="https://1.bp.blogspot.com/-YjmWwVgMBag/WEQnz9sPU3I/AAAAAAABpfo/00eB9cQQ6KoU3whyQauHnzbD_DeiYxIFACK4B/s640/p1mke.jpg" width="640" /></a></div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-67795612665804592462015-11-29T10:18:00.000-08:002015-11-29T10:18:47.820-08:00How to download videos from facebook or vimeo (or youtube or any other service)<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
I hate long "how to" videos.<br />
So here are my versions of how to easily save videos using just a web browser<br />
<br />
<br />
Facebook video download steps:<br />
1)open video page<br />
2)change to mobile version<br />
3)play the video and save it using right mouse button option<br />
<iframe allowfullscreen="" frameborder="0" height="360" src="https://www.youtube.com/embed/HRHk9LRWKwg" width="480"></iframe>
<br />
<br />
Vimeo (youtube and many more service) download steps<br />
1)copy the video link<br />
2)paste it in some service (keepvid or ssyoutube or savefrom.net)<br />
3)download it<br />
<br /></div>
<iframe allowfullscreen="" frameborder="0" height="360" src="https://www.youtube.com/embed/oRzJwsHG19w" width="480"></iframe></div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-73374193395558757362014-12-06T04:07:00.000-08:002014-12-06T04:08:52.889-08:00Sharing more than one main folder in Dropbox?<div dir="ltr" style="text-align: left;" trbidi="on">
No. I haven`t found how to do that.<br />
<br />
But why would anybody do that? Does it make any sense? Why it is not enough with only one main Dropbox folder?<br />
<br />
<a href="http://dimio.altervista.org/eng/dsynchronize.gif" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://dimio.altervista.org/eng/dsynchronize.gif" height="307" width="400" /></a>There are some cases related with programming, when it is easier to have all scripts in some specific place, e.g. <i>C:/scripts</i>, instead of some complicated Dropbox folder path like <i>C:/Documents and Settings/whatever/user/space in folder/name creates problems/Dropbox/specific folder for scripts/any programming language/scripts</i>...<br />
<br />
But how about duplicating the contents in the main Dropbox folder? You can still work in your <i>C:/scripts, </i>and all updates will be synced in your specific folder inside Dropbox main folder.<br />
<br />
Synchronising between folders. That`s the key. <a href="http://dimio.altervista.org/eng/">DSynchronize</a>.<br />
<br />
Features include - <b>real time sync </b>and <b>bidirectional sync.</b><br />
<b><br /></b>
<b></b><br />
<a name='more'></a><br />
<b>不,我发现帮助文档如何做到这一点。</b><br />
<b><br /></b>
<b>但是,为什么会有人这样做呢?这有什么意义吗?为什么这是不够的,只有一个主文件夹Dropbox的?</b><br />
<b><br /></b>
<b>有与节目有关的某些情况下,当它是更容易有所有脚本在一些特定的地方,例如C:/脚本,而不是一些复杂的Dropbox文件夹路径,如C:/ Documents和设置/不管/用户/空间的文件夹/名称用于创建脚本/任何编程语言/脚本问题/ Dropbox的/特定的文件夹...</b><br />
<b><br /></b>
<b></b><br />
<b>但如何复制的内容主要Dropbox的文件夹?您仍然可以工作在C:/脚本,所有更新将在您的Dropbox里面的主文件夹指定的文件夹进行同步。</b><br />
<b><br /></b>
<b>在文件夹之间进行同步。 That`s的关键。 DSynchronize。</b><br />
<b><br /></b>
<b></b><br />
<b>其特点包括 - 实时同步和双向同步。</b></div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-56507152027049634202014-09-07T12:01:00.001-07:002014-09-07T12:02:17.741-07:00Harmonic oscillations<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="http://2.bp.blogspot.com/-746rgbQ0yKY/VAynfXnCU3I/AAAAAAABPso/hXHi051CP3I/s1600/svarstibas.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-746rgbQ0yKY/VAynfXnCU3I/AAAAAAABPso/hXHi051CP3I/s1600/svarstibas.gif" height="325" width="400" /></a></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-6z0cTt9vWEk/VAyonQfAaQI/AAAAAAABPsw/JpB8gh1gvXo/s1600/harm.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" src="http://2.bp.blogspot.com/-6z0cTt9vWEk/VAyonQfAaQI/AAAAAAABPsw/JpB8gh1gvXo/s1600/harm.png" height="40" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Mathematics which explains the distance <br />
at time for harmonic oscillations.</td></tr>
</tbody></table>
Harmonic oscillations and the representation of distance, speed and acceleration over time. So, if we derive the distance over time, we get the speed. If we derive that, we get acceleration.<br />
<br />
This distance at time is composite function which has inner and outer parts and constant. Which parts in the formula are constants? Amplitude, angular frequency and phase shift. Firstly we see that its a multiplication of constant (amplitude) and composite function (frequency, time and phase within the sine). So we leave amplitude intact and will multiply it with derivative of outer function which keeps the inner function. So, cosine becomes negative sine, and then multiply it with derivative of inner function. Inner function is the first order polynome, so phase dissapears and frequency loses time. So, the derivative of inner function is pure angular frequency. So, recall, how far we are - we multiply amplitude with negative sine of intact inner function and multiply it with derivative of inner function - angular frequency. To get rid of negative sign, we can change sine to cosine by adding pi/2 inside of this trigonometric function. Remember that sine of angle is equal to cosine of angle plus pi/2.</div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-74646122932036130392014-06-30T05:36:00.002-07:002014-06-30T05:36:37.395-07:00My students<div dir="ltr" style="text-align: left;" trbidi="on">
In the last five months I have studied good practice of being a teacher in university. One (most important) task was to create a portfolio. In my experience I have heard this word describing The Face of different modern artists, mostly web designers and programmers, who are promoting their achievements; accumulating all their work in a world wide web thus showing their potential for their future employers.<br />
<br />
Eventually during the course I took I realized that my blog/webpage is also a portfolio. I started this blog with the main idea to have a notes; pretty specific ones, maybe I am the only one who will need them, but I nailed myself that time by time I am looking for some older posts to refresh myself - "how I solved that particular problem, what are the keywords, etc"<br />
<br />
Even more, I organized my web not only for myself, not only for some five people in the world who are fighting similar problems I had, but I have also specified a part of the blog for... my work. As I work with students, they have to understand some complicated problems pretty often. I realized that Internet is full of ... well.. shit, but there are pearls hidden. Now I have specific part, where I am accumulating those pearls which explain those particular problems. Either it is some image, video, audio or just a explanatory text - this part has its value - all necessary things in one place.<br />
<br />
This course I had - well, despite I already had some ideas in my mind how to organize and structure the work with my students - in the end it putted the dot on "i".</div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-15282743136250871492014-01-23T10:31:00.000-08:002014-01-23T10:31:09.610-08:00Array to object in php<div dir="ltr" style="text-align: left;" trbidi="on">
I could say that I`m settled down with such a programming techniques - object oriented programming, PDO for database access, JSON as nice client-server communication, Slim framework as RESTful server, jQuery-Backbone as MV* client side solution.<br />
<br />
This is short note about database-php-javascript communication. PHP is receiving data from both, but the trick is - one, coming from javascript is JSON string, another one, coming from database is array. PHP has nice function converting JSON string to pure object -<br />
<blockquote class="tr_bq">
json_decode </blockquote>
But how about converting array to object? It should be so simple, right? But as it appears, there`s no native functions for doing that. One way is to cast an array to object as such<br />
<blockquote class="tr_bq">
$newObject =(object) $array;</blockquote>
but ... the trick is that only the outer dimension will be transformed to an object. There definetely are some recursive functions flyin around in internet, but .. how about firstly encoding array to JSON using <b>json_encode</b>, and then decoding it using <b>json_decode</b>? Ok, I admit it could be much more memory inefficient than some recursive function, but, it definetely is much more simple.<br />
<br />
<br />
<a name='more'></a><br />
我可以说,我真的安定下来这样的编程技术 - 面向对象编程, PDO的数据库访问, JSON作为很好的客户端 - 服务器通信,超薄框架作为REST风格服务器, jQuery的骨干作为MV *客户端解决方案。<br />
<br />
这是一个简短的说明有关数据库-PHP- JavaScript的通信。 PHP是从两个接收数据,但诀窍是 - 一,从JavaScript的未来是JSON字符串,另外一个,从数据库来为数组。 PHP有很好的功能转换JSON字符串到纯对象 -<br />
json_decode<br />
但如何将数组对象?它应该是这么简单,对不对?但是,当它出现时,有单曲没有原生函数这样做。一种方法是将铸数组对象作为这样<br />
$ NEWOBJECT = (对象) $阵列;<br />
但...关键是,只有外形尺寸将被改造为一个对象。有definetely在互联网飞翔周围的一些递归函数,但..怎么样使用json_encode首先数组编码为JSON ,然后用json_decode解码呢?好吧,我承认这可能是更多的内存低效比一些递归函数,但是,它definetely是更简单。</div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-68725847416973421362013-11-09T12:54:00.003-08:002013-11-09T12:56:01.596-08:00Vēl<div dir="ltr" style="text-align: left;" trbidi="on">
Uldis Marhilevičs - "Vēl" chords (akordi). <a href="https://pbs.twimg.com/media/BYqFS3OCAAACE-k.jpg:large">Here.</a><br />
<br /></div>
<iframe width="640" height="480" src="//www.youtube.com/embed/86NtYMqtKs4" frameborder="0" allowfullscreen></iframe>Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-71016309669317975382013-08-17T06:01:00.000-07:002013-08-17T06:10:16.875-07:00Facebook api logout without popup<div dir="ltr" style="text-align: left;" trbidi="on">
During the building some webpage where users are able to register themselves through social networks, I stuck with a stupid problem related with facebook logout procedure. And all answers were hidden in... number sign "#" within anchor "href" element.<br />
<br />
This one gives login popup<br />
<br />
< a href="#" class="logoutFB" onclick="FB.logout()"> logout </a >
<br />
<br />
This one works fine, reloads page and is without popup<br />
<br />
< a href="" class="logoutFB" onclick="FB.logout()"> logout </a >
</div>Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-82529606715138508912013-05-30T14:08:00.001-07:002013-05-30T14:08:35.109-07:00Dog barking VSTi<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://2.bp.blogspot.com/-3-ttDdNkM1s/Uae_O6ngQ2I/AAAAAAAAGcw/FtQpPCM3THw/s1600/Untitled-1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-3-ttDdNkM1s/Uae_O6ngQ2I/AAAAAAAAGcw/FtQpPCM3THw/s1600/Untitled-1.png" /></a>55 different Collie barking samples in one VSTi. Static, without changing pitch.<br />
<a href="https://www.box.com/s/k63p1hjfciclv5vkitbw">Download it here</a>.</div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-68759747792064327552013-05-22T12:32:00.002-07:002013-05-22T12:32:19.657-07:00Authentic Super Mario Lead sound<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-I6K0Fv_PeRA/UZ0dMfpfqqI/AAAAAAAAGcg/QosyyxZl59w/s1600/blog.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="127" src="http://1.bp.blogspot.com/-I6K0Fv_PeRA/UZ0dMfpfqqI/AAAAAAAAGcg/QosyyxZl59w/s320/blog.png" width="320" /></a></div>
Extracted from original game Super Mario Bros.<br />
<br />
<a href="http://upload.wikimedia.org/wikipedia/en/3/36/MarioSMBWalk.gif" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://upload.wikimedia.org/wikipedia/en/3/36/MarioSMBWalk.gif" /></a>Download it <a href="https://www.box.com/s/c8959qrsn07hpxswk49w">here.</a><br />
<br />
<br /></div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com1tag:blogger.com,1999:blog-2604104724468584504.post-14272254020853983842013-05-01T13:06:00.000-07:002013-05-01T13:12:13.117-07:00MIDI and probability (?)<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-IGTk36wNLGg/UYF2kmLWaYI/AAAAAAAAGZc/lP7xarWOBeI/s1600/interface.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="http://4.bp.blogspot.com/-IGTk36wNLGg/UYF2kmLWaYI/AAAAAAAAGZc/lP7xarWOBeI/s200/interface.png" width="137" /></a></div>
Well.. what is the connection between MIDI and probability? Usually musicians and sound engineers try to find flawless software and plugins with as much as precise timing and accuracy as possible. This one instead tries to skip played notes based on probability. Incoming MIDI message "note on" triggers the mathematics where user defined probability level decides will the note go through or disappear.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
When it is useful? Well.. that depends. When I play layered instruments where one of them is kind of percussive or drums, I like to have that percussive instrument not to sound all the time. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Download it <a href="https://www.box.com/s/mvs9fwamma57gbtz0qc5" target="_blank">here</a></div>
</div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-52831159524796773552013-03-28T14:59:00.004-07:002013-03-28T14:59:58.120-07:00Nuendo: Add keyboard shortcut to Normalize<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-qLFSfxh0Nyk/UVS7sJ3fYII/AAAAAAAAGYI/lBL0Ni3UfuE/s1600/4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-qLFSfxh0Nyk/UVS7sJ3fYII/AAAAAAAAGYI/lBL0Ni3UfuE/s320/4.png" width="200" /></a></div>
Under File -> Key Commands you can find/manage all keyboard shortcut commands.<br />
<br />
Here I remap "N" from "Locate next event" to "Normalize", because I can do locating quite easy with mouse.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-E0bUQO_SnPk/UVS7saGQZkI/AAAAAAAAGYM/rxSykZIfRug/s1600/5.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="306" src="http://2.bp.blogspot.com/-E0bUQO_SnPk/UVS7saGQZkI/AAAAAAAAGYM/rxSykZIfRug/s320/5.png" width="320" /></a></div>
Firstly I have to get rid of "N" for Locate Next event. Firstly in the field "Type in Key", type in the chosen key. Press "Select" and it will open up according function on the left panel and click on it. The function is selected and you can remove shortcut.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-VK1WdOasQfI/UVS7slm4FoI/AAAAAAAAGYY/LFxHEG_aTBc/s1600/6.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="301" src="http://4.bp.blogspot.com/-VK1WdOasQfI/UVS7slm4FoI/AAAAAAAAGYY/LFxHEG_aTBc/s320/6.png" width="320" /></a></div>
Now when you freed up chosen key, navigate to the function you want to give this key, type it in the "Type in Key" field and assign. The key will show up in "Keys" textbox.<br />
<br />
<br />
<a name='more'></a><br />
<br />
<br />
在“文件” - >“鍵命令,你可以找到/管理所有的鍵盤快捷鍵命令。<br />
<br />
在這裡,我重新映射從“查找下一個事件”到“正常化”,“N”,因為我可以做定位用鼠標很容易。<br />
<br />
首先,我要擺脫的“N”找到下一個事件。首先,在該領域中的主要類型“,輸入選擇鍵。按“選擇”,在左側面板上,它會打開相應的功能並點擊它。選擇了該功能,你可以刪除快捷方式。<br />
<br />
現在,當你釋放向上選擇鍵,瀏覽到你想給這個關鍵的功能,請在“輸入鍵”字段和分配。鍵將顯示在“密鑰”文本框中。</div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0tag:blogger.com,1999:blog-2604104724468584504.post-65403455522639115382013-03-28T14:39:00.002-07:002013-03-28T15:00:34.901-07:00Nuendo: Import multiple tracks altogether with correct timing<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-t4Vu8G01Ew4/UVS1YijECVI/AAAAAAAAGX8/f4C-JoAwkQs/s1600/1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-t4Vu8G01Ew4/UVS1YijECVI/AAAAAAAAGX8/f4C-JoAwkQs/s320/1.png" width="283" /></a></div>
<b>The story: </b>I help to record some instruments in my home and then I would have to send all recordings to the studio to combine with other tracks.<br />
<br />
<b>The question: </b>What is the best way how to import/export recorded tracks?<br />
<br />
The easiest way how to import multiple tracks altogether is "import track archive"<br />
<br />
One step back. What is track archive? When you do "Export multiple tracks", it creates separate folder with all your selected tracks and parts. One more thing what happens during exporting is Nuendo creates an xml file. This xml file is like a map which consists all information about in which track goes which sound file and in what time it starts. Basically, this is what you are going to import - this is track archive.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-h6Z_X9tqOGg/UVS1YuQOpcI/AAAAAAAAGX0/kgGN3VuPWIM/s1600/2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="259" src="http://1.bp.blogspot.com/-h6Z_X9tqOGg/UVS1YuQOpcI/AAAAAAAAGX0/kgGN3VuPWIM/s320/2.png" width="320" /></a></div>
<a href="http://1.bp.blogspot.com/-H6XPW2oB4QI/UVS1X7J812I/AAAAAAAAGXw/jvaM6lgCj7c/s1600/3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="201" src="http://1.bp.blogspot.com/-H6XPW2oB4QI/UVS1X7J812I/AAAAAAAAGXw/jvaM6lgCj7c/s320/3.png" width="320" /></a><br />
<br />
Browse to that xml file and open it.<br />
<br />
<br />
<br />
<br />
Select all or few tracks from dialog box, choose whether you copy or use media directly from that folder (important, if you work with SSD drive, can speed things up a little bit when working with million tracks)<br />
<br />
Press OK and here you go - all colors, extended information about fading and which parts are muted, etc. imported in Nuendo in other computer in different place.<br />
<br />
<br />
<a name='more'></a>故事:我幫助一些儀器記錄在我的家鄉,然後我將不得不把所有的錄音工作室與其它軌道相結合。<br />
<br />
一個問題:什麼是最好的方式如何導入/導出錄製的曲目?<br />
<br />
最簡單的方法,如何導入多個曲目完全是“進口跟踪檔案”<br />
<br />
退一萬步。什麼是跟踪檔案?當你“導出多個軌道”,它會創建單獨的文件夾,所有選定的曲目和部件。還有一件事的過程中會發生什麼出口是,Nuendo的創建一個XML文件。這個XML文件是一樣的地圖,其中包括軌道“的聲音文件,並在什麼時候開始的所有信息。基本上,這就是你要導入 - 這是軌道<br />
<br />
<br />
瀏覽該XML文件並打開它。<br />
<br />
選擇全部或幾條軌道“對話框中,選擇您是否複製或利用媒體直接從該文件夾(重要的是,如果你的工作與SSD驅動器,可以加快速度,一點點工作時,萬首歌曲)<br />
<br />
按“確定”,在這裡你走 - 所有的顏色,擴展信息衰落和哪些部分是靜音等進口Nuendo的其他計算機在不同的地方。<br />
<br /></div>
Lauvahttp://www.blogger.com/profile/15778456242893522776noreply@blogger.com0