code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
An unknown tool name was found in a scoped lint.
Erroneous code examples:
```compile_fail,E0710
#[allow(clipp::filter_map)] // error!
fn main() {
// business logic
}
```
```compile_fail,E0710
#[warn(clipp::filter_map)] // error!
fn main() {
// business logic
}
```
Please verify you didn't misspell the tool'... | unknown | github | https://github.com/rust-lang/rust | compiler/rustc_error_codes/src/error_codes/E0710.md |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, 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 | ||
# Copyright (c) 2013 Andreas Sandberg
# 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 fol... | unknown | codeparrot/codeparrot-clean | ||
"""SCons.Platform.win32
Platform-specific initialization for Win32 systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201... | unknown | codeparrot/codeparrot-clean | ||
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = "j F، Y"
TIME_FORMAT = "g:i A"
# DATETIME_FORMAT =
YEAR_MONTH_FORMAT = "F Y"
MONTH_DAY_FORMAT = "j F... | python | github | https://github.com/django/django | django/conf/locale/ar/formats.py |
#!/usr/bin/env python
#
# GrovePi Example for using the Grove Light Sensor and the LED together to turn the LED On and OFF if the background light is greater than a threshold.
# Modules:
# http://www.seeedstudio.com/wiki/Grove_-_Light_Sensor
# http://www.seeedstudio.com/wiki/Grove_-_LED_Socket_Kit
#
# The GrovePi con... | unknown | codeparrot/codeparrot-clean | ||
from MySQLdb.constants import FIELD_TYPE
from django.contrib.gis.gdal import OGRGeomType
from django.db.backends.mysql.introspection import DatabaseIntrospection
class MySQLIntrospection(DatabaseIntrospection):
# Updating the data_types_reverse dictionary with the appropriate
# type for Geometry fields.
d... | python | github | https://github.com/django/django | django/contrib/gis/db/backends/mysql/introspection.py |
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | typescript | github | https://github.com/apache/airflow | airflow-core/src/airflow/ui/src/queries/useGridStructure.ts |
## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 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
## Lic... | unknown | codeparrot/codeparrot-clean | ||
package client
import (
"context"
"encoding/json"
"net/url"
"strings"
"github.com/moby/moby/api/types/container"
)
// ContainerTopOptions defines options for container top operations.
type ContainerTopOptions struct {
Arguments []string
}
// ContainerTopResult represents the result of a ContainerTop operation... | go | github | https://github.com/moby/moby | client/container_top.go |
# mysql/pymysql.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: mysql+pymysql
:name: PyMySQL
:dbapi: pymysql
:connect... | unknown | codeparrot/codeparrot-clean | ||
import { ok, test } from '../../test';
export default test({
get props() {
return { foo: 42 };
},
html: `
<button>click me</button>
`,
test({ assert, target, window }) {
const button = target.querySelector('button');
ok(button);
const event = new window.MouseEvent('click', { bubbles: true });
/** ... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/event-handler-console-log/_config.js |
<?php
$container->loadFromExtension('framework', [
'web_link' => ['enabled' => true],
]); | php | github | https://github.com/symfony/symfony | src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/web_link.php |
# Copyright (C) 2009-2013 Wander Lairson Costa
#
# The following terms apply to all files associated
# with the software unless explicitly disclaimed in individual files.
#
# The authors hereby grant permission to use, copy, modify, distribute,
# and license this software and its documentation for any purpose, provided... | unknown | codeparrot/codeparrot-clean | ||
"""
IPython/Jupyter Notebook progressbar decorator for iterators.
Includes a default (x)range iterator printing to stderr.
Usage:
>>> from tqdm.notebook import trange[, tqdm]
>>> for i in trange(10): #same as: for i in tqdm(xrange(10))
... ...
"""
# future division is important to divide integers and get as
... | unknown | codeparrot/codeparrot-clean | ||
"""SCons.Tool.Packaging.src_tarxz
The tarxz SRC packager.
"""
#
# __COPYRIGHT__
#
# 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 rig... | unknown | codeparrot/codeparrot-clean | ||
# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
module Arel # :nodoc: all
module Expressions
def count(distinct = false)
Nodes::Count.new [self], distinct
end
def sum
Nodes::Sum.new [self]
end
def maximum
Nodes::Max.new [self]
end
def minimum
Nodes::Min.new [self]
end
de... | ruby | github | https://github.com/rails/rails | activerecord/lib/arel/expressions.rb |
"""
Utility function to facilitate testing.
"""
import os
import sys
import re
import operator
from nosetester import import_nose
__all__ = ['assert_equal', 'assert_almost_equal','assert_approx_equal',
'assert_array_equal', 'assert_array_less', 'assert_string_equal',
'assert_array_almost_equal',... | unknown | codeparrot/codeparrot-clean | ||
// Copyright The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... | go | github | https://github.com/prometheus/prometheus | discovery/consul/metrics.go |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: MPL-2.0
package logical
import (
"context"
"sync"
"github.com/hashicorp/vault/sdk/physical"
"github.com/hashicorp/vault/sdk/physical/inmem"
)
// InmemStorage implements Storage and stores all data in memory. It is
// basically a straight copy of phys... | go | github | https://github.com/hashicorp/vault | sdk/logical/storage_inmem.go |
from google.protobuf import text_format
from caffe_pb2 import *
import os.path as osp
import cgt
from cgt import nn
from cgt.core import infer_shape
import numpy as np
infile = "/Users/joschu/Src/caffe/examples/mnist/lenet.prototxt"
# infile = "/Users/joschu/Src/caffe/models/bvlc_googlenet/train_val.prototxt"
with ope... | 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/http/FilterContainer.java |
import os
from errno import EEXIST, EPERM
from unittest import TestCase
from mock import Mock, patch
from pulp.server.content.storage import mkdir, ContentStorage, FileStorage, SharedStorage
class TestMkdir(TestCase):
@patch('os.makedirs')
def test_succeeded(self, _mkdir):
path = 'path-123'
... | unknown | codeparrot/codeparrot-clean | ||
// This file is generated by Tools/cases_generator/opcode_id_generator.py
// from:
// Python/bytecodes.c
// Do not edit!
#ifndef Py_OPCODE_IDS_H
#define Py_OPCODE_IDS_H
#ifdef __cplusplus
extern "C" {
#endif
/* Instruction opcodes for compiled code */
#define CACHE 0
#define BINAR... | c | github | https://github.com/python/cpython | Include/opcode_ids.h |
"""Dense univariate polynomials with coefficients in Galois fields. """
from __future__ import print_function, division
from random import uniform
from math import ceil as _ceil, sqrt as _sqrt
from sympy.core.compatibility import SYMPY_INTS, range
from sympy.core.mul import prod
from sympy.polys.polyutils import _so... | unknown | codeparrot/codeparrot-clean | ||
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\... | c | github | https://github.com/curl/curl | lib/amigaos.c |
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Optional
from typing_extensions import Literal
import httpx
from .. import _legacy_response
from ..types import batch_list_params, batch_create_params
from .._types import Body... | python | github | https://github.com/openai/openai-python | src/openai/resources/batches.py |
# -*- coding: utf-8 -*-
# Copyright 2010 Dirk Holtwick, holtwick.it
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/commands.html
applies_to:
deployment:
self: ga
products:
- id: elasticsearch
---
# Command-line tools [commands]
{{es}} includes a set of command-line tools in its `bin` subdirectory (for example, `/usr/share/elasticsearch/b... | unknown | github | https://github.com/elastic/elasticsearch | docs/reference/elasticsearch/command-line-tools/index.md |
#! /usr/bin/env python2
"""
discovery-wrapper A small tool which wraps around discovery and tries to
guide the discovery process with a more modern approach with a
Queue and workers.
Based on the original version of poller-wrapper.py by Job Snijders
Author: Neil Lathwood <nei... | unknown | codeparrot/codeparrot-clean | ||
from chainer.functions.pooling import pooling_nd_kernel
class AveragePoolingNDKernelForward(pooling_nd_kernel.PoolingNDKernelForward):
def name(self):
# avg_pool_{N}d_fwd
return 'avg'
def in_params(self):
# 2D: raw T in, int32 d_0, int32 d_1, int32 out_0, int32 out_1,
# in... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
from setuptools import setup
install_requires = [
'agate>=0.10.0',
'numpy>=1.9.3'
]
setup(
name='agate-numpy',
version='0.1.0',
description='agate-numpy adds numpy table read/write support to agate.',
long_description=open('README').read(),
author='Christopher Grosko... | unknown | codeparrot/codeparrot-clean | ||
//// [tests/cases/conformance/async/es6/asyncGetter_es6.ts] ////
//// [asyncGetter_es6.ts]
class C {
async get foo() {
}
}
//// [asyncGetter_es6.js]
"use strict";
class C {
get foo() {
}
} | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/asyncGetter_es6.js |
#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Tests that a loadable_module target is built correctly.
"""
import TestGyp
import os
import struct
import sys
if sys.platform == 'dar... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/sh
test_description='split commit graph'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-chunk.sh
GIT_TEST_COMMIT_GRAPH=0
GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS=0
test_expect_success 'setup repo' '
git init &&
git config core.commitGraph true &&
git config gc.writeCommitGraph false &&
objdir=".git/objects" &&
info... | unknown | github | https://github.com/git/git | t/t5324-split-commit-graph.sh |
"""
For a given aws account, go through all un-attached volumes and tag them.
"""
import boto
import boto.utils
import argparse
import logging
import subprocess
import time
import os
from os.path import join, exists, isdir, islink, realpath, basename, dirname
import yaml
# needs to be pip installed
import netaddr
LO... | unknown | codeparrot/codeparrot-clean | ||
""" rewrite of lambdify - This stuff is not stable at all.
It is for internal use in the new plotting module.
It may (will! see the Q'n'A in the source) be rewritten.
It's completely self contained. Especially it does not use lambdarepr.
It does not aim to replace the current lambdify. Most importantly it will never... | unknown | codeparrot/codeparrot-clean | ||
"""clean-room implementation of a mysql client supporting both *connect* and *quit* operations"""
import datetime
import socket
import struct
import sys
import time
from hashlib import sha1
from . import compat
import tornado.gen
import tornado.iostream
def _sxor(lhs, rhs):
if sys.version_info > (3, 0):
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2009, 2010, 2011, 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
## ... | 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.network.tls.certificates
import io.ktor.network.tls.*
import io.ktor.network.tls.extensions.*
import io.ktor.utils.io.core.*
import kotlinx.io.Sink
import kotlinx.io.readByteA... | kotlin | github | https://github.com/ktorio/ktor | ktor-network/ktor-network-tls/ktor-network-tls-certificates/jvm/src/io/ktor/network/tls/certificates/Certificates.kt |
"""Class to support running various linters in a common framework."""
import logging
import os
import re
import site
import subprocess
import sys
import threading
from packaging.version import parse as parse_version
from . import base
def _check_version(linter, cmd_path, args):
# type: (base.LinterBase, List[st... | python | github | https://github.com/mongodb/mongo | buildscripts/linter/runner.py |
# Copyright (c) 2011-2012 OpenStack Foundation
# Copyright (c) 2012 Canonical Ltd
# Copyright (c) 2012 SUSE LINUX Products GmbH
# 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 o... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
#include <ngx_event_quic_connection.h>
#define NGX_QUIC_BUFFER_SIZE 4096
#define ngx_quic_buf_refs(b) (b)->shadow->num
#define ngx_quic_buf_inc_refs(b) ngx_quic_buf_refs(b)++
#define ngx_quic_buf_dec... | c | github | https://github.com/nginx/nginx | src/event/quic/ngx_event_quic_frames.c |
#ifndef RUBY_BACKWARD2_BOOL_H /*-*-C++-*-vi:se ft=cpp:*/
#define RUBY_BACKWARD2_BOOL_H
/**
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
* Permission is hereby granted, to either redistribu... | c | github | https://github.com/ruby/ruby | include/ruby/backward/2/bool.h |
/* Copyright 2024 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/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/iota.h |
/* MIT License
*
* Copyright (c) 2023 Brad House
*
* 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, ... | c | github | https://github.com/nodejs/node | deps/cares/src/lib/legacy/ares_parse_ns_reply.c |
#!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Dummy Socks5 server for testing."""
import socket
import threading
import queue
import logging
logger... | unknown | codeparrot/codeparrot-clean | ||
# (c) 2017, Red Hat, 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.
#
# Ansible is d... | python | github | https://github.com/ansible/ansible | lib/ansible/plugins/inventory/__init__.py |
# -*- coding: utf-8 -*-
# Copyright (C) 2012-2014:
# Thibault Cohen, thibault.cohen@savoirfairelinux.com
#
# This file is part of SNMP Booster Shinken Module.
#
# Shinken is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free ... | unknown | codeparrot/codeparrot-clean | ||
"""Stream-related things."""
__all__ = ['StreamReader', 'StreamWriter', 'StreamReaderProtocol',
'open_connection', 'start_server',
'IncompleteReadError',
]
import socket
if hasattr(socket, 'AF_UNIX'):
__all__.extend(['open_unix_connection', 'start_unix_server'])
from . import co... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import unittest
from odoo.tools import misc
class TestCountingStream(unittest.TestCase):
def test_empty_stream(self):
s = misc.CountingStream(iter([]))
self.assertEqual(s.index, -1)
self.ass... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2018 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 (C) 2008 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | java | github | https://github.com/google/guava | android/guava-testlib/src/com/google/common/collect/testing/testers/QueueRemoveTester.java |
"""
Functions used to help OG-USA configure to COMP
"""
try:
import boto3
except ImportError:
boto3 = None
import gzip
import pandas as pd
from taxcalc import Policy
from collections import defaultdict
TC_LAST_YEAR = Policy.LAST_BUDGET_YEAR
POLICY_SCHEMA = {
"labels": {
"year": {
"type... | unknown | codeparrot/codeparrot-clean | ||
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\PsrHttpMessage\ArgumentValueResolver;
use Psr\Http\Messa... | php | github | https://github.com/symfony/symfony | src/Symfony/Bridge/PsrHttpMessage/ArgumentValueResolver/PsrServerRequestResolver.php |
#!/usr/bin/env bash
# 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 applica... | unknown | github | https://github.com/kubernetes/kubernetes | cluster/addons/addon-manager/kube-addons-main.sh |
use serde_derive::Serialize;
#[derive(Serialize)]
enum Enum {
#[serde(serialize_with = "serialize_some_unit_variant")]
#[serde(skip_serializing)]
Unit,
}
fn main() {} | rust | github | https://github.com/serde-rs/serde | test_suite/tests/ui/with-variant/skip_ser_whole_variant.rs |
__author__ = 'bromix'
class AbstractContextUI(object):
def __init__(self):
pass
def create_progress_dialog(self, heading, text=None, background=False):
raise NotImplementedError()
def set_view_mode(self, view_mode):
raise NotImplementedError()
def get_view_mode(self):
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
import numpy as np
import scipy.special
from bokeh.layouts import gridplot
from bokeh.plotting import figure, show, output_file
p1 = figure(title="Normal Distribution (μ=0, σ=0.5)",tools="save",
background_fill_color="#E8DDCB")
mu, sigma = 0, 0.5
measured = np.random.normal(mu, ... | unknown | codeparrot/codeparrot-clean | ||
## Input
```javascript
// @enablePreserveExistingMemoizationGuarantees @validateRefAccessDuringRender
import {useCallback, useRef} from 'react';
function Component(props) {
const ref = useRef({inner: null});
const onChange = useCallback(event => {
// The ref should still be mutable here even though function ... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.useCallback-accesses-ref-mutated-later-via-function-preserve-memoization.expect.md |
from annotypes import Anno, add_call_types
from malcolm.core import PartRegistrar
from malcolm.modules import builtin, scanning
APartName = builtin.parts.APartName
AMri = builtin.parts.AMri
AInitialVisibility = builtin.parts.AInitialVisibility
with Anno("The demand value to move the axis to"):
ADemand = float
@... | unknown | codeparrot/codeparrot-clean | ||
# This file is part of DEAP.
#
# DEAP is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# DEAP is distributed ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals, division, absolute_import
import logging
from flexget import plugin
from flexget.entry import Entry
from flexget.event import event
from flexget.utils.cached_input import cached
try:
from flexget.plugins.api_rottentomatoes import lists
except ImportError:
raise... | unknown | codeparrot/codeparrot-clean | ||
"""
the diags_file contains the hits that dagchainer found, the all_file is the full list of blast hits.
this script goes through all of the hits in the dag file and adds any hit from the all_file that is within 'dist' of
any hit in the diag.
"""
from scipy.spatial import cKDTree
import numpy as np
import sys
from cdag... | unknown | codeparrot/codeparrot-clean | ||
"""
Digress's CLI interface.
"""
import inspect
import sys
from optparse import OptionParser
import textwrap
from types import MethodType
from digress import __version__ as version
def dispatchable(func):
"""
Mark a method as dispatchable.
"""
func.digress_dispatchable = True
return func
class... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# 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 i... | unknown | codeparrot/codeparrot-clean | ||
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("../Module").BuildMeta} BuildMeta */
/** @typedef {import("../javascript/JavascriptParser").JavascriptParserState} JavascriptParserState */
/** @type {WeakMap<JavascriptParserState, ... | javascript | github | https://github.com/webpack/webpack | lib/dependencies/DynamicExports.js |
"""
byceps.services.orga_presence.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import date, datetime
from itertools import groupby
from typing import Iterator, List, Sequence, Tuple
import pendulum
from pen... | unknown | codeparrot/codeparrot-clean | ||
from collections import deque
import unittest
class base_set:
def __init__(self, el):
self.el = el
class myset(base_set):
def __contains__(self, el):
return self.el == el
class seq(base_set):
def __getitem__(self, n):
return [self.el][n]
class TestContains(unittest.TestCase):
... | unknown | codeparrot/codeparrot-clean | ||
import unittest
import numpy as np
import six
import six.moves.cPickle as pickle
import chainer
from chainer import cuda
from chainer import functions as F
from chainer import testing
from chainer.testing import attr
if cuda.available:
cuda.init()
class MockFunction(chainer.Function):
def __init__(self, sh... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2018 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package cli
import (
"fmt"
"path/filepath"
"strings"
"testing"
"github.com/cockroachdb/cockroach/pkg/testutils"
"github.com/cockroachdb/cockroach/pkg/util/leakte... | go | github | https://github.com/cockroachdb/cockroach | pkg/cli/cli_debug_test.go |
#!/bin/env python
import os
from distutils.core import setup, Extension
if hasattr(os, 'uname'):
OSNAME = os.uname()[0]
else:
OSNAME = 'Windows'
define_macros = []
libraries = []
extra_link_args = []
extra_compile_args = ['-I../../../']
sources = ['rtaudiomodule.cpp', '../../../RtAudio.cpp']
if OSNAME == 'L... | unknown | codeparrot/codeparrot-clean | ||
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\... | c | github | https://github.com/curl/curl | lib/file.c |
#ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_VEC_UTILS_H
#define _NPY_SIMD_VEC_UTILS_H
// the following intrinsics may not some|all by zvector API on gcc/clang
#ifdef NPY_HAVE_VX
#ifndef vec_neg
#define vec_neg(a) (-(a)) // Vector Negate
#endif
#ifndef vec_add
... | c | github | https://github.com/numpy/numpy | numpy/_core/src/common/simd/vec/utils.h |
import sys
import os
import unittest
import platform
import subprocess
from test import support
class PlatformTest(unittest.TestCase):
def test_architecture(self):
res = platform.architecture()
@support.skip_unless_symlink
def test_architecture_via_symlink(self): # issue3762
# On Windows,... | unknown | codeparrot/codeparrot-clean | ||
"""main module with resize and validation functions"""
from __future__ import division
import math
import sys
from functools import wraps
from PIL import Image
from .imageexceptions import ImageSizeError
def validate(validator):
"""
Return a decorator that validates arguments with provided `validator`
fun... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/local/bin/ruby
k, a, b, a1, b1 = 2, 4, 1, 12, 4
loop do
# Next approximation
p, q, k = k*k, 2*k+1, k+1
a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
# Print common digits
d = a / b
d1 = a1 / b1
while d == d1
print d
$stdout.flush
a, a1 = 10*(a%b), 10*(a1%b1)
d, d1 = a/b, a1/b1
end
e... | ruby | github | https://github.com/ruby/ruby | sample/pi.rb |
# -*- coding: utf-8 -*-
#
# 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
... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: BSD-3-Clause
import inspect
import numpy as np
import pytest
from sklearn.base import clone, is_classifier
from sklearn.datasets import make_classification, make_low_rank_matrix, make_regression
from sklearn.linear_model import (
ARDRegression,
BayesianRidge,
ElasticNet,
El... | python | github | https://github.com/scikit-learn/scikit-learn | sklearn/linear_model/tests/test_common.py |
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights ... | unknown | codeparrot/codeparrot-clean | ||
from urllib.parse import urlencode
from xml.dom.minidom import parseString
from django.contrib.auth.decorators import login_required, permission_required
from django.core import mail
from django.forms import fields
from django.forms.forms import Form, ValidationError
from django.forms.formsets import BaseFormSet, form... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# ~*~ encoding: utf-8 ~*~
"""
This file is part of SOCSIM.
SOCSIM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) an... | unknown | codeparrot/codeparrot-clean | ||
Filesystem Component
====================
The Filesystem component provides basic utilities for the filesystem.
Resources
---------
* [Documentation](https://symfony.com/doc/current/components/filesystem.html)
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
* [Report issues](https://g... | unknown | github | https://github.com/composer/composer | tests/Composer/Test/Fixtures/functional/installed-versions2/vendor/symfony/filesystem/README.md |
#-------------------------------------------------------------------------------
# coding=utf8
# Name: 模块1
# Purpose:
#
# Author: zhx
#
# Created: 19/05/2016
# Copyright: (c) zhx 2016
# Licence: <your licence>
#-------------------------------------------------------------------------------
import... | 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-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/PackageLevelVisibleBean.java |
# Copyright 2020 Makani Technologies 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 | ||
/*
* 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-support/src/main/java/org/springframework/cache/jcache/interceptor/CachePutOperation.java |
/*
* 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.symbols.pointers
import org.jetbrains.kotlin.analysis.api.KaImpleme... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/symbols/pointers/KaSymbolPointer.kt |
import nodePath from "node:path";
type BlogPost = {
Component: React.ComponentType;
path: string;
title: string;
slug: string;
};
async function resolvePosts(): Promise<{
[slug: string]: () => Promise<BlogPost>;
}> {
const rawPosts = (await import.meta.glob("./*/*.mdx")) as Record<
string,
() => P... | typescript | github | https://github.com/remix-run/react-router | playground/rsc-vite-framework/app/routes/mdx-glob.$post/posts/posts.ts |
# -*- coding: utf-8 -*-
"""
jinja2.testsuite.inheritance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests the template inheritance feature.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import pytest
from jinja2 import Environment, DictLoader, TemplateError
LAYOUTTEM... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright 2020 Google 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.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri... | unknown | codeparrot/codeparrot-clean | ||
// Code generated by "stringer -type=Progress progress.go"; DO NOT EDIT.
package moduletest
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[Starting-0]
_ = x[Run... | go | github | https://github.com/hashicorp/terraform | internal/moduletest/progress_string.go |
__author__ = "Just van den Broecke"
__date__ = "Jan 9, 2012 3:46:27 PM$"
"""
Naam: bagattribuut.py
Omschrijving: Attributen voor BAG-objecten
Auteur: Just van den Broecke (Matthijs van der Deijl libbagextract.py origineel)
Datum: 9 mei 2012
OpenGeoGroep.nl
"""
from log import Log
from etre... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
from sys import exit
from test.http_test import HTTPTest
from test.base_test import HTTP, HTTPS
from misc.wget_file import WgetFile
import os
"""
This test ensures that Wget can download files from HTTPS Servers
"""
if os.getenv('SSL_TESTS') is None:
exit (77)
############# File Definit... | unknown | codeparrot/codeparrot-clean | ||
name: Lint GitHub Actions Workflows
on:
pull_request:
paths:
- '.github/**'
types: [opened, synchronize, reopened, ready_for_review]
# cancel existing runs of the same workflow on the same ref
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
... | unknown | github | https://github.com/hashicorp/vault | .github/workflows/actionlint.yml |
/*
* 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/main/java/org/apache/kafka/common/errors/TransactionAbortedException.java |
/*
* Copyright (c) 1999-2000 Image Power, Inc. and the University of
* British Columbia.
* Copyright (c) 2001-2003 Michael David Adams.
* All rights reserved.
*/
/* __START_OF_JASPER_LICENSE__
*
* JasPer License Version 2.0
*
* Copyright (c) 2001-2006 Michael David Adams
* Copyright (c) 1999-2000 Image Pow... | c | github | https://github.com/opencv/opencv | 3rdparty/libjasper/jpc_t2cod.c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.