This file contains 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
out_to_x no | |
own_window no | |
out_to_console yes | |
background no | |
max_text_width 0 | |
update_interval 1.0 | |
total_run_times 0 | |
short_units on | |
if_up_strictness address | |
use_spacer left |
This file contains 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
try: | |
bat1 = int(open('/sys/class/power_supply/BAT1/capacity', 'r').read()) | |
bat0 = int(open('/sys/class/power_supply/BAT0/capacity', 'r').read()) | |
print(int((bat1+bat0)/2)) | |
except(Exception): | |
bat0 = int(open('/sys/class/power_supply/BAT0/capacity', 'r').read()) | |
print(int(bat0)) | |
This file contains 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
min_js = open('min.js', 'r') | |
max_js = open('max.js', 'w') | |
min_js_str = min_js.read() | |
indent_counter = 0 | |
help_string = "" | |
for character in min_js_str: | |
if character == '{': |
This file contains 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
urxvt*termName: rxvt | |
urxvt*background: rgba:2000/2000/2000/ddff | |
urxvt*depth: 32 | |
urxvt*foreground: #949494 | |
urxvt*scrollBar: false | |
urxvt*matcher.button: 1 | |
urxvt*cursorBlink: true | |
urxvt*cursorColor: #c1c8c9 | |
urxvt*colorBD: #9a7b88 |
This file contains 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
urxvt*termName: rxvt | |
urxvt*background: rgba:2000/2000/2000/ddff | |
urxvt*depth: 32 | |
urxvt*foreground: #949494 | |
urxvt*scrollBar: false | |
urxvt*matcher.button: 1 | |
urxvt*cursorBlink: true | |
urxvt*cursorColor: #c1c8c9 | |
urxvt*colorBD: #9a7b88 |
This file contains 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 addtolistindict(key, comparelist,dictlist): | |
for elem in comparelist: | |
if elem[0] == key: | |
dictlist.append(elem[1]) | |
#Man, sieht,dass das ganze Strings an Listen in einem Dictionary anhängen soll | |
# In etwa so: | |
comparelist = [['A', 2],['B',3]] | |
somedict = {'A':[],'B':[]} |
This file contains 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 | |
# Dependencies: | |
# imagemagick | |
# i3lock-color-git | |
# scrot | |
IMAGE=/tmp/i3lock.png | |
# All options are here: http://www.imagemagick.org/Usage/blur/#blur_args |
This file contains 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
*color0: #201d1f | |
*color1: #a0929a | |
*color2: #a0949d | |
*color3: #a0969c | |
*color4: #a0989e | |
*color5: #a0989c | |
*color6: #a0989d | |
*color7: #a09a9e | |
*color8: #888587 | |
*color9: #c8c5c6 |
This file contains 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 unittest | |
from hamming_code import HammingCode, HCResult | |
from stack_machine import StackMachine, SMState | |
class TestHammingDecoder(unittest.TestCase): | |
def setUp(self): | |
self.hc = HammingCode() |
This file contains 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
[unique_partners.update([supplier.name for supplier in supplier_info]) for supplier_info in [line.product_id.seller_ids for line in self.order_lines if line.product_id and line.product_id.seller_ids]] | |
# This small snippet does the exact same task as the following: | |
for line in self.order_lines: | |
if line.product_id and line.product_id.seller_ids: | |
for supplier_info in line.product_id.seller_ids: | |
unique_partners.update([supplier.name for supplier in supplier_info]) |
OlderNewer