code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
// Copyright 2019 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import ( "context" "github.com/cockroachdb/cockroach/pkg/keys" "github.com/cockroachdb/cockroach/pkg/sql/catalog" "github.com/cockroachdb/cockroach/pkg...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/unsplit.go
from collections import OrderedDict import sys import warnings from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured from django.core.paginator import InvalidPage from django.core.urlresolvers import reverse from django.db import models from django.db.models.fields import FieldDoesNotExist from ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2.7 #-*- coding: utf-8 -*- from sklearn import svm class Models(object): def __init__(self, trained, evaluations, classify): self.trained = trained self.evaluations = evaluations self.classify = classify self.result = list() def svm_linear(self...
unknown
codeparrot/codeparrot-clean
__author__ = 'e.lyzlov' from selenium.webdriver.common.keys import Keys class MovieHelper: def __init__(self, app): self.app = app def add_movie(self, film): wd = self.app.wd self.app.open_add_movie_page() wd.find_element_by_name("name").clear() wd.find_element_by_name...
unknown
codeparrot/codeparrot-clean
import sys sys.path.insert(0, "..") import logging from opcua import Client from opcua import uaprotocol as ua class SubHandler(object): """ Client to subscription. It will receive events from server """ def datachange_notification(self, node, val, data): print("Python: New data change event...
unknown
codeparrot/codeparrot-clean
from subprocess import * import os system_lib = ['re', 'optparse', 'os', 'sys', 'shutil', 'warnings', 'Queue', 'osc', 'numpy', 'math', 'xml.dom', 'logging', 'random', 'ctypeasc', 'ConfigParser', 'getopt', 'ctypes', 'gzip', 'urllib', 'gtk', 'operator', 'time'] system_lib_find = ['cssutils', 'pyglet', 'encutils', 'squir...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 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. import unittest from api_data_source import APIDataSource from extensions_paths import CHROME_EXTENSIONS from servlet import Reque...
unknown
codeparrot/codeparrot-clean
import sys from numpy.testing import * from numpy.core import * from numpy.compat import asbytes # Guess the UCS length for this python interpreter if sys.version_info[0] >= 3: import array as _array ucs4 = (_array.array('u').itemsize == 4) def buffer_length(arr): if isinstance(arr, unicode): ...
unknown
codeparrot/codeparrot-clean
""" Tests for sklearn.cluster._feature_agglomeration """ # Authors: Sergul Aydore 2017 import numpy as np from sklearn.cluster import FeatureAgglomeration from sklearn.utils.testing import assert_true, assert_no_warnings from sklearn.utils.testing import assert_array_almost_equal def test_feature_agglomeration(): ...
unknown
codeparrot/codeparrot-clean
/* * 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/method/PackagePrivateMethodConfig.java
# -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest from django import forms from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ValidationError from django.core.files import File from django.utils.encoding import force_...
unknown
codeparrot/codeparrot-clean
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Shy Shalom # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved. #...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
{ "severity": "error", "summary": "Wrong noises", "detail": "Biological sounds are not allowed", "range": { "filename": "test.tf", "start": { "line": 2, "column": 9, "byte": 42 }, "end": { "line": 2, "column": 26, "byte": 59 } }, "snippet": { "cont...
json
github
https://github.com/hashicorp/terraform
internal/command/views/json/testdata/diagnostic/error-with-source-code-subject-and-expression-referring-to-a-collection-containing-a-sensitive-value.json
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package command import ( "fmt" "strings" "time" "github.com/hashicorp/cli" "github.com/posener/complete" ) var ( _ cli.Command = (*OperatorMembersCommand)(nil) _ cli.CommandAutocomplete = (*OperatorMembersCommand)(nil) ) type...
go
github
https://github.com/hashicorp/vault
command/operator_members.go
/** * Describes a file that represents a component definition */ export interface ComponentFile { path: string; moduleName: string; componentName: string; } export interface PackageDefinition { name: string; components: { moduleName: string; componentName: string; }[]; } const isLazyLoadingModul...
typescript
github
https://github.com/vercel/next.js
examples/cms-sitecore-xmcloud/scripts/templates/component-factory.ts
# frozen_string_literal: true class AddExpressions < ActiveRecord::Migration::Current def self.up create_table("expressions") do |t| t.column :expression, :string end end def self.down drop_table "expressions" end end
ruby
github
https://github.com/rails/rails
activerecord/test/migrations/10_urban/9_add_expressions.rb
import process import keywords import variable statement = "" scope = {} def parse(textline): text = textline.strip() if text == "": return if text[0] == '(': parse_process(text) else: parse_value(text) def parse_process(text): left = 0;right = 0; try: pa...
unknown
codeparrot/codeparrot-clean
import unittest import utils # O(n) time. O(1) space. Iteration. class Solution: def diStringMatch(self, s): """ :type s: str :rtype: List[int] """ lo = 0 hi = len(s) result = [] for ch in s: if ch == 'I': result.append(l...
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
# (c) 2014, Brian Coca <bcoca@ansible.com> # # This file is part of Ansible # # Ansible 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
# -*- coding: utf-8 -*- """ 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. This program is distributed in...
unknown
codeparrot/codeparrot-clean
# testing/assertions.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from __future__ import absolute_import from . import util as testutil from sqla...
unknown
codeparrot/codeparrot-clean
import pickle from django.contrib.auth.models import User from django.test import TestCase from django.utils.functional import SimpleLazyObject class TestUtilsSimpleLazyObjectDjangoTestCase(TestCase): def test_pickle(self): user = User.objects.create_user("johndoe", "john@example.com", "pass") x =...
python
github
https://github.com/django/django
tests/utils_tests/test_simplelazyobject.py
#!/usr/bin/python # TODO: issues with new oauth2 stuff. Keep using older version of Python for now. # #!/usr/bin/env python import json import gspread from oauth2client.client import SignedJwtAssertionCredentials import datetime from participantCollection import ParticipantCollection # Edit Me! participantFileNames =...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014, Facebook, Inc. All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # from sparts.tests.base import Ba...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ sockjs.tornado.periodic ~~~~~~~~~~~~~~~~~~~~~~~ This module implements customized PeriodicCallback from tornado with support of the sliding window. """ import time import logging LOG = logging.getLogger("tornado.general") class Callback(object): """Custom implementati...
unknown
codeparrot/codeparrot-clean
@usableFromInline @frozen struct Header { @usableFromInline let capacity: Int @usableFromInline var count: Int } public final class SimpleArray<T> { @usableFromInline let storage: ManagedBuffer<Header, T> @_alwaysEmitIntoClient @inline(__always) @inlinable var count: Int { get { return se...
swift
github
https://github.com/apple/swift
benchmark/utils/SimpleArray.swift
# -*- coding: utf-8 -*- __license__ = 'GPL 3' __copyright__ = '2009, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' import shutil from PyQt4.Qt import QString, QModelIndex from calibre.gui2.convert.single import (Config, sort_formats_by_preference, GroupModel, gprefs, get_output_for...
unknown
codeparrot/codeparrot-clean
# # Copyright (c) SAS Institute 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 or agreed to in w...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package healthcheck import ( "bytes" "crypto/x509" "fmt" "github.com/hashicorp/go-secure-stdlib/parseutil" ) type HardwareBackedRoot struct { Enabled bool UnsupportedVersion bool FetchIssues map[string]*PathFetch IssuerKeyMap map[stri...
go
github
https://github.com/hashicorp/vault
command/healthcheck/pki_hardware_backed_root.go
""" # Majic # Copyright (C) 2014 CEH # # 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 2 of the License, or # (at your option) any later version. # # This pr...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * 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
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/asm/mips.hpp
# Copyright (c) 2010 Howard Hughes Medical Institute. # All rights reserved. # Use is subject to Janelia Farm Research Campus Software Copyright 1.1 license terms. # http://license.janelia.org/license/jfrc_copyright_1_1.html class OntologyTerm(object): def __init__(self, ontology, oboStanza = None, *args, **k...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Cloudbase Solutions Srl # 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.ap...
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/KaPropertySetterSymbolRenderer.kt
#!/usr/bin/env python # -*- coding: utf-8 -*- # # (c) Copyright 2003-2009 Hewlett-Packard Development Company, L.P. # # 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 2 of the Lice...
unknown
codeparrot/codeparrot-clean
from datetime import datetime import unittest from django.conf import settings from django.db import models from django.utils.formats import localize from django.test import TestCase from django.contrib import admin from django.contrib.admin.util import display_for_field, label_for_field, lookup_field from django.con...
unknown
codeparrot/codeparrot-clean
it("should fail with a ReferenceError", () => { expect(() => { require("./cycle"); }).toThrow(); });
javascript
github
https://github.com/webpack/webpack
test/cases/errors/cyclic-reexport-references/index.js
// 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. //go:build dragonfly || freebsd || linux || netbsd || openbsd package runtime import ( "internal/abi" "unsafe" ) func dumpregs(c *sigctxt) { print("trap ...
go
github
https://github.com/golang/go
src/runtime/signal_arm.go
# -*- coding: utf-8 -*- """Constants used by Mutagen.""" GENRES = [ u"Blues", u"Classic Rock", u"Country", u"Dance", u"Disco", u"Funk", u"Grunge", u"Hip-Hop", u"Jazz", u"Metal", u"New Age", u"Oldies", u"Other", u"Pop", u"R&B", u"Rap", u"Reggae", ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ## begin license ## # # "Digitale Collectie ErfGeo Enrichment" is a service that attempts to automatically create # geographical enrichments for records in "Digitale Collectie" (http://digitalecollectie.nl) # by querying the ErfGeo search API (https://erfgeo.nl/search). # "Digitale Collectie Erf...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.db.transaction import atomic from django.utils.encoding import python_2_unicode_compatible from .exceptions import IrreversibleError @python_2_unicode_compatible class Migration(object): """ The base class for all migrations. Migration files will impor...
unknown
codeparrot/codeparrot-clean
# compiler definition for a generic C compiler # based on suncc.py from waf import os, optparse import Utils, Options, Configure import ccroot, ar from Configure import conftest from compiler_cc import c_compiler c_compiler['default'] = ['gcc', 'generic_cc'] c_compiler['hpux'] = ['gcc', 'generic_cc'] @conftest def ...
unknown
codeparrot/codeparrot-clean
// Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/rang...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/range.hpp
""" Support for monitoring OctoPrint sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.octoprint/ """ import logging import requests from blumate.const import TEMP_CELSIUS, CONF_NAME from blumate.helpers.entity import Entity from blumate.lo...
unknown
codeparrot/codeparrot-clean
apiVersion: v1 kind: Pod metadata: name: selector-test-pod-dont-apply labels: name: selector-test-pod-dont-apply unique-label: biz spec: containers: - name: kubernetes-pause image: registry.k8s.io/pause:3.10.1
unknown
github
https://github.com/kubernetes/kubernetes
hack/testdata/filter/pod-dont-apply.yaml
# Copyright (c) 2011 OpenStack Foundation # 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 ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2019 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/tensorflow/transforms/constant_fold.h
import unittest import getpass import os import shutil import time import tempfile from nose.plugins.skip import SkipTest from ansible.runner.action_plugins.synchronize import ActionModule as Synchronize class FakeRunner(object): def __init__(self): self.connection = None self.transport = None ...
unknown
codeparrot/codeparrot-clean
import xml.etree.ElementTree as ET import utm from datetime import datetime from config import * from database import * import logging logger = logging.getLogger(__name__) class importXML(object): def __init__(self): ''' CALL bindDBandFilepath BEFORE USING ''' self.do = 'Nothing' ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2015 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 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/apis/flowcontrol/v1beta1/register.go
/** * 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...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpConfig.java
/* * 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
buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/transport/RemoteHttpClientTransportTests.java
#!/usr/bin/env python3 import os import subprocess import paramiko import argparse import json # Manage the command line arguments parser = argparse.ArgumentParser() parser.add_argument('-u', '--update', action='store_true', help='Update the application') parser.add_argument('-b', '--build', action='store_true', hel...
unknown
codeparrot/codeparrot-clean
#define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> #include <structmember.h> #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "numpy/npy_math.h" #include "npy_config.h" #include "arrayobject.h" #include "iterators.h" #include "...
c
github
https://github.com/numpy/numpy
numpy/_core/src/multiarray/iterators.c
import platform, re, os from TestHarness import util from FactorySystem.MooseObject import MooseObject from tempfile import TemporaryFile import subprocess from signal import SIGTERM class Tester(MooseObject): """ Base class from which all tester objects are instanced. """ @staticmethod def validPa...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/classes/classStaticBlock/classStaticBlock18.ts] //// //// [classStaticBlock18.ts] function foo () { return class { static foo = 1; static { const c = class { static bar = 2; static { // do } } } } } //// [classStaticBlock18.js...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/classStaticBlock18(target=es5).js
from django.test import TestCase from readthedocs.builds.constants import LATEST from readthedocs.projects.models import Project from readthedocs.restapi.views.footer_views import get_version_compare_data class VersionCompareTests(TestCase): fixtures = ['eric.json', 'test_data.json'] def test_not_highest(sel...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import unittest from binascii import a2b_hex from pymodbus.pdu import * from pymodbus.transaction import * from pymodbus.factory import ServerDecoder class ModbusTransactionTest(unittest.TestCase): ''' This is the unittest for the pymodbus.transaction module ''' #----------------...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from authentic2.compat import user_model_label class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'SPOptionsIdPPolicy' db.create_table('saml_spoption...
unknown
codeparrot/codeparrot-clean
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/KeyStoreLoader.java
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ OMERO.fs Monitor module . Copyright 2009 University of Dundee. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import logging import threading __import__("omero.all") import omero.grid.monitors as monitors class MonitorFa...
unknown
codeparrot/codeparrot-clean
""" Tests for users API """ import datetime import ddt from mock import patch import pytz from django.conf import settings from django.utils import timezone from django.template import defaultfilters from certificates.models import CertificateStatuses from certificates.tests.factories import GeneratedCertificateFacto...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2012, Afterburn <http://github.com/afterburn> # (c) 2013, Aaron Bull Schaefer <aaron@elasticdog.com> # (c) 2015, Jonathan Lestrelin <jonathan.lestrelin@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # i...
unknown
codeparrot/codeparrot-clean
# -*- test-case-name: twisted.conch.test.test_cftp -*- # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Implementation module for the I{cftp} command. """ import os, sys, getpass, struct, tty, fcntl, stat import fnmatch, pwd, glob from twisted.conch.client import connect, default...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python LICENSE=""" Copyright (C) 2011 Michael Ihde 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 2 of the License, or (at your option) any later version. This progra...
unknown
codeparrot/codeparrot-clean
/* Copyright 2015 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 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/kubelet/container/runtime.go
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // 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
clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp
//// [tests/cases/conformance/classes/classStaticBlock/classStaticBlock4.ts] //// //// [classStaticBlock4.ts] class C { static s1 = 1; static { this.s1; C.s1; this.s2; C.s2; } static s2 = 2; static ss2 = this.s1; } //// [classStaticBlock4.js] "use strict"; class ...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/classStaticBlock4(target=es2022).js
// Copyright 2018 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/container/internal/hashtable_debug.h
/* * 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/main/java/org/springframework/boot/configurationprocessor/metadata/InvalidConfigurationMetadataException.java
#!/usr/bin/env python3 import lief import sys import termcolor as tc def get_typeval_as_str(lief_type): return str(lief_type).split('.')[1] def show_name(binary): print(tc.colored("[::] Name", "blue")) print(binary.name) def enum_header(header): def get_ident_props(): identity = "\n{0:18} {...
unknown
codeparrot/codeparrot-clean
use crate::spec::base::apple::{Arch, TargetEnv, base}; use crate::spec::{Os, Target, TargetMetadata, TargetOptions}; pub(crate) fn target() -> Target { let (opts, llvm_target, arch) = base(Os::TvOs, Arch::Arm64, TargetEnv::Simulator); Target { llvm_target, metadata: TargetMetadata { ...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/aarch64_apple_tvos_sim.rs
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/Activation.h> #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/TensorIterator.h> #include <ATen/TensorOperators.h> #include <ATen/OpMathType.h> #include <ATen/Parallel.h> #include <ATen/ScalarOps.h> #if defined(C10_MOBILE) && defin...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/Activation.cpp
# Lint as: python3 # Copyright 2019 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 ...
unknown
codeparrot/codeparrot-clean
from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler from django.db.backends.mysql import compiler SQLCompiler = compiler.SQLCompiler class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler): def resolve_columns(self, row, fields=()): """ Integrate the cases hand...
unknown
codeparrot/codeparrot-clean
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-commands.html --- # SQL commands [sql-commands] This section contains the list of SQL commands supported by Elasticsearch SQL along with their syntax: [DESCRIBE TABLE](/reference/query-languages/sql/sql-syntax-describe-table.md...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/sql/sql-commands.md
#!/usr/bin/env python # Copyright (c) 2012 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. """ A simple wrapper for protoc. - Adds includes in generated headers. - Handles building with system protobuf as an option. """ ...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/python """ test cases for the mini language output """ import unittest import edgelang import edgell class EdgeLangBaseTestCase(unittest.TestCase): """ base class with setUp """ _blank_move = [0, 0, 0] _LED_only = [0, 0, 1] def setUp(self): pass class EdgeLangLLTestCase(EdgeLan...
unknown
codeparrot/codeparrot-clean
## # Copyright 2012-2019 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import itertools from .common import InfoExtractor from ..compat import compat_HTTPError from ..utils import ( ExtractorError, int_or_none, float_or_none, parse_iso8601, ) class VidmeIE(InfoExtractor): IE_NAME = 'vidme' _VALID_URL = r'https?://vid\.me/(...
unknown
codeparrot/codeparrot-clean
# # @BEGIN LICENSE # # QCDB: quantum chemistry common driver and databases # # Copyright (c) 2011-2017 The QCDB Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of QCDB. # # QCDB is free software; you can redistribute it and/or modify # it ...
unknown
codeparrot/codeparrot-clean
#coding=utf-8 __author__ = 'answer-huang' import sys reload(sys) sys.setdefaultencoding('utf8') import wx from MyInfo import AboutMe from AHDropTarget import AHDropTarget import os import subprocess import sqlite3 class AHFrame(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, ...
unknown
codeparrot/codeparrot-clean
"""Forest of trees-based ensemble methods Those methods include random forests and extremely randomized trees. The module structure is the following: - The ``BaseForest`` base class implements a common ``fit`` method for all the estimators in the module. The ``fit`` method of the base ``Forest`` class calls the ...
unknown
codeparrot/codeparrot-clean
import numpy as np import math class RandSampler(object): """ Random sampler base class, used for data augmentation Parameters: ---------- max_trials : int maximum trials, if exceed this number, give up anyway max_sample : int maximum random crop samples to be generated """...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.fetch public typealias ArrayBufferLike = JsAny public external interface ArrayBufferView : JsAny { public var buffer: ArrayBufferLike public var byteLength: In...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-core/wasmJs/src/io/ktor/client/fetch/LibEs5.kt
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsRelation. .. 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 Foundation; either version 2 of the License, or (at your option) any later version. """ __aut...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2010, 2011, 2013 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 # License, or (at your optio...
unknown
codeparrot/codeparrot-clean
# 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
""" Contains reusable, expandable commands for the lifecycle and listing of repository groups, including manipulation of their membership. Customization of the commands in this module can be done either by specifying a method to the command's constructor or by subclassing and overriding the ``run(self, **kwargs)`` met...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function # Time: O(n) # Space: O(1) # Rotate an array of n elements to the right by k steps. # # For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. # # Note: # Try to come up as many solutions as you can, there are at least 3 different ways to solv...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import ( "context" "github.com/cockroachdb/cockroach/pkg/sql/catalog/colinfo" "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" ) // topKNode represe...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/topk.go
# $Id: images.py 7753 2014-06-24 14:52:59Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Directives for figures and simple images. """ __docformat__ = 'reStructuredText' import sys import urllib.request, urllib.parse, urllib.error from docutil...
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-context/src/main/java/org/springframework/jmx/export/assembler/MethodNameBasedMBeanInfoAssembler.java
use crate::runtime::time::{EntryList, TimerHandle, TimerShared}; use std::{array, fmt, ptr::NonNull}; /// Wheel for a single level in the timer. This wheel contains 64 slots. pub(crate) struct Level { level: usize, /// Bit field tracking which slots currently contain entries. /// /// Using a bit fiel...
rust
github
https://github.com/tokio-rs/tokio
tokio/src/runtime/time/wheel/level.rs
'''tzinfo timezone information for Australia/Melbourne.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Melbourne(DstTzInfo): '''Australia/Melbourne timezone definition. See datetime.tzinfo for details''' zone = 'Australi...
unknown
codeparrot/codeparrot-clean