View prepare-commit-msg
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/sh | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop release hotfix) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD 2> /dev/null) | |
if [ $? -eq 0 ]; then | |
BRANCH_NAME="${BRANCH_NAME##*/}" |
View shell
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 | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop release hotfix) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" | |
JIRA_ID=`echo $BRANCH_NAME | grep -oE '[A-Z]+-[0-9]+'` |
View test.py
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
qs = ConditionOccurrence.objects.filter( | |
condition_concept_id__in=ConceptSet.objects.get(pk=1198).concepts.values( | |
'pk')).annotate(ordinal=Window(expression=RowNumber(), order_by=F( | |
'condition_start_date').asc(), partition_by=[F('person_id')])).filter(ordinal=1) | |
... | |
django.db.utils.NotSupportedError: Window is disallowed in the filter clause. |
View example.html
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
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | |
<ul class="navbar-nav mr-auto"> | |
{% for menu in menus %} | |
<li class="nav-item {{ menu.active }}"> | |
<a class="nav-link" href="{{ menu.path }}">{{ menu.name }}</a> | |
</li> | |
{% endfor %} | |
</ul> | |
<a href="{% url 'logout' %}">LOGOUT</a> | |
</div> |
View example.py
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
# context_processors.py | |
def menus(request): | |
return { | |
'menus': [ | |
{'path': reverse(path), 'name': name, | |
'active': 'active' if request.get_full_path() == reverse( | |
path) else ''} | |
for path, name in | |
( | |
('drug_sim', 'CONCEPT SETS'), ('biomarker', 'BIOMARKER'), |
View test.py
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
class A: | |
b = 3 | |
a = A() | |
print(a.b) # 3 | |
a.c = 4 | |
print(a.c) # 4 |
View eslintrc.js
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
// http://eslint.org/docs/user-guide/configuring | |
module.exports = { | |
root: true, | |
parserOptions: { | |
parser: 'babel-eslint', | |
sourceType: 'module' | |
}, | |
env: { | |
browser: true, |
View eslintrc.js
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
// http://eslint.org/docs/user-guide/configuring | |
module.exports = { | |
root: true, | |
parserOptions: { | |
parser: 'babel-eslint', | |
sourceType: 'module' | |
}, | |
env: { | |
browser: true, |
View settings.json
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
{ | |
"editor.tabSize": 2, | |
"editor.insertSpaces": true, | |
"editor.detectIndentation": false, | |
"eslint.enable": true, | |
"files.trimTrailingWhitespace": true, | |
"files.exclude": { | |
"**/.git": true, | |
"**/.svn": true, | |
"**/.DS_Store": true, |
View example.py
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 json | |
import time | |
import os | |
import requests | |
import collection | |
import logging | |
import time | |
from apscheduler.schedulers.blocking import BlockingScheduler |
NewerOlder