code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
from pattern.circuit import Control import weakref, gobject import os.path, posixpath, urllib import BaseHTTPServer, SimpleHTTPServer class HTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): def notify(self, method): s = self.server if s is not None and hasattr(s, 'notify'): ...
[ [ 1, 0, 0.0167, 0.0167, 0, 0.66, 0, 53, 0, 1, 0, 0, 53, 0, 0 ], [ 1, 0, 0.0333, 0.0167, 0, 0.66, 0.2, 708, 0, 2, 0, 0, 708, 0, 0 ], [ 1, 0, 0.05, 0.0167, 0, 0.66, ...
[ "from pattern.circuit import Control", "import weakref, gobject", "import os.path, posixpath, urllib", "import BaseHTTPServer, SimpleHTTPServer", "class HTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):\n\n def notify(self, method):\n s = self.server\n if s is not None and hasa...
class entry(object): VERBS = ["Edit Content"] def __init__(self): self.page = "" def realize(self, event): self.realized = event if hasattr(event.shape, 'value'): self.page = event.shape.value def please(self, event): return self.page ...
[ [ 3, 0, 0.5286, 0.9714, 0, 0.66, 0, 812, 0, 5, 0, 0, 186, 0, 16 ], [ 14, 1, 0.1143, 0.0286, 1, 0.95, 0, 295, 0, 0, 0, 0, 0, 5, 0 ], [ 2, 1, 0.1857, 0.0571, 1, 0.95,...
[ "class entry(object):\n \n VERBS = [\"Edit Content\"]\n \n def __init__(self):\n self.page = \"\"\n \n def realize(self, event):", " VERBS = [\"Edit Content\"]", " def __init__(self):\n self.page = \"\"", " self.page = \"\"", " def realize(self, event):\n ...
from pattern.circuit import Control class entry(Control): def incoming(self, event): page = self.collect(event) event.trail.send_response(200) event.trail.send_header("Content-type", "text/html") event.trail.send_header("Content-length", str(len(page))) event.trail.end_...
[ [ 1, 0, 0.0556, 0.0556, 0, 0.66, 0, 53, 0, 1, 0, 0, 53, 0, 0 ], [ 3, 0, 0.5833, 0.8889, 0, 0.66, 1, 812, 0, 2, 0, 0, 834, 0, 10 ], [ 2, 1, 0.4444, 0.3889, 1, 0.34, ...
[ "from pattern.circuit import Control", "class entry(Control):\n \n def incoming(self, event):\n page = self.collect(event)\n event.trail.send_response(200)\n event.trail.send_header(\"Content-type\", \"text/html\")\n event.trail.send_header(\"Content-length\", str(len(page)))\n ...
import gtk class entry(object): def incoming(self, event): area, = event.data gc = area.window.new_gc() x = getattr(event.shape, "x", 10) y = getattr(event.shape, "y", 10) area.window.draw_rectangle(gc, False, x, y, 20, 20)
[ [ 1, 0, 0.0909, 0.0909, 0, 0.66, 0, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 3, 0, 0.6818, 0.7273, 0, 0.66, 1, 812, 0, 1, 0, 0, 186, 0, 4 ], [ 2, 1, 0.7727, 0.5455, 1, 0.61,...
[ "import gtk", "class entry(object):\n\n def incoming(self, event):\n area, = event.data\n gc = area.window.new_gc()\n x = getattr(event.shape, \"x\", 10)\n y = getattr(event.shape, \"y\", 10)\n area.window.draw_rectangle(gc, False, x, y, 20, 20)", " def incoming(self, ev...
from pattern.circuit import Control class entry(Control): VERBS = ["Clear"] def realize(self, event): self.realized = event if not hasattr(event.shape, 'store'): event.shape.store = { } self.updated(event) def incoming(self, event): request, = even...
[ [ 1, 0, 0.0294, 0.0294, 0, 0.66, 0, 53, 0, 1, 0, 0, 53, 0, 0 ], [ 3, 0, 0.5294, 0.9118, 0, 0.66, 1, 812, 0, 5, 0, 0, 834, 0, 9 ], [ 14, 1, 0.1471, 0.0294, 1, 0.44, ...
[ "from pattern.circuit import Control", "class entry(Control):\n \n VERBS = [\"Clear\"]\n \n def realize(self, event):\n self.realized = event\n if not hasattr(event.shape, 'store'):\n event.shape.store = { }", " VERBS = [\"Clear\"]", " def realize(self, event):\n ...
import gtk import pango class FoolishEditorWindow(object): KEY_TAB = 65289 KEY_ENTER = 65293 KEY_S = 115 TAB_WIDTH = 4 def __init__(self): self.window = gtk.Window() self.window.set_title("Code Window") self.sw = gtk.ScrolledWindow() self.textbu...
[ [ 1, 0, 0.0091, 0.0091, 0, 0.66, 0, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0182, 0.0091, 0, 0.66, 0.25, 288, 0, 1, 0, 0, 288, 0, 0 ], [ 3, 0, 0.3909, 0.7, 0, 0.66,...
[ "import gtk", "import pango", "class FoolishEditorWindow(object):\n\n KEY_TAB = 65289\n KEY_ENTER = 65293\n\n KEY_S = 115\n\n TAB_WIDTH = 4", " KEY_TAB = 65289", " KEY_ENTER = 65293", " KEY_S = 115", " TAB_WIDTH = 4", " def __init__(self):\n self.window = gtk.Window()...
import os,sys import wx import wx.html class exHtmlWindow(wx.html.HtmlWindow): def __init__(self, parent, id, frame): wx.html.HtmlWindow.__init__(self,parent,id) class exHtmlPanel(wx.Panel): def __init__(self, parent, id, frame): wx.Panel.__init__(self,parent,-1) self.html = exHtmlWindow(sel...
[ [ 1, 0, 0.0426, 0.0213, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0638, 0.0213, 0, 0.66, 0.1429, 666, 0, 1, 0, 0, 666, 0, 0 ], [ 1, 0, 0.0851, 0.0213, 0, ...
[ "import os,sys", "import wx", "import wx.html", "class exHtmlWindow(wx.html.HtmlWindow):\n def __init__(self, parent, id, frame):\n wx.html.HtmlWindow.__init__(self,parent,id)", " def __init__(self, parent, id, frame):\n wx.html.HtmlWindow.__init__(self,parent,id)", " wx.html.HtmlWindow...
import os import sys import signal import select import pickle import new import traceback import gobject if __name__ == "__main__": Control = object else: import pattern from pattern.circuit import Control from pattern.serialization import picklers class entry(Control): def realize(self, event)...
[ [ 1, 0, 0.0087, 0.0087, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0174, 0.0087, 0, 0.66, 0.1, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0261, 0.0087, 0, 0.6...
[ "import os", "import sys", "import signal", "import select", "import pickle", "import new", "import traceback", "import gobject", "if __name__ == \"__main__\":\n Control = object\nelse:\n import pattern\n from pattern.circuit import Control\n from pattern.serialization import picklers", ...
import sys class entry(object): def incoming(self, event): print "Will talk back to parent process -", event.data print >> sys.pout, "This is me", event.data sys.pout.flush()
[ [ 1, 0, 0.1111, 0.1111, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 3, 0, 0.7222, 0.6667, 0, 0.66, 1, 812, 0, 1, 0, 0, 186, 0, 2 ], [ 2, 1, 0.8333, 0.4444, 1, 0.97,...
[ "import sys", "class entry(object):\n\n def incoming(self, event):\n print(\"Will talk back to parent process -\", event.data)\n\n sys.pout.flush()", " def incoming(self, event):\n print(\"Will talk back to parent process -\", event.data)\n\n sys.pout.flush()", " print...
import weakref import pattern.crossref from pattern.circuit import Control, Event from pattern.crossref import CrossReference from pattern.serialization.picklers import ShapesPickler class entry(Control): def incoming(self, event): if event.point.tag == "from_remote": (msg, hook_index, data),...
[ [ 1, 0, 0.0079, 0.0079, 0, 0.66, 0, 708, 0, 1, 0, 0, 708, 0, 0 ], [ 1, 0, 0.0157, 0.0079, 0, 0.66, 0.2, 668, 0, 1, 0, 0, 668, 0, 0 ], [ 1, 0, 0.0236, 0.0079, 0, 0.6...
[ "import weakref", "import pattern.crossref", "from pattern.circuit import Control, Event", "from pattern.crossref import CrossReference", "from pattern.serialization.picklers import ShapesPickler", "class entry(Control):\n\n def incoming(self, event):\n if event.point.tag == \"from_remote\":\n ...
from pattern.circuit import Control class entry(Control): def realize(self, event): self.title = "Worker" def incoming(self, event): print self.title, event.data bridge = self.acquireInterface(event, "bottom:50%") if bridge is not None: bridge.push(*(("nex...
[ [ 1, 0, 0.0714, 0.0714, 0, 0.66, 0, 53, 0, 1, 0, 0, 53, 0, 0 ], [ 3, 0, 0.6071, 0.7143, 0, 0.66, 1, 812, 0, 2, 0, 0, 834, 0, 3 ], [ 2, 1, 0.4643, 0.1429, 1, 0.27, ...
[ "from pattern.circuit import Control", "class entry(Control):\n\n def realize(self, event):\n self.title = \"Worker\"\n \n def incoming(self, event):\n print(self.title, event.data)\n bridge = self.acquireInterface(event, \"bottom:50%\")", " def realize(self, event):\n ...
import gtk from pattern.circuit import Control class entry(Control): VERBS = ["Create"] def realize(self, event): # Create window self.window = gtk.Window() self.window.show() self.widget = None def incoming(self, event): self.clean() ...
[ [ 1, 0, 0.0192, 0.0192, 0, 0.66, 0, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0385, 0.0192, 0, 0.66, 0.5, 53, 0, 1, 0, 0, 53, 0, 0 ], [ 3, 0, 0.5385, 0.9423, 0, 0.66,...
[ "import gtk", "from pattern.circuit import Control", "class entry(Control):\n\n VERBS = [\"Create\"]\n \n def realize(self, event):\n # Create window\n self.window = gtk.Window()\n self.window.show()", " VERBS = [\"Create\"]", " def realize(self, event):\n # Create...
import gtk from pattern.circuit import Control class entry(Control): VERBS = ["Refresh"] def realize(self, event): self.area = gtk.DrawingArea() self.area.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("navajowhite")) self.area.connect("expose-event", self.area_expose_cb) ...
[ [ 1, 0, 0.0323, 0.0323, 0, 0.66, 0, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 1, 0, 0.0645, 0.0323, 0, 0.66, 0.5, 53, 0, 1, 0, 0, 53, 0, 0 ], [ 3, 0, 0.5484, 0.871, 0, 0.66, ...
[ "import gtk", "from pattern.circuit import Control", "class entry(Control):\n\n VERBS = [\"Refresh\"]\n\n def realize(self, event):\n self.area = gtk.DrawingArea()\n self.area.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(\"navajowhite\"))\n self.area.connect(\"expose-event\", self....
import gtk class entry: def realize(self, event): self.treeview = gtk.TreeView() self.treeview.show() def incoming(self, event): if "creating" in event.frame.on: event.frame.on["creating"](event, self.treeview)
[ [ 1, 0, 0.0909, 0.0909, 0, 0.66, 0, 166, 0, 1, 0, 0, 166, 0, 0 ], [ 3, 0, 0.6364, 0.8182, 0, 0.66, 1, 812, 0, 2, 0, 0, 0, 0, 3 ], [ 2, 1, 0.5455, 0.2727, 1, 0.85, ...
[ "import gtk", "class entry:\n\n def realize(self, event):\n self.treeview = gtk.TreeView()\n self.treeview.show()\n\n def incoming(self, event):\n if \"creating\" in event.frame.on:", " def realize(self, event):\n self.treeview = gtk.TreeView()\n self.treeview.show()"...
from pattern.circuit import Control from algonquin.circuit import CircuitGeometry class InnerCircuit(object): def __init__(self, parent_circuit, container_shape): self.parent = parent_circuit self.shape = container_shape def __getattr__(self, nm): return getattr(self.parent, ...
[ [ 1, 0, 0.0143, 0.0143, 0, 0.66, 0, 53, 0, 1, 0, 0, 53, 0, 0 ], [ 1, 0, 0.0286, 0.0143, 0, 0.66, 0.3333, 146, 0, 1, 0, 0, 146, 0, 0 ], [ 3, 0, 0.2357, 0.3429, 0, 0....
[ "from pattern.circuit import Control", "from algonquin.circuit import CircuitGeometry", "class InnerCircuit(object):\n\n def __init__(self, parent_circuit, container_shape):\n self.parent = parent_circuit\n self.shape = container_shape\n \n def __getattr__(self, nm):\n return g...
from pattern.circuit import Control class entry(Control): def incoming(self, event): bridge = self.acquireInterface(event, "out") if bridge is not None: bridge.push(event.shape.value)
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 53, 0, 1, 0, 0, 53, 0, 0 ], [ 3, 0, 0.65, 0.6, 0, 0.66, 1, 812, 0, 1, 0, 0, 834, 0, 2 ], [ 2, 1, 0.75, 0.4, 1, 0.28, 0, 787, ...
[ "from pattern.circuit import Control", "class entry(Control):\n\n def incoming(self, event):\n bridge = self.acquireInterface(event, \"out\")\n if bridge is not None:\n bridge.push(event.shape.value)", " def incoming(self, event):\n bridge = self.acquireInterface(event, \"o...
import weakref import pattern.circuit class CircuitOperability(object): """ Represents the aspect in which a circuit operates the logical controls contained in it. """ def emit(self, e4shape, cb, **kwargs): container = self.get_container(e4shape) if container is not None: ...
[ [ 1, 0, 0.0078, 0.0078, 0, 0.66, 0, 708, 0, 1, 0, 0, 708, 0, 0 ], [ 1, 0, 0.0155, 0.0078, 0, 0.66, 0.25, 53, 0, 1, 0, 0, 53, 0, 0 ], [ 3, 0, 0.2636, 0.4574, 0, 0.66...
[ "import weakref", "import pattern.circuit", "class CircuitOperability(object):\n \"\"\"\n Represents the aspect in which a circuit operates the logical controls\n contained in it.\n \"\"\"\n\n def emit(self, e4shape, cb, **kwargs):\n container = self.get_container(e4shape)", " \"\"\"\...
#!/usr/bin/env python # # Repeats a command for each demo and reports the status. # The command is executed from the root directory of the demo. # # Example: # python demos.py "ant install" # python demos.py "android update project -p ." # import os import sys def demos(command): tools_directory, script = os.path.s...
[ [ 1, 0, 0.2558, 0.0233, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2791, 0.0233, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.4884, 0.3488, 0, 0....
[ "import os", "import sys", "def demos(command):\n tools_directory, script = os.path.split(os.path.abspath(__file__))\n root_directory, tools = os.path.split(tools_directory)\n demos_directory = os.path.join(root_directory, 'demos')\n demos = os.listdir(demos_directory)\n demos = list(filter(lambda x: not x...
#!/usr/bin/env python # # Updates the JARs in the demo libs/ directories # with the current build output found in bin/. # import os import shutil import sys def listdir(path): """List files at the specified path excluding hidden files""" return filter(lambda x: not x.startswith('.'), os.listdir(path)) def libs()...
[ [ 1, 0, 0.1892, 0.027, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2162, 0.027, 0, 0.66, 0.1667, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.2432, 0.027, 0, 0.6...
[ "import os", "import shutil", "import sys", "def listdir(path):\n \"\"\"List files at the specified path excluding hidden files\"\"\"\n return filter(lambda x: not x.startswith('.'), os.listdir(path))", " \"\"\"List files at the specified path excluding hidden files\"\"\"", " return filter(lambda x: n...
#!/usr/bin/env python # # Builds archives for SDK releases. # # Usage: # python tools/sdk.py <version> # import os import shutil import sys import tempfile def execute(command): status = os.system(command) if status != 0: raise Exception('unexpected result: %d' % status) def sdk(version, output): # Find th...
[ [ 1, 0, 0.1324, 0.0147, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1471, 0.0147, 0, 0.66, 0.1429, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.1618, 0.0147, 0, ...
[ "import os", "import shutil", "import sys", "import tempfile", "def execute(command):\n status = os.system(command)\n if status != 0:\n raise Exception('unexpected result: %d' % status)", " status = os.system(command)", " if status != 0:\n raise Exception('unexpected result: %d' % status)", ...
#!/usr/bin/env python from algaefw import * @get('/(?P<name>\w+)') def hello(request, name=', world'): return render('inform.html',{'data':name}) @get('/.*') def test(request): return render('inform.html',{'data':"In the test page"}) if __name__ == '__main__': main()
[ [ 1, 0, 0.2308, 0.0769, 0, 0.66, 0, 119, 0, 1, 0, 0, 119, 0, 0 ], [ 2, 0, 0.5, 0.1538, 0, 0.66, 0.3333, 6, 0, 2, 1, 0, 0, 0, 2 ], [ 13, 1, 0.5385, 0.0769, 1, 0.3, ...
[ "from algaefw import *", "def hello(request, name=', world'):\n return render('inform.html',{'data':name})", " return render('inform.html',{'data':name})", "def test(request):\n return render('inform.html',{'data':\"In the test page\"})", " return render('inform.html',{'data':\"In the test page\"})", ...
#!/usr/bin/env python from algaefw import * @get('/(?P<name>\w+)') def hello(request, name=', world'): return render('inform.html',{'data':name}) @get('/.*') def test(request): return render('inform.html',{'data':"In the test page"}) if __name__ == '__main__': main()
[ [ 1, 0, 0.2308, 0.0769, 0, 0.66, 0, 119, 0, 1, 0, 0, 119, 0, 0 ], [ 2, 0, 0.5, 0.1538, 0, 0.66, 0.3333, 6, 0, 2, 1, 0, 0, 0, 2 ], [ 13, 1, 0.5385, 0.0769, 1, 0.36, ...
[ "from algaefw import *", "def hello(request, name=', world'):\n return render('inform.html',{'data':name})", " return render('inform.html',{'data':name})", "def test(request):\n return render('inform.html',{'data':\"In the test page\"})", " return render('inform.html',{'data':\"In the test page\"})", ...
#!/usr/bin/env python # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ [ 1, 0, 0.1753, 0.0103, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1856, 0.0103, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1959, 0.0103, 0, 0.6...
[ "import sys", "import os", "from StringIO import StringIO", "from PIL import Image", "import datauri", "RGBA_BLACK = (0, 0, 0, 255)", "sign_ = lambda n: -1 if n < 0 else (1 if n > 0 else 0)", "def find_black_region_(im, sx, sy, ex, ey):\n dx = sign_(ex - sx)\n dy = sign_(ey - sy)\n if abs(dx) == ab...
#!/usr/bin/env python # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ [ 1, 0, 0.3542, 0.0208, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.375, 0.0208, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3958, 0.0208, 0, 0...
[ "import sys", "import os", "from StringIO import StringIO", "from PIL import Image", "import datauri", "def image_to_data_uri_(im):\n f = StringIO()\n im.save(f, 'PNG')\n uri = datauri.to_data_uri(f.getvalue(), 'foo.png')\n f.close()\n return uri", " f = StringIO()", " im.save(f, 'PNG')", " ...
#!/usr/bin/env python # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ [ 1, 0, 0.2881, 0.0169, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.3051, 0.0169, 0, 0.66, 0.1667, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.322, 0.0169, 0, 0...
[ "import sys", "import os", "import os.path", "import shutil", "import zipfile", "def main():\n params = {}\n params['id'] = sys.argv[1]\n params['displayname'] = sys.argv[2]\n params['description'] = sys.argv[3]\n\n zip_file = zipfile.ZipFile('dist/stencil-%s.zip' % params['id'], 'w',\n zipfile....
#!/usr/bin/env python # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ [ 1, 0, 0.5, 0.0294, 0, 0.66, 0, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.5294, 0.0294, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.5588, 0.0294, 0, 0.66, ...
[ "import base64", "import sys", "import mimetypes", "def to_data_uri(data, file_name):\n '''Takes a file object and returns its data: string.'''\n mime_type = mimetypes.guess_type(file_name)\n return 'data:%(mimetype)s;base64,%(data)s' % dict(mimetype=mime_type[0],\n data=base64.b64encode(data))", " ...
# encoding: utf8 """ Django settings for alfredo_imoveis project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.pa...
[ [ 8, 0, 0.0492, 0.0738, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1066, 0.0082, 0, 0.66, 0.0435, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.1148, 0.0082, 0, 0.6...
[ "\"\"\"\nDjango settings for alfredo_imoveis project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6/ref/settings/", "import os", "BASE_DIR = os.path.dirname(os.path.d...
# encoding: utf8 """ Django settings for alfredo_imoveis project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.pa...
[ [ 8, 0, 0.05, 0.075, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1083, 0.0083, 0, 0.66, 0.0435, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.1167, 0.0083, 0, 0.66, ...
[ "\"\"\"\nDjango settings for alfredo_imoveis project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.6/ref/settings/", "import os", "BASE_DIR = os.path.dirname(os.path.d...
# encoding:utf-8 from django.conf.urls import patterns, include, url import settings from django.contrib import admin admin.autodiscover() urlpatterns =\ patterns('alfredo_imoveis.views', url(r'^$', 'home', name='main_home'), url(r'^grappelli/', include('grappelli.urls')), url(r'^clientes...
[ [ 1, 0, 0.0476, 0.0238, 0, 0.66, 0, 528, 0, 3, 0, 0, 528, 0, 0 ], [ 1, 0, 0.0714, 0.0238, 0, 0.66, 0.2, 168, 0, 1, 0, 0, 168, 0, 0 ], [ 1, 0, 0.0952, 0.0238, 0, 0.6...
[ "from django.conf.urls import patterns, include, url", "import settings", "from django.contrib import admin", "admin.autodiscover()", "urlpatterns =\\\n patterns('alfredo_imoveis.views', url(r'^$', 'home', name='main_home'),\n url(r'^grappelli/', include('grappelli.urls')),\n url(...
""" WSGI config for alfredo_imoveis project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "alfredo_imoveis.settings") fr...
[ [ 8, 0, 0.3214, 0.5714, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7143, 0.0714, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 8, 0, 0.7857, 0.0714, 0, 0.66, ...
[ "\"\"\"\nWSGI config for alfredo_imoveis project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/\n\"\"\"", "import os", "os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"...
# encoding: utf8 __author__ = 'gpzim98' from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from funcionarios.models import Funcionario from parametros.models import ParametrosGerais template_home = 'index.html' template_dashboard = 'dashboard.html' def home(reques...
[ [ 14, 0, 0.0408, 0.0204, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0612, 0.0204, 0, 0.66, 0.0909, 852, 0, 2, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0816, 0.0204, 0, 0...
[ "__author__ = 'gpzim98'", "from django.shortcuts import render, redirect", "from django.contrib.auth.decorators import login_required", "from funcionarios.models import Funcionario", "from parametros.models import ParametrosGerais", "template_home = 'index.html'", "template_dashboard = 'dashboard.html'"...
# encoding: utf8 from django.db import models from enderecos.models import Endereco from django.contrib.auth.admin import User from clientes.models import Cliente from empresas.models import Empresa from funcoes import today TIPO_CONTRATO = ( ('C', 'COMERCIAL'), ('R', 'RESIDENCIAL'), ) LOCAL_CHAVES = ( ('P...
[ [ 1, 0, 0.0078, 0.0039, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0117, 0.0039, 0, 0.66, 0.0833, 701, 0, 1, 0, 0, 701, 0, 0 ], [ 1, 0, 0.0156, 0.0039, 0, 0....
[ "from django.db import models", "from enderecos.models import Endereco", "from django.contrib.auth.admin import User", "from clientes.models import Cliente", "from empresas.models import Empresa", "from funcoes import today", "TIPO_CONTRATO = (\n ('C', 'COMERCIAL'),\n ('R', 'RESIDENCIAL'),\n)", ...
__author__ = 'gpzim98' from django import forms from models import Imovel, ContratoLocacao from django.forms import ModelForm from imoveis.models import ContratoAdministrativo, LaudoVistoria class ImovelForm(forms.ModelForm): descricao = forms.CharField(widget=forms.Textarea) class Meta: model = Imov...
[ [ 14, 0, 0.0333, 0.0333, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0667, 0.0333, 0, 0.66, 0.125, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.1, 0.0333, 0, 0.66,...
[ "__author__ = 'gpzim98'", "from django import forms", "from models import Imovel, ContratoLocacao", "from django.forms import ModelForm", "from imoveis.models import ContratoAdministrativo, LaudoVistoria", "class ImovelForm(forms.ModelForm):\n descricao = forms.CharField(widget=forms.Textarea)\n\n c...
from django.test import TestCase # Create your tests here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ] ]
[ "from django.test import TestCase" ]
from django.conf.urls import patterns, url urlpatterns = patterns( 'imoveis.views', url(r'^$', 'home', name='app_imoveis_home'), url(r'^adiciona$', 'adiciona', name='app_imoveis_add'), url(r'^filtrar/$', 'filtrar', name='app_imoveis_filtrar'), url(r'^detalhe/(?P<id>\d+)/$', 'detalhe', name='app_im...
[ [ 1, 0, 0.0154, 0.0154, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 14, 0, 0.5231, 0.9692, 0, 0.66, 1, 990, 3, 33, 0, 0, 75, 10, 33 ] ]
[ "from django.conf.urls import patterns, url", "urlpatterns = patterns(\n 'imoveis.views',\n url(r'^$', 'home', name='app_imoveis_home'),\n url(r'^adiciona$', 'adiciona', name='app_imoveis_add'),\n url(r'^filtrar/$', 'filtrar', name='app_imoveis_filtrar'),\n url(r'^detalhe/(?P<id>\\d+)/$', 'detalhe...
# encoding: utf-8 from django.shortcuts import render, get_object_or_404, redirect from imoveis.models import Imovel, RescisaoContrato from enderecos.forms import EnderecoForm from forms import ImovelForm, ContratoLocacaoForm,\ ContratoAdministrativoForm, LaudoVistoriaForm from funcionarios.models import Funcionari...
[ [ 1, 0, 0.0038, 0.0019, 0, 0.66, 0, 852, 0, 3, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0057, 0.0019, 0, 0.66, 0.0185, 525, 0, 2, 0, 0, 525, 0, 0 ], [ 1, 0, 0.0076, 0.0019, 0, ...
[ "from django.shortcuts import render, get_object_or_404, redirect", "from imoveis.models import Imovel, RescisaoContrato", "from enderecos.forms import EnderecoForm", "from forms import ImovelForm, ContratoLocacaoForm,\\\n ContratoAdministrativoForm, LaudoVistoriaForm", "from funcionarios.models import F...
from django.contrib import admin from imoveis.models import Imovel, ContratoLocacao,\ ContratoAdministrativo, RescisaoContrato # Register your models here. admin.site.register(Imovel) admin.site.register(ContratoLocacao) admin.site.register(ContratoAdministrativo) admin.site.register(RescisaoContrato)
[ [ 1, 0, 0.1111, 0.1111, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.2778, 0.2222, 0, 0.66, 0.2, 525, 0, 4, 0, 0, 525, 0, 0 ], [ 8, 0, 0.6667, 0.1111, 0, 0.6...
[ "from django.contrib import admin", "from imoveis.models import Imovel, ContratoLocacao,\\\n ContratoAdministrativo, RescisaoContrato", "admin.site.register(Imovel)", "admin.site.register(ContratoLocacao)", "admin.site.register(ContratoAdministrativo)", "admin.site.register(RescisaoContrato)" ]
# encoding:utf8 from django.db import models from django.contrib.auth.models import User from financeiro.models.conta_caixa import ContaCaixa class ParametrosGerais(models.Model): taxa_juros = models.DecimalField(max_digits=4, decimal_places=2) multa = models.DecimalField(max_digits=5, decimal_places=2, defau...
[ [ 1, 0, 0.0952, 0.0476, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.1429, 0.0476, 0, 0.66, 0.3333, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.1905, 0.0476, 0, 0....
[ "from django.db import models", "from django.contrib.auth.models import User", "from financeiro.models.conta_caixa import ContaCaixa", "class ParametrosGerais(models.Model):\n taxa_juros = models.DecimalField(max_digits=4, decimal_places=2)\n multa = models.DecimalField(max_digits=5, decimal_places=2, d...
from django import forms from models import ParametrosGerais class FormParametrosGerais(forms.ModelForm): class Meta: model = ParametrosGerais
[ [ 1, 0, 0.1429, 0.1429, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.2857, 0.1429, 0, 0.66, 0.5, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 3, 0, 0.8571, 0.4286, 0, 0.6...
[ "from django import forms", "from models import ParametrosGerais", "class FormParametrosGerais(forms.ModelForm):\n class Meta:\n model = ParametrosGerais", " class Meta:\n model = ParametrosGerais", " model = ParametrosGerais" ]
from django.test import TestCase # Create your tests here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ] ]
[ "from django.test import TestCase" ]
# encoding:utf-8 from django.conf.urls import patterns, url urlpatterns = patterns( 'parametros.views', url(r'^$', 'home', name='app_parametros_home'), url(r'^editar/(?P<id>\d+)/$', 'editar', name='app_parametros_editar'), url(r'^salvar/(?P<id>\d+)/$', 'salvar', name='app_parametros_salvar'), )
[ [ 1, 0, 0.2222, 0.1111, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 14, 0, 0.7222, 0.6667, 0, 0.66, 1, 990, 3, 4, 0, 0, 75, 10, 4 ] ]
[ "from django.conf.urls import patterns, url", "urlpatterns = patterns(\n 'parametros.views',\n url(r'^$', 'home', name='app_parametros_home'),\n url(r'^editar/(?P<id>\\d+)/$', 'editar', name='app_parametros_editar'),\n url(r'^salvar/(?P<id>\\d+)/$', 'salvar', name='app_parametros_salvar'),\n)" ]
# encoding:utf8 from django.shortcuts import render from django.contrib.auth.decorators import login_required from forms import FormParametrosGerais from models import ParametrosGerais # Create your views here. template_parametros = 'parametros/home.html' @login_required def home2(request): dados = {} if req...
[ [ 1, 0, 0.0263, 0.0132, 0, 0.66, 0, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0395, 0.0132, 0, 0.66, 0.125, 885, 0, 1, 0, 0, 885, 0, 0 ], [ 1, 0, 0.0526, 0.0132, 0, 0...
[ "from django.shortcuts import render", "from django.contrib.auth.decorators import login_required", "from forms import FormParametrosGerais", "from models import ParametrosGerais", "template_parametros = 'parametros/home.html'", "def home2(request):\n dados = {}\n if request.method == 'GET':\n ...
from django.contrib import admin from models import ParametrosGerais # Register your models here. admin.site.register(ParametrosGerais)
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.5, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 8, 0, 1, 0.2, 0, 0.66, 1, 276, ...
[ "from django.contrib import admin", "from models import ParametrosGerais", "admin.site.register(ParametrosGerais)" ]
# coding:utf8 from datetime import * from dateutil.relativedelta import * import calendar today = date.today() def month_between(d1, d2): dif = 0 d1 = datetime.strptime(d1.__str__(), "%Y-%m-%d") d2 = datetime.strptime(d2.__str__(), "%Y-%m-%d") if d2.year > d1.year: dif = (d2.year - d1.year) ...
[ [ 1, 0, 0.0444, 0.0222, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0667, 0.0222, 0, 0.66, 0.125, 713, 0, 1, 0, 0, 713, 0, 0 ], [ 1, 0, 0.0889, 0.0222, 0, 0...
[ "from datetime import *", "from dateutil.relativedelta import *", "import calendar", "today = date.today()", "def month_between(d1, d2):\n dif = 0\n d1 = datetime.strptime(d1.__str__(), \"%Y-%m-%d\")\n d2 = datetime.strptime(d2.__str__(), \"%Y-%m-%d\")\n\n if d2.year > d1.year:\n dif = (d...
# encoding:utf-8 from django.db import models from enderecos.models import Endereco class Empresa(models.Model): nome = models.CharField( max_length=150, null=False, blank=False, verbose_name=u"Nome da Empresa") cnpj = models.CharField( max_length=150, null=False, blank=False, ...
[ [ 1, 0, 0.087, 0.0435, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.1304, 0.0435, 0, 0.66, 0.5, 701, 0, 1, 0, 0, 701, 0, 0 ], [ 3, 0, 0.6304, 0.7826, 0, 0.66, ...
[ "from django.db import models", "from enderecos.models import Endereco", "class Empresa(models.Model):\n nome = models.CharField(\n max_length=150, null=False,\n blank=False, verbose_name=u\"Nome da Empresa\")\n cnpj = models.CharField(\n max_length=150, null=False, blank=False,\n ...
from django.test import TestCase # Create your tests here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ] ]
[ "from django.test import TestCase" ]
from django.shortcuts import render # Create your views here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 852, 0, 1, 0, 0, 852, 0, 0 ] ]
[ "from django.shortcuts import render" ]
from django.contrib import admin from models import Empresa # Register your models here. admin.site.register(Empresa)
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.5, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 8, 0, 1, 0.2, 0, 0.66, 1, 276, ...
[ "from django.contrib import admin", "from models import Empresa", "admin.site.register(Empresa)" ]
from alfredo_imoveis.enderecos import tests __all__ = ['tests']
[ [ 1, 0, 0.5, 0.5, 0, 0.66, 0, 812, 0, 1, 0, 0, 812, 0, 0 ], [ 14, 0, 1, 0.5, 0, 0.66, 1, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "from alfredo_imoveis.enderecos import tests", "__all__ = ['tests']" ]
# -*- coding: utf-8 -*- # Autor: Fabiano Weimar dos Santos (xiru) # Correcao em 20080407: Gustavo Henrique Cervi (100:"cento") => (1:"cento') # Correção em 20100311: Luiz Fernando B. Vital adicionado {0:""} ao ext[0], pois dava KeyError: 0 em números como 200, 1200, 300, etc. # Alteração em 20120123: Marcelo Araújo Po...
[ [ 1, 0, 0.1311, 0.0164, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.2213, 0.1311, 0, 0.66, 0.2, 916, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.3197, 0.0328, 0, 0.6...
[ "import sys", "ext = [{1:\"um\", 2:\"dois\", 3:\"três\", 4:\"quatro\", 5:\"cinco\", 6:\"seis\",\n7:\"sete\", 8:\"oito\", 9:\"nove\", 10:\"dez\", 11:\"onze\", 12:\"doze\",\n13:\"treze\", 14:\"quatorze\", 15:\"quinze\", 16:\"dezesseis\", \n17:\"dezessete\", 18:\"dezoito\", 19:\"dezenove\"}, {2:\"vinte\", 3:\"trinta...
# encoding:utf-8 from django.db import models from enderecos.models import Endereco, Cidade from empresas.models import Empresa TIPO_CLIENTES = ( ('L', 'LOCADOR'), ('T', 'LOCATARIO'), ('F', 'FIADOR'), ('C', 'CONJUGE'), ) TIPO_PESSOA = ( ('F', u'FÍSICA'), ('J', u'JURÍDICA'), ) ESTATO_CIVIL = (...
[ [ 1, 0, 0.027, 0.0135, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0405, 0.0135, 0, 0.66, 0.1667, 701, 0, 2, 0, 0, 701, 0, 0 ], [ 1, 0, 0.0541, 0.0135, 0, 0.6...
[ "from django.db import models", "from enderecos.models import Endereco, Cidade", "from empresas.models import Empresa", "TIPO_CLIENTES = (\n ('L', 'LOCADOR'),\n ('T', 'LOCATARIO'),\n ('F', 'FIADOR'),\n ('C', 'CONJUGE'),\n)", "TIPO_PESSOA = (\n ('F', u'FÍSICA'),\n ('J', u'JURÍDICA'),\n)", ...
from django import forms from models import Cliente class ClienteForm(forms.ModelForm): class Meta: model = Cliente exclude = ['endereco', 'endereco_comercial'] read_only = ['data_cadastro'] class ClienteFormVisualizar(forms.ModelForm): class Meta: model = Cliente exc...
[ [ 1, 0, 0.0625, 0.0625, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.125, 0.0625, 0, 0.66, 0.3333, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 3, 0, 0.4375, 0.3125, 0, 0...
[ "from django import forms", "from models import Cliente", "class ClienteForm(forms.ModelForm):\n class Meta:\n model = Cliente\n exclude = ['endereco', 'endereco_comercial']\n read_only = ['data_cadastro']", " class Meta:\n model = Cliente\n exclude = ['endereco', 'end...
from django.test import TestCase from models import Cliente from datetime import date class ClienteTestCase(TestCase): def setUp(self): Cliente.objects.create( nome="lion", naturalidade_id=1, endereco_id=1, nome_pai='Pai teste', nome_mae='Mae teste', telefone_fixo='65468', ...
[ [ 1, 0, 0.0526, 0.0526, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.1053, 0.0526, 0, 0.66, 0.3333, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 1, 0, 0.1579, 0.0526, 0, ...
[ "from django.test import TestCase", "from models import Cliente", "from datetime import date", "class ClienteTestCase(TestCase):\n\n def setUp(self):\n Cliente.objects.create(\n nome=\"lion\", naturalidade_id=1, endereco_id=1,\n nome_pai='Pai teste', nome_mae='Mae teste', telef...
from django.conf.urls import patterns, url urlpatterns = patterns( 'clientes.views', url(r'^$', 'home', name='app_clientes_home'), url(r'^novo$', 'novo', name='app_clientes_novo'), url(r'^novo_locador$', 'novo_locador', name='app_clientes_novo_locador'), url(r'^novo_locatario$', 'novo_locatario', ...
[ [ 1, 0, 0.037, 0.037, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 14, 0, 0.5556, 0.9259, 0, 0.66, 1, 990, 3, 17, 0, 0, 75, 10, 17 ] ]
[ "from django.conf.urls import patterns, url", "urlpatterns = patterns(\n 'clientes.views',\n url(r'^$', 'home', name='app_clientes_home'),\n url(r'^novo$', 'novo', name='app_clientes_novo'),\n url(r'^novo_locador$', 'novo_locador', name='app_clientes_novo_locador'),\n url(r'^novo_locatario$', 'novo...
# encoding: utf8 from django.shortcuts import render, get_object_or_404 from models import Cliente from forms import ClienteForm from enderecos.forms import EnderecoForm from datetime import datetime, date from imoveis.models import Imovel from funcionarios.models import Funcionario from alfredo_imoveis.views import bu...
[ [ 1, 0, 0.0083, 0.0041, 0, 0.66, 0, 852, 0, 2, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0124, 0.0041, 0, 0.66, 0.0323, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 1, 0, 0.0166, 0.0041, 0, ...
[ "from django.shortcuts import render, get_object_or_404", "from models import Cliente", "from forms import ClienteForm", "from enderecos.forms import EnderecoForm", "from datetime import datetime, date", "from imoveis.models import Imovel", "from funcionarios.models import Funcionario", "from alfredo_...
from django.contrib import admin from models import Cliente # Register your models here. admin.site.register(Cliente)
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.5, 0.25, 0, 0.66, 0.5, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 8, 0, 1, 0.25, 0, 0.66, 1, 27...
[ "from django.contrib import admin", "from models import Cliente", "admin.site.register(Cliente)" ]
# encoding:utf:8 __author__ = 'gpzim98' from django import forms from financeiro.models.titulo import Titulo #Read only somente após editar uma vez MUITO BOM def _get_cleaner(form, field): def clean_field(): return getattr(form.instance, field, None) return clean_field class ROFormMixin(forms.BaseFo...
[ [ 14, 0, 0.0556, 0.0278, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0833, 0.0278, 0, 0.66, 0.2, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.1111, 0.0278, 0, 0.66...
[ "__author__ = 'gpzim98'", "from django import forms", "from financeiro.models.titulo import Titulo", "def _get_cleaner(form, field):\n def clean_field():\n return getattr(form.instance, field, None)\n return clean_field", " def clean_field():\n return getattr(form.instance, field, Non...
from financeiro.forms.conta_caixa import ContaCaixaForm from financeiro.forms.titulo import TituloForm __all__ = ['ContaCaixaForm', 'TituloForm']
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 286, 0, 1, 0, 0, 286, 0, 0 ], [ 1, 0, 0.5, 0.25, 0, 0.66, 0.5, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 2...
[ "from financeiro.forms.conta_caixa import ContaCaixaForm", "from financeiro.forms.titulo import TituloForm", "__all__ = ['ContaCaixaForm', 'TituloForm']" ]
__author__ = 'gpzim98' from django import forms from financeiro.models.conta_caixa import ContaCaixa class ContaCaixaForm(forms.ModelForm): class Meta: model = ContaCaixa
[ [ 14, 0, 0.1, 0.1, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2, 0.1, 0, 0.66, 0.3333, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.6667, ...
[ "__author__ = 'gpzim98'", "from django import forms", "from financeiro.models.conta_caixa import ContaCaixa", "class ContaCaixaForm(forms.ModelForm):\n class Meta:\n model = ContaCaixa", " class Meta:\n model = ContaCaixa", " model = ContaCaixa" ]
# encoding:utf-8 from django.conf.urls import patterns, url urlpatterns = patterns( 'financeiro.views.caixa', url(r'^$', 'home', name='app_financeiro_caixa'), url(r'^filtra_titulos/$', 'filtra_titulos', name='app_financeiro_caixa_filtra_titulos'), )
[ [ 1, 0, 0.2, 0.1, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 14, 0, 0.75, 0.6, 0, 0.66, 1, 990, 3, 3, 0, 0, 75, 10, 3 ] ]
[ "from django.conf.urls import patterns, url", "urlpatterns = patterns(\n 'financeiro.views.caixa',\n url(r'^$', 'home', name='app_financeiro_caixa'),\n url(r'^filtra_titulos/$', 'filtra_titulos',\n name='app_financeiro_caixa_filtra_titulos'),\n)" ]
# encoding:utf-8 from django.conf.urls import patterns, url urlpatterns = patterns( 'financeiro.views.titulo', url(r'^$', 'home', name='app_financeiro_titulo_home'), url(r'^detalhe/(?P<id>\d+)/$', 'detalhe', name='app_financeiro_titulo_detalhe'), url(r'^editar/(?P<id>\d+)/$', 'editar', ...
[ [ 1, 0, 0.0541, 0.027, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 14, 0, 0.5541, 0.9189, 0, 0.66, 1, 990, 3, 16, 0, 0, 75, 10, 16 ] ]
[ "from django.conf.urls import patterns, url", "urlpatterns = patterns(\n 'financeiro.views.titulo',\n url(r'^$', 'home', name='app_financeiro_titulo_home'),\n url(r'^detalhe/(?P<id>\\d+)/$', 'detalhe',\n name='app_financeiro_titulo_detalhe'),\n url(r'^editar/(?P<id>\\d+)/$', 'editar',\n ...
from financeiro.urls.conta_caixa import * __all__ = ['*']
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 14, 0, 1, 0.3333, 0, 0.66, 1, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "from financeiro.urls.conta_caixa import *", "__all__ = ['*']" ]
# encoding:utf-8 from django.conf.urls import patterns, url urlpatterns = patterns( 'financeiro.views.conta_caixa', url(r'^$', 'home', name='app_financeiro_conta_caixa_home'), url(r'^detalhe/(?P<id>\d+)/$', 'detalhe', name='app_financeiro_conta_caixa_detalhe'), url(r'^editar/(?P<id>\d+)/$', 'e...
[ [ 1, 0, 0.1111, 0.0556, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 14, 0, 0.6389, 0.7778, 0, 0.66, 1, 990, 3, 8, 0, 0, 75, 10, 8 ] ]
[ "from django.conf.urls import patterns, url", "urlpatterns = patterns(\n 'financeiro.views.conta_caixa',\n url(r'^$', 'home', name='app_financeiro_conta_caixa_home'),\n url(r'^detalhe/(?P<id>\\d+)/$',\n 'detalhe', name='app_financeiro_conta_caixa_detalhe'),\n url(r'^editar/(?P<id>\\d+)/$', 'edi...
# encoding:utf-8 from django.conf.urls import patterns, include, url urlpatterns = patterns('financeiro.views.views_principal', url(r'^$', 'home', name='app_financeiro_home'), url(r'^conta_caixa/', include('financeiro.urls.conta_caixa')), url(r'^titulos/', include('financeiro.urls.titulo')), url(r'^cai...
[ [ 1, 0, 0.2, 0.1, 0, 0.66, 0, 528, 0, 3, 0, 0, 528, 0, 0 ], [ 14, 0, 0.7, 0.7, 0, 0.66, 1, 990, 3, 5, 0, 0, 75, 10, 8 ] ]
[ "from django.conf.urls import patterns, include, url", "urlpatterns = patterns('financeiro.views.views_principal',\n url(r'^$', 'home', name='app_financeiro_home'),\n url(r'^conta_caixa/', include('financeiro.urls.conta_caixa')),\n url(r'^titulos/', include('financeiro.urls.titulo')),\n url(r'^caixa/'...
from django.shortcuts import render template_home = 'financeiro/home.html' # Create your views here. def home(request): dados = {} return render(request, template_home, dados)
[ [ 1, 0, 0.125, 0.125, 0, 0.66, 0, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 14, 0, 0.375, 0.125, 0, 0.66, 0.5, 697, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.875, 0.375, 0, 0.66, ...
[ "from django.shortcuts import render", "template_home = 'financeiro/home.html'", "def home(request):\n dados = {}\n return render(request, template_home, dados)", " dados = {}", " return render(request, template_home, dados)" ]
# encoding: utf8 from django.shortcuts import render from financeiro.models.titulo import Titulo, ContaCaixa from datetime import datetime, date from django.db.models import Sum today = date.today() template_home = 'financeiro/caixa/home.html' template_relatorio = 'financeiro/caixa/relatorio.html' def contabiliza_t...
[ [ 1, 0, 0.029, 0.0145, 0, 0.66, 0, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0435, 0.0145, 0, 0.66, 0.1111, 60, 0, 2, 0, 0, 60, 0, 0 ], [ 1, 0, 0.058, 0.0145, 0, 0.66...
[ "from django.shortcuts import render", "from financeiro.models.titulo import Titulo, ContaCaixa", "from datetime import datetime, date", "from django.db.models import Sum", "today = date.today()", "template_home = 'financeiro/caixa/home.html'", "template_relatorio = 'financeiro/caixa/relatorio.html'", ...
# encoding: utf8 __author__ = 'gpzim98' from django.shortcuts import render, get_object_or_404 from financeiro.models.titulo import Titulo, Recibo from financeiro.models.conta_caixa import ContaCaixa from funcionarios.models import Funcionario from financeiro.forms.titulo import TituloForm from parametros.models import...
[ [ 14, 0, 0.008, 0.004, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.012, 0.004, 0, 0.66, 0.0263, 852, 0, 2, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0159, 0.004, 0, 0.66, ...
[ "__author__ = 'gpzim98'", "from django.shortcuts import render, get_object_or_404", "from financeiro.models.titulo import Titulo, Recibo", "from financeiro.models.conta_caixa import ContaCaixa", "from funcionarios.models import Funcionario", "from financeiro.forms.titulo import TituloForm", "from parame...
from financeiro.views import * __all__ = ['*']
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 331, 0, 1, 0, 0, 331, 0, 0 ], [ 14, 0, 1, 0.3333, 0, 0.66, 1, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "from financeiro.views import *", "__all__ = ['*']" ]
# encoding: utf8 from django.shortcuts import render, get_object_or_404 from financeiro.models.conta_caixa import ContaCaixa from funcionarios.models import Funcionario from financeiro.forms.conta_caixa import ContaCaixaForm from datetime import date today = date.today() template_home = 'financeiro/conta_caixa/home.h...
[ [ 1, 0, 0.0213, 0.0106, 0, 0.66, 0, 852, 0, 2, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0319, 0.0106, 0, 0.66, 0.0625, 48, 0, 1, 0, 0, 48, 0, 0 ], [ 1, 0, 0.0426, 0.0106, 0, 0....
[ "from django.shortcuts import render, get_object_or_404", "from financeiro.models.conta_caixa import ContaCaixa", "from funcionarios.models import Funcionario", "from financeiro.forms.conta_caixa import ContaCaixaForm", "from datetime import date", "today = date.today()", "template_home = 'financeiro/co...
from django.test import TestCase # Create your tests here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ] ]
[ "from django.test import TestCase" ]
from django.contrib import admin from financeiro.models.titulo import Titulo, Recibo # Register your models here. class TituloAdmin(admin.ModelAdmin): readonly_fields = ['usuario_cadastrou'] def save_model(self,request, obj, form, change): obj.usuario_cadastrou = request.user obj.save() admin....
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.1667, 0.0833, 0, 0.66, 0.25, 60, 0, 2, 0, 0, 60, 0, 0 ], [ 3, 0, 0.625, 0.5, 0, 0.66, ...
[ "from django.contrib import admin", "from financeiro.models.titulo import Titulo, Recibo", "class TituloAdmin(admin.ModelAdmin):\n\n readonly_fields = ['usuario_cadastrou']\n def save_model(self,request, obj, form, change):\n obj.usuario_cadastrou = request.user\n obj.save()", " readonl...
from financeiro.admin.conta_caixa import ContaCaixaAdmin from financeiro.admin.titulo import Titulo __all__ = ['ContaCaixaAdmin', 'Titulo']
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 195, 0, 1, 0, 0, 195, 0, 0 ], [ 1, 0, 0.5, 0.25, 0, 0.66, 0.5, 230, 0, 1, 0, 0, 230, 0, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 2...
[ "from financeiro.admin.conta_caixa import ContaCaixaAdmin", "from financeiro.admin.titulo import Titulo", "__all__ = ['ContaCaixaAdmin', 'Titulo']" ]
from django.contrib import admin from financeiro.models.conta_caixa import ContaCaixa # Register your models here. class ContaCaixaAdmin(admin.ModelAdmin): pass admin.site.register(ContaCaixa, ContaCaixaAdmin)
[ [ 1, 0, 0.1429, 0.1429, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.2857, 0.1429, 0, 0.66, 0.3333, 48, 0, 1, 0, 0, 48, 0, 0 ], [ 3, 0, 0.7857, 0.2857, 0, 0....
[ "from django.contrib import admin", "from financeiro.models.conta_caixa import ContaCaixa", "class ContaCaixaAdmin(admin.ModelAdmin):\n pass", "admin.site.register(ContaCaixa, ContaCaixaAdmin)" ]
n1 = input('Digite um numero') n2 = input('Digite outro numero') print(int(n1) + int(n2))
[ [ 14, 0, 0.25, 0.25, 0, 0.66, 0, 884, 3, 1, 0, 0, 930, 10, 1 ], [ 14, 0, 0.5, 0.25, 0, 0.66, 0.5, 601, 3, 1, 0, 0, 930, 10, 1 ], [ 8, 0, 1, 0.25, 0, 0.66, 1, ...
[ "n1 = input('Digite um numero')", "n2 = input('Digite outro numero')", "print(int(n1) + int(n2))" ]
# encoding: utf-8 __author__ = 'gpzim98' from django.db import models from parametros.models import ParametrosGerais from empresas.models import Empresa from financeiro.models.conta_caixa import ContaCaixa from django.contrib.auth.admin import User from clientes.models import Cliente from imoveis.models import Contrat...
[ [ 14, 0, 0.0079, 0.004, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0159, 0.004, 0, 0.66, 0.0714, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0198, 0.004, 0, 0.66, ...
[ "__author__ = 'gpzim98'", "from django.db import models", "from parametros.models import ParametrosGerais", "from empresas.models import Empresa", "from financeiro.models.conta_caixa import ContaCaixa", "from django.contrib.auth.admin import User", "from clientes.models import Cliente", "from imoveis....
from financeiro.models.conta_caixa import ContaCaixa from financeiro.models.titulo import Titulo, Recibo __all__ = ['ContaCaixa', 'Titulo', 'Recibo']
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 48, 0, 1, 0, 0, 48, 0, 0 ], [ 1, 0, 0.5, 0.25, 0, 0.66, 0.5, 60, 0, 2, 0, 0, 60, 0, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 272, ...
[ "from financeiro.models.conta_caixa import ContaCaixa", "from financeiro.models.titulo import Titulo, Recibo", "__all__ = ['ContaCaixa', 'Titulo', 'Recibo']" ]
#encoding: utf-8 __author__ = 'gpzim98' from django.db import models from empresas.models import Empresa class ContaCaixa(models.Model): descricao = models.CharField(max_length=500, null=False, blank=False) conta_caixa_superior = models.ForeignKey('self', null=True, blank=True) empresa = models.ForeignKey...
[ [ 14, 0, 0.1176, 0.0588, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2353, 0.0588, 0, 0.66, 0.3333, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.2941, 0.0588, 0, 0.6...
[ "__author__ = 'gpzim98'", "from django.db import models", "from empresas.models import Empresa", "class ContaCaixa(models.Model):\n descricao = models.CharField(max_length=500, null=False, blank=False)\n conta_caixa_superior = models.ForeignKey('self', null=True, blank=True)\n empresa = models.Foreig...
# encoding: utf8 from django.db import models from django.contrib.auth.admin import User from enderecos.models import Endereco from empresas.models import Empresa # Create your models here. class Funcionario(models.Model): nome = models.CharField('Nome do funcionário', max_length=100) rg = models.CharField(ve...
[ [ 1, 0, 0.0741, 0.037, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.1111, 0.037, 0, 0.66, 0.2, 758, 0, 1, 0, 0, 758, 0, 0 ], [ 1, 0, 0.1481, 0.037, 0, 0.66, ...
[ "from django.db import models", "from django.contrib.auth.admin import User", "from enderecos.models import Endereco", "from empresas.models import Empresa", "class Funcionario(models.Model):\n nome = models.CharField('Nome do funcionário', max_length=100)\n rg = models.CharField(verbose_name=u'RG', m...
__author__ = 'gpzim98' from django import forms from models import Funcionario class FuncionarioForm(forms.ModelForm): class Meta: model = Funcionario exclude = ['endereco',]
[ [ 14, 0, 0.125, 0.125, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.25, 0.125, 0, 0.66, 0.3333, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.375, 0.125, 0, 0.66, ...
[ "__author__ = 'gpzim98'", "from django import forms", "from models import Funcionario", "class FuncionarioForm(forms.ModelForm):\n class Meta:\n model = Funcionario\n exclude = ['endereco',]", " class Meta:\n model = Funcionario\n exclude = ['endereco',]", " model ...
from django.test import TestCase # Create your tests here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ] ]
[ "from django.test import TestCase" ]
# encoding:utf-8 from django.conf.urls import patterns, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns( 'funcionarios.views', url(r'^$', 'home', name='app_funcionarios_home'), url(r'^funcionario_adiciona/$', 'adiciona', name='app_funcionario_add'), url(r'^delete(?P<id...
[ [ 1, 0, 0.125, 0.0625, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 1, 0, 0.25, 0.0625, 0, 0.66, 0.3333, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 8, 0, 0.3125, 0.0625, 0, 0.6...
[ "from django.conf.urls import patterns, url", "from django.contrib import admin", "admin.autodiscover()", "urlpatterns = patterns(\n 'funcionarios.views',\n url(r'^$', 'home', name='app_funcionarios_home'),\n url(r'^funcionario_adiciona/$', 'adiciona', name='app_funcionario_add'),\n url(r'^delete(...
# encoding:utf8 from django.shortcuts import render, get_object_or_404 from models import Funcionario from forms import FuncionarioForm from enderecos.forms import EnderecoForm template_home = 'funcionarios/home.html' template_add = 'funcionarios/funcionario_add.html' template_detalhe = 'funcionarios/funcionario_detal...
[ [ 1, 0, 0.0202, 0.0101, 0, 0.66, 0, 852, 0, 2, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0303, 0.0101, 0, 0.66, 0.0833, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 1, 0, 0.0404, 0.0101, 0, ...
[ "from django.shortcuts import render, get_object_or_404", "from models import Funcionario", "from forms import FuncionarioForm", "from enderecos.forms import EnderecoForm", "template_home = 'funcionarios/home.html'", "template_add = 'funcionarios/funcionario_add.html'", "template_detalhe = 'funcionarios...
from django.contrib import admin from models import Funcionario # Register your models here. admin.site.register(Funcionario)
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.5, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 8, 0, 1, 0.2, 0, 0.66, 1, 276, ...
[ "from django.contrib import admin", "from models import Funcionario", "admin.site.register(Funcionario)" ]
# encoding:utf-8 from django.db import models from django.core.urlresolvers import reverse # Create your models here. class Cidade(models.Model): nome = models.CharField( max_length=150, null=False, blank=False, verbose_name='Cidade') uf = models.CharField(max_length=2, null=False, blank=False) pa...
[ [ 1, 0, 0.0308, 0.0154, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0462, 0.0154, 0, 0.66, 0.25, 749, 0, 1, 0, 0, 749, 0, 0 ], [ 3, 0, 0.2231, 0.2462, 0, 0.66...
[ "from django.db import models", "from django.core.urlresolvers import reverse", "class Cidade(models.Model):\n nome = models.CharField(\n max_length=150, null=False, blank=False, verbose_name='Cidade')\n uf = models.CharField(max_length=2, null=False, blank=False)\n pais = models.CharField(max_l...
__author__ = 'gpzim98' from django import forms from models import Endereco, Bairro, Cidade class EnderecoForm(forms.ModelForm): class Meta: model = Endereco class BairroForm(forms.ModelForm): class Meta: model = Bairro fields = ['nome', 'cidade'] readonly = ('codigo',) cla...
[ [ 14, 0, 0.05, 0.05, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1, 0.05, 0, 0.66, 0.2, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.15, 0.05, 0, 0.66, 0.4, ...
[ "__author__ = 'gpzim98'", "from django import forms", "from models import Endereco, Bairro, Cidade", "class EnderecoForm(forms.ModelForm):\n class Meta:\n model = Endereco", " class Meta:\n model = Endereco", " model = Endereco", "class BairroForm(forms.ModelForm):\n class ...
from django.test import TestCase from models import Cidade # Create your tests here. class CidadeTestCase(TestCase): def setUp(self): Cidade.objects.create(nome="Buritizeiro") def test_animals_can_speak(self): """Cliente that can speak are correctly identified""" cidade = Cidade.objec...
[ [ 1, 0, 0.0769, 0.0769, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.1538, 0.0769, 0, 0.66, 0.5, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 3, 0, 0.7308, 0.6154, 0, 0.6...
[ "from django.test import TestCase", "from models import Cidade", "class CidadeTestCase(TestCase):\n def setUp(self):\n Cidade.objects.create(nome=\"Buritizeiro\")\n\n def test_animals_can_speak(self):\n \"\"\"Cliente that can speak are correctly identified\"\"\"\n cidade = Cidade.obje...
from django.conf.urls import patterns, url from enderecos.views import CidadeList, CidadeCreate,\ CidadeUpdate, CidadeDelete, BairroDelete urlpatterns = patterns( 'enderecos.views', url(r'^bairro_home/$', 'bairro_home', name='app_enderecos_bairro_home'), url(r'^bairro_detalhe/(?P<id>\d+)/$', ...
[ [ 1, 0, 0.0303, 0.0303, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 1, 0, 0.1061, 0.0606, 0, 0.66, 0.5, 415, 0, 5, 0, 0, 415, 0, 0 ], [ 14, 0, 0.5909, 0.8485, 0, 0....
[ "from django.conf.urls import patterns, url", "from enderecos.views import CidadeList, CidadeCreate,\\\n CidadeUpdate, CidadeDelete, BairroDelete", "urlpatterns = patterns(\n 'enderecos.views',\n url(r'^bairro_home/$',\n 'bairro_home', name='app_enderecos_bairro_home'),\n url(r'^bairro_detal...
from enderecos.tests import * __all__ = ['*']
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 946, 0, 1, 0, 0, 946, 0, 0 ], [ 14, 0, 1, 0.3333, 0, 0.66, 1, 272, 0, 0, 0, 0, 0, 5, 0 ] ]
[ "from enderecos.tests import *", "__all__ = ['*']" ]
# encoding: utf-8 from django.shortcuts import render, get_object_or_404 from django.views.generic import ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.core.urlresolvers import reverse_lazy from django.contrib import messages from alfredo_imoveis.views import busca_config...
[ [ 1, 0, 0.0155, 0.0078, 0, 0.66, 0, 852, 0, 2, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0233, 0.0078, 0, 0.66, 0.0476, 201, 0, 1, 0, 0, 201, 0, 0 ], [ 1, 0, 0.031, 0.0078, 0, 0...
[ "from django.shortcuts import render, get_object_or_404", "from django.views.generic import ListView", "from django.views.generic.edit import CreateView, UpdateView, DeleteView", "from django.core.urlresolvers import reverse_lazy", "from django.contrib import messages", "from alfredo_imoveis.views import ...
from django.contrib import admin from models import Endereco, Bairro, Cidade admin.site.register(Cidade) admin.site.register(Endereco) admin.site.register(Bairro)
[ [ 1, 0, 0.1667, 0.1667, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.3333, 0.1667, 0, 0.66, 0.25, 495, 0, 3, 0, 0, 495, 0, 0 ], [ 8, 0, 0.6667, 0.1667, 0, 0....
[ "from django.contrib import admin", "from models import Endereco, Bairro, Cidade", "admin.site.register(Cidade)", "admin.site.register(Endereco)", "admin.site.register(Bairro)" ]
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "alfredo_imoveis.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
[ [ 1, 0, 0.2, 0.1, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 4, 0, 0.75, 0.6, 0, 0.66, 1, 0, ...
[ "import os", "import sys", "if __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"alfredo_imoveis.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)", " os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", ...
#!/usr/bin/env python import codecs import re import jinja2 import markdown def process_slides(): with codecs.open('../../presentation-output.html', 'w', encoding='utf8') as outfile: md = codecs.open('slides.md', encoding='utf8').read() md_slides = md.split('\n---\n') print 'Compiled %s slides.' % len(m...
[ [ 1, 0, 0.0526, 0.0175, 0, 0.66, 0, 220, 0, 1, 0, 0, 220, 0, 0 ], [ 1, 0, 0.0702, 0.0175, 0, 0.66, 0.1429, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0877, 0.0175, 0, ...
[ "import codecs", "import re", "import jinja2", "import markdown", "def process_slides():\n with codecs.open('../../presentation-output.html', 'w', encoding='utf8') as outfile:\n md = codecs.open('slides.md', encoding='utf8').read()\n md_slides = md.split('\\n---\\n')\n print('Compiled %s slides.' ...
# -*- coding:utf-8 -*- import numpy as np import time #==================================================# # Question 1 : # #==================================================# def householder_U_factor(X, Y): """ Retourne le facteur U de la matrice de householder de X vers Y,...
[ [ 1, 0, 0.0411, 0.0137, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0548, 0.0137, 0, 0.66, 0.1111, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 2, 0, 0.2055, 0.1233, 0, ...
[ "import numpy as np", "import time", "def householder_U_factor(X, Y):\n \"\"\" Retourne le facteur U de la matrice de householder de X vers Y, avec H = 1-U*U.T \"\"\"\n U = X-Y\n if np.linalg.norm(U) == 0:\n N = U.shape[0]\n return np.zeros([N,N])\n \n U = U / np.linalg.norm(U) # U ...
# -*- coding:utf-8 -*- import numpy as np import matplotlib.pyplot as mp import partie1 as p1 import random #==================================================# # Génération aléatoire de matrices bidiagonales : # #==================================================# def generate_bidiagonal_matrix(N): """Construi...
[ [ 1, 0, 0.0197, 0.0066, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0263, 0.0066, 0, 0.66, 0.0909, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 1, 0, 0.0329, 0.0066, 0, ...
[ "import numpy as np", "import matplotlib.pyplot as mp", "import partie1 as p1", "import random", "def generate_bidiagonal_matrix(N):\n \"\"\"Construit une matrice aléatoire d'entiers de taille N\"\"\"\n BD = np.zeros([N,N])\n BD[0,0] = random.randint(1,10) \n for i in np.arange(1,N):\n BD...
# Partie 2 import numpy as np import partie1 as p1 def bidiagonalisation (A): """Retourne la factorisation QR de A en utilisant la methode de Housholder""" n = A.shape[0] Qleft = np.eye(n, n) Qright = np.eye(n, n) BD = A for i in np.arange(0,n): Yv = np.zeros([n, 1])#Vecteur image ...
[ [ 1, 0, 0.0789, 0.0263, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.1053, 0.0263, 0, 0.66, 0.5, 51, 0, 1, 0, 0, 51, 0, 0 ], [ 2, 0, 0.5789, 0.8684, 0, 0.66,...
[ "import numpy as np", "import partie1 as p1", "def bidiagonalisation (A):\n \"\"\"Retourne la factorisation QR de A en utilisant la methode de Housholder\"\"\"\n n = A.shape[0]\n Qleft = np.eye(n, n)\n Qright = np.eye(n, n)\n BD = A\n for i in np.arange(0,n):\n Yv = np.zeros([n, 1])#Vec...
# -*- coding:utf-8 -*- import numpy as np import matplotlib.pyplot as mp import partie1 as p1 import partie3 as p3 import random #-----------------------------------------------------------------------------# # Test de la décomposition QR pour une matrice bidiagonale inférieur: # #---------------------------...
[ [ 1, 0, 0.0261, 0.0087, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0348, 0.0087, 0, 0.66, 0.0233, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 1, 0, 0.0435, 0.0087, 0, ...
[ "import numpy as np", "import matplotlib.pyplot as mp", "import partie1 as p1", "import partie3 as p3", "import random", "print(\"\\nTest de la décomposition QR optimisée pour une matrice A bidiagonale inférieure:\\n\")", "A = p3.generate_bidiagonal_matrix(4)", "A = A.T", "print(\"A =\")", "print(...
# -*- coding:utf-8 -*- #Partie 4 - Tests import numpy as np import matplotlib.pyplot as mp import partie2 as p2 import partie3 as p3 import partie4 as p4 import Image import time #--------------------------------------# # Test de la conservation de l'image : # #--------------------------------------# RGB = p4.ima...
[ [ 1, 0, 0.1053, 0.0175, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.1228, 0.0175, 0, 0.66, 0.0417, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 1, 0, 0.1404, 0.0175, 0, ...
[ "import numpy as np", "import matplotlib.pyplot as mp", "import partie2 as p2", "import partie3 as p3", "import partie4 as p4", "import Image", "import time", "RGB = p4.image_get_RGB(\"../img/petiteterre.png\")", "p4.RGB_to_image(RGB[0], RGB[1], RGB[2], \"../img/repro-terre.png\")", "img_name = '....
# -*- coding:utf-8 -*- #Partie 4 import numpy as np import matplotlib.pyplot as mp import partie2 as p2 import partie3 as p3 import Image import time #--------------------------------------------# # Traitements de l'image : # #--------------------------------------------# def image_get_RGB(img_na...
[ [ 1, 0, 0.0342, 0.0068, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0411, 0.0068, 0, 0.66, 0.0833, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 1, 0, 0.0479, 0.0068, 0, ...
[ "import numpy as np", "import matplotlib.pyplot as mp", "import partie2 as p2", "import partie3 as p3", "import Image", "import time", "def image_get_RGB(img_name):\n \"\"\" Retourne une liste de trois matrices (R,G,B)\"\"\"\n\n img = Image.open(img_name)\n width = img.size[0]\n height = img...
# -*- coding:utf-8 -*- import numpy as np import time import partie1 as p1 #-------------------------------# # Tests question 1 : # #-------------------------------# print "\n--------------- Question 1 ---------------" print "\nTest sur l'exemple du sujet, calcul de la matrice Householder :\n" X = np.ma...
[ [ 1, 0, 0.0204, 0.0102, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0306, 0.0102, 0, 0.66, 0.0196, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.051, 0.0102, 0, 0...
[ "import numpy as np", "import time", "import partie1 as p1", "print(\"\\n--------------- Question 1 ---------------\")", "print(\"\\nTest sur l'exemple du sujet, calcul de la matrice Householder :\\n\")", "X = np.matrix([[3.],[4.],[0.]])", "Y = np.matrix([[0.],[0.],[5.]])", "print(p1.householder_matri...
# -*- coding:utf-8 -*- import partie2 as p2 import numpy as np print "#---Tests de la partie 2---#" print print "#---Test avec une matrice predefinie---#" print A = np.matrix([[1., 2., 3.], [4., 5., 6.], [7., 8., 9.]]) (Qleft, BD, Qright) = p2.bidiagonalisation(A) print "A = " print A print print "Qleft = " print Q...
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 48, 0, 1, 0, 0, 48, 0, 0 ], [ 1, 0, 0.6667, 0.3333, 0, 0.66, 1, 954, 0, 1, 0, 0, 954, 0, 0 ] ]
[ "import partie2 as p2", "import numpy as np" ]