code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013 CERN. # # Invenio 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...
unknown
codeparrot/codeparrot-clean
""" Modified version of build_clib that handles fortran source files. """ from __future__ import division, absolute_import, print_function import os from glob import glob import shutil from distutils.command.build_clib import build_clib as old_build_clib from distutils.errors import DistutilsSetupError, DistutilsError...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2014-2016 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 merkleblock fetch/validation # from test_framework.test_framework import InfinitumTestFramework...
unknown
codeparrot/codeparrot-clean
import NIOConcurrencyHelpers extension Application { /// Controls application's configured caches. /// /// app.caches.use(.memory) /// public var caches: Caches { .init(application: self) } /// Current application cache. See `Request.cache` for caching in request handlers. ...
swift
github
https://github.com/vapor/vapor
Sources/Vapor/Cache/Application+Cache.swift
#!/usr/bin/env python """ Copyright (C) 2015 Louis Dijkstra This file is part of somatic-indel-calling This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your o...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2010-2011, Pieter Noordhuis <pcnoordhuis at gmail dot com> * * 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...
c
github
https://github.com/redis/redis
deps/hiredis/adapters/ae.h
package commonKLib fun commonKLibFunction(arg: String): Int { return 1 }
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-standalone/testData/sessionBuilder/resolveAgainstCommonKLib/klibSrc/commonKLibFunction.kt
cloud: AzurePublic managed_identity: client_id:
unknown
github
https://github.com/prometheus/prometheus
storage/remote/azuread/testdata/azuread_good_defaultmanagedidentity.yaml
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
unknown
codeparrot/codeparrot-clean
"use strict"; const { describeCases } = require("./TestCases.template"); describe("TestCases", () => { describeCases({ name: "minimized-source-map", mode: "production", devtool: "eval-cheap-module-source-map", minimize: true }); });
javascript
github
https://github.com/webpack/webpack
test/TestCasesMinimizedSourceMap.longtest.js
AssetMapper Component ===================== The AssetMapper component allows you to expose directories of assets that are then moved to a public directory with digested (i.e. versioned) filenames. It also allows you to dump an [importmap](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap)...
unknown
github
https://github.com/symfony/symfony
src/Symfony/Component/AssetMapper/README.md
"""Tests for distutils.sysconfig.""" import os import shutil import subprocess import sys import textwrap import unittest from distutils import sysconfig from distutils.ccompiler import get_default_compiler from distutils.tests import support from test.support import TESTFN, run_unittest, check_warnings class Sysconf...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Tests\Support; use Illuminate\Bus\Batch; use Illuminate\Bus\Queueable; use Illuminate\Container\Container; use Illuminate\Contracts\Bus\Dispatcher; use Illuminate\Contracts\Bus\QueueingDispatcher; use Illuminate\Support\Testing\Fakes\BatchRepositoryFake; use Illuminate\Support\Testing\Fakes...
php
github
https://github.com/laravel/framework
tests/Support/SupportTestingBusFakeTest.php
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
unknown
codeparrot/codeparrot-clean
#!/bin/env python2 from pykeyboard import PyKeyboard from time import sleep from random import choice import sys if len(sys.argv) < 2: print 'Usage: "./auto2048.py <strategy> [delay in seconds]"\n'\ 'Then focus on the browser window in which you are playing 2048.\n'\ 'Strategies include:\n'\...
unknown
codeparrot/codeparrot-clean
version: 2 updates: - package-ecosystem: 'github-actions' directories: - '/' - '/.github/actions/slack' - '/.github/actions/setup/directories' schedule: interval: 'daily' groups: github-actions: patterns: - "*" - package-ecosystem: 'cargo' directories:...
unknown
github
https://github.com/ruby/ruby
.github/dependabot.yml
/* Copyright (c) 2017 The swc Project Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
rust
github
https://github.com/vercel/next.js
crates/next-custom-transforms/src/lib.rs
//go:build linux || freebsd package initlayer import ( "os" "path/filepath" "strings" "github.com/moby/sys/user" "golang.org/x/sys/unix" ) // Setup populates a directory with mountpoints suitable // for bind-mounting things into the container. // // This extra layer is used by all containers as the top-most ro...
go
github
https://github.com/moby/moby
daemon/initlayer/setup_unix.go
class InMemoryMixin(object): """ Performs mapping of an iterable/datasource to memory. """ __serialize_version = 0 __serialize_fields = ('_in_memory', '_Y', '_Y_source') def __init__(self): super(InMemoryMixin, self).__init__() self._in_memory = False self._mapping_to_mem_a...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.handler; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; import static o...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockito/internal/handler/MockHandlerImplTest.java
#!/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 cStringIO import difflib import os import sys import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) BUILD...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package logical import ( "context" "testing" "github.com/stretchr/testify/assert" ) type fakeSender struct { captured *EventData } func (f *fakeSender) SendEvent(ctx context.Context, eventType EventType, event *EventData) error { f.captured...
go
github
https://github.com/hashicorp/vault
sdk/logical/events_test.go
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
unknown
codeparrot/codeparrot-clean
const fs = require('node:fs/promises') const os = require('node:os') const path = require('node:path') const prettier = require('prettier') const execa = require('execa') const { bold } = require('kleur') const yargs = require('yargs/yargs') const { hideBin } = require('yargs/helpers') const WORKING_PATH = '/root/act...
javascript
github
https://github.com/vercel/next.js
test/update-bundler-manifest.js
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Title: curl_multi_init Section: 3 Source: libcurl See-also: - curl_easy_init (3) - curl_global_init (3) - curl_multi_add_handle (3) - curl_multi_cleanup (3) - curl_multi_get_handles (3) Protocol: - All Added-in: 7.9...
unknown
github
https://github.com/curl/curl
docs/libcurl/curl_multi_init.md
toc: - file: index.md - file: analyzer-reference.md children: - file: analysis-fingerprint-analyzer.md - file: analysis-keyword-analyzer.md - file: analysis-lang-analyzer.md - file: analysis-pattern-analyzer.md - file: analysis-simple-analyzer.md - file: analysis-standard-ana...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/text-analysis/toc.yml
import unittest from datetime import date from django.db import connection from django.db.models.expressions import RawSQL from django.db.utils import DataError from django.test import TestCase from ..models import Article, Reporter, Square @unittest.skipUnless(connection.vendor == "postgresql", "PostgreSQL tests") ...
python
github
https://github.com/django/django
tests/backends/postgresql/test_compilation.py
/* * 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.fir.symbols import com.intellij.psi.PsiElement import org.jetbrains...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/symbols/KaFirNamedClassSymbol.kt
import json from django.conf import settings from django.core.urlresolvers import reverse from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse from django.template import RequestContext from django.template.loader import render_to_string from django.utils.encoding import smart_str...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/intel,stratix10.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Intel SoCFPGA Stratix10 platform clock controller maintainers: - Dinh Nguyen <dinguyen@kernel.org> properties: compa...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/intel,stratix10.yaml
from model.group import Group class GroupHelper: def __init__(self, app): self.app = app def return_to_group_page(self): wd = self.app.wd if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new")) > 0): wd.find_element_by_link_text("group page")...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ pygments.lexers.ambient ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for AmbientTalk language. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, words from pygment...
unknown
codeparrot/codeparrot-clean
import sys, getpass, os, psutil, time, requests, errno, threading, inspect, shlex import h2o_os_util, h2o_print as h2p, h2o_args import h2o_nodes from h2o_test import \ tmp_dir, tmp_file, flatfile_pathname, spawn_cmd, find_file, verboseprint, \ dump_json, log, check_sandbox_for_errors import json, platform, re ...
unknown
codeparrot/codeparrot-clean
''' Monitor module ============== The Monitor module is a toolbar that shows the activity of your current application : * FPS * Graph of input events Usage ----- For normal module usage, please see the :mod:`~kivy.modules` documentation. ''' __all__ = ('start', 'stop') from kivy.uix.label import Label from kivy....
unknown
codeparrot/codeparrot-clean
import os.path import re from six import BytesIO from taggit.managers import TaggableManager from django.core.files import File from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.db import models from django.db.models.signals import pre_delete, pre_save from django.dispatch.dispa...
unknown
codeparrot/codeparrot-clean
apiVersion: apps/v1 kind: DaemonSet metadata: name: fluentd-gcp-{{ fluentd_gcp_yaml_version }} namespace: kube-system labels: k8s-app: fluentd-gcp kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile version: {{ fluentd_gcp_yaml_version }} spec: selector: matchLab...
unknown
github
https://github.com/kubernetes/kubernetes
cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml
# -*- coding: utf-8 -*- ''' # Copyright (c) 2015 Microsoft Corporation # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use,...
unknown
codeparrot/codeparrot-clean
/** * Support classes for the open source scheduler * <a href="https://www.quartz-scheduler.org/">Quartz</a>, * allowing to set up Quartz Schedulers, JobDetails and * Triggers as beans in a Spring context. Also provides * convenience classes for implementing Quartz Jobs. */ @NullMarked package org.springframework...
java
github
https://github.com/spring-projects/spring-framework
spring-context-support/src/main/java/org/springframework/scheduling/quartz/package-info.java
# Copyright (c) 2015, MapR Technologies # # 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...
unknown
codeparrot/codeparrot-clean
from __future__ import division, absolute_import, print_function import numpy as np from numpy.compat import long from numpy.core import (array, arange, atleast_1d, atleast_2d, atleast_3d, vstack, hstack, newaxis, concatenate, stack) from numpy.testing import (TestCase, assert_, assert_raises, ...
unknown
codeparrot/codeparrot-clean
#!python # coding=utf-8 from copy import copy from collections import OrderedDict import numpy as np import pandas as pd from pocean.utils import ( create_ncvar_from_series, dict_update, downcast_dataframe, generic_masked, get_default_axes, get_dtype, get_mapped_axes_variables, get_mas...
unknown
codeparrot/codeparrot-clean
"""Deal with pyface backend issues.""" # Author: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) import os import sys from ..utils import warn, _check_pyqt5_version def _get_pyface_backend(): """Check the currently selected Pyface backend. Returns ------- backend : str ...
unknown
codeparrot/codeparrot-clean
#pragma once #include <ATen/Utils.h> #include <c10/macros/Export.h> #include <c10/util/Exception.h> namespace c10 { class DynamicLibraryError : public Error { using Error::Error; }; } // namespace c10 namespace at { struct DynamicLibrary { AT_DISALLOW_COPY_AND_ASSIGN(DynamicLibrary); DynamicLibrary(DynamicL...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/DynamicLibrary.h
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ This module provides support for Twisted to interact with the gtk3 mainloop via Gobject introspection. This is like gi, but slightly slower and requires a working $DISPLAY. In order to use this support, simply do the following:: from twi...
unknown
codeparrot/codeparrot-clean
""" module for generating and serializing xml and html structures by using simple python objects. (c) holger krekel, holger at merlinux eu. 2009 """ import sys, re if sys.version_info >= (3,0): def u(s): return s def unicode(x, errors=None): if hasattr(x, '__unicode__'): return x._...
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 'Trial.instruction_hours_after' db.add_column(u'trials_trial', 'instruction_hours_after', ...
unknown
codeparrot/codeparrot-clean
// (C) Copyright Tobias Schwinger // // Use modification and distribution are subject to the boost Software License, // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). //------------------------------------------------------------------------------ #ifndef BOOST_FT_FUNCTION_ARITY_HPP_INCLUDED #define BOOST_F...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/function_types/function_arity.hpp
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2009 Benny Malengier # # 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) ...
unknown
codeparrot/codeparrot-clean
""" Tests for basic validation checks. .. codeauthor:: Tomas Krizek <tomas.krizek1@tul.cz> """ import pytest from gm_base.model_data import MappingDataNode, Notification from gm_base.model_data.validation import checks from gm_base.geomop_util import TextValue def test_check_integer(): input_type = dict(min=0, ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** RandomPointsLayer.py --------------------- Date : April 2014 Copyright : (C) 2014 by Alexander Bruy Email : alexander dot bruy at gmail dot com *********...
unknown
codeparrot/codeparrot-clean
# Claude Code Setup Guide > **Note:** This guide is for developers setting up Claude Code. AI agents should ignore this file. > ## Installation 1. **CLI:** Check the official https://code.claude.com/docs/en/setup doc 2. **IntelliJ Plugin:** Install "Claude Code [Beta]" from the plugin marketplace 3. **MCP Server:*...
unknown
github
https://github.com/JetBrains/kotlin
.ai/claude-code.md
# frozen_string_literal: true require "cases/helper" module ActiveModel module Type class TimeTest < ActiveModel::TestCase def test_type_cast_time type = Type::Time.new assert_nil type.cast(nil) assert_nil type.cast("") assert_nil type.cast("ABC") assert_nil type.ca...
ruby
github
https://github.com/rails/rails
activemodel/test/cases/type/time_test.rb
""" Testing signals emitted on changing m2m relations. """ from django.db import models from django.test import TestCase from .models import Part, Car, SportsCar, Person class ManyToManySignalsTest(TestCase): def m2m_changed_signal_receiver(self, signal, sender, **kwargs): message = { 'instan...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Rekall Memory Forensics # Copyright 2014 Google Inc. All Rights Reserved. # # 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 # y...
unknown
codeparrot/codeparrot-clean
#pragma once #include <ATen/Config.h> #include <ATen/Tensor.h> #include <ATen/core/List.h> #if AT_MKLDNN_ENABLED() namespace at::native::xpu { C10_API Tensor convolution_pointwise( const Tensor& input_t, const Tensor& weight_t, const std::optional<Tensor>& bias_opt, IntArrayRef padding, IntArrayR...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/mkldnn/xpu/Conv.h
# coding: UTF-8 import re from LcovInfo import * class ReadInfoFile: def __init__(self): self.lcovInfos={} def readInfoFile(self, infoFile): for line in open(infoFile): if re.match("^TN:",line): print("TN") elif re.match("^[SK]F:",line): #source name ...
unknown
codeparrot/codeparrot-clean
//===--- Modularize.h - Common definitions for Modularize -*- 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
clang-tools-extra/modularize/Modularize.h
import datetime import time import traceback import sys from modules import basemodule from ouimeaux.environment import Environment class WemoInsightSwitch(basemodule.SensorModule): def __init__(self): self.env = Environment(switch_callback=self.on_switch, motion_callback=self.on_motion, with_cache=False)...
unknown
codeparrot/codeparrot-clean
import re from collections import OrderedDict from urllib.parse import unquote from django.utils.translation import ugettext from bleach.linkifier import TLDS from rest_framework import serializers from rest_framework.relations import PrimaryKeyRelatedField from olympia.accounts.serializers import BaseUserSerialize...
unknown
codeparrot/codeparrot-clean
# HyClops for Zabbix # Copyright 2013 TIS 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 dis...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
from django.core import signals from django.db.utils import (DEFAULT_DB_ALIAS, DJANGO_VERSION_PICKLE_KEY, DataError, OperationalError, IntegrityError, InternalError, ProgrammingError, NotSupportedError, DatabaseError, InterfaceError, Error, ConnectionHandler, ConnectionRouter) __all__ = [ 'backend', 'c...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 t...
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/src/OAT/json_internal.hpp
# This program is free software; you can redistribute it and/or modify it under # the terms of the (LGPL) GNU Lesser General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will b...
unknown
codeparrot/codeparrot-clean
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Marijn van Vliet <w.m.vanvliet@gmail.com> # Jona Sassenhagen <jona.sassenhagen@gmai...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """Get version identification from git See the documentation of get_version for more information """ from __future__ import print_function from subprocess import check_output, CalledProcessError from os import path, name, devnull, environ, listdir __all__ = ("get_version",) CURRENT_DIRECTORY ...
unknown
codeparrot/codeparrot-clean
/* NOLINT(build/header_guard) */ /* Copyright 2013 Google Inc. All Rights Reserved. Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ /* template parameters: FN, DataType */ #define HistogramType FN(Histogram) static void FN(InitialEntropyCodes)(const...
c
github
https://github.com/nodejs/node
deps/brotli/c/enc/block_splitter_inc.h
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import logging import datetime from io import BytesIO from .hooks import default_hooks from .structures import CaseInsensitiveDict from .status_codes import codes from .a...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # (c) 2017, NetApp, Inc # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.channels import kotlinx.coroutines.testing.* import kotlinx.coroutines.* import kotlin.test.* class ChannelBufferOverflowTest : TestBase() { @Test fun testDropLatest() = runTest { val c = Channel<Int>(2, BufferOverflow.DROP_LATEST) assertTrue(c.trySend(1).isSuccess) ...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/common/test/channels/ChannelBufferOverflowTest.kt
How to contribute ================= Thank you so much for wanting to contribute to Guava! Here are a few important things you should know about contributing: 1. API changes require discussion, use cases, etc. Code comes later. 2. Pull requests are great for small fixes for bugs, documentation, etc. 3. Pull request...
unknown
github
https://github.com/google/guava
CONTRIBUTING.md
""" Flask-Script -------------- Flask support for writing external scripts. Links ````` * `documentation <http://flask-script.readthedocs.org>`_ """ import sys from setuptools import setup version='2.0.6' # Hack to prevent stupid TypeError: 'NoneType' object is not callable error on # exit of python setup.py test...
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.impl.base.test.cases.components.compilerFacility import org.jetbrai...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-impl-base/testFixtures/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/compilerFacility/AbstractFirPluginPrototypeCompilerFacilityTestWithAnalysis.kt
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package storage import ( "context" "path/filepath" "strings" "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/util/log" "gith...
go
github
https://github.com/cockroachdb/cockroach
pkg/storage/store_properties.go
//! Normalizes MIR in `TypingMode::PostAnalysis` mode, most notably revealing //! its opaques. We also only normalize specializable associated items once in //! `PostAnalysis` mode. use rustc_middle::mir::visit::*; use rustc_middle::mir::*; use rustc_middle::ty::{self, Ty, TyCtxt}; pub(super) struct PostAnalysisNorma...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_mir_transform/src/post_analysis_normalize.rs
#!@PYTHON@ # -*- mode: python; coding: utf-8; -*- # This file is part of Invenio. # Copyright (C) 2007, 2008, 2010, 2011 CERN. # # Invenio 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 t...
unknown
codeparrot/codeparrot-clean
"""This class handles nearly every aspect of dialogue. See docstring. """ import pygame class DialogueHandler(object): """The class that handles dialogue. This class can store fonts, render text, determine proper spacing for text, and in the future possibly determine where to split up long text input...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h
// Copyright 2010 Google Inc. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the COPYING file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing project authors may // be...
c
github
https://github.com/opencv/opencv
3rdparty/libwebp/src/webp/decode.h
# Temporary suites to assists the development of new viewless timeseries collection. # Run all timeseries tests in the sharding suite without using rawData, # to validate routing of requests to system.buckets collections (no rawData) still works in mongos. # # TODO SERVER-109519: remove this temporary suite and all its...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/mappings/sharding_legacy_timeseries_no_rawdata.yml
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
unknown
codeparrot/codeparrot-clean
############################################################################### # # An example of writing cell comments to a worksheet using Python and # XlsxWriter. # # Each of the worksheets demonstrates different features of cell comments. # # Copyright 2013-2015, John McNamara, jmcnamara@cpan.org # import xlsxwrite...
unknown
codeparrot/codeparrot-clean
""" Python package for convex optimization CVXOPT is a free software package for convex optimization based on the Python programming language. It can be used with the interactive Python interpreter, on the command line by executing Python scripts, or integrated in other software via Python extension modules. Its main ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 3 of the Lic...
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/test/java/org/springframework/aop/aspectj/autoproxy/spr3064/SPR3064Tests.java
/** * Generated by '@kontent-ai/model-generator@5.9.0' * * Project name: Next.js Sample App * Environment: Production * Project Id: a7844231-064c-016c-1dad-38228cbc505d */ export const collections = { /** * Default */ default: { codename: "default", id: "00000000-0000-0000-0000-000000000000", ...
typescript
github
https://github.com/vercel/next.js
examples/cms-kontent-ai/models/project/collections.ts
# -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # 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 DOCUMENTATION = """ become: doas short_description: Do As user ...
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 */ describe('Tracking items from application to component tree', () => { beforeEach(() => { cy.visit('/'); }); ...
javascript
github
https://github.com/angular/angular
devtools/cypress/integration/item-tracking.e2e.js
# Copyright 2014 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.page import page_test from metrics import cpu from metrics import media from metrics import memory from metrics import power from metrics imp...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ numpyfilter.py INPUTFILE Interpret C comments as ReStructuredText, and replace them by the HTML output. Also, add Doxygen /** and /**< syntax automatically where appropriate. """ from __future__ import division, absolute_import, print_function import sys import re import os import textwrap ...
unknown
codeparrot/codeparrot-clean
""" There is a way to put keys of any type in a type's dictionary. I think this allows various kinds of crashes, but so far I have only found a convoluted attack of _PyType_Lookup(), which uses the mro of the type without holding a strong reference to it. Probably works with super.__getattribute__() too, which uses th...
unknown
codeparrot/codeparrot-clean
""" An interface to html5lib. """ import urllib from html5lib import HTMLParser as _HTMLParser, XHTMLParser as _XHTMLParser from lxml import etree from lxml.html import _contains_block_level_tag, XHTML_NAMESPACE from lxml.html._html5builder import TreeBuilder # python3 compatibility try: _strings = basestring exc...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
unknown
codeparrot/codeparrot-clean
// // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for ...
cpp
github
https://github.com/apple/swift
lib/AST/ASTPrinter.cpp
# Code that packs and unpacks the Univgw structures. # See if we have a special directory for the binaries (for developers) import types import pythoncom from win32com.client import gencache com_error = pythoncom.com_error _univgw = pythoncom._univgw def RegisterInterfaces(typelibGUID, lcid, major, minor, interface_...
unknown
codeparrot/codeparrot-clean
@file:OptIn(ExperimentalContracts::class) package kotlinx.coroutines.selects import kotlin.contracts.* import kotlin.coroutines.* /** * Waits for the result of multiple suspending functions simultaneously like [select], but in an _unbiased_ * way when multiple clauses are selectable at the same time. * * This un...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/common/src/selects/SelectUnbiased.kt
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that th...
cpp
github
https://github.com/opencv/opencv
3rdparty/openexr/Imath/ImathVec.cpp
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, divi...
unknown
codeparrot/codeparrot-clean
from langchain_core.stores import BaseStore, K, V __all__ = ["BaseStore", "K", "V"]
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/schema/storage.py