Let's suppose you want to create a task that loads a Pipe Delimited File into a database on a daily basis. The task is to run on Mac OS and you are using Snowflake for the database. You can do it with SDTK as follows:
1) Download SDTK. For this tutorial, we're going to use the latest version of the Python version as of this writing (0.1.2) which is here: https://sourceforge.net/projects/simple-data-toolkit/files/0.1.3/stc.py/download
2) Create a new text file called ConvertPSV.sh
3) Open the file with a text editor (like Text Edit)
Enter the following text:
#!/bin/sh
python stc.py clients.psv clients.sql createorreplace clients
(For more info on STC and SDTK see the following URL: https://www.vis-software.com/#sdtk)
export SNOWSQL_PWD=password
snowsql -a myorganization-myaccount -u jsmith -f clients.sql -d database -s public -o quiet=true -o friendly=false
(For more info on snowsql see the following URL: https://docs.snowflake.com/en/user-guide/snowsql-use.html)
4) Go to the Terminal.
5) Edit the list of cron jobs with the following command:
nano crontab -e
6) Add the following to a new line:
0 8 * * * cd ~ && ConvertPSV.sh
7) Press CTRL+O and CTRL+X to save and exit nano.
from sdtk import com_sdtk_api_ChatGPTAPI import os import fnmatch import re texData = "" texBegin = "\n\\begin{document}\n" texEnd = "\n\\end{document}" header = "" footer = "" foundBody = False # Get a list of all .png files in the current directory png_files = [file for file in os.listdir('.') if fnmatch.fnmatch(file, '*.png')] def result(text): global texData global header global footer global foundBody text = text.replace("```latex", "").replace("```", "") body_match = re.search(r'\\begin{document}(.*?)\\end{document}', text, re.DOTALL) if body_match: body_content = body_match.group(1).strip() if len(texData) > 0: texData = texData + "\n" + "\\newpage" + "\n" else: header_match = re.search(r'^(.*?)\\begin{document}', text, re.DOTALL) header = header_match.group(1).strip() footer_match = re.search(r'\\end{document}(.*)$', text, re.DOTALL) footer = footer_match.group(1).strip() texData = texData + body_content foundBody = True else: foundBody = False print(text) # Loop over each .png file for file_name in png_files: foundBody = False while foundBody == False: com_sdtk_api_ChatGPTAPI.instance().query(result, "Can you generate a LaTeX document to represent the text in this image and format it correctly and return only the LaTeX code?", file_name) with open("output.tex", "w+") as file: # Write the string to the file file.write(header + texBegin + texData + texEnd + footer)Atotium News - Business Aggregate - 2025-01-10Microsoft slams the brakes on $3.3 billion data center — reportedly set to foster development of OpenAI's supercomputer https://www.windowscentral.com/microsoft/microsoft-slams-the-brakes-on-3-billion-data-center Microsoft has decided to temporarily halt early construction work on a $3.3 billion data center in Mount Pleasant, Wisconsin, for its second phase while evaluating recent technological changes and their impact on design. The pause comes after reports that the facility was intended to support OpenAI’s advanced AI developments and supercomputer creation. Microsoft’s decision is seen as a response to concerns about overreliance on OpenAI and the company’s own plans to develop AI models for its services, which may not rely on OpenAI’s technology. This move also reflects internal tensions regarding the terms of Microsoft's partnership with OpenAI and the potential need for more computing power at a lower cost. The pause is expected to last several months, pending further review and design adjustments. Bitcoin falls to lowest level since November as Trump rally loses steam in inauguration run-up https://finance.yahoo.com/news/bitcoin-falls-to-lowest-level-since-november-as-trump-rally-loses-steam-in-inauguration-run-up-152403085.html Bitcoin fell to its lowest level since November, trading at $91,600 on Thursday, following a significant decline after reaching record highs in the wake of President-elect Donald Trump's win in early November. The cryptocurrency had surged past the $100,000 mark earlier in December and touched $108,000, benefiting from positive sentiment towards cryptocurrencies under Trump’s administration. Although former SEC Chair Gary Gensler is stepping down, concerns remain as a more crypto-friendly Congress takes over with potential changes to come later. However, investors like Anthony Scaramucci warn against overexcitement about immediate policy shifts. The decline in Bitcoin coincided with US economic data raising inflation concerns and substantial withdrawals from US bitcoin exchange-traded funds. Crypto-related stocks, such as MicroStrategy and Coinbase, also followed suit, experiencing notable drops in value. Private equity wants a piece of your 401(k) — and hopes Trump can make it happen https://finance.yahoo.com/news/private-equity-wants-a-piece-of-your-401k--and-hopes-trump-can-make-it-happen-090059639.html Private equity firms are lobbying the Trump administration to gain access to $12 trillion currently held in 401(k)s and other defined-contribution retirement plans. These firms believe that allowing private equity investments into these accounts would provide workers with more diversification away from public markets, potentially leading to upside not just for themselves but for the entire industry. While some argue that private equity funds can be riskier and less liquid, fees are also high, eating into investment gains. The Labor Department under the first Trump administration had stated that such investments could be acceptable alternatives for these accounts, but the Biden administration reversed this guidance by saying it didn't recommend it. Any new guidance from Washington may need to come with legal liability protection for retirement plan sponsors and administrators. This 401(k) plan feature is a 'green light to contribute aggressively,' advisor says https://www.cnbc.com/amp/2025/01/06/this-401k-feature-allows-big-savers-to-get-their-full-employer-match.html The article discusses a special feature called a "true-up" in 401(k) plans that allows aggressive contributions early in the year without missing out on the full employer match. If your plan has this feature and you max out your contributions before year-end, the true-up will deposit any remaining matching contribution at the end of the year. This can provide a "green light to contribute aggressively," as certified financial planner Jon Ulin puts it. However, if your plan doesn't have a true-up feature, you could miss out on part of your employer's match if you max out early. Experts recommend checking your 401(k) summary plan description to understand the terms and conditions of your plan. The article also notes that higher deferral limits apply for 2025, with catch-up contributions available for savers age 50 and older.Atotium News - Business Aggregate - 2024-12-04BlackRock to Acquire HPS Investment Partners to Deliver Integrated Solutions Across Public and Private Markets https://ir.blackrock.com/news-and-events/press-releases/press-releases-details/2024/BlackRock-to-Acquire-HPS-Investment-Partners-to-Deliver-Integrated-Solutions-Across-Public-and-Private-Markets/default.aspx Summary: BlackRock has announced its plan to acquire HPS Investment Partners for approximately $12 billion, with the transaction to be paid entirely in BlackRock equity. This acquisition aims to strengthen BlackRock's capabilities in providing integrated solutions across both public and private markets, enhancing their private credit offerings alongside their existing public fixed income business. The deal will create a new private financing solutions business unit, broadening BlackRock's capabilities in senior and junior credit solutions, asset-based finance, real estate, private placements, and CLOs. Expected to close in mid-2025, the transaction will increase BlackRocku2019s private markets fee-paying AUM and management fees significantly and is set to be accretive to earnings. The acquisition positions BlackRock to better serve its clients' needs, offering complex financing solutions to clients ranging from small businesses to large corporations, with a focus on sustainable growth and job creation. Amazon Is Building a Mega AI Supercomputer With Anthropic https://www.wired.com/story/amazon-reinvent-anthropic-supercomputer/ Summary: Amazon is collaborating with Anthropic to build one of the world's largest AI supercomputers. The new system, featuring Amazon's latest AI training chip, Trainium 2, is expected to surpass current capabilities significantly. This development, part of Amazon Web Services' (AWS) project Rainer, underscores Amazon's growing role in generative AI, competing with major players like Nvidia, Microsoft, and Google. New AWS clusters are introduced, offering cost efficiency over Nvidia's GPUs. Amazon is also advancing its AI chip technology, with Trainium 3 set to offer four times the performance of the current chip by 2025. At its Re:Invent conference, Amazon revealed tools to enhance AI model capabilities and introduced new services, such as Model Distillation and Bedrock Agents, which optimize smaller models and manage AI agents for various tasks. Additionally, Amazon unveiled an Automated Reasoning tool to ensure AI outputs are accurate, especially crucial for sectors like insurance. This tool uses logical reasoning for verifying AI-generated statements, extending its potential use across various industries. Going Freelance in 2024 u2014 What You Need to Know https://www.kiplinger.com/personal-finance/freelancing/going-freelance-what-you-need-to-know Summary: The article discusses the growing trend of freelancing in 2024, highlighting the increasing impact of remote freelance work on the U.S. economy. A significant portion of the workforce prefers flexible work arrangements, such as full-time remote or hybrid models. The article outlines the top ten growing career fields for remote freelancers, including bilingual, graphic design, and social media roles, as well as the top companies hiring freelancers like TELUS and Robert Half International. It also provides insights into the most in-demand job titles, the benefits of freelancing, and practical steps for finding freelance work, such as networking and building a personal brand. What Social Security Beneficiaries Should Know About 2025 Numbers https://www.kiplinger.com/retirement/social-security/what-social-security-beneficiaries-should-know-about-2025-numbers Summary: Social Security beneficiaries are set to receive a modest 2.5% cost-of-living adjustment in 2025, increasing the average monthly benefit to $1,976. This is the smallest increase since 2020, reflecting lower inflation rates. High-income workers will see a rise in the taxable income threshold for Social Security taxes to $176,100, while retirees who work will be able to earn more before benefits are reduced. The Social Security Administration is addressing issues like long wait times due to staff shortages. Beneficiaries are encouraged to create an online account at the Social Security website for easier access to benefits information and to check for potential errors in their earnings records.Simple Data Toolkit - Tutorial - Git API - PythonSimple Data Toolkit provides an unofficial API for reading files, commits, branches, and repos from the Git API. (At the time of this writing, the release of this is pending for complete support, but it is coming soon) To retrieve all repos a user has using Simple Data Toolkit, we can do the following:
from sdtk import com_sdtk_api_GitAPI def printer(data, reader): print(reader.toArrayOfNativeMaps(None)) com_sdtk_api_GitAPI.reposAPI().retrieveData({"owner": "Vis-LLC"}, printer)To retrieve all branches a repo has using Simple Data Toolkit, we can do the following:
from sdtk import com_sdtk_api_GitAPI def printer(data, reader): print(reader.toArrayOfNativeMaps(None)) com_sdtk_api_GitAPI.branchesAPI().retrieveData({"owner": "Vis-LLC", "repo": "Simple-Data-Toolkit"}, printer)To retrieve all the files in a branch using Simple Data Toolkit, we can do the following:
from sdtk import com_sdtk_api_GitAPI def printer(data, reader): print(reader.toArrayOfNativeMaps(None)) com_sdtk_api_GitAPI.filesAPI().retrieveData({"owner": "Vis-LLC", "repo": "Simple-Data-Toolkit", "branch": "main"}, printer)To retrieve the data in a file using Simple Data Toolkit, we can do the following:
from sdtk import com_sdtk_api_GitAPI def printerData(data, reader): print(data) com_sdtk_api_GitAPI.retrieveAPI().retrieveData({"owner": "Vis-LLC", "repo": "Simple-Data-Toolkit-UI", "branch": "main", "path": "index.html"}, printerData)We can also login using a personal access token (https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
from sdtk import com_sdtk_api_GitAPI def printerData(data, reader): print(data) com_sdtk_api_GitAPI.instance().setKey("Personal Access Token Here").retrieveAPI().retrieveData({"owner": "Vis-LLC", "repo": "Simple-Data-Toolkit-UI", "branch": "main", "path": "index.html"}, printerData)
Elevate your connection
Ortingo is a communication platform built with smart features in mind to help your business unlock new opportunities for growth.
Elevate your business with the most useful way to chat, call and connect with your team.
Ready to elevate your connection?
Learn more about Ortingo
Any thoughts on Franklin's post?
To comment or reply, you need an Ortingo account.
Sign in or sign upHere's what Ortingoers think of Franklin's post.
There are no comments on this post.