Show HN: Jb / json.bash – Command-line tool (and bash library) that creates JSON
4 by h4l | 0 comments on Hacker News.
jb is a UNIX tool that creates JSON, for shell scripts or interactive use. Its "one thing" is to get shell-native data (environment variables, files, program output) to somewhere else, using JSON encapsulate it robustly. I wrote this because I wanted a robust and ergonomic way to create ad-hoc JSON data from the command line and scripts. I wanted errors to not pass silently, not coerce data types, not put secrets into argv. I wanted to leverage shell features/patterns like process substitution, environment variables, reading/streaming from files and null-terminated data. If you know of the jo program, jb is similar, but type-safe by default and more flexible. jo coerces types, using flags like -n to coerce to a specific type (number for -n), without failing if the input is invalid. jb encodes values as strings by default, requiring type annotations to parse & encode values as a specific type (failing if the value is invalid). If you know jq, jb is complementary in that jq is great at transforming data already in JSON format, but it's fiddly to get non-JSON data into jq. In contrast, jb is good at getting unstructured data from arguments, environment variables and files into JSON (so that jq could use it), but jb cannot do any transformation of data, only parsing & encoding into JSON types. I feel rather guilty about having written this in bash. It's something of a boiled frog story. I started out just wanting to encode JSON strings from a shell script, without dependencies, with the intention of piping them into jq. After a few trials I was able to encode JSON strings in bash with surprising performance, using array operations to encode multiple strings at once. It grew from there into a complete tool. I'd certainly not choose bash if I was starting from scratch now...
Wednesday, 3 July 2024
Tuesday, 2 July 2024
New Show Hacker News story: latest news
Show HN: Adding Mistral Codestral and GPT-4o to Jupyter Notebooks
32 by prasoonds | 2 comments on Hacker News.
Hey HN! We’ve forked Jupyter Lab and added AI code generation features that feel native and have all the context about your notebook. You can see a demo video (2 min) here: https://ift.tt/vy2WwrA Try a hosted version here: https://pretzelai.app Jupyter is by far the most used Data Science tool. Despite its popularity, it still lacks good code-generation extensions. The flagship AI extension jupyter-ai lags far behind in features and UX compared to modern AI code generation and understanding tools (like https://ift.tt/igQ3wPX and https://www.cursor.com ). Also, GitHub Copilot still isn’t supported in Jupyter, more than 2 years after its launch. We’re solving this with Pretzel. Pretzel is a free and open-source fork of Jupyter. You can install it locally with “pip install pretzelai” and launch it with “pretzel lab”. We recommend creating a new python environment if you already have jupyter lab installed. Our GitHub README has more information: https://ift.tt/436KXYz For our first iteration, we’ve shipped 3 features: 1. Inline Tab autocomplete: This works similar to GitHub Copilot. You can choose between Mistral Codestral or GPT-4o in the settings 2. Cell level code generation: Click Ask AI or press Cmd+K / Ctrl+K to instruct AI to generate code in the active Jupyter Cell. We provide relevant context from the current notebook to the LLM with RAG. You can refer to existing variables in the notebook using the @variable syntax (for dataframes, it will pass the column names to the LLM) 3. Sidebar chat: Clicking the blue Pretzel Icon on the right sidebar opens this chat (Ctrl+Cmd+B / Ctrl+Alt+B). This chat always has context of your current cell or any selected text. Here too, we use RAG to send any relevant context from the current notebook to the LLM All of these features work out-of-the-box via our “AI Server” but you have the option of using your own OpenAI API Key. This can be configured in the settings (Menu Bar > Settings > Settings Editor > Search for Pretzel). If you use your own OpenAI API Key but don’t have a Mistral API key, be sure to select OpenAI as the inline code completion model in the settings. These features are just a start. We're building a modern version of Jupyter. Our roadmap includes frictionless, realtime collaboration (think pair-programming, comments, version history), full-fledged SQL support (both in code cells and as a standalone SQL IDE), a visual analysis builder, a VSCode-like coding experience powered by Monaco, and 1-click dashboard creation and sharing straight from your notebooks. We’d love for you to try Pretzel and send us any feedback, no matter how minor (see my bio for contact info, or file a GitHub issue here: https://ift.tt/5CRFKAf )
32 by prasoonds | 2 comments on Hacker News.
Hey HN! We’ve forked Jupyter Lab and added AI code generation features that feel native and have all the context about your notebook. You can see a demo video (2 min) here: https://ift.tt/vy2WwrA Try a hosted version here: https://pretzelai.app Jupyter is by far the most used Data Science tool. Despite its popularity, it still lacks good code-generation extensions. The flagship AI extension jupyter-ai lags far behind in features and UX compared to modern AI code generation and understanding tools (like https://ift.tt/igQ3wPX and https://www.cursor.com ). Also, GitHub Copilot still isn’t supported in Jupyter, more than 2 years after its launch. We’re solving this with Pretzel. Pretzel is a free and open-source fork of Jupyter. You can install it locally with “pip install pretzelai” and launch it with “pretzel lab”. We recommend creating a new python environment if you already have jupyter lab installed. Our GitHub README has more information: https://ift.tt/436KXYz For our first iteration, we’ve shipped 3 features: 1. Inline Tab autocomplete: This works similar to GitHub Copilot. You can choose between Mistral Codestral or GPT-4o in the settings 2. Cell level code generation: Click Ask AI or press Cmd+K / Ctrl+K to instruct AI to generate code in the active Jupyter Cell. We provide relevant context from the current notebook to the LLM with RAG. You can refer to existing variables in the notebook using the @variable syntax (for dataframes, it will pass the column names to the LLM) 3. Sidebar chat: Clicking the blue Pretzel Icon on the right sidebar opens this chat (Ctrl+Cmd+B / Ctrl+Alt+B). This chat always has context of your current cell or any selected text. Here too, we use RAG to send any relevant context from the current notebook to the LLM All of these features work out-of-the-box via our “AI Server” but you have the option of using your own OpenAI API Key. This can be configured in the settings (Menu Bar > Settings > Settings Editor > Search for Pretzel). If you use your own OpenAI API Key but don’t have a Mistral API key, be sure to select OpenAI as the inline code completion model in the settings. These features are just a start. We're building a modern version of Jupyter. Our roadmap includes frictionless, realtime collaboration (think pair-programming, comments, version history), full-fledged SQL support (both in code cells and as a standalone SQL IDE), a visual analysis builder, a VSCode-like coding experience powered by Monaco, and 1-click dashboard creation and sharing straight from your notebooks. We’d love for you to try Pretzel and send us any feedback, no matter how minor (see my bio for contact info, or file a GitHub issue here: https://ift.tt/5CRFKAf )
New Show Hacker News story: latest news
Show HN: I built a tool that Scrapes your website to generate LinkedIn Carousels
2 by yoouareperfect | 1 comments on Hacker News.
2 by yoouareperfect | 1 comments on Hacker News.
New Show Hacker News story: latest news
Show HN: Duonut- The most powerful no-code workflow automation software
2 by ramyaduonut | 0 comments on Hacker News.
2 by ramyaduonut | 0 comments on Hacker News.
New Show Hacker News story: latest news
Show HN: I Made an Open Source Platform for Structuring Any Unstructured Data
2 by adithya-s-k | 0 comments on Hacker News.
Hey HN, I'm Adithya, a 20-year-old dev from India. I have been working with GenAI for the past year, and I've found it really painful to deal with the many different forms of data out there and get the best representation of it for my AI applications. That's why I built OmniParse—an open-source platform designed to handle any unstructured data and transform it into optimized, structured representations. Key Features: - Completely local processing—no external APIs - Supports ~20 file types - Converts documents, multimedia, and web pages to high-quality structured markdown - Table extraction, image extraction/captioning, audio/video transcription, web page crawling - Fits in a T4 GPU - Easily deployable with Docker and Skypilot - Colab friendly with an interactive UI powered by Gradio Why OmniParse? I wanted a platform that could take any kind of data—documents, images, videos, audio files, web pages, and more—and make it clean and structured, ready for AI applications. Check it out on GitHub: https://ift.tt/sWFtDPd
2 by adithya-s-k | 0 comments on Hacker News.
Hey HN, I'm Adithya, a 20-year-old dev from India. I have been working with GenAI for the past year, and I've found it really painful to deal with the many different forms of data out there and get the best representation of it for my AI applications. That's why I built OmniParse—an open-source platform designed to handle any unstructured data and transform it into optimized, structured representations. Key Features: - Completely local processing—no external APIs - Supports ~20 file types - Converts documents, multimedia, and web pages to high-quality structured markdown - Table extraction, image extraction/captioning, audio/video transcription, web page crawling - Fits in a T4 GPU - Easily deployable with Docker and Skypilot - Colab friendly with an interactive UI powered by Gradio Why OmniParse? I wanted a platform that could take any kind of data—documents, images, videos, audio files, web pages, and more—and make it clean and structured, ready for AI applications. Check it out on GitHub: https://ift.tt/sWFtDPd
Monday, 1 July 2024
New Show Hacker News story: latest news
Show HN: We created the most comprehensive global sales tax/VAT/GST index
2 by meowiecfe | 0 comments on Hacker News.
Hey all, global sales tax compliance is one of those things that's not top of mind but can be an annoyance because sometimes you just can't get away with it when selling internationally. We've been really frustrated with how sales tax tools out there usually only focus on one particular region (i.e. US states, Canada, and maybe Europe), even though there are like 260+ jurisdictions around the world each with their own sales tax, VAT, or GST rules pertaining to digital products. So we made our own global sales tax index that covers virtually every jurisdiction you can think of, with updated information on B2B reverse charge mechanisms, general tax rates, as well as registration thresholds. There is even a self-assessment feature where you can get a tailored assessment on where and when you need to charge and remit sales tax. And of course, this is completely free - so feel free to play around! Hope this is of use to at least some in the forum. Don't hesitate to comment with questions, and we'd appreciate any feedback!
2 by meowiecfe | 0 comments on Hacker News.
Hey all, global sales tax compliance is one of those things that's not top of mind but can be an annoyance because sometimes you just can't get away with it when selling internationally. We've been really frustrated with how sales tax tools out there usually only focus on one particular region (i.e. US states, Canada, and maybe Europe), even though there are like 260+ jurisdictions around the world each with their own sales tax, VAT, or GST rules pertaining to digital products. So we made our own global sales tax index that covers virtually every jurisdiction you can think of, with updated information on B2B reverse charge mechanisms, general tax rates, as well as registration thresholds. There is even a self-assessment feature where you can get a tailored assessment on where and when you need to charge and remit sales tax. And of course, this is completely free - so feel free to play around! Hope this is of use to at least some in the forum. Don't hesitate to comment with questions, and we'd appreciate any feedback!
New Show Hacker News story: latest news
Show HN: AI assisted image editing with audio instructions
4 by ShaShekhar | 4 comments on Hacker News.
Excited to launch AAIELA, an AI-powered tool that understands your spoken commands and edits images accordingly. By leveraging open-source AI models for computer vision, speech-to-text, large language models (LLMs), and text-to-image inpainting, we have created a seamless editing experience that bridges the gap between spoken language and visual transformation. Imagine the possibilities if Google Photos integrated voice assisted editing like AAIELA! Alongside Magic Eraser and other AI tools, editing with audio instruction could revolutionize how we interact with our photos.
4 by ShaShekhar | 4 comments on Hacker News.
Excited to launch AAIELA, an AI-powered tool that understands your spoken commands and edits images accordingly. By leveraging open-source AI models for computer vision, speech-to-text, large language models (LLMs), and text-to-image inpainting, we have created a seamless editing experience that bridges the gap between spoken language and visual transformation. Imagine the possibilities if Google Photos integrated voice assisted editing like AAIELA! Alongside Magic Eraser and other AI tools, editing with audio instruction could revolutionize how we interact with our photos.
Subscribe to:
Posts (Atom)