code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
/*
* 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.fir.symbols
import org.jetbrains.kotlin.analysis.api.fir.KaFirSessi... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/symbols/KaFirArrayOfSymbolProvider.kt |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apac... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2006-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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 2.1 of the License, or (a... | unknown | codeparrot/codeparrot-clean | ||
# 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 pipes
import sys
from telemetry.core import util
util.AddDirToPythonPath(util.GetChromiumSrcDir(), 'build', 'android')
from pylib.dev... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.osv import fields, osv
from openerp.tools.translate import _
from openerp.exceptions import UserError
class hr_grant_badge_wizard(osv.TransientModel):
_name = 'gamification.badge.user.wizard'
_inher... | unknown | codeparrot/codeparrot-clean | ||
###############################################################################
##
## Copyright (C) 2014-2015, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
"""
Send metrics to signalfx
#### Dependencies
* urllib2
#### Configuration
Enable this handler
* handers = diamond.handler.httpHandler.SignalfxHandler
* auth_token = SIGNALFX_AUTH_TOKEN
* batch_size = [optional | 300 ] will wait for this many requests before
posting
"""
from Handler impo... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env cctools_python
# CCTOOLS_PYTHON_VERSION 2.7 2.6
# Copyright (c) 2010- The University of Notre Dame.
# This software is distributed under the GNU General Public License.
# See the file COPYING for details.
from prune import client
from os.path import expanduser
HOME = expanduser("~")
prune = client.Con... | unknown | codeparrot/codeparrot-clean | ||
#ifndef BUNDLE_URI_H
#define BUNDLE_URI_H
#include "hashmap.h"
#include "strbuf.h"
struct packet_reader;
struct repository;
struct string_list;
/**
* The remote_bundle_info struct contains information for a single bundle
* URI. This may be initialized simply by a given URI or might have
* additional metadata asso... | c | github | https://github.com/git/git | bundle-uri.h |
# 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.
"""Top-level presubmit script for Chromium.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presu... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/fsl,imx93-anatop.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP i.MX93 ANATOP Clock Module
maintainers:
- Peng Fan <peng.fan@nxp.com>
description: |
NXP i.MX93 ANATOP module w... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/clock/fsl,imx93-anatop.yaml |
# -*- 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 2012 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 a... | unknown | codeparrot/codeparrot-clean | ||
import { flushSync } from 'svelte';
import { test } from '../../test';
// https://github.com/sveltejs/svelte/issues/6112
export default test({
test({ assert, target, component, window }) {
let inputs = target.querySelectorAll('input');
/** @param {Set<number>} set */
const check = (set) => {
for (let i = 0;... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/binding-input-group-each-11/_config.js |
#!/usr/bin/env python
# Copyright (c) 2009 Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""psutil is a cross-platform library for retrieving information on
running processes and system utilization (CPU, memory, disks, net... | unknown | codeparrot/codeparrot-clean | ||
//go:build !windows
/*
Copyright 2023 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 a... | go | github | https://github.com/kubernetes/kubernetes | pkg/probe/dialer_others.go |
import { test } from '../../test';
import { unmount } from 'svelte';
export default test({
test({ component }) {
unmount(component.l1);
},
warnings: ['Tried to unmount a component that was not mounted']
}); | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/component-nested-deep/_config.js |
from django.dispatch import receiver
from hs_core.signals import pre_add_files_to_resource, pre_check_bag_flag, pre_download_file
from hs_core.hydroshare.utils import set_dirty_bag_flag
from hs_collection_resource.models import CollectionResource
from hs_collection_resource.utils import update_collection_list_csv
@r... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# 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 appli... | unknown | codeparrot/codeparrot-clean | ||
use std::fmt;
use std::num::NonZero;
use rustc_abi::{HasDataLayout, Size};
use rustc_data_structures::static_assert_size;
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
use super::AllocId;
////////////////////////////////////////////////////////////////////////////////
// Pointer arithmetic
//////////////... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_middle/src/mir/interpret/pointer.rs |
/*
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package ktorbuild.internal
import ktorbuild.KtorBuildExtension
import org.gradle.api.Project
import org.gradle.api.plugins.JavaPluginExtension
import org.gradle.kotlin.dsl.getByType
import or... | kotlin | github | https://github.com/ktorio/ktor | build-logic/src/main/kotlin/ktorbuild/internal/Accessors.kt |
/* To learn more about this file see: https://angular.io/guide/typescript-configuration. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromI... | json | github | https://github.com/angular/angular | integration/platform-server-zoneless/tsconfig.json |
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# 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 res... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2021, NVIDIA CORPORATION. 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 applic... | unknown | codeparrot/codeparrot-clean | ||
## Command Line Interface Tutorials
* [Command Line Inputs](#command-line-inputs)
* [Start `tfprof`](#start-tfprof)
* [Examples](#examples)
* [Profile Python Time](#profile-python-time)
* [Profile Graph Time](#profile-graph-time)
* [Profile Checkpoint Value](#profile-checkpoint-value)
* [Profile Model Paramete... | unknown | github | https://github.com/tensorflow/tensorflow | tensorflow/core/profiler/g3doc/command_line.md |
// errorcheck
// Copyright 2009 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.
// Verify that method redeclarations are caught by the compiler.
// Does not compile.
package main
type T struct{}
func (t *T) M(int, string) ... | go | github | https://github.com/golang/go | test/method1.go |
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// ... | c | github | https://github.com/opencv/opencv | 3rdparty/protobuf/src/google/protobuf/arena.h |
<?php declare(strict_types=1);
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Test\Co... | php | github | https://github.com/composer/composer | tests/Composer/Test/Command/RemoveCommandTest.php |
#!/usr/bin/env python
try:
import lxml.etree as et
except ImportError, e:
import sys
print >> sys.stderr, "ERR: %s." % e
sys.exit(5)
import sys, os.path, optparse, itertools
SHORT_DESCRIPTION = "An XPath file finder for XML files."
__doc__ = SHORT_DESCRIPTION + '''
Evaluates an XPath expression aga... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015-2017 Cisco Systems, 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 req... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package rpcapi
import (
"context"
"fmt"
"io"
"log"
"sync"
"github.com/hashicorp/go-plugin"
"github.com/hashicorp/terraform-svchost/disco"
"github.com/hashicorp/terraform/internal/pluginshared"
"github.com/hashicorp/terraform/internal/rpc... | go | github | https://github.com/hashicorp/terraform | internal/rpcapi/stacks_grpc_client.go |
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2020, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# 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.
"""
Utilities for the modular DevTools build.
"""
from os import path
import os
try:
import simplejson as json
except ImportErr... | unknown | codeparrot/codeparrot-clean | ||
"""
This module converts requested URLs to callback view functions.
RegexURLResolver is the main class here. Its resolve() method takes a URL (as
a string) and returns a tuple in this format:
(view_function, function_args, function_kwargs)
"""
from __future__ import unicode_literals
import functools
import re
im... | unknown | codeparrot/codeparrot-clean | ||
/* auto-generated on 2025-12-17 20:32:36 -0500. version 4.2.4 Do not edit! */
/* including simdjson.h: */
/* begin file simdjson.h */
#ifndef SIMDJSON_H
#define SIMDJSON_H
/**
* @mainpage
*
* Check the [README.md](https://github.com/simdjson/simdjson/blob/master/README.md#simdjson--parsing-gigabytes-of-json-per-se... | c | github | https://github.com/nodejs/node | deps/simdjson/simdjson.h |
# -*- coding: utf-8 -*-
#
# foundation documentation build configuration file, created by
# sphinx-quickstart.
#
# 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.
#
# All configuration values hav... | unknown | codeparrot/codeparrot-clean | ||
import binascii
from . import ecdsa
from . import der
from . import rfc6979
from .curves import NIST192p, find_curve
from .util import string_to_number, number_to_string, randrange
from .util import sigencode_string, sigdecode_string
from .util import oid_ecPublicKey, encoded_oid_ecPublicKey
from .six import PY3, b
fr... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.uic import *
from blur.Stone import *
from blur.Classes import *
from blur.absubmit import *
import sys, os, traceback, re
class SyncSubmitter:
def __init__(self):
self.bytes = 0
self.filePaths = QStringList()
self.projectName = ... | unknown | codeparrot/codeparrot-clean | ||
'''
Implementation of Bitcoin's p2p protocol
'''
import random
import sys
import time
from twisted.internet import protocol
import p2pool
from . import data as bitcoin_data
from p2pool.util import deferral, p2protocol, pack, variable
class Protocol(p2protocol.Protocol):
def __init__(self, net):
p2protoc... | unknown | codeparrot/codeparrot-clean | ||
'use strict';
const common = require('../common');
const fs = require('fs');
const tmpdir = require('../../test/common/tmpdir');
tmpdir.refresh();
const bench = common.createBenchmark(main, {
type: ['existing', 'non-existing'],
n: [1e5],
});
function runBench({ n, path }) {
for (let i = 0; i < n; i++) {
tr... | javascript | github | https://github.com/nodejs/node | benchmark/fs/bench-openSync.js |
# Copyright (c) 2005 Divmod, Inc.
# Copyright (c) 2007 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for Twisted plugin system.
"""
import sys, errno, os, time
import compileall
from zope.interface import Interface
from twisted.trial import unittest
from twisted.python.filepath import FilePath
f... | unknown | codeparrot/codeparrot-clean | ||
"""
Radio driver for the AT86RF215, for the rPi 3.
Connections
| rPi pin | ATREB215-XPRO Extension Board pin |
|---------|-----------------------------------|
| 01- +3V | 20 - VCC |
| 11- | 09 - IRQ |
| 09- GND | 19 - GND |
| 19- | 16... | unknown | codeparrot/codeparrot-clean | ||
'use strict'
var express = require('../')
, request = require('supertest');
describe('req', function(){
describe('.fresh', function(){
it('should return true when the resource is not modified', function(done){
var app = express();
var etag = '"12345"';
app.use(function(req, res){
re... | javascript | github | https://github.com/expressjs/express | test/req.fresh.js |
#!/usr/bin/env bash
set -eux
ansible-playbook test_include_file_noop.yml -i inventory "$@"
ansible-playbook task_action_templating.yml -i inventory "$@"
ansible-playbook task_templated_run_once.yml -i inventory "$@" | unknown | github | https://github.com/ansible/ansible | test/integration/targets/strategy_linear/runme.sh |
#!/usr/bin/python
#
# Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.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_version': '1.1',
... | 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 u... | python | github | https://github.com/apache/airflow | airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_backfills.py |
---
setup:
- do:
something:
here: "ok"
---
teardown:
- do:
something_else:
here: true
---
First test:
- do:
something:
that_is: true
- do:
and: "again"
- match:
copied.from.real.test.total: 1
- match:
hits.hits.0._index: "single_doc_index"
- matc... | unknown | github | https://github.com/elastic/elasticsearch | build-tools-internal/src/test/resources/rest/transform/match/match_transformed.yml |
import unittest
from . import load_tests
unittest.main() | python | github | https://github.com/python/cpython | Lib/test/test_peg_generator/__main__.py |
//===--- ArgumentCompletion.h -----------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt ... | c | github | https://github.com/apple/swift | include/swift/IDE/ArgumentCompletion.h |
# -*- coding: utf8 -*-
import numpy
from .. import utils, deflation, linsys
from . import factories, evaluators
class _RecyclingSolver(object):
'''Base class for recycling solvers.'''
def __init__(self, DeflatedSolver,
vector_factory=None
):
'''Initialize recycling sol... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2021 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 cgotest
/*
typedef void *HANDLE;
struct HWND__{int unused;}; typedef struct HWND__ *HWND;
*/
import "C"
import (
"testing"
"unsafe"
)
func test420... | go | github | https://github.com/golang/go | src/cmd/cgo/internal/test/issue42018_windows.go |
# -*- coding: UTF-8 -*-
# Copyright (C) 2002, 2006-2011 J. David Ibáñez <jdavid.ibp@gmail.com>
# Copyright (C) 2004 Thierry Fromon <from.t@free.fr>
# Copyright (C) 2008 Romain Gauthier <romain.gauthier@itaapy.com>
# Copyright (C) 2010 Hervé Cauwelier <herve@oursours.net>
#
# This program is free software: you can redis... | unknown | codeparrot/codeparrot-clean | ||
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.zapier.toolkit import ZapierToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handl... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/langchain_classic/agents/agent_toolkits/zapier/toolkit.py |
# Unix SMB/CIFS implementation.
# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
#
# 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) a... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# This file is part of sensim
"""Helpers for sentence semantic similarity model.
.. Author:: Hussein AL-NATSHEH <hussein.al-natsheh@ish-lyon.cnrs.fr>
"""
"""Helper functions."""
from .util import get_text
from .util import group_by_sentence
from .util import to_numeric
from .util import s... | unknown | codeparrot/codeparrot-clean | ||
import { QueryKey, useQuery, useSuspenseQuery } from "@tanstack/react-query";
import { useSettings } from "../state/settingsSlice";
export const API_PATH = "api/v1";
export type SuccessAPIResponse<T> = {
status: "success";
data: T;
warnings?: string[];
infos?: string[];
};
export type ErrorAPIResponse = {
... | typescript | github | https://github.com/prometheus/prometheus | web/ui/mantine-ui/src/api/api.ts |
from django.apps import AppConfig as BaseConfig
class AppConfig(BaseConfig):
name = 'nodeshot.community.participation'
def ready(self):
""" Add user info to ExtensibleNodeSerializer """
from nodeshot.core.nodes.base import ExtensibleNodeSerializer
from .models import Vote
from ... | unknown | codeparrot/codeparrot-clean | ||
# -----------------------------------------------------------------------------
# lex_optimize3.py
#
# Writes table in a subdirectory structure.
# -----------------------------------------------------------------------------
import sys
if ".." not in sys.path: sys.path.insert(0,"..")
import ply.lex as lex
tokens = (
... | 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/test/java/org/apache/hadoop/ipc/TestDecayRpcScheduler.java |
#!/usr/bin/env python3
from pathlib import Path
import argh
import xml.etree.ElementTree as ET
import json
import sys
import itertools
def always_applies_for(eliter, predicate):
seen_tags = set()
not_matching = set()
for el in eliter:
seen_tags.add(el.tag)
if not predicate(el):
not_matching.add(el.tag)
r... | unknown | codeparrot/codeparrot-clean | ||
/*
Copyright 2020 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/controller/nodeipam/ipam/cidrset/metrics.go |
<!---
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | unknown | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/site/markdown/release/2.7.7/CHANGELOG.2.7.7.md |
/*
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.client.webrtc
import web.rtc.RTCPeerConnection
public external interface JsPeerConnectionConfig
public class JsWebRtcEngineConfig : WebRtcConfig()
/**
* Common WebRtc Engi... | kotlin | github | https://github.com/ktorio/ktor | ktor-client/ktor-client-webrtc/web/src/io/ktor/client/webrtc/Engine.kt |
"""Ruff linter support module."""
from . import base
class RuffChecker(base.LinterBase):
"""Ruff linter."""
def __init__(self):
# type: () -> None
"""Create a Ruff linter."""
super(RuffChecker, self).__init__("ruff", "0.4.4")
def get_lint_version_cmd_args(self) -> list[str]:
... | python | github | https://github.com/mongodb/mongo | buildscripts/linter/ruffchecker.py |
# -*- 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 model 'ModelWithInheritance'
db.create_table('inheritance_modelwithinheritance', (
('id'... | unknown | codeparrot/codeparrot-clean | ||
import gc
import io
import os
import sys
import signal
import weakref
import unittest
from test import support
@unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
@unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
class TestBreak(unittest.TestCase):
int_handler = None
# This... | python | github | https://github.com/python/cpython | Lib/test/test_unittest/test_break.py |
''' Simplify modulo computation based on index'''
from pythran.analyses import UseDefChains, Ancestors, Aliases, RangeValues
from pythran.analyses import Identifiers
from pythran.passmanager import Transformation
from pythran.tables import MODULES
import gast as ast
from copy import deepcopy
class ModIndex(Transform... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
import sys
import os
import shutil
import unittest
import mvtools_test_fixture
import create_and_write_file
import path_utils
import pakgen
import tar_wrapper
class PakGenTest(unittest.TestCase):
def setUp(self):
v, r = self.delegate_setUp()
if not v:
self.tea... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2009 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 | ||
#!/usr/bin/env python
'''Post a message to twitter'''
__author__ = 'dewitt@google.com'
import ConfigParser
import getopt
import os
import sys
import twitter
USAGE = '''Usage: tweet [options] message
This script posts a message to Twitter.
Options:
-h --help : print this help
--consumer-key : the twit... | unknown | codeparrot/codeparrot-clean | ||
package bytespipe
import (
"errors"
"io"
"sync"
)
// maxCap is the highest capacity to use in byte slices that buffer data.
const maxCap = 1e6
// minCap is the lowest capacity to use in byte slices that buffer data
const minCap = 64
// blockThreshold is the minimum number of bytes in the buffer which will cause
... | go | github | https://github.com/moby/moby | daemon/internal/stream/bytespipe/bytespipe.go |
#!/usr/bin/python
#
# 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 b... | unknown | codeparrot/codeparrot-clean | ||
from resources.lib.libraries.js2py.base import *
RADIX_CHARS = {'1': 1, '0': 0, '3': 3, '2': 2, '5': 5, '4': 4, '7': 7, '6': 6, '9': 9, '8': 8, 'a': 10, 'c': 12,
'b': 11, 'e': 14, 'd': 13, 'g': 16, 'f': 15, 'i': 18, 'h': 17, 'k': 20, 'j': 19, 'm': 22, 'l': 21,
'o': 24, 'n': 23, 'q': 26, '... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# coding=utf-8
################################################################################
from test import CollectorTestCase
from test import get_collector_config
from test import run_only
from test import unittest
from mock import patch
from pgbouncer import PgbouncerCollector
##############... | unknown | codeparrot/codeparrot-clean | ||
import unittest
import ctypes
try:
ctypes.c_wchar
except AttributeError:
pass
else:
import _ctypes_test
class UnicodeTestCase(unittest.TestCase):
def test_wcslen(self):
dll = ctypes.CDLL(_ctypes_test.__file__)
wcslen = dll.my_wcslen
wcslen.argtypes = [ctypes... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python2.4
#
# Copyright 2011 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 require... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# This file is part of VoltDB.
# Copyright (C) 2008-2014 VoltDB Inc.
#
# 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 limitati... | unknown | codeparrot/codeparrot-clean | ||
import os, re, sys, subprocess
import tarfile
from distutils import log, version
from contextlib import closing
from ftplib import FTP
try:
from urlparse import urljoin, unquote, urlparse
from urllib import urlretrieve, urlopen, urlcleanup
except ImportError:
from urllib.parse import urljoin, unquote, urlp... | unknown | codeparrot/codeparrot-clean | ||
import pytest
import numpy as np
from numpy.testing import IS_WASM
pytestmark = pytest.mark.thread_unsafe(
reason="tests in this module are explicitly multi-processed"
)
def bool_array_writer(shm_name, n):
# writer routine for test_read_write_bool_array
import time
from multiprocessing import shared_... | python | github | https://github.com/numpy/numpy | numpy/_core/tests/test_multiprocessing.py |
#!/usr/bin/env bash
# Copyright 2025 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 applica... | unknown | github | https://github.com/kubernetes/kubernetes | hack/verify-deadcode-elimination.sh |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 20... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/zii,rave-sp.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Zodiac Inflight Innovations RAVE Supervisory Processor
maintainers:
- Frank Li <Frank.Li@nxp.com>
description:
RAVE Superv... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/mfd/zii,rave-sp.yaml |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: MPL-2.0
package api
import (
"context"
"net/http"
)
func (c *Sys) GenerateRootStatus() (*GenerateRootStatusResponse, error) {
return c.GenerateRootStatusWithContext(context.Background())
}
func (c *Sys) GenerateDROperationTokenStatus() (*GenerateRootS... | go | github | https://github.com/hashicorp/vault | api/sys_generate_root.go |
"""SCons.Tool.suncc
Tool-specific initialization for Sun Solaris (Forte) CC and cc.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons F... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2015 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... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.client.engine
import io.ktor.util.*
import io.ktor.utils.io.*
import kotlinx.atomicfu.*
import kotlinx.coroutines.*
import kotlin.coroutines.*
/**
* Abstract base implementa... | kotlin | github | https://github.com/ktorio/ktor | ktor-client/ktor-client-core/common/src/io/ktor/client/engine/HttpClientEngineBase.kt |
//===--- Serialization.h - Swiftmodule emission -----------------*- C++ -*-===//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt... | c | github | https://github.com/apple/swift | include/swift/Serialization/Serialization.h |
# -*- Python -*- vim: set syntax=python tabstop=4 expandtab cc=80:
"""
diff - A set of functions for diff-ing two symbol lists.
"""
from sym_check import util
def _symbol_difference(lhs, rhs):
lhs_names = set((n['name'] for n in lhs))
rhs_names = set((n['name'] for n in rhs))
diff_names = lhs_names - rhs_... | 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... | kotlin | github | https://github.com/spring-projects/spring-framework | framework-docs/src/main/kotlin/org/springframework/docs/testing/mockmvc/assertj/mockmvctestersetup/AccountControllerStandaloneTests.kt |
from __future__ import unicode_literals
from functools import partial
from django.contrib.admin.checks import InlineModelAdminChecks
from django.contrib.admin.options import InlineModelAdmin, flatten_fieldsets
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.forms impo... | unknown | codeparrot/codeparrot-clean | ||
#
# The Python Imaging Library.
# $Id$
#
# Basic McIdas support for PIL
#
# History:
# 1997-05-05 fl Created (8-bit images only)
# 2009-03-08 fl Added 16/32-bit support.
#
# Thanks to Richard Jones and Craig Swank for specs and samples.
#
# Copyright (c) Secret Labs AB 1997.
# Copyright (c) Fredrik Lundh 1997.
#
# Se... | unknown | codeparrot/codeparrot-clean | ||
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class ChainingTests(SimpleTestCase):
"""
Chaining safeness-preserving filters should not alter the safe status.
"""
@setup({'chaining01': '{{ a|capfirst|center:"7" }}.{{ b|capfirst|center:"7... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2alpha1",
"metadata": {
"name": "ivc5gfp",
"namespace": "stacks-5756",
"uid": "353905c9-661c-47af-89ac-a0e966c5b3c7",
"resourceVersion": "1764588557728998",
"generation": 1,
"creationTimestamp": "2025-12-01T11:29:17Z",
"label... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/v2beta1.tabs-with-nested-rows.v2alpha1.json |
{% extends "admin/base_site.html" %}
{% load i18n admin_urls static %}
{% block extrahead %}
{{ block.super }}
{{ media }}
<script src="{% static 'admin/js/cancel.js' %}" async></script>
{% endblock %}
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confi... | html | github | https://github.com/django/django | django/contrib/admin/templates/admin/delete_confirmation.html |
#!/usr/bin/env python
'''
Copyright (C) 2009 Aurelio A. Heckert, aurium (a) gmail dot com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any late... | unknown | codeparrot/codeparrot-clean | ||
import logging
_LOG_LEVEL_NOTSET = 'NOTSET'
def get_logger(logger_name):
return _LOGGING_MANAGER.get_logger(logger_name)
def get_log_manager():
return _LOGGING_MANAGER
class LoggingManager(object):
def __init__(self):
self._root_logger = logging.getLogger()
self._handlers = list()
... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/allwinner,sun6i-a31-isp.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner A31 Image Signal Processor Driver (ISP)
maintainers:
- Paul Kocialkowski <paul.kocialkowski@bootlin.com>
... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/media/allwinner,sun6i-a31-isp.yaml |
from unittest.mock import patch
from remote_host.public import RemoteHost
from migration_plan_parsing.public import MigrationPlanParser
from source.public import Source
from test_assets.public import TestAsset
from command.public import SourceCommand
from migration_commander.migration_commander import MigrationCo... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/local/bin/python
#CHIPSEC: Platform Security Assessment Framework
#Copyright (c) 2010-2015, Intel Corporation
#
#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; Version 2.
#
#This program is ... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.