code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#encoding: utf-8 import scrapy from scrapy.contrib.linkextractors import LinkExtractor from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.http import Request from pymongo import MongoClient db = MongoClient("yutao.yt:11060")["botify"] col = db["subject"] class YouzySpider(CrawlSpider): name = 'youzy...
unknown
codeparrot/codeparrot-clean
# $Id: fr.py 4564 2006-05-21 20:44:42Z wiemann $ # Authors: David Goodger <goodger@python.org>; William Dode # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/test/java/org/springframework/cache/interceptor/CachePutEvaluationTests.java
#!/usr/bin/env python # encoding: utf-8 from collections import OrderedDict import sys, os import waflib from waflib.Configure import conf _board_classes = {} _board = None class BoardMeta(type): def __init__(cls, name, bases, dct): super(BoardMeta, cls).__init__(name, bases, dct) if 'abstract'...
unknown
codeparrot/codeparrot-clean
from django.db import migrations, models def add_legacy_name(apps, schema_editor): alias = schema_editor.connection.alias ContentType = apps.get_model("contenttypes", "ContentType") for ct in ContentType.objects.using(alias): try: ct.name = apps.get_model(ct.app_label, ct.model)._meta.o...
python
github
https://github.com/django/django
django/contrib/contenttypes/migrations/0002_remove_content_type_name.py
# Copyright 2017 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
const someGlobal = true; export default function Component(props) { const {b} = props; const items = []; let i = 0; while (i < 10) { if (someGlobal) { items.push(<div key={i}>{b}</div>); i++; } } return <>{items}</>; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [{b: ...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-missing-dependency-if-within-while.js
/* * Copyright (C) 2007 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/IteratorTester.java
/* * PSA crypto layer on top of Mbed TLS crypto */ /* * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ #include "common.h" #if defined(MBEDTLS_PSA_CRYPTO_C) #include "psa/crypto.h" #include "psa_crypto_core.h" #include "psa_crypto_driver_wrappers_no_static.h...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/library/psa_crypto_slot_management.c
# -*- coding: utf-8 -*- from urlparse import urlsplit from openerp import api, fields, models class HrEquipmentConfigSettings(models.TransientModel): _name = 'hr.equipment.config.settings' _inherit = 'res.config.settings' equipment_alias_prefix = fields.Char('Use the following alias to report internal eq...
unknown
codeparrot/codeparrot-clean
import ast import sys import unittest funcdef = """\ def foo(): # type: () -> int pass def bar(): # type: () -> None pass """ asyncdef = """\ async def foo(): # type: () -> int return await bar() async def bar(): # type: () -> int return await bar() """ asyncvar = """\ async = 12 await = ...
python
github
https://github.com/python/cpython
Lib/test/test_type_comments.py
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
unknown
codeparrot/codeparrot-clean
// Copyright 2015 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 testing import ( "fmt" "reflect" "regexp" "strings" "unicode" ) func init() { testingTesting = true } // Verify that our IsSpace agrees with un...
go
github
https://github.com/golang/go
src/testing/match_test.go
// Copyright 2011 Google Inc. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the COPYING file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing project authors may // be...
c
github
https://github.com/opencv/opencv
3rdparty/libwebp/src/dec/alpha_dec.c
"""Test the JuiceNet config flow.""" from unittest.mock import MagicMock, patch import aiohttp from pyjuicenet import TokenError from homeassistant import config_entries, setup from homeassistant.components.juicenet.const import DOMAIN from homeassistant.const import CONF_ACCESS_TOKEN def _mock_juicenet_return_value...
unknown
codeparrot/codeparrot-clean
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + impo...
unknown
codeparrot/codeparrot-clean
from __future__ import division, absolute_import, print_function import sys import gzip import os import threading from tempfile import NamedTemporaryFile import time import warnings import gc from io import BytesIO from datetime import datetime import numpy as np import numpy.ma as ma from numpy.lib._iotools import ...
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.plugins import io.ktor.client.call.* import io.ktor.client.network.sockets.* import io.ktor.client.plugins.api.* import io.ktor.client.request.* import io.ktor.client.s...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-core/common/src/io/ktor/client/plugins/HttpRequestRetry.kt
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/main/java/org/springframework/context/config/MBeanExportBeanDefinitionParser.java
# # QAPI helper library # # Copyright IBM, Corp. 2011 # Copyright (c) 2013 Red Hat Inc. # # Authors: # Anthony Liguori <aliguori@us.ibm.com> # Markus Armbruster <armbru@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2. # See the COPYING file in the top-level directory. import re from o...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- $id: http://devicetree.org/schemas/net/brcm,iproc-mdio.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Broadcom iProc MDIO bus controller maintainers: - Rafał Miłecki <rafal@milecki.pl> allOf: - $ref: mdio.yaml# properties...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/net/brcm,iproc-mdio.yaml
""" For this example to work we need to have installed selenium, to do this just pip install selenium If you have firefox instaled and want to debug, you dont need to do anithing else. but if you have installed http://phantomjs.org/ you can do this headless. ###################################################...
unknown
codeparrot/codeparrot-clean
{ "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start" }, "dependencies": { "next": "latest", "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@types/node": "^18.0.4", "@types/react": "^18.0.15", "typescript": "^...
json
github
https://github.com/vercel/next.js
examples/with-service-worker/package.json
#STANFORD Load kinematic and dynamic data for Stanford arm # # Defines the object 'stanford' in the current workspace which describes the # kinematic and dynamic characterstics of the Stanford (Scheinman) arm. # # Kinematic data from "Modelling, Trajectory calculation and Servoing of # a computer controlled arm". Stan...
unknown
codeparrot/codeparrot-clean
''' Created on 14/06/2014 @author: nikolay ''' # ---------------------------------------------------------------------- # 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 # foll...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import datetime import re from django import forms from django.contrib.auth.forms import ( AuthenticationForm, PasswordChangeForm, PasswordResetForm, ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget, SetPasswordForm, UserChangeForm, UserCreationForm, ) from dja...
unknown
codeparrot/codeparrot-clean
//===--- Compilation.h - Compilation Task Data Structure --------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
c
github
https://github.com/apple/swift
include/swift/Driver/Compilation.h
import json import logging from celery.task import task from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore log = logging.getLogger('edx.celery.task') def _generate_course_structure(course_key): """ Generates a course structure dictionary for the specified course. ...
unknown
codeparrot/codeparrot-clean
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains th...
unknown
codeparrot/codeparrot-clean
import logging import pprint import signal import warnings from twisted.internet import defer from zope.interface.exceptions import DoesNotImplement try: # zope >= 5.0 only supports MultipleInvalid from zope.interface.exceptions import MultipleInvalid except ImportError: MultipleInvalid = None from zope....
unknown
codeparrot/codeparrot-clean
from django.forms.util import flatatt from django.utils.encoding import StrAndUnicode, force_unicode from django.utils.safestring import mark_safe class StarsRadioInput(StrAndUnicode): """ An object used by RadioFieldRenderer that represents a single <input type='radio'>. """ def __init__(self, na...
unknown
codeparrot/codeparrot-clean
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */ import { DEV } from 'esm-env'; import { get_descriptors, get_prototype_of, includes, index_of } from '../shared/utils.js'; import { destroy_block_effect_children, destroy_effect_children, effect_tracking, execute_effect_teardown } from './re...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/internal/client/runtime.js
## Input ```javascript import {useReducer} from 'react'; function Foo() { let [state, setState] = useReducer({foo: 1}); state.foo = 1; return state; } ``` ## Error ``` Found 1 error: Error: This value cannot be modified Modifying a value returned from 'useReducer()', which should not be modified directly. ...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.modify-useReducer-state.expect.md
//// [tests/cases/conformance/expressions/assignmentOperator/assignmentGenericLookupTypeNarrowing.ts] //// //// [assignmentGenericLookupTypeNarrowing.ts] // Repro from #26130 let mappedObject: {[K in "foo"]: null | {x: string}} = {foo: {x: "hello"}}; declare function foo<T>(x: T): null | T; function bar<K extends "f...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/assignmentGenericLookupTypeNarrowing.js
{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations \u0026 Alerts", "type": "dashb...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/testdata/output/single_version/v38.timeseries_table_display_mode.v38.json
test_kind: js_test description: | Suite for `featureFlagGetExecutorDeferredEngineChoice` coverage, which involves rewriting query executor creation logic. selector: roots: - jstests/aggregation/**/*.js exclude_files: - jstests/aggregation/extras/*.js - jstests/aggregation/data/*.js # TODO SERVER...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/query_get_exec_deferred_engine_choice_aggregation_passthrough.yml
#!/usr/bin/env python # dominfo - print some information about a domain import libvirt import sys import os import libxml2 import pdb def usage(): print 'Usage: %s DOMAIN' % sys.argv[0] print ' Print information about the domain DOMAIN' def print_section(title): print "\n%s" % title print "=" * 6...
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...
python
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/tests/fake_quant_ops_test.py
# Magic utility that "redirects" to pywintypesxx.dll import imp, sys, os def __import_pywin32_system_module__(modname, globs): # This has been through a number of iterations. The problem: how to # locate pywintypesXX.dll when it may be in a number of places, and how # to avoid ever loading it twice. This ...
unknown
codeparrot/codeparrot-clean
import sys import time import logging import datetime from django.db import transaction from django.utils import timezone from framework.celery_tasks import app as celery_app from website.app import setup_django setup_django() from osf.models import Session from scripts.utils import add_file_logger logger = logging...
unknown
codeparrot/codeparrot-clean
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP862.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 OpenStack Foundation # 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 requ...
unknown
codeparrot/codeparrot-clean
// // (C) Copyright Jeremy Siek 2000. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Revision History: // // 17 July 2001: Added const to some member functions. (Jeremy Siek) // 05 May 2001: Removed...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/concept_archetype.hpp
# Copyright 2011 Justin Santa Barbara # 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 requ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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 l...
unknown
codeparrot/codeparrot-clean
from django.test import TestCase, override_settings from django.utils import timezone from django.core.urlresolvers import reverse from django.contrib.auth.models import ( BaseUserManager, AbstractBaseUser ) import datetime from random import random from slave.models import Slave, SlaveManager, RaceDefaults from ...
unknown
codeparrot/codeparrot-clean
# 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 # d...
unknown
codeparrot/codeparrot-clean
{ "name": "@playground/framework-vite-7-beta", "version": "0.0.0", "private": true, "sideEffects": false, "type": "module", "scripts": { "build": "react-router build", "dev": "react-router dev", "start": "react-router-serve ./build/server/index.js", "typecheck": "react-router typegen && tsc"...
json
github
https://github.com/remix-run/react-router
playground/framework-vite-7-beta/package.json
"""Stuff to parse WAVE files. Usage. Reading WAVE files: f = wave.open(file, 'r') where file is either the name of a file or an open file pointer. The open file pointer must have methods read(), seek(), and close(). When the setpos() and rewind() methods are not used, the seek() method is not necessary. This ...
unknown
codeparrot/codeparrot-clean
// RUN: %check_clang_tidy %s cppcoreguidelines-pro-type-member-init,hicpp-member-init,modernize-use-emplace,hicpp-use-emplace %t namespace std { template <typename T> class vector { public: void push_back(const T &) {} void push_back(T &&) {} template <typename... Args> void emplace_back(Args &&... args){}; ...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/infrastructure/duplicate-fixes-of-alias-checkers.cpp
<?php namespace Illuminate\Foundation\Console; use Dotenv\Parser\Lines; use Exception; use Illuminate\Console\Command; use Illuminate\Encryption\Encrypter; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Str; use Symfony\Component\Console\Attribute\AsCommand; use function Laravel\Prompts\password; use f...
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/Console/EnvironmentEncryptCommand.php
from . import ProxyTerminus from flask import Flask from flask import request from flask import make_response import urllib2 import socket import json import threading import datetime import ssl import logging log = logging.getLogger('werkzeug') log.setLevel(logging.ERROR) network_times = open('times', 'w') network_...
unknown
codeparrot/codeparrot-clean
/* 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/apis/authentication/v1beta1/register.go
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. // Copyright (C) 2025, SpaceMIT Inc., all rights reserved. #include "rvv_hal.hpp" #include "common.hpp" namespace cv { ...
cpp
github
https://github.com/opencv/opencv
hal/riscv-rvv/src/imgproc/canny.cpp
from django.core import checks from django.core.checks import Error from django.test import SimpleTestCase from django.test.utils import isolate_apps, override_settings, override_system_checks @isolate_apps("check_framework.custom_commands_app", attr_name="apps") @override_settings(INSTALLED_APPS=["check_framework.cus...
python
github
https://github.com/django/django
tests/check_framework/test_commands.py
# Tooltip component for Pyjamas # Ported by Willie Gollino from Tooltip component for GWT - Originally by Alexei Sokolov http://gwt.components.googlepages.com/ # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> from PopupPanel import PopupPanel from pyjamas import Factory from HTML import HTML from Root...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import parse_duration class RtlXlIE(InfoExtractor): IE_NAME = 'rtlxl.nl' _VALID_URL = r'https?://www\.rtlxl\.nl/#!/[^/]+/(?P<uuid>[^/?]+)' _TEST = { 'url': 'http://www.rtlxl.nl/#!/rtl-nieuws-132237/6...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional from typing_extensions import Literal from ....._models import BaseModel __all__ = ["FunctionToolCallDelta", "Function"] class Function(BaseModel): """The definition of the function that was called....
python
github
https://github.com/openai/openai-python
src/openai/types/beta/threads/runs/function_tool_call_delta.py
//===- bolt/Passes/DataflowInfoManager.h ------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
bolt/include/bolt/Passes/DataflowInfoManager.h
#### Note: this error code is no longer emitted by the compiler. Return type involving a trait did not require `'static` lifetime. Erroneous code examples: ```compile_fail use std::fmt::Debug; fn foo(x: &i32) -> impl Debug { // error! x } fn bar(x: &i32) -> Box<dyn Debug> { // error! Box::new(x) } ``` Add...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0759.md
import pickle, os import thorpy from PyWorld2D.mapobjects.objects import MapObject def ask_save(me): choice = thorpy.launch_binary_choice("Do you want to save this map ?") default_fn = me.get_fn().replace(".map","") if choice: fn = thorpy.get_user_text("Filename", default_fn, size=(me.W//2,40)) ...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 """Tests for IPython.utils.module_paths.py""" #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part o...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/PE/LoadConfigurations/DynamicRelocation/DynamicFixupUnknown.hpp
/* * This is a PRIVATE INTERNAL NumPy header, intended to be used *ONLY* * by the iterator implementation code. All other internal NumPy code * should use the exposed iterator API. */ #ifndef NPY_ITERATOR_IMPLEMENTATION_CODE #error This header is intended for use ONLY by iterator implementation code. #endif #ifnde...
c
github
https://github.com/numpy/numpy
numpy/_core/src/multiarray/nditer_impl.h
/* * Copyright (C) 2006 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 agreed ...
java
github
https://github.com/google/guava
guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java
import os import inspect import yaml from pysellus import loader from pysellus.integrations import loaded_integrations, integration_classes CONFIGURATION_FILE_NAME = '.ps_integrations.yml' def load_integrations(path): """ load_integrations :: String -> IO Given a path, find the config file at it and lo...
unknown
codeparrot/codeparrot-clean
""" Pages in Django can are served up with custom HTTP headers containing useful information about those pages -- namely, the content type and object ID. This module contains utility functions for retrieving and doing interesting things with these special "X-Headers" (so called because the HTTP spec demands that custo...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """Utilities for advanced work and validation of xml data format .. module:: lib.data.xmlgen :platform: Unix :synopsis: Utilities for advanced work and validation of xml data format .. moduleauthor:: Petr Czaderna <pc@hydratk.org> """ from lxml import etree from hydratk.lib.system import...
unknown
codeparrot/codeparrot-clean
import io import pickle import logging from os import path from .. import lekvar from . import parser BUILTINS_FILE = "builtins.jm" BUILTINS_PATH = path.join(path.split(__file__)[0], BUILTINS_FILE) builtin_cache = None # Builtins uses the pickling module # to avoid parsing the builtin file more than once def built...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from hashlib import sha1 import logging import urllib import urlparse from odoo import api, fields, models, _ from odoo.addons.payment.models.payment_acquirer import ValidationError from odoo.addons.payment_buckaroo.controllers.main import BuckarooController from odoo.tools.float_utils import float_com...
unknown
codeparrot/codeparrot-clean
/* * Builtin "git tag" * * Copyright (c) 2007 Kristian Høgsberg <krh@redhat.com>, * Carlos Rica <jasampler@gmail.com> * Based on git-tag.sh and mktag.c by Linus Torvalds. */ #define USE_THE_REPOSITORY_VARIABLE #define DISABLE_SIGN_COMPARE_WARNINGS #include "builtin.h" #include "advice.h" #inc...
c
github
https://github.com/git/git
builtin/tag.c
# Copyright 2017 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
'use strict'; const common = require('../common'); const assert = require('assert'); const bench = common.createBenchmark(main, { n: [1e6], code: [ 'built-in', 'ERR_HTTP2_STREAM_SELF_DEPENDENCY', 'ERR_INVALID_STATE', 'ERR_INVALID_URL', ], stackTraceLimit: [0, 10], }, { flags: ['--expose-inte...
javascript
github
https://github.com/nodejs/node
benchmark/error/node-error-instantiation.js
# coding: utf-8 """ This filter based on Jesús Jerez <jerezmoreno@gmail.com> code [1]. [1] https://bitbucket.org/jhuss/webassets-libsass """ from __future__ import print_function from __future__ import absolute_import from webassets.filter import Filter __all__ = ('LibSass',) class LibSass(Filter): """Convert...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import os import imp import logging import platform import shutil import sys from stat import * from string import * from distutils.core import setup from distutils.extension import Extension from distutils.command import clean from distutils.sysconfig import get_python_lib logger = logging....
unknown
codeparrot/codeparrot-clean
# Tauri Bench <img align="right" src="https://github.com/tauri-apps/tauri/raw/dev/.github/icon.png" height="128" width="128"> [![status](https://img.shields.io/badge/Status-beta-green.svg)](https://github.com/tauri-apps/tauri) [![License](https://img.shields.io/badge/License-MIT%20or%20Apache%202-green.svg)](https:/...
unknown
github
https://github.com/tauri-apps/tauri
bench/README.md
/* Copyright 2020 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/tensorflow/transforms/lift_variables.h
#!/usr/bin/python """ Linkfix - a companion to sphinx's linkcheck builder. Uses the linkcheck's output file to fix links in docs. Originally created for this issue: https://github.com/scrapy/scrapy/issues/606 Author: dufferzafar """ import re import sys from pathlib import Path def main(): # Used for remembe...
python
github
https://github.com/scrapy/scrapy
docs/utils/linkfix.py
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {render, screen, fireEvent} from '@testing-library/react'; import * as React from 'react'; import {useState} from 'react'...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/e2e/use-state.e2e.js
from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.cache import cache class SessionStore(SessionBase): """ A cache-based session store. """ def __init__(self, session_key=None): self._cache = cache super(SessionStore, self).__init__(session_key) ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list ...
unknown
codeparrot/codeparrot-clean
name: PR comment GitHub CI on: issue_comment: types: - created branches-ignore: - main concurrency: group: ${{ github.workflow }}-${{ github.event.issue.number }}-${{ startsWith(github.event.comment.body, 'run-slow') || startsWith(github.event.comment.body, 'run slow') || startsWith(github.even...
unknown
github
https://github.com/huggingface/transformers
.github/workflows/self-comment-ci.yml
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # 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, modi...
unknown
codeparrot/codeparrot-clean
{ "name": "integration-vite-7-beta-template", "version": "0.0.0", "private": true, "sideEffects": false, "type": "module", "scripts": { "dev": "react-router dev", "build": "react-router build", "start": "react-router-serve ./build/server/index.js", "typecheck": "react-router typegen && tsc" ...
json
github
https://github.com/remix-run/react-router
integration/helpers/vite-7-beta-template/package.json
#!/usr/bin/env python # # Python-bindings file type test script # # Copyright (C) 2009-2021, Joachim Metz <joachim.metz@gmail.com> # # Refer to AUTHORS for acknowledgements. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as publishe...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # 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 distributed...
unknown
codeparrot/codeparrot-clean
import asyncio import contextvars import inspect import warnings from .case import TestCase __unittest = True class IsolatedAsyncioTestCase(TestCase): # Names intentionally have a long prefix # to reduce a chance of clashing with user-defined attributes # from inherited test case # # The class do...
python
github
https://github.com/python/cpython
Lib/unittest/async_case.py
# Copyright 2021 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. # Common logic shared by build/teamcity-support.sh and build/release/teamcity-support.sh. # Call this to clean up after using any other functions from this file. common_sup...
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity-common-support.sh
from __future__ import unicode_literals from django import forms from django.contrib.contenttypes.forms import generic_inlineformset_factory from django.contrib.contenttypes.models import ContentType from django.core.exceptions import FieldError from django.db.models import Q from django.test import SimpleTestCase, Te...
unknown
codeparrot/codeparrot-clean
package streamformatter import ( "bytes" "encoding/json" "errors" "strings" "testing" "github.com/google/go-cmp/cmp" "github.com/moby/moby/api/types/jsonstream" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) func TestRawProgressFormatterFormatStatus(t *testing.T) { sf := rawProgressFormatter{} ...
go
github
https://github.com/moby/moby
client/pkg/streamformatter/streamformatter_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 applica...
unknown
codeparrot/codeparrot-clean
from unittest import TestCase from unittest.mock import ( Mock, patch, ) from pypika import Field from fireant.database import Database from fireant.middleware.decorators import connection_middleware @connection_middleware def test_fetch(database, query, **kwargs): return kwargs.get('connection') def te...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # test_connection.py - unit test for connection attributes # # Copyright (C) 2008-2011 James Henstridge <james@jamesh.id.au> # # psycopg2 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 Foun...
unknown
codeparrot/codeparrot-clean
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. ```esql FROM employees | KEEP h* ``` | height:double | height.float:double | height.half_float:double | height.scaled_float:double | hire_date:date | | --- | --- | --- | --- | --- |
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/commands/examples/docs.csv-spec/keepWildcard.md
void f(); inline int g() { return 0; } template<typename T> void h(T t) {} template<> void h(int t) {} class A { public: void f(); };
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-move/Inputs/function_test.h
import { createImportTracker, ExportInfo, ExportKind, findModuleReferences, getExportInfo, getImportOrExportSymbol, ImportExport, ImportsResult, ImportTracker, ModuleReference, } from "./_namespaces/ts.FindAllReferences.js"; import { __String, addToSeen, append, A...
typescript
github
https://github.com/microsoft/TypeScript
src/services/findAllReferences.ts
#!/bin/bash set -e if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then echo "Incorrect \$TRAVIS_OS_NAME: expected windows, got $TRAVIS_OS_NAME" exit 1 fi $build_env autoconf $build_env ./configure $CONFIGURE_FLAGS # mingw32-make simply means "make", unrelated to mingw32 vs mingw64. # Simply disregard the prefix an...
unknown
github
https://github.com/redis/redis
deps/jemalloc/scripts/windows/before_script.sh
import sys import time import random from twisted.internet import fdesc from twisted.internet import reactor from twisted.internet import defer, abstract from scapy.config import conf from scapy.all import RandShort, IP, IPerror, ICMP, ICMPerror, TCP, TCPerror, UDP, UDPerror from ooni.errors import ProtocolNotRegister...
unknown
codeparrot/codeparrot-clean
from django.apps import apps from django.core import management from django.db.models import signals from django.test import TestCase from django.test.utils import override_system_checks from django.utils import six APP_CONFIG = apps.get_app_config('migrate_signals') PRE_MIGRATE_ARGS = ['app_config', 'verbosity', 'int...
unknown
codeparrot/codeparrot-clean
"""Base implementation of 0MQ authentication.""" # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import logging import zmq from zmq.utils import z85 from zmq.utils.strtypes import bytes, unicode, b, u from zmq.error import _check_version from .certs import load_certificat...
unknown
codeparrot/codeparrot-clean