Posts

Finally, I published Ultimate AI Art Prompt Builder on Gumroad

I have been playing around with various image generation models for the last 2 years.  I used to spend lot of time to come up with a prompt which gets me the desired result  I learnt a lot about how to create effective prompts to get desired images after lots of trial and error, reading through official guides and learning from prompts that people share online. Finally automated the prompt creation by creating a tool which can easily generate prompts for all the tools that I was using myself. It's a Google Sheet. It provides dropdown menus for every parameter that matters such as art styles, camera angle, special effects etc. Pick your model, describe your image, and the prompt writes itself, structured exactly how that specific model wants it. The nine models it supports are: Midjourney, GPT Image 1.5, DALL-E 3, Stable Diffusion 3.5, FLUX.2 , Nano Banana Pro, Ideogram 3.0, Leonardo Phoenix 1.0, Seedream 5.0 It also supports following art styles: 3D Render / Pixar Style, Abstr...

LLM Workflow Patterns

Image
Let's see five key patterns in which LLM Workflows are implemented. Prompt Chaining This workflow is used when we can break down a complex task into a sequence of steps, and each step can be processed as individual LLM call using the output of the previous step. Example: Multistep reasoning tasks such as summarize text, critique and then rewrite Code generation pipeline such as generate plan, write code, test code, explain output Router This workflow is used in cases where an agent classifies the intent/task type/domain of the input query and then delegates the request to another agent, tool or workflow.  Example: Multimodal agents such as those with separate text processing and image processing LLMs Multidomain assistants such as processing questions related to legal vs finance vs medical domains Parallelization The workflow pattern is useful when a task can be broken down into subtasks which can be handled concurrently by multiple LLM or agents. The outputs of these multiple call...

Monitoring and Restarting Apache webserver Automatically using AWS CloudWatch

 When your webserver goes down, you need find out why the webserver went down and fix the issue. But even before you troubleshoot and fix the issue, you need to make sure your webserver is available to your users so they can continue using your website. There are lot of sophisticated solutions are there, such as failing over to a redundant web server, or creating new instance using AWS AutoScaling. However this solutions comes with their own cost and complexity and if you are small shop like us you may not be able to afford it. And sometimes the simplest solution is to restart the webserver, if you don't have a failover server or AutoScaling configured for your server. If your infrastructure is on AWS, you can use couple of AWS services to restart the webserver automatically without any manual intervention. You need to use AWS CloudWatch Logs, CloudWatch Metrics, CloudWatch Alarm and AWS SystemManager RunCommand. Note that if you are using some Metrics published directly by AWS ser...

Summary of Paper: RSync Algorithm

 Rsync Algorithm:  TR-CS-96-05.dvi (cmu.edu) RSync is a utility which is used to transfer files or folders from computer to another in unix based systems. The key advantage of Rsync is once the full data is transferred to destination, only the changed bytes are transferred next time onwards, saving time and network bandwidth. The above mentioned paper describes the algorithm used to find the changed bytes and how to file data is transferred from source and recreated at destination. Here is the summary. Instead of transferring complete file, divide the file into chunks of bytes and calculate its hashes. First time all the bytes are transferred to the destination and then for each chunk of bytes a weak rolling checksum (inspired by Adler-32 Checksum) and strong checksum of each block of bytes is calculated and shared with the source. At source, the combination of rolling hash and strong hash are used to find the indexes of chunks of bytes that are same as some block of bytes des...

Required courses for Software Developer

These are the courses that I have recommended to my team members. I think these courses are minimum that you should go through to become a complete software developer. Due to current corona virus crisis if somebody is looking for courses to know about programming and to become a software developer, then they can certainly look for these courses. However, this list is not complete. I will continue to add new courses which will greatly enhance the skill of a software developer. Let me know if something is missing here. Fundamentals Mathematics For Computer Science: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/index.htm Fundamentals of Computing: https://www.coursera.org/specializations/computer-fundamentals Introduction to Computer Science and Programming using Python: https://www.edx.org/course/introduction-to-computer-science-and-programming-using-python Algorithms: https://www.coursera.org/speci...

Mental Models

Decision making is one of the most difficult task one face in the life. And almost every day we have to make one or other decisions, some simple, some complex.  Many problems in world, there are few ready made templated solutions that we can apply to solve these problems. For example, In software development, we have Design Patterns , which is a "reusable solution to a commonly ocurring problem within a given context in software design"  .  Mental models are similar concepts when it comes to decision makings. Actually it is more than that. You can apply mental models not just in decision making, but every aspect in life, to understand the world, to reason about how and why certain events happen the way they happened.  Mental models are general thinking principles which can help to think in a structured manner. By stream lining out thoughts while making decisions, we are less prone to miss those information, that would help us in better decision making. Same way, ...

Continuous Integration and Delivery pipeline using Bitbucket, AWS CodeBuild, AWS CodePipline and AWS CodeDeploy - Part 3

Image
This is the third article in the series where I explain how to setup Continuous Integration and Delivery pipeline using Bitbucket, AWS CodeBuild, AWS CodePipline and AWS CodeDeploy. You can read previous two articles here and here . According to Amazon Web Services website : AWS CodePipeline is a fully managed continuous delivery service that helps you automate your release pipelines for fast and reliable application and infrastructure updates. CodePipeline automates the build, test, and deploy phases of your release process every time there is a code change, based on the release model you define. So now, let's see how we can set up AWS CodePipeline. Once you login to you AWS account, go to AWS CodePipeLine and click on "Create pipeline". Here, provide the name of the pipleline and select "New Service Role" option.  Choose all default settings under Advanced Settings and click "Next". On the next step, select source provider, from where...