Populate the ``public_notes`` key.

    Also populates the ``curated`` and ``thesis_info`` keys through side effects.
493449
def public_notes(self, key, value):
    
    def _means_not_curated(public_note):
        return public_note in [
            '*Brief entry*',
            '* Brief entry *',
            '*Temporary entry*',
            '* Temporary entry *',
            '*Temporary record*',
            '* Temporary record *',
        ]

    public_notes = self.get('public_notes', [])
    thesis_info = self.get('thesis_info', {})

    source = force_single_element(value.get('9', ''))
    for value in force_list(value):
        for public_note in force_list(value.get('a')):
            match = IS_DEFENSE_DATE.match(public_note)
            if match:
                try:
                    thesis_info['defense_date'] = normalize_date(match.group('defense_date'))
                except ValueError:
                    public_notes.append({
                        'source': source,
                        'value': public_note,
                    })
            elif _means_not_curated(public_note):
                self['curated'] = False
            else:
                public_notes.append({
                    'source': source,
                    'value': public_note,
                })

    self['thesis_info'] = thesis_info
    return public_notes
785947
function PublicKey(params) {
    this._fingerprint = params.fingerprint;
    this._modulus = params.modulus;
    this._exponent = params.exponent;
}
1137880
def options(description, **kwargs):
    """"""
    def set_notes(function):
        function.refactor_notes = {'name': function.__name__,
                                   'category': "Miscellaneous",
                                   'description': description,
                                   'doc': getattr(function, '__doc__',
                                                  ''),
                                   'args': []}
        function.refactor_notes.update(kwargs)
        return function
    return set_notes
105668
def get(self, note):
        """"""
        if self.closed:
            raise RuntimeError('{!r} already closed'.format(self))

        # Record request for note even if it fails to resolve.
        self.stats[note] += 1

        # Handle injection of partially applied annotated functions.
        if isinstance(note, tuple) and len(note) == 2:
            if note[0] == PARTIAL:
                fn, a, kw_items = note[1]
                return self.partial(fn, *a, **dict(kw_items))
            elif note[0] == PARTIAL_REGARDLESS:
                fn, a, kw_items = note[1]
                return self.partial_regardless(fn, *a, **dict(kw_items))
            elif note[0] == EAGER_PARTIAL:
                fn, a, kw_items = note[1]
                return self.eager_partial(fn, *a, **dict(kw_items))
            elif note[0] == EAGER_PARTIAL_REGARDLESS:
                fn, a, kw_items = note[1]
                return self.eager_partial_regardless(fn, *a, **dict(kw_items))

        basenote, name = self.parse_note(note)
        if name is None and basenote in self.values:
            return self.values[basenote]
        try:
            provider_factory = self.lookup(basenote)
        except LookupError:
            msg = "Unable to resolve '{}'"
            raise LookupError(msg.format(note))

        self.instantiating.append((basenote, name))
        try:
            if self.instantiating.count((basenote, name)) > 1:
                stack = ' <- '.join(repr(note) for note in self.instantiating)
                notes = tuple(self.instantiating)
                raise DependencyCycleError(stack, notes=notes)

            return self.handle_provider(provider_factory, note)
        finally:
            self.instantiating.pop()
30416
def add_key(self, key, label, notes=None):
        
        order = {
            'key': key,
            'label': label,
            'notes': notes,
        }

        return self.sshkey.createObject(order)
126004
def copyright(self, key, value):
    """"""
    MATERIAL_MAP = {
        'Article': 'publication',
        'Published thesis as a book': 'publication',
    }

    material = value.get('e') or value.get('3')

    return {
        'holder': value.get('d'),
        'material': MATERIAL_MAP.get(material),
        'statement': value.get('f'),
        'url': value.get('u'),
        'year': maybe_int(value.get('g')),
    }
618356
def add_sources(self, source_info_dict):
        
        self._source_info_dict.update(source_info_dict)
        for key, value in source_info_dict.items():
            self._sources.update(make_sources(key, value))
406079
protected function populateSnippetIDs() {
        $this->_cache_snippet_ids=array();
        if($snippets=$this->snippetsIncluded()) {
            // And keep a record of parents we don't need to get
            // parents of themselves, as well as IDs to mark
            foreach($snippets as $snippetId) {
                $this->_cache_snippet_ids[$snippetId]=true;
            }
        }
    }
915540
def add_private_note(self, note, source=None):
        
        note = {
            'value': note,
        }
        if source:
            note['source'] = source
        self._append_to('_private_notes', note)
1129493
def import_public_keys(contents):
    """"""
    for line in io.StringIO(contents):
        # Verify this line represents valid SSH public key
        formats.import_public_key(line)
        yield line
1059796
def cli(env, identifier, out_file):
    """"""

    mgr = SoftLayer.SshKeyManager(env.client)

    key_id = helpers.resolve_id(mgr.resolve_ids, identifier, 'SshKey')

    key = mgr.get_key(key_id)

    if out_file:
        with open(path.expanduser(out_file), 'w') as pub_file:
            pub_file.write(key['key'])

    table = formatting.KeyValueTable(['name', 'value'])
    table.add_row(['id', key['id']])
    table.add_row(['label', key.get('label')])
    table.add_row(['notes', key.get('notes', '-')])
    env.fout(table)
248208
def cli(env, identifier, crt, csr, icc, key, notes):
    """"""
    template = {'id': identifier}
    if crt:
        template['certificate'] = open(crt).read()
    if key:
        template['privateKey'] = open(key).read()
    if csr:
        template['certificateSigningRequest'] = open(csr).read()
    if icc:
        template['intermediateCertificate'] = open(icc).read()
    if notes:
        template['notes'] = notes

    manager = SoftLayer.SSLManager(env.client)
    manager.edit_certificate(template)
1251197
def _private_notes_595(self, key, value):
    """"""
    return [
        {
            'source': value.get('9'),
            'value': _private_note,
        } for _private_note in force_list(value.get('a'))
    ]
832689
def append_notes(self, notes, root, scale=0):
        
        for note in notes:
            self.append_note(note, root, scale)
549759
def get_credit_notes(options = {})

      request_params = {}

      request_params[:CreditNoteID]     = options[:credit_note_id] if options[:credit_note_id]
      request_params[:CreditNoteNumber] = options[:credit_note_number] if options[:credit_note_number]
      request_params[:order]            = options[:order] if options[:order]
      request_params[:ModifiedAfter]    = options[:modified_since] if options[:modified_since]

      request_params[:where]            = options[:where] if options[:where]

      response_xml = http_get(@client, "#{@xero_url}/CreditNotes", request_params)

      parse_response(response_xml, {:request_params => request_params}, {:request_signature => 'GET/CreditNotes'})
    end
776308
def key_bytes(self):
        
        return self.key.public_bytes(
            encoding=serialization.Encoding.DER, format=serialization.PublicFormat.SubjectPublicKeyInfo
        )
503829
def post_copy_notes(self, post_id, other_post_id):
        
        return self._get('posts/{0}/copy_notes.json'.format(post_id),
                         {'other_post_id': other_post_id}, 'PUT', auth=True)