teleren/devto huggingface dataset:
[Game of Purpose] Day 23
Tags: gamedev
Published: 2024-06-10 22:45:18

Today I created my first Blueprint Function and Macro. It sets movement mode based on provided enum `Drone State`.


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

I also made drone fly up and down by pressing Space or Left Ctrl.
At the end I turining Drone's engine on and off. When it's off (by pressing 2) it completely stops (for now). When it's on (by pressing 1) it can fly.

{% embed https://youtu.be/0wpDQcguCL4 %}
Machine Learning Expert Specializing in Customized Jewelry Solutions
Published: 2024-06-10 22:43:00

Hi, I’m Bay Ray, a passionate Machine Learning expert dedicated to revolutionizing the world of customized jewelry, especially diamond pieces. With a robust background in artificial intelligence and data science, I focus on creating products that personalize and enhance the jewelry shopping experience.

My expertise lies in developing cutting-edge machine learning models that analyze customer preferences and design bespoke jewelry pieces tailored to individual tastes. By [leveraging AI](https://openai.com/blog/chatgpt/), I transform raw data into actionable insights, allowing for a seamless and personalized shopping experience. My innovative approach not only enhances customer satisfaction but also drives efficiency and creativity in the jewelry industry.

Throughout my career, I’ve had the privilege of collaborating with leading jewelry brands and tech companies, spearheading projects that bridge the gap between tradition and technology. My work has resulted in sophisticated recommendation systems, virtual try-on applications, and predictive analytics tools that elevate the process of designing and selecting custom jewelry.

I hold a degree in Computer Science with a specialization in Machine Learning from a prestigious university. This academic foundation, combined with hands-on experience, positions me at the forefront of AI-driven customization in the jewelry sector. I’m also an active contributor to several industry publications and frequently speak at conferences, sharing my insights on the future of AI in luxury goods and retail. I work for [RK Diamonds](https://www.rkdiamondjewelry.com/).

When I’m not developing groundbreaking algorithms, I enjoy exploring new trends in jewelry design and experimenting with the latest AI technologies. My commitment to continuous learning and innovation ensures that I remain a leading force in the intersection of machine learning and jewelry customization.

My vision is to create a world where every piece of jewelry tells a unique story, crafted precisely to reflect the individual style and preferences of its owner. With deep expertise and unwavering dedication, I’m transforming the jewelry industry, one algorithm at a time.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5jivuv1deg8qa1zclh0t.jpg)
Run any code from Vim
Published: 2024-06-10 22:13:08

Do you want to quickly run and test any code without leaving Vim and without even opening a `:terminal`?

There is a very simple way of achieving this. All we need is a runner function, a run command and a mapping to call it.

**Here is an example:**

```vim
function! CodeRunner()
    if &ft ==# 'python'
        execute 'RPy'
    endif
endfunction
```

**and the run command:**

```vim
command! RPy :!python3 %
```

**and the mapping:**

```vim
nnoremap <F12> :call CodeRunner()<CR>
```

**I prefer to wrap the mapping and the run command inside an augroup:**
```vim
augroup code_runner
    au!
    au FileType python command! RPy :!python3 %
    nnoremap <F12> :call CodeRunner()<CR>
augroup end
```
Place the above snippets in your .vimrc and source it. Now, every time you’re inside a python file, you can just press F12 to run the code and see its output.

**You can add other languages to the function and to the augroup too:**

```vim
"===[ Execute From Vim ]==="
function! CodeRunner()
   if &ft ==# 'python'
     execute 'RPy'
   elseif &ft ==# 'sh'
     execute 'RB'
   elseif &ft ==# 'javascript'
     execute 'RJs'
   elseif &ft ==# 'php'
     execute 'RPHP'
   elseif &ft ==# 'go'
     execute 'RGo'
   endif
endfunction
```
**And the corresponding augroup:**
```vim
augroup code_runner
    au!
    au FileType python command! RPy :!python3 %
    au FileType sh command! RB :!bash %
    au FileType javascript command! RJs :!node %
    au FileType go command! RGo :!go run %
    au FileType php command! RPHP :!php %
    nnoremap <F12> :call CodeRunner()<CR>
augroup end
```

With this, you can run bash, python, javascript, golang and php with the F12 key.

**A similar method can be used for compiled languages, such as C.**

**Example**:

```vim
function! CompileAndRun()
  let current_file = expand('%')
  let file_name = fnamemodify(current_file, ':t:r')
  let compile_cmd = 'gcc ' . current_file . ' -o ' . file_name . ' && ./' . file_name
  execute '!'.compile_cmd
endfunction

```
The function above, will compile the C code inside the current buffer using gcc, and then execute the binary output.

**Naturally, we need a corresponding mapping:**

```vim
nnoremap <F8> :call CompileAndRun()<CR>
```

More arguments can be added to the compile _cmd to serve your needs.

**One last addition that I recommend, is a shortcut for clearing the terminal:**

```vim
nnoremap \l :!clear<CR><CR>
```

Once your terminal becomes full with output, just press \l (that is L) in normal mode to clear it.
Essential Guide to Business Loans for Startups
Published: 2024-06-10 22:12:53


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cpos7f8lpqq0mdb4tta5.jpg)
Starting a business is an exciting venture, startups can provide the ss, and[ tips for approval](https://aliloans.site/the-essential-guide-to-business-loans-for-startups/).
useFakeAsync
Tags: react, typescript
Published: 2020-05-15 21:42:02


You can see the hook takes a few simple parameters, including the familiar pairing of a callback function and a delay in milliseconds. This follows the shape of JavaScript's setTimeout and setInterval methods.

```TypeScript
import { useEffect, useState } from 'react';

enum FakeAsyncState {
  PENDING = 'PENDING',
  COMPLETE = 'COMPLETE',
  ERROR = 'ERROR',
}

export const useFakeAsync: Function = (
  callback: Function,
  delay: number = 3000,
  shouldError: boolean = false,
  chaos: boolean = false
) => {
  const [state, setState] = useState<FakeAsyncState>(FakeAsyncState.PENDING);

  useEffect(() => {
    let timer: NodeJS.Timeout;
    const fail = chaos ? Math.random() <= 0.5 : shouldError;
    if (fail) {
      timer = setTimeout(() => {
        setState(FakeAsyncState.COMPLETE);
        callback();
      }, delay);
    } else {
      setState(FakeAsyncState.ERROR);
    }
    return () => clearTimeout(timer);
  }, [delay, callback, chaos, shouldError]);

  return [state];
};
```

The hook also takes a 'shouldError' parameter so that an error condition can be forced.

The fourth parameter is a little more interesting, 'chaos'. I added this to randomise a success or error condition.

The state returned by the hook mimics a promise, it can either be pending, complete or in an error condition.

Hopefully this will help testing behaviour across components, and avoiding those inevitable bugs that creep in when integrating a UI with an API, like stutters between loading and success states, for example.

That's all! Go checkout the code on [GitHub](https://github.com/anthonyhumphreys/hooks/) or install my handy hooks library from [npm](https://www.npmjs.com/package/@anthonyhumphreys/hooks)

This post was for day 1 of my [#100DaysOfCode](https://twitter.com/hashtag/100DaysOfCode) challenge. [Follow me on Twitter](https://twitter.com/aphumphreys) for more.
Fast Approval Loans
Published: 2024-06-10 22:10:03


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m5j0awv6df4sftj4f8lh.jpg)
[Types of Fast Approval Loans](https://aliloans.site/fast-approval-loans-quick-funding-for-your-immediate-needs/)
Payday Loans: Short-term loans designed to provide immediate cash, typically due on your next payday. They are easy to obtain but often come with high interest rates.
Personal Loans: Unsecured loans that can be used for various purposes. Some lenders offer quick approval and funding within a few days.
Online Loans: Many online lenders specialize in fast approval loans, offering streamlined applications and rapid funding.
Credit Card Cash Advances: If you have a credit card, you can quickly access funds via a cash advance. However, these often come with high fees and interest rates.
everything-ai 4.0.0: build up your local AI power today
Tags: python, docker, ai, opensource
Published: 2024-06-10 22:09:42

## What is everything-ai?

🤖 everything-ai is **natively a multi-tasking agent**, 100% local, that is able to perform several AI-related tasks

## What's new?

🚀 I am more than thrilled to introduce some new functionalities that were added since last release:

- 🦙 `llama.cpp-and-qdrant`: Chat with your PDFs (backed by Qdrant as vector database) through Hugging Face GGUF models running within llama.cpp
- 💬 `build-your-llm`: you can now create a customizable chat LLM to interact with your Qdrant database with the power of Anthropic, Groq, OpenAI and Cohere models, just providing an API key! You can also set the temperature and the max number of output tokens
- 🧬 `protein-folding` interface now shows the 3D structure of a protein along with its molecular one, no more static backbone images!
- 🏋️ `autotrain` now supports direct upload of config.yml file 
- 🤗 Small fixes in `retrieval-text-generation` RAG pipeline


How can you use all of these features? 

You just need a `docker compose up`!🐋

Where can I find everything I need?

Get the source code (and leave a little ⭐ while you're there):
https://github.com/AstraBert/everything-ai
Get a quick-start with the documentation:
https://astrabert.github.io/everything-ai/

Credits and inspiration

Shout-outs to Hugging Face, Gradio, Docker, AI at Meta, Abhishek Thakur, Qdrant, LangChain and Supabase for making all of this possible!
Inspired by: Jan, Cheshire Cat AI, LM Studio, Ollama and other awesome local AI solutions!
Guide to Home Equity Loans
Published: 2024-06-10 22:07:49


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pytt6lpujkvoko0ouj65.jpg)
Home equity loans can be a valuable financial tool for homeowners looking to leverage the equity built up in their properties. These loans allow you to borrow against the value of your home, providing a lump sum of cash that can be used for various purposes. Here’s an in-depth look at home equity loans, including their benefits, how they work, and tips for getting the best terms.
[MORE](https://aliloans.site/the-comprehensive-guide-to-home-equity-loans/)
Comprehensive Guide to Bad Credit Loans
Published: 2024-06-10 22:04:46

Securing a loan with a low credit score can be challenging, but bad credit loans offer a lifeline for those who need financial assistance despite their credit history. This detailed guide explores the types of bad credit loans, their benefits, the application process, and strategies for approval, helping you make informed decisions and improve your financial health.
[MORE](https://aliloans.site/the-comprehensive-guide-to-bad-credit-loans/
[Reminder-1] var, let, const
Tags: javascript, vue
Published: 2020-05-09 06:19:21

I am writing this article at first for me :). Why ?
Just to have a fast reminder about them. But i hope it can help you too !

We will speak about some javascript concepts here:
- scope
- block

We can use let and const since es2015 (or es6). I am assuming you know what is`"use strict"`. It will force you to init the variable before using it. In older browser it will work and you will have some weird issues.

## SCOPE

- `The scope is the portion of code where the variable is visible.`

- In Javascript only function create new scope (arrow function too). That mean if you try:

```js
function() {
  var hi = "hello"
}

console.log(hi) // will be undefined
```

- If a global variable as the same name. The variable inside the function will shadow the global variable (**shadowing**)
- If variable is declared after it is called. If he is after the called function it will be found because JS use the hoisting that put all variables on the top of the file (Always declare you variable properly).

## BLOCK

- A block is what is identified by a pair of curly braces. But except for function it doesn't create a new scope.

that mean's:

```js
if (true) {
  var hi = "hello"
}

console.log(hi) // will be "hello" remember hoisting
```

## LET

- With 'let' now you have a scoped version variable even in block

Remember:

```js
if (true) {
  let hi = "hello"
}

console.log(hi) // will throw error hi not defined
```

- "let" doesn't create a global variable.

## CONST

It can be scope in a block (remember the if) so it will not be available outside.

const could not be changed or reassigned. Just if the const variable is an object it can be mutate. You can block this behavior by wrapping your object with `Object.freeze({})`. Remember here that freeze will just freeze the level first of your object not the nested ones.

And that's it. See you in the next reminder.
CSS Snake.
Tags: cssart, cssgame, css
Published: 2024-06-10 22:03:12


## A blog written in 3rd person. Well, why not...
 

London based CSS Artist, Ben Evans, has had some lofty ideas in the past and this one follows that trend... His current aim is to make, or even remake, some form of the Nokia classic: Snake. Using only CSS. He's not currently sure if this is possible but he would love you to join him on his journey to finding out...
 


Ben has previously built CSS concepts with movement grids, the peak of this in-devour being a 3D maze game (which unfortunately doesn't like Safari, or any iOS browser, because they are all Safari really):
 
{% codepen https://codepen.io/ivorjetski/pen/poQpveN %}

 

Like most of Ben's CodePen's, there is also a video detailing the creation process on his YouTube Channel. This one can be found here:
 
{% youtube https://www.youtube.com/watch?v=Z0VHM4KcMFQ %}

 

Ben, also known as ivorjetski, has already set to work on Snake. So far he's spent far too long drawing the background entirely with CSS:

![Windows 10 default lockscreen image recreated in CSS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n3qgmk0i6imb1mkrzqz2.png)

 

He thought it would be fun to recreate the old Windows 10 default lockscreen in CSS. He was probably wrong about this.

He tried to keep the background down to a fewer lines of CSS as possible. It's about 1000. Which isn't bad considering the crazy amount of texture that he needed to do for the rocks.

Ben realised he could create the texture using text! 😮 Surely this is where the word TEXTure comes from, he thought to himself, not silly enough to write it in a blog. Little did he know his thoughts could be heard by the alter-ego journalist. 

Ben exclaimed: "It's pseudo classes, with the content declaration filled with random ascii shapes. Like this:"

```
   &:after, &:before {
            content: '●◖●  ●◖●  .● ●  ◖●◖●  ●  ◖-●  ●◖◖● ●◖ ●.●  ●◖●◖● ●●  ●.●◖●●';
            }
```

 

He has also designed a super simple movement grid for it. And then, for some reason, converted it into this pointless chess like thing. Perhaps so it would make sense when sharing it on CodePen:

{% codepen https://codepen.io/ivorjetski/pen/LYawGQZ %}

 

This does everything Ben requires for a good basis to build from, and he has managed to get the code down to about 100 lines (not including his CSS drawn initials). He is pretty pleased with how this works. The directional buttons are actually all the same, but rotate themselves, putting themselves in the required position for left, right, up and down. Depending on what ID is shown in relation to what grid square the user is in. There is also a basic boundary detection in place, that Ben would need for the Snake game to work.

 

Stay tuned for more...
Desiree Dove Realtor,Berkshire Hathaway HomeServices PenFed Realty
Published: 2024-06-10 21:59:04


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

With a passion for real estate and a commitment to excellence, I bring a wealth of knowledge and expertise to every client interaction. As a licensed real estate professional, I am deeply invested in helping you navigate the complexities of the market with ease and confidence. Whether you're buying, selling, or investing, I prioritize your goals and tailor my approach to meet your unique needs. With a focus on clear communication and unwavering integrity, I strive to be your trusted advisor every step of the way. Together, let's make your real estate dreams a reality—I'm here for you in all things home.

Desiree Dove Realtor,Berkshire Hathaway HomeServices PenFed Realty
Address: 3106 Plank Rd, Fredericksburg, VA 22407
Phone: 540-842-6340
Website: http://vahomedeals.com
Contact email: dove4homes@gmail.com

Visit Us:
[Desiree Dove Realtor,Berkshire Hathaway HomeServices PenFed Realty LinkedIn](https://www.linkedin.com/in/desiree-dove-8705022b)

[Desiree Dove Realtor,Berkshire Hathaway HomeServices PenFed Realty BBB
](https://www.bbb.org/us/va/fredericksburg/profile/real-estate-agent/desiree-dove-berkshire-hathaway-homeservices-0603-63418341)

Desiree Dove Realtor, BHHS PenFed Realty:
Real Estate Buying, Selling Consultant, and Representation in Fredericksburg, VA
How To avoid Getting Scammed
Tags: beginners, security, programming, productivity
Published: 2024-06-10 21:33:46

The scammer could not google the name of the United Nations Secretary-General. 

I wrote an article on how to know a phishing mail. 

you can read it here and share your experience if you have encountered such emails before. 

[Read](https://lnkd.in/dg_NTikG)
HOW SWIFT HACK EXPERT HELPED ME RECOVER MY STOLEN BITCOIN
Published: 2024-06-10 21:05:28

Greetings my name is Trista Ayers, I’m writing this testimony to all those who have suffered financial losses as a result of a gang of fraudulent brokers impersonating bitcoin and Forex traders. I’m aware that a lot of individuals have lost money on bitcoin due to the misconception that it cannot be traced. My belief was that my $440,000 in bitcoin and USDT was gone forever until I came across an article about SWIFT HACK EXPERT, a reliable money recovery expert who can locate and retrieve lost cryptocurrency rapidly. I contacted SWIFT HACK EXPERT straight away and after providing them with all the information, I was able to enter my restricted account and get my bitcoins back in my wallet. Send an email to them via: swift1@cyberservices.com or WhatsApp: +1-252-228-9013
Create CSS Animations with AI
Tags: ai, webdev, design, css
Published: 2024-06-10 21:00:04

In a recent project, our development team faced the challenge of creating micro-interaction animations for Autt's landing page. Traditionally, implementing CSS animations requires some manual tinkering and extensive trial and error. However, the team discovered AI CSS Animations, a powerful tool that revolutionized their workflow.

[AI CSS Animations](https://www.aicssanimations.com/)

By utilizing AI CSS Animations, our developers generated sophisticated CSS transitions effortlessly based on text or voice prompts. This eliminated the need for manual coding, allowing the team to focus on other critical aspects of the project. The results were impressive, with captivating hover effects, smooth scroll animations, and eye-catching transitions that enhanced the user experience.

AI CSS Animations proved to be a game-changer, empowering the team to bring their creative visions to life efficiently. The tool's intuitive interface and seamless integration streamlined the development process, saving countless hours of effort. As more developers adopt this revolutionary tool, it is poised to transform web development, enabling the creation of captivating and dynamic interfaces with unprecedented ease and efficiency.
REACT features
Published: 2024-06-10 20:40:41

There are so much to learn about React, that I can’t even begin to explain. I am still trying to figure out if I like it better than JavaScript. But I do know I like the fact that you can use components in a specific way like building blocks to build our web application. We can write codes that looks similar to HTML. It makes it very convenient and easier to understand when it comes to writing codes. There are a lot of great aspect of React that I like so far but the one that I really find useful is being able to return more than one return within the function scope by using components. For example:


                       function multiply(){
                            return( 
                              10 * 2
     	                       2 * 5
                            )
                          }



When we are using the regular function, you can only have one return.  The above example will not work. But when using React bellow you can see you can return multiple return statements by using components. With these components, it allows us to use the wrapping method by using a div tag and now you are able to return more than one return.

                         function App(){
                             return (
                                <div>
                                  <h1>Hi</h1>
                                  <h3>Bye</h3>
                                </div>
                             )
                         }


This makes so much more sense to me, because I struggle a bit with JavaScript. In JavaScript, I have to wright so many function codes to get different returns and it can got a little confusing for me. 
Learning how to use react is still new to me and I Know with more practice I will have a better understanding of it. What is your favorite feature in React?
LLM is unfair
Tags: llm, cat, promptengineering, language
Published: 2024-06-10 20:33:14

Well... At least, that's how I feel.

As a non-native English speaker, inefficiency arises even before starting to write instructions or prompts. Why? Obviously, the whole data corpus fed into AI models was mostly written in English. So what? It seems quite a simple job these days. Why don't I go ahead and use one of many AI translators and voila!

Actually, it isn't just about the translation. It's more of a contextual problem. In the LLM world, this context matters. The more I get my hands on various AI products, the more I get the feeling that they (AIs) and I don't get along very well. Yes, sometimes we are not on the same page. I don't know where we missed each other, but somewhere in the middle of the conversation, we walked across each other and didn't notice at all.

This happens simply because, at the essence, cultures differ. While they seem to mean the same thing on the surface, there are cases where they do not. For barely satisfying example, "what's up?" can be interpreted as a casual greeting, while this is not the case in my country. I'm familiar with the phrase when "what" is actually "going" on in my language. The comparison may not satisfy all but should definitely convey what I'm trying to say.

Nuance. This subtle difference is what creates the aforementioned inefficiency. If you are not aware of this, you will forever be getting slightly off but sufficing answers that you don't get to recognize what's wrong. What if you are aware of this? I don't know why Ouroboros comes to my mind. I can't get away from questions.

- Is this what I want to ask? Are you sure?
- Will this be seen enough as what I intended to ask LLMs?

Just whining about having a hard time configuring the LLM to get better responses. So I figured I'd vent a bit.