Tired Of Web Scraping? Make The AI Do It

[James Turk] has a novel approach to the problem of scraping web content in a structured way without needing to write the kind of page-specific code web scrapers usually have to deal with. How? Just enlist the help of a natural language AI. Scrapeghost relies on OpenAI’s GPT API to parse a web page’s content, pull out and classify any salient bits, and format it in a useful way.

What makes Scrapeghost different is how data gets organized. For example, when instantiating scrapeghost one defines the data one wishes to extract. For example:

from scrapeghost import SchemaScraper
scrape_legislators = SchemaScraper(
schema={
"name": "string",
"url": "url",
"district": "string",
"party": "string",
"photo_url": "url",
"offices": [{"name": "string", "address": "string", "phone": "string"}],
}
)

The kicker is that this format is entirely up to you! The GPT models are very, very good at processing natural language, and scrapeghost uses GPT to process the scraped data and find (using the example above) whatever looks like a name, district, party, photo, and office address and format it exactly as requested.

It’s an experimental tool and you’ll need an API key from OpenAI to use it, but it has useful features and is certainly a novel approach. There’s a tutorial and even a command-line interface, so check it out.

How Much Programming Can ChatGPT Really Do?

By now we’ve all seen articles where the entire copy has been written by ChatGPT. It’s essentially a trope of its own at this point, so we will start out by assuring you that this article is being written by a human. AI tools do seem poised to be extremely disruptive to certain industries, though, but this doesn’t necessarily have to be a bad thing as long as they continue to be viewed as tools, rather than direct replacements. ChatGPT can be used to assist in plenty of tasks, and can help augment processes like programming (rather than becoming the programmer itself), and this article shows a few examples of what it might be used for.

AI comments are better than nothing…probably.

While it can write some programs on its own, in some cases quite capably, for specialized or complex tasks it might not be quite up to the challenge yet. It will often appear extremely confident in its solutions even if it’s providing poor or false information, though, but that doesn’t mean it can’t or shouldn’t be used at all.

The article goes over a few of the ways it can function more as an assistant than a programmer, including generating filler content for something like an SQL database, converting data from one format to another, converting programs from one language to another, and even help with a program’s debugging process.

Some other things that ChatGPT can be used for that we’ve been able to come up with include asking for recommendations for libraries we didn’t know existed, as well as asking for music recommendations to play in the background while working. Tools like these are extremely impressive, and while they likely aren’t taking over anyone’s job right now, that might not always be the case.

Hands-On: NVIDIA Jetson Orin Nano Developer Kit

NVIDIA’s Jetson line of single-board computers are doing something different in a vast sea of relatively similar Linux SBCs. Designed for edge computing applications, such as a robot that needs to perform high-speed computer vision while out in the field, they provide exceptional performance in a board that’s of comparable size and weight to other SBCs on the market. The only difference, as you might expect, is that they tend to cost a lot more: the current top of the line Jetson AGX Orin Developer Kit is $1999 USD

Luckily for hackers and makers like us, NVIDIA realized they needed an affordable gateway into their ecosystem, so they introduced the $99 Jetson Nano in 2019. The product proved so popular that just a year later the company refreshed it with a streamlined carrier board that dropped the cost of the kit down to an incredible $59. Looking to expand on that success even further, today NVIDIA announced a new upmarket entry into the Nano family that lies somewhere in the middle.

While the $499 price tag of the Jetson Orin Nano Developer Kit may be a bit steep for hobbyists, there’s no question that you get a lot for your money. Capable of performing 40 trillion operations per second (TOPS), NVIDIA estimates the Orin Nano is a staggering 80X as powerful as the previous Nano. It’s a level of performance that, admittedly, not every Hackaday reader needs on their workbench. But the allure of a palm-sized supercomputer is very real, and anyone with an interest in experimenting with machine learning would do well to weigh (literally, and figuratively) the Orin Nano against a desktop computer with a comparable NVIDIA graphics card.

We were provided with one of the very first Jetson Orin Nano Developer Kits before their official unveiling during NVIDIA GTC (GPU Technology Conference), and I’ve spent the last few days getting up close and personal with the hardware and software. After coming to terms with the fact that this tiny board is considerably more powerful than the computer I’m currently writing this on, I’m left excited to see what the community can accomplish with the incredible performance offered by this pint-sized system.

Continue reading “Hands-On: NVIDIA Jetson Orin Nano Developer Kit”

AI And Savvy Marketing Create Dubious Moon Photos

Taking a high-resolution photo of the moon is a surprisingly difficult task. Not only is a long enough lens required, but the camera typically needs to be mounted on a tracking system of some kind, as the moon moves too fast for the long exposure times needed. That’s why plenty were skeptical of Samsung’s claims that their latest smart phone cameras could actually photograph this celestial body with any degree of detail. It turns out that this skepticism might be warranted.

Samsung’s marketing department is claiming that this phone is using artificial intelligence to improve photos, which should quickly raise a red flag for anyone technically minded. [ibreakphotos] wanted to put this to the test rather than speculate, so a high-resolution image of the moon was modified in such a way that most of the fine detail of the image was lost. Displaying this image on a monitor, standing across the room, and using the smartphone in question reveals details in the image that can’t possibly be there.

The image that accompanies this post shows the two images side-by-side for those skeptical of these claims, but from what we can tell it looks like this is essentially an AI system copy-pasting the moon into images it thinks are of the moon itself. The AI also seems to need something more moon-like than a ping pong ball to trigger the detail overlay too, as other tests appear to debunk a more simplified overlay theory. It seems like using this system, though, is doing about the same thing that this AI camera does to take pictures of various common objects.

Norm Abram Is Back, And Thanks To AI, Now In HD

We’ve said many times that while woodworking is a bit outside our wheelhouse, we have immense respect for those with the skill and patience to turn dead trees into practical objects. Among such artisans, few are better known than the legendary Norm Abram — host of The New Yankee Workshop from 1989 to 2009 on PBS.

So we were pleased when the official YouTube channel for The New Yankee Workshop started uploading full episodes of the classic DIY show a few months back for a whole new generation to enjoy. The online availability of this valuable resource is noteworthy enough, but we were particularly impressed to see the channel start experimenting with AI enhanced versions of the program recently.

Note AI Norm’s somewhat cartoon-like appearance.

Originally broadcast in January of 1992, the “Child’s Wagon” episode of Yankee Workshop was previously only available in standard definition. Further, as it was a relatively low-budget PBS production, it would have been taped rather than filmed — meaning there’s no negative to go back and digitize at a higher resolution. But thanks to modern image enhancement techniques, the original video could be sharpened and scaled up to 1080p with fairly impressive results.

That said, the technology isn’t perfect, and the new HD release isn’t without a few “uncanny valley” moments. It’s particularly noticeable with human faces, but as the camera almost exclusively focuses on the work, this doesn’t come up often. There’s also a tendency for surfaces to look smoother and more uniform than they should, and reflective objects can exhibit some unusual visual artifacts.

Even with these quirks, this version makes for a far more comfortable viewing experience on today’s devices. It’s worth noting that so far only a couple episodes have been enhanced, each with an “AI HD” icon on the thumbnail image to denote them as such. Given the computational demands of this kind of enhancement, we expect it will be used only on a case-by-case basis for now. Still, it’s exciting to see this technology enter the mainstream, especially when its used on such culturally valuable content. Continue reading “Norm Abram Is Back, And Thanks To AI, Now In HD”

Hackaday Links Column Banner

Hackaday Links: January 22, 2023

The media got their collective knickers in a twist this week with the news that Wyoming is banning the sale of electric vehicles in the state. Headlines like that certainly raise eyebrows, which is the intention, of course, but even a quick glance at the proposed legislation might have revealed that the “ban” was nothing more than a non-binding resolution, making this little more than a political stunt. The bill, which would only “encourage” the phase-out of EV sales in the state by 2035, is essentially meaningless, especially since it died in committee before ever coming close to a vote. But it does present a somewhat lengthy list of the authors’ beefs with EVs, which mainly focus on the importance of the fossil fuel industry in Wyoming. It’s all pretty boneheaded, but then again, outright bans on ICE vehicle sales by some arbitrary and unrealistically soon deadline don’t seem too smart either. Couldn’t people just decide what car works best for them?

Speaking of which, a man in neighboring Colorado might have some buyer’s regret when he learned that it would take five days to fully charge his brand-new electric Hummer at home. Granted, he bought the biggest battery pack possible — 250 kWh — and is using a standard 120-volt wall outlet and the stock Hummer charging dongle, which adds one mile (1.6 km) to the vehicle’s range every hour. The owner doesn’t actually seem all that surprised by the results, nor does he seem particularly upset by it; he appears to know enough about the realities of EVs to recognize the need for a Level 2 charger. That entails extra expense, of course, both to procure the charger and to run the 240-volt circuit needed to power it, not to mention paying for the electricity. It’s a problem that will only get worse as more chargers are added to our creaky grid; we’re not sure what the solution is, but we’re pretty sure it’ll be found closer to the engineering end of the spectrum than the political end.

Continue reading “Hackaday Links: January 22, 2023”

2022: As The Hardware World Turns

Well folks, we made it through another one. While it would be a stretch to call 2022 a good year for those of us in the hacking and making community, the light at the end of the tunnel does seem decidedly brighter now than it did this time 365 days ago. It might even be safe to show some legitimate optimism for the year ahead, but then again I was counting on my Tesla stocks to be a long-term investment, so what the hell do I know about predicting the future.

Eh, my kids probably weren’t going to college anyway.

Thankfully hindsight always affords us a bit of wisdom, deservedly or otherwise. Now that 2022 is officially in the rearview mirror, it’s a good time to look back on the highs (and lows) of the last twelve months. Good or bad, these are the stories that will stick out in our collective minds when we think back on this period of our lives.

Oh sure, some might wish they could take the Men in Black route and forget these last few years ever happened, but it doesn’t work that way. In fact, given the tumultuous times we’re currently living in, it seems more likely than not that at some point we’ll find ourselves having to explain the whole thing to some future generation as they stare up at us wide-eyed around a roaring fire. Though with the way this timeline is going, the source of said fire might be the smoldering remains of an overturned urban assault robot that you just destroyed.

So while it’s still fresh in our minds, and before 2023 has a chance to impose any new disasters on us, let’s take a trip back through some of the biggest stories and themes of the last year.

Continue reading “2022: As The Hardware World Turns”