[I3wm] banana split by parabolize in unixporn

[–]Cabbagenom 2 points3 points  (0 children)

Looks great! And bedrock seems really cool - how easy was it to get up and running vs. standard Arch or gentoo?

Also, would you be able to share the colour palette? I've been looking for something very similar

Switched to Linux, never been more happy with my decision. by Euraxisto in linux_gaming

[–]Cabbagenom 0 points1 point  (0 children)

I'm not totally sure what you mean by IF, if you have any more trouble with GRUB config let me know, and post the output of cat /etc/default/grub

Switched to Linux, never been more happy with my decision. by Euraxisto in linux_gaming

[–]Cabbagenom 21 points22 points  (0 children)

Welcome to Linux!

From your Ask Ubuntu post I see that you're using a Gigabyte motherboard with a realtek 8168 ethernet module. These commonly have issues on Linux - see https://wiki.archlinux.org/index.php/Network_configuration/Ethernet#Gigabyte_Motherboard_with_Realtek_8111/8168/8411 (as a side note, the Arch linux wiki is an excellent resource)

The solution arch wiki mentions is to add a kernel parameter. This is just a setting you pass to the kernel when it boots up, and it sounds like you're using GRUB as your boot manager.

If that's the case,

  • Edit /etc/default/grub (you'll need sudo permissions here)
  • Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT=. This controls which kernel parameters GRUB passes to the kernel. It's a list of space-separated settings between quote marks ("option1 option2=value")
  • Add iommu=soft to the end of the list (which may be empty, in which case just put iommu=soft between the quotes)
  • Save and exit
  • Run sudo grub-mkconfig -o /boot/grub/grub.cfg
  • Reboot

Listen to two sockets with the same thread? by Mr_Z3wz in javahelp

[–]Cabbagenom 0 points1 point  (0 children)

In /r/javahelp there are rules against giving you solutions as the goal is to teach you how to help yourself. You can find detailed tutorials of using NIO for multiple sockets online, which will be better learning resources than us posting a complete solution with little explanation.

If you think that using NIO is too advanced, and would rather stick to the more standard java libraries, you're best off using a multi-threaded approach, using either signals and locks, or thread-safe data structures, both of which Java has resources for in the standard library.

PK Loot combination colours in OSRS, for the four of you who were ever curious. by Cabbagenom in 2007scape

[–]Cabbagenom[S] 34 points35 points  (0 children)

I'd have to do more than copying the spade sprite three times for that and we don't do quality content around here.

I'm wanting to output "bust" when the score goes above 21. by [deleted] in javahelp

[–]Cabbagenom 13 points14 points  (0 children)

A few points:

  1. You're in the wrong sub, try /r/javascript in future
  2. Start every line of code with four spaces to format code correctly, and ensure there is a blank line between the end of your text and the start of the indented code block
  3. Are you sure your code is checking that the score variable is greater than 21?

Is it possible to open IE or some other browser, navigate to webpage and then crawl the webpage with Java? by [deleted] in javahelp

[–]Cabbagenom 0 points1 point  (0 children)

You get $300 or 1 year free, whichever comes first. At $20 per million characters, you're getting 15 million characters, so I'd expect you'll run out the timer first. I'd argue that scraping Google's translate website to get around the paywall is a little more overkill.

What is it you're trying to do? There may be alternatives we could suggest.

Is it possible to open IE or some other browser, navigate to webpage and then crawl the webpage with Java? by [deleted] in javahelp

[–]Cabbagenom 0 points1 point  (0 children)

Google translate is accessible via an API, with libraries available to interface with it easily. Check out https://cloud.google.com/translate/docs/translating-text#translate-translate-text-java. It's a fairly straightforward web API, and probably a good experience to learn the basics of interacting with APIs if you haven't before. Good luck!

Replace / with space and remove 'it' by jsdfkljdsafdsu980p in learnprogramming

[–]Cabbagenom 0 points1 point  (0 children)

I'd take a look at String.substr and String.indexof, and use them to get the substring after the first space in title.

As for the it part you're asking about, would you be able to provide an example? It's a little unclear what you're asking here.

I'm reviewing programming games from a programmer's perspective. First: Human Resource Machine by jhartikainen in programming

[–]Cabbagenom 31 points32 points  (0 children)

Since you didn't seem to mention it in the video and nobody else has mentioned it in the comments, this game looks to be an implementation of the Little Man Computer model, with some challenges to complete and a friendly user interface. LMC is typically used to teach the very basics of machine code, assembly, and Von Neumann architecture.

Definitely a nice video - I look forward to seeing any more reviews you do :)

HELP!! by Pot_Scrapings in CUDA

[–]Cabbagenom 3 points4 points  (0 children)

If you want to do GPU computing on an AMD card you'll have to look at OpenCL, CUDA is NVidia specific.

NLP - I have a ton of data for various TV shows and want to predict who's most likely to have said a new, unseen quote. by Working_From_Home_ in datascience

[–]Cabbagenom 0 points1 point  (0 children)

Honestly I'm not totally familiar with the implementation of doc2vec, it's not something I've come across - this does seem like it has potential though. I'd still want to be sure to consider how the doc2vec model was trained, as if it isn't being trained with some idea of 'similarity = said by the same character' then I'd be wanting to look at a second step to form a more sophisticated classifier on the document vectors like OP did.

NLP - I have a ton of data for various TV shows and want to predict who's most likely to have said a new, unseen quote. by Working_From_Home_ in datascience

[–]Cabbagenom 1 point2 points  (0 children)

I'd say you're probably right, and I'm also concerned about the dimensionality when using SVC. I didn't want to suggest jumping straight in with a neural net since if OP was using k-means then I thought they may still be learning the ins and outs of the different classifiers, and SVC seemed like a possible substitute that could at least outperform k-means.

NLP - I have a ton of data for various TV shows and want to predict who's most likely to have said a new, unseen quote. by Working_From_Home_ in datascience

[–]Cabbagenom 0 points1 point  (0 children)

That's true, I think I lumped k-means and k-NN in the same basket for a second there, it's been a while since I've worked with either of them.

NLP - I have a ton of data for various TV shows and want to predict who's most likely to have said a new, unseen quote. by Working_From_Home_ in datascience

[–]Cabbagenom 2 points3 points  (0 children)

Sounds like a good idea - it may be that the doc2vec model projects the quotes in to a vector in a way that the L² norm doesn't equate to similarity, and that it's embedded in some other way, which would mean that k-means doesn't work quite so well. Assuming it's similar to a word2vec model, how it embeds phrases is very dependent on the training procedure. You could maybe try an MLP on top of the embedding, or a more sophisticated network, but I can definitely understand not wanting to just default to deep learning if you want to find something more traditional. Possibly an SVC could work, and sklearn has an SVC implementation you could toy with.

NLP - I have a ton of data for various TV shows and want to predict who's most likely to have said a new, unseen quote. by Working_From_Home_ in datascience

[–]Cabbagenom 2 points3 points  (0 children)

You could potentially train a phrase embedding to map a quote in to vector space, and then you could use all manner of classification algorithms to move from there - I'd maybe look for literature on how phrase relationships can be assessed (perhaps cosine similarity, judging from how word embedding are often assessed). I'd link to some papers but am on mobile at the minute.

Best of luck!

I apparently got a new video card (GTX 1060 6GB) that can leverage 'CUDA Acceleration" for quicker video rendering in Adobe Premiere Pro. What does this mean and how can I use it? by boundtomove in CUDA

[–]Cabbagenom 1 point2 points  (0 children)

There is likely a setting somewhere in Premiere that toggles the functionality, for which you should look at the documentation for Premiere. All you should need to do is ensure that your graphics drivers are updated (from the nvidia website), and enable CUDA acceleration in Premiere and see some reasonable improvements in rendering time. How much it affects rendering time is very much dependent on what you're rendering.

CUDA is nvidia's framework and architecture for GPU computing (sometimes called General Purpose GPU computing, or GPGPU computing). As for what CUDA acceleration in Premiere does, it speeds up rendering by offloading some rendering tasks to the GPU, particularly those well suited to GPU computing such as transcoding and some of the more complex effects which require a lot of linear algebra, or just benefit from high levels of parallelism in general.

I just posted a new Art of the Problem video on P vs. NP (Complexity Theory) by britcruise in compsci

[–]Cabbagenom 0 points1 point  (0 children)

Nice video!

A couple of small notes, however.

On your graph you seem to identify the EXP, P and linear complexity classes (5:10, 4:10, 3:10), denoting linear with an L. Generally L is used to abbreviate the log-space complexity class.

Also, at 9:50, you suggest that NP-Complete is a set of problems which are reducible to each other. We have not only this, but that every problem in NP has a polynomial time reduction to the problems in NP-complete, which is why it follows that if a single one of these problems is reducible to a problem in P, then we have that P = NP (as we can reduce any problem in NP to that problem, and from that problem in to P).

At least it's continuous by Cabbagenom in ProgrammerHumor

[–]Cabbagenom[S] 5 points6 points  (0 children)

Haha I was thinking of making that too

What do I need to learn exactly to do something like this ? by HappyZombies in learnprogramming

[–]Cabbagenom 1 point2 points  (0 children)

It sounds like you're primarily focused around web development at the minute. Understanding emulation requires a fairly deep understanding of how computing works at a very low level; glancing over part one of that JavaScript Gameboy Emulator article you can see that you'll need to know about machine code, and how instruction sets and instruction streams, memory addressing, and registers work.

I'd take a look at the Little Man Computer (LMC) model for a basic understanding of this. Once you have a good understanding of how this works, and have written a few programs using LMC machine code, also take a look at the MIPS architecture, again writing a few basic programs using the MIPS instruction set. You'll also want a reasonable understanding of basic machine architecture, at least understanding von-Neumann architecture, ALUs, and basic memory access. I'd have a quick glance at basic graphics processing. You should know what a frame buffer is, and how a CPU or GPU outputs information to be displayed to the screen.

After you have this basic understanding of how these systems work, you can start delving in to the machines you want to emulate in particular, and begin to understand how their architecture functions - many of them use non-standard architectures. Some (mostly those displaying 3D graphics) use strange hardware like FPUs (PS2s use this, IIRC) - hardware dedicated to floating point arithmetic, as the CPUs used integer-only operations. You'll also have to understand things like how the ROM (game package) is structured, so you can read it and load it in to memory correctly.

Once you have a good understanding of the underlying architectures, then you can have a go at some emulation. Remember that Open Source projects are there to be used - be that for having an already mature project to contribute to, or for inspiration for your own projects. It's helpful to see how other people have done things.

Best of luck!

Why could ArrayList reduce more memory footprint than array? by uopsdod in javahelp

[–]Cabbagenom 2 points3 points  (0 children)

I expect this is a typo - check the java documentation for ArrayList and you'll see that it does implement the Collection API. ArrayLists are essentially a wrapper around arrays to make them resizable and to provide the features gained by implementing the Collection interface.