code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
## Input ```javascript import {useHook} from 'shared-runtime'; function Component(props) { const data = useHook(); const items = []; // NOTE: `item` is a context variable because it's reassigned and also referenced // within a closure, the `onClick` handler of each item for (let item of props.data) { it...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-for-of-loop-with-context-variable-iterator.expect.md
import {browser, by, element, ElementFinder, ExpectedConditions as EC} from 'protractor'; describe('Elements', () => { const messageInput = element(by.css('input')); const popupButtons = element.all(by.css('button')); // Helpers const click = async (elem: ElementFinder) => { // Waiting for the element to ...
typescript
github
https://github.com/angular/angular
adev/src/content/examples/elements/e2e/src/app.e2e-spec.ts
import numpy as np import pdb from .utils import typed_randn, get_tag from .core import AnalyticityError from . import functions __all__ = ['dec_check_shape', 'check_numdiff', 'generate_randx', 'check_shape_backward', 'check_shape_forward', 'check_shape_match'] def dec_check_shape(pos): ''' Check ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys sys.path.append("web2py") import argparse import logging import os import shutil from apps.CreateApp import CreateApp from apps.SplitSentences import SplitSentences from db.Corpus_DB import Corpus_DB from db.Corpus_ComputeStats import Corpus_ComputeStats from ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # this file is part of 'RAX-AutoScaler' # # Copyright 2014 Rackspace US, 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 obta...
unknown
codeparrot/codeparrot-clean
from __future__ import with_statement __author__ = 'Tom Schaul, tom@idsia.ch; Justin Bayer, bayerj@in.tum.de' import gc import pickle import logging import threading import os import operator from itertools import count from math import sqrt from random import random, choice from string import split from scipy impo...
unknown
codeparrot/codeparrot-clean
# encoding: utf8 # # This file is part of JsQt. # # Copyright (C) Arskom Ltd. www.arskom.com.tr # # 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 o...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from ..errors import * from flask import Response, redirect import re __all__ = ( "Authenticator", "NotAuthenticated" ) # IMPORTANT: This is provisional code. Might be changed or removed. # class NotAuthenticated(Exception): pass class Authenticator(object): def authenticate(...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, 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 mu...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D def CreatePlotGrid(title, xlabel, ylabel, zlabel, aspectmode): # plot fig, ((axXZ, axYZ), (axXY, ax3D)) = plt.subplots(2, 2) fig.suptitle(title, fontsize=14) fig.se...
unknown
codeparrot/codeparrot-clean
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
docs/examples/ipv6.c
#!/bin/env python # Script that uses RHN API to clone RHN Errata to Satellite # or Spacewalk server. # Copyright (c) 2008--2011 Red Hat, Inc. # # Author: Andy Speagle (andy.speagle@wichita.edu) # # This script is an extension of the original "rhn-clone-errata.py" # script written by: Lars Jonsson (ljonsson@redhat.com...
unknown
codeparrot/codeparrot-clean
# # Copyright (c) 2010 Red Hat, 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 t...
unknown
codeparrot/codeparrot-clean
""" The ``agar.counter`` module contains classes to help work with scalable counters. """ import datetime import re import time from google.appengine.api import memcache, taskqueue from google.appengine.ext import db, deferred from pytz import utc def get_interval_number(ts, duration): """ Returns the numbe...
unknown
codeparrot/codeparrot-clean
# (C) 2012, Michael DeHaan, <michael.dehaan@gmail.com> # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
unknown
codeparrot/codeparrot-clean
import pytest from django.http import Http404 from django.test import TestCase from rest_framework.negotiation import ( BaseContentNegotiation, DefaultContentNegotiation ) from rest_framework.renderers import BaseRenderer from rest_framework.request import Request from rest_framework.test import APIRequestFactory ...
unknown
codeparrot/codeparrot-clean
"""Miscellaneous WSGI-related Utilities""" import posixpath __all__ = [ 'FileWrapper', 'guess_scheme', 'application_uri', 'request_uri', 'shift_path_info', 'setup_testing_defaults', ] class FileWrapper: """Wrapper to convert file-like objects to iterables""" def __init__(self, filelike, blksize=8192...
unknown
codeparrot/codeparrot-clean
# -*- 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 import os import json import pytest import sys if sys.version_info < (2, ...
unknown
codeparrot/codeparrot-clean
# This code is supporting material for the book # Building Machine Learning Systems with Python # by Willi Richert and Luis Pedro Coelho # published by PACKT Publishing # # It is made available under the MIT License from matplotlib import pyplot as plt # We load the data with load_iris from sklearn from sklearn.datas...
unknown
codeparrot/codeparrot-clean
from wolis.test_case import WolisTestCase class SubscribeTopicTestCase(WolisTestCase): def test_subscribe_topic(self): self.login('test43', 'test42') url = '/index.php' self.get(url) self.assert_successish() assert 'Index page' in self.response.body href = self.li...
unknown
codeparrot/codeparrot-clean
# -*- coding:utf8 -*- #coding=utf-8 from django.db import models import datetime from django.utils.timezone import utc # Create your models here. class SourceFile(models.Model): # sender user_id = models.IntegerField(default=0) # content title = models.CharField(max_length=100) description = mode...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 NTT DOCOMO, 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-...
unknown
codeparrot/codeparrot-clean
from enigma import eTimer, eDVBSatelliteEquipmentControl, eDVBResourceManager, \ eDVBDiseqcCommand, eDVBFrontendParametersSatellite, eDVBFrontendParameters,\ iDVBFrontend from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox from Plugins.Plugin import Plu...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2016 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.util; import static org.mockito.internal.util.StringUtil.join; import java.util.Locale; public abstract class Platform { public static final String JAVA_VERSION = ...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/internal/util/Platform.java
// RUN: clang-tidy %s -checks='-*,llvm-namespace-comment' -- 2>&1 | FileCheck %s --check-prefix=CHECK-WARN -implicit-check-not='{{warning|error}}:' // RUN: not clang-tidy %s -checks='-*,llvm-namespace-comment' -warnings-as-errors='llvm-namespace-comment' -- 2>&1 | FileCheck %s --check-prefix=CHECK-WERR -implicit-check-...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/infrastructure/warnings-as-errors.cpp
import numpy as np import bpy from bpy.props import FloatProperty, EnumProperty, BoolProperty, IntProperty, StringProperty from sverchok.node_tree import SverchCustomTreeNode from sverchok.data_structure import updateNode, zip_long_repeat, match_long_repeat from sverchok.utils.modules.eval_formula import get_variable...
unknown
codeparrot/codeparrot-clean
"""Helper to provide extensibility for pickle. This is only useful to add pickle support for extension types defined in C, not for instances of user-defined classes. """ __all__ = ["pickle", "constructor", "add_extension", "remove_extension", "clear_extension_cache"] dispatch_table = {} def pickle(ob_typ...
unknown
codeparrot/codeparrot-clean
""" =================================================== Lasso model selection: Cross-Validation / AIC / BIC =================================================== Use the Akaike information criterion (AIC), the Bayes Information criterion (BIC) and cross-validation to select an optimal value of the regularization paramet...
unknown
codeparrot/codeparrot-clean
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 import json import re from django.http import HttpResponse from django.views import View from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from myuw.views import prefetch_...
unknown
codeparrot/codeparrot-clean
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
unknown
codeparrot/codeparrot-clean
from datetime import date import unittest from django import forms from django.conf import settings from django.contrib.admin.options import ModelAdmin, TabularInline, \ HORIZONTAL, VERTICAL from django.contrib.admin.sites import AdminSite from django.contrib.admin.validation import validate from django.contrib.ad...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2016 Benedikt Schmitt # # 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...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0 /* * linux/lib/string.c * * Copyright (C) 1991, 1992 Linus Torvalds */ /* * This file should be used only for "library" routines that may have * alternative implementations on specific architectures (generally * found in <asm-xx/string.h>), or get overloaded by FORTIFY_SOU...
c
github
https://github.com/torvalds/linux
lib/string.c
# Contributing to QNNPACK We want to make contributing to this project as easy and transparent as possible. ## Code of Conduct The code of conduct is described in [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md). ## Pull Requests We actively welcome your pull requests. 1. Fork the repo and create your branch from `master`...
unknown
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/quantized/cpu/qnnpack/CONTRIBUTING.md
# -*- coding: utf-8 -*- """ E2E tests for the LMS. """ import time from unittest import skip from .helpers import UniqueCourseTest from ..pages.studio.auto_auth import AutoAuthPage from ..pages.lms.courseware import CoursewarePage from ..pages.lms.annotation_component import AnnotationComponentPage from ..fixtures.co...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # SKR03 # ===== # Dieses Modul bietet Ihnen einen deutschen Kontenplan basierend auf dem SKR03. # Gemäss der aktuellen Einstellungen ist die Firma nicht Umsatzsteuerpflichtig. # Diese Grundeinstellung ist sehr einfach z...
unknown
codeparrot/codeparrot-clean
""" SAMResultsClient class is a client for the SAM Results DB. """ __RCSID__ = "$Id$" # it crashes epydoc #__docformat__ = "restructuredtext en" import urllib2 from datetime import datetime from xml.dom import minidom import socket from DIRAC import S_OK, S_ERROR from DIRAC.ConfigurationSystem.Client.Helpers import C...
unknown
codeparrot/codeparrot-clean
import struct import pytest from kafka.record import util varint_data = [ (b"\x00", 0), (b"\x01", -1), (b"\x02", 1), (b"\x7E", 63), (b"\x7F", -64), (b"\x80\x01", 64), (b"\x81\x01", -65), (b"\xFE\x7F", 8191), (b"\xFF\x7F", -8192), (b"\x80\x80\x01", 8192), (b"\x81\x80\x01", -8...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, 2015 YAEGASHI Takeshi <yaegashi@debian.org> # Copyright: (c) 2017, 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_...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2021 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/src/com/google/common/html/ParametricNullness.java
def add_port_mapping(port_bindings, internal_port, external): if internal_port in port_bindings: port_bindings[internal_port].append(external) else: port_bindings[internal_port] = [external] def add_port(port_bindings, internal_port_range, external_range): if external_range is None: ...
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
cmd/promtool/backfill.go
#!/usr/bin/python # -*- coding: utf-8 -*- # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may as...
unknown
codeparrot/codeparrot-clean
use std::cell::{Cell, OnceCell}; use std::num::NonZero; use std::ops::Deref; use std::ptr; use std::sync::Arc; use parking_lot::Mutex; use crate::outline; use crate::sync::CacheAligned; /// A pointer to the `RegistryData` which uniquely identifies a registry. /// This identifier can be reused if the registry gets fr...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_data_structures/src/sync/worker_local.rs
/* * Copyright (c) 2016 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.debugging; import java.util.Collection; import java.util.List; import java.util.stream.Collectors; import org.mockito.Mockito; import org.mockito.invocation.Invocation; ...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/internal/debugging/InvocationsPrinter.java
# 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. """Xcode project file generator. This module is both an Xcode project file generator and a documentation of the Xcode project file format. Knowledge of the proje...
unknown
codeparrot/codeparrot-clean
from rest_framework import generics from datagrowth.datatypes.views import (ContentView, ContentSerializer, DocumentBaseSerializer, CollectionBaseSerializer, CollectionBaseContentView) from online_discourse.models import Collection, Document class DocumentSerializer(DocumentBas...
unknown
codeparrot/codeparrot-clean
// @enableTransitivelyFreezeFunctionExpressions:false import { Stringify, mutate, identity, setPropertyByKey, shallowCopy, } from 'shared-runtime'; /** * Function expression version of `aliased-nested-scope-truncated-dep`. * * In this fixture, the output would be invalid if propagateScopeDeps did not * av...
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/aliased-nested-scope-fn-expr.tsx
/* 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/kubelet/pod/pod_manager_test.go
from util.util import FRUITS class Warehouse: # Fruit name to amount of it in warehouse entry = {} # Apple, banana, etc... def __init__(self) -> None: for fruit in FRUITS: self.entry[fruit] = 0 # fruit name from util.FRUITS (mango, apple...) def add_fruits(self, fruit_name, q...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: UTF-8 -*- import cPickle from cStringIO import StringIO import inspect import linecache import optparse import os import sys from _line_profiler import LineProfiler as CLineProfiler CO_GENERATOR = 0x0020 def is_generator(f): """ Return True if a function is a generator. ""...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env pyhton from csv import DictWriter from gmusicapi import Mobileclient from operator import itemgetter def login(): logged_in = api.login('account@gmail.com', 'password') # IMPORTANT: If you use secondary authentication for gogle music # you need to generate an app specific password! ...
unknown
codeparrot/codeparrot-clean
from openerp.osv import orm, fields def name(n): return 'base_import.tests.models.%s' % n class char(orm.Model): _name = name('char') _columns = { 'value': fields.char('unknown') } class char_required(orm.Model): _name = name('char.required') _columns = { 'value': fields.char('u...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ /** * Stack trace filtering / cleaning internal APIs. */ package org.mockito.internal.exceptions.stacktrace;
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/internal/exceptions/stacktrace/package-info.java
#%matplotlib inline #importing all relevant packages import pandas as pd import networkx as nx import numpy as np from tqdm import tqdm import matplotlib.pyplot as plt import seaborn as sns from pygsp import graphs, filters, plotting import pickle import community from scipy import sparse, stats, spatial from SongJamAn...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.CreateModel( name='FlatPage', fields=[ ...
unknown
codeparrot/codeparrot-clean
<html> <head> <script src="bundle.js" type="text/javascript"></script> </head> <body> </body> </html>
html
github
https://github.com/webpack/webpack
test/hotPlayground/index.html
base_suite: concurrency_replication overrides: - "execution_control_params.enable_prioritization"
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/mappings/concurrency_replication_execution_control_with_prioritization.yml
# # ImageViewAgg.py -- a backend for Ginga using the aggdraw library # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. import numpy from io import BytesIO import aggdraw...
unknown
codeparrot/codeparrot-clean
# Copyright 2011-2012 OpenStack Foundation # All Rights Reserved. # Copyright 2013 Red Hat, 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/lic...
unknown
codeparrot/codeparrot-clean
#include "Circle.h" Circle::Circle(double radius) : radius_(radius) {} double Circle::area() const { return 3.141 * radius_ * radius_; } double Circle::perimeter() const { return 3.141 * radius_; }
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Circle.cpp
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import subprocess try: from setuptools import setup, find_packages, Command except: from distutils.core import setup, find_packages, Command class PyTest(Command): # this is cut'n'pasted from DevAssistant setup....
unknown
codeparrot/codeparrot-clean
# (c) 2018-2019, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit tests for ONTAP Ansible module na_ontap_gather_facts ''' from __future__ import print_function import json import pytest import sys from units.compat import unittest from units.compat.mo...
unknown
codeparrot/codeparrot-clean
# Microsoft Azure Linux Agent # # Copyright 2018 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2022 The HuggingFace Team. 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 agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/en/model_doc/lilt.md
# Copyright 2020 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
unknown
codeparrot/codeparrot-clean
from copy import deepcopy import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, Series, concat, ) import pandas._testing as tm class TestIndexConcat: def test_concat_ignore_index(self, sort): frame1 = DataFrame( {"test1": [...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/reshape/concat/test_index.py
from app import Roles from app.repository import page_repository from app.service import group_service, role_service def set_read_page_permissions(page, new_groups): current_groups = set(get_read_permission_groups_by_page(page)) new_groups = set(new_groups) added_groups = new_groups - current_groups r...
unknown
codeparrot/codeparrot-clean
'use strict'; const common = require('../common.js'); const assert = require('assert'); const bench = common.createBenchmark(main, { n: [50, 2e2], size: [1e2, 1e4], method: ['deepEqual', 'notDeepEqual', 'deepStrictEqual', 'notDeepStrictEqual'], }, { combinationFilter: (p) => { return p.size === 1e4 && p.n...
javascript
github
https://github.com/nodejs/node
benchmark/assert/deepequal-object.js
import os import sys import warnings from itertools import takewhile from django.apps import apps from django.conf import settings from django.core.management.base import BaseCommand, CommandError, no_translations from django.core.management.utils import run_formatters from django.db import DEFAULT_DB_ALIAS, Operation...
python
github
https://github.com/django/django
django/core/management/commands/makemigrations.py
/* * 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/ExitCodeGeneratorsTests.java
/* Copyright (c) 2000, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
sql/item_pfs_func.h
#!/usr/bin/env python # # rpclib - Copyright (C) Rpclib contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ...
unknown
codeparrot/codeparrot-clean
""" OAuth dance session """ from google.appengine.ext import ndb from ferris.core.ndb import Model from oauth2client.appengine import CredentialsNDBProperty, StorageByKeyName import hashlib class UserCredentials(Model): user = ndb.UserProperty(indexed=True) scopes = ndb.StringProperty(repeated=True, indexed=...
unknown
codeparrot/codeparrot-clean
# Licensing License names used in this document are as per [SPDX License List](https://spdx.org/licenses/). The default license for this project is [AGPL-3.0-only](LICENSE). ## Apache-2.0 The following directories and their subdirectories are licensed under Apache-2.0: ``` packages/grafana-data/ packages/grafana-e...
unknown
github
https://github.com/grafana/grafana
LICENSING.md
"""Test for Nest binary sensor platform for the Smart Device Management API. These tests fake out the subscriber/devicemanager, and are not using a real pubsub subscriber. """ from google_nest_sdm.device import Device from google_nest_sdm.event import EventMessage from homeassistant.util.dt import utcnow from .comm...
unknown
codeparrot/codeparrot-clean
import json from django import forms from django.db.models.fields.subclassing import Creator from django.db.models import TextField from django.utils.encoding import smart_text from django.utils import six from .registry import app_registry from .containers import AppDataContainerFactory class AppDataDescriptor(Crea...
unknown
codeparrot/codeparrot-clean
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
unknown
codeparrot/codeparrot-clean
package libnetwork import ( "context" "fmt" "github.com/moby/moby/v2/daemon/libnetwork/config" "github.com/moby/moby/v2/daemon/libnetwork/datastore" "github.com/moby/moby/v2/daemon/libnetwork/driverapi" "github.com/moby/moby/v2/daemon/libnetwork/drivers/bridge" "github.com/moby/moby/v2/daemon/libnetwork/driver...
go
github
https://github.com/moby/moby
daemon/libnetwork/drivers_linux.go
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that th...
cpp
github
https://github.com/opencv/opencv
3rdparty/openexr/Imath/ImathMatrixAlgo.cpp
# Copyright 2016 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='paths written by git-apply cannot escape the working tree' . ./test-lib.sh # tests will try to write to ../foo, and we do not # want them to escape the trash directory when they # fail test_expect_success 'bump git repo one level down' ' mkdir inside && mv .git inside/ && cd inside ' ...
unknown
github
https://github.com/git/git
t/t4139-apply-escape.sh
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2010-2012 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
unknown
codeparrot/codeparrot-clean
/* 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/lite/delegates/interpreter_utils.h
# Copyright 2012 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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, merge, publi...
unknown
codeparrot/codeparrot-clean
name: (Shared) Close Direct Sync Branch PRs on: pull_request: branches: - 'builds/facebook-**' permissions: {} env: TZ: /usr/share/zoneinfo/America/Los_Angeles # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 jobs: ...
unknown
github
https://github.com/facebook/react
.github/workflows/shared_close_direct_sync_branch_prs.yml
import base64 import hmac import json import struct import time import os from hashlib import sha1 def load_steam_guard(steam_guard: str) -> dict: if os.path.isfile(steam_guard): with open(steam_guard, 'r') as f: return json.loads(f.read()) else: return json.loads(steam_guard) def...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2009, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of cond...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from zope.interface import implementer from twisted.cred import portal, checkers from twisted.spread import pb from twisted.internet import reactor class ChatServer: def __init__(self): self.groups = {} # index...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package ktorbuild.internal.gradle import org.gradle.api.NamedDomainObjectCollection import org.gradle.api.NamedDomainObjectProvider internal fun <T : Any> NamedDomainObjectCollection<T>.mayb...
kotlin
github
https://github.com/ktorio/ktor
build-logic/src/main/kotlin/ktorbuild/internal/gradle/NamedDomainObjectCollection.kt
# Copyright (c) 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...
unknown
codeparrot/codeparrot-clean
# # (c) 2016 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...
unknown
codeparrot/codeparrot-clean
// errorcheck -0 -m -d=escapemutationscalls,zerocopy -l // Copyright 2023 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 p import "fmt" type B struct { x int px *int pb *B } func F1(b *B) { // ERROR "mutates p...
go
github
https://github.com/golang/go
test/escape_mutations.go
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) Marshall Clow 2008-2012. 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: 28 Sep 2015 mtc First version */ /// \file sort_subrange.hpp /// \brief Sort a subrange /// \aut...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/algorithm/sort_subrange.hpp