3,173,207 events, 1,614,166 push events, 2,505,253 commit messages, 195,046,358 characters
Part 2 of Code Challenges in Python
damn these are fucking hard i honestly don't understand how i managed to get the right answer for some of these
-Disabled Iron Deposit in BluffPeaks Dev Notes: Was previously added but isnt very polished/at the right quality and may be re-added in the future -Revamped various textures -Added Jacaranda Bush & Flowering Jacaranda Bush Dev Notes: These exciting new blocks can be found exclusively in the Jacaranda Forest, bonemeal regular bushes to get flowering bushes (bees love them!) further bonemealing a flowering jacaranda bush will grow a tree similar to a sapling (doesnt randomly tick to grow tree!) -Fixed 2 block-tall flowers only generating 1 block -Lowered Bee Spawnrates Dev Notes: Our Buzzy friends tend to be a bit much in the BYG biomes so we are lowering them to be more of a rare find.
fuck you scripts
Signed-off-by: Omkar Chandorkar [email protected]
Fleet Intelligence Rework, Torpedoes:
- The main motivation for this was to get around a problem minifying the intel system with the latest version of MDK ( though the problem is with Microsoft Rosyln)
- As a side effect, it freed up around 5000 characters we can use.
- New intels can be added a bit easier since some of the com framework is generic typed.
- Small change to Torpedoes to allow more than 8 cameras per missile. People love their cameras.
- Fixed a degenerate case crash when AtmoDrive is initialized on a ship without a cockpit.
"11:15am. Am I getting sleep during the night or not? I can't tell anymore. But it definitely was not deep. But I am not completely exhausted.
Well, nevermind this. Let me chill a bit and then I will start. The first order of business is to take care of that compiler bug. After that I'll bring back the old core. I can't be bothered to fix the docs and the test cases.
11:40am. Let me find that bug.
let file_build (s : SupervisorState) mid (tc : WDiff.ProjStateTC, prepass : WDiffPrepass.ProjStatePrepass) =
let _,b = tc.files.uids_file.[mid]
let x,_ = prepass.files.uids_file.[mid]
Hopac.start (b >>= fun (has_error,_) ->
if has_error then fatal $"File {Path.GetFileNameWithoutExtension file} has a type error somewhere in its path."; Job.unit() else
This is the wrong has error. Let me track it down.
member _.file(name,state,x) =
let x = wdiff_file_update_state funs_file_tc x state
let env =
typechecker_results_summary x.result >>-* fun (has_error,env) ->
has_error, match name with None -> env | Some name -> in_module name env
x,env
Hmmm....
11:45am. I know what the error is, but I am not sure how to fix it.
11:55am.
let file_build (s : SupervisorState) mid (tc : WDiff.ProjStateTC, prepass : WDiffPrepass.ProjStatePrepass) =
let a,b = tc.files.uids_file.[mid]
let x,_ = prepass.files.uids_file.[mid]
Hopac.start (a.state >>= fun (has_error',_) ->
b >>= fun (has_error,_) ->
if has_error || has_error' then fatal $"File {Path.GetFileNameWithoutExtension file} has a type error somewhere in its path."; Job.unit() else
I've gone over this, and I don't know whether there is a better way. But this should be the ||
of the errors coming in, and the errors in the module.
Let me give it a try.
Yeah, it works. Let me deal with core.
12:10pm. I put the old core back in and modified the array operations so they use the new ops. I have no idea why I haven't done this earlier.
Let me publish the patch. Also let me add a new entry to the readme.
12:15pm. Sigh, the router is acting up again and the package is not going through. This is going to be huge trouble once I have my agents ready. I guess I'll just buy a router out of my own pocket at that time. My father told me he is keeping this one around because it is programmable. Well, it might be programmable, but also belongs in the trash.
12:35pm. Let me reset the damn router.
12:40pm. These Internet connection issues are killing me. I reset the router and the regular browsing seems more responsive now, but the plugin still won't go through. I meant to push the commit here and have breakfast, but I guess I'll leave it until I managed to publish the patch.
12:45pm. It seems I am have more trouble publishing the patch than actually fixing the bug. Let me leave that aside for later.
...The OVSX went through.
1) Free up the UI loop while training is being done in the background. Right now the chart is not even updating while the training is going on.
2) Integrate this with the game and play against the CFR agent.
3) Optimize the whole program. Right now the training is way to slow. It will take forever once I move on to flop poker.
These will be my goals for the day.
If it was .NET, I'd just implement the training server as an agent and have the UI send messages to it. What about Python? Does it have anything I can use for agent based concurrency? Or channels?
https://stackoverflow.com/questions/19130986/python-equivalent-of-golangs-select-on-channels
Let me read this. Google suggested it to me.
1pm. https://docs.python.org/2/library/multiprocessing.html#multiprocessing.Pipe https://docs.python.org/2/library/threading.html#threading.Thread
Mhhh, I have to make time to study this.
1:05pm. Oh, it finally went through. Let me commit here and have breakfast. I am going to watch some Python concurrency vids after that and play around with this. I still have no idea how Python can have concurrency given the GIL, but I guess I'll find out."
stupid code I hate this game stupid ass devs
resized the sniff sprite so you can see everything and I fiddled with the platforms
implement full dynamic loading. fairly major change that involves:
- moved the main loop to bot.py
- use very safe and pythonic globals() fuckery to call {cog}.loop.main() for each loaded cog
- break existing extensions (hell yeah)
- rename friiUpdate.py (rip in spaghetti)
- stealthy frii-config bump
[CIT-304] Migrate tedge config to use the new tedge_config crate (#168)
-
Disentangle TEdgeConfig from
tedge config
CLI -
Disentangle
tedge config
commands from CLI parsing -
Do all the parsing in
config/cli.rs
. -
Commands are defined in
config/commands/*.rs
. One (sub-)command per file. -
The implementation of the commands become easier to read and understand, and you can test each command independently.
-
Do not list valid keys when running
tedge config [get|set|unset] --help
-
When running
tedge config get --help
, the output is now:ARGS: Configuration key. Run
tedge config list --doc
for available keys -
Prior to this commit, a list of keys was shown after the
<key>
, but formatting was pretty ugly. -
The list of valid keys was generated by the macro. Get rid of it. IMHO this was a mistake in the first place.
-
Instead, point the user at running
tedge config list --doc
for a list of valid keys. TODO: Currently thetedge config list --doc
output does not mention whether a given key is read-only or not. -
If we want the previous behaviour, it's better to just maintain the list of valid keys in the structopt comment.
-
tedge_config - Fix KEY's of some ConfigSettings
These are the keys that are used in tedge/tests/main.rs.
-
Use crate tedge_config in
tedge config
CLI -
Add
ConfigSettingAccessorStringExt
trait totedge_config
. We need that in order to get/set keys as strings. It provides aquery_string
,query_string_optional
andupdate_string
methods. -
Provide a default implementation for
ConfigSettingAccessorStringExt
for all ConfigSettings onTEdgeConfig
. -
Introduce newtype
FilePath
and get rid ofPathBuf
inTEdgeConfig
andTEdgeConfigDto
. We need this becausePathBuf
does not implementTryInto<String>
which we need for the default implementation mentioned in the previous step. -
Make
TEdgeConfig
clonable. This is required when we update or unset a config setting in cli/config/commands/{set,unset}.rs. In the command we receive aconfig: TEdgeConfig
, but as we are accessing it through the&self
inexecute
, we cannot modify it. To get a mutable version ofconfig
, simply clone it. -
For those
tedge config
commands that need to write a configuration back, inject aTEdgeConfigRepository
. TODO: We should already inject theTEdgeConfigRepository
inbuild_command
. -
Get rid of parts of the macro. We still need to keep parts of it around for the other commands.
-
Pass BuildCommandContext to BuildCommand::build_command
-
This allows to inject TEdgeConfigRepository for commands that need to write a config.
-
Especially useful during the migration period, where we can still provide
build_command
with an old config::TEdgeConfig. -
TODO: Some tests failing. I think some of the test conditions are wrong!
-
Fix test
-
We changed the default value
-
When writing tedge.toml, create parent directory
-
This fixes the tests.
-
Create $HOME/.tedge or /etc/tedge if it does not exist yet.
-
This needs some more love. Permissions should be set correctly.
-
Remove underscored from trait definition
-
Split TEdgeConfigDefaults from TEdgeConfigLocation
-
TEdgeConfigLocation
only tells us something about where thetedge.config
is located (and about it's root directory). -
TEdgeConfigDefaults
only tells us something about the default values used inTEdgeConfig
as fallbacks. -
Both of them are independent entities.
-
You can derive
TEdgeConfigDefaults::from(&TEdgeConfigLocation)
. -
Drop
Clone
- Useconfig_repo.load()
instead ofconfig.clone()
-
Silence a few clippy warnings
-
Rename BuildCommandContext to just BuildContext
window: make WM_CHANGE_STATE code configurable
This behavior really annoys me, so I'd like to make it configurable that we do this at all.
As an alternative, I'm open to some code that "resurrects" these windows, but frankly I don't love that either, and would rather they just stick around when not focused.
Closes #2149
Signed-off-by: Tycho Andersen [email protected]
Purge all evil and misbehaving packages
-
evil-mode: I spent 2 years with this package and finally realized that it was causing me more trouble than it's worth. Trying to get major-modes to use evil bindings was painful and broken. Evil was also slow and didn't work well when in a terminal.
The major reason though: even though I used vi for 10 years when I was younger, my older brain just couldn't keep track of what state I was in and what keys I could use at any one point. I'm done with modal editing.
-
doom-themes: While some of these themes are very pretty, they have a major flaw: all isearch matches are highlighted in the same damn color. You can't tell which match is the current one unless you look really hard for where the cursor is. This appears to be by design.
-
treemacs: I don't use this. It's pretty and I wanted to like it. But I don't use an IDE for a reason. I don't need an ever present directory layout view. What's the point?
Did Big Boo's Haunt (Kinda)
I'll be honest here, these textures suck, and almost every single one of the originals is just the original textures, so this isn't even very useful, and it doesn't look good either, I just did this so I could check this off, and I won't have to think about this again, as they say, out of mind, out of sight, and I'd honestly rather have these textures be out of sight.
"2:20pm. Let me do the chores here.
2:50pm. Let me start.
https://docs.python.org/3/library/multiprocessing.html
The docs for this are quite good and I can already see that multiprocessing is what I should study. In fact, the doc says at the outset that I should use multiprocessing if I want more than just a single thread.
But still, let me do a bit of research. I'll see whether there is a video on multiprocessing on Youtube.
...No these all seem like simple tutorials. Nevermind them. Let me play around with examples then.
https://docs.python.org/3/library/multiprocessing.html#multiprocessing-programming
Ensure that the arguments to the methods of proxies are picklable.
This is something that has me worried. Don't tell me it is pickling these. If so I am going to have to account for these kinds of transfers.
3:10pm. Focus me, stop surfing /g/ on the side. Read the multiprocessing docs.
https://docs.python.org/3/library/multiprocessing.html#connection-objects
Return the file descriptor or handle used by the connection.
Damn it, these things literally communicate through files. I suppose in this case the files might be memory mapped, but it is no possible that performance of this would ever be good.
3:55pm. Ugghhhhhhhhh...
I should try it out, but I doubt that Cython cdef objects will be picklable.
What should I do here? I really do not want to use multiprocessing. It is obviously the wrong thing for the job.
https://stackoverflow.com/questions/35275323/python-gui-threading
https://realpython.com/python-pyqt-qthread/
Let me take a look at this last thing.
Fortunately, there are some techniques you can use to work around this issue. A commonly used solution is to run your long-running task outside of the application’s main thread using a worker thread.
Worker threads? In Python? My current understanding is that Python cannot have multiple concurrent threads and just emulates them using a single one. If I am wrong that will simplify my life a lot.
In Python’s C implementation, also known as CPython, threads don’t run in parallel. CPython has a global interpreter lock (GIL), which is a lock that basically allows only one Python thread to run at a time.
This can negatively affect the performance of threaded Python applications because of the overhead that results from the context switching between threads. However, multithreading in Python can help you solve the problem of freezing or unresponsive applications while processing long-running tasks.
4:10pm.
QThread isn’t a thread itself. It’s a wrapper around an operating system thread. The real thread object is created when you call QThread.start().
https://realpython.com/python-pyqt-qthread/#using-qthread-vs-pythons-threading
I was just wondering about this.
Hmmm, could I use Python's threading
to offload long running tasks. Maybe it itself can get around the GIL. I don't know.
4:10pm. Ok, so PyQt does have threads pools, which is proof that is possible in Python. This is evidence enough that I won't need to spawn multiple processes just to get responsive GUIs. If PyQt had the advantage of actual true threads and threading
did not, they would definitely advertize it. This is proof that threading
can do it as well.
4:30pm. Had to take a break. Forget multiprocessing. Let me check out multithreading.
4:35pm. https://realpython.com/intro-to-python-threading/
Let me read this first and then I will move to Python docs.
If you are running a standard Python implementation, writing in only Python, and have a CPU-bound problem, you should check out the multiprocessing module instead.
You know what, threading will be fine. Yes, the task is IO bound. But the UI itself is not CPU instensive, at least it should not be. Using multiprocessing will turn into a serialization and a maintenance nightmare. The Cython backend is not structured towards passing Python types effortlessly.
4:50pm. https://docs.python.org/3/library/threading.html
I skimmed the other article let focus on this page here.
It would be doable to make a multiprocessing based solution in Spiral, but the dictionary already took up enough of my time. I can't afford to wrestle with serialization issues. threading
will do.
If you want your application to make better use of the computational resources of multi-core machines, you are advised to use multiprocessing or concurrent.futures.ProcessPoolExecutor.
Actually what is this last one? Forget it, it is based on processes.
.NET has a huge advantage over Python in concurrency, almost as much as Python has in ML.
.NET's approach will definitely win long term on CPUs. Maybe once more restricted AI chips than GPUs get here, .NET will become a viable platform for ML. But for now I'll take my hacks. My cuts and bruises.
5pm. What is next? Let me think.
5:10pm. I see it. Communicating with the GUI itself is not a problem.
I need to figure out how to make an agent. Once I do that I am set. Let me take a look at that first SO question.
https://stackoverflow.com/questions/19130986/python-equivalent-of-golangs-select-on-channels https://docs.python.org/3/library/queue.html
Does using get
block the thread?
Queue.get(block=True, timeout=None) Remove and return an item from the queue. If optional args block is true and timeout is None (the default), block if necessary until an item is available.
Yes, it is as I expected. Ok.
https://docs.python.org/3/library/queue.html
What is task_done
supposed to be doing?
///
See also Class multiprocessing.Queue A queue class for use in a multi-processing (rather than multi-threading) context.
collections.deque is an alternative implementation of unbounded queues with fast atomic append() and popleft() operations that do not require locking and also support indexing.
///
https://docs.python.org/3/library/collections.html#collections.deque
Deques are a generalization of stacks and queues (the name is pronounced “deck” and is short for “double-ended queue”). Deques support thread-safe, memory efficient appends and pops from either side of the deque with approximately the same O(1) performance in either direction.
5:30pm. No, I require blocking gets for when the queue is empty.
https://goless.readthedocs.io/ https://github.com/stackless-dev/stackless/wiki
What is this?
Thought it is doable, I am really leaning towards getting an existing channel or agent library.
https://pypi.org/project/pygolang/
This even supports Cython.
6:25pm. https://www.youtube.com/watch?v=IEEhzQoKtQU
I am thinking about it. Let me watch this tut. As expected, concurrency quickly turns into a nightmare of complexity.
With the system I have now, even though it freezes the UI, I still have my sequential guarantees. That will fly out the window once I start putting in threads.
https://goless.readthedocs.io/en/latest/#a-references
This is not good, it cannot pool on the channel. I am going to have to do as in the SO question using queues and threads after all.
6:35pm. https://youtu.be/IEEhzQoKtQU?t=1081
This is worth watching. I would not have figured out the thread pool executor on my own.
6:50pm. Let me have lunch here. I am still thinking about it.
7:25pm. Done with lunch.
1) Free up the UI loop while training is being done in the background. Right now the chart is not even updating while the training is going on.
2) Integrate this with the game and play against the CFR agent.
3) Optimize the whole program. Right now the training is way too slow. It will take forever once I move on to flop poker.
I've planned out how to do the first point. I've had all day to think about it, and threading and queues are the way to go. I am not going to bother with special libraries for this. All sort of issue come up when the move from sequential to concurrent is done and it is a huge problem. I've forgotten how hard it really is.
I'll also give up multiprocessing for the time being. For this to be sound I'd need to deal with inter process serialization and they would be too much work.
Spiral uses its own types everywhere, and it would be hard to do this quickly. Not to mention, all sort of difficulties that I can't anticipate right now would crop up. For example, with multithreading I can call functions in ui_train.py
module, but what if that was in a different process? I'd need to write extra manual interop code to get around the limitation.
It is simply a poor idea, if I needed this level of concurrency I'd just move to .NET. The UI won't use up the CPU too much, and even when GPU training starts getting done, most of the time will be waiting for the GPU operation to complete after which the thread will block.
In fact, tabular CFR training will be a lot more taxing on the CPU than the neural net one.
7:35pm. Let me stop here for the day. I want to do a good job and think things through, but progress is just so slow. That impacts my motivation to do the work negatively.
But at the very least I will do the UI tomorrow. Then I will move to the other points.
Once I deal with sampling tabular CFR, it will be time to move to the neural version. I will have a true trial of insight and skill at that time. Until then, all I can do is plug along.
Maybe things will get more fun once I have trained agents and can play against them.
I wish that one day I will understand the algorithms that underlie intelligence."
Replace OCO entry with new one
- URLs: Link both original and unofficial update.
- Load after all three versions of the male body replacer, otherwise the BP will overwrite some of OCO's race changes.
- Requires:
- OBSE, starting from version 2.
- Blockhead, starting from version 2.
- Tags:
- Actors.ACBS: Makes some NPCs female.
- Graphics: Changes models/icons of some hair and eyes.
- NPC.{Eyes, FaceGen, Hair}: The point of the mod is changing how NPCs look, so these are obviously needed.
- R.*: Changes a bunch of visuals for races. Also kind of points out that we need an R.FaceGen tag for the BP.
- Message: Link the BP Eyes Fix. Would love to fix this for good in WB, but I have no idea how 'googly eyes removal' works :/
- Cleaning data: 2 ITMs, an EYES and a HAIR record.
Adding new modules and make it compatible with fucking Windows.
FUCK YOU MICROSOFT FOR YOUR SHITTY OS
NASA.py
This is me mocking my friend's abilities to hack shit.
Fuck you zach this is the official way of adding content go fuck yourself
Fuck you zach this is the official way of adding content go fuck yourself
No More Watermark Fuck You
No More Watermark Fuck You
Add files via upload
UPD 10.2.0 (by Middlewared, Rachael, Plaze) Changes:
- Added a new start perk - Sissy brother mode. It can be enabled only in the character creation menu and can't be disabled in the game
- Added a related section in the Help menu
- Added a training scene with a sister to activate an erotic scene, corruption is more than 40, and a relationship with a sister is more than 40
- Added a scene with a sister on the sofa (sofa). For activation, you need a corruption of a sister more than 30 and a relationship with a sister less than 20
- Added a scene to spend the night with my sister. To activate the erotic scene, you need a relationship with a sister more than 30 and corruption of the main character more than 40, but other options are also spelled out
- Problem Solver: Everyday check was improved greatly. Now, if the value of the setting doesn't equal to 'true' of 'false' it takes the last valid value. Quite simple, but it took ages for me to build it