#include <stdio.h>
#include <assert.h>
unsigned trailing_zeros(unsigned n) {
// fill in this function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import copy, sys | |
| from PyPDF2 import PdfFileWriter, PdfFileReader | |
| pdfFileObj = open("in.pdf", 'rb') | |
| input_ = PdfFileReader(pdfFileObj) | |
| output_ = PdfFileWriter() | |
| for i in range(input_.getNumPages()): | |
| p = input_.getPage(i) | |
| q = copy.copy(p) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <type_traits> | |
| template <class T> constexpr T absolute(T arg) { | |
| return arg < 0 ? -arg : arg; | |
| } | |
| template <class T> | |
| constexpr auto precision_threshold = T(0.00000000000000000001); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1) git clone https://github.com/elfmz/far2l | |
| 2) cd far2l | |
| 3) mkdir build | |
| 4) cd build | |
| 5) cmake -DUSEWX=no -DCMAKE_BUILD_TYPE=Release .. | |
| 6) make -j9 | |
| 7) install/far2l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt install libkf5globalaccel-bin | |
| ~/.config/yakuakerc | |
| [Animation] | |
| Frames=0 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install grml-rescueboot | |
| copy *.iso to /boot/grml | |
| sudo vim /etc/default/grub | |
| GRUB_DEFAULT=0 | |
| # GRUB_TIMEOUT_STYLE=hidden | |
| GRUB_TIMEOUT=10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # tab -> select languages | |
| gsettings set org.gnome.desktop.input-sources xkb-options "['grp:caps_toggle']" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def fib(n, a1 = 1, a2 = 1): | |
| print(a1) | |
| if n - 1 > 0: | |
| return fib(n - 1, a2, a1 + a2) | |
| fib(20) | |
| def fib2(n, a1 = 1, a2 = 1): | |
| yield a1 | |
| if n - 1 > 0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xrandr --newmode "1920x1080_58.00" 166.89 1920 2040 2248 2576 1080 1081 1084 1117 -HSync +Vsync | |
| xrandr --addmode DVI-I-1 "1920x1080_58.00" |