teleren/devto huggingface dataset:
Setting up Android CI/CD, the intro - Insurance for a rainy day
Tags: android, cicd, docker, softwaredevelopment
Published: 2024-01-27 23:08:56

Part one of an N part series: The motivation behind trying to build my own CI system & why now. [(Part two)](https://dev.to/dotdashnotdot/compiling-android-in-jenkins-in-docker-nearly-516)

Three and a half years have gone by since I wrote my first post here on dev.to: [Why I wrote a Password Manager and what I've learned](https://dev.to/dotdashnotdot/why-i-wrote-a-password-manager-and-what-i-ve-learned-1g7n) and a lot has changed since then. I've learned new skills, met new people and even moved to a new country! So I can even say that I have learned not only new programming languages but a new spoken one too!

Yet during all of this time and through all of these changes, one thing has remained consistent and stayed the same: my laptop. Nearly 8.5 years old now, my machine is definitely starting to feel the effects of Moore's Law however...
![My PC rated as 21%](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7f0vei2ctv81j6p2epmj.png)
But still this machine just keeps on going. It keeps processing and compiling and taking on whatever little software projects I throw at it all in stride without so much as a single complaint (Ignoring one dead & replaced SSD!)

That was until recently however when the power jack stopped working and I thought is this it, the end?.. Will I at last have to replace you and say farewell?

Well I can happily write, on the afflicted laptop, that thanks to a bit of luck & some DIY repairs, we're going to stay together for a little while longer!

That is at least until Microsoft ends support for Windows 10 in 2025... By which point I should accept that our time together is over & that my trusty machine will probably become a file server/backup machine or something else...

Which got me thinking: what am I going to do when the day eventually does come that we say farewell to one another? When I finally buy myself a shiny new machine to catch up with the latest tech?

One thing I know for certain is that I don't want to create more pain than is _absolutely_ necessary recreating my environment... Maintaining/deciphering READMEs & the toolchains they describe sucks, and these last few years I've tried to combat this in both my professional & personal work by leaning heavily into the concept of "dev-env as code" thanks to the ability to run Visual Studio code connected to a docker container/stack of containers: [example...](https://github.com/dotdashnotdotsoftware/QRGoPass-IO)

And honestly? I've found this approach very useful... I can destroy/swap between projects easily - so why not try to learn and push ourselves a little further?

I have an old Android app & an old laptop both from that original article 3.5 years ago, but today I have stronger docker & jenkins knowledge + a NAS server that can run containers...

Let's build ourselves a dockerised CI/CD system
![Bring it on](https://media2.giphy.com/media/mVJojMQvDwixG/giphy.gif?cid=ecf05e47fu4ldhrah8xxy8adcftzri6i3pzzjcpri25ng7d3&ep=v1_gifs_related&rid=giphy.gif&ct=g)

Part two coming soon...
Meet the Captain
Published: 2024-01-27 23:40:53

---
title: Meet the Captain
published: true
date: 2024-01-27 22:52:43 UTC
tags: 
canonical_url: https://ubootgame.github.io/ubootgame/blog/2024/01/27/meet-the-captain.html
---

Since I’m **no artist** , we’re starting from AI generated images, and from there try to modify them to fit the game. Today, I started on a first draft for a character: _The Captain_.

First I generated some portraits of _“seasoned navy captains, with a scar, smoking a cigar, cartoony”_. I’ll have to up my prompt engineering in the coming time.

![Portraits of the Captain](https://ubootgame.github.io/ubootgame/blog/images/portraits.png)

> This is what the Captain could look like according to AI

I threw the portrait I liked most into [aseprite](https://www.aseprite.com), a sprite editor & pixel art tool. It came up as a good tool to do the graphics in for our kind of game, and I got myself a license through [Steam](https://www.steampowered.com).

My first goal was to take the AI generated still, and make a speech animation. I grabbed the Captain’s mustache and lowerlip, added a frame where these part and painted in some basic teeth. For a draft, in a tool I never used before, it’s good enough for now.

![More mustache than man](https://ubootgame.github.io/ubootgame/blog/images/cap_talking.gif)

> More mustache than man

Next, I wanted to simulate some sort of [scanlines](https://en.wikipedia.org/wiki/Scan_line), for the videocall sequences where we’d use these portraits. I’ve probably overcomplicated things, used too many layers and animated it clumsily, but the end result I was pretty happy with. Reminds me of those old, green, monochrome monitors.

![Scanlines](https://ubootgame.github.io/ubootgame/blog/images/cap_talking_scanlines.gif)

> The Captain uses some old naval technology for video conferencing.

Finally, I tried my hand at an overlay for the portrait + scanlines, to have somewhat of a border around it, and tried some more animations, such as the blinking light and the scrolling letters. That’s far too clumsy to do neatly in aseprite as far as I can tell for now.

![Dukey pick up the phone](https://ubootgame.github.io/ubootgame/blog/images/cap_talking_border.gif)

> Here’s the Captain on the phone with you, giving orders.

Doing these in [aseprite](https://www.aseprite.com) is a lot of fun, although I should probably take some time to study the tool and read the documentation. For now, I’ve been going by experience from other graphical editors I’ve worked with throughout the years. We’ll get there!
Next.js Codebase Analysis <> create-next-app <> index.ts explained - Part 1.6
Tags: webdev, javascript, nextjs, react
Published: 2024-01-27 22:51:40

In the previous article, we looked at conf. In this article, we study more code from index.ts

As we advance to next lines of code, the following is what you will understand

```
if (typeof projectPath === 'string') {
    projectPath = projectPath.trim()
}
```

## Where is projectPath coming from?

It is a global scoped variable in index.ts. projectPath is set in action callback as shown below:

```
const program = new Commander.Command(packageJson.name)
  // https://www.npmjs.com/package/commander#version-option
  .version(packageJson.version)
  // https://www.npmjs.com/package/commander#command-arguments
  .arguments('<project-directory>')
  // https://www.npmjs.com/package/commander#usage
  .usage(`${green('<project-directory>')} [options]`)
  // https://www.npmjs.com/package/commander#action-handler
  .action((name) => {
    projectPath = name // Here
  })
```

Let’s console.log it and see what its got.

![Logged output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ic6c8ehaz0ubjg65g4mz.jpeg)

There is no logged information about projectPath. What are we doing wrong? Your next immediate action is checking the documentation for Commander package and specifically, you are looking for [action handler](https://github.com/tj/commander.js?tab=readme-ov-file#action-handler).

Here is a better example: https://github.com/tj/commander.js/blob/master/examples/thank.js

If you want to name your nextjs app as part of command npx create-next-app` you can change it to npx create-next-app my-app or you can configure the name as part of prompts. More on prompts in the upcoming articles.

## Conclusion:

We understood how the projectPath is set and found that it’s primary purpose is to set a name for nextjs project.

I am building a platform that explains best practices used in open source by elite programmers. [Join the waitlist](https://docs.google.com/forms/d/e/1FAIpQLSe2JCZAaIB5oXzNHLTrYJR4LMZ5SEwrGPgmG5DeFWdDhu8-Gw/viewform) and I will send you the link to the tutorials once they are ready.

If you have any questions, feel free to reach out to me at ramu.narasinga@gmail.com
Am I the only one who thinks Google Keep should be available for desktops/laptops to??
Tags: webdev, beginners, google, programming
Published: 2024-01-27 22:51:06

Hey amazing mens and beautiful ladies,

Your fellow got a problem 😑

As I am used to google keep and I keep using it from 2 years because its easy to use user interface and simple design I am addicted to it also I have many important notes in it but when it comes to windows it sucks there is no version of google keep for desktop!!!!!!!!!!

And now I am stuck, I tried to use Microsoft OneNote and Todo-List but I don't like them.

If somebody knows a solution then comment it down.
Math in computer science: Vectors
Tags: learning, maths, beginners
Published: 2024-01-27 22:29:28

Time for some more math. This week I would like to share something new i have learned: vectors. 

This is a very interesting topic because most people think that it is use din physics to represent forces or velocity, but this topic is also used a lot in computer science. 

## What are vectors?
Now let me first define a vector. Most of you will already know that a vector can be used to define a point in a 3d space. This is true, however in the world of computer science a vector is also represented by a list of numbers or a function. By a function i just mean a mapping a values and not a mathematical function that will perform operation on an input. 

Vectors are quite useful because of their ability to represent both magnitude and direction. This is why they are used for many things like video games, new models of AI, and even plane navigation systems.

## Operations on vectors
Now let us see what we can do with vectors:

- adding and subtracting vectors: to do this you just need to add or subtract the respective x and y values of each vector

- Scaling vectors: Simply multiply all the coordinates with the scaling factor.

- Convex combination: This is where you have two vectors and you find a vector that lies in the region enclose by the two. To do this you make a new vector of the form:
                          au + bv
where 'u' and 'v' are the two vectors we have and 'a' and 'b' are just scaling factors, however there are some restrictions:
a + b = 1
'a' and 'b' are greater than zero

- Dot product: i know it sounds scary but trust me it is not. To find the dot product of two vectors you simply multiple the corresponding coordinates for each ,e.g. multiply the x coordinates and y coordinates. Next you just add the products an that's that. 

- Finding the angle between vectors: This is a very useful one. For this one there is a formula that is below (credit to mathsathome.com):


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlhizaea83p1yln4bmms.png)



Let me explain a few points. 'a.b' means that dot product of 'a' and 'b'. Finally |a| simply means that absolute value, this means that no matter if 'a' is positive or negative |a| will always give a positive value. You can consider it to return the magnitude of the vector as the sign just represents the direction. 

## Conclusion
Vectors are very useful tools and now you now the basic functions and can start implementing them in your own projects to explore their many capabilities that make them such versatile tools in many fields such as physics. Thank you for reading.
AutoTradingPo Marketplace Trading Software mql5
Published: 2024-01-27 22:07:57

AutoTradingPo Marketplace is a revolutionary trading software with full automation capabilities. With advanced and intuitive features, this platform allows users to automate their trading strategies, optimize order execution, and efficiently manage portfolios. 

AutoTradingPo provides access to various financial markets and offers real-time data analysis to support trading decisions. With a user-friendly interface, even for beginners, AutoTradingPo Marketplace is the ideal solution for traders looking to enhance their trading performance and effectiveness. 

Explore the markets with confidence and maximize your profit potential with AutoTradingPo Marketplace.Please To My Website https://autotradingpro.biz.id/
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1wyax0iul7mao13wbptg.png)
Bringing Black and White Photo to Life with DDColor
Tags: python, googlecolab, generativeai, tutorial
Published: 2024-01-27 21:45:19

DDColor can provide vivid and natural colorization for historical black-and-white photos.


{% github piddnad/DDColor %}


In this post, I’ll introduce how to run DDColor on Google Colab free-tier, T4.

## Step 1. Clone the repo & install dependencies
First, we need to install dependencies and this step will take some time.

```shell
!git clone https://github.com/piddnad/DDColor
!cd DDColor
!pip install -r requirements.txt
!python setup.py develop
!pip install "modelscope[cv]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
```

## Step 2. Adding Colors to Image

```python
import cv2
from modelscope.outputs import OutputKeys
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from google.colab.patches import cv2_imshow

img_colorization = pipeline(Tasks.image_colorization, model='damo/cv_ddcolor_image-colorization')
result = img_colorization('https://th.bing.com/th/id/R.bfff865861dc593b14fa030a9ac2aee5?rik=Of2Q7oLKe0r0fg&riu=http%3a%2f%2fstatic.guim.co.uk%2fsys-images%2fGuardian%2fPix%2fpictures%2f2013%2f2%2f18%2f1361186749737%2fblack-and-white-picture-o-005.jpg&ehk=zoDQaeRIcKRivy%2fXZH7lZa3ixweCv47WKzD8uJGwZgw%3d&risl=&pid=ImgRaw&r=0')
cv2.imwrite('result.png', result[OutputKeys.OUTPUT_IMG])
cv2_imshow(result[OutputKeys.OUTPUT_IMG])
```


{% twitter 1751290077529903442 %}
What are your favorite underground resources for inspiration? Here 6. And what are yours?
Tags: resources, inspiration, design, webdev
Published: 2024-01-27 21:42:08

## codegrid

I personally like the codegrid channel, which shows how to make beautiful and simple sites quickly.

[![codegrid screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1svn6bmc8vhdl1b1chrg.png)](https://www.youtube.com/@codegrid)

## codrops

I hope you know codrops, which is a reference and offers lots of tips and resources.

[![codrops screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bnupxrqvn2oef7bqdjwg.png)](https://tympanus.net/codrops/)

## awwwards

Of course the well-known awwwards

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hf7f93i2gttr5v4cat9x.png)](https://www.awwwards.com/)

## landingfolio

Here you can find landing page designs, templates and components

[![landingfolio](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7mvgilf5zoxn7dauempc.png)](https://www.landingfolio.com/)

## land-book

Here a website design gallery

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zp8tplgx39joaftwhcfk.png)](https://land-book.com/)

## freefrontend

Here you can find HTML, CSS and JavaScript code examples

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bxqmwxhkftgf60cqgmi0.png)](https://freefrontend.com/)
What are your favorite underground resources for inspiration? Here 6
Tags: resources, inspiration, design, webdev
Published: 2024-01-27 21:42:07

## codegrid

I personally like the codegrid channel, which shows how to make beautiful and simple sites quickly.

[![codegrid screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1svn6bmc8vhdl1b1chrg.png)](https://www.youtube.com/@codegrid)

## codrops

I hope you know codrops, which is a reference and offers lots of tips and resources.

[![codrops screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bnupxrqvn2oef7bqdjwg.png)](https://tympanus.net/codrops/)

## awwwards

Of course the well-known awwwards

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hf7f93i2gttr5v4cat9x.png)](https://www.awwwards.com/)

## landingfolio

Here you can find landing page designs, templates and components

[![landingfolio](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7mvgilf5zoxn7dauempc.png)](https://www.landingfolio.com/)

## land-book

Here a website design gallery

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zp8tplgx39joaftwhcfk.png)](https://land-book.com/)

## freefrontend

Here you can find HTML, CSS and JavaScript code examples

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bxqmwxhkftgf60cqgmi0.png)](https://freefrontend.com/)
top 5 funny comedy store
Published: 2024-01-27 21:23:07


![Image description](https://dev-to-uploads.s3.a[](http://ttu.cc/E5U6lrCn)mazonaws.com/uploads/articles/wgebpz1ogiwqd4c2513w.jpeg)
The Comedy Store (Los Angeles): A legendary venue that has hosted countless iconic comedians.[](http://ttu.cc/E5U6lrCn)

The Comedy Cellar (New York City): Famous for its intimate setting and surprise drop-ins from top-notch comedians.[]http://ttu.cc/E5U6lrCn

The Improv (Multiple locations): With several branches across the U.S., The Improv is a staple in the comedy scene.[]http://ttu.cc/E5U6lrCn

The Laugh Factory (Multiple locations): Known for showcasing a diverse range of comedians and fostering emerging talent.[]http://ttu.cc/E5U6lrCn

The Stand (New York City): A beloved comedy club with a reputation for attracting both established and up-and-coming comics.[]http://ttu.cc/E5U6lrCn

Read more.....http://ttu.cc/E5U6lrCn
Best smart phones at lowest price 2014?
Published: 2024-01-27 20:42:26


In 2014, some budget-friendly smartphones included the Moto G (1st Gen), Nokia Lumia 520, and the Samsung Galaxy Ace 4. Keep in mind that technology has advanced since then, and newer models may now offer better features at similar prices.
Read more.[](url)http://ttu.cc/E5U6lrCn
How do I know if I need Core-js as a dependency?
Tags: javascript, frontend, webdev
Published: 2024-01-27 20:40:34

I recently dove deep into all the different npm packages we are using on one of our projects, and I started wondering how to proper test if we really need core-js as a devDependency.

I am having a hard time figuring out how to test if we need it or not - and would love to hear from you 👌


Is core-js still relevant and are there good alternatives?

🦄
npm ERR! enoent ENOENT: no such file or directory, lstat
Published: 2024-01-27 20:40:10

I was trying to install next.js using their tutorial and got this error message: "npm ERR! enoent ENOENT: no such file or directory, lstat **C:\Users\mario\AppData\Roaming\npm**

This problem can be fixed by creating an empty folder called "npm" at the directory C:\Users\mario\AppData\Roaming\
Mastering AWS DevOps Tools for Seamless Development and Deployment: Part - 1
Tags: aws, awsdevops, devops
Published: 2024-01-27 19:53:44

## Introduction

Let's examine each tool used by AWS DevOps. I'll be covering this topic in two sections. Please join me as I learn how to use AWS Devops tools.

1. AWS CodePipeline:
Your reliable release automation partner! Imagine this: after your code is ready, you must distribute it to your users. By automating every stage of the software development process, including testing, building, and deployment, CodePipeline comes to your rescue. It's like to having a personal assistant that makes sure your modifications are seamlessly and promptly implemented in production.

2. AWS CodeBuild: 
"Now, let's talk about AWS CodeBuild, the wizard tool for assembling and preparing your code for use! Let's say you've finished writing your masterpiece, but it needs to be transformed into something practical. CodeBuild jumps in to cleanly package everything for deployment, run tests, and compile your code. It's similar to having a conscientious helper who handles all the grunt work so you can concentrate on crafting jaw-dropping code.

3. AWS CodeDeploy: 
"Let's now examine AWS CodeDeploy, the deployment wizard that simplifies the release of your apps! Consider this: even when your program is ready to use and is packaged, how can you be sure that users receive it safely? CodeDeploy comes to the party! It coordinates the deployment procedure, guaranteeing a seamless update rollout with no interruption. It's similar to having an experienced conductor in charge of your deployment's orchestra."

3. AWS CodeCommit: "Now, let's discuss AWS CodeCommit, your safe haven for sharing and saving code. Consider that you require a dependable location to save your code and monitor modifications while you and your team are working on a project. As your virtual vault, CodeCommit offers safe Git repositories where you can easily store, version, and work together on your code. It's similar to having a well-defended castle where your code is secure."
জাভাস্ক্রিপ্টে NaN মানে কি?
Tags: webdev, javascript, programming, beginners
Published: 2024-01-27 19:38:27

জাভাস্ক্রিপ্টে NaN মানে "Not a Number"। এটি একটি বিশেষ মান যা তখন ফেরত দেওয়া হয় যখন একটি গাণিতিক অপারেশন অসম্ভব বা সংজ্ঞায়িত নয়। উদাহরণস্বরূপ, 0 ভাগ 0 করার ফলাফল NaN হবে।

NaN হল একটি floating-point মান, এবং এটি একটি বিশেষ মান হিসাবে চিহ্নিত করা হয় যা অন্যান্য ফ্লোটিং-পয়েন্ট মানগুলির সাথে তুলনা করা যায় না। উদাহরণস্বরূপ, নিম্নলিখিত কোডটি সত্যকে ফেরত দেবে:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eyxxlb7qxbss0cjhksgi.png)

NaN হল একটি বিশেষ মান যা বিভিন্ন উদ্দেশ্যে ব্যবহার করা যেতে পারে। উদাহরণস্বরূপ, এটি ব্যবহার করা যেতে পারে একটি ভেরিয়েবলের মানকে অজানা বা অসম্পূর্ণ হিসাবে চিহ্নিত করতে।

NaN-এর কিছু সাধারণ উদাহরণ হল:

- 0 ভাগ 0
- একটি অযৌক্তিক সংখ্যা ভাগ একটি বাস্তব সংখ্যা
- একটি অযৌক্তিক সংখ্যার বর্গমূল
- একটি শূন্য ভাগ একটি শূন্য

NaN-এর সাথে কাজ করার সময়, মনে রাখা গুরুত্বপূর্ণ যে এটি একটি বিশেষ মান যা অন্যান্য ফ্লোটিং-পয়েন্ট মানগুলির সাথে তুলনা করা যায় না।
Is that even?
Tags: computerscience
Published: 2024-01-27 19:26:25

Parity checking is one of the things you learn from elementary school or something. How complex can it be?

Lets lay out some facts to help us define what an even number is. 
# A number is even IF and ONLY IF ...
## you divide by two and there's no residue
In C-like languages, you have the modulus operator to chip away and find the residue(remainder) of a division.

`isEven(x) =  x % 2 == 0`

But people say modulus operator is kind of expensive. Keep that in the back of your mind.

This fact can also be implemented as recursive or iterative subtraction like this.
`isEven(0) = true
isEven(1) = false
isEven(x) = isEven(x - 2)`

## The last binary digit is zero
The last binary digit can be obtained by AND-masking the number with 1

`isEven(x) = x & 1 == 0`

We could extend this "last digit property" to pretty much all the bases which are greater than 1 (I'm not sure about the negative and irrational bases... lol)

For example,
For a number to be even, the last decimal digit can be 0, 2, 4, 6 or 8 .

## Halving results in an integer
Obvious. Right?

`isEven(x) = x / 2 == floor(x / 2)`

## Integer-dividing it by two and doubling results in the original number
When you halve an odd number, you'll end up with residue which would be cleaned up by the floor function. Hence doubling won't restore the original number. If it was an even number, this wouldn't have been the case.

`isEven(x) = floor(x / 2) * 2 == x`


## Adding one ONLY affects the last bit
Here's something cool. Because adding one to an even number ONLY affects the last bit since it would be zero to nicely hold in the new one. XOR could detect changes(inequalities) in data. So, the XOR of an even number and it's successor results in 1.

`isEven(x) = x ^ (x + 1) == 1`


## Gcd of it and 2 is 2
The biggest number that could factor into 2 and an even number is always 2. Using this useful fact,

`isEven(x) = gcd(x, 2) == 2`

## To sum up
I've listed half a dozen approaches to check the parity of a number.

My personal favourite is the x & 1 == 0
But if I want to do it in StYle, I'll go with x ^ (x + 1) == 1

Why did I do it? Nobody knows. C'mon it's MY blog article. I'll write whatever comes to MY mind.

:)