code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package schema import ( "fmt" ) // MultiLevelFieldReader reads from other field readers, // merging their results along the way in a specific order. You can specify // "levels" and name them in order to read only an exact level or up to // a spec...
go
github
https://github.com/hashicorp/terraform
internal/legacy/helper/schema/field_reader_multi.go
{ "include": [ "**/*.ts", "**/*.tsx", "**/.server/**/*.ts", "**/.server/**/*.tsx", "**/.client/**/*.ts", "**/.client/**/*.tsx", "./.react-router/types/**/*" ], "compilerOptions": { "lib": ["DOM", "DOM.Iterable", "ES2022"], "types": ["@react-router/node", "vite/client"], "ve...
json
github
https://github.com/remix-run/react-router
playground/framework-express/tsconfig.json
/* Minimal main program -- everything is loaded from the library. */ #include "Python.h" #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <stdlib.h> /* __argc, __wargv */ int WINAPI wWinMain( HINSTANCE hInstance, /* handle to current instance */ HINSTANCE hPrevInstance, /* handle to previous ...
c
github
https://github.com/python/cpython
PC/WinMain.c
import csv import psycopg2 from datetime import datetime def main(): try: db2 = psycopg2.connect(database='firmware',user='firmadyne',password='firmadyne',host='127.0.0.1') cur = db2.cursor() cur.execute('SELECT id,filename FROM image WHERE id>814 ORDER BY id') rows = cur.fetchall()...
unknown
codeparrot/codeparrot-clean
# Copyright: (c) 2018, Matt Davis <mdavis@ansible.com> # 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 from datetime import datetime from ansible.errors import AnsibleError from ansibl...
unknown
codeparrot/codeparrot-clean
# 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. # # Ansible is distributed in the hope that ...
python
github
https://github.com/ansible/ansible
lib/ansible/module_utils/facts/system/env.py
# -*- coding: 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): # Adding field 'Notification.url' db.add_column('panda_notification', 'url', self.gf('d...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2018 Ansible Project # 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 DOCUMENTATION = """ author: Ansible Core Team connection: psrp short_description: Run tasks over Mic...
unknown
codeparrot/codeparrot-clean
name: Publish NuGet Packages on: release: types: [published] permissions: contents: read jobs: package-nuget: runs-on: windows-latest if: ${{ github.repository == 'twbs/bootstrap' && startsWith(github.event.release.tag_name, 'v') }} env: GITHUB_REF_NAME: ${{ github.ref_name }} steps: ...
unknown
github
https://github.com/twbs/bootstrap
.github/workflows/publish-nuget.yml
# Copyright (c) 2014 INFN - "Istituto Nazionale di Fisica Nucleare" - Italy # 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/LIC...
unknown
codeparrot/codeparrot-clean
""" FormWizard class -- implements a multi-page form, validating between each step and storing the form's state as HTML hidden fields so that no state is stored on the server side. """ import cPickle as pickle from django import forms from django.conf import settings from django.contrib.formtools.utils import securit...
unknown
codeparrot/codeparrot-clean
"Functions that help with dynamically creating decorators for views." try: from contextlib import ContextDecorator except ImportError: ContextDecorator = None from functools import WRAPPER_ASSIGNMENTS, update_wrapper, wraps from django.utils import six class classonlymethod(classmethod): def __get__(sel...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require_relative "vendored_tsort" module Bundler class SpecSet include Enumerable include TSort def initialize(specs) @specs = specs end def for(dependencies, platforms = [nil], legacy_platforms = [nil], skips: []) if [true, false].include?(platforms) ...
ruby
github
https://github.com/ruby/ruby
lib/bundler/spec_set.rb
#!/usr/bin/python # 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. # # Ansible is distributed...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an...
unknown
codeparrot/codeparrot-clean
#ifndef __VSX__ #error "VSX is not supported" #endif #include <altivec.h> typedef __vector unsigned int v_uint32x4; int main(void) { v_uint32x4 v1 = (v_uint32x4){2, 4, 8, 16}; v_uint32x4 v2 = (v_uint32x4){2, 2, 2, 2}; v_uint32x4 v3 = vec_mod(v1, v2); return (int)vec_extractm(v3); }
c
github
https://github.com/numpy/numpy
numpy/_core/src/_simd/checks/cpu_vsx4.c
# coding:utf-8 ''' Created on 2018/1/15. @author: chk01 ''' from shuwei_fengge.practice_two.load_data.utils import * from PIL import Image, ImageDraw import tensorflow as tf import matplotlib.pyplot as plt def get_face_box(points): X = points[:, 0] Y = points[:, 1] min_x = min(X) max_x = max(X) mi...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import division import numpy as np import datetime from sunpy.time import parse_time, julian_day from sunpy.wcs import convert_hcc_hg, convert_hg_hcc from sunpy.sun import constants def pb0r(date, stereo=None, soho=False, arcsec=False): # Ejemplo: # >> fro...
unknown
codeparrot/codeparrot-clean
import os, sys, array, json, math, cStringIO sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) import subresource class Image: """This class partially implements the interface of the PIL.Image.Image. One day in the future WPT might support the PIL module or another imaging library, so th...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 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
etcdutl/ctl.go
{% extends "admin/base_site.html" %} {% load i18n %} {% block breadcrumbs %} <ol class="breadcrumbs"> <li><a href="{% url 'admin:index' %}">{% translate 'Home' %}</a></li> <li aria-current="page">{% translate 'Password reset' %}</li> </ol> {% endblock %} {% block content %} <p>{% translate 'We’ve emailed you instruc...
html
github
https://github.com/django/django
django/contrib/admin/templates/registration/password_reset_done.html
from ngw.core.models import FIELD_EMAIL def normalize_name(name): ''' looks for upper case words, put them at the end ''' words = name.split(' ') lastname = [] while True: if len(words) == 0: break word = words[0] if word == word.upper(): lastname...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
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/main/java/org/springframework/beans/factory/groovy/GroovyBeanDefinitionReader.java
#ifndef BOOST_ARCHIVE_XML_WIARCHIVE_HPP #define BOOST_ARCHIVE_XML_WIARCHIVE_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_wiarchive.hpp // (C) Copyright 2002 Robert Ramey - http://...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/archive/xml_wiarchive.hpp
""" TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http://tinyurl.com/4e9iAk. Design the encode and decode methods for the TinyURL service. There is no restriction on how your encode/decode algorithm should work. You jus...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Python 2/3 compatibility from __future__ import print_function import numpy as np from numpy import pi, sin, cos import cv2 defaultSize = 512 class TestSceneRender(): def __init__(self, bgImg = None, fgImg = None, deformation = False, noise = 0.0, speed = 0.25, **params): self....
unknown
codeparrot/codeparrot-clean
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER) /* * Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics, * whether or not the build options for those features are specified. * Therefore, we must test #definitions of CPU features when option native/host * is enabled v...
c
github
https://github.com/numpy/numpy
meson_cpu/x86/test_x86_v2.c
# frozen_string_literal: true module Arel # :nodoc: all class SelectManager < Arel::TreeManager include Arel::Crud STRING_OR_SYMBOL_CLASS = [Symbol, String] def initialize(table = nil) super @ast = Nodes::SelectStatement.new(table) @ctx = @ast.cores.last end def initialize_c...
ruby
github
https://github.com/rails/rails
activerecord/lib/arel/select_manager.rb
// Copyright 2024 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package storage import ( "context" "fmt" "testing" "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/cloud" _ "github.com/cockroa...
go
github
https://github.com/cockroachdb/cockroach
pkg/storage/bench_cloud_io_test.go
# Copyright 2020 The UniqueRandomizer 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...
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/main/java/org/apache/kafka/common/telemetry/internals/MetricNamingStrategy.java
# -*- coding: utf-8 -*- # This coding header is significant for tests, as the debug view is parsing # files to search for such a header to decode the source file content from __future__ import unicode_literals import importlib import inspect import os import re import sys import tempfile from unittest import skipIf f...
unknown
codeparrot/codeparrot-clean
# protoc plugin to map from FileDescriptorProtos to a tools.type_whisperer.Types # proto. This is the type information for a single .proto, consumed by # typedb_gen.py. from tools.api_proto_plugin import plugin from tools.api_proto_plugin import visitor from tools.type_whisperer.types_pb2 import Types from udpa.annot...
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
benchmarks/src/main/java/org/elasticsearch/benchmark/index/codec/tsdb/internal/ConstantIntegerSupplier.java
#!/usr/bin/python # Copyright (C) 2016 Bitergia # # 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 di...
unknown
codeparrot/codeparrot-clean
import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import AxesGrid def get_demo_image(): import numpy as np from matplotlib.cbook import get_sample_data f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False) z = np.load(f) # z is a numpy array of 15x15 return z, (-3,4,...
unknown
codeparrot/codeparrot-clean
#ifndef NPY_SIMD #error "Not a standalone header" #endif #ifndef _NPY_SIMD_AVX512_ARITHMETIC_H #define _NPY_SIMD_AVX512_ARITHMETIC_H #include "../avx2/utils.h" #include "../sse/utils.h" /*************************** * Addition ***************************/ // non-saturated #ifdef NPY_HAVE_AVX512BW #define npy...
c
github
https://github.com/numpy/numpy
numpy/_core/src/common/simd/avx512/arithmetic.h
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( parse_iso8601, str_to_int, ) class CrackedIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?cracked\.com/video_(?P<id>\d+)_[\da-z-]+\.html' _TESTS = [{ 'url': 'http://www.cracked.com/v...
unknown
codeparrot/codeparrot-clean
# -*- 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
# 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 # d...
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
### Run tests Contributing includes testing your changes. If you change the Moby code, you may need to add a new test or modify an existing test. Your contribution could even be adding tests to Moby. For this reason, you need to know a little about Moby's test infrastructure. This section describes tests you can run ...
unknown
github
https://github.com/moby/moby
docs/contributing/test.md
// Copyright 2018 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql_test import ( gosql "database/sql" "testing" "github.com/cockroachdb/cockroach/pkg/util/leaktest" "github.com/cockroachdb/cockroach/pkg/util/log" "git...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/comment_on_table_test.go
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Author: Gillett Hernandez # @Date: 2016-03-21 22:33:46 # @Last Modified by: Gillett Hernandez # @Last Modified time: 2017-12-11 20:09:28 from euler_funcs import ContinuedFraction, solve_pell, analyze_triplets, sconvergents, lag, is_square from math import sqrt, gcd,...
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/EndTxnMarker.json
#!/usr/bin/env python from ciscoconfparse import CiscoConfParse import re from pprint import pprint import markdown def read_in_file(filename): return CiscoConfParse(filename) def generate_pointee_markdown(parsed_config, pointee_objects): pointee_types = ['access-list', 'ip access-list', 'interface', ...
unknown
codeparrot/codeparrot-clean
# -*- 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 // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/utils/FormatStringConverter.h
import numpy as np from matplotlib import pyplot as plt from scipy import stats from sklearn.tree import DecisionTreeClassifier def plot_surface(model, X, y): n_classes = 3 plot_colors = "ryb" cmap = plt.cm.RdYlBu plot_step = 0.02 plot_step_coarser = 0.5 x_min, x_max = X[:, 0].min() - 1, X[:, ...
unknown
codeparrot/codeparrot-clean
import type * as ts from "./_namespaces/ts.js"; import type { ApplicableRefactorInfo, CompilerOptionsValue, CompletionsTriggerCharacter, EndOfLineState, FileExtensionInfo, HighlightSpanKind, InlayHintKind, InteractiveRefactorArguments, OutputFile, RefactorActionInfo, Refactor...
typescript
github
https://github.com/microsoft/TypeScript
src/server/protocol.ts
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>React Router - Lazy Loading Example</title> </head> <body> <div id="root"></div> <script type="module" src="/src/main.tsx"></script> </body> </html...
html
github
https://github.com/remix-run/react-router
examples/lazy-loading/index.html
# Owner(s): ["module: cuda"] import unittest import torch import torch.testing._internal.common_utils as common from torch.testing._internal.common_cuda import ( TEST_CUDA, TEST_MULTIGPU, TEST_NUMBA_CUDA, ) from torch.testing._internal.common_utils import TEST_NUMPY if TEST_NUMPY: import numpy if TE...
python
github
https://github.com/pytorch/pytorch
test/test_numba_integration.py
import { createCodeFixActionWithoutFixAll, registerCodeFix, setJsonCompilerOptionValue, setJsonCompilerOptionValues, } from "../_namespaces/ts.codefix.js"; import { CodeFixAction, Diagnostics, Expression, factory, getEmitModuleKind, getEmitScriptTarget, getTsConfigObjectLiter...
typescript
github
https://github.com/microsoft/TypeScript
src/services/codefixes/fixModuleAndTargetOptions.ts
#!/usr/bin/env python # -*- coding: utf-8 -*- "Special module to handle differences between Python 2 and 3 versions" import sys PY3K = sys.version_info >= (3, 0) try: import cPickle as pickle except ImportError: import pickle try: from urllib import urlopen except ImportError: from urllib.request import ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Stephane Caron <stephane.caron@normalesup.org> # # This file is part of pymanoid. # # pymanoid 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 # Foundatio...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import sys import csv import glob # This lines increases the csv's line max size csv.field_size_limit(sys.maxsize) def readImagesFileNames(_path): imagesList = [] imgL = glob.glob(_path) for item in imgL: item = item.split('/') item = item[1].split('.') ite...
unknown
codeparrot/codeparrot-clean
test_kind: fsm_workload_test selector: roots: - jstests/concurrency/fsm_workloads/**/*.js - src/mongo/db/modules/*/jstests/concurrency/fsm_workloads/*.js exclude_files: # SERVER-14669 Multi-removes that use $where miscount removed documents # Disabled due to MongoDB restrictions and/or workload re...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/concurrency_sharded_causal_consistency_and_balancer.yml
# AGENTS.md <!-- version: 2.0.0 --> This file provides guidance to AI agents when working with code in the Grafana repository. **Directory-scoped agent files exist for specialized areas — read them when working in those directories:** - `docs/AGENTS.md` — Documentation style guide (for work under `docs/`) - `public...
unknown
github
https://github.com/grafana/grafana
AGENTS.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/common/security/authenticator/AbstractLogin.java
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 the hope that it will b...
unknown
codeparrot/codeparrot-clean
""" Copyright 2008-2011 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 l...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import from rpython.rlib import jit from som.vmobjects.abstract_object import AbstractObject class AstMethod(AbstractObject): _immutable_fields_ = ["_signature", "_invokable", "_embedded_block_methods", "_universe", "_holder"] def __init__(self, sig...
unknown
codeparrot/codeparrot-clean
from django.db import models from django.db.models.query_utils import DeferredAttribute class CustomTypedField(models.TextField): def db_type(self, connection): return "custom_field" class CustomDeferredAttribute(DeferredAttribute): def __get__(self, instance, cls=None): self._count_call(insta...
python
github
https://github.com/django/django
tests/field_subclassing/fields.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Red Hat, 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 # #...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
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 // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.h
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ========================================================================= Program: Visualization Toolkit Module: TestNamedColorsIntegration.py Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www....
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # In[1]: import os import pandas as pd import matplotlib.pyplot as plt # In[2]: from keras.applications.vgg16 import VGG16 from keras.models import Model from keras.callbacks import ModelCheckpoint,EarlyStopping from keras.preprocessing.image import ImageDataGenerator # In[3]: from keras.utils imp...
unknown
codeparrot/codeparrot-clean
"use strict"; module.exports = [ /Can't import the named export 'aa' \(imported as 'aa'\) from default-exporting module/, /Can't import the named export 'named' \(imported as 'named'\) from default-exporting module/ ];
javascript
github
https://github.com/webpack/webpack
test/cases/json/import-named-with-type-json/warnings.js
# -*- coding: utf-8 -*- ## Copyright 2008-2013 Luc Saffre ## This file is part of the Lino project. ## Lino 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 opt...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) # 2015 Serv. Tec. Avanzados - Pedro M. Baeza (http://www.serviciosbaeza.com) # 2015 AvanzOsc (http://www.avanzosc.es) # # This program is free software: you can redistribute it and/or modi...
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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/queries/useBulkDeleteVariables.ts
#!/usr/bin/env python3 ############################################################################### # Copyright 2018 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
#!/usr/bin/python # Copyright: Ansible Project # 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': ['stableinterfa...
unknown
codeparrot/codeparrot-clean
from sqlagg.columns import SimpleColumn from corehq.apps.reports.sqlreport import SqlData, DatabaseColumn from custom.common import ALL_OPTION from dimagi.utils.decorators.memoized import memoized EMPTY_FIELD = "---" class BaseMixin(object): @property def blocks(self): hierarchy_block = self.request....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ''' Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's Smalltalk testing framework. This module contains the core framework classes that form the basis of specific test cases and suites (TestCase, TestSuite etc.), and also a text-based utility class for running the tests ...
unknown
codeparrot/codeparrot-clean
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/__init__.py __version__=''' $Id$ ''' __doc__='''Page Layout and Typography Using Scripts" - higher-level framework for flowing documents''' f...
unknown
codeparrot/codeparrot-clean
""" ******************************* K-means clustering (``kmeans``) ******************************* .. index:: single: clustering, kmeans .. index:: agglomerative clustering .. autoclass:: Orange.clustering.kmeans.Clustering(data=None, centroids=3, maxiters=None, minscorechange=None, stopchanges=0, nstart=1, initi...
unknown
codeparrot/codeparrot-clean
# Copyright 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 req...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\WebProfilerBundle\Controller; use Symfony\Component\Expr...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/WebProfilerBundle/Controller/RouterController.php
from __future__ import annotations import json import random import re import string from ipaddress import IPv4Address from pathlib import Path from typing import TYPE_CHECKING, Any, cast from unittest import mock from urllib.parse import urlencode import pytest from pytest_twisted import async_yield_fixture from twi...
python
github
https://github.com/scrapy/scrapy
tests/test_http2_client_protocol.py
#!/bin/sh test_description='detect unwritable repository and fail correctly' . ./test-lib.sh test_expect_success setup ' >file && git add file && test_tick && git commit -m initial && echo >file && git add file ' test_expect_success POSIXPERM,SANITY 'write-tree should notice unwritable repository' ' test_w...
unknown
github
https://github.com/git/git
t/t0004-unwritable.sh
# A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API. # # This is used for generating API documentation and the types used by the # client/server. See api/README.md for more information. # # Some style notes: # - This file is used by ReDoc, which allows GitHub Flavored Markdown in # descriptions. # - There i...
unknown
github
https://github.com/moby/moby
api/docs/v1.48.yaml
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package command import ( "encoding/json" "fmt" "path" "sort" "strconv" "strings" "github.com/hashicorp/cli" "github.com/posener/complete" ) var ( _ cli.Command = (*KVMetadataGetCommand)(nil) _ cli.CommandAutocomplete = (*KV...
go
github
https://github.com/hashicorp/vault
command/kv_metadata_get.go
import os import bdb import types from Tkinter import * from WindowList import ListedToplevel from ScrolledList import ScrolledList class Idb(bdb.Bdb): def __init__(self, gui): self.gui = gui bdb.Bdb.__init__(self) def user_line(self, frame): if self.in_rpc_code(frame): se...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 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 ag...
unknown
codeparrot/codeparrot-clean
# # 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
import pytest from openshift_checks.disk_availability import DiskAvailability, OpenShiftCheckException @pytest.mark.parametrize('group_names,is_active', [ (['oo_masters_to_config'], True), (['oo_nodes_to_config'], True), (['oo_etcd_to_config'], True), (['oo_masters_to_config', 'oo_nodes_to_config'], T...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #========================================================================== # # Copyright Insight Software Consortium # # 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 Licen...
unknown
codeparrot/codeparrot-clean
import numpy as np import pandas as pd class TimeLogicalOps: def setup(self): N = 10_000 left, right, lmask, rmask = np.random.randint(0, 2, size=(4, N)).astype("bool") self.left = pd.arrays.BooleanArray(left, lmask) self.right = pd.arrays.BooleanArray(right, rmask) def time_o...
python
github
https://github.com/pandas-dev/pandas
asv_bench/benchmarks/boolean.py
# frozen_string_literal: true module ActiveRecord class PredicateBuilder class RangeHandler # :nodoc: RangeWithBinds = Struct.new(:begin, :end, :exclude_end?) def initialize(predicate_builder) @predicate_builder = predicate_builder end def call(attribute, value) begin_bi...
ruby
github
https://github.com/rails/rails
activerecord/lib/active_record/relation/predicate_builder/range_handler.rb
""" Module responsible for execution of NDFrame.describe() method. Method NDFrame.describe() delegates actual execution to function describe_ndframe(). """ from __future__ import annotations from abc import ( ABC, abstractmethod, ) from typing import ( TYPE_CHECKING, cast, ) import numpy as np from...
python
github
https://github.com/pandas-dev/pandas
pandas/core/methods/describe.py
package images import ( "testing" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "gotest.tools/v3/assert" ) func TestOnlyPlatformWithFallback(t *testing.T) { p := ocispec.Platform{ OS: "linux", Architecture: "arm", Variant: "v8", } // Check no variant assert.Assert(t, OnlyPla...
go
github
https://github.com/moby/moby
daemon/images/images_test.go
from flask import (render_template, current_app, Blueprint, redirect, url_for, request, flash, session) from flask.ext.login import login_user, logout_user from flask.ext.principal import...
unknown
codeparrot/codeparrot-clean
import json import pickle from django.contrib.gis.gdal import ( CoordTransform, GDALException, OGRGeometry, OGRGeomType, SpatialReference, ) from django.contrib.gis.gdal.geometries import CircularString, CurvePolygon from django.contrib.gis.geos import GEOSException from django.template import Cont...
python
github
https://github.com/django/django
tests/gis_tests/gdal_tests/test_geom.py
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {ChangeDetectionStrategy, Component, input} from '@angular/core'; import {SerializedInjectedService} from '.....
typescript
github
https://github.com/angular/angular
devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view/property-view-body/dependency-viewer/dependency-viewer.component.ts
# Copyright 2013-2015 MongoDB, 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 writin...
unknown
codeparrot/codeparrot-clean
import unittest from robot.writer.rowsplitter import RowSplitter from robot.utils.asserts import assert_equals class TestRowSplitter(unittest.TestCase): def _test(self, data, expected, cols=3, table_type='settings'): splitter = RowSplitter(cols=cols) actual = list(splitter.split(data, table_type)...
unknown
codeparrot/codeparrot-clean