Skip to content

Instantly share code, notes, and snippets.

Umur Gedik umurgdk

Block or report user

Report or block umurgdk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gitlike.go
package main
import (
pub fn run(conn: PooledConnection) -> Result<(), Box<Error>> {
let tweets = get_tweets()?;
let cells = tweets.into_iter()
.filter_map(|tweet| tweet.coordinates)
.filter_map(|(latitude, longitude)| {
let cell_result = Cell::find_containing_core(&*conn, &Point::new(longitude, latitude, Some(4326))).ok();
cell_result.and_then(|cell| cell).map(|mut cell| {
cell.sns += 1;
umurgdk /
Last active Aug 6, 2017 — forked from anonymous/
Rust code shared from the playground
use std::borrow::Cow;
use std::fmt::Debug;
use specs::Entity;
use Tile;
use TileRef;
use TileRefMut;
use TileMap;
pub struct TileRefMut<'a, T: Tile + 'a> {
pub tile: &'a mut T,
pub x: usize,
pub y: usize
pub struct IterMut<'a, T: Tile + 'a> {
tile_map: &'a mut TileMap<T>,
x: usize,
y: usize
extern crate cgmath;
extern crate specs;
extern crate gfx;
extern crate gfx_window_glutin;
extern crate glutin;
// Logging
for event in {
match event {
Event::Quit { .. } => self.running = false,
event => self.input.update(&, event)
use std::prelude::v1::*;
extern crate std as std;
extern crate slave;
#![feature(quote, plugin_registrar, rustc_private)]
extern crate slave;
extern crate proc_macro;
extern crate rustc_plugin;
extern crate syntax;
use rustc_plugin::Registry;
struct StatsWorker;
impl StatsWorker {
fn write(&mut self) {
// Write some data to redis
pub mod container;
pub mod stack_view;
pub mod label;
pub use self::container::Container;
pub use self::stack_view::StackView;
pub use self::label::Label;
use ui::geom::*;
use ui::renderer::Renderer;
You can’t perform that action at this time.