code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
# frozen_string_literal: true
require "cases/helper"
class PostgresqlActiveSchemaTest < ActiveRecord::PostgreSQLTestCase
def setup
ActiveRecord::Base.lease_connection.materialize_transactions
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.class_eval do
def execute(sql, name = nil) sql end
en... | ruby | github | https://github.com/rails/rails | activerecord/test/cases/adapters/postgresql/active_schema_test.rb |
function Component() {
let obj = {
method() {
return 1;
},
};
return obj.method();
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{x: 1}, {a: 2}, {b: 2}],
}; | javascript | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/object-method-shorthand.js |
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
"""
Formatters for the exception data that comes from ExceptionCollector.
"""
# @@: TODO:
# Use this: http://www.zope.org/Members/tino/VisualTraceback... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for explorer
"""
from twisted.trial import unittest
from twisted.manhole import explorer
import types, string
"""
# Tests:
Get an ObjectLink. Browse ObjectLink.identifier. Is it the same?
Watch Object. Make sure... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2025 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/etcdutl/bucket_command.go |
#!/usr/bin/env bash
#
# Copyright 2022 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
#
# Unle... | unknown | github | https://github.com/tensorflow/tensorflow | ci/official/containers/ml_build/setup.packages.sh |
# -*- coding: utf-8 -*-
from __future__ import with_statement
from django.core.cache import cache
from django.template import Template, RequestContext
from django.test.utils import override_settings
from sekizai.context import SekizaiContext
from cms import plugin_rendering
from cms.api import create_page, add_plugin... | unknown | codeparrot/codeparrot-clean | ||
from langchain_classic.indexes import __all__
def test_all() -> None:
"""Use to catch obvious breaking changes."""
expected = [
"aindex",
"GraphIndexCreator",
"index",
"IndexingResult",
"SQLRecordManager",
"VectorstoreIndexCreator",
]
assert sorted(__all_... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/tests/unit_tests/indexes/test_api.py |
from test.integration.base import DBTIntegrationTest, use_profile
import random
import time
class TestBaseBigQueryRun(DBTIntegrationTest):
@property
def schema(self):
return "bigquery_test_022"
@property
def models(self):
return "models"
@property
def project_config(self):
... | unknown | codeparrot/codeparrot-clean | ||
import warnings
from glob import glob
import numpy as np
from .extern.six import string_types
from . import _librootnumpy
__all__ = [
'root2array',
'root2rec',
'list_trees',
'list_branches',
'list_structures',
'list_directories',
'tree2array',
'tree2rec',
'array2tree',
'array2r... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/core/kernels/concat_lib_gpu.h |
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, o... | unknown | codeparrot/codeparrot-clean | ||
package kotlinx.coroutines.internal
internal expect class CommonThreadLocal<T> {
fun get(): T
fun set(value: T)
}
/**
* Create a thread-local storage for an object of type [T].
*
* If two different thread-local objects share the same [name], they will not necessarily share the same value,
* but they may.
... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/common/src/internal/ThreadLocal.common.kt |
# -*- coding:utf-8 -*-
# coding=<utf8>
__version__ = '0.0.1'
"""
start_deploy_server(branch='', directory='',github='', project=''):
change_server_test_to_master(directory='', project='', github=''):
change_source_test_to_master(branch=''):
deploy_server(directory='', project=''):
new_branch(branch='') - создаёт нову... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2024 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package backup
import (
"context"
"math"
"strings"
"time"
"github.com/cockroachdb/cockroach/pkg/backup/backupbase"
"github.com/cockroachdb/cockroach/pkg/backup/b... | go | github | https://github.com/cockroachdb/cockroach | pkg/backup/compaction_job.go |
#!/usr/bin/env python
# dominfo - print some information about a domain
import libvirt
import sys
import os
import libxml2
import pdb
def usage():
print('Usage: %s DOMAIN' % sys.argv[0])
print(' Print information about the domain DOMAIN')
def print_section(title):
print("\n%s" % title)
print("=" ... | unknown | codeparrot/codeparrot-clean | ||
# plugin/plugin_base.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Testing extensions.
this module is designed to work as a testing-framework... | unknown | codeparrot/codeparrot-clean | ||
/*
* This file implements assignment from a scalar to an ndarray.
*
* Written by Mark Wiebe (mwwiebe@gmail.com)
* Copyright (c) 2011 by Enthought, Inc.
*
* See LICENSE.txt for the license.
*/
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
#define _UMATHMODULE
#define PY_SSIZE_T_CLEAN
#i... | c | github | https://github.com/numpy/numpy | numpy/_core/src/multiarray/array_assign_scalar.c |
import string
from collections import Iterable
from common.exceptions import LogicError
from storage.kv_store import KeyValueStorage
class ReqIdrToTxn:
"""
Stores a map from client identifier, request id tuple to transaction
sequence number
"""
delimiter = "~"
def __init__(self, keyValueStor... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-03-23 20:34
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.s... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from zerver.lib.test_classes import WebhookTestCase
class CircleCiHookTests(WebhookTestCase):
STREAM_NAME = 'circleci'
URL_TEMPLATE = u"/api/v1/external/circleci?stream={stream}&api_key={api_key}"
FIXTURE_DIR_NAME = 'circleci'
def test_circleci_build_in_success_status(self):
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
import random
from openerp import SUPERUSER_ID
from openerp.osv import osv, orm, fields
from openerp.addons.web.http import request
class payment_transaction(orm.Model):
_inherit = 'payment.transaction'
_columns = {
# link with the sale order
'sale_order_id': fields.ma... | unknown | codeparrot/codeparrot-clean | ||
'use server'
export default async function foo() {} | javascript | github | https://github.com/vercel/next.js | crates/next-custom-transforms/tests/fixture/server-actions/server-graph/10/input.js |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('commerce'... | 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/triggers/test_callback.py |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# coding=utf-8
# Copyright 2012 Hewlett-Packard Development Company, L.P.
# 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 Lic... | unknown | codeparrot/codeparrot-clean | ||
'''
LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It
should support the following operations: get and set.
get(key) - Get the value (will always be positive) of the key if the key exists
in the cache, otherwise return -1.
set(key, value) - Set or insert the value if th... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | unknown | codeparrot/codeparrot-clean | ||
kind: ENHANCEMENTS
body: 'ssh-based provisioner (file + remote-exec): Re-enable support for PowerShell'
time: 2025-10-22T16:29:09.342697+01:00
custom:
Issue: "37794" | unknown | github | https://github.com/hashicorp/terraform | .changes/v1.15/ENHANCEMENTS-20251022-162909.yaml |
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use http::{header::*, response::Builder as ResponseBuilder, status::StatusCode};
use http_range::HttpRange;
us... | rust | github | https://github.com/tauri-apps/tauri | examples/streaming/main.rs |
# -*- coding: utf-8 -*-
#
# Flask-SQLAlchemy documentation build configuration file, created by
# sphinx-quickstart on Tue Jun 1 14:31:57 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file... | unknown | codeparrot/codeparrot-clean | ||
# -*- encoding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the... | unknown | codeparrot/codeparrot-clean | ||
groups:
- name: invalid
rules:
- record: job:http_requests:rate5m
expr: sum by (job)(rate(http_requests_total[5m]))
unexpected_field: this_field_should_not_be_here | unknown | github | https://github.com/prometheus/prometheus | rules/fixtures/invalid_rules.yaml |
# (c) 2016 Matt Clay <matt@mystile.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
... | unknown | codeparrot/codeparrot-clean | ||
from numpy.random import random
from bokeh.plotting import figure, show, output_file
def mscatter(p, x, y, marker):
p.scatter(x, y, marker=marker, size=15,
line_color="navy", fill_color="orange", alpha=0.5)
def mtext(p, x, y, text):
p.text(x, y, text=[text],
text_color="firebrick", t... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# pyczmq documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 10 15:40:03 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2013-2016 Cisco Systems, 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
#
# Unl... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env bash
export ICONS_VOLUME="$(realpath ../.icons)"
export DIST_VOLUME="$(realpath dist)"
export ISOLATION_VOLUME="$(realpath isolation-dist)"
export WORKSPACE_VOLUME="$(realpath ../..)" | unknown | github | https://github.com/tauri-apps/tauri | examples/api/.setup-cross.sh |
"""
Testing for Multi-layer Perceptron module (sklearn.neural_network)
"""
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause
import re
import warnings
import joblib
import numpy as np
import pytest
from sklearn.datasets import (
load_digits,
load_iris,
make_multilabel_classi... | python | github | https://github.com/scikit-learn/scikit-learn | sklearn/neural_network/tests/test_mlp.py |
class MigrationOptimizer:
"""
Power the optimization process, where you provide a list of Operations
and you are returned a list of equal or shorter length - operations
are merged into one if possible.
For example, a CreateModel and an AddField can be optimized into a
new CreateModel, and Creat... | python | github | https://github.com/django/django | django/db/migrations/optimizer.py |
from .binary import encode_bin, decode_bin
class BitStreamReader(object):
__slots__ = ["substream", "buffer", "total_size"]
def __init__(self, substream):
self.substream = substream
self.total_size = 0
self.buffer = ""
def close(self):
if self.total_size % 8 != 0:
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
$Id: SphericalCutter.py 1076 2011-05-29 14:32:46Z sumpfralle $
Copyright 2008-2010 Lode Leroy
Copyright 2010 Lars Kruse <devel@sumpfralle.de>
This file is part of PyCAM.
PyCAM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as p... | unknown | codeparrot/codeparrot-clean | ||
/** @type {import("../../../../").LoaderDefinition<string>} */
module.exports = function (source) {
//@ts-expect-error errors must be Errors, string is not recommended and should lead to type error
this.emitError(this.query.slice(1));
return source;
}; | javascript | github | https://github.com/webpack/webpack | test/cases/errors/loader-error-warning/error-loader.js |
# Copyright (c) 2011, Found IT A/S and Piped Project Contributors.
# See LICENSE for details.
from twisted.trial import unittest
from piped import processing
from piped.providers import pipeline_provider
class PipelineProviderTest(unittest.TestCase):
def setUp(self):
self.runtime_environment = processing... | unknown | codeparrot/codeparrot-clean | ||
import cgi
from eventlet import greenthread
import eventlet
import errno
import os
import socket
import sys
from tests import skipped, LimitedTestCase, skip_with_pyevent, skip_if_no_ssl
from unittest import main
from eventlet import greenio
from eventlet import event
from eventlet.green import socket as greensocket
fr... | 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/objc/ForbiddenSubclassingCheck.h |
{
"name": "notes",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "notes",
"dependencies": {
"localforage": "^1.10.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.15.0"
},
"devDependencies": {
"@roll... | json | github | https://github.com/remix-run/react-router | examples/notes/package-lock.json |
#!/usr/bin/env python
from DIRAC.Core.Base import Script
Script.setUsageMessage( """
Get status of the available Storage Elements
Usage:
%s [<options>]
""" % Script.scriptName )
Script.parseCommandLine()
import DIRAC
from DIRAC import gConfig,gLogger
from DIRAC.Resour... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
import time, sys, SocketServer, threading, struct, Queue
from collections import namedtuple
storeIPQueue = Queue.Queue()
class StunServerThread (threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.isAlive = True
# Default port of STUN server over UDP
self.UDPPort = ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
"""
A simple python program of solving a 2D wave equation in parallel.
Domain partitioning and inter-processor communication
are done by an object of class MPIRectPartitioner2D
(which is a subclass of RectPartitioner2D and uses MPI via mpi4py)
An example of running the program is (8 processors, 4... | unknown | codeparrot/codeparrot-clean | ||
{% load auth %}
<div{% include 'django/forms/widgets/attrs.html' %}>
{% render_password_as_hash widget.value %}
<p><a role="button" class="button" href="{{ password_url|default:"../password/" }}">{{ button_label }}</a></p>
</div> | html | github | https://github.com/django/django | django/contrib/auth/templates/auth/widgets/read_only_password_hash.html |
import os.path
import sys
import unittest
from test import support
if support.PGO:
raise unittest.SkipTest("test is not helpful for PGO")
if sys.platform == "win32":
raise unittest.SkipTest("fork is not available on Windows")
if sys.platform == 'darwin':
raise unittest.SkipTest("test may crash on macOS (... | python | github | https://github.com/python/cpython | Lib/test/test_multiprocessing_fork/__init__.py |
import httplib
import logging
from functools import wraps
from flask import json, request
from crane import exceptions
from crane import data
import os
logger = logging.getLogger(__name__)
def http_error_handler(error):
"""
handle HTTPError exceptions and return the associated error message and HTTP
res... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
from rest_framework import status
from rest_framework.response import Response
from sentry.api.bases.project import ProjectEndpoint
from sentry.api.serializers import serialize
from sentry.api.serializers.rest_framework import RuleSerializer
from sentry.models import Rule
class... | 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... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import unittest
from erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 Nandaja Varma <nvarma@redhat.com>
#
# 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 op... | unknown | codeparrot/codeparrot-clean | ||
#
# Secret Labs' Regular Expression Engine
#
# various symbols used by the regular expression engine.
# run this script to update the _sre include files!
#
# Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved.
#
# See the sre.py file for information on usage and redistribution.
#
"""Internal support modul... | unknown | codeparrot/codeparrot-clean | ||
<?php
namespace Illuminate\Tests\Database;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Tests\Database\stubs\TestEnum;
use Mockery as m;
use PHPUnit\Framework\TestCase;
class DatabaseEloquentMorphToTest extends Te... | php | github | https://github.com/laravel/framework | tests/Database/DatabaseEloquentMorphToTest.php |
from __future__ import print_function
# 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, Versio... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2024 The Cockroach Authors.
#
# Use of this software is governed by the CockroachDB Software License
# included in the /LICENSE file.
# The intention is that you'll execute the script at the end of your Bazel
# invocation as follows: `bazel test ... $(engflow-args.sh)`. This will add
# remote execution arg... | unknown | github | https://github.com/cockroachdb/cockroach | build/github/engflow-args.sh |
# 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/.
import json
from random import randint
from dateutil.relativedelta import relativedelta
from libmozdata import utils as... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# A small utility to take the output of a Swift validation test run
# where some compiler crashers have been fixed, and move them into the
# "fixed" testsuite, removing the "--crash" in the process.
import re
import sys
import os
def execute_cmd(cmd):
print(cmd)
os.system(cmd)
# The re... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
//// [tests/cases/compiler/commentOnArrayElement8.ts] ////
//// [commentOnArrayElement8.ts]
const array = [
1, /* comment */
];
//// [commentOnArrayElement8.js]
"use strict";
const array = [
1, /* comment */
]; | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/commentOnArrayElement8.js |
import useSWR from "swr";
const fetcher = (query: string) =>
fetch("/api/graphql", {
method: "POST",
headers: {
"Content-type": "application/json",
},
body: JSON.stringify({ query }),
})
.then((res) => res.json())
.then((json) => json.data);
type Data = {
users: {
name: string;... | typescript | github | https://github.com/vercel/next.js | examples/api-routes-graphql/pages/index.tsx |
#!/usr/bin/env python
"""
Example of the very basic, minimal framework for a wxPython application
This version adds a single button
"""
import wx
import os
#--------------------------------------------------------------
# This is how you pre-establish a file filter so that the dialog
# only shows the extension(s) ... | unknown | codeparrot/codeparrot-clean | ||
---
next: false
outline: 2
---
# API index
D3 is a collection of modules that are designed to work together; you can use the modules independently, or you can use them together as part of the default build.
## [d3-array](./d3-array.md)
Array manipulation, ordering, searching, summarizing, *etc.*
### [Add](./d3-arr... | unknown | github | https://github.com/d3/d3 | docs/api.md |
//===--- CastOptimizer.h ----------------------------------*- C++ -*-------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | c | github | https://github.com/apple/swift | include/swift/SILOptimizer/Utils/CastOptimizer.h |
# 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 applica... | 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/src/main/java/org/springframework/boot/context/properties/source/PrefixedIterableConfigurationPropertySource.java |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2012 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 requ... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2017 - 2025 R. Thomas
* Copyright 2017 - 2025 Quarkslab
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless req... | cpp | github | https://github.com/nodejs/node | deps/LIEF/src/COFF/Parser.cpp |
# 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/src/airflow/api_fastapi/core_api/services/public/config.py |
from django.db import NotSupportedError
from django.db.models.expressions import Func
from django.db.models.fields import UUIDField
class UUID4(Func):
function = "UUIDV4"
arity = 0
output_field = UUIDField()
def as_sql(self, compiler, connection, **extra_context):
if connection.features.suppor... | python | github | https://github.com/django/django | django/db/models/functions/uuid.py |
#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/flowables.py
__version__=''' $Id: flowables.py 3959 2012-09-27 14:39:39Z robin $ '''
__doc__="""
A flowable is a "floating element" in a docum... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <arm_neon.h>
#include <qnnpack/sgemm.h>
void pytorch_sgemm_ukernel_6x8__neon(
size_t m... | c | github | https://github.com/pytorch/pytorch | aten/src/ATen/native/quantized/cpu/qnnpack/src/sgemm/6x8-neon.c |
# Django settings for hello project.
import os
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.' + os.environ['DJANGO_DB'], # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'ora... | unknown | codeparrot/codeparrot-clean | ||
'''
Cloudforms.ProvisionRequestManager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provision Request Manager
:license: MIT, see LICENSE for more details.
'''
from time import sleep
from datetime import datetime, timedelta
from Cloudforms.utils import (
update_params,
normalize_object,
normalize_coll... | 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 | ||
.container {
margin-top: -12px;
}
.title {
font-size: 20px;
font-weight: bold;
cursor: pointer;
}
.normal {
composes: title;
}
.danger {
composes: title;
color: rgb(242, 65, 65);
}
.table {
width: 100%;
}
.cell {
height: auto;
word-wrap: break-word;
word-break: break-all;
}
.endpoint, .label... | css | github | https://github.com/prometheus/prometheus | web/ui/react-app/src/pages/targets/ScrapePoolPanel.module.css |
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# 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 pr... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin env python
from boto.cloudsearch2.domain import Domain
from boto.cloudsearch2.layer1 import CloudSearchConnection
from tests.compat import mock, unittest
from httpretty import HTTPretty
import json
from boto.cloudsearch2.search import SearchConnection, SearchServiceException
from boto.compat import six, m... | unknown | codeparrot/codeparrot-clean | ||
"""
Musical Instrument Digital Interface (MIDI) audio file parser.
Documentation:
- Standard MIDI File Format, Dustin Caldwell (downloaded on wotsit.org)
Author: Victor Stinner
Creation: 27 december 2006
"""
from lib.hachoir_parser import Parser
from lib.hachoir_core.field import (FieldSet, Bits, ParserError,
S... | unknown | codeparrot/codeparrot-clean | ||
from collections import OrderedDict
import six
from django.http import Http404
from django.utils.encoding import force_text
from rest_framework import status
from rest_framework import exceptions, status
from rest_framework.compat import set_rollback
from rest_framework.exceptions import PermissionDenied
from rest_fra... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
from __future__ import unicode_literals
import re
from .brightcove import BrightcoveNewIE
from ..compat import compat_str
from ..utils import (
try_get,
update_url_query,
)
class SevenPlusIE(BrightcoveNewIE):
IE_NAME = '7plus'
_VALID_URL = r'https?://(?:www\.)?7plus\.com\.au/(?P<path>... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# === This file is part of Calamares - <http://github.com/calamares> ===
#
# Copyright 2014, Teo Mrnjavac <teo@kde.org>
# Copyright 2017, Alf Gaida <agaida@siduction.org>
#
# Calamares is free software: you can redistribute it and/or modify
# it under the terms o... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from erpnext.hr.doctype.employee.employee import EmployeeUserDisabledError
def execute():
update_hr_permissions()
update_permissions()
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
import os
import sys
import time
import logging
import datetime
import unittest
sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(0, os.path.abspath("../problem/.libs")) # because of _pyabrt
os.environ["PATH"] = "{0}:{1}".format(os.path.abspath(".."), os.environ["PATH"])
from nose impor... | unknown | codeparrot/codeparrot-clean | ||
import math
import random
import util
reproduction_rate = 10
mutation_rate = 5
def allowed_organism(organism):
return util.bin_to_int(organism[:util.x_digits]) < util.kb_width
def rand_organism():
length = (util.x_digits + util.y_digits) * len(util.symbols)
coords = [util.KBCoord(x, y)
for ... | unknown | codeparrot/codeparrot-clean | ||
use futures::sink::SinkExt;
use std::future::poll_fn;
use tokio::sync::mpsc::channel;
use tokio_test::task::spawn;
use tokio_test::{
assert_ok, assert_pending, assert_ready, assert_ready_eq, assert_ready_err, assert_ready_ok,
};
use tokio_util::sync::PollSender;
#[tokio::test]
async fn simple() {
let (send, mu... | rust | github | https://github.com/tokio-rs/tokio | tokio-util/tests/mpsc.rs |
prelude: |
obj = Object.new
x = nil
benchmark:
kernel_tap: obj.tap { |o| x = o }
loop_count: 20000000 | unknown | github | https://github.com/ruby/ruby | benchmark/kernel_tap.yml |
import unittest, random, sys, time
sys.path.extend(['.','..','../..','py'])
import h2o2 as h2o
import h2o_cmd, h2o_import as h2i, h2o_xl
from h2o_xl import DF, Xbase, Key, KeyIndexed, Assign, Fcn
from h2o_test import dump_json, verboseprint
def checkAst(expected):
ast = h2o_xl.Xbase.lastExecResult['ast']
asse... | 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 {ApplicationEnvironment, Environment} from '../../../ng-devtools';
import {environment} from '../environment... | typescript | github | https://github.com/angular/angular | devtools/projects/shell-browser/src/app/chrome-application-environment.ts |
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {Effect, ValueKind, ValueReason} from './HIR';
import {
BUILTIN_SHAPES,
BuiltInArrayId,
BuiltInAutodepsId,
BuiltI... | typescript | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts |
import base64
import datetime
import sys
import time
import unittest
import xmlrpclib
import SimpleXMLRPCServer
import mimetools
import httplib
import socket
import StringIO
import os
import re
from test import test_support
try:
import threading
except ImportError:
threading = None
try:
unicode
except Nam... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
from collections import defaultdict
from itertools import chain
import logging
import os
from pip._vendor import pkg_resources
from pip._vendor import requests
from pip.compat import expanduser
from pip.download import (is_file_url, is_dir_url, is_vcs_url, url_to_path,
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright (C) PyZMQ Developers
# Distributed under the terms of the Modified BSD License.
import sys
import time
import struct
from unittest import TestCase
import zmq
from zmq.tests import BaseZMQTestCase, skip_if, skip_pypy
from zmq.utils.monitor import recv_monitor_message
skip_lt_4 = s... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.