code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
import hashlib import os import unittest2 import openerp import openerp.tests.common class test_ir_attachment(openerp.tests.common.TransactionCase): def test_00_attachment_flow(self): registry, cr, uid = self.registry, self.cr, self.uid root_path = openerp.tools.config['root_path'] ira =...
unknown
codeparrot/codeparrot-clean
{ "id": "text", "type": "SharedSlice", "name": "Text", "description": "Text", "variations": [ { "id": "default", "name": "Default", "docURL": "...", "version": "sktwi1xtmkfgx8626", "description": "Text", "primary": { "text": { "type": "StructuredText",...
json
github
https://github.com/vercel/next.js
examples/cms-prismic/slices/Text/model.json
#! /usr/bin/env python """finddiv - a grep-like tool that looks for division operators. Usage: finddiv [-l] file_or_directory ... For directory arguments, all files in the directory whose name ends in .py are processed, and subdirectories are processed recursively. This actually tokenizes the files to avoid false h...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
unknown
codeparrot/codeparrot-clean
import sys import datetime import argparse import requests from webhook_sender import CFG, models, logger, ses MULTIPLIER = int(CFG.get('webhook', 'MULTIPLIER')) RETRIES = int(CFG.get('webhook', 'RETRIES')) def send_webhook(webhook, commit=False): """ Send a single webhook. If successful, sent as receiv...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (C) 2012 Michael Spreitzenbarth, Sven Schmitt # # 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 ...
unknown
codeparrot/codeparrot-clean
from subprocess import Popen, PIPE, STDOUT import numpy as np SZ = [2, 3, 4, 8, 12, 15, 16, 17, 32, 64, 128, 256, 512, 1024] def gen_data(dt): arrays = {} if dt == np.float128: pg = './fftw_longdouble' elif dt == np.double: pg = './fftw_double' elif dt == np.float32: pg = './...
unknown
codeparrot/codeparrot-clean
import unittest from unittest import TestLoader, TextTestRunner, TestSuite from cookie import cookie_test from navigation import forward from navigation import forwardToNothing from navigation import get_from_http_test from navigation import refresh_page from element_location import element_location_test from element...
unknown
codeparrot/codeparrot-clean
# # (c) 2016 Allen Sanabria, <asanabria@linuxdynasty.org> # # 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...
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/metrics2/impl/MsInfo.java
#!/usr/bin/python # -*- coding: utf-8 -*- # # This file is largely copied from the Nagios module included in the # Func project. Original copyright follows: # # func-nagios - Schedule downtime and enables/disable notifications # Copyright 2011, Red Hat, Inc. # Tim Bielawa <tbielawa@redhat.com> # # This software may be ...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0-only #include <linux/export.h> #include <linux/slab.h> #include <linux/regset.h> static int __regset_get(struct task_struct *target, const struct user_regset *regset, unsigned int size, void **data) { void *p = *data, *to_free = NULL; int res; if (!regset->regset_get) ...
c
github
https://github.com/torvalds/linux
kernel/regset.c
"""turtledemo/yinyang.py Another drawing suitable as a beginner's programming example. The small circles are drawn by the circle command. """ from turtle import * def yin(radius, color1, color2): width(3) color("black", color1) begin_fill() circle(radius/2., 180) circle(radius, 180) left(18...
python
github
https://github.com/python/cpython
Lib/turtledemo/yinyang.py
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals try: import pygit2 except ImportError: pygit2 = None import pytest from atomic_reactor.core...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # ui documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a defa...
unknown
codeparrot/codeparrot-clean
from django.contrib.auth import authenticate from django.contrib.auth import login from django.contrib.auth import get_user_model from registration import signals from registration.views import RegistrationView as BaseRegistrationView User = get_user_model() class RegistrationView(BaseRegistrationView): """ ...
unknown
codeparrot/codeparrot-clean
"""This module provides access to operating system functionality that is standardized by the C Standard and the POSIX standard (a thinly disguised Unix interface). Refer to the library manual and corresponding Unix manual entries for more information on calls.""" import datetime F_OK = 0 O_APPEND = 8 O_BINARY = 32...
unknown
codeparrot/codeparrot-clean
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import SomeClass, SomeOtherException, UTF8Class, setup class FilterSyntaxTests(SimpleTestCase): @setup({'filter-syntax01': '{{ var|upper }}'}) def test_filter_syntax01(self): """ Basic filter u...
unknown
codeparrot/codeparrot-clean
config: allow-labels: "test-windows" steps: - label: part-3-windows command: .\.buildkite\scripts\run-script.ps1 bash .buildkite/scripts/windows-run-gradle.sh timeout_in_minutes: 300 agents: provider: gcp image: family/elasticsearch-windows-2022 machineType: custom-32-98304 diskT...
unknown
github
https://github.com/elastic/elasticsearch
.buildkite/pipelines/pull-request/part-3-windows.yml
name: Release Doxygen permissions: contents: read on: workflow_dispatch: inputs: release-version: description: 'Release Version' required: true type: string upload: description: 'Upload documentation' required: false type: boolean workflow_call: ...
unknown
github
https://github.com/llvm/llvm-project
.github/workflows/release-doxygen.yml
/* * PSA cipher driver entry points */ /* * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ #include "common.h" #if defined(MBEDTLS_PSA_CRYPTO_C) #include "psa_crypto_cipher.h" #include "psa_crypto_core.h" #include "psa_crypto_random_impl.h" #include "mbedtls...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/library/psa_crypto_cipher.c
//===--- StackList.h - defines the StackList data structure -----*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2021 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/SIL/StackList.h
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot-test/src/test/java/org/springframework/boot/test/context/runner/AdditionalContextInterface.java
import wx import msikeys class KeyboardFrame(wx.Frame): def __init__(self, keyboard): super(KeyboardFrame, self).__init__(None, title='MSI Keys', size=(400, 150)) self.keyboard = keyboard self.selected_regions = [] sizer = wx.BoxSizer(wx.VERTICAL) region_buttons = [] ...
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...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/serialization/dag_dependency.py
# Copyright 2012 OpenStack Foundation # # 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
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class Scope(object): USERINFO_PROFILE = '/authenticate' class OrcidAccount(ProviderAccount): def get_profile_url(self): return extract_from_dict(self.account.extr...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.network.tls import io.ktor.utils.io.core.* import kotlinx.io.* @Suppress("KDocMissingDocumentation", "DEPRECATION") internal class TLSRecord( val type: TLSRecordType = TL...
kotlin
github
https://github.com/ktorio/ktor
ktor-network/ktor-network-tls/jvm/src/io/ktor/network/tls/Headers.kt
# This file is part of Indico. # Copyright (C) 2002 - 2021 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 flask import session from indico.modules.designer.models.templates import DesignerTemplate from indi...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
unknown
codeparrot/codeparrot-clean
{ "html": { "type": "Fragment", "start": 0, "end": 38, "children": [ { "type": "Element", "start": 0, "end": 38, "name": "button", "attributes": [ { "start": 8, "end": 23, "type": "EventHandler", "name": "click", "name_loc": { "start": { ...
json
github
https://github.com/sveltejs/svelte
packages/svelte/tests/parser-legacy/samples/attribute-with-whitespace/output.json
/** * 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/arm-java/org/apache/hadoop/ipc/protobuf/ProtobufRpcEngineProtos.java
#from {{appname}}.handlers.base import BaseHandler from {{appname}}.handlers.powhandler import PowHandler from {{appname}}.models.{{model_type}}.{{handler_name}} import {{handler_model_class_name}} from {{appname}}.config import myapp, database from {{appname}}.application import app import tornado.web @app.add_rest_r...
unknown
codeparrot/codeparrot-clean
[ { "@level": "info", "@message": "tfcoremock_nested_list.nested_list: Plan to create", "@module": "terraform.ui", "change": { "action": "create", "resource": { "addr": "tfcoremock_nested_list.nested_list", "implied_provider": "tfcoremock", "module": "", "re...
json
github
https://github.com/hashicorp/terraform
testing/equivalence-tests/outputs/nested_list/apply.json
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2017 homik 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 la...
unknown
codeparrot/codeparrot-clean
import random import sys from twisted.internet import protocol, reactor from p2pool.bitcoin import data as bitcoin_data, getwork from p2pool.util import expiring_dict, jsonrpc, pack class StratumRPCMiningProvider(object): def __init__(self, wb, other): self.wb = wb self.other = other sel...
unknown
codeparrot/codeparrot-clean
import inspect import typing as py_typing from numba.core.typing.typeof import typeof from numba.core import errors, types, utils def _py_version_switch(py_version, new_result, old_result): return new_result if utils.PYVERSION >= py_version else old_result class AsNumbaTypeRegistry: """ A registry for py...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # EasyInstall setup script for digest # # $Id$ # --------------------------------------------------------------------------- import sys import os sys.path += [os.getcwd()] from setuptools import setup, find_packages import re import imp PKG = 'digest' DESCRIPTION = 'Calculate message digests ...
unknown
codeparrot/codeparrot-clean
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
unknown
codeparrot/codeparrot-clean
""" Precompute coefficients of Temme's asymptotic expansion for gammainc. This takes about 8 hours to run on a 2.3 GHz Macbook Pro with 4GB ram. Sources: [1] NIST, "Digital Library of Mathematical Functions", http://dlmf.nist.gov/ """ from __future__ import division, print_function, absolute_import import os fr...
unknown
codeparrot/codeparrot-clean
// Copyright Ruslan Arutyunyan, 2019-2021. // Copyright Antony Polukhin, 2021-2024. // // 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) // Contributed by Ruslan Arutyunyan #ifndef BOOST_ANYS_BASIC_ANY_HPP_INCLUD...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/any/basic_any.hpp
#! /usr/bin/env python2 from sys import argv from os import unlink, rename import binISS import UrqmdOutputFormatter tmpFile = "./results/tmp.dat" if len(argv) < 2: print("Usage: shell.py urqmd_output_file") exit(-1) # format urqmd output file if UrqmdOutputFormatter.formatUrqmdOutputFile(argv[1], tmpFile):...
unknown
codeparrot/codeparrot-clean
# # # Copyright (C) 2006, 2007, 2010, 2011 Google 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 2 of the License, or # (at your option) any later version. # # This progr...
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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/components/FilterBar/filters/DateRangeCalendar.tsx
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # Copyright 2010 Didier Roche # Copyright 2010 Tony Byrne # # This file is part of Quickly ubuntu-application template # #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License ...
unknown
codeparrot/codeparrot-clean
package runconfig import ( "encoding/json" "io" "runtime" "github.com/moby/moby/api/types/container" "github.com/moby/moby/api/types/network" "github.com/moby/moby/v2/pkg/sysinfo" ) // DecodeCreateRequest decodes a json encoded [container.CreateRequest] struct // and performs some validation. Certain parameter...
go
github
https://github.com/moby/moby
daemon/internal/runconfig/config.go
#!/usr/bin/env python from runtest import TestBase class TestCase(TestBase): def __init__(self): TestBase.__init__(self, 'abc', """ # DURATION TID FUNCTION [32417] | main() { [32417] | a() { [32417] | b() { [32417] | /* read:proc/statm (si...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * atomics.c * Non-Inline parts of the atomics implementation * * Portions Copyright (c) 2013-2026, PostgreSQL Global Development Group * * * IDENTIFICATION * src/backend/port/atomics.c * *--------------------------------------...
c
github
https://github.com/postgres/postgres
src/backend/port/atomics.c
from django.contrib.gis.geos import fromstr import ujson from geodata.importer.common import get_json_data from geodata.models import Country, Region class CountryImport(): """ Wrapper class for all import methods used on the Country model """ def __init__(self): self.get_json_data = get_json...
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
/** @import { BlockStatement, Expression, Statement } from 'estree' */ /** @import { AST } from '#compiler' */ /** @import { ComponentContext } from '../types.js' */ import * as b from '#compiler/builders'; import { block_close, block_open, block_open_else, create_child_block } from './shared/utils.js'; /** * @param ...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/compiler/phases/3-transform/server/visitors/EachBlock.js
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'Y년 n월 j일' TIME_FORMAT = 'A g:i' D...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Test cases when multiple targets in different directories have the same name. """ import TestGyp test = TestGyp.TestGyp(formats=['andr...
unknown
codeparrot/codeparrot-clean
// runoutput // Copyright 2013 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. // Test run-time behavior of 3-index slice expressions. package main import ( "bufio" "fmt" "os" "strconv" ) var bout *bufio.Writer func m...
go
github
https://github.com/golang/go
test/slice3.go
from __future__ import print_function, division import sys,os qspin_path = os.path.join(os.getcwd(),"../") sys.path.insert(0,qspin_path) #print(os.environ["OMP_NUM_THREADS"]) from quspin.basis import spin_basis_1d from quspin.operators import hamiltonian from quspin.tools.evolution import expm_multiply_parallel from ...
unknown
codeparrot/codeparrot-clean
# Status: ported. # Base revision: 64488 # Copyright Vladimir Prus 2002-2007. # Copyright Rene Rivera 2006. # # 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) # Supports 'abstract' targets, which are ...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Foundation; use Illuminate\Support\Manager; class MaintenanceModeManager extends Manager { /** * Create an instance of the file based maintenance driver. * * @return \Illuminate\Foundation\FileBasedMaintenanceMode */ protected function createFileDriver(): FileBa...
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/MaintenanceModeManager.php
/* * 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.client.plugins import io.ktor.client.* import io.ktor.util.* import io.ktor.util.converters.DataConversion /** * Object for installing [io.ktor.util.converters.DataConversio...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-core/common/src/io/ktor/client/plugins/DataConversion.kt
# Copyright (c) 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
unknown
codeparrot/codeparrot-clean
import random import sys sys.path.append('../') import gym import numpy as np import tensorflow as tf def do_it(): n_hidden = 32 env = gym.make('CartPole-v0') # Initialize placeholders state_pl = tf.placeholder(tf.float32, shape=(None, env.observation_space.shape[0]), name="state_pl") reward_pl =...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/en/tasks/summarization.md
//! Tests for time resource instrumentation. //! //! These tests ensure that the instrumentation for tokio //! synchronization primitives is correct. #![warn(rust_2018_idioms)] #![cfg(all(tokio_unstable, feature = "tracing", target_has_atomic = "64"))] use std::time::Duration; use tracing_mock::{expect, subscriber}; ...
rust
github
https://github.com/tokio-rs/tokio
tokio/tests/tracing_time.rs
from flask_restful import reqparse from brainminer.base.api import PermissionProtectedResource from brainminer.storage.dao import RepositoryDao # ---------------------------------------------------------------------------------------------------------------------- class RepositoriesResource(PermissionProtectedResource...
unknown
codeparrot/codeparrot-clean
import logging import collections from .case import _BaseTestCaseContext _LoggingWatcher = collections.namedtuple("_LoggingWatcher", ["records", "output"]) class _CapturingHandler(logging.Handler): """ A logging handler capturing all (raw and formatted) logging output...
python
github
https://github.com/python/cpython
Lib/unittest/_log.py
from django.conf import settings from django.core.cache import caches from django.core.cache.backends.db import BaseDatabaseCache from django.core.management.base import BaseCommand, CommandError from django.db import ( DEFAULT_DB_ALIAS, DatabaseError, connections, models, router, transaction, )...
python
github
https://github.com/django/django
django/core/management/commands/createcachetable.py
// This test checks the performance of removeAll // on a non-uniquely referenced array. import TestsUtils public let benchmarks = [ BenchmarkInfo( name: "Array.removeAll.keepingCapacity.Int", runFunction: run_ArrayRemoveAll_Class, tags: [.validation, .api, .Array], setUpFunction: { blackHole(inputAr...
swift
github
https://github.com/apple/swift
benchmark/single-source/ArrayRemoveAll.swift
<!--⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be rendered properly in your Markdown viewer. --> # Traduction en cours.
unknown
github
https://github.com/huggingface/transformers
docs/source/fr/in_translation.md
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import api, fields, models, exceptions, _ f...
unknown
codeparrot/codeparrot-clean
# cf. https://github.com/pypa/manylinux/issues/53 import sys from urllib.request import urlopen GOOD_SSL = "https://google.com" BAD_SSL = "https://self-signed.badssl.com" print("Testing SSL certificate checking for Python:", sys.version) EXC = OSError print(f"Connecting to {GOOD_SSL} should work") urlopen(GOOD_SSL...
python
github
https://github.com/pytorch/pytorch
.ci/docker/manywheel/build_scripts/ssl-check.py
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage Check Point Firewall (c) 2019 # # 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 o...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- $id: http://devicetree.org/schemas/mfd/rohm,bd71837-pmic.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: ROHM BD71837 Power Management Integrated Circuit maintainers: - Matti Vaittinen <mazziesaccount@gmail.com> description: ...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mfd/rohm,bd71837-pmic.yaml
import * as React from "react"; import * as JSURL from "jsurl"; import type { NavigateOptions } from "react-router-dom"; import { Routes, Route, Link, useSearchParams } from "react-router-dom"; export default function App() { return ( <div> <h1>Custom Query Parsing Example</h1> <p> This exam...
typescript
github
https://github.com/remix-run/react-router
examples/custom-query-parsing/src/App.tsx
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class ProjectUpdate(Document): pass @frappe.whitelist() def daily_reminde...
unknown
codeparrot/codeparrot-clean
import os import sys import unittest import tempfile from datetime import datetime try: from mock import patch, Mock, call except ImportError: from unittest.mock import patch, Mock from aws2fa import AWS2FA from aws2fa.bin import main from aws2fa.helpers import ConfigParser class TestAWS2FA(unittest.TestCase...
unknown
codeparrot/codeparrot-clean
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
unknown
codeparrot/codeparrot-clean
"""Testing for kernels for Gaussian processes.""" # Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause from inspect import signature import numpy as np import pytest from sklearn.base import clone from sklearn.gaussian_process.kernels import ( RBF, CompoundKernel, ConstantKerne...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/gaussian_process/tests/test_kernels.py
import pathlib from textwrap import ( dedent, indent, ) import numpy as np import pytest from pandas import ( DataFrame, MultiIndex, option_context, ) jinja2 = pytest.importorskip("jinja2") from pandas.io.formats.style import Styler @pytest.fixture def env(): project_dir = pathlib.Path(__fil...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/io/formats/style/test_html.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
unknown
codeparrot/codeparrot-clean
# Use to update mongo_toolchain_version.bzl with hashes of a new toolchain from the toolchain-builder project. import argparse import hashlib import os import pathlib import tempfile import requests from requests.adapters import HTTPAdapter, Retry PATCH_TOOLCHAIN_URL_FORMAT = ( "https://mciuploads.s3.amazonaws.c...
python
github
https://github.com/mongodb/mongo
bazel/toolchains/cc/mongo_linux/mongo_toolchain_version_generator.py
# Copyright 2012-2014 MongoDB, 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 law or agreed to in writin...
unknown
codeparrot/codeparrot-clean
# TensorFlow Lite for iOS - For Swift developers, add the `TensorFlowLiteSwift` pod to your Podfile. For Objective-C developers, add `TensorFlowLiteObjC`. See the TensorFlow Lite [Swift](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/swift) and [ObjC](https://github.com/tensorflow/tensorfl...
unknown
github
https://github.com/tensorflow/tensorflow
tensorflow/lite/ios/TensorFlowLiteC.md
// Copyright 2021 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
client/pkg/transport/sockopt.go
import unittest from ddt import ddt, data, unpack import settings_mock from activity.activity_ApplyVersionNumber import activity_ApplyVersionNumber from mock import mock, patch import test_activity_data as test_data from classes_mock import FakeSession import shutil import helpers example_key_names = [u'15224.1/fec8dc...
unknown
codeparrot/codeparrot-clean
""" Simple service handling test Please put the configuration file service.cfg into $tests/cfg/ directory. :difficulty: advanced :copyright: 2014 Red Hat Inc. """ import logging import time from autotest.client import utils from autotest.client.shared import error from autotest.client.shared.service import SpecificS...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function import os import logging from scrapy.utils.job import job_dir from scrapy.utils.request import request_fingerprint class BaseDupeFilter(object): @classmethod def from_settings(cls, settings): return cls() def request_seen(self, request): return False...
unknown
codeparrot/codeparrot-clean
''' Functions related to generating AutoCorres-based definitions and proofs from the bitfield generator. ''' import sys def is_tagged_union(item): '''Returns true if something is a TaggedUnion instance''' try: return item.tagname is not None except AttributeError: return False def functio...
unknown
codeparrot/codeparrot-clean
{ "dist/main.js": 108611, "dist/polyfills.js": 34169, "dist/lazy.routes-[hash].js": 361 }
json
github
https://github.com/angular/angular
integration/cli-hello-world-lazy/size.json
/*------------------------------------------------------------------------- * * pg_crc32c_sse42_choose.c * Choose between Intel SSE 4.2 and software CRC-32C implementation. * * On first call, checks if the CPU we're running on supports Intel SSE * 4.2. If it does, use the special SSE instructions for CRC-32C *...
c
github
https://github.com/postgres/postgres
src/port/pg_crc32c_sse42_choose.c
"""SCons.Tool.dvi Common DVI Builder definition for various other Tool modules that use it. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated do...
unknown
codeparrot/codeparrot-clean
from dream.simulation.imports import BatchScrapMachine, NonStarvingEntry, Exit, Part from dream.simulation.Globals import runSimulation #define the objects of the model NS=NonStarvingEntry('NS1','Entry',entityData={'_class':'Dream.Batch','numberOfUnits':100}) M=BatchScrapMachine('M1','Machine', processingTime={'Fixed'...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 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
#!/usr/bin/env bash set -eux ansible-playbook -i inventory playbook.yml -v "$@"
unknown
github
https://github.com/ansible/ansible
test/integration/targets/connection_persistent/runme.sh
'''Module providing e-mail generating functionaly for the SMART Direct Apps''' # Developed by: Nikolai Schwertner # # Revision history: # 2011-10-04 Initial release # Import smtplib for the actual sending function import smtplib # Import various email module components from email import encoders from email.header...
unknown
codeparrot/codeparrot-clean
import os from ctypes import CDLL from ctypes.util import find_library from django.conf import settings # Creating the settings dictionary with any settings, if needed. GEOIP_SETTINGS = {key: getattr(settings, key) for key in ('GEOIP_PATH', 'GEOIP_LIBRARY_PATH', 'GEOIP_COUNTRY', 'GEOIP_CITY') ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import logging import logging.config # needed when logging_config doesn't start with logging.config import sys import warnings from copy import copy from django.conf import settings from django.core import mail from django.core.mail import get_connection from django.utils.depr...
unknown
codeparrot/codeparrot-clean
import os import webbrowser import pytest from mock import patch import bokeh.util.browser as bub _open_args = None class _RecordingWebBrowser(object): def open(self, *args, **kw): global _open_args _open_args = args, kw def test_get_browser_controller_dummy(): b = bub.get_browser_controlle...
unknown
codeparrot/codeparrot-clean
# Lint as: python3 # coding=utf-8 # 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-...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, print_function import sys sys.path.insert(0,'..') import inline_tools import time def print_compare(n): print('Printing %d integers:' % n) t1 = time.time() for i in range(n): print(i, end=' ') t2 = time.time() py = (t2-t1) # get it in cache ...
unknown
codeparrot/codeparrot-clean
# 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