Hammerheart

joined 1 year ago
[–] [email protected] 1 points 1 month ago (1 children)

How do I trouble shoot a broken tray icon in swaybar?

[–] [email protected] 0 points 1 month ago (1 children)

Oof, that paywall. Right in the balls.

[–] [email protected] 2 points 1 month ago

I may actually have a hope of remembering how to access elements of an array in bash now!

[–] [email protected] 1 points 1 month ago (1 children)
[–] [email protected] 1 points 1 month ago

The benefit is you don't have to use windows. Obviously, it's not a trade off that's going to satisfy everybody.

[–] [email protected] 1 points 1 month ago

Its pretty cool he mentioned the work of doug engelbert. I recently finished a book called 'what the dormouse said: how the 60s counterculture shaped the personal computer.' Kay's comment makes me feel that was not just a bit of trivia, but a glimpse into the potential of computing that is tsill yet to be realized.

[–] [email protected] 2 points 2 months ago* (last edited 2 months ago)

I just want you to know you weren't screaming into the void. Look at my new main.py:


from pathlib import PurePath


from Layout import Layout


DEFAULT_FOLDER = PurePath("/home", "mike", "bg")
WATERMARK_DIR = Path(Path(os.getcwd()).parent, "assets", "img")


def main() -> Layout:
    return Layout()

if __name__ == "__main__":
    main()

(I know I still need to change those folder defaults, but I am still riding the high of getting all that layout stuff into Layout.py and it working. I spent a couple hours today struggling, wondering why I was just getting a blank screen, when i realized i forgot to call .grid() on the frame that held all the widgets! So it was just rendering a blank window. )

[–] [email protected] 1 points 2 months ago (1 children)

Plus crypto is volatile and you'd have to manage it a lot more to keep it pegged at "expensive enough"

this is a solved problem. Just change the crypto cost according to its exchange value. I pay for my vpn and my vps with crypto.

[–] [email protected] 5 points 2 months ago

I think it's safe to say guns are an offensive weapon

[–] [email protected] 1 points 2 months ago

That really pisses me off.

[–] [email protected] 1 points 2 months ago

I thought id give flatpak firefox a shot and the profiles are broken. I might be able to fix it by making some symlinks but it left a bad taste in my mouth. I was unable to get it to recognize my userChrome.css

[–] [email protected] 7 points 2 months ago (1 children)

Can you elaborate because this is not obvious to me. Maybe we sre thinking different things when we talk about "openness" in this context.

 

I'm new to vim and getting the hang of the configuration. I've gone through a couple of youtube videos giving a tutorial of setting it up with lazy.nvim. Now I am following ThePrimeagen's config, and UndoTree doesn't work.

The plugin is loaded and my config is properly sourced, but when I run run :UndoTreeToggle, I get this lovely error:

(E5108: Error executing lua: function undotree#UndotreeToggle[11]..<SNR>37_new[2]..41, line 6: Vim(echoerr):"diff" is not executable. stack traceback: [C]: at 0x7ff77ae89570)

I am running windows (currenty in the process of backing up my personal data so I can try out Linux without feeling too disconnected from my daily computer user). I did a little bit of google searching and checked the issues on github, unfortunately I couldn't find anything related to my problem. Any help would be much appreciated.

 

I am working on user authentication in Flask. I have my User class, which inherits from db.Model (SQLAlchemy) and UserMixins (flask-login):

class User(db.Model, UserMixin):
    id = db.Column(db.Integer, primary_key=True)
    email = db.Column(db.String(100), unique=True)
    password = db.Column(db.String(100))
    name = db.Column(db.String(1000))

and I create a new User object during registration:

        new_user = User(
            name=request.form["name"],
            password=generate_password_hash(password=request.form.get("password"),
                                            salt_length=8,
                                            method="pbkdf2:sha256"),
            email=request.form["email"])

Since I inherited from UserMixins, I started to get an "unexpected arguments" warning from pycharm when I create new_user. can someone explain to me why that is? If I don't inherit from UserMixins, the warning goes away.

 

So, it used to work just fine. Then jerboa became basically unusable due to some bug. That was a few weeks ago. I saw an update was available, so I thought to give it another try. It's much more stable after the update, and my lemmy.one account works just fine. But when I try to log in with this account on jerboa, I get an incorrect login error. I set the instance to "programming.dev" and I know I used the right credentials because my password manager filled them in, just like it does in the browser.

Any ideas on a cause or fix? It might be a jerboa issue but I don't get why it seems to only impact this instance.

1
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

I am trying to create a playlist with spotify and the spotipy library in python. However, I keep getting a "No token provided" error when making my API request. However, if I use the same token with a curl request, it works! Can someone please help. This is my code:

auth_manager = SpotifyOAuth(client_id=CLIENT,
                            client_secret=SECRET,
                            redirect_uri="http://example.com/",
                            scope=SCOPE,
                            username=spotify_display_name
                            )
token = auth_manager.get_access_token(
    as_dict=False,
    check_cache=True
)

sp = spotipy.Spotify(auth_manager=auth_manager,
                     auth=token
                     )
user_dict = sp.current_user()
user_id = user_dict["id"]
print(f"Welcome, {user_dict['display_name']}")


# SEARCH
# QUERY FORMAT: "track: track-name year: YYYY"

spotify_search_endpoint = "https://api.spotify.com/v1/search/"
test_query = "track:Hangin'+Tough year:1989"

search_parameters = {
    "q": format_query(test_query),
    "type": "track"
}

results = sp.search(q=search_parameters["q"])
print(results)

output:

{'tracks': {'href': 'https://api.spotify.com/v1/search?query=track%3AHangin%27%2BTough%2520year%3A1989&type=track&offset=0&limit=10', 'items': [], 'limit': 10, 'next': None, 'offset': 0, 'previous': None, 'total': 0}}
{
"error": {
"status": 401,
"message": "No token provided"
}
}

This is really frustrating! The authentication is working, otherwise the token wouldn't have been valid for the curl request. I must be doing something wrong with spotipy.

3
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

I was looking over the first kata i did on codewars, and I thought it would be fun to try and solve it in C. The object was to return a string based on a boolean input. it took a lot of trial and error, googling, chat gippity, but I eventually got it to work. I am still focused on learning python, but I've had it in my mind that I should branch out once I've reached a competence plateau in python. I'm nowhere near that plateau yet, but this seemed simple enough to warrant the necessary investment in time to accomplish it.

// C:
#include <stdbool.h>
// FIRST EVER C PROGRAM
const char *bool_to_word (bool value){
// you can return a static/global string or a string literal
  if (value == 1){
  return "Yes";
    }
  else{
    return "No";
  }
}

I realize this is pretty trivial, but still, it's a milestone for me and I wanted to do my part to get the ball rolling on this community.

view more: ‹ prev next ›