text:
module Fluent
  class CloudwatchLogsOutput < BufferedOutput
    Plugin.register_output('cloudwatch_logs', self)

    config_param :aws_key_id, :string, :default => nil, :secret => true
    config_param :aws_sec_key, :string, :default => nil, :secret => true
    config_param :region, :string, :default => nil
    config_param :log_group_name, :string, :default => nil
    config_param :log_stream_name, :string
    config_param :auto_create_stream, :bool, default: false
    config_param :message_keys, :string, :default => nil
    config_param :max_message_length, :integer, :default => nil
    config_param :use_tag_as_group, :bool, :default => false
    config_param :http_proxy, :string, default: nil

    MAX_EVENTS_SIZE = 1_048_576

    unless method_defined?(:log)
      define_method(:log) { $log }
    end

    def initialize
      super

      require 'aws-sdk-core'
    end

    def start
      super

      options = {}
      options[:credentials] = Aws::Credentials.new(@aws_key_id, @aws_sec_key) if @aws_key_id && @aws_sec_key
      options[:region] = @region if @region
      options[:http_proxy] = @http_proxy if @http_proxy
      @logs = Aws::CloudWatchLogs::Client.new(options)
      @sequence_tokens = {}
    end

    def format(tag, time, record)
      [tag, time, record].to_msgpack
    end

    def write(chunk)
      events = []
      chunk.enum_for(:msgpack_each).chunk {|tag, time, record|
        tag
      }.each {|tag, rs|
        group_name = @use_tag_as_group ? tag : @log_group_name

        unless log_group_exists?(group_name)
          if @auto_create_stream
            create_log_group(group_name)
          else
            log.warn "Log group '#{group_name}' dose not exists"
            next
          end
        end

        unless log_stream_exists?(group_name, @log_stream_name)
          if @auto_create_stream
            create_log_stream(group_name, @log_stream_name)
          else
            log.warn "Log stream '#{@log_stream_name}' dose not exists"
            next
          end
        end

        rs.each do |t, time, record|
          time_ms = time * 1000

          if @message_keys
            message = @message_keys.split(',').map {|k| record[k].to_s }.join(' ')
          else
            message = record.to_json
          end

          message.force_encoding('ASCII-8BIT')

          if @max_message_length
            message = message.slice(0, @max_message_length)
          end

          events << {timestamp: time_ms, message: message}
        end
        # The log events in the batch must be in chronological ordered by their timestamp.
        # http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html
        events = events.sort_by {|e| e[:timestamp] }
        put_events_by_chunk(group_name, events)
      }
    end

    private
    def next_sequence_token(group_name, stream_name)
      @sequence_tokens[group_name][stream_name]
    end

    def store_next_sequence_token(group_name, stream_name, token)
      @sequence_tokens[group_name][stream_name] = token
    end

    def put_events_by_chunk(group_name, events)
      chunk = []

      # The maximum batch size is 1,048,576 bytes, and this size is calculated as the sum of all event messages in UTF-8, plus 26 bytes for each log event.
      # http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html
      while event = events.shift
        if (chunk + [event]).inject(0) {|sum, e| sum + e[:message].length + 26 } > MAX_EVENTS_SIZE
          put_events(group_name, chunk)
          chunk = [event]
        else
          chunk << event
        end
      end

      unless chunk.empty?
        put_events(group_name, chunk)
      end
    end

    def put_events(group_name, events)
      args = {
        log_events: events,
        log_group_name: group_name,
        log_stream_name: @log_stream_name,
      }
      token = next_sequence_token(group_name, @log_stream_name)
      args[:sequence_token] = token if token

      response = @logs.put_log_events(args)
      store_next_sequence_token(group_name, @log_stream_name, response.next_sequence_token)
    end

    def create_log_group(group_name)
      begin
        @logs.create_log_group(log_group_name: group_name)
        @sequence_tokens[group_name] = {}
      rescue Aws::CloudWatchLogs::Errors::ResourceAlreadyExistsException
        log.debug "Log group '#{group_name}' already exists"
      end
    end

    def create_log_stream(group_name, stream_name)
      begin
        @logs.create_log_stream(log_group_name: group_name, log_stream_name: stream_name)
        @sequence_tokens[group_name][stream_name] = nil
      rescue Aws::CloudWatchLogs::Errors::ResourceAlreadyExistsException
        log.debug "Log stream '#{stream_name}' already exists"
      end
    end

    def log_group_exists?(group_name)
      if @sequence_tokens[group_name]
        true
      elsif @logs.describe_log_groups.log_groups.any? {|i| i.log_group_name == group_name }
        @sequence_tokens[group_name] = {}
        true
      else
        false
      end
    end

    def log_stream_exists?(group_name, stream_name)
      if not @sequence_tokens[group_name]
        false
      elsif @sequence_tokens[group_name].has_key?(stream_name)
        true
      elsif (log_stream = find_log_stream(group_name, stream_name))
        @sequence_tokens[group_name][stream_name] = log_stream.upload_sequence_token
        true
      else
        false
      end
    end

    def find_log_stream(group_name, stream_name)
      next_token = nil
      loop do
        response = @logs.describe_log_streams(log_group_name: group_name, next_token: next_token)
        if (log_stream = response.log_streams.find {|i| i.log_stream_name == stream_name })
          return log_stream
        end
        if response.next_token.nil?
          break
        end
        next_token = response.next_token
      end
      nil
    end
  end
end


No doubt during this holiday season, social gatherings with family and friends or corporate and business events filling up your calendars most women will be wearing black — you know, the safe choice! I would recommend you consider splurging on red instead. Like a red lipstick, a touch of red, will surely boost your confidence and get you noticed. In choosing a red dress, pair with a classic black heel and if you can swing it, tanned bare legs.


The 2014 Sayreville High School season at all-levels has been cancelled.
The Star-Ledger reports that superintendent Richard Labbe made the announcement Monday night. The decision came after a two hour meeting with the parents of football players.
Sayreville has won three New Jersey sectional championships in the last four years.


text:
Low Fiber Diets Wipe Out Gut Bacteria In Current & Future Generations
By Leslie Ann Berg, MSPH October 12, 2018
Low fiber diets lead to gut bacteria extinction and have lasting effects on gut microbes in current and future generations. Mice studies show that when switching to a low-fiber diet for just 7 weeks, 60% of gut bacteria species dwindle dramatically and remain low even after reintroducing a high-fiber diet. In addition, as generation after generation eats low-fiber diets, the gut bacteria in each subsequent offspring dwindle more and more, leading to species extinction. In fact, when fourth generation low-fiber mice were fed a high-fiber diet, most of the missing microbes did not return. The Atlantic
→Takeaway: "If you pass small stools, you have big hospitals," Denis Burkitt, an Irish missionary-surgeon during WWII, said as he described the differences between Uganda and America. Small stools are indicative of low fiber diets, and as Burkitt pointed out, increased disease. If you do just one thing for your health, do this: Eat. More. Fiber! Women and men should consume approximately 25 and 38 grams respectively of fiber daily. Hit this number and then some, with whole food vegetables and fruits, nuts and seeds (including quinoa), as well as gluten free whole grains such as brown rice, millet, and amaranth. Start today and never stop, for your health and the health of future generations.
BONUS: Studies show that people lose as much weight by eating more fiber alone than by following complicated diets. If you're looking to lose weight, increase your fiber intake. And don't be shy! Populations with some of the most diverse gut microbiota eat as much as 100 grams of fiber daily. A great way to begin is to track your current daily fiber intake, then increase it by 5 to 10 grams each week (and be sure to drink plenty of water to keep things moving in the bathroom!). As stated above, the best fiber comes from whole foods, so avoid packaged fiber and opt for veggies and fruits, with some nuts, seeds, and gluten-free whole grains. Annals of Internal Medicine
MicrobiomeNutritionWeight

redpajama_set_name: RedPajamaCommonCrawl


text:
Doubt cast on Palestinian agreement
More differences emerge over deal reached by Hamas and Fatah politicians in Yemen.
Hamas' Abu Marzouk, left, and Fatah's al-Ahmed signed the Sanaa declaration on Saturday [AFP]
Soon after the signing ceremony, the two sides expressed disagreement over the Sanaa declaration's meaning.
Critics said the deal appears to have little substance, with Fatah and hamas agreeing only to open talks on a number of issues.
More disagreements
Further differences in interpretations emerged on Monday between advisers of Mahmoud Abbas, the Palestinian president, and al-Ahmed, who currently heads the Fatah parliamentary bloc at the Palestinian Legislative Council.
Does the renewed violence in Gaza destroy hopes of a truce between Hamas and Israel?
Nimr Hammad, a political adviser to Abbas, accused al-Ahmed of keeping the Palestinian president's office in the dark on the declaration's contents before signing it.
But al-Ahmed told Al Jazeera that he approved the agreement in co-ordination with Abbas' office, and denied that he had exceeded his brief.
Several policy positions and statements of intents were announced by Fatah and Hamas on Sunday after the signing of the Sanaa accord.
Interviewed by Al Jazeera on Monday, Ghazi Hamad, a spokesman for Hamas, said: "If you want to talk about implementation, I think you need more discussion and details. It's not easy to come the next day and say 'OK, let us start the implementation and return to normal life'.
"[But] if I suggest that Hamas cease control of Gaza, … who will come and control the situation? Who will arrange the return of security forces? Who will be the head?
"There are many leaders of Fatah who became dissatisfied with the situation before 14 June – they complained that there was chaos and corruption."
Talks framework
Hailing the reconciliation deal, Abu Bakr al-Qurbi, the Yemeni foreign minister, said on Sunday: "Hamas and Fatah have agreed to accept the Yemeni initiative as a framework for dialogue … and a return of the Palestinian situation to what it was before the events in Gaza [last June]."
He said the initiative would also "reconfirm the unity of the Palestinian homeland in terms of its land, people and the Palestinian Authority".
The deal calls for the restructuring of Palestinian security institutions, with the armed forces expected to come under the control of the Fatah-led Palestinian Authority (PA), rather than be loyal to any faction.
Palestinian unity
Yemen's peace initiative proposes seven points for Palestinian reconciliation
• Gaza must be returned to how it was prior to the Hamas takeover last June
• Agreement to hold early elections
• Resumption of dialogue on the basis of the 2005 Cairo agreement and the Mecca agreement of 2007
• Respecting the Palestinian Law and Basic Law and adherence to it by all parties
• Reconstruction of the Palestinian security institutions
• All Palestinian institutions to be free of any factional discrimination, subject to the law and the executive authorities
The two sides also agreed to adhere to previous commitments, including those made by Palestinian factions in Cairo in 2005 and the Saudi-sponsored Mecca accord between Hamas and Fatah that led to the formation of a short-lived Palestinian unity government earlier last year.
One of the sticking points of the deal, however, is a return to the status quo before June 13 in both the Palestinian territories.
The PA insists that implementation of the accord by Hamas is not open to negotiation.
"Resumption of dialogue [with Hamas] in the future must be to implement the Yemeni initiative in all its items and not to deal with the initiative as a framework for dialogue, because this will not yield an outcome," the PA said in a statement issued after the signing on Sunday.
Nabil Abu Rudeineh, another Abbas adviser, said: "The items of the Yemeni initiative are clear and we want it for implementation, not dialogue."
Hamas, on the other hand, says the agreement is a guideline for reconciliation talks, not a pre-condition.
Abu Marzouk told Al Jazeera: "There are two things [that are] very important – that we are going to return to a normal situation in Gaza and the West Bank, [and] the second one, that we consider the sticking points in the Yemeni initiative as the agenda of the negotiations."
Fatah says the agreement stipulates that Hamas must return control of Gaza to the PA, but has so far shown unwillingness to make changes in the West Bank.
Yemen pushes for Palestinian unity
Hamas and Fatah agree to continue with peace negotiations despite differences.
Egypt to supply electricity to Gaza
Reported plans set to end Gazans reliance on power supplies from Israel.
Palestinian leaders visit Yemen
Representatives from Hamas and PLO delegations arrive in Yemen to discuss Palestinian peace talks
In Pictures: Troops, riot fencing and razor wire in Washington DC
Should sporting events carry on during COVID lockdowns?


We are your one-stop-shop! Stop in and see our wide variety of national brands and private label goods.
Our aisles are filled with much more than just food goods.
Here are just a few of the things we carry.
Health and beauty items such as: shampoos and conditioners, toothpaste, deodorants, hair dyes, and much more.
Can't find what you're looking for? Let us know and we'll try to find it for you.


text:
Mensor Calibration Blog
Flow Meters that use Pressure Sensors to Derive Measurement
Larry Mock
Flow meters come in many types: some measure the volume of liquid or gas flowing in a pipe (volumetric flow meter); some measure the mass flowing in a pipe (mass flow meter).
Mass flow is measured in units of mass per unit time, using pounds or kilograms per second. Volumetric flow is measured in volume per unit time, in units like gallons or liters per second. The relationship between volumetric and mass flow in a pipe becomes apparent when looking at the equation used to calculate each:
Q = A * v and W = ρ * Q
Where Q = the flowing volume, A = the cross-sectional area of the pipe, v = the velocity of the fluid in the pipe, W = the mass flow rate, and ρ = the fluid density.
Whether it is volumetric or mass flow, there are many different types of meters that are used for measurement. This post will concentrate on flow meters that infer their measurement from pressure: Orifice Plates, Venturi, Nozzles, and Averaging Pitot Tubes.
All derive the flow using differential pressure. Essentially, each one creates an obstruction in the flow and the difference in pressure between the upstream side of the obstruction and the downstream side is proportional to the volumetric flow. To obtain mass flow in any of these, the density of the fluid must also be known.
A Sonic Nozzle, also called the Critical Flow Venturi or Critical Flow Nozzle, is used with gas only. This type has a distinct advantage over the others due to their unique operating principle, which only requires one pressure reading to infer the flow. This may seem trivial, but when using differential pressure you either need two pressure transducers or a differential pressure transducer. Either way, there is more error associated with these as opposed to a single transducer. For this reason, sonic nozzles are used in gas flow calibrators because of their higher accuracy.
Depending on the accuracy required and the suitability of the application, one type of flow meter may be better than another. The pressure sensing element should be accurate enough to provide the level of accuracy in flow that is required and have a sufficient response rate to measure rapid changes in fluid flow. There are many other methods of measuring flow beyond the scope of this article, including Positive Displacement Meters, Turbine Meters, Coriolis Meters and Thermal Flow Meters.
Some of the more prevalent flow meters using pressure or differential pressure to infer volumetric or mass flow are described below.
Orifice Plates determine flow by measuring the difference between the upstream pressure and the downstream pressure. This is usually accomplished using a differential pressure transmitter.
Venturi Meters take advantage of the physical properties that a restriction in a pipe will cause an increase in velocity and a reduction in pressure, according to the law of conservation of mechanical energy. This reduction in pressure is proportional to the volumetric flow rate.
A Nozzle is similar to a Venturi but is typically designed to fit between two flanges and doesn't have a tapered exit. The same principal of differential pressure is used to infer flow rate.
An Averaging Pitot Tube is a tube with multiple holes facing upstream and downstream. The tube has an inner wall that separates the upstream holes from the downstream holes. The tube extends across the diameter of the pipe where the flow is being measured. The upstream holes enter into a plenum where the impact pressure is averaged. A separate plenum on the downstream side averages the pressures from the downstream side of the tube. In a flowing condition, the upstream holes experience a higher pressure than the downstream holes and the difference is proportional to flow.
At the throat of a Sonic Nozzle, or minimum area point, the gas velocity reaches the speed of sound. At this point, gas velocity and density are maximized, and the mass flow rate is a function of the inlet pressure, inlet temperature, and the type of gas. These can achieve a higher degree of accuracy when compared to meters that require a differential pressure because they only require a single pressure measurement to infer the flow.
The flow rate in all these meters is derived from Bernoulli's equation, which states that an increase in the speed of a fluid occurs simultaneously with a decrease in static pressure.
P+½ρV2+ρgh=Constant
Where P = Pressure, ρ = Density, V = Velocity, g= Gravity, and h = height.
If the height and gravity is the system remains constant, we can simplify this equation to:
P+½ρV2=Constant
Now we can see that when the velocity increases in a restriction, the pressure must decrease.
Because these meters derive the flow measurement from pressure readings, the more accurate the pressure instrument, the more accurate the flow reading. Direct measurement with high accuracy pressure transmitters that match the level of accuracy required is recommended, and regular calibration of these transmitters is necessary to maintain the level of accuracy needed.
The Fundamentals of Pressure Calibration
Calibration Applications as Part of Every Day Life
Custody Transfer in Gas Pipelines
Calibration Terms: Differences in Sensor, Transducer, Transmitter
tag Pressure Learning


The Food and Craft Marquee is the place to find artists and crafts people as well as a wide selection of fine gourmet food specialists offering tasty samples of their culinary delights and product demonstrations. It is an ideal place to browse.
Hand stamped Aluminium, enamelled slate and felted homewares and accessories. Bespoke orders taken.
A community of friends who make beautiful, high quality, hand crafted gifts, home and dog items. Many are made from repurposed, recycled or upcycled materials.
Capturing the sun in brilliant colours, our handcrafted strained glass portholes, suncatchers and ornaments range from £5. Commissions taken, Facebook, Instagram, Youtube, Cut Glass Gallery.
Premium quality kitchen knives, blocks chopping, boards and sharpeners.
Handmade exotic flower arrangements and flowery hair accessories. The flowers are made from a range of materials, the results ranging from impressionist to flowers indistinguishable from the real thing.
Handmade, reusable beeswax food wraps and bags. Keep food fresher for longer, save valuable space in the galley and help save the planet and the oceans from single use plastic.
Living on a canal boat inspired me to create beautiful wildlife paintings in acrylic ink. Original paintings, prints, cards, coasters and cushions available. Pet portrait commissions taken.
Beautiful sterling silver jewellery, up-cycled from silver antique cutlery. Hand braided chokers, ankle bracelets and other items all handmade.
Handpicked stunning sliver jewellery . All hallmarked 925 silver at affordable prices.
The Diablo toasted snack maker for use on gas, electric, ceramic and halogen hobs. Also on AGAs, BBQs, camp fires, wood burners and camp stoves.
Magnetic health bracelets in copper, stainless steel and titanium.
Selling a selection of flavoured gin and vodka and rum liqueurs, vegan friendly, natural ingredients, small batches, sample tasters and a range of narrowboat rope fenders.
We're here to shout about our great crafted cider from unsprayed British orchards.
My company was established in 2006, we sell hand made gluten free fudge, Turkish delight and giant cables.
Studio ceramic, both practical and/or decorative, linocut relief prints and mixed media paintings.
Lovely ladies one sized fashion Italian clothing made with a mix of fabrics including cotton, linen and silk.
Exclusive range of ladies essentials.
Wooden Ducks, in dress and Querky outfits. All very different pray anything you will have seen. Designed and made by myself. Each one very different.
Artisan silver jewellery. Designed, handcrafted and stamped silver by Steph Davies of Scruffy Dog Silver. Made in Northampton.
Predominantly hand made sterling silver jewellery. Delightfully different.
We produce a variety of award winning waxed truckle cheeses with a trio of chutney to accompany.
As a member of Utility Warehouse you will save � � Single supplier for all your utilities � Award winning customer service � Value that's unbeatable � Easy to switch.
iCandy fudge, a smooth, creamy melt in the mouth sensation. Made using the best quality ingredients. Wheat and gluten free, 30 mouth watering flavours. MAKING LIFE TASTE SWEETER.


Astigmatism is one of the most common vision conditions; most people have some form of astigmatism. Astigmatism can be caused by an irregular shaped cornea or curvature of the lens, and can lead to blurred vision. Our examinations test for astigmatism using a phoropter and retinoscope, which measure refraction. Depending on the amount of astigmatism, we can provide eyeglasses or contact lenses to help correct your condition.