I hereby claim:
- I am neektza on github.
- I am neektza (https://keybase.io/neektza) on keybase.
- I have a public key ASBDOcHyuoglZkeVPpKbtfvCtlkSmyT71k32VEBHpJCs9go
To claim this, I am signing this object:
use std::env; | |
use std::fs::File; | |
use std::path::Path; | |
use std::io::BufReader; | |
use std::io::prelude::*; | |
use std::collections::HashMap; | |
use std::error::Error; | |
extern crate rand; | |
use rand::{thread_rng, Rng}; |
defmodule MessageSpammer.Connector do | |
use Supervisor | |
def start_link do | |
Supervisor.start_link(__MODULE__, []) | |
end | |
def init(_) do | |
IO.puts "Starting Connector" | |
use std::{env, io, fs}; | |
use std::io::prelude::*; | |
use std::io::{BufReader, Lines, StdinLock}; | |
use std::fs::File; | |
enum Input<'a> { | |
Console(std::io::StdinLock<'a>), | |
File(std::io::BufReader<std::fs::File>) | |
} |
I hereby claim:
To claim this, I am signing this object:
class SomeServiceObject | |
def initialize(foo) | |
@foo = foo | |
end | |
def a_method | |
manipulate(foo) | |
end | |
end |
module Meetup.Types.Event where | |
import Data.Text | |
import Data.Aeson | |
import Control.Applicative ((<$>), (<*>)) | |
import Control.Monad (mzero) | |
import Data.ByteString.Lazy | |
data Event = Event { name :: Text | |
, created :: Int |
class AddOneTask | |
@@total = 0 | |
def initialize | |
puts "Scheduling task" | |
@performed = false | |
end | |
def performed? | |
@performed | |
end | |
def perform |
require 'thread' | |
require_relative 'add_one_task' | |
scheduled = []; performed = []; producers = []; consumers = [] | |
5.times do | |
producers << Thread.new do | |
scheduled.push AddOneTask.new | |
end | |
end | |
5.times do | |
consumers << Thread.new do |
require 'fiber' | |
require_relative 'add_one_task' | |
scheduled = []; performed = [] | |
consumers = []; scheduler = nil | |
producer = Fiber.new do | |
5.times do | |
scheduled.push AddOneTask.new | |
scheduler.transfer | |
end | |
end |