Author: user

  • Running you own LLM using Ollama

    Highlevel

    Olama hosts LLM models and allows you to interact with them all locally

    openwebui is a nice gui front end for Ollama and models

    Sites

    Download Ollama on Linux

    library

    Open WebUI

    Videos

    Run Through

    Ran from an Aws Vm, the basic Micro doesn’t have enough /tmp space and you have to fudge around with things.

    The quickest solution is uping the instance type to something with more power a t2.xlarge seems to work well

    Bundled install

    curl -fsSL https://ollama.com/install.sh | sh
    yum install pip -y 
    pip install ollama
    ollama run llama3.1

    Install Ollama – Shell

    curl -fsSL https://ollama.com/install.sh | sh

    by following instructions on Download Ollama on Linux

    Install Ollama – Pip

    yum install pip pip install ollama

    Install a LLM Model

    ollama run llama3.1

    find model in library and copy command

    To check what LLM models you have and other stuff on Ollama

    $ ollama list
    NAME            ID              SIZE    MODIFIED
    llama3.1:latest 42182419e950    4.7 GB  38 minutes ago
    gemma2:2b       8ccf136fdd52    1.6 GB  2 hours ago
    $ ollama
    Usage:
      ollama [flags]
      ollama [command]
    Available Commands:
      serve       Start ollama
      create      Create a model from a Modelfile
      show        Show information for a model
      run         Run a model
      pull        Pull a model from a registry
      push        Push a model to a registry
      list        List models
      ps          List running models
      cp          Copy a model
      rm          Remove a model
      help        Help about any command
    Flags:
      -h, --help      help for ollama
      -v, --version   Show version information
    Use "ollama [command] --help" for more information about a command.

    Passing Input files – Bash

    $ cat /home/ollama_files/helloworld_testfile       i have 5 oranges and 2 apples
    if i eat 4 oranges and 1 apple
    how much is left?
    $ cat /home/ollama_files/helloworld_testfile | ollama run gemma2:2b  "prompt"
    Here's how to figure out the remaining fruit:
    Oranges Left: You started with 5 oranges, and you ate 4, so you have
    5 - 4 = 1 orange left.
    Apples Left:  You started with 2 apples, and you ate 1, leaving you
    with 2 - 1 = 1 apple.
    Answer: You have 1 orange and 1 apple left. 🍊🍎

    Passing Input files – Python

    # cat ./llm_test.py
    #!/usr/bin/python3.9
    import ollama
    notes = "helloworld_testfile"
    with open(notes,'r') as file:
        content= file.read()
    my_prompt = f"give me the answer {content}"
    response = ollama.generate(model="gemma2:2b", prompt=my_prompt)
    actual_response = response["response"]
    print(actual_response)
    #  ./llm_test.py
    Here's how to solve that:
    Oranges: You started with 5, and you ate 4, so you have 5 - 4 = 1 orange left.
    Apples: You started with 2, and you ate 1, so you have 2 - 1 = 1 apple left.
    Answer: You have 1 orange and 1 apple left.

    Quick Chat

    $ ollama run gemma2:2b
    >>> tell me a joke
    Why don't scientists trust atoms?
    Because they make up everything! 😄
    Let me know if you want to hear another one! 😊
    >>> Send a message (/? for help)
  • Dr Chris Van Tulleken: Why We Crave Junk Food and How to Stop

    Blog Based on

    I am not sure if i can do this justice a full watch of this Video is recommended

    and the book

    https://www.amazon.co.uk/Ultra-Processed-People-Stuff-That-Isnt-ebook

    Introduction

    In our modern world, where convenience often takes precedence over health, many of us find ourselves succumbing to the allure of junk food. Dr. Chris Van Tulleken, a renowned medical doctor and television presenter, has extensively studied the reasons behind our cravings for unhealthy foods and offers practical solutions to curb this tendency. Understanding the science behind our cravings and implementing effective strategies can help us make healthier choices and improve our overall well-being.

    The Science Behind Our Cravings

    Dr. Van Tulleken explains that our cravings for junk food are rooted in our biology and the food industry’s manipulation of our natural instincts. Here are some key factors contributing to our cravings:

    1. Evolutionary Biology: Our ancestors relied on high-calorie foods for survival. In the past, when food was scarce, consuming energy-dense foods like fats and sugars was crucial for survival. Today, these instincts persist, driving us towards calorie-rich junk food.
    2. Food Engineering: The food industry employs sophisticated techniques to make junk food irresistible. These foods are engineered to hit the “bliss point,” a perfect combination of salt, sugar, and fat that triggers pleasure centers in our brains, making us crave more.
    3. Addictive Properties: Junk food can be as addictive as drugs. The combination of sugar and fat can lead to a release of dopamine, the brain’s pleasure chemical, creating a cycle of craving and consumption similar to addictive substances.
    4. Psychological Triggers: Stress, boredom, and emotional distress can trigger cravings for comfort foods. Junk food often provides a temporary sense of relief, reinforcing the habit of turning to unhealthy snacks in times of need.

    Strategies to Curb Cravings

    Understanding the reasons behind our cravings is only half the battle. Dr. Van Tulleken offers practical strategies to help us break free from the grip of junk food:

    1. Mindful Eating: Practicing mindfulness can help us become more aware of our eating habits and cravings. By paying attention to what we eat and how it makes us feel, we can make more conscious food choices.
    2. Healthy Substitutes: Replacing junk food with healthier alternatives can satisfy our cravings without the negative health impacts. Fresh fruits, nuts, and whole grains can provide the same pleasure without the guilt.
    3. Plan and Prepare: Planning meals and snacks ahead of time can help us avoid impulsive junk food consumption. Keeping healthy snacks readily available can reduce the temptation to reach for unhealthy options.
    4. Understand Labels: Becoming familiar with food labels and ingredients can help us make informed choices. Avoiding products with added sugars, artificial flavors, and unhealthy fats can significantly improve our diet.
    5. Hydration: Sometimes, our body confuses thirst with hunger. Staying well-hydrated can reduce unnecessary cravings and promote overall health.
    6. Sleep and Exercise: Adequate sleep and regular physical activity can regulate hormones that control hunger and cravings. A well-rested and active body is less likely to crave junk food.
    7. Seek Support: Making dietary changes can be challenging. Seeking support from friends, family, or a professional can provide the motivation and accountability needed to stay on track.

    The Journey to Healthier Habits

    Transitioning away from junk food is a journey that requires patience and persistence. Dr. Van Tulleken emphasizes the importance of understanding our cravings, making gradual changes, and celebrating small victories along the way. By implementing these strategies, we can take control of our eating habits and move towards a healthier, more balanced lifestyle.

    Ultimately, breaking free from the grip of junk food is not just about willpower; it’s about understanding the science behind our cravings and making informed, mindful choices. With the guidance of experts like Dr. Chris Van Tulleken, we can empower ourselves to overcome these challenges and lead healthier, happier lives.

    https://www.nhs.uk/live-well/eat-well/how-to-eat-a-balanced-diet/what-are-processed-foods/

    https://www.healthline.com/nutrition/how-to-eat-less-processed-food

    https://www.bbcgoodfood.com/howto/guide/ultra-processed-foods-what-to-avoid

  • The 15-Minute Reset: Transform Your Space with a Quick Tidy-Up

    In our busy lives, finding time to maintain a tidy home can feel overwhelming. However, you don’t need hours to make a significant difference in your living space. Introducing the 15-Minute Reset—a quick and effective method to tidy up a room and create a more organized, stress-free environment.

    Why a 15-Minute Reset?

    The beauty of the 15-Minute Reset lies in its simplicity and manageability. Setting aside just 15 minutes to focus on one room can lead to noticeable improvements without feeling like a daunting task. This method capitalizes on the idea that small, consistent efforts can lead to big results over time.

    How to Execute the 15-Minute Reset

    1. Set a Timer: Begin by setting a timer for 15 minutes. This creates a sense of urgency and helps you stay focused, ensuring that you make the most of this short period.
    2. Choose Your Room: Decide which room needs your attention the most. It could be your living room, kitchen, bedroom, or even your home office. Starting with the most cluttered or frequently used room can often provide the most immediate sense of accomplishment.
    3. Gather Your Supplies: Before you start, grab a few essential cleaning supplies: a trash bag for any garbage, a laundry basket for items that belong in other rooms, and a box or basket for items that need to be organized within the room.
    4. Start with Surfaces: Clear off any surfaces first—tables, countertops, desks. Put away items that have designated spots, toss out any trash, and gather items that belong elsewhere in the house.
    5. Tidy Up the Floors: Once the surfaces are clear, move on to the floors. Pick up any stray items and put them in their proper places. If you find things that belong in other rooms, place them in the laundry basket to be dealt with later.
    6. Quick Dust and Wipe: Use a dust cloth to quickly dust surfaces and a damp cloth to wipe down any sticky or dirty areas. This step helps to freshen up the room and gives it a cleaner appearance.
    7. Organize and Straighten: Take a few minutes to organize any cluttered areas. Straighten books, stack magazines, and ensure that items are neatly arranged. If you have time, do a quick sweep or vacuum to finish off.
    8. Final Touches: Once the timer goes off, take a step back and admire your work. You’ll be surprised at how much you can accomplish in just 15 minutes. If you have extra time, you can do a quick sweep or vacuum to finish off.

    The Benefits of the 15-Minute Reset

    • Reduced Stress: A tidy room can significantly reduce stress and create a more peaceful environment. Knowing that you have a clean and organized space can help you relax and feel more in control.
    • Increased Productivity: A clutter-free area can boost your productivity, making it easier to focus on tasks without being distracted by mess and disorganization.
    • Maintenance Made Easy: By incorporating a 15-Minute Reset into your daily routine, you can keep your home consistently tidy without the need for extensive cleaning sessions.
    • Boosted Mood: There’s a sense of accomplishment and satisfaction that comes from completing a small, manageable task. Tidying up can lift your mood and give you a positive start or end to your day.

    Conclusion

    The 15-Minute Reset is a powerful tool for maintaining a clean and organized home, even with a busy schedule. By dedicating just a small portion of your day to tidying up, you can create a more inviting and stress-free environment. Try incorporating this simple practice into your daily routine and experience the benefits of a tidy space without the overwhelm.

  • Perception: Adjusting Our Lens on Reality

    Perception is a complex, multifaceted phenomenon. It shapes our understanding of the world, influencing how we interact with our environment and the people within it. Imagine perception as a camera lens, adjustable and capable of capturing different views depending on the angle and focus. In this blog post, we will explore the analogy of perception as an adjustable lens, delve into the concept of 3D goggles, and consider the experience of color blindness to illustrate how our perception can be limited and enriched.

    The Lens Analogy: Adjusting Our View

    Perception can be likened to an adjustable camera lens. When we look at a scene through a camera, changing the lens or the settings can drastically alter the image we capture. Similarly, our perception of reality can be adjusted by shifting our perspective, trying new experiences, and challenging our assumptions.

    Imagine standing at a scenic overlook. One person might focus on the majestic mountains in the distance, while another might notice the intricate details of the wildflowers at their feet. Both are valid perspectives, shaped by individual interests and experiences. By consciously adjusting our lens, we can appreciate different aspects of the same scene, gaining a richer, more nuanced understanding of the world around us.

    3D Goggles: Adding Depth to Our Perception

    3D goggles enhance our perception by adding depth to a previously flat image. When we put on 3D goggles at a movie theater, what was once a two-dimensional picture suddenly becomes a vivid, immersive experience. This transformation mirrors how expanding our perception can add depth and richness to our lives.

    Consider how traveling to a new country can change our perception of cultural norms. Experiencing different traditions, cuisines, and ways of life can broaden our understanding, making us more empathetic and open-minded. Similarly, learning a new skill or hobby can provide a fresh perspective, allowing us to see the world through a different lens.

    By embracing new experiences and viewpoints, we can enhance our perception, much like putting on a pair of 3D goggles.

    Color Blindness: Understanding Perceptual Limitations

    Color blindness is a condition where individuals perceive colors differently due to the absence or malfunction of certain color-detecting cells in their eyes. This condition highlights the fact that our perception is not always an accurate representation of reality but is instead shaped by our biological limitations.

    For someone with color blindness, the vibrant hues of a sunset might appear muted or indistinguishable. This doesn’t make their perception less valid, but it does differ from the norm. Understanding color blindness can teach us valuable lessons about the diversity of human perception.

    Just as we use corrective lenses to improve our vision, we can employ strategies to overcome our perceptual limitations. Educating ourselves about different viewpoints, practicing mindfulness to stay present, and actively seeking out new experiences can help us see beyond our innate biases and expand our understanding of the world.

    Conclusion: Embracing Perceptual Flexibility

    Our perception is a powerful tool that shapes our reality. By adjusting our lens, donning metaphorical 3D goggles, and recognizing the limitations of our perception, we can enrich our understanding and interactions with the world.

    Cultivating an open and flexible perception allows us to appreciate the beauty of diversity and complexity in life. It enables us to navigate our personal and professional lives with greater empathy, creativity, and mindfulness. So, let’s embrace the adjustable nature of our perception, continually striving to see the world through different lenses and enriching our lives in the process.