<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Phil on Medium]]></title>
        <description><![CDATA[Stories by Phil on Medium]]></description>
        <link>https://medium.com/@ssbmqtjt?source=rss-2ebe91c9d753------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*aaefwzBSlU74tShfuCXy8w.png</url>
            <title>Stories by Phil on Medium</title>
            <link>https://medium.com/@ssbmqtjt?source=rss-2ebe91c9d753------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 19:39:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ssbmqtjt/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[GOTRAX Throttle Replacement — Error 22E]]></title>
            <link>https://medium.com/@ssbmqtjt/gotrax-throttle-replacement-error-22e-5eaa05ff3bf6?source=rss-2ebe91c9d753------2</link>
            <guid isPermaLink="false">https://medium.com/p/5eaa05ff3bf6</guid>
            <category><![CDATA[gotrax]]></category>
            <category><![CDATA[diy]]></category>
            <category><![CDATA[electric-scooters]]></category>
            <dc:creator><![CDATA[Phil]]></dc:creator>
            <pubDate>Mon, 19 May 2025 02:35:11 GMT</pubDate>
            <atom:updated>2025-05-19T02:38:36.757Z</atom:updated>
            <content:encoded><![CDATA[<h3>GOTRAX Throttle Replacement — Error 22E</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/0*nDzHYqJRkUyyjVh0.jpg" /></figure><h3><strong>Before You Start:</strong></h3><p><strong>Estimated time</strong>: ~1 hour</p><p><strong>Part used</strong>: Throttle from <a href="https://www.amazon.com/dp/B0D4JLR54B?ref=ppx_yo2ov_dt_b_fed_asin_title">Amazon</a></p><p><strong>Tools needed</strong>: Screwdrivers, floss or thin string, utility knife</p><h4>Steps:</h4><p>1. Remove the Handlebar</p><ul><li>Unscrew the <strong>two screws</strong> securing the handlebar.</li><li>Gently slide off the handlebar.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M7iMJyf_q29wogsrrX7yhA.jpeg" /></figure><p>2. Access the Throttle Wiring</p><ul><li>Cut open and remove the <strong>rubber handlebar cover</strong> near the throttle.</li><li>Unscrew the <strong>two screws</strong> securing the plastic cover over the motherboard.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*C-LLEAIMyW17lAsA6MT1WA.jpeg" /></figure><p>3. Test the New Throttle</p><ul><li><strong>Unplug the old throttle (red, green, black wire).</strong></li><li>Plug in the new one temporarily and <strong>test for the 22E error.</strong></li><li>If the new throttle works, the <strong>22E error should disappear.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XLK4r64YbG4JsGn_vlHKPw.jpeg" /><figcaption>The throttle cable is already removed in this picture.</figcaption></figure><p>4. Route the New Throttle Cable</p><ul><li>Tie a <strong>floss string</strong> (or similar thread) to the throttle connector before removing the old one.</li><li>Use the string to <strong>pull the new cable through</strong> the tight handlebar passage.</li><li>This part is tricky — <strong>guiding the wire </strong>is hard without a string.</li></ul><h4>Handlebar Alignment Issue (If Throttle Cable Won’t Pull Through)</h4><p>If your handlebar hole is misaligned and blocks the cable path:</p><ol><li>Disassemble the Handlebar and Display:</li><li><strong>Unscrew 5 screws</strong> holding the motherboard.</li></ol><ul><li>The center screw may be <strong>covered with glue</strong> — scrape it off gently.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tPceM3a3lrzdfp_q8tMYBA.jpeg" /></figure><p>3.<strong> Pry off the display cover</strong> (glued in) — the image below shows the display with the cover removed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fguyt47yz1omYvawAgKTxA.jpeg" /></figure><p>4. <strong>Unplug the two cables</strong> connecting the display.</p><p>5. <strong>Pop out the display.</strong> If it doesn’t come out easily, loosen the surrounding glue.</p><p>6.<strong> Lift out the motherboard.</strong></p><ul><li>You <strong>don’t need to unplug all cables</strong>, just move it enough to access the front section.</li><li>Keep the cooling paste the way it is and remove the brown foil between the board and the metal.</li></ul><p>7. Realign the Handlebar:</p><ul><li><strong>Remove 3 screws</strong> securing the front light cover.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--9w1t1k42yT8UipcebHJw.jpeg" /></figure><ul><li><strong>Loosen the handlebar screws.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0dmJV7TEBS66a_3TU1ewyA.jpeg" /></figure><ul><li><strong>Realign</strong> the handlebar so the internal hole lines up with the cable path.</li></ul><p>8. Finish the Cable Routing:</p><ul><li>Reattach the <strong>floss/string</strong> to the new throttle connector.</li><li><strong>Pull it through</strong> the now-aligned hole and reassemble everything.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5eaa05ff3bf6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Democrats Are Falling Behind]]></title>
            <link>https://medium.com/@ssbmqtjt/why-democrats-are-falling-behind-c3c55b5412a3?source=rss-2ebe91c9d753------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3c55b5412a3</guid>
            <category><![CDATA[biden]]></category>
            <category><![CDATA[democrats]]></category>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[usa]]></category>
            <category><![CDATA[trump]]></category>
            <dc:creator><![CDATA[Phil]]></dc:creator>
            <pubDate>Sun, 07 Jul 2024 14:02:17 GMT</pubDate>
            <atom:updated>2024-07-07T14:02:17.451Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ye-uJaOq94rnVAwQmuqtuw.png" /><figcaption>Biden vs Trump</figcaption></figure><p>Eight years after Trump was elected, Democrats still don’t seem to know why. Despite ample time to turn inward, they continue in their old ways — ignoring what truly matters to voters.</p><p>While Democrats have pointed fingers at Trump’s flaws and touted economic growth, these tactics seem to fall flat. Why?</p><p>According to a <a href="https://news.gallup.com/poll/1675/most-important-problem.aspx">Gallup Poll</a>, the top two voter priorities are leadership and immigration. Biden’s shaky debate performance and Harris’s widely criticized handling of the border show how poorly the Democratic party is prepared to run against Trump.</p><p>While Democrats have weak candidates addressing these issues, a hush-paying convicted felon does not win over voters — the real problem might lie elsewhere: voters don’t feel heard. Talking about growth statistics does not alleviate their concerns, nor does emphasizing Trump’s flaws. The only way forward is to address voters’ concerns directly.</p><p>While immigration and leadership rank high in the Gallup poll, I believe the underlying concern is change. The world’s economic, scientific, and cultural landscapes are evolving faster than ever before.</p><p>Democrats need to address this fear of uncertainty and share a clear vision with concrete steps on how to move toward a stable future.</p><blockquote>“The price of doing the same old thing is far higher than the price of change.” — Bill Clinton</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YbNKRcDoPZAMbGLKGAjMCA.png" /><figcaption>Joe Biden walking toward a better future</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3c55b5412a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to connect an Azure function with an Azure key vault (Azure Portal and Python)]]></title>
            <link>https://medium.com/@ssbmqtjt/how-to-connect-an-azure-function-with-an-azure-key-vault-azure-portal-and-python-bd5140178a7?source=rss-2ebe91c9d753------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd5140178a7</guid>
            <category><![CDATA[azure-key-vault]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-functions]]></category>
            <category><![CDATA[azure-secret]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Phil]]></dc:creator>
            <pubDate>Wed, 13 Sep 2023 02:26:18 GMT</pubDate>
            <atom:updated>2023-10-06T22:04:59.162Z</atom:updated>
            <content:encoded><![CDATA[<p>1. Create a Resource Group and within the resource group:</p><p>2. Create a Key Vault</p><p>3. Check if the role-based access in turned on under &gt; Settings &gt; Access Configuration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*VcQPfx4XcVeiRG96JvNXDg.png" /></figure><p>4. Navigate to Secrets and create a secret</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*voOGd-X6P3P_rKTrHW3oXQ.png" /></figure><p>5. Create a function</p><p>6. Create the identity for the function. Go to &gt; Settings &gt; Identity</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*pvDQcRdgkZLhzh5UUYuNrg.png" /></figure><p>I chose “System assigned” which is bound to the specific resource (here the function). If you need to manage several resources (e.g. several functions that need access to the key vault) you can create a “User assigned” identity and reuse it for other resources.</p><p>7. Go back to the key vault and grant the function access via &gt; Access control (IAM) &gt; Add &gt; Add role assignment (Be cautious which role you select — the roles have specific access, sometimes not to the secret itself)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*pyP2BrT1ffwmsxQLDMgFgw.png" /></figure><p>8. If you are testing from your local client add the IP address to access the key vault &gt; Settings &gt; Networking. Make sure that Microsoft services can bypass the firewall (Under Exception at the bottom of the screenshot below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*xfeOvJIzHdVWTQX0Vh86Bg.png" /></figure><h3>Retrieve a secret:</h3><p>Retrieving a secret via environment variables is recommended if the secret is (mostly) static. If you need to e.g. specify the version of the secret or have dynamic secrets then the Azure SDK is the right choice.</p><h4>Option 1: Via environment variables</h4><p>Within your key vault, go to the new secret, click on the current version, and copy the Secret Identifier</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*IfAjHArJnJRxHow58ffUXQ.png" /></figure><p>1. Create or open your function and navigate to &gt; Settings &gt; Configuration (should be in the same resource group)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/247/1*Jm_gwoc8wtKHHmv24AKPQQ.png" /></figure><p>2. Create a new application setting and name it the way you want it to be called from your code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*RmWXnQud9HOMPNBZIjxUQg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*R1RMqFckC6xbk5qfBnuIFw.png" /></figure><pre>@Microsoft.KeyVault(SecretUri=https://yourURI)</pre><p>3. In your code:</p><pre>import os<br>os.environ[&quot;yourURIName&quot;]</pre><h4>Option 2: Via Azure SDK</h4><p>1. In your code:</p><pre>from azure.identity import DefaultAzureCredential<br>from azure.keyvault.secrets import SecretClient<br><br>def get_secret(key_vault_name: str, key_name: str) -&gt; tuple:<br>    credential = DefaultAzureCredential()<br>    key_client = SecretClient(<br>        vault_url=f&quot;https://{key_vault_name}.vault.azure.net/&quot;, credential=credential<br>    )<br>    secret = key_client.get_secret(key_name)<br><br>    return secret.properties.content_type, secret.value</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EpkgotTXzmhX-_5YVu4ysQ.png" /></figure><h4>Troubleshooting:</h4><p>Azure UI visually indicates how the key vault reference resolved by showing 1. a green check mark 2. a blue (i) or 3. a red (x). There can be many reasons why it did not resolve, one of them could be that your function is set up to be dynamic which seems to cause issues — changing it to another plan solved the issue for me. Otherwise, the issue is probably due to an access issue.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd5140178a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a new user and grant permissions on SQL Server (via Azure Data Studio)]]></title>
            <link>https://medium.com/@ssbmqtjt/how-to-create-a-new-user-and-grant-permissions-on-sql-server-via-azure-data-studio-9d4c76a7c397?source=rss-2ebe91c9d753------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d4c76a7c397</guid>
            <category><![CDATA[azure-data-studio]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[sql-server]]></category>
            <dc:creator><![CDATA[Phil]]></dc:creator>
            <pubDate>Wed, 13 Sep 2023 01:23:04 GMT</pubDate>
            <atom:updated>2023-09-13T01:23:04.708Z</atom:updated>
            <content:encoded><![CDATA[<p>In your master database create the login:</p><pre>CREATE LOGIN newUsername<br>    WITH PASSWORD = &#39;newPassword&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/253/1*MBUOOpavHyLPIdYTFnZZmQ.png" /><figcaption>Azure Data Studio</figcaption></figure><p>In a query within one of your regular tables:</p><pre>CREATE USER newUsername<br>   WITH PASSWORD = &#39;newPassword&#39;;  </pre><p>And finally grant permissions such as SELECT or INSERT:</p><pre>USE yourDatabase;<br>GRANT SELECT ON yourTable TO newUsername;&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*9GZuQb6IbGF1aKTayWC-yA.jpeg" /><figcaption>SQL</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d4c76a7c397" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Download images, CSVs, PDFs from Tableau with Python]]></title>
            <link>https://medium.com/@ssbmqtjt/download-images-csvs-pdfs-from-tableau-with-python-c4266bce4645?source=rss-2ebe91c9d753------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4266bce4645</guid>
            <category><![CDATA[business-intelligence]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[tableau]]></category>
            <dc:creator><![CDATA[Phil]]></dc:creator>
            <pubDate>Mon, 05 Jun 2023 22:59:24 GMT</pubDate>
            <atom:updated>2023-06-05T22:59:24.871Z</atom:updated>
            <content:encoded><![CDATA[<p>Tableau can be a pain, I try not to be, so full code at the end of the article — explained snippets below.</p><p>The official docs for the Tableau Server Client Library (TSC) can be found <a href="https://tableau.github.io/server-client-python/docs/">here.</a></p><p>What can you do with the library? <em>Business user tasks </em>like filtering, downloading, updating, and <em>admin tasks</em> like scheduling, user management, tasks, managing sites. The library is <strong>not </strong>meant to replace dashboard development.</p><p>I am assuming you have Python installed, your virtual environment set up, and authorization to access your company’s Tableau server.</p><pre>pip install tableauserverclient</pre><h4>Authentication</h4><p>You can either use a token or username and password.</p><pre>tableau_auth = TSC.TableauAuth(tableau_username, tableau_password)<br>    company_url = “http://company/“<br>    server = TSC.Server(company_url)<br>    server.auth.sign_in(tableau_auth)</pre><h4>API Selection</h4><p>You need to clarify your server’s API version, you can find the corresponding API for your installed Tableau Server Version <a href="https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_versions.htm">here</a>. You can find out what Server version you have <a href="https://help.tableau.com/current/server/en-us/version_server_view.htm">here</a>.</p><pre>server.version = &quot;3.17&quot;</pre><h4>Optional: Change Sites</h4><p>By default you will be directed to your ‘default’ site (if still have one). If you need to change sites:</p><pre>site_name = “company_site”<br>with server.auth.sign_in(tableau_auth):<br>        all_sites, pagination_item = server.sites.get()<br>        for site in all_sites:<br>            if site.name == site_name:<br>                server.auth.switch_site(site)</pre><h4>Navigate to Workbook</h4><pre>workbook_name = “company_workbook”<br>workbooks, pagination_item = server.workbooks.get()<br>                for workbook in workbooks:<br>                    if workbook.name == workbook_name:</pre><h4>Navigate to View (Sheet)</h4><pre>views = server.workbooks._get_views_for_workbook(<br>                            workbook, False)<br>                        for view in views:<br>                            if view.name == view_name:</pre><h4>Optional: Set High Image Resolution</h4><pre>image_req_option = TSC.ImageRequestOptions(<br>                                    imageresolution=TSC.ImageRequestOptions.Resolution.High,<br>                                    maxage=1,)</pre><h4>Optional: Set Filters and / or Parameters</h4><p>You can pass both filters and parameters in a dictionary to the function:</p><pre>params = {“filter_name” : ”value”, “parameter_name” : “value”}<br>for key, value in parms.items():<br>                                    image_req_option.vf(key, value)</pre><h4>Get Image, CSV, PDF</h4><p>You can save the generated files or further process them in pandas or opencv.</p><pre>server.views.populate_image(view, image_req_option)<br>                                image = view.image<br>server.views.populate_csv(csv_file)<br><br>with open(&quot;image.png&quot;, &quot;wb&quot;) as f:<br>        f.write(image)<br><br>with open(‘csvfile.csv’, ‘wb’) as f:<br>	f.write(b’’.join(view_item.csv))</pre><h4>Full Code:</h4><pre>import tableauserverclient as TSC<br><br>def get_image_from_tableau(site_name, workbook_name, view_name, parms):<br><br>    tableau_auth = TSC.TableauAuth(tableau_username, tableau_password)<br>    server = TSC.Server(&quot;&quot;)<br>    server.auth.sign_in(tableau_auth)<br><br>    server.version = &quot;3.17&quot;<br><br>    with server.auth.sign_in(tableau_auth):<br>        all_sites, pagination_item = server.sites.get()<br>        for site in all_sites:<br>            if site.name == site_name:<br>                server.auth.switch_site(site)<br>                workbooks, pagination_item = server.workbooks.get()<br>                for workbook in workbooks:<br>                    if workbook.name == workbook_name:<br>                        views = server.workbooks._get_views_for_workbook(<br>                            workbook, False<br>                        )<br>                        for view in views:<br>                            if view.name == view_name:<br>                                image_req_option = TSC.ImageRequestOptions(<br>                                    imageresolution=TSC.ImageRequestOptions.Resolution.High,<br>                                    maxage=1,<br>                                )<br>                                for key, value in parms.items():<br>                                    image_req_option.vf(key, value)<br><br>                                server.views.populate_image(view, image_req_option)<br>                                image = view.image<br><br>                                if image is None:<br>                                    print(&quot;No image returned for {}&quot;.format(view.name))<br><br>                                return image</pre><h4>If the article helped, please leave a clap.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bzwqrp2A70m58vaFHu0uIg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4266bce4645" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why is Kamala Harris’ Approval Rating so low?]]></title>
            <link>https://medium.com/@ssbmqtjt/why-is-kamala-harris-approval-rating-so-low-e36a4b49ea30?source=rss-2ebe91c9d753------2</link>
            <guid isPermaLink="false">https://medium.com/p/e36a4b49ea30</guid>
            <category><![CDATA[kamala-harris]]></category>
            <category><![CDATA[usa]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[joe-biden]]></category>
            <category><![CDATA[politics]]></category>
            <dc:creator><![CDATA[Phil]]></dc:creator>
            <pubDate>Mon, 02 Jan 2023 12:21:42 GMT</pubDate>
            <atom:updated>2023-01-02T12:21:42.222Z</atom:updated>
            <content:encoded><![CDATA[<p>53% Americans have an unfavorable opinion of Harris and only 39% Americans have a favorable opinion <a href="https://www.latimes.com/projects/kamala-harris-approval-rating-polls-vs-biden-other-vps/">(source) </a>— ranking much lower than previous vice-presidents. What happened?</p><p>At first, I thought that Harris is slacking and not attending events — leading to less media coverage and a lower rating. However, according to the <a href="https://www.latimes.com/projects/kamala-harris-events-appearances-vp-schedule-news/#nt=0000016a-0e43-dffa-a76b-3f6bfa3f0002-showMedia-liI2promoMedium-contentFooter">LA Times</a>, Harris is attending on an average two events a day — including high-profile meetings requiring ample preparation.</p><h4>Is it Biden?</h4><p>Did Biden internally decide to run for a second-term, and is trying to hold Harris back by excluding her from White House press-releases thereby limiting her media coverage?</p><p>I scraped all press-releases from the Biden, Trump, and Obama administrations and compared the number of mentions of the vice presidents [‘Harris’, ‘Pence’, ‘Biden’] to the total number of press releases for the given year. BUT in 2022 Harris was mentioned more often per White House press-release than any of her previous counter-parts. (X-Axis = calendar years)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*Fb_RAfBOL2jfJUjYh8GsEw.png" /><figcaption><a href="https://github.com/Philthon/white_house_press_release_scraper.git">You can find the GitHub repository here</a></figcaption></figure><h4>If the White House is not holding Harris back … what is it then?</h4><p>Between <strong>June 2021</strong> and October 2021 Harris’ approval flipped, not rebounding since then. The ratings started to drop shortly after her response to the US-Mexican border situation (<a href="https://www.cnn.com/2021/06/08/politics/kamala-harris-border/index.html">source</a>).</p><h4>Can Harris Rebound?</h4><p>The good news is that Harris’ rating did not drop further after the criticized Afghanistan exit and negative comments from her employees about her leadership (<a href="https://www.washingtonpost.com/politics/2021/12/04/kamala-harris-staff-departures/">source</a>). In April 2022 Harris hired a new chief of staff — Al Gore’s communications director hoping to turn the public perception around (<a href="https://www.boston.com/news/politics/2022/04/21/kamala-harris-replaces-chief-of-staff-in-latest-vp-office-shakeup/">source</a>). If Harris is planning to run for president in 2024 then she needs positive media coverage —flying to Kiev and meeting Zelensky would not only show strength to America but could also serve as an introduction to European leaders.</p><p>What do you think Harris can do to increase her popularity?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Q9mIPB37NJuKG8YGNGN0vw.jpeg" /><figcaption>This is not the “real” Kamala — this image was generated by Lexica.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e36a4b49ea30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[4 Arguments for Veganism]]></title>
            <link>https://medium.com/@ssbmqtjt/4-arguments-for-veganism-37fa57ea757d?source=rss-2ebe91c9d753------2</link>
            <guid isPermaLink="false">https://medium.com/p/37fa57ea757d</guid>
            <category><![CDATA[animal-rights]]></category>
            <category><![CDATA[animals]]></category>
            <category><![CDATA[food]]></category>
            <category><![CDATA[vegan]]></category>
            <category><![CDATA[veganism]]></category>
            <dc:creator><![CDATA[Phil]]></dc:creator>
            <pubDate>Tue, 29 Nov 2022 09:02:07 GMT</pubDate>
            <atom:updated>2022-12-02T02:31:02.288Z</atom:updated>
            <content:encoded><![CDATA[<p>Food For Thought</p><h4>Animal Rights</h4><p>We surround ourselves with pets and yet we eat them. For most people that is not conflicting, why is that?</p><blockquote>9,177,200,000 chickens are processed in the US every year — 28 chickens per American. <a href="https://www.fao.org/faostat/en/#data/QCL">UN Food and Agriculture Organization</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qs6Gpv6iPqRFQd67_VaMew.gif" /><figcaption>Number of chicks shredded every 3 seconds in the US.</figcaption></figure><p>We often separate animals into two buckets: eatable and and non-eatable. Most would agree that eatable animals should only be eaten if they are raised and slaughtered somewhat humanely. But that is the issue — ‘humanely’ and ‘factory farming’ are not agreeable. To feed the massive demand of millions the production and slaughter must be efficient — not humane.</p><p>But what if the animals are stunned before the slaughter?</p><blockquote>“3.6% bulls were inadequately stunned […] Calves were shot inaccurately more frequently (14%) than other cattle.” <a href="https://www.ingentaconnect.com/content/ufaw/aw/2013/00000022/00000004/art00009">Animal Welfare</a></blockquote><p>One could argue that the stunning rate could be improved and animals would not need to suffer. Unfortunately, animal suffering does not start in the slaughterhouse, but for most animals suffering begins at birth. Calves are separated within 24 hours from their mother — causing <a href="https://www.sciencedaily.com/releases/2015/04/150428081801.htm">long-term issues for mothers and calves</a>. Calves grow up being less sociable, more stressed, and with a lower body-weight.</p><p>There are no humane slaughter options — <strong>slaughter is always inhuman</strong>e. Lobby groups will try to convince you <a href="https://www.youtube.com/watch?v=OZrVlz_hgoM">otherwise</a> but they can’t hide the <a href="https://www.youtube.com/watch?v=-_rAmuH8cQA">reality</a>.</p><blockquote>“The question is not, “Can they reason?” nor, “Can they talk?” but “Can they suffer?” — Jeremy Bentham</blockquote><h4>Human Rights</h4><blockquote>“He who is cruel to animals becomes hard also in his dealings with men. We can judge the heart of a man by his treatment of animals.” — Immanuel Kant</blockquote><p>Animals are suffering, but so are humans working in slaughterhouses. Factory workers are <a href="https://data.census.gov/table?t=Health&amp;n=3116&amp;tid=ASMAREA2017.AM1831BASIC01">lower paid</a>, <a href="https://www.bls.gov/opub/mlr/2017/article/how-safe-are-the-workers-who-process-our-food.htm">more sick</a>, and leave jobs more often due to <a href="https://www.bls.gov/opub/mlr/2017/article/how-safe-are-the-workers-who-process-our-food.htm">“overexertion and bodily reaction”</a>.</p><blockquote>“The 2015 rate for recordable <strong>illness </strong>cases was […] approximately <strong>10 times as high</strong> as the rate for private industry. The illness rate was especially high (307.3) in animal (except poultry) slaughtering.” <a href="https://www.bls.gov/opub/mlr/2017/article/how-safe-are-the-workers-who-process-our-food.htm">bls.gov</a></blockquote><h4>Health</h4><p>When was the last time you ate an unprocessed piece of meat? Unfortunately, most meat is processed — burgers, hot dogs, smoked salmon. Eating processed and red meat is associated with <a href="https://pubmed.ncbi.nlm.nih.gov/26780279/">“increased risk of total mortality, cardiovascular disease, colorectal cancer and type 2 diabetes”</a>. Don’t worry about muscle mass —muscle gains are similar to omnivores. <a href="https://link.springer.com/article/10.1007/s40279-021-01434-9">Study here</a>.</p><blockquote>“With good planning and an understanding of what makes up a healthy, balanced vegan diet, you can get all the nutrients your body needs.” <a href="https://www.nhs.uk/live-well/eat-well/how-to-eat-a-balanced-diet/the-vegan-diet/">NHS</a></blockquote><h4>Climate</h4><p>Consuming animal products (eatable or non-eatable) has a major impact on the climate. Meat consumption alone is <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7256495/">responsible </a>for up to 18% of the total Green House Gas emissions. Especially the beef industry contributes massively to climate change by emitting methane.</p><blockquote>CO2 makes up to 79% of the total green house gases and methane contributes only around 11% — however, methane is much <a href="https://en.wikipedia.org/wiki/Global_warming_potential">more destructive</a>, causing ~ 3 times the damage to the climate.</blockquote><p>Water consumption is a major issue as well. To produce one kilogram of beef ~ 15,400 liters (34,000 coke cans) of water are necessary — compared to 325 liters per kilogram of vegetables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rm2OMwoo5HISzzmjS3Gqzw.gif" /><figcaption>Those are just ~1,000 cans.</figcaption></figure><p>While there are many ways to have an impact — being vegan is one of the most impactful. It is not easy but you can do it. <a href="https://how-to-go-vegan.peta.org/">You can start here</a>.</p><h4>Questions?</h4><p>Would you go vegan? Let me know.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37fa57ea757d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HubSpot API — How to Get Started with Python]]></title>
            <link>https://medium.com/@ssbmqtjt/hubspot-api-how-to-get-started-with-python-11083ade6ad9?source=rss-2ebe91c9d753------2</link>
            <guid isPermaLink="false">https://medium.com/p/11083ade6ad9</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[hubspot-crm]]></category>
            <category><![CDATA[hubspot]]></category>
            <dc:creator><![CDATA[Phil]]></dc:creator>
            <pubDate>Wed, 16 Nov 2022 01:00:31 GMT</pubDate>
            <atom:updated>2022-11-16T01:00:31.253Z</atom:updated>
            <content:encoded><![CDATA[<h3>HubSpot API — How to Get Started with Python</h3><p>In this article I will explain how to:</p><ol><li>Create a HubSpot token</li><li>Make an API call to get Company/Deal data</li><li>Specify what data will be returned</li><li>Explain how the company and deal data can be linked</li><li>Additional Links</li></ol><p>Who is the article for? First time HubSpot API users.</p><h3>Token</h3><p>Before you get started making API calls you need to create a HubSpot app. After defining read and write access within the app you can then use the app token to make your API calls.</p><p>Settings &gt; Account Setup &gt; Private Apps &gt; Create a private app &gt; Scopes &gt; [Define Read/Write Access] &gt; Create App</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JAovzJDScAABN7koVn7ZhA.png" /></figure><h3>API Calls</h3><p>You can use the following template to make your API calls.</p><pre>import hubspot<br>from hubspot.crm.companies import ApiException<br><br>import os<br>from dotenv import load_dotenv <br><br>def get_data_companies() -&gt; dict:<br>    load_dotenv()<br>    token = os.getenv(&#39;HUBSPOT_API_KEY&#39;)<br>    client = hubspot.Client.create(access_token=token)<br>    properties = [&#39;name&#39;, &#39;address&#39; ,&#39;city&#39; ,&#39;country&#39;]<br><br>    try:<br>        list = client.crm.companies.get_all(properties=properties, archived=False)<br>        #list = client.crm.companies.basic_api.get_page(limit=1, properties=properties, archived=False)<br>        return list<br><br>    except ApiException as e:<br>        print(&quot;Exception when calling basic_api-&gt;get_page: %s\n&quot; % e)<br><br>if __name__ == &#39;__main__&#39;:<br>    print(get_data_companies())<br></pre><p>To get deal data you would just replace</p><pre>from hubspot.crm.companies import ApiException<br>list = client.crm.companies.get_all</pre><pre>from hubspot.crm.deals import ApiException<br>list = client.crm.deals.get_all</pre><h3>Custom Returns</h3><p>However, only a few default “properties” will be returned — if you want to query specific properties you can use the following link to view all properties for e.g. Deals: <a href="https://api.hubapi.com/properties/v1/deals/properties?hapikey=demo">link to view all deal properties</a> to view other objects you can replace deals with e.g. companies</p><h3>Data Joins</h3><p>“Associations” can be retrieved for the different HubSpot objects by using the code below. You can retrieve different objects by changing the “url” from e.g. COMPANY to CONTACTS to get associated contacts. To note: one or multiple ObjectsIDs can be returned — one deal could have multiple contact associations — you can limit the number of returned associations.</p><pre>import requests<br>import json<br>import os<br>from dotenv import load_dotenv<br><br>def get_association(deal_id: int) -&gt; str:<br>    load_dotenv()<br><br>    token = os.getenv(&#39;HUBSPOT_API_KEY&#39;)<br>    <br>    url = &quot;https://api.hubapi.com/crm/v4/objects/DEAL/{}/associations/COMPANY&quot;.format(deal_id)<br><br>    querystring = {&quot;limit&quot;:&quot;10&quot;}<br><br>    headers = {<br>        &#39;accept&#39;: &quot;application/json&quot;,<br>        &#39;authorization&#39;: token<br>        }<br><br>    response = requests.request(&quot;GET&quot;, url, headers=headers, params=querystring)<br><br>    data = json.loads(response.text)<br>    if len(data[&#39;results&#39;]) &gt; 0:<br>        return str(data[&#39;results&#39;][0][&#39;toObjectId&#39;])</pre><h3>Additional Links</h3><p><a href="https://developers.hubspot.com/docs/api/crm/understanding-the-crm">Official documentation for the HubSpot objects — including documentation for endpoints.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*U48tYuoApo9Hvv0Y5ZfU-A.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11083ade6ad9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>