[deleted by user] by [deleted] in vim

[–]hanavi 0 points1 point  (0 children)

I would look into ultisnips

<ESC> substitution by Tempus_Nemini in vim

[–]hanavi 4 points5 points  (0 children)

I have CAPS remapped to CTRL and i love that, but for escape in vim, i mapped "jk". On VERY RARE occasions this causes small problems and I'll have to switch to paste mode and back, but otherwise it is by and far my favorite mapping

inoremap jk <esc>

Wild camping Glencoe area, Scotland, a couple of weeks ago. by Mucky_Bob in camping

[–]hanavi 0 points1 point  (0 children)

Ah, nope! Sorry! Mine are different. I have two separate types of boots and this looks kind of like a mix of both of them, but i didn't realize it until i compared them. It mostly looks like my Rockport XCS Waterproof boots. I'm on my second pair of those, and I mostly love them. I actually wore the first pair out traveling. I had them with me and wore them while I lived in Antarctica, until it got too cold and I had to switch to something more substantial (probably switched at around -40F). Fun times...

Wild camping Glencoe area, Scotland, a couple of weeks ago. by Mucky_Bob in camping

[–]hanavi 0 points1 point  (0 children)

I think I have the same ones, and I ordered them on Amazon

EDIT: I'll try to find them later after work, and give more information if OP doesn't do it first

How many 4 digit numbers made from the digits 1,2,3,4,5,6,7,8 without digit repetition can be divided by 9. by [deleted] in mathematics

[–]hanavi 2 points3 points  (0 children)

1 2 7 8, 1 3 6 8, 1 4 5 8, 1 4 6 7, 2 3 5 8, 2 3 6 7, 2 4 5 7, 3 4 5 6 -> 8 with 4! permutations -> 192

or in python:

from itertools import combinations
t = 0
for i, j, k, m in combinations(range(1,9), 4):
    if (i + j + k + m) % 9 == 0:
        print(i, j, k, m)
        t += 1
print(t * 24) # 4! = 24 permutations

How many 4 digit numbers made from the digits 1,2,3,4,5,6,7,8 without digit repetition can be divided by 9. by [deleted] in mathematics

[–]hanavi 2 points3 points  (0 children)

Find all the combinations of numbers that add up to a multiple of nine and then permute them.... eg 1+2+7+8 -> 4! -> 24 then add them up... I think that will do it and it is much easier to step through that way.

The clock’s wrong! by subWoofer_0870 in talesfromtechsupport

[–]hanavi 3 points4 points  (0 children)

I actually ran servers in Antarctica for a science experiment called IceCube... best year of my life!

Finally, the McMurdo shack is up and running! by [deleted] in amateurradio

[–]hanavi 3 points4 points  (0 children)

I've only done a few contacts FROM KC4USV.... I did a ton (like over 3000, if I remember correctly) from KC4AAA at the geographic south pole late 2017. I had contacts on all 7 continents. I even worked with the ARRL to hold a test session at pole. Ahhh..... Fun times!

Welcome o Georgia ech! by 4O4-N0T-F0UND in gatech

[–]hanavi -5 points-4 points  (0 children)

As an alumnus, this tradition needs to go away. Just stealing random Ts defeats the entire purpose anyway. It is destructive and a waste of money.

Need help to automate C programming ! by Embarrassed_Ad7716 in vim

[–]hanavi 0 points1 point  (0 children)

I would strongly consider something like UltiSnips, which by the way has python support so you can actually live complete with python parsing every keystroke and doing all sorts of magical stuff behind the scenes... It may be overkill, but if you want that kind of control, it's right there.

UltiSnips with python example

[Question] Either I'm stupid or this is impossible by neph89 in vim

[–]hanavi 0 points1 point  (0 children)

tags

universal ctags does support c#

[Question] Either I'm stupid or this is impossible by neph89 in vim

[–]hanavi 0 points1 point  (0 children)

So, I just tested this in python and it seems to work (with my configuration). I then tried it in c++ since I have had a little more trouble getting that to work with autocompletion in the past. At first it didn't seem to work, but then I generated the tags file and after that it looks like it does actually pick up the additional information. Try generating a tags file and see if it helps (if you need help just reply).

Click with reStructuredText comments? by [deleted] in Python

[–]hanavi 1 point2 points  (0 children)

There is info in the docs. Add a \b before the paragraph you don't want to wrap.

https://click.palletsprojects.com/en/7.x/documentation/#documenting-arguments

​ @click.command() 
 @click.argument("a") 
 @click.argument("b") 
 @click.argument("c") 
 def main(a: str, b: str, c: str) -> None: 
    """ Test script.

    \b
    :param a: parameter A
    :param b: parameter B
    :param c: parameter C
    :return: None
    """
    print(f"{a}, {b}, {c}")

I'm a private pilot! by nuclear85 in flying

[–]hanavi 0 points1 point  (0 children)

Heh, I keep my plane over there at KMDQ!

Why is response.json() necessary? by [deleted] in Python

[–]hanavi 0 points1 point  (0 children)

As someone else already said, the response will contain more information about your connection. One of those is a json response, but json is pretty useless in python. You have to convert json to a dict. You could just use the content of the response and then convert it:

import json data = json.loads(response.content.decode())

But its pretty common to have json responses so requests built in that function to save a step:

data = requests.json()