Write the points in Riemann.
173461
def export(self, name, columns, points):
        """"""
        for i in range(len(columns)):
            if not isinstance(points[i], Number):
                continue
            else:
                data = {'host': self.hostname, 'service': name + " " + columns[i], 'metric': points[i]}
                logger.debug(data)
                try:
                    self.client.send(data)
                except Exception as e:
                    logger.error("Cannot export stats to Riemann (%s)" % e)
906182
def write_lines(self, lines, level=0):
        """"""

        for line in lines:
            self.write_line(line, level)
583464
void writeSlot(int position, int w0, int w1, int w2, int w3)
  {
      position *= slotsize;
      int chunkpos = position >> lowbits;
      int slotpos = (position & lowmask);

    // Grow if needed
    if (chunkpos > chunks.size() - 1)
      chunks.addElement(new int[chunkalloc]);
    int[] chunk = chunks.elementAt(chunkpos);
    chunk[slotpos] = w0;
    chunk[slotpos + 1] = w1;
    chunk[slotpos + 2] = w2;
    chunk[slotpos + 3] = w3;
  }
5288
def floor(self):
    """"""
    return Point(int(math.floor(self.x)), int(math.floor(self.y)))
1034066
def set_points(self, pt1, pt2):
        """"""
        (x1, y1) = pt1.as_tuple()
        (x2, y2) = pt2.as_tuple()
        self.left = min(x1, x2)
        self.top = min(y1, y2)
        self.right = max(x1, x2)
        self.bottom = max(y1, y2)
476799
public void renderLinesImpl(float[] points, int count, float w) {
		float width = w / 2;
		
		float lastx1 = 0;
		float lasty1 = 0;
		float lastx2 = 0;
		float lasty2 = 0;

		GL.glBegin(SGL.GL_QUADS);
		for (int i=0;i<count+1;i++) {
			int current = i;
			int next = i+1;
			int prev = i-1;
			if (prev < 0) {
				prev += count;
			}
			if (next >= count) {
				next -= count;
			}
			if (current >= count) {
				current -= count;
			}

			float x1 = points[(current*2)];
			float y1 = points[(current*2)+1];
			float x2 = points[(next*2)];
			float y2 = points[(next*2)+1];
			
			// draw the next segment
			float dx = x2 - x1;
			float dy = y2 - y1;

			if ((dx == 0) && (dy == 0)) {
				continue;
			}
			
			float d2 = (dx*dx)+(dy*dy);
			float d = (float) Math.sqrt(d2);
			dx *= width;
			dy *= width;
			dx /= d;
			dy /= d;
			
			float tx = dy;
			float ty = -dx;

			if (i != 0) {
				bindColor(prev);
				GL.glVertex3f(lastx1,lasty1,0);
				GL.glVertex3f(lastx2,lasty2,0);
				bindColor(current);
				GL.glVertex3f(x1+tx,y1+ty,0);
				GL.glVertex3f(x1-tx,y1-ty,0);
			}
			
			lastx1 = x2-tx;
			lasty1 = y2-ty;
			lastx2 = x2+tx;
			lasty2 = y2+ty;
			
			if (i < count-1) {
				bindColor(current);
				GL.glVertex3f(x1+tx,y1+ty,0);
				GL.glVertex3f(x1-tx,y1-ty,0);
				bindColor(next);
				GL.glVertex3f(x2-tx,y2-ty,0);
				GL.glVertex3f(x2+tx,y2+ty,0);
			}
		}
		
		GL.glEnd();
		
		float step = width <= 12.5f ?  5 : 180 / (float)Math.ceil(width / 2.5); 
		
		// start cap
		if (lineCaps) {
			float dx = points[2] - points[0];
			float dy = points[3] - points[1];
			float fang = (float) Math.toDegrees(Math.atan2(dy,dx)) + 90;
			
			if ((dx != 0) || (dy != 0)) {
				GL.glBegin(SGL.GL_TRIANGLE_FAN);
				bindColor(0);
				GL.glVertex2f(points[0], points[1]);
				for (int i=0;i<180+step;i+=step) {
					float ang = (float) Math.toRadians(fang+i);
					GL.glVertex2f(points[0]+((float) (Math.cos(ang) * width)), 
								  points[1]+((float) (Math.sin(ang) * width)));
				}
				GL.glEnd();
			}
		}
		
		// end cap
		if (lineCaps) {
			float dx = points[(count*2)-2] - points[(count*2)-4];
			float dy = points[(count*2)-1] - points[(count*2)-3];
			float fang = (float) Math.toDegrees(Math.atan2(dy,dx)) - 90;
			
			if ((dx != 0) || (dy != 0)) {
				GL.glBegin(SGL.GL_TRIANGLE_FAN);
				bindColor(count-1);
				GL.glVertex2f(points[(count*2)-2], points[(count*2)-1]);
				for (int i=0;i<180+step;i+=step) {
					float ang = (float) Math.toRadians(fang+i);
					GL.glVertex2f(points[(count*2)-2]+((float) (Math.cos(ang) * width)), 
								  points[(count*2)-1]+((float) (Math.sin(ang) * width)));
				}
				GL.glEnd();
			}
		}
	}
38377
def pointz(self, x, y, z=0, m=None):
        """"""
        shapeType = POINTZ
        pointShape = Shape(shapeType)
        pointShape.points.append([x, y, z, m])
        self.shape(pointShape)
193327
def points(self):
        ''''''
        # add all points in a section except the first one, which is a duplicate
        _pts = [v for s in self.root_node.ipreorder()
                for v in s.points[1:, COLS.XYZR]]
        # except for the very first point, which is not a duplicate
        _pts.insert(0, self.root_node.points[0][COLS.XYZR])
        return np.array(_pts)
1044384
def points(self):
        
        # Get grid dimensions
        nx, ny, nz = self.dimensions
        nx -= 1
        ny -= 1
        nz -= 1
        # get the points and convert to spacings
        dx, dy, dz = self.spacing
        # Now make the cell arrays
        ox, oy, oz = self.origin
        x = np.insert(np.cumsum(np.full(nx, dx)), 0, 0.0) + ox
        y = np.insert(np.cumsum(np.full(ny, dy)), 0, 0.0) + oy
        z = np.insert(np.cumsum(np.full(nz, dz)), 0, 0.0) + oz
        xx, yy, zz = np.meshgrid(x,y,z, indexing='ij')
        return np.c_[xx.ravel(), yy.ravel(), zz.ravel()]
966548
def write_d_pt(points = nil)
      return unless ptrue?(points)

      index = -1
      points.each do |point|
        index += 1
        next unless ptrue?(point)

        write_d_pt_point(index, point)
      end
    end
140967
def multipointz(self, points):
        """"""
        shapeType = MULTIPOINTZ
        points = [points] # nest the points inside a list to be compatible with the generic shapeparts method
        self._shapeparts(parts=points, shapeType=shapeType)
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()
276791
def write(self, fp, space_around_delimiters=True):
        
        if space_around_delimiters:
            d = " {0} ".format(self._delimiters[0])
        else:
            d = self._delimiters[0]
        if self._defaults:
            self._write_section(fp, self.default_section,
                                    self._defaults.items(), d)
        for section in self._sections:
            self._write_section(fp, section,
                                self._sections[section].items(), d)
971462
def write_ser(series) # :nodoc:
      @writer.tag_elements('c:ser') do
        write_ser_base(series) do
          write_c_invert_if_negative(series.invert_if_negative)
        end
        # Write the c:cat element.
        write_cat(series)
        # Write the c:val element.
        write_val(series)
        # Write the c:smooth element.
        write_c_smooth(series.smooth) if ptrue?(@smooth_allowed)
      end
      @series_index += 1
    end
1173897
def _syscal_write_quadpoles(fid, quadpoles):
    
    fid.write('# A B M N\n')
    for nr, quadpole in enumerate(quadpoles):
        fid.write(
            '{0} {1} {2} {3} {4}\n'.format(
                nr, quadpole[0], quadpole[1], quadpole[2], quadpole[3]))
453467
def writelines(self, lines, level=0):
        """"""
        for line in lines:
            for line in line.rstrip(u'\n').split(u'\n'):
                self.write(line.rstrip(u'\n'), level=level)
242436
function writePalette() {
    out.writeBytes(colorTab);
    var n = (3 * 256) - colorTab.length;
    for (var i = 0; i < n; i++) out.writeByte(0);
  }