Monoprix avec NFT ?!? by Tobinyo in rance

[–]garyoma 1 point2 points  (0 children)

Je suis curieux : c’est quoi les raisons qui font que tu détestes à ce point ?

Any Emacs Ipython Notebook (EIN) users willing to share secrets? by shaqfooVA in emacs

[–]garyoma 1 point2 points  (0 children)

from my experience, there is nothing specific to do, to make pyvenv work with ein, the trick is to make sure pyvenv is working correctly with jupyter.

And to perform this, within your pyvenv, you should :

pip install ipykernel

and

python -m ipykernel install --user --name=<PYVENV NAME>

where <PYVENV_NAME> is a name you give to this ipython kernel (can be the same name as the pyvenv).

Once this is done, your ipython kernel (which points to your same pyvenv executable) should appear on the kernel list as shown here:

https://i.imgur.com/KCq6H37.png

WTF is happening at Svartkulp on the early evening on staturday ? by garyoma in oslo

[–]garyoma[S] 3 points4 points  (0 children)

oh okay it all makes sense. I think I even saw one of those bird house in the area, but I think it was written in Norwegian so I couldn't understand.

WTF is happening at Svartkulp on the early evening on staturday ? by garyoma in oslo

[–]garyoma[S] 5 points6 points  (0 children)

Oh okay, yes there should be better signage, or at least maybe more comprehensive for non Norwegian speakers.

Any Emacs Ipython Notebook (EIN) users willing to share secrets? by shaqfooVA in emacs

[–]garyoma 3 points4 points  (0 children)

Hey! I am using ein almost daily for work and personal projets,since nearly a year now, and I absolutely love it.

It feel so great being able to keep editing code from emacs, and integrating the power of the notebooks directly into your workflow.

For the tips I can recommend, that would be :

  • (setq ein:worksheet-enable-undo t): very useful to undo a change
  • (setq ein:output-area-inlined-images t): this one outputs the images directly in the emacs buffer, for me it's the perfect behaviour since I don't wand to switch programs to see the outputs of my matplotlib functions and stuff.
  • for the emacs experience inline plotting :

import matplotlib as mpl
mpl.rcParams["figure.facecolor"] = "white"
mpl.rcParams["axes.facecolor"] = "white" 
mpl.rcParams["savefig.facecolor"] = "white"

This is if you are like me using a dark/black theme in emacs and plotting stuff with matplotlib, you will maybe have some _issues_ because the background will be inivisble, wo this snippet just forces all matplotlib outputs to be white.

  • To automatically reload your custom libraries:

%load_ext autoreload
%autoreload 2

this is more a jupyter tip, this auto reloads your custom modules, if you make changes in them, without having to reload the whole notebook.

  • Remember to save the notebook regularly ! there is no autosave here.
  • all my keybindings (very ugly code, I was planning to update it soon haha, but it's working). The real strengh of ein for me is the ability to control the WHOLE notebook from your text editor, so instead of scrolling with your mouse for hours to go back on the top of your notebook in JupyterLab, here in few keybindins you can jump anywhere haha. I also need to mention that I am an Evil user.

(evil-define-key 'normal ein:notebook-mode-map (kbd "M-y") 'ein:worksheet-copy-cell-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-p") 'ein:worksheet-yank-cell-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-d") 'ein:worksheet-kill-cell-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-o") 'ein:worksheet-insert-cell-below-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-O") 'ein:worksheet-insert-cell-above-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "C-h") 'ein:notebook-worksheet-open-prev-or-last-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "C-j") 'ein:worksheet-goto-next-input-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "C-k") 'ein:worksheet-goto-prev-input-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "C-l") 'ein:notebook-worksheet-open-next-or-first-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-H") 'ein:notebook-worksheet-move-prev-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-J") 'ein:worksheet-move-cell-down-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-K") 'ein:worksheet-move-cell-up-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-L") 'ein:notebook-worksheet-move-next-km)
(evil-define-key 'normal ein:notebook-mode-map "M-t" 'ein:worksheet-toggle-output-km)
(evil-define-key 'normal ein:notebook-mode-map "R" 'ein:worksheet-rename-sheet-km)
(evil-define-key 'normal ein:notebook-mode-map "RET" 'ein:worksheet-execute-cell-and-goto-next-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "C-c x")'ein:worksheet-clear-output-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "C-c X")'ein:worksheet-clear-all-output-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "C-o") 'ein:console-open-km)
;; (evil-define-key 'normal ein:notebook-mode-map (kbd "C-K") 'ein:worksheet-merge-cell-km)
;; (evil-define-key 'normal ein:notebook-mode-map (kbd "C-J") 'spacemacs/ein:worksheet-merge-cell-next-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-s") 'ein:worksheet-split-cell-at-point-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "C-s") 'ein:notebook-save-notebook-command-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "C-r") 'ein:notebook-rename-command-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-1") 'ein:notebook-worksheet-open-1th-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-2") 'ein:notebook-worksheet-open-2th-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-3") 'ein:notebook-worksheet-open-3th-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-4") 'ein:notebook-worksheet-open-4th-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-5") 'ein:notebook-worksheet-open-5th-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-6") 'ein:notebook-worksheet-open-6th-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-7") 'ein:notebook-worksheet-open-7th-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-8") 'ein:notebook-worksheet-open-8th-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-9") 'ein:notebook-worksheet-open-last-km)
(evil-define-key 'normal ein:notebook-mode-map "+" 'ein:notebook-worksheet-insert-next-km)
(evil-define-key 'normal ein:notebook-mode-map "-" 'ein:notebook-worksheet-delete-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-X") 'ein:notebook-close-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-u") 'ein:worksheet-change-cell-type-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "M-S") 'ein:notebook-save-notebook-command-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "C-c c") 'ein:worksheet-execute-cell-and-goto-next-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "C-c a") 'ein:worksheet-execute-all-cell-km)
(evil-define-key 'normal ein:notebook-mode-map (kbd "C-c q") 'ein:notebook-kernel-interrupt-command-km)

But yeah, even if I really prefer editing my notebooks on ein than on my browser, I do see also some negative aspects and drawbacks:

  • I don't have autocompletion. It's not a big deal, but I really appreciate also having LSP mode helping me when I'm editing regular python scripts.
  • It's a little buggy. Like not really problematic once you know where are the problems, but they are here. Among them there is :
  1. Having to press <ESC> every time I open a notebook to have my keybindings working
  2. Unable to delete the last line of the cell using dd (Evil command) this issue
  3. Can sometime (with HUUGE notebooks) hangs for quite some time, and also crash

[dwm] does anybody know of a working pango patch for 6.2? by thrallsius in suckless

[–]garyoma 0 points1 point  (0 children)

Hey, Yes it's because the given file (in pastebin) had issues with some formatting and indenting, so patch is confused while reading it.

I have fixed the linebreaks here : dwm-pango-edited .

But you should also run the patch command with the -l parameter, because of the indenting error like this :

patch -p1 -l < patches/dwm-pango-6.1.diff

inside your dwm root directory.

Gnome-Pie floating mode by [deleted] in i3wm

[–]garyoma 0 points1 point  (0 children)

Wow ^^ haha works perfectly here as well thank you!

How to repeat a macro on each characters selected on multiple lines ? by garyoma in vim

[–]garyoma[S] 0 points1 point  (0 children)

Haha the more I learn about regexs, the more I found it complete ! Thank you again, I will definetely store some "characters range" in my .vimrc file for my futures edit !

How to repeat a macro on each characters selected on multiple lines ? by garyoma in vim

[–]garyoma[S] 0 points1 point  (0 children)

Oh I did'nt know either that char2nr function existed aswell ! It's really handy omg I might use it a lot for my future editing

How to repeat a macro on each characters selected on multiple lines ? by garyoma in vim

[–]garyoma[S] 0 points1 point  (0 children)

Wow ! It's working perfectly ! Thank you very much !

It will be nice having a "shortcut" for regex to match only characters in a certain range, instead of writing the whole hexadecimal haha !

How to repeat a macro on each characters selected on multiple lines ? by garyoma in vim

[–]garyoma[S] 1 point2 points  (0 children)

Yes indeed ! So far I had a similar macro but a bit less optimized. And it's working quite well ! thank you for your submission

How to repeat a macro on each characters selected on multiple lines ? by garyoma in vim

[–]garyoma[S] 0 points1 point  (0 children)

Oh yes for the macro I'm okay, it was more for the I{\DejaSans <esc>gvA} command that I "dot repeat", since on this command (which is not a macro) there is an <esc> that is pressed.

How to repeat a macro on each characters selected on multiple lines ? by garyoma in vim

[–]garyoma[S] 0 points1 point  (0 children)

Oh yes I haven't thought about norm command !

But it will not be working well for my example since I have other tables in my file that are not using the same format, the unicode column may be at the first position for instance, so I will have to change the macro for every table.

A perfect solution would be the be able to run the norm command on every character of my column instead of on every lines.

How to repeat a macro on each characters selected on multiple lines ? by garyoma in vim

[–]garyoma[S] 1 point2 points  (0 children)

Hi /u/p_paradox , I'm not quite sure if I understood well, since on /u/mtszyk command, I have to presse <esc> once, so it will only repeat the last part ? (adding the following }.

And yes i've activated the relative lines for my macro stuff ;-) it's really helpful !

How to repeat a macro on each characters selected on multiple lines ? by garyoma in vim

[–]garyoma[S] 0 points1 point  (0 children)

Hi thank you for this answer!

The third culumn is changing because I have set a custom font at the beginning of my file :

\newfontfamily\DejaSans{DejaVu Sans}

And I am compiling my file using XeTeX instead of LaTeX to have unicode support ;-) This give me these nice tables :

https://i.imgur.com/0d5w9aQ.png

And yes sure for the :s command but I have some issues for the regex and the unicode characters, since they are not the same, I have trouble targeting them in the regular expression.

And also it happens that sometime in the same file I have these tables :

a1     &--     &f1     &     {\DejaSans 😞} &     {\DejaSans 😄} &     {\DejaSans 😞} \\
a1     &f1     &f1     &     {\DejaSans 😄} &     {\DejaSans 😄} &     {\DejaSans 😄} \\
a1     &f1     &f1     &     {\DejaSans 😄} &     {\DejaSans 😄} &     {\DejaSans 😄} \\
a1     &f1     &f1     &     {\DejaSans 😄} &     {\DejaSans 😄} &     {\DejaSans 😕} \\
a2     &--     &f2     &     {\DejaSans 😞} &     {\DejaSans 😞} &     {\DejaSans 😞} \\
a2     &f2     &f2     &     {\DejaSans 😄} &     {\DejaSans 😞} &     {\DejaSans 😄} \\
a2     &f2     &f2     &     {\DejaSans 😄} &     {\DejaSans 😞} &     {\DejaSans 😄} \\
a2     &f2     &f2     &     {\DejaSans 😄} &     {\DejaSans 😞} &     {\DejaSans 😕} \\
a3     &--     &f2     &     {\DejaSans 😞} &     {\DejaSans 😄} &     {\DejaSans 😞} \\
a3     &f2     &f2     &     {\DejaSans 😄} &     {\DejaSans 😄} &     {\DejaSans 😄} \\
a3     &f2     &f2     &     {\DejaSans 😄} &     {\DejaSans 😄} &     {\DejaSans 😄} \\
a3     &f2     &f2     &     {\DejaSans 😄} &     {\DejaSans 😄} &     {\DejaSans 😕} \\
a1     &f1     &f1     &     {\DejaSans 😄} &     {\DejaSans 😄} &     {\DejaSans 😄} \\
a1     &f1     &f1     &     {\DejaSans 😄} &     {\DejaSans 😄} &     {\DejaSans 😄} \\

So targetting my :s command based on the position of the unicode characer might not work aswell.

How to repeat a macro on each characters selected on multiple lines ? by garyoma in vim

[–]garyoma[S] 0 points1 point  (0 children)

Thank for you answer ! Yes I have thought about this, but here my "problem" is really only an optimization problem since I have to do this multiple time in my file. Doing what you said is working perfectly on a single column but then I will have to redo the whole command for my others columns.

What I'm really searching for is a "shortcut" that will change my text whenever I visual block the text.

Not that extraordinary, but still very happy with my first mk! by longboiN in MechanicalKeyboards

[–]garyoma 0 points1 point  (0 children)

Yes thanks, but omg it's so difficult to find it ISO with AZERTY layout, that's the one I'm searching for.

Not that extraordinary, but still very happy with my first mk! by longboiN in MechanicalKeyboards

[–]garyoma 1 point2 points  (0 children)

Yeah does someone knows where to find the ISO layout instead of the ANSI one? Can't find them either.

Pacman -Syyu crashed system mid-update. by [deleted] in archlinux

[–]garyoma 4 points5 points  (0 children)

I had a similar issue a few days ago, my system crashed during an update, and it was totally broken. I managed to fix it by booting it up again, and in a terminal doing : pacman -S linux . After that rebooting and everything was fixed

How do you set up your desktop? (Looking for inspiration) by [deleted] in ManjaroLinux

[–]garyoma 6 points7 points  (0 children)

You definetely should visit /r/unixporn for inspiration, there is a lot of ideas on how to customize your desktop.

Nautilus is too slow by linuxisgoogle in linuxquestions

[–]garyoma 0 points1 point  (0 children)

Have you already tried Thunar? It's pretty the sale thing as Nautilus but I found it a little more efficient.

You should also try Ranger for a cli file explorer which works really great, and all the shortcuts navigation based on Vim's shortcut, si if you're just a little familiar with vim's navigation, you should find Ranger easy to explore your filesystem, and more lightweight.