Returns a new :class:`.Lv2Effect` by the valid lv2_uri

        :param string lv2_uri:
        :return Lv2Effect: Effect created
559888
def build(self, lv2_uri):
        
        try:
            plugin = self._plugins[lv2_uri]
        except KeyError:
            raise Lv2EffectBuilderError(
                "Lv2EffectBuilder not contains metadata information about the plugin '{}'. \n"
                "Try re-scan the installed plugins using the reload method::\n"
                "   >>> lv2_effect_builder.reload(lv2_effect_builder.lv2_plugins_data())".format(lv2_uri))

        return Lv2Effect(plugin)
151241
static Vector2d newUnitVector(final Tuple2d from, final Tuple2d to) {
        final Vector2d vector = new Vector2d(to.x - from.x, to.y - from.y);
        vector.normalize();
        return vector;
    }
390092
def add_affect(self, name, src, dest, val, condition = None ):
        
        self.affects.append(ParamAffects(name, src, dest, val, condition))
149591
def add_pref_suff(pref_suff_map):
    
    def dec(cls):
        # Need _make_method to ensure new variable picked up for each iteration
        # of the loop.  The defined method picks up this new variable in its
        # scope.
        for key, (prefix, suffix) in pref_suff_map.items():
            setattr(cls, 'visit_' + key, _make_method(prefix))
            setattr(cls, 'depart_' + key, _make_method(suffix))
        return cls

    return dec
800615
def playURI(self, uri):
        
        url: str = get_url("/remote/play.json")
        params = {
            "oauth": self._oauth_token,
            "csrf": self._csrf_token,
            "uri": uri,
            "context": uri,
        }
        r = self._request(url=url, params=params)
        return r.json()
801829
def _urlnorm(cls, uri):
        """"""
        (scheme, authority, path, query, fragment) = parse_uri(uri)
        if not scheme or not authority:
            raise Exception("Only absolute URIs are allowed. uri = %s" % uri)

        scheme = scheme.lower()
        authority = authority.lower()

        if not path:
            path = "/"

        # Could do syntax based normalization of the URI before
        # computing the digest. See Section 6.2.2 of Std 66.
        request_uri = query and "?".join([path, query]) or path
        defrag_uri = scheme + "://" + authority + request_uri

        return defrag_uri
343180
def get_lmv2_response(domain, username, password, server_challenge, client_challenge):
        
        ntlmv2_hash = PasswordAuthentication.ntowfv2(domain, username, password.encode('utf-16le'))
        hmac_context = hmac.HMAC(ntlmv2_hash, hashes.MD5(), backend=default_backend())
        hmac_context.update(server_challenge)
        hmac_context.update(client_challenge)
        lmv2_hash = hmac_context.finalize()

        # The LMv2 master user session key is a HMAC MD5 of the NTLMv2 and LMv2 hash
        session_key = hmac.HMAC(ntlmv2_hash, hashes.MD5(), backend=default_backend())
        session_key.update(lmv2_hash)

        return lmv2_hash + client_challenge, session_key.finalize()
343022
def param_get(param):
        
        instance = param.effect.instance

        return 'param_get {} {}'.format(instance, param.symbol)
1028653
def filterEffect(self, teff):
        
        ret = False
        for effect in teff.effects:
            ret = self._matchAnyEffects(effect) or ret
        return ret
1321189
def save_function_effect(module):
    
    for intr in module.values():
        if isinstance(intr, dict):  # Submodule case
            save_function_effect(intr)
        else:
            fe = FunctionEffects(intr)
            IntrinsicArgumentEffects[intr] = fe
            if isinstance(intr, intrinsic.Class):
                save_function_effect(intr.fields)
1355829
def create(cls, uri, tlp_level=0, tags=[]):
        
        return cls._create(uri=uri, tlp_level=tlp_level, tags=tags)
365771
def convertTranscriptEffect(self, annStr, hgvsG):
        
        effect = self._createGaTranscriptEffect()
        effect.hgvs_annotation.CopyFrom(protocol.HGVSAnnotation())
        annDict = dict()
        if self._annotationType == ANNOTATIONS_SNPEFF:
            annDict = dict(zip(self. SNPEFF_FIELDS, annStr.split("|")))
        elif self._annotationType == ANNOTATIONS_VEP_V82:
            annDict = dict(zip(self.VEP_FIELDS, annStr.split("|")))
        else:
            annDict = dict(zip(self.CSQ_FIELDS, annStr.split("|")))
        annDict["hgvs_annotation.genomic"] = hgvsG if hgvsG else u''
        for key, val in annDict.items():
            try:
                protocol.deepSetAttr(effect, key, val)
            except AttributeError:
                if val and key not in self.EXCLUDED_FIELDS:
                    protocol.setAttribute(
                        effect.attributes.attr[key].values, val)
        effect.effects.extend(self.convertSeqOntology(annDict.get('effects')))
        self.addLocations(
            effect, annDict.get('protPos'), annDict.get('cdnaPos'))
        effect.id = self.getTranscriptEffectId(effect)
        return effect
172157
def v2_translator(self, option):
        
        new_option = option
        new_value = getattr(self, option)

        renaming_pairs = {
            "dontfrag": "dont_fragment",
            "maxhops": "max_hops",
            "firsthop": "first_hop",
            "use_NSID": "set_nsid_bit",
            "cd": "set_cd_bit",
            "do": "set_do_bit",
            "qbuf": "include_qbuf",
            "recursion_desired": "set_rd_bit",
            "noabuf": "include_abuf"
        }
        if option in renaming_pairs.keys():
            warninglog = (
                "DeprecationWarning: {0} option has been deprecated and "
                "renamed to {1}."
            ).format(option, renaming_pairs[option])
            print(warninglog)
            new_option = renaming_pairs[option]

        # noabuf was changed to include_abuf so we need a double-negative
        if option == "noabuf":
            new_value = not new_value

        return new_option, new_value
726829
def uriref_matches_iriref(v1: URIRef, v2: Union[str, ShExJ.IRIREF]) -> bool:
    
    return str(v1) == str(v2)
928044
def resolveURI(self, URI):
        
        ret = libxml2mod.xmlACatalogResolveURI(self._o, URI)
        return ret
444724
def mask_umi(umi, umi_quals, quality_encoding,  quality_filter_threshold):
    '''  '''
    below_threshold = get_below_threshold(
        umi_quals, quality_encoding, quality_filter_threshold)
    new_umi = ""

    for base, test in zip(umi, below_threshold):
        if test:
            new_umi += "N"
        else:
            new_umi += base

    return new_umi
116520
def create(cls, type):
        
        if type == 0: return FilterDropShadow(id)
        elif type == 1: return FilterBlur(id)
        elif type == 2: return FilterGlow(id)
        elif type == 3: return FilterBevel(id)
        elif type == 4: return FilterGradientGlow(id)
        elif type == 5: return FilterConvolution(id)
        elif type == 6: return FilterColorMatrix(id)
        elif type == 7: return FilterGradientBevel(id)
        else:
            raise Exception("Unknown filter type: %d" % type)