code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
import * as React from "react";
import * as ReactDOM from "react-dom/client";
import { act } from "@testing-library/react";
import { MemoryRouter, Routes, Route, Link } from "../../index";
function click(anchor: HTMLAnchorElement, eventInit?: MouseEventInit) {
let event = new MouseEvent("click", {
view: window,
... | typescript | github | https://github.com/remix-run/react-router | packages/react-router/__tests__/dom/link-click-test.tsx |
from django.conf import settings
from django.core.management.base import BaseCommand
from iati.models import Activity
from iati.transaction.models import Transaction
class Command(BaseCommand):
def update_searchable_activities(self):
"""
Set all activities to searchable if the reporting org is in... | unknown | codeparrot/codeparrot-clean | ||
"""Add support for the Xiaomi TVs."""
import logging
import pymitv
import voluptuous as vol
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
SUPPORT_TURN_OFF,
SUPPORT_TURN_ON,
SUPPORT_VOLUME_STEP,
)
from homeassi... | unknown | codeparrot/codeparrot-clean | ||
"""Tests for letsencrypt.plugins.common."""
import unittest
import mock
from acme import challenges
from acme import jose
from letsencrypt import achallenges
from letsencrypt.tests import acme_util
from letsencrypt.tests import test_util
class NamespaceFunctionsTest(unittest.TestCase):
"""Tests for letsencrypt... | unknown | codeparrot/codeparrot-clean | ||
/*-------------------------------------------------------------------------
*
* ri_triggers.c
*
* Generic trigger procedures for referential integrity constraint
* checks.
*
* Note about memory management: the private hashtables kept here live
* across query and transaction boundaries, in fact they live as long... | c | github | https://github.com/postgres/postgres | src/backend/utils/adt/ri_triggers.c |
<!--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 applicable law or agreed... | unknown | github | https://github.com/huggingface/transformers | docs/source/en/model_doc/recurrent_gemma.md |
/* Auto-generated by generate-wrappers.py script. Do not modify */
#if defined(__i386__) || defined(__i686__) || defined(__x86_64__)
#include <requantization/q31-ssse3.c>
#endif /* defined(__i386__) || defined(__i686__) || defined(__x86_64__) */ | c | github | https://github.com/pytorch/pytorch | aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/requantization/q31-ssse3.c |
import unittest
from robot.utils.asserts import assert_equals, assert_true, assert_false
from robot.output.logger import Logger
from robot.output.console.verbose import VerboseOutput
class MessageMock:
def __init__(self, timestamp, level, message):
self.timestamp = timestamp
self.level = level
... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2017 - 2025 R. Thomas
* Copyright 2017 - 2025 Quarkslab
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless req... | unknown | github | https://github.com/nodejs/node | deps/LIEF/include/LIEF/DWARF/enums.hpp |
"""SCons.Tool.c++
Tool-specific initialization for generic Posix C++ compilers.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The... | unknown | codeparrot/codeparrot-clean | ||
//===--- CodeCompletionContext.h ------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2022 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/IDE/CodeCompletionContext.h |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Comment.parent_content'
db.alter_column('canvas_comment', 'parent_content_id', self.gf('django.db... | unknown | codeparrot/codeparrot-clean | ||
// RUN: %check_clang_tidy %s bugprone-unused-return-value %t \
// RUN: -config='{CheckOptions: \
// RUN: {bugprone-unused-return-value.CheckedFunctions: "::*"}}' \
// RUN: --
struct S1 {
S1(){};
S1(S1 const &);
S1(S1 &&);
S1 &operator=(S1 const &);
S1 &operator=(S1 &&);
S1 &operator+=(S1);
S1 &operator+... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-tidy/checkers/bugprone/unused-return-value-avoid-assignment.cpp |
@props(['frame'])
@php
if ($class = $frame->class()) {
$source = $class;
if ($previous = $frame->previous()) {
$source .= $previous->operator();
$source .= $previous->callable();
$source .= '('.implode(', ', $previous->args()).')';
}
} else {
... | php | github | https://github.com/laravel/framework | src/Illuminate/Foundation/resources/exceptions/renderer/components/formatted-source.blade.php |
/*
* 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... | kotlin | github | https://github.com/spring-projects/spring-framework | framework-docs/src/main/kotlin/org/springframework/docs/web/websocket/stomp/websocketstompdestinationseparator/RedController.kt |
# -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | unknown | codeparrot/codeparrot-clean | ||
from optparse import make_option
import sys
from django.core.management.base import BaseCommand
from xbrowse_server.phenotips.utilities import find_db_files
from xbrowse_server.phenotips.utilities import find_references
import os
'''
Please note: this is a beta version of this tool and under development
'''
class Co... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2012 ARM Limited
# 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 implementation of the functionality ... | unknown | codeparrot/codeparrot-clean | ||
name: "Run CodeQL Analysis"
on:
push:
pull_request:
workflow_dispatch:
permissions: read-all
jobs:
run-analysis:
permissions:
actions: read
contents: read
security-events: write
uses: spring-io/github-actions/.github/workflows/codeql-analysis.yml@6e66995f7d29de1e4ff76e4f0def7a10163fe91... | unknown | github | https://github.com/spring-projects/spring-boot | .github/workflows/run-codeql-analysis.yml |
create_makefile("-test-/scan_args") | ruby | github | https://github.com/ruby/ruby | ext/-test-/scan_args/extconf.rb |
"""
support for presenting detailed information in failing assertions.
"""
from __future__ import absolute_import, division, print_function
import py
import sys
from _pytest.assertion import util
from _pytest.assertion import rewrite
from _pytest.assertion import truncate
def pytest_addoption(parser):
group = par... | unknown | codeparrot/codeparrot-clean | ||
<!--
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
-->
# curl C code style
Source code that has a common style is easier to read than code that uses
different styles in different places. It helps making the code feel like one
single code base. Easy-to-read is an important prop... | unknown | github | https://github.com/curl/curl | docs/internals/CODE_STYLE.md |
import itertools
import unittest
from parameterized import parameterized
import torch
import torch.nn as nn
from nsoltAtomExtension2dLayer import NsoltAtomExtension2dLayer
nchs = [ [3,3], [4,4] ]
datatype = [ torch.float, torch.double ]
nrows = [ 4, 8, 16 ]
ncols = [ 4, 8, 16 ]
dir = [ 'Right', 'Left', 'Up', 'Down' ]
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015 RethinkDB, all rights reserved.
import time
import struct
from twisted.python import log
from twisted.internet import reactor, defer
from twisted.internet.defer import inlineCallbacks, returnValue, Deferred
from twisted.internet.defer import DeferredQueue, CancelledError
from twisted.internet.protoco... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Perform basic ELF security checks on a series of executables.
Exit status will be 0 if successful, and ... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2015 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
#include "state.h"
#include "../common/dictionary.h"
#include "../common/platform.h"
#include "huffman.h"
#if defined(__cplusplus) || defined(c_pluspl... | c | github | https://github.com/nodejs/node | deps/brotli/c/dec/state.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... | java | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/PathIsNotEmptyDirectoryException.java |
import subprocess
def sam2bam_sort(samfiles,thread=1,sortType=''):
"""
This function will change sam file to bam file and sort bam files
"""
sorted_files = []
sam2bamCmd=''
rmSamCmd=''
sortBamCmd=''
indexCmd=''
rmBamCmd=''
for sam in samfiles:
bam = sam[:-3] + 'bam'
... | 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/test/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinatorTest.java |
"""Utilities for extracting common archive formats"""
__all__ = [
"unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter",
"UnrecognizedFormat", "extraction_drivers", "unpack_directory",
]
import zipfile
import tarfile
import os
import shutil
import posixpath
import contextlib
from pkg_resource... | unknown | codeparrot/codeparrot-clean | ||
#ifndef C10_UTIL_TYPE_H_
#define C10_UTIL_TYPE_H_
#include <cstddef>
#include <string>
#ifdef __GXX_RTTI
#include <typeinfo>
#endif // __GXX_RTTI
#include <c10/macros/Macros.h>
namespace c10 {
/// Utility to demangle a C++ symbol name.
C10_API std::string demangle(const char* name);
/// Returns the printable name ... | c | github | https://github.com/pytorch/pytorch | c10/util/Type.h |
# This file is a part of MediaDrop (http://www.mediadrop.net),
# Copyright 2009-2014 MediaDrop contributors
# For the exact contribution history, see the git revision log.
# The source code contained in this file is licensed under the GPLv3 or
# (at your option) any later version.
# See LICENSE.txt in the main project ... | 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\Test\Co... | php | github | https://github.com/composer/composer | tests/Composer/Test/Command/RepositoryCommandTest.php |
#
# gdb helper commands and functions for Linux kernel debugging
#
# module tools
#
# Copyright (c) Siemens AG, 2013
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
from linux import cpus, utils
module_type = utils.CachedType("stru... | unknown | codeparrot/codeparrot-clean | ||
"""Functionality for loading agents."""
import json
import logging
from pathlib import Path
from typing import Any
import yaml
from langchain_core._api import deprecated
from langchain_core.language_models import BaseLanguageModel
from langchain_core.tools import Tool
from langchain_classic.agents.agent import BaseM... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/langchain_classic/agents/loading.py |
import os
import re, unicodedata
import tg
import gettext
import math
import inspect
class NoDefault(object):
"""A dummy value used for parameters with no default."""
def slugify(value, type, models):
if isinstance(value, dict):
for k, v in value.iteritems():
key = k
value = v
... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "v0alpha1.Repeating-an-empty-row.v42"
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "",
... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/e2e-repeats/v0alpha1.Repeating-an-empty-row.v42.v2beta1.json |
#!/usr/bin/env python
# straight outta them aubio docs
def apply_filter(path):
from aubio import source, sink, digital_filter
from os.path import basename, splitext
# open input file, get its samplerate
s = source(path)
samplerate = s.samplerate
# create an A-weighting filter
f = digital... | unknown | codeparrot/codeparrot-clean | ||
<!doctype html>
<!-- #docregion -->
<html lang="en">
<head>
<base href="/" />
<title>Drag and Drop Disabled Sorting Example</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<cdk-drag-drop-disabled-sorting-example> </cdk-dr... | html | github | https://github.com/angular/angular | adev/src/content/examples/drag-drop/src/disable-sorting/index.html |
"""A basic example of using the SQLAlchemy Sharding API.
Sharding refers to horizontally scaling data across multiple
databases.
The basic components of a "sharded" mapping are:
* multiple databases, each assigned a 'shard id'
* a function which can return a single shard id, given an instance
to be saved; this is c... | unknown | codeparrot/codeparrot-clean | ||
from ipv8.database import database_blob
from ipv8.keyvault.crypto import default_eccrypto
from ipv8.peer import Peer
from ipv8.test.base import TestBase
from pony.orm import db_session
from tribler_core.modules.metadata_store.community.gigachannel_community import GigaChannelCommunity
from tribler_core.modules.metada... | unknown | codeparrot/codeparrot-clean | ||
import z3
from miasm2.core.asmblock import AsmLabel
from miasm2.expression.expression import *
from miasm2.ir.translators.translator import Translator
from miasm2.ir.translators.z3_ir import Z3Mem
# Some examples of use/unit tests.
def equiv(z3_expr1, z3_expr2):
s = z3.Solver()
s.add(z3.Not(z3_expr1 == z3_ex... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Author: Douglas Creager <dcreager@dcreager.net>
# This file is placed into the public domain.
# Calculates the current version number. If possible, this is the
# output of “git describe”, modified to conform to the versioning
# scheme that setuptools uses. If “git describe” returns an error... | unknown | codeparrot/codeparrot-clean | ||
# Set up and run tests of the 'bundle-uri' command in protocol v2
#
# The test that includes this script should set BUNDLE_URI_PROTOCOL
# to one of "file", "git", or "http".
BUNDLE_URI_TEST_PARENT=
BUNDLE_URI_TEST_URI=
BUNDLE_URI_TEST_BUNDLE_URI=
case "$BUNDLE_URI_PROTOCOL" in
file)
BUNDLE_URI_PARENT=file_parent
BUN... | unknown | github | https://github.com/git/git | t/lib-bundle-uri-protocol.sh |
# Copyright 2008-2012 Nokia Siemens Networks Oyj
#
# 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 | ||
import sys
import atexit
import signal
from vexbot._version import __version__ as version
from vexbot.adapters.irc import IrcInterface
"""
try:
pkg_resources.get_distribution('irc3')
except pkg_resources.DistributionNotFound:
_IRC3_INSTALLED = False
if _IRC3_INSTALLED:
import irc3
else:
pass
"""
im... | 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 appl... | unknown | codeparrot/codeparrot-clean | ||
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.shortcuts import render_to_kmz
from django.contrib.gis.tests.utils import no_oracle
from django.db.models import Count, Min
from django.test import TestC... | unknown | codeparrot/codeparrot-clean | ||
"""
Video Maker transforms screenshots taken during a test into a HTML 5
compatible video, so that one can watch the screen activity of the
whole test from inside your own browser.
This relies on generally available multimedia libraries, frameworks
and tools.
"""
import os
import time
import glob
import logging
impor... | unknown | codeparrot/codeparrot-clean | ||
// @validatePreserveExistingMemoizationGuarantees
import {useMemo} from 'react';
import {Stringify} from 'shared-runtime';
// derived from https://github.com/facebook/react/issues/32261
function Component({items}) {
const record = useMemo(
() =>
Object.fromEntries(
items.map(item => [item.id, ref =... | javascript | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/object-keys.js |
/* Copyright 2020 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/tpu/graph_rewrite/host_training_loop_optimization_util.h |
#!/usr/bin/python
# This script is used to generate luabinding glue codes.
# Android ndk version must be ndk-r9b.
import sys
import os, os.path
import shutil
import ConfigParser
import subprocess
import re
from contextlib import contextmanager
def _check_ndk_root_env():
''' Checking the environment NDK_ROOT, whi... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import asyncore
import mimetypes
import os
import shutil
import smtpd
import sys
import tempfile
import threading
from email.header import Header
from email.mime.text import MIMEText
from smtplib import SMTP, SMTPException
from ssl import SSLError
from d... | unknown | codeparrot/codeparrot-clean | ||
#!/opt/mesosphere/bin/python3
import logging
import os
import sys
import time
def main(directory, max_files, managed_file):
'''
Finds all files under the given `directory` and checks if the number
of files exceeds the `max_files`. If so, deletes files starting from
the oldest (except for the `managed... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2011 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
from django.conf.urls import patterns, url
from contacts import views
urlpatterns = patterns('',
# The home view ('/contacts/')
url(r'^$', views.index, name='index'),
# Used to star... | unknown | codeparrot/codeparrot-clean | ||
//===--- PrimitiveParsing.h - Primitive parsing routines --------*- 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/Basic/PrimitiveParsing.h |
import inspect
import torch
from torch.utils._pytree import register_pytree_node, SequenceKey
__all__ = ["pytree_register_structseq", "all_return_types"]
all_return_types = []
# error: Module has no attribute "_return_types"
return_types = torch._C._return_types # type: ignore[attr-defined]
def pytree_register_st... | python | github | https://github.com/pytorch/pytorch | torch/return_types.py |
# 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/.
from __future__ import absolute_import, division, print_function
from functools import wraps
#--------------------------... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2017 - 2025 R. Thomas
* Copyright 2017 - 2025 Quarkslab
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless req... | unknown | github | https://github.com/nodejs/node | deps/LIEF/include/LIEF/COFF/Binary.hpp |
import { enable_legacy_mode_flag } from './index.js';
enable_legacy_mode_flag(); | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/src/internal/flags/legacy.js |
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | unknown | codeparrot/codeparrot-clean | ||
"""
Support for Insteon switch devices via local hub support.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/switch.insteon_local/
"""
import json
import logging
import os
from datetime import timedelta
from homeassistant.components.switch import Switc... | unknown | codeparrot/codeparrot-clean | ||
import unittest, random, sys, time, os
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_glm, h2o_import as h2i, h2o_exec as h2e
# FIX!. enums may only work if 0 based
# try -5,5 etc
# maybe call GLM on it after doing factor (check # of coefficients)
DO_CASE = 1
REBALANCE_CHUNKS = 100
def write_syn_d... | unknown | codeparrot/codeparrot-clean | ||
@use '@angular/docs/styles/media-queries' as mq;
$ver-dropdown-width: 200px;
:host {
display: flex;
flex-flow: column;
align-items: center;
padding: var(--layout-padding) 0px;
container: update-guide-page / inline-size;
.docs-viewer {
padding-inline: var(--layout-padding);
//applying styles when... | unknown | github | https://github.com/angular/angular | adev/src/app/features/update/update.component.scss |
# Copyright 2025 Westlake Representational Learning Lab (Fajie Yuan Lab) team and the HuggingFace Inc. 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:... | python | github | https://github.com/huggingface/transformers | src/transformers/models/evolla/configuration_evolla.py |
#!/usr/bin/env python
# Copyright (c) 2010 ActiveState Software Inc.
# See LICENSE.txt for license details.
"""Less support for CodeIntel"""
import logging
from codeintel2.common import _xpcom_
from codeintel2.lang_css import CSSLexer, CSSLangIntel, CSSBuffer
from codeintel2.lang_css import isident, WHITESPACE
from ... | unknown | codeparrot/codeparrot-clean | ||
"""Unittest main program"""
import sys
import os
import types
from django.utils.unittest import loader, runner
try:
from django.utils.unittest.signals import installHandler
except ImportError:
installHandler = None
__unittest = True
FAILFAST = " -f, --failfast Stop on first failure\n"
CATCHBREAK = ... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, ... | java | github | https://github.com/elastic/elasticsearch | benchmarks/src/main/java/org/elasticsearch/benchmark/index/mapper/BeatsMapperBenchmark.java |
# coding: utf-8
# Copyright 2014 Globo.com Player authors. All rights reserved.
# Use of this source code is governed by a MIT License
# license that can be found in the LICENSE file.
import sys
PYTHON_MAJOR_VERSION = sys.version_info
import os
import posixpath
try:
from cookielib import CookieJar
except ImportE... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env bash
# Copyright 2023 The Cockroach Authors.
#
# Use of this software is governed by the CockroachDB Software License
# included in the /LICENSE file.
set -exuo pipefail
dir="$(dirname $(dirname $(dirname $(dirname "${0}"))))"
source "$dir/teamcity-support.sh" # For $root
source "$dir/teamcity-bazel... | unknown | github | https://github.com/cockroachdb/cockroach | build/teamcity/cockroach/nightlies/roachtest_nightly_gce_fips.sh |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Hiroaki Nakamura <hnakamur@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_versi... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
"""
平安证券 - 对账单 - 分析
===============================================================================
"""
import os
import pandas as pd
# path = r"C:\Users\Mike\Desktop\pazq_records"
def read_data(path):
files = [os.path.join(path, file) for file in os.listdir(path) if file.endswith(".xls")]
re... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "v0alpha1.multi-lane-annotations.v42"
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "grafa... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/annotations/v0alpha1.multi-lane-annotations.v42.v2beta1.json |
#include "test/jemalloc_test.h"
#include "jemalloc/internal/prof_data.h"
TEST_BEGIN(test_prof_realloc) {
tsd_t *tsd;
int flags;
void *p, *q;
prof_info_t prof_info_p, prof_info_q;
prof_cnt_t cnt_0, cnt_1, cnt_2, cnt_3;
test_skip_if(!config_prof);
tsd = tsd_fetch();
flags = MALLOCX_TCACHE_NONE;
prof_cnt_all... | c | github | https://github.com/redis/redis | deps/jemalloc/test/unit/prof_tctx.c |
"""Dependency injector dynamic container unit tests for async resources."""
import unittest2 as unittest
# Runtime import to get asyncutils module
import os
_TOP_DIR = os.path.abspath(
os.path.sep.join((
os.path.dirname(__file__),
'../',
)),
)
import sys
sys.path.append(_TOP_DIR)
from asyncut... | 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.
//
// Code generated by generate-staticcheck; DO NOT EDIT.
//
//go:build bazel
package s1037
import (
util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/... | go | github | https://github.com/cockroachdb/cockroach | build/bazelutil/staticcheckanalyzers/s1037/analyzer.go |
# -*- coding: utf-8 -*-
#
# DataShape documentation build configuration file, created by
# sphinx-quickstart on Thu Dec 12 15:38:28 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.
#
# A... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015, 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 f... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# 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 requir... | unknown | codeparrot/codeparrot-clean | ||
"""
SIMBAD_report.py: CCP4 GUI Project
This library is free software: you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
version 3, modified in accordance with the provisions of the
license to address the requirements of UK law.
... | unknown | codeparrot/codeparrot-clean | ||
#
# Copyright 2009, 2013 Red Hat, Inc.
# Cole Robinson <crobinso@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 2 of the License, or
# (at your option) any later ve... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Command-line wrapper for the tracetool machinery.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__... | unknown | codeparrot/codeparrot-clean | ||
groups:
- name: yolo
rules:
- record: strawberry{flavor="sweet"}
expr: 1 | unknown | github | https://github.com/prometheus/prometheus | model/rulefmt/testdata/invalid_record_name.bad.yaml |
# 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 sys
from measurements import smoothness
from metrics import power
from telemetry import decorators
from telemetry.core import exceptions
from telemetr... | unknown | codeparrot/codeparrot-clean | ||
# Ensure we get the local copy of tornado instead of what's on the standard path
import os
import sys
from waterbutler.version import __version__
sys.path.insert(0, os.path.abspath(".."))
master_doc = "index"
project = "WaterButler"
copyright = "2018, Center For Open Science"
version = release = __version__
exten... | 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 | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v0alpha1",
"metadata": {
"name": "test-v2alpha1-complete",
"labels": {
"category": "test"
},
"annotations": {
"description": "Complete example of v2alpha1 dashboard features"
}
},
"spec": {
"annotations": {
"... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/v2beta1.complete.v0alpha1.json |
steps:
- label: pr-upgrade
command: ".buildkite/scripts/run-pr-upgrade-tests.sh"
agents:
image: "docker.elastic.co/ci-agent-images/eck-region/buildkite-agent:1.15"
memory: "4G" | unknown | github | https://github.com/elastic/elasticsearch | .buildkite/pipelines/pull-request/pr-upgrade.yml |
// This file is part of ICU4X. For terms of use, please see the file
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
//! Types for individual calendars
pub(crate) mod buddhist;
pub(crate) mod chinese;
pub(crate) mod chinese_based;
pub... | rust | github | https://github.com/nodejs/node | deps/crates/vendor/icu_calendar/src/cal/mod.rs |
# Copyright 2020-2021 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in... | unknown | codeparrot/codeparrot-clean | ||
import errno
import os
import sys
import tempfile
import unittest
from os.path import join
# Make it possible to run out of the working copy.
sys.path.insert(
0,
os.path.join(
os.path.dirname(__file__),
os.pardir,
"lib",
))
import opensub # noqa
import opensub.main # noqa
d... | unknown | codeparrot/codeparrot-clean | ||
#########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# 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
#... | unknown | codeparrot/codeparrot-clean | ||
"""
sentry.utils.auth
~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.conf import settings
from django.contrib.auth.backends import ModelBackend
from django.core.urlresolve... | unknown | codeparrot/codeparrot-clean | ||
"""
'library' XBlock (LibraryRoot)
"""
import logging
from xblock.core import XBlock
from xblock.fields import Boolean, List, Scope, String
from xblock.fragment import Fragment
from xmodule.studio_editable import StudioEditableModule
log = logging.getLogger(__name__)
# Make '_' a no-op so we can scrape strings. Usi... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2010-2025 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.typeRelationChecker
import org.jetb... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-impl-base/testFixtures/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/typeRelationChecker/AbstractCanBeCalledAsExtensionOnTest.kt |
import {bootstrapApplication} from '@angular/platform-browser';
import {CdkDragDropHorizontalSortingExample} from './app/app';
bootstrapApplication(CdkDragDropHorizontalSortingExample); | typescript | github | https://github.com/angular/angular | adev/src/content/examples/drag-drop/src/horizontal-sorting/main.ts |
from boto.swf.exceptions import SWFResponseError
from freezegun import freeze_time
from moto import mock_swf_deprecated
from moto.swf import swf_backend
from ..utils import setup_workflow, SCHEDULE_ACTIVITY_TASK_DECISION
# PollForActivityTask endpoint
@mock_swf_deprecated
def test_poll_for_activity_task_when_one():
... | unknown | codeparrot/codeparrot-clean | ||
nav a {
padding: 0.7rem;
}
h1 {
margin-bottom: 0.3rem;
}
form {
margin-bottom: 2rem;
}
nav {
padding-bottom: 3rem;
} | css | github | https://github.com/angular/angular | adev/src/content/examples/animations/src/app/app.css |
#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
import unittest
from caching_file_system import CachingFileSystem
from extensions_paths import SERVER2
from f... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.