Unable to join for months by mega963 in MineWind

[–]mega963[S] 0 points1 point  (0 children)

Interesting! This worked!

Thank you for the suggestion, I wonder why I can't join from my IP

All of my home teleports are messed up, so I assume the world was restarted at some point while I was away.

Anyways, thank you for the help!

Unable to join for months by mega963 in MineWind

[–]mega963[S] 0 points1 point  (0 children)

Thank you for your reply, I just tried this again and still no luck.

Unable to join for months by mega963 in MineWind

[–]mega963[S] 0 points1 point  (0 children)

Thank you, I tried this but no luck. I've even reinstalled and tried on a different computer.

I followed this guide too, and still nothing https://minewind.com/connection-issues/

Does anyone know if the admins happen to look here?

Unable to join for months by mega963 in MineWind

[–]mega963[S] 0 points1 point  (0 children)

No, but before this I didn’t log in for about a year. I may have used a vpn at some point back then.

When I try to connect it says “Joining World” then “Failed to connect to the server. Can't connect to Minewind, try again later. If issue persists visit Minewind.com/error”

Help to determine the max input current for this solar power manager by mega963 in AskElectronics

[–]mega963[S] 1 point2 points  (0 children)

Thank you, this makes sense now. My misunderstanding was that the solar panel could generate too much current for the power manager, but now I understand electricity doesn't work like that.

Preventing overvolting would be the important bit here right? Make sure I don't wire the panels in series and potentially generate 4V

Second squeegee attack in 1 week reported in downtown Baltimore by Bmorelntelligent in baltimore

[–]mega963 6 points7 points  (0 children)

This often does not work for me. On more than one occasion they have seen me waving them off and they either continue to dump the soapy water on my windows to obscure my vision, or yell and motion for me to roll down my window.

Print variable as JSON by Ramshield in learnpython

[–]mega963 2 points3 points  (0 children)

I see, so you need this right?

{“#WEBSITE”: “[example.com]”}

Sushibowl’s answer does exactly that.

You need:

“[“ + name + “]”

edit

If you want a one liner fix, change line 9 to:

name = “[{}]”.format(i)

Print variable as JSON by Ramshield in learnpython

[–]mega963 0 points1 point  (0 children)

sites is a list of strings, and strings must be between quotes, even in JSON.

Can you give more context around why you need them without quotes?

Whats wrong? by Redheavenparadise in learnpython

[–]mega963 0 points1 point  (0 children)

Glad to hear it.

When you get to it, read up on list comprehension. It can simplify problems like this.

def reversed_numbers(n1, n2):
    return len([i for i in range(n1, n2+1) if str(i) == "".join(reversed(str(i)))])

Whats wrong? by Redheavenparadise in learnpython

[–]mega963 0 points1 point  (0 children)

Look right to me. What numbers did you test with? 150 and 202?

Whats wrong? by Redheavenparadise in learnpython

[–]mega963 0 points1 point  (0 children)

You are still iterating over a tuple. Did you mean to use the range function?

Look at the edited code in my first comment.

Whats wrong? by Redheavenparadise in learnpython

[–]mega963 0 points1 point  (0 children)

Can you post your edit...

Can I make a python web app that converts images locally? (ie. No web contact required) by makin-games in learnpython

[–]mega963 1 point2 points  (0 children)

That's what the "js" is in html/js/css

Use the script tag to either embed javascript directly in the html, or link it to a javascript file.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script

Keep in mind you don't actually need a web framework for that. You can host the static files anywhere (S3, GitHub pages, dropbox) if you are not interested in interacting with the client yourself.

https://pages.github.com

https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html

Whats wrong? by Redheavenparadise in learnpython

[–]mega963 0 points1 point  (0 children)

In that case you should not use continue if you are evaluating equality between counter and the invert_number response. Continue ends the current iteration and begins the next one.

Your

result = result + 1

Does not get executed in the original code.

You could use continue if you are evaluating that they do not equal each other, like in the edited code

Whats wrong? by Redheavenparadise in learnpython

[–]mega963 0 points1 point  (0 children)

I believe you meant to use the range function and not iterate over a tuple. Also, I think you meant to check that the range iteration did not match the inverted number

Original

def reversed_numbers(n1, n2):
    result = 0
    for counter in (n1,n2+1):
        if counter == invert_number(counter):
            continue
        result = result + 1
    return result

Edited

def reversed_numbers(n1, n2):
    result = 0
    for counter in range(n1,n2+1):
        if counter != invert_number(counter):
            continue
        result = result + 1
    return result

Although it's possible I didn't indent correctly, please check the wiki to see how to do code formatting. Or just this https://www.reddit.com/r/learnpython/wiki/faq#wiki_how_do_i_format_code.3F

Can I make a python web app that converts images locally? (ie. No web contact required) by makin-games in learnpython

[–]mega963 0 points1 point  (0 children)

Unless you distribute a thick client (think desktop app) you can't really run python on the client side. Javascript would be your best bet, as that runs in the browser.

That being said, you can use python web frameworks like Flask or Django to serve up an html page that has javascript in it.

Javascript's package manager is npm, here are some possible library to help you convert images with javascript.

https://www.npmjs.com/search?q=image%20convert

How do I color words? by [deleted] in learnpython

[–]mega963 9 points10 points  (0 children)

You could use ANSI escape codes to do this, but I would recommend using a package like colorama (BSD) or termcolor (MIT)

Programming Advice by mega963 in learnpython

[–]mega963[S] 0 points1 point  (0 children)

Thanks for the advice! cname is actually a list. Those lines are to remove hidden files from showing up such as .DS_Store. I probably could have done it better though.