Compare commits
3 Commits
7cf33dc7a3
...
ef68cae1c0
| Author | SHA1 | Date | |
|---|---|---|---|
| ef68cae1c0 | |||
| e698ad9319 | |||
| b86e7df6f7 |
26
.bashrc.kuba
26
.bashrc.kuba
@@ -24,6 +24,32 @@ alias ls='ls --color=auto'
|
|||||||
# Define a OS X-like open command
|
# Define a OS X-like open command
|
||||||
open() { command xdg-open "$@" > /dev/null 2>&1 & }
|
open() { command xdg-open "$@" > /dev/null 2>&1 & }
|
||||||
|
|
||||||
|
# Inspect .npz files
|
||||||
|
npz_py_str="$(cat << EOM
|
||||||
|
from sys import argv
|
||||||
|
|
||||||
|
class Wrap:
|
||||||
|
def __init__(self, fname):
|
||||||
|
import numpy as np
|
||||||
|
n = np.load(fname, allow_pickle=True)
|
||||||
|
files = n.files
|
||||||
|
print('Contains files', files)
|
||||||
|
for f in files:
|
||||||
|
setattr(self, f, n[f])
|
||||||
|
|
||||||
|
d = Wrap(argv[1])
|
||||||
|
EOM
|
||||||
|
)"
|
||||||
|
|
||||||
|
npz_preview() {
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
|
echo "Please specify file to open as argument"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
python -ic "$npz_py_str" "$1"
|
||||||
|
}
|
||||||
|
|
||||||
# Source git prompt
|
# Source git prompt
|
||||||
source_existing ~/scripts/git-prompt.sh
|
source_existing ~/scripts/git-prompt.sh
|
||||||
source_existing ~/.bash_prompt.kuba
|
source_existing ~/.bash_prompt.kuba
|
||||||
|
|||||||
12
.config/systemd/user/phonesim-modem.service
Normal file
12
.config/systemd/user/phonesim-modem.service
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Power on phonesim modem
|
||||||
|
After=phonesim.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/bin/bash %h/scripts/start-phonesim-modem.sh
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
StandardOutput=journal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
11
.config/systemd/user/phonesim.service
Normal file
11
.config/systemd/user/phonesim.service
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Phonesim service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/phonesim -p 12345 /usr/share/phonesim/default.xml
|
||||||
|
Type=simple
|
||||||
|
RemainAfterExit=true
|
||||||
|
StandardOutput=journal
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
local name, version = splitFileName(myModuleFullName())
|
local name, version = splitFileName(myModuleFullName())
|
||||||
local platform = "linux-x86_64-ubuntu-3.8"
|
local platform = "linux-x86_64-ubuntu-3.8"
|
||||||
|
local platform = capture("python -c \"import distutils.util; import sys; print(distutils.util.get_platform() + '-' + sys.version[0:3],end='')\"");
|
||||||
local home = os.getenv("HOME")
|
local home = os.getenv("HOME")
|
||||||
local gpaw_root = pathJoin(home, "git/gpaw", version)
|
local gpaw_root = pathJoin(home, "git/gpaw", version)
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ Host pi3
|
|||||||
User ubuntu
|
User ubuntu
|
||||||
Port 22
|
Port 22
|
||||||
|
|
||||||
|
Host hebbe
|
||||||
|
Hostname hebbe1.c3se.chalmers.se
|
||||||
|
User fojt
|
||||||
|
|
||||||
Host vera
|
Host vera
|
||||||
Hostname vera1.c3se.chalmers.se
|
Hostname vera1.c3se.chalmers.se
|
||||||
User fojt
|
User fojt
|
||||||
|
|||||||
9
.vimrc
9
.vimrc
@@ -28,6 +28,7 @@ if filereadable(expand(vundle_dir) . "/README.md")
|
|||||||
Plugin 'nvie/vim-flake8'
|
Plugin 'nvie/vim-flake8'
|
||||||
Plugin 'ludovicchabant/vim-gutentags'
|
Plugin 'ludovicchabant/vim-gutentags'
|
||||||
Plugin 'junegunn/vim-peekaboo'
|
Plugin 'junegunn/vim-peekaboo'
|
||||||
|
Plugin 'ycm-core/YouCompleteMe'
|
||||||
|
|
||||||
call vundle#end() " required
|
call vundle#end() " required
|
||||||
else
|
else
|
||||||
@@ -193,6 +194,11 @@ else
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" YouCompleteMe Python interpreter
|
||||||
|
let g:ycm_python_interpreter_path = '~/.python-venv.kuba/bin/python'
|
||||||
|
"let g:ycm_autoclose_preview_window_after_insertion = 1 " Close after leaving insert mode
|
||||||
|
let g:ycm_autoclose_preview_window_after_completion = 1 " Close after accepting completion
|
||||||
|
|
||||||
" fugitive.vim looks for tags in .git
|
" fugitive.vim looks for tags in .git
|
||||||
" set tags +=~/tags " Recursively move upwards in tree, searching in subfolders for tags file
|
" set tags +=~/tags " Recursively move upwards in tree, searching in subfolders for tags file
|
||||||
|
|
||||||
@@ -215,6 +221,9 @@ set statusline+=%#MoreMsg#
|
|||||||
set statusline+=\ "
|
set statusline+=\ "
|
||||||
|
|
||||||
|
|
||||||
|
" flake8
|
||||||
|
let g:flake8_show_in_gutter=1
|
||||||
|
|
||||||
" CtrlP
|
" CtrlP
|
||||||
let g:ctrlp_working_path_mode = 'ra'
|
let g:ctrlp_working_path_mode = 'ra'
|
||||||
|
|
||||||
|
|||||||
6
scripts/start-phonesim-modem.sh
Executable file
6
scripts/start-phonesim-modem.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
opts='--print-reply --system --dest=org.ofono /phonesim org.ofono.Modem.SetProperty'
|
||||||
|
/usr/bin/dbus-send $opts string:"Powered" variant:boolean:true
|
||||||
|
/usr/bin/dbus-send $opts string:"Online" variant:boolean:true
|
||||||
|
/usr/bin/python3 /home/kuba/git/ofono/test/list-modems | head -n 9
|
||||||
Reference in New Issue
Block a user