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
# standard library | |
import os | |
# dash libs | |
import dash | |
from dash.dependencies import Input, Output | |
import dash_core_components as dcc | |
import dash_html_components as html | |
import plotly.figure_factory as ff | |
import plotly.graph_objs as go |
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
defaults write -g InitialKeyRepeat -int 15 # normal minimum is 15 (225 ms) | |
defaults write -g KeyRepeat -int 2 # normal minimum is 2 (30 ms) |
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
# standard library | |
import os | |
# dash libs | |
import dash | |
from dash.dependencies import Input, Output | |
import dash_core_components as dcc | |
import dash_html_components as html | |
import plotly.figure_factory as ff | |
import plotly.graph_objs as go |
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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "cmd+g", | |
"command": "editor.foldAll", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "cmd+h", | |
"command": "editor.unfoldAll", |
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 uuid; uuid.uuid4().hex |
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
version: '3' | |
services: | |
db: | |
image: mysql:5.7 | |
environment: | |
MYSQL_ROOT_PASSWORD: my_secret_pw_shh | |
MYSQL_DATABASE: test_db | |
MYSQL_USER: devuser | |
MYSQL_PASSWORD: devpass |
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
if ( ! function_exists('write_log')) { | |
function write_log ( $log ) { | |
if ( is_array( $log ) || is_object( $log ) ) { | |
error_log( print_r( $log, true ) ); | |
} else { | |
error_log( $log ); | |
} | |
} | |
} |
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 pytest | |
import interface | |
@pytest.fixture(scope='session') | |
def run_command_mock(mocker): | |
def _create_run_command_mock(mock_return_value): | |
mock_run = mocker.MagicMock(name='run command mock') | |
mock_run.return_value = "foo" | |
run_command_patch = mocker.patch('interface.run_command', new=mock_run) |
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
# combine last 2 commits into 1 | |
git reset --soft "HEAD^" | |
git commit --amend |
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 add_two(func): | |
def _wrapper(*args, **kwargs): | |
return func(*args, **kwargs) + 2 | |
return _wrapper | |
class Point: | |
def __init__(self, x, y): | |
self.x = x | |
self.y = y |
OlderNewer