code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/usr/bin/env python3 import math import autoprop from vecrec import Vector, Rect from glooey.helpers import * @autoprop class Grid: def __init__(self, *, bounding_rect=None, min_cell_rects=None, num_rows=0, num_cols=0, padding=None, inner_padding=None, outer_padding=None, row_heights=No...
unknown
codeparrot/codeparrot-clean
""" Python Character Mapping Codec cp1026 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP1026.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,inp...
unknown
codeparrot/codeparrot-clean
from common_fixtures import * # NOQA from gdapi import ApiError @pytest.fixture(scope='module') def user_client(context): return context.user_client def _user_preference(client, name=None): if name is None: name = random_str() preference = client.wait_success(client.create_user_preference( ...
unknown
codeparrot/codeparrot-clean
from Screens.Screen import Screen from Components.ActionMap import ActionMap from Components.Harddisk import harddiskmanager from Components.MenuList import MenuList from Components.Label import Label from Components.Pixmap import Pixmap from Components.Task import job_manager from Screens.MessageBox import MessageBox ...
unknown
codeparrot/codeparrot-clean
import codecs import operator import os import tempfile import textwrap from mako.template import Template from .. import Messages, blocks from ..Constants import TOP_BLOCK_FILE_MODE from .FlowGraphProxy import FlowGraphProxy from ..utils import expr_utils DATA_DIR = os.path.dirname(__file__) PYTHON_TEMPLATE = os.p...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Generated Thu Jun 11 18:43:54 2009 by generateDS.py. # import sys import getopt from string import lower as str_lower from xml.dom import minidom from xml.dom import Node # # User methods # # Calls to the methods in these classes are generated by generateDS.py. # You can replace these metho...
unknown
codeparrot/codeparrot-clean
import { expect, test } from 'vitest' import { buildDesignSystem } from '../../design-system' import { Theme } from '../../theme' import { resolveConfig } from './resolve-config' test('top level theme keys are replaced', () => { let design = buildDesignSystem(new Theme()) let { resolvedConfig, replacedThemeKeys }...
typescript
github
https://github.com/tailwindlabs/tailwindcss
packages/tailwindcss/src/compat/config/resolve-config.test.ts
:host { display: inline; .function { &:hover { background: var(--blue-02); color: white; cursor: pointer; } } }
unknown
github
https://github.com/angular/angular
devtools/projects/ng-devtools/src/lib/shared/object-tree-explorer/property-preview/property-preview.component.scss
package client import ( "context" "encoding/json" "fmt" "io" "math/rand" "net/http" "testing" "time" cerrdefs "github.com/containerd/errdefs" "github.com/moby/moby/api/types/common" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) // TestSetHostHeader should set fake host for local communicatio...
go
github
https://github.com/moby/moby
client/request_test.go
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/clients/InFlightRequests.java
# Copyright (C) 2011 Google Inc. All rights reserved. # Copyright (C) 2011 Code Aurora Forum. 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 th...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Managed I.T. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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 r...
unknown
codeparrot/codeparrot-clean
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
unknown
codeparrot/codeparrot-clean
"""Unit tests for the buildscripts.resmokelib.hang_analyzer.gen_hang_analyzer_tasks module.""" import sys import unittest from unittest.mock import MagicMock, patch from buildscripts.resmokelib.hang_analyzer.gen_hang_analyzer_tasks import ( GENERATED_TASK_PREFIX, BazelCoreAnalysisTaskGenerator, CoreInfo, ...
python
github
https://github.com/mongodb/mongo
buildscripts/tests/resmokelib/hang_analyzer/test_gen_hang_analyzer_tasks.py
#!/usr/bin/env python # encoding: utf-8 """ idcviewtest.py Created by QingFeng on 2008-03-17. Copyright (c) 2007 xBayDNS Team. All rights reserved. """ import basetest import logging.config import os import pwd import shutil import tempfile import time import unittest log = logging.getLogger('xbaydns.tests.idcviewte...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import socket from .models import Response from .packages.urllib3.poolmanager import PoolManager, ProxyManager from .packages.urllib3.response import...
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 os import unittest from telemetry.core import discover from telemetry.core import util class DiscoverTest(unittest.TestCase): def setUp(self): ...
unknown
codeparrot/codeparrot-clean
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013-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 p...
unknown
codeparrot/codeparrot-clean
## -*- coding: utf-8 -*- ## (C) 2015 Muthiah Annamalai, ## This module is part of solthiruthi project under open-tamil umbrella. ## This code maybe used/distributed under MIT LICENSE. from __future__ import print_function import abc import codecs import copy from tamil import utf8 # Suffix removal algorithm class Re...
unknown
codeparrot/codeparrot-clean
from __future__ import division, print_function from pint import UnitRegistry from pint.quantity import _Quantity import sys if sys.version_info[0] >= 3: string_type = str else: string_type = basestring ''' :copyright: 2016 by The Autoprotocol Development Team, see AUTHORS for more details. :l...
unknown
codeparrot/codeparrot-clean
from rackattack import api import socket import time import subprocess def defaultRequirement(imageHint="vanilla"): labelRegex = "solvent__rootfs-vanilla__rootfs__.*__clean" lines = subprocess.check_output(["osmosis", "listlabels", labelRegex]).strip() if len(lines) == 0: raise Exception("Local osm...
unknown
codeparrot/codeparrot-clean
import { createUser, findUser, validatePassword } from "../lib/user"; import { setLoginSession, getLoginSession } from "../lib/auth"; import { removeTokenCookie } from "../lib/auth-cookies"; import { GraphQLError } from "graphql"; export const resolvers = { Query: { async viewer(_root, _args, context, _info) { ...
typescript
github
https://github.com/vercel/next.js
examples/api-routes-apollo-server-and-client-auth/apollo/resolvers.ts
# coding=utf-8 """Help for batch runner dialog.""" from safe.utilities.i18n import tr from safe import messaging as m from safe.messaging import styles INFO_STYLE = styles.INFO_STYLE __author__ = 'ismailsunni' def batch_help(): """Help message for Batch Dialog. .. versionadded:: 3.2.1 :returns: A mess...
unknown
codeparrot/codeparrot-clean
# Font Awesome 5.0.4 Thanks for downloading Font Awesome! We're so excited you're here. Our documentation is available online. Just head here: https://fontawesome.com
unknown
github
https://github.com/django/django
docs/_theme/djangodocs/static/fontawesome/README.md
# -*- coding: utf-8 -*- from openerp import models, fields, api, _ import openerp.addons.decimal_precision as dp class ProductSetAd(models.TransientModel): _name = 'product.set.add' _rec_name = 'product_set_id' _descritpion = "Wizard model to add product set into a quotation" product_set_id = fields.M...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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 import os import json import pytest import sys from nose.plugins.skip imp...
unknown
codeparrot/codeparrot-clean
#! python # # Python Serial Port Extension for Win32, Linux, BSD, Jython # see __init__.py # # This module implements a special URL handler that uses the port listing to # find ports by searching the string descriptions. # # (C) 2011 Chris Liechti <cliechti@gmx.net> # this is distributed under a free software license, ...
unknown
codeparrot/codeparrot-clean
// Copyright 2024 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. //go:build unix package syscall import _ "unsafe" // for linkname // mmap should be an internal detail, // but widely used packages access it using linkname....
go
github
https://github.com/golang/go
src/syscall/linkname_unix.go
""" Django settings for daspi project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impo...
unknown
codeparrot/codeparrot-clean
# 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 distributed in the hope that it will be useful, but ...
unknown
codeparrot/codeparrot-clean
import numpy from pt import configs import operator_benchmark as op_bench import torch import torch.ao.nn.qat as nnqat from torch.ao.quantization import default_embedding_qat_qconfig """ Microbenchmarks for QAT Embedding + EmbeddingBag operators. """ class QATEmbeddingBagBenchmark(op_bench.TorchBenchmarkBase): ...
python
github
https://github.com/pytorch/pytorch
benchmarks/operator_benchmark/pt/qatembedding_ops_test.py
"""SPOJ Problem Set (classical) 2148. Candy III Problem code: CANDY3 A class went to a school trip. And, as usually, all N kids have got their backpacks stuffed with candy. But soon quarrels started all over the place, as some of the kids had more candies than others. Soon, the teacher realized that he has to step i...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.utilities.gitlab import GitLabAPIWrapper # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling option...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/utilities/gitlab.py
from __future__ import unicode_literals import copy import inspect import warnings from itertools import chain from django.apps import apps from django.conf import settings from django.core import checks from django.core.exceptions import ( NON_FIELD_ERRORS, FieldDoesNotExist, FieldError, MultipleObjectsReturned,...
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 b...
java
github
https://github.com/spring-projects/spring-framework
framework-docs/src/main/java/org/springframework/docs/integration/jms/jmstxparticipation/ExternalTxJmsConfiguration.java
// Copyright 2018 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 agr...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/base/internal/hide_ptr.h
<?php $container->loadFromExtension('framework', [ 'workflows' => [ 'my_workflow' => [ 'type' => 'workflow', 'places' => [ 'first', 'last', ], 'transitions' => [ 'go' => [ 'from' => [ ...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/workflow_without_support_and_support_strategy.php
# -*- coding: UTF-8 -*- # Copyright (C) 2008 Gautier Hayoun <gautier.hayoun@itaapy.com> # Copyright (C) 2008 Juan David Ibáñez Palomar <jdavid@itaapy.com> # # 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 F...
unknown
codeparrot/codeparrot-clean
# Authors: # Rob Crittenden <rcritten@redhat.com> # Pavel Zuna <pzuna@redhat.com> # # Copyright (C) 2010 Red Hat # see file 'COPYING' for use and warranty information # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # th...
unknown
codeparrot/codeparrot-clean
set -e for dir in ./src/src/mongo/db/modules/*; do if test -f $dir/evergreen/fetch_images.sh; then bash $dir/evergreen/fetch_images.sh fi done
unknown
github
https://github.com/mongodb/mongo
evergreen/fetch_module_images.sh
# 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
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the fol...
cpp
github
https://github.com/opencv/opencv
3rdparty/openexr/IlmImf/ImfIntAttribute.cpp
#!/usr/bin/python # walk vips and generate member definitions for all operators # sample member definition: # VImage VImage::invert( VOption *options ) # throw( VError ) # { # VImage out; # # call( "invert", # (options ? options : VImage::option())-> # set( "in", *this )-> # set( "out", &out ) ); # # retu...
unknown
codeparrot/codeparrot-clean
use ignore::gitignore::GitignoreBuilder; const IGNORE_FILE: &'static str = "tests/gitignore_skip_bom.gitignore"; /// Skip a Byte-Order Mark (BOM) at the beginning of the file, matching Git's /// behavior. /// /// Ref: <https://github.com/BurntSushi/ripgrep/issues/2177> #[test] fn gitignore_skip_bom() { let mut bu...
rust
github
https://github.com/BurntSushi/ripgrep
crates/ignore/tests/gitignore_skip_bom.rs
# 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
import os.path, subprocess, sys from build.project import Project class AutotoolsProject(Project): def __init__(self, url, alternative_url, md5, installed, configure_args=[], autogen=False, cppflags='', ldflags='', libs='', share...
unknown
codeparrot/codeparrot-clean
from django.db.backends.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated MySQL column # types, as strings. Column-type strings can contain format strings; they'll # be interpolated against the values of Field.__dict_...
unknown
codeparrot/codeparrot-clean
{ "KILL": { "summary": "Terminates a function during execution.", "complexity": "O(1)", "group": "scripting", "since": "7.0.0", "arity": 2, "container": "FUNCTION", "function": "functionKillCommand", "command_flags": [ "NOSCRIPT", ...
json
github
https://github.com/redis/redis
src/commands/function-kill.json
# 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. import logging import os import sys import pyauto_functional # Must come before pyauto (and thus, policy_base). import policy_base sys.path.append('/u...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (C) 2009 Google 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
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui_operationcreator.ui' # # Created: Sun Feb 9 00:21:14 2014 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 exc...
unknown
codeparrot/codeparrot-clean
#include <ATen/native/vulkan/ops/Common.h> #include <torch/library.h> namespace at { namespace native { namespace vulkan { namespace ops { namespace { using namespace api::utils; Scalar _local_scalar_dense(const Tensor& self) { TORCH_CHECK( self.dtype() == ScalarType::Float, "Only float dtype is supported")...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/vulkan/ops/Scalar.cpp
package tarsum import ( "archive/tar" "errors" "io" "sort" "strconv" "strings" ) // Version is used for versioning of the TarSum algorithm // based on the prefix of the hash used // i.e. "tarsum+sha256:e58fcf7418d4390dec8e8fb69d88c06ec07039d651fedd3aa72af9972e7d046b" type Version int // Prefix of "tarsum" cons...
go
github
https://github.com/moby/moby
daemon/builder/remotecontext/internal/tarsum/versioning.go
import numpy as np import pytest from pandas.core.arrays import TimedeltaArray class TestTimedeltaArrayConstructor: def test_other_type_raises(self): msg = r"dtype bool cannot be converted to timedelta64\[ns\]" with pytest.raises(TypeError, match=msg): TimedeltaArray._from_sequence(np....
python
github
https://github.com/pandas-dev/pandas
pandas/tests/arrays/timedeltas/test_constructors.py
# hgweb/wsgicgi.py - CGI->WSGI translator # # Copyright 2006 Eric Hopper <hopper@omnifarious.org> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. # # This was originally copied from the public domain code at # http://www.python.org...
unknown
codeparrot/codeparrot-clean
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
unknown
codeparrot/codeparrot-clean
""" django-guardian helper functions. Functions defined within this module should be considered as django-guardian's internal functionality. They are **not** guaranteed to be stable - which means they actual input parameters/output type may change in future releases. """ from __future__ import unicode_literals import ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import time from openerp.report import report_sxw from openerp import pooler class account_voucher(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(account_voucher, self).__init__(cr, uid, name, context=context) self.localcontext.update({ ...
unknown
codeparrot/codeparrot-clean
# Copyright: (c) 2018, Pluribus Networks # 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 import json from units.compat.mock import patch from ansible.modules.network.netvisor import pn...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ wirexfers.protocols.ipizza ~~~~~~~~~~~~~~~~~~~~~~~~~~ IPizza protocol implementations. :copyright: (c) 2012-2014, Priit Laes :license: ISC, see LICENSE for more details. """ from time import time from base64 import b64encode, b64decode from Crypto import Random from Cr...
unknown
codeparrot/codeparrot-clean
# TLS and basic authentication configuration example. # # Additionally, a certificate and a key file are needed. tls_server_config: cert_file: server.crt key_file: server.key # Usernames and passwords required to connect to Prometheus. # Passwords are hashed with bcrypt: https://github.com/prometheus/exporter-tool...
unknown
github
https://github.com/prometheus/prometheus
documentation/examples/web-config.yml
#!/usr/bin/env python '''Example of simple text wrapping without using layout. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' from pyglet.gl import * from pyglet.window import Window from pyglet.window import key from pyglet import clock from pyglet import font from scene2d.textsprite import * window =...
unknown
codeparrot/codeparrot-clean
import numpy as np from numpy import dot, einsum from numpy import tensordot as tdot from scipy.optimize import minimize import ctm import gates def _make_double_layer_tensor(a, D): return einsum(a, [8,0,2,4,6], a.conj(), [8,1,3,5,7]).reshape([D**2]*4) def _itebd_square_fu_singlebond(a, b, abg, env): tdot(b, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env ptatioython # -*- coding: utf-8 -*- ''' Created on May 18, 2016 @author: riccardo ''' from __future__ import print_function import os import sys # @UnusedImport from gfzreport.templates.network.core.utils import relpath from gfzreport.templates.network.core import get_noise_pdfs_content, gen_title,\ ...
unknown
codeparrot/codeparrot-clean
import numpy as np import pytest import pandas as pd from pandas import Timedelta import pandas._testing as tm from pandas.core import nanops from pandas.core.arrays import TimedeltaArray class TestReductions: @pytest.mark.parametrize("name", ["std", "min", "max", "median", "mean"]) def test_reductions_empty(...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/arrays/timedeltas/test_reductions.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ] operations = [ migrations.CreateModel( ...
unknown
codeparrot/codeparrot-clean
// // registered_buffer.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_REGIST...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/asio/registered_buffer.hpp
// eslint-disable-next-line @typescript-eslint/no-var-requires const plugins = require("scripts/temp/config-plugins"); /** * JSS configuration object */ export interface JssConfig extends Record<string, string | undefined> { sitecoreApiKey?: string; sitecoreApiHost?: string; jssAppName?: string; graphQLEndpo...
typescript
github
https://github.com/vercel/next.js
examples/cms-sitecore-xmcloud/scripts/config/index.ts
""" WSGI config for testproject project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATIO...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implement the realm for and run on port 8800 a PB service which allows both anonymous and username/password based access. Successful username/password-based login requests given an instance of MyPerspective with a name ...
unknown
codeparrot/codeparrot-clean
/* pngrio.c - functions for data input * * Copyright (c) 2018-2025 Cosmin Truta * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson * Copyright (c) 1996-1997 Andreas Dilger * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. * * This code is released under the libpng license. * For condi...
c
github
https://github.com/opencv/opencv
3rdparty/libpng/pngrio.c
use rustc_abi as abi; use rustc_middle::mir::interpret::{ConstAllocation, Scalar}; use super::BackendTypes; pub trait ConstCodegenMethods: BackendTypes { // Constant constructors fn const_null(&self, t: Self::Type) -> Self::Value; /// Generate an uninitialized value (matching uninitialized memory in MIR)....
rust
github
https://github.com/rust-lang/rust
compiler/rustc_codegen_ssa/src/traits/consts.rs
# Copyright (c) 2014 Cisco Systems 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 re...
unknown
codeparrot/codeparrot-clean
kind: Bar apiVersion: company.com/v1 metadata: name: test labels: pruneGroup: "true" someField: field1 otherField: field2
unknown
github
https://github.com/kubernetes/kubernetes
hack/testdata/CRD/bar.yaml
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from flask import request from indico.core import signals from i...
unknown
codeparrot/codeparrot-clean
import json import os import time from threading import Thread from libmproxy import controller, proxy from netlib import http_auth from testfixtures import LogCapture from twisted.internet import defer from twisted.trial.unittest import TestCase from scrapy.utils.test import get_crawler from scrapy.http import Reque...
unknown
codeparrot/codeparrot-clean
"""PandaSurvey includes two unique datasets for testing purpuses: `People` and a sample study. The `People` file is from the 2010 US Census. The sample study is from a small survey performed at InContext Solutions in 2014 (specific survey details withheld)""" import os import pandas def _path(name): root, _ = os....
unknown
codeparrot/codeparrot-clean
'''tzinfo timezone information for Australia/ACT.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class ACT(DstTzInfo): '''Australia/ACT timezone definition. See datetime.tzinfo for details''' zone = 'Australia/ACT' _utc_t...
unknown
codeparrot/codeparrot-clean
# How to use Composer behind a proxy Composer, like many other tools, uses environment variables to control the use of a proxy server and supports: - `http_proxy` - the proxy to use for HTTP requests - `https_proxy` - the proxy to use for HTTPS requests - `CGI_HTTP_PROXY` - the proxy to use for HTTP requests in a non...
unknown
github
https://github.com/composer/composer
doc/faqs/how-to-use-composer-behind-a-proxy.md
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") else: access = Serv...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function import numpy as np from numpy.testing import assert_almost_equal import matplotlib.pyplot as plt import statsmodels.sandbox.tsa.fftarma as fa from statsmodels.tsa.descriptivestats import TsaDescriptive from statsmodels.tsa.arma_mle import Arma x = fa.ArmaFft([1, -0.5], [1., 0.4], ...
unknown
codeparrot/codeparrot-clean
"""Support for exposing NX584 elements as sensors.""" import logging import threading import time from nx584 import client as nx584_client import requests import voluptuous as vol from homeassistant.components.binary_sensor import ( DEVICE_CLASS_OPENING, DEVICE_CLASSES, PLATFORM_SCHEMA, BinarySensorEn...
unknown
codeparrot/codeparrot-clean
// MODULE: context // FILE: context1.kt @file:JvmName("Context") @file:JvmMultifileClass class Outer { class Inner { fun test() { fun call(): Int { consume(this@Inner) return 1 } fun call(a: Int): Int { consume(this@Inner...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/testData/components/compilerFacility/compilation/codeFragments/capturing/localFunctionWithMultiFileClass.kt
# 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. """PyAuto media test base. Handles PyAuto initialization and path setup. Required to ensure each media test can load the appropriate libraries. Each t...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function, unicode_literals from datetime import datetime from celery.states import FAILURE from django.core.management.base import BaseCommand, CommandError from pytz import utc from lms.djangoapps.instructor_task.models import PROGRESS, QUEUING, InstructorTask class Command(BaseCommand...
unknown
codeparrot/codeparrot-clean
# Given an encoded string, return it's decoded string. # The encoding rule is: k[encoded_string], where the encoded_string # inside the square brackets is being repeated exactly k times. # Note that k is guaranteed to be a positive integer. # You may assume that the input string is always valid; No extra white spaces...
unknown
codeparrot/codeparrot-clean
#This file is distributed under the terms of the GNU General Public license. #Copyright (C) 2001 Al Riddoch (See the file COPYING for details). from cyphesis.Thing import Thing from atlas import * from Vector3D import Vector3D # bbox = 5,4,2.5 # bmedian = 4.5,4.5,2.5 # offset = SW corner = -0.5,0.5,0 class House_dec...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python """ Module difflib -- helpers for computing deltas between objects. Function get_close_matches(word, possibilities, n=3, cutoff=0.6): Use SequenceMatcher to return list of the best "good enough" matches. Function context_diff(a, b): For two lists of strings, return a delta in context d...
unknown
codeparrot/codeparrot-clean
/* Generated file to emulate the fakes namespace. */ export * from "../../harness/_namespaces/fakes.js";
typescript
github
https://github.com/microsoft/TypeScript
src/testRunner/_namespaces/fakes.ts
#!/usr/bin/env python3 """ This script reads the input from stdin, extracts all lines starting with "# FDATA: " (or a given prefix instead of "FDATA"), parses the directives, replaces symbol names ("#name#") with either symbol values or with offsets from respective anchor symbols, and prints the resulting file to stdo...
python
github
https://github.com/llvm/llvm-project
bolt/test/link_fdata.py
# (c) 2012, 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) any lat...
unknown
codeparrot/codeparrot-clean
from south.db import db from django.db import models from nepal.web.models import * class Migration: def forwards(self, orm): # Adding field 'PHPIni.vhost' db.add_column('php_ini', 'vhost', orm['web.phpini:vhost']) def backwards(self, orm): # Deleting field 'PHPIni.vhost' db...
unknown
codeparrot/codeparrot-clean
import pytest from cfme import login, test_requirements from cfme.base.login import BaseLoggedInPage from cfme.base.credential import Credential from cfme.configure.access_control import User from utils import conf, error from utils.appliance.implementations.ui import navigate_to pytestmark = pytest.mark.usefixtures(...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import sys import logging import datetime from modularodm import Q from modularodm.storage.base import KeyExistsException from scripts import utils as script_utils from framework.transactions.context import TokuTransaction from website.files import models from website.app imp...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Nicira, 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 a...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # # 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 ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################### # # GetCustomerProfileIds # Retrieves all existing customer profile IDs. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
unknown
codeparrot/codeparrot-clean
import unittest from hamcrest import has_entries from hamcrest.core import * from lib.csv import tabular_map, dict_map from lib.service import Service from test.service import details class TestCSV(unittest.TestCase): def test_csv_generation(self): services = [ Service(details({"Name of service...
unknown
codeparrot/codeparrot-clean
from collections.abc import Iterable from django.apps import apps from django.contrib import auth from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager from django.contrib.auth.hashers import make_password from django.contrib.contenttypes.models import ContentType from django.core.exceptions impo...
python
github
https://github.com/django/django
django/contrib/auth/models.py
# # File : win32spawn.py # This file is part of RT-Thread RTOS # COPYRIGHT (C) 2006 - 2015, RT-Thread Development Team # # 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 ...
unknown
codeparrot/codeparrot-clean