teleren/devto huggingface dataset:
A web app companion for using GPT - ChatCraft
Tags: opensource, ai, webapp, programming
Published: 2024-01-13 01:47:22

Have you met weird session issue or had to log in again when you using chatGPT? Have you considered to use multiple Large Language Models(LLMs) in one place? Do you wanna search some keywords from all the history? 
If you do have met these, I think [ChatCraft](https://github.com/tarasglek/chatcraft.org) is a good choice to use AI.

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


- **Features**

**ChatCraft** has multiple cool features:

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


- **Install**

I got ChatCraft setup and tried to run on my Mac according to the [CONTRIBUTING](https://github.com/tarasglek/chatcraft.org/blob/main/CONTRIBUTING.md). It is quite easy.

1. Install [pnpm](https://pnpm.io/) and Node.js

1. Install dependencies `pnpm install` 

1. Run the app `pnpm dev`

1. Choose AI provider [OpenAI](https://openai.com/) or [OpenRouter](https://openrouter.ai/) and input API key

Then I could use it in local:

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


But it also provides a "Running the App with Backend", I felt confused about it, so I decided to learn more about [CloudFlare Pages](https://developers.cloudflare.com/pages/)

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


- **Community**

This project do has a official Discord server, but the [link](https://discord.com/invite/A3gmeJY9) has expired, we will update it later.

- **Encrypt and share secrets**

Thanks to [Taras](https://github.com/tarasglek)'s generosity, I have been provided with GPT4 for using.

1. I installed [sops](https://github.com/getsops/sops) and [ssh-to-age](https://github.com/Mic92/ssh-to-age/blob/main/README.md) using Go according to the [document](https://github.com/tarasglek/chatcraft.org/blob/main/README.sops.md)

1. I generated a new SSH key using ed25519 according to [GitHub Docs](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key) and uploaded to my GitHub account and my GitHub username was already to added in [sops/admin/users.sops-protected.yaml](https://github.com/tarasglek/chatcraft.org/blob/main/sops/admin/users.sops-protected.yaml).
After [doc updated](https://github.com/tarasglek/chatcraft.org/pull/326) by Taras, I got the new branch by run `git fetch origin && get checkout taras/sops2` and finally I got my OPENAI_API_KEY.

This is my first time collaborating on an open source project, and I'm really excited because this project is really cool. At the same time, I've also realized that there are many areas where I need to learn.
Tools I use
Published: 2024-01-13 01:35:41


Wezterm (Terminal)
https://wezfurlong.org/wezterm/
https://dev.to/minyus/tired-of-copying-text-in-terminal-1anj

Xonsh (Shell)
https://xon.sh/

Git
https://git-scm.com/

gitui (CLI)
https://github.com/extrawurst/gitui

VS Code (IDE)
https://code.visualstudio.com/

GitLens (VS Code Extension)
https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens

Python

Black formatter (VS Code Extension)
https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter

Ruff (VS Code Extension)
https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff

Rich exception traceback
https://github.com/Textualize/rich
https://dev.to/minyus/an-alternative-way-to-debug-your-python-code-115b

Phind
https://www.phind.com/

Raycast
https://www.raycast.com/

Obsidian
https://obsidian.md/

Mac only: Karabiner-Elements
https://karabiner-elements.pqrs.org/

Windows only: sharpkeys
https://apps.microsoft.com/detail/XPFFCG7M673D4F?hl=en-US&gl=US
DATA ANALYSIS - Highest Rated Movie in Imdb - Data set
Published: 2024-01-13 01:25:22

I obtain a dataset from kaggle and I wanted to do a data analysis with it to figure out what was the highest rated movie of all time in Imdb. Funny enough I never realised that it would take quite some work to actually find it. It was never simple as a this is rated higher than this movie. No it needs quite a bit of filtering to get it.

Let's take a look at what I did. There were over 45,000 movies listed and there were some mixing data in some of them so we had to clean it all up.

# Test

* Test 1 - Highest rated movie of all time 

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


Result -  **The Land**

Issue - It only has 4 votes and has low confidence level since in a sample size of 14,000 it only takes about 0.0003% of the size.
    
* Test 2 - Highest rated movie of all time with atleast 7,000 votes

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


Result - **Shawshank Redemption** with 14,075 votes

Issue - It may have the highest numberof votes and a significant size but we still can not exclude the fact that it only has about 60% of the total vote count

* Test 3 - Highest rated movie of all time with atleast 10,000 votes

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


Result - **The Dark Knight** with 12,269 votes which is about 87% of the vote , we also see that **Inception** has the highest vote of all time

* Test 4 -  Highest rated movie of all time with atleast 10,000 votes and atleast 1 billion in revenue.

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


Result - **The Dark Knight** with 12,269 votes and also $1,004,558,444 in revenue


# Conculsion

In conclusion, the tests conducted to determine the highest rated movie of all time revealed several results. The initial highest-rated movie, **"The Land,"** was found to lack statistical significance due to its low number of votes and limited representation in the overall sample. Moving forward, tests with higher thresholds for the number of votes led to more robust conclusions.

**"The Shawshank Redemption"** emerged as the highest-rated movie with over 7,000 votes, but the issue of it representing only 60% of the total vote count raised concerns. A more refined criterion of at least 10,000 votes highlighted **"The Dark Knight"** as the top contender, comprising 87% of the votes and surpassing even the highest voted movie "**Inception."**

Further refinement, incorporating both high votes and substantial revenue, solidified **"The Dark Knight"** as the conclusive result, boasting 12,269 votes and an impressive $1,004,558,444 in revenue. This comprehensive approach ensures a more reliable determination of the highest rated movie, considering both audience appreciation and commercial success.
Fix dynamic agent loading warning in Gradle
Published: 2024-01-13 00:32:22

In newer versions java, dynamically loaded agents will be disallowed. Warnings like the following would be logged by your test runner.
```
WARNING: A Java agent has been loaded dynamically (/Users/cwalker/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.14.6/46e2545d7a97b6ccb195621650c5957279eb4812/byte-buddy-agent-1.14.6.jar)
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a future release
```
To fix this, we can get add a new agent configuration and map dependencies from that configuration to the `-javaagent` flag.

Using the new test-suites plugin, that would look like the following.

```kotlin
val testAgent by configurations.creating

dependencies {
    testAgent("net.bytebuddy:byte-buddy-agent:1.14.6")
}

testing {
    suites {
        val test by getting(JvmTestSuite::class) {
            useJUnitJupiter("5.10.1")
            dependencies {
                implementation("org.jetbrains.kotlin:kotlin-reflect:1.9.22")
                implementation("io.mockk:mockk:1.13.9")
            }
            targets.configureEach {
                testTask.configure {
                    jvmArgs(testAgent.files.map { "-javaagent:${it.absolutePath}" })
                }
            }
        }
    }
}
```

Follow the [upstream issue](https://github.com/gradle/gradle/issues/27714) for updates.
Which JavaScript Tricks Have Enhanced Your Coding Skills?
Tags: discuss
Published: 2024-01-13 00:00:00

---
published_at : 2024-01-13 00:00 +0000
---
How have the latest JavaScript insights boosted your coding prowess? Share your top picks!
<br>
Stay connected with DEVteam for enriching discussions and online camaraderie! 🚀 {% embed https://dev.to/devteam %}
Video from Screenshots in Git History
Published: 2024-02-27 15:16:02

---
title: Video from Screenshots in Git History
published: true
date: 2024-01-13 00:00:00 UTC
tags: 
canonical_url: https://coreyja.com/til/video-from-screenshot-history
---

<iframe id="ytplayer" type="text/html" width="640" height="360" src="https://www.youtube.com/embed/HYl7FL1PGQk" title="YouTube video player" frameborder="0" allow="picture-in-picture; web-share" allowfullscreen>
  </iframe>

Here is a quick view of this Rust powered site as its been built! It does that annoying jumping in the middle when I didn't have consistent font loading, all fixed now!

I've been using [shot-scraper](https://shot-scraper.datasette.io/en/stable/) by simonw to take screenshots of my blog and save them to my repo.

That means I have a history of what my site has been looking in prod!

So I throw together a [small Rust script](https://github.com/coreyja/coreyja.com/blob/main/scripts/create_blog_history_video.rs) calls out to `ffmpeg` that compiles all the screenshots I have saved into a short movie

I'll try to post a new one at the end of the year and we can see how it changes!
Testing Legacy with Mike Karthauser
Published: 2024-01-15 11:32:17

---
title: Testing Legacy with Mike Karthauser
published: true
date: 2024-01-13 00:00:00 UTC
tags: 
canonical_url: https://www.oliverdavies.uk/archive/2024/01/13/testing-legacy-with-mike-karthauser
---

Last week, Mike Karthauser - Senior Software Developer at Huboo - [joined me on the Beyond Blocks podcast](https://www.oliverdavies.uk/podcast/7-mike-karthauser-testing-legacy).

Mike also gave a talk recently at the PHP South West meetup on "Testing Legacy" which explained how he works with and tests legacy applications.

In the episode, we discuss e-commerce, legacy code, technical debt, automated testing, test-driven development, refactoring, code vs. no-code solutions.

If you'd like to be a guest on the Beyond Blocks podcast, [let me know](https://forms.gle/aBEtfu9tkhjJSdhd8).
How Did Feedback Propel Your Growth?
Tags: devresolutions2024, discuss
Published: 2024-01-13 00:00:00

---
published_at : 2024-01-13 00:00 +0000
---
Think about a piece of feedback you received on your work. How did it influence your growth, and what adjustments did you make as a result?
<br>
Follow the DEVteam for more discussions and online camaraderie!
{% embed https://dev.to/devteam %}
Setup Auto Revalidation for CloudFront with Every Client App Build
Tags: webdev, javascript, aws, devops
Published: 2024-01-13 00:00:00

In CloudFront, we can invalidate the cache on demand by using GitHub Actions. This is necessary to ensure that the latest code updates are reflected on our website. You can view the full code [here](https://github.com/akbarnafisa/aws-devops-fullstack/tree/9-revalidate-cloudfront).

# Update Identity and Access Management (IAM)

In our IAM, we need to add a new statement for the CloudFront Distribution.


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



```jsx
{
	"Version": "2012-10-17",
	"Statement": [
		...
		{
			"Action": [
				"cloudfront:CreateInvalidation"
			],
			"Effect": "Allow",
			"Resource": [
				"arn:aws:cloudfront::000581027806:distribution/E2KRF40UYXVA3O"
			]
		}
		...
	]
}
```

You can find the CloudFront Distribution here.


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



# Update Github Action

Let’s add the CloudFront Distribution to the GitHub Secrets with the **`AWS_CF_DISTRIBUTION`** variable name. Next, we will add new steps to perform CloudFront Invalidation in the GitHub Action.


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



Also, let’s make some changes in our code to verify if the text will be updated.


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



Next, let’s create a new branch and push it to the **`main`** branch, then wait for the workflow to finish.


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



When you observe the CloudFront, you will notice that a new invalidation has been created. Check our website to confirm the changes.


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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9k3x19lpva0590cq635b.png)
How should AI answer more humanly ?
Tags: ai, machinelearning, discuss, llm
Published: 2024-01-12 23:43:40


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

Developers generally give system prompts to the model or fine-tune it, to make the model more humanly. According to studies this issue is not getting solved, _AI has data & mind, but still don't have humanly sense_. Prompting is inefficient & fine-tuning LLMs need lot of computation & time. 
So what's the solution ? How to handle the thing, which helps AI to be more humanly, along with low computation & less time ?

That is SLM, yes you heard right. That is **Small Language Model**, fine tuning it more quick & efficient. Moreover instead of fine tuning the billions of parameter. We can just finetune the parameter neurons of the neuron architecture by PEFT- Parameter Efficient Fine-tuning.

It helps to give better results according to which we have trained it. So, if the developer wants it to be more humanly it will be.

------

If you want to read the next part which emphasizes on the SLM architecture & it's uses, so kindly follow me for more such content & please support the work.
Comment section is open to ask any type of questions, I will happy to answer them.
Thank You!!
It seems we move relative to the medium that propagates light
Published: 2024-01-21 01:41:52

---
title: It seems we move relative to the medium that propagates light
published: true
date: 2024-01-12 23:30:00 UTC
tags: 
canonical_url: https://anrodriguez.substack.com/p/it-seems-we-move-relative-to-the-medium-that-propagates-lighthtml
---

(This might sound abstract. Please bear with me. I promise it’s super easy to understand (don’t click on the links if you don’t feel ready :) - This is the intro to people that might think that talking about the nature of reality is “complicated” or “nor worth their time”; it is not complicated…, it is as easy as buying a loaf of bread).

Please bear with me.

## A big deal

I would be making a disservice if today I didn’t write about our latest experiment where [daily variations of the amplitude of the fringe shifts (were) observed when an air-glass Mach-Zehnder type interferometer is rotated](https://www.researchgate.net/publication/369529273_Daily_variations_of_the_amplitude_of_the_fringe_shifts_observed_when_an_air-glass_Mach-Zehnder_type_interferometer_is_rotated).

In my opinion, this is a big deal and please let me explain why:

![](https://siran.github.io/assets/writing/daily-variations.png)

_[Plot of the daily variations measured](https://siran.github.io/assets/writing/daily-variations.png)_

## What does this mean

Put simply, I haven’t been able to find any current-physics explanation for:

1. fringe shifts upon rotation in a fixed in-lab interferometer that slowly rotates,
2. daily, periodic variation of the amplitude of such fringe shifts

## What could it be

My current explanation is that we are measuring a Doppler frequency shift while we move relative to the medium that propagates light.

I haven’t yet made the mathematical fit to the data in [Matlab](https://matlab.mathworks.com/) (I’ve been fixing this blog so I could write), but it seems to me that a Doppler fit to the data is much more appropriate than any dragging effect.

* * *

I have a couple of explanations. So stay tuned.
Day 894 : Yes!
Tags: hiphop, code, coding, lifelongdev
Published: 2024-01-12 23:22:06

_liner notes_:
- Professional : Pretty chill day. Responded to a few community questions. I think I figured out how to allow a person to only change some of the UI text without needing to pass in the complete object with all the names and values. Good way to go into the weekend.

- Personal : Last night, I went through some tracks and put together the playlist for this week's radio show and got the social media accounts for the artists. I also think I got a good process to create artwork for my new side project. Yes! I tried some AI prompts and got some pretty cool looking images. I tried it out in the respective web apps. Now I want to write some code so I can call them from my application. Shouldn't be too bad since I already have something similar running that I've been playing with. Now I think I have the right APIs and prompts to make what I have in my mind a reality. Ended the night watching an episode of "Blue Eye Samurai".

![A walkway through a bamboo forest with the bamboo reaching high into the sky in Arashiyama, Japan](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ptdvdrx7vfvzctd7ur38.jpg)

I just need to put the tracks I put together last night onto my audio player and put them in order. Afterwards, I think I'll maybe go through some articles to talk about on the radio show. Speaking of the radio show, I'm going to stay at my spot and do the show remotely since there will be a basketball game and my co-host will be out. As far as coding, I'm going to see if I can get the AI image generation coded up. I've got the last episode of "Blue Eye Samurai" to watch later. I got something in the mail today, but I think I'll set it up and play around with it tomorrow since I won't be travelling to the station. That's it. Radio show on Saturday: https://kNOwBETTERHIPHOP.com and study sessions on Sunday: https://untilit.works

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube 3j2MHlTEyxg %}
Unveiling My True DevRel Journey: Introducing The 90-Day MVP Series
Tags: webdev, startup, programming
Published: 2024-01-12 23:01:15

Happy New Year, friends!

On the wild ride of my career in Developer Relations (DevRel), I’ve been on a quest to find my flow for the past few years. I started out in the DevOps world at Progress, backing the Chef product, I quickly learned that because I had never been a DevOps engineer before, it wasn’t the best fit. But it was my first taste of DevRel and where I fell in love with the role. Fast forward to my current gig at Auth0, thinking it would be a better fit—spoiler alert: it was, but something still felt off.

Then, in a year-end chat with my manager, the light bulb moment happened. The advice was to dig into my bag of experiences and really nail down my DevRel voice. Cue some deep soul-searching over the Christmas break, and I finally cracked the code.

Turns out, I’m blkgrlcto, and at heart, I’m a founder. My superpower? Turning ideas into products and products into cold, hard revenue. Sure, I’ve got a 9-5 gig that I adore, but I’m never without a side hustle. Software development is my weapon of choice to turn dreams into cash, but I’m not the type to dive into code just for the sake of it. My weekends aren’t for reading documentation or building random projects to stay in the loop. I’m more interested in using code to solve real problems and making some moolah while I’m at it.

So, what’s the game plan now? Well, I’m shifting my content focus to fellow tech founders like myself. I believe that’s where I can bring the most value. And to kick things off, I’m rolling out a new weekly live series called “The 90-Day MVP” on [YouTube](https://www.youtube.com/@blkgrlcto), [Twitch](https://www.twitch.tv/blkgrlcto), and LinkedIn.

Picture this: every Wednesday at noon ET, I’ll be live streaming my attempt to build a product from scratch to a Minimum Viable Product (MVP) in just 90 days. Expect live coding, progress updates, chats with other DevRel enthusiasts, and I might even opensource the codebase if the project allows.

In a nutshell, I’m excited to align my DevRel journey with my roots as a tech founder. I’m all about sharing my stories, insights, and live coding sessions to connect with a crew of like-minded folks and make a real impact in the DevRel world. Come along for the ride in “The 90 Day MVP” series, where we’ll dive into innovation, problem-solving, and a healthy dose of entrepreneurial spirit. Can’t wait to have you on board!

And hey, if you like the type of content I post, don’t be a stranger! Hit that follow on my socials [Twitter](https://twitter.com/blkgrlcto), [LinkedIn](https://www.linkedin.com/in/kiah-tolliver/) and stay in the loop with all the tech chatter and updates!

[This post](https://blkgrlcto.com/2024/01/12/unveiling-my-true-devrel-journey-introducing-the-90-day-mvp-series/) was originally posted on my [blog](http://blkgrlcto.com/)
Decoding the solution of Two Sum Challenge from LeetCode
Published: 2024-01-12 22:47:55

Recently, I tackled the "Two Sum" challenge from LeetCode. After studying the solution code, I found myself pondering an interesting question: Why do we use a key-value hash map instead of an array? Let's dig into the solution code and explore the reasoning behind this choice.


Let me start by providing the code:

```js
const twoSum = function(nums, target) {
  // 'result' will store the values encountered in the array along with their indices.
  const result = {};

  for (let i = 0; i < nums.length; i++) {
    // Find the difference between the target and the current array element.
    const complement = target - nums[i];

    // Check if the complement exists in the 'result' object.
    if (result.hasOwnProperty(complement)) {
      // If found, return the indices of the complement and the current element.
      return [result[complement], i];
    }

    // If the complement is not found, store the current array element and its index in 'result'.
    result[nums[i]] = i;
  }

  // If no valid pair is found, return an empty array.
  return [];
};

```

As I delved into the solution, I questioned the choice of using a key-value hash map instead of an array. It turns out that this approach significantly improves the algorithm's complexity. By utilizing the key as the array element and the value as its index, we achieve an O(n) complexity. This means we no longer need to iterate over the array to find the complement; we can quickly check its existence using the "hasOwnProperty()" method.

In conclusion, opting for a key-value hash map over an array in the "Two Sum" problem significantly enhances algorithm efficiency. By understanding the nuances of data structures and their applications, we can create more streamlined and effective solutions.


**Console You Later!**