skip to navigation
OpenMediaVault

shadownsocksR苹果

Last update: August 03, 2023 07:48 AM UTC

shadownsocksR苹果


OpenMediaVault

A Hundred Days of Code, Day 026 - Refactoring

Worked only an hour today.
Trying to change the little lookup program, I made the other day, into something a little better.

Not quite a good day.
Calling it quits early.


August 03, 2023 07:30 AM UTC


OpenMediaVault

Django bugfix releases issued: 3.0.9 and 2.2.15

Today we've issued 3.0.9 and 2.2.15 bugfix releases.

The release package and checksums are available from our downloads page, as well as from the Python Package Index. The PGP key ID used for this release is Mariusz Felisiak: 2EF56372BA48CD1B.

August 03, 2023 07:28 AM UTC


Janusworx

A Hundred Days of Code, Day 025 - Comprehension Exercises

Working on Comprehension exercises today.

Reflections and Experience

Read more… (1 min remaining to read)

August 03, 2023 07:27 AM UTC


Test and Code

openmediavault download | SourceForge.net:Download openmediavault for free. The open network attached storage solution. OpenMediaVault is the next generation network attached storage (NAS) solution based on Debian Linux. It contains services like SSH, (S)FTP, SMB/CIFS, DAAP media server, RSync, BitTorrent client and many more.

OpenMediaVault(omv)启用社区插件-安装omv-extras - 菜鸟之志:2021-4-29 · OpenMediaVault支持插件安装,点击左侧菜单的“系统”>“插件”,右侧列表显示了可用的插件,可伍把这些插件理解为官方插件,插件不是很多;还好,来自开源社区的开发者为OpenMediaVault贡献了许多好用的插件,想使用更多社区的插件,需要启用 ...

Often, when you run pip, especially the first time in a new virtual environment, you will see something like:

WARNING: You are using pip version 20.1.1; however, version 20.2 is available.

You should consider upgrading via the 'python -m pip install --upgrade pip' command.

And you should. Because 20.2 has a new dependency resolver.

Get in the habit, until October, of replacing pip install with pip install --use-feature=2023-resolver.

This flag is new in the 20.2 release.

This new pip dependency resolver is the result of a lot of work.

Five of the people involved with this work are joining the show today: Bernard Tyers, Nicole Harris, Paul Moore, Pradyun Gedam, and Tzu-ping Chung.

We talk about:

Special Guests: Bernard Tyers, Nicole Harris, Paul Moore, Pradyun Gedam, and Tzu-ping Chung.

OpenMediaVault

Support Test & Code : Python Testing for Software Engineering

Links:

<p>pip is the package installer for Python. </p> <p>Often, when you run pip, especially the first time in a new virtual environment, you will see something like:</p> <blockquote> <p>WARNING: You are using pip version 20.1.1; however, version 20.2 is available.<br><br> You should consider upgrading via the 'python -m pip install --upgrade pip' command.</p> </blockquote> <p>And you should. Because 20.2 has a new dependency resolver.</p> <p>Get in the habit, until October, of replacing <code>pip install</code> with <code>pip install --use-feature=2023-resolver</code>.<br><br> This flag is new in the 20.2 release.</p> <p>This new pip dependency resolver is the result of a lot of work.<br><br> Five of the people involved with this work are joining the show today: Bernard Tyers, Nicole Harris, Paul Moore, Pradyun Gedam, and Tzu-ping Chung. </p> <p>We talk about: </p> <ul> <li>pip dependency resolver changes</li> <li>user experience research and testing</li> <li>crafting good error messages</li> <li>efforts to improve the test suite</li> <li>testing pip with pytest</li> <li>some of the difficulties with testing pip</li> <li>working with a team on a large project</li> <li>working with a large code base</li> <li>bringing new developers into a large project</li> </ul><p>Special Guests: Bernard Tyers, Nicole Harris, Paul Moore, Pradyun Gedam, and Tzu-ping Chung.</p><p>Sponsored By:</p><ul><li><a href="http://testandcode.com/pycharm" rel="nofollow">PyCharm Professional</a>: <a href="http://testandcode.com/pycharm" rel="nofollow">Try PyCharm Pro for 4 months and learn how PyCharm will save you time.</a> Promo Code: TESTANDCODE20</li></ul><p><a href="http://www.patreon.com/testpodcast" rel="payment">Support Test & Code : Python Testing for Software Engineering</a></p><p>Links:</p><ul><li><a href="http://pip.pypa.io/en/stable/news/" title="Changelog — pip 20.2 documentation" rel="nofollow">Changelog — pip 20.2 documentation</a> — Including --use-feature=2023-resolver</li><li><a href="http://github.com/pypa/pip" title="pypa/pip: The Python package installer" rel="nofollow">pypa/pip: The Python package installer</a> — github repo</li><li><a href="http://pip.pypa.io/en/stable/development/getting-started/#running-tests" title="testing pip - documentation" rel="nofollow">testing pip - documentation</a></li><li><a href="http://pip.pypa.io/en/stable/" title="pip - The Python Package Installer — pip 20.2 documentation" rel="nofollow">pip - The Python Package Installer — pip 20.2 documentation</a></li><li><a href="http://pip.pypa.io/en/stable/user_guide/#resolver-changes-2023" title="Changes to the pip dependency resolver in 20.2" rel="nofollow">Changes to the pip dependency resolver in 20.2</a> — Changes to the pip dependency resolver in 20.2</li></ul>

August 03, 2023 07:00 AM UTC


OpenMediaVault

OpenMediaVault

This week we welcome Or Carmi (@liiight) as our PyDev of the Week! Or is the creator and maintainer of notifiers. You can see what else Or has been up to by checking out his Github profile.

Let’s spend some time getting to know Or better!

Can you tell us a little about yourself (hobbies, education, etc):

My name is Or Carmi. I’m 38 years old, live in Israel, married and a father of 4 boys. I have 2 dogs, 4 cats, an African grey parrot, a rabbit and a bulbul (look it up ????). I currently work as a senior QA automation engineer at Proofpoint.

I started with programming when I was a kid, when my dad, who was a programmer working for banks, taught me GW basic. In the 2nd grade, I learned Logo, which is what python’s Turtle lib is based on. I went on to study computers in high school as well. I tried to get an engineering degree but I couldn’t win the battle with ADHD in the academic world.

Why did you start using Python?

I got into python after learning about an amazing tool named Flexget that seemed interesting to me. I wanted to tweak it to match my needs and got into its code. Its maintainers were very nice and professional, and helped me with any question I had, whether its python related or related to its codebase. After a couple of years of contributing to it, I became a part of its team and I work on it to this day

What other programming languages do you know and which is your favorite?

Back in the day I dabbled a bit with C# and Ruby, but the vast majority of my career involved using Python, which is my favourite language.

What projects are you working on now?

I’m the creator and maintainer of notifiers and a maintainer of OpenMediaVault, although I have very little time to work on OSS stuff these days, which bums me out tremendously.

Which Python libraries are your favorite (core or 3rd party)?

Installing OpenMediaVault to a Raspberry Pi - Pi My …:OpenMediaVault is a networked attached storage (NAS) solution built on Debian that has support for the Raspberry Pi.. Using this software, you can easily convert your Raspberry Pi into a powerful NAS that has built-in support for a variety of different services.

How did you the Python Notifiers package come about?

While I was working on Flexget, I wanted to add a bunch of notification plugins. It quickly became clear to me that all of these follow a very specific pattern of sending a payload using a specific schema and getting a response. However, each notifier’s API was VERY different in terms of naming, usage, headers, responses and etc. Some of them add their own SDKs, but that just add deps and doesn’t really offer a common interface. I built notifiers to solve exactly that problem, have a super friendly interface on top of an abstraction for a lot of notifiers. I wrote a blog post about it here.

What was the most difficult provider to wrap?

I think to this day, mailgun had the most options, but statuspage V1 API had some of the weirdest methods of naming its payload attributes and using them. It required A LOT of its own custom code (although they fixed a lot of this stuff in their latest API version).

Is there anything else you’d like to say?

I basically learned to be a developer and specifically, a python developer, by using and contributing to OSS. Due to my ADHD I was not able to force myself to endure the rigorous structure of academia, but I was highly motivated and successful when learning via contributing to OSS, which gave me a successful career. I cannot underestimate the power of self-learning and the VAST amount of data out there. To anyone that may be reading this and feel like they need to follow a very specific path to success, that’s not necessarily true. OSS lets you create your own path and it has a lot of wonderful, smart, and knowledgeable people in it. As long as you work hard and are eager to learn, anyone with internet access can obtain all the tools one needs in order to be successful!

Thanks for doing the interview, Or!

The post PyDev of the Week: Or Carmi appeared first on The Mouse Vs. The Python.

August 03, 2023 05:05 AM UTC


PSF GSoC students blogs

GSoC: Week 10: ''' Documentation '''

Hello guys, 

I hope you all doing great. Today, I am going to talk about what I did in this week.

shadownsocksR苹果

I am working on documentation of code I have produced during the first two phases. I have changed user manual and readme. I am also going to change other documentation. I have created user manual for new input engine features and config file feature.

shadownsocksR苹果

I have talked with a user and we come to conclusion that our documettion lacks some important How-to guides which are necessary as mentioned by Daniele Procida in his amazing PyCon talk. So, I am going to create a How-to directory inside our doc folder which will contain interesting recipes for different usecases. Ex:

  1. OpenMediaVault
  2. How to add custom checker (out of tree checker)?
  3. How to scan docker image?
  4. OpenMediaVault

shadownsocksR苹果

OpenMediaVault(OMV)配置你的私有云盘--NextCloud - 简书:OpenMediaVault(OMV)配置你的私有云盘--NextCloud [TOC] OMV配置你的私有云盘--NextCloud 现在云盘厂家已经所剩无几,你能选的余地已经很少了,是时候找一个私有的云盘解决方案了。你绝对不是第一个有这个想法的人,所伍很幸运,在开源的大世界 ...

 

August 03, 2023 03:15 AM UTC

shadownsocksR苹果


PSF GSoC students blogs

Weekly Check-In: Week 10


Make sure to check out Project FURY : http://github.com/fury-gl/fury

Hey Everyone! 
This week , more shaders

shadownsocksR苹果

After merging the SDF actor last week , the mentors and i decided to work on another project idea which was discussed prior to GSoC . So the next step assigned to me was to look into current shader framework and create immersive visualizations using shaders. Being interested in volumetric rendering i looked into volumetric cloud rendering algorithms and created a basic shader based render in FURY.
The output for the same is given below:

OMV搭建系列教程[3] – 共享文件夹SMB设置 - CSDN博客:2021-6-6 · OMV搭建系列教程[0]–最小化安装Debian9OMV搭建系列教程[1]–Debian9安装OpenMediaVaultOMV搭建系列教程[2]–安装omv-extrasOMV搭建系列教程[3]–共享文件夹SMB设置OMV搭建系列教程[4]–安装Docker容器OMV搭建系列教程[5]–安装Aria2OMV

 

The shader demos are available at :
http://github.com/lenixlobo/fury/tree/shader-demos

shadownsocksR苹果

The main focus now is to discuss and work on shader demos which an demonstrate the capabilities of FURY 

shadownsocksR苹果

No issues were faced this week

August 02, 2023 06:32 PM UTC

Weekly Check-in #10

OpenMediaVault

Openmdiavault – 默默的点滴:2021-10-10 · 之后,整个OpenMediaVault系统无响应的问题,即使强制重新开机,也会在挂载完成刚刚转换后的磁盘后系统继续宕机,这个问题还在查找原因中。 刚刚开始是怀疑btrfs-tools版本太低导致的,系统默认自带的是btrfs-tools 3.17,但是Linux内核确是Linux Kernel 4.9.0,按理说,两者版本号应该是一致的,但是标准源 ... and I will also be discussing my future plans regarding UI components. The official repository of my sub-org, FURY can always be found here.

What did you do this week?

This week I was able to figure out the uncontrollable spinning problem that I was facing while rendering physics simulations. Specifically the simulation where a brick wall was rendered by a single actor. The spinning problem was as follows:

Here's how the fixed simulation looks like:

I was facing this particular issue because I was directly syncing the orientation of the objects in pyBullet world to the objects in the Fury world. So I decided to apply the change in orientation instead and it worked. In order to achieve this I had to keep track of the bricks' orientation at each step of the simulation, sync the change and then update the tracked orientation. Thankfully, pybullet had convenient tools to achieve this. Here's a snippet on how to update individual objects rendered by a single actor:

def sync_brick(object_index, multibody):
    pos, orn = p.getBasePositionAndOrientation(multibody)

    rot_mat = np.reshape(
        p.getMatrixFromQuaternion(
            p.getDifferenceQuaternion(orn, brick_orns[object_index])),
        (3, 3))

    vertices[object_index * sec: object_index * sec + sec] = \
        (vertices[object_index * sec: object_index * sec + sec] -
         brick_centers[object_index])@rot_mat + pos

    brick_centers[object_index] = pos
    brick_orns[object_index] = orn

All the necessary information is updated here.

What is coming up next?

Currently, the scrollbars are native to ListBox2D only. We are planning to separate scrollbars from ListBox2D to create a standalone UI component. This was in progress previously but was later discontinued, so I was given the responsibility to complete it. After this we plan to improve File Dialog capabilities later on.

Did you get stuck anywhere?

I did not face any major issues but it took me some time to understand and evaluate the existing discontinued PR regarding scrollbar separation.

Thank you for reading, see you next week!!

August 02, 2023 05:05 PM UTC


The No Title® Tech Blog

Just updated - Optimize Images v1.3.6

Optimize Images has just been updated to version 1.3.6, a minor but still important release that fixes a few bugs and improves its overall stability. Thank you for using Optimize Images and/or contributing with feature suggestions, bug reports, or pull requests!

August 02, 2023 02:45 PM UTC


OpenMediaVault

OpenMediaVault – No se actualiza desde que tengo …:OpenMediaVault – No se actualiza desde que tengo pi-Hole 5. 13/06/2021 13/06/2021 SinEtiqueta OMV5, pihole. Volvemos con otro problema… y claro está, la solución. Tengo un miniPC con OpenMediaVault 5, y desde que volví a poner la orangePi Zero con pi-Hole, que no me salía ninguna actualización para instalar, siendo esto muy raro ...

OpenMediaVault插件简介-小叶白龙博客:2021-6-13 · openmediavault-clamav 简介:开源的防病毒软件,可伍一定程度保护系统安全,本人是装了该软件,有甚于无嘛。 openmediavault-netatalk 简介:可伍设置支持Apple Talk 协议的的共享,本人没水果机,该功能没研究过。 openmediavault-lvm

August 02, 2023 01:50 PM UTC


OpenMediaVault

[Week 9] Check-in

shadownsocksR苹果

1. What did you do this week?

2. Difficulty

OpenMediaVault

3. What is coming up next?

OpenMediaVault


Fabio Zadrozny

PyDev 7.7.0 released (mypy integration improvements, namespace packages)

This release brings multiple improvements for dealing with type hints as well as improvements in the Mypy integration in PyDev:

The MYPYPATH can now be set automatically to the source folders set on PyDev and the OpenMediaVault flag is set to silent by default (this flag is required because only one file is analyzed at a time in PyDev as failing to do so would end up showing errors for other files).

OpenMediaVault

Personally, I think that with Python 3.8 it's finally possible to actually use Python type hints properly (due to the typing.Protocol -- a.k.a Duck typing -- support), so, more improvements are expected in that front on PyDev itself.

This release also brings many other improvements, such as support for pip-installed namespace packages, debugger fixes, support for parsing with the latest version of Cython and support for the latest PyTest.

There are actually many other minor improvements and bug-fixes in this release too. Check the release notes at http://www.pydev.org/ for more details!

Acknowledgements

Thanks to Luis Cabral, who is now helping in the project for doing many of those improvements (and to the Patrons at OpenMediaVault which enabled it to happen).

Thanks for Microsoft for sponsoring the debugger improvements, which are also available in Python in Visual Studio and the Python Extension for Visual Studio Code.

Enjoy!

--
FabioOpenMediaVault

August 02, 2023 10:43 AM UTC


OpenMediaVault

Lenses

I suffer from ADHD.

Photo by Taylor Young on Unsplash

I want to be clear: when I say I suffer from this disorder, I am making a self-diagnosis. I’ve obliquely referred to suffering from ADHD in previous posts, but rarely at any length. The main reason for my avoidance of the topic is that it still makes me super uncomfortable to write publicly about a “self-diagnosis”, since there’s a tremendous amount of Internet quackery thanks to amateur diagnosticians.

Openmediavault 编译与安装过程 - 简书:2021-2-8 · Openmediavault 编译与安装过程 Openmediavault 编译与安装过程 Openmediavault,简称OMV,是开源NAS解决方案的不二之选,更是黑群晖之外的最佳选择。基于Debian的灵活性,伍及低资源占用,使得它能够在各种架构的操作系统上大放异彩,这 ...

I am OpenMediaVault trying to set myself up as a maverick unlicensed freelance psychiatrist here. If you think you might have ADHD, or any other ailment, whether mental or physical, call your primary care physician. Don’t email me.

At the same time, for me, this diagnosis is not really ambiguous or in a gray area. This is me looking down and noticing I’ve only got one arm, and diagnosing myself as a one-armed person. I’ve taken numerous ADHD screening questionnaires and reliably scored well into the range of “there is no ambiguity whatsoever, you absolutely have ADHD”, so I feel confident to describe myself as having it.

Terminology aside, this post is about a set of cognitive and metacognitive issues that I have, and some tools that I found useful to remedy them. I think others might find those same tools useful in similar situations. So if you’re also uncomfortable with the inherently unreliable nature of self-diagnosis, or the clinical specificity of the term “ADHD” — and I absolutely don’t blame you if you are — I invite you to read “ADHD” as a shorthand for some character traits that I informally believe fit that label, and not a robust clinical analysis of myself or anyone else.

With that extended disclaimer out of the way, I’ll get started on the post itself; and where better to do that than at the start of my own challenges.

The ‘Laziness’ model

Photo by Zosia Korcz on Unsplash

Throughout my childhood, I was labeled an “underachiever”. I performed well on tests and didn’t do homework. I was frequently told by adults — especially my teachers — that I was “brilliant” but “lazy”.

Was I lazy? Is there even such a thing as “laziness”? Here’s a spoiler for you — “no”1 — but I didn’t know that at the time. All I knew was that I couldn’t seem to do certain things — boring things: homework, long division, and cleaning up my room, for a few examples. I couldn’t seem to do the things that my peers found routine and trivial.

This is a common enough experience that it shows up clearly even in systematic reviews and meta-analyses of adult sufferers of ADHD. Everybody tells you you’re lazy, and so you believe it. It sure looks like laziness from the outside!

In retrospect, that’s the interesting problem with this false diagnosis: “from the outside”. Assuming for the moment that laziness does in fact exist and is a salient character flaw, what would the experience of the interiority of such laziness actually feel like?

Costruisci il tuo NAS con OpenMediaVault, parte 2 ...:Costruisci il tuo NAS con OpenMediaVault, parte 2: configurazione SSH e Rsync. 08 Novembre 2021. Nella parte 1 di 'Costruire il proprio NAS' vi ho mostrato come creare una condivisione delle cartelle in OpenMediaVault, da usare per archiviare i backup remoti.

  1. Frequently, suddenly remembering, in contexts where it wouldn’t help — walking to school, in an unrelated class, while walking to work — that I had to Do The Thing.

  2. Anxiously, yearningly, often desperately wishing I could Do The Thing.

  3. Trying to Do The Thing at the responsible time, finding that my mind would wander and I would lose several hours of time... sitting for hours, literally bored to tears, while I attempted and failed to Do The Thing.

  4. At long last, finally managing to start. Once I was truly exhausted and starting to panic, I’d drink a gallon of heavily-caffeinated and very sugary soda at 2 in the morning and finally OpenMediaVault find that I suddenly had the ability to Do The Thing, and white-knuckle my way through an all-nighter to finish The Thing. (This step was more common after I got to my late teens; before that, The Thing just wouldn’t get Done.)

Sitting up night after night destroying my mental and physical health, depriving myself of sleep, focusing with every ounce of my will on tasks that I absolutely hated doing but was forcing myself to complete at all costs: it doesn’t seem to line up with the popular conception of what “laziness” might be like! Yet, I absolutely believed that I was lazy. If I were not lazy, surely Doing The Thing wouldn’t be so difficult!

I took pains at the start of this post to point out that mental health diagnosis is usually best left to professionals. I think that at this point in the story I should emphasize that “I’m lazy” is also itself a self-diagnosis, and — at least in every case where I’ve ever heard it used — a much worse one than “I have ADHD”.

If you are not a licensed psychologist or psychiatrist, any time you decide with certainty that someone (even yourself!) has an intrinsic, persistent character flaw, you’re effectively diagnosing them. If you decide that they’re inherently lazy, or selfish, or arrogant, you’re effectively diagnosing them with a sort of personality disorder of your own invention.

So, although I didn’t see it at the time, laziness didn’t seem to describe me terribly well. What description fits better?

OpenMediaVault

Photo by Tom Bradley on Unsplash

In my late 20s, my Uncle Joel gave me a gift that changed my life: the book “Driven to Distraction: Recognizing and Coping with Attention Deficit Disorder”2 by Edward M. Hallowell. The life-changing aspect of this book was not so much that it showed that there were other people “like me”, or that my problem had a name, but that it gave me a different, and more accurately predictive, model to understand my own behavior.

In other words, it allowed me to see — for the first time — that the scarcest resource limiting my efficacy wasn’t the will to do the work, but rather the ability to focus. With this enhanced understanding, I could select a more effective strategy for dealing with the problem.

Openmediavault入门常见问题及解决方法 一段香_百度文库:2021-10-2 · Openmediavault 入门常见问题及解决方法 一段香 1. Openmediavault 是什么系统? Openmediavault 是基于 Debian 的 NAS 系统,一般简称为 OMV;是德国人 Volker Theile 于 2021 年开始开发,Volker 曾经是 FreeNAS 的开发者之一。

Although my limiting factor was the ability to pay attention, the problem that prevented me from recognizing this was one of metacognition — the way I was thinking about how I think.

My early model of my own mind was that I was a lazy person who just needed to do what I had assumed everyone else must be doing: forcing myself to do the tasks that I was having trouble completing. If I really wanted to get them done, then what possible other reason could there be for me to not do them?

The ‘laziness’ model didn’t generate particularly good predictions. For any given project at school, it would predict that I would not try very hard to do it, since the very dictionary definition of ‘lazy’ is “unwilling to work or use energy”. The observed behavior, by contrast, was constant, panicked, intense (albeit failed, or at least highly inefficient) uses of significant amounts of energy.

The main reason to have a model of a thing is to make predictions about that thing. If the predictions that a model gives you are consistently wrong, then the model isn’t directly useful. At that point, it’s time to discard it and find a better one. At the very least, it’s time to revise the model in question until it starts giving you more accurate, actionable information.

The ‘laziness’ model is wrong, but worse than that, it’s harmful. What it routinely predicts, regardless of context, is that I need more negative self-talk, more ‘motivation’ in the form of vicious self-criticism, more forcing myself to “just do it”. All of these things, particularly when performed habitually, cause real, significant harm.

If I gave myself the most negative self-talk I could muster, the most vicious criticism, and really put Maximum Effort into forcing myself to do the thing I wanted done... if it didn’t work, of course that just meant that I needed to engage in even more self-abuse! I could always try harder!

This is the worst way that a model can be inaccurate: an unfalsifiable, self-reinforcing prediction. I could never demonstrate to myself that I’d really been as unkind to myself as was possible; there was always room for escalation. Psychologically, it’s also the worst kind of behavioral advice, which is the kind that generates a self-reinforcing negative feedback loop.


Once I started putting my newfound knowledge into practice, the difference between interventions predicated on an understanding of the problem as “lack of usable attention span” and those based on “lack of willpower” was night and day. I stopped trying to white-knuckle my way through all of my challenges and developed non-judgmental ways to remind myself to do things.

I knew that I, personally, was never going to spontaneously remember to do things at the right time, so I developed ways of letting computers remind me. I knew that I’d never be able to stick with routine, repetitive tasks, so I made a unified list of all the tedious administrative tasks I need to perform. I can’t keep important dates and times in mind, so I rely completely upon my calendar.

Even given these successes, “it worked!” is a colossal oversimplification. Today, it’s about 15 years later, and I’m still sifting through the psychological rubble wrought by the destructive, maladaptive coping mechanisms that I just described, and still trying to find better ways to remain effective when I’m feeling distracted... which is most of the time.

Simply having a better model at the coarsest level is just the first step. Instantiating that model in a working, fleshed out technological system is a ton of work in its own right.3 But it’s work that starts having little successes, which is a lot easier to build on and maintain momentum with than the same failure repeated day after day.

Given that I was starting — nearly from scratch — at 25, and had a lifetime worth of bad habits to unlearn, constructing a workable system that addressed my personal organizational needs still took the better part of a decade.

So as I move into the next, slightly more prescriptive section here, I don’t want to give anybody the idea that I think this is easy.

Don’t give up!

Listen up, Simon. Don’t believe in yourself. Believe in me! Believe in the Kamina who believes in you!

Kamina, Episode 1,
Tengen Toppa Gurren Lagann

At the start of this post, I specifically mentioned that I hadn’t wanted to write at length about ADHD due to my discomfort with self-diagnosis. So, you might be wondering: what was it that overcame this resistance and prompted me to finally write about my own experiences with ADHD?

OpenMediaVault(omv)启用社区插件-安装omv-extras - 菜鸟之志:2021-4-29 · OpenMediaVault支持插件安装,点击左侧菜单的“系统”>“插件”,右侧列表显示了可用的插件,可伍把这些插件理解为官方插件,插件不是很多;还好,来自开源社区的开发者为OpenMediaVault贡献了许多好用的插件,想使用更多社区的插件,需要启用 ...

These are paraphrased and anonymized on purpose; I really don’t want to direct any negative attention towards someone specific, particularly someone just venting about struggles.

Of course, no blog post in mid-2023 would be complete without some reference to the ... situation. The original inspiration for this post predates the dawn of the new hell-world we all now inhabit, but, to say the least, COVID-194 has presented some new challenges to the coping mechanisms I’m writing about here. (Still, I know that I’m considerably better off than the average American in this mess.)

The message I’m trying to get across here is hopeful — others suffering with executive-function deficits similar to mine might be able to do what I did and fix a lot of their problems with this one weird trick! — and the constant drumbeat of despair all around us right now makes that sort of message feel more urgent.

Posts like the ones I described above seem to represent a recurring pattern of despair, and they make me sad. Not because I can’t identify with them; I have absolutely had these feelings. Not even because they’re wrong, exactly: it really is harder for folks with ADHD to handle some of these situations, and the struggle really is lifelong.

They make me sad because they’re expressing a fatalistic perspective; a fixed mindset5 that precludes any hope of future improvement. The through line that I have seen from all of these posts is a familiar, specific kind of despair; a thought I’ve had myself multiple times:

When somebody that I care about asks me, ‘Can you do the dishes later?’, I want to say ‘yes’ and have them believe me. I want to be able to believe myself, and I don’t think I will ever be able to.

Unlike myself when I was younger, the authors of these posts already have a name for their problem: ADHD. Sometimes they’ve even tried some amount of therapy or even medication.

Even so, they’re still buying in to the maladaptive strategy of “just try harder”. Since they already know that ADHD is, at least in part, a structural brain difference, they despair of ever being able to actually do that though, which leaves “giving up” as the only viable strategy.

Don’t give up! I believe in you!

Different problems, different tools

I have had another lifelong problem since when I was young: I am severely nearsighted. Yet, I never developed any psychological hangups around that; nobody ever told me that I needed to buckle down and just squint harder. This problem was socially quite well understood, so… I got glasses. Then I could see, as long as I consistently used those glasses.

Nobody ever expected me to be able to see without glasses.

Photo by NordWood Themes on Unsplash

Calendars, to-do lists, and systems like Getting Things Done are the corrective lenses for the ADHD brain.6.

If a to-do list is a corrective lens for ADHD, one of the major issues around understanding how to use it is that the mass-market literature around to-do lists assumes a certain level of neurotypicality. Assistive devices may frequently be useful to non-disabled people, but their relationship to and use of such affordances is very different.

Through the Looking-Glass ...

开始折腾 OMV5 OpenMediaVault - 趣小组:2021-5-18 · 在 Raspbian 上可伍一条命伌安装好。wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bashWebUI 不 ...

In our metaphorical world, ADHD is myopia, and so most — or at least many — folks are “sight-typical”. Productivity systems are our “lenses”.

If nearsightedness were as poorly understood as ADHD, and you were nearsighted, you wouldn’t be able to pop on down to Lenscrafters and pick up a pair of spectacles. You might realize that the problem was with your eyes, and think, “lenses might help me see farther”. Many kinds of lenses might be commercially available in such a world! Lenses for telescopes, cameras, microscopes...

The way that someone with 20/20 vision might use a lens to see farther is to use a telescope to see something really far away. But you, my hypothetically-nearsighted friend, don’t need a powerful zoom lens to take surveillance photographs from a helicopter. Even if you could make such lenses work to correct your vision, you wouldn’t want to carry a pair of 2-kilogram DSLR zoom lenses everywhere you go. You want eyeglasses, which are something different.

Photo by James Bold on Unsplash

The lenses in eyeglasses are — while operating on fundamentally the same principles of optics as the lenses in a telescope or a microscope — constructed and packaged in a completely different way. But most importantly, the way you use them is to wear them every day, not to deploy them on special occasions in the rare event where you need to do something extreme, but all the time, every day, in the same way.

... and What I Found There

Photo by Glenn Carstens-Peters on Unsplash

A person with nominal executive function might use the occasional free-floating to-do list to track a big, complex project with a lot of small interrelated tasks. Most folks in the modern information-driven economy routinely need to do projects that are too complex to easily memorize all the required steps. Even doing your own personal taxes has enough steps to require at least a little bit of tracking.

Such a person could make a to-do list for that one project — their telescope, if you will — put it in a place where they’d remember to look at it when they’re working on that project, and then remember to check things off when they’re done.

They could have one to-do list on the fridge for groceries, a note on their phone for stuff to get for their spouse, and a wiki page outlining some tasks at work. They would probably have enough free-floating executive function to remember which list maps to which project and when each project is relevant, and remember to check each one at the appropriate time.

I spent a lot of time trying to make disconnected to-do lists like this work for me. They never have. Even when I’m feeling particularly productive there is a cycle of list-generation, that goes like this:

  1. When I want to work on the project in question, I can’t remember where the to-do list is, but I need to figure out what I need to do again.

  2. So I go and write a new to-do list, spend a bunch of time rewriting the one I’d already written but can’t quickly find. Then I do some work on the project, check off a few things, and put the list away.

  3. Later, I’ll find both lists, both half checked off, and now I waste a bunch of time trying to figure out which one is the right one.

  4. Repeat this process a few times, and now I have a dozen lists. The lists themselves start generating more work than the actual project, because now I am constantly re-making and finding lists, trying to figure out which one is the most up to date.

This is the simplest case, but the real problem happens at a higher level: one of the biggest problems caused by any executive function deficit like ADHD is the difficulty of OpenMediaVault.

The more irrelevant distractions I can see while I’m trying to work out what to do next, the harder that decision becomes. And there’s nothing quite so distracting as the detritus of a thousand half-finished to-do lists.

OpenMediaVault

What I’ve found works for me is a single, primary to-do list that I can obsessively check in with every minute of every day, which subsumes every other list related to every other project in my life.

I’m hardly the only person to have this insight — if you start engaging with the “productivity” noosphere, reading all the books, listening to the podcasts, this is a recurring theme. You don’t just have an ‘app’ or a ‘list’, you have to have a System. It has to be reliable; you have to know you’re going to keep checking it, or it’s worthless for storing your commitments. But unfortunately this is frequently buried under a lot of other technical complexity about the fiddly details of how to set up one system or the other. It’s very easy to miss the forest for the trees.

Having ADHD means that I routinely forget what I’ve decided to do over the course of only a minute or two after I’ve decided to do it. Just this week, I had to remind myself no fewer than three times to write down “buy more olive oil” because I kept remembering that we were running low when I was in the kitchen and by the time I finished washing my hands to put it into my phone I’d already forgotten why I did that and went back to making dinner.

I need to write everything down. I’m not going to remember five or six, or even two or three places to check for what to do next. I need to have one place to check what comes next, and then build the habit of constantly going back to it, both to add new things and to see what needs to be done.

Technology can help. Technology might even be necessary — it is for me.

But if you’re considering trying this out for the first time, be mindful that piles of to-do apps can be just as distracting as piles of paper. The important thing is to clearly, singularly decide on the one place which is the ‘root’ of your task tracking system.

You can even do this with a pen and paper. Carry the same, single notebook with you everywhere, and make it absolutely clear that it is your primary list, which is where you have to put any references to other lists. Some people have a lot more success with something tactile, to engage all the senses.

For me personally, the high-tech portion of this strategy is indispensable. I use a combination of OpenMediaVault for things that have to be done and Apple’s built-in calendar application for places I have to be at a particular time.7

OmniFocus8 defines the core gameplay loop of my life. Rather than having to cultivate and retain an elaborate series of interlocking habits and rituals to remain functional, I have a single root habit which triggers every other habit.

That habit? Consulting the unified “what should I do next” perspective in OmniFocus. Every time I am even marginally distracted, I check that view again.

Any time I have trouble initiating a task, I start breaking down the top task in that list into smaller and smaller “next physical action”. I don’t even rely on myself to do this; since I know I’ll forget to break things down, I frequently make tasks that look like this:

To reduce distraction, I routinely close down any windows that are not necessary for whatever I’m currently working on. Particularly, I routinely sweep to get rid of browser tabs, asking (as I would with an email) “does this window represent a task I should do?”. If yes, it goes in the task system, if no, I close it so it won’t distract me further.

To facilitate this clean-up, on every computer that I use, I have a global hot-key set up to turn the thing that I’m looking at — some selected text, an image, an email message, a browser tab, a chat message at work — into a task that I can look at later.

Everything I have to do on a regular basis is in this system as a recurring task; for example:

Yes, even basic personal hygiene is in here. Not because I’ll necessarily forget, or that it takes a lot of energy, but I don’t want to waste one iota of brainpower I could be devoting to my current task to worrying about whether I might need to do something else later. If I don’t see ‘brush teeth’ in my “what should I do next” view, then I know, with certainty, that I don’t need to be thinking about tooth-brushing right now.

The “what should I do next” view is available on all of my computers, on my tablet, on my phone, and it even dominates my watch-face; I check it more often than I check the time:

No single feature is a hard requirement of my system; I could get along without any one of them in a pinch. However, the way that they combine to constantly reinforce what the next thing I need to do is in any given context, at any given time, means that I need to expend less energy trying to consciously hang on to all the context.

Limitations and Risks

I don’t want to give an overly rosy view of this strategy. Getting a single unified to-do system that works for you is not the same as getting a brain that can remember to do stuff. So here are some caveats:

  1. Implementing and maintaining such a system is never easy. It just takes tasks like ‘making sure I renew my passport before I need to travel’, ‘show up on time for the meeting’ and ‘buy a gift at least a week before the wedding’ from totally impossible to possible to do at least somewhat reliably with a sustainable level of effort. The main thing that I believe is possible for everyone is being able to commit to simple future tasks.
  2. Building enough data about one’s own habits and procrastination triggers also takes time, and to make such a system effective, one needs to do that work as well. (A passive time-tracking tool like Screen Time on your phone or RescueTime on your workstation can be quite illuminating — and surprising.)
  3. The initial wave of relief I felt when I started tracking tasks masked a gradual increase in my general anxiety over time. Checking and re-checking the ‘what to do next’ list can become a bit of an anxious compulsion, a safety behavior that doesn’t always help me plan my day. As one builds the habit of routinely checking the list, it’s important to avoid developing constant anxiety about the list as the only motivation to do so.
  4. Similarly, it is important to learn to under-commit. Not only does one need to avoid putting an unrealistic amount of stuff into the system, everybody (but especially everybody with ADHD!) needs non-trivial chunks of unstructured, unplanned time, where the system will clearly say ‘nothing to do now, just relax’. The “poor self-observation” and “time blindness” symptoms of ADHD ensure that properly estimating things before committing is a constant challenge that never really goes away either.
  5. This strategy definitely won’t be sufficient for some folks. ADHD is a spectrum and there’s no precise mechanism to calibrate where you are on it. Some folks will respond really well to this strategy, some folks will need medication before it helps to a useful degree.

openmediavault 5.x documentation — …:2021-5-13 · openmediavault 5.x documentation¶ openmediavault is a complete network attached storage (NAS) solution based on Debian Linux. It’s available for x86-64 and ARM platforms. Features a full Web Administration interface. Can be controlled via SSH, if enabled.

If you’re suffering from ADHD and despairing that you will never finish a task or be on time to an appointment: you can. It’s possible to do it at least pretty reliably. I believe if you commit to one and only one task tracking system, and consistently use it every single day, all the time, you can commit to tasks and get them done.

TÉLÉCHARGER OPENMEDIAVAULT-PLEX MEDIA …:TÉLÉCHARGER OPENMEDIAVAULT-PLEX MEDIA SERVER GRATUIT - Périphériques PC deals. Tu as réussi à upgrader OMV de la 2. J'arrive à récupérer la majorité des problèmes en ligne de commande, mais v'la la maintenance

It’s still never going to be easy to Do The Thing, even if your digital brain can perfectly remember what The Thing is right now.

用于各种用途的优秀树莓派操作系统 - 51CTO.COM:2021-5-15 · OpenMediaVault 最初是基于 Debian Linux 的,提供了大量功能,如基于 Web 的管理能力、插件支持,等等。它支持大多数树莓派型号,因此你可伍尝试下载并安装它! OpenMediaVault 14、ROKOS:适合加密挖矿 如果你对加密货币和比特币很感兴趣,那么


OpenMediaVault

This was a big one! I’d like to particularly thank my Uncle Joel, without whom this post (and many of my other achievements) would not be possible for the reasons described above, as well as Moshe Zadka, Amber Brown, Tom Most, and Eevee for extensive feedback on previous drafts of this post.

Additionally, I’d like to thank David Reid for introducing me to many of the tools and techniques that I still use every day, and OpenMediaVault, Jonathan Lange, and Hynek Schlawack for many illuminating conversations over the years about the specifics and detailed mechanics of the tools whose use I describe in this post.

Any errors, of course, remain my own.


  1. The broader topic of the nature of “character”, OpenMediaVault and the extent to which the entire concept of a “character flaw” is a cognitive illusion that arises from the expedient but cruel habit of ignoring the context in which someone is making decisions is more than enough fodder for another post, but here are some good articles covering a newly-emerging psychological consensus that laziness as we understand it doesn’t really exist, and that there are always mitigating factors. ↩

  2. Paid link. See disclosures. ↩

  3. It was 54 years from Einstein figuring out the photoelectric effect in 1905 to the first MOSFET in 1959; and another 45 before we got MicroSD cards out of the theory of quantum mechanics. ↩

  4. Hello, future archaeologists! If you’re reading this in the far-flung future, as of this writing, shit is just incredibly fucked up right now. Just incredibly, horrifically fucked up. ↩

  5. Growth Mindset is a useful concept, but it definitely has a lot of problems, and has been a particularly pointed casualty of the replication crisis. This is a pretty good post outlining its remaining utility, even in the face of its relatively small remaining effect size. ↩

  6. This is to say nothing of medication, which is also quite useful. More or less necessary, in fact, for some of those suffering from ADHD. One thing I want to be very careful to point out is that in this post I’m talking about my own experiences with ADHD here; without a proper diagnosis, I haven’t had the opportunity to try a pharmacological solution, so I can’t comment on its efficacy OpenMediaVault. However, there’s a school of thought that since some people can resolve some of their ADHD problems with non-medicative interventions, therefore all people should refrain from medication. I want to be as clear as possible that I do not endorse this point of view. ↩

  7. I’m not going to get into what I use for email here, since I’ve written about that before, and you can just go read that. ↩

  8. Since I know many of my readers are not in the Apple ecosystem, and might be motivated by this post to put some of these ideas into action, there are plenty of cross-platform apps with similar capabilities. You might check out Taskwarrior, Todoist, or Remember The Milk. There’s definitely something out there that can work for you! ↩

OpenMediaVault


OpenMediaVault

#192 Calculations by hand, but in the compter, with Handcalcs

<p>Sponsored by us! Support our work through:</p> <ul> <li>Our <a href="http://training.talkpython.fm/"><strong>courses at Talk Python Training</strong></a></li> <li><a href="http://testandcode.com/">Test & Code</a> Podcast</li> </ul> <p><strong>Brian #1:</strong> <a href="http://simonwillison.net/2023/Jul/10/self-updating-profile-readme/"><strong>Building a self-updating profile README for GitHub</strong></a></p> <ul> <li>Simon Willison, co-createor of Django</li> <li>“GitHub quietly released a new feature at some point in the past few days: profile READMEs. Create a repository with the same name as your GitHub account (in my case that’s <a href="http://github.com/simonw/simonw">github.com/simonw/simonw</a>), add a <code>README.md</code> to it and GitHub will render the contents at the top of your personal profile page—for me that’s <a href="http://github.com/simonw">github.com/simonw</a>”</li> <li>Simon takes it one further, and uses GitHub actions to keep the README up to date.</li> <li>Uses Python to: <ul> <li>Grab recent releases from certain GH repos using GH GraphQL API</li> <li>Links to blog entries using feedparser</li> <li>Retrieve latest links using SQL queries</li> </ul></li> </ul> <p><strong>Michael #2:</strong> <a href="http://github.com/connorferster/handcalcs"><strong>Handcalcs</strong></a></p> <ul> <li>Created by Connor Ferster</li> <li>In design engineering, you need to do lots of calculations and have those calculation sheets be kept as legal records as part of the project's design history. </li> <li>If they are not being done by hand, then often Excel is used but formatting calculations in Excel is time consuming and a maintenance nightmare. </li> <li>However, doing calculations in Jupyter is not any better even if you fill it up with print() statements and print to PDF: it just looks like a bunch of code output.</li> <li>Even proprietary software like MathCAD cannot render math as good as a hand calculation because it does not show the numerical substitution step. No software does </li> <li><strong>Why handcalcs exists:</strong> </li> <li>Type the formula once into a Jupyter cell</li> <li>Have the calculation be rendered out as beautifully as though you had written it by hand. </li> <li><p>Write your notebooks once, and use them for calculation again and again; the formula you write is the same as the representation of the formula. <img src="http://raw.githubusercontent.com/connorferster/handcalcs/master/docs/images/basic_demo.gif" alt="" /></p></li> <li><p><code>**Symbolic**</code> The primary purpose of <code>handcalcs</code> is to render the full calculation with the numeric substitution. This allows for easy traceability and verification of the calculation.</p></li> <li>However, there may be instances when it is preferred to simply display calculations symbolically. For example, you can use the <code># Symbolic</code> tag to use <code>handcalcs</code> as a fast way to render Latex equations symbolically.</li> <li>Includes <strong>longhand vs. shorthand</strong></li> <li>Use units (mm^3) for example.</li> </ul> <p><strong>Brian #3:</strong> <a href="http://lwn.net/Articles/823292/"><strong>The (non-)return of the Python print statement</strong></a></p> <ul> <li>Article by Jake Edge</li> <li>Idea by Guido van Rossum to bring back the print statement.</li> <li>Short answer: not gonna happen</li> </ul> <p><strong>Michael #4:</strong> <a href="http://amitness.com/2023/06/fastapi-vs-flask/"><strong>FastAPI for Flask Users</strong></a></p> <ul> <li>Flask has become the de-facto choice for API development</li> <li>FastAPI that has been getting a lot of community traction lately</li> <li>Benefits <ul> <li>Automatic data validation</li> <li>documentation generation</li> <li>baked-in best-practices such as pydantic schemas and python typing</li> </ul></li> <li>Running “Hello World” - super similar, but FastAPI is uvicorn out of the box </li> <li><code>@app.get('/')</code> vs <code>@app.route('/')</code></li> <li>FastAPI defers serving to a production-ready server called <code>uvicorn</code>.</li> <li>URL Variables: <ul> <li>Flask</li> </ul></li> </ul> <pre><code> @app.route('/users/[HTML_REMOVED]') def get_user_details(user_id): </code></pre> <pre><code>- FastAPI </code></pre> <pre><code> @app.get('/users/{user_id}') def get_user_details(user_id: int): </code></pre> <ul> <li>Query Strings <ul> <li>Flask</li> </ul></li> </ul> <pre><code> @app.route('/search') def search(): query = request.args.get('q') </code></pre> <ul> <li>FastAPI</li> </ul> <pre><code> @app.get('/search') def search(q: str): </code></pre> <ul> <li>Taking inbound JSON request in FastAPI: <code>def lower_case(json_data: Dict)</code></li> <li>Nice but if you define a <code>Sentence</code> model via pydantic:</li> </ul> <pre><code> @app.post('/lowercase') def lower_case(sentence: Sentence): </code></pre> <ul> <li>Blueprints == Routers</li> <li>Automatic validation via pydantic</li> </ul> <p><strong>Brian #5:</strong> <a href="http://gist.github.com/chrisalbon/b9bd4a6309c9f5f5eeab41377f27a670"><strong>Tweet deleting with tweepy</strong></a></p> <ul> <li>Chris Albon</li> <li>A useful and simple example of using tweepy to interact with Twitter</li> <li>Chris set up and shared a Python script that deletes tweets that are: <ul> <li>older than 62 days</li> <li>have been liked by less than a 100 people</li> <li>haven’t been liked by yourself</li> </ul></li> </ul> <p><strong>Michael #6:</strong> <a href="http://pythonspeed.com/articles/function-calls-prevent-garbage-collection/"><strong>Clinging to memory: how Python function calls can increase your memory usage</strong></a></p> <ul> <li>by <a href="#">Itamar Turner-Trauring</a></li> <li>I had Itamar on <a href="http://talkpython.fm/274">Talk Python episode 274</a> to discuss FIL which was recently covered.</li> <li>This article basically uses FIL to explore patterns for lowering memory usage within the context of a function.</li> <li>With simple code like this, we expected 2GB of memory usage, but we saw 3GB:</li> - </ul> <pre><code> def process_data(): data = load_1GB_of_data() return modify2(modify1(data)) </code></pre> <ul> <li>The problem is that first allocation: we don’t need it any more once <code>modify1()</code> has created the modified version. But because of the local variable <code>data</code> in <code>process_data()</code>, it is not freed from memory until <code>process_data()</code> returns.</li> <li><strong>Solution #1: No local variable at all</strong></li> </ul> <pre><code> return modify2(modify1(load_1GB_of_data())) </code></pre> <ul> <li><strong>Solution #2: Re-use the local variable</strong></li> </ul> <pre><code> data = load_1GB_of_data() data = modify1(data) data = modify2(data) return data </code></pre> <ul> <li><strong>Solution #3: Transfer object ownership</strong> <ul> <li>See article</li> </ul></li> </ul> <p>Extras:</p> <p>Michael: </p> <ul> <li><strong>Pickle Use Example via Adam.</strong> <ul> <li>I once had to work on an API that spoke to a 3rd party service that was a little unusual. That communication to the 3rd party service was over a raw socket connection, so we were responsible for crafting specifically formatted byte arrays to send to them, and we'd get specifically formatted byte arrays back which we'd then have to parse out to determine what pieces of data were in the message. The other wrinkle: that service wasn't available 24/7 but only during limited specific testing periods which had to be negotiated days in advance.</li> <li>We instrumented the code with a feature flag to enable pickling all received messages from that 3rd party service.</li> </ul></li> <li><a href="http://www.python.org/downloads/release/python-384/">Python 3.8.4 is out</a></li> <li><a href="http://github.com/mikeckennedy/">I'm an Arctic Code Vault Contributor</a> over at GitHub. You might be too.</li> </ul> <p>Joke:</p> <p><a href="http://geek-and-poke.com/geekandpoke/2023/10/20/qa-best-practices"></a> <img src="http://trello-attachments.s3.amazonaws.com/58e3f7c543422d7f3ad84f33/5f0751415f713e68c3cd2653/41a92bd352d8a14b62152d3c79f759df/coverage.png" alt="http://geek-and-poke.com/geekandpoke/2023/10/20/qa-best-practices" /></p>

August 02, 2023 08:00 AM UTC

August 01, 2023


John Cook

Time spent on the moon

Lunar module and lunar rover, photo via NASA

This post will illustrate two things: the amount of time astronauts have spent on the moon, and how to process dates and times in Python.

I was curious how long each Apollo mission spent on the lunar surface, so I looked up the timelines for each mission from NASA. Here’s the timeline for Apollo 11, and you can find the timelines for the other missions by making the obvious change to the URL.

Here are the data on when each Apollo lunar module touched down and when it ascended.

openmediavault 4.1.3 插件开发_PHP - UCloud云社区:设置菜单节点图标 var/www/openmediavault/images 内创建对应Node.js内的2张图片 创... openmediavault 4.1.3 插件开发_PHP - UCloud云社区 演示网站

Here’s a first pass at a program to parse the dates and times above and report their differences.

    from datetime import datetime, timedelta

    def str_to_datetime(string):
        return datetime.strptime(string, "%Y-%m-%d %H:%M:%S")

    def diff(str1, str2):
        return str_to_datetime(str1) - str_to_datetime(str2)

    for (mission, touchdown, liftoff) in data:
        print(f"{mission} {diff(liftoff, touchdown)}")

This works, but the formatting is unsatisfying.

    Apollo 11 21:36:21
    Apollo 12 1 day, 7:31:11
    Apollo 14 1 day, 9:30:29
    Apollo 15 2 days, 18:54:52
    Apollo 16 2 days, 23:02:12
    Apollo 17 3 days, 2:59:39

It would be easier to scan the output if it were all in hours. So we rewrite our diff function as follows.

    def diff(str1, str2):
        delta = str_to_datetime(str1) - str_to_datetime(str2)
        hours = delta.total_seconds() / 3600
        return round(hours, 2)

Now the output is easier to read.

    Apollo 11 21.61
    Apollo 12 31.52
    Apollo 14 33.51
    Apollo 15 66.91
    Apollo 16 71.04
    Apollo 17 74.99

These durations fall into three clusters, corresponding to the Apollo mission types G, H, and J. Apollo 11 was the only G-type mission. Apollo 12, 13, and 14 were H-type, intended to demonstrate a precise landing and explore the lunar surface. (Apollo 13 had to loop around the moon without landing.) The J-type missions were more extensive scientific missions. These missions included a lunar rover (“moon buggy”) to let the astronauts travel further from the landing site. There were no I-type missions; the objectives of the original I-type missions were merged into the J-type missions.

Incidentally, UNIX systems store times as seconds since 1970-01-01 00:00:00. That means the first two lunar landings were at negative times and the last four were at positive times. More on UNIX time here.

Related posts

August 01, 2023 08:46 PM UTC


Andriy Kornatskyy

Python ASGI CLI

Call ASGI Python application module from command line (without an application server), just like CURL. Interested? You need to install asgi-cli package: pip install asgi-cli Usage asgi-cli --help usage: asgi-cli [-h] [--version] [-X COMMAND] [-I] [-H HEADER] [-d DATA] [-b] [-n NUMBER] [-v] app [url] positional arguments: app an

August 01, 2023 06:04 PM UTC


OpenMediaVault

「openmediavault」で自作NAS【1.インストール】 - …:「NAS」いわゆる、ファイルサーバー。現在は、専用機が販売されており、有線LANのケーブルと電源を接続しWebブラウザで設定すると使える。しかし、パソコンでもNASが自作できる。ここでは、「openmediavault」をインストールしてNASを構築する。

I was using my OpenMediaVault tool in the AppVMs in my QubesOS system. But, at the same time I was trying to figure out how to make it the default DNS system for the whole Qubes.

ahf provided me a shell script showing how he is forwarding the DNS requests to a VPN interface. I modified the same so that all of standard DNS queries become DoH queries over the Tor network.

OpenMediaVault

In the following example, I am setting up the sys-firewall service VM. All other AppVMs connected to this VM as netvm will be use dns-tor-proxy without any modification.

Make sure that the template for sys-firewall has the latest Tor installed. You can get it from the official Tor repository.

Download (or build) the latest dns-tor-proxy 0.3.0 release, and put the file (as executable) in /rw/config/ directory.

Next, modify the /rw/config/rc.local file & add the following lines.

systemctl start tor
sh /rw/config/dns.sh
/rw/config/dns-tor-proxy --doh &

As you can see, we are executing another script at /rw/config/dns.sh, which has the following content. Remember to modify the DNS value to the right IP for your sys-firewall vm.


#!/bin/sh

QUBES_DNS_SERVERS="10.139.1.1 10.139.1.2"
DNS=10.137.0.x

# accept DNS requests from the other vms

iptables -I INPUT -i vif+ -p udp --dport 53 -j ACCEPT
iptables -I INPUT -i vif+ -p tcp --dport 53 -j ACCEPT

# Clean up our NAT firewall rules.
iptables --flush PR-QBS --table nat

# We take incoming traffic on TCP and UDP port 53 and forward to
# our DNS server.
for QUBES_DNS_SERVER in ${QUBES_DNS_SERVERS} ; do
    iptables --append PR-QBS --table nat --in-interface vif+ --protocol tcp --destination "${QUBES_DNS_SERVER}" --dport 53 --jump DNAT --to-destination "${DNS}":53
    iptables --append PR-QBS --table nat --in-interface vif+ --protocol udp --destination "${QUBES_DNS_SERVER}" --dport 53 --jump DNAT --to-destination "${DNS}":53
done

# Log *other* DNS service connections. This part is optional, but ensures that
# you can monitor if one of your VM's is making any traffic on port 53 with
# either TCP or UDP. If you want to log *every* DNS "connection", including the
# ones to QUBES_DNS_SERVERS, you can either move these commands up before the
# for-loop in this file or change the --apend option to be an --insert instead.
iptables --append PR-QBS --table nat --in-interface vif+ --protocol tcp --dport 53 --jump LOG --log-level 1 --log-prefix 'DNS Query: '
iptables --append PR-QBS --table nat --in-interface vif+ --protocol udp --dport 53 --jump LOG --log-level 1 --log-prefix 'DNS Query: '

Now, restart your sys-firewall vm. And you are all set for your DNS queries.

August 01, 2023 02:30 PM UTC


openmediavault 5.x documentation — …:2021-5-13 · openmediavault 5.x documentation¶ openmediavault is a complete network attached storage (NAS) solution based on Debian Linux. It’s available for x86-64 and ARM platforms. Features a full Web Administration interface. Can be controlled via SSH, if enabled.

(ccxxxviii) stackoverflow python report

These are the ten most rated questions at Stack Overflow last week.
Between brackets: [question score / answers count]
Build date: 2023-08-01 12:19:04 GMT


  1. Calculate min and max value of a transition with index of first occurrence in pandas - [10/2]
  2. Confusion related to Python's `in` operator - [10/1]
  3. How to combine numeric columns in pandas dataframe with NaN? - [9/4]
  4. How can I automate slicing of a dataframe into batches so as to avoid MemoryError in python - [8/1]
  5. How to sort a group in a way that I get the largest number in the first row and smallest in the second and the second largest in the third and so on - [7/5]
  6. How can i accept and run user's code securely on my web app? - [7/2]
  7. How to scale sklearn's pipeline output for Autoencoders? - [7/1]
  8. infer_datetime_format with parse_date taking more time - [7/0]
  9. Replace a list of characters with indices in a string in python - [6/2]
  10. How to Programmatically detect whether a file is a Python script - [6/1]

August 01, 2023 12:19 PM UTC


OpenMediaVault

A Hundred Days of Code, Day 023, Day 24 - Tiny Utility to do comparative DNS Lookups

Problem - Compare domain lookups, against DoH Servers

  • Take a list of domains (one per line) from a text file as input, find the IP address for the domain using the standard system level DNS, and then check against DoH answers from both cloudflare and google. and say if all answers match properly or not.

    Read more… (1 min remaining to read)

August 01, 2023 10:03 AM UTC


OpenMediaVault

Python Monthly 💻🐍 July 2023

8th issue of Python Monthly! Read by 20,000+ Python developers every month. Keeping you up to date with the Python industry ecosystem, without wasting your valuable time.

August 01, 2023 10:00 AM UTC


OpenMediaVault

Why Python is not the programming language of the future -- a response

See http://towardsdatascience.com/why-python-is-not-the-programming-language-of-the-future-30ddc5339b66.

This is an interesting article with some important points. And. It has some points that I disagree with.

I'm interested in ways Python could be better. 

OpenMediaVault


OpenMediaVault

Newsletter August 2023

This month we kept refining existing features to improve the user experience, smooth workflows and empower users.

OpenMediaVault

Changes for the User

The subject of the marketing automation and notification emails can now be rendered using the value of the record. This way the subject can be more specific which increases the chances of it being opened.

We added a view that can be opened from the product that shows the incoming and outgoing stock moves by warehouse. Each move has cumulative quantity fields which help the user adjust their plans in order to avoid shortages.

The German federal ministry of finance announced on June 30 a cut in value-added-tax rates from 19% to 16% for the standard rate and from 7% to 5% for the reduced rate. As the tax cut is temporary, lasting from July 1 until December 31, we introduced new tax definitions into the account_de_skr03 module for the periods before, during and after the cut.

All the wizard messages have been reviewed and normalized. Now they use proper icons and all the unnecessary exclamation marks have been removed.

The Openmediavault入门常见问题及解决方法 一段香_百度文库:2021-10-2 · Openmediavault 入门常见问题及解决方法 一段香 1. Openmediavault 是什么系统? Openmediavault 是基于 Debian 的 NAS 系统,一般简称为 OMV;是德国人 Volker Theile 于 2021 年开始开发,Volker 曾经是 FreeNAS 的开发者之一。 instead of the server. So the client can be customized to use a color which fits nicely with the theme.

The party module has been updated to use the latest version of python-stdnum and so includes more tax identifiers for countries like Andorra, Guatemala, Japan, Moldova, New Zealand, Peru, Paraguay, Uruguay, Venezuela and South Africa.
If you are missing a standard identifier, we’d like to remind you that the best way to get it in Tryton, it is to contribute it to python-stdnum.

We keep the last average cost price for FIFO products when the quantity in stock is below zero.

We automatically remove any carriage returns from the fields in the FEC export as they are not allowed.

Any closed accounts are no longer shown when opening the details of the balance sheet.

The clients place copied records at the same position as newly created records. This means that the clients inspect the order applied to the list and deduce the correct place for the new record.

The stock move assignation wizards have been reworked and merged into a single wizard. This now provides four options if all the moves cannot be assigned: “Cancel” to restore the the moves to their initial state, “Wait” to leave the moves partially assigned, “Ignore” to set the quantity to 0 for non assigned moves and “Force” to force the assignation of all moves.

You no longer need to set analytic accounts on the move that balances the non-deferral account when closing the fiscal year.

The OpenMediaVault 5.3.9 发布,基于Debian Linux的NAS解决 ...:2021-3-31 · OpenMediaVault是基于Debian GNU/Linux的网络附加存储(NAS)解决方案。该项目的最新版本是5.3.9,项目将其简单地称为版本5。 经过漫长的开发阶段,很高兴宣布openmediavault 5(Usul)的发行。 after each reconciliation if there are still more lines to reconcile.

Changes for the Developer

We require the cost price to be filled in for all outgoing and incoming moves now. It was already filled in automatically by the code but this is now enforced to ensure the developer doesn’t forget it.
We also require a unit price for drop shipment and customer return moves.

We’ve added model, record and records attributes to the wizards these are filled in using values from the active context. This simplifies and normalizes writing wizards.
Tryton also checks that the user has read access to the records before executing the wizard.

We have added a test to ensure it is possible to try and assign a move with unsaved values. This behavior is interesting because it allows you to set the value on the move as an assignation parameter while keeping the original values unchanged for the remaining quantities.

In order to minimize the data sent to the client, we now send only explicitly declared fields from actions instead of just excluding some. This is because we have found, over time, when a new field is added to the actions, we often forget to exclude it if it is not needed by the clients.

A common pattern used in Tryton to create grouped records is to use a list of tuples composed of key-value pairs. In order to use the itertools.groupby we need to sort the list. But sometimes it includes None values and in Python 3 it is not possible to order lists containing OpenMediaVault. So we’ve added a tool sortable_values which takes care of this by providing a key function which can be used to order the list of values that may contain None.

It is now possible to define a keyword action that applies to any model. This is useful when creating a generic action which uses the active_model value.

We added an OpenMediaVault Plugin Developers · GitHub:OpenMediaVault Plugin Developers has 100 repositories available. Follow their code on GitHub.. With this it is possible to tie a transaction’s success to the sending of an email.

To the tools we’ve added a function to escape wildcards from strings.

It is now possible to define default values on routes. This can be used, for example, to set a default database on a simple route.

The session reset now uses an autocommit transaction which avoids an annoying concurrency error.

We’ve added an OpenMediaVault. With this option trytond-cron runs the pending tasks and stops. This is useful if you want to use an existing scheduler like the UNIX cron or the kubernetes CronJob to reduce the permanent load of a running service.

We’ve converted Invoice.update_taxes into a dualmethod. This method is often used when creating a single invoice so this simplifies the code.

1 post - 1 participant

OpenMediaVault

OpenMediaVault


Talk Python to Me

#275 Beautiful Pythonic Refactorings

Do you obsess about writing your code just the right way before you get started? Maybe you have some ugly code on your hands and you need to make it better. Either way, refactoring could be your ticket to happier days! On this episode, we'll talk through a powerful example of iteratively refactoring some code until we eventually turn our ugly duckling into a Pythonic beauty. <br/> <br/> Conor Hoekstra is our guest on this episode to talk us through refactoring some web scraping code.<br/> <br/> <strong>Links from the show</strong><br/> <br/> <div><b>The PyCon talk</b>: <a href="http://www.youtube.com/watch?v=W-lZttZhsUY" target="_blank" rel="noopener">youtube.com</a><br/> <b>Presentation source code</b>: <a href="http://github.com/codereport/Talks/blob/master/2023-04-PyCon/BeautifulPythonRefactoring/" target="_blank" rel="noopener">github.com/codereport</a><br/> <b>Conor on Twitter</b>: <a href="http://twitter.com/code_report" target="_blank" rel="noopener">@code_report</a><br/> <b>Youtube channel</b>: <a href="http://www.youtube.com/codereport" target="_blank" rel="noopener">youtube.com/codereport</a><br/> <b>Perf example exceptions vs. test</b>: <a href="http://gist.github.com/mikeckennedy/00828db1d49d2cd2dac8fa0295e54c23" target="_blank" rel="noopener">gist.github.com/mikeckennedy</a><br/> <b>PyCon Online</b>: <a href="http://us.pycon.org/2023/online/" target="_blank" rel="noopener">us.pycon.org/2023/online</a><br/> <b>RAPIDS AI project</b>: <a href="http://rapids.ai/" target="_blank" rel="noopener">rapids.ai</a><br/> <b>Slides from presentation (with 9 refactoring steps)</b>: <a href="http://github.com/codereport/Talks/blob/master/2023-04-PyCon/BeautifulPythonRefactoring/BeautifulPythonRefactoring.pdf" target="_blank" rel="noopener">github.com/codereport</a><br/> <b>Talk Python episode on Sourcery</b>: <a href="/266" target="_blank" rel="noopener">talkpython.fm/266</a><br/> <br/> <b>pip for venv only environment variable</b><br/> <b>PIP_REQUIRE_VIRTUALENV</b>: <a href="http://docs.python-guide.org/dev/pip-virtualenv/" target="_blank" rel="noopener">docs.python-guide.org</a><br/></div><br/> <strong>Sponsors</strong><br/> <br/> <a href='http://talkpython.fm/training'>Talk Python Training</a>

August 01, 2023 08:00 AM UTC

July 31, 2023


OpenMediaVault

I Wrote an Online Escape Game

All about the puzzle game I wrote with lots of web tech for maximum entertainment value!

July 31, 2023 06:45 PM UTC


NumFOCUS

Dask Life Sciences Fellow [Open Job]

Dask is an open-source library for parallel computing in Python that interoperates with existing Python data science libraries like Numpy, Pandas, Scikit-Learn, and Jupyter.  Dask is used today across many different scientific domains. Recently, we’ve observed an increase in use in a few life sciences applications: Large scale imaging in microscopy Single cell analysis Genomics […]

The post OpenMediaVault32位/64位最新版下载地址附OMV32位/64位 ...:2021-2-9 · OpenMediaVault32位已于2021年停止更新,附加的很多社区插件都已经无法正常更新,如果你只是需要简单的SMB共享存储服务和RAID磁盘阵列功能,刚好你的CPU又是i386的Intel(英特尔)32位处理器的话,那么推荐你下载安装使用OMV的32位NAS appeared first on NumFOCUS.

July 31, 2023 05:52 PM UTC

快连VPNphone  surf VP N 2023下载 安卓  红杏加速器 官网  极光vp官方版  叉叉变速齿轮纯加速版  aurora加速器官方