u/Goobyalus
-
1points
Goobyalus
Goobyalus
They started putting anti rotation safety cutoffs in them to reduce injury which is nice
Goobyalus
Most excited for the epic scifi story and the dark humor.
Goobyalus
I tried to work everything out of it by moving all the joints in soapy water, then regreased everything after. A pain, but it seemed to do a good job.
Goobyalus
Is yours filled with grit in all the joints?
Goobyalus
AKG K240STUDIO has been on sale lately for ~$50 on Amazon
Goobyalus
Unfortunately they do not have an impact driver mode.
Goobyalus
If the wood split with the grain and the pieces fit perfectly, properly applied wood glue (like Titebond) will be strong enough once cured.
It looks like it's split in 3 places though, and you might need to do some disassembly to get into those cracks to the sides of the big one.
If you don't mind a screw hole and can get one from the crevice on the right diagonally up through the apron, past the small crack on the left, into the solid wood, that would offer some more strength along with the wood glue. It looks like you'd need like a 6" or 8" screw to make it all the way.
You could also potentially reinforce it from behind the apron.
Goobyalus
For the kind of work you listed I might recommend a 12V system because they're lighter and more convenient to lug around. You shouldn't be missing the power for hanging things and assembling furniture. The DCD777 looks like a monster for this; even in DeWalt's 20V line I would look for a compact one.
I would recommend a compact drill and a compact driver together.
I might also recommend an installation-style / multi-head driver. At least Bosch, Milwaukee, and DeWalt make them. Probably others too:
- Bosch 12V: https://www.boschtools.com/us/en/products/gsr12v-300fcb22-06019H3015
- Milwaukee M12: https://www.milwaukeetool.com/products/details/m12-fuel-installation-drill-driver-tool-only/2505-20
- DeWalt 12V: https://www.dewalt.com/en-us/product/dcd703f1/xtreme-12v-max-brushless-cordless-5-1-drilldriver-kit
- DeWalt 20V: https://www.dewalt.com/en-us/product/dcd803b/20v-max-atomic-multi-head-drilldriver-tool-only
If you need to get into a weird spot, like really close to a wall or inside a cabinet, these become very useful. They are a bit heavier and larger than just the compact drill would be from the associated brand, though.
I have used the Bosch FlexiClick and the Milwaukee Installation Driver, and IMO the Bosch is better. The Bosch is more compact and comfortable, has better tactile controls (e.g. Milwaukee has push buttons for reversing instead of the traditional side to side switch), and has better attachment system (can reorient attachments without removing them). And the Milwaukee makes an irritating high pitched sound.
But they're comparable.
The downside to the Bosch 12V system is they have much fewer tools compared to M12 and some others if you need something random. Like M12 has all kinds of professional tools if you happen to need a $2500 tool to install copper pipe fittings or something.
I would recommend a hydraulic impact/impulse driver if it's in the system you like and in budget. MUCH quieter and more pleasant to use than a traditional impact. At least M12, M18, DeWalt 20V, and Makita 18V make them. Bosch does not make one.
They are supposedly less powerful than traditional impacts but it's worth it. I tried the M12 Surge and it makes me not want to ever use my Bosch 12V impact.
Misc.
- If you need hammer drill functionality to install in brick/concrete/etc, look into getting a tool with that functionality. Bosch 12V has them, and has an SDS attachment for the Flexiclick. Milwaukee makes an M12 hammer drill and an M12 SDS drill. Obviously the hammer drill will be heavier than the drill without that function.
- FWIW, Bosch and I think Makita sell replacement parts for their tools if you want to repair them
- Ryobi also has a wide selection of tools and will get the job done
- TBH I often still carry my brushed Bosch 12V drill driver combo (CLPK22-120) that I got on sale
- If you're not in a time crunch, look for sales. I recently got a reconditioned Bosch 12V FlexiClick from ACME for $109
Goobyalus
For something this liight just get anchors that say they can be used in concrete. They should tell you weight ratings and hole sizes for different media on the package.
Hillman DuoPower works on lots of different things - look at the 8th picture in solid concrete: https://www.homedepot.com/p/Hillman-6-8-and-8-10-x-1-3-16-in-DuoPower-Contractor-Strength-Anchor-Kit-78-Pack-376475/302043758
Goobyalus
What kind of data are you compressing? How much larger? It is possible for the "compressed" version to be larger depending on the data being compressed.
Have you compared your output to the output of another lz77 compression program? It could be correct.
The fact that decompression results in the original data doesn't mean the algorithm is implemented correctly; it means that the compression and decompression algorithms are inverses. Unless you mean you compressed it with your implementation, and decompressed with someone else's?
Goobyalus
I think my parents had the same cheap plastic 2-slice toaster for like 15 years.
I have had a small Bella 4-slice toaster oven for about 7 years. I got it on sale at Macy's for $20. It gets used multiple times a day. It doesn't heat evenly, but I know the pattern of how it heats, so I just place things in it accordingly.
For longevity, I think simpler is better. Idk about even heating, but I think I've always just figured out how to get the average toast I want.
Maybe look for a radiant control toaster?
Goobyalus
- Decorators are syntactic sugar for applying a function (or callable) to a definition (class or function definition) before assignment.
- Classes and functions are objects that can be passed around; and their names are normal variable names too.
@foo
def bar(...):
...
is
def bar(...):
...
bar = foo(bar)
@foo
class Bar:
...
is
class Bar:
...
Bar = foo(Bar)
@foo
@bar
def baz(...):
...
is
def baz(...):
...
baz = foo(bar(baz))
It might be confusing to see things like this:
@dataclass
class Properties:
...
@dataclass(order=True, kw_only=True, frozen=True)
class Record:
...
dataclass can be called with a positional argument. If that's the case, it knows treat that as a type, to modify it, and return it back.
dataclass can also be called without any positional arguments. If that's the case, dataclass returns another function that will take in the type to modify it and return it back.
So dataclass(order=True, kw_only=True, frozen=True) gets evaluated and returns a new function. That new function is what's decorating the class definition.
Here is the dataclass decorator source code:
https://github.com/python/cpython/blob/3.14/Lib/dataclasses.py#L1423
def dataclass(cls=None, /, *, init=True, repr=True, eq=True, order=False,
unsafe_hash=False, frozen=False, match_args=True,
kw_only=False, slots=False, weakref_slot=False):
"""Add dunder methods based on the fields defined in the class.
Examines PEP 526 __annotations__ to determine fields.
If init is true, an __init__() method is added to the class. If repr
is true, a __repr__() method is added. If order is true, rich
comparison dunder methods are added. If unsafe_hash is true, a
__hash__() method is added. If frozen is true, fields may not be
assigned to after instance creation. If match_args is true, the
__match_args__ tuple is added. If kw_only is true, then by default
all fields are keyword-only. If slots is true, a new class with a
__slots__ attribute is returned.
"""
def wrap(cls):
return _process_class(cls, init, repr, eq, order, unsafe_hash,
frozen, match_args, kw_only, slots,
weakref_slot)
# See if we're being called as @dataclass or @dataclass().
if cls is None:
# We're called with parens.
return wrap
# We're called as @dataclass without parens.
return wrap(cls)
Goobyalus
What lol, isnt the reason we talk about the undecidability of the halting problem and Godel's incompleteness theorems that we cannot prove out all software?
Goobyalus
I like the Gerber MP600 and the Roxon Flex Companion. I prefer the MP600 over the Center Drive because the tools are easier to open and it's less bulky, but the knife layout on the Center Drive is better.
Goobyalus
If you look specifically for DC inline switches I think you'll have more luck finding small ones. The AC voltage ones are bulkier to handle more current.
Here's an example: https://www.amazon.com/TronicsPros-Inline-5-5x2-1mm-Connector-Adapter/dp/B01FT4RBBM/
Goobyalus
If it's not prying open, I would use an abrasive or fine tooth saw to cut around the seam, and glue it back together.
I also don't know how clunky is too clunky, but I'm seeing some inline electric switches that look pretty reasonable.
Is this wall AC voltage or DC voltage from an adapter?
Goobyalus
- If a class has both class and instance variables, should the class variable(s) be defined at the very top (before the
__init__definition)?
I would say yes. It would feel very strange to see class variables interspersed with methods.
- Should methods of a class be grouped together according to their type (special, class, instance)? Should certain types be defined before others?
- Should definitions be structured in such a way so as to minimize the amount of "scrolling" that a reader must perform (example below), or is it still better to simply group attributes by "type" (method vs attribute/property):
Just think about what would be the most understandable when you have to come back and read it again, and try to be consistent with other parts of the code. If I can rely on it always being organized conceptually, or alphabetically, or whatever, it's good to have the same mental model for how to find what I'm looking for. I would say grouping things conceptually rather than by type makes more sense.
I would also say that if a class has a bunch of getters and setters, or starts getting huge and confusing to navigate, maybe there is a better way to structure the code.
Goobyalus
Need to use them when wrapping functions.
I think I might have used a function factory at one point.
Otherwise I think the only time I encounter them is to do some tedious calculation that is used repeatedly in the context of a larger calculation.
Goobyalus
Why do i need to call self here?.
In this example, there is no point in using normal methods with self parameters because the class holds no state and self is not referred to. So your intuition about something being off here is correct. This could be a static method with no self or class reference.
And to be clear, this is not "calling" self, it is specifying self as a parameter.
there isn't a variable that is calling calculator and no init so why do i have an error if self is not added?
Because methods are implicitly instance methods. I.e., they operate on a single instance of a class. Therefore, they need to know which instance to refer to. These last 2 lines are the same, and the dot notation is just nicer.
calc = Calculator()
Calculator.add(calc, 1, 2) # explicitly passing calc as self
calc.add(1, 2) # implicitly passing calc as self
Again, it's unintuitive in this case because there is no point in having an instance method for that example. This would make more sense:
class Calculator:
@staticmethod
def add(a, b):
return a + b
Calculator.add(1, 2)
Also, what is init anyways.
__init__ "initializes" a new object. I.e. it populates the initial data fields.
https://docs.python.org/3/reference/datamodel.html#object.__init__
object.__init__(self[, ...])Called after the instance has been created (by
__new__()), but before it is returned to the caller. The arguments are those passed to the class constructor expression. If a base class has an__init__()method, the derived class’s__init__()method, if any, must explicitly call it to ensure proper initialization of the base class part of the instance; for example:super().__init__([args...]).Because
__new__()and__init__()work together in constructing objects (__new__()to create it, and__init__()to customize it), no non-None value may be returned by__init__(); doing so will cause aTypeErrorto be raised at runtime.
why the double __ in the start and end? and why the specific name?
Cause Python decided to use the double leading and trailing underscores as a convention for implicitly called methods (called "dunder" methods in shorthand.)
https://docs.python.org/3/glossary.html#term-special-method
A method that is called implicitly by Python to execute a certain operation on a type, such as addition. Such methods have names starting and ending with double underscores.
Goobyalus
Consider a 180 degree USB coupler or a flush mount Bluetooth dongle to avoid the awkward shape.
And I think there must be something in the right dimensions on AliExpress somewhere.
Goobyalus
Does the updated timestamp impact anything, or can it just be some placeholder value?
You can put a placeholder value in the json, and use a clean filter to always set the value to the placeholder value. The clean filter is executed on staging (i.e. add), so it won't show up in a diff.
Assuming the file is config.json
This sets the name and command of the filter:
git config filter.ignore-lastLicenseCheck.clean 'jq ".lastLicenseCheck.expr.literal.Value = \"'987654321'\"" config.json'
And in .gitattributes
config.json filter=ignore-lastLicenseCheck
Seems to work for me:
$ git show HEAD:config.json
{
"lastLicenseCheck": {
"expr": {
"literal": {
"Value": "987654321"
}
}
},
"otherData": 123
}
$ cat config.json
{
"lastLicenseCheck": {
"expr": {
"literal": {
"Value": "1"
}
}
},
"otherData": 123
}
$ git status
On branch master
nothing to commit, working tree clean
$ git config -l | grep last
filter.ignore-lastLicenseCheck.clean=jq ".lastLicenseCheck.expr.literal.Value = \"987654321\"" config.json
$ cat .gitattributes
config.json filter=ignore-lastLicenseCheck
Edit: obviously this depends on jq, and using that to rewrite the the specific problematic value.
Goobyalus
Here is a dumb example where an arbitrary number of parentheses works:
>>> def foo():
... return foo
...
>>> foo()
<function foo at 0x0000028A0F6DD800>
>>> foo()()
<function foo at 0x0000028A0F6DD800>
>>> foo()()()()()()()()()()()()()
<function foo at 0x0000028A0F6DD800>
>>> foo
<function foo at 0x0000028A0F6DD800>
>>>
Goobyalus
Can you format the code snippets in this post as code

I got it without battery on clearance for $110. It's nice.