Algorithms For Dummies. John Paul Mueller

Чтение книги онлайн.

Читать онлайн книгу Algorithms For Dummies - John Paul Mueller страница 22

Algorithms For Dummies - John Paul Mueller

Скачать книгу

specifically oriented to working with code.) In fact, some features won't work at all. Colab enables you to fully interact with your Notebook files using GitHub as a repository, and Colab supports a number of other online storage options as well, so you can regard Colab as your online partner in creating Python code.

      The other reason that you really need to know about Colab is that you can use it with your alternative device. During the writing process, some of the example code was tested on an Android-based tablet (an ASUS ZenPad 3S 10). The target tablet has Chrome installed and executes the code well enough to follow the examples. All this said, you likely won’t want to try to write code using a tablet of that size — the text was incredibly small, for one thing, and the lack of a keyboard could be a problem, too. The point is that you don’t absolutely have to have a Windows, Linux, or OS X system to try the code, but the alternatives might not provide quite the performance you expect.

      

Google Colab generally doesn’t work with browsers other than Chrome (the browser used in this chapter), Firefox, or Safari (initial tests with Microsoft Edge have also been encouraging). In most cases, you see an error message, such as This site may not work in your browser. Please use a supported browser, and no other display if you try to start Colab in a browser that it doesn’t support. The included More Info link takes you to https://research.google.com/colaboratory/faq.html#browsers, where you can learn more information.

      SOME FIREFOX ODDITIES

      Even with online help, you may still find that your copy of Firefox displays a SecurityError: The operation is insecure. error message. The initial error dialog box points to some unrelated issue, such as cookies, but you see this error message when you click Details. Simply dismissing the dialog box by clicking OK makes Colab appear to be working because it displays your code, but you won't see results from running the code.

      Getting familiar with Google Colab features

      Google Colab provides access to a number of features through the menu system. One of these features, hardware acceleration, appears in the “Using Hardware Acceleration” section, later in this chapter. The features in this section all appear on the Tools menu.

      Locating commands

Snapshot shows Using Colab commands makes configuring your Notebook easy.

      FIGURE 3-1: Using Colab commands makes configuring your Notebook easy.

      Configuring settings

       Site: Configures how the site works. The most interesting setting is the theme. Selecting Adaptive lets Colab choose the interface colors based on lighting conditions. You can also configure display and access settings on this tab.

       Editor: Determines how text appears onscreen and how the interface works. For example, you can set the key bindings to work like those in Vim (a text editor included on Unix and Linux systems, generally as the vi utility; see https://www.vim.org/) if desired. You can also select font size, spaces for each level of indentation, and a plethora of other settings.

       Colab Pro: Provides an advertisement for Colab Pro (https://colab.research.google.com/signup), which gives you some significant benefits like faster GPUs, longer runtimes, and more memory — all of which let you get more work done in a shorter time.

       Miscellaneous: Contains fun settings. You can choose from three visual effects: adding thunder and lightning using the Power Level setting; letting a Corgi run across the top of the display; and allowing a kitten to run across the top of the display. You can choose any mix of these visual effects.

Snapshot shows the Settings dialog box helps you configure the Colab IDE.

      FIGURE 3-2: The Settings dialog box helps you configure the Colab IDE.

      Customizing keyboard shortcuts

       To add or change a shortcut, place the cursor in the box next to the command and press the shortcut key you want to use for that command.

       To remove a shortcut, press Delete.

Snapshot shows Customize shortcut keys for speed of access to commands.

      Comparing files

Snapshot shows Colab lets you compare two files to see how they differ.

Скачать книгу