Calculates a Bloom filter with the specified parameters.
        Initalizes with a string or list/set/tuple of strings. No output.

        Reference material: http://bitworking.org/news/380/bloom-filter-resources
979972
def create_hash(self, initial, capacity, error):
        
        self.hash = 0
        self.hashbits, self.num_hashes = self._optimal_size(capacity, error)

        if len(initial):
            if type(initial) == str:
                self.add(initial)
            else:
                for t in initial:
                    self.add(t)
518711
def get_initializers(self) -> List[Tuple[str, mx.init.Initializer]]:
        
        patterns_vals = []
        # Load from args/auxs
        for k in self.args.keys():
            patterns_vals.append((k, mx.init.Load({k: self.args[k]})))
        for k in self.auxs.keys():
            patterns_vals.append((k, mx.init.Load({k: self.auxs[k]})))
        # Initialize
        for k in self.names:
            patterns_vals.append((k, mx.init.Xavier(rnd_type='uniform', factor_type='avg', magnitude=3)))

        return patterns_vals
952239
@Override
	public void invoke(IN tuple) {

		tupleList.add(tuple);
		if (updateCondition()) {
			format.write(path, tupleList);
			resetParameters();
		}

	}
1350198
public static BloomFilter create(long expectedNumItems, long numBits) {
    if (expectedNumItems <= 0) {
      throw new IllegalArgumentException("Expected insertions must be positive");
    }

    if (numBits <= 0) {
      throw new IllegalArgumentException("Number of bits must be positive");
    }

    return new BloomFilterImpl(optimalNumOfHashFunctions(expectedNumItems, numBits), numBits);
  }
16893
private void init() {
        if (initialized) return;

        // Initialise variables
        setTokenizer(new CharacterTokenizer(Arrays.asList(',', ';'), ","));
        Editable text = getText();
        assert null != text;
        spanWatcher = new TokenSpanWatcher();
        textWatcher = new TokenTextWatcher();
        hiddenContent = null;
        countSpan = new CountSpan();

        // Initialise TextChangedListeners
        addListeners();

        setTextIsSelectable(false);
        setLongClickable(false);

        //In theory, get the soft keyboard to not supply suggestions. very unreliable
        setInputType(getInputType() |
                InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS |
                InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE);
        setHorizontallyScrolling(false);

        // Listen to IME action keys
        setOnEditorActionListener(this);

        // Initialise the text filter (listens for the split chars)
        setFilters(new InputFilter[]{new InputFilter() {
            @Override
            public CharSequence filter(CharSequence source, int start, int end,
                                       Spanned dest, int destinationStart, int destinationEnd) {
                if (internalEditInProgress) {
                    return null;
                }

                // Token limit check
                if (tokenLimit != -1 && getObjects().size() == tokenLimit) {
                    return "";
                }

                //Detect split characters, remove them and complete the current token instead
                if (tokenizer.containsTokenTerminator(source)) {
                    //Only perform completion if we don't allow free form text, or if there's enough
                    //content to believe this should be a token
                    if (preventFreeFormText || currentCompletionText().length() > 0) {
                        performCompletion();
                        return "";
                    }
                }

                //We need to not do anything when we would delete the prefix
                if (destinationStart < prefix.length()) {
                    //when setText is called, which should only be called during restoring,
                    //destinationStart and destinationEnd are 0. If not checked, it will clear out
                    //the prefix.
                    //This is why we need to return null in this if condition to preserve state.
                    if (destinationStart == 0 && destinationEnd == 0) {
                        return null;
                    } else if (destinationEnd <= prefix.length()) {
                        //Don't do anything
                        return prefix.subSequence(destinationStart, destinationEnd);
                    } else {
                        //Delete everything up to the prefix
                        return prefix.subSequence(destinationStart, prefix.length());
                    }
                }
                return null;
            }
        }});

        initialized = true;
    }
704961
@Override
  public final void initialize(final Password pconstraintAnnotation) {
    messageBlacklist = pconstraintAnnotation.messageBlacklist();
    messageStartCharacters = pconstraintAnnotation.messageStartCharacters();
    messageMaxRepeat = pconstraintAnnotation.messageMaxRepeat();
    minRules = pconstraintAnnotation.minRules();
    if (pconstraintAnnotation.blacklist() == null) {
      blacklist = Collections.emptyList();
    } else {
      blacklist = Arrays.asList(StringUtils.split(pconstraintAnnotation.blacklist(), ',')).stream()
          .filter(entry -> StringUtils.isNotEmpty(entry)).map(entry -> entry.trim().toLowerCase())
          .collect(Collectors.toList());
    }
    if (StringUtils.isEmpty(pconstraintAnnotation.disalowedStartChars())) {
      disalowedStartChars = null;
    } else {
      disalowedStartChars = pconstraintAnnotation.disalowedStartChars().toCharArray();
    }
    maxRepeatChar = pconstraintAnnotation.maxRepeatChar();
  }
246853
private void initFilter() {
        EntityMetadata metadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClass);
        Metamodel metaModel = kunderaMetadata.getApplicationMetadata().getMetamodel(getPersistenceUnit());
        EntityType entityType = metaModel.entity(entityClass);

        if (null == filter) {
            List<String> clauses = new ArrayList<String>();
            addDiscriminatorClause(clauses, entityType);
            return;
        }
        WhereClause whereClause = KunderaQueryUtils.getWhereClause(getJpqlExpression());

        KunderaQueryUtils.traverse(whereClause.getConditionalExpression(), metadata, kunderaMetadata, this, false);

        for (Object filterClause : filtersQueue) {

            if (!(filterClause instanceof String)) {
                onTypedParameter(((FilterClause) filterClause));
            }

        }

        addDiscriminatorClause(null, entityType);
    }
143712
public void initTree(String filter) {

        m_root.expandAll();
        m_root.matchAll(filter);
        List<NavigationNode> leaves = m_root.getLeaves();
        m_root.markAsKeep();
        for (NavigationNode leaf : leaves) {
            leaf.setIsLeaf(true);
            NavigationNode current = leaf;
            while ((current != null) && (current != m_root) && !current.isMatch()) {
                current = current.getParent();
            }
            while (current != null) {
                current.markAsKeep();
                current = current.getParent();
            }

        }
        m_root.removeUnmarkedNodes();
    }
1345626
function initParams(uri, options, callback) {
      if (typeof options === 'function') {
        callback = options
      }

      var params = {}
      if (typeof options === 'object') {
        extend(params, options, { uri: uri })
      } else if (typeof uri === 'string') {
        extend(params, { uri: uri })
      } else {
        extend(params, uri)
      }

      params.callback = callback
      return params
    }
557773
public void set_filter(filtervalue[] filter) 
	{
		String str = null;
		for (int i = 0; i < filter.length; i++)
		{
			if (str != null)
				str = str + ",";
			if (str == null)
				str = filter[i].get_name() + ":" + nitro_util.encode(filter[i].get_value());
			else
				str = str + filter[i].get_name() + ":" + nitro_util.encode(filter[i].get_value());;
		}
		this.filter = str;
	}
45924
public boolean init(String s1) {
        if (s1 == null) {
            Tr.error(tc, "AUTH_FILTER_INIT_NULL_STRING");
            return false;
        }

        //break up conditions around semicolon
        StringTokenizer st1 = new StringTokenizer(s1, ";");
        StringTokenizer st2 = null;
        String s2 = null;

        while (st1.hasMoreTokens()) {

            s2 = st1.nextToken();

            //break up individual condition based on its three parts
            st2 = new StringTokenizer(s2, "^=!<>%");

            //first token is the HTTP header name
            String key = st2.nextToken();
            if (!st2.hasMoreTokens()) {
                Tr.error(tc, "AUTH_FILTER_MALFORMED_CONDITION", new Object[] { s1, s2, null });
                return false; // if no second token we have a problem
            }

            //second token is the value
            String valueString = st2.nextToken();

            // between the tokens there is the operand
            String operand = s2.substring(key.length(),
                                          s2.length() - valueString.length()).trim();

            //IP addresses are special
            boolean ipAddress = false;
            if (REMOTE_ADDRESS.equals(key))
                ipAddress = true;
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Adding " + key + " " + operand + " " + valueString);
            }

            //This is awful but existing api doesn't allow for an exception
            // So, I have the throw a runtimeexception if I can't parse the condition
            try {
                ICondition condition = makeConditionWithSymbolOperand(key, operand, valueString,
                                                                      ipAddress);
                filterCondition.add(condition);
            } catch (FilterException e) {
                throw new RuntimeException(e);
            }

        }
        return true;
    }
151705
def _initial_key(self):
        
        key = []
        undefined = []
        stream_params = set(util.stream_parameters(self.streams))
        for kdim in self.kdims:
            if str(kdim) in stream_params:
                key.append(None)
            elif kdim.default:
                key.append(kdim.default)
            elif kdim.values:
                if all(util.isnumeric(v) for v in kdim.values):
                    key.append(sorted(kdim.values)[0])
                else:
                    key.append(kdim.values[0])
            elif kdim.range[0] is not None:
                key.append(kdim.range[0])
            else:
                undefined.append(kdim)
        if undefined:
            msg = ('Dimension(s) {undefined_dims} do not specify range or values needed '
                   'to generate initial key')
            undefined_dims = ', '.join(['%r' % str(dim) for dim in undefined])
            raise KeyError(msg.format(undefined_dims=undefined_dims))

        return tuple(key)
194621
public static void init(Iterable<ObjectMapper> mappers, String filter) throws IllegalStateException {
        init(mappers, new SimpleSquigglyContextProvider(new SquigglyParser(), filter));
    }
686166
@Override
	public boolean contains(String str) {
		for (BloomFilter filter : filters) {
			if (filter.contains(str) == false) {
				return false;
			}
		}
		return true;
	}
813662
void initializeRandomAttributes(SimpleTypeInformation<V> in) {
    int d = ((VectorFieldTypeInformation<V>) in).getDimensionality();
    selectedAttributes = BitsUtil.random(k, d, rnd.getSingleThreadedRandom());
  }
779038
public void initFunctionData(int parametersCount) {
    params = new CallParameter[parametersCount];
    for (int i = 0; i < parametersCount; i++) {
      params[i] = new CallParameter();
      if (i > 0) {
        params[i].setInput(true);
      }
    }
    // the query was in the form {?=call function()}, so the first parameter is always output
    params[0].setOutput(true);
  }
1374170
private void initOffsets() {
    if (offsets == null) {
      int count;
      int index;
      // count names
      count = 0;
      index = 0;
      while (index < path.length) {
        byte c = path[index++];
        if (c != '/') {
          count++;
          while (index < path.length && path[index] != '/')
            index++;
        }
      }
      // populate offsets
      int[] result = new int[count];
      count = 0;
      index = 0;
      while (index < path.length) {
        byte c = path[index];
        if (c == '/') {
          index++;
        } else {
          result[count++] = index++;
          while (index < path.length && path[index] != '/')
            index++;
        }
      }
      synchronized (this) {
        if (offsets == null)
          offsets = result;
      }
    }
  }