| Off Topic > Off Topic |
| Programming Megathread |
| << < (35/241) > >> |
| ZSNO:
--- Quote from: Foxscotch on November 09, 2015, 02:17:03 PM ---the first one shuffles the list until it's sorted --- End quote --- https://en.wikipedia.org/wiki/Bogosort My favorite is Quantum Bogo Sort http://c2.com/cgi/wiki?QuantumBogoSort |
| Foxscotch:
ugh the only problem I have with pycharm is that you can't magically suppress inspections for just one piece of code for example, I have a class that inherits another class, but I specifically do not want to call the parent class's __init__ method because the new one does the same thing but with some added functionality but pycharm highlights the new init method, because calling the parent's init method is the normal thing to do. which is a small annoyance, but an annoyance nevertheless the only option for preventing this is an ugly comment above the method definition, or to disable it globally I guess it wouldn't hurt much to disable it, I'm sure I'd remember to do it in a normal situation, but idk the point is, why not just keep a small database or something, with all the methods/functions/lines/whatever, and the inspection you want to suppress? that would mean that other people wouldn't get that same suppression automatically, but I think that's okay, because this seems like the kind of thing that people would want to decide on an individual basis |
| Ipquarx:
--- Quote from: Foxscotch on November 09, 2015, 02:17:03 PM ---a while ago I got bored at work and made two functions that that reminds me of http://pastebin.com/Txff6SR5 the first one shuffles the list until it's sorted --- End quote --- that's actually called a bogosort and it has an average runtime of O(n!) |
| Foxscotch:
I knew it was already a thing, but I've only heard it called "stupid sort" before now |
| Foxscotch:
the other day I was looking for something I could use to convert a bunch of markdown files that make up a collection of stories into a bunch of corresponding HTML files I tried several tools, but I didn't quite like the way any of them did it. the most obvious problem was that the vast majority of existing static site generators are designed for blogs, and are mostly useless for anything else. Hyde almost seemed good enough... but the documentation for it was abysmal. so even the things I knew it could do, I had no idea how to make it do them the obvious solution was to make my own https://github.com/foxscotch/Ocelot https://pypi.python.org/pypi/Ocelot if you have python and pip (which usually comes with python), it can be installed very easily by typing "pip install ocelot" into a command line I like it. it's not perfect, but it does what I need at this very moment. some of it is kinda cool in my opinion if you know python and want to contribute, be my guest. pls be my guest. pls until I write a real tutorial (which I do intend to do tomorrow), I guess you'd just have to figure it out on your own an example config file would probably help so here's one |
| Navigation |
| Message Index |
| Next page |
| Previous page |