code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
import datetime import decimal import unicodedata from importlib import import_module from django.conf import settings from django.utils import dateformat, datetime_safe, numberformat from django.utils.functional import lazy from django.utils.safestring import mark_safe from django.utils.translation import ( check...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2017 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Analyze dump file, to try prototype techniques that could be useful for debugger. ''' import struct from prin...
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
core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/package-info.java
import os import sys import unittest sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) import base_test from selenium.common import exceptions class CookieTest(base_test.WebDriverBaseTest): def setUp(self): self.driver.get(self.webserver.where_is("cookie/res/cookie_container.html")) ...
unknown
codeparrot/codeparrot-clean
steps: - label: part-1 command: | .buildkite/scripts/spotless.sh # This doesn't have to be part of part-1, it was just a convenient place to put it .ci/scripts/run-gradle.sh -Dignore.tests.seed checkPart1 timeout_in_minutes: 300 agents: provider: gcp image: family/elasticsearch-ubu...
unknown
github
https://github.com/elastic/elasticsearch
.buildkite/pipelines/pull-request/part-1.yml
# Backward compatible module for RandomArray __all__ = ['ArgumentError','F','beta','binomial','chi_square', 'exponential', 'gamma', 'get_seed', 'mean_var_test', 'multinomial', 'multivariate_normal', 'negative_binomial', 'noncentral_F', 'noncentral_chi_square', 'normal', 'permutation', ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.standalone.fir.test.cases.generated.cases.components.expressionInfoP...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/components/expressionInfoProvider/FirStandaloneNormalAnalysisSourceModuleReturnTargetSymbolTestGenerated.java
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import ( "bytes" "context" "encoding/binary" "fmt" "hash" "hash/fnv" "strings" "time" "unicode" "github.com/cockroachdb/cockroach/pkg/keys" "git...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/pg_catalog.go
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2002-2019 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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...
unknown
codeparrot/codeparrot-clean
#include "ruby.h" #include "ruby/debug.h" // We're testing deprecated things, don't print the compiler warnings #if 0 #elif defined(_MSC_VER) #pragma warning(disable : 4996) #elif defined(__INTEL_COMPILER) #pragma warning(disable : 1786) #elif defined(__clang__) #pragma clang diagnostic ignored "-Wdeprecated-declar...
c
github
https://github.com/ruby/ruby
ext/-test-/postponed_job/postponed_job.c
from ..daltools.util.full import init Z = [8., 1., 1.] Rc = init([0.00000000, 0.00000000, 0.48860959]) Dtot = [0, 0, -0.76539388] Daa = init([ [ 0.00000000, 0.00000000, -0.28357300], [ 0.15342658, 0.00000000, 0.12734703], [-0.15342658, 0.00000000, 0.12734703], ]) QUc = init([-7.31176220, 0., 0., -5.432...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright JS Foundation and other contributors, http://js.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....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Translated from MeshQuality.cxx ''' ========================================================================= Program: Visualization Toolkit Module: MeshQuality.py Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyrigh...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import sys from PQTokenize import * from keyword import * from qt import * class PyEdit(QTextEdit): def __init__(self, parent=None): QTextEdit.__init__(self, parent) # user interface setup self.setTextFormat(QTextEdit.PlainText) #self.setWrapPolicy(QTextEdit...
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
package container import ( "fmt" "strings" "time" ) // HealthStatus is a string representation of the container's health. type HealthStatus string // Health states const ( NoHealthcheck HealthStatus = "none" // Indicates there is no healthcheck Starting HealthStatus = "starting" // Starting indicates...
go
github
https://github.com/moby/moby
api/types/container/health.go
#!/bin/bash set -ex -o pipefail SCRIPT_PARENT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) # shellcheck source=./common.sh source "$SCRIPT_PARENT_DIR/common.sh" export TMP_DIR="${PWD}/build/win_tmp" TMP_DIR_WIN=$(cygpath -w "${TMP_DIR}") export TMP_DIR_WIN export PROJECT_DIR="${PWD}" PROJECT_DIR_WIN=$(cygpat...
unknown
github
https://github.com/pytorch/pytorch
.ci/pytorch/win-test.sh
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/extcon/siliconmitus,sm5502-muic.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: SM5502/SM5504 MUIC (Micro-USB Interface Controller) device maintainers: - Chanwoo Choi <cw00.choi@samsung.com...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/extcon/siliconmitus,sm5502-muic.yaml
{ "name": "with-react-native-web", "displayName": "with-react-native-web" }
json
github
https://github.com/vercel/next.js
examples/with-react-native-web/app.json
// RUN: mkdir -p %t.dir/Inputs/yml-basic // RUN: grep -Ev "// *[A-Z-]+:" %S/Inputs/yml-basic/basic.h > %t.dir/Inputs/yml-basic/basic.h // RUN: sed "s#\$(path)#%/t.dir/Inputs/yml-basic#" %S/Inputs/yml-basic/file1.yml > %t.dir/Inputs/yml-basic/file1.yml // RUN: sed "s#\$(path)#%/t.dir/Inputs/yml-basic#" %S/Inputs/yml-bas...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-apply-replacements/yml-basic.cpp
#!/usr/bin/env python3 # # SuperTuxKart - a fun racing game with go-kart # Copyright (C) 2006-2015 SuperTuxKart-Team # # 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...
unknown
codeparrot/codeparrot-clean
from django.http.cookie import SimpleCookie, parse_cookie from django.http.request import ( HttpRequest, QueryDict, RawPostDataException, UnreadablePostError, ) from django.http.response import ( BadHeaderError, FileResponse, Http404, HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, HttpResponse...
unknown
codeparrot/codeparrot-clean
############################################################################ # # QuadcopeRPI- SW for controlling a quadcopter by RPI # # Copyright (C) 2014 Oscar Ferrato (solenero tech) # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lice...
unknown
codeparrot/codeparrot-clean
/* * xloginsert.h * * Functions for generating WAL records * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/access/xloginsert.h */ #ifndef XLOGINSERT_H #define XLOGINSERT_H #include "access/rmgr.h" ...
c
github
https://github.com/postgres/postgres
src/include/access/xloginsert.h
from ..simstore.custom_json import JSONCodec try: import mdtraj as md except ImportError: md = None HAS_MDTRAJ = False else: HAS_MDTRAJ = True import pandas as pd def _check_mdtraj(): if not HAS_MDTRAJ: raise RuntimeError("Unable to import MDTraj.") def traj_to_dict(obj): return {'xy...
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.symbolDeclarationOverrides...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/symbolDeclarationOverridesProvider/FirIdeNormalAnalysisScriptSourceModuleOverriddenDeclarationProviderTestGenerated.java
# # Tests for the Ellipsoidal Harmonic Function, # Distributed under the same license as SciPy itself. # from __future__ import division, print_function, absolute_import import warnings import numpy as np from numpy.testing import assert_equal, assert_almost_equal, assert_allclose,\ assert_ from scipy.special._test...
unknown
codeparrot/codeparrot-clean
/* Copyright 2019 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/controller/job/config/types.go
""" awslimitchecker/tests/test_quotas.py The latest version of this package is available at: <https://github.com/jantman/awslimitchecker> ############################################################################## Copyright 2015-2019 Jason Antman <jason@jasonantman.com> This file is part of awslimitchecker, a...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context-indexer/src/test/java/org/springframework/context/index/sample/jpa/SampleEntity.java
imports: - { resource: framework.yml }
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/config/default.yml
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package vault import ( testing "testing" "github.com/hashicorp/go-kms-wrapping/wrappers/aead/v2" "github.com/hashicorp/vault/helper/testhelpers/corehelpers" "github.com/hashicorp/vault/vault/seal" ) // NewTestSeal creates a new seal for test...
go
github
https://github.com/hashicorp/vault
vault/seal_testing_util.go
""" The ``Parser`` tries to convert the available Python code in an easy to read format, something like an abstract syntax tree. The classes who represent this tree, are sitting in the :mod:`parso.tree` module. The Python module ``tokenize`` is a very important part in the ``Parser``, because it splits the code into d...
unknown
codeparrot/codeparrot-clean
from math import * from random import * class rabin: def __init__(self): pass def get_big(self, bit): #get a big number x that x % 4 = 3 big = 1 for i in range(bit-3): temp = randrange(0,2) big = big * 2 + temp big = big * 4 + 3 return big ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.application import io.ktor.client.request.* import io.ktor.client.statement.* import io.ktor.http.content.* import io.ktor.server.request.* import io.ktor.server.respon...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-core/common/test/io/ktor/server/application/ApplicationCallReceiveTest.kt
/* Copyright 2019 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/proxy/topology_test.go
# Copyright 2013 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 cStringIO import json import logging import unittest from telemetry import benchmark from telemetry.core import util from telemetry.core.platform imp...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2007-8, Playful Invention Company. # Copyright (c) 2008-11, Walter Bender # Copyright (c) 2011 Collabora Ltd. <http://www.collabora.co.uk/> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright © 2013 by Lasse Fister <commander@graphicore.de> # # This file is part of Multitoner. # # Multitoner 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, eithe...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** v_net_path.py --------------------- Date : December 2015 Copyright : (C) 2015 by Médéric Ribreux Email : medspx at medspx dot fr ************************...
unknown
codeparrot/codeparrot-clean
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # License: Simplified BSD from copy import deepcopy import numpy as np from scipy import linalg from ..forward import is_fixed_orient, _to_fixed_ori from ..minimum_norm.inverse import _check...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package certutil import ( "bytes" "fmt" "time" ctx509 "github.com/google/certificate-transparency-go/x509" "github.com/hashicorp/errwrap" ) func VerifyCertificateChain(parsedBundle *ParsedCertBundle, options ctx509.VerifyOptions, rootChainOn...
go
github
https://github.com/hashicorp/vault
sdk/helper/certutil/cert_verification.go
//===----------------------------------------------------------------------===// // // 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/performance/NoAutomaticMoveCheck.cpp
//===--- SILGenRequests.h - SILGen Requests ---------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2020 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE....
c
github
https://github.com/apple/swift
include/swift/AST/SILGenRequests.h
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.common import Backend from lib.core.common import Format from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger from lib.co...
unknown
codeparrot/codeparrot-clean
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. // Copyright (C) 2015, Itseez, Inc., all rights reserved. // Third party copyrights are property of their respective owners. ...
unknown
github
https://github.com/opencv/opencv
modules/core/include/opencv2/core/va_intel.hpp
# -*- coding: UTF-8 -*- """ $Id$ $URL$ Copyright (c) 2010 foption Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modif...
unknown
codeparrot/codeparrot-clean
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
unknown
codeparrot/codeparrot-clean
/* Authors: Gregory P. Smith & Jeffrey Yasskin */ #ifndef Py_BUILD_CORE_BUILTIN # define Py_BUILD_CORE_MODULE 1 #endif #include "Python.h" #include "pycore_fileutils.h" // _Py_set_inheritable_async_safe() #include "pycore_interp.h" // _PyInterpreterState_GetFinalizing() #include "pycore_pystate.h" //...
c
github
https://github.com/python/cpython
Modules/_posixsubprocess.c
/* * 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/consumer/internals/ConsumerHeartbeatRequestManager.java
import os import unittest from collections import OrderedDict from coalib.collecting.Importers import import_objects class ImportObjectsTest(unittest.TestCase): def setUp(self): current_dir = os.path.split(__file__)[0] self.testfile1_path = os.path.join(current_dir, ...
unknown
codeparrot/codeparrot-clean
# Migrating from Karma to Vitest The Angular CLI uses [Vitest](https://vitest.dev/) as the default unit test runner for new projects. This guide provides instructions for migrating an existing project from Karma and Jasmine to Vitest. IMPORTANT: Migrating an existing project to Vitest is considered experimental. This...
unknown
github
https://github.com/angular/angular
adev/src/content/guide/testing/migrating-to-vitest.md
"""Prompt schema definition.""" from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING, Any from pydantic import BaseModel, model_validator from typing_extensions import override from langchain_core.prompts.string import ( DEFAULT_FORMATTER_MAPPING, PromptTemplateFormat...
python
github
https://github.com/langchain-ai/langchain
libs/core/langchain_core/prompts/prompt.py
#include <ruby/ruby.h> #if 0 // Warnings expected, should just suppress them #elif defined(_MSC_VER) #pragma warning(disable : 4996) #elif defined(__INTEL_COMPILER) #pragma warning(disable : 1786) #elif defined(__clang__) #pragma clang diagnostic ignored "-Wdeprecated-declarations" #elif defined(__GNUC__) #pragma ...
cpp
github
https://github.com/ruby/ruby
ext/-test-/cxxanyargs/cxxanyargs.cpp
# A sample server using TLS with either RSA or EC. # To use this, first run either gen-ec.py or gen-rsa.py (or both). import sys from hendrix.deploy.tls import HendrixDeployTLS from hendrix.experience import hey_joe sys.path.append("../django_nyc_demo") from hendrix_demo.wsgi import application as hendrix_demo_app ...
unknown
codeparrot/codeparrot-clean
# Copyright 2024 The HuggingFace 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 # # Unless required by applicabl...
python
github
https://github.com/huggingface/transformers
src/transformers/models/bart/__init__.py
########################################################################## # # Copyright (c) 2010-2011, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ import frappe.sessions from frappe.utils import cstr import mimetypes, json from werkzeug.wrappers import Response from werkzeug.routing import ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # This software code is made available "AS IS" without warranties of any # kind. You may copy, display, modify and redistribute the software # code either by itself or as incorporated into your code; provided that # you do not remove any proprietary notices. Your use of this software # cod...
unknown
codeparrot/codeparrot-clean
multiarch_test_pkg: libunistring5
unknown
github
https://github.com/ansible/ansible
test/integration/targets/apt/vars/Ubuntu-24.yml
// 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/ListPartitionReassignmentsResponse.json
#Four params need to change #testset_t, ncFileName, mean_std_flie_name, points_name import os from get_lineStroke import getLineStroke from get_xmlFileName import getXmlNames from get_targetStrings import getTargetString from sets import Set import numpy as np import netcdf_helpers labels = ['unstroke', 'stroke'] inp...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 The Tornado 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 w...
unknown
codeparrot/codeparrot-clean
import numpy as np llf = np.array([-239.91961140777]) nobs = np.array([ 202]) k = np.array([ 5]) k_exog = np.array([ 1]) sigma = np.array([ .79249918716869]) chi2 = np.array([ 907.36856676748]) df_model = np.array([ 3]) k_ar = np.array([ 2]) k...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import os, sys, json from common_paths import * import spec_validator import argparse def expand_pattern(expansion_pattern, test_expansion_schema): expansion = {} for artifact_key in expansion_pattern: artifact_value = expansion_pattern[artifact_key] if artifact_value == ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import os ###This class is used to handle (read/write) file/folder. class FileHandle(object): ''' classdocs ''' input_dir = "" output_file = "" old_file_path_list = [] #constructor def __init__(self,input_dir, output_file = ""): if input_dir is "": ...
unknown
codeparrot/codeparrot-clean
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def VmConfigFileQueryFilter(vim, *args, **kwargs): '''The filter for the virtual machine c...
unknown
codeparrot/codeparrot-clean
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
unknown
codeparrot/codeparrot-clean
#squid.py Library import RPi.GPIO as GPIO import time WHITE = (30, 30, 30) OFF = (0, 0, 0) RED = (100, 0, 0) GREEN = (0, 100, 0) BLUE = (0, 0, 100) YELLOW = (50, 50, 0) PURPLE = (50, 0, 50) CYAN = (0, 50, 50) class Squid: RED_PIN = 0 GREEN_PIN = 0 BLUE_PIN = 0 red_pwm = 0 green_pwm = 0 blue...
unknown
codeparrot/codeparrot-clean
__author__ = 'ShlomiB' import sys import socket from time import sleep from HCProtocol.HCRequests import HCRequestsFactory from HCShared.HCLogger import * import uuid class HCRequestHandler(object): def __init__(self, name, in_socket): self._name = name self._socket = in_socket # TODO: pri...
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
buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/ProgressUpdateEventTests.java
#!/usr/bin/python #-*- coding: utf-8 -*- # (c) 2013, Yeukhon Wong <yeukhon@acm.org> # (c) 2014, Nate Coraor <nate@bx.psu.edu> # # 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_ME...
unknown
codeparrot/codeparrot-clean
import unittest, logging, nose from tests.conf.roles import ROLES from pulp_auto import Pulp, format_response from pulp_auto.handler.profile import PROFILE from pulp_auto.consumer import (Consumer, Binding) from pulp_auto.task import (Task, TaskFailure, TaskTimeoutError) from pulp_auto.agent import Agent from pulp_auto...
unknown
codeparrot/codeparrot-clean
/* Hash Tables Implementation. * * This file implements in memory hash tables with insert/del/replace/find/ * get-random-element operations. Hash tables will auto resize if needed * tables of power of two in size are used, collisions are handled by * chaining. See the source code for more information... :) * * C...
c
github
https://github.com/redis/redis
src/dict.c
{ "apiVersion": "v1", "kind": "APIGroup", "name": "coordination.k8s.io", "preferredVersion": { "groupVersion": "coordination.k8s.io/v1", "version": "v1" }, "versions": [ { "groupVersion": "coordination.k8s.io/v1", "version": "v1" }, { "groupVersion": "coordination.k8s.i...
json
github
https://github.com/kubernetes/kubernetes
api/discovery/apis__coordination.k8s.io.json
# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import logging from portage.util import writemsg_level def create_depgraph_params(myopts, myaction): #configure emerge engine parameters # # self: include _this_ package regardless of if it is merged. #...
unknown
codeparrot/codeparrot-clean
""" ==================== Random over-sampling ==================== An illustration of the random over-sampling method. """ print(__doc__) import matplotlib.pyplot as plt import seaborn as sns sns.set() # Define some color for the plotting almost_black = '#262626' palette = sns.color_palette() from sklearn.dataset...
unknown
codeparrot/codeparrot-clean
from ..devices.base import WinkDevice class WinkPorkfolioNose(WinkDevice): """ Represents a Wink Porkfolio nose. """ def __init__(self, device_state_as_json, api_interface): super(WinkPorkfolioNose, self).__init__(device_state_as_json, api_interface) self._available = True def ava...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- TARGETS = [ 'DateField.py', ] PACKAGE = { 'title': 'DateField', 'desc': 'Calendar usage', } def setup(targets): '''Setup example for translation, MUST call util.setup(targets).''' util.setup(targets) def translate(): '''Translate example, MUST ca...
unknown
codeparrot/codeparrot-clean
--- applies_to: stack: serverless: mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-index.html --- # index [mapping-index] The `index` option controls whether field values are indexed. It accepts `true` or `false` and defaults to `true`. Indexing a field creates data stru...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch/mapping-reference/mapping-index.md
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package main import ( "log" "os" "github.com/hashicorp/vault/plugins/database/mysql" dbplugin "github.com/hashicorp/vault/sdk/database/dbplugin/v5" ) func main() { err := Run() if err != nil { log.Println(err) os.Exit(1) } } // Run i...
go
github
https://github.com/hashicorp/vault
plugins/database/mysql/mysql-legacy-database-plugin/main.go
"""Test LLM-generated structured query parsing.""" from typing import Any, cast import lark import pytest from langchain_core.structured_query import ( Comparator, Comparison, Operation, Operator, ) from langchain_classic.chains.query_constructor.parser import get_parser DEFAULT_PARSER = get_parser(...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/tests/unit_tests/chains/query_constructor/test_parser.py
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy # SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: MIT name: test core on: push: branches: - dev pull_request: paths: - '.github/workflows/test-core.yml' - 'crates/**' - '!crates/tauri/scripts/**' ...
unknown
github
https://github.com/tauri-apps/tauri
.github/workflows/test-core.yml
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package sort_test import ( "fmt" "sort" ) // A Change is a record of source code changes, recording user, language, and delta size. type Change struct { us...
go
github
https://github.com/golang/go
src/sort/example_multi_test.go
/* Copyright 2016 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/imagepolicy/v1alpha1/doc.go
# -*- coding: utf-8 -*- """ Unit tests for preference APIs. """ import datetime import ddt import unittest from mock import patch from pytz import UTC from django.conf import settings from django.contrib.auth.models import User from django.test import TestCase from django.test.utils import override_settings from dateu...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import drf_nested_resource try: from setuptools import setup except ImportError: from distutils.core import setup version = drf_nested_resource.__version__ if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') prin...
unknown
codeparrot/codeparrot-clean
prelude: | # frozen_string_literal: true require 'erb' benchmark: - script: ERB::Util.html_escape("") loop_count: 20000000 - script: ERB::Util.html_escape("abcde") loop_count: 20000000 - script: ERB::Util.html_escape("abcd<") loop_count: 20000000 - script: ERB::Util.html_escape("'&\"<>") loo...
unknown
github
https://github.com/ruby/ruby
benchmark/erb_escape_html.yml
# -*- 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
# Copyright 2019 Google LLC. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
unknown
codeparrot/codeparrot-clean
# Abseil CMake Build Instructions Abseil comes with a CMake build script ([CMakeLists.txt](../CMakeLists.txt)) that can be used on a wide range of platforms ("C" stands for cross-platform.). If you don't have CMake installed already, you can download it for free from <https://www.cmake.org/>. CMake works by generatin...
unknown
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/CMake/README.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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/pages/Dashboard/Health/index.ts
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( find_xpath_attr, unified_strdate, get_element_by_id, get_element_by_attribute, int_or_none, qualities, ) # There are different sources of video in arte.tv, the extractio...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package cli import ( "context" "encoding/json" "fmt" "os" "path/filepath" "sort" "time" "github.com/cockroachdb/cockroach/pkg/cli/clierrorplus" "github.com/co...
go
github
https://github.com/cockroachdb/cockroach
pkg/cli/debug_ear.go
#! /usr/bin/env python import sys import re from pandashells.lib import module_checker_lib module_checker_lib.check_for_modules( ['matplotlib', 'dateutil', 'mpld3', 'seaborn']) from dateutil.parser import parse import matplotlib as mpl import pylab as pl import seaborn as sns import mpld3 def show(args): # ...
unknown
codeparrot/codeparrot-clean
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. """Manifest structure used to store paths that should be included in a test run. The manifest is represented by a tree ...
unknown
codeparrot/codeparrot-clean
# -*- test-case-name: twisted.web.test.test_webclient,twisted.web.test.test_agent -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ HTTP client. """ from __future__ import division, absolute_import import os import warnings try: from urlparse import urlunparse, urljoin, urldefrag e...
unknown
codeparrot/codeparrot-clean
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Reposit...
php
github
https://github.com/composer/composer
src/Composer/Repository/Vcs/ForgejoDriver.php
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.standalone.fir.test.cases.generated.cases.types; import com.intelli...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/types/FirStandaloneNormalAnalysisSourceModuleAbbreviatedTypeTestGenerated.java
CHANGELOG ========= 8.1 --- * Add support for the `max_connect_duration` option * Add option `extra.use_persistent_connections` to `CurlHttpClient` to control the use of persistent connections introduced in PHP 8.5 8.0 --- * Remove support for passing an instance of `StoreInterface` as `$cache` argument to `Cach...
unknown
github
https://github.com/symfony/symfony
src/Symfony/Component/HttpClient/CHANGELOG.md