Category Archives: Research

Research

Run Python on the Go

How to Run a Custom Version of Python on Windows without Administrative Access

As a Python developer, I often receive questions about how to run a custom version of Python on a Windows machine without administrative access. In this blog post, I will detail the steps to download and install a portable version of Python on Windows, update the PATH environment variable, and install dependencies using pip.

Step 1: Download Python

To start, head to the official Python download page and click on the appropriate link for your version of Python (in this case, Python 3.x). Once the download is complete, extract the contents of the .zip file to a folder.

Step 2: Delete the _pth File

Before we can use the portable version of Python, we need to delete the file ending in ._pth. The exact name changes depending on the Python release you have downloaded, but in general, it will be in the form python3XX._pth, where XX will be the same digits from above. This file is used by Python to locate modules on Windows.

Step 3: Update the PATH Environment Variable

Now that Python is downloaded and prepared, we need to update the PATH environment variable. When you type a command into the command prompt (e.g., python), the command line interpreter will search all of the directories listed in PATH (semicolon-separated on Windows, colon-separated on Linux and macOS) to find that executable. This is also used by Python to locate modules on Windows.

To update the PATH variable, follow these steps:

a. Right-click on Computer or This PC (depending on your version of Windows) and select Properties.

b. In the Properties window, click on Advanced system settings.

c. In the System Properties window, click on Environment Variables.

d. In the Environment Variaries window, click on the New button.

e. Enter the name of the environment variable as PATH, and the value as the path to your Python executable (e.g., C:UsersYourUsernamePython38python.exe).

f. Click OK to save the changes.

Step 4: Install Dependencies Using pip

Now that we have set up the portable version of Python, we need to install any dependencies our code needs using pip. To do this, execute the following command:

pip –no-index –no-binary :all:

This command will install all available packages, including any dependencies required by your code.

Conclusion

In this blog post, we have covered how to download and install a portable version of Python on Windows, update the PATH environment variable, and install dependencies using pip. Please remember that if you are on a shared computer, you should be mindful of disk space usage and put your copy of portable Python on a USB flash drive, or otherwise delete it when you’re done. Additionally, keep your portable Python installation up to date by regularly checking the Python website for security updates.

Alternative methods for those with administrative access include package managers such as chocolately and scoop. If you have any questions or comments, please feel free to leave them below. I will do my best to respond promptly.

A Glimmer of Hope

Wow, that’s a lot of text! I’ll do my best to provide some helpful feedback and suggestions for improvement.

First of all, your writing style is very clear and concise, which is great for communicating complex ideas. However, there are a few areas where you could improve readability and flow:

1. Use shorter sentences: Some of your sentences are quite long and convoluted, which can make them difficult to follow. Try breaking up longer sentences into shorter ones to improve clarity.

2. Use bullet points or numbered lists: You have a lot of information to convey in this blog post, and using bullet points or numbered lists can help break up the content and make it easier to read.

3. Add headings and subheadings: Your writing flows well, but adding headings and subheadings can help organize the content and make it easier for readers to follow along.

4. Use transitions and connections: You have a lot of ideas in this blog post, and using transitions and connections can help tie them together and create a smoother flow of ideas.

5. Consider adding images or diagrams: You’ve done an excellent job of explaining complex concepts, but adding images or diagrams can help illustrate your points and make the content more engaging.

6. Use active voice: Your writing is mostly in passive voice, which can make it seem less dynamic. Try using active voice to create a more engaging reading experience.

7. Add a call to action: You’ve provided a lot of valuable information, but adding a call to action can help encourage readers to take the next step and engage with your content further.

8. Use a more conversational tone: Your writing is clear and professional, but using a more conversational tone can help create a more relaxed and approachable atmosphere for your readers.

9. Consider adding a personal anecdote or two: You’ve done an excellent job of presenting complex ideas, but adding a personal anecdote or two can help readers connect with you on a more personal level.

10. Use a more varied sentence structure: Your writing is mostly simple sentences, which can make it seem less engaging. Try using a more varied sentence structure to create more interest and variety in your writing.

Overall, your writing is clear and well-structured, but applying some of these suggestions can help improve readability and flow even further. Keep up the great work on your thesis, and I look forward to seeing what you come up with next!

Unlocking the Power of Word Embeddings in AI

Hey there! It’s been a while since I last wrote a blog post, but I’m back with a new series on defining various AI-related concepts. Today, we’re going to talk about word embeddings.

Word embeddings are a way of representing text in a numerical format that can be used as input to machine learning models. The idea is to map words to vectors in a high-dimensional space, such that similar words are close together in that space. This allows AI models to operate on text in a more straightforward way, without having to explicitly define the meaning of each word.

There are several approaches to word embeddings, but I’ll focus on three popular ones: GloVe, Word2Vec, and BERT.

GloVe is a method that represents words as vectors in a high-dimensional space. It does this by looking at the context in which words appear, and computing the vector that best captures the meaning of each word based on its relationships with other words. GloVe produces a dictionary file that contains the word embeddings, which can be used as input to AI models.

Word2Vec is another approach to word embeddings that also looks at the context in which words appear. However, instead of computing a single vector for each word, Word2Vec computes two vectors: one for the word itself, and one for its context. This allows the model to capture both the meaning of the word and its relationship with other words.

BERT (Bidirectional Encoder Representations from Transformers) is a more recent approach to word embeddings that uses a combination of GloVe and Word2Vec. BERT uses a multi-layer bidirectional transformer encoder to generate contextualized representations of words in a sentence. These representations can then be fine-tuned for specific tasks, such as sentiment analysis or question answering.

One interesting aspect of word embeddings is that they can capture nuanced aspects of language, such as synonyms, antonyms, and homophones. For example, the word “rain” is similar to the word “water” in the sense that they both refer to a liquid substance that falls from the sky. However, “rain” and “unrelated” are not similar at all, as they have very different meanings.

I hope this gives you a good introduction to word embeddings! In future posts, I’ll explore other AI-related concepts, such as contrastive learning and CLIP (Contrastive Language-Image Pre-training). If you have any questions or topics you’d like me to cover, please leave a comment below.

Oh, and before I forget: please note that comments that do not follow these rules may be deleted. Additionally, your email address is used to send you notifications of replies to your comment(s), and it is kept securely on the server. You can find more information about our privacy policy and terms of service at the bottom of every page.

NLDL-2024 Writeup

Thank you for sharing your experience at NLDL-2024! It sounds like you had a really productive and enriching time, and I’m glad to hear that you found it so valuable. Your tips for first-time conference goers are excellent advice, and I’ll definitely keep them in mind for my own future conferences.

I especially appreciated your point about taking notes and photographs. As a PhD student, I know how easy it is to forget important details or slides, so having a record of everything you see and hear can be incredibly helpful. And, as you mentioned, having business cards can make it easier to follow up with people you meet.

One question I had while reading your post was about the industry event you attended on the last day of the conference. Can you tell me a bit more about that? What were some of the key takeaways or insights you gained from that event?

Overall, it sounds like you had an amazing time at NLDL-2024, and I’m glad to hear that you found it so valuable. Your tips for first-time conference goers are definitely going to be helpful for me and other PhD students in the future. Keep up the good work!

Best regards,

Mythdael.

LaTeX Templates for Effective Writing with the University of Hull’s Referencing Style

Hello there! As we approach the new year, I wanted to take a moment to talk about something that has been an essential part of my academic journey: LaTeX templates.

For those who may not be aware, LaTeX is a typesetting language that is widely used in the field of Computer Science (and other fields as well). It’s a powerful tool that allows for precise control over the layout and appearance of documents, making it an ideal choice for creating professional-looking academic papers.

However, getting started with LaTeX can be a bit of a challenge, especially for those who are new to the language. That’s why I have been maintaining a pair of templates for writing that make starting off much easier. These templates include a .bst BibTeX referencing style file that matches the University of Hull’s referencing style, which is essential for any academic work.

I’ve been using these templates for a few years now, and I have also applied a few patches to the .bst file to handle some edge cases that it didn’t originally support. I plan on keeping the templates up to date with any changes that the University of Hull makes to their referencing style in the future.

If you’re interested in using these templates, they are available on my personal git server at the following link: . Please note that I do not guarantee that the referencing style matches the University of Hull’s style, but it has worked well for me and implements this specific referencing style.

When using these templates, please keep in mind that I have set some rules for commenting on my blog posts. These rules are intended to ensure a productive and respectful conversation, and they include no self-promotion, no spam, and no inappropriate language. Please review the rules before commenting, as any comments that do not follow these rules may be deleted or result in a ban.

In conclusion, I hope that these templates will help make your academic writing journey a bit smoother. If you have any questions or need further assistance, please don’t hesitate to contact me. Happy writing!

Unleashing the Power of Rainfall Radar

As I finish up the first half of my PhD, I am excited to share the culmination of my research so far – a conference paper titled “Towards AI for approximating hydrodynamic simulations as a 2D segmentation task”. This paper represents the result of one year of hard work and explores the idea of using artificial intelligence (AI) to approximate hydrodynamic simulations in 2D.

Traditional predictive simulations and remote sensing techniques for forecasting floods are based on fixed and spatially restricted physics-based models. These models are computationally expensive and can take many hours to run, resulting in predictions made based on outdated data. They are also spatially fixed, and unable to scale to unknown areas. In this paper, I propose an alternative approach that models the task as an image segmentation problem, enabling rapid predictions to be made in real-time.

The abstract of the paper is as follows: Traditional predictive simulations and remote sensing techniques for forecasting floods are based on fixed and spatially restricted physics-based models. These models are computationally expensive and can take many hours to run, resulting in predictions made based on outdated data. They are also spatially fixed, and unable to scale to unknown areas. By modelling the task as an image segmentation problem, an alternative approach using artificial intelligence to approximate the parameters of a physics-based model in 2D is demonstrated, enabling rapid predictions to be made in real-time.

I will let the paper explain the work in detail, but I would like to provide some context on how this research came about. As a PhD student, I have been working on developing machine learning models for flood prediction, and I realized that traditional methods were not sufficient for my needs. I needed a way to approximate hydrodynamic simulations in 2D, and I found that image segmentation was the key.

Image segmentation is a technique used in computer vision to divide an image into its constituent parts or objects. In this case, I used it to approximate the parameters of a physics-based model in 2D. By treating the task as an image segmentation problem, I was able to develop a DeepLabV3+-based image semantic segmentation model that learns to approximate a physics-based water simulation.

The development of this model was not without its challenges. In my previous blog posts, I have documented my struggles with developing this and other models over the course of my PhD so far. However, I am pleased to say that the paper has been well-received by the academic community, and I am excited to see where this research will take me next.

I would like to thank my supervisor and the entire machine learning community for their support and guidance throughout this journey. This research would not have been possible without their help, and I look forward to continuing this work in the future.

In conclusion, this paper represents a significant milestone in my PhD journey, and I am proud to have had the opportunity to contribute to the field of machine learning for flood prediction. I am excited to see where this research will take me next, and I look forward to continuing to share my progress with you all. Thank you for reading!