code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
"""Tests for Samsung TV config flow.""" import pytest from samsungctl.exceptions import AccessDenied, UnhandledResponse from samsungtvws.exceptions import ConnectionFailure from websocket import WebSocketProtocolException from homeassistant.components.samsungtv.const import ( CONF_MANUFACTURER, CONF_MODEL, ...
unknown
codeparrot/codeparrot-clean
# sql/elements.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 """Core SQL expression elements, including :class:`.ClauseElement`, :class:`.ColumnE...
unknown
codeparrot/codeparrot-clean
""" WSGI config for zulip project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` se...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # sorry, this is very ugly, but I'm in python 2.5 import sys sys.path.insert(0,"../..") from dot11 import Dot11, Dot11Types, Dot11ManagementFrame, Dot11ManagementAssociationResponse from ImpactDecoder import RadioTapDecoder from binascii import hexlify import unittest class TestDot11ManagementA...
unknown
codeparrot/codeparrot-clean
from Screens.Screen import Screen from Components.Sources.CurrentService import CurrentService from Components.Sources.EventInfo import EventInfo from Components.Sources.FrontendStatus import FrontendStatus from Components.Sources.FrontendInfo import FrontendInfo from Components.Sources.Source import Source from Compon...
unknown
codeparrot/codeparrot-clean
from django.contrib.auth import ( aauthenticate, aget_user, alogin, alogout, aupdate_session_auth_hash, ) from django.contrib.auth.models import AnonymousUser, User from django.http import HttpRequest from django.test import TestCase, override_settings class AsyncAuthTest(TestCase): @classmetho...
python
github
https://github.com/django/django
tests/async/test_async_auth.py
# C language Family Front-end Welcome to Clang. This is a compiler front-end for the C family of languages (C, C++ and Objective-C) which is built as part of the LLVM compiler infrastructure project. Unlike many other compiler frontends, Clang is useful for a number of things beyond just compiling code: we intend fo...
unknown
github
https://github.com/llvm/llvm-project
clang/README.md
''' Created on Aug 20, 2014 @author: valeriu ''' import unittest from datetime import datetime, timedelta from activitytracker import Activity, ActivityError class TestActivity(unittest.TestCase): def setUp(self): self.activity = Activity([]) def tearDown(self): self.activity = None de...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import sys sys.path.append('../../../target/gen-py') from packetstreamer import PacketStreamer from packetstreamer.ttypes import * from thrift import Thrift from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol try: # Make...
unknown
codeparrot/codeparrot-clean
""" Acceptance test suite """ from os import environ from paver.easy import sh, call_task, task from pavelib.utils.test import utils as test_utils from pavelib.utils.test.suites.suite import TestSuite from pavelib.utils.envs import Env from pavelib.utils.timer import timed __test__ = False # do not collect DBS = { ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ============================= Reading and Writing KEGG Data ============================= :Authors: Moritz Emanuel Beber :Date: 2012-05-11 :Copyright: Copyright(c) 2012 Jacobs University of Bremen. All rights reserved. :File: kegg.py """ __all__ = ["f...
unknown
codeparrot/codeparrot-clean
""" .. module:: Smoothing Smoothing ************* :Description: Smoothing :Authors: bejar :Version: :Created on: 21/07/2016 8:14 """ __author__ = 'bejar' from scipy.sparse.linalg import spsolve import numpy as np import scipy as scp from scipy import sparse from scipy.sparse import linalg def numpy_smoothing(x...
unknown
codeparrot/codeparrot-clean
#pragma once #include <cstddef> #include <cstdint> #include "c10/macros/Macros.h" namespace caffe2::serialize { // this is the interface for the (file/stream/memory) reader in // PyTorchStreamReader. with this interface, we can extend the support // besides standard istream class TORCH_API ReadAdapterInterface { p...
c
github
https://github.com/pytorch/pytorch
caffe2/serialize/read_adapter_interface.h
import unittest from compose.config.interpolation import BlankDefaultDict as bddict from compose.config.interpolation import interpolate from compose.config.interpolation import InvalidInterpolation class InterpolationTest(unittest.TestCase): def test_valid_interpolations(self): self.assertEqual(interpola...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import import errno import warnings import hmac from binascii import hexlify, unhexlify from hashlib import md5, sha1, sha256 from ..exceptions import SSLError, InsecurePlatformWarning, SNIMissingWarning SSLContext = None HAS_SNI = False create_default_context = None IS_PYOPENSSL = Fa...
unknown
codeparrot/codeparrot-clean
# Interoperability between Swift and C++ # ⚠️ Warning: document is out of date. ⚠️ **This document has not had significant updates in the last three years. The goals and design outlined here do not necessarily reflect those established by the C++ Interop Work Group. For an up-to-date document, please see [the Forward...
unknown
github
https://github.com/apple/swift
docs/CppInteroperability/CppInteroperabilityManifesto.md
# -*- coding: utf-8 -*- import calendar import datetime import logging import environ import holviapi from creditor.handlers import BaseRecurringTransactionsHandler, BaseTransactionHandler from creditor.models import RecurringTransaction, Transaction, TransactionTag from django.core.mail import EmailMessage from djang...
unknown
codeparrot/codeparrot-clean
// Copyright 2022 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 syscall import "unsafe" func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeva...
go
github
https://github.com/golang/go
src/syscall/syscall_freebsd_riscv64.go
<?php namespace Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Serialization; class Author { public $eyeColor; }
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Serialization/Author.php
use std::hash::{Hash, Hasher}; use std::ops::Deref; use smallvec::SmallVec; use crate::dep_graph::DepNodeIndex; #[derive(Default, Debug)] pub(crate) struct EdgesVec { max: u32, edges: SmallVec<[DepNodeIndex; 8]>, } impl Hash for EdgesVec { #[inline] fn hash<H: Hasher>(&self, hasher: &mut H) { ...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_query_system/src/dep_graph/edges.rs
"""Scikit Flow Estimators.""" # Copyright 2015-present Scikit Flow 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/LICEN...
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
# -*- coding: utf-8 -*- import datetime from os.path import abspath, basename, dirname, join, normpath from sys import path from django.core.urlresolvers import reverse_lazy from configurations import Configuration, values from postgresify import postgresify class Base(Configuration): # Path Configuration. ...
unknown
codeparrot/codeparrot-clean
//===--- SignatureHelp.cpp ------------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2025 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE....
cpp
github
https://github.com/apple/swift
lib/IDE/SignatureHelp.cpp
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.document_loaders import IMSDbLoader # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional im...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/document_loaders/imsdb.py
/* * 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
buildSrc/src/main/java/org/springframework/build/optional/OptionalDependenciesPlugin.java
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-hdfs-config.html --- # Configuration properties [repository-hdfs-config] Once installed, define the configuration for the `hdfs` repository through the [REST API](docs-content://deploy-manage/tools/snapshot-and-restore.md):...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch-plugins/repository-hdfs-config.md
"""A minimal subset of the locale module used at interpreter startup (imported by the _io module), in order to reduce startup time. Don't import directly from third-party code; use the `locale` module instead! """ import sys import _locale if sys.platform.startswith("win"): def getpreferredencoding(do_setlocale=...
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
build-plugin/spring-boot-maven-plugin/src/intTest/projects/start-stop/src/main/java/org/test/SampleApplication.java
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com # # 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
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Christophe Benz # # This file is part of weboob. # # weboob 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, or # (at yo...
unknown
codeparrot/codeparrot-clean
/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/common_runtime/memory_types.h
# 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. """Tests for the cmd_helper module.""" import unittest import subprocess from pylib import cmd_helper class CmdHelperSingleQuoteTest(unittest.TestCase): ...
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 use this ...
unknown
codeparrot/codeparrot-clean
import { E2E_TIMEOUT, setupPuppeteer } from './e2eUtils' import path from 'node:path' const { page, html, click } = setupPuppeteer() beforeEach(async () => { await page().setContent(`<div id="app"></div>`) await page().addScriptTag({ path: path.resolve(__dirname, '../../dist/vue.global.js'), }) }) describe...
typescript
github
https://github.com/vuejs/core
packages/vue/__tests__/e2e/memory-leak.spec.ts
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterface'], 'supported...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 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
#!/usr/bin/env python #Author sajith shetty #usage: ./compile.py filenamewithoutextension import os import sys print "[+]Compiling in progress..." try: print "[+]Assembling in Nasm..." t = ("nasm -f elf32 -o " + sys.argv[1] + ".o " + sys.argv[1] + ".asm") os.system(t) print "[+]Linking..." s = ("ld -o " + s...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python """Release testtools on Launchpad. Steps: 1. Make sure all "Fix committed" bugs are assigned to 'next' 2. Rename 'next' to the new version 3. Release the milestone 4. Upload the tarball 5. Create a new 'next' milestone 6. Mark all "Fix committed" bugs in the milestone as "Fix released" Assume...
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/bind/BindConverter.java
#!/bin/sh # Copyright IBM Corp. 2016, 2025 # SPDX-License-Identifier: BUSL-1.1 set -e ## Make a temp dir tempdir=$(mktemp -d update-plugin-modules.XXXXXX) ## Set paths cd $tempdir ## Get Vault echo "Fetching vault..." git clone https://github.com/hashicorp/vault for plugin in $(grep github.com/hashicorp/vault-plug...
unknown
github
https://github.com/hashicorp/vault
scripts/update_plugin_modules.sh
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2017 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # TumorMap documentation build configuration file, created by # sphinx-quickstart on Sun Feb 14 16:29:25 2018. # # 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
/* * Copyright (C) 2008 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
java
github
https://github.com/google/guava
android/guava-tests/test/com/google/common/collect/ImmutableListMultimapTest.java
# -*- coding: utf-8 -*- """ Created on Tue Jun 12 13:18:12 2018 Author: Josef Perktold """ from statsmodels.compat.pandas import testing as pdt import os.path import numpy as np from numpy.testing import assert_allclose import pandas as pd import pytest from statsmodels.regression.linear_model import OLS from stats...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.tests.http.content import io.ktor.client.request.* import io.ktor.client.statement.* import io.ktor.http.* import io.ktor.server.http.content.* import io.ktor.server.response....
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-core/jvm/test/io/ktor/tests/http/content/StaticContentResolutionTest.kt
#!/usr/bin/python # -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). # All Rights Reserved # Credits#######################################...
unknown
codeparrot/codeparrot-clean
use rustc_data_structures::frozen::Frozen; use rustc_data_structures::transitive_relation::{TransitiveRelation, TransitiveRelationBuilder}; use rustc_hir::def::DefKind; use rustc_infer::infer::canonical::QueryRegionConstraints; use rustc_infer::infer::outlives; use rustc_infer::infer::outlives::env::RegionBoundPairs; u...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_borrowck/src/type_check/free_region_relations.rs
//===- bolt/runtime/common.h ------------------------------------*- C++ -*-===// // // 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
bolt/runtime/common.h
from django.conf import settings from ... import signals from ...models import RegistrationProfile from ...views import ActivationView as BaseActivationView from ...views import RegistrationView as BaseRegistrationView from ...compat import RequestSite, is_app_installed, get_site_model from ...users import UserModel ...
unknown
codeparrot/codeparrot-clean
[ { "@level": "info", "@message": "tfcoremock_map.map: Plan to update", "@module": "terraform.ui", "change": { "action": "update", "resource": { "addr": "tfcoremock_map.map", "implied_provider": "tfcoremock", "module": "", "resource": "tfcoremock_map.map", ...
json
github
https://github.com/hashicorp/terraform
testing/equivalence-tests/outputs/basic_map_empty/apply.json
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import api, fields, models import openerp.addons.decimal_precision as dp class ProductTemplate(models.Model): _inherit = "product.template" uos_id = fields.Many2one('product.uom', 'Unit of Sale', ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2012 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
# (C) British Crown Copyright 2014 - 2017, Met Office # # This file is part of Iris. # # Iris 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 Foundation, either version 3 of the License, or # (at your option) any l...
unknown
codeparrot/codeparrot-clean
#![warn(rust_2018_idioms)] #![cfg(all(feature = "time", not(target_os = "wasi")))] // Wasi does not support panic recovery #![cfg(panic = "unwind")] use parking_lot::{const_mutex, Mutex}; use std::error::Error; use std::panic; use std::sync::Arc; use tokio::time::Duration; use tokio_stream::{self as stream, StreamExt}...
rust
github
https://github.com/tokio-rs/tokio
tokio-stream/tests/stream_panic.rs
// Copyright 2020 Gin Core Team. All rights reserved. // Use of this source code is governed by a MIT style // license that can be found in the LICENSE file. package binding import ( "errors" "testing" ) func TestSliceValidationError(t *testing.T) { tests := []struct { name string err SliceValidationError ...
go
github
https://github.com/gin-gonic/gin
binding/default_validator_test.go
# Copyright 2015 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
#!/usr/bin/env python # Copyright (C) 2012 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 ...
unknown
codeparrot/codeparrot-clean
from spacy.util import align_tokens def test_perfect_align(): ref = ['I', 'align', 'perfectly'] indices = [] i = 0 for token in ref: indices.append((i, i + len(token))) i += len(token) aligned = list(align_tokens(ref, indices)) assert aligned[0] == ('I', [(0, 1)]) assert ali...
unknown
codeparrot/codeparrot-clean
/** * 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 type {EditorProps} from '@monaco-editor/react'; export const monacoOptions: Partial<EditorProps['options']> = { fontSi...
typescript
github
https://github.com/facebook/react
compiler/apps/playground/components/Editor/monacoOptions.ts
import os import unittest from conans.model.env_info import DepsEnvInfo from conans.model.profile import Profile from conans.model.settings import Settings from conans.paths import CONANFILE from conans.test.utils.tools import TestBufferConanOutput, TestClient from conans.util.files import save class MockSetting(str)...
unknown
codeparrot/codeparrot-clean
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Abdoul Bah (@helldorado) <bahabdoul at 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_vers...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: #Copyright (c) 2005 Ali Afshar <aafshar@gmail.com> #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without rest...
unknown
codeparrot/codeparrot-clean
from django.db import models from django.conf import settings from datetime import datetime import time, random # Adapted from the custom XSLT Ftrain.com, written from 1998-2005. # This is not promoted as the right, or even a good, way to program a # CMS--it's a distillation of custom code in Perl, PHP, and XSLT/Java...
unknown
codeparrot/codeparrot-clean
// Copyright The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
go
github
https://github.com/prometheus/prometheus
storage/remote/otlptranslator/prometheusremotewrite/testutil_test.go
/* * 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/convert/PeriodFormat.java
#![allow(unused_macro_rules)] use serde_test::Token; use std::iter; macro_rules! btreeset { () => { BTreeSet::new() }; ($($value:expr),+) => {{ let mut set = BTreeSet::new(); $(set.insert($value);)+ set }}; } macro_rules! btreemap { () => { BTreeMap::new() ...
rust
github
https://github.com/serde-rs/serde
test_suite/tests/macros/mod.rs
import variable_filter vf = variable_filter.VarFilter( [0], [30], [False], [True], aSigma = 1e2, varSigma = 1.5e0, rateSigma=1e0, biasSigma=1e-10) from numpy.random import normal import nump...
unknown
codeparrot/codeparrot-clean
services: redis2: image: '{imageName}' ports: - '6379'
unknown
github
https://github.com/spring-projects/spring-boot
core/spring-boot-docker-compose/src/dockerTest/resources/org/springframework/boot/docker/compose/core/2.yaml
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2014 Netbox (http://www.netbox.rs) All Rights Reserved. # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all poten...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Create and extract text from ODF, handling whitespace correctly. # Copyright (C) 2008 J. David Eisenberg # # 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; e...
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 { afterNextRender, ChangeDetectionStrategy, Component, computed, ElementRef, inject, Injector, ...
typescript
github
https://github.com/angular/angular
adev/shared-docs/components/viewers/example-viewer/example-viewer.component.ts
#!/bin/env python # -*- coding: utf-8 -*- # """ Various search algorithms for combinatorial problems: * [OK] Astar (shortest path with heuristics), and variants: * [OK] beam search (astar with size limit on waiting queue) * [OK] nbest solutions: implies storing solutions and a counter, and changing re...
unknown
codeparrot/codeparrot-clean
########################################################## # THIS IS A GENERATED FILE -- DO NOT MODIFY. # IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE # AND REGENERATE THE MATRIX SUITES. # # matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/change_strea...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_sharded_collections_passthrough_last_continuous_new_old_old_new.yml
# Copyright 2014 IBM Corp. # 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 app...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- from network import NeuralNetwork from ..utils import FLOATX, EPSILON, CrossEntropyCost import theano.tensor as T class NeuralClassifier(NeuralNetwork): """ Classifier network. """ def __init__(self, input_dim, config=None, input_tensor=None): sup...
unknown
codeparrot/codeparrot-clean
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.versions}. """ from __future__ import division, absolute_import import sys import operator from io import BytesIO from twisted.python.versions import getVersionString, IncomparableVersions from twisted.python.vers...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import os import uuid import werkzeug from odoo import api, fields, models from odoo import tools from odoo.addons import website from odoo.addons.http_routing.models.ir_http import url_for from odoo.exce...
unknown
codeparrot/codeparrot-clean
#FLM: RoboFab Intro, Font Groups # # # demo of RoboFab font groups # # # RoboFab font objects have several objects associated with them # kerning, info, groups, etc. Let's talk about groups. Groups are, # well groups of glyph names. These can be useful for lots of things # like kerning and OpenType features. The numb...
unknown
codeparrot/codeparrot-clean
use super::*; use futures_test::task::{new_count_waker, AwokenCount}; #[cfg(loom)] const NUM_ITEMS: usize = 16; #[cfg(not(loom))] const NUM_ITEMS: usize = 64; fn new_handle() -> (EntryHandle, AwokenCount) { let (waker, count) = new_count_waker(); (EntryHandle::new(0, waker), count) } fn model<F: Fn() + Sen...
rust
github
https://github.com/tokio-rs/tokio
tokio/src/runtime/time_alt/wake_queue/tests.rs
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
unknown
codeparrot/codeparrot-clean
// @flow import {getNumber} from 'shared-runtime'; function Component(props) { // We can infer that `x` is a primitive bc it is aliased to `y`, // which is used in a binary expression const x = getNumber(); const y = (x: any); y + 1; return x; } export const FIXTURE_ENTRYPOINT = { fn: Component, param...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/infer-types-through-type-cast.flow.js
# firebird/base.py # Copyright (C) 2005-2012 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 """ Support for the Firebird database. Connectivity is usually supplied via the kint...
unknown
codeparrot/codeparrot-clean
# @generated DO NOT EDIT MANUALLY # Template is at: .github/templates/linux_binary_build_workflow.yml.j2 # Generation script: .github/scripts/generate_ci_workflows.py name: linux-binary-manywheel on: push: # NOTE: Meta Employees can trigger new nightlies using: https://fburl.com/trigger_pytorch_nightly_build...
unknown
github
https://github.com/pytorch/pytorch
.github/workflows/generated-linux-binary-manywheel-nightly.yml
// Copyright 2010 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 runtime // inf2one returns a signed 1 if f is an infinity and a signed 0 otherwise. // The sign of the result is the sign of f. func inf2one(f float64)...
go
github
https://github.com/golang/go
src/runtime/complex.go
""" ========================================== Outlier detection with several methods. ========================================== When the amount of contamination is known, this example illustrates three different ways of performing :ref:`outlier_detection`: - based on a robust estimator of covariance, which is assum...
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-test/src/main/java/org/springframework/boot/test/context/filter/annotation/FilterAnnotations.java
from .error import InvalidTokenError import time class PageIterator(object): """Generic page iterator class, used for collections and events""" def __init__(self, client, path, query, options): self.client = client self.path = path self.query = query self.options = client._merg...
unknown
codeparrot/codeparrot-clean
"""In memory document index.""" import operator import uuid from collections.abc import Sequence from typing import Any, cast from pydantic import Field from typing_extensions import override from langchain_core._api import beta from langchain_core.callbacks import CallbackManagerForRetrieverRun from langchain_core....
python
github
https://github.com/langchain-ai/langchain
libs/core/langchain_core/indexing/in_memory.py
# pdftools - A library of classes for parsing and rendering PDF documents. # Copyright(C) 2001-2008 by David Boddie # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 o...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
import numpy as np from scipy.integrate import odeint from mushroom_rl.environments import Environment, MDPInfo from mushroom_rl.utils import spaces from mushroom_rl.utils.angles import normalize_angle from mushroom_rl.utils.viewer import Viewer class Segway(Environment): """ The Segway environment (continuou...
unknown
codeparrot/codeparrot-clean
# -*- coding: 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): # Adding field 'OrderItem.created' db.add_column('shoppingcart_orderitem', 'created', s...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 from django.core.urlresolvers import reverse from django.db import models from mptt.fields import TreeForeignKey from mptt.models import MPTTModel from core.adminlte import constants from core.adminlte.constants import UsableStatus, DICT_NULL_BLANK_TRUE from core.adminlte.models import BaseModel, User ...
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
// RUN: %check_clang_tidy -std=c23-or-later %s bugprone-signed-char-misuse %t /////////////////////////////////////////////////////////////////// /// Test cases correctly caught by the check. int SimpleVarDeclaration() { signed char CCharacter = -5; int NCharacter = CCharacter; // CHECK-MESSAGES: [[@LINE-1]]:20...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/checkers/bugprone/signed-char-misuse-c23.c