Home Blog Page 3828

Bridging two networks utilizing Linux (Linux appearing as a router)


Good afternoon,

I want to attempt combining two networks utilizing Ubuntu (Ubuntu 16.04). Extra particularly, I’ve a DJI Tello drone, which generates its personal Wi-Fi entry level, and subsequently the units linked to its personal Wi-Fi entry level can solely management the drone. Nevertheless, what I want to obtain is to attach this drone through Ubuntu as a bridge to my router, in order that I can management the drone from different units linked to the router, or utilizing public IP by port forwarding.

This is the present configuration.

Drone’s entry level (IP and settings can’t be altered) – wi-fi connection to Ubuntu (Blue line within the diagram)

  • Drone’s tackle: 192.168.10.1
  • Ubuntu’s tackle linked to the drone: 192.168.10.3
  • Default route from Ubuntu’s aspect: 192.168.10.1

Router’s entry level (IP and settings might be altered) – wired connection to Ubuntu and wi-fi connection to different units (Purple line within the diagram)

  • Router’s (configuration web page) tackle: 192.168.10.100
  • Ubuntu’s tackle linked to the router: 192.168.10.51
  • Default route from Ubuntu’s aspect: 192.168.10.100

Current configuration

If I can entry the drone with its IP 192.168.10.1 from one other units linked to the router, I suppose I also can do port forwarding or DMZ from the drone’s IP to the general public IP, in order that I can entry drone additionally from the exterior web.

What I’ve accomplished

I’ve put in the bridge-utils bundle to the Ubuntu, then arrange the bridge interface because the above configuration through GUI. Nevertheless, until I manually modify the metrics for the drone’s wi-fi connection decrease, I couldn’t ping to 192.168.10.1 (drone). If I modify the metrics worth, then I may ping to each drone (192.168.10.1) and router (192.168.10.100) efficiently. Sadly, once I tried to entry the drone with its ip 192.168.10.1 from the opposite system connected to the router (MacBook), it says that there isn’t any path to host.

For the reason that last aim is to entry drone from the exterior web, I might be glad to listen to if there will likely be any configuration that I can modify from Ubuntu’s (and even Router’s) aspect, in order that nearly the drone is linked to the router as a shopper with its IP tackle, 192.168.10.1.

Any assistance on configuration will likely be appreciated.

A Content material Mannequin Is Not a Design System – A Listing Aside


Do you bear in mind when having an important web site was sufficient? Now, persons are getting solutions from Siri, Google search snippets, and cell apps, not simply our web sites. Ahead-thinking organizations have adopted an omnichannel content material technique, whose mission is to achieve audiences throughout a number of digital channels and platforms.

Article Continues Under

However how do you arrange a content material administration system (CMS) to achieve your viewers now and sooner or later? I discovered the arduous approach that making a content material mannequin—a definition of content material varieties, attributes, and relationships that allow individuals and programs perceive content material—with my extra acquainted design-system pondering would capsize my buyer’s omnichannel content material technique. You possibly can keep away from that consequence by creating content material fashions which can be semantic and that additionally join associated content material. 

I lately had the chance to steer the CMS implementation for a Fortune 500 firm. The consumer was excited by the advantages of an omnichannel content material technique, together with content material reuse, multichannel advertising and marketing, and robotic supply—designing content material to be intelligible to bots, Google information panels, snippets, and voice consumer interfaces. 

A content material mannequin is a vital basis for an omnichannel content material technique, and for our content material to be understood by a number of programs, the mannequin wanted semantic varieties—varieties named based on their that means as an alternative of their presentation. Our purpose was to let authors create content material and reuse it wherever it was related. However because the mission proceeded, I spotted that supporting content material reuse on the scale that my buyer wanted required the entire crew to acknowledge a brand new sample.

Regardless of our greatest intentions, we stored drawing from what we had been extra aware of: design programs. In contrast to web-focused content material methods, an omnichannel content material technique can’t depend on WYSIWYG instruments for design and format. Our tendency to strategy the content material mannequin with our acquainted design-system pondering consistently led us to veer away from one of many main functions of a content material mannequin: delivering content material to audiences on a number of advertising and marketing channels.

Two important rules for an efficient content material mannequin#section2

We wanted to assist our designers, builders, and stakeholders perceive that we had been doing one thing very completely different from their prior internet initiatives, the place it was pure for everybody to consider content material as visible constructing blocks becoming into layouts. The earlier strategy was not solely extra acquainted but additionally extra intuitive—no less than at first—as a result of it made the designs really feel extra tangible. We found two rules that helped the crew perceive how a content material mannequin differs from the design programs that we had been used to:

  1. Content material fashions should outline semantics as an alternative of format.
  2. And content material fashions ought to join content material that belongs collectively.

Semantic content material fashions#section3

A semantic content material mannequin makes use of sort and attribute names that replicate the that means of the content material, not how it will likely be displayed. For instance, in a nonsemantic mannequin, groups may create varieties like teasers, media blocks, and playing cards. Though these varieties may make it straightforward to put out content material, they don’t assist supply channels perceive the content material’s that means, which in flip would have opened the door to the content material being introduced in every advertising and marketing channel. In distinction, a semantic content material mannequin makes use of sort names like product, service, and testimonial so that every supply channel can perceive the content material and use it because it sees match. 

If you’re making a semantic content material mannequin, an important place to begin is to look over the categories and properties outlined by Schema.org, a community-driven useful resource for sort definitions which can be intelligible to platforms like Google search.

A semantic content material mannequin has a number of advantages:

  • Even when your crew doesn’t care about omnichannel content material, a semantic content material mannequin decouples content material from its presentation in order that groups can evolve the web site’s design while not having to refactor its content material. On this approach, content material can stand up to disruptive web site redesigns. 
  • A semantic content material mannequin additionally gives a aggressive edge. By including structured knowledge based mostly on Schema.org’s varieties and properties, a web site can present hints to assist Google perceive the content material, show it in search snippets or information panels, and use it to reply voice-interface consumer questions. Potential guests might uncover your content material with out ever setting foot in your web site.
  • Past these sensible advantages, you’ll additionally want a semantic content material mannequin if you wish to ship omnichannel content material. To make use of the identical content material in a number of advertising and marketing channels, supply channels want to have the ability to perceive it. For instance, in case your content material mannequin had been to offer an inventory of questions and solutions, it might simply be rendered on a often requested questions (FAQ) web page, however it is also utilized in a voice interface or by a bot that solutions frequent questions.

For instance, utilizing a semantic content material mannequin for articles, occasions, individuals, and areas lets A Listing Aside present cleanly structured knowledge for search engines like google and yahoo in order that customers can learn the content material on the web site, in Google information panels, and even with hypothetical voice interfaces sooner or later.

Image showing an event in a CMS passing data to a Google knowledge panel, a website, and a voice interface

Content material fashions that join#section4

After struggling to explain what makes a superb content material mannequin, I’ve come to understand that the very best fashions are these which can be semantic and that additionally join associated content material parts (reminiscent of a FAQ merchandise’s query and reply pair), as an alternative of slicing up associated content material throughout disparate content material parts. An excellent content material mannequin connects content material that ought to stay collectively in order that a number of supply channels can use it while not having to first put these items again collectively.

Take into consideration writing an article or essay. An article’s that means and usefulness relies upon upon its elements being stored collectively. Would one of many headings or paragraphs be significant on their very own with out the context of the total article? On our mission, our acquainted design-system pondering usually led us to need to create content material fashions that might slice content material into disparate chunks to suit the web-centric format. This had an analogous impression to an article that had been to have been separated from its headline. As a result of we had been slicing content material into standalone items based mostly on format, content material that belonged collectively turned troublesome to handle and almost unimaginable for a number of supply channels to know.

As an example, let’s have a look at how connecting associated content material applies in a real-world state of affairs. The design crew for our buyer introduced a fancy format for a software program product web page that included a number of tabs and sections. Our instincts had been to comply with swimsuit with the content material mannequin. Shouldn’t we make it as straightforward and as versatile as potential so as to add any variety of tabs sooner or later?

As a result of our design-system instincts had been so acquainted, it felt like we had wanted a content material sort known as “tab part” in order that a number of tab sections could possibly be added to a web page. Every tab part would show varied sorts of content material. One tab may present the software program’s overview or its specs. One other tab may present an inventory of sources. 

Our inclination to interrupt down the content material mannequin into “tab part” items would have led to an unnecessarily complicated mannequin and a cumbersome enhancing expertise, and it will have additionally created content material that couldn’t have been understood by further supply channels. For instance, how would one other system have been in a position to inform which “tab part” referred to a product’s specs or its useful resource listing—would that different system need to have resorted to counting tab sections and content material blocks? This could have prevented the tabs from ever being reordered, and it will have required including logic in each different supply channel to interpret the design system’s format. Moreover, if the shopper had been to have not wished to show this content material in a tab format, it will have been tedious emigrate to a brand new content material mannequin to replicate the brand new web page redesign.

Illustration showing a data tree flowing into a list of cards (data), flowing into a navigation menu on a website
A content material mannequin based mostly on design parts is unnecessarily complicated, and it’s unintelligible to programs.

We had a breakthrough once we found that our buyer had a particular function in thoughts for every tab: it will reveal particular data such because the software program product’s overview, specs, associated sources, and pricing. As soon as implementation started, our inclination to give attention to what’s visible and acquainted had obscured the intent of the designs. With a bit of digging, it didn’t take lengthy to understand that the idea of tabs wasn’t related to the content material mannequin. The that means of the content material that they had been planning to show within the tabs was what mattered.

In actual fact, the shopper might have determined to show this content material differently—with out tabs—some place else. This realization prompted us to outline content material varieties for the software program product based mostly on the significant attributes that the shopper had wished to render on the net. There have been apparent semantic attributes like identify and description in addition to wealthy attributes like screenshots, software program necessities, and function lists. The software program’s product data stayed collectively as a result of it wasn’t sliced throughout separate parts like “tab sections” that had been derived from the content material’s presentation. Any supply channel—together with future ones—might perceive and current this content material.

Illustration showing a data tree flowing into a formatted list, flowing into a navigation menu on a website
An excellent content material mannequin connects content material that belongs collectively so it may be simply managed and reused.

On this omnichannel advertising and marketing mission, we found that one of the simplest ways to maintain our content material mannequin on observe was to make sure that it was semantic (with sort and attribute names that mirrored the that means of the content material) and that it stored content material collectively that belonged collectively (as an alternative of fragmenting it). These two ideas curtailed our temptation to form the content material mannequin based mostly on the design. So in the event you’re engaged on a content material mannequin to help an omnichannel content material technique—and even in the event you simply need to make it possible for Google and different interfaces perceive your content material—bear in mind:

  • A design system isn’t a content material mannequin. Group members could also be tempted to conflate them and to make your content material mannequin mirror your design system, so you must shield the semantic worth and contextual construction of the content material technique throughout all the implementation course of. It will let each supply channel devour the content material while not having a magic decoder ring.
  • In case your crew is struggling to make this transition, you’ll be able to nonetheless reap among the advantages by utilizing Schema.org–based mostly structured knowledge in your web site. Even when further supply channels aren’t on the quick horizon, the profit to search engine marketing is a compelling cause by itself.
  • Moreover, remind the crew that decoupling the content material mannequin from the design will allow them to replace the designs extra simply as a result of they gained’t be held again by the price of content material migrations. They’ll have the ability to create new designs with out the impediment of compatibility between the design and the content material, and ​they’ll be prepared for the subsequent large factor. 

By rigorously advocating for these rules, you’ll assist your crew deal with content material the way in which that it deserves—as probably the most vital asset in your consumer expertise and one of the simplest ways to attach along with your viewers.

Astral Launched uv with Superior Options: A Complete and Excessive-Efficiency Instrument for Unified Python Packaging and Undertaking Administration


Astral, an organization famend for its high-performance developer instruments within the Python ecosystem, has not too long ago launched uv: Unified Python packaging, a complete software designed to streamline Python package deal administration. This new software, in-built Rust, represents a big development in Python packaging by providing an all-in-one resolution that caters to numerous Python improvement wants. Let’s delve into the options, capabilities, and potential impression of uv on the Python improvement group.

Introduction to uv: The New Python Packaging Instrument

Astral is greatest identified for creating Ruff, a quick Python linter and formatter that has gained important reputation within the developer group. Constructing on this success, Astral launched uv in February 2024 as a quick Python package deal installer and resolver, initially designed to function a drop-in alternative for the extensively used pip software. Nevertheless, the current updates to uv have reworked it from a easy pip different right into a fully-fledged mission administration resolution for Python builders.

Key Options of uv

The core enchantment of uv lies in its energy of offering a unified interface for managing Python tasks, instruments, scripts, and even the Python interpreter itself. Under is an exploration of the important thing options launched on this new launch:

  • Finish-to-Finish Undertaking Administration

One of the vital important additions to uv is its mission administration capabilities. Builders can now use uv to generate and set up cross-platform lockfiles based mostly on standards-compliant metadata. This function positions uv as a high-performance different to in style Python mission administration instruments equivalent to Poetry, PDM, and Rye. By integrating uv into their workflows, builders can obtain constant and dependable mission environments throughout completely different machines and platforms.

For instance, builders can initialize a brand new Python mission and add dependencies with just some instructions. The uv software will then create a lockfile that captures the mission’s totally resolved dependencies, making certain the surroundings is constant throughout all platforms. This strategy simplifies dependency administration and considerably reduces the complexity of sustaining massive Python tasks.

Along with managing Python tasks, uv now helps the set up and execution of command-line instruments in remoted digital environments. This functionality makes uv a strong different to instruments like pipx. With uv, builders can set up instruments and run instructions with out requiring specific installations, streamlining the event course of. For example, executing a command like `uvx ruff test` permits builders to run a Python linter with out further setup, making uv a handy and environment friendly possibility for managing Python-based command-line instruments.

uv additionally extends its performance to incorporate Python set up and administration. By supporting Python bootstrapping, uv permits builders to put in and handle completely different Python variations straight from the command line. This function makes uv a viable different to pyenv, enhancing its utility in Python improvement. The simplicity of this course of—builders can set up Python with a single command—underscores uv’s give attention to offering a seamless and user-friendly expertise.

One other modern function of uv is its help for airtight, single-file Python scripts with inline dependency metadata. Leveraging PEP 723, uv allows builders to embed dependency declarations straight inside Python scripts. This function eliminates the necessity for separate dependency administration information, equivalent to ‘necessities.txt,’ thereby simplifying the execution of standalone Python scripts. With uv, operating a Python script with all obligatory dependencies is so simple as executing a single command, making it an excellent software for fast, one-off scripting duties.

Efficiency and Effectivity

One of many standout qualities of uv is its pace. Constructed with Rust, uv is designed to deal with dependency decision and mission administration duties effectively. In benchmark assessments, uv has carried out considerably quicker than different instruments like Poetry and PDM. For instance, resolving dependencies for the Jupyter mission with out caching takes uv roughly 0.57 seconds, whereas Poetry requires 7.59 seconds. This efficiency enhance is a testomony to the underlying structure of uv, which is optimized for pace and reliability.

uv’s caching mechanism additional enhances its effectivity. With caching enabled, uv can resolve dependencies in milliseconds, offering a swift and responsive consumer expertise. This functionality is especially helpful for builders engaged on massive tasks with complicated dependency timber, the place the time financial savings will be substantial.

Workspaces and Collaboration

Astral has additionally launched the idea of workspaces to uv, drawing inspiration from the same function in Rust’s Cargo software. Workspaces enable builders to handle a number of Python packages inside a single repository, every with its personal ‘pyproject.toml’ file, however sharing a unified lockfile. This setup ensures that each one packages inside the workspace function with constant dependencies, simplifying the administration of huge, multi-package tasks.

Workspaces are notably helpful for groups engaged on complicated Python purposes that contain a number of interdependent packages. Centralizing the administration of those packages, uv helps builders preserve consistency throughout their tasks, lowering the probability of dependency conflicts and different widespread points.

Conclusion

The discharge of uv by Astral marks a big milestone in Python packaging. uv addresses many Python builders’ pains when managing tasks, instruments, and environments by providing a unified, quick, and dependable toolchain. Its intensive function set, emphasis on efficiency, and ease of use place uv as a strong different to instruments like pip, poetry, and pyenv.

As Python turns into in style, the necessity for environment friendly and scalable instruments turns into more and more vital. With uv, Astral has delivered an answer that not solely meets the present calls for of Python builders but in addition anticipates future challenges. Whether or not you’re a seasoned Python developer or a newcomer to the language, uv provides a compelling possibility for managing your Python tasks shortly and easily.


Take a look at the Particulars and GitHub. All credit score for this analysis goes to the researchers of this mission. Additionally, don’t overlook to comply with us on Twitter and be part of our Telegram Channel and LinkedIn Group. For those who like our work, you’ll love our publication..

Don’t Neglect to affix our 49k+ ML SubReddit

Discover Upcoming AI Webinars right here


Asif Razzaq is the CEO of Marktechpost Media Inc.. As a visionary entrepreneur and engineer, Asif is dedicated to harnessing the potential of Synthetic Intelligence for social good. His most up-to-date endeavor is the launch of an Synthetic Intelligence Media Platform, Marktechpost, which stands out for its in-depth protection of machine studying and deep studying information that’s each technically sound and simply comprehensible by a large viewers. The platform boasts of over 2 million month-to-month views, illustrating its reputation amongst audiences.



The Way forward for AI in Schooling by Dan Fitzpatrick

0


Dan Fitzpatrick delivered a keynote deal with on the way forward for AI in training, discussing its potential affect and challenges. This is a abstract of his insightful factors:

Integration of AI in Schooling: Fitzpatrick emphasised the rising integration of synthetic intelligence (AI) into academic methods. AI applied sciences provide promising alternatives to boost studying experiences, personalize instruction, and streamline administrative duties.

Customized Studying: One of many key advantages highlighted was AI’s potential to facilitate personalised studying experiences for college students. By analyzing huge quantities of knowledge, AI can adapt educational content material and methods to cater to particular person scholar wants and preferences. This tailor-made strategy has the potential to enhance scholar engagement and educational outcomes.

Information-Pushed Resolution Making: AI permits educators and directors to make data-driven selections by offering helpful insights into scholar efficiency, studying tendencies, and areas needing enchancment. This data-centric strategy empowers educators to determine efficient educating methods and interventions, in the end optimizing the training course of.

Addressing Challenges: Regardless of its potential advantages, Fitzpatrick acknowledged the challenges related to implementing AI in training. Privateness considerations, moral concerns, and the digital divide are among the many key challenges that should be addressed to make sure equitable entry and safeguard scholar information.

Skilled Improvement: One other necessary facet highlighted was the necessity for complete skilled growth to help educators in successfully using AI instruments and applied sciences. Coaching packages and assets needs to be supplied to assist educators leverage AI to its fullest potential and adapt to evolving academic practices.

Collaborative Strategy: Fitzpatrick emphasised the significance of collaboration between educators, policymakers, and know-how builders in shaping the way forward for AI in training. By working collectively, stakeholders can deal with challenges, share greatest practices, and foster innovation to create a extra inclusive and efficient studying setting.

In conclusion, Dan Fitzpatrick’s keynote underscored the transformative potential of AI in training whereas additionally recognizing the significance of addressing challenges and fostering collaboration. By embracing AI responsibly and proactively addressing considerations, educators can harness its energy to boost studying outcomes and put together college students for the challenges of the longer term.

Learn extra about it right here:  https://districtadministration.com/dan-fitzpatrick-the-future-of-ai-in-education/ 

Study extra about AI In training HERE



Utilizing PreviewModifier to construct a previewing atmosphere – Donny Wals


Revealed on: July 10, 2024

Xcode 16 and iOS 18 include a function that permits us to construct elaborate preview environments utilizing a brand new PreviewModifier protocol. This protocol permits us to outline objects that may create a single context or atmosphere that’s cached and used throughout your SwiftUI previews.

That is helpful as a result of it implies that you possibly can, for instance, populate a database with a bunch of mock knowledge that’s then utilized in your previews.

You can too use PreviewModifier to use particular styling to your previews, to wrap all of them in a particular wrapper, and extra.

Basically, they’re a software that permits you to configure your previews constantly throughout the board.

Adorning views utilizing PreviewModifier

The PreviewModifier protocol specifies two strategies which you can implement:

  • A static makeSharedContext technique
  • An occasion technique known as physique

The physique occasion strategies is handed the view that’s being previewed and a Context. This context can both be an object that you just created in makeSharedContext or Void should you don’t implement makeSharedContext.

For this instance, let’s assume that you just went forward and didn’t implement makeSharedContext. In a scenario like that, we will use PreviewModifier to brighten a view for our previews. For instance, we might wrap it in one other view or apply some styling to it.

I’m fairly positive that you just’re extra artistic than me so I’m simply going to go forward and present you the way you’d apply a orange background to your previewed view. Yeah, I do know… very artistic. The purpose is to indicate you the way to do that so as to do one thing a lot smarter than what I’m describing right here.

struct OrangeBackground: PreviewModifier {
    func physique(content material: Content material, context: Void) -> some View {
        content material
            .padding()
            .background {
                RoundedRectangle(cornerRadius: 16)
                    .fill(.orange)
            }
    }
}

#Preview(traits: .modifier(OrangeBackground())) {
    Textual content("Good day, world!")
}

Let’s have a look at the PreviewModifier first, after which I’ll clarify how I utilized it to my preview.

The modifier is outlined as a struct and I solely carried out the physique operate.

This operate is padded Content material which is no matter view the #Preview macro is getting used on (on this case, Textual content), and it receives a context. On this case Void as a result of I didn’t make a context.

The content material argument could be styled, modified, and wrapped nevertheless you want. It’s a view so you are able to do issues like give it a background, remodel it, alter its atmosphere, and far rather more. Something you are able to do with a view inside a View physique you are able to do right here.

The primary distinction is that you just’re receiving a totally instantiated occasion of your view. Meaning you possibly can’t inject new state or bindings into it or in any other case modify it. You’ll be able to solely apply view modifiers to it.

This brings us to our subsequent function of PreviewModifier making a context to supply mocked knowledge and extra.

Utilizing PreviewModifier to inject mock knowledge

To inject mock knowledge into your previews by means of PreviewModifier all you have to do is implement the makeSharedContext technique from the PreviewModifier protocol. This technique is static and is named as soon as for all of your previews. Which means the context that you just create on this technique is reused for your entire previews.

In follow that is good as a result of it means you get constant mock knowledge in your previews with out the overhead of recreating this knowledge incessantly.

Right here’s what a pattern implementation for makeSharedContext appears to be like like:

struct MockDataSource {
    // ...
}

struct OrangeBackground: PreviewModifier {
    static func makeSharedContext() async throws -> MockDataSource {
        return MockDataSource()
    }
}

On this case, I’m creating an occasion of some knowledge supply in my makeSharedContext technique. This MockDataSource would maintain all mocks and all knowledge for my views which is nice.

Nevertheless, the one approach for us to essentially use that mock knowledge in our view is by including our knowledge supply (or the mocked knowledge) to our previewed view’s atmosphere.

struct OrangeBackground: PreviewModifier {
    static func makeSharedContext() async throws -> MockDataSource {
        return MockDataSource()
    }

    func physique(content material: Content material, context: MockDataSource) -> some View {
        content material
            .atmosphere(.dataSource, context)
    }
}

Since we will’t make a brand new occasion of our content material, we will’t inject our mock knowledge supply instantly into the view by means of its initializer. The one approach we will get the info supply to the view is by including it to the atmosphere.

This isn’t very best for my part, however the design is sensible.

I’m additionally fairly positive that Apple designed this API with mocking SwiftData databases in thoughts and it will work nice for that.

On high of getting to make use of the atmosphere, the PreviewModifier solely works in tasks that focus on iOS 18 or later. Not an enormous drawback however it will have been good if utilizing Xcode 16 was ok for us to have the ability to use this helpful new API.