Bite Code

@bitecode_dev

One commit a day keep the imposter syndrome away. Also on mastodon as @bitecode@framapiaf.org

Vrijeme pridruživanja: listopad 2019.

Tweetovi

Blokirali ste korisnika/cu @bitecode_dev

Jeste li sigurni da želite vidjeti te tweetove? Time nećete deblokirati korisnika/cu @bitecode_dev

  1. Prikvačeni tweet
    2. velj

    Chapter 5 of "From Python 2 to Python 3", my book to help you with Python 2.7 EOL, is out: This week we will talk about tooling. Next week, we will take care of your dependancies.

    Poništi
  2. prije 2 sata

    PayloadsAllTheThings: A list of useful payloads and bypass for Web Application Security and Pentest/CTF

    Poništi
  3. prije 3 sata

    Mint Claims to be "The programming language for writing single page applications. " The concept is interesting

    Poništi
  4. prije 3 sata

    Which is a good thing. It's what you want with a language: having in your face the most obvious features, and discover stuff slowly but steadily as your progress. Also, some didn't even existed when I started (in 2.4). Underscores in Numeric Literals arrived in 3.6.

    Prikaži ovu nit
    Poništi
  5. prije 3 sata

    >>> from fractions import Fraction as F >>> F(1, 3) # one fird Fraction(1, 3) >>> from decimal import Decimal as D >>> D("0.1") + D("0.2") # to avoid 0.1 + 0.2 => 0.30000000000000004 Decimal('0.3') I coded in Python for years before even knowing those existed.

    Prikaži ovu nit
    Poništi
  6. prije 3 sata

    ... alternative notations: >>> 0xAF # int, in hexa 175 >>> 0b1010 # int, in binary 10 >>> 0o777 # int, in octal 511 >>> 6.62607015e-34 # float in scientifc notation 6.62607015e-34 >>> 1_000_000 # int, but with obvious 1000's grouping 1000000 And then you have the stdlib...

    Prikaži ovu nit
    Poništi
  7. prije 3 sata

    ...of course there is the usual: >>> int("18") 18 But did you know ? >>> float('+inf') # infinite as float inf >>> float('NaN') # NaN as float nan >>> int('AF', 16) 175 Although the last one is not often used because of ...

    Prikaži ovu nit
    Poništi
  8. prije 3 sata

    Jokes aside, there are many ways to declare numbers in . E.G, despite not having unsigned/smallint/int16/int32/etc., you have several types: >>> 1 # int 1 >>> 1. # float 1.0 >>> 1j # complex or why there is a math and a cmath module 1j Then, you can parse things....

    Prikaži ovu nit
    Poništi
  9. prije 3 sata

    There should be one way to do it. But not for strings formatting. Or importing. Or doing concurrency. Or declaring numbers. You know what, just use perl.

    Poništi
  10. proslijedio/la je Tweet
    prije 16 sati

    Check out this new EdgeDB Cheat Sheet

    Poništi
  11. 5. velj

    Also "&" and "|" are not boolean operator, but for making bit masks: >>> bin(0b010101 | 0b110001) '0b110101' >>> bin(0b010101 & 0b110001) '0b10001 >>> 1 & 0 0 >>> 1 & 1 1 >>> 0 | 1 1 >>> 0 | 0

    Prikaži ovu nit
    Poništi
  12. 5. velj

    ...any value in Python can be understood as True or False: >>> bool([]) False >>> bool(0) False >>> bool("hello") True >>> bool(1) True >>> bool({}) False Anything that is empty like {}, [], "", 0 or None is False. The rest is True unless it defines a custom __bool__.

    Prikaži ovu nit
    Poništi
  13. 5. velj

    In , "and" / "or" don't return True / False, but the first value that confirms for sure the result of the test: >>> [] or 0 0 >>> [] and 0 [] >>> "hello" and 1 1 >>> "hello" or 1 'hello' >>> "hello" or {} 'hello' >>> "hello" and {} {} This works because...

    Prikaži ovu nit
    Poništi
  14. 5. velj

    After a new version of , what about a new pi-ton ?

    Poništi
  15. 5. velj

    Opnieuw: A simple and intuitive retrying library for

    Poništi
  16. 5. velj

    What is SAP ? A basic installation of SAP has 20,000 database tables, 3,000 of which are configuration tables. In those tables, there are ~8,000 configuration decisions you need before even getting started.

    Poništi
  17. proslijedio/la je Tweet
    3. velj

    Dropbox's bug bounty has been lucky to work with some of the best researchers in the world to help keep Dropbox safe. We recently hit 1M USD payout and Nate wrote a great blog post on some of the best findings over the years

    Poništi
  18. proslijedio/la je Tweet
    3. velj

    Again replacing unittest with pytest. The pain lessens every time ;-)

    Poništi
  19. 4. velj

    Apparently chrome has a special header, "x-client-data", that contains a number between 0 and 7999 that it sends to all Google services it accesses. Coupled with UA, IP and a few other goodies, it seems equivalent to individual tracking

    Poništi
  20. proslijedio/la je Tweet
    3. velj

    I updated my django-allauth tutorial. Still the best/easiest way to add social authentication to any Django project.

    Poništi
  21. proslijedio/la je Tweet
    3. velj

    Periodic Reminder: When debugging, you must first accept that something you believe is true is not true. If everything you believed about this system were true, it would work. It doesn't, so you're wrong about something. This is a surprisingly common stumbling block for devs.

    Poništi

Čini se da učitavanje traje već neko vrijeme.

Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.

    Možda bi vam se svidjelo i ovo:

    ·