code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
"""A simple configuration system. Inheritance diagram: .. inheritance-diagram:: IPython.config.loader :parts: 3 Authors ------- * Brian Granger * Fernando Perez * Min RK """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # #...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2013 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
unknown
codeparrot/codeparrot-clean
######################################################################## # Copyright (c) 2020 # Daniel Plohmann <daniel.plohmann<at>mailbox<dot>org> # All rights reserved. ######################################################################## # # This file is part of apiscout # # apiscout is free software: you can ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2009 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
guava-tests/test/com/google/common/collect/ImmutableTableTest.java
import pymongo import gridfs from gridfs.errors import NoFile from xmodule.contentstore.content import XASSET_LOCATION_TAG import logging from .content import StaticContent, ContentStore, StaticContentStream from xmodule.exceptions import NotFoundError from fs.osfs import OSFS import os import json from bson.son imp...
unknown
codeparrot/codeparrot-clean
from coalib.bearlib.abstractions.Linter import linter from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY from dependency_management.requirements.DistributionRequirement import ( DistributionRequirement) @linter(executable='php', use_stderr=True, output_format='regex', output_regex=r...
unknown
codeparrot/codeparrot-clean
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
unknown
codeparrot/codeparrot-clean
from sympy import ( Abs, acos, Add, atan, Basic, binomial, besselsimp, collect,cos, cosh, cot, coth, count_ops, Derivative, diff, E, Eq, erf, exp, exp_polar, expand, expand_multinomial, factor, factorial, Float, fraction, Function, gamma, GoldenRatio, hyper, hypersimp, I, Integral, integrate, log, l...
unknown
codeparrot/codeparrot-clean
import sys import os import unittest import cStringIO import warnings import re try: import json except ImportError: import simplejson as json from support import html5lib_test_files from html5lib.tokenizer import HTMLTokenizer from html5lib import constants class TokenizerTestParser(object): def __init_...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Build script for mikrotik-arpwatch package # # Copyright (C) 2014 Biomathematics and Statistics Scotland # # Author: David Nutter (david.nutter@bioss.ac.uk) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the...
unknown
codeparrot/codeparrot-clean
/** @import { AST } from '#compiler' */ /** @import { Context } from '../types' */ import { mark_subtree_dynamic } from './shared/fragment.js'; import { validate_block_not_empty, validate_opening_tag } from './shared/utils.js'; /** * @param {AST.KeyBlock} node * @param {Context} context */ export function KeyBlock(...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/compiler/phases/2-analyze/visitors/KeyBlock.js
# # Simple Dialog # # Authors: # Nathan Hamiel # Gregory Fleischer # # Copyright (c) 2011 RAFT Team # # This file is part of RAFT. # # RAFT 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, eit...
unknown
codeparrot/codeparrot-clean
# # webappfb - Facebook tools for Google's AppEngine "webapp" Framework # # Copyright (c) 2009, Max Battcher # 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 ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true # :markup: markdown module ActionDispatch module Journey # :nodoc: module Path # :nodoc: class Pattern # :nodoc: REGEXP_CACHE = {} class << self def dedup_regexp(regexp) REGEXP_CACHE[regexp.source] ||= regexp end end ...
ruby
github
https://github.com/rails/rails
actionpack/lib/action_dispatch/journey/path/pattern.rb
""" Helper functions for creating Form classes from Django models and database field objects. """ from django.utils.translation import gettext from util import ValidationError from forms import BaseForm, DeclarativeFieldsMetaclass, SortedDictFromList from fields import Field, ChoiceField from widgets import Select, Se...
unknown
codeparrot/codeparrot-clean
# © 2017 Creu Blanca # License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html). from odoo import api, fields, models class AccountMove(models.Model): _inherit = "account.move" self_invoice_number = fields.Char(readonly=True, copy=False) set_self_invoice = fields.Boolean("Set self invoice") ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Coded by: Alejandro Negrin anegrin@vauxoo.com, # Planified by: Alejandro Negrin, Humberto Arocha, Moises Lopez # Finance by: Vauxoo. # Audited by: Humberto Arocha (hbto@vauxoo.com) y Moises Lopez (moylop260...
unknown
codeparrot/codeparrot-clean
/* 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...
c
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/version.h
#ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED #define BOOST_CURRENT_FUNCTION_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // boost/current_function.hpp - BOOST_CURRENT_FUNCTION // // Copyright 2002-2018 Peter Dimov // // Distributed...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/current_function.hpp
/* Copyright (c) 2000, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
include/decimal.h
# Copyright (C) 2016 OpenMotics BV # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribu...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2012, 2013 CERN. ## ## Invenio 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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2016-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test compact blocks (BIP 152). Version 1 compact blocks are pre-segwit (txids) Version 2 compact block...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2000, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
client/include/sslopt-vars.h
import utils import cPickle class AccountManager(object): """ This is the account manager. It provides a generic way for the user interface to query for the available registered accounts, and add or delete accounts. This class returns an Account Dictionary used by the :class:`Engine` to start...
unknown
codeparrot/codeparrot-clean
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {BlockId, HIRFunction, PrunedScopeTerminal} from '../HIR'; import {assertExhaustive, retainWhere} from '../Utils/utils'; ...
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/FlattenReactiveLoopsHIR.ts
/* This is a wrapper for parse.y */ #include "internal/parse.h" #include "internal/re.h" #include "internal/ruby_parser.h" #include "node.h" #include "rubyparser.h" #include "internal/error.h" #ifdef UNIVERSAL_PARSER #include "internal.h" #include "internal/array.h" #include "internal/bignum.h" #include "internal/c...
c
github
https://github.com/ruby/ruby
ruby_parser.c
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
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 # d...
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 GN...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *==LICENSE==* CyanWorlds.com Engine - MMOG client, server and tools Copyright (C) 2011 Cyan Worlds, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 - 2016 Huawei Technologies Co., Ltd. # 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....
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
from datetime import datetime from django.test import TestCase from django.core.exceptions import FieldError from models import Article, Reporter class ManyToOneTests(TestCase): def setUp(self): # Create a few Reporters. self.r = Reporter(first_name='John', last_name='Smith', email='john@example.c...
unknown
codeparrot/codeparrot-clean
package daemon import ( "github.com/moby/moby/api/types/container" containerpkg "github.com/moby/moby/v2/daemon/container" ) // This sets platform-specific fields func setPlatformSpecificContainerFields(ctr *containerpkg.Container, resp *container.InspectResponse) *container.InspectResponse { resp.AppArmorProfile ...
go
github
https://github.com/moby/moby
daemon/inspect_linux.go
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.contrib.auth import get_user_model User = get_user_model() class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'QuerySet.order_field' ...
unknown
codeparrot/codeparrot-clean
# Common tests for test_tkinter/test_widgets.py and test_ttk/test_widgets.py import re import tkinter from test.test_tkinter.support import (AbstractTkTest, requires_tk, tk_version, pixels_conv, tcl_obj_eq) import test.support _sentinel = object() # Options which accept all values a...
python
github
https://github.com/python/cpython
Lib/test/test_tkinter/widget_tests.py
import argparse import csv import dataclasses import json import os from common import all_experiments, Experiment, register_experiment from generate import get_arch_name import torch import torch.nn as nn from torch._inductor.runtime.benchmarking import benchmarker from torch.utils.flop_counter import FlopCounterMod...
python
github
https://github.com/pytorch/pytorch
benchmarks/gpt_fast/benchmark.py
# -*- 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
import { baseCompile as compile } from '../src' import { type RawSourceMap, SourceMapConsumer } from 'source-map-js' describe('compiler: integration tests', () => { const source = ` <div id="foo" :class="bar.baz"> {{ world.burn() }} <div v-if="ok">yes</div> <template v-else>no</template> <div v-for="(value, ...
typescript
github
https://github.com/vuejs/core
packages/compiler-core/__tests__/compile.spec.ts
#!/usr/bin/env python """ ====================== Phase Tensor ====================== Following Caldwell et al, 2004 Residual Phase Tensor following Heise et al., [2008] @UofA, 2013 (LK) Revised by Peacock, 2016 """ import copy import numpy as np import mtpy.core.edi as MTedi import mtpy.utils.calculator as MTc...
unknown
codeparrot/codeparrot-clean
# (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
unknown
codeparrot/codeparrot-clean
import os, urllib, shutil f = open("diff.html") ### make a string out of diff.html st='%s'% f.read() ### get the file name for the routine info page on http://www.netlib.org/ fileName = st.split("\"")[1] ### establish the full url of the routine by replacing filename with http://www.netlib.org url = "http://www.net...
unknown
codeparrot/codeparrot-clean
"""action_feedback model.""" from django.db import models from django.contrib.auth.models import User from django.contrib import admin from apps.widgets.smartgrid.models import Action from apps.managers.challenge_mgr import challenge_mgr from apps.admin.admin import challenge_designer_site, challenge_manager_site, de...
unknown
codeparrot/codeparrot-clean
_fixture: model_class: Comment second_greetings: post: second_welcome body: Thank you for the second welcome
unknown
github
https://github.com/rails/rails
activerecord/test/fixtures/other_comments.yml
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package cli import ( "bufio" "bytes" "context" "reflect" "regexp" "strconv" "strings" "testing" "time" "github.com/cockroachdb/cockroach/pkg/build" "github....
go
github
https://github.com/cockroachdb/cockroach
pkg/cli/node_test.go
""" This is some of the code behind 'cobbler sync'. 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 distribute...
unknown
codeparrot/codeparrot-clean
""" A class used for defining and running test suites """ import sys import subprocess from paver import tasks from paver.easy import sh from pavelib.utils.process import kill_process try: from pygments.console import colorize except ImportError: colorize = lambda color, text: text __test__ = False # do no...
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...
javascript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/rules/i18next.js
/*------------------------------------------------------------------------ * * geqo_copy.c * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/backend/optimizer/geqo/geqo_copy.c * *-----------------------------...
c
github
https://github.com/postgres/postgres
src/backend/optimizer/geqo/geqo_copy.c
from gzip import BadGzipFile from pathlib import Path import pytest from w3lib.encoding import html_to_unicode from scrapy.http import Response from scrapy.utils.gz import gunzip, gzip_magic_number from tests import tests_datadir SAMPLEDIR = Path(tests_datadir, "compressed") def test_gunzip_basic(): r1 = Respon...
python
github
https://github.com/scrapy/scrapy
tests/test_utils_gz.py
"""Support for Panasonic Blu-ray players.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.media_player import ( MediaPlayerDevice, PLATFORM_SCHEMA) from homeassistant.components.media_player.const import ( SUPPORT_PAUSE, SUPPORT_PLAY, SUPPORT_STOP, S...
unknown
codeparrot/codeparrot-clean
IBM437_TO_UCS_TBL = [ ["FF",0xA0], ["AD",0xA1], ["9B",0xA2], ["9C",0xA3], ["9D",0xA5], ["A6",0xAA], ["AE",0xAB], ["AA",0xAC], ["F8",0xB0], ["F1",0xB1], ["FD",0xB2], ["E6",0xB5], ["FA",0xB7], ["A7",0xBA], ["AF",0xBB], ["AC",0xBC], ["AB",0xBD], ["A8",0xBF], ["8E",0xC4], ["8F",0xC5]...
ruby
github
https://github.com/ruby/ruby
enc/trans/ibm437-tbl.rb
# mysql/gaerdbms.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+gaerdbms :name: Google Cloud SQL :dbapi: rdbms :...
unknown
codeparrot/codeparrot-clean
# Code from Chapter 6 of Machine Learning: An Algorithmic Perspective (2nd Edition) # by Stephen Marsland (http://stephenmonika.net) # You are free to use, change, or redistribute the code in any way you wish for # non-commercial purposes, but please maintain the name of the original author. # This code comes with no ...
unknown
codeparrot/codeparrot-clean
""" Calculate the solar position using a variety of methods/packages. """ # Contributors: # Rob Andrews (@Calama-Consulting), Calama Consulting, 2014 # Will Holmgren (@wholmgren), University of Arizona, 2014 # Tony Lorenzo (@alorenzo175), University of Arizona, 2015 # Cliff hansen (@cwhanse), Sandia National Laborator...
unknown
codeparrot/codeparrot-clean
import ast from .tools import copy_lineno, _new_constant, Call class BuiltinGuard: def __init__(self, name, reason=None): self.names = {name} self.reason = reason def add(self, guard): self.names |= guard.names def as_ast(self, node, modname): name = ast.Name(id=modname, ...
unknown
codeparrot/codeparrot-clean
# SQLite connection with python based on chapter 3. # Python 3.4 """ A script for query on Skype Database. The default location of Skype's main.db on linux is: /home/$LINUX_USER_NAME/.Skype/$SKYPE_USER_NAME """ import sqlite3 import argparse import os def printProfile(skypeDB): connection ...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package main import ( "log" "os" "github.com/hashicorp/vault/plugins/database/cassandra" "github.com/hashicorp/vault/sdk/database/dbplugin/v5" ) func main() { err := Run() if err != nil { log.Println(err) os.Exit(1) } } // Run instan...
go
github
https://github.com/hashicorp/vault
plugins/database/cassandra/cassandra-database-plugin/main.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 (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
unknown
codeparrot/codeparrot-clean
""" Fantasm: A taskqueue-based Finite State Machine for App Engine Python Docs and examples: http://code.google.com/p/fantasm/ Copyright 2010 VendAsta Technologies 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 ob...
unknown
codeparrot/codeparrot-clean
#pragma once /* #undef TRACE_ENABLED */
c
github
https://github.com/pytorch/pytorch
android/pytorch_android/src/main/cpp/cmake_macros.h
''' Touch Tracer Line Drawing Demonstration ======================================= This demonstrates tracking each touch registered to a device. You should see a basic background image. When you press and hold the mouse, you should see cross-hairs with the coordinates written next to them. As you drag, it leaves a tr...
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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from unittest import TestCase import os import shutil import filecmp import andle import andle.sdk import andle.android import andle.remote import andle.gradle import andle.version class TestAndle(TestCase): CURRENT_PATH = os.path.dirname(os.path.abspath(__file__)) SDK_PATH = CURRENT_PA...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (C) 2011 Chris Dekter # # 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 of the License, or # (at your option) any later version. # # This pr...
unknown
codeparrot/codeparrot-clean
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright 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...
go
github
https://github.com/kubernetes/kubernetes
pkg/apis/abac/v1beta1/zz_generated.deepcopy.go
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
lib/cf-ip-happy.c
/* * 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-context-support/src/test/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBeanTests.java
// 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" namespace cv { typedef bool (*HasNonZeroFunc)(const uchar*, size_t); CV_CPU_OPTIMIZATION_NAMESPACE_B...
unknown
github
https://github.com/opencv/opencv
modules/core/src/has_non_zero.simd.hpp
import logging from rx.core import ObserverBase, ObservableBase from rx.concurrency import current_thread_scheduler, timeout_scheduler from rx.disposables import CompositeDisposable log = logging.getLogger('Rx') class WindowedObserver(ObserverBase): def __init__(self, observer, observable, cancel, scheduler): ...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Tests\Mail; use Orchestra\Testbench\TestCase; use Symfony\Component\Mailer\Transport\RoundRobinTransport; class MailRoundRobinTransportTest extends TestCase { public function testGetRoundRobinTransportWithConfiguredTransports(): void { $this->app['config']->set('mail.defaul...
php
github
https://github.com/laravel/framework
tests/Mail/MailRoundRobinTransportTest.php
from sympy import I, Mul from sympy.physics.quantum import (Dagger, Commutator, AntiCommutator, qapply, Operator) from sympy.physics.quantum.pauli import (SigmaOpBase, SigmaX, SigmaY, SigmaZ, SigmaMinus, SigmaPlus, ...
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/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM SYSTEMS INC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 import re from ..utils import ( compat_urllib_request, compat_urllib_parse ) from .common import InfoExtractor class WeBSurgIE(InfoExtractor): IE_NAME = u'websurg.com' _VALID_URL = r'http://.*?\.websurg\.com/MEDIA/\?noheader=1&doi=(.*)' _TEST = { u'url': u'http://www.web...
unknown
codeparrot/codeparrot-clean
from kivy.app import App from kivy.extras.highlight import KivyLexer from kivy.uix.spinner import Spinner, SpinnerOption from kivy.uix.boxlayout import BoxLayout from kivy.uix.codeinput import CodeInput from kivy.uix.behaviors import EmacsBehavior from kivy.uix.popup import Popup from kivy.properties import ListPropert...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Doctrine\Tests\ArgumentResolver; use Doctrine\DBAL\Types...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php
#!/usr/bin/env python import sys import pandas as pd import numpy as np #Expect input of the form: #Process Read(0)/Write(1) vaddOfTaintedMem paddrOfTaintedMem Size #TaintInfo CurEIP ModuleName CallerModuleName #CallerSystemCall valueOfTaintedMem df = pd.read_csv(sys.argv[1], delim_whitespace=True) ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2016, Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * attnum.h * POSTGRES attribute number definitions. * * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/access/attnum.h ...
c
github
https://github.com/postgres/postgres
src/include/access/attnum.h
""" This module contains celery task functions for handling the management of subtasks. """ from time import time import json from uuid import uuid4 import psutil from contextlib import contextmanager import logging from celery.states import SUCCESS, READY_STATES, RETRY import dogstats_wrapper as dog_stats_api from d...
unknown
codeparrot/codeparrot-clean
/* 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/PE/utils.cpp
# Copyright 2008-2014 Nokia Solutions and Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
unknown
codeparrot/codeparrot-clean
@props(['method']) @php $type = match ($method) { 'GET', 'OPTIONS', 'ANY' => 'default', 'POST' => 'success', 'PUT', 'PATCH' => 'primary', 'DELETE' => 'error', default => 'default', }; @endphp <x-laravel-exceptions-renderer::badge type="{{ $type }}"> <x-laravel-exceptions-renderer::icons.globe ...
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/resources/exceptions/renderer/components/http-method.blade.php
# -*- coding: utf-8 -*- # Author: Douglas Creager <dcreager@dcreager.net> # This file is placed into the public domain. # Calculates the current version number. If possible, this is the # output of “git describe”, modified to conform to the versioning # scheme that setuptools uses. If “git describe” returns an error...
unknown
codeparrot/codeparrot-clean
from django.template import loader, Context from django.http import HttpResponse from django.template import RequestContext from ho import pisa import cStringIO as StringIO import cgi from django.conf import settings from django.contrib.staticfiles.finders import find def render_to_csv(output, template, context): ...
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/fs/shell/Mkdir.java
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ $ruleset = new TwigCsFixer\Ruleset\Ruleset(); $ruleset->addStandard(new TwigCsFixe...
php
github
https://github.com/symfony/symfony
.twig-cs-fixer.dist.php
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsLayerMetadata. Run with: ctest -V -R PyQgsLayerMetadata .. note:: 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, o...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- mode:python; tab-width:4; c-basic-offset:4; intent-tabs-mode:nil; -*- # ex: filetype=python tabstop=4 softtabstop=4 shiftwidth=4 expandtab autoindent smartindent # Modules from distutils.core import setup import os # Helpers def filesInDir( sDirectory ): __lsfilesInDir = list() for...
unknown
codeparrot/codeparrot-clean
import sys import os import unittest from scrapy.item import Item, Field from scrapy.utils.misc import load_object, arg_to_iter, walk_modules __doctests__ = ['scrapy.utils.misc'] class UtilsMiscTestCase(unittest.TestCase): def test_load_object(self): obj = load_object('scrapy.utils.misc.load_object') ...
unknown
codeparrot/codeparrot-clean
''' UART test for the CC3200 based boards. UART0 and UART1 must be connected together for this test to pass. ''' from machine import UART from machine import Pin import os import time mch = os.uname().machine if 'LaunchPad' in mch: uart_id_range = range(0, 2) uart_pins = [[('GP12', 'GP13'), ('GP12', 'GP13', '...
unknown
codeparrot/codeparrot-clean
//===-------------------------- ClosureSpecializer.h ------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swi...
c
github
https://github.com/apple/swift
include/swift/SILOptimizer/IPO/ClosureSpecializer.h
from __future__ import unicode_literals import locale import sys from datetime import date from django.apps import apps from django.contrib.auth import management, models from django.contrib.auth.checks import check_user_model from django.contrib.auth.management import create_permissions from django.contrib.auth.mana...
unknown
codeparrot/codeparrot-clean
''' Copyright (c) <2012> Tarek Galal <tare2.galal@gmail.com> 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, merg...
unknown
codeparrot/codeparrot-clean
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """HTML reporting for coverage.py.""" import datetime import json import os import shutil import coverage from coverage import env from coverage.backward import i...
unknown
codeparrot/codeparrot-clean
#pragma once #include <atomic> #include <condition_variable> #include <csignal> #include <cstdint> #include <mutex> #include <c10/macros/Export.h> #if defined(__APPLE__) #define C10_SUPPORTS_SIGNAL_HANDLER #elif defined(__linux__) && !defined(C10_DISABLE_SIGNAL_HANDLERS) #define C10_SUPPORTS_FATAL_SIGNAL_HANDLERS #d...
c
github
https://github.com/pytorch/pytorch
c10/util/signal_handler.h