code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# random util functions I've written # mostly taken from https://github.com/DanielOaks/goshu but I don't care about the license import getpass def true_or_false(in_str): """Returns True/False if string represents it, else None.""" in_str = in_str.lower() if in_str.startswith(('true', 'y', '1', 'on')): ...
unknown
codeparrot/codeparrot-clean
# Copyright 2025 Arcee AI 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://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
python
github
https://github.com/huggingface/transformers
src/transformers/models/arcee/__init__.py
# -*- coding: utf-8 -*- import os import codecs import re ''' This file contains all phonetics related functions. The phonetic transcription is obtained using eSpeak speech synthesizer (http://espeak.sourceforge.net/). For English the list of available phonetic vowels can be found here: http://espeak.sourceforge...
unknown
codeparrot/codeparrot-clean
import logging from autotest.client.shared import error from virttest import env_process @error.context_aware def run(test, params, env): """ Qemu invalid parameter in qemu command line test: 1) Try boot up guest with invalid parameters 2) Catch the error message shows by qemu process :param tes...
unknown
codeparrot/codeparrot-clean
# Copyright 2011-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...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java
use std::cell::RefCell; use std::task::Waker; pub(crate) struct Defer { deferred: RefCell<Vec<Waker>>, } impl Defer { pub(crate) fn new() -> Defer { Defer { deferred: RefCell::default(), } } pub(crate) fn defer(&self, waker: &Waker) { let mut deferred = self.deferr...
rust
github
https://github.com/tokio-rs/tokio
tokio/src/runtime/scheduler/defer.rs
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v1beta1", "metadata": { "name": "v40.refresh_true.v42" }, "spec": { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dashboards_from_v0_to_v2/v2beta1.v40.refresh_true.v1beta1.json
<?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\Re...
php
github
https://github.com/composer/composer
tests/Composer/Test/Repository/RepositoryFactoryTest.php
services: app.static_token_provider: class: Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\RememberMeBundle\Security\StaticTokenProvider arguments: ['@kernel'] security: firewalls: default: remember_me: always_remember_me: true secret: ...
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/RememberMe/config_persistent.yml
- hosts: localhost gather_facts: false tasks: - command: echo notify: handler handlers: - name: handler include_tasks: test_block_as_handler-include_import-handlers.yml
unknown
github
https://github.com/ansible/ansible
test/integration/targets/handlers/test_block_as_handler-include.yml
from __future__ import unicode_literals import json from six.moves.urllib.parse import urlencode import re import sure # noqa import moto.server as server ''' Test the different server responses ''' def test_cloudformation_server_get(): backend = server.create_backend_app("cloudformation") stack_name = 'te...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.db.models.signals import post_init, pre_save, post_save from django.utils.importlib import import_module URL_ROUTE_HANDLERS = getattr(settings, 'URL_ROUTE_HANDLERS', ()) handlers = {} def load_handlers(): for name in URL_ROUTE_HANDLERS: module_name, class_name...
unknown
codeparrot/codeparrot-clean
# Copyright 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. """The page cycler measurement. This measurement registers a window load handler in which is forces a layout and then records the value of performance.now()...
unknown
codeparrot/codeparrot-clean
# -*- coding: iso-8859-1 -*- # mosq.py # Implementation of the square-law MOS transistor model # Copyright 2012 Giuseppe Venturini # # This file is part of the ahkab simulator. # # Ahkab is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
unknown
codeparrot/codeparrot-clean
scrape_configs: - job_name: prometheus kubernetes_sd_configs: - role: endpoints selectors: - role: "pod" label: "foo=bar" field: "metadata.status=Running" - role: "pod" label: "foo=bar" field: "metadata.status=Running"
unknown
github
https://github.com/prometheus/prometheus
config/testdata/kubernetes_selectors_duplicated_role.bad.yml
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/qcom,gcc-sc8180x.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm Global Clock & Reset Controller on SC8180x maintainers: - Bjorn Andersson <bjorn.andersson@linaro.org> descr...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/qcom,gcc-sc8180x.yaml
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package os import ( "internal/poll" "io" "runtime" "syscall" ) func (f *File) writeTo(w io.Writer) (written int64, handled bool, err error) { return 0, f...
go
github
https://github.com/golang/go
src/os/zero_copy_solaris.go
# swift_build_support/products/__init__.py ----------------------*- python -*- # # 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/LICENSE.tx...
unknown
codeparrot/codeparrot-clean
// Static imports. import rootConst from "/static/absolute_root.js"; import testConst from "./module_test.js"; import * as NewModule from "./module_test.js"; import*as m from "./module_test.js"; import *as m from "./module_test.js"; import* as m from "./module_test.js"; import* as m from "./module_test.js"; import { ...
javascript
github
https://github.com/django/django
tests/staticfiles_tests/project/documents/cached/module.js
packages: - 'apps/*' - 'packages/*' - 'bench/*' - 'crates/*/js' - 'turbopack/crates/*/js' - 'turbopack/crates/turbopack-tests/tests/execution' - 'turbopack/packages/*' updateNotifier: false
unknown
github
https://github.com/vercel/next.js
pnpm-workspace.yaml
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import tem...
unknown
codeparrot/codeparrot-clean
# -*-*- encoding: utf-8 -*-*- # # This is gdata.photos.exif, implementing the exif namespace in gdata # # $Id: __init__.py 81 2007-10-03 14:41:42Z havard.gulldahl $ # # Copyright 2007 Håvard Gulldahl # Portions copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not ...
unknown
codeparrot/codeparrot-clean
#include <ATen/native/transformers/xpu/flash_attn/flash_api.h> #include <ATen/native/transformers/xpu/sdp_utils.h> #include <c10/util/Array.h> namespace sdp { bool is_flash_attention_available() { return sycltla::is_flash_attention_available(); } inline bool is_flash_attention_available(sdp_params const& params, b...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/transformers/xpu/sdp_utils.cpp
from sklearn import preprocessing import matplotlib.pyplot as plt import numpy as np nbaPGData = [ [ 15.8, 8.2, 8.1, 1.7 ], [ 25.4, 10.3, 10.1, 1.8 ], [ 22.1, 5.6, 3.1, 1.1 ], [ 16.7, 3.4, 3.7, 1.0 ], [ 16.2, 6.9, 5.6, 1.1 ], [ 13.1, 5.3, 4.6, 1.6 ], [ 17.3, 4.8, 4.1, 0.8 ], [ 17.7, 5.0, 3.8, 2.0 ], [ 26.9, 6.6, 4.5, ...
unknown
codeparrot/codeparrot-clean
/* gzread.c -- zlib functions for reading gzip files * Copyright (C) 2004-2017 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ #include "gzguts.h" /* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from state->fd, and update state->eof, state->err, an...
c
github
https://github.com/opencv/opencv
3rdparty/zlib/gzread.c
from __future__ import unicode_literals from datetime import datetime, timedelta from django.template.defaultfilters import timeuntil_filter from django.test import SimpleTestCase from django.test.utils import requires_tz_support from ..utils import setup from .timezone_utils import TimezoneTestCase class Timeuntil...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
#include "mt19937.h" #include "mt19937-jump.h" void mt19937_seed(mt19937_state *state, uint32_t seed) { int pos; seed &= 0xffffffffUL; /* Knuth's PRNG as used in the Mersenne Twister reference implementation */ for (pos = 0; pos < RK_STATE_LEN; pos++) { state->key[pos] = seed; seed = (1812433253UL * (...
c
github
https://github.com/numpy/numpy
numpy/random/src/mt19937/mt19937.c
package client import ( "context" "github.com/moby/moby/api/types/network" ) // NetworkConnectOptions represents the data to be used to connect a container to the // network. type NetworkConnectOptions struct { Container string EndpointConfig *network.EndpointSettings } // NetworkConnectResult represents t...
go
github
https://github.com/moby/moby
client/network_connect.go
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.document_loaders import EtherscanLoader # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optiona...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/document_loaders/etherscan.py
#ifndef DATE_TIME_LOCALE_CONFIG_HPP___ #define DATE_TIME_LOCALE_CONFIG_HPP___ /* Copyright (c) 2002-2020 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Auth...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/date_time/locale_config.hpp
#ifndef NUMPY_CORE_SRC_COMMON_NPY_NUMPYOS_H_ #define NUMPY_CORE_SRC_COMMON_NPY_NUMPYOS_H_ #ifdef __cplusplus extern "C" { #endif NPY_NO_EXPORT char* NumPyOS_ascii_formatd(char *buffer, size_t buf_size, const char *format, double val, int decimal); NPY_NO_EXPORT char* NumPy...
c
github
https://github.com/numpy/numpy
numpy/_core/src/common/numpyos.h
# 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
#!/usr/bin/env python3 # Copyright 2014 BitPay Inc. # Copyright 2016-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. """Test framework for pivx utils. Runs automatically during `make check`. Can a...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package planfile import ( "path/filepath" "strings" "testing" "github.com/google/go-cmp/cmp" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/collections" "github.com/hashicorp/terraform/internal/con...
go
github
https://github.com/hashicorp/terraform
internal/plans/planfile/planfile_test.go
# # 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
//===--- Platform.cpp - Implement platform-related helpers ----------------===// // // 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...
cpp
github
https://github.com/apple/swift
lib/Basic/Platform.cpp
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import sys...
unknown
codeparrot/codeparrot-clean
import asyncore as _asyncore import random as _random import threading as _threading import time as _time from .confsys import Configurable as _Configurable from .logger import mkInfoFunction as _mkInfoFunction from .logger import mkWarnFunction as _mkWarnFunction _proxyInfo = _mkInfoFunction('Proxy') _proxyWarn = _m...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function Component({a, b, c}) { const x = [a]; const y = [null, b]; const z = [[], [], [c]]; x[0] = y[1]; z[0][0] = x[0]; return [x, z]; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [{a: 1, b: 20, c: 300}], sequentialRenders: [ {a: 2, b: 20, c: 300}, {a...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/array-access-assignment.expect.md
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # extras_dictcursor - test if DictCursor extension class works # # Copyright (C) 2004-2010 Federico Di Gregorio <fog@debian.org> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software...
unknown
codeparrot/codeparrot-clean
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright 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...
go
github
https://github.com/kubernetes/kubernetes
pkg/controller/validatingadmissionpolicystatus/config/zz_generated.deepcopy.go
# Diplomat Diplomat is an experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code. With Diplomat, you can simply define Rust APIs to be exposed over FFI and get high-level C, C++, and JavaScript bindings automatically! Diplomat supports generating bindings from Rust to: - ...
unknown
github
https://github.com/nodejs/node
deps/crates/vendor/diplomat-runtime/README.md
// Adapted from https://github.com/sunfishcode/mir2cranelift/blob/master/rust-examples/nocore-hello-world.rs #![feature( no_core, unboxed_closures, lang_items, never_type, linkage, extern_types, thread_local )] #![no_core] #![allow(dead_code, internal_features, non_camel_case_types)] #![rustfmt_skip] extern c...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs
from collections import defaultdict import pymongo from bson import SON from mongoengine.base.fields import UPDATE_OPERATORS from mongoengine.connection import get_connection from mongoengine.common import _import_class from mongoengine.errors import InvalidQueryError from mongoengine.python_support import IS_PYMONGO...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright 2015 The Meson development team # 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
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\TwigBundle\DependencyInjection; use Symfony\Bundle\TwigB...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php
# -*- coding: utf-8 -*- from openerp.tests import common class test_inherits(common.TransactionCase): def test_create_3_levels_inherits(self): """ Check that we can create an inherits on 3 levels """ pallet = self.env['test.pallet'].create({ 'name': 'B', 'field_in_box': 'bo...
unknown
codeparrot/codeparrot-clean
""" submit failure or test session information to a pastebin service. """ import pytest import sys import tempfile def pytest_addoption(parser): group = parser.getgroup("terminal reporting") group._addoption('--pastebin', metavar="mode", action='store', dest="pastebin", default=None, choices=['...
unknown
codeparrot/codeparrot-clean
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql_test import ( "context" "testing" "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/testutils/serverutils" "github.com...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/sort_test.go
# 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
"""Bot object for Dozer""" import logging import re import sys import traceback import discord from discord.ext import commands from . import utils DOZER_LOGGER = logging.Logger(name='dozer') DOZER_LOGGER.level = logging.INFO DOZER_HANDLER = logging.StreamHandler(stream=sys.stdout) DOZER_HANDLER.level = logging.INFO...
unknown
codeparrot/codeparrot-clean
# Downloaded from http://code.activestate.com/recipes/576693/ # Licensed under the MIT License # Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. try: from thread import get_ident as _get_ident except ImportEr...
unknown
codeparrot/codeparrot-clean
from tmapi.models import Association from base_manager import BaseManager from entity_type import EntityType from property_assertion import PropertyAssertion class EntityTypePropertyAssertionManager (BaseManager): def filter_by_authority_entity_type (self, authority, entity_type): return self.filter(scop...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ intraday data handlers in csv format. @author: jev """ from __future__ import division import pandas as pd import datetime as dt import os from extra import ProgressBar dateFormat = "%Y%m%d" # date format for converting filenames to dates dateTimeFormat = "%Y%m%d %H:%M:%S" def fileName2...
unknown
codeparrot/codeparrot-clean
import {makeArray, print} from 'shared-runtime'; function useTest() { return makeArray<number | void>( print(1), (function foo() { print(2); return 2; })(), ); } export const FIXTURE_ENTRYPOINT = { fn: useTest, params: [], };
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/codegen-inline-iife.ts
# 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. from telemetry.core import util from telemetry.core import exceptions from telemetry.page import page as page_module from telemetry.page.actions import pa...
unknown
codeparrot/codeparrot-clean
# pylint: disable=missing-docstring from django.core.cache import cache from django.test.utils import override_settings from lang_pref import LANGUAGE_KEY from opaque_keys.edx.locations import SlashSeparatedCourseKey from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_TOY_MODULESTORE from student.models...
unknown
codeparrot/codeparrot-clean
// RUN: rm -rf %t && mkdir -p %t // RUN: clang-doc --extra-arg -std=c++20 --output=%t --format=json --executor=standalone %s // RUN: FileCheck %s < %t/json/GlobalNamespace/index.json template<typename T> concept Incrementable = requires(T x) { ++x; x++; }; template<typename T> void increment(T t) requires Increme...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-doc/json/function-requires.cpp
/* 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/src/fmt_formatter.hpp
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
unknown
codeparrot/codeparrot-clean
import imp import logging import os _shared_objs = {} def _get_one(name): global _shared_objs # Build path here = os.path.dirname(os.path.abspath(__file__)) plugins_dir = os.path.join(here, "plugins") filepath = os.path.join(plugins_dir, '%s.py' % name) # Load plug-in with open(filepath,...
unknown
codeparrot/codeparrot-clean
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" . "$DIR/prelude.sh" if [ "${push_name}" != "windows" ]; then exit 0 fi cd src echo "GRS_CONFIG_USER1_USERNAME=${garasign_jsign_username}" >>"signing-envfile" echo "GRS_CONFIG_USER1_PASSWORD=${garasign_jsign_password}" >>"signing-envfile" set -o...
unknown
github
https://github.com/mongodb/mongo
evergreen/garasign_jsign_sign.sh
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # ##################################################################### # # # Frets on Fire X # # Copyright (C) 20...
unknown
codeparrot/codeparrot-clean
from datetime import date import itertools from django.conf import settings from django.db.models import * from apps.activity.base_activity import BaseActivity from apps.canvas_auth.models import User from canvas import util from canvas.redis_models import RedisLastBumpedBuffer from drawquest.apps.drawquest_auth.deta...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.fir.test.cases.generated.cases.components.symbolInfoProvider; impor...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/symbolInfoProvider/FirIdeDependentAnalysisScriptSourceModuleCanBeOperatorTestGenerated.java
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
unknown
codeparrot/codeparrot-clean
// 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. package net import ( "flag" "fmt" "net/internal/socktest" "os" "runtime" "slices" "strings" "sync" "testing" "time" ) var ( sw socktest.Switch //...
go
github
https://github.com/golang/go
src/net/main_test.go
""" Support for ISY994 lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/isy994/ """ import logging from homeassistant.components.isy994 import ( HIDDEN_STRING, ISY, SENSOR_STRING, ISYDeviceABC) from homeassistant.components.light import ATTR_B...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Adam Miller (maxamillion@fedoraproject.org) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2011 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. """GDB support for Chrome types. Add this to your gdb by amending your ~/.gdbinit as follows: python import sys sys.path.insert(0, "/path/to/tools...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Doctrine\Tests\Fixtures; use Doctrine\ORM\Mapping\Column...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/Doctrine/Tests/Fixtures/CustomUuidIdEntity.php
import inspect import os import copy from contextlib import contextmanager from typing import TypeVar from django.conf.urls import url from django.utils.log import DEFAULT_LOGGING from cratis.settings import CratisApplication from cratis.settings import CratisConfig from cratis.settings import FeatureNotLoadedYet fro...
unknown
codeparrot/codeparrot-clean
#pragma once #include <c10/macros/Macros.h> #include <c10/util/Exception.h> #include <cstring> #include <optional> #include <ostream> #include <string> #include <string_view> #include <utility> namespace c10 { // TODO: consider storing namespace separately too struct OperatorName final { std::string name; std::...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/core/operator_name.h
# 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
import datetime from django.db import models BREED_CHOICES = [ ('collie', 'Collie'), ('labrador', 'Labrador'), ('pembroke', 'Pembroke Corgi'), ('shetland', 'Shetland Sheepdog'), ('border', 'Border Collie'), ] class Dog(models.Model): breed = models.CharField(max_length=255, choices=BREED_CHOIC...
unknown
codeparrot/codeparrot-clean
from yelp.client import Client from YelpAPIv3 import Client3 from GoogleMapAPI import GoogleMap from yelp.oauth1_authenticator import Oauth1Authenticator from math import radians, cos, sin, asin, sqrt from datetime import datetime import config from bs4 import BeautifulSoup import requests # Yelp Auth API v2 auth = Oa...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import http_lazy_headers as hlh from . import utils class ContentLanguageTest(utils.FieldTestCase): field = hlh.ContentLanguage def test_raw_values(self): self.assertFieldRawEqual( ['mi, da', 'en'], (('mi', (), None, None, (), (), (), None), ...
unknown
codeparrot/codeparrot-clean
#!/usr/local/bin/python3 import os import argparse import matplotlib as mpl mpl.use('Agg') import matplotlib.image as mpimg import matplotlib.pyplot as plt import numpy as np # Convolution method? # This was slow at best, and crashed on the high-res Moon pic for an # authentically sized "spider FWHM." # import scipy....
unknown
codeparrot/codeparrot-clean
# ********************************************************************** # # Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ***********************************************************...
unknown
codeparrot/codeparrot-clean
''' Bubble ====== .. versionadded:: 1.1.0 .. image:: images/bubble.jpg :align: right The Bubble widget is a form of menu or a small popup where the menu options are stacked either vertically or horizontally. The :class:`Bubble` contains an arrow pointing in the direction you choose. Simple example ------------...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
import {bootstrapApplication} from '@angular/platform-browser'; import {CdkDragDropHandleExample} from './app/app'; bootstrapApplication(CdkDragDropHandleExample);
typescript
github
https://github.com/angular/angular
adev/src/content/examples/drag-drop/src/custom-handle/main.ts
import { test, expect } from "@playwright/test"; import { createAppFixture, createFixture, js, } from "./helpers/create-fixture.js"; import type { Fixture, AppFixture } from "./helpers/create-fixture.js"; import { PlaywrightFixture } from "./helpers/playwright-fixture.js"; test.describe("loader", () => { let ...
typescript
github
https://github.com/remix-run/react-router
integration/loader-test.ts
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.fe10.test.cases.generated.cases.components.readWriteAccess; import ...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fe10/tests-gen/org/jetbrains/kotlin/analysis/api/fe10/test/cases/generated/cases/components/readWriteAccess/Fe10IdeNormalAnalysisSourceModuleReadWriteAccessTestGenerated.java
# 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. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """ import copy import gyp.common...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # # 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 la...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> ngx_uint_t ngx_pagesize; ngx_uint_t ngx_pagesize_shift; ngx_uint_t ngx_cacheline_size; void *ngx_alloc(size_t size, ngx_log_t *log) { void *p; p = malloc(size); if (p == NULL) { ngx...
c
github
https://github.com/nginx/nginx
src/os/win32/ngx_alloc.c
function Component(props) { const [y, ...{z}] = props.value; return [y, z]; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [{value: ['y', {z: 'z!'}]}], };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/destructuring-object-pattern-within-rest.js
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "cases/helper" require "models/author" require "models/post" require "models/book" class FieldOrderedValuesTest < ActiveRecord::TestCase fixtures :posts def test_in_order_of order = [3, 4, 1] posts = Post.in_order_of(:id, order) assert_equal(order, posts.map(&:i...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/relation/field_ordered_values_test.rb
# -*- coding: 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 # License,...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0-or-later /* * Cryptographic API. * * TEA, XTEA, and XETA crypto alogrithms * * The TEA and Xtended TEA algorithms were developed by David Wheeler * and Roger Needham at the Computer Laboratory of Cambridge University. * * Due to the order of evaluation in XTEA many people hav...
c
github
https://github.com/torvalds/linux
crypto/tea.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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/alert/ErrorAlert.tsx
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsColorButton. .. note:: 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. """ __...
unknown
codeparrot/codeparrot-clean
// run // Copyright 2011 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 len constants and non-constants, https://golang.org/issue/3244. package main var b struct { a [10]int } var m map[string][20]int var s [][3...
go
github
https://github.com/golang/go
test/const4.go
# frozen_string_literal: true require "cases/helper" require "models/post" require "models/author" require "models/developer" require "models/computer" require "models/project" require "models/comment" require "models/category" require "models/person" require "models/reference" class RelationScopingTest < ActiveRecor...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/scoping/relation_scoping_test.rb
# Copyright 2011 Viewfinder Inc. All Rights Reserved. """AsyncS3Connection module tests.""" __author__ = "andy@emailscrubbed.com (Andy Kimball)" import os import random import unittest from tornado import options, httpclient, simple_httpclient from viewfinder.backend.storage.async_s3 import AsyncS3Connection, S3Retr...
unknown
codeparrot/codeparrot-clean