text:
from thrift.Thrift import TType, TMessageType, TException, TApplicationException

from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
  from thrift.protocol import fastbinary
except:
  fastbinary = None

class MyEnum:
  LLAMA = 1
  ALPACA = 2

  _VALUES_TO_NAMES = {
    1: "LLAMA",
    2: "ALPACA",
  }

  _NAMES_TO_VALUES = {
    "LLAMA": 1,
    "ALPACA": 2,
  }

class MiniStruct:
  """
  Attributes:
   - my_string
   - my_enum
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'my_string', None, None, ), # 1
    (2, TType.I32, 'my_enum', None, None, ), # 2
  )

  def __init__(self, my_string=None, my_enum=None,):
    self.my_string = my_string
    self.my_enum = my_enum

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRING:
          self.my_string = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.my_enum = iprot.readI32()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('MiniStruct')
    if self.my_string is not None:
      oprot.writeFieldBegin('my_string', TType.STRING, 1)
      oprot.writeString(self.my_string)
      oprot.writeFieldEnd()
    if self.my_enum is not None:
      oprot.writeFieldBegin('my_enum', TType.I32, 2)
      oprot.writeI32(self.my_enum)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return

  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.my_string)
    value = (value * 31) ^ hash(self.my_enum)
    return value

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class MegaStruct:
  """
  Attributes:
   - my_bool
   - my_byte
   - my_16bit_int
   - my_32bit_int
   - my_64bit_int
   - my_double
   - my_string
   - my_binary
   - my_string_string_map
   - my_string_enum_map
   - my_enum_string_map
   - my_enum_struct_map
   - my_enum_stringlist_map
   - my_enum_structlist_map
   - my_stringlist
   - my_structlist
   - my_enumlist
   - my_stringset
   - my_enumset
   - my_structset
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'my_bool', None, None, ), # 1
    (2, TType.BYTE, 'my_byte', None, None, ), # 2
    (3, TType.I16, 'my_16bit_int', None, None, ), # 3
    (4, TType.I32, 'my_32bit_int', None, None, ), # 4
    (5, TType.I64, 'my_64bit_int', None, None, ), # 5
    (6, TType.DOUBLE, 'my_double', None, None, ), # 6
    (7, TType.STRING, 'my_string', None, None, ), # 7
    (8, TType.STRING, 'my_binary', None, None, ), # 8
    (9, TType.MAP, 'my_string_string_map', (TType.STRING,None,TType.STRING,None), None, ), # 9
    (10, TType.MAP, 'my_string_enum_map', (TType.STRING,None,TType.I32,None), None, ), # 10
    (11, TType.MAP, 'my_enum_string_map', (TType.I32,None,TType.STRING,None), None, ), # 11
    (12, TType.MAP, 'my_enum_struct_map', (TType.I32,None,TType.STRUCT,(MiniStruct, MiniStruct.thrift_spec)), None, ), # 12
    (13, TType.MAP, 'my_enum_stringlist_map', (TType.I32,None,TType.LIST,(TType.STRING,None)), None, ), # 13
    (14, TType.MAP, 'my_enum_structlist_map', (TType.I32,None,TType.LIST,(TType.STRUCT,(MiniStruct, MiniStruct.thrift_spec))), None, ), # 14
    (15, TType.LIST, 'my_stringlist', (TType.STRING,None), None, ), # 15
    (16, TType.LIST, 'my_structlist', (TType.STRUCT,(MiniStruct, MiniStruct.thrift_spec)), None, ), # 16
    (17, TType.LIST, 'my_enumlist', (TType.I32,None), None, ), # 17
    (18, TType.SET, 'my_stringset', (TType.STRING,None), None, ), # 18
    (19, TType.SET, 'my_enumset', (TType.I32,None), None, ), # 19
    (20, TType.SET, 'my_structset', (TType.STRUCT,(MiniStruct, MiniStruct.thrift_spec)), None, ), # 20
  )

  def __init__(self, my_bool=None, my_byte=None, my_16bit_int=None, my_32bit_int=None, my_64bit_int=None, my_double=None, my_string=None, my_binary=None, my_string_string_map=None, my_string_enum_map=None, my_enum_string_map=None, my_enum_struct_map=None, my_enum_stringlist_map=None, my_enum_structlist_map=None, my_stringlist=None, my_structlist=None, my_enumlist=None, my_stringset=None, my_enumset=None, my_structset=None,):
    self.my_bool = my_bool
    self.my_byte = my_byte
    self.my_16bit_int = my_16bit_int
    self.my_32bit_int = my_32bit_int
    self.my_64bit_int = my_64bit_int
    self.my_double = my_double
    self.my_string = my_string
    self.my_binary = my_binary
    self.my_string_string_map = my_string_string_map
    self.my_string_enum_map = my_string_enum_map
    self.my_enum_string_map = my_enum_string_map
    self.my_enum_struct_map = my_enum_struct_map
    self.my_enum_stringlist_map = my_enum_stringlist_map
    self.my_enum_structlist_map = my_enum_structlist_map
    self.my_stringlist = my_stringlist
    self.my_structlist = my_structlist
    self.my_enumlist = my_enumlist
    self.my_stringset = my_stringset
    self.my_enumset = my_enumset
    self.my_structset = my_structset

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.BOOL:
          self.my_bool = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BYTE:
          self.my_byte = iprot.readByte()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I16:
          self.my_16bit_int = iprot.readI16()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.my_32bit_int = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.my_64bit_int = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.DOUBLE:
          self.my_double = iprot.readDouble()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.my_string = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.my_binary = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.MAP:
          self.my_string_string_map = {}
          (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin()
          for _i4 in xrange(_size0):
            _key5 = iprot.readString()
            _val6 = iprot.readString()
            self.my_string_string_map[_key5] = _val6
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.MAP:
          self.my_string_enum_map = {}
          (_ktype8, _vtype9, _size7 ) = iprot.readMapBegin()
          for _i11 in xrange(_size7):
            _key12 = iprot.readString()
            _val13 = iprot.readI32()
            self.my_string_enum_map[_key12] = _val13
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.MAP:
          self.my_enum_string_map = {}
          (_ktype15, _vtype16, _size14 ) = iprot.readMapBegin()
          for _i18 in xrange(_size14):
            _key19 = iprot.readI32()
            _val20 = iprot.readString()
            self.my_enum_string_map[_key19] = _val20
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.MAP:
          self.my_enum_struct_map = {}
          (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin()
          for _i25 in xrange(_size21):
            _key26 = iprot.readI32()
            _val27 = MiniStruct()
            _val27.read(iprot)
            self.my_enum_struct_map[_key26] = _val27
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.MAP:
          self.my_enum_stringlist_map = {}
          (_ktype29, _vtype30, _size28 ) = iprot.readMapBegin()
          for _i32 in xrange(_size28):
            _key33 = iprot.readI32()
            _val34 = []
            (_etype38, _size35) = iprot.readListBegin()
            for _i39 in xrange(_size35):
              _elem40 = iprot.readString()
              _val34.append(_elem40)
            iprot.readListEnd()
            self.my_enum_stringlist_map[_key33] = _val34
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.MAP:
          self.my_enum_structlist_map = {}
          (_ktype42, _vtype43, _size41 ) = iprot.readMapBegin()
          for _i45 in xrange(_size41):
            _key46 = iprot.readI32()
            _val47 = []
            (_etype51, _size48) = iprot.readListBegin()
            for _i52 in xrange(_size48):
              _elem53 = MiniStruct()
              _elem53.read(iprot)
              _val47.append(_elem53)
            iprot.readListEnd()
            self.my_enum_structlist_map[_key46] = _val47
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.LIST:
          self.my_stringlist = []
          (_etype57, _size54) = iprot.readListBegin()
          for _i58 in xrange(_size54):
            _elem59 = iprot.readString()
            self.my_stringlist.append(_elem59)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.LIST:
          self.my_structlist = []
          (_etype63, _size60) = iprot.readListBegin()
          for _i64 in xrange(_size60):
            _elem65 = MiniStruct()
            _elem65.read(iprot)
            self.my_structlist.append(_elem65)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 17:
        if ftype == TType.LIST:
          self.my_enumlist = []
          (_etype69, _size66) = iprot.readListBegin()
          for _i70 in xrange(_size66):
            _elem71 = iprot.readI32()
            self.my_enumlist.append(_elem71)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 18:
        if ftype == TType.SET:
          self.my_stringset = set()
          (_etype75, _size72) = iprot.readSetBegin()
          for _i76 in xrange(_size72):
            _elem77 = iprot.readString()
            self.my_stringset.add(_elem77)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 19:
        if ftype == TType.SET:
          self.my_enumset = set()
          (_etype81, _size78) = iprot.readSetBegin()
          for _i82 in xrange(_size78):
            _elem83 = iprot.readI32()
            self.my_enumset.add(_elem83)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.SET:
          self.my_structset = set()
          (_etype87, _size84) = iprot.readSetBegin()
          for _i88 in xrange(_size84):
            _elem89 = MiniStruct()
            _elem89.read(iprot)
            self.my_structset.add(_elem89)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('MegaStruct')
    if self.my_bool is not None:
      oprot.writeFieldBegin('my_bool', TType.BOOL, 1)
      oprot.writeBool(self.my_bool)
      oprot.writeFieldEnd()
    if self.my_byte is not None:
      oprot.writeFieldBegin('my_byte', TType.BYTE, 2)
      oprot.writeByte(self.my_byte)
      oprot.writeFieldEnd()
    if self.my_16bit_int is not None:
      oprot.writeFieldBegin('my_16bit_int', TType.I16, 3)
      oprot.writeI16(self.my_16bit_int)
      oprot.writeFieldEnd()
    if self.my_32bit_int is not None:
      oprot.writeFieldBegin('my_32bit_int', TType.I32, 4)
      oprot.writeI32(self.my_32bit_int)
      oprot.writeFieldEnd()
    if self.my_64bit_int is not None:
      oprot.writeFieldBegin('my_64bit_int', TType.I64, 5)
      oprot.writeI64(self.my_64bit_int)
      oprot.writeFieldEnd()
    if self.my_double is not None:
      oprot.writeFieldBegin('my_double', TType.DOUBLE, 6)
      oprot.writeDouble(self.my_double)
      oprot.writeFieldEnd()
    if self.my_string is not None:
      oprot.writeFieldBegin('my_string', TType.STRING, 7)
      oprot.writeString(self.my_string)
      oprot.writeFieldEnd()
    if self.my_binary is not None:
      oprot.writeFieldBegin('my_binary', TType.STRING, 8)
      oprot.writeString(self.my_binary)
      oprot.writeFieldEnd()
    if self.my_string_string_map is not None:
      oprot.writeFieldBegin('my_string_string_map', TType.MAP, 9)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.my_string_string_map))
      for kiter90,viter91 in self.my_string_string_map.items():
        oprot.writeString(kiter90)
        oprot.writeString(viter91)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.my_string_enum_map is not None:
      oprot.writeFieldBegin('my_string_enum_map', TType.MAP, 10)
      oprot.writeMapBegin(TType.STRING, TType.I32, len(self.my_string_enum_map))
      for kiter92,viter93 in self.my_string_enum_map.items():
        oprot.writeString(kiter92)
        oprot.writeI32(viter93)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.my_enum_string_map is not None:
      oprot.writeFieldBegin('my_enum_string_map', TType.MAP, 11)
      oprot.writeMapBegin(TType.I32, TType.STRING, len(self.my_enum_string_map))
      for kiter94,viter95 in self.my_enum_string_map.items():
        oprot.writeI32(kiter94)
        oprot.writeString(viter95)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.my_enum_struct_map is not None:
      oprot.writeFieldBegin('my_enum_struct_map', TType.MAP, 12)
      oprot.writeMapBegin(TType.I32, TType.STRUCT, len(self.my_enum_struct_map))
      for kiter96,viter97 in self.my_enum_struct_map.items():
        oprot.writeI32(kiter96)
        viter97.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.my_enum_stringlist_map is not None:
      oprot.writeFieldBegin('my_enum_stringlist_map', TType.MAP, 13)
      oprot.writeMapBegin(TType.I32, TType.LIST, len(self.my_enum_stringlist_map))
      for kiter98,viter99 in self.my_enum_stringlist_map.items():
        oprot.writeI32(kiter98)
        oprot.writeListBegin(TType.STRING, len(viter99))
        for iter100 in viter99:
          oprot.writeString(iter100)
        oprot.writeListEnd()
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.my_enum_structlist_map is not None:
      oprot.writeFieldBegin('my_enum_structlist_map', TType.MAP, 14)
      oprot.writeMapBegin(TType.I32, TType.LIST, len(self.my_enum_structlist_map))
      for kiter101,viter102 in self.my_enum_structlist_map.items():
        oprot.writeI32(kiter101)
        oprot.writeListBegin(TType.STRUCT, len(viter102))
        for iter103 in viter102:
          iter103.write(oprot)
        oprot.writeListEnd()
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.my_stringlist is not None:
      oprot.writeFieldBegin('my_stringlist', TType.LIST, 15)
      oprot.writeListBegin(TType.STRING, len(self.my_stringlist))
      for iter104 in self.my_stringlist:
        oprot.writeString(iter104)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.my_structlist is not None:
      oprot.writeFieldBegin('my_structlist', TType.LIST, 16)
      oprot.writeListBegin(TType.STRUCT, len(self.my_structlist))
      for iter105 in self.my_structlist:
        iter105.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.my_enumlist is not None:
      oprot.writeFieldBegin('my_enumlist', TType.LIST, 17)
      oprot.writeListBegin(TType.I32, len(self.my_enumlist))
      for iter106 in self.my_enumlist:
        oprot.writeI32(iter106)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.my_stringset is not None:
      oprot.writeFieldBegin('my_stringset', TType.SET, 18)
      oprot.writeSetBegin(TType.STRING, len(self.my_stringset))
      for iter107 in self.my_stringset:
        oprot.writeString(iter107)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.my_enumset is not None:
      oprot.writeFieldBegin('my_enumset', TType.SET, 19)
      oprot.writeSetBegin(TType.I32, len(self.my_enumset))
      for iter108 in self.my_enumset:
        oprot.writeI32(iter108)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.my_structset is not None:
      oprot.writeFieldBegin('my_structset', TType.SET, 20)
      oprot.writeSetBegin(TType.STRUCT, len(self.my_structset))
      for iter109 in self.my_structset:
        iter109.write(oprot)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return

  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.my_bool)
    value = (value * 31) ^ hash(self.my_byte)
    value = (value * 31) ^ hash(self.my_16bit_int)
    value = (value * 31) ^ hash(self.my_32bit_int)
    value = (value * 31) ^ hash(self.my_64bit_int)
    value = (value * 31) ^ hash(self.my_double)
    value = (value * 31) ^ hash(self.my_string)
    value = (value * 31) ^ hash(self.my_binary)
    value = (value * 31) ^ hash(self.my_string_string_map)
    value = (value * 31) ^ hash(self.my_string_enum_map)
    value = (value * 31) ^ hash(self.my_enum_string_map)
    value = (value * 31) ^ hash(self.my_enum_struct_map)
    value = (value * 31) ^ hash(self.my_enum_stringlist_map)
    value = (value * 31) ^ hash(self.my_enum_structlist_map)
    value = (value * 31) ^ hash(self.my_stringlist)
    value = (value * 31) ^ hash(self.my_structlist)
    value = (value * 31) ^ hash(self.my_enumlist)
    value = (value * 31) ^ hash(self.my_stringset)
    value = (value * 31) ^ hash(self.my_enumset)
    value = (value * 31) ^ hash(self.my_structset)
    return value

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)


text:
class CreateRhombusPrinters < ActiveRecord::Migration
  def change
    create_table :core_printers do |t|
      t.string :name, null: false
      t.string :url, null: false
      t.integer :print_count, null: false, default: 0
      t.string :location, null: false

      t.timestamps null: false
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
* [
      hyperoslo
      /
      Form
](https://github.com/hyperoslo/Form):
      JSON driven form

* [
      bryankeller
      /
      BLKFlexibleHeightBar
](https://github.com/bryankeller/BLKFlexibleHeightBar):
      Create condensing header bars like those seen in the Facebook, Square Cash, and Safari iOS apps.

* [
      nickgartmann
      /
      boot2docker-status
](https://github.com/nickgartmann/boot2docker-status):
      Status bar application to manage the state of your Boot2Docker VM

* [
      layerhq
      /
      Atlas-iOS
](https://github.com/layerhq/Atlas-iOS):
      Atlas is a library of native iOS communications user interface components for Layer.

* [
      CoderMJLee
      /
      MJRefresh
](https://github.com/CoderMJLee/MJRefresh):
      The easiest way to use pull-to-refresh

* [
      jonathantribouharet
      /
      JTCalendar
](https://github.com/jonathantribouharet/JTCalendar):
      A customizable calendar view for iOS.

* [
      IFTTT
      /
      JazzHands
](https://github.com/IFTTT/JazzHands):
      A simple keyframe-based animation framework for UIKit. Perfect for scrolling app intros.

* [
      AFNetworking
      /
      AFNetworking
](https://github.com/AFNetworking/AFNetworking):
      A delightful iOS and OS X networking framework

* [
      dealforest
      /
      Tuna
](https://github.com/dealforest/Tuna):
      Xcode plugin that provides easy set breakpoint.

* [
      supermarin
      /
      Alcatraz
](https://github.com/supermarin/Alcatraz):
      Package manager for Xcode

* [
      kevinzhow
      /
      PNChart
](https://github.com/kevinzhow/PNChart):
      A simple and beautiful chart lib used in Piner and CoinsMan for iOS

* [
      path
      /
      FastImageCache
](https://github.com/path/FastImageCache):
      iOS library for quickly displaying images while scrolling

* [
      lmirosevic
      /
      GBDeviceInfo
](https://github.com/lmirosevic/GBDeviceInfo):
      Detects the hardware, software and display of the current iOS or Mac OS X device at runtime.

* [
      google
      /
      physical-web
](https://github.com/google/physical-web):
      The Physical Web: walk up and use anything

* [
      qfish
      /
      QLImageset
](https://github.com/qfish/QLImageset):
      QuickLook generator for package or directory with extension likes imageset, appiconset and launchimage.

* [
      rs
      /
      SDWebImage
](https://github.com/rs/SDWebImage):
      Asynchronous image downloader with cache support with an UIImageView category

* [
      ReactiveCocoa
      /
      ReactiveCocoa
](https://github.com/ReactiveCocoa/ReactiveCocoa):
      A framework for composing and transforming streams of values

* [
      romaonthego
      /
      RESideMenu
](https://github.com/romaonthego/RESideMenu):
      iOS 7/8 style side menu with parallax effect.

* [
      jl322137
      /
      JLKeychain
](https://github.com/jl322137/JLKeychain):
      a Keychain wrapper on iOS can set/get any object in your system keychain

* [
      artsy
      /
      eigen
](https://github.com/artsy/eigen):
      The Art World in Your Pocket, Artsy's iOS app.

* [
      Mantle
      /
      Mantle
](https://github.com/Mantle/Mantle):
      Model framework for Cocoa and Cocoa Touch

* [
      CocoaLumberjack
      /
      CocoaLumberjack
](https://github.com/CocoaLumberjack/CocoaLumberjack):
      A fast & simple, yet powerful & flexible logging framework for Mac and iOS

* [
      coderyi
      /
      YiRefresh
](https://github.com/coderyi/YiRefresh):
      a simple way to use pull-to-refresh.下拉刷新,大道至简,最简单的网络刷新控件

* [
      omz
      /
      Dash-Plugin-for-Xcode
](https://github.com/omz/Dash-Plugin-for-Xcode):
      Plugin for Xcode to integrate the Dash documentation viewer app

* [
      facebook
      /
      AsyncDisplayKit
](https://github.com/facebook/AsyncDisplayKit):
      Smooth asynchronous user interfaces for iOS apps.

####go
* [
      gogits
      /
      gogs
](https://github.com/gogits/gogs):
      Gogs(Go Git Service) is a painless self-hosted Git Service written in Go.

* [
      zxh0
      /
      jvm.go
](https://github.com/zxh0/jvm.go):
      A JVM written in GO...

* [
      phuslu
      /
      goproxy
](https://github.com/phuslu/goproxy):
      a go proxy

* [
      docker
      /
      docker
](https://github.com/docker/docker):
      Docker - the open-source application container engine

* [
      restic
      /
      restic
](https://github.com/restic/restic):
      restic backup program

* [
      stargrave
      /
      govpn
](https://github.com/stargrave/govpn):
      Simple secure free software VPN daemon

* [
      golang
      /
      go
](https://github.com/golang/go):
      The Go programming language

* [
      rancherio
      /
      os
](https://github.com/rancherio/os):
      The easiest way to run Docker in production

* [
      gizak
      /
      termui
](https://github.com/gizak/termui):
      Golang terminal dashboard

* [
      syncthing
      /
      syncthing
](https://github.com/syncthing/syncthing):
      Open Source Continuous File Synchronization

* [
      astaxie
      /
      beego
](https://github.com/astaxie/beego):
      beego is an open-source, high-performance web framework for the Go programming language.

* [
      mozilla
      /
      masche
](https://github.com/mozilla/masche):
      MIG Memory Forensic library

* [
      etsy
      /
      Hound
](https://github.com/etsy/Hound):
      Lightning fast code searching made easy

* [
      go-martini
      /
      martini
](https://github.com/go-martini/martini):
      Classy web framework for Go

* [
      progrium
      /
      basht
](https://github.com/progrium/basht):
      Minimalist Bash test runner

* [
      GoogleCloudPlatform
      /
      kubernetes
](https://github.com/GoogleCloudPlatform/kubernetes):
      Container Cluster Manager from Google

* [
      hashicorp
      /
      consul
](https://github.com/hashicorp/consul):
      Consul is a tool for service discovery, monitoring and configuration.

* [
      andlabs
      /
      qo
](https://github.com/andlabs/qo):
      Another build system for C/C++, I guess? Inspired by 'go build'

* [
      influxdb
      /
      influxdb
](https://github.com/influxdb/influxdb):
      Scalable datastore for metrics, events, and real-time analytics

* [
      coreos
      /
      etcd
](https://github.com/coreos/etcd):
      A highly-available key value store for shared configuration and service discovery

* [
      gocraft
      /
      health
](https://github.com/gocraft/health):
      Instrument your web apps with logging and metrics

* [
      google
      /
      stenographer
](https://github.com/google/stenographer):
      Stenographer is a packet capture solution which aims to quickly spool all packets to disk, then provide simple, fast access to subsets of those packets. Discussion/announcements at stenographer@googlegroups.com

* [
      spf13
      /
      hugo
](https://github.com/spf13/hugo):
      A Fast and Flexible Static Site Generator built with love by spf13 in GoLang

* [
      ArdanStudios
      /
      gotraining
](https://github.com/ArdanStudios/gotraining):
      Go Training Class Material

* [
      odeke-em
      /
      drive
](https://github.com/odeke-em/drive):
      Pull or push Google Drive files

####javascript
* [
      Mango
      /
      slideout
](https://github.com/Mango/slideout):
      A touch slideout navigation menu for your mobile web apps.

* [
      nolimits4web
      /
      Swiper
](https://github.com/nolimits4web/Swiper):
      Most modern mobile touch slider with hardware accelerated transitions

* [
      DanielRapp
      /
      doppler
](https://github.com/DanielRapp/doppler):
      Motion detection using the doppler effect

* [
      mateogianolio
      /
      mlp-character-recognition
](https://github.com/mateogianolio/mlp-character-recognition):
      Trains a multi-layer perceptron (MLP) neural network to perform optical character recognition (OCR).

* [
      tylingsoft
      /
      markdown-plus
](https://github.com/tylingsoft/markdown-plus):
      Markdown editor with extra features.

* [
      facebook
      /
      react
](https://github.com/facebook/react):
      A declarative, efficient, and flexible JavaScript library for building user interfaces.

* [
      yahoo
      /
      end-to-end
](https://github.com/yahoo/end-to-end):
      Use OpenPGP encryption in Yahoo mail. Fork of https://github.com/google/end-to-end.

* [
      TelescopeJS
      /
      Telescope
](https://github.com/TelescopeJS/Telescope):
      An open-source social news app built with Meteor

* [
      pheuter
      /
      essential-react
](https://github.com/pheuter/essential-react):
      A minimal skeleton for building testable React apps using ES6

* [
      angular
      /
      angular.js
](https://github.com/angular/angular.js):
      HTML enhanced for web apps

* [
      azer
      /
      virtual-html
](https://github.com/azer/virtual-html):
      Convert given HTML into Virtual DOM object

* [
      quorrajs
      /
      Ouch
](https://github.com/quorrajs/Ouch):
      NodeJS errors for cool kids

* [
      sindresorhus
      /
      node-module-boilerplate
](https://github.com/sindresorhus/node-module-boilerplate):
      Boilerplate to kickstart creating a node module

* [
      kitematic
      /
      kitematic
](https://github.com/kitematic/kitematic):
      The easiest way to start using Docker on Mac

* [
      callemall
      /
      material-ui
](https://github.com/callemall/material-ui):
      A CSS Framework and a Set of React Components that Implement Google's Material Design.

* [
      NathanEpstein
      /
      datakit
](https://github.com/NathanEpstein/datakit):
      A lightweight framework for data analysis in JavaScript.

* [
      hannesstruss
      /
      godot
](https://github.com/hannesstruss/godot):
      Keep track of how much time you spend on Gradle builds

* [
      driftyco
      /
      ionic
](https://github.com/driftyco/ionic):
      Advanced HTML5 mobile development framework and SDK. Build incredible hybrid apps with web technologies you already know and love. Best friends with AngularJS.

* [
      Selz
      /
      plyr
](https://github.com/Selz/plyr):
      A simple HTML5 media player

* [
      getify
      /
      You-Dont-Know-JS
](https://github.com/getify/You-Dont-Know-JS):
      A book series on JavaScript. @YDKJS on twitter.

* [
      olahol
      /
      react-tagsinput
](https://github.com/olahol/react-tagsinput):
      A simple react component for inputing tags.

* [
      h5bp
      /
      html5-boilerplate
](https://github.com/h5bp/html5-boilerplate):
      A professional front-end template for building fast, robust, and adaptable web apps or sites.

* [
      meteor
      /
      meteor
](https://github.com/meteor/meteor):
      Meteor, an ultra-simple, database-everywhere, data-on-the-wire, pure-Javascript web framework.

* [
      GitbookIO
      /
      gitbook
](https://github.com/GitbookIO/gitbook):
      Modern book format and toolchain using Git and Markdown

* [
      twostairs
      /
      paperwork
](https://github.com/twostairs/paperwork):
      Paperwork - OpenSource note-taking & archiving alternative to Evernote, Microsoft OneNote & Google Keep

####ruby
* [
      Homebrew
      /
      homebrew
](https://github.com/Homebrew/homebrew):
      The missing package manager for OS X.

* [
      ankane
      /
      safely
](https://github.com/ankane/safely):
      Awesome exception handling

* [
      discourse
      /
      discourse
](https://github.com/discourse/discourse):
      A platform for community discussion. Free, open, simple.

* [
      MaximeD
      /
      gem_updater
](https://github.com/MaximeD/gem_updater):
      Update gems in your Gemfile and fetch their changelogs

* [
      rails
      /
      rails
](https://github.com/rails/rails):
      Ruby on Rails

* [
      vladimir-tikhonov
      /
      regexy
](https://github.com/vladimir-tikhonov/regexy):
      Regexy - collection of useful regular expressions for ruby and rails

* [
      voltrb
      /
      volt
](https://github.com/voltrb/volt):
      A Ruby web framework where your Ruby runs on both server and client

* [
      jekyll
      /
      jekyll
](https://github.com/jekyll/jekyll):
      Jekyll is a blog-aware, static site generator in Ruby

* [
      gitlabhq
      /
      gitlabhq
](https://github.com/gitlabhq/gitlabhq):
      GitLab is version control for your server

* [
      KrauseFx
      /
      fastlane
](https://github.com/KrauseFx/fastlane):
      Connect all iOS deployment tools into one streamlined workflow

* [
      soundcloud
      /
      lhm
](https://github.com/soundcloud/lhm):
      Online MySQL schema migrations

* [
      intridea
      /
      grape
](https://github.com/intridea/grape):
      An opinionated micro-framework for creating REST-like APIs in Ruby.

* [
      saturnflyer
      /
      surrounded
](https://github.com/saturnflyer/surrounded):
      Create encapsulated systems of objects and focus on their interactions

* [
      reactjs
      /
      react-rails
](https://github.com/reactjs/react-rails):
      Ruby gem for automatically transforming JSX and using React in Rails.

* [
      bbatsov
      /
      rubocop
](https://github.com/bbatsov/rubocop):
      A Ruby static code analyzer, based on the community Ruby style guide.

* [
      spree
      /
      spree
](https://github.com/spree/spree):
      Spree is a complete open source e-commerce solution for Ruby on Rails.

* [
      vdaubry
      /
      github-awards
](https://github.com/vdaubry/github-awards):
      Discover your ranking on github :

* [
      mitchellh
      /
      vagrant
](https://github.com/mitchellh/vagrant):
      Vagrant is a tool for building and distributing development environments.

* [
      elastic
      /
      logstash
](https://github.com/elastic/logstash):
      logstash - logs/event transport, processing, management, search.

* [
      egonSchiele
      /
      contracts.ruby
](https://github.com/egonSchiele/contracts.ruby):
      Contracts for Ruby.

* [
      plataformatec
      /
      devise
](https://github.com/plataformatec/devise):
      Flexible authentication solution for Rails with Warden.

* [
      ruby
      /
      ruby
](https://github.com/ruby/ruby):
      The Ruby Programming Language

* [
      phstc
      /
      shoryuken
](https://github.com/phstc/shoryuken):
      A super efficient AWS SQS thread based message processor for Ruby

* [
      thoughtbot
      /
      guides
](https://github.com/thoughtbot/guides):
      A guide for programming in style.

* [
      jaimeiniesta
      /
      metainspector
](https://github.com/jaimeiniesta/metainspector):
      Ruby gem for web scraping purposes. It scrapes a given URL, and returns you its title, meta description, meta keywords, an array with all the links, all the images in it, etc.


text:
package com.navercorp.pinpoint.profiler.instrument.transformer;

import java.security.ProtectionDomain;

/**
 * @author Woonduk Kang(emeroad)
 */
public interface LambdaClassFileResolver {
    String resolve(ClassLoader classLoader, String classInternalName, ProtectionDomain protectionDomain, byte[] classFileBuffer);
}


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('home', '0003_auto_20171119_1718'),
    ]

    operations = [
        migrations.AlterField(
            model_name='homepageblock',
            name='override_background_color',
            field=models.CharField(blank=True, default='', max_length=64),
        ),
        migrations.AlterField(
            model_name='homepageblock',
            name='override_description',
            field=models.TextField(blank=True, default=''),
        ),
        migrations.AlterField(
            model_name='homepageblock',
            name='override_kicker',
            field=models.CharField(blank=True, default='', max_length=64),
        ),
        migrations.AlterField(
            model_name='homepageblock',
            name='override_title',
            field=models.CharField(blank=True, default='', max_length=265),
        ),
    ]


text:
package com.google.ads.googleads.v11.common;

public final class TextLabelProto {
  private TextLabelProto() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  static final com.google.protobuf.Descriptors.Descriptor
    internal_static_google_ads_googleads_v11_common_TextLabel_descriptor;
  static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_google_ads_googleads_v11_common_TextLabel_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n0google/ads/googleads/v11/common/text_l" +
      "abel.proto\022\037google.ads.googleads.v11.com" +
      "mon\"i\n\tTextLabel\022\035\n\020background_color\030\003 \001" +
      "(\tH\000\210\001\001\022\030\n\013description\030\004 \001(\tH\001\210\001\001B\023\n\021_ba" +
      "ckground_colorB\016\n\014_descriptionB\356\001\n#com.g" +
      "oogle.ads.googleads.v11.commonB\016TextLabe" +
      "lProtoP\001ZEgoogle.golang.org/genproto/goo" +
      "gleapis/ads/googleads/v11/common;common\242" +
      "\002\003GAA\252\002\037Google.Ads.GoogleAds.V11.Common\312" +
      "\002\037Google\\Ads\\GoogleAds\\V11\\Common\352\002#Goog" +
      "le::Ads::GoogleAds::V11::Commonb\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        });
    internal_static_google_ads_googleads_v11_common_TextLabel_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_google_ads_googleads_v11_common_TextLabel_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_google_ads_googleads_v11_common_TextLabel_descriptor,
        new java.lang.String[] { "BackgroundColor", "Description", "BackgroundColor", "Description", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}


text:
package antonio;

import java.util.HashMap;

public class NaiveBayes {

	private final Instancia[] conjuntoDeTreinamento;
	private final Object[] possiveisClasses;
	private final HashMap<Object, Double> probabilidadesDasClasses;
	private final int quantidadeDeAtributos;
	private final HashMap<Object, Integer> quantidadesDeInstanciasDasClasses;

	public NaiveBayes(Instancia[] conjuntoDeTreinamento,
			Object[] possiveisClasses) {
		// Inicializa os atributos privados
		this.conjuntoDeTreinamento = conjuntoDeTreinamento;
		this.possiveisClasses = possiveisClasses;
		probabilidadesDasClasses = new HashMap<Object, Double>(
				possiveisClasses.length);
		quantidadeDeAtributos = conjuntoDeTreinamento[0].getAtributos().length;
		quantidadesDeInstanciasDasClasses = new HashMap<Object, Integer>(
				possiveisClasses.length);
		// Conta quantas instâncias há em cada classe
		for (Object classe : possiveisClasses) {
			quantidadesDeInstanciasDasClasses.put(classe, 0);
		}
		for (Instancia instancia : conjuntoDeTreinamento) {
			Object classeDaInstancia = instancia.getValor();
			int novaQuantidadeDeInstanciasDaClasse = quantidadesDeInstanciasDasClasses
					.get(classeDaInstancia) + 1;
			quantidadesDeInstanciasDasClasses.put(classeDaInstancia,
					novaQuantidadeDeInstanciasDaClasse);
		}
		// Calcula a probabilidade de cada classe
		int quantidadeDeInstancias = conjuntoDeTreinamento.length;
		for (Object classe : possiveisClasses) {
			int quantidadeDeInstanciasDaClasse = quantidadesDeInstanciasDasClasses
					.get(classe);
			double probabilidadeDaClasse = quantidadeDeInstanciasDaClasse
					/ (double) quantidadeDeInstancias;
			probabilidadesDasClasses.put(classe, probabilidadeDaClasse);
		}
	}

	private double probabilidadeDaClasse(Object classe) {
		return probabilidadesDasClasses.get(classe);
	}

	private int quantidadeDeInstanciasDaClasse(Object classe) {
		return quantidadesDeInstanciasDasClasses.get(classe);
	}

	private double probabilidadeDaClasseDadoValorDoAtributo(Object classe,
			int atributo, Object valorDoAtributo) {
		int numeroDeInstanciasComValor = 0;
		int numeroDeInstanciasDaClasse = quantidadeDeInstanciasDaClasse(classe);
		if (numeroDeInstanciasDaClasse == 0) {
			return 0; // Evita divisão por zero
		}
		for (Instancia instancia : conjuntoDeTreinamento) {
			if (instancia.getValor().equals(classe)
					&& instancia.getAtributos()[atributo]
							.equals(valorDoAtributo)) {
				numeroDeInstanciasComValor++;
			}
		}
		return numeroDeInstanciasComValor / (double) numeroDeInstanciasDaClasse;
	}

	private double probabilidade(Instancia instancia, Object classe) {
		Object[] atributos = instancia.getAtributos();
		double probabilidade = 1;
		for (int a = 0; a < quantidadeDeAtributos; a++) {
			double probabilidadeClasseAtributo = probabilidadeDaClasseDadoValorDoAtributo(
					classe, a, atributos[a]);
			if (probabilidadeClasseAtributo == 0) {
				return 0; // Otimização
			}
			probabilidade = probabilidade * probabilidadeClasseAtributo;
		}
		probabilidade = probabilidade * probabilidadeDaClasse(classe);
		return probabilidade;
	}

	public Object classificar(Instancia instancia) {
		Object classeFinal = null;
		double probabilidade = 0;
		for (Object classe : possiveisClasses) {
			double probabilidadeDeSerEssaClasse = probabilidade(instancia,
					classe);
			System.out.println("Probabilidade de ser a classe " + classe
					+ " = " + probabilidadeDeSerEssaClasse);
			if (probabilidadeDeSerEssaClasse > probabilidade) {
				classeFinal = classe;
				probabilidade = probabilidadeDeSerEssaClasse;
			}
		}
		return classeFinal;
	}

}


text:
require "integration/test_helper"

describe Azure::Storage::File::FileService do
  subject { Azure::Storage::File::FileService.create(SERVICE_CREATE_OPTIONS()) }
  after { ShareNameHelper.clean }

  describe "#set/get_share_acl" do
    let(:share_name) { ShareNameHelper.name }
    let(:public_access_level) { :share.to_s }
    let(:identifiers) {
      identifier = Azure::Storage::Common::Service::SignedIdentifier.new
      identifier.id = "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI="
      identifier.access_policy.start = "2009-09-28T08:49:37.0000000Z"
      identifier.access_policy.expiry = "2009-09-29T08:49:37.0000000Z"
      identifier.access_policy.permission = "rwd"
      [identifier]
    }
    before {
      subject.create_share share_name
    }

    it "sets and gets the ACL for the share" do
      share, acl = subject.set_share_acl share_name, signed_identifiers: identifiers
      share.wont_be_nil
      share.name.must_equal share_name
      acl.length.must_equal identifiers.length
      acl.first.id.must_equal identifiers.first.id
      acl.first.access_policy.start.must_equal identifiers.first.access_policy.start
      acl.first.access_policy.expiry.must_equal identifiers.first.access_policy.expiry
      acl.first.access_policy.permission.must_equal identifiers.first.access_policy.permission

      share, acl = subject.get_share_acl share_name
      share.wont_be_nil
      share.name.must_equal share_name
      acl.length.must_equal identifiers.length
      acl.first.id.must_equal identifiers.first.id
      acl.first.access_policy.start.must_equal identifiers.first.access_policy.start
      acl.first.access_policy.expiry.must_equal identifiers.first.access_policy.expiry
      acl.first.access_policy.permission.must_equal identifiers.first.access_policy.permission
    end

    it "errors if the share does not exist" do
      assert_raises(Azure::Core::Http::HTTPError) do
        subject.get_share_acl FileNameHelper.name
      end
      assert_raises(Azure::Core::Http::HTTPError) do
        subject.set_share_acl FileNameHelper.name, identifiers: identifiers
      end
    end
  end
end


text:
using Robust.Shared.Serialization;

namespace Content.Shared.DeviceNetwork;

[Serializable, NetSerializable]
public enum NetworkConfiguratorUiKey
{
    List,
    Configure
}

[Serializable, NetSerializable]
public enum NetworkConfiguratorButtonKey
{
    Set,
    Add,
    Edit,
    Clear,
    Copy,
    Show
}

/// <summary>
/// Message sent when the remove button for one device on the list was pressed
/// </summary>
[Serializable, NetSerializable]
public sealed class NetworkConfiguratorRemoveDeviceMessage : BoundUserInterfaceMessage
{
    public readonly string Address;

    public NetworkConfiguratorRemoveDeviceMessage(string address)
    {
        Address = address;
    }
}

/// <summary>
/// Message sent when the clear button was pressed
/// </summary>
[Serializable, NetSerializable]
public sealed class NetworkConfiguratorClearDevicesMessage : BoundUserInterfaceMessage
{
}

[Serializable, NetSerializable]
public sealed class NetworkConfiguratorButtonPressedMessage : BoundUserInterfaceMessage
{
    public readonly NetworkConfiguratorButtonKey ButtonKey;

    public NetworkConfiguratorButtonPressedMessage(NetworkConfiguratorButtonKey buttonKey)
    {
        ButtonKey = buttonKey;
    }
}


text:
#if VOUCHERIFYSERVER
using System;
using Newtonsoft.Json;
using Voucherify.Core.DataModel;

namespace Voucherify.DataModel
{
    [JsonObject]
    public class CustomerSummaryRedemptions
    {
        [JsonProperty(PropertyName = "total_redeemed")]
        public int TotalRedeemed { get; private set; }

        [JsonProperty(PropertyName = "total_failed")]
        public int TotalFailed { get; private set; }

        [JsonProperty(PropertyName = "total_succeeded")]
        public int TotalSucceeded { get; private set; }

        [JsonProperty(PropertyName = "total_rolled_back")]
        public int TotalRolledBack { get; private set; }

        [JsonProperty(PropertyName = "total_rollback_failed")]
        public int TotalRollbackFailed { get; private set; }

        [JsonProperty(PropertyName = "total_rollback_succeeded")]
        public int TotalRollbackSucceeded { get; private set; }

        [JsonProperty(PropertyName = "gift")]
        public CustomerSummaryRedemptionsGift Gift { get; private set; }

        public override string ToString()
        {
            return string.Format("CustomerSummaryRedemptions(TotalRedemed={0},TotalRolledBack={1})", this.TotalRedeemed, this.TotalRolledBack);
        }
    }
}
#endif


text:
namespace google {
namespace cloud {
namespace dialogflow_es_internal {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN

IntentsMetadata::IntentsMetadata(std::shared_ptr<IntentsStub> child)
    : child_(std::move(child)),
      api_client_header_(
          google::cloud::internal::ApiClientHeader("generator")) {}

StatusOr<google::cloud::dialogflow::v2::ListIntentsResponse>
IntentsMetadata::ListIntents(
    grpc::ClientContext& context,
    google::cloud::dialogflow::v2::ListIntentsRequest const& request) {
  SetMetadata(context, "parent=" + request.parent());
  return child_->ListIntents(context, request);
}

StatusOr<google::cloud::dialogflow::v2::Intent> IntentsMetadata::GetIntent(
    grpc::ClientContext& context,
    google::cloud::dialogflow::v2::GetIntentRequest const& request) {
  SetMetadata(context, "name=" + request.name());
  return child_->GetIntent(context, request);
}

StatusOr<google::cloud::dialogflow::v2::Intent> IntentsMetadata::CreateIntent(
    grpc::ClientContext& context,
    google::cloud::dialogflow::v2::CreateIntentRequest const& request) {
  SetMetadata(context, "parent=" + request.parent());
  return child_->CreateIntent(context, request);
}

StatusOr<google::cloud::dialogflow::v2::Intent> IntentsMetadata::UpdateIntent(
    grpc::ClientContext& context,
    google::cloud::dialogflow::v2::UpdateIntentRequest const& request) {
  SetMetadata(context, "intent.name=" + request.intent().name());
  return child_->UpdateIntent(context, request);
}

Status IntentsMetadata::DeleteIntent(
    grpc::ClientContext& context,
    google::cloud::dialogflow::v2::DeleteIntentRequest const& request) {
  SetMetadata(context, "name=" + request.name());
  return child_->DeleteIntent(context, request);
}

future<StatusOr<google::longrunning::Operation>>
IntentsMetadata::AsyncBatchUpdateIntents(
    google::cloud::CompletionQueue& cq,
    std::unique_ptr<grpc::ClientContext> context,
    google::cloud::dialogflow::v2::BatchUpdateIntentsRequest const& request) {
  SetMetadata(*context, "parent=" + request.parent());
  return child_->AsyncBatchUpdateIntents(cq, std::move(context), request);
}

future<StatusOr<google::longrunning::Operation>>
IntentsMetadata::AsyncBatchDeleteIntents(
    google::cloud::CompletionQueue& cq,
    std::unique_ptr<grpc::ClientContext> context,
    google::cloud::dialogflow::v2::BatchDeleteIntentsRequest const& request) {
  SetMetadata(*context, "parent=" + request.parent());
  return child_->AsyncBatchDeleteIntents(cq, std::move(context), request);
}

future<StatusOr<google::longrunning::Operation>>
IntentsMetadata::AsyncGetOperation(
    google::cloud::CompletionQueue& cq,
    std::unique_ptr<grpc::ClientContext> context,
    google::longrunning::GetOperationRequest const& request) {
  SetMetadata(*context, "name=" + request.name());
  return child_->AsyncGetOperation(cq, std::move(context), request);
}

future<Status> IntentsMetadata::AsyncCancelOperation(
    google::cloud::CompletionQueue& cq,
    std::unique_ptr<grpc::ClientContext> context,
    google::longrunning::CancelOperationRequest const& request) {
  SetMetadata(*context, "name=" + request.name());
  return child_->AsyncCancelOperation(cq, std::move(context), request);
}

void IntentsMetadata::SetMetadata(grpc::ClientContext& context,
                                  std::string const& request_params) {
  context.AddMetadata("x-goog-request-params", request_params);
  SetMetadata(context);
}

void IntentsMetadata::SetMetadata(grpc::ClientContext& context) {
  context.AddMetadata("x-goog-api-client", api_client_header_);
  auto const& options = internal::CurrentOptions();
  if (options.has<UserProjectOption>()) {
    context.AddMetadata("x-goog-user-project",
                        options.get<UserProjectOption>());
  }
  auto const& authority = options.get<AuthorityOption>();
  if (!authority.empty()) context.set_authority(authority);
}

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
}  // namespace dialogflow_es_internal
}  // namespace cloud
}  // namespace google