code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
staying_in: title: Staying in '08 going_out: title: Outdoor Pursuits 2k+8
unknown
github
https://github.com/rails/rails
activerecord/test/fixtures/zines.yml
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("unspecified_app_with_conflict", "0001_initial")] operations = [ migrations.CreateModel( "Something", [ ("id", models.AutoField(primary_key=True)), ], ...
python
github
https://github.com/django/django
tests/migrations/migrations_test_apps/unspecified_app_with_conflict/migrations/0002_conflicting_second.py
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.protocols.tls}. """ from __future__ import division, absolute_import from zope.interface.verify import verifyObject from zope.interface import Interface, directlyProvides from twisted.python.compat import intToBytes, ite...
unknown
codeparrot/codeparrot-clean
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [] operations = [ migrations.CreateModel( name="IPAddressField", fields=[ ( "id", models.AutoField( ver...
python
github
https://github.com/django/django
tests/migrations/deprecated_field_migrations/0001_initial.py
from __future__ import with_statement import logging import urllib import string import sys import re import traceback import time import util import models import BeautifulSoup def find_checkout_form(soup): return soup.find('form', {'name' : lambda(x):x=='process_form_2' or x=='checkout_form'}) class LoginPage: ...
unknown
codeparrot/codeparrot-clean
// Copyright 2023 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/robustness/validate/operations.go
import itertools import os import json from collections import OrderedDict, defaultdict import sqlparse import dbt.project import dbt.utils import dbt.include import dbt.tracking from dbt.utils import get_materialization, NodeType, is_type from dbt.linker import Linker import dbt.compat import dbt.context.runtime i...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Resource object code # # Created: Wed Mar 20 13:49:41 2013 # by: The Resource Compiler for PyQt (Qt v4.8.4) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = b"\ \x00\x00\x03\x4c\ \x3c\ \xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\...
unknown
codeparrot/codeparrot-clean
# informix/base.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # coding: gbk # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Support for the Informix database. .. note:: The Informix dial...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2018 Marcus Watkins <marwatk@marcuswatkins.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from units.compat.mock import patch from ansible.modules.source_control import gitlab_hooks from ansible.module_utils._text import to_byte...
unknown
codeparrot/codeparrot-clean
**Supported operators for device: XLA_CPU_JIT** Operator | Type Constraint ------------------------------------- | --------------- `Abs` | `T={double,float,int32,int64}` `Acos` | `T={complex64,double,float,int32,int64}` `Acosh`...
unknown
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/tf2xla/g3doc/cpu_supported_ops.md
# -*- coding: utf-8 -*- # # Modifcations Copyright (C) 2009 John Hampton <pacopablo@pacopablo.com> # # Original code from Trac trunk r8199 # http://svn.edgewall.org/reops/trac/trunk # # Moved from core.py # # Original Copyright and License: # Copyright (C) 2003-2009 Edgewall Software # Copyright (C) 2003-2004 Jonas Bor...
unknown
codeparrot/codeparrot-clean
""" pydevd_vars deals with variables: resolution/conversion to XML. """ import pickle from pydevd_constants import * #@UnusedWildImport from types import * #@UnusedWildImport from pydevd_custom_frames import getCustomFrame from pydevd_xml import * from _pydev_imps import _pydev_thread try: from StringIO impor...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # Currency rate date check module for OpenERP # Copyright (C) 2012-2013 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: y...
unknown
codeparrot/codeparrot-clean
"""Test functions for the sparse.linalg._expm_multiply module """ from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import (assert_allclose, assert_, assert_equal, suppress_warnings) from scipy.sparse import SparseEfficiencyWarning import...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ The astropy.time package provides functionality for manipulating times and dates. Specific emphasis is placed on supporting time scales (e.g. UTC, TAI, UT1) and time representations (e.g. JD, MJD, ISO 8601) that are used in astr...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import json ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # # Copyright 2016 Red Hat, Inc. # # Authors: # Fam Zheng <famz@redhat.com> # # This work is licensed under the MIT License. Please see the LICENSE file or # http://opensource.org/licenses/MIT. from django.conf.urls import url from django.contrib.auth import views as auth_views from . impor...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package configs import ( "strings" "testing" version "github.com/hashicorp/go-version" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclsyntax" tfaddr "github.com/hashicorp/terraform-registry-address" "github.com/hashicorp/terr...
go
github
https://github.com/hashicorp/terraform
internal/configs/state_store_test.go
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
unknown
codeparrot/codeparrot-clean
# pylint:disable=pointless-string-statement, fixme, misplaced-comparison-constant, comparison-with-itself """Stray backslash escapes may be missing a raw-string prefix.""" __revision__ = '$Id$' # Bad escape sequences, which probably don't do what you expect. A = "\[\]\\" # [anomalous-backslash-in-string,anomalous-ba...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2008-2012 Stefan Krah. 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 co...
c
github
https://github.com/python/cpython
Modules/_decimal/_decimal.c
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. void foo() { }
c
github
https://github.com/golang/go
src/cmd/cgo/internal/test/issue8828/issue8828.c
/* * 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.http.content import io.ktor.http.* import io.ktor.http.content.PartData.* import io.ktor.utils.io.* import io.ktor.utils.io.core.* import kotlinx.coroutines.flow.* /** * Repre...
kotlin
github
https://github.com/ktorio/ktor
ktor-http/common/src/io/ktor/http/content/Multipart.kt
# Author: Mathieu Blondel <mathieu@mblondel.org> # License: BSD 3 clause import time import matplotlib.pyplot as plt from sklearn.utils import check_random_state from sklearn.metrics.pairwise import pairwise_distances from sklearn.metrics.pairwise import pairwise_kernels def plot(func): random_state = check_rand...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # muMDAU_app main / first page from muMDAU_app import app, socketio from threading import Thread from flask import request, render_template, Blueprint, url_for, redirect, session from database import ManageSQL, LoginSQL from dbmongo import User import subprocess, os from subprocess import PIPE f...
unknown
codeparrot/codeparrot-clean
# # details_tab.py # # Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may 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 v...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditio...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/media/ti,vpe.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Texas Instruments DRA7x Video Processing Engine (VPE) maintainers: - Benoit Parrot <bparrot@ti.com> description: |- The Video...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/media/ti,vpe.yaml
"""Native adapter for serving CherryPy via mod_python Basic usage: ########################################## # Application in a module called myapp.py ########################################## import cherrypy class Root: @cherrypy.expose def index(self): return 'Hi there, Ho there, Hey there' # W...
unknown
codeparrot/codeparrot-clean
// Copyright 2024 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
etcdctl/util/normalizer.go
import sys sys.path.insert(1, "../../../") import h2o, tests import pandas as pd import zipfile import statsmodels.api as sm def link_functions_poisson(): print("Read in prostate data.") h2o_data = h2o.import_file(path=h2o.locate("smalldata/prostate/prostate_complete.csv.zip")) sm_data = pd.read_csv(zipf...
unknown
codeparrot/codeparrot-clean
# (c) 2017 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from __future__ import print_function import os import sys import json from subprocess import check_call this_path = os.path.dirname(os.path.abspath(__file__)) daft_path = os.path.dirname(this_path) sys.path.insert(0, daft_path) example_dir = os.path.join(daft_path, "examples") out_dir = os.pa...
unknown
codeparrot/codeparrot-clean
import { forEachNoEmitOnErrorScenarioTscWatch } from "../helpers/noEmitOnError.js"; describe("unittests:: tsbuildWatch:: watchMode:: with noEmitOnError::", () => { forEachNoEmitOnErrorScenarioTscWatch(["-b", "-verbose"]); });
typescript
github
https://github.com/microsoft/TypeScript
src/testRunner/unittests/tsbuildWatch/noEmitOnError.ts
# This is part of the Python test suite. # The object is registered when you first run the test suite. # (and hopefully unregistered once done ;-) # Ensure the vtables in the tlb are known. from win32com import universal from win32com.server.exception import COMException from win32com.client import gencache import win...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2024 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/quantization/fbgemm_fp8.md
def func(): pass func.__module__ = None class A: def method(self): pass method.__module__ = None
python
github
https://github.com/python/cpython
Lib/test/test_pydoc/module_none.py
//===--- CompilerInvocation.cpp - CompilerInvocation methods --------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
cpp
github
https://github.com/apple/swift
lib/Frontend/CompilerInvocation.cpp
#ifndef COROUTINE_WIN32_CONTEXT_H #define COROUTINE_WIN32_CONTEXT_H 1 /* * This file is part of the "Coroutine" project and released under the MIT License. * * Created by Samuel Williams on 10/5/2018. * Copyright, 2018, by Samuel Williams. */ #pragma once #include <assert.h> #include <stddef.h> #include <stdi...
c
github
https://github.com/ruby/ruby
coroutine/win32/Context.h
from encodings.aliases import aliases import datetime from lxml import etree import urllib2 import re from django.core.urlresolvers import reverse from django.db import models from django.dispatch import receiver from django.utils.feedgenerator import Atom1Feed import feedparser PATTERN_CDATA = re.compile('<!\[cdata\[...
unknown
codeparrot/codeparrot-clean
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
unknown
codeparrot/codeparrot-clean
from helpdesk.models import Queue, CustomField, Ticket from django.test import TestCase from django.core import mail from django.test.client import Client from django.core.urlresolvers import reverse class PublicActionsTestCase(TestCase): """ Tests for public actions: - View a ticket - Add a followup ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "delegate" module ActionMailer class << self # Enqueue many emails at once to be delivered through Active Job. # When the individual job runs, it will send the email using +deliver_now+. def deliver_all_later(*deliveries, **options) _deliver_all_later("deliver...
ruby
github
https://github.com/rails/rails
actionmailer/lib/action_mailer/message_delivery.rb
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 22 22:03:23 2017 @author: alek """ import sys sys.path.append('../../') from pyDist import Nodes import logging import sys from pyDist.TaskManager import TaskManager #change these up for use in other cases taskManager = TaskManager() #taskManager...
unknown
codeparrot/codeparrot-clean
A pattern for a struct fails to specify a sub-pattern for every one of the struct's fields. Erroneous code example: ```compile_fail,E0027 struct Dog { name: String, age: u32, } let d = Dog { name: "Rusty".to_string(), age: 8 }; // This is incorrect. match d { Dog { age: x } => {} } ``` To fix this erro...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0027.md
/* 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...
cpp
github
https://github.com/nodejs/node
deps/LIEF/src/MachO/SubFramework.cpp
#!/usr/bin/env python import scipy as sp import numpy as np import pylab as plt from scipy import interpolate def getOpacity(filenumber=200, molname='ch4'): # table = np.genfromtxt('opacs/' + molname+'/fort.' + str(int(filenumber))) table=np.genfromtxt('http://www.ucolick.org/~cmorley/data/opacities/'+molname...
unknown
codeparrot/codeparrot-clean
import wx import os import static import threading import inspect import image_viewer from optparse import OptionParser import sys try: from maggregator.src.multiAggregator import main_aggregator import features from features import * except: sys.path.append(".") sys.path.append('./maggregator') ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class PasswordField < TextField # :nodoc: def render @options = { value: nil }.merge!(@options) super end end end end end
ruby
github
https://github.com/rails/rails
actionview/lib/action_view/helpers/tags/password_field.rb
"""Tests for making sure experimental imports work as expected.""" import textwrap import pytest from sklearn.utils._testing import assert_run_python_script_without_output from sklearn.utils.fixes import _IS_WASM @pytest.mark.xfail(_IS_WASM, reason="cannot start subprocess") def test_imports_strategies(): # Mak...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/experimental/tests/test_enable_iterative_imputer.py
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import datetime from collections import OrderedDict from django.contrib.auth.models import User from django.test import TestCase from .models import Order, RevisionableModel, TestObject class ExtraRegressTests(TestCase): def setUp(self): self.u = User.objects.cre...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/serialization/Serde.java
initialized = True def main(): print("Hello world!") if __name__ == '__main__': main()
python
github
https://github.com/python/cpython
Lib/__phello__/__init__.py
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.exceptions.misusing; import org.mockito.exceptions.base.MockitoException; public class UnfinishedStubbingException extends MockitoException { private static final long seria...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/exceptions/misusing/UnfinishedStubbingException.java
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : Virtual layers plugin for DB Manager Date : December 2015 copyright : (C) 2015 by Hugo Mercier email : hugo dot mercier at oslandia dot com *******...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='session ID in capabilities' . ./test-lib.sh REPO="$(pwd)/repo" LOCAL_PRISTINE="$(pwd)/local_pristine" test_expect_success 'setup repos for session ID capability tests' ' git init "$REPO" && test_commit -C "$REPO" a && git clone "file://$REPO" "$LOCAL_PRISTINE" && test_commit -C "$REP...
unknown
github
https://github.com/git/git
t/t5705-session-id-in-capabilities.sh
# conftest.py # Copyright (c) 2013-2019 Pablo Acosta-Serafini # See LICENSE for details # pylint: disable=C0111,C0411,C0413,E0012,E0611,E1101,E1103,F0401,W0212 # Standard library imports import os import pickle import sys import warnings if sys.hexversion < 0x03000000: import __builtin__ else: import builtins...
unknown
codeparrot/codeparrot-clean
# 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 distributed in the hope that ...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Database\Eloquent\Casts; use BackedEnum; use Illuminate\Contracts\Database\Eloquent\Castable; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Support\Collection; use function Illuminate\Support\enum_value; class AsEnumArrayObject implements Castable { /** ...
php
github
https://github.com/laravel/framework
src/Illuminate/Database/Eloquent/Casts/AsEnumArrayObject.php
''' Created on May 2, 2012 @package: superdesk source @copyright: 2012 Sourcefabric o.p.s. @license: http://www.gnu.org/licenses/gpl-3.0.txt @author: Gabriel Nistor Contains the SQL alchemy meta for source API. ''' from ..api.source import Source from sqlalchemy.dialects.mysql.base import INTEGER from sqlalchemy.orm...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import sys from typing import ( # NOQA Dict, Set, Type, ) import six from django.test import TestCase from django_extensions.management.commands import shell_plus class AutomaticShellPlusImportsTestCase(TestCase): def setUp(self): super(AutomaticShellPlusImportsTestCa...
unknown
codeparrot/codeparrot-clean
- vars: inv: '{{limited.stdout|from_yaml}}' output_dir: '{{ lookup("env", "OUTPUT_DIR", default=undef()) }}' delegate_to: localhost block: - name: check baseline shell: ansible-inventory -i '{{ role_path }}/files/valid_sample.yml' --list --yaml > '{{ output_dir }}/yaml_inv.yml' - name: run validati...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-inventory/tasks/yaml_output.yml
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. #include "precomp.hpp" #include <opencv2/core/utils/configuration.private.hpp> #include <opencv2/core/utils/logger.hpp> #inc...
cpp
github
https://github.com/opencv/opencv
modules/core/src/logger.cpp
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). # All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
unknown
codeparrot/codeparrot-clean
// 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
tests/integration/v3election_grpc_test.go
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgwidgetshader" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osgDB from osgpypp import osgWidget # Translated from file 'osgwidgetshader.cpp' # -*-c++-*- osgWidget...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true Before do FileUtils.rm_rf(Paths.test_dir) if Paths.test_dir.exist? FileUtils.mkdir_p(Paths.test_dir) unless Paths.test_dir.directory? Dir.chdir(Paths.test_dir) @timezone_before_scenario = ENV["TZ"] end # After do FileUtils.rm_rf(Paths.test_dir) if Paths.test_dir.exist? Paths...
ruby
github
https://github.com/jekyll/jekyll
features/step_definitions.rb
'''OpenGL extension SGIX.async This module customises the behaviour of the OpenGL.raw.GL.SGIX.async to provide a more Python-friendly API Overview (from the spec) This extension provides a framework for asynchronous OpenGL commands. It also provides commands allowing a program to wait for the completion of async...
unknown
codeparrot/codeparrot-clean
/* * "git clean" builtin command * * Copyright (C) 2007 Shawn Bohrer * * Based on git-clean.sh by Pavel Roskin */ #define USE_THE_REPOSITORY_VARIABLE #define DISABLE_SIGN_COMPARE_WARNINGS #include "builtin.h" #include "abspath.h" #include "config.h" #include "dir.h" #include "environment.h" #include "gettext.h"...
c
github
https://github.com/git/git
builtin/clean.c
from __future__ import print_function import os import os.path as op from nose.tools import assert_true, assert_raises from nose.plugins.skip import SkipTest import numpy as np from numpy.testing import assert_array_equal, assert_allclose, assert_equal import warnings from mne.datasets import testing from mne import ...
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/kernels/data/text_line_dataset_op.h
# -*- coding: utf-8 -*- import pytest from cookiecutter import exceptions, vcs @pytest.mark.parametrize('repo_url, exp_repo_type, exp_repo_url', [ ( 'git+https://github.com/pytest-dev/cookiecutter-pytest-plugin.git', 'git', 'https://github.com/pytest-dev/cookiecutter-pytest-plugin.git' ...
unknown
codeparrot/codeparrot-clean
from cornice import Service from daybed.backends.exceptions import CredentialsAlreadyExist from daybed.tokens import get_hawk_credentials, hmac_digest from daybed.views.errors import forbidden_view tokens = Service(name='tokens', path='/tokens', description='Tokens') token = Service(name='token', path='/token', descr...
unknown
codeparrot/codeparrot-clean
#!/bin/sh -eu # SPDX-License-Identifier: GPL-2.0 [ ! -x "$(command -v "$1")" ] && exit 1 tmp_file=$(mktemp) trap "rm -f $tmp_file" EXIT cat << EOF >$tmp_file static inline int u(const int *q) { __typeof_unqual__(*q) v = *q; return v; } EOF # sparse happily exits with 0 on error so validate # there is none on stde...
unknown
github
https://github.com/torvalds/linux
scripts/checker-valid.sh
#ifndef HAVE_DES_TABLES /* Initial key schedule permutation */ static const C_block PC1ROT[64/CHUNKBITS][1<<CHUNKBITS] = { { {{ 0, 0, 0, 0, 0, 0, 0, 0,}}, {{ 0, 0, 0, 0, 0, 0, 0, 0,}}, {{ 0, 0, 1, 0, 0, 0, 0, 0,}}, {{ 0, 0, 1, 0, 0, 0, 0, 0,}}, {{ 0, 0, 0, 1, 0, 0, 0, ...
c
github
https://github.com/ruby/ruby
missing/des_tables.c
#!/usr/bin/env python import sys import string import os import os.path import glob import commands gnu_warnings = { # ( warning_string, warno, src_excluded ) 3 : ( 'Unused variable', ['12_hide_mpi','65_psp','68_dmft'] ), 4 : ( 'Unused dummy argument', ['65_psp'] ), 5 : ( 'Nonstandard type declaration...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0 %YAML 1.2 --- $id: http://devicetree.org/schemas/mtd/allwinner,sun4i-a10-nand.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Allwinner A10 NAND Controller maintainers: - Chen-Yu Tsai <wens@csie.org> - Maxime Ripard <mripard@kernel.org> properties: compati...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml
#pragma once #include <typeindex> #include <memory> #include <c10/macros/Export.h> #include <c10/macros/Macros.h> #include <c10/util/Exception.h> namespace c10 { struct ClassType; using ClassTypePtr = std::shared_ptr<ClassType>; TORCH_API c10::ClassTypePtr getCustomClassTypeImpl(const std::type_index &tindex); te...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/core/custom_class.h
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("admin", "0002_logentry_remove_auto_add"), ] # No database changes; adds choices to action_flag. operations = [ migrations.AlterField( model_name="logentry", name="...
python
github
https://github.com/django/django
django/contrib/admin/migrations/0003_logentry_add_action_flag_choices.py
# -*- coding: utf-8 -*- # # Copyright 2003, 2004 Norwegian University of Science and Technology # # This file is part of Network Administration Visualized (NAV) # # NAV 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 Foun...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package command import ( "fmt" "strings" "github.com/hashicorp/cli" "github.com/posener/complete" ) var ( _ cli.Command = (*OperatorRotateCommand)(nil) _ cli.CommandAutocomplete = (*OperatorRotateCommand)(nil) ) type OperatorR...
go
github
https://github.com/hashicorp/vault
command/rotate.go
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com> # 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_...
unknown
codeparrot/codeparrot-clean
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class NamedEndblockTests(SimpleTestCase): @setup({'namedendblocks01': '1{% block first %}_{% block second %}' '2{% endblock second %}_{% endblock first %}3'}) def t...
unknown
codeparrot/codeparrot-clean
function Component() { const renderItem = item => { // Normally we assume that it's safe to mutate globals in a function passed // as a prop, because the prop could be used as an event handler or effect. // But if the function returns JSX we can assume it's a render helper, ie // called during render,...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-mutate-global-in-render-helper-prop.js
""" Various exceptions that are specific to the SES module. """ from boto.exception import BotoServerError class SESError(BotoServerError): """ Sub-class all SES-related errors from here. Don't raise this error directly from anywhere. The only thing this gets us is the ability to catch SESErrors separa...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 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.apac...
unknown
codeparrot/codeparrot-clean
import logging import requests from sentry.utils import json from sentry.utils.cache import cache from simplejson.decoder import JSONDecodeError from BeautifulSoup import BeautifulStoneSoup from django.utils.datastructures import SortedDict log = logging.getLogger(__name__) CACHE_KEY = "SENTRY-JIRA-%s-%s" class JIRA...
unknown
codeparrot/codeparrot-clean
#include "test/jemalloc_test.h" #define BATCH_MAX ((1U << 16) + 1024) static void *global_ptrs[BATCH_MAX]; #define PAGE_ALIGNED(ptr) (((uintptr_t)ptr & PAGE_MASK) == 0) static void verify_batch_basic(tsd_t *tsd, void **ptrs, size_t batch, size_t usize, bool zero) { for (size_t i = 0; i < batch; ++i) { void *p...
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/batch_alloc.c
//===--- MacroDiscriminatorContext.h - Macro Discriminators -----*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
c
github
https://github.com/apple/swift
include/swift/AST/MacroDiscriminatorContext.h
import copy import datetime import json import uuid from django.core.exceptions import NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import MaxValueValidator, RegexValidator from django.forms import ( BooleanField, BoundField, CharField, Chec...
python
github
https://github.com/django/django
tests/forms_tests/tests/test_forms.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
unknown
codeparrot/codeparrot-clean
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
unknown
codeparrot/codeparrot-clean
class Solution: # @param board, a list of lists of 1 length string # @param word, a string # @return a boolean def __init__(self): self.board = [] self.word = "" def exist(self, board, word): self.word = word if len(self.word) == 0: return True s...
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