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 some_function(self, some_object): | |
attribute = some_object.get('attribute') | |
assert attribute is not None, Exception("attribute not present in some_function()") | |
try: | |
attribute.prepare_could_throw_exception() | |
except: | |
pass | |
try: | |
attribute.do_this() | |
attribute.do_that() |
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
try: | |
value = SomethingThatCouldBreakAndThereforeProbablyWill() | |
except Exception: | |
log.exception("SHTF") | |
# return None | |
return value |
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
class QSelfLoadingWidgetMixin: | |
"""Load UI and CSS files into current instance | |
Expects a dict containing "ui" mandatory and "css" optional keys. | |
""" | |
def __init__(self, resource_files=None, parent=None): | |
super().__init__(parent) | |
if resource_files: | |
ui_file = resource_files.get("ui") | |
css_file = resource_files.get("css") |
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
configurations": { | |
"production": { | |
"fileReplacements": [ | |
{ | |
"replace": "src/environments/environment.ts", | |
"with": "src/environments/environment.prod.ts" | |
}, | |
{ | |
"replace": "src/assets/settings.json", | |
"with": "src/assets/settings.prod.json" |
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
[16:29:53.949534] [sanei_debug] Setting debug level of dll to 128. | |
[16:29:53.949578] [dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.31 | |
[16:29:53.949589] [dll] sane_init/read_dlld: attempting to open directory `./dll.d' | |
[16:29:53.949602] [dll] sane_init/read_dlld: attempting to open directory `/etc/sane.d/dll.d' | |
[16:29:53.949624] [dll] sane_init/read_dlld: using config directory `/etc/sane.d/dll.d' | |
[16:29:53.949647] [dll] sane_init/read_dlld: considering /etc/sane.d/dll.d/hplip | |
[16:29:53.949666] [dll] sane_init/read_config: reading dll.d/hplip | |
[16:29:53.949682] [dll] add_backend: adding backend `hpaio' | |
[16:29:53.949710] [dll] sane_init/read_dlld: done. | |
[16:29:53.949726] [dll] sane_init/read_config: reading dll.conf |
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
[anddam@vst ~]$ xi -yu | |
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/musl/x86_64-musl-repodata' ... | |
x86_64-musl-repodata: 1681KB [avg rate: 52GB/s] | |
Name Action Version New version Download size | |
curl update 7.72.0_1 7.72.0_2 169KB | |
f2fs-tools update 1.13.0_1 1.14.0_1 203KB | |
hwids update 20200813.1_1 20200813.1_2 470KB | |
iana-etc update 20190504_1 20200910_1 64KB | |
libcurl update 7.72.0_1 7.72.0_2 254KB |
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
module = {} | |
vis:option_register("strip-trailing-spaces", "bool", function(value, toogle) | |
if not vis.win then | |
return false | |
end | |
vis.win.strip_trailing_spaces = toogle and not vis.win.strip_trailing_spaces or value | |
return true | |
end, "Strip line trailing spaces on save") |
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
Configuring LuaRocks version 3.3.1... | |
Lua interpreter found: /usr/bin/lua | |
Checking if /usr/bin/lua is Lua version 5.3... yes | |
lua.h found: /usr/include/lua.h | |
unzip found in PATH: /usr/bin | |
Done configuring. |
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 { HttpClient } from '@angular/common/http'; | |
import { Injectable } from '@angular/core'; | |
import { tap } from 'rxjs/operators'; | |
import { FormGroup } from '@angular/forms'; | |
import { FormlyFieldConfig, FormlyFormOptions } from '@ngx-formly/core'; | |
import { FormlyJsonschema } from '@ngx-formly/core/json-schema'; | |
export interface IFormlyUser { |
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
<ngx-datatable-column name="#"> | |
<ng-template let-column="column" ngx-datatable-header-template | |
><b>{{ column.name }}</b></ng-template | |
> | |
<ng-template let-row="row" let-value="value" ngx-datatable-cell-template> | |
<strong>{{ row.id }}</strong> | |
</ng-template> | |
</ngx-datatable-column> | |
<ngx-datatable-column name="Cell"> | |
<ng-template let-column="column" ngx-datatable-header-template |