code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from __future__ import division import matplotlib.pyplot as plt from matplotlib import colors as mcolors colors = dict(mcolors.BASE_COLORS, **mcolors.CSS4_COLORS) # Sort colors by hue, saturation, value and name. by_hsv = sorted((tuple(mcolors.rgb_to_hsv(mcolors.to_rgba(color)[:3])), name) for name, color in colo...
unknown
codeparrot/codeparrot-clean
""" Computations with modules over polynomial rings. This module implements various classes that encapsulate groebner basis computations for modules. Most of them should not be instantiated by hand. Instead, use the constructing routines on objects you already have. For example, to construct a free module over ``QQ[x...
unknown
codeparrot/codeparrot-clean
import phe as paillier import numpy as np import json import syft from .basic import Float, PaillierTensor from ...tensor import TensorBase from ..abstract.keys import AbstractSecretKey, AbstractPublicKey from ..abstract.keys import AbstractKeyPair class SecretKey(AbstractSecretKey): def __init__(self, sk): ...
unknown
codeparrot/codeparrot-clean
import unittest import hashlib import httpsig.sign as sign from httpsig.utils import parse_authorization_header from requests.models import RequestEncodingMixin class CrossPlatformTestCase(unittest.TestCase): def test_content_md5(self): data = {'signature': "HPMOHRgPSMKdXrU6AqQs/i9S7alOakkHsJiqLGmInt05Cxj6...
unknown
codeparrot/codeparrot-clean
from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class User(models.Model): username = models.CharField(max_length=100) email = models.EmailField() def __str__(self): return self.username @python_2_unicode_compatible class User...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python -u # Copyright (c) 2010-2011 OpenStack, LLC. # # 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 2021 Realm 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/li...
swift
github
https://github.com/realm/realm-swift
RealmSwift/Impl/CollectionAccess.swift
# -*- coding: UTF-8 -*- import os.path import subprocess import urlparse from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.core.urlresolvers import reverse from assopy import models class Command(BaseCommand): help = "g...
unknown
codeparrot/codeparrot-clean
"""For more tests on satisfiability, see test_dimacs""" from sympy import symbols from sympy.logic.boolalg import Equivalent, Implies from sympy.logic.inference import pl_true, satisfiable, PropKB from sympy.logic.algorithms.dpll import dpll, dpll_satisfiable, \ find_pure_symbol, find_unit_clause, unit_propagate, ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2011 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 agreed ...
java
github
https://github.com/google/guava
guava/src/com/google/common/util/concurrent/ListeningScheduledExecutorService.java
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package backup import ( "bytes" "context" gosql "database/sql" "encoding/base64" "encoding/hex" "fmt" "hash/crc32" "io" "math" "math/rand" "net/url" "os" "...
go
github
https://github.com/cockroachdb/cockroach
pkg/backup/backup_test.go
import pandas as pd from syscore.genutils import progressBar from sysquant.estimators.correlation_estimator import correlationEstimator from sysquant.fitting_dates import generate_fitting_dates from sysquant.estimators.correlations import CorrelationList def correlation_over_time_for_returns(returns_for_correlation: ...
unknown
codeparrot/codeparrot-clean
""" Tools for sending email. """ from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module # Imported for backwards compatibility, and for the sake # of a cleaner namespace. These symbols used to be in # django/core/mail.py before the int...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (C) 2016, 2018 IBM Corp. 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 r...
unknown
codeparrot/codeparrot-clean
import os, pbkdf2, copy, sys try: scrypt = __import__('scrypt') except: sys.stderr.write(""" Failed to import scrypt. This is not a fatal error but does mean that you cannot create or decrypt privkey jsons that use scrypt """) scrypt = None try: import bitcoin except: sys.stderr.write(""" Failed to...
unknown
codeparrot/codeparrot-clean
@use '../../../../../styles/typography'; :host { position: relative; color: var(--color-tree-node-element-name); cursor: default; @extend %monospaced; white-space: nowrap; display: block; &:hover { background-color: var(--color-tree-node-hovered); .tree-node-info > .hydration { background...
unknown
github
https://github.com/angular/angular
devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/tree-node/tree-node.component.scss
"""Generate multiversion exclude tags file.""" import logging import os import re import subprocess import tempfile from collections import defaultdict from subprocess import check_output from buildscripts.resmokelib.config import MultiversionOptions from buildscripts.resmokelib.core.programs import get_path_env_var ...
python
github
https://github.com/mongodb/mongo
buildscripts/resmokelib/run/generate_multiversion_exclude_tags.py
import mock # To run unittests on python 2.6 please use unittest2 library try: import unittest2 as unittest except ImportError: import unittest from jenkinsapi.plugins import Plugins from jenkinsapi.utils.requester import Requester from jenkinsapi.jenkins import Jenkins, JenkinsBase, Job from jenkinsapi.custom...
unknown
codeparrot/codeparrot-clean
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/tfrt/transforms/mlrt/util.h
import logging import django from django.conf import settings import json from django.views.generic.base import View from django.http import HttpResponse, Http404 from dajaxice.exceptions import FunctionNotCallableError from dajaxice.core import dajaxice_functions, dajaxice_config log = logging.getLogger('dajaxice') ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/tpu/kernels/tpu_embedding_enqueue_ops.h
#: Operation ids operations = {} operations["vote"] = 0 operations["comment"] = 1 operations["transfer"] = 2 operations["transfer_to_vesting"] = 3 operations["withdraw_vesting"] = 4 operations["limit_order_create"] = 5 operations["limit_order_cancel"] = 6 operations["feed_publish"] = 7 operations["convert"] = 8 operati...
unknown
codeparrot/codeparrot-clean
""" CAD :cite:`cad-Russo2017_e19428` is a method aimed to capture structures of higher-order correlation in massively parallel spike trains. In particular, it is able to extract patterns of spikes with arbitrary configuration of time lags (time interval between spikes in a pattern), and at multiple time scales, e.g. fr...
unknown
codeparrot/codeparrot-clean
""" Slugs. Additional slug outputs. MIT license. Copyright (c) 2014 - 2017 Isaac Muse <isaacmuse@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 withou...
unknown
codeparrot/codeparrot-clean
# (C) British Crown Copyright 2015, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
unknown
codeparrot/codeparrot-clean
# ---------------------------------------------------------------------------- # Copyright 2015 Nervana 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 # # http://www.apache.o...
unknown
codeparrot/codeparrot-clean
/* Ignore ECONNRESET of FreeBSD */ #include "ruby/missing.h" #include <errno.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #undef getpeername int ruby_getpeername(int s, struct sockaddr * name, socklen_t * namelen) { int err = errno; errno = 0; s = getpeername(s, name, name...
c
github
https://github.com/ruby/ruby
missing/close.c
# 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
import datetime from django.contrib.auth.models import User from django.db import models from django.template.defaultfilters import slugify from model_utils import Choices from model_utils.fields import MonitorField, SplitField, StatusField from model_utils.managers import PassThroughManager from model_utils.models im...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # django-audit-log documentation build configuration file, created by # sphinx-quickstart on Wed Apr 6 10:51:31 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
unknown
codeparrot/codeparrot-clean
from itertools import product import numpy as np import pytest from pandas._libs import lib import pandas.util._test_decorators as td import pandas as pd import pandas._testing as tm class TestSeriesConvertDtypes: @pytest.mark.parametrize( "data, maindtype, expected_default, expected_other", [ ...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/series/methods/test_convert_dtypes.py
# # (c) 2017, Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is...
unknown
codeparrot/codeparrot-clean
""" This module instantiates the Flask application and declares the main error handling function ``make_json_error``. """ # IMPORTANT: updates to the following must also be done in setup.py. __title__ = "birdlistn" __version__ = "0.1.0" __author__ = "Hugues Demers" __email__ = "hdemers@gmail.com" __copyright__ = "Copy...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type # upcoming features: # - Ted's multifile YAML concatenation # - changesets (and bl...
unknown
codeparrot/codeparrot-clean
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, unicode_literals, division, print_function) import pytest import numpy as np from numpy.testing import assert_allclose, assert_array_equal from .. import models, InputParameterError from ....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """A module with API handlers related to the YARA memory scanning.""" from grr_response_core.lib.rdfvalues import structs as rdf_structs from grr_response_proto.api import yara_pb2 from grr_response_server import data_store from grr_response_server.gui import api_call_context from grr_response_se...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 """ @author: monitor1379 @contact: yy4f5da2@hotmail.com @site: www.monitor1379.com @version: 1.0 @license: GNU General Public License(Version 3) @file: example1_or_nn.py @time: 2016/10/11 0:07 Use Hamaa to build a mlp to solve the "or problem". This case includes all the necessary functions for crea...
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/tests/unit/utils/test_decorators.py
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # Copyright 2022 Unisoc Inc. %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/sprd,ums512-clk.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: UMS512 Soc clock controller maintainers: - Orson Zhai <orsonzhai@gmail.com> - Baolin Wan...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml
use std::path::Path; #[test] fn version_cmp() { use super::version::Version; let v123 = Version::new(1, 2, 3); assert!(Version::new(1, 0, 0) < v123); assert!(Version::new(1, 2, 2) < v123); assert!(Version::new(1, 2, 3) == v123); assert!(Version::new(1, 2, 4) > v123); assert!(Version::new(1...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/autocfg/src/tests.rs
# Index recommendations on SQL Statistics Last Update: February 2024 Original author: maryliag This document provides an overview of how Index Recommendations are used for statement statistics. How frequent they're generated and how they're stored. This document doesn't focus on the generation itself. For more inform...
unknown
github
https://github.com/cockroachdb/cockroach
docs/tech-notes/observability/index_recommendations.md
# -*- coding: utf-8 -*- import random from openerp import SUPERUSER_ID from openerp.osv import osv, orm, fields from openerp.addons.web.http import request class payment_transaction(orm.Model): _inherit = 'payment.transaction' _columns = { # link with the sale order 'sale_order_id': fields.ma...
unknown
codeparrot/codeparrot-clean
""" Django settings for open-connectome project. Generated by 'django-admin startproject' using Django 1.8.2. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Bu...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
unknown
codeparrot/codeparrot-clean
# modifiedMexicanHatTest18.py # two 3d charts in one """ 1. load xyz1 for compref(radar) 2. load xyz2 for wrf 3. fix xyz2 4. charting 2 in one """ inputFolder='/media/TOSHIBA EXT/ARMOR/labLogs/2014-5-26-modifiedMexicanHatTest17_Numerical_Spectrum_for_Typhoon_Kong-Rey_RADAR/' dataSource = "Numerical_Spectr...
unknown
codeparrot/codeparrot-clean
/* compress.c -- compress a memory buffer * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ #include "zbuild.h" #include "zutil.h" /* =========================================================================== * Architec...
c
github
https://github.com/opencv/opencv
3rdparty/zlib-ng/compress.c
import unittest2 import openerp.tests.common as common class test_search(common.TransactionCase): def test_00_search_order(self): registry, cr, uid = self.registry, self.cr, self.uid # Create 6 partners with a given name, and a given creation order to # ensure the order of their ID. Som...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitsend Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test fee estimation code # from collections import OrderedDict from test_framework.test_framework im...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
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/ja/model_doc/deformable_detr.md
import unittest2 import st2common.util.jsonify as jsonify class JsonifyTests(unittest2.TestCase): def test_none_object(self): obj = None self.assertTrue(jsonify.json_loads(obj) is None) def test_no_keys(self): obj = {'foo': '{"bar": "baz"}'} transformed_obj = jsonify.json_loa...
unknown
codeparrot/codeparrot-clean
/** * \file ssl_ciphersuites_internal.h * * \brief Internal part of the public "ssl_ciphersuites.h". */ /* * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ #ifndef MBEDTLS_SSL_CIPHERSUITES_INTERNAL_H #define MBEDTLS_SSL_CIPHERSUITES_INTERNAL_H #include "mbedtl...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/library/ssl_ciphersuites_internal.h
from __future__ import absolute_import import json import logging import requests from dropbox.session import DropboxSession from dropbox.client import DropboxClient from tornado.httpclient import AsyncHTTPClient, HTTPRequest from cloudtunes import settings from cloudtunes.utils import cached_property class Session(...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import django.core.validators import django.utils.timezone import model_utils.fields from django.conf import settings from django.db import migrations, models from opaque_keys.edx.django.models import CourseKeyField class Migration(migra...
unknown
codeparrot/codeparrot-clean
import unittest from test.support import ( is_android, is_apple_mobile, is_wasm32, reap_children, verbose, warnings_helper ) from test.support.import_helper import import_module # Skip these tests if termios is not available import_module('termios') if is_android or is_apple_mobile or is_wasm32: raise unittes...
python
github
https://github.com/python/cpython
Lib/test/test_pty.py
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 //go:build !enterprise package aws import ( "context" "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/hashicorp/vault/sdk/logical" ) // assumeRoleStatic assumes an AWS role for cross-account static role management. // It uses the role ARN...
go
github
https://github.com/hashicorp/vault
builtin/logical/aws/client_ce.go
//===- bolt/Rewrite/LinuxKernelRewriter.cpp -------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
bolt/lib/Rewrite/LinuxKernelRewriter.cpp
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() mobile...
unknown
codeparrot/codeparrot-clean
# Yoga Design System Example This example shows how to use Next.js along with [Yoga Design System](https://gympass.github.io/yoga/). This is intended to show the integration of this UI toolkit with the Framework. ## Deploy your own [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repos...
unknown
github
https://github.com/vercel/next.js
examples/with-yoga/README.md
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
unknown
codeparrot/codeparrot-clean
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import time from telemetry.page.actions.javascript_click import ClickElementAction from telemetry.page.actions.loop import LoopAction from telemetry.page.ac...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012, Rafal Lewczuk import re re_line0 = re.compile(r'([^\s\:(]+)\s*:\s*(.*)$') re_line1 = re.compile(r'([^\s:\(]+)\s*\(([^\)]*)\)\s*:(.*)$') class GroupSet: def __init__(self, path): self.groups = { } self.comments = { } self._read(path) def _read(self, filename): ...
unknown
codeparrot/codeparrot-clean
""" Distance and Area objects to allow for sensible and convienient calculation and conversions. Here are some tests. """ from django.contrib.gis.measure import Distance, Area, D, A from django.utils import unittest class DistanceTest(unittest.TestCase): "Testing the Distance object" def testInit(self): ...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 The Abseil Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/random/log_uniform_int_distribution.h
//! Concrete error types for all operations which may be invalid in a certain const context. use hir::{ConstContext, LangItem}; use rustc_errors::codes::*; use rustc_errors::{Applicability, Diag, MultiSpan, inline_fluent}; use rustc_hir as hir; use rustc_hir::def_id::DefId; use rustc_infer::infer::TyCtxtInferExt; use ...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_const_eval/src/check_consts/ops.rs
#!/usr/bin/env python # # Copyright (c) 2013 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=F0401 import distutils.dir_util import optparse import os import shutil import sys import zipfile from common_func...
unknown
codeparrot/codeparrot-clean
{ "name": "generate", "command": "ng generate <schematic>", "shortDescription": "Generates and/or modifies files based on a schematic.", "aliases": [ "g" ], "deprecated": false, "options": [ { "name": "defaults", "type": "boolean", "default": false, "description": "Disable ...
json
github
https://github.com/angular/angular
adev/src/content/cli/generate.json
""" Based on Parsedom for XBMC plugins Copyright (C) 2010-2011 Tobias Ussing And Henrik Mosgaard Jensen 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,...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Title: CURLINFO_TOTAL_TIME Section: 3 Source: libcurl See-also: - CURLINFO_TOTAL_TIME_T (3) - CURLOPT_TIMEOUT (3) - curl_easy_getinfo (3) - curl_easy_setopt (3) Protocol: - All Added-in: 7.4.1 --- # NAME CURLINFO_TO...
unknown
github
https://github.com/curl/curl
docs/libcurl/opts/CURLINFO_TOTAL_TIME.md
""" Python 'hex_codec' Codec - 2-digit hex content transfer encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs, binascii ### Codec APIs def hex_encode(...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2007 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash set -e cd packages/next cp node_modules/webpack/lib/hmr/HotModuleReplacement.runtime.js src/bundles/webpack/packages/ cp node_modules/webpack/lib/hmr/JavascriptHotModuleReplacement.runtime.js src/bundles/webpack/packages/ cp node_modules/webpack/hot/lazy-compilation-node.js src/bundles/webpack/pa...
unknown
github
https://github.com/vercel/next.js
scripts/check-pre-compiled.sh
# -*- coding: utf-8 -*- from __future__ import unicode_literals import inspect import frappe from erpnext.hooks import regional_overrides __version__ = '9.1.1' def get_default_company(user=None): '''Get default company for user''' from frappe.defaults import get_user_default_as_list if not user: user = frappe.s...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Mail\Events; use Symfony\Component\Mime\Email; class MessageSending { /** * Create a new event instance. * * @param \Symfony\Component\Mime\Email $message The Symfony Email instance. * @param array $data The message data. */ public function __construc...
php
github
https://github.com/laravel/framework
src/Illuminate/Mail/Events/MessageSending.php
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Organilab documentation build configuration file, created by # sphinx-quickstart on Mon Aug 8 11:04:51 2016. # # 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 # ...
unknown
codeparrot/codeparrot-clean
import sys from unittest import TestCase import simplejson as json import simplejson.decoder class TestScanString(TestCase): def test_py_scanstring(self): self._test_scanstring(simplejson.decoder.py_scanstring) def test_c_scanstring(self): if not simplejson.decoder.c_scanstring: r...
unknown
codeparrot/codeparrot-clean
#ifndef HEADER_CURL_TOOL_SETOPT_H #define HEADER_CURL_TOOL_SETOPT_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
c
github
https://github.com/curl/curl
src/tool_setopt.h
--- filter_version: 1.0 module_rejectlist: # A pure action plugin - pause # A hybrid action plugin with module - copy # A pure module - tempfile
unknown
github
https://github.com/ansible/ansible
test/integration/targets/plugin_filtering/filter_modules.yml
# vim:set et sts=4 sw=4: # # Zanata Python Client # # Copyright (c) 2011 Jian Ni <jni@redhat.com> # Copyright (c) 2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; eith...
unknown
codeparrot/codeparrot-clean
/** @import { FunctionExpression } from 'estree' */ /** @import { ComponentContext } from '../types' */ import { visit_function } from './shared/function.js'; /** * @param {FunctionExpression} node * @param {ComponentContext} context */ export function FunctionExpression(node, context) { return visit_function(node...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/compiler/phases/3-transform/client/visitors/FunctionExpression.js
# These lines were mostly generated by h2py.py (see demo/scripts) # from <sys/ioctl.h>, <sys/termio.h> and <termios.h> on Irix 4.0.2 # with some manual changes to cope with imperfections in h2py.py. # The applicability on other systems is not clear; especially non-SYSV # systems may have a totally different set of ioct...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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 t...
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 applicable law or ag...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/profiler/internal/advisor/operation_checker.h
from sys import _getframe from LogConfig import LogConfig, LOG_TYPE_DEBUG, LOG_TYPE_INFO, LOG_TYPE_WARNING, LOG_TYPE_ERROR, LOG_LEVEL_ERROR, LOG_LEVEL_WARNING, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG class Log(object): @staticmethod def e(text = ''): LogConfig.init() if LogConfig.level() >= LOG_LEVEL_...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry import story from telemetry.page import page as page_module from telemetry.page import shared_page_state class ...
unknown
codeparrot/codeparrot-clean
from hops import constants class OnlineFeaturegroup(): """ Represents an online featuregroup in the featurestore """ def __init__(self, online_featuregroup_json): """ Initialize the online feature group from JSON payload Args: :online_featuregroup_json: JSON repres...
unknown
codeparrot/codeparrot-clean
// errorcheck // Copyright 2017 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. // Verify that recover arguments requirements are enforced by the // compiler. package main func main() { _ = recover() // OK _ = recover...
go
github
https://github.com/golang/go
test/recover5.go
""" Collection of utilities to manipulate structured arrays. Most of these functions were initially implemented by John Hunter for matplotlib. They have been rewritten and extended for convenience. """ from __future__ import division, absolute_import, print_function import sys import itertools import numpy as np im...
unknown
codeparrot/codeparrot-clean
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from django.forms import Media, TextInput, CharField, Form, MultiWidget from django.template import Template, Context from django.test import TestCase, override_settings @override_settings( STATIC_URL=None, MEDIA_URL='http://media.example.com/media/', ) class FormsMediaTestCase(TestCase...
unknown
codeparrot/codeparrot-clean
//go:build linux package firewaller import ( "context" "fmt" "net/netip" "slices" "github.com/moby/moby/v2/daemon/libnetwork/types" ) // StubFirewaller implements a Firewaller for unit tests. It just tracks what it's been asked for. type StubFirewaller struct { Config Networks map[string]*StubFirewallerNetwo...
go
github
https://github.com/moby/moby
daemon/libnetwork/drivers/bridge/internal/firewaller/stub.go
# -*- coding: utf-8 -*- import inspect from django.utils.translation import gettext_lazy as _ class AuthorizationDef: def __init__(self, codename, label, staff_only=False): self.codename = codename self.label = label self.staff_only = staff_only class AuthorizationConfig: """ Defines...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Dict, Optional from typing_extensions import TypedDict __all__ = ["JobListParams"] class JobListParams(TypedDict, total=False): after: str """Identifier for the last jo...
python
github
https://github.com/openai/openai-python
src/openai/types/fine_tuning/job_list_params.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
// Code generated by "stringer -type ValueSourceType"; DO NOT EDIT. package terraform import "strconv" func _() { // An "invalid array index" compiler error signifies that the constant values have changed. // Re-run the stringer command to generate them again. var x [1]struct{} _ = x[ValueFromUnknown-0] _ = x[V...
go
github
https://github.com/hashicorp/terraform
internal/terraform/valuesourcetype_string.go
"""Tests for tensorflow.ops.tf.Assign*.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.python.platform import numpy as np import tensorflow as tf class AssignOpTest(tf.test.TestCase): def _initAssignFetch(self, x, y, use_gpu=False)...
unknown
codeparrot/codeparrot-clean
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
unknown
github
https://github.com/apache/airflow
.github/actions/prepare_all_ci_images/action.yml
import config class Full: def output(self, train): """Format train information for a terminal display""" return ("{time}\t{delayed}{actual} {destination}".format( time=train.timetabled_departure.strftime("%H:%M"), delayed='!' if train.delayed else ' ', actual=t...
unknown
codeparrot/codeparrot-clean