Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
y!os
- Page 1
Question Answering with YouTube Videos Using RAG in LangChain
Programming
Computer Science
6 Days Ago
by usmanmalik57
…quot;, "https://www.youtube.com/watch?v=7qbJvucsU-
Y
", "https://www.youtube.com/watch?v=DNNMS7l6A…FAISS vector index, enabling fast and efficient similarity searches. ``` openai_key =
os
.environ.get('OPENAI_KEY2') ``` ``` text_splitter = RecursiveCharacterTextSplitter( chunk_size=1000, chunk_overlap=…
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
5 Days Ago
by jprog1000
Got it. Thank you so much!
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
5 Days Ago
by vortex_1
In my opinion, implementing a feature in a bouncing balls simulation where a new ball is created when two balls collide can add an interesting and dynamic element to the simulation. This feature can introduce a sense of complexity and unpredictability, making the simulation more engaging and challenging for users. It could also provide an …
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
4 Days Ago
by jprog1000
Great reply, vortex! Agree with all your points.
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
4 Days Ago
by Digital_39
Hi, Its helpful for me. I got my answer.
Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by jprog1000
…x -= xDx; if ( yUp )
y
+= yDy; else
y
-= yDy; } public int getX(){ return… } } public void setY(int
y
){ this.
y
=
y
; } public int getRadius(){ return this…
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by toneewa
… = false; return true; } return false; } public void setY(int
y
){ this.
y
=
y
; } public int getRadius(){ return this.radius; } public Rectangle getBounds(){ return…
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by toneewa
… ); } if (xUp) x += xDx; else x -= xDx; if ( yUp )
y
+= yDy; else
y
-= yDy; } public int getX(){ return this.x; } public int…
Paris Olympics Chatbot- Get Ticket Information Using Chat-GPT and LangChain
Programming
Computer Science
4 Weeks Ago
by usmanmalik57
… langchain.chains import create_retrieval_chain from langchain_core.documents import Document import
os
``` ## Generate Default Responses from Chat-GPT Let's first generate… it in your Python application via the following script. ``` openai_key =
os
.environ.get('OPENAI_KEY2') ``` Next, you must create an object of…
Paris Olympics Ticket Information Chatbot with Memory Using LangChain
Programming
Computer Science
3 Weeks Ago
by usmanmalik57
….prompts import MessagesPlaceholder from langchain_core.messages import HumanMessage, AIMessage import
os
``` ## Paris Olympics Chatbot for Generating a Single Response Let… GPT-4 model, a model that powers Chat-GPT. ``` openai_key =
os
.environ.get('OPENAI_KEY2') llm = ChatOpenAI( openai_api_key = openai_key , model = '…
Re: Trying to animate sprite using DirectX9
Programming
Software Development
3 Weeks Ago
by Pavel_11
… { cavemanRight.movex = +5; cavemanRight.x += cavemanRight.movex; cavemanRight.
y
+= cavemanRight.movey; } if(KEY_DOWN(VK_LEFT)) { cavemanRight.movex = -…5; cavemanRight.x += cavemanRight.movex; cavemanRight.
y
+= cavemanLeft.movey; } if(cavemanRight.movex > 0) {…
Using Natural Language to Query SQL Databases with Python LangChain Module
Programming
Computer Science
1 Week Ago
by usmanmalik57
… following script imports the GPT-4 LLM via LangChain. ``` openai_key =
os
.environ.get('OPENAI_KEY2') llm = ChatOpenAI( openai_api_key = openai_key , model = 'gpt-4…
Re: How Build video-player in html And css ?
Programming
2 Weeks Ago
by Kirubel_2
…; margin: 0; padding: 0; height: 101vh; overflow-
y
: hidden; } .container button{ background: transparent; color:white…-size: cover; background-repeat: no no-repeat; overflow-
y
: scroll; overflow-x: auto; } .body2{ height:…
Re: Installing programs from Github
Programming
Software Development
4 Weeks Ago
by Reverend Jim
… for wxwidgets which is a library of controls that are
OS
specific. No matter what platform you are running on, controls…
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by jprog1000
Thank you so much for your reply and additions! It is certainly working as I wanted. I will read through the code you have added and ask you any questions I might have. I hope you don't mind. Regards
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by Dani
I’ll mark this question solved :)
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by Dani
… oh, sorry, missed the bit about you still needing clarifications. Feel feee to ask :) I’ll now unmark this topic as solved. /facepalm
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by jprog1000
Hello, Thank you again so much! All your additions are clear, but it seems like whenever two balls collide, more than one ball is added to the arraylist and painted. Any way to have just one ball added to the panel for every collision? Have some kind of a toggle flag in paintcomponent? Regards
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by toneewa
Yes, this is true. Overlapping ball spawns can do that causing a chain reaction. Something like that could be done. How you handle the spawning of the new ball is what I played with a bit before. You will see better collision detection changing to: g.fillOval(ball.getX(), ball.getY(), 1 * ball.getRadius(), 1 * ball.getRadius());
Re: Why does Dell hate Linux so much?
Hardware and Software
Linux and Unix
3 Weeks Ago
by mickeydoodle
I've just acquired a Dell laptop, it seems to hate Linux! Touch pad doesn't work properly, Wireless won't connect and it's sooo slow! Works fine with Windows!
PDF Image Table Extractor Web App with Google Gemini Pro and Streamlit
Programming
Computer Science
2 Months Ago
by usmanmalik57
… Part import streamlit as st import pandas as pd import
os
import base64 import glob import re import csv ``` ### Creating …(directory, uploaded_files): if not
os
.path.exists(directory):
os
.makedirs(directory) for uploaded_file in uploaded_files: file_path =
os
.path.join(directory, uploaded_file.name…
Claude 3 Opus Vs. Google Gemini Vs. GPT-4 for Zero-Shot Text Classification
Programming
Computer Science
1 Month Ago
by usmanmalik57
… to the path of the JSON file you just downloaded. ```
os
.environ['GOOGLE_APPLICATION_CREDENTIALS'] = "PATH_TO_VERTEX_AI_SERVICE_ACCOUNT JSON FILE" ``` The … OpenAI( # This is the default and can be omitted api_key =
os
.environ.get('OPENAI_API_KEY'), ) def find_sentiment_gpt(tweet): content = ""&…
Converting PDF Image to CSV Using Multimodal Google Gemini Pro
Programming
Computer Science
2 Months Ago
by usmanmalik57
… application. ``` import base64 import glob import csv import
os
import re from vertexai.preview.generative_models import GenerativeModel, Part …creates the model object, and defines the configuration settings. ```
os
.environ['GOOGLE_APPLICATION_CREDENTIALS'] = r"PATH_TO_VERTEX_AI_SERVICE_ACCOUNT JSON FILE" model…
Re: GCC Fails to Recognize Parameters
Programming
1 Month Ago
by rproffitt
Here's another problem. When we change the
OS
not only must we setup the compiler, environment and such but sometimes an
OS
API could be deprecated or removed. You made mention of a possible
OS
change so that's a possibility. You obtained this code from somewhere. Go back there and see if they updated it for your new
OS
.
Extract Tabular Data from PDF Images using Hugging Face Table Transformer
Programming
Computer Science
1 Month Ago
by usmanmalik57
… !pip install pytesseract !pip install easyocr !sudo apt-get install -
y
poppler-utils !pip install pdf2image !wget "https://fonts.google… entry['label'] == 'table column'] # Sort rows and columns by their
Y
and X coordinates, respectively rows.sort(key=lambda x: x…
Fine Tuning Google Gemma Model for Text Classification in Python
Programming
Computer Science
1 Month Ago
by usmanmalik57
… below imports the required libraries into your Python application. ``` import
os
import transformers import torch from google.colab import userdata from…
GCC Fails to Recognize Parameters
Programming
1 Month Ago
by snah19
…..." ./configure --enable-cross-compile \ --prefix="$DJGPP_PREFIX2" \ --target-
os
=ms-dos \ --arch=i486 \ --cross-prefix="$TARGET_ARCH-" \ --extra…
Re: How can I create a meme generator using js canvas?
Programming
Web Development
1 Month Ago
by jessicaboland
…const userInput = 'Your Text Here'; ctx.fillText(userInput, x,
y
); // Initial text rendering // Mouse interaction canvas.addEventListener('mousemove', (e…on mouse coordinates x = e.clientX - canvas.getBoundingClientRect().left;
y
= e.clientY - canvas.getBoundingClientRect().top; // Clear and redraw…
Re: import image from database image folder to pdf using fpdf
Programming
Web Development
2 Months Ago
by thir
…(pathinfo($_FILES['gambarvk_image']['name'], PATHINFO_EXTENSION)); //function Image($file, $x=null, $
y
=null, $w=0, $h=0, $type='', $link='') $pdf->Image… extension like PNG or JPG; //function Image($file, $x=null, $
y
=null, $w=0, $h=0, $type='', $link='') $pdf->Image…
Re: VB6 - RayCasting: why my Vertical intersection is so big?
Programming
Software Development
2 Months Ago
by cambalinho
… If Me.Caption = "X: " + Str(Player.MapX) + "
Y
: " + Str(Player.MapY) + " FPS: " + Str(FramePerSecond) + "…
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC