code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard 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,...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/ambient/ambientEnumDeclaration2.ts] //// //// [ambientEnumDeclaration2.ts] // In ambient enum declarations that specify no const modifier, enum member declarations // that omit a value are considered computed members (as opposed to having auto- incremented values assigned). declare enum ...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/ambientEnumDeclaration2.js
""" Process validation data retrieved using fetch_validation_data.py. Two types of data are expected. A file at `validations/unlisted-addons.txt` that contains the guid of each unlisted addon and input on STDIN which has the validation JSON data for each validation to check. See fetch_validation_data.py for how this da...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import hs_core.models class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ('pages', '__first__'), migrations.swappable_de...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2013, 2014 Austin Clements # 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...
unknown
codeparrot/codeparrot-clean
# # alimaster/gui/simple_window.py # """ Defines a 'simple_window' which should be subclassed to a specific window. """ from tkinter import * # noqa from tkinter.ttk import * # noqa class SimpleWindow(): """ A Simple window which should be subclassed. This class is not tied to alimaster.app like the...
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 n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/serialization/BooleanDeserializer.java
# Copyright (c) 2006,2007,2008 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,...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # _ _ _ _____ _ _ _____ _ _ ___ ___ _ __ # /_\ | | |_ _| |_ (_)_ _ __ _ __|_ _|_ _| | |__ / __| \| |/ / # / _ \| | | | | | ' \| | ' \/ _` (_-< | |/ _` | | / / \__ \ |) | ' < # /_/ \_\_|_| |_| |_||_|_|_||_\__, /__/ |_|\__,_|_|_\_\ |___/___/|_|\_\ # ...
unknown
codeparrot/codeparrot-clean
""" Semi-Markov Spam Filter of Doom Filters spam, but not as well as other filters. Mostly intended as an experiment in the use of Markov chain-like objects for natural language analysis. Copyright (c) 2009 Matthew Croop Copyright (c) 2009 Albert Sun This program is free software: you can redistribute ...
unknown
codeparrot/codeparrot-clean
from unittest import mock from django.apps.registry import Apps, apps from django.contrib.contenttypes import management as contenttypes_management from django.contrib.contenttypes.models import ContentType from django.core.management import call_command from django.test import TestCase, modify_settings from django.te...
python
github
https://github.com/django/django
tests/contenttypes_tests/test_management.py
# Copyright (c) 2015, Javier Gonzalez # Copyright (c) 2015, the GPy Authors (see GPy AUTHORS.txt) # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np import time from ..util.general import best_value, reshape, spawn from ..core.optimization import lp_batch_optimization, random_batch_optimiza...
unknown
codeparrot/codeparrot-clean
# pyfc4 import copy import datetime import io import json import pdb import rdflib from rdflib.compare import to_isomorphic, graph_diff import rdflib_jsonld import requests import time from types import SimpleNamespace import uuid # logging import logging logger = logging.getLogger(__name__) logger.setLevel(logging.D...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012-2014, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np from ..core import GP from ..models import GPLVM from ..mappings import * class BCGPLVM(GPLVM): """ Back constrained Gaussian Process Latent Variable Model :param Y: ob...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Database\Eloquent\Casts; use Illuminate\Contracts\Database\Eloquent\Castable; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Support\Stringable; class AsStringable implements Castable { /** * Get the caster class to use when casting from / to this cast ...
php
github
https://github.com/laravel/framework
src/Illuminate/Database/Eloquent/Casts/AsStringable.php
#!/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 distribut...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os from gunicorn import six # Classes that can undo reading data from # a given type of data source. class Unreader(object): def __init__(self): self.buf = six.BytesIO() ...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
'use strict' // install redis first: // https://redis.io/ // then: // $ npm install redis online // $ redis-server /** * Module dependencies. */ var express = require('../..'); var online = require('online'); var redis = require('redis'); var db = redis.createClient(); // online online = online(db); // app va...
javascript
github
https://github.com/expressjs/express
examples/online/index.js
test_kind: js_test selector: roots: - jstests/core/**/*.js - jstests/fle2/**/*.js - src/mongo/db/modules/*/jstests/fle2/**/*.js exclude_files: ### Tests that are excluded because of initial sync (from replica_sets_initsync_jscore_passthrough.yml) # Tests that query the system.profile collection...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/replica_sets_uninitialized_fcv_jscore_passthrough.yml
from __future__ import print_function import argparse import torch.backends.cudnn as cudnn import torch.nn.functional as F import torch.optim as optim import torch.utils.data.distributed from torchvision import models import horovod.torch as hvd import timeit import numpy as np # Apex from apex import amp # Benchmark...
unknown
codeparrot/codeparrot-clean
import sys from mx.Stack import * def test(): s = Stack() print repr(s) s = Stack() for i in range(1000): s.push(i) while s: print s.pop(), # which could also be done as: s = StackFromSequence(range(1000)) while s: print s.pop(), # or a little differ...
unknown
codeparrot/codeparrot-clean
# Copyright IBM Corp. 2016 All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
unknown
codeparrot/codeparrot-clean
""" Support for Tellstick switches using Tellstick Net. This platform uses the Telldus Live online service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.tellduslive/ """ import logging from homeassistant.components.tellduslive import TelldusL...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- # This variable contains a path, which should point to the place # where the Virtual Machine images are stored. In the case of Virtual # Box, this will be the "Machines" folder, which under Windows is # often located under "c:/Users/<user_name>/.VirtualBox". Its exact...
unknown
codeparrot/codeparrot-clean
""" The MIT License (MIT) Copyright (c) 2014 Jozef van Eenbergen 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,...
unknown
codeparrot/codeparrot-clean
"""Support for Verisure binary sensors.""" from homeassistant.components.binary_sensor import ( DEVICE_CLASS_CONNECTIVITY, BinarySensorEntity, ) from . import CONF_DOOR_WINDOW, HUB as hub def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Verisure binary sensors.""" sen...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014 Hitachi Data 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 # # U...
unknown
codeparrot/codeparrot-clean
from feature_extraction.post_processing.regex.regex_lib import RegexLib import re import datetime import time import unicodedata from util.log import Log import math class EntityExtraction: regex_bin = None one_month = 86400 * 30 # unix time for 1 month month_dict = { 'janvier': 1, 'fevrie...
unknown
codeparrot/codeparrot-clean
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for various parts of L{twisted.web}. """ import os import zlib from zope.interface import implementer from zope.interface.verify import verifyObject from twisted.python import reflect from twisted.python.compat import _PY3 from twiste...
unknown
codeparrot/codeparrot-clean
import re import itertools from django.db import models from django.db.models.fields import FieldDoesNotExist from django.db.models.fields.related import ( ManyRelatedObjectsDescriptor, RelatedObject, ) from django.core.exceptions import ImproperlyConfigured from drf_nested_resource.compat import singular_no...
unknown
codeparrot/codeparrot-clean
# Official Colors The kubernetes logo has an official blue color. When reproducing the logo, please use the official color, when possible. ## Pantone When possible, the Pantone color is preferred for print material. The official Pantone color is *285C*. ## RGB When used digitally, the official RGB color code is ...
unknown
github
https://github.com/kubernetes/kubernetes
logo/colors.md
/* * 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/caffeine/CaffeineCache.java
kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: cluster-autoscaler labels: addonmanager.kubernetes.io/mode: Reconcile rules: # leader election - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["create"] - apiGroups: ["coordination.k8s.io"] resources:...
unknown
github
https://github.com/kubernetes/kubernetes
cluster/addons/rbac/cluster-autoscaler/cluster-autoscaler-rbac.yaml
""" homeassistant.components.sensor.neurio_energy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Monitors home energy use as measured by an neurio hub using its official API. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.neurio_energy/ """ import logging ...
unknown
codeparrot/codeparrot-clean
/* * src/bin/pg_dump/pg_backup_tar.h * * TAR Header (see "ustar interchange format" in POSIX 1003.1) * * Offset Length Contents * 0 100 bytes File name ('\0' terminated, 99 maximum length) * 100 8 bytes File mode (in octal ascii) * 108 8 bytes User ID (in octal ascii) * 116 8 bytes Group ID (in octa...
c
github
https://github.com/postgres/postgres
src/bin/pg_dump/pg_backup_tar.h
it("should load only used exports", async () => { await import("../statical-dynamic-import/dir1/a").then(({ default: defaultValue, usedExports }) => { expect(defaultValue).toBe(3); expect(usedExports).toEqual(["default", "usedExports"]); }) }); it("should get warning on using 'webpackExports' with statically ana...
javascript
github
https://github.com/webpack/webpack
test/cases/chunks/statical-dynamic-import-then-destructuring/index.js
import warnings import numpy as np import pandas as pd class Methods: params = ( ["DataFrame", "Series"], [("rolling", {"window": 10}), ("rolling", {"window": 1000}), ("expanding", {})], ["int", "float"], [ "median", "mean", "max", "...
python
github
https://github.com/pandas-dev/pandas
asv_bench/benchmarks/rolling.py
# Copyright: 2017, Ansible Project # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause ) from __future__ import annotations import collections.abc as c from ansible.module_utils._internal import _no_six from ansible.module_utils.common.text.converters import to_t...
python
github
https://github.com/ansible/ansible
lib/ansible/module_utils/parsing/convert_bool.py
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package vault import ( "context" "crypto/hmac" "encoding/base64" "errors" "fmt" "maps" "net/textproto" "os" paths "path" "slices" "strconv" "strings" "time" "github.com/armon/go-metrics" "github.com/golang/protobuf/proto" "github....
go
github
https://github.com/hashicorp/vault
vault/request_handling.go
<?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\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Contro...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/TransController.php
# -*- test-case-name: twisted.test.test_formmethod -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ Form-based method objects. This module contains support for descriptive method signatures that can be used to format methods. """ import calendar class FormException(Exception...
unknown
codeparrot/codeparrot-clean
# # Copyright (c) 2004 Conectiva, Inc. # # Written by Gustavo Niemeyer <niemeyer@conectiva.com> # # This file is part of Smart Package Manager. # # Smart Package Manager 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 Fou...
unknown
codeparrot/codeparrot-clean
# (c) 2013, Jayson Vantuyl <jayson@aggressive.ly> # (c) 2012-17 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ lookup: sequence author: Jayso...
unknown
codeparrot/codeparrot-clean
/* Copyright (C) 1995-2011, 2016 Mark Adler * Copyright (C) 2017 ARM Holdings Inc. * Authors: * Adenilson Cavalcanti <adenilson.cavalcanti@arm.com> * Adam Stylinski <kungfujesus06@gmail.com> * For conditions of distribution and use, see copyright notice in zlib.h */ #ifdef ARM_NEON #include "neon_intrins.h" #...
c
github
https://github.com/opencv/opencv
3rdparty/zlib-ng/arch/arm/adler32_neon.c
#!/usr/bin/env python # -*- coding: utf-8 -*- # # crawl.py - Greenlets-based Bitcoin network crawler. # # Copyright (c) Addy Yeow Chin Heng <ayeowch@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to de...
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 # distributed under ...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Diamond Light Source Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """Dalite XBlock utils.""" from lazy.lazy import lazy def _(text): # pylint: disable=invalid-name """ Make '_' a no-op so we can scrape strings. :return text """ return text # pylint: disable=protected-access class FieldValuesContextManager(object): """ Allow usi...
unknown
codeparrot/codeparrot-clean
//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc. //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) #ifndef BOOST_EXCEPTION_316FDA946C0D11DEA9CBAE5255D89593 #define BOOST_EXCEPTION_316FDA946C0D11DEA9...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/exception/all.hpp
import re import json import marshal import pickle import tempfile import unittest from io import BytesIO from datetime import datetime from warnings import catch_warnings, filterwarnings import lxml.etree from itemadapter import ItemAdapter from scrapy.item import Item, Field from scrapy.utils.python import to_unico...
unknown
codeparrot/codeparrot-clean
## ## P(icture)i(n)g(raphics) renderer ## from Renderer import Renderer from enigma import eVideoWidget, getDesktop from Screens.PictureInPicture import PipPigMode class Pig(Renderer): def __init__(self): Renderer.__init__(self) self.Position = self.Size = None self.hidePip = True GUI_WIDGET = eVideoWidget ...
unknown
codeparrot/codeparrot-clean
# 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. """Run the Chrome WebUI presubmit scripts on our test javascript. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more d...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from __future__ import print_function import re import ast import subprocess import sys DEBUG = False def version(version_file): _version_re = re.compile(r'__version__\s+=\s+(.*)') with open(version_file, 'rb') as f: ver = str(ast.literal_eval(_version_re.search( f.r...
unknown
codeparrot/codeparrot-clean
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2011 Michiel D. Nauta # # 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 op...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
unknown
codeparrot/codeparrot-clean
<docs-decorative-header title="Accordion"> </docs-decorative-header> <docs-pill-row> <docs-pill href="https://www.w3.org/WAI/ARIA/apg/patterns/accordion/" title="Accordion ARIA pattern"/> <docs-pill href="/api?query=accordion#angular_aria_accordion" title="Accordion API Reference"/> </docs-pill-row> ## Overview ...
unknown
github
https://github.com/angular/angular
adev/src/content/guide/aria/accordion.md
# 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/src/airflow/api_fastapi/core_api/security.py
# Copyright (c) 2013-2014 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 # # Un...
unknown
codeparrot/codeparrot-clean
export default function Page() { useLayoutEffect({ "Page.useLayoutEffect": ()=>{} }["Page.useLayoutEffect"]); useEffect({ "Page.useEffect": ()=>{} }["Page.useEffect"]); const onClick = useCallback({ "Page.useCallback[onClick]": ()=>[] }["Page.useCallback[onClick]"]); ...
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/debug-fn-name/export-default-decl/output.js
# -*- coding: utf-8 -*- """ Test for lms courseware app, module render unit """ import ddt import itertools import json from nose.plugins.attrib import attr from functools import partial from bson import ObjectId from django.http import Http404, HttpResponse from django.core.urlresolvers import reverse from django.con...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** i_gensig.py ----------- Date : March 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ***************************************...
unknown
codeparrot/codeparrot-clean
""" Selectors """ # top-level imports from scrapy.selector.unified import Selector, SelectorList __all__ = [ "Selector", "SelectorList", ]
python
github
https://github.com/scrapy/scrapy
scrapy/selector/__init__.py
// RUN: clang-reorder-fields -record-name Foo -fields-order e,x,pi,s2,s1 %s -- -std=c++11 | FileCheck %s class Foo { public: Foo(); private: int x; // CHECK: {{^ double e = 2.71;}} const char *s1; // CHECK-NEXT: {{^ int x;}} const char *s2; // CHECK-NEXT: {{^ double pi = 3.14;}} ...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-reorder-fields/ClassMixedInitialization.cpp
package daemon import ( "testing" containertypes "github.com/moby/moby/api/types/container" "github.com/moby/moby/v2/daemon/container" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) func TestGetInspectData(t *testing.T) { c := &container.Container{ ID: "inspect-me", HostConfig: &con...
go
github
https://github.com/moby/moby
daemon/inspect_test.go
""" Certificate service """ import logging from django.core.exceptions import ObjectDoesNotExist from lms.djangoapps.utils import _get_key from opaque_keys.edx.keys import CourseKey from .models import GeneratedCertificate log = logging.getLogger(__name__) class CertificateService(object): """ User Certific...
unknown
codeparrot/codeparrot-clean
//go:build !windows package main import ( "encoding/json" "strings" "testing" "time" "github.com/moby/moby/api/types/swarm" "github.com/moby/moby/v2/integration-cli/checker" "github.com/moby/moby/v2/internal/testutil" "gotest.tools/v3/assert" "gotest.tools/v3/poll" ) func (s *DockerSwarmSuite) TestSwarmVol...
go
github
https://github.com/moby/moby
integration-cli/docker_cli_swarm_unix_test.go
"""distutils.cygwinccompiler Provides the CygwinCCompiler class, a subclass of UnixCCompiler that handles the Cygwin port of the GNU C compiler to Windows. It also contains the Mingw32CCompiler class which handles the mingw32 port of GCC (same as cygwin in no-cygwin mode). """ # problems: # # * if you use a msvc com...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot/src/test/java/org/springframework/boot/SpringApplicationShutdownHookTests.java
import { EXAMPLE_TOOL_NAME, EXAMPLE_TOOL_URL } from "../lib/constants"; export default function Intro() { return ( <section className="flex-col md:flex-row flex items-center md:justify-between mt-16 mb-16 md:mb-12"> <h1 className="text-6xl md:text-8xl font-bold tracking-tighter leading-tight md:pr-8"> ...
typescript
github
https://github.com/vercel/next.js
examples/cms-enterspeed/components/intro.tsx
#[cfg(feature = "jvm-callback-support")] use alloc::boxed::Box; use core::ffi::c_void; #[cfg(feature = "jvm-callback-support")] use jni::{ objects::{GlobalRef, JObject}, sys::jlong, JNIEnv, }; /// Struct representing a callback from Rust into a foreign language /// /// This is largely used internally by th...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/diplomat-runtime/src/callback.rs
try: from enum import Enum except ImportError: # Use fallback package for python < 3.4 from flufl.enum import Enum from sqlalchemy import Column from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.orm import backref from sqlalchemy.orm import relationship from sqlalchemy.schema import Fore...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Liquid is a form management tool for web frameworks. Copyright (C) 2014, Bence Faludi (b.faludi@mito.hu) 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import copy import datetime import os import posixpath import subprocess import sys import unittest SCRIPT_DIR = os.path.dirname(o...
unknown
codeparrot/codeparrot-clean
The built-in function traits are generic over a tuple of the function arguments. If one uses angle-bracket notation (`Fn<(T,), Output=U>`) instead of parentheses (`Fn(T) -> U`) to denote the function trait, the type parameter should be a tuple. Otherwise function call notation cannot be used and the trait will not be i...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0059.md
# (c) 2013-2014, Benno Joy <benno@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later vers...
unknown
codeparrot/codeparrot-clean
import py import pytest from py._iniconfig import IniConfig, ParseError, __all__ as ALL from py._iniconfig import iscommentline from textwrap import dedent def pytest_generate_tests(metafunc): if 'input' in metafunc.funcargnames: for name, (input, expected) in check_tokens.items(): metafunc.add...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright 2011 Webdriver_name committers # Copyright 2011 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 ...
unknown
codeparrot/codeparrot-clean
# Copyright 2018 The HuggingFace Inc. team. # # 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 ...
python
github
https://github.com/huggingface/transformers
src/transformers/models/bert/convert_bert_original_tf_checkpoint_to_pytorch.py
#!/usr/bin/python # Copyright (c) 2018 Red Hat, 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', 'status': ['preview...
unknown
codeparrot/codeparrot-clean
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
unknown
codeparrot/codeparrot-clean
""" sentry.tasks.fetch_source ~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import itertools import logging import hashlib import re import urllib2 import zlib import base64 from os.path import splitext from colle...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector; use Symfony\Component\CssSelector\Parser...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/CssSelector/CssSelectorConverter.php
# Copyright 2014 The Oppia 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 ...
unknown
codeparrot/codeparrot-clean
import sys import os import signal import argparse import importlib import six import time from .contrib import bottle from .util import GlobCheckerThread def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("--port", default=8080, help="Port to bind on.") parser...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from __future__ import (print_function, unicode_literals, division, absolute_import) import argparse import io import json import os import re import shutil import subprocess import sys import tarfile import zipfile LOC = '/usr/lib/python2.7/dist-packages/cinder/volume/dr...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 import json import requests class YaDisk(object): def __init__(self, token): self.session = requests.session() self.session.headers.update({'Authorization': 'OAuth ' + str(token),}) def get_key_url(client_data): format_url = "https://oauth.yandex.ru/authorize?response_type=code&client_id={}&...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import subprocess import sys import csv import matplotlib.pyplot as plt import numpy as np # Use fonts that match LaTeX from matplotlib import rcParams rcParams['font.family'] = 'serif' rcParams['font.size'] = 17 rcParams['font.serif'] = ['Computer Modern Roman'] rcParams['text.usetex'] = True #...
unknown
codeparrot/codeparrot-clean
""" CodeHilite Extension for Python-Markdown ======================================== Adds code/syntax highlighting to standard Python-Markdown code blocks. See <https://pythonhosted.org/Markdown/extensions/code_hilite.html> for documentation. Original code Copyright 2006-2008 [Waylan Limberg](http://achinghead.com/...
unknown
codeparrot/codeparrot-clean
"""Currency exchange rate support that comes from fixer.io.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ATTR_ATTRIBUTION, CONF_API_KEY, CONF_NAME import homeassistant.helpers.config_validation as ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2015 David Barragán <bameda@dbarragan.com> # Copyright (C) 2015 Anler Hernández <hello@anler.me> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
intentional syntax error which should NOT be encountered
unknown
github
https://github.com/ansible/ansible
test/integration/targets/include_when_parent_is_dynamic/syntax_error.yml
# -*- coding: utf-8 -*- """ Sahana Eden Support Requests @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT 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 wi...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2006-2015 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Tests\Database; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Database\Query\Builder as Quer...
php
github
https://github.com/laravel/framework
tests/Database/EloquentHasOneOrManyDeprecationTest.php
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2012 Star2Billing S.L. # # The primar...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/binopAssignmentShouldHaveType.ts] //// //// [binopAssignmentShouldHaveType.ts] declare var console; "use strict"; namespace Test { export class Bug { getName():string { return "name"; } bug() { var name:string= null; if ((name= this.getName()).length > 0) { console.log(na...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/binopAssignmentShouldHaveType.js
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.vectorstores import PGEmbedding from langchain_community.vectorstores.pgembedding import ( CollectionStore, EmbeddingStore, QueryResult, ) # Create a...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/vectorstores/pgembedding.py
import type { CallExpression, Expression, Identifier, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, Node, StringLiteral, TSMethodSignature, TSPropertySignature, } from '@babel/types' import path from 'path' export const UNKNOWN_TYPE = 'Unknown' export function resolveObjectKey...
typescript
github
https://github.com/vuejs/core
packages/compiler-sfc/src/script/utils.ts
win_xml = """<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <uuid>{uuid}</uuid> <name>{name}</name> <description>{desc}</description> <memory unit='KiB'>{memory}</memory> <currentMemory unit='KiB'>{memory}</currentMemory> <vcpu placement='static'>{cpu}</vcpu> <nu...
unknown
codeparrot/codeparrot-clean