rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
if state == 'ADDRESS': | if state == ADDRESS: | def sigrokdecode_i2c(inbuf): """I2C protocol decoder""" # FIXME: This should be passed in as metadata, not hardcoded here. signals = (2, 5) channels = 8 o = wr = ack = d = '' bitcount = data = 0 state = 'IDLE' # Get the bit number (and thus probe index) of the SCL/SDA signals. scl_bit, sda_bit = signals # Get SCL/S... |
state = 'DATA' | state = DATA | def sigrokdecode_i2c(inbuf): """I2C protocol decoder""" # FIXME: This should be passed in as metadata, not hardcoded here. signals = (2, 5) channels = 8 o = wr = ack = d = '' bitcount = data = 0 state = 'IDLE' # Get the bit number (and thus probe index) of the SCL/SDA signals. scl_bit, sda_bit = signals # Get SCL/S... |
state = 'IDLE' | state = IDLE | def sigrokdecode_i2c(inbuf): """I2C protocol decoder""" # FIXME: This should be passed in as metadata, not hardcoded here. signals = (2, 5) channels = 8 o = wr = ack = d = '' bitcount = data = 0 state = 'IDLE' # Get the bit number (and thus probe index) of the SCL/SDA signals. scl_bit, sda_bit = signals # Get SCL/S... |
'sda': {'ch': 7, 'name': 'SDA' 'desc': 'Serial data line'}, | 'sda': {'ch': 7, 'name': 'SDA', 'desc': 'Serial data line'}, | def decode(inbuf): """I2C protocol decoder""" # FIXME: Get the data in the correct format in the first place. inbuf = [ord(x) for x in inbuf] # FIXME: This should be passed in as metadata, not hardcoded here. metadata = { 'numchannels': 8, 'signals': { 'scl': {'ch': 5, 'name': 'SCL', 'desc': 'Serial clock line'}, 'sd... |
self.user_groups.append(value) | self.user_list.append(value) | def endElement(self, name, value, connection): if name == 'euca:userName': self.user_userName = value elif name == 'euca:email': self.user_email = value elif name == 'euca:admin': self.user_admin = value elif name == 'euca:confirmed': self.user_confirmed = value elif name == 'euca:enabled': self.user_enabled = value el... |
def cli_remove(self): | def cli_remove_membership(self): | def cli_remove(self): (options, args) = self.get_membership_parser() self.remove_membership(args[0], options.userName) |
reply = self.euca.connection.get_object('AddGroupMember', {'GroupName':groupName,'UserName':userName},BooleanResponse) | reply = self.euca.connection.get_object('RemoveGroupMember', {'GroupName':groupName,'UserName':userName},BooleanResponse) | def remove_membership(self,groupName,userName): try: reply = self.euca.connection.get_object('AddGroupMember', {'GroupName':groupName,'UserName':userName},BooleanResponse) print reply except EC2ResponseError, ex: self.euca.handle_error(ex) |
return None | if name == 'euca:groups': self.user_list = self.user_groups elif name == 'euca:revoked': self.user_list = self.user_revoked return None | def startElement(self, name, attrs, connection): return None |
elif name == 'euca:groups': self.user_list = self.user_groups elif name == 'euca:revoked': self.user_list = self.user_revoked | def endElement(self, name, value, connection): if name == 'euca:userName': self.user_userName = value elif name == 'euca:email': self.user_email = value elif name == 'euca:admin': self.user_admin = value elif name == 'euca:confirmed': self.user_confirmed = value elif name == 'euca:enabled': self.user_enabled = value el... | |
if not options.props: | if not options.props and not options.files: | def get_parse_modify(self): parser = self.get_parser() parser.add_option("-p","--property",dest="props",action="append", help="Modify KEY to be VALUE. Can be given multiple times.", metavar="KEY=VALUE") parser.add_option("-f","--property-from-file",dest="files",action="append", help="Modify KEY to be modified with con... |
for i in options.props: if not re.match("^[\w.]+=[\w\.]+$",i): print "ERROR Options must be of the form KEY=VALUE. Illegally formatted option: %s" % i parser.print_help() sys.exit(1) | if options.props: for i in opts: if not re.match("^[\w.]+=[\.]+$",i): print "ERROR Options must be of the form KEY=VALUE. Illegally formatted option: %s" % i parser.print_help() sys.exit(1) elif options.files: pass | def get_parse_modify(self): parser = self.get_parser() parser.add_option("-p","--property",dest="props",action="append", help="Modify KEY to be VALUE. Can be given multiple times.", metavar="KEY=VALUE") parser.add_option("-f","--property-from-file",dest="files",action="append", help="Modify KEY to be modified with con... |
for i in modify_list: new_prop = split(i,"=") if not len(new_prop) == 2: print "ERROR Options must be of the form KEY=VALUE. Illegally formatted option: %s" % i sys.exit(1) self._modify(new_prop[0], new_prop[1]) | if modify_list: for i in modify_list: new_prop = split(i,"=") if not len(new_prop) == 2: print "ERROR Options must be of the form KEY=VALUE. Illegally formatted option: %s" % i sys.exit(1) self._modify(new_prop[0], new_prop[1]) | def modify(self,modify_list): for i in modify_list: new_prop = split(i,"=") if not len(new_prop) == 2: print "ERROR Options must be of the form KEY=VALUE. Illegally formatted option: %s" % i sys.exit(1) self._modify(new_prop[0], new_prop[1]) |
self.group_users = [] | self.group_users = StringList() self.group_auths = StringList() | def __init__(self, groupName=None): self.group_groupName = groupName self.group_users = [] self.euca = EucaAdmin(path=SERVICE_PATH) |
r = '' for s in self.group_users: r = '%s\t%s' % (r,s) r = 'GROUP\t%s\t%s' % (self.group_groupName,r) | r = 'GROUP \t%s\t' % (self.group_groupName) r = '%s\nUSERS\t%s\t%s' % (r,self.group_groupName,self.group_users) r = '%s\nAUTH\t%s\t%s' % (r,self.group_groupName,self.group_auths) | def __repr__(self): r = '' for s in self.group_users: r = '%s\t%s' % (r,s) r = 'GROUP\t%s\t%s' % (self.group_groupName,r) return r |
elif name == 'euca:entry': self.user_groups.append(value) | def endElement(self, name, value, connection): if name == 'euca:groupName': self.group_groupName = value elif name == 'euca:entry': self.user_groups.append(value) else: setattr(self, name, value) | |
parser = OptionParser("usage: %prog [options]",version="Eucalyptus %prog VERSION") return parser | parser = OptionParser("usage: %prog [GROUPS...]",version="Eucalyptus %prog VERSION") return parser.parse_args() | def get_describe_parser(self): parser = OptionParser("usage: %prog [options]",version="Eucalyptus %prog VERSION") return parser |
def describe(self): | def cli_describe(self): (options, args) = self.get_describe_parser() self.group_describe(args) def group_describe(self,groups=None): params = {} if groups: self.euca.connection.build_list_params(params,groups,'GroupNames') | def describe(self): try: list = self.euca.connection.get_list('DescribeGroups', {}, [('euca:item', Group)]) for i in list: print i except EC2ResponseError, ex: self.euca.handle_error(ex) |
list = self.euca.connection.get_list('DescribeGroups', {}, [('euca:item', Group)]) | list = self.euca.connection.get_list('DescribeGroups', params, [('euca:item', Group)]) | def describe(self): try: list = self.euca.connection.get_list('DescribeGroups', {}, [('euca:item', Group)]) for i in list: print i except EC2ResponseError, ex: self.euca.handle_error(ex) |
def get_add_parser(self): parser = OptionParser("usage: %prog [options]",version="Eucalyptus %prog VERSION") parser.add_option("-n","--name",dest="groupName",help="Name of the group.") return parser | def cli_add(self): (options, args) = self.get_single_parser() self.group_add(args[0]) | def get_add_parser(self): parser = OptionParser("usage: %prog [options]",version="Eucalyptus %prog VERSION") parser.add_option("-n","--name",dest="groupName",help="Name of the group.") return parser |
def add(self, groupName): | def group_add(self, groupName): | def get_add_parser(self): parser = OptionParser("usage: %prog [options]",version="Eucalyptus %prog VERSION") parser.add_option("-n","--name",dest="groupName",help="Name of the group.") return parser |
def get_delete_parser(self): parser = OptionParser("usage: %prog [options]",version="Eucalyptus %prog VERSION") parser.add_option("-n","--name",dest="groupName",help="Name of the Group.") return parser | def cli_delete(self): (options, args) = self.get_single_parser() self.group_delete(args[0]) | def get_delete_parser(self): parser = OptionParser("usage: %prog [options]",version="Eucalyptus %prog VERSION") parser.add_option("-n","--name",dest="groupName",help="Name of the Group.") return parser |
if not re.match("^[\w.]+=[\w\.]+$",i): | if not re.match("^[\w.]+=[/\w\.]+$",i): | def get_parse_modify(self): parser = self.get_parser() parser.add_option("-p","--property",dest="props",action="append", help="Modify KEY to be VALUE. Can be given multiple times.", metavar="KEY=VALUE") parser.add_option("-f","--property-from-file",dest="files",action="append", help="Modify KEY to be modified with con... |
for i in opts: if not re.match("^[\w.]+=[\.]+$",i): | for i in options.props: if not re.match("^[\w.]+=[\w\.]+$",i): | def get_parse_modify(self): parser = self.get_parser() parser.add_option("-p","--property",dest="props",action="append", help="Modify KEY to be VALUE. Can be given multiple times.", metavar="KEY=VALUE") parser.add_option("-f","--property-from-file",dest="files",action="append", help="Modify KEY to be modified with con... |
if not verbose: i.detail = "" print i | if verbose: print i elif not verbose and not i.host_name == 'detail': print i | def component_describe(self,components=None,verbose=False): params = {} if components: self.euca.connection.build_list_params(params,components,'Name') try: list = self.euca.connection.get_list('DescribeComponents', params, [('euca:item', Component)]) for i in list: if not verbose: i.detail = "" print i except EC2Respo... |
row['time'] = iso8601.parse_date(row['time'].value) | date_time = row['time'].value date_time_adjusted = '%s-%s-%s' % ( date_time[0:4], date_time[4:6], date_time[6:]) row['time'] = iso8601.parse_date(date_time_adjusted) | def get_timeseries(self, filter_id, location_id, parameter_id, start_date, end_date): """ SELECT TIME,VALUE,FLAG,DETECTION,COMMENT from ExTimeSeries WHERE filterId = 'MFPS' AND parameterId = 'H.meting' AND locationId = 'BW_NZ_04' AND time BETWEEN '2007-01-01 13:00:00' AND '2008-01-10 13:00:00' """ q = ("select time, va... |
common_transform = avango.osg.make_rot_mat(radians(-4.43), 1, 0, 0) \ | common_transform = avango.osg.make_rot_mat(math.radians(-4.43), 1, 0, 0) \ | def __init__(self, inspector, options): super(iCone, self).__init__("iCone", inspector) |
common_transform * avango.osg.make_rot_mat(radians(84.135), 0, 1, 0), common_transform * avango.osg.make_rot_mat(radians(28.045), 0, 1, 0), common_transform * avango.osg.make_rot_mat(radians(-28.045), 0, 1, 0), common_transform * avango.osg.make_rot_mat(radians(-84.135), 0, 1, 0), | common_transform * avango.osg.make_rot_mat(math.radians(84.135), 0, 1, 0), common_transform * avango.osg.make_rot_mat(math.radians(28.045), 0, 1, 0), common_transform * avango.osg.make_rot_mat(math.radians(-28.045), 0, 1, 0), common_transform * avango.osg.make_rot_mat(math.radians(-84.135), 0, 1, 0), | def __init__(self, inspector, options): super(iCone, self).__init__("iCone", inspector) |
print str(transforms) | def __init__(self, inspector, options): super(iCone, self).__init__("iCone", inspector) | |
for i in len(transforms): | for i in range(0,len(transforms)): | def __init__(self, inspector, options): super(iCone, self).__init__("iCone", inspector) |
self._cone_windows.append((window, transform[i])) | self._cone_windows.append((window, transforms[i])) | def __init__(self, inspector, options): super(iCone, self).__init__("iCone", inspector) |
transformed_field_has_changed[self._get_field(name)] = self._Script__field_has_changed[field] | transformed_field_has_changed[name] = self._Script__field_has_changed[field] | def __init__(self): self.super(Script).__init__(self._Script__type) |
import avango.inspector | global avango import avango.inspector | def init(argv): "Initialize display setup" try: opts, args = getopt.getopt(argv[1:], "hn:l:d:io:", ["help", "notify=", "log-file=", "display=", "inspector", "option="]) except getopt.GetoptError, err: pass display_type='Monitor' notify_level = -1 notify_logfile = '' inspector = None options = {} for opt, arg in opts:... |
self.always_evaluate(True) self.last_trigger_time = TimeIn.value | self.super(PropertyModifierInt).__init__() | def __init__(self): self.always_evaluate(True) self.last_trigger_time = TimeIn.value self.PropertyInc.value = False self.PropertyDec.value = False self.Enable.value = False self.PropertyStepSize.value = 1 self.PropertyMin.value = 0 self.PropertyMax.value = 100000 self.TriggerTimeDelta.value = 0.05 |
self.PropertyInc.value = False self.PropertyDec.value = False | self.last_trigger_time = self.TimeIn.value | def __init__(self): self.always_evaluate(True) self.last_trigger_time = TimeIn.value self.PropertyInc.value = False self.PropertyDec.value = False self.Enable.value = False self.PropertyStepSize.value = 1 self.PropertyMin.value = 0 self.PropertyMax.value = 100000 self.TriggerTimeDelta.value = 0.05 |
self.PropertyStepSize.value = 1 | self.Property.value = 0 | def __init__(self): self.always_evaluate(True) self.last_trigger_time = TimeIn.value self.PropertyInc.value = False self.PropertyDec.value = False self.Enable.value = False self.PropertyStepSize.value = 1 self.PropertyMin.value = 0 self.PropertyMax.value = 100000 self.TriggerTimeDelta.value = 0.05 |
trackball.RotateTrigger.connect_from(self._subdisplay_keyboard[subdisplay].MouseButtons_OnlyMiddle) trackball.PanTrigger.connect_from(self._subdisplay_keyboard[subdisplay].MouseButtons_LeftAndMiddle) trackball.ZoomTrigger.connect_from(self._subdisplay_keyboard[subdisplay].MouseButtons_OnlyRight) | trackball.RotateTrigger.connect_from(self._subdisplay_window_events[subdisplay].MouseButtons_OnlyMiddle) trackball.PanTrigger.connect_from(self._subdisplay_window_events[subdisplay].MouseButtons_LeftAndMiddle) trackball.ZoomTrigger.connect_from(self._subdisplay_window_events[subdisplay].MouseButtons_OnlyRight) | def make_view(self, subdisplay): display_view = avango.display.nodes.MonitorView() if subdisplay == "": super(Monitor, self).make_view(subdisplay, display_view) # In the Monitor setting each subdisplay simply get a new window else: window = self.make_window(0, 0, 1024, 768, 0.4, 0.3, False, self._screen_identifier, 2)... |
return len(self.arraydata[0]) | return len(HEADER_DATA) | def columnCount(self, parent): return len(self.arraydata[0]) |
def FixTWSyntaxAndParse(html): return xml.dom.minidom.parseString(html.replace('<br>','<br/>')) | def BoldCurrent(tlr): return "''" if tlr.current else "" | |
return xml.dom.minidom.parseString(importedFile.data) | return FixTWSyntaxAndParse(importedFile.data) | def XmlFromSources(self,url,sources=None,cache=None,save=False): |
xd = xml.dom.minidom.parseString(content) | xd = FixTWSyntaxAndParse(content) | def XmlFromSources(self,url,sources=None,cache=None,save=False): |
tlv = Tiddler.Tiddler.all().filter('id', tid).filter('version',ver).get() | tlv = Tiddler.all().filter('id', tid).filter('version',ver).get() | def deleteTiddlerVersion(tid,ver): tlv = Tiddler.Tiddler.all().filter('id', tid).filter('version',ver).get() if tlv != None: tlv.delete() logging.info("Deleted " + str(tid) + " version " + str(ver)) return True else: return False |
sel = self.request.get('s',None) | rsel = self.request.get('s',None).split(',') sel = [] for s in rsel: sel.append(s.replace('%20',' ').replace('%2C',',')) | def publishSub(self): |
sel = sel.split('%2C') | def publishSub(self): | |
error = "Tiddler doesnt' exist" | error = "Tiddler does not exist" | def saveTiddler(self): |
self.fail("File or tiddler not found") | self.fail('\n'.join(self.warnings)) | def getTiddler(self): |
return | return self.fail('\n'.join(self.warnings)) | def tiddlersFromUrl(self): |
if p.path.find('library') >= 0: | if p.path.find('library') >= 0 or p.path.find('lib/') >= 0: | def openLibrary(self): |
el = EditLock().all().filter("id",tlr.id).get() | el = EditLock().all().filter('id',tlr.id).get() | def saveTiddler(self): |
sv = self.request.get("version") | sv = self.request.get('currentVer') | def saveTiddler(self): |
return "Edit conflict: version " + sv + " already exists" | return "Edit conflict: version " + sv + " is not the current version" | def saveTiddler(self): |
authors = set() | authors = dict() | def get(self): |
authors.add(t.author) | authors[t.author.nickname()] = t.modified | def get(self): |
aux = authors.pop() copyright = "Copyright " + t.modified.strftime("%Y") + " " + aux.nickname() pdate = t.modified for aux in authors: copyright = copyright + ", " + aux.nickname() if pdate < aux.modified: pdate = aux.modified | pdate = max(authors.itervalues()) copyright = ', '.join(authors.keys()) | def get(self): |
def MimetypeFromFilename(fn): fp = fn.rsplit('.',1) | def Filetype(filename): fp = filename.rsplit('.',1) | def HtmlErrorMessage(msg): return "<html><body>" + htmlEncode(msg) + "</body></html>" |
return "application/octet-stream" ft = fp[1].lower() | return None else: return fp[1].lower() def MimetypeFromFiletype(ft): | def MimetypeFromFilename(fn): fp = fn.rsplit('.',1) if len(fp) == 1: return "application/octet-stream" ft = fp[1].lower() if ft == "txt": return "text/plain" if ft == "htm" or ft == "html": return "text/html" if ft == "xml": return "text/xml" if ft == "jpg" or ft == "jpeg": return "image/jpeg" if ft == "gif": return "i... |
f = UploadedFile() f.owner = users.get_current_user() f.path = CombinePath(self.request.path, self.request.get("filename")) f.mimetype = self.request.get("mimetype") if f.mimetype == None or f.mimetype == "": f.mimetype = MimetypeFromFilename(self.request.get("filename")) f.data = db.Blob(self.request.get("MyFile")) f.... | filename = self.request.get("filename") filedata = self.request.get("MyFile") filetype = Filetype(filename) if filetype == 'twd': return self.uploadTiddlyWikiDoc(filename,filedata) else: f = UploadedFile() f.owner = users.get_current_user() f.path = CombinePath(self.request.path, filename) f.mimetype = self.request.get... | def uploadFile(self): |
tv = xd.createElement('Result') xd.appendChild(tv); | result = xd.createElement('Result') | def expando(self,method): |
self.response.out.write(xd.toxml()) | if result.childNodes.count > 0: xd.appendChild(result) self.response.out.write(xd.toxml()) | def expando(self,method): |
def BuildTiddlerDiv(self,xd,id,t,user): div = xd.createElement('div') div.setAttribute('id', id) div.setAttribute('title', t.title) if t.page != self.request.path: div.setAttribute('from',t.page) div.setAttribute('readOnly',"true") if t.modified != None: div.setAttribute('modified', t.modified.strftime("%Y%m%d%H%M%S")... | def post(self): | |
httpMethodTiddler = None for id, t in tiddict.iteritems(): if t.title == 'HttpMethods': httpMethodTiddler = tiddict.pop(id) break | def get(self): | |
metaDiv.setAttribute('admin', "true" if users.is_current_user_admin() else "false") | def get(self): | |
t.text = "{{{\n" + t.text + "\n}}}" | if t.tags == "test": t.text = text + t.text | def get(self): |
div = xd.createElement('div') div.setAttribute('id', id) div.setAttribute('title', t.title) if t.page != self.request.path: div.setAttribute('from',t.page) div.setAttribute('readOnly',"true") if t.modified != None: div.setAttribute('modified', t.modified.strftime("%Y%m%d%H%M%S")) div.setAttribute('modifier', getAuthor... | sr.appendChild(self.BuildTiddlerDiv(xd,id,t,user)) if httpMethods != None: httpMethodTiddler.text = '\n'.join(httpMethods) sr.appendChild(self.BuildTiddlerDiv(xd,httpMethodTiddler.id,httpMethodTiddler,user)) | def get(self): |
text = HtmlErrorMessage("Cannot retrive " + twd + ":\n" + format(x)) | text = HtmlErrorMessage("Cannot retrive " + format(twd) + ":\n" + format(x)) | def get(self): |
versions = versions + "|" + tlr.modified.strftime("%Y-%m-%d %H:%M") + "|" + tlr.author.nickname() + "|" + str(tlr.version) + '|<<revision "' + tlr.title + '" ' + str(tlr.version) + '>>|\n' | if tlr.author != None: by = tlr.author.nickname() else: by = "?" versions = versions + "|" + tlr.modified.strftime("%Y-%m-%d %H:%M") + "|" + by + "|" + str(tlr.version) + '|<<revision "' + tlr.title + '" ' + str(tlr.version) + '>>|\n' | def saveTiddler(self): |
ts = tq.order("-modified").fetch(10) | ts = tq.order("title").order("-modified").fetch(10) | def get(self): |
until = el.time + timedelta(0,60*eval(str(el.duration))) | until = el.time + datetime.timedelta(0,60*eval(str(el.duration))) | def lock(self,t,usr): |
until = el.time + timedelta(0,60*eval(str(el.duration))) | until = el.time + datetime.timedelta(0,60*eval(str(el.duration))) | def editTiddler(self): |
until = el.time + timedelta(0,60*eval(str(el.duration))) | until = el.time + datetime.timedelta(0,60*eval(str(el.duration))) | def cleanup(self): |
ftwd = open(twd) | ftwd = codecs.open(twd,'r','utf-8') | def getText(self,page, readAccess=True, tiddict=dict(), twd=None, xsl=None, metaData=False, message=None): |
text = twdtext.replace('<div id="storeArea">\n</div>',elStArea.toxml()) | sasPos = twdtext.find(u'<div id="storeArea">') if sasPos == -1: text = '<div id="storeArea">) not found in ' + twd else: saePos = twdtext.find('</div>',sasPos) text = ''.join([twdtext[0:sasPos],elStArea.toxml(),twdtext[saePos + len('</div>'):]]) | def getText(self,page, readAccess=True, tiddict=dict(), twd=None, xsl=None, metaData=False, message=None): |
disregard = 0 | def get(self): # this is where it all starts | |
if page.systemInclude != None: | if readAccess and page.systemInclude != None: | def get(self): # this is where it all starts |
if rootpath and self.request.get('include') == '': if self.user == None: includefiles.append('help-anonymous.xml') defaultTiddlers = "Welcome" | if rootpath: if self.request.get('include') == '': if self.user == None: includefiles.append('help-anonymous.xml') defaultTiddlers = "Welcome" else: includefiles.append('help-authenticated.xml') defaultTiddlers = "Welcome\nPageProperties\nPagePropertiesHelp" else: file = UploadedFile.all().filter("sub",self.subdomain... | def get(self): # this is where it all starts |
includefiles.append('help-authenticated.xml') defaultTiddlers = "Welcome\nPageProperties\nPagePropertiesHelp" disregard = disregard + 1 elif self.user == None: defaultTiddlers = 'LoginDialog' | self.response.set_status(404) return | def get(self): # this is where it all starts |
disregard = disregard + 1 | def get(self): # this is where it all starts | |
for st in ShadowTiddler.all(): if self.request.path.startswith(st.path): try: tiddict[st.tiddler.id] = st.tiddler except Exception, x: self.warnings.append(''.join(['The shadowTiddler with id ', st.id, \ ' has been deleted! <a href="', self.request.path, '?method=deleteLink&id=', st.id, '">Remove link</a>'])) | def get(self): # this is where it all starts | |
includes = Include.all().filter("page", self.request.path) for t in includes: tv = t.version tq = Tiddler.all().filter("id = ", t.id) if t.version == None: tq = tq.filter("current = ", True) else: tq = tq.filter("version = ", tv) t = tq.get() if t != None: id = t.id if id in tiddict: if t.version > tiddict[id].version: | if page != None: includes = Include.all().filter("page", self.request.path) for t in includes: tv = t.version tq = Tiddler.all().filter("id = ", t.id) if t.version == None: tq = tq.filter("current = ", True) else: tq = tq.filter("version = ", tv) t = tq.get() if t != None: id = t.id if id in tiddict: if t.version > tid... | def get(self): # this is where it all starts |
else: tiddict[id] = t | def get(self): # this is where it all starts | |
if len(tiddict) == disregard: file = UploadedFile.all().filter("sub",self.subdomain).filter("path =", self.request.path).get() LogEvent("Get file", self.request.path) if file != None: self.response.headers['Content-Type'] = file.mimetype self.response.headers['Cache-Control'] = 'no-cache' self.response.out.write(file.d... | papalen = self.request.path.rfind('/') if papalen == -1: paw = ""; else: paw = self.request.path[0:papalen + 1] for p in Page.all(): if p.path.startswith(paw): pages.append(p) | def get(self): # this is where it all starts |
""" Generates a Gravatar URL for the given email address. | gravatar_id = md5_constructor(email).hexdigest() gravatar_url = GRAVATAR_URL_PREFIX + gravatar_id | def gravatar_for_email(email, size=None, rating=None): """ Generates a Gravatar URL for the given email address. Syntax:: {% gravatar_for_email <email> [size] [rating] %} Example:: {% gravatar_for_email someone@example.com 48 pg %} """ gravatar_id = md5_constructor(email).hexdigest() gravatar_url = GRAVATAR_URL_PRE... |
Syntax:: | parameters = [p for p in ( ('d', GRAVATAR_DEFAULT_IMAGE), ('s', size or GRAVATAR_DEFAULT_SIZE), ('r', rating or GRAVATAR_DEFAULT_RATING), ) if p[1]] | def gravatar_for_email(email, size=None, rating=None): """ Generates a Gravatar URL for the given email address. Syntax:: {% gravatar_for_email <email> [size] [rating] %} Example:: {% gravatar_for_email someone@example.com 48 pg %} """ gravatar_id = md5_constructor(email).hexdigest() gravatar_url = GRAVATAR_URL_PRE... |
{% gravatar_for_email <email> [size] [rating] %} Example:: {% gravatar_for_email someone@example.com 48 pg %} """ gravatar_id = md5_constructor(email).hexdigest() gravatar_url = GRAVATAR_URL_PREFIX + gravatar_id parameters = [p for p in ( ('d', GRAVATAR_DEFAULT_IMAGE), ('s', size or GRAVATAR_DEFAULT_SIZE), ('r', rat... | if parameters: gravatar_url += '?' + urllib.urlencode(parameters, doseq=True) | def gravatar_for_email(email, size=None, rating=None): """ Generates a Gravatar URL for the given email address. Syntax:: {% gravatar_for_email <email> [size] [rating] %} Example:: {% gravatar_for_email someone@example.com 48 pg %} """ gravatar_id = md5_constructor(email).hexdigest() gravatar_url = GRAVATAR_URL_PRE... |
gravatar_url += urllib.urlencode(parameters, doseq=True) | gravatar_url += '?' + urllib.urlencode(parameters, doseq=True) | def gravatar_for_email(email, size=None, rating=None): """ Generates a Gravatar URL for the given email address. Syntax:: {% gravatar_for_email <email> [size] [rating] %} Example:: {% gravatar_for_email foobar@example.com 48 pg %} """ gravatar_id = md5_constructor(email).hexdigest() gravatar_url = GRAVATAR_URL_PREF... |
P = [ "m3cc", "import-libs", "m3core", "libm3", "sysutils", | P = FilterPackages([ "m3cc", "import-libs", "m3core", "libm3", "sysutils", | def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = CM3VERSION + "-" + time.strftime("%Y%m%d") # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # p... |
"m3front", "cm3" ] | "m3front", "cm3" ]) | def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = CM3VERSION + "-" + time.strftime("%Y%m%d") # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # p... |
if not (ext_c or ext_h or ext_s or ext_ms or ext_is): | ext_io = a.endswith(".io") ext_mo = a.endswith(".mo") if not (ext_c or ext_h or ext_s or ext_ms or ext_is or ext_io or ext_mo): | def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = CM3VERSION + "-" + time.strftime("%Y%m%d") # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # p... |
if ext_h or ext_c or not vms or AssembleOnTarget: | if ext_h or ext_c or not vms or AssembleOnTarget or ext_io or ext_mo: | def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = CM3VERSION + "-" + time.strftime("%Y%m%d") # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # p... |
if ext_h: | if ext_h or ext_io or ext_mo: | def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = CM3VERSION + "-" + time.strftime("%Y%m%d") # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # p... |
Makefile.write(""" cm3.exe: *.io *.mo *.c cl -Zi -MD *.c -link *.mo *.io -out:cm3.exe user32.lib kernel32.lib wsock32.lib comctl32.lib gdi32.lib advapi32.lib """) | Makefile.write("cm3.exe: *.io *.mo *.c\r\n" + " cl -Zi -MD *.c -link *.mo *.io -out:cm3.exe user32.lib kernel32.lib wsock32.lib comctl32.lib gdi32.lib advapi32.lib netapi32.lib\r\n") | def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. SunCompile = "/usr/ccs/bin/cc -g -mt -xcode=pic32 -xldscope=symbolic " GnuCo... |
Host = "I386_NETBSD" | if UNameArchM == "amd64": Host = "AMD64_NETBSD" elif UNameArchM == "i386": Host = "I386_NETBSD" | def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.com... |
"I386_LINUX" : "LINUXLIBC6", "I386_NT" : "NT386", "I386_CYGWIN" : "NT386GNU", "I386_MINGW" : "NT386MINGNU", "PPC32_DARWIN" : "PPC_DARWIN", "PPC32_LINUX" : "PPC_LINUX", "I386_FREEBSD" : "FreeBSD4", "I386_NETBSD" : "NetBSD2_i386", | "LINUXLIBC6" : "I386_LINUX", "NT386" : "I386_NT", "NT386GNU" : "I386_CYGWIN", "NT386MINGNU" : "I386_MINGW", "PPC32_DARWIN" : "PPC_DARWIN", "PPC32_LINUX" : "PPC_LINUX", "FreeBSD4" : "I386_FREEBSD", "NetBSD2_i386" : "I386_NETBSD", | def _MapTarget(a): # Convert sensible names that the user might provide on the # command line into the legacy names other code knows about. return { "I386_LINUX" : "LINUXLIBC6", "I386_NT" : "NT386", "I386_CYGWIN" : "NT386GNU", "I386_MINGW" : "NT386MINGNU", "PPC32_DARWIN" : "PPC_DARWIN", "PPC32_LINUX" : "PPC_LINUX", "... |
OSType = "POSIX" | TargetOS = "POSIX" | def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.com... |
Q = "" HAVE_SERIAL = True | def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.com... | |
Config = "NT386GNU" OSType = "POSIX" | Config = "I386_CYGWIN" TargetOS = "POSIX" | def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.com... |
Config = "NT386MINGNU" OSType = "WIN32" | Config = "I386_MINGW" TargetOS = "WIN32" | def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.com... |
Config = "NT386" OSType = "WIN32" GCC_BACKEND = False Target = "NT386" | Config = "I386_NT" TargetOS = "WIN32" Target = Config if Target.endswith("_NT"): HAVE_SERIAL = True GCC_BACKEND = False TargetOS = "WIN32" if Target.endswith("_MINGW"): HAVE_SERIAL = True TargetOS = "WIN32" if Host.endswith("_NT") or Host == "NT386": Q = "" | def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.com... |
"tapi": BuildAll or OSType == "WIN32", | "tapi": BuildAll or TargetOS == "WIN32", | def _FilterPackage(Package): PackageConditions = { "m3gdb": (M3GDB or CM3_GDB) and {"FreeBSD4": True, "LINUXLIBC6" : True, "SOLgnu" : True, "NetBSD2_i386" : True, "NT386GNU" : True, }.get(Target, False), "tcl": BuildAll or HAVE_TCL, "tapi": BuildAll or OSType == "WIN32", "serial": BuildAll or HAVE_SERIAL, "X11R4": Buil... |
"X11R4": BuildAll or OSType != "WIN32", | "X11R4": BuildAll or TargetOS != "WIN32", | def _FilterPackage(Package): PackageConditions = { "m3gdb": (M3GDB or CM3_GDB) and {"FreeBSD4": True, "LINUXLIBC6" : True, "SOLgnu" : True, "NetBSD2_i386" : True, "NT386GNU" : True, }.get(Target, False), "tcl": BuildAll or HAVE_TCL, "tapi": BuildAll or OSType == "WIN32", "serial": BuildAll or HAVE_SERIAL, "X11R4": Buil... |
if Target == "NT386" and HostIsNT and Config == "NT386" and (not GCC_BACKEND) and OSType == "WIN32": | if Target == "NT386" and HostIsNT and Config == "NT386" and (not GCC_BACKEND) and TargetOS == "WIN32": | def SetupEnvironment(): SystemDrive = os.environ.get("SystemDrive", "") if os.environ.get("OS") == "Windows_NT": HostIsNT = True else: HostIsNT = False SystemDrive = os.environ.get("SYSTEMDRIVE") if SystemDrive: SystemDrive += os.path.sep # Do this earlier so that its link isn't a problem. # Looking in the registry H... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.