4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
    Type 1 or more characters for results.
    Links per page: 20 50 100
    ◄Older
    page 2 / 5
    Newer►
    97 results tagged python x
    • Python logging - under the hood
      November 30, 2020 at 3:55:54 PM GMT+1 - permalink - archive.org - https://blog.urbanpiper.com/understanding-python-logging-library/
      log python
    • Rate limiting using Python and Redis
      November 14, 2020 at 3:08:34 PM GMT+1 - permalink - archive.org - https://www.hackdoor.io/articles/rate-limiting-using-python-and-redis-9b7dbce8c7a5
      python rate ratelimiter
    • thumbnail
      73 Examples to Help You Master Python's f-strings
      November 14, 2020 at 3:03:10 PM GMT+1 - permalink - archive.org - https://miguendes.me/73-examples-to-help-you-master-pythons-f-strings
      python string
    • Time zones | Django documentation | Django
      November 6, 2020 at 5:55:45 PM GMT+1 - permalink - archive.org - https://docs.djangoproject.com/en/3.1/topics/i18n/timezones/
      django python timezone
    • thumbnail
      python - Displaying a timedelta object in a django template - Stack Overflow

      Here's my filter code

      from django import template

      register = template.Library()

      @register.filter()
      def smooth_timedelta(timedeltaobj):
      """Convert a datetime.timedelta object into Days, Hours, Minutes, Seconds."""
      secs = timedeltaobj.total_seconds()
      timetot = ""
      if secs > 86400: # 60sec 60min 24hrs
      days = secs // 86400
      timetot += "{} days".format(int(days))
      secs = secs - days*86400

      if secs > 3600:
          hrs = secs // 3600
          timetot += " {} hours".format(int(hrs))
          secs = secs - hrs*3600
      
      if secs > 60:
          mins = secs // 60
          timetot += " {} minutes".format(int(mins))
          secs = secs - mins*60
      
      if secs > 0:
          timetot += " {} seconds".format(int(secs))
      return timetot

      Then in my template I did

      {% load smooth_timedelta %}

      {% timedeltaobject|smooth_timedelta %}

      October 29, 2020 at 10:25:50 AM GMT+1 - permalink - archive.org - https://stackoverflow.com/questions/16348003/displaying-a-timedelta-object-in-a-django-template
      django filter python
    • Note: python natural sort

      def atoi(text):
      return int(text) if text.isdigit() else text

      def natural_keys(text):
      return [ atoi(c) for c in re.split(r'(\d+)', text) ]

      my_list.sort(key=natural_keys)

      October 9, 2020 at 3:01:43 PM GMT+2 - permalink - archive.org - https://links.infomee.fr/?6OC8rw
      python sort
    • Everything You Need to Know About Python's Namedtuples
      October 4, 2020 at 5:03:53 PM GMT+2 - permalink - archive.org - https://miguendes.me/everything-you-need-to-know-about-pythons-namedtuples-ckfim70u102jbots197jn0zmh#why-should-i-use-namedtuples
      data namedtuple python type
    • typing — Support for type hints — Python 3.8.6 documentation
      October 4, 2020 at 4:50:14 PM GMT+2 - permalink - archive.org - https://docs.python.org/3/library/typing.html
      python typing
    • thumbnail
      Making Concurrent HTTP requests with Python AsyncIO | LAAC Technology
      October 4, 2020 at 4:49:58 PM GMT+2 - permalink - archive.org - https://www.laac.dev/blog/concurrent-http-requests-python-asyncio/
      async python
    • thumbnail
      simple-term-menu · PyPI

      Au top pour faire des petits helper en cmd line

      October 2, 2020 at 3:26:36 PM GMT+2 - permalink - archive.org - https://pypi.org/project/simple-term-menu/
      interactif menu python
    • thumbnail
      Primer on Python Decorators – Real Python
      September 17, 2020 at 11:30:06 AM GMT+2 - permalink - archive.org - https://realpython.com/primer-on-python-decorators/#debugging-code
      decorator python
    • Note: str to bool

      from distutils.util import strtobool

      bool(strtobool('true'))

      FOO = bool(strtobool(os.environ['FOO']))

      September 7, 2020 at 11:52:44 AM GMT+2 * - permalink - archive.org - https://docs.python.org/3/distutils/apiref.html#distutils.util.strtobool
      boolean python
    • Benchmarks - FastAPI
      September 2, 2020 at 2:51:05 PM GMT+2 - permalink - archive.org - https://fastapi.tiangolo.com/benchmarks/
      async fastapi python web
    • thumbnail
      How to hide output of subprocess in Python 2.7 - Stack Overflow

      retcode = subprocess.call(['echo', 'foo'], stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)

      July 30, 2020 at 5:00:46 PM GMT+2 * - permalink - archive.org - https://stackoverflow.com/questions/11269575/how-to-hide-output-of-subprocess-in-python-2-7
      null python stdout
    • Welcome to Click — Click Documentation (7.x)
      July 8, 2020 at 11:54:37 AM GMT+2 - permalink - archive.org - https://click.palletsprojects.com/en/7.x/
      arg python
    • JSON Schema | The home of JSON Schema
      June 4, 2020 at 10:41:39 AM GMT+2 - permalink - archive.org - https://json-schema.org/
      json python validation
    • pytz - World Timezone Definitions for Python — pytz 2014.10 documentation
      May 29, 2020 at 10:52:27 AM GMT+2 - permalink - archive.org - http://pytz.sourceforge.net/
      python timezone
    • Logging Cookbook — Python 3.8.3rc1 documentation
      May 14, 2020 at 9:41:12 AM GMT+2 - permalink - archive.org - https://docs.python.org/3/howto/logging-cookbook.html
      cookbook log python
    • Apache Hadoop Amazon Web Services support – Working with IAM Assumed Roles
      April 23, 2020 at 4:00:22 PM GMT+2 - permalink - archive.org - https://hadoop.apache.org/docs/current/hadoop-aws/tools/hadoop-aws/assumed_roles.html#AccessDeniedException_.2B_AmazonDynamoDBException
      assume hadoop python role spark
    • Apache Hadoop Amazon Web Services support – Working with IAM Assumed Roles
      April 22, 2020 at 5:23:26 PM GMT+2 - permalink - archive.org - https://hadoop.apache.org/docs/current/hadoop-aws/tools/hadoop-aws/assumed_roles.html
      assume aws hadoop python role spark
    Links per page: 20 50 100
    ◄Older
    page 2 / 5
    Newer►
    Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation