Calls drawcircle and writelable for an list of stars.
        Provide a list of dictionnaries, where each dictionnary contains "name", "x", and "y".
13535
def drawstarslist(self, dictlist, r = 10, colour = None):
        
        
        self.checkforpilimage()
        colour = self.defaultcolour(colour)
        self.changecolourmode(colour)
        self.makedraw()
        
        
        for star in dictlist:
            self.drawcircle(star["x"], star["y"], r = r, colour = colour, label = star["name"])
            #self.writelabel(star["x"], star["y"], star["name"], r = r, colour = colour)
        
        if self.verbose :
            print "I've drawn %i stars." % len(dictlist)
107245
def emit_nicknames(self):
        
        nicknames = [{"nickname": name, "color": color(name)}
                     for name in sorted(self.nicknames.keys())]
        self.namespace.emit("nicknames", nicknames)
1023906
def drawPolyline(self, points):
        
        for i, p in enumerate(points):
            if i == 0:
                if not (self.lastPoint == Point(p)):
                    self.draw_cont += "%g %g m\n" % JM_TUPLE(Point(p) * self.ipctm)
                    self.lastPoint = Point(p)
            else:
                self.draw_cont += "%g %g l\n" % JM_TUPLE(Point(p) * self.ipctm)
            self.updateRect(p)

        self.lastPoint = Point(points[-1])
        return self.lastPoint
1121462
def get_stars(self):
        
        l = re.findall(r"[\w']+", self.get_value())
        # now search for indices of star and take the next entry from this flat list
        return [l[i+1] for i,s in enumerate(l) if s=='star']
1225007
function drawAxisLabels() {
            if (yAxisLabel) {
                if (yAxisLabelEl) {
                    yAxisLabelEl.remove();
                }
                yAxisLabelEl = svg.select('.y-axis-label')
                  .append('text')
                    .classed('y-axis-label-text', true)
                    .attr('x', -chartHeight / 2)
                    .attr('y', yAxisLabelOffset)
                    .attr('text-anchor', 'middle')
                    .attr('transform', 'rotate(270 0 0)')
                    .text(yAxisLabel);
            }

            if (xAxisLabel) {
                if (xAxisLabelEl) {
                    xAxisLabelEl.remove();
                }
                xAxisLabelEl = svg.select('.x-axis-label')
                  .append('text')
                    .attr('y', xAxisLabelOffset)
                    .attr('text-anchor', 'middle')
                    .classed('x-axis-label-text', true)
                    .attr('x', chartWidth / 2)
                    .text(xAxisLabel);
            }
        }
193496
def draw(self, pen, filterRedundantPoints=False):
        """"""
        from fontTools.pens.pointPen import PointToSegmentPen
        pointPen = PointToSegmentPen(pen)
        self.drawPoints(pointPen, filterRedundantPoints=filterRedundantPoints)
1265408
def detect_circle(nodes):
    
    # Verify nodes and traveled types
    if not isinstance(nodes, dict):
        raise TypeError('"nodes" must be a dictionary')

    dependencies = set(nodes.keys())
    traveled = []

    heads = _detect_circle(nodes, dependencies, traveled)

    return DependencyTree(heads)
254807
def drawPoints(self, pointPen, filterRedundantPoints=False):
        """"""
        if filterRedundantPoints:
            pointPen = FilterRedundantPointPen(pointPen)
        for contour in self.contours:
            pointPen.beginPath(identifier=contour["identifier"])
            for segmentType, pt, smooth, name, identifier in contour["points"]:
                pointPen.addPoint(pt=pt, segmentType=segmentType, smooth=smooth, name=name, identifier=identifier)
            pointPen.endPath()
        for component in self.components:
            pointPen.addComponent(component["baseGlyph"], component["transformation"], identifier=component["identifier"])
156267
def search_star(star):
    '''
    
    '''

    base_url = "http://star-api.herokuapp.com/api/v1/stars/"

    if not isinstance(star, str):
        raise ValueError("The star arg you provided is not the type of str")
    else:
        base_url += star

    return dispatch_http_get(base_url)
380009
def draw_categories(self):
        """"""
        for label in self._category_labels.values():
            label.destroy()
        self._category_labels.clear()
        canvas_width = 0
        for category in (sorted(self._categories.keys() if isinstance(self._categories, dict) else self._categories)
                         if not isinstance(self._categories, OrderedDict)
                         else self._categories):
            kwargs = self._categories[category] if isinstance(self._categories, dict) else {"text": category}
            kwargs["background"] = kwargs.get("background", self._background)
            kwargs["justify"] = kwargs.get("justify", tk.LEFT)
            label = ttk.Label(self._frame_categories, **kwargs)
            width = label.winfo_reqwidth()
            canvas_width = width if width > canvas_width else canvas_width
            self._category_labels[category] = label
        self._canvas_categories.create_window(0, 0, window=self._frame_categories, anchor=tk.NW)
        self._canvas_categories.config(width=canvas_width + 5, height=self._height)
225236
def draw_objects(self, objects, bounds, img):
        ''''''
        keys = objects.keys()
        keys.sort()
        for k in keys:
            obj = objects[k]
            bounds2 = obj.bounds()
            if bounds2 is None or mp_util.bounds_overlap(bounds, bounds2):
                obj.draw(img, self.pixmapper, bounds)
749994
def draw_line(
            self, x0:float, y0:float, x1:float, y1:float, *,
            stroke:Color,
            stroke_width:float=1,
            stroke_dash:typing.Sequence=None
            ) -> None:
        """"""
        pass
456105
function() {

            var self = this;
            var $element = $(this.element);

            // save this id attribute.
            self.attrId = $element.attr('id');

            //process the JSON data.
            // get the circle data from the data source.
            // check if the data source has different format.
            self.circleData = "data" in self.jsonData ?
                self.jsonData.data : self.jsonData;
            // the attributes in jsonData will overwrite options.
            if('attributes' in self.jsonData) {

                // the values in attributes will overwrite 
                // the same key in options. and the result will
                // store in options.
                $.extend(self.options, self.jsonData.attributes);
            }

            // draw circles.
            self.drawCircles();
        }
446553
private void drawDayNames() {
		int firstDayOfWeek = calendar.getFirstDayOfWeek();
		DateFormatSymbols dateFormatSymbols = new DateFormatSymbols(locale);
		dayNames = dateFormatSymbols.getShortWeekdays();

		int day = firstDayOfWeek;

		for (int i = 0; i < 7; i++) {
			if (maxDayCharacters > 0 && maxDayCharacters < 5) {
				if (dayNames[day].length() >= maxDayCharacters) {
					dayNames[day] = dayNames[day]
							.substring(0, maxDayCharacters);
				}
			}

			days[i].setText(dayNames[day]);

			if (day == 1) {
				days[i].setForeground(sundayForeground);
			} else {
				days[i].setForeground(weekdayForeground);
			}

			if (day < 7) {
				day++;
			} else {
				day -= 6;
			}
		}
	}
171496
def select_star_cb(self, widget, res_dict):
        
        keys = list(res_dict.keys())
        if len(keys) == 0:
            self.selected = []
            self.replot_stars()
        else:
            idx = int(keys[0])
            star = self.starlist[idx]
            if not self._select_flag:
                self.mark_selection(star, fromtable=True)
        return True
1282554
def draw_plot(self, metrics, labels=None, ylabel=""):
        
        metrics = metrics if isinstance(metrics, list) else [metrics]
        # Loop through metrics
        title = ""
        for i, m in enumerate(metrics):
            label = labels[i] if labels else m.name
            # TODO: use a standard formating function for values
            title += ("   " if title else "") + "{}: {}".format(label, m.data[-1])
            self.ax.plot(m.formatted_steps, m.data, label=label)
        self.ax.set_title(title)
        self.ax.set_ylabel(ylabel)
        self.ax.legend()
        self.ax.set_xlabel("Steps")
        self.ax.xaxis.set_major_locator(plt.AutoLocator())
154241
def drawPoints(points, bg=','):
    """"""

    # Note: I set bg to ',' instead of '.' because using ... in the docstrings
    # confuses doctest and makes it think it's Python's secondary ... prompt,
    # causing doctest errors.
    import sys
    points = list(points)
    try:
        points = [(int(x), int(y)) for x, y in points]
    except:
        raise PyBresenhamException('points must only contains (x, y) numeric tuples')

    # Calculate size of the character grid from the given points.
    minx = min([x for x, y in points])
    maxx = max([x for x, y in points])
    miny = min([y for x, y in points])
    maxy = max([y for x, y in points])

    charGrid = [[' '] * (maxy - miny + 1) for i in range(maxx - minx + 1)]

    # Draw O characters to the grid at the given points.
    for x, y in points:
        charGrid[x - minx][y - miny] = 'O'

    # Print out the character grid.
    for y in range(len(charGrid[0])):
        for x in range(len(charGrid)):
            if charGrid[x][y] in (None, ' '):
                charToDraw = bg
            else:
                charToDraw = charGrid[x][y]
            sys.stdout.write(charToDraw)
        print()