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
#!/usr/bin/env python | |
""" | |
Translate compact hex sequence representation to standard bases. | |
If you have NCBI ASN.1 data, the easiest way to get a FASTA version is to | |
use NCBI's asn2fasta tool, which is available here: | |
https://ftp.ncbi.nlm.nih.gov/asn1-converters/by_program/asn2fasta/ | |
NCBI2na is a compact representation of sequence data, where each base just | |
takes 2 bits. It's commonly found in text ASN.1 files as hexadecimal strings. |
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
# This is a work-for-hire for the Government of the United States, so it is not | |
# subject to copyright protection. | |
""" | |
logiq - A way to build complex conditions and evaluate them against the world. | |
The goal is to make the conditions easy to construct, and give them useful and | |
concise error messages as well. | |
These are some requirement nodes: |
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
% Code from http://goo.gl/lhXpN (Doug Hull's mathworks blog) | |
% With changes suggested by Andrea and Thomas in the comment thread | |
% | |
% See also "cloudplot": | |
% http://www.mathworks.com/matlabcentral/fileexchange/23238-cloudplot | |
% put your input data as vertical arrays in x and y | |
x = randn(100000,1); | |
y = randn(100000,1) * 20; |
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
<!doctype html> | |
<meta charset="utf-8"> | |
<title>PubMed Search</title> | |
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> | |
<ul id="output"></ul> | |
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<script src="pubmed-search.js"></script> |
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
from jinja2.bccache import BytecodeCache | |
__author__ = "Thomas Grenfell Smith (thomathom@gmail.com)" | |
class ClearableMemcachedBytecodeCache(BytecodeCache): | |
"""Requires a fancy memcache client, like Google App Engine's, | |
that supports namespaces. Requires get, set, add, and incr. | |
When you call .clear(), the entries previously stored through | |
this object become inaccessible through it, although they |
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 StringIO | |
def allowed_content(tags, attributes={}, styles=()): | |
""" | |
Given a list of allowed tags, dict of allowed attributes, and list of | |
allowed styles, generates a CKEditor 'allowedcontent' string. The default | |
lists used by the bleach module are: bleach.ALLOWED_TAGS, | |
bleach.ALLOWED_ATTRIBUTES, and bleach.ALLOWED_STYLES (which is empty by | |
default). This function's defaults are all empty lists/dicts. | |
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
diff --git a/coursebuilder/common/jinja_utils.py b/coursebuilder/common/jinja_utils.py | |
index 9854a44..a5501e0 100644 | |
--- a/coursebuilder/common/jinja_utils.py | |
+++ b/coursebuilder/common/jinja_utils.py | |
@@ -18,8 +18,10 @@ __author__ = 'John Orr (jorr@google.com)' | |
import jinja2 | |
from webapp2_extras import i18n | |
+from models.models import MemcacheManager | |
import safe_dom |
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
diff --git a/coursebuilder/common/jinja_filters.py b/coursebuilder/common/jinja_filters.py | |
index 2bb6d17..a8a6261 100644 | |
--- a/coursebuilder/common/jinja_filters.py | |
+++ b/coursebuilder/common/jinja_filters.py | |
@@ -17,8 +17,10 @@ | |
__author__ = 'John Orr (jorr@google.com)' | |
import jinja2 | |
+from jinja2.bccache import BytecodeCache | |
import safe_dom |
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
#!/usr/bin/env python | |
import StringIO | |
import numpy as np | |
from bottle import route | |
from bottle import run | |
from bottle import abort | |
import Image | |
import requests | |
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
Manifest-Version: 1.0 | |
Bundle-ManifestVersion: 2 | |
Bundle-Name: manifest-version-bug | |
Bundle-SymbolicName: manifest-version-bug | |
Bundle-Version: 1 | |
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 |
NewerOlder