teleren/devto huggingface dataset:
Ollama and OpenAI chat interface
Tags: chatgpt, openai
Published: 2023-10-27 06:36:56

---
title: Ollama and OpenAI chat interface
published: true
date: 2023-10-24 00:12:00 UTC
tags: ChatGPT,OpenAI
canonical_url: https://reactjsexample.com/ollama-and-openai-chat-interface/
---

# LLM Chatter, v0.0.2
 ![Ollama and OpenAI chat interface](https://reactjsexample.com/content/images/2023/10/Code_2023-10_22-07-35.jpg)

Single HTML file interface to chat with Ollama local large language models (LLMs) or OpenAI.com LLMs.

![Ollama and OpenAI chat interface](https://github.com/rossuber/llm-chatter/raw/main/dist/screenshot.webp?raw=true)

# Installation

1. Install Ollama and [add at least one model](https://www.ollama.ai/library).
  - `curl https://ollama.ai/install.sh | sh`
  - `ollama pull mistral-openorca:7b`
2. Run `wget https://raw.githubusercontent.com/rossuber/llm-chatter/master/dist/index.html`
3. Run `python3 -m http.server 8181`
4. Open `localhost:8181` in your web browser.
5. Optional: Register an account at [openai.com](https://openai.com/) and subscribe for an API key. Paste it into the ‘Open AI’ password field while OpenAI Chat is selected.

# Optional LangChain node.js server installation steps

Now supports LangChain URL embedding! The LangChain Ollama implementation is incompatible with something (like React? I am not sure), so it is necessary to run a separate node.js Express server to handle API requests at [http://localhost:8080](http://localhost:8080)

1. Run `mkdir langchain-ollama`
2. Run `cd langchain-ollama`
3. Run `wget https://raw.githubusercontent.com/rossuber/llm-chatter/master/langchain-ollama/index.js`
4. Run `wget https://raw.githubusercontent.com/rossuber/llm-chatter/master/langchain-ollama/package.json`
5. Run `npm install`
6. Run `node index.js`

Built with: [Vite](https://vitejs.dev/) / [Bun](https://bun.sh/) / [React](https://react.dev/) / [TailwindCSS](https://tailwindcss.com/) / [FontAwesome](https://fontawesome.com/)

The web app pulls icon images from [https://ka-f.fontawesome.com](https://ka-f.fontawesome.com).

The web app makes API calls to [http://localhost:11434](http://localhost:11434) (ollama), [http://localhost:8080](http://localhost:8080) (the langchain-ollama node.js Express server), and [https://api.openai.com](https://api.openai.com).

[Ollama API docs](https://github.com/jmorganca/ollama/blob/main/docs/api.md)

[OpenAI API docs](https://platform.openai.com/docs/api-reference)

## GitHub

[View Github](https://github.com/rossuber/llm-chatter?ref=reactjsexample.com)
What's Your Preferred Srategy for Organizing Code?
Tags: discuss, codenewbie, beginner
Published: 2023-10-24 00:00:00

---
published_at : 2023-10-24 00:00 +0000
---
With numerous strategies available for organizing code, including popular options like by component, by toolbox, by layer, and by kind, which approach do you prefer for organizing your code?

Follow the [CodeNewbie Org](https://dev.to/codenewbieteam) and [#codenewbie](https://dev.to/t/codenewbie) for more discussions and online camaraderie!

*{% embed* https://dev.to/codenewbieteam *%}*
Can You Transform Blame into Empowerment?
Tags: discuss
Published: 2023-10-24 00:00:00

---
published_at : 2023-10-24 00:00 +0000
---
How has your perception of life's challenges and your ability to take responsibility for your own well-being evolved over time? Can you share a specific experience where you shifted from blaming external factors to taking control of your response and finding a solution?

Follow the DEVteam for more discussions and online camaraderie!

{% embed [https://dev.to/devteam](https://dev.to/devteam) %}
Garage door replacement North Providence
Published: 2023-10-23 23:43:13

Quality Garage Door Repair & Opener Installation is a local [Garage door replacement North Providence](http://qualitygaragedoorsrepair.com/) supplier and installer serving North Providence, RI. We offer a wide range of garage door repair and installation services, including broken spring replacement, opener installation, and garage door maintenance. [Garage door repair near me North Providence](https://maps.app.goo.gl/8Sf1hheXZLooDd7p7) are committed to providing our customers with the highest quality service at a fair price. Call us today to schedule a free consultation!
Participate In A Text-based Developer Interview For The OpenLampTech Newsletter
Tags: php, mysql, webdev, programming
Published: 2023-10-23 22:09:33

Hi community, 👋

I'm searching for any developers who are interested in participating in text-based interviews for my OpenLampTech developer newsletter.

This consists of a round of 10 (or so) questions in a Google Doc you would write responses to and I would then publish this content in the newsletter. This is strictly through correspondence and no video or chat is needed.

Everything is through email.

You can also promote your products, services, and/or content links.

I’ve published several of these so far (over the last year and a half) to the several hundred subscribers (at this article’s publishing) and I feel like the readers enjoy learning about other developers.

I know I learn a lot myself and enjoy these interviews too.

It’s free to participate.

Anyone interested, send me an email at openlamptech@substack(dot)com with OpenLampTech Newsletter Interview - Your_Name_Here in the subject line.

Check the newsletter archives at [openlamptech.substack.com](url) for past published issues and developer interviews.

Thank you all and I hope to hear from any of you who are interested and want to share your developer story and knowledge with others.
Basic Pentesting - I have just completed this room! Check it out:
Published: 2023-10-23 21:46:46

_https://tryhackme.com/room/basicpentestingjt… #tryhackme #security #webapp #boot2root #cracking #basicpentestingjt via@RealTryHackMe #aslam490a #aslam_490a #aslam_hossain
Easier than ASM
Tags: programming, tutorial, asm
Published: 2023-10-23 21:40:51

I’ve been coding a game in x86 Assembly for a couple of days and wanted to know if there is any mid/low/high level languages I can switch to that offer simplicity, readability and more efficiency.

The project is a Zelda like game and it is still in it’s game over and player logic phase.
Setting Up a Desktop Project with Wails, React, and Vite: A Step-by-Step Guide
Tags: webdev, react, tutorial, beginners
Published: 2023-10-23 21:07:04

## INTRODUCTION
In this article, I’ll walk you through how to quickly set up a desktop project using [Wails](https://wails.io/), [React](https://react.dev/), and [Vite](https://vitejs.dev/). 

Wails uses Go for the backend and any front-end framework of your choosing. For this article, we will stick with React. 

## PREREQUISITES
To be able to successfully run this project on your machine, you need to install the following: 

- Go: You need to have Go 1.18 or above. [Check here to download Go on your machine](https://go.dev/dl/). You can check if Go is installed on your machine by running the command 

```
go version
```

- Node: You need to have node 15 or above. [Check here to download the latest version of node](https://nodejs.org/en/download). By installing node, npm is also installed. You can check if node is installed by running 

```
node -–version
```
 and check if npm is installed by running 

```
npm -–version
```

- Wails CLI: You can install the wails CLI by running the command 

```
 go install github.com/wailsapp/wails/v2/cmd/wails@latest
```


## SETTING UP THE DEVELOPMENT ENVIRONMENT
Let us create a React project by running the following command: 

```
wails init -n myproject -t react
```
If you get an error saying “wails not found”, then you are probably missing “go/bin” in your path. You can add it to your path by running the command `export PATH=$PATH:~/.bin:~/go/bin`



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

Your terminal should look like the above if your project was run successfully. 


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

Your folder structure should look like the above. You can make changes to the frontend of your application by editing the files in your “frontend” folder. 

## RUNNING YOUR APPLICATION

Now, we need to start our project. We have to change directory by running the command `cd myproject` to make sure we are in the newly created project folder. Then, run 

```
wails dev
```


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

An icon will pop up and your project will be running successfully!


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cjy56hrvz53o1d29gxvd.png)
ARE YOU A VICTIM OF SCAM? RECOVER YOUR FUNDS THROUGH SPYWARE CYBER
Published: 2023-10-23 21:05:53

I want to take this moment to express my gratitude towards an exceptional hacking group called SPYWARE CYBER. They specialize in tracking and recovering stolen assets from internet fraudsters. Allow me to provide you with a brief account of what happened to me to shed light on their incredible work.  approximately a month ago, a friend of mine informed me about a trading opportunity with an investment company she had come across on Instagram. She claimed to have received random payouts from this company, and given that the information came from a trusted friend, I believed it to be real and legitimate. Intrigued by the opportunity, I promptly requested the company's information and contacted them for further details. Upon contacting the investment company, I was impressed by their professionalism and the way they explained their investment process. Encouraged by their assurances, I decided to invest an amount equivalent to 6 BTC. After a certain period of time, when I wished to withdraw my funds along with the profit earned, I discovered that my account had been frozen. Determined to resolve the issue, I immediately contacted the support service of the investment company. To my surprise, they informed me that in order to release my funds, I needed to deposit an additional 50,000.00 USD for tax purposes. Although I found this demand unusual, I had no choice but to comply. Reluctantly, I deposited the required amount, hoping to access my hard-earned income finally. However, to my dismay, the company became unresponsive for an entire week. My attempts to contact them fell on deaf ears, leaving me utterly confused and worried.

I reached out to SPYWARE CYBER, I contacted them and explained my situation. Their service and support were remarkable, As they swiftly took action to recover my funds from those heartless scammers who had no regard for others. Thanks to SPYWARE CYBER, I was able to secure my funds and escape the clutches of financial ruin. If you have been a victim of a similar attack, I encourage you to contact SPYWARE CYBER for assistance with recovering your BTC or any other crypto assets. They have proven themselves to be reliable and efficient in helping individuals like myself reclaim what is rightfully theirs.

Please find their contact information below:
Email: [spyware @ cybergal . com]
WhatsApp : [+19892640381]
how can i do that!
Tags: webdev, java
Published: 2023-10-23 20:50:11

i have a table in database and i want to display some specific data in java jTable how i can do that.
Code is:
`

```
public void Tablelist2() {
    try {
        String sql = "SELECT AccountNo, transaction_id, transaction_type, transaction_date, transaction_amount FROM transaction";
        pst = conn.prepareStatement(sql);
        rs = pst.executeQuery();
        jTable2.setModel(DbUtils.resultSetToTableModel(rs));
    } catch (Exception e) {
        JOptionPane.showMessageDialog(null, e);
    } finally {
        try {
            rs.close();
            pst.close();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
    }
}

```
`
```

```
C# Gains Ground: Challenging Java's Dominance
Tags: csharp, microsoft, dotnet, visualstudio
Published: 2023-10-23 20:43:19

In October 2023, C# is in close competition with Java in popularity, highlighting Microsoft's significant advancements with this language. What are the reasons behind this success, and what advantages do you see in continuing to use Java instead of C# for your projects? Would you be willing to objectively evaluate C# as a viable option for your projects in the future?

![TIOBE Index](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nm2m71ua9gq4dobe9wzx.png)
[TIOBE Index](https://www.tiobe.com/tiobe-index/)

Here I leave you some very good things I see about Microsoft, .NET, and C#.

**C# provides modern language features** that allow programmers to write secure, readable, maintainable code with the required performance. [What's new in C#](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12)

**NET is a robust, cross-platform, free, and open-source** ecosystem. [.NET](https://dotnet.microsoft.com/en-us/)

**Microsoft is highly committed to providing high-quality tools to create applications**, so we have at hand Visual Studio Community Edition, which is free, and we have the Professional and Enterprise editions [See the Visual Studio website](https://visualstudio.microsoft.com/es/).

We also have the free IDE Visual Studio Code that provides a good programming experience for developers who enjoy doing almost everything using commands and the console (bash, git bash, PowerShell, node, command prompt). [See the Visual Studio Code website](https://code.visualstudio.com/)

These IDEs are extensible, so you can create your own extensions or use any of your preferences in the [Marketplace](https://marketplace.visualstudio.com/)

And, if you don't want to use these IDEs you can use a different one, or even you can create a .NET application using a notepad and compile it using the .NET API in a console. [.NET CLI Overview](https://learn.microsoft.com/en-US/dotnet/core/tools/)

Finally, **you can find extensive training for all levels, beginners, intermediates, and advanced profiles on the Microsoft Learn site**. These trainings go from basic programming topics to architectural guidelines for enterprise applications.

- [Microsoft Learn website](https://learn.microsoft.com/en-us/)
- [Azure Architectures website](https://learn.microsoft.com/en-us/azure/architecture/browse/)

Thank you for reading and happy coding!
Accessibility errors and special file types in WordPress Elementor
Tags: webdev, wordpress
Published: 2023-10-23 20:21:38

As web accessibility becomes increasingly important, at our Design Agency [Design Agentur Form und Zeichen in Graz](https://www.formundzeichen.at/), we are placing a stronger emphasis on fixing accessibility errors on our customer’s websites. A great page builder plugin for WordPress is Elementor. For small Websites, we utilize Elementor most of the time. While Elementor has a great implementation of various accessibility features, we noticed a critical error, that appears when WordPress pages are configured improperly.

In this post, we will explain the “skip to content” error in WordPress Elementor using our client’s website, [California Metals](https://www.californiametals.com/).

Moreover, to inspire your web projects, we'd like to inform you that WordPress also supports 3D uploads.

## Check your website for the skip to content error 
[WAVE](https://wave.webaim.org/extension/) is a useful plugin available for Chrome, Firefox and Edge. With this tool, we can quickly find critical accessibility errors on the website. When navigating to details, the tool shows that the “skip to content” link is broken.

![WAVE tool for chrome: Analyzing California Metals](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9o5ct065h1l7xw7qpmk1.png)

The reason why the skip to content link is broken, is that two HTML tags from Elementor’s site structure are missing. The missing <main /> tag has the id “content”, which the “skip to content” link refers to. 

![WAVE tool for chrome: Analyzing California Metals](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nw5072zplt2byfm5d94t.png)

Read the Article about [Fixing the skip to content error](https://www.formundzeichen.at/en/development/skip-to-content-error-in-wordpress-elementor/), if you encountered the same problem.

## Loading GLTF models in Elementor
To load a model on a page, we need to use the HTML element of Elementor. On the [Three.js examples page](https://threejs.org/examples/), you can find the used script tag by inspecting the website. With a few adoptions, we can use those examples on our Elementor page. 

![wordpress elementor three.js gltf example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vudeugpto33yvlzpfq6r.png)

If you're interested in adding 3D models to your website or if you've faced file upload issues, read our blog post on [using three.js with Elementor](https://www.formundzeichen.at/en/development/three-js-in-wordpress-elementor/).
Why Cypress is a great tool
Tags: cypress, testing, typescript, automation
Published: 2023-10-23 20:10:09

I started using Cypress to test applications and haven't looked back since, prior to using Cypress I had experience with Selenium. Although Selenium is a great tool as well, I definitely favor Cypress. Here are the main reasons why I prefer to write my automated tests using Cypress.

**Real-time Reloads**
As your making changes to the code, Cypress will automatically reload the browser and allow for faster and more efficient test case development and debugging.

**Easy Setup**
Cypress is fairly simply to get configured and running on your environment. It comes with a built-in electron browser so there is no need for any additional web-drivers or configuration.

**Automatic Waiting**
Cypress automatically waits for elements to become available and for actions to complete, making it less vulnerable to race conditions. You don't have to add explicit waits or sleep commands in your tests.

**Built-in Dashboard**
Cypress offers a dashboard service (Cypress Dashboard) for recording and storing test results. It allows you to view test runs, monitor CI/CD builds, and analyze test performance.

**Chaining Commands** 
Cypress uses a fluent API that enables you to chain commands together. This makes test scripts more readable and easier to maintain.

**Time-Travel Debugging** 
Cypress offers a time-travel feature that allows you to see what was happening in your application at any given point during the test execution. This is immensely helpful for debugging and understanding why a test failed.

**Powerful Selector Engine** 
Cypress uses a powerful selector engine that allows you to easily select and interact with elements on the page. This engine is capable of locating elements based on various attributes, making your test scripts more robust.

**Open Source and Active Development**
Cypress is an open-source project with active development and continuous improvement. It keeps up with modern web development practices and browser features.

**Extensive Documentation and Community:** 
Cypress has an active community and extensive documentation, which makes it easier to find help, learn, and troubleshoot issues.

**Cross-Browser Testing** 
While originally focused on Chromium-based browsers, Cypress has been expanding its support for other browsers, making it more versatile for cross-browser testing.

**Plugin System**
Cypress has a robust plugin system that allows you to extend its capabilities and integrate it with other tools and services.

Overall, Cypress has made significant strides in the field of test automation testing. It offers a seamless and developer-friendly experience. Cypress has proven to be a valuable tool for web application testing, streamlining the testing process and improving the overall quality of web applications.
Hacktoberfest 2023 - My project
Tags: hack23maintainer
Published: 2023-10-23 20:19:51

### Introduction
I am Pasindu Bandara, I am a Cyber Security undergraduate and I am currently working as a cybersecurity analyst. I love to maintain and contribute to open-source projects.

This is my second Hacktoberfest, but I have maintained open-source projects in the past, I am excited to participate in Hacktoberfest this year and to contribute to the open-source community.

I am eager to learn and grow. I am also looking for ways to contribute to the open-source community in a meaningful way. If you have any suggestions I love to hear them as well.

### Project
My hacktoberfest project is a weather app. I have created some issues in my repo. You can also contribute to that project via the below link.
https://github.com/PasinduBandaraa/WeatherWizard
How to stop individual and all Docker processes
Tags: docker, tutorial, begineers, programming
Published: 2023-10-23 20:17:28

---
title: How to stop individual and all Docker processes
description: "Photo by Fejuz  Unsplash"
tags: docker,,tutorial,,begineers,,programming,
---


## Why This Article

This blog post was born out of the need to share a code snippet that I use almost every day at work. I stop and start Docker processes frequently, and I wanted to create a resource that would help others do the same.

I hope you find this blog post helpful!

## Introduction
Docker is a popular containerization platform that allows you to run applications in isolated environments. This can be useful for improving performance, security, and portability. However, it can also be confusing to manage multiple Docker processes.

This blog post will explain how to stop individual and all Docker processes using the Docker CLI.

## Stopping an individual Docker process

To stop an individual Docker process, you can use the docker stop command. This command takes the container ID or name as an argument. For example, to stop the container with the ID a0c59618bf9e, you would run the following command:

```bash
docker stop a0c59618bf9e
```
You can also stop multiple Docker processes at once by passing multiple container IDs or names to the docker stop command. For example, to stop the containers with the IDs a0c59618bf9e and b1d2f3g4h5i6, you would run the following command:

```bash
docker stop a0c59618bf9e b1d2f3g4h5i6
```
**Stopping all Docker processes**
To stop all Docker processes, you can use the docker stop $(docker ps -a -q) command. This command will pipe the output of the docker ps -a -q command, which lists all container IDs, to the docker stop command.

For example, to stop all Docker processes, you would run the following command:

```bash
docker stop $(docker ps -a -q)
```

Note: This command will stop all Docker processes, including those that are running in detached mode.

Explanation of the commands
The following is a brief explanation of the commands used in this blog post:

`docker stop`: This command stops a Docker container.

`docker ps`: This command lists Docker containers.
`-a`: This option tells the docker ps command to list all containers, even those that are stopped.
`-q`: This option tells the docker ps command to only list the container IDs.
`$(command)``: This is a shell syntax that allows you to execute the output of a command.

### Conclusion

Stopping Docker processes is a simple task, but it is important to understand the different commands that you can use. This blog post has explained how to stop individual and all Docker processes using the Docker CLI.