code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Copyright 2020 Google LLC # # 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 writing, ...
unknown
codeparrot/codeparrot-clean
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013,2016 Contributor # # 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...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010 OpenERP s.a. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # p...
unknown
codeparrot/codeparrot-clean
import * as ts from "../../_namespaces/ts.js"; import { baselineTsserverLogs, openFilesForSession, TestSession, verifyGetErrRequest, } from "../helpers/tsserver.js"; import { File, TestServerHost, } from "../helpers/virtualFileSystemWithWatch.js"; describe("unittests:: tsserver:: pasteEdits::",...
typescript
github
https://github.com/microsoft/TypeScript
src/testRunner/unittests/tsserver/pasteEdits.ts
"""Config flow for NZBGet.""" from __future__ import annotations import logging from typing import Any import voluptuous as vol from homeassistant.config_entries import ConfigFlow, OptionsFlow from homeassistant.const import ( CONF_HOST, CONF_NAME, CONF_PASSWORD, CONF_PORT, CONF_SCAN_INTERVAL, ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2011 OpenStack Foundation # Copyright 2013 IBM Corp. # # 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.a...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2alpha1", "metadata": { "name": "v26.text2_to_text.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "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.v26.text2_to_text.v2alpha1.json
/* * Copyright 2010-2026 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.components import org.jetbrains.kotlin.analysis.api.* import org.je...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/components/KaSymbolInformationProvider.kt
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2019-06-03 18:46 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('job', '0056_convert_strike_jobs'), ] operations = [ migrations.RemoveField( ...
unknown
codeparrot/codeparrot-clean
// Copyright 2018 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 math import ( "math/bits" ) // reduceThreshold is the maximum value of x where the reduction using Pi/4 // in 3 float64 parts still gives accurate re...
go
github
https://github.com/golang/go
src/math/trig_reduce.go
{ "participants": [{"name": "User 1"}, {"name": "User 2"}], "messages": [ {"sender_name": "User 2", "timestamp_ms": 1675597571851, "content": "Bye!"}, { "sender_name": "User 1", "timestamp_ms": 1675597435669, "content": "Oh no worries! Bye" }, ...
json
github
https://github.com/langchain-ai/langchain
libs/langchain/tests/integration_tests/examples/facebook_chat.json
/* Copyright 2015 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 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/client/tests/remotecommand_test.go
"""Test the Mullvad config flow.""" from unittest.mock import patch from mullvad_api import MullvadAPIError from homeassistant import config_entries, setup from homeassistant.components.mullvad.const import DOMAIN from homeassistant.data_entry_flow import RESULT_TYPE_ABORT, RESULT_TYPE_FORM from tests.common import ...
unknown
codeparrot/codeparrot-clean
use std::collections::HashMap; use serde::Deserialize; use swc_core::{ atoms::{atom, Atom, Wtf8Atom}, common::DUMMY_SP, ecma::{ ast::*, utils::private_ident, visit::{fold_pass, Fold}, }, }; #[derive(Clone, Debug, Deserialize)] pub struct Config { pub wildcard: bool, } pub ...
rust
github
https://github.com/vercel/next.js
crates/next-custom-transforms/src/transforms/optimize_barrel.rs
/* * Copyright (c) 2018 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage; import java.util.List; import org.junit.jupiter.api.Test; import org.mockito.Mock; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mocki...
java
github
https://github.com/mockito/mockito
mockito-integration-tests/junit-jupiter-extension-tests/src/test/java/org/mockitousage/NoExtendsTest.java
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Remove unique constraint on 'DirtyInstance', fields ['object_id', 'content_type'] db.delete_unique('denorm_dirty...
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 ...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/FailoverProxyProvider.java
import zmq import galah.sheep.utility.universal as universal import galah.sheep.utility.exithelpers as exithelpers from galah.sheep.utility.suitehelpers import get_virtual_suite from galah.base.flockmail import FlockMessage import time import threading import logging import random import datetime # Load Galah's config...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function __authors__ = "Heng Luo" from pylearn2.testing.skip import skip_if_no_gpu skip_if_no_gpu() import numpy as np from theano.compat.six.moves import xrange from theano import shared from theano.tensor import grad, constant from pylearn2.sandbox.cuda_convnet.filter_acts import Filte...
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/platform/cloud/gcs_file_system.h
# encoding: utf-8 # module PyQt4.QtNetwork # from /usr/lib/python3/dist-packages/PyQt4/QtNetwork.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QNetworkSession(__PyQt4_QtCore.QObject): """ QNetworkSession(QNetworkConfiguration, QObject parent=No...
unknown
codeparrot/codeparrot-clean
--- name: Build and trigger Antithesis exploration on: # pull_request: # branches: [main] schedule: - cron: "0 0 * * *" # run every day at midnight workflow_dispatch: inputs: test: description: 'Test name' required: false type: string duration: description:...
unknown
github
https://github.com/etcd-io/etcd
.github/workflows/antithesis-test.yml
_fixture: model_class: Cpk::Review first_book_review: book: cpk_book_with_generated_pk rating: 5 comment: "The first book was alright." second_book_review_for_book_with_partial_pk_defined: book: cpk_great_author_first_book author_id: <%= ActiveRecord::FixtureSet.identify(:cpk_great_author) %> rating: 5 ...
unknown
github
https://github.com/rails/rails
activerecord/test/fixtures/cpk_reviews.yml
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/dtensor/mlir/expansions/softmax_spmd_expander.h
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/test/java/org/apache/kafka/clients/admin/AdminClientConfigTest.java
# Copyright (c) 2010-2012 OpenStack, LLC. # # 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
#!/usr/bin/env python import os import sys from jinja2 import Environment, FileSystemLoader from ansible.module_utils._text import to_bytes def get_options(optlist): ''' get actual options ''' opts = [] for opt in optlist: res = { 'desc': opt.help, 'options': opt._short_...
unknown
codeparrot/codeparrot-clean
#![warn(rust_2018_idioms)] #![cfg(feature = "full")] #![cfg(not(target_os = "wasi"))] // Wasi doesn't support panic recovery #![cfg(panic = "unwind")] use futures::future; use std::error::Error; use tokio::runtime::{Builder, Handle, Runtime}; mod support { pub mod panic; } use support::panic::test_panic; #[test]...
rust
github
https://github.com/tokio-rs/tokio
tokio/tests/rt_panic.rs
#! /usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import bitcoinrpc, re, os, time, dateutil.parser, sys, datetime, httplib, json, logging, pytz from dateutil.tz import tzlocal from decimal import Decimal from optparse import OptionParser import sqlite3 sys.path.append("/app/lib/bitcointools") from deserialize import * from BCDataStream import * cla...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import re import pyauto_functional # Must be imported before pyauto import pyauto import test_utils class I...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Author Vincent Renaville. Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publis...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012 Spotify AB # # 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 writing, s...
unknown
codeparrot/codeparrot-clean
"""Test reproduce state for Input datetime.""" from homeassistant.core import State from tests.common import async_mock_service async def test_reproducing_states(hass, caplog): """Test reproducing Input datetime states.""" hass.states.async_set( "input_datetime.entity_datetime", "2010-10-10 01...
unknown
codeparrot/codeparrot-clean
import logging import logging.config import os from amberclient.common import amber_proxy, future_object from amberclient.common import drivermsg_pb2 import dummy_pb2 __author__ = 'paoolo' DEVICE_TYPE = 5 LOGGER_NAME = 'Dummy' pwd = os.path.dirname(os.path.abspath(__file__)) logging.config.fileConfig('%s/dummy.in...
unknown
codeparrot/codeparrot-clean
--- "tauri-cli": patch:bug "@tauri-apps/cli": patch:bug --- Fix missing Cargo args when running mobile dev and build commands.
unknown
github
https://github.com/tauri-apps/tauri
.changes/fix-missing-options.md
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import os from metrics import Metric class SpeedIndexMetric(Metric): """The speed index metric is one way of measuring page load speed...
unknown
codeparrot/codeparrot-clean
""" Low-level BLAS functions ======================== This module contains low-level functions from the BLAS library. .. versionadded:: 0.12.0 .. warning:: These functions do little to no error checking. It is possible to cause crashes by mis-using them, so prefer using the higher-level routines in `scipy....
unknown
codeparrot/codeparrot-clean
/** * @vitest-environment jsdom */ import { Teleport, Text, createApp, defineComponent, markRaw, nextTick, nodeOps, onMounted, h as originalH, ref, render, serialize, serializeInner, useModel, withDirectives, } from '@vue/runtime-test' import { Fragment, createBlock, createComment...
typescript
github
https://github.com/vuejs/core
packages/runtime-core/__tests__/components/Teleport.spec.ts
// Copyright 2015 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
go
github
https://github.com/etcd-io/etcd
server/etcdserver/api/v2store/node_test.go
# (c) 2012, 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) any lat...
unknown
codeparrot/codeparrot-clean
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT if ('__TAURI__' in window) { window.__TAURI__.sample = {} }
javascript
github
https://github.com/tauri-apps/tauri
examples/api/src-tauri/tauri-plugin-sample/api-iife.js
#!/usr/bin/env python #coding:utf-8 import sys import os import subprocess import time class ToughError(Exception): def __init__(self, message): self.message = message class ToughShell(object): def __init__(self,logfile=None,debug=False): self.logfile = logfile self.is_debug = debug ...
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\Component\Form; use Symfony\Component\OptionsResolver\OptionsRe...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/Form/FormTypeInterface.php
import fs from "node:fs/promises"; import path from "node:path"; import { test, expect } from "@playwright/test"; import getPort from "get-port"; import { createProject, dev, viteConfig } from "./helpers/vite.js"; const files = { "app/routes/_index.tsx": String.raw` import { useState, useEffect } from "react"; ...
typescript
github
https://github.com/remix-run/react-router
integration/vite-route-added-test.ts
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/InterfaceAudience.java
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> /* * The code and lookup tables are based on the algorithm * described at http://www.w3.org/TR/PNG/ * * The 256 element lookup table takes 1024 bytes, and it may be completely * cached after processing ...
c
github
https://github.com/nginx/nginx
src/core/ngx_crc32.c
""" ******************************************************* * * test_extract_priors - UNIT TEST FOR TRAVIS WITH EXTRACT PRIORS * * License: Apache 2.0 * Written by: Michael Slugocki * Created on: May 29, 2018 * Last updated: September 13, 2018 * ******************************************************* """ ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ###################################################################### ## ## Simple add/delete/change share command script for Samba ## ## Copyright (C) Gerald Carter 2004. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU Gener...
unknown
codeparrot/codeparrot-clean
#@+leo-ver=5-thin #@+node:lee.20141215164031.94: * @file example.py #@@language python #@@tabwidth -4 #@+<<decorations>> #@+node:lee.20141215164031.95: ** <<decorations>> import cherrypy import random from std.asciisymbol import asciiImage from wsgi import env #@-<<decorations>> #@+others #@+node:lee.20141215164031.96...
unknown
codeparrot/codeparrot-clean
import datetime from django.forms import DateTimeField, ValidationError from django.test import SimpleTestCase class DateTimeFieldTest(SimpleTestCase): def test_datetimefield_1(self): f = DateTimeField() self.assertEqual(datetime.datetime(2006, 10, 25, 0, 0), f.clean(datetime.date(2006, 10, 25)))...
unknown
codeparrot/codeparrot-clean
# 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
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package command import ( "errors" "io/ioutil" "os" "sort" "strings" "testing" "github.com/go-test/deep" "github.com/google/go-cmp/cmp" "github.com/hashicorp/cli" "github.com/hashicorp/go-secure-stdlib/strutil" "github.com/hashicorp/vau...
go
github
https://github.com/hashicorp/vault
command/secrets_enable_test.go
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
unknown
codeparrot/codeparrot-clean
"""A collection of modules for iterating through different kinds of tree, generating tokens identical to those produced by the tokenizer module. To create a tree walker for a new type of tree, you need to do implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method taking a ...
unknown
codeparrot/codeparrot-clean
from bpy import data, types from .. import constants, logger from .constants import MULTIPLY, WIRE, IMAGE def _material(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: """ material = None...
unknown
codeparrot/codeparrot-clean
import stellata.database import stellata.fields import stellata.index import stellata.model import stellata.relations import stellata.tests.base db = stellata.tests.base.db class A(stellata.model.Model): __table__ = 'a' id = stellata.fields.UUID() foo = stellata.fields.Text() # note: some attribute ...
unknown
codeparrot/codeparrot-clean
{ "groups": [ { "name": "test.group.one.retry", "type": "com.example.Retry", "sourceType": "org.acme.config.TestApp", "sourceMethod": "one()" }, { "name": "test.group.two.retry", "type": "com.example.Retry", "sourceType": "org.acme.config.TestApp", "sourceMe...
json
github
https://github.com/spring-projects/spring-boot
configuration-metadata/spring-boot-configuration-metadata/src/test/resources/metadata/configuration-metadata-multi-groups.json
// Copyright 2014 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. /* Package kv and its KV API have been deprecated for external usage. Please use a postgres-compatible SQL driver (e.g. github.com/lib/pq). For more details, see http://...
go
github
https://github.com/cockroachdb/cockroach
pkg/kv/doc.go
# Copyright 2016 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 ag...
unknown
codeparrot/codeparrot-clean
{ "formatVersion": "1.1", "component": { "group": "${pom.groupId}", "module": "${pom.artifactId}", "version": "${pom.version}", "attributes": { "org.gradle.status": "${module.status}" } }, "createdBy": { "maven": { "version": "${maven.version}", "buildId": "${maven.buil...
json
github
https://github.com/google/guava
guava/module.json
#Just a copy of the version in python 2.5 to be used if it's not available in jython 2.1 """Simple XML-RPC Server. This module can be used to create simple XML-RPC servers by creating a server and either installing functions, a class instance, or by extending the SimpleXMLRPCServer class. It can also be used to hand...
unknown
codeparrot/codeparrot-clean
""" "Rel objects" for related fields. "Rel objects" (for lack of a better name) carry information about the relation modeled by a related field and provide some utility functions. They're stored in the ``remote_field`` attribute of the field. They also act as reverse fields for the purposes of the Meta API because th...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from .op import Op from .db import DataType from . import util def _hex_dollar(value, size): fmt = "${{:0{}X}}".format(2 * size) return fmt.format(value) def _disp_str(disp): return "{:+d}".format(disp) if disp else "" def _operand(addr, operand): return operand class MD6502...
unknown
codeparrot/codeparrot-clean
from couchpotato.core.logger import CPLog from string import ascii_letters, digits from urllib import quote_plus import re import traceback import unicodedata log = CPLog(__name__) def toSafeString(original): valid_chars = "-_.() %s%s" % (ascii_letters, digits) cleanedFilename = unicodedata.normalize('NFKD', ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2014 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 v...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # # G...
unknown
codeparrot/codeparrot-clean
import random from django.conf import settings from django.contrib.auth.models import AnonymousUser, Group, User from django.db import connection import mock from nose.tools import eq_ from test_utils import RequestFactory from test_app import views import waffle from waffle.middleware import WaffleMiddleware from w...
unknown
codeparrot/codeparrot-clean
use super::{Entry, EntryHandle, RegistrationQueueEntry}; use crate::util::linked_list; type EntryList = linked_list::LinkedList<RegistrationQueueEntry, Entry>; /// A queue of entries that need to be registered in the timer wheel. #[derive(Debug)] pub(crate) struct RegistrationQueue { list: EntryList, } impl Drop...
rust
github
https://github.com/tokio-rs/tokio
tokio/src/runtime/time_alt/registration_queue.rs
"""Use a Windows event to interrupt a child process like SIGINT. The child needs to explicitly listen for this - see ipykernel.parentpoller.ParentPollerWindows for a Python implementation. """ import ctypes def create_interrupt_event(): """Create an interrupt event handle. The parent process should call thi...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: Amplitude Balance # Author: mettus # Description: Restores IQ amplitude balance # Generated: Thu Aug 1 11:47:46 2013 ################################################## from gnuradio import blocks from gnurad...
unknown
codeparrot/codeparrot-clean
#!/bin/bash # Copyright 2021 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 agre...
unknown
github
https://github.com/prometheus/prometheus
web/ui/module/codemirror-promql/build.sh
import sqlite3 from unittest import TestCase from redash.query_runner.query_results import (PermissionError, _load_query, create_table, extract_query_ids) from tests import BaseTestCase class TestExtractQueryIds(TestCase): def test_works_with_simple_query(self): ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import sys from ansible_collections.testns.testcoll.plugins.module_utils import leaf, secondary # FIXME: this one needs pkginit synthesis to work # from ansible_collections.testns.testcoll.plugins.mod...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # this is taken from the pySerial documentation at # http://pyserial.sourceforge.net/examples.html import ctypes import re def ValidHandle(value): if value == 0: raise ctypes.WinError() return value NULL = 0 HDEVINFO = ctypes.c_int BOOL = ctypes.c_int CHAR = ctypes.c_char PCTSTR...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Union from typing_extensions import Annotated, TypeAlias from ....._utils import PropertyInfo from .function_tool_call_delta import FunctionToolCallDelta from .file_search_tool_call_delta import FileSearchToolCall...
python
github
https://github.com/openai/openai-python
src/openai/types/beta/threads/runs/tool_call_delta.py
# # 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 writing, software # distributed under ...
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. # Exercise the listtransactions API from test_framework.test_framework import BitcoinTestFramework from ...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env pypy """ Command-line options for translate: See below """ import os import sys import py from rpython.config.config import (to_optparse, OptionDescription, BoolOption, ArbitraryOption, StrOption, IntOption, Config, ChoiceOption, OptHelpFormatter) from rpython.config.translationoption import (...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ This module is used for testing the functions within the pyhpeimc.plat.netassets module. """ from unittest import TestCase from nose.plugins.skip import SkipTest from pyhpeimc.plat.netassets import * from test_machine import * ##### Test get_dev_asset_details function for multiple vendo...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2013-2014 Free Software Foundation, 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 License, or # (at your option) any later version. # # This progr...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, orderedSet, ) class DeezerPlaylistIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?deezer\.com/playlist/(?P<id>[0-9]+)' _TEST = { 'url': '...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from flexbe_core import EventState, Logger from flexbe_core.proxy import ProxyActionClient from mary_tts.msg import maryttsAction, maryttsGoal class SpeechOutputState(EventState): ''' Lets the robot speak the given input string. ># text string Text to output. <= done Speaking has fini...
unknown
codeparrot/codeparrot-clean
--- navigation_title: "Pattern replace" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-pattern-replace-charfilter.html --- # Pattern replace character filter [analysis-pattern-replace-charfilter] The `pattern_replace` character filter uses a regular expression to match char...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/text-analysis/analysis-pattern-replace-charfilter.md
/* * 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
configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/simple/IgnoredProperties.java
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package logical import ( "fmt" "github.com/mitchellh/copystructure" ) // LogInput is used as the input to the audit system on which audit entries are based. type LogInput struct { Type string Auth *Auth Request ...
go
github
https://github.com/hashicorp/vault
sdk/logical/audit.go
import copy import datetime from django.core.exceptions import FieldError from django.db.backends import utils as backend_utils from django.db.models import fields from django.db.models.query_utils import Q from django.utils import six from django.utils.functional import cached_property class Combinable(object): ...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2020, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
include/string_template_utils.h
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # 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': '1.1', ...
unknown
codeparrot/codeparrot-clean
# # This file is part of fimap. # # Copyright(c) 2009-2010 Iman Karim(ikarim2s@smail.inf.fh-brs.de). # http://fimap.googlecode.com # # This file may be licensed under the terms of of the # GNU General Public License Version 2 (the ``GPL''). # # Software distributed under the License is distributed # on an ``AS IS'' bas...
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
from path import path from PIL import Image from unidecode import unidecode from zipfile import is_zipfile from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.shortcuts import redirect from django.utils.translation import ugettext as _ from misago import messages ...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function, absolute_import import os import tempfile import unittest import sys import re import warnings import io from textwrap import dedent from future.utils import bind_method, PY26, PY3, PY2, PY27 from future.moves.subprocess import check_output, STDOUT, CalledProcessError if PY26: ...
unknown
codeparrot/codeparrot-clean
/** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: false, }; module.exports = nextConfig;
javascript
github
https://github.com/vercel/next.js
examples/with-next-ui/next.config.js
# -*- coding: utf-8 -*- # © 2016 ClearCorp # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import openerp.addons.decimal_precision as dp from openerp import models, fields, api class account_invoice(models.Model): _name = 'account.invoice' _inherit = 'account.invoice' @api.one de...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 VMware, 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 ap...
unknown
codeparrot/codeparrot-clean
/** * An augmentable interface users can modify in their app-code to opt into * future-flag-specific types */ export interface Future { // We list the potential fields here in comments strictly for clarity. // They will be generated by the react-router/dev/typegen/generate.ts module // // v8_middleware: bool...
typescript
github
https://github.com/remix-run/react-router
packages/react-router/lib/types/future.ts
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# Copyright 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