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
<table> | |
<tr> | |
<th valign="top"></th> | |
<th valign="top"></th> | |
{% for key in data_keys %}<th valign="top">{{ key|strip_prefix:5 }}</th>{% endfor %} | |
</tr> | |
{% for occurrence in occurrences %} | |
<tr> | |
<td valign="top"><big>{{occurrence.count}} occurances</big></td> | |
<td valign="top"><span class="date">{% ifequal occurrence.first_occurrence_at|naturalday:"Nj,Y" occurrence.last_occurrence_at|naturalday:"Nj,Y" %}{{ occurrence.first_occurrence_at|naturalday:"N j, Y" }}{% else %}{{ occurrence.first_occurrence_at|naturalday:"N j, Y" }} – {{ occurrence.last_occurrence_at|naturalday:"N j, Y"}}{% endifequal %}</span></td> |
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
java.lang.NullPointerException | |
at com.yoursway.sadr.engine.incremental.IncrementalAnalysisEngine$IncrementalGoalState.setPruned(IncrementalAnalysisEngine.java:263) | |
at com.yoursway.sadr.engine.incremental.IncrementalAnalysisEngine.prune(IncrementalAnalysisEngine.java:371) | |
at com.yoursway.sadr.engine.AnalysisEngine.timeLimitReached(AnalysisEngine.java:532) | |
at com.yoursway.sadr.engine.AnalysisEngine.executeQueue(AnalysisEngine.java:522) | |
java.lang.StringIndexOutOfBoundsException: String index out of range: -1 | |
at java.lang.String.substring(String.java:1762) | |
at com.esko.dtl.core.selection.DtlSelectionEngine.reportField(DtlSelectionEngine.java:234) | |
at com.esko.dtl.core.selection.DtlSelectionEngine.handleVariable(DtlSelectionEngine.java:175) | |
at com.esko.dtl.core.selection.DtlSelectionEngine.select(DtlSelectionEngine.java:138) |
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
@register.tag(name='e') | |
def parse_eval_tag(parser, token): | |
tag_name, code = token.contents.split(' ', 1) | |
return PythonEvalNode(code, escape=(lambda x:x)) | |
@register.tag(name='ee') | |
def parse_eval_and_escape_tag(parser, token): | |
tag_name, code = token.contents.split(' ', 1) | |
return PythonEvalNode(code, escape=escape) | |
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
private void calculateSymbolOffsets() { | |
int start = 0; | |
int lastPercent = 0; | |
for (int i = 0; i < symbols.size(); i++) { | |
// int pc = (int) (100.0 * i / symbols.size()); | |
// if (pc != lastPercent) { | |
// System.out.println("Calculating offsets: " + pc + "% done"); | |
// lastPercent = pc; |
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 compiler | |
from compiler.ast import * | |
import pprint | |
from StringIO import StringIO | |
from tempfile import TemporaryFile | |
import re | |
#b = 1 | |
#c = 2 | |
#a = b+c |
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
# min(alchogol to understand this func), vodka, cognac or “Gay Milker” kefir only | |
def apply_deletion range | |
return self if range.start >= self.end # -500 ml | |
len_diff = [self.length, range.length, self.end - range.start, range.end - self.start].min # 1000 ml | |
new_start = [range.start - [0, len_diff].min, self.start].min # 300 ml | |
TimeRange.new(new_start, new_start + self.length - [0, len_diff].max) # 700 ml | |
# total: 1500 ml | |
end |
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
dsfsdfdsfds |
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 module | |
def handle(): | |
... | |
def main(): | |
try: | |
module.test() | |
except: | |
handle() |
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 code is a part of CrashKit, a web-based crash collection and analysis software | |
# (http://crashkitapp.appspot.com). Please consider it to be in public domain. | |
def get_class_name(frame): | |
"""Guesses a class name to show in a stack trace for the given frame, | |
based on the attributes of the first argument of the frame's function.""" | |
code = frame.f_code | |
fname = code.co_name | |
if code.co_argcount > 0: |
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 code is a part of CrashKit, a web-based crash collection and analysis software | |
# (http://crashkitapp.appspot.com). Please consider it to be in public domain. | |
def get_package_name(frame): | |
shortest_package = frame.f_globals.get('__name__') | |
if shortest_package is None: # afaik this only happens while importing a module | |
for folder in sys.path: | |
folder = os.path.abspath(folder).replace('\\', '/') | |
if not folder.endswith('/'): | |
folder += '/' |