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
| BasedOnStyle: Webkit | |
| AlignOperands: true | |
| AlignAfterOpenBracket: Align | |
| AllowShortIfStatementsOnASingleLine: true | |
| AllowShortLoopsOnASingleLine: false | |
| AllowShortFunctionsOnASingleLine: Empty | |
| ConstructorInitializerAllOnOneLineOrOnePerLine: false | |
| BreakConstructorInitializers: BeforeColon | |
| AlwaysBreakTemplateDeclarations: true | |
| ColumnLimit: 88 |
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
| #include <iostream> | |
| struct MyVector { | |
| size_t current_size = 0; | |
| size_t capacity = 0; | |
| double* data = nullptr; | |
| MyVector() : capacity { 10 }, current_size { 0 } | |
| { |
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
| all: check | |
| format: | |
| black . | |
| isort . | |
| lint: format | |
| flake8 --exit-zero . | |
| mypy --show-column-numbers . |
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 urllib.parse import urljoin | |
| import requests | |
| def ensure_slash(s): | |
| if not s.endswith("/"): | |
| s = s + "/" | |
| return s |
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
| { | |
| "python.pythonPath": "venv/bin/python3.7", | |
| "python.linting.flake8Enabled": true, | |
| "python.linting.enabled": true, | |
| "python.formatting.provider": "black", | |
| "[python]": { | |
| "editor.formatOnPaste": false, | |
| "editor.codeActionsOnSave": { | |
| "source.organizeImports": true | |
| } |
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 functools import total_ordering | |
| def _apply(v, k): | |
| if callable(k): | |
| return k(v) | |
| else: | |
| return v[k] | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| library(reshape2) | |
| library(multcomp) | |
| n <- 10 | |
| ctrl <- rnorm(n, 0, 0.5) | |
| a <- rnorm(n, 0.1, 0.5) | |
| b <- rnorm(n, 2, 0.5) | |
| df <- melt(data.frame(ctrl = ctrl, a = a, b=b)) | |
| names(df) <- c("cat", "val") |
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
| data { | |
| int<lower=0> N; | |
| } | |
| transformed data { | |
| int<lower=0> n; | |
| n = N / 2; | |
| } | |
| parameters { |
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
| #include <stdio.h> | |
| double sum(const double *x, double s, size_t n) | |
| { | |
| if (n == 0) | |
| { | |
| return s; | |
| } | |
| return sum(x + 1, s + *x, n - 1); |