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 # 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. '''Utility to remove comments from JSON files so that they can be parsed by json.loads. ''' import sys def _Rcount(string, chars)...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2012 Alexandre Fiori # based on the original Tornado by Facebook # # 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
#![warn(rust_2018_idioms)] #![cfg(all(feature = "full", not(target_os = "wasi")))] // Wasi does not support bind use tokio::net::TcpListener; use tokio::runtime; use tokio_test::{assert_err, assert_pending, assert_ready, task}; #[test] #[cfg_attr(miri, ignore)] // No `socket` in miri. fn tcp_doesnt_block() { let ...
rust
github
https://github.com/tokio-rs/tokio
tokio/tests/io_driver_drop.rs
/* Copyright 2024 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
cmd/kubeadm/app/cmd/util/join_test.go
# 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/tests/unit/dags/test_invalid_dup_task.py
# Copyright 2006-2017 Coppelia Robotics GmbH. All rights reserved. # marc@coppeliarobotics.com # www.coppeliarobotics.com # # ------------------------------------------------------------------- # THIS FILE IS DISTRIBUTED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED # WARRANTY. THE USER WILL USE IT AT HIS/HER OWN RISK. THE O...
unknown
codeparrot/codeparrot-clean
# Owner(s): ["module: dynamo"] import unittest import torch import torch._dynamo as torchdynamo from torch.testing._internal.common_utils import run_tests, TEST_CUDA, TestCase try: import tabulate # noqa: F401 # type: ignore[import] from torch.utils.benchmark.utils.compile import bench_all HAS_TABULA...
python
github
https://github.com/pytorch/pytorch
test/test_compile_benchmark_util.py
# # Copyright 2015 Peter Sprygada <psprygada@ansible.com> # # Copyright (c) 2017 Dell 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 L...
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/lib/io/cache.h
# # 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 us...
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
#ifndef SRC_NODE_MEM_INL_H_ #define SRC_NODE_MEM_INL_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "node_mem.h" #include "node_internals.h" namespace node { namespace mem { static constexpr size_t kReserveSizeAndAlign = std::max(sizeof(size_t), alignof(max_align_t)); template <typename Cla...
c
github
https://github.com/nodejs/node
src/node_mem-inl.h
"""Say chat messages aloud as they are received.""" __author__ = 'Damon Kohler <damonkohler@gmail.com>' __copyright__ = 'Copyright (c) 2009, Google Inc.' __license__ = 'Apache License, Version 2.0' import android import xmpp _SERVER = 'talk.google.com', 5223 def log(droid, message): print message self.droid.tts...
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/ko/accelerate.md
#!/usr/bin/python # Copyright (c) 2018 Catalyst Cloud Ltd. # 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': [...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import threading, logging, time from kafka.client import KafkaClient from kafka.consumer import SimpleConsumer from kafka.producer import SimpleProducer class Producer(threading.Thread): daemon = True def run(self): client = KafkaClient("localhost:9092") producer = Simpl...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Argument-less script to select what to run on the buildbots.""" import os import shutil import subprocess import sys BUILDBOT_DIR = os.p...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ hyper/cli ~~~~~~~~~ Command line interface for Hyper inspired by Httpie. """ import json import locale import logging import sys from argparse import ArgumentParser, RawTextHelpFormatter from argparse import OPTIONAL, ZERO_OR_MORE from pprint import pformat from textwrap import dedent from...
unknown
codeparrot/codeparrot-clean
import datetime import hashlib import random import re from django.conf import settings from django.contrib.auth.models import User from django.db import models from django.db import transaction from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ try: from 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 agree...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/tf2tensorrt/convert/weights.h
# Copyright 2013 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 agree...
unknown
codeparrot/codeparrot-clean
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
python
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/tests/manip_ops_test.py
from toga.constants import LEFT_ALIGNED from toga.interface import Label as LabelInterface from .base import WidgetMixin from ..libs import UILabel, NSTextAlignment, NSLineBreakByWordWrapping, CGSize class Label(LabelInterface, WidgetMixin): def __init__(self, text, id=None, style=None, alignment=LEFT_ALIGNED): ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** test_qgspointdisplacementrenderer.py ----------------------------- Date : September 2016 Copyright : (C) 2016 by Nyall Dawson Email : nyall dot dawson at...
unknown
codeparrot/codeparrot-clean
<?php namespace Installer; use Composer\Composer; use Composer\IO\IOInterface; use Composer\Plugin\PluginInterface; class Plugin7 implements PluginInterface { public function activate(Composer $composer, IOInterface $io) { $io->write('activate v7'); } public function deactivate(Composer $com...
php
github
https://github.com/composer/composer
tests/Composer/Test/Plugin/Fixtures/plugin-v7/Installer/Plugin7.php
from collections import defaultdict def grouping_dictionary(l): d = defaultdict(list) for k, v in l: d[k].append(v) return d
unknown
mbpp
"""Tool to generate an image.""" from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.tools import SteamshipImageGenerationTool # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising depreca...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/tools/steamship_image_generation/__init__.py
# (c) 2014 Michael DeHaan, <michael@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 ve...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2008 Mikeal Rogers # # 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...
unknown
codeparrot/codeparrot-clean
import logging import re import sys logging.basicConfig(format='%(asctime)s %(name)s: %(message)s', level=logging.INFO) logger = logging.getLogger('check-whitespace') CR_RE = re.compile(r'\r') LEADING_WHITESPACE_RE = re.compile(r'\s+') TRAILING_WHITESPACE_RE = re.compile(r'\s+\n\Z') NO_NEWLINE_RE...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2021 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/main_classes/feature_extractor.md
#!/usr/bin/env python # import libs from types import ListType, DictType, IntType, FloatType import warnings # import classes import analytics.utils.misc as misc from analytics.core.map.dataitemmap import DataItemMap from analytics.core.map.clustermap import ClusterMap from analytics.core.map.elementmap import Element...
unknown
codeparrot/codeparrot-clean
""" Generally helpful utility functions. """ def _ask_for_it_by_name(name): "Returns an object referenced by absolute path." bits = str(name).split(".") ## what if there is no absolute reference? if len(bits) > 1: modulename = ".".join(bits[:-1]) else: modulename = bits[0] mod...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 """ This module provides a Locator class for finding template files. """ import os import re import sys from pystache.common import TemplateNotFoundError from pystache import defaults class Locator(object): def __init__(self, extension=None): """ Construct a template locator. ...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, float_or_none, qualities, ExtractorError, ) class GfycatIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?gfycat\.com/(?:ifr/)?(?P<id>[^/?#]+)' _TESTS = [{ 'u...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- __author__ = 'ximepa' from django import forms from django.contrib.auth.forms import AuthenticationForm from claim.models import * class ChangeInternetWorkerForm(forms.Form): _selected_action = forms.CharField(widget=forms.MultipleHiddenInput) worker = forms.ModelChoiceField(queryset=Wo...
unknown
codeparrot/codeparrot-clean
/********************************************************************** vm_args.c - process method call arguments. Included into vm.c. $Author$ Copyright (C) 2014- Yukihiro Matsumoto **********************************************************************/ NORETURN(static void raise_argument_error(rb_execution...
c
github
https://github.com/ruby/ruby
vm_args.c
import inspect import pickle import pkgutil import unittest import numpy as np import traceback from Orange.base import SklLearner import Orange.classification from Orange.classification import (Learner, Model, NaiveBayesLearner, LogisticRegressionLearner, NuSVMLearner) from Orange....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2018 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
github
https://github.com/kubernetes/kubernetes
hack/update-all.sh
from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..utils import str_to_int class NineGagIE(InfoExtractor): IE_NAME = '9gag' _VALID_URL = r'''(?x)^https?://(?:www\.)?9gag\.tv/ (?: v/(?P<numid>[0-9]+)| p/(?P<id>[a-zA-Z0-9]+)/(?...
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...
python
github
https://github.com/tensorflow/tensorflow
tensorflow/examples/adding_an_op/zero_out_grad_2.py
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/GroupState.java
# frozen_string_literal: true require "abstract_unit" ActionController::Base.helpers_path = File.expand_path("../../fixtures/helpers", __dir__) module AbstractController module Testing class ControllerWithHelpers < AbstractController::Base include AbstractController::Helpers include AbstractControl...
ruby
github
https://github.com/rails/rails
actionview/test/actionpack/abstract/helper_test.rb
import sys import os sys.path.append(os.path.abspath('..')) try: import unittest2 as unittest except ImportError: import unittest import rethinkdb from rethinkengine import * import rethinkengine.connection from rethinkengine.connection import get_connection, ConnectionError class ConnectionTest(unittest.Te...
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...
python
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/tests/pooling_ops_test.py
#ifndef PACKFILE_H #define PACKFILE_H #include "list.h" #include "object.h" #include "odb.h" #include "oidset.h" #include "repository.h" #include "strmap.h" /* in odb.h */ struct object_info; struct odb_read_stream; struct packed_git { struct pack_window *windows; off_t pack_size; const void *index_data; size_t ...
c
github
https://github.com/git/git
packfile.h
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can b # found in the LICENSE file. """Enumerates the BoringSSL source in src/ and generates two gypi files: boringssl.gypi and boringssl_tests.gypi.""" import os import subprocess import sys...
unknown
codeparrot/codeparrot-clean
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT use crate::{ image::Image, ipc::{ channel::ChannelDataIpcQueue, CallbackFn, CommandArg, CommandItem, Invoke, InvokeError, InvokeHandler, InvokeResponseBody, }, ma...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri/src/app.rs
# -*- 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
def stoprockpaperscissors(): global inmoov global human rest() sleep(5) if inmoov < human: i01.mouth.speak("congratulations you won with" + str(human - inmoov) + "points") sleep(3) i01.mouth.speak(str(human) + "points to you and" + str(inmoov) + "points to me") elif inmoov > human: ...
unknown
codeparrot/codeparrot-clean
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
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
configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/immutable/ImmutableMultiConstructorProperties.java
A file wasn't found for an out-of-line module. Erroneous code example: ```compile_fail,E0583 mod file_that_doesnt_exist; // error: file not found for module fn main() {} ``` Please be sure that a file corresponding to the module exists. If you want to use a module named `file_that_doesnt_exist`, you need to have a ...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0583.md
# -*- coding: utf-8 -*- # # Neuron documentation build configuration file, created by # sphinx-quickstart on Fri Jan 13 10:45:35 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
unknown
codeparrot/codeparrot-clean
import unittest, sys, random, time sys.path.extend(['.','..','../..','py']) import h2o, h2o_browse as h2b, h2o_import as h2i class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): pass print "Will build clouds with incre...
unknown
codeparrot/codeparrot-clean
from sympy.vector.coordsysrect import CoordSysCartesian from sympy.vector.dyadic import Dyadic from sympy.vector.vector import Vector, BaseVector from sympy.vector.scalar import BaseScalar from sympy import sympify, diff, integrate, S def express(expr, system, system2=None, variables=False): """ Global functio...
unknown
codeparrot/codeparrot-clean
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
unknown
codeparrot/codeparrot-clean
import unittest from test import test_support import platform class PlatformTest(unittest.TestCase): def test_architecture(self): res = platform.architecture() def test_machine(self): res = platform.machine() def test_node(self): res = platform.node() def test_platform(self):...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/parser/ecmascript5/Protected/Protected4.ts] //// //// [Protected4.ts] class C { protected public m() { } } //// [Protected4.js] "use strict"; class C { m() { } }
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/Protected4.js
# Copyright (c) 2014 Intel Corporation. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this list # of conditions and the following disclaimer....
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2018, 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-common/json_schema.h
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. // // Code generated by generate-staticcheck; DO NOT EDIT. // //go:build bazel package sa4011 import ( util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes...
go
github
https://github.com/cockroachdb/cockroach
build/bazelutil/staticcheckanalyzers/sa4011/analyzer.go
from threading import Lock, Thread from django.http import HttpRequest, HttpResponse from django.test import TestCase from nose.tools import eq_ from multidb import (DEFAULT_DB_ALIAS, MasterSlaveRouter, PinningMasterSlaveRouter, get_slave) from multidb.middleware import (PINNING_COOKIE, PINNING_S...
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. import logging import os from document_parser import ParseDocument from third_party.json_schema_compiler.model import UnixName class DocumentRenderer(object...
unknown
codeparrot/codeparrot-clean
# Troubleshooting This is a document explaining how to deal with various issues on github-actions self-hosted CI. The entries may include actual solutions or pointers to Issues that cover those. ## GitHub Actions (self-hosted CI) * Deepspeed - if jit build hangs, clear out `rm -rf ~/.cache/torch_extensions/` refe...
unknown
github
https://github.com/huggingface/transformers
.github/workflows/TROUBLESHOOT.md
# mongod.conf # for documentation of all options, see: # http://docs.mongodb.org/manual/reference/configuration-options/ # Where and how to store data. storage: dbPath: %MONGO_DATA_PATH% # where to write logging data. systemLog: destination: file logAppend: true path: %MONGO_LOG_PATH%\mongod.log # network...
unknown
github
https://github.com/mongodb/mongo
buildscripts/packaging/msi/mongod.yaml
""" URL configuration for Studio's Content Libraries REST API """ from django.conf.urls import include, url from . import views app_name = 'openedx.core.djangoapps.content_libraries' # These URLs are only used in Studio. The LMS already provides all the # API endpoints needed to serve XBlocks from content libraries ...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ mode: ['client', 'hydrate'], // there's no class instance to retrieve in SSR mode get props() { return { visible: true }; }, html: ` <div>The text is hello</div> <h1>hello</h1> `, async test({ assert, component, target }) { component.visible = fa...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/binding-this-element-reactive-b/_config.js
#!/usr/bin/env bash # Configure the test environment and run the tests. set -o pipefail -eu entry_point="$1" test="$2" read -r -a coverage_branches <<< "$3" # space separated list of branches to run code coverage on for scheduled builds export COMMIT_MESSAGE export COMPLETE export COVERAGE export IS_PULL_REQUEST i...
unknown
github
https://github.com/ansible/ansible
.azure-pipelines/scripts/run-tests.sh
## Input ```javascript // @validateNoVoidUseMemo:false @validateExhaustiveMemoizationDependencies:false function Component(props) { const item = props.item; const thumbnails = []; const baseVideos = getBaseVideos(item); useMemo(() => { baseVideos.forEach(video => { const baseVideo = video.hasBaseVide...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro.expect.md
#!/usr/bin/env python #coding:utf-8 # Author: mozman # Purpose: tree walker # Created: 07.05.2010 # Copyright (c) 2010-2013 by Manfred Moitzi # License: MIT License from operator import attrgetter, lt, gt class Walker(object): __slots__ = ['_node', '_stack', '_tree'] def __init__(self, tree): self._...
unknown
codeparrot/codeparrot-clean
framework: serializer: enabled: true translator: enabled: false
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_without_translator.yml
""" ================== GMM classification ================== Demonstration of Gaussian mixture models for classification. See :ref:`gmm` for more information on the estimator. Plots predicted labels on both training and held out test data using a variety of GMM classifiers on the iris dataset. Compares GMMs with sp...
unknown
codeparrot/codeparrot-clean
from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ggplot.utils import make_iterable_ntimes from .geom import geom # Note when documenting # slope and intercept can be functions that compute the slope # and intercept using the data. If ...
unknown
codeparrot/codeparrot-clean
# vi: syntax=python:et:ts=4 import os from SCons.Script import * from config_check_utils import * def CheckSDL(context, sdl_lib = "SDL", require_version = None): if require_version: version = require_version.split(".", 2) major_version = int(version[0]) minor_version = int(version[1]) ...
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...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/lineage/__init__.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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/local/bin/python3.3 # encoding: utf-8 ''' openpt.app -- OpenPT main script OpenPT is a easy to use open source poker tracker. @author: Marcus Bitzl @license: Apache License ''' import sys import os from argparse import ArgumentParser from argparse import RawDescriptionHelpFormatter from openpt.sites ...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 2001 Andrea Arcangeli <andrea@suse.de> SuSE * Copyright (C) 2016 - 2020 Christoph Hellwig */ #include <linux/init.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/kmod.h> #include <linux/major...
c
github
https://github.com/torvalds/linux
block/bdev.c
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/native/SobolEngineOpsUtils.h> #include <c10/util/irange.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/_sobol_engine_draw_native...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/SobolEngineOps.cpp
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) from powerline.lint.markedjson import nodes from powerline.lint.markedjson import events from powerline.lint.markedjson.error import MarkedError __all__ = ['Composer', 'ComposerError'] class ComposerErr...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # This module 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
# zip([iterable, ...]) # # This function returns a list of tuples. The th tuple contains the th element from each of the argument sequences or iterables. # # If the argument sequences are of unequal lengths, then the returned list is truncated to the length of the shortest argument sequence. # Task # # The National Un...
unknown
codeparrot/codeparrot-clean
from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.db import connection from build.management.commands.base_build import Command as BaseBuild from protein.models import (Protein, ProteinConformation, ProteinSequenceType, ProteinSegment, ProteinConformatio...
unknown
codeparrot/codeparrot-clean
#![allow( clippy::cast_lossless, clippy::derive_partial_eq_without_eq, clippy::from_over_into, // Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7422 clippy::nonstandard_macro_braces, clippy::too_many_lines, clippy::trivially_copy_pass_by_ref, clippy::type_repetition_in_boun...
rust
github
https://github.com/serde-rs/serde
test_suite/tests/test_annotations.rs
# -*- coding: utf-8 -*- # Copyright 2020 Google 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...
unknown
codeparrot/codeparrot-clean
""" Implements factorial() function, and helper function obtain_factorial(). """ def obtain_factorial(x): """ Helper function obtain_factorial() for the factorial() function. Given value x, it returns the factorial of that value. """ product = 1 for ii in list(range(x)): product = produ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_str, compat_xpath, ) from ..utils import ( ExtractorError, find_xpath_attr, fix_xml_ampersands, float_or_none, HEADRequest, RegexNotFoundError, sanitized_Request, s...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 """Generates a matrix for docker releases through github actions Will output a condensed version of the matrix. Will include fllowing: * CUDA version short * CUDA full version * CUDNN version short * Image type either runtime or devel * Platform linux/arm64,linux/amd64 """ ...
python
github
https://github.com/pytorch/pytorch
.github/scripts/generate_docker_release_matrix.py
# encoding: utf-8 from __future__ import unicode_literals import re import json import datetime from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, compat_urlparse, ) from ..utils import ( encode_dict, ExtractorError, int_or_none, parse_dura...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import from datetime import date import traceback from django.db import IntegrityError from django.test import TestCase from .models import Person, ManualPrimaryKeyTest class GetOrCreateTests(TestCase): def test_get_or_create(self): p = Person.objects.create( ...
unknown
codeparrot/codeparrot-clean
# -------------------------------------------------------- # Program by Alexander.F. # # # Version Date Info # 1.0 2017 Initial Version # Python 3 - Kopiere Gesamtinhalt des Folder in ZIP-File # und vergebe weiteres freies Nummer für den Archiv # -------------------------------------------...
unknown
codeparrot/codeparrot-clean
# Authors: Rob Crittenden <rcritten@redhat.com> # # Copyright (C) 2010 Red Hat # see file 'COPYING' for use and warranty information # # 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 ver...
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 us...
unknown
codeparrot/codeparrot-clean
package server import ( "github.com/containerd/log" "github.com/moby/moby/v2/daemon/server/httputils" "github.com/moby/moby/v2/daemon/server/middleware" ) // handlerWithGlobalMiddlewares wraps the handler function for a request with // the server's global middlewares. The order of the middlewares is backwards, // ...
go
github
https://github.com/moby/moby
daemon/server/middleware.go
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/glm4v/modular_glm4v.py. # Do NOT edit this file manually as any edits will be overwritten by the generation of # ...
python
github
https://github.com/huggingface/transformers
src/transformers/models/glm4v/processing_glm4v.py
#ifndef JEMALLOC_INTERNAL_QL_H #define JEMALLOC_INTERNAL_QL_H #include "jemalloc/internal/qr.h" /* * A linked-list implementation. * * This is built on top of the ring implementation, but that can be viewed as an * implementation detail (i.e. trying to advance past the tail of the list * doesn't wrap around). *...
c
github
https://github.com/redis/redis
deps/jemalloc/include/jemalloc/internal/ql.h
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or mo...
unknown
codeparrot/codeparrot-clean