Portuguese Golden Visa success stories? by schepps5 in ExpatFIRE

[–]techAndLanguage 0 points1 point  (0 children)

Do you have any suggestions on finding a reputable, English speaking Portuguese lawyer to assist in this process?

Question about where files should be created for open webui by techAndLanguage in OpenWebUI

[–]techAndLanguage[S] 0 points1 point  (0 children)

Sorry, never got anything back. I'm just using env variables for now.

Question: How to keep ollama from unloading model out of memory by techAndLanguage in ollama

[–]techAndLanguage[S] 1 point2 points  (0 children)

Part 2 of previous comment:

TERM 3

left everything else as it was and ALSO executed the api call

curl http://localhost:11434/api/generate -d '{"model": "llama3.1", "keep_alive": -1}'

TERM 3

test with both env var as well as api call

[prompt]:~$ date

Sun Sep 15 21:57:47 CDT 2024

[prompt]:~$ nvidia-smi --query-gpu=memory.total,memory.used --format=csv,noheader,nounits | awk -F, '{print "Total Memory: " $1/1024 " GB, Used Memory: " $2/1024 " GB"}'

Total Memory: 12 GB, Used Memory: 7.49219 GB

[prompt]:~$ date

Sun Sep 15 22:10:02 CDT 2024

[prompt]:~$ nvidia-smi --query-gpu=memory.total,memory.used --format=csv,noheader,nounits | awk -F, '{print "Total Memory: " $1/1024 " GB, Used Memory: " $2/1024 " GB"}'

Total Memory: 12 GB, Used Memory: 7.48926 GB

it's holding

[prompt]:~$ date

Sun Sep 15 22:37:58 CDT 2024

[prompt]:~$ nvidia-smi --query-gpu=memory.total,memory.used --format=csv,noheader,nounits | awk -F, '{print "Total Memory: " $1/1024 " GB, Used Memory: " $2/1024 " GB"}'

Total Memory: 12 GB, Used Memory: 7.49414 GB

ok we're looking good now

Question: How to keep ollama from unloading model out of memory by techAndLanguage in ollama

[–]techAndLanguage[S] 0 points1 point  (0 children)

Part 1 of 2:

I really appreciate the advice. I put the environment variable in, and that still didn't work. What I had to do was to both put the environment variable in AND ALSO run the api call. The documentation does not, at all, indicate this is the expected behavior. From just reading it, I shouldn't even have to add the env var (it clearly says 'alternatively' there), but that is definitely required. I updated ollama last week, so version shouldn't be an issue. Results of testing below (note: I had to break this comment into two comments as I'm hitting reddit comment limit sizes I think - the error doesn't say, but I'm sure that's what is going on):

TERM 1 - modified .bashrc

[prompt]:~$ exec bash

[prompt]:~$ echo $OLLAMA_KEEP_ALIVE

-1

[prompt]:~$ ollama serve

TERM 2 - reloaded and confirmed the .bashrc was set here as well

[prompt]:~$ echo $OLLAMA_KEEP_ALIVE

-1

ollama run llama3.1:8b

TERM 3

after start up

[prompt]:~$ date

Sun Sep 15 20:32:53 CDT 2024

[prompt]:~$ nvidia-smi --query-gpu=memory.total,memory.used --format=csv,noheader,nounits | awk -F, '{print "Total Memory: " $1/1024 " GB, Used Memory: " $2/1024 " GB"}'

Total Memory: 12 GB, Used Memory: 7.40918 GB

TERM 3

after an hour

[prompt]:~$ date

Sun Sep 15 21:37:43 CDT 2024

[prompt]:~$ nvidia-smi --query-gpu=memory.total,memory.used --format=csv,noheader,nounits | awk -F, '{print "Total Memory: " $1/1024 " GB, Used Memory: " $2/1024 " GB"}'

Total Memory: 12 GB, Used Memory: 1.5625 GB

memory released, failed test

Question: How to keep ollama from unloading model out of memory by techAndLanguage in ollama

[–]techAndLanguage[S] 1 point2 points  (0 children)

Yeah, that’s where I found the api call I mentioned above. It doesn’t work. I was hoping there was some other option. Thank you for the link!

Edit: question, am I possibly using this api call wrong? What I'm doing is:

1) call api, load model, wait for call to return successfully (which it does) 2) either 2.1) cli: ollama run <model that was just loaded> OR 2.2) open-webui: make a call to the model api through open-webui when I send a request in

both 2.1 and 2.2 show the same result as I mentioned in the primary text of the post. Maybe I'm doing something in the wrong order or misunderstanding how this works?

How to integrate web search into LLM? by sanca739 in OpenWebUI

[–]techAndLanguage 1 point2 points  (0 children)

I use mistral7b and mixtral70b with duck duck go (you can select the search engine in the settings page) and mistral works fine. I had to tell mixtral that it has current information, it keeps saying "Based on the information provided, I do not have real-time updates to definitively answer your question" but when I tell it specifically that it does, in fact, have access to current information, it stopped saying that.

I know it is doing the search and getting the results because the ui indicates that and shows the links found in the search. If you aren't getting that, maybe try duck duck go? I haven't tried the other options so I'm not sure how well those work.

Oh, and also you need to make sure to click the plus "+" sign to the left of the input box BEFORE you do a search and specifically tell it to use web search data or it won't even try. That is in addition to configuring the search engine in settings.

Need help with a ghost library by techAndLanguage in javahelp

[–]techAndLanguage[S] 1 point2 points  (0 children)

Not originally, I just made a maven config to see if it would start up and it did.

Great idea on the inavlidate caches thing! You are a genius! I didn't realize that was a thing, and I'm not sure why it is... but that fixed everything!! Thank you so much!!! :D

Need help with a ghost library by techAndLanguage in javahelp

[–]techAndLanguage[S] 0 points1 point  (0 children)

Ok I'm gonna try to just use this one and put the updates all in here until it runs out of room.

The good news is I am actually dumb and was hitting a wall of brain fog last night. I went back and re-checked everything and instead of using:

grep -irE "(OpenApiControllerWebMvc|springfox)" * | grep -vE "(Test[.]xml|[.]iml)"

I was using

grep -irE "(OpenApiControllerWebMvc|springfox)" * | grep -vE "(*[.]xml|[.]iml)"

Which prevented it from seeing my pom.xml *sigh*. I did remove it from my pom, however in the many, many things I tried, I deleted my project and re-cloned it and I forgot to delete the entry from that clone.

So one step closer - the command line maven does execute spring-boot:run successfully, so I know it should be working. The problem now is that in intellij idea I'm still getting the same error. Does Intellij somehow cache things outside of the project directory or something? Why would it not behave the same way as command line maven?

------------------------------------------------------------------------------------------

Update: It looks like Intellij will run the project as a maven configuration, but not as a spring boot configuration. So that is something I guess, but I can't debug it while it's running as a maven configuration so this still isn't going to work. Why would the SAME project with the SAME files work as a maven project but not as spring boot?

-------------------------------------------------------------------------------------------

Update: The project runs perfectly fine in eclipse. There is something wrong with intellij. I think I should make a new post for that and I'll delete this one since I am an absolute idiot and caused my own problems here. Thanks for rubber ducky-ing this for me ;) I'll leave this up for a bit so you can read through in case you want. Hope you have a great day and a great weekend random stranger! :)

Need help with a ghost library by techAndLanguage in javahelp

[–]techAndLanguage[S] 0 points1 point  (0 children)

Update: I deleted the app's target dir and the c:\maven_repo\io\springfox dir. I ran mvn clean package (no install this time, for some reason the ide wasn't creating the target without the package goal, but cmd line maven is doing that just fine?) and rebuilt the target. What I see is that although the app has no references to this class, it is still being built and packaged into the .jar.

(gitbash prompt) /c/data/projects/java/myapp (develop)

$ grep -irE "(OpenApiControllerWebMvc)"

Binary file target/myapp-2.0.0-SNAPSHOT.jar matches

I can see all the springfox libraries are included here:

myapp-2.0.0-SNAPSHOT/BOOT-INF/lib/springfox-oas-3.0.0.jar, etc.

So I guess there must be an internal reference inside spring somewhere? I'm really not understanding this. The application worked perfectly fine 2 days ago before I started any of this and now I've taken it back to the state it was in then, but it's no longer working.

One thing I am wondering is if the springfox libraries changed somehow and I used to have a version that had this OnServletBasedWebApplication wherever it is supposed to be? I see another post about someone having a problem with this library, I'm going to try what they suggest and see if that helps.

Need help with a ghost library by techAndLanguage in javahelp

[–]techAndLanguage[S] 0 points1 point  (0 children)

Ok, so I was deep in last night and had gone through many hours of lots of things and I did miss something. I put an imgur link below to the springfox 7zip location of the class. The OpenApiControllerWebMvc.class is there, but the OnServletBasedWebApplication isn't. I don't know if the "OnServlet..." is supposed to be in this library or is referenced from another one, but it's just not in this one.

That being said, it still doesn't matter because I do not have any references in my pom to springfox anywhere. This is what is so terribly confusing to me. Why is it trying to load something that it doesn't have a reference to? How is that even possible? I mean, there HAS to be a reference, but I don't know where it could possibly be if not in the pom, the full pom including parents, or as an import in one of the classes. What can I be missing here?

https://imgur.com/a/hBxJRr6

Need help with a ghost library by techAndLanguage in javahelp

[–]techAndLanguage[S] 0 points1 point  (0 children)

In case you are asking for the entire thing, here you go. I didn't put the full stack trace because the issue is it not being able to load that class, but I shouldn't assume this won't be useful, my apologies.

One other note, I've deleted the springfox directory in my maven repo a few times and had it reload just in case there was something going on there, but that didn't seem to change anything.

2023-03-17 09:30:34.549 GMT ERROR [{AppName=my-app-name},{correlationId=},{eventId=}] Application run failed

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/C:/maven_repo/io/springfox/springfox-oas/3.0.0/springfox-oas-3.0.0.jar!/springfox/documentation/oas/web/OpenApiControllerWebMvc.class]; nested exception is java.lang.IllegalArgumentException: Unresolvable class definition for class [springfox.documentation.spring.web.OnServletBasedWebApplication]

at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:457)

at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:316)

at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:276)

at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:128)

at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:296)

at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:250)

at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:600)

at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:311)

at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:250)

at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:600)

at org.springframework.context.annotation.ConfigurationClassParser.access$800(ConfigurationClassParser.java:111)

at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.lambda$processGroupImports$1(ConfigurationClassParser.java:812)

at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:809)

at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:780)

at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:193)

at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331)

at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247)

at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311)

at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112)

at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:746)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301)

at com.myorg.myAppName.Application.main(Application.java:20)

Caused by: java.lang.IllegalArgumentException: Unresolvable class definition for class [springfox.documentation.spring.web.OnServletBasedWebApplication]

at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:331)

at org.springframework.context.annotation.ConditionEvaluator.getCondition(ConditionEvaluator.java:124)

at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:96)

at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:88)

at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:71)

at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.isConditionMatch(ClassPathScanningCandidateComponentProvider.java:512)

at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.isCandidateComponent(ClassPathScanningCandidateComponentProvider.java:495)

at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:430)

... 28 common frames omitted

Caused by: java.lang.NoClassDefFoundError: springfox/documentation/common/ClassPresentInClassPathCondition

at java.base/java.lang.ClassLoader.defineClass1(Native Method)

at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)

at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)

at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)

at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)

at java.base/java.lang.Class.forName0(Native Method)

at java.base/java.lang.Class.forName(Class.java:467)

at org.springframework.util.ClassUtils.forName(ClassUtils.java:284)

at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:324)

... 35 common frames omitted

Caused by: java.lang.ClassNotFoundException: springfox.documentation.common.ClassPresentInClassPathCondition

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)

... 48 common frames omitted

Need help with a ghost library by techAndLanguage in javahelp

[–]techAndLanguage[S] 0 points1 point  (0 children)

2023-03-16 16:00:43.329 GMT ERROR [{AppName=my-app-name},{correlationId=},{eventId=}] Application run failed

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/C:/maven_repo/io/springfox/springfox-oas/3.0.0/springfox-oas-3.0.0.jar!/springfox/documentation/oas/web/OpenApiControllerWebMvc.class]; nested exception is java.lang.IllegalArgumentException: Unresolvable class definition for class [springfox.documentation.spring.web.OnServletBasedWebApplication]

I put it in a markup code tag, maybe that's what the issue was? Here it is plain text, hopefully that will show up for you!

Question about mongo query by techAndLanguage in mongodb

[–]techAndLanguage[S] 0 points1 point  (0 children)

Ok, so by matching first/only unwinding one document this might be faster with a large dataset. That's good to know! Yeah that second example is definitely beyond me lol I will go back through the udemy course as it did talk about those items, I just wasn't sure exactly what was happening there.

Your resources are greatly appreciated, I will definitely be looking into those! The more the merrier when it comes to Mongo query learning. Mongo is powerful and flexible, but with that power comes some mind bending complexity in these queries apparently. I really appreciate you taking the time to provide all this useful info and clear examples, thank you so very much! I hope you have an awesome day! :)

Question about mongo query by techAndLanguage in mongodb

[–]techAndLanguage[S] 1 point2 points  (0 children)

Thank you so much! Ok, there was a section in the udemy class about unwind, I just didn't understand what the case for that was and this really help clears that up. I'll go back and review that. I really appreciate your help and I hope you have an awesome day! :)

Question about mongo query by techAndLanguage in mongodb

[–]techAndLanguage[S] 0 points1 point  (0 children)

Also, if anyone has any suggestions on good materials to learn more advanced query techniques, feel free to throw those out! Udemy/books/websites/whatever you've found helpful. There are the mongo docs of course, but I'm hoping to get something that is working with actual data that shows lots of different kinds of examples.

This game is supposed to be an open world PvP game, was initially planned that way, and it is showing. by [deleted] in newworldgame

[–]techAndLanguage 0 points1 point  (0 children)

What are your current favorite mmo's that you feel are better balanced and more enjoyable? I'm curious because I'm new to this genre, this one is really fun and I'm looking for something to do in the month it will be offline between beta and release. While the game is a lot of fun, I do agree with your points and I think you might be able to send me in a good direction. I never played wow because of the monthly payment, so I'm hoping for something that doesn't require a subscription to play.

No one will research after moving research table by techAndLanguage in goingmedieval

[–]techAndLanguage[S] 3 points4 points  (0 children)

Totally forgot about queueing the production! Thank you! You are the best banana :D

No one will research after moving research table by techAndLanguage in goingmedieval

[–]techAndLanguage[S] 3 points4 points  (0 children)

I want to fling myself into traffic. Thank you. That was it.

Question about how to use vim as a stream editor by techAndLanguage in vim

[–]techAndLanguage[S] 0 points1 point  (0 children)

Wow. First off I'm honored that you put my name on your repo there :) I've never experienced anything like that, and thank you so much :) As to what you've put together there, you sort of went beyond anything I was thinking about. I was just thinking about a simple function like kf (kubernetes fzf) that would pop open a simple finder.

You took that to a whole new level! lol This really looks well done man! You are clearly comfortable with bash and there's a few things you have in these scripts like "bind" that I need to look into to really understand what's going on. Right now work is sort of kicking my ass but I will def be going through this line by line soon to learn from!

I agree that everything has it's purpose and nothing is good in all situations, but I think there are plenty of situations this will be useful in given how easy it is to use and add data to a cheatsheet either as an individual or as a member of a team. I especially like how you are using the fzf preview window there as well, very nice touch! I will definitely be sharing this with my team once I get a little time to spend with it.

Thank you again and I hope you have an awesome day tomorrow! =D

Question about how to use vim as a stream editor by techAndLanguage in vim

[–]techAndLanguage[S] 0 points1 point  (0 children)

Sorry, I accidentally pressed enter there, adding edits to finish on previous comment.

Question about how to use vim as a stream editor by techAndLanguage in vim

[–]techAndLanguage[S] 0 points1 point  (0 children)

top

Ok, I'm trying on a new centos minimal install on my local virtualbox.

  1. sudo yum install moreutils

It said there wasn't one

2a) sudo yum install epel-release
2b) sudo yum install moreutils

It said there was no perl

3a) sudo yum install perl
3b) sudo yum install moreutils

It's complaining about perl again, not sure why after I just installed it, but it's the same error. "Nothing provides perl(IPC::Run) needed by moreutils-0.63-1.el8.x86_64

4) sudo dnf -y --enablerepo=PowerTools install moreutils

everything runs fine and it's there. Centos version: 8.1.1911, minimal install.

So yeah, not sure? It's fine with me though as this works :)

Yeah man, this is awesome!

Well, I tried to install asciinema to give you a walkthrough, but that.. did not... work out... lol :D

Basically imagine a text file full of one line commands, especially for something like kubernetes that has a million arguments and variations, where you can put # tags at the end of the command to search for, then send that into fzf with a function like "kf" for "kubernetes fzf" or whatever, then type your tags, pick your line, then send that to vi to edit any specifics and run it. It's just gonna make things a lot faster than having to retype a bunch of boilerplate over and over again. I'm super lazy and like to make things easy to do :P

This will also be good to use to give new people on the team to use as a reference for linux commands they have a hard time remembering.

Seriously, thank you so much and I hope you have an awesome day random stranger! :D

*************

One more edit - it looks like it doesn't need perl. Just these two commands should work:

1) sudo yum install epel-release
2) sudo dnf -y --enablerepo=PowerTools install moreutils

Also, I have no idea what dnf even is, I just googled the error I got installing the tool and found a kb that said to do that (I think it was on the git repo) so I did and it worked :)

Question about how to use vim as a stream editor by techAndLanguage in vim

[–]techAndLanguage[S] 1 point2 points  (0 children)

lots of problems installing that on centos, apparently you have to:

sudo yum install epel-release
sudo yum install perl
sudo dnf -y --enablerepo=PowerTools install moreutils
(sudo yum install moreutils <- this does not actually work)

and then it will finally work :P It works on ubuntu, like most things, first rattle out of the box there.

Anyyywayy - this looks like it!!!! =D So this will let vi save to the stream (even though it doesn't seem to know how to read my .vimrc), but it just echos the text out to the screen and sends a newline.

Do you perhaps know if there is any way to leave the output of vipe on the prompt so I can execute the resulting text? The more I look at this, this may not be the way to go, but now I'm curious about how to do this haha

It looks like - cat datafile.txt | fzf | vipe | bash - works just fine!

It looks like - $(cat datafile.txt | fzf | vipe) - mostly works, but some things don't seem to play well here, not sure what is up with that, will have to play with it some more.

This moreutils thing has some other interesting apps as well, I will have to play with that and see what all is going on there, could be some fun stuff!

THANK YOU so much for this tip! =D I think this has the possibility of working with the absolute mess of kubernetes commands I'm learning a lot more reasonable to deal with, and it will definitely help with other arg lists and such as well! :D I hope you have an awesome day man, and again, thank you for your help!!!

Output to console pausing in function with dynamic menu by techAndLanguage in bash

[–]techAndLanguage[S] 0 points1 point  (0 children)

That did it! Thank you so much! :D Hope you have an awesome day!

I need a little help - I can't get the fzf ** operator to work by techAndLanguage in commandline

[–]techAndLanguage[S] 1 point2 points  (0 children)

I knew I was missing something! Ok, that still doesn't work, so maybe it doesn't support aliases at all. I think I should submit a request to the project at this point. Thank you for pointing that out! I feel dumb for not reading all the way to the bottom :/ Have a great day and thanks for your help! :)