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
| SUBSYSTEM=="net",\ | |
| ACTION=="add",\ | |
| NAME=="Citrix_VA",\ | |
| RUN+="/usr/bin/systemd-resolve -i %k --set-dns=10.0.0.1 --set-domain=lectra.com --set-dnssec=off" |
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
| int recurse_n_queen(int **grid, int n, int col) | |
| { | |
| int row; | |
| int i; | |
| int j; | |
| int as_cycle; | |
| if (col >= n) | |
| return 1; | |
| row = (rand() % n); |
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
| #!/bin/bash | |
| function quick-look() { | |
| SCREEN_WIDTH=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1) | |
| SCREEN_HEIGHT=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2) | |
| WIDTH=$(echo $(( ${SCREEN_WIDTH} * 0.75)) | cut -f1 -d".") | |
| HEIGHT=$(echo $(( ${SCREEN_HEIGHT} * 0.75)) | cut -f1 -d".") | |
| feh --title="feh_quicklook" --scale-down --geometry "${WIDTH}"x"${HEIGHT}" $1 $(pwd) >/dev/null 2>&1 | |
| } |
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
| #!/bin/bash | |
| CURR_DESK_ID=$(chunkc tiling::query --desktop id) | |
| if [ ! -f /tmp/chunkwm_fullscreen ]; then | |
| touch /tmp/chunkwm_fullscreen; | |
| chunkc set ${CURR_DESK_ID}_desktop_offset_top 0; | |
| chunkc set ${CURR_DESK_ID}_desktop_offset_right 0; | |
| chunkc set ${CURR_DESK_ID}_desktop_offset_bottom 0; | |
| chunkc set ${CURR_DESK_ID}_desktop_offset_left 0; | |
| chunkc core::unload border.so; |
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 sys | |
| import math | |
| from collections import namedtuple | |
| # Auto-generated code below aims at helping you parse | |
| # the standard input according to the problem statement. | |
| # w: width of the building. | |
| # h: height of the building. | |
| w, h = [int(i) for i in input().split()] |
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
| from collections import namedtuple | |
| Point = namedtuple('Point', ['y', 'x']) | |
| class KTSolver(object): | |
| def __init__(self, grid_size): | |
| self._grid_size = grid_size | |
| self._moves = [] | |
| self._grid = [] | |
| self._solutions = [] |
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
| from colorama import Back, Style | |
| class WordSearchSolver(object): | |
| def __init__(self, grid = [], seeked_words = []): | |
| self.grid = grid | |
| self.seeked_words = seeked_words | |
| self.found_words = [] | |
| self.highlighted_cells = set() | |
| self.not_found_words = [] |
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 count_up_to_50(n): | |
| return [] if n > 50 else [n] + count_up_to_50(n + 1) | |
| def sum_to(n): | |
| return n if n == 1 else n + sum_to(n - 1) | |
| def fibonacci(nb, prev_n = 0, next_n = 1): | |
| return [next_n] if nb == 0 else [next_n] + fibonacci(nb - 1, next_n, prev_n + next_n) | |
| def print_list(l): |
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 count_up_to_50(n): | |
| return [] if n > 50 else [n] + count_up_to_50(n + 1) | |
| def sum_to(n): | |
| return n if n == 1 else n + sum_to(n - 1) | |
| def fibonacci(nb, prev_n = 0, next_n = 1): | |
| return [next_n] if nb == 0 else [next_n] + fibonacci(nb - 1, next_n, prev_n + next_n) | |
| def print_list(l): |
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
| digits = { | |
| 1: "one", | |
| 2: "two", | |
| 3: "three", | |
| 4: "four", | |
| 5: "five", | |
| 6: "six", | |
| 7: "seven", | |
| 8: "eight", | |
| 9: "nine", |
NewerOlder