code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
//// [tests/cases/compiler/arrayLiteralComments.ts] ////
//// [arrayLiteralComments.ts]
var testArrayWithFunc = [
// Function comment
function() {
let x = 1;
},
// String comment
'1',
// Numeric comment
2,
// Object comment
{ a: 1 },
// Array comment
[1, 2, 3]
]
///... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/arrayLiteralComments.js |
/*
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/fieldpath/doc.go |
# failed system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide failed system call totals, broken down by pid.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.pa... | 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.
#ifndef PARAMETERS_CONTROLLER_HPP
#define PARAMETERS_CONTROLLER_HPP
#include <string>
#include <opencv2/core.hpp>
#include... | unknown | github | https://github.com/opencv/opencv | apps/interactive-calibration/parametersController.hpp |
class TnsnamesStack:
def __init__(self):
self._stack = []
def contains_entry(self, entry):
"""
Returns True, if stack contains entry, False otherwise
:param entry: the entry to be checked
:return: True, if stack contains entry, False otherwise
:rtype: bool
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
<!--
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
-->
# Mail etiquette
## About the lists
### Mailing Lists
The mailing lists we have are all listed and described on the [curl
website](https://curl.se/mail/).
Each mailing list is targeted to a specific set of users and sub... | unknown | github | https://github.com/curl/curl | docs/MAIL-ETIQUETTE.md |
# Copyright (C) 2003 Python Software Foundation
import unittest
from test import test_support
# Skip this test if aetools does not exist.
test_support.import_module('aetools')
class TestScriptpackages(unittest.TestCase):
def _test_scriptpackage(self, package, testobject=1):
# Check that we can import th... | 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/RepositoryInterface.php |
# coding=utf-8
import datetime
from django.contrib.auth.models import User
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.dispatch import receiver
from django.utils.module_loading import import_by_path
from django.utils... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package jsonchecks
import (
"encoding/json"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/hashicorp/terraform/internal/addrs"
"github.com/hashicorp/terraform/internal/checks"
"github.com/hashicorp/terraform/internal/states"
)
func Te... | go | github | https://github.com/hashicorp/terraform | internal/command/jsonchecks/checks_test.go |
/* Copyright 2022 - 2025 R. Thomas
*
* 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... | unknown | github | https://github.com/nodejs/node | deps/LIEF/include/LIEF/PDB/Type.hpp |
# Copyright (c) 2010 Google 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 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 rpc
import (
"github.com/gogo/protobuf/proto"
// Used instead of gogo/protobuf/proto for the fallback case
// to match the behavior of the upstream codec in
... | go | github | https://github.com/cockroachdb/cockroach | pkg/rpc/codec.go |
import pyramid_handlers
from blue_yellow_app.controllers.base_controller import BaseController
from blue_yellow_app.infrastructure.supressor import suppress
class HomeController(BaseController):
alternate_mode = False
@pyramid_handlers.action(renderer='templates/home/index.pt')
def index(self):
re... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.urlresolvers import reverse_lazy
from django.views.generic import (
CreateView, DetailView, DeleteView, ListView, UpdateView)
from django.utils.encoding import force_text
from .models import ChickenWings
class ChickenWingsListView(L... | unknown | codeparrot/codeparrot-clean | ||
// Utility Functions.
use rustc_hir::def_id::DefId;
use rustc_middle::ty::layout::{HasTypingEnv, LayoutOf};
use rustc_middle::ty::{self, Ty};
use tracing::trace;
use super::CodegenUnitDebugContext;
use super::namespace::item_namespace;
use crate::common::CodegenCx;
use crate::llvm;
use crate::llvm::debuginfo::{DIArra... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_codegen_llvm/src/debuginfo/utils.rs |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | 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 | build-tools-internal/src/test/java/org/elasticsearch/gradle/internal/EmptyDirTaskTests.java |
"""https://github.com/liwp/python-xbee-demo/blob/master/xbee-demo.py"""
from xbee import XBee
from xbee.helpers.dispatch import Dispatch
import serial
import struct
import time
import os
HUB_ADDR = struct.pack('>Q', 0) # 64-bit 0s
BCAST_ADDR = '\xFF\xFE'
IS_HUB = bool(os.getenv('IS_HUB'))
def default_handler(name,... | unknown | codeparrot/codeparrot-clean | ||
# LogoMation-like turtle graphics
from math import * # Also for export
import Tkinter
class Error(Exception):
pass
class RawPen:
def __init__(self, canvas):
self._canvas = canvas
self._items = []
self._tracing = 1
self.degrees()
self.reset()
def degrees(self, full... | unknown | codeparrot/codeparrot-clean | ||
/**********************************************************************
main.c -
$Author$
created at: Fri Aug 19 13:19:58 JST 1994
Copyright (C) 1993-2007 Yukihiro Matsumoto
**********************************************************************/
/*!
* \mainpage Developers' documentation for Ruby
*
* Thi... | c | github | https://github.com/ruby/ruby | main.c |
#!/usr/bin/env python3
from __future__ import unicode_literals
import hashlib
import urllib.request
import json
versions_info = json.load(open('update/versions.json'))
version = versions_info['latest']
URL = versions_info['versions'][version]['bin'][0]
data = urllib.request.urlopen(URL).read()
# Read template page
... | unknown | codeparrot/codeparrot-clean | ||
use crate::lib::{Debug, Display};
/// Either a re-export of std::error::Error or a new identical trait, depending
/// on whether Serde's "std" feature is enabled.
///
/// Serde's error traits [`serde::ser::Error`] and [`serde::de::Error`] require
/// [`std::error::Error`] as a supertrait, but only when Serde is built ... | rust | github | https://github.com/serde-rs/serde | serde_core/src/std_error.rs |
/* Copyright (c) 2016, 2025, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is designed to work with certain software (including... | c | github | https://github.com/mysql/mysql-server | sql/parse_tree_column_attrs.h |
# Copyright (c) 2012 Cloudera, 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 o... | 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 applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/core/kernels/debug_ops.h |
# 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 | ||
from flask.ext.sqlalchemy import SQLAlchemy
from flask import Flask
import os
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgres://jkrbnkekcosnxb:jOrPwurv94mnMu7acVpIX0W2sA@ec2-54-197-230-161.compute-1.amazonaws.com:5432/da79ahfav90021'
db = SQLAlchemy(app)
class Item(db.Model):
__tablename_... | unknown | codeparrot/codeparrot-clean | ||
/**
* @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 {PropType} from '../../../../../../protocol';
import {arrayifyProps} from './arrayify-props';
describe('arr... | typescript | github | https://github.com/angular/angular | devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver/arrayify-props.spec.ts |
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
url_basename,
)
class EngadgetIE(InfoExtractor):
_VALID_URL = r'''(?x)https?://www.engadget.com/
(?:video(?:/5min)?/(?P<id>\d+)|
[\d/]+/.*?)
'''
_TEST = {
'url': ... | unknown | codeparrot/codeparrot-clean | ||
import os
import sys
import types
import re
from numpy.core.numerictypes import issubclass_, issubsctype, issubdtype
from numpy.core import product, ndarray, ufunc
__all__ = ['issubclass_', 'issubsctype', 'issubdtype',
'deprecate', 'deprecate_with_doc', 'get_numarray_include',
'get_include', 'info', '... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2017 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/core/grappler/costs/graph_properties.h |
<?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\Component\DependencyInjection\Loader\Configurator;
use Symfony\... | php | github | https://github.com/symfony/symfony | src/Symfony/Bundle/SecurityBundle/Resources/config/collectors.php |
"use strict";
/** @type {import("webpack").Configuration} */
const config = {
optimization: {
chunkIds: "named" // To keep filename consistent between different modes (for example building only)
}
};
module.exports = config; | javascript | github | https://github.com/webpack/webpack | examples/code-splitted-require.context-amd/webpack.config.js |
#!/usr/bin/env python
import sys, math
import argparse
from volk_test_funcs import *
try:
import matplotlib
import matplotlib.pyplot as plt
except ImportError:
sys.stderr.write("Could not import Matplotlib (http://matplotlib.sourceforge.net/)\n")
sys.exit(1)
def main():
desc='Plot Volk performanc... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockitousage.stacktrace;
import static org.mockito.Mockito.*;
import java.util.LinkedList;
import java.util.List;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test... | java | github | https://github.com/mockito/mockito | mockito-core/src/test/java/org/mockitousage/stacktrace/ModellingDescriptiveMessagesTest.java |
'use strict';
const common = require('../common.js');
const sqlite = require('node:sqlite');
const assert = require('assert');
const bench = common.createBenchmark(main, {
n: [1e5],
statement: [
'INSERT INTO text_column_type (text_column) VALUES (?)',
'INSERT INTO integer_column_type (integer_column) VALUE... | javascript | github | https://github.com/nodejs/node | benchmark/sqlite/sqlite-prepare-insert.js |
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Title: CURLOPT_CRLF
Section: 3
Source: libcurl
See-also:
- CURLOPT_CONV_FROM_NETWORK_FUNCTION (3)
- CURLOPT_CONV_TO_NETWORK_FUNCTION (3)
Protocol:
- All
Added-in: 7.1
---
# NAME
CURLOPT_CRLF - CRLF conversion
# SYNOPSI... | unknown | github | https://github.com/curl/curl | docs/libcurl/opts/CURLOPT_CRLF.md |
# Copyright (c) 2010, Mats Kindahl, Charles Bell, and Lars Thalmann
# All rights reserved.
#
# Use of this source code is goverened by a BSD licence that can be
# found in the LICENCE file.
import mysql.replicant.errors as _errors
import subprocess
def lock_database(server):
"""Flush all tables and lock the data... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Copyright 2011,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your optio... | unknown | codeparrot/codeparrot-clean | ||
# helpers.py - helper functions for view classes
#
# Copyright 2011 Lincoln de Sousa <lincoln@comum.org>.
# Copyright 2012, 2013, 2014, 2015, 2016 Jeffrey Finkelstein
# <jeffrey.finkelstein@gmail.com> and contributors.
#
# This file is part of Flask-Restless.
#
# Flask-Restless is distributed under both the G... | unknown | codeparrot/codeparrot-clean | ||
#
# The Python Imaging Library
# $Id$
#
# BUFR stub adapter
#
# Copyright (c) 1996-2003 by Fredrik Lundh
#
# See the README file for information on usage and redistribution.
#
from PIL import Image, ImageFile
_handler = None
##
# Install application-specific BUFR image handler.
#
# @param handler Handler object.
de... | unknown | codeparrot/codeparrot-clean | ||
//go:build windows
package main
import (
"fmt"
"io"
"math/rand"
"strings"
"testing"
"github.com/Microsoft/go-winio"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/mount"
"github.com/moby/moby/api/types/network"
"github.com/moby/moby/client"
"github.com/moby/moby/v2/internal/tes... | go | github | https://github.com/moby/moby | integration-cli/docker_api_containers_windows_test.go |
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package remote
import (
"context"
"fmt"
"reflect"
"strings"
"testing"
tfe "github.com/hashicorp/go-tfe"
version "github.com/hashicorp/go-version"
"github.com/zclconf/go-cty/cty"
"github.com/hashicorp/terraform-svchost/disco"
"github.com... | go | github | https://github.com/hashicorp/terraform | internal/backend/remote/backend_test.go |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
from datetime import datetime
from xml.dom import minidom
try:
import yaml
HAS_YAML = True
except ImportError:
HAS_YAML = False
from django.conf import settings
from django.core import management, serializers
fro... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) 2014 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | java | github | https://github.com/google/guava | android/guava-tests/test/com/google/common/graph/GraphEquivalenceTest.java |
Enum DEFINITIONS IMPLICIT TAGS ::=
BEGIN
-- EXPORTS P1, P2;
-- F.2.3.1
-- Use an enumerated type to model the values of a variable
-- with three or more states.
-- Assign values starting with zero if their only
-- constraint is distinctness.
-- EXAMPLE
DayOfTheWeek ::= ENUMERATED {sunday(0), monday(1), tuesday(2),
... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2alpha1",
"metadata": {
"name": "v20.variable_syntax_links.v42"
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "grafana",
"uid": "-- Grafan... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dashboards_from_v0_to_v2/v2beta1.v20.variable_syntax_links.v2alpha1.json |
- Type: `function`
- Name: `staticMethod`
- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass`
- Static: yes
- Parent: yes | unknown | github | https://github.com/symfony/symfony | src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.md |
__author__ = 'Sean Griffin'
__version__ = '1.0.0'
__email__ = 'sean@thoughtbot.com'
import sys
import os.path
import json
import shutil
from pymel.core import *
from maya.OpenMaya import *
from maya.OpenMayaMPx import *
kPluginTranslatorTypeName = 'Three.js'
kOptionScript = 'ThreeJsExportScript'
kDefaultOptionsStri... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# not... | unknown | codeparrot/codeparrot-clean | ||
//===--- AddressUtils.swift - Utilities for handling SIL addresses -------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LI... | swift | github | https://github.com/apple/swift | SwiftCompilerSources/Sources/Optimizer/Utilities/AddressUtils.swift |
#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | unknown | codeparrot/codeparrot-clean | ||
import myhdl
from myhdl import (Signal, intbv, enum, instance, always, delay,
concat, now, instances)
def convert(analog, rails=(0, 3.3)):
sample_max = (2**12)-1
sample_min = 0
sample = intbv(0)[12:]
smp = (analog - rails[0])/rails[1] * ((2**12)-1)
smp = min(sample_max, smp)
... | 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 | ||
numerics = {
"001": "welcome",
"002": "yourhost",
"003": "created",
"004": "myinfo",
"005": "isupport",
"006": "map", # unrealircd
"007": "endmap", # unrealircd
"008": "snomaskc",
"010": "redir",
"015": "map", # undernet e... | 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.
"""Shim script for the SDK updater, to allow automatic updating.
The purpose of this script is to be a shim which automatically up... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2012-2015 Netforce Co. Ltd.
#
# 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, modify, merge, publi... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
import logging
from django import template
from model import *
import django.template.defaultfilters as defaultfilters
import urllib
register = template.Library()
from datetime import *
@register.filter
def datetz(date,format): #datetime with timedelta
t=timedelta(seconds=3600*g_blog.timedel... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that ios app bundles are built correctly.
"""
import TestGyp
import TestMac
import os.path
import sys
# Xcode supports for a... | unknown | codeparrot/codeparrot-clean | ||
/*global SelectBox, gettext, ngettext, interpolate, quickElement, SelectFilter*/
/*
SelectFilter2 - Turns a multiple-select box into a filter interface.
Requires core.js and SelectBox.js.
*/
'use strict';
{
window.SelectFilter = {
init: function(field_id, field_name, is_stacked) {
if (field_id.... | javascript | github | https://github.com/django/django | django/contrib/admin/static/admin/js/SelectFilter2.js |
# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para vidhog
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
# TODO: Este no tiene captcha, podría funcionar en free
impor... | unknown | codeparrot/codeparrot-clean | ||
from langchain_classic import smith
EXPECTED_ALL = [
"arun_on_dataset",
"run_on_dataset",
"RunEvalConfig",
]
def test_all_imports() -> None:
assert set(smith.__all__) == set(EXPECTED_ALL) | python | github | https://github.com/langchain-ai/langchain | libs/langchain/tests/unit_tests/smith/test_imports.py |
# Copyright (C) 2013 David Rusk
#
# 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, modify, merge, publish, distribu... | unknown | codeparrot/codeparrot-clean | ||
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.embeddings import VertexAIEmbeddings
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional i... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/langchain_classic/embeddings/vertexai.py |
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public tr... | unknown | codeparrot/codeparrot-clean | ||
"""Views for items (modules)."""
import logging
from uuid import uuid4
from functools import partial
from static_replace import replace_static_urls
from xmodule_modifiers import wrap_xblock
from django.core.exceptions import PermissionDenied
from django.contrib.auth.decorators import login_required
from xmodule.mod... | unknown | codeparrot/codeparrot-clean | ||
/*
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/kubelet/cm/types.go |
scrape_configs:
- job_name: prometheus
kubernetes_sd_configs:
- role: endpoints
kubeconfig_file: /user1/.kube/config | unknown | github | https://github.com/prometheus/prometheus | config/testdata/kubernetes_kubeconfig_without_apiserver.good.yml |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright 2014 Camptocamp SA
# Author: Leonardo Pistone
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | unknown | codeparrot/codeparrot-clean | ||
// errorcheck -0 -m -l
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Test escape analysis with respect to field assignments.
package escape
var sink interface{}
type X struct {
p1 *int
p2 *int
a ... | go | github | https://github.com/golang/go | test/escape_field.go |
#!/usr/bin/env python -i
# preceeding line should have path for Python on your machine
# vizplotgui_pymol.py
# Purpose: viz running LAMMPS simulation via PyMol with plot and GUI
# Syntax: vizplotgui_pymol.py in.lammps Nfreq compute-ID
# in.lammps = LAMMPS input script
# Nfreq = plot data point and v... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
from __future__ import unicode_literals
from .. import Provider as PersonProvider
class Provider(PersonProvider):
formats_female = (
'{{first_name_female}} {{last_name}}',
'{{first_name_female}} {{last_name}}',
'{{first_name_female}} {{last_name}}',
'{{first_name_fema... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | unknown | codeparrot/codeparrot-clean | ||
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | python | github | https://github.com/apache/airflow | airflow-core/tests/unit/listeners/slow_listener.py |
<?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\Component\Form;
/**
* Reverses a transformer.
*
* When the t... | php | github | https://github.com/symfony/symfony | src/Symfony/Component/Form/ReversedTransformer.php |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package command
import (
"encoding/json"
"fmt"
"reflect"
"strings"
"testing"
"github.com/hashicorp/cli"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/sdk/helper/consts"
)
func testPluginRuntimeRegisterCommand(tb testing.TB... | go | github | https://github.com/hashicorp/vault | command/plugin_runtime_register_test.go |
/*-------------------------------------------------------------------------
*
* dict_xsyn.c
* Extended synonym dictionary
*
* Copyright (c) 2007-2026, PostgreSQL Global Development Group
*
* IDENTIFICATION
* contrib/dict_xsyn/dict_xsyn.c
*
*-----------------------------------------------------------------... | c | github | https://github.com/postgres/postgres | contrib/dict_xsyn/dict_xsyn.c |
'''
Created on 04.05.2013
@author: capone
'''
from crashtec.db.provider import routines as dbroutines
from crashtec.db.schema.fields import PRIMARY_KEY_FIELD
import dbmodel
# Utility class which used to make hack with meta-classes. See results_metaclass()
class Acceptor(object):
def __init__(self, class_name):
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2020 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/data/datasets/__init__.py |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The config file for importing the example_data dataset into
ExampleNode.
Go to http://vamdc.tmy.se/doc/importing.html
for understanding what happens below.
Use this file this way (first edit base path) :
$ cd ../imptools
$ python run_rewrite.py ../nodes/ExampleNode/... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-09-01 08:59
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations... | 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/errors/NotLeaderOrFollowerException.java |
//! Tokio support for [Windows named pipes].
//!
//! [Windows named pipes]: https://docs.microsoft.com/en-us/windows/win32/ipc/named-pipes
use std::ffi::c_void;
use std::ffi::OsStr;
use std::io::{self, Read, Write};
use std::pin::Pin;
use std::ptr;
use std::ptr::null_mut;
use std::task::{Context, Poll};
use crate::io... | rust | github | https://github.com/tokio-rs/tokio | tokio/src/net/windows/named_pipe.rs |
---
- name: though we test for 'vars' this is only for backwards compatibility and the 'vars' variable will be deprecated and removed in the future
hosts: localhost
gather_facts: no
tasks:
- add_host:
name: host1
ansible_connection: local
- hosts: localhost
gather_facts: no
vars:
serv... | unknown | github | https://github.com/ansible/ansible | test/integration/targets/delegate_to/resolve_vars.yml |
# -*- coding: utf-8 -*-
"""Display formatters.
Inheritance diagram:
.. inheritance-diagram:: IPython.core.formatters
:parts: 3
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import abc
import inspect
import json
import sys
import traceback
import warnings... | unknown | codeparrot/codeparrot-clean | ||
from veripy.models import ComplianceTestSuite
from veripy.models.decorators import must, should
import client
#import relay_agent
import server
class StatelessDHCPv6ServiceClientSpecification(ComplianceTestSuite):
"""
Stateless Dynamic Host Configuration Protocol Service for IPv6 (DHCPv6 Client)
These te... | 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 | ||
from inventory import Inventory, InventoryDiff, InventoryReport
import logging
import argparse
import sys
import shutil
import os
import json
import sqlite3
from threading import get_ident
from collections import namedtuple
import smtplib
import getpass
from email.mime.application import MIMEApplication
from email.mime... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright 2014, 2015 OpenMarket Ltd
#
# 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 | ||
/*
* 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/utils/AbstractIterator.java |
#
# 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 us... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
===============================================================================
Helper functions (:mod:`sknano.core.geometric_regions._funcs`)
===============================================================================
.. currentmodule:: sknano.core.geometric_regions._funcs
"""
from __... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2018 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 applic... | 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 | buildSrc/src/test/java/org/springframework/boot/build/architecture/beans/privatebean/PrivateBean.java |
#ifndef LEVENSHTEIN_H
#define LEVENSHTEIN_H
int levenshtein(const char *string1, const char *string2,
int swap_penalty, int substitution_penalty,
int insertion_penalty, int deletion_penalty);
#endif | c | github | https://github.com/git/git | levenshtein.h |
# 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/integrations/fbgemm_fp8.py |
from __future__ import unicode_literals, division, absolute_import
import re
import copy
import logging
log = logging.getLogger('utils.qualities')
class QualityComponent(object):
""""""
def __init__(self, type, value, name, regexp=None, modifier=None, defaults=None):
"""
:param type: Type of q... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import annotations
from ansible.errors import AnsibleTemplatePluginError
class AnsibleTemplatePluginRuntimeError(AnsibleTemplatePluginError):
"""The specified template plugin (lookup/filter/test) raised an exception during execution."""
def __init__(self, plugin_type: str, plugin_name: str) -... | python | github | https://github.com/ansible/ansible | lib/ansible/_internal/_templating/_errors.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.