Suppose you have weird taste and you absolutely want:
- your visual selection to always have a green background and black foreground,
- your active statusline to always have a white background and red foreground,
- your very own deep blue background.
| import sys, io, os.path as path, functools as ft # basic packages | |
| import urllib.request as url_req, numpy as np, cv2 # extension packages | |
| import torch, torch.nn as nn, torchvision.ops as ops # pytorch packages | |
| data_path = '.' if len(sys.argv) < 2 else sys.argv[1] | |
| image_file_url = 'https://github.com/pjreddie/darknet/raw/master/data/dog.jpg' | |
| image_filename = path.join(data_path, 'dog.jpg') | |
| weight_file_url = 'https://pjreddie.com/media/files/yolov3.weights' | |
| weight_filename = path.join(data_path, 'yolov3.weights') |
| How to export (backup), reset to defaults and import (restore) the configuration of a gnome extension. | |
| // prints the whole config to a file | |
| dconf dump /org/gnome/shell/extensions/<extension-name>/ > ~/<backupfile> | |
| // Resets the config to defaults (might wanna check first if the dump was a succes by opening the file) | |
| dconf reset -f /org/gnome/shell/extensions/<extension-name>/ | |
| // Loads configuration from a file into your gnome-shell | |
| dconf load /org/gnome/shell/extensions/<extension-name>/ < ~/<backupfile> | |
| From what I can tell a good way to determine <extension-name> is from its url at https://extensions.gnome.org | |
| However its better to be safe and launch dconf editor , browse to /org/gnome/shell/extensions/ and check the name. |
Suppose you have weird taste and you absolutely want:
Find out how much memory each of the jupyter notebooks running on a server is using. Helpful for knowing which ones to shut down.
Original code from http://stackoverflow.com/questions/34685825/jupyter-notebook-memory-usage-for-each-notebook
You'll need to
pip install tabulate psutil pandas requests
Overview: http://matplotlib.org/faq/usage_faq.html#usage
Multiple, manual Axes: https://python4mpia.github.io/plotting/advanced.html
Another intro article http://pbpython.com/effective-matplotlib.html
| QTabBar, | |
| QTabBar::tab | |
| { | |
| font-family: "Noto Sans"; | |
| font-size: 11px; | |
| height: 16px; | |
| padding: 2px; | |
| border: 0px; | |
| border-bottom: 3px solid palette(dark); | |
| background-color: palette(dark); |
| # -*- coding: utf-8 -*- | |
| ########################################################################## | |
| # YouCompleteMe configuration for ROS # | |
| # Author: Gaël Ecorchard (2015) # | |
| # # | |
| # The file requires the definition of the $ROS_WORKSPACE variable in # | |
| # your shell. # | |
| # Name this file .ycm_extra_conf.py and place it in $ROS_WORKSPACE to # | |
| # use it. # |
| #import <pthread.h> | |
| #import <mach/thread_act.h> | |
| // These two functions are declared in mach/thread_policy.h, but are commented out. | |
| // They are documented here: https://developer.apple.com/library/mac/#releasenotes/Performance/RN-AffinityAPI/_index.html | |
| kern_return_t thread_policy_set( | |
| thread_t thread, | |
| thread_policy_flavor_t flavor, | |
| thread_policy_t policy_info, | |
| mach_msg_type_number_t count); |