One place for hosting & domains

      Run a Small Business? Here are 8 Ways to Manage Your Stress


      There are plenty of perks to owning your business — like being the boss, for one. You get to see your own plans and dreams come to life. And you can set the company track exactly as you see fit. But the downside to running a small business? All of the stress that comes with it. That’s why learning to manage stress is crucial for small biz owners.

      “Managing stress is important as a business owner because typically, we tend to be sole proprietors or have few employees,” says Amanda Pratt MSW, LCSW, CPLC, The Chronic Illness Therapist, Imagine Life Therapy. “This means that if we burn out, it can ultimately slow business progress or momentum and when we aren’t well, our businesses can’t be well. We also know that if we cope poorly with stress, we tend to have worse physical and mental health outcomes overall, so business owner or not, this is an area that I feel should be a top priority for all of us.”

      Reducing stress should always be at the top of your to-do list to keep you sane — and your company healthy, too. “That’s why it’s important not to feel guilty for stepping back or prioritizing some ‘me’ time,” says Poppy Greenwood, mental health advocate, serial entrepreneur and co-founder of female entrepreneur support platform Meyvnn.

      Luckily, there are plenty of small business stress management techniques that will help take away the tension and anxiety of your work. Give these tactics a try to manage your stress levels.

      8 Ways to Handle Small Biz Stress

      Stressed small business owner.

      1. Recognize What’s Going Well

      “This is one of the first things I will point out to clients — it’s just as important to recognize what’s going well (if not more so) as it is to recognize where things aren’t going so well,” Pratt says.

      “Strategies that work best for us tend to play off our strengths. It’s also good to take inventory of areas of coping where we tend to have more engaged or active responses to stress (versus disengaged responses) and can inform our future attempts at other areas of stress management. We all have habits that come more naturally to us that are healthy, and I believe these are the strategies we should tap into first to address when creating a stress management plan.”

      Plus, when you consider what’s going right with your business, that instantly puts you in a positive mindset, which makes it much easier to combat stress. “Taking stock of things that have gone well helps you put into perspective the change you are affecting and the growth that you have achieved,” Greenwood says. “Feeling that you’re making progress, no matter how small, is one of the best ways to relax. It helps you to recognize you’re on a journey, and that your work towards whatever goal you have is pushing you forwards.

      “It also just makes you feel more organized,” Greenwood says. “Being able to identify where things are working or are not makes you feel like you have control over what is happening, in what can feel like the chaos of running a business.”

      Focusing on the good things about your business also keeps your mind in the present. “When you’re stressed, your brain tells you that you have to stay vigilant,” says Drema Dial, Ph.D., psychologist and life coach. “Your brain goes into hyperdrive with all the things that could be going wrong, will go wrong, might have already gone wrong, and how will you fix it! This is one way our brain uses to keep us locked into familiar routines. This is precisely why it’s imperative to break this cycle, which keeps us chained to unhealthy coping behaviors and keeps your stress level high.”

      2. Identify Your Stressors

      “Identifying your stressors is vital to be able to tackle them,” Greenwood says. “Stress usually comes from a problem you haven’t yet started to solve or are having trouble solving. I think the best way to identify stressors is to take a step back. When you’re an entrepreneur, you’re constantly working and adjusting and testing to grow. Being in that kind of intense mindset all day long can really constrict a wider perspective you need to really pinpoint the areas that are causing you stress and how best to tackle them. Once you’ve identified what is causing you stress, you are much more able to work out how to deal with it. And even just identifying what is causing you stress can help alleviate some of it.”

      Remember that people respond to stress in their own unique way. “Self-awareness is key here because everyone is different,” says Mike McDonnell, international speaker, serial entrepreneur, global brand co-owner and podcaster. Once you know what stresses you out, you can delegate those tasks to others. If that’s not an option, knowing that a particular part of the job triggers anxiety can help you prepare to tackle it and just take a deep breath before going in. Over time, you can work on changing your response to the stressor.

      “We can do this through practicing mindfulness techniques to open our awareness to our body sensations, thoughts, and behaviors,” Pratt says. “We can also self-monitor through journaling or tracking mood states, symptoms and thought habits. And while it’s good to identify stressors, it’s even more important to identify our perceptions and responses to these stressors. Research shows us that it matters less what the stressor is and more how we respond to the stressor.”

      3. Build a Solid Schedule

      “Structure is important because the more we plan, the less we have to actively anticipate what might happen,” Pratt says. “Planning helps us have a greater sense of self-efficacy or confidence in our ability to handle whatever might come up.”

      When you have a regular routine, you know what to expect at work, and that gives you a sense of peace and control, making it easier to keep stress at bay. If you know in advance that you have a difficult item to cross off your to-do list, tackle it first thing in the morning to avoid that sense of dread. Plus, you’ll feel accomplished and ready to conquer whatever else comes your way.

      “Your body also likes a routine — it’s good for your circadian rhythm, which is effectively your internal body clock that can dictate things like when you feel tired or energized and can really impact your ability to focus,” Greenwood says. “For example, I know my energy and concentration dip around 3 p.m. So, in my routine around that time, I usually have a workout scheduled that gives me some time away to re-energize.”

      A common complaint from small business owners is that there are never enough hours in the day. “Usually when we delve into this issue, the problem is not a lack of time but a lack of a schedule,” Dial says. “A schedule allows a person to plan, to anticipate, and helps keep life organized. I recommend that all activities go onto a schedule, even play time!”

      4. Prioritize Your Time

      There’s a reason “self-care” has become such a buzzword — we’ve come to realize just how crucial it is to carve out time for ourselves to keep a healthy mental state. Looking after yourself is key to keeping stress under control.

      “Prioritizing ‘me time’ is really important because it is so easy to get caught up in what you’re doing, you can really forget about yourself and who you are — separate from your business,” Greenwood says. “Taking time for yourself, or using it to go out with friends and family, is often what re-affirms your belief in what you’re doing. It’s really important to not lose yourself within your business, because that, in the worst case scenario, then can lead to your business itself losing its way.”

      As a small business owner, it’s all too easy to fall into the trap of always being on the clock. Just as you schedule time for certain tasks you need to get done, you should schedule free time. “I teach clients to see their downtime as beneficial to creativity and efficiency because they tend to work better after taking a break,” Dial says. “Taking a break allows the brain to take in new information and to generate creativity.”

      5. Learn to Say ‘No’

      “When you’re starting out, you may not have the luxury of opportunities flying at you, so you say yes to everything,” McDonnell says. “But eventually you focus on your mission and ask yourself, ‘Will this help me get there?’ before deciding yes or no.”

      Of course, saying no can be really tough. But it’s important to remember your value and that you have limited time. “Instead of thinking you may offend the other person, it’s an opportunity to show them that when you decide to do something, you really value what you’re doing and you’re doing it on your terms,” Greenwood says.

      Otherwise, taking on more than you can handle is the fastest way to fall into a stress trap. “It’s important to learn that setting boundaries is necessary to safeguard small business owners’ well-being, their time, and to protect their business,” Dial says. “When approached with a request, the small business owner should ask themselves the following: ‘1. Is this something I want to do? 2. Do I have time to do it? 3. What is its importance level, and will it fit it into my schedule?’”

      Saying no is also key to setting boundaries. “When we don’t set boundaries, we end up feeling taken advantage of, burned out, stressed out, and end up as people pleasers, workaholics, isolated, or feeling misunderstood,” Pratt says. “Simply stated: Boundaries are one of the best things you can do for your physical and mental health and wellness.”

      6.Delegate or Outsource Tasks

      When you’re used to being the boss, it can be hard to let go and give up control. But as any small business owner knows, you can’t do it all. And if you’re trying to, then you’re probably not doing a good job at every single thing. That’s why learning how to delegate or outsource certain parts of the biz is a foundation for being successful.

      For example, do you struggle with Facebook but love working face-to-face with clients? Hiring a social media manager might free you up to do just that. Figure out how you want to spend your time — and what you’d rather avoid.

      In the end, outsourcing allows you to grow your company. “It’s important early on to recognize where your weaknesses are, so that you can hand over those areas to other people who do them much better,” Greenwood says. “Doing this can also relieve so much stress, not having a task hang over you that you know you need to do but that you struggle with and find time-consuming.”

      7. Choose Your Tools Wisely

      Work tools and software are meant to make your job easier — not harder. But if you’re spending more time learning how to use them than actually using them, it’s not doing you any favors. “It’s important to choose tools wisely, because they are meant to be the things that take away stress and help with tasks instead of adding to the problem,” Greenwood says.

      Opting for reliable small business appsweb management tools, and hosting services will always pay off in the end. Imagine if your business’ website went down? That’s why it’s worth using DreamHost hosting and WordPress to have one less thing to worry about.

      “Test out different software until you find the one that takes your stress away so you can benefit fully from it,” McDonnell says.

      Shared Hosting That Powers Your Purpose

      We make sure your website is fast, secure and always up so your visitors trust you.

      8. Unplug During Your Off-time

      “You’re not a robot,” Greenwood says. “You can’t work all the time and expect to maintain the same level of productivity and efficiency. You need to replenish your energy levels, and not just physically but mentally, emotionally, and spiritually. When you’re working on your business, you want to be present and in the moment. That would be difficult if you’re unable to unplug in your off time and feel a conflict between your work life and your personal life.”

      As a small business owner, you probably feel tied to your phone, but you need time away from answering emails and checking in with customers. “Unplugging and doing a digital detox allows parts of your brain to rest,” Dial says. “Reading, watching TV, going for a walk, and talking with others are all great ways to engage a different part of your brain. Make sure you take time for activities you find enjoyable. It’s essential to combat stress by seeking out experiences that will help restore you.”

      It’s especially important to power down your devices and avoid blue light, which can keep you awake, at least an hour before bedtime. Plus, you won’t have to worry about an email keeping you up that night. You’ll sleep better so you can be rested and alert for the next day of tending to your business.

      Breathe In and Out

      It’s no secret that running a small business is one of the most challenging (and stressful) things you’ll ever take on. But it’s also one of the most rewarding! So tell us: how do you manage your stress as a small-biz owner? What keeps you fired up as you “Rise and Grind?” Connect with us on Twitter and let us know your thoughts!





      Source link

      How to Run a Successful Sale on Your WooCommerce Website


      Everybody loves a sale. There’s nothing quite like browsing reduced items in the hopes of finding a great deal. You know this, and your customers know it too. The question is: how can you create an effective sale and make sure it brings both new and loyal customers to your business?

      If your store runs on WooCommerce, your job will be that much easier. This handy e-commerce plugin enables you to create a variety of different types of sales, without much hassle. However, you’ll still need to prepare and plan your sale carefully to make sure it becomes a success for both you and your customers.

      In this article, we’ll discuss the benefits of running a sale on your WooCommerce store. We’ll talk about the different types of sales you can create, as well as how you can promote and augment them. Let’s get started!  

      Why It’s Smart to Run Sales on Your WooCommerce Store

      You’re probably already familiar with WooCommerce. After all, it’s the world’s most popular e-commerce solution and is used to power nearly a quarter of all online stores. There are many reasons for this, but one is that the WooCommerce plugin makes it incredibly easy to start and run an online store, regardless of your level of experience.

      One crucial aspect of retail that WooCommerce handles particularly well is sales. Running a sale offers many benefits, not the least of which is that it helps drive more customers to your store. The fact is that customers love sales. A sale will also encourage people to buy more, and you can use it to attract both new customers and returning ones. For example, a sale can help sway users who may be hesitant to buy something at full price. Once they’ve made an initial purchase, you can follow up with more offers and information and turn them into regular customers.

      Fortunately, WooCommerce makes it easy to run a large variety of promotions. Best of all, the e-commerce platform also enables you to track your data after the sale is over, which you can use to improve future promotions. We’ll look at that option in more detail later on, but let’s not get ahead of ourselves. We still need to talk about what to do before you start your first sale.

      What You Need to Do Before You Launch Your WooCommerce Sale

      To ensure your sale goes off without a hitch and is a worthwhile experience for everyone involved, you need to plan it out thoroughly. First and foremost, you’ll want to define the length of your sale and decide when it should be launched.

      While it’s a great idea to run sales close to a big holiday or celebration, you shouldn’t restrict yourself to these times. Instead, aim to run several sales over the year, mixing up the duration of each discount. For example, you could run a flash sale that lasts for only a day or two, and later a week-long event.

      When and how long you run your sale depends largely on the type of promotion you’re planning. That’s why it’s important to consider the purpose of your sale, such as which products you’ll include. For instance, the above-mentioned flash sales are great for clearing out excess stock, while an exclusive members-only promotion will help you build brand loyalty with existing customers.

      You should also think about how you’ll promote your sale. This applies both off and on your website. It’s important to spread the word on social media and through ads but equally vital to make the sale visible on your site. Consider highlighting it on your homepage, along with what deals are included. You could even create a dedicated FAQ page with information about the deals, and an ‘On Sale’ page that features all included items.

      If you’re using WooCommerce, the plugin even enables you to augment your sales through the use of extensions and other plugins. You could add a countdown timer to appeal to your customers’ Fear Of Missing Out (FOMO), for instance, or create coupons that can be used to get special discounts.

      How to Run a Successful Sale on Your WooCommerce Website (8 Types of Promotions)

      Now that you know how to prepare for your upcoming sale, let’s talk specifics. We’re going to look at eight types of promotions you can run using WooCommerce. You should be able to find at least one option on this list that suits your store’s particular needs (and hopefully more!). Let’s start at the top.

      1. Standard Product Discounts

      A discount is the classic promotion. In short, this is when you specify a temporarily lower price for one or more products. When you do this in WooCommerce, the regular price will usually appear crossed out with the sale price next to it.

      We say usually because the exact appearance may differ depending on your chosen WooCommerce theme. However, the basic functionality remains the same. When you’re editing a product, you can use the Sale price field in the General tab to set the new price without affecting the old one.

      You can also schedule a sale to specify when you want the new price to be active. This lets you choose both start and end dates.

      With this feature, you can easily apply your discounts in advance and even promote your sale ahead of time. This works particularly well for holiday-based sales.

      If you want to apply a discount to an entire category of products, you can do so quickly using a plugin, such as Woo Product Category Discount.

      This plugin enables you to set a percentage or fixed sale price to a specific category or tag. This can save you a lot of time, especially if you have a large e-commerce store with hundreds or even thousands of products.

      2. Coupon Codes

      Coupon codes are another classic marketing tool for enticing potential customers. In case you’re unfamiliar with the concept, this is a short code that a customer can enter during the checkout process to get additional offers or discounts on their order.

      This is a straightforward and rewarding technique, which makes the benefit to the customer very clear. Most coupon codes will apply a percentage discount on a customer’s entire order or a specific item (excluding taxes and shipping) and will usually not be combinable with other offers.

      WooCommerce includes a lot of coupon management features by default. You can access them by navigating to WooCommerce > Coupons.

      When you add a new coupon, you can specify the code customers will use to apply the deal. You can also configure the discount the coupon will apply. This can be a fixed or a percentage reduction.

      Perhaps the most important settings are the usage restrictions and limits, which determine how and when the coupon will be valid.

      You should make sure to look over these options carefully; you don’t want your coupon offer to have any exploitable loopholes.

      When your coupon is ready, you can give it out to your users. How you distribute the code will depend on its purpose. A coupon code could be part of a bigger marketing campaign, or it could be intended only for specific customers. As we mentioned earlier, you need to consider your sale’s aim carefully before starting as this will let you know who the recipients of your coupon code should be.

      Your Store Deserves WooCommerce Hosting

      Sell anything, anywhere, anytime on the world’s biggest eCommerce platform.

      3. Free Shipping

      Did you know that free shipping is the single most important incentive for online customers? It’s not hard to see why. Shipping costs can inflate an order’s final price considerably, especially if the customer is located far away from where your store is based. The allure of free (or even just reduced) shipping can therefore be a powerful motivator, convincing them to complete their purchase.

      WooCommerce enables you to create a free shipping offer in a few different ways. First, you can use the coupon code method we described earlier to apply free shipping.

      Alternatively, you can also set Free Shipping as an available option for a particular shipping zone.

      Both methods give you a lot of freedom in deciding how the free shipping works and who can use it. For example, you could offer free shipping on all orders over a certain amount for a limited time, create a dedicated coupon that you distribute to particular customers, or spread the word via your social media channels. Either way, your customers will be sure to appreciate it.

      4. ‘Product of the Day’ Discounts

      As we’ve mentioned, sales are a perfect way to highlight specific products. You can even take this a step further and place the spotlight on one particular item.

      You can create this type of offer with the Products of the Day extension. This tool enables you to specify one or more products for a given day, which will be highlighted on your e-commerce site using a widget.

      By default, this is simply a way to encourage the sale of particular products. However, you can sweeten the deal by also applying a discount to each daily item. For example, you can schedule a sale price for a product (which we covered earlier), and then add it to this widget.

      Not only will this technique increase the visibility of the promoted products, but it also gives your users a reason to check your site regularly to see which products will be on sale each day.

      5. Exclusive Members-Only Sales

      A sale is not just useful for bringing in new customers. You can also use it to reward your existing users and members. Offering exclusive offers can significantly increase customer loyalty, which can, in turn, lead to improved word-of-mouth exposure.

      When it comes to WooCommerce, you have a number of options for this type of campaign. For example, you can create coupon codes that you can quickly distribute to select users, such as through an email newsletter.

      Be Awesome on the Internet

      Join our monthly newsletter for tips and tricks to build your dream website!

      To ensure that this code can’t be leaked or used by non-members, you can even specify the exact email addresses that can use the coupon.

      You can also use the WooCommerce Memberships extension, which lets you set discounts based on different membership tiers.

      This extension provides plenty of features relating to sales, such as member-exclusive offers. You can also create discounted prices, free shipping, and even ’buy one, get one free’ promotions.

      6. ‘Buy One, Get One Free’ Deals

      A ‘Buy One, Get One Free’ (BOGOF) deal is, as it sounds, an offer where the customer gets one item for free when they purchase another. This could be used in many ways. You can simply offer two of the same item for the price of one, or include a different product as an extra when a customer purchases something complimentary.

      You could also specify different quantities, such as ‘buy three, get one half price.’ All you need is the right extension, which in this case would be Dynamic Pricing.

      As the name aptly suggests, this extension enables you to set dynamic prices for your products by specifying specific criteria. You can determine the number of items that will make the BOGOF offer valid, for instance. The discount will then be applied automatically when the user adds the right items to their cart.

      As with most promotions, the key to making this one work is to ensure that your users are aware of the deal and the specific criteria required. For that reason, it’s best to feature it prominently on your home page, and on individual product pages where applicable.

      7. Discounts For Future Purchases

      We’ve already discussed the benefits of rewarding existing customers to build brand loyalty. Another smart way of doing that is by offering discounts that a customer can use on their next purchase.

      There are a few ways to do this in WooCommerce. The simplest is to create a coupon code that you distribute to your customers, which we’ve already walked you through. The Follow Ups extension makes this method even easier, as it lets you automatically email customers with a notification about the coupon code.

      You can also set up a rewards system that gives customers ‘points’ when they make a purchase. They can then use these points on later orders to get a discount that’s relative the amount they’ve earned. The Points and Rewards extension makes it easy to add such a system to your store.

      To make the deal even sweeter, you can offer double points during specific periods. This will further incentivize your repeat customers to complete more orders and can be used to increase sales during times when your store is usually quiet.

      8. Minimum Order Amount Discounts

      This last technique is a cousin to the BOGOF deal we mentioned earlier. A minimum order discount is a promotion that’s applied automatically when the total value of the customer’s cart exceeds a set amount.

      For example, you could offer a 20 percent discount on all orders above $100. If a customer’s cart total were $112, the discount would bring the order amount down to $89.60 — an attractive deal.

      We recommend that you use Discount Rules for WooCommerce to put this strategy into action. This plugin lets you specify the exact criteria that must be met before a discount is applied.

      This tool also makes it easy for you to manage the discount and lets you change or remove it any time. Plus, it includes several other helpful sales-related features, such as BOGOF and dynamic pricing.

      What to Do After Your Sale Ends

      You might think that once a sale is over, all that’s left to do is count the money you’ve earned and prepare for the next promotion. However, this is far from the ideal way of approaching your sales strategy. If you don’t take the time to analyze the results of your sales campaigns, you won’t be able to optimize future offers to get even better results.

      To do this in WooCommerce, we recommend that you purchase the Google Analytics extension. This will provide you with detailed information about your users’ behavior and purchasing habits. While there’s a lot to consider after a sale is over, these are the most important results you should pay attention to:

      • Interest and usage. How many users showed interest in your sale versus how many actually completed a purchase? This shows you whether you need to work harder next time to close the deal.
      • Time and duration. You’ll also want to consider if the timing of your sales could be improved. To do that, you can compare the latest promotion’s results against similar deals that have run at different times of the year.
      • Sale frequency. If you see a steady drop in conversions for each promotion, it might be worth your while to make sales less frequent. If users know another sale is just around the corner, they’re less likely to buy during this one.

      Take all of these factors into account, and you’ll be more informed and prepared when it’s time for the next sale!

      Promo Power

      Running a sale on your online shop can be both profitable and enjoyable. All you need is a flexible e-commerce plugin and a little preparation to make sure you launch your campaign at the right time and with the perfect offer.

      Do you have any questions about how to run an effective sale for your business using WooCommerce? Join the DreamHost community and start the conversation!



      Source link

      How to Install, Run, and Connect to Jupyter Notebook on a Remote Server


      The author selected the Apache Software Foundation to receive a $100 donation as part of the Write for DOnations program.

      Introduction

      Jupyter Notebook is an open-source, interactive web application that allows you to write and run computer code in more than 40 programming languages, including Python, R, Julia, and Scala. A product from Project Jupyter, Jupyter Notebook is useful for iterative coding as it allows you to write a small snippet of code, run it, and return the result.

      Jupyter Notebook provides the ability to create notebook documents, referred to simply as “notebooks”. Notebooks created from the Jupyter Notebook are shareable, reproducible research documents which include rich text elements, equations, code and their outputs (figures, tables, interactive plots). Notebooks can also be exported into raw code files, HTML or PDF documents, or used to create interactive slideshows or web pages.

      This article will walk you through how to install and configure the Jupyter Notebook application on an Ubuntu 18.04 web server and how to connect to it from your local computer. Additionally, we will also go over how to use Jupyter Notebook to run some example Python code.

      Prerequisites

      To complete this tutorial, you will need:

      Additionally, if your local computer is running Windows, you will need to install PuTTY on it in order to establish an SSH tunnel to your server. Follow our guide on How to Create SSH Keys with PuTTY on Windows to download and install PuTTY.

      Step 1 — Installing Jupyter Notebook

      Since notebooks are used to write, run and see the result of small snippets of code, you will first need to set up the programming language support. Jupyter Notebook uses a language-specific kernel, a computer program that runs and introspects code. Jupyter Notebook has many kernels in different languages, the default being IPython. In this tutorial, you will set up Jupyter Notebook to run Python code through the IPython kernel.

      Assuming that you followed the tutorials linked in the Prerequisites section, you should have Python 3, pip and a virtual environment installed. The examples in this guide follow the convention used in the prerequisite tutorial on installing Python 3, which names the virtual environment “my_env“, but you should feel free to rename it.

      Begin by activating the virtual environment:

      • source my_env/bin/activate

      Following this, your prompt will be prefixed with the name of your environment.

      Now that you’re in your virtual environment, go ahead and install Jupyter Notebook:

      • python3 -m pip install jupyter

      If the installation was successful, you will see an output similar to the following:

      Output

      . . . Successfully installed MarkupSafe-1.0 Send2Trash-1.5.0 backcall-0.1.0 bleach-2.1.3 decorator-4.3.0 entrypoints-0.2.3 html5lib-1.0.1 ipykernel-4.8.2 ipython-6.4.0 ipython-genutils-0.2.0 ipywidgets-7.2.1 jedi-0.12.0 jinja2-2.10 jsonschema-2.6.0 jupyter-1.0.0 jupyter-client-5.2.3 jupyter-console-5.2.0 jupyter-core-4.4.0 mistune-0.8.3 nbconvert-5.3.1 nbformat-4.4.0 notebook-5.5.0 pandocfilters-1.4.2 parso-0.2.0 pexpect-4.5.0 pickleshare-0.7.4 prompt-toolkit-1.0.15 ptyprocess-0.5.2 pygments-2.2.0 python-dateutil-2.7.3 pyzmq-17.0.0 qtconsole-4.3.1 simplegeneric-0.8.1 six-1.11.0 terminado-0.8.1 testpath-0.3.1 tornado-5.0.2

      With that, Jupyter Notebook has been installed onto your server. Next, we will go over how to run the application.

      Step 2 — Running the Jupyter Notebook

      Jupyter Notebook must be run from your VPS so that you can connect to it from your local machine using an SSH Tunnel and your favorite web browser.

      To run the Jupyter Notebook server, enter the following command:

      After running this command, you will see output similar to the following:

      Output

      [I 19:46:22.031 NotebookApp] Writing notebook server cookie secret to /home/sammy/.local/share/jupyter/runtime/notebook_cookie_secret [I 19:46:22.365 NotebookApp] Serving notebooks from local directory: /home/sammy/environments [I 19:46:22.365 NotebookApp] 0 active kernels [I 19:46:22.366 NotebookApp] The Jupyter Notebook is running at: [I 19:46:22.366 NotebookApp] http://localhost:8888/?token=Example_Jupyter_Token_3cadb8b8b7005d9a46ca4d6675 [I 19:46:22.366 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [W 19:46:22.366 NotebookApp] No web browser found: could not locate runnable browser. [C 19:46:22.367 NotebookApp] Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8888/?token=Example_Jupyter_Token_3cadb8b8b7005d9a46ca4d6675&tokenExample_Jupyter_Token_3cadb8b8b7005d9a46ca4d6675

      You might notice in the output that there is a No web browser found warning. This is to be expected, since the application is running on a server and you likely haven't installed a web browser onto it. This guide will go over how to connect to the Notebook on the server using SSH tunneling in the next section.

      For now, exit the Jupyter Notebook by pressing CTRL+C followed by y, and then pressing ENTER to confirm:

      Output

      Shutdown this notebook server (y/[n])? y [C 20:05:47.654 NotebookApp] Shutdown confirmed [I 20:05:47.654 NotebookApp] Shutting down 0 kernels

      Then log out of the server by using the exit command:

      You've just run Jupyter Notebook on your server. However, in order to access the application and start working with notebooks, you'll need to connect to the application using SSH tunneling and a web browser on your local computer.

      Step 3 — Connecting to the Jupyter Notebook Application with SSH Tunneling

      SSH tunneling is a simple and fast way to connect to the Jupyter Notebook application running on your server. Secure shell (more commonly known as SSH) is a network protocol which enables you to connect to a remote server securely over an unsecured network.

      The SSH protocol includes a port forwarding mechanism that allows you to tunnel certain applications running on a specific port number on a server to a specific port number on your local computer. We will learn how to securely "forward" the Jupyter Notebook application running on your server (on port 8888, by default) to a port on your local computer.

      The method you use for establishing an SSH tunnel will depend on your local computer's operating system. Jump to the subsection below that is most relevant for your machine.

      Note: It's possible to set up and install the Jupyter Notebook using the DigitalOcean Web Console, but connecting to the application via an SSH tunnel must be done through the terminal or with PuTTY.

      SSH Tunneling using macOS or Linux

      If your local computer is running Linux or macOS, it's possible to establish an SSH tunnel just by running a single command.

      ssh is the standard command to open an SSH connection, but when used with the -L directive, you can specify that a given port on the local host (that is, your local machine) will be forwarded to a given host and port on the remote host (in this case, your server). This means that whatever is running on the specified port on the remote server (8888, Jupyter Notebook's default port) will appear on the specified port on your local computer (8000 in the example command).

      To establish your own SSH tunnel, run the following command. Feel free to change port 8000 to one of your choosing if, for example, 8000 is in use by another process. It is recommended that you use a port greater than or equal to 8000, as those port numbers are unlikely to be used by another process. Be sure to include your own server's IP address and the name of your server's non-root user:

      • ssh -L 8000:localhost:8888 sammy@your_server_ip

      If there are no errors from this command, it will log you into your remote server. From there, activate the virtual environment:

      • source ~/environments/my_env/bin/activate

      Then run the Jupyter Notebook application:

      To connect to Jupyter Notebook, use your favorite web browser to navigate to the local port on the local host: http://localhost:8000. Now that you're connected to Jupyter Notebook, continue on to Step 4 to learn how to use it.

      SSH Tunneling using Windows and PuTTY

      PuTTY is an open-source SSH client for Windows which can be used to connect to your server. After downloading and installing PuTTY on your Windows machine (as described in the prerequisite tutorial), open the program and enter your server URL or IP address, as shown here:

      Enter server URL or IP into Putty

      Next, click + SSH at the bottom of the left pane, and then click Tunnels. In this window, enter the port that you want to use to access Jupyter on your local machine (8000 ). It is recommended to use a port greater or equal to 8000 as those port numbers are unlikely to be used by another process. If 8000 is used by another process, though, select a different, unused port number. Next, set the destination as localhost:8888, since port 8888 is the one that Jupyter Notebook is running on. Then click the Add button and the ports should appear in the Forwarded ports field:

      Configure SSH tunnel in Putty

      Finally, click the Open button. This will both connect your machine to the server via SSH and tunnel the desired ports. If no errors show up, go ahead and activate your virtual environment:

      • source ~/environments/my_env/bin/activate

      Then run Jupyter Notebook:

      Next, navigate to the local port in your favorite web browser, for example http://localhost:8000 (or whatever port number you chose), to connect to the Jupyter Notebook instance running on the server. Now that you're connected to Jupyter Notebook, continue on to Step 4 to learn how to use it.

      Step 4 — Using Jupyter Notebook

      When accessed through a web browser, Jupyter Notebook provides a Notebook Dashboard which acts as a file browser and gives you an interface for creating, editing and exploring notebooks. Think of these notebooks as documents (saved with a .ipynb file extension) which you populate with any number of individual cells. Each cell holds an interactive text editor which can be used to run code or write rendered text. Additionally, notebooks allow you to write and run equations, include other rich media, such as images or interactive plots, and they can be exported and shared in various formats (.ipyb, .pdf, .py). To illustrate some of these functions, we'll create a notebook file from the Notebook Dashboard, write a simple text board with an equation, and run some basic Python 3 code.

      By this point you should have connected to the server using an SSH tunnel and started the Jupyter Notebook application from your server. After navigating to http://localhost:8000, you will be presented with a login page:

      Jupyter Notebook login screen

      In the Password or token field at the top, enter the token shown in the output after you ran jupyter notebook from your server:

      Output

      [I 20:35:17.004 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret [I 20:35:17.314 NotebookApp] Serving notebooks from local directory: /home/sammy [I 20:35:17.314 NotebookApp] 0 active kernels [I 20:35:17.315 NotebookApp] The Jupyter Notebook is running at: [I 20:35:17.315 NotebookApp] http://localhost:8888/?token=Example_Jupyter_Token_3cadb8b8b7005d9a46ca4d6675 [I 20:35:17.315 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [W 20:35:17.315 NotebookApp] No web browser found: could not locate runnable browser. [C 20:35:17.316 NotebookApp] . . .

      Alternatively, you can copy that URL from your terminal output and paste it into your browser's address bar.

      Automatically, Jupyter notebook will show all of the files and folders stored in the directory from which it's run. Create a new notebook file by clicking New then Python 3 at the top-right of the Notebook Dashboard:

      Create a new Python3 notebook

      Within this new notebook, change the first cell to accept markdown syntax by clicking Cell > Cell Type > Markdown on the navigation bar at the top. In addition to markdown, this Cell Type also allows you to write equations in LaTeX. For example, type the following into the cell after changing it to markdown:

      # Simple Equation
      
      Let us now implement the following equation in Python:
      $$ y = x^2$$
      
      where $x = 2$
      

      To turn the markdown into rich text, press CTRL + ENTER and the following should be the result:

      Turn sample equation into rich text

      You can use the markdown cells to make notes and document your code.

      Now, let's implement a simple equation and print the result. Click Insert > Insert Cell Below to insert a cell. In this new cell, enter the following code:

      x = 2
      y = x*x
      print(y)
      

      To run the code, press CTRL + ENTER, and the following will be the result:

      Solve sample equation

      These are some relatively simple examples of what you can do with Jupyter Notebook. However, it is a very powerful application with many potential use cases. From here, you can add some Python libraries and use the notebook as you would with any other Python development environment.

      Conclusion

      You should be now able to write reproducible Python code and text using the Jupyter Notebook running on a remote server. To get a quick tour of Jupyter Notebook, click Help in the top navigation bar and select User Interface Tour as shown here:

      Finding Jupyter Notebook help tour

      If you're interested, we encourage you to learn more about Jupyter Notebook by going through the Project Jupyter documentation. Additionally, you can build on what you learned in this tutorial by learning how to code in Python 3.



      Source link