4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
page 1 / 1
6 results tagged sort x
  • Quick sort algo
    from random import randrange

    input = [10, 5, 2, 3, 7, 0, 9, 12]

    def quicksort(arr):
        if len(arr) < 2:
            return arr
        else:
            rand = randrange(0, len(arr))  # grab a random index
            pivot = arr.pop(rand)
            less = [i for i in arr if i <= pivot]
            greater = [i for i in arr if i > pivot]
            return quicksort(less) + [pivot] + quicksort(greater)

    print("sorted:  ", quicksort(input))
    6 février 2022 à 16:05:26 UTC+1 - permalink - archive.org - https://www.integralist.co.uk/posts/algorithmic-complexity-in-python/
    algo recursiv sort
  • 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)

    9 octobre 2020 à 15:01:43 UTC+2 - permalink - archive.org - https://links.infomee.fr/?6OC8rw
    python sort
  • thumbnail
    GitHub - lostutils/uq
    9 février 2020 à 10:20:03 UTC+1 - permalink - archive.org - https://github.com/lostutils/uq
    sort uniq
  • Note: jq sort example

    |jq -r '.ApplicationVersions|sort_by(.DateCreated)|.[]|.VersionLabel'|tail -1

    12 avril 2017 à 09:26:21 UTC+2 - permalink - archive.org - https://links.infomee.fr/?9B1NEQ
    jq sort
  • thumbnail
    Javascript only - sort a bunch of DIVs - Stack Overflow
    23 décembre 2016 à 11:15:40 UTC+1 - permalink - archive.org - http://stackoverflow.com/questions/5066925/javascript-only-sort-a-bunch-of-divs
    div js sort
  • thumbnail
    Sort lines | Vim Tips Wiki | Fandom powered by Wikia

    vim <3

    :sort u

    21 novembre 2016 à 17:35:31 UTC+1 - permalink - archive.org - http://vim.wikia.com/wiki/Sort_lines
    sort vim
Links per page: 20 50 100
page 1 / 1
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation