code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
#
# PKCS#8 syntax
#
# ASN.1 source from:
# http://tools.ietf.org/html/rfc5208
#
# Sample captures could be obtained with "openssl pkcs8 -topk8" command
#
from pyasn1.type import tag, namedtype, namedval, univ, constraint
from pyasn1_modules.rfc2459 import *
from pyasn1_modules import rfc2251
class KeyEncryptionAlgorit... | unknown | codeparrot/codeparrot-clean | ||
//===- bolt/Passes/JTFootprintReduction.cpp -------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | cpp | github | https://github.com/llvm/llvm-project | bolt/lib/Passes/JTFootprintReduction.cpp |
"""
Module responsible for translating reference sequence data into GA4GH native
objects.
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import hashlib
import json
import os
import random
import pysam
import ga4gh.datamodel as datamodel
import ga4gh.... | unknown | codeparrot/codeparrot-clean | ||
''' A collection of functions used to compare Vcf objects.'''
import re
def common_variants(vcf1, vcf2):
''' Find common variants between two VCF objects
and return common variants in a list.
Args:
vcf1: first VCF object
vcf2: second VCF object
Notes:
this could be replaced ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
werkzeug.contrib.testtools
~~~~~~~~~~~~~~~~~~~~~~~~~~
This module implements extended wrappers for simplified testing.
`TestResponse`
A response wrapper which adds various cached attributes for
simplified assertions on various content types.
:copyright:... | unknown | codeparrot/codeparrot-clean | ||
# devices/storage.py
# Base class for block device classes.
#
# Copyright (C) 2009-2014 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later v... | unknown | codeparrot/codeparrot-clean | ||
from nbodykit.core import GridSource
import numpy
from pmesh.pm import ParticleMesh, RealField, ComplexField
class BigFileGridSource(GridSource):
"""
Class to read field gridded data from a binary file
Notes
-----
* Reading is designed to be done by `GridPainter`, which
reads gridded quantit... | unknown | codeparrot/codeparrot-clean | ||
//===--- IRGenDebugInfo.h - Debug Info Support ------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | c | github | https://github.com/apple/swift | lib/IRGen/IRGenDebugInfo.h |
from django.utils.translation import ugettext_lazy as _ # noqa
from horizon import exceptions
from openstack_dashboard.api import glance
def get_available_images(request, project_id=None, images_cache=None):
"""
Returns a list of images that are public or owned by the given
project_id. If project_id is ... | unknown | codeparrot/codeparrot-clean | ||
from ajenti.ui import *
from ajenti.com import implements
from ajenti.api import *
from ajenti.utils import *
from backend import *
class FirewallPlugin(CategoryPlugin):
text = 'Firewall'
icon = '/dl/iptables/icon.png'
folder = 'system'
defactions = ['ACCEPT', 'DROP', 'REJECT', 'LOG', 'EXIT', 'MASQUE... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from measurements import timeline_controller
from metrics import timeline
from telemetry.core.platform import tracing_category_filter
from telemetry.page impo... | unknown | codeparrot/codeparrot-clean | ||
{
"definitions": {
"AmdContainer": {
"description": "Add a container for define/require functions in the AMD module.",
"type": "string",
"minLength": 1
},
"AuxiliaryComment": {
"description": "Add a comment in the UMD wrapper.",
"anyOf": [
{
"description": "... | json | github | https://github.com/webpack/webpack | schemas/plugins/container/ContainerPlugin.json |
// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Test range over strings.
package main
import (
"fmt"
"os"
"unicode/utf8"
)
func main() {
s := "\000\123\x00\xca\xFE\u0123\ubabe\U0000babe\U001... | go | github | https://github.com/golang/go | test/stringrange.go |
"""Tabs API Version 1.0.
This API client was generated using a template. Make sure this code is valid before using it.
"""
import logging
from datetime import date, datetime
from .base import BaseCanvasAPI
from .base import BaseModel
class TabsAPI(BaseCanvasAPI):
"""Tabs API Version 1.0."""
def __init__(self... | unknown | codeparrot/codeparrot-clean | ||
import numpy as np
import pytest
from pandas.core.dtypes.common import is_integer
import pandas as pd
from pandas import (
Index,
Series,
)
import pandas._testing as tm
from pandas.core.indexes.datetimes import Timestamp
class TestSeriesQuantile:
def test_quantile(self, datetime_series):
q = date... | python | github | https://github.com/pandas-dev/pandas | pandas/tests/series/methods/test_quantile.py |
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Mirantis Inc.
# Copyright (c) 2014 Adrien Vergé <adrien.verge@numergy.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apach... | unknown | codeparrot/codeparrot-clean | ||
# __init__.py
# The toplevel DNF package.
#
# Copyright (C) 2012-2016 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This prog... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# Copyright (C) 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | unknown | codeparrot/codeparrot-clean | ||
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0... | go | github | https://github.com/kubernetes/kubernetes | pkg/apis/scheduling/v1/zz_generated.conversion.go |
// This is a comment.
'use strict'
/**
* This is a comment.
*/
import 'server-only'
export default function () {
return null
} | javascript | github | https://github.com/vercel/next.js | crates/next-custom-transforms/tests/errors/react-server-components/client-graph/server-only/input.js |
# -*- coding: utf-8 -*-
"""
werkzeug.datastructures
~~~~~~~~~~~~~~~~~~~~~~~
This module provides mixins and classes with an immutable interface.
:copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import re
import sys
import cod... | unknown | codeparrot/codeparrot-clean | ||
import pika
import time
import logging
import sys
import json
import threading
import traceback
class ampq(threading.Thread):
"""AMPQ wrapper class
"""
def __init__(self, group=None, target=None, name=None, args=(), kwargs=None, verbose=None, config={}, logger=None, on_data=None):
threading.Thre... | unknown | codeparrot/codeparrot-clean | ||
from django.contrib.auth import models
from django.contrib.auth.management.commands import changepassword
from django.core.management import call_command
from django.test import TestCase
from django.utils.six import StringIO
class MultiDBChangepasswordManagementCommandTestCase(TestCase):
multi_db = True
def s... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2010-2025 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.analysis.api.renderer.declarations.renderers.callables
import org.jetbrains.kotl... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/renderer/declarations/renderers/callables/KaDestructuringDeclarationRenderer.kt |
import imp
import os
import inspect
py_builtins = ["math", "sys"]
def load_module(mpath, path = []):
m = None
if mpath in py_builtins:
m = __import__(mpath)
else:
try:
mod = imp.find_module(mpath, path)
m = imp.load_module(mpath, *mod)
f , _ , _ = mod
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from openerp.tests import common
class test_inherits(common.TransactionCase):
def test_00_inherits(self):
""" Check that a many2one field with delegate=True adds an entry in _inherits """
daughter = self.env['test.inherit.daughter']
self.assertEqual(daughter._inher... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsServer GetFeatureInfo WMS with PG.
From build dir, run: ctest -R PyQgsServerWMSGetFeatureInfoPG -V
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Fou... | unknown | codeparrot/codeparrot-clean | ||
"""
Entrance Exams view module -- handles all requests related to entrance exam management via Studio
Intended to be utilized as an AJAX callback handler, versus a proper view/screen
"""
import logging
from functools import wraps
from django.conf import settings
from django.contrib.auth.decorators import login_require... | unknown | codeparrot/codeparrot-clean | ||
# /usr/bin/python
# -*- coding: utf-8 -*-
"""
This program is to:
Use various feature functions to train a MALLET MaxEnt model to classify whether
entities in a text are coreferent or not.
"""
import collections
import subprocess
import sys
import cPickle as pickle
from nltk.stem.lancaster import LancasterStemmer
re... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 20... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
from __future__ import annotations
import argparse
import re
import sys
from pathlib import Path
from typing import Any
from typing_extensions import TypedDict # Python 3.11+
import yaml
Step = dict[str, Any]
class Script(TypedDict):
extension: str
script: str
def extract(step: Ste... | python | github | https://github.com/pytorch/pytorch | tools/extract_scripts.py |
/*
* mtx is a slightly simplified version of malloc_mutex. This code duplication
* is unfortunate, but there are allocator bootstrapping considerations that
* would leak into the test infrastructure if malloc_mutex were used directly
* in tests.
*/
typedef struct {
#ifdef _WIN32
CRITICAL_SECTION lock;
#elif (de... | c | github | https://github.com/redis/redis | deps/jemalloc/test/include/test/mtx.h |
"""Django ORM models for Social Auth"""
import six
from django.db import models
from django.conf import settings
from django.db.utils import IntegrityError
from social.utils import setting_name
from social.storage.django_orm import DjangoUserMixin, \
DjangoAssociationMixin, \
... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf8
from __future__ import unicode_literals, print_function, division
from clldutils.path import walk
from clldutils.jsonlib import load
from util import REPO_DIR, read_terms, ns
def iterproperties(obj):
if isinstance(obj, dict):
for k, v in obj.items():
yield k, v
for ... | unknown | codeparrot/codeparrot-clean | ||
# This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (a... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-framework | spring-beans/src/test/java/org/springframework/beans/factory/aot/AotServicesTests.java |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Alexander Akait @alexander-akait
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
/** @typedef {import("../Compilation")} Compila... | javascript | github | https://github.com/webpack/webpack | lib/runtime/ToBinaryRuntimeModule.js |
from guardian.models import GroupObjectPermission
from django.contrib.auth.models import Group, Permission
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ObjectDoesNotExist
from django.db.models.signals import post_save, pre_save
from django.dispatch import receiver
from... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
import logging
from mopidy import backend, exceptions, httpclient
from mopidy.audio import scan
from mopidy.models import Ref, SearchResult
from mopidy.internal import http, playlists
import pykka
import requests
import mopidy_tunein
from mopidy_tunein import translator, tun... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.osv import fields, osv
from openerp.tools.translate import _
class stock_invoice_onshipping(osv.osv_memory):
_inherit = "stock.invoice.onshipping"
def _get_invoice_type(self, cr, uid, context=None)... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import annotations
import sys
from argparse import Namespace # noqa: TC003
from typing import TYPE_CHECKING
from w3lib.url import is_url
from scrapy.commands import ScrapyCommand
from scrapy.exceptions import UsageError
from scrapy.http import Request, Response
from scrapy.utils.datatypes import Seq... | python | github | https://github.com/scrapy/scrapy | scrapy/commands/fetch.py |
import os
import threading
import logging
import re
logger = logging.getLogger(__name__)
blobstore_service = None
server = None
from wsgiref.simple_server import WSGIRequestHandler
class NoLogRequestHandler(WSGIRequestHandler):
def log_request(self, code='-', size='-'):
"""Normally logs an accepted requ... | unknown | codeparrot/codeparrot-clean | ||
#
# Copyright (c) 2012 David Lenwell. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
werkzeug.testsuite.internal
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Internal tests.
:copyright: (c) 2014 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import unittest
from datetime import datetime
from warnings import filterwarnings, resetwarnings
from werkz... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# module pyparsing.py
#
# Copyright (c) 2003-2019 Paul T. McGuire
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitatio... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
import zmq
import argparse
import feedparser
import datetime
import time
import json
import util
def getTimestamp(t):
"""converts time-tuple from feedparser into datetime object"""
return datetime.datetime(t.tm_year, t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec)
def ... | unknown | codeparrot/codeparrot-clean | ||
from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.auth.decorators import login_required
from Web_App.models import Fir,general_diary,lookup_table
from police.models import Stationdata
from users.models import PanModel,VoterModel,RationModel,AadharModel
from django.utils import timezon... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
/*
#include <signal.h>
#include <pthread.h>
// Raise SIGIO.
static void CRaiseSIGIO(pthread_t* p) {
pthread_kill(*p, SIGIO);
}
*/
import "C"
im... | go | github | https://github.com/golang/go | src/cmd/cgo/internal/testcarchive/testdata/libgo4/libgo4.go |
---
title: root.tsx
order: 1
---
# root.tsx
[MODES: framework]
## Summary
<docs-info>
This file is required
</docs-info>
The "root" route (`app/root.tsx`) is the only _required_ route in your React Router application because it is the parent to all routes and is in charge of rendering the root `<html>` document.
... | unknown | github | https://github.com/remix-run/react-router | docs/api/framework-conventions/root.tsx.md |
#!/usr/bin/env python
# Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation (FSF), e... | unknown | codeparrot/codeparrot-clean | ||
/** @import { AST } from '#compiler' */
/** @import { Context } from '../types' */
import { is_tag_valid_with_parent } from '../../../../html-tree-validation.js';
import * as e from '../../../errors.js';
import { mark_subtree_dynamic } from './shared/fragment.js';
/**
* @param {AST.ExpressionTag} node
* @param {Cont... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/src/compiler/phases/2-analyze/visitors/ExpressionTag.js |
# Copyright 2019 Verily Life Sciences LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | unknown | codeparrot/codeparrot-clean | ||
#ifndef TRANSPORT_H
#define TRANSPORT_H
#include "run-command.h"
#include "remote.h"
#include "list-objects-filter-options.h"
#include "string-list.h"
struct git_transport_options {
unsigned thin : 1;
unsigned keep : 1;
unsigned followtags : 1;
unsigned check_self_contained_and_connected : 1;
unsigned self_conta... | c | github | https://github.com/git/git | transport.h |
import time
from enum import Enum
__enabled = False
class Scope(Enum):
Core = 1
Command = 0
class Profiler():
def __init__(self, scope, name, args=None, server=None):
self._scope = scope
self._name = name
self._args = args
self._server = server
def __enter__(self):
... | unknown | codeparrot/codeparrot-clean | ||
###############################################################################
#
# Copyright (c) 2011 Ruslan Spivak
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, inc... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
import logging
import os
from mkdocs import exceptions
from mkdocs import utils
log = logging.getLogger('mkdocs.config')
class ValidationError(Exception):
"""Raised during the validation process of the config on errors."""
class Config(utils.UserDict):
"""
MkDocs ... | unknown | codeparrot/codeparrot-clean | ||
"""
==============================================
Feature agglomeration vs. univariate selection
==============================================
This example compares 2 dimensionality reduction strategies:
- univariate feature selection with Anova
- feature agglomeration with Ward hierarchical clustering
Both metho... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/sh
# Copyright 2017 The Cockroach Authors.
#
# Use of this software is governed by the CockroachDB Software License
# included in the /LICENSE file.
# This script produces the list of authors that are "git blame"d for lines in
# .go files under the current directory.
#
# The regular expression for filenames ca... | unknown | github | https://github.com/cockroachdb/cockroach | scripts/git-blame-stats.sh |
/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-boot | buildSrc/src/test/java/org/springframework/boot/build/architecture/conditionalonclass/OnBeanMethod.java |
from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import TestObj, setup
class IfTagTests(SimpleTestCase):
@setup({'if-tag01': '{% if foo %}yes{% else %}no{% endif %}'})
def test_if_tag01(self):
output = self.engine.render_to_string('if-tag01', {'foo':... | unknown | codeparrot/codeparrot-clean | ||
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Package.pypi_home_page'
db.delete_column('package_package', 'pypi_home_page')
# Removin... | unknown | codeparrot/codeparrot-clean | ||
#ifndef RBIMPL_VALUE_TYPE_H /*-*-C++-*-vi:se ft=cpp:*/
#define RBIMPL_VALUE_TYPE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
* Permission is hereby granted, to either red... | c | github | https://github.com/ruby/ruby | include/ruby/internal/value_type.h |
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.analysis.api.standalone.fir.test.cases.generated.cases.components.substututorFact... | java | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/components/substututorFactory/FirStandaloneNormalAnalysisSourceModuleSubstitutorBuilderTestGenerated.java |
import unittest, time, sys, random
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i
# the downloaed csv will have fp precision issues relative to the first file
# so they won't be the same size when loaded back in?
#
# ==> csvDownload.csv <==
# "ID","CAPSULE","AGE","RA... | unknown | codeparrot/codeparrot-clean | ||
import unittest
import inspect
import os
from os.path import join
import numpy as np
from cylp.cy import CyCoinMpsIO
from cylp.cy.CyCoinMpsIO import getQpsExample
currentFilePath = os.path.dirname(inspect.getfile(inspect.currentframe()))
class TestCyCoinMpsIO(unittest.TestCase):
def test(self):
problem ... | unknown | codeparrot/codeparrot-clean | ||
#include =
#define =
#integrator = md
tinit = 0 #
dt = 0.002 #
nsteps = 2500000 #
init_step = 0 #
simulation_part = 1 #
#comm_mode = Linear
nstcomm ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: MPL-2.0
package keysutil
import (
"crypto"
"crypto/sha1"
"crypto/sha256"
"crypto/sha512"
"hash"
"golang.org/x/crypto/sha3"
)
type HashType uint32
const (
HashTypeNone HashType = iota
HashTypeSHA1
HashTypeSHA2224
HashTypeSHA2256
HashTypeSHA238... | go | github | https://github.com/hashicorp/vault | sdk/helper/keysutil/consts.go |
from template_tests.utils import setup
from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
class I18nGetCurrentLanguageBidiTagTests(SimpleTestCase):
libraries = {"i18n": "django.templatetags.i18n"}
@setup({"template": "{% load i18n %} {% get_current_language_bidi %}"})
... | python | github | https://github.com/django/django | tests/template_tests/syntax_tests/i18n/test_get_current_language_bidi.py |
use crate::io::{Interest, PollEvented};
use crate::net::tcp::TcpStream;
use crate::util::check_socket_for_blocking;
cfg_not_wasi! {
use crate::net::{to_socket_addrs, ToSocketAddrs};
}
use std::fmt;
use std::io;
use std::net::{self, SocketAddr};
use std::task::{ready, Context, Poll};
cfg_net! {
/// A TCP sock... | rust | github | https://github.com/tokio-rs/tokio | tokio/src/net/tcp/listener.rs |
#!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | unknown | codeparrot/codeparrot-clean | ||
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | unknown | codeparrot/codeparrot-clean | ||
#=======================================================================
#
# Python Lexical Analyser
#
# Classes for building NFAs and DFAs
#
#=======================================================================
from __future__ import absolute_import
import sys
from .Transitions import TransitionMap
LOWEST_P... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2016 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | go | github | https://github.com/etcd-io/etcd | client/v3/lease.go |
"""
@package mi.instrument.KML.CAM.driver
@file mi-instrument/mi/instrument/kml/cam/driver.py
@author Sung Ahn
@brief Driver for the CAMDS
"""
import time
import re
import os
import struct
from threading import Timer
from mi.core.common import BaseEnum
from mi.core.common import Units
from mi.core.exceptions import... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package exec
import (
"context"
"fmt"
"io"
"math"
"os"
"sort"
"sync"
"time"
"github.com/hashicorp/consul-template/child"
ctconfig "github.com/hashicorp/consul-template/config"
"github.com/hashicorp/consul-template/manager"
"github.com... | go | github | https://github.com/hashicorp/vault | command/agent/exec/exec.go |
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package tfdiags
import (
"errors"
"fmt"
"reflect"
"strings"
"testing"
"github.com/davecgh/go-spew/spew"
"github.com/hashicorp/hcl/v2"
)
func TestBuild(t *testing.T) {
type diagFlat struct {
Severity Severity
Summary string
Detail ... | go | github | https://github.com/hashicorp/terraform | internal/tfdiags/diagnostics_test.go |
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/compiler/mlir/lite/experimental/tac/common/subgraph.h |
# Copyright (C) 2012 Job Snijders <job.snijders@atrato-ip.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# ... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the COPYING file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be... | c | github | https://github.com/opencv/opencv | 3rdparty/libwebp/src/dsp/dec_sse41.c |
/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-boot | configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/specific/DoubleRegistrationProperties.java |
"""
This module is home to specific dtypes related functionality and their classes.
For more general information about dtypes, also see `numpy.dtype` and
:ref:`arrays.dtypes`.
Similar to the builtin ``types`` module, this submodule defines types (classes)
that are not widely used directly.
.. versionadded:: NumPy 1.2... | python | github | https://github.com/numpy/numpy | numpy/dtypes.py |
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
```esql
ROW a = "2023-01-23T12:15:00.000Z - some text - 127.0.0.1"
| DISSECT a """%{date} - %{msg} - %{ip}"""
| KEEP date, msg, ip
```
| date:keyword | msg:keyword | ip:keyword |
| --- | --- | --- |
| 20... | unknown | github | https://github.com/elastic/elasticsearch | docs/reference/query-languages/esql/_snippets/commands/examples/docs.csv-spec/basicDissect.md |
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "oid-array.h"
#include "hash-lookup.h"
void oid_array_append(struct oid_array *array, const struct object_id *oid)
{
ALLOC_GROW(array->oid, array->nr + 1, array->alloc);
oidcpy(&array->oid[array->nr++], oid);
if (!oid->algo)
oid_set_algo(&... | c | github | https://github.com/git/git | oid-array.c |
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/dtensor/cc/mesh_type.h |
/* Descriptors */
#ifndef Py_DESCROBJECT_H
#define Py_DESCROBJECT_H
#ifdef __cplusplus
extern "C" {
#endif
typedef PyObject *(*getter)(PyObject *, void *);
typedef int (*setter)(PyObject *, PyObject *, void *);
struct PyGetSetDef {
const char *name;
getter get;
setter set;
const char *doc;
void *c... | c | github | https://github.com/python/cpython | Include/descrobject.h |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# Backwards compatibility for Python 2.x
try:
from itertools import ifilter
filter = ifilter
except ImportError:
pass
def get_vers... | unknown | codeparrot/codeparrot-clean | ||
---
navigation_title: "Geo-distance"
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-distance-query.html
---
# Geo-distance query [query-dsl-geo-distance-query]
Matches [`geo_point`](/reference/elasticsearch/mapping-reference/geo-point.md) and [`geo_shape`](/reference/e... | unknown | github | https://github.com/elastic/elasticsearch | docs/reference/query-languages/query-dsl/query-dsl-geo-distance-query.md |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
"""
Support for myStrom switches.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/switch.mystrom/
"""
import logging
import voluptuous as vol
from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA)
from homeassistant.const import (C... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
from Tkinter import *
import tkMessageBox
import threshold_scheme
import sys
class Display(Frame):
def start_over(self):
self.destroy()
Display().mainloop()
def quit(self):
sys.exit()
def __init__(self,parent=0):
Frame.__init__(self,parent)
self.recover_button = Butto... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
"""
Generate file lists for apt-ftparchive.
@contact: Debian FTP Master <ftpmaster@debian.org>
@copyright: 2009 Torsten Werner <twerner@debian.org>
@copyright: 2011 Ansgar Burchardt <ansgar@debian.org>
@license: GNU General Public License version 2 or later
"""
# This program is free software; yo... | unknown | codeparrot/codeparrot-clean | ||
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | unknown | codeparrot/codeparrot-clean | ||
from datetime import datetime, timedelta
from flask import url_for, request, flash, redirect
from flask_login import current_user
from flask_rauth import RauthOAuth2, RauthOAuth1
from flaskext.babel import lazy_gettext as _
from ..models import db, Key, User
from ..views import auth
class AbstractRAuth(object):
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
import numpy as np
from numpy import abs, sin, cos, exp, floor, log, arange, prod, sqrt, sum
from .go_benchmark import Benchmark
class Gear(Benchmark):
r"""
Gear objective function.
This class defines the Gear [1]_ global optimization problem. This
is a multimodal minimizatio... | unknown | codeparrot/codeparrot-clean | ||
# d3-geo
Map projections are sometimes implemented as point transformations: a function that takes a given longitude *lambda* and latitude *phi*, and returns the corresponding *xy* position on the plane. For instance, here is the spherical Mercator projection (in radians):
```js
function mercator(lambda, phi) {
con... | unknown | github | https://github.com/d3/d3 | docs/d3-geo.md |
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
package v1alpha1
type GetSomethingRequestParams struct {
Message *string `json:"message,omitempty"`
}
// NewGetSomethingRequestParams creates a new GetSomethingRequestParams object.
func NewGetSomethingRequestParams() *GetSomethingRequestParams {
return &GetSomet... | go | github | https://github.com/grafana/grafana | apps/example/pkg/apis/example/v1alpha1/getsomething_request_params_types_gen.go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.