Skip to content
View dnnagy's full-sized avatar
  • Wigner Research Centre for Physics
  • Budapest

Highlights

  • Pro
Block or Report

Block or report dnnagy

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned

  1. np-array-sort-by-col.py np-array-sort-by-col.py
    1
    # sort array with regards to nth column
    2
    # copied from https://gist.github.com/stevenvo/e3dad127598842459b68#file-numpy-array-sort-py
    3
    arr = arr[arr[:,n].argsort()]
  2. chunks.py chunks.py
    1
    def chunks(a, n):
    2
      for i in range(0, len(a), n):
    3
        yield a[i:i + n]
    4
    
                  
    5
    list(chunks(list(range(52)), 6))
  3. my_timestamp.py my_timestamp.py
    1
    import time
    2
    
                  
    3
    def timestamp():
    4
      return time.strftime("%y%m%dd%Hh%Mm%S")
  4. python_multiprocess.py python_multiprocess.py
    1
    import scipy
    2
    from scipy.stats import levy, laplace, maxwell, cauchy
    3
    import multiprocessing as mp
    4
    from datetime import datetime
    5
    
                  
  5. kill-all-slaves.sh kill-all-slaves.sh
    1
    # kill all threads where the full command includes 'experiment-18' 
    2
    ps -axww | grep experiment-18 | grep -v grep | awk '{print $1}' | xargs kill
  6. run-vscode.sh run-vscode.sh
    1
    PORT=$1
    2
    PASSWD=$2
    3
    mkdir -p ~/.config/code-server
    4
    printf "bind-addr: 127.0.0.1:$PORT\n\
    5
    auth: password\n\