• 0 Posts
  • 32 Comments
Joined 2 years ago
cake
Cake day: June 21st, 2023

help-circle




  • Python developer here. Venv is good, venv is life. Every single project I create starts with

    python3 -m venv venv

    source venv/bin/activate

    pip3 install {everything I need}

    pip3 freeze > requirements.txt

    Now write code!

    Don’t forget to update your requirements.txt using pip3 freeze again anytime you add a new library with pip.

    If you installed a lot of packages before starting to develop with virtual environments, some libraries will be in your OS python install and won’t be reflected in pip freeze and won’t get into your venv. This is the root of all evil. First of all, don’t do that. Second, you can force libraries to install into your venv despite them also being in your system by installing like so:

    pip3 install --ignore-installed mypackage

    If you don’t change between Linux and windows most libraries will just work between systems, but if you have problems on another system, just recreate the whole venv structure

    rm -rf venv (…make a new venv, activate it) pip3 install -r requirements.txt

    Once you get the hang of this you can make Python behave without a lot of hassle.

    This is a case where a strength can also be a weakness.




  • One of the best things ever about LLMs is how you can give them absolute bullshit textual garbage and they can parse it with a huge level of accuracy.

    Some random chunks of html tables, output a csv and convert those values from imperial to metric.

    Fragments of a python script and ask it to finish the function and create a readme to explain the purpose of the function. And while it’s at it recreate the missing functions.

    Copy paste of a multilingual website with tons of formatting and spelling errors. Ask it to fix it. Boom done.

    Of course, the problem here is that developers can no longer clean their inputs as well and are encouraged to send that crappy input straight along to the LLM for processing.

    There’s definitely going to be a whole new wave of injection style attacks where people figure out how to reverse engineer AI company magic.






  • Still think it’s a baited headline given their stated intention to go to court to fight the “unconstitutional ruling”. I’m not so sure the constitution gives foreign companies many legal rights so in that regard they’d perhaps be more protected if they were an American company. Whoops.

    TikTok’s 80% of investors who aren’t ByteDance won’t pass up billions of dollars in cash either if the alternative is that they forever get zero from the American market.

    They’ve been investing heavily in the US market for the last couple years too, so I doubt they are in the black.

    They’ve just all around played politics the American way very poorly. I can’t really comment on whether that’s good or bad but I’m blown away this Shou Chew CEO dude still has a job after this came down.







  • My company has an office in China and I’ve been there many many times.

    Chinese people are like all other people - same needs, same hopes and dreams, same fears, same drivers. In the city where our office is located, they are extremely hard working and want to ensure a better future for their family. Just like most American cities.

    Their city is very high tech, moreso than many American cities because they skipped a lot of legacy technology.

    They don’t necessarily subscribe to the same moral/value system as Americans, for example they often see copying each other’s ideas as a compliment whereas Americans see it as stealing. Kind of like - if it’s possible to copy, then it’s fair game - so don’t make it possible if you don’t want it copied. Perhaps that drives a different kind of innovation.

    Obviously there are many more cultural differences. But as a people, we are all essentially working with the same needs.

    All that being said I don’t appreciate the great firewall when I’mthere, the censorship, and the fear they have about discussing banned topics. I don’t appreciate the high-tech security cameras at every corner, or all the tracking of activities. The younger generations tolerate this for now because they are wealthier than their parents and told to cooperate, but that may not hold long term.


  • nucleative@lemmy.worldtoMemes@lemmy.mlF#€k $pez
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    2
    ·
    1 year ago

    If you share a thought on a Biden/Trump thread, an Israel/Palestine thread, or another topic that attracts strong views, and your opinion is different than the hive, expect some vitriol and confrontation.

    I’ve run into it while seriously looking for debate or productive conversation.