addr-spec = local-part "@" domain
327893
def get_addr_spec(value):
    
    addr_spec = AddrSpec()
    token, value = get_local_part(value)
    addr_spec.append(token)
    if not value or value[0] != '@':
        addr_spec.defects.append(errors.InvalidHeaderDefect(
            "add-spec local part with no domain"))
        return addr_spec, value
    addr_spec.append(ValueTerminal('@', 'address-at-symbol'))
    token, value = get_domain(value[1:])
    addr_spec.append(token)
    return addr_spec, value
808254
def _addrs2nodes(addrs, G):
    
    for i, n in enumerate(G.nodes()):
        G.node[n]['addr'] = addrs[i]
1276303
function addr_append($type, $addr) {
      $addr_str = "";
      $addr_str .= sprintf("%s: %s <%s>", $type, $addr[0][1], $addr[0][0]);
      if(count($addr) > 1)
      {
         for($i = 1; $i < count($addr); $i++)
         {
            $addr_str .= sprintf(", %s <%s>", $addr[$i][1], $addr[$i][0]);
         }
         $addr_str .= "\r\n";
      }
      else
         $addr_str .= "\r\n";

      return($addr_str);
   }
587946
def mac(addr):
    '''
    
    '''
    valid = re.compile(r'''
                      (^([0-9A-F]{1,2}[-]){5}([0-9A-F]{1,2})$
                      |^([0-9A-F]{1,2}[:]){5}([0-9A-F]{1,2})$
                      |^([0-9A-F]{1,2}[.]){5}([0-9A-F]{1,2})$)
                      ''',
                      re.VERBOSE | re.IGNORECASE)
    return valid.match(addr) is not None
1012610
void doMain(String[] args, boolean throwOnError) throws Exception {
		if (args.length == 0) {
			usage(throwOnError, "no arguments specified");
			return;
		} else if (args.length > 2) {
			usage(throwOnError, "improper number of arguments:" + Arrays.toString(args));
			return;
		}

		// check for --usage or --help
		if (args.length == 1 && ("--usage".equals(args[0]) || "--help".equals(args[0]))) {
			usage(throwOnError, null);
			return;
		}

		CommandLineJmxClient jmxClient;
		if (args[0].indexOf('/') >= 0) {
			jmxClient = new CommandLineJmxClient(args[0]);
		} else {
			String[] parts = args[0].split(":");
			if (parts.length != 2) {
				usage(throwOnError, "argument should be in 'hostname:port' format, not: " + args[0]);
				return;
			}
			String hostName = parts[0];
			int port = 0;
			try {
				port = Integer.parseInt(parts[1]);
			} catch (NumberFormatException e) {
				usage(throwOnError, "port number not in the right format: " + parts[1]);
				return;
			}
			jmxClient = new CommandLineJmxClient(hostName, port);
		}

		if (args.length == 1) {
			jmxClient.runCommandLine();
		} else if (args.length == 2) {
			jmxClient.runBatchFile(new File(args[1]));
		}
	}
452729
def sep
      if scope == :class
        namespace && namespace != YARD::Registry.root ? CSEP : NSEP
      else
        ISEP
      end
    end
615742
def _domain_variants(domain):
    
    parts = domain.split('.')
    if len(parts) == 1:
        yield parts[0]
    else:
        for i in range(len(parts), 1, -1):
            yield ".".join(parts[-i:])
771473
function parseAddressComponents(components, short = Options.short) {
  const results = {}
  components.map(component => {
    if (short) { results[component.types[0]] = component.short_name
    } else { results[component.types[0]] = component.long_name }
  })
  return results
}
470052
function isExactDomainMatch(part: string, debuggeeHost: string): boolean {
  return part.startsWith("www.")
    ? part.substr("www.".length) === debuggeeHost
    : part === debuggeeHost;
}
258121
function realDomain(id) {
  return id.lastIndexOf("@") === 0 ? id.substr(1).toLowerCase() :
    id.toLowerCase().
      replace(/@/g, "-at-").
      replace(/\./g, "-dot-").
      replace(UUID_PATTERN, "$1");
}
542779
def to_raw_address(addr, section):
        """"""
        return addr - section.header.VirtualAddress + section.header.PointerToRawData
813580
def get_iface_from_addr(addr):
    """"""
    for iface in netifaces.interfaces():
        addresses = netifaces.ifaddresses(iface)
        for inet_type in addresses:
            for _addr in addresses[inet_type]:
                _addr = _addr['addr']
                # link local
                ll_key = re.compile("(.+)%.*")
                raw = re.match(ll_key, _addr)
                if raw:
                    _addr = raw.group(1)

                if _addr == addr:
                    log("Address '%s' is configured on iface '%s'" %
                        (addr, iface))
                    return iface

    msg = "Unable to infer net iface on which '%s' is configured" % (addr)
    raise Exception(msg)
1035937
def address(addr):
    

    if ':' in addr:
        # Using rpartition here means we should be able to support
        # IPv6, but only with a strict syntax
        host, _sep, port = addr.rpartition(':')

        # Convert the port to a number
        try:
            port = int(port)
        except ValueError:
            raise ValueError("invalid port number %r" % port)

        addr = (host, port)

    return addr
414759
function initLocalsStepFactory($componentMapper, $controllerIntrospector) {
  return function initLocals(instruction) {
    return instruction.router.traverseInstruction(instruction, function(instruction) {
      if (typeof instruction.component === 'function') {
        instruction.controllerConstructor = instruction.component;
      } else {
        var controllerName = $componentMapper.controllerName(instruction.component);
        if (typeof controllerName === 'function') {
          instruction.controllerConstructor = controllerName;
        } else {
          instruction.controllerConstructor = $controllerIntrospector.getTypeByName(controllerName) || NOOP_CONTROLLER;
        }
      }
      return instruction.locals = {
        $router: instruction.router,
        $routeParams: (instruction.params || {})
      };
    });
  }
}
1178983
def domain_error!(first, *args)
      first = [first]+args unless args.empty?
      raise TypeError, "Can't convert `#{first.inspect}` into #{self}", caller
    end
293464
def determine_locally
      domain = @libvirt_capabilities.get_plugin(@previous_plugin_info).domain_rank.last
      generate_xml(OpenStruct.new({
        :domain_type => domain.name,
        :os_type => domain.virt_rank.last,
        :bus => domain.bus
      }))
    end
871659
def port_mapping(port)
      case port.to_s
      when /\A(\d+)(?:\/([a-z]+))?\z/
        port = $1.to_i
        {
          "hostPort" => port,
          "containerPort" => port,
          "protocol" => $2 || "tcp"
        }
      when /\A(\d+):(\d+)(?:\/([a-z]+))?\z/
        {
          "hostPort" => $1.to_i,
          "containerPort" => $2.to_i,
          "protocol" => $3 || "tcp"
        }
      else
        raise "Cannot parse port specification: #{port}"
      end
    end