What are the use cases for multi gbps home network or internet access? With a 1/1 Gbps link we could use 500 Mbps to transfer 5 TBytes per day of home assistant backups, time machine deltas, security footage..., and still have the other 500 Mbps to do whatever we want.
HN user
fdomingues
I have made this tiny module to use it wherever I want it.
That content shift on page scroll is horrendous. Please don't do that, there is no need to auto hide a side bar.
Some time ago I created a chat that uses the same principles, it's funny to have some ideas validated by something that has been around for over 20 years and that I didn't know existed.
To overcome the hoarding I use Simple Tab Groups[1], that has auto backup, combined with Auto Tab Discard[2], to completely inactivate open, but unused, tabs.
[1] https://addons.mozilla.org/en-US/firefox/addon/simple-tab-gr...
[2] https://addons.mozilla.org/en-US/firefox/addon/auto-tab-disc...
Happy to see it converted from the old flash applet.
Is useful to do code generation/transformation, for example in this utility[1] it uses the information provided on the declaration of the class to generate the methods required by the base class.
The user of the utility write this:
class Book(objects.Object):
title: Optional[str]
And the generated class code is: class Book(Base):
__slots__ = ('title', )
title: typing.Optional[str]
def __init__(self, title=None):
self.title = title
@classmethod
def from_data(cls, data):
title = data.get('title', None)
return cls(title=title)
def to_data(self):
data = {}
if self.title is not None:
data['title'] = self.title
return data
@classmethod
def from_oracle_object(cls, obj):
return cls(title=obj.title)
def to_oracle_object(self, connection):
obj = connection.gettype('Book').newobject()
obj.title = self.title
return obj
[1]https://github.com/domingues/oracle-object-mappingC++ Is NOT 9.4 Times Faster Than Python in Prime Number Test
I added 3 lines to the Python code and got it 10x faster:
(venv) $ python prime.py
Number of primes between 0 to 1000000 = 78498
Elapsed time: 6.502481937408447
(venv) $ python prime.py
Number of primes between 0 to 1000000 = 78498
Elapsed time: 0.6258630752563477
Diff: 3c3,5
<
---
> import numba
>
> @numba.njit
14a17
> @numba.njitSince Python 3.7 you can postpone evaluation of the annotations[1].
You can do something like this:
from __future__ import annotations
Class Node:
parent: Optional[Node]
[1] https://www.python.org/dev/peps/pep-0563/$=${$}[$]; $($);
Actually some time ago I found some piece of alien PHP code (a backdoor) in my server, and I couldn't understand it! I did't know the $($); syntax. After searching for that and not finding anything I discovery that exist one special Unicode character that is invisible.
Full code here: https://imgur.com/a/Cggdx