code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from django.template.defaulttags import token_kwargs from django import template from allauth.socialaccount import providers from allauth.utils import get_request_param register = template.Library() class ProviderLoginURLNode(template.Node): def __init__(self, provider_id, params): self.provider_id_var =...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible CHOICES = ( (1, 'first'), (2, 'second'), ) @python_2_unicode_compatible class Article(models.Model): headline = models.CharField(max_length=100, defau...
unknown
codeparrot/codeparrot-clean
import os import unittest from datetime import datetime from unittest.mock import MagicMock, patch os.environ["GITHUB_TOKEN"] = "test_token" from delete_old_branches import delete_old_tags @patch("delete_old_branches.delete_branch") @patch("gitutils.GitRepo._run_git") class TestDeleteTag(unittest.TestCase): def ...
python
github
https://github.com/pytorch/pytorch
.github/scripts/test_delete_old_branches.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Cloudbase Solutions Srl # # 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
package daemon import ( "context" "encoding/json" "runtime" "time" cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" containertypes "github.com/moby/moby/api/types/container" "github.com/moby/moby/v2/daemon/container" "github.com/moby/moby/v2/daemon/server/backend" ) // ContainerStats wri...
go
github
https://github.com/moby/moby
daemon/stats.go
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/FilePermissionsTask.java
''' Provide a set of named FontAwesome icons that can be uses in Bokeh documents ''' __icons__ = [ "adjust", "adn", "align-center", "align-justify", "align-left", "align-right", "ambulance", "anchor", "android", "angellist", "angle-double-down", "angle-double-left", "angle-double-right", "angle-double-up"...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2018, Yanis Guenane <yanis+ansible@guenane.org> # Copyright (c) 2019, René Moser <mail@renemoser.net> # 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
import asyncio import concurrent.futures import functools import logging from coalib.core.DependencyTracker import DependencyTracker from coalib.core.Graphs import traverse_graph from coalib.core.PersistentHash import persistent_hash def group(iterable, key=lambda x: x): """ Groups elements (out-of-order) tog...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
from datetime import datetime from django.db import models from django.utils.encoding import python_2_unicode_compatible # M2M described on one of the models @python_2_unicode_compatible class Person(models.Model): name = models.CharField(max_length=128) class Meta: ordering = ('name',) def __st...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, sanitized_Request, urlencode_postdata, xpath_text, xpath_with_ns, ) _x = lambda p: xpath_with_ns(p, {'xspf': 'http://xspf.org/ns/0/'}) class NosVideoIE(InfoEx...
unknown
codeparrot/codeparrot-clean
// Copyright 2018 The etcd 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 t...
go
github
https://github.com/etcd-io/etcd
tests/integration/clientv3/watch/watch_fragment_test.go
# -*- test-case-name: twisted.web.test.test_error -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Exception definitions for L{twisted.web}. """ from __future__ import division, absolute_import __all__ = [ 'Error', 'PageRedirect', 'InfiniteRedirection', 'RenderError', 'MissingR...
unknown
codeparrot/codeparrot-clean
"""Support for the CO2signal platform.""" import logging import CO2Signal import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, CONF_LATITUDE, CONF_LONGITUDE, CONF_TOKEN, ) import homeassistant.helpers.config_validation...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python try: import unittest2 as unittest except ImportError: import unittest from csvkit.cleanup import * from csvkit.exceptions import LengthMismatchError class TestCleanup(unittest.TestCase): def test_fix_rows(self): """Test to ensure that row merging yields correct results""" ...
unknown
codeparrot/codeparrot-clean
#encoding: utf-8 import re, os, datetime, cPickle,logging from django.test import TestCase from django.test.client import Client from django.conf import settings from simple.management.commands import parse_knesset_bill_pdf from simple.management.commands.parse_government_bill_pdf import pdftools from simple.managemen...
unknown
codeparrot/codeparrot-clean
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package roachpb import ( "slices" "sort" ) // MergeSpans sorts the incoming spans and merges overlapping spans. Returns // true iff all of the spans are distinct. No...
go
github
https://github.com/cockroachdb/cockroach
pkg/roachpb/merge_spans.go
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(n){return...
javascript
github
https://github.com/django/django
django/contrib/admin/static/admin/js/vendor/select2/i18n/ar.js
#!/usr/bin/python # The MIT License (MIT) # # Copyright (c) 2012-2013 Teemu Ikonen # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rig...
unknown
codeparrot/codeparrot-clean
'use strict'; const common = require('../common.js'); const url = require('url'); const assert = require('assert'); const bench = common.createBenchmark(main, { type: common.urlDataTypes, e: [1], }); function main({ type, e }) { const data = common.bakeUrlData(type, e, false, false).map((i) => url.parse(i)); ...
javascript
github
https://github.com/nodejs/node
benchmark/url/legacy-url-get-prop.js
/* 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/src/PE/utils/ordinals_lookup_tables_std/ws2_32_dll_lookup.hpp
# Line too long - pylint: disable=C0301 # Invalid name - pylint: disable=C0103 """ mainUtils.py ------------ This file provides a rudimentary framework to support top-level option parsing, initialization and cleanup logic common to multiple programs. It also implements workarounds to make other modules we use like ...
unknown
codeparrot/codeparrot-clean
// Copyright 2015 The etcd 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 t...
go
github
https://github.com/etcd-io/etcd
server/etcdserver/cindex/cindex.go
/foo/bar.html
html
github
https://github.com/rails/rails
actionpack/test/fixtures/public/foo/bar.html
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify #...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from measurements import page_cycler import page_sets from telemetry import benchmark class _PageCycler(benchmark.Benchmark): options = {'pageset_repeat':...
unknown
codeparrot/codeparrot-clean
//===- llvm/Support/ErrorOr.h - Error Smart Pointer -------------*- 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/apple/swift
include/swift/RemoteInspection/RuntimeHeaders/llvm/Support/ErrorOr.h
#!/usr/bin/env python # # $Id: kfslaunch.py 36 2007-11-12 02:43:36Z sriramsrao $ # # Copyright 2007 Kosmix Corp. # # This file is part of Kosmos File System (KFS). # # 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 co...
unknown
codeparrot/codeparrot-clean
from pip._vendor.packaging.version import parse as parse_version class InstallationCandidate(object): def __init__(self, project, version, location): self.project = project self.version = parse_version(version) self.location = location self._key = (self.project, self.version, self....
unknown
codeparrot/codeparrot-clean
#include <ATen/core/List.h> #include <gtest/gtest.h> using namespace c10; using std::string; // NOLINTBEGIN(performance-move-const-arg, bugprone-use-after-move, *analyzer*Move) TEST(ListTestIValueBasedList, givenEmptyList_whenCallingEmpty_thenReturnsTrue) { List<string> list; EXPECT_TRUE(list.empty()); } TES...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/core/List_test.cpp
import json import logging from functools import partial from django.test import TestCase from django.test.client import RequestFactory from django.core.urlresolvers import reverse from foldit.views import foldit_ops, verify_code from foldit.models import PuzzleComplete, Score from student.models import unique_id_for...
unknown
codeparrot/codeparrot-clean
# Vendor package ## What vendored packages are for The `airflow._vendor` package is foreseen for vendoring in packages, that we have to modify ourselves because authors of the packages do not have time to modify them themselves. This is often temporary and once the packages implement fixes that we need, and then we r...
unknown
github
https://github.com/apache/airflow
airflow-core/src/airflow/_vendor/README.md
# 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
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
build-tools-internal/src/test/java/org/elasticsearch/gradle/internal/test/rest/transform/text/ReplaceTextualTests.java
# # Copyright 2015-2021 Universidad Complutense de Madrid # # This file is part of Numina # # SPDX-License-Identifier: GPL-3.0+ # License-Filename: LICENSE.txt # import argparse from astropy.io import fits import numpy as np import re from .matplotlib_qt import set_window_geometry from .pause_debugplot import pause_d...
unknown
codeparrot/codeparrot-clean
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/lite/utils/fake_quant_utils.h
"HTML utilities suitable for global use." import re, string # Configuration for urlize() function LEADING_PUNCTUATION = ['(', '<', '&lt;'] TRAILING_PUNCTUATION = ['.', ',', ')', '>', '\n', '&gt;'] # list of possible strings used for bullets in bulleted lists DOTS = ['&middot;', '*', '\xe2\x80\xa2', '&#149;', '&bull...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** ConvexHull.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************************...
unknown
codeparrot/codeparrot-clean
# 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
# (c) 2013, Bradley Young <young.bradley@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 later...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import codecs import logging import os import chardet import pysrt from .video import Episode, Movie from .utils import sanitize, sanitize_release_group logger = logging.getLogger(__name__) #: Subtitle extensions SUBTITLE_EXTENSIONS = ('.srt', '.sub', '.smi', '.txt', '.ssa', '.ass', '.mpl') ...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // 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
clang-tools-extra/clang-tidy/performance/AvoidEndlCheck.h
#!/usr/bin/python # -*- coding: utf-8 -*- # Tests of i18n scripts. # # Copyright 2013 Google Inc. # https://developers.google.com/blockly/ # # 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 # #...
unknown
codeparrot/codeparrot-clean
//! Integration testing tools for Actix Web applications. //! //! The main integration testing tool is [`TestServer`]. It spawns a real HTTP server on an //! unused port and provides methods that use a real HTTP client. Therefore, it is much closer to //! real-world cases than using `init_service`, which skips HTTP enc...
rust
github
https://github.com/actix/actix-web
actix-test/src/lib.rs
########################################################################## # # Copyright (c) 2010-2011, Image Engine Design 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: # # * Redis...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' TIME_FORMAT = 'H:i:s' DATE...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/KDiag.java
<?php namespace Illuminate\JsonSchema\Types; class IntegerType extends Type { /** * The minimum value (inclusive). */ protected ?int $minimum = null; /** * The maximum value (inclusive). */ protected ?int $maximum = null; /** * Set the minimum value (inclusive). */ ...
php
github
https://github.com/laravel/framework
src/Illuminate/JsonSchema/Types/IntegerType.php
- hosts: localhost gather_facts: no tasks: - name: Should not fail on undefined variable set_fact: template_result: "{{ lookup('template', '72262.j2') }}"
unknown
github
https://github.com/ansible/ansible
test/integration/targets/template/72262.yml
""" Copyright (c) 2017, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on May 20, 2017 @author: jrm """ from atom.api import ( Typed, ForwardTyped, Bool, Tuple, Float, Int, Enum, observe, set_default ) from enaml.c...
unknown
codeparrot/codeparrot-clean
import os, csv, itertools from py2neo import Graph, Node, Relationship # host and port that neo4j instance is listening at ENDPOINT = "localhost:7474" # basic uri without authentication # uri with user-password authentication USER = "neo4j" PASSWORD = "neo" # link types EVALUATES = "EVALUATES" RANKS = "RANKS" MAPS...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2014 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This script runs every build as a hook. If it detects that the build should be clobbered, it will touch the file <build_dir>/.lan...
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/test/java/org/apache/kafka/clients/admin/NewTopicTest.java
# -*- coding: utf-8 -*- from itertools import chain import logging import re class MessageInterpreter(object): def __init__(self, user_id, username, command_names, external_texts): self.logger = logging.getLogger(__name__) self.user_id = user_id self.username = username self.extern...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v1beta1", "metadata": { "name": "v0alpha1.bar-gauge-demo2.v42" }, "spec": { "annotations": { "list": [ { "builtIn": 1, "datasource": { "uid": "-- Grafana --" }, "enable": true,...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/datasource-testdata/v0alpha1.bar-gauge-demo2.v42.v1beta1.json
# 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 + cla...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (C) 2009 Tim Gaggstatter <Tim.Gaggstatter AT gmx DOT net> # Copyright (C) 2010 Eduardo Robles Elvira <edulix AT gmail DOT com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the ...
unknown
codeparrot/codeparrot-clean
//===--- Bracket.h - Analyze bracket structure --------------------*-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
clang-tools-extra/clangd/support/Bracket.h
// Copyright 2017 The etcd 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 t...
go
github
https://github.com/etcd-io/etcd
server/etcdserver/api/v2store/store_ttl_test.go
# -*- coding: utf-8 -*- """ pygments.cmdline ~~~~~~~~~~~~~~~~ Command line interface. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import sys import getopt from textwrap import dedent from py...
unknown
codeparrot/codeparrot-clean
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Copyright 2015 Abhijit Menon-Sen <ams@2ndQuadrant.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, eithe...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 from __future__ import unicode_literals __loader__ = None import datetime import json import os import time import unittest import sys try: from mock import patch except ImportError: from unittest.mock import patch try: from StringIO import StringIO except ImportError: from io import...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from flask_restful import Resource, marshal_with from flask_restful_swagger import swagger from app.mod_shared.models.db import db from app.mod_profiles.models import Analysis from app.mod_profiles.common.fields.analysisFields import AnalysisFields from app.mod_profiles.common.parsers.analysis...
unknown
codeparrot/codeparrot-clean
/* * PSA ECP layer on top of Mbed TLS crypto */ /* * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ #ifndef PSA_CRYPTO_ECP_H #define PSA_CRYPTO_ECP_H #include <psa/crypto.h> #include <mbedtls/ecp.h> /** Load the contents of a key buffer into an internal ECP r...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/library/psa_crypto_ecp.h
from tardis import atomic from numpy import testing import pytest import os def test_atomic_h5_readin(): data = atomic.read_basic_atom_data(atomic.default_atom_h5_path) assert data['atomic_number'][13] == 14 assert data['symbol'][13] == "Si" si_mass = data['mass'][13] testing.assert_almost_equal(si...
unknown
codeparrot/codeparrot-clean
use rustc_middle::bug; use rustc_middle::mir::visit::*; use rustc_middle::mir::*; use rustc_middle::ty::{self, Ty, TyCtxt}; const INSTR_COST: usize = 5; const CALL_PENALTY: usize = 25; const LANDINGPAD_PENALTY: usize = 50; const RESUME_PENALTY: usize = 45; const LARGE_SWITCH_PENALTY: usize = 20; const CONST_SWITCH_BON...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_mir_transform/src/cost_checker.rs
{ "name": "acorn-walk", "description": "ECMAScript (ESTree) AST walker", "homepage": "https://github.com/acornjs/acorn", "main": "dist/walk.js", "types": "dist/walk.d.ts", "module": "dist/walk.mjs", "exports": { ".": [ { "import": "./dist/walk.mjs", "require": "./dist/walk.js", ...
json
github
https://github.com/nodejs/node
deps/acorn/acorn-walk/package.json
from __future__ import unicode_literals from django.test import TestCase from django.utils import six from django_countries import countries, data class TestSettings(TestCase): def setUp(self): del countries.countries def tearDown(self): del countries.countries def test_override_additio...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # (c) 2017, Alberto Murillo <alberto.murillo.silva@intel.com> # # 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 ver...
unknown
codeparrot/codeparrot-clean
from ..broker import Broker class VlanBroker(Broker): controller = "vlans" def show(self, **kwargs): """Shows the details for the specified vlan. **Inputs** | ``api version min:`` None | ``api version max:`` None | ``required:`` True | ...
unknown
codeparrot/codeparrot-clean
#include <ATen/core/VariableHooksInterface.h> namespace at::impl { namespace { VariableHooksInterface* hooks = nullptr; } void SetVariableHooks(VariableHooksInterface* h) { hooks = h; } VariableHooksInterface* GetVariableHooks() { TORCH_CHECK(hooks, "Support for autograd has not been loaded; have you linked agai...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/core/VariableHooksInterface.cpp
/* * 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-aop/src/testFixtures/java/org/springframework/aop/testfixture/aspectj/CommonExpressions.java
####################################################################### # # Channel Number Renderer for Dreambox/Enigma-2 # Version: 1.0 # Coded by Vali (c)2010 # ####################################################################### from Components.VariableText import VariableText from enigma import eLabel,...
unknown
codeparrot/codeparrot-clean
# Copyright 2025 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/utils/attention_visualizer.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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://...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2023 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/convnextv2.md
package scram // // @see https://github.com/postgres/postgres/blob/c30f54ad732ca5c8762bb68bbe0f51de9137dd72/src/interfaces/libpq/fe-auth.c#L1167-L1285 // @see https://github.com/postgres/postgres/blob/e6bdfd9700ebfc7df811c97c2fc46d7e94e329a2/src/interfaces/libpq/fe-auth-scram.c#L868-L905 // @see https://github.com/pos...
go
github
https://github.com/hashicorp/vault
plugins/database/postgresql/scram/scram.go
#!/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
/* 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/core/tpu/kernels/tpu_compilation_metrics.h
"""URL handlers related to certificate handling by LMS""" from datetime import datetime import dogstats_wrapper as dog_stats_api import json import logging from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.http import Http...
unknown
codeparrot/codeparrot-clean
# The MIT License (MIT) # Copyright (c) 2016-2017 HIS e. G. # # 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
/* Copyright 2022 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/resource/v1alpha3/defaults_test.go
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems 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.o...
unknown
codeparrot/codeparrot-clean
"""Unit tests for tool emulator middleware.""" from collections.abc import Callable, Sequence from itertools import cycle from typing import Any, Literal from langchain_core.language_models import LanguageModelInput from langchain_core.language_models.chat_models import BaseChatModel from langchain_core.language_mode...
python
github
https://github.com/langchain-ai/langchain
libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_emulator.py
# -*- coding: utf-8 -*- """ *==LICENSE==* CyanWorlds.com Engine - MMOG client, server and tools Copyright (C) 2011 Cyan Worlds, Inc. 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
# Copyright 2015 Fortinet, Inc. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012-2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT const COMMANDS: &[&str] = &["ping"]; fn main() { tauri_plugin::Builder::new(COMMANDS) .android_path("android") .ios_path("ios") .global_api_script_path("./api-iife...
rust
github
https://github.com/tauri-apps/tauri
examples/api/src-tauri/tauri-plugin-sample/build.rs
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013, Big Switch Networks, 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/...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 IBM Corp. # Copyright 2010 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/LIC...
unknown
codeparrot/codeparrot-clean
# Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: BUSL-1.1 blank_issues_enabled: false contact_links: - name: HCP Terraform and Terraform Enterprise Troubleshooting and Feature Requests url: https://support.hashicorp.com/hc/en-us/requests/new about: For issues and feature requests related to HCP Ter...
unknown
github
https://github.com/hashicorp/terraform
.github/ISSUE_TEMPLATE/config.yml
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/CredentialProviderFactory.java
<?php namespace Illuminate\Foundation\Support\Providers; use Illuminate\Support\Facades\Gate; use Illuminate\Support\ServiceProvider; class AuthServiceProvider extends ServiceProvider { /** * The policy mappings for the application. * * @var array<class-string, class-string> */ protected ...
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslRpcServer.java
from __future__ import print_function import os from scrapy import log from scrapy.utils.job import job_dir from scrapy.utils.request import request_fingerprint class BaseDupeFilter(object): @classmethod def from_settings(cls, settings): return cls() def request_seen(self, request): retu...
unknown
codeparrot/codeparrot-clean