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
| #!/usr/bin/env python3 | |
| """ | |
| Failed in this case, does not know why. | |
| 1 | |
| 6 | |
| 2 3 2 5 4 3 | |
| """ | |
| FORMAT = "Case #{}: {}" |
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
| #!/usr/bin/env python3 | |
| # An Unblock Me solver written using A* search algorithm | |
| # perfect solution | |
| # Author: Saren | |
| SIZE = 6 | |
| """ | |
| GOAL = ( | |
| (' ', ' ', ' ', ' ', ' ', ' '), | |
| (' ', ' ', ' ', ' ', ' ', ' '), | |
| (' ', ' ', ' ', ' ', 'T', 'G'), |
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
| <# | |
| .SYNOPSIS | |
| MSI-mode utility | |
| .DESCRIPTION | |
| Main purpose of this script is turning on MSI-mode for all PCI devices in bulk. Script offers four modes which can be selected through following command line arguments: | |
| 'on' - turning MSI-mode on; | |
| 'off' - turning MSI-mode off; | |
| 'reg' - printing reg-file for backup purposes (to save text to reg-file use standard redirection or piplining to comandlet Out-File); | |
| - started without command line argument script prints devices capable for MSI-mode. |
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
| powershell %UserProfile%\Desktop\msi.ps1 on |
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
| #!/usr/bin/env python2 | |
| # Problem: http://9gag.com/gag/a6Qq368?ref=fb.s | |
| # sudo pip2 install python-constraint | |
| from constraint import * | |
| variables = "a", "b", "c" | |
| problem = Problem() | |
| for v in variables: | |
| problem.addVariable(v, range(10)) | |
| problem.addConstraint(AllDifferentConstraint()) | |
| problem.addConstraint(FunctionConstraint(lambda a, b, c: (a == 5) + (b == 4) + (c == 8) == 1), variables) |
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 java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Scanner; | |
| public class FourInALine { | |
| public static final Scanner scanner = new Scanner(System.in); | |
| public static final int WIN_MIN_LENGTH = 4; | |
| public static final int ROW_COUNT = 6; | |
| public static final int COLUMN_COUNT = 7; |
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
| alias sta='sudo systemctl start' | |
| alias sto='sudo systemctl stop' | |
| alias stt='sudo systemctl status' | |
| alias rst='sudo systemctl restart' | |
| alias enb='sudo systemctl enable' | |
| alias dsb='sudo systemctl disable' | |
| alias s='sudo apt install' | |
| alias i='sudo apt install' | |
| alias r='sudo apt remove' |
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
| zstyle ':prompt:grml:*:items:user' pre '[%F{yellow}' | |
| zstyle ':prompt:grml:*:items:percent' pre ']' | |
| source /etc/profile.d/alias.sh | |
| export EDITOR=nano | |
| export VISUAL=nano |
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
| #!/usr/bin/env bash | |
| # | |
| # Neofetch config file | |
| # https://github.com/dylanaraps/neofetch | |
| echo | |
| # See this wiki page for more info: | |
| # https://github.com/dylanaraps/neofetch/wiki/Customizing-Info | |
| print_info() { | |
| info title |
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
| #!/usr/bin/env python3 | |
| from multiprocessing import Pool, Queue | |
| from itertools import product | |
| PROBLEM = ' 6008 ' | |
| DEPTH = 2 | |
| EMPTY = 0, 0, 0, 0, 0, 0, 0 | |
| DIGIT_FONTS = [ | |
| ( |