code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from django.conf import settings from django.db import connections, models, router from django.utils import translation from translations.models import Translation from translations.fields import TranslatedField isnull = """IF(!ISNULL({t1}.localized_string), {t1}.{col}, {t2}.{col}) AS {name}_{col}""" join...
unknown
codeparrot/codeparrot-clean
import tempfile import subprocess import shutil import yaml import os from nose.tools import * import scruffy from scruffy import Environment, ConfigFile, Directory from scruffy.plugin import PluginManager def test_environment_config(): e = Environment(config=ConfigFile('tests/env1/json_config')) assert e.co...
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 sys from measurements import smoothness from metrics import power from telemetry.core import exceptions from telemetry.core import wpr_modes from tele...
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
github
https://github.com/apache/airflow
.markdownlint.yml
# # $Id$ import rhnserver import config import os import up2dateErrors import up2dateUtils import string import up2dateLog import clientCaps import pickle import time from types import DictType from rhn import rpclib loginInfo = None pcklAuthFileName = "/var/spool/up2date/loginAuth.pkl" def getSystemId(): cfg ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # file: $Id$ # lib: genemail.manager # auth: Philip J Grabner <grabner@cadit.com> # date: 2013/07/09 # copy: (C) Copyright 2013 Cadit Health Inc., All Rights Reserved. #----------------------------------------------...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ## \file discrete_adjoint.py # \brief Python script for doing the discrete adjoint computation using the SU2 suite. # \author F. Palacios, T. Economon, T. Lukaczyk # \version 4.0.1 "Cardinal" # # SU2 Lead Developers: Dr. Francisco Palacios (Francisco.D.Palacios@boeing.com). # ...
unknown
codeparrot/codeparrot-clean
#!/bin/sh # Copyright (c) 2009 Jens Lehmann # Copyright (c) 2011 Alexey Shumkin (+ non-UTF-8 commit encoding tests) test_description='git rev-list --pretty=format test' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh . "$TEST_DIRECTORY"/lib-terminal.sh test_tic...
unknown
github
https://github.com/git/git
t/t6006-rev-list-format.sh
/* Copyright 2020 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/controller/cronjob/config/v1alpha1/conversion.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...
c
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/nativeio/pmdk_load.c
<!--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/mgp-str.md
import theano import theano.tensor as T import numpy as np import rnn.theano.lstm as lstm import rnn.theano.linear as linear import rnn.theano.solvers as solvers def null_func(*args, **kwargs): pass class CharRNNGraph(object): def __init__(self, n_in, n_out, layers, decoder=linear.LinearDecoder, weights=Non...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 1999-2000, Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Po...
c
github
https://github.com/opencv/opencv
3rdparty/libjasper/jas_getopt.c
"""Copyright (c) 2010-2012 David Rio Vierra Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterfa...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import functools import re from .turner import TurnerBaseIE from ..compat import ( compat_urllib_parse_urlencode, compat_urlparse, ) from ..utils import ( OnDemandPagedList, remove_start, ) class NBAIE(TurnerBaseIE): _VALID_URL = r'https?://(?:watch\.|www\....
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2008 One Laptop Per Child # # 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 option) any later version. # # This program is distribu...
unknown
codeparrot/codeparrot-clean
"""Tests for Plex server.""" import copy from plexapi.exceptions import BadRequest, NotFound from requests.exceptions import ConnectionError, RequestException from homeassistant.components.media_player import DOMAIN as MP_DOMAIN from homeassistant.components.media_player.const import ( ATTR_MEDIA_CONTENT_ID, ...
unknown
codeparrot/codeparrot-clean
# markdown is released under the BSD license # Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) # Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) # Copyright 2004 Manfred Stienstra (the original version) # # All rights reserved. # # Redistribution and use in source and binary forms, with or w...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015-2016 Cisco Systems, Inc. # # 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...
unknown
codeparrot/codeparrot-clean
import logging import re def hint_match(record, hints): for hint in hints: if re.match(hint, record): return True return False from sqlalchemy import create_engine from sqlalchemy.engine.reflection import Inspector def try_drop_test_data( user, database, root_user="postgres", host="" ...
unknown
codeparrot/codeparrot-clean
#ifndef COROUTINE_UNIVERSAL_CONTEXT_H #define COROUTINE_UNIVERSAL_CONTEXT_H 1 #if 0 #elif defined __x86_64__ # include "coroutine/amd64/Context.h" #elif defined __i386__ # include "coroutine/x86/Context.h" #elif defined __ppc__ # include "coroutine/ppc/Context.h" #elif defined __ppc64__ && defined(WORDS_BIGENDIAN) # i...
c
github
https://github.com/ruby/ruby
coroutine/universal/Context.h
"""This module implements data recording and reporting for an application. """ import logging import sys import threading import time import os import traceback import imp from functools import partial import newrelic.packages.six as six from newrelic.samplers.data_sampler import DataSampler from newrelic.core.co...
unknown
codeparrot/codeparrot-clean
// TODO: Import computed from @angular/core import {Component, signal, ChangeDetectionStrategy} from '@angular/core'; @Component({ selector: 'app-root', template: ` <div class="user-profile"> <h1>User Dashboard</h1> <div class="status-indicator" [class]="userStatus()"> <span class="status-d...
typescript
github
https://github.com/angular/angular
adev/src/content/tutorials/signals/steps/2-deriving-state-with-computed-signals/src/app/app.ts
/* * 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/main/java/org/springframework/aop/support/JdkRegexpMethodPointcut.java
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from tapi_server.models.base_model_ import Model from tapi_server.models.tapi_odu_odu_connection_end_point_spec import TapiOduOduConnectionEndPointSpec # noqa: F401,E5...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/clients/admin/internals/AdminUtils.java
# Copyright 2013 Google Inc. All Rights Reserved. """The super-group for the update manager.""" import argparse import os import textwrap from googlecloudsdk.core.util import platforms from googlecloudsdk.calliope import base from googlecloudsdk.calliope import exceptions from googlecloudsdk.core import config from...
unknown
codeparrot/codeparrot-clean
##TODO: # #getLog(day) FInish it #machines new #machines mod # import os import datetime from flask import Flask, jsonify, render_template, request, redirect, url_for from dblayer import DBlayer db = DBlayer(DEBUG=True) app = Flask(__name__, static_folder='web/static', static_url_path='') app.template_folder = "web"...
unknown
codeparrot/codeparrot-clean
/* Generated from swedish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */ #include "stem_ISO_8859_1_swedish.h" #include <stddef.h> #include "snowball_runtime.h" struct SN_local { struct SN_env z; int i_p1; }; typedef struct SN_local SN_local; #ifdef __cplusplus extern "C" { #endif extern int swedish_...
c
github
https://github.com/postgres/postgres
src/backend/snowball/libstemmer/stem_ISO_8859_1_swedish.c
use crate::Stream; use std::pin::Pin; use std::task::{Context, Poll}; use tokio::signal::unix::Signal; /// A wrapper around [`Signal`] that implements [`Stream`]. /// /// # Example /// /// ```no_run /// use tokio::signal::unix::{signal, SignalKind}; /// use tokio_stream::{StreamExt, wrappers::SignalStream}; /// /// # ...
rust
github
https://github.com/tokio-rs/tokio
tokio-stream/src/wrappers/signal_unix.rs
# @author zfedoran / http://github.com/zfedoran import os import sys import math import operator import re import json import types import shutil # ##################################################### # Globals # ##################################################### option_triangulate = True option_textures = True o...
unknown
codeparrot/codeparrot-clean
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import math import six from cryptography import utils from c...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Manages the credential information (netrc, passwords, etc). """ import getpass import logging import netrc import os import platform class CredentialsError(BaseException): """ Class to be thrown if the credentials are not found. """ pass def _getenv_or_empty(s): """ ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from collections import deque from re import sub, UNICODE from earwigbot.wiki.copyvios.markov import EMPTY_INTERSECTION from markupsafe import escape __all__ = ["highlight_delta"] def highlight_delta(context, chain, delta): degree = chain.degree - 1 highlights = [False] * degree ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright 2012-2021 BigML # # 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 ...
unknown
codeparrot/codeparrot-clean
import agents as ag import envgui as gui import random # ______________________________________________________________________________ loc_A, loc_B = (1, 1), (2, 1) # The two locations for the Vacuum world def RandomVacuumAgent(): "Randomly choose one of the actions from the vacuum environment." p = ag.Ran...
unknown
codeparrot/codeparrot-clean
"""Command-line tool to validate and pretty-print JSON Usage:: $ echo '{"json":"obj"}' | python -m json { "json": "obj" } $ echo '{ 1.2:3.4}' | python -m json Expecting property name enclosed in double quotes: line 1 column 3 (char 2) """ import json.tool if __name__ == '__main__': t...
python
github
https://github.com/python/cpython
Lib/json/__main__.py
""" CodeHilite Extension for Python-Markdown ======================================== Adds code/syntax highlighting to standard Python-Markdown code blocks. Copyright 2006-2008 [Waylan Limberg](http://achinghead.com/). Project website: <http://packages.python.org/Markdown/extensions/code_hilite.html> Contact: markdo...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2017 Lenovo, 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. # # Ansi...
unknown
codeparrot/codeparrot-clean
import os import sys import linecache from TreeWidget import TreeNode, TreeItem, ScrolledCanvas from ObjectBrowser import ObjectTreeItem, make_objecttreeitem def StackBrowser(root, flist=None, tb=None, top=None): if top is None: from Tkinter import Toplevel top = Toplevel(root) sc = ScrolledCa...
unknown
codeparrot/codeparrot-clean
// created by cgo -cdefs and then converted to Go // cgo -cdefs defs_dragonfly.go package runtime import "unsafe" const ( _EINTR = 0x4 _EFAULT = 0xe _EBUSY = 0x10 _EAGAIN = 0x23 _ETIMEDOUT = 0x3c _O_WRONLY = 0x1 _O_NONBLOCK = 0x4 _O_CREAT = 0x200 _O_TRUNC = 0x400 _O_CLOEXEC = 0x2000...
go
github
https://github.com/golang/go
src/runtime/defs_dragonfly_amd64.go
{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations \u0026 Alerts", "type": "dashb...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/input/migrated_dev_dashboards/annotations/v0alpha1.annotation-filtering.v42.json
from datetime import datetime from django.contrib import admin from django.contrib import messages from django.contrib.admin.views.decorators import staff_member_required from django.http import HttpResponse, HttpResponseRedirect from django.template.response import TemplateResponse from kuma.core.decorators import l...
unknown
codeparrot/codeparrot-clean
//! After we obtain a fresh AST fragment from a macro, code in this module helps to integrate //! that fragment into the module structures that are already partially built. //! //! Items from the fragment are placed into modules, //! unexpanded macros in the fragment are visited and registered. //! Imports are also con...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_resolve/src/build_reduced_graph.rs
""" .. autoclass:: DependencyError .. autoclass:: CaughtDependencyError .. autoclass:: DependencyLoop .. autoclass:: MissingResource .. autoclass:: RevisionNotFound .. autoclass:: PageNotFound .. autoclass:: UserNotFound .. autoclass:: UserDeleted .. autoclass:: CommentDeleted .. autoclass:: TextDeleted """ c...
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/model_doc/speech_to_text.md
#!/usr/bin/env python # 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 os import sys import tempfile import time import unittest import webbrowser import test_env import mock from buildbot.status ...
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/storage/mvcc/store.go
from django.test import TestCase from django.core import mail from myhpom.models import CloudFactoryDocumentRun, DocumentUrl from myhpom.tasks import EmailUserDocumentReviewCompleted from myhpom.tests.factories import AdvanceDirectiveFactory class EmailUserDocumentReviewCompletedTestCase(TestCase): """ * If th...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
kotlin
github
https://github.com/spring-projects/spring-framework
framework-docs/src/main/kotlin/org/springframework/docs/core/beans/java/beansjavaprogrammaticregistration/Foo.kt
#!/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. """Python API for retrieving API keys. Note that this does not have the exact same semantics as the C++ API in google_api_keys.h, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ This script demonstrates how one can script the Mayavi application by subclassing the application, create a new scene and create a few simple modules. This should be run as:: $ python test.py """ # Author: Prabhu Ramachandran <prabhu_r@users.sf.net> # Copyright (c) 2005-2007, Enthought, ...
unknown
codeparrot/codeparrot-clean
/*! \file \brief Epilogue for threadblock scoped GEMMs using Tensor Ops. The epilogue rearranges the result of a matrix product through shared memory to match canonical tensor layouts in global memory. Epilogues support conversion and reduction operations. This is a copy of cutlass/epilogue/threadblock/epil...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/transformers/cuda/mem_eff_attention/epilogue/epilogue_rescale_output.h
import contextlib import datetime import logging import os import sqlite3 import threading from typing import ( # NOQA Dict, Iterator, Optional, ) import brokkoly.resource logger = logging.getLogger(__name__) class ThreadLocalDBConnectionManager: _connections = {} # type: Dict[int, sqlite3.Connecti...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
unknown
codeparrot/codeparrot-clean
from jinja2 import BaseLoader, TemplateNotFound class ObjectLoader(BaseLoader): def get_source(self, environment, obj): return obj, None, None class VarParser(): @staticmethod def parse_kv_strings_to_dict(*args): """ Parse 1 or more string/dict objects containing template variables in a final ...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python3 """Test script for the dbm.open function based on testdumbdbm.py""" import os import unittest import glob import test.support # Skip tests if dbm module doesn't exist. dbm = test.support.import_module('dbm') _fname = test.support.TESTFN # # Iterates over every database module supported by db...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
unknown
codeparrot/codeparrot-clean
[ { "pk": "1", "model": "fixtures_regress.thingy", "fields": { "name": "Whatchamacallit" } } ]
json
github
https://github.com/django/django
tests/fixtures_regress/fixtures/thingy.json
// 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/membership/doc.go
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
unknown
codeparrot/codeparrot-clean
// // read_until.hpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_READ_UNTIL_HPP #defi...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/asio/read_until.hpp
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/iommu/qcom,iommu.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm Technologies legacy IOMMU implementations maintainers: - Konrad Dybcio <konradybcio@kernel.org> description: | Q...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/iommu/qcom,iommu.yaml
#!/usr/bin/env python # Copyright 2014 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 os import re import sys usage = """%s BUILDTYPE BUILDDIR BUILDTYPE: either chromium or chrome. BUILDDIR: The path to the outpu...
unknown
codeparrot/codeparrot-clean
//! This module ensures that if a function's ABI requires a particular target feature, //! that target feature is enabled both on the callee and all callers. use rustc_abi::{BackendRepr, CanonAbi, RegKind, X86Call}; use rustc_hir::{CRATE_HIR_ID, HirId}; use rustc_middle::mir::{self, Location, traversal}; use rustc_midd...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_monomorphize/src/mono_checks/abi_check.rs
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
unknown
codeparrot/codeparrot-clean
// // Copyright 2017 The Abseil 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 by applicable law or ...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/base/config.h
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package gossip import ( "testing" "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/util/leaktest" ) func TestNodeIDFromKey(t *t...
go
github
https://github.com/cockroachdb/cockroach
pkg/gossip/keys_test.go
########################################################################## # # Copyright (c) 2009-2013, 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
from optparse import make_option import sys from django.conf import settings from django.core.management.base import NoArgsCommand from django.core.management.color import no_style from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal from django.db import connections, router, transaction,...
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/crypto/key/KeyProviderDelegationTokenExtension.java
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'File.sha1' db.add_column('filer_file', 'sha1', self.gf('django.db.models.fields.CharField')(defaul...
unknown
codeparrot/codeparrot-clean
//! Source positions and related helper functions. //! //! Important concepts in this module include: //! //! - the *span*, represented by [`SpanData`] and related types; //! - source code as represented by a [`SourceMap`]; and //! - interned strings, represented by [`Symbol`]s, with some common symbols available stati...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_span/src/lib.rs
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'UserProfile.fr_user' db.add_column('accounts_userprofile', 'fr_user', s...
unknown
codeparrot/codeparrot-clean
#include "prism/extension.h" void ruby_init_ext(const char *name, void (*init)(void)); void Init_Prism(void) { ruby_init_ext("prism/prism.so", Init_prism); }
c
github
https://github.com/ruby/ruby
prism_init.c
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Lice...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/tesla,fsd-clock.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Tesla FSD (Full Self-Driving) SoC clock controller maintainers: - Alim Akhtar <alim.akhtar@samsung.com> - linux-fsd@t...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/tesla,fsd-clock.yaml
import copy import logging from six import iteritems import base from library.api.pgoapi.protos.POGOProtos import Enums_pb2 logger = logging.getLogger(__name__) class ReleaseMethod(base.ReleaseMethod): def process_config(self, config): self.config = config self.release_method_factory = base.Rel...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.application /** * An instance of the plugin installed to your application. * * [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.server.application.PluginI...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-core/common/src/io/ktor/server/application/PluginInstance.kt
""" A custom Strategy for python-social-auth that allows us to fetch configuration from ConfigurationModels rather than django.settings """ from .models import OAuth2ProviderConfig from social.backends.oauth import OAuthAuth from social.strategies.django_strategy import DjangoStrategy class ConfigurationModelStrategy(...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright 2004-2006 Zuza Software Foundation # # This file is part of translate. # # translate 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 # ...
unknown
codeparrot/codeparrot-clean
## Input ```javascript import {useState} from 'react'; function Component() { const [count, setCount] = useState(0); return ( <div> <button onClick={() => setCount(count - 1)}>Decrement</button> {/** * The scope for the <button> depends on just the scope for the callback, * but the p...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/merge-consecutive-scopes-deps-subset-of-decls.expect.md
#!/usr/bin/env python """ SSL server for Forge tests. - The server changes to the directory of the server script. - SSL uses "server.key" and "server.crt". - Sever performs basic static file serving. - Starts Flash cross domain policy file server. - Defaults to HTTP/HTTPS port 19400. - Defaults to Flash socket policy...
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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/platform/tstring.h
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package agent import ( "bytes" "crypto/ecdsa" "crypto/x509" "encoding/json" "encoding/pem" "os" "testing" "time" "github.com/go-jose/go-jose/v3" "github.com/go-jose/go-jose/v3/jwt" "github.com/hashicorp/vault/sdk/logical" ) const envV...
go
github
https://github.com/hashicorp/vault
command/agent/testing.go
#!python from decodes.core import * # from . import dc_base, dc_interval, dc_vec, dc_point, dc_plane, dc_cs, dc_circle if VERBOSE_FS: print("dc_cylinder.py loaded") class Cylinder(Circle): """ right circular cylinder CircleGeometry(radius, segments, thetaStart, thetaLength) PlaneGeometry(width, height...
unknown
codeparrot/codeparrot-clean
{ "_type": "prompt", "input_variables": ["input", "output"], "template": "Input: {input}\nOutput: {output}" }
json
github
https://github.com/langchain-ai/langchain
libs/core/tests/unit_tests/examples/example_prompt.json
#ifndef RUBY_TOPLEVEL_VARIABLE_H /*-*-C-*-vi:se ft=c:*/ #define RUBY_TOPLEVEL_VARIABLE_H /** * @author Ruby developers <ruby-core@ruby-lang.org> * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistr...
c
github
https://github.com/ruby/ruby
variable.h
#!/usr/bin/env python # Copyright: (c) 2017, Brian Coca <bcoca@ansible.com> # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # PYTHON_ARGCOMPLETE_OK from __future__ import annotations # ansible.cli needs to be imported first, to ensure...
python
github
https://github.com/ansible/ansible
lib/ansible/cli/inventory.py
# -*- coding: utf-8 -*- # Copyright 2009 - 2011 Machinalis: http://www.machinalis.com/ # # This file is part of Eff. # # Eff 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 ...
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 -*- # Copyright 2013 Mirantis, 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 requi...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # libnl-python documentation build configuration file, created by # sphinx-quickstart on Mon May 9 10:58:58 2011. # # 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. # ...
unknown
codeparrot/codeparrot-clean
""" Django settings for ProyectoDjango project. Generated by 'django-admin startproject' using Django 1.8.5. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Bui...
unknown
codeparrot/codeparrot-clean
from __future__ import annotations from typing import TYPE_CHECKING from scrapy.exceptions import StopDownload from tests.test_engine import ( AttrsItemsSpider, CrawlerRun, DataClassItemsSpider, DictItemsSpider, MySpider, TestEngineBase, ) from tests.utils.decorators import coroutine_test if ...
python
github
https://github.com/scrapy/scrapy
tests/test_engine_stop_download_bytes.py
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at valinux co jp> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2012 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-tests/test/com/google/common/collect/CompactHashSetTest.java
import os import stat import sys import tempfile from os.path import join, normcase, normpath, abspath, isabs, sep, dirname from django.utils.encoding import force_text from django.utils import six try: WindowsError = WindowsError except NameError: class WindowsError(Exception): pass if six.PY2: ...
unknown
codeparrot/codeparrot-clean