code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
- Feature Name: SQL Role-based access control - Status: in-progress - Start Date: 2017-11-18 - Authors: Marc Berhault - RFC PR: [#20149](https://github.com/cockroachdb/cockroach/pull/20149) - Cockroach Issue: [#20371](https://github.com/cockroachdb/cockroach/issues/20371) Table of Contents ================= * [Sum...
unknown
github
https://github.com/cockroachdb/cockroach
docs/RFCS/20171220_sql_role_based_access_control.md
/* * 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 n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/clients/admin/ForwardingAdmin.java
""" Module that provides a connection to the ModuleStore specified in the django settings. Passes settings.MODULESTORE as kwargs to MongoModuleStore """ from __future__ import absolute_import from importlib import import_module from django.conf import settings if not settings.configured: settings.configure() fro...
unknown
codeparrot/codeparrot-clean
# Simple example presenting how persistent ID can be used to pickle # external objects by reference. import pickle import sqlite3 from collections import namedtuple # Simple class representing a record in our database. MemoRecord = namedtuple("MemoRecord", "key, task") class DBPickler(pickle.Pickler): def persi...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.osv import osv, orm, fields from openerp.tools.translate import _ class sale_order_line(osv.Model): _inherit = "sale.order.line" _columns = { 'linked_line_id': fields.many2one('sale.order.line', 'Linked Order Line', domain="[('order...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * All rights re...
c
github
https://github.com/opencv/opencv
3rdparty/libjasper/jpc_math.h
#!/usr/local/bin/python #CHIPSEC: Platform Security Assessment Framework #Copyright (c) 2010-2016, Intel Corporation # #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 Foundation; Version 2. # #This program is ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, json from frappe.utils import getdate, date_diff, add_days, cstr from frappe import _ from frappe.model.document import Document class...
unknown
codeparrot/codeparrot-clean
import os import unittest import torch import torchvision from torch.utils.data import Subset from src.datasets.load_cifar10 import CIFAR10_TRAIN_MEAN, CIFAR10_TRAIN_STD, DATA_DIRPATH, SPLIT_DIRPATH from src.misc.utils import read_lines class TestCifar10(unittest.TestCase): def setUp(self) -> None: trans...
unknown
codeparrot/codeparrot-clean
from __future__ import with_statement import logging from .. import LoggingCompat, TracebackCompat from .cases import XTracebackTestCase, skipIfNoPygments from .config import BASIC_TEST, SIMPLE_EXCEPTION, SIMPLE_EXCEPTION_COLOR class MockLogHandler(logging.Handler): def __init__(self, level=logging.NOTSET): ...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # encoding: UTF-8 # Petar Forai # Thomas Nagy 2008 import re import Task, Utils, Logs from TaskGen import extension from Configure import conf import preproc SWIG_EXTS = ['.swig', '.i'] swig_str = '${SWIG} ${SWIGFLAGS} ${SRC}' cls = Task.simple_task_type('swig', swig_str, color='BLUE', before=...
unknown
codeparrot/codeparrot-clean
import json import uuid from contextvars import copy_context from typing import Any, cast import pytest from langchain_core.callbacks.manager import ( AsyncCallbackManager, CallbackManager, atrace_as_chain_group, trace_as_chain_group, ) from langchain_core.callbacks.stdout import StdOutCallbackHandler...
python
github
https://github.com/langchain-ai/langchain
libs/core/tests/unit_tests/runnables/test_config.py
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class TimeSelect < DateSelect # :nodoc: end end end end
ruby
github
https://github.com/rails/rails
actionview/lib/action_view/helpers/tags/time_select.rb
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """PID resolver tests.""" from __future__ import absolute_import, print_function fr...
unknown
codeparrot/codeparrot-clean
{ "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start" }, "dependencies": { "@auth0/auth0-react": "^1.12.0", "@tailwindcss/typography": "^0.5.7", "date-fns": "^2.29.3", "gray-matter": "4.0.3", "ioredis": "^5.2.4", "nanoid": "^4.0.0", ...
json
github
https://github.com/vercel/next.js
examples/blog-with-comment/package.json
# frozen_string_literal: true require "cases/encryption/helper" require "models/post_encrypted" class ActiveRecord::Encryption::ConcurrencyTest < ActiveRecord::EncryptionTestCase setup do ActiveRecord::Encryption.config.support_unencrypted_data = true end test "models can be encrypted and decrypted in diff...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/encryption/concurrency_test.rb
/* * Context structure declaration of the Mbed TLS software-based PSA drivers * called through the PSA Crypto driver dispatch layer. * This file contains the context structures of key derivation algorithms * which need to rely on other algorithms. * * \note This file may not be included directly. Applications...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/include/psa/crypto_builtin_key_derivation.h
--- title: Framework Routers order: 4 ---
unknown
github
https://github.com/remix-run/react-router
docs/api/framework-routers/index.md
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2014 University of Dundee & Open Microscopy Environment. # All Rights Reserved. # Use is subject to license terms supplied in LICENSE.txt # """ FOR TRAINING PURPOSES ONLY! """ from Parse_OMERO_Properties import USERNAME, PASSWORD, HOS...
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.fir.test.cases.generated.cases.components.scopeProvider; import com...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/scopeProvider/FirIdeNormalAnalysisScriptSourceModuleCombinedDeclaredMemberScopeTestGenerated.java
#!/usr/bin/env bash set -eu ./runme.py
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-container/runme.sh
<?php // autoload_static.php @generated by Composer namespace Composer\Autoload; class ComposerStaticInitFilesAutoload { public static $files = array ( '6d9003eea93a81f3586b5d9c5bd91272' => __DIR__ . '/..' . '/a/a/test.php', 'e56cac94f86c787e1efd645809df361d' => __DIR__ . '/..' . '/b/b/test2.php'...
php
github
https://github.com/composer/composer
tests/Composer/Test/Autoload/Fixtures/autoload_static_functions.php
# -*- coding: utf-8 -*- # # Copyright (C) 2010 Roberto Longobardi - seccanj@gmail.com # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # LABELS = { 'main_tab_title': "Test Manager", 'select_cat_to_move': "Seleziona il catalogo dove i...
unknown
codeparrot/codeparrot-clean
import { codeFixAll, createCodeFixAction, registerCodeFix, } from "../_namespaces/ts.codefix.js"; import { addToSeen, ArrowFunction, Diagnostics, factory, findChildOfKind, first, FunctionDeclaration, FunctionExpression, getContainingFunction, getEntityNameFromTypeNode...
typescript
github
https://github.com/microsoft/TypeScript
src/services/codefixes/fixAwaitInSyncFunction.ts
"""A custom backend for testing.""" from django.core.mail.backends.base import BaseEmailBackend class EmailBackend(BaseEmailBackend): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.test_outbox = [] def send_messages(self, email_messages): # Messages are st...
python
github
https://github.com/django/django
tests/mail/custombackend.py
# Copyright 2019 Google Inc. 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...
python
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/runlit.site.cfg.py
function Component() { let x = []; let items = [0, 1, 2]; for (const ii of items) { x.push(ii * 2); } return x; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [], isComponent: false, };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/for-of-simple.js
/* * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.network.sockets.tests import io.ktor.network.selector.* import io.ktor.network.sockets.* import io.ktor.test.junit.* import io.ktor.utils.io.* import io.mockk.* import kotlinx...
kotlin
github
https://github.com/ktorio/ktor
ktor-network/jvm/test/io/ktor/network/sockets/tests/ClientSocketTest.kt
"""Execute Ansible tests.""" from __future__ import absolute_import, print_function import json import os import collections import datetime import re import tempfile import time import textwrap import functools import shutil import stat import random import string import atexit import hashlib import lib.pytar impor...
unknown
codeparrot/codeparrot-clean
import logging from typing import Dict, Tuple from ..calling_conventions import SYSCALL_CC, SimCCSyscall from ..errors import AngrUnsupportedSyscallError, SimSolverError from ..procedures import SIM_PROCEDURES as P from .simos import SimOS _l = logging.getLogger(name=__name__) class SimUserland(SimOS): """ T...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.configuration.injection.filter; import static org.mockito.internal.exceptions.Reporter.cannotInjectDependency; import java.lang.reflect.Field; import java.util.Collectio...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/internal/configuration/injection/filter/TerminalMockCandidateFilter.java
#! /usr/bin/env python # -*- coding: utf-8 -*- """Make target labels for End-to-End model (Fisher corpus).""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from os.path import basename import re from tqdm import tqdm from collections import OrderedDict ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2018-2019 Netronome Systems, Inc. # Copyright (C) 2021 Isovalent, Inc. # In case user attempts to run with Python 2. from __future__ import print_function import argparse import re import sys, os class NoHelperFound(BaseException): ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package configs import ( "fmt" version "github.com/hashicorp/go-version" "github.com/hashicorp/hcl/v2" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" ) // VersionConstraint represents a version constraint on some res...
go
github
https://github.com/hashicorp/terraform
internal/configs/version_constraint.go
from cgi import escape import gzip as gzip_module import re import time import types import uuid from cStringIO import StringIO def resolve_content(response): rv = "".join(item for item in response.iter_content()) if type(rv) == unicode: rv = rv.encode(response.encoding) return rv class Pipeline(o...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012 Rackspace Hosting # 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 req...
unknown
codeparrot/codeparrot-clean
"""Test that a global ObjC object found before the process is started updates correctly.""" import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestObjCGlobalVar(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self...
unknown
codeparrot/codeparrot-clean
""" Kodi urlresolver plugin Copyright (C) 2016 tknorris 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 Foundation, either version 3 of the License, or (at your option) any later version...
unknown
codeparrot/codeparrot-clean
from django.contrib import admin from django.contrib.auth import views from django.contrib.auth.decorators import ( login_not_required, login_required, permission_required, ) from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.urls import urlpatterns as auth_urlpatterns from dj...
python
github
https://github.com/django/django
tests/auth_tests/urls.py
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: styled-output Help: Enable styled output for HTTP headers Added: 7.61.0 Category: verbose global Multi: boolean Scope: global See-also: - head - verbose Example: - --styled-output -I $URL --- # `--styled-output` E...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/styled-output.md
#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess import argparse import time import sys import os import re from . import color from . import ike_scan_wrapper from .logger import Logger logger = Logger.logger def banner(): """ Prints a banner message. """ print("ike-scan wrapper for t...
unknown
codeparrot/codeparrot-clean
# Eve W-Space # Copyright (C) 2013 Andrew Austin and other contributors # # 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 Foundation, either version 3 of the License, or # (at your option...
unknown
codeparrot/codeparrot-clean
# Copyright (c) Aaron Gallagher <_@habnab.it> # See COPYING for details. from __future__ import unicode_literals import os import pytest import vcversioner try: unicode except NameError: unicode = str class FakePopen(object): def __init__(self, stdout, stderr=b''): self.stdout = stdout ...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 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/leasing/cache.go
# -*- test-case-name: twisted.conch.test.test_scripts -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementation module for the `tkconch` command. """ import Tkinter, tkFileDialog, tkMessageBox from twisted.conch import error from twisted.conch.ui import tkvt100 from twisted.conch....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import os, sys, shutil, subprocess, argparse THIS_DIR = os.path.dirname(os.path.abspath(__file__)) DIST_DIR = os.path.join(THIS_DIR, "dist") sys.path.append(os.path.join(THIS_DIR, "src", "Selenium2Library")) sys.path.append(os.path.join(THIS_DIR, "doc")) sys.path.append(os.path.join(THIS_DIR, "d...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # MolMod is a collection of molecular modelling tools for python. # Copyright (C) 2007 - 2019 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center # for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights # reserved unless otherwise stated. # # This file is part of MolMod. # #...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo 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 ...
unknown
codeparrot/codeparrot-clean
class MockObject(object): def __init__(self, *p, **kw): self.__internaldict__ = { } self.__receivedcalls__ = [ ] if p is not () and 'name' in kw: p[0].children[kw['name']] = self def __getattr__(self, name): if name not in self.__dict__: self.__dict__[nam...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** DensifyGeometriesInterval.py by Anita Graser, Dec 2012 based on DensifyGeometries.py --------------------- Date : October 2012 Copyright : (C) 2012 by Victor Olaya ...
unknown
codeparrot/codeparrot-clean
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config file for Python...
unknown
codeparrot/codeparrot-clean
import os import warnings from django.conf import settings from django.core.files.storage import FileSystemStorage from django.utils.deconstruct import deconstructible __doc__ = """ I needed to efficiently create a mirror of a directory tree (so that "origin pull" CDNs can automatically pull files). The trick was tha...
unknown
codeparrot/codeparrot-clean
""" Serializer for video outline """ from rest_framework.reverse import reverse from xmodule.modulestore.mongo.base import BLOCK_TYPES_WITH_CHILDREN from courseware.access import has_access from courseware.model_data import FieldDataCache from courseware.module_render import get_module_for_descriptor from util.module_...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='maxwell-faker', version='0.1.0', description='Maxwell faker for systems and load testing', url='https://github.com/movio/maxwell-faker', author='Nicolas Maquet and Nan Wu', author_email='nicolas@movio.co, nan@movi...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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
import Head from "next/head"; import Container from "../components/container"; import MoreStories from "../components/more-stories"; import HeroPost from "../components/hero-post"; import Intro from "../components/intro"; import Layout from "../components/layout"; import { EXAMPLE_TOOL_NAME } from "../lib/constants"; i...
typescript
github
https://github.com/vercel/next.js
examples/cms-enterspeed/pages/index.tsx
/* * Copyright (C) 2010 The Guava 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 agre...
java
github
https://github.com/google/guava
android/guava-tests/test/com/google/common/collect/SpecialRandom.java
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, unittest, uuid from frappe.model.delete_doc import delete_doc from frappe.utils.data import today, add_to_date from frappe import _dict from frappe.utils import ge...
unknown
codeparrot/codeparrot-clean
{ "title": "Add property binding to components", "type": "editor", "answerSrc": "../07-dynamic-template-values/src", "answerRootDir": "../07-dynamic-template-values", "openFiles": ["src/app/home/home.ts"] }
json
github
https://github.com/angular/angular
adev/src/content/tutorials/first-app/steps/06-property-binding/config.json
""" The Staff Area View mixin renders all the staff-specific information used to determine the flow of the problem. """ import copy from functools import wraps import logging from xblock.core import XBlock from openassessment.assessment.errors import ( PeerAssessmentInternalError, ) from openassessment.workflow.er...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2007 The Guava 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 agre...
java
github
https://github.com/google/guava
android/guava-tests/test/com/google/common/util/concurrent/TestExceptions.java
import os from sanic import Sanic from sanic.log import log from sanic.response import json, text, file from sanic.exceptions import ServerError app = Sanic(__name__) @app.route("/") async def test_async(request): return json({"test": True}) @app.route("/sync", methods=['GET', 'POST']) def test_sync(request): ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/even/python import os import re import sys dirname = "" RE_CODE_BLOCK = re.compile(r'.. code-block:: (.+?)\s*$') RE_INCLUDE = re.compile(r'.. include:: (.+?)\s*$') RE_REFERENCE = re.compile(r':(.+?):`(.+?)`') def include_file(lines, pos, match): global dirname orig_filename = match.groups()[0] ...
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...
json
github
https://github.com/apache/kafka
clients/src/main/resources/common/message/OffsetFetchRequest.json
// Copyright 2011 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_sse2.c
import numpy as np from numpy.testing import assert_equal, assert_array_equal from scipy.stats import rankdata, tiecorrect import pytest class TestTieCorrect(object): def test_empty(self): """An empty array requires no correction, should return 1.0.""" ranks = np.array([], dtype=np.float64) ...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function import os import sys import time import copy import numpy from six.moves import xrange import theano from theano import tensor, config from theano.sandbox import rng_mrg from theano.sandbox.rng_mrg import MRG_RandomStreams from theano.sandbox.cuda import cuda_available if cuda_av...
unknown
codeparrot/codeparrot-clean
// boost cstdint.hpp header file ------------------------------------------// // (C) Copyright Beman Dawes 1999. // (C) Copyright Jens Mauer 2001 // (C) Copyright John Maddock 2001 // Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.b...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/cstdint.hpp
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package mongodb import ( "context" "crypto/tls" "crypto/x509" "fmt" "net/http" "reflect" "strings" "sync" "testing" "time" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/hashicorp/vault/helper/testh...
go
github
https://github.com/hashicorp/vault
plugins/database/mongodb/mongodb_test.go
// Copyright 2020 The Abseil 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 by applicable law or agr...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/strings/internal/str_format/parser.h
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl --> # curl connection filters Connection filters is a design in the internals of curl, not visible in its public API. They were added in curl v7.87.0. This document describes the concepts, its high level implementation and the...
unknown
github
https://github.com/curl/curl
docs/internals/CONNECTION-FILTERS.md
from __future__ import absolute_import, division, unicode_literals from collections import OrderedDict import pytest import html5lib from html5lib.filters.alphabeticalattributes import Filter from html5lib.serializer import HTMLSerializer @pytest.mark.parametrize('msg, attrs, expected_attrs', [ ( 'no at...
unknown
codeparrot/codeparrot-clean
// Generated using cgo, then manually converted into appropriate naming and code // for the Go runtime. // go tool cgo -godefs defs_linux.go defs1_linux.go defs2_linux.go package runtime import "unsafe" const ( _EINTR = 0x4 _EAGAIN = 0xb _ENOMEM = 0xc _ENOSYS = 0x26 _PROT_NONE = 0x0 _PROT_READ = 0x1 _PROT...
go
github
https://github.com/golang/go
src/runtime/defs_linux_riscv64.go
import { combinePaths, ConditionalType, Debug, EvolvingArrayType, getLineAndCharacterOfPosition, getSourceFileOfNode, IndexedAccessType, IndexType, IntersectionType, LineAndCharacter, Node, ObjectFlags, Path, ReverseMappedType, SubstitutionType, timestamp,...
typescript
github
https://github.com/microsoft/TypeScript
src/compiler/tracing.ts
from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait class CartPage: def __init__(self, driver): self.driver = driver self....
unknown
codeparrot/codeparrot-clean
//! Emulate LLVM intrinsics use crate::intrinsics::*; use crate::prelude::*; pub(crate) fn codegen_llvm_intrinsic_call<'tcx>( fx: &mut FunctionCx<'_, '_, 'tcx>, intrinsic: &str, args: &[Spanned<mir::Operand<'tcx>>], ret: CPlace<'tcx>, target: Option<BasicBlock>, span: Span, ) { if intrinsi...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_codegen_cranelift/src/intrinsics/llvm.rs
/* * contrib/intarray/_intbig_gist.c */ #include "postgres.h" #include "_int.h" #include "access/gist.h" #include "access/reloptions.h" #include "access/stratnum.h" #include "common/int.h" #include "port/pg_bitutils.h" #define GETENTRY(vec,pos) ((GISTTYPE *) DatumGetPointer((vec)->vector[(pos)].key)) /* ** _intbig ...
c
github
https://github.com/postgres/postgres
contrib/intarray/_intbig_gist.c
from helper import unittest, PillowTestCase, py3 from PIL import Image class TestLibPack(PillowTestCase): def pack(self): pass # not yet def test_pack(self): def pack(mode, rawmode): if len(mode) == 1: im = Image.new(mode, (1, 1), 1) else: ...
unknown
codeparrot/codeparrot-clean
import json from unittest import skipIf from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.shortcuts import numpy from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature from ..data.rasters.textrasters import JSON_RASTER from...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import re import unicodedata import warnings from gzip import GzipFile from io import BytesIO from django.utils.encoding import force_text from django.utils.functional import allow_lazy, SimpleLazyObject from django.utils import six from django.utils.six.moves import html_entit...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 OpenStack Foundation # # 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
/* Generated from basque.sbl by Snowball 3.0.0 - https://snowballstem.org/ */ #include "stem_UTF_8_basque.h" #include <stddef.h> #include "snowball_runtime.h" struct SN_local { struct SN_env z; int i_p2; int i_p1; int i_pV; }; typedef struct SN_local SN_local; #ifdef __cplusplus extern "C" { #endi...
c
github
https://github.com/postgres/postgres
src/backend/snowball/libstemmer/stem_UTF_8_basque.c
# -*- coding: utf-8 -*- """ celery.worker.autoscale ~~~~~~~~~~~~~~~~~~~~~~~ This module implements the internal thread responsible for growing and shrinking the pool according to the current autoscale settings. The autoscale thread is only enabled if autoscale has been enabled on the comma...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2021 The HuggingFace Inc. team. 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 # # U...
python
github
https://github.com/huggingface/transformers
examples/run_on_remote.py
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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 2 of the...
unknown
codeparrot/codeparrot-clean
import sys import traceback import datetime import unittest from tcmessages import TeamcityServiceMessages from tcunittest import strclass from tcunittest import TeamcityTestResult try: from nose.util import isclass # backwards compat from nose.config import Config from nose.result import TextTestResult from ...
unknown
codeparrot/codeparrot-clean
# $Id: misc.py 7487 2012-07-22 21:20:28Z milde $ # Authors: David Goodger <goodger@python.org>; Dethe Elza # Copyright: This module has been placed in the public domain. """Miscellaneous directives.""" __docformat__ = 'reStructuredText' import sys import os.path import re import time from docutils import io, nodes, ...
unknown
codeparrot/codeparrot-clean
use crate::spec::{Abi, Arch, FloatAbi, Target, TargetMetadata, TargetOptions, base}; pub(crate) fn target() -> Target { Target { llvm_target: "armv7-unknown-freebsd-gnueabihf".into(), metadata: TargetMetadata { description: Some("Armv7-A FreeBSD".into()), tier: Some(3), ...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/armv7_unknown_freebsd.rs
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/globocom/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com from pyvows import Vows, expect from tornado_pyvows.context import T...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from south.db import db from south.v2 import SchemaMigration from authentic2.compat import user_model_label class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'LibertyIdentityDump' db.delete_table(u'saml_libertyidentitydump') def backwards(sel...
unknown
codeparrot/codeparrot-clean
from sys import byteorder from array import array from struct import pack import pyaudio import wave THRESHOLD = 500 CHUNK_SIZE = 1024 FORMAT = pyaudio.paInt16 RATE = 44100 def is_silent(snd_data): "Returns 'True' if below the 'silent' threshold" return max(snd_data) < THRESHOLD def normalize(snd_data): ...
unknown
codeparrot/codeparrot-clean
# Wi-Fi Display test cases # Copyright (c) 2013, Jouni Malinen <j@w1.fi> # # This software may be distributed under the terms of the BSD license. # See README for more details. import logging logger = logging.getLogger() import time import threading import Queue import hwsim_utils import utils from test_p2p_autogo im...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 Google Inc. 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...
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 n...
java
github
https://github.com/apache/kafka
clients/src/test/java/org/apache/kafka/common/metrics/TokenBucketTest.java
import logging import os import shutil from typing import Any, Dict, List, Optional from zerver.data_import.import_util import build_attachment, create_converted_data_files class AttachmentHandler: def __init__(self) -> None: self.info_dict: Dict[str, Dict[str, Any]] = dict() def handle_message_data(...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 Pexego (<www.pexego.es>). All Rights Reserved # $Omar Castiñeira Saavedra$ # # This program is free software: you can redistribute it ...
unknown
codeparrot/codeparrot-clean
# Author: Dennis Lutter <lad1337@gmail.com> # Author: Jonathon Saine <thezoggy@gmail.com> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickGear. # # SickGear 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 S...
unknown
codeparrot/codeparrot-clean
""" The main QuerySet implementation. This provides the public API for the ORM. """ import copy import itertools import sys from django.conf import settings from django.core import exceptions from django.db import connections, router, transaction, IntegrityError from django.db.models.constants import LOOKUP_SEP from ...
unknown
codeparrot/codeparrot-clean
"""Here lies still breathing and only renderer implementation.""" from docutils.parsers.rst import directives from . import abc from .. import openapi20, openapi30, utils class HttpdomainOldRenderer(abc.RestructuredTextRenderer): option_spec = { # A list of endpoints to be rendered. Endpoints must be wh...
unknown
codeparrot/codeparrot-clean