code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from __future__ import absolute_import import errno import warnings import hmac from binascii import hexlify, unhexlify from hashlib import md5, sha1, sha256 from ..exceptions import SSLError, InsecurePlatformWarning, SNIMissingWarning SSLContext = None HAS_SNI = False create_default_context = None IS_PYOPENSSL = Fa...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package convert import ( "testing" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/providers" proto "github.com/has...
go
github
https://github.com/hashicorp/terraform
internal/plugin/convert/schema_test.go
''' Selection tests =============== ''' import unittest from kivy.uix.widget import Widget from kivy.uix.listview import ListView, ListItemButton from kivy.properties import NumericProperty, StringProperty from kivy.adapters.listadapter import ListAdapter from kivy.adapters.dictadapter import DictAdapter from kivy.a...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type # # Copyright (C) 2017 Lenovo, 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 Licens...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_label ...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // 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
clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
#!/usr/bin/env python # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import fields, models, api, exceptions, _ cla...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
unknown
codeparrot/codeparrot-clean
from django.shortcuts import render from django.contrib.auth import authenticate, login from django.http import HttpResponseRedirect, HttpResponse from django.views.decorators.csrf import csrf_exempt from webapp_nkana.utils.common import mongo_instance from rest_framework.views import APIView from rest_framework.respo...
unknown
codeparrot/codeparrot-clean
""" Low-level helpers for the SecureTransport bindings. These are Python functions that are not directly related to the high-level APIs but are necessary to get them to work. They include a whole bunch of low-level CoreFoundation messing about and memory management. The concerns in this module are almost entirely abou...
unknown
codeparrot/codeparrot-clean
from __future__ import with_statement import py, pytest # test for _argcomplete but not specific for any application def equal_with_bash(prefix, ffc, fc, out=None): res = ffc(prefix) res_bash = set(fc(prefix)) retval = set(res) == res_bash if out: out.write('equal_with_bash %s %s\n' % (retval,...
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-cloud-storage-project/hadoop-tos/src/main/java/org/apache/hadoop/fs/tosfs/object/tos/ChainTOSInputStream.java
"""Parametric testing on top of twisted.trial.unittest. """ __all__ = ['parametric','Parametric'] from twisted.trial.unittest import TestCase def partial(f, *partial_args, **partial_kwargs): """Generate a partial class method. """ def partial_func(self, *args, **kwargs): dikt = dict(kwargs) ...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python import sys import ddlib # DeepDive python utility ARR_DELIM = '~^~' # For each input tuple for row in sys.stdin: parts = row.strip().split('\t') if len(parts) != 6: print >>sys.stderr, 'Failed to parse row:', row continue # Get all fields from a row words = parts[0].split(...
unknown
codeparrot/codeparrot-clean
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # 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 limitati...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ######################################################################## # # (c) 2009-2012 Markus Dittrich # # 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. # #...
unknown
codeparrot/codeparrot-clean
--- title: Prometheus Agent Mode nav_title: Agent Mode sort_rank: 4 --- ## Prometheus Agent Mode The Prometheus Agent is an operational mode built into the Prometheus binary with the same scraping APIs, semantics, configuration, and discovery mechanism; this agent mode disables some of Prometheus' usual features(TSDB...
unknown
github
https://github.com/prometheus/prometheus
docs/prometheus_agent.md
# 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (c) 2012-2015 Focusmatic SAS. All rights reserved. # import ConfigParser import os import time import psutil import logging import socket from logging.handlers import SysLogHandler import json import threading import math def time_in_ms(): return long(math.floor(time.time() * ...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/asyncImportNestedYield.ts] //// //// [asyncImportNestedYield.ts] async function* foo() { import((await import(yield "foo")).default); } //// [asyncImportNestedYield.js] "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/asyncImportNestedYield.js
//// [tests/cases/compiler/circularBaseTypes.ts] //// //// [circularBaseTypes.ts] // Repro from #38098 type M<T> = { value: T }; interface M2 extends M<M3> {}; // Error type M3 = M2[keyof M2]; // Error function f(m: M3) { return m.value; } // Repro from #32581 type X<T> = { [K in keyof T]: string } & { b: stri...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/circularBaseTypes.js
#!/bin/sh # Copyright (c) 2020, Jacob Keller. test_description='"git fetch" with negative refspecs. ' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh test_expect_success setup ' echo >file original && git add file && git commit -a -m original ' test_expect_...
unknown
github
https://github.com/git/git
t/t5582-fetch-negative-refspec.sh
"""Pythonic command-line interface parser that will make you smile. * http://docopt.org * Repository and issue-tracker: https://github.com/docopt/docopt * Licensed under terms of MIT license (see LICENSE-MIT) * Copyright (c) 2013 Vladimir Keleshev, vladimir@keleshev.com """ import sys import re __all__ = ['docop...
unknown
codeparrot/codeparrot-clean
JSON_UPDATE_NODES_SQL = """ SELECT json_agg( json_build_object( '_type', CASE WHEN N.type = 'osf.registration' THEN 'registration' WHEN PREPRINT.URL IS NOT NULL THEN 'preprint' WHEN PARENT_GUID._id IS NULL ...
unknown
codeparrot/codeparrot-clean
from tests import BaseTestCase from redash.models import Organization class TestOrganizationSettings(BaseTestCase): def test_post(self): admin = self.factory.create_admin() rv = self.make_request( "post", "/api/settings/organization", data={"auth_password_login_e...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Let p_n be the nth prime: 2, 3, 5, 7, 11, ..., and let r be the # remainder when (p_n - 1)**n + (p_n + 1)**n is divided by p_n**2. # For example, when n = 3, p_3 = 5, and 4**3 + 6**3 = 280 == 5 mod 25. # The least value of n for which the remainder first exceeds 10**9 is 7037. # Find the lea...
unknown
codeparrot/codeparrot-clean
import functools import unittest from django.template import Library from django.template.base import Node from django.test import SimpleTestCase from django.utils.version import PY314 class FilterRegistrationTests(SimpleTestCase): def setUp(self): self.library = Library() def test_filter(self): ...
python
github
https://github.com/django/django
tests/template_tests/test_library.py
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/kubeapiserver/options/admission_test.go
/* Copyright 2025 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/lite/transforms/lower_quant_annotations_helper.h
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License,...
unknown
codeparrot/codeparrot-clean
/// <reference lib="es2015" /> /// <reference lib="es2018.asynciterable" /> ///////////////////////////// /// Worker APIs ///////////////////////////// interface AacEncoderConfig { format?: AacBitstreamFormat; } interface AddEventListenerOptions extends EventListenerOptions { once?: boolean; passive?: bo...
typescript
github
https://github.com/microsoft/TypeScript
src/lib/webworker.generated.d.ts
this is not going "to" be happy json data at all { "10": whoops }
json
github
https://github.com/Alamofire/Alamofire
Tests/Resources/Responses/JSON/invalid_data.json
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.internal.debugging; import org.junit.Test; import org.mockito.internal.debugging.LocationFactory; import org.mockitoutil.TestBase; import java.util.ArrayList; import java.ut...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockitousage/internal/debugging/LocationFactoryTest.java
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
build-tools/src/testFixtures/java/org/elasticsearch/plugin/scanner/test_classes/TestNamedComponent.java
import os import shutil def main(): cwd = os.getcwd() if not cwd.endswith(os.path.join('FRENSIE', 'scripts')): print 'This script must be run in \"FRENSIE/scipts\"' print 'Your CWD is', cwd return 1 os.chdir('../../') os.mkdir('frensie_build_tree') #os.renames('FRENSIE', 'f...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging from...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # Copyright (C) 2005-Today Litex Service Sp. z o.o. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // 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 // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.h
""" Fallback syllable counter This is based on the algorithm in Greg Fast's perl module Lingua::EN::Syllable. """ import string, re, os specialSyllables_en = """tottered 2 chummed 1 peeped 1 moustaches 2 shamefully 3 messieurs 2 satiated 4 sailmaker 4 sheered 1 disinterred 3 propitiatory 6 bepatched 2 particularized...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * pg_class.h * definition of the "relation" system catalog (pg_class) * * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/includ...
c
github
https://github.com/postgres/postgres
src/include/catalog/pg_class.h
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2020, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
unknown
codeparrot/codeparrot-clean
""" Set up the plot figures, axes, and items to be done for each frame. This module is imported by the plotting routines and then the function setplot is called to set the plot parameters. """ import numpy as np from mapping import Mapping from clawpack.clawutil.data import ClawData import clawpack.seismic.dtopotool...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #-------------------------------------------------------------------------------# # A tool which exports a development tree to userland. # The development tree is supposed to properly built # and tested. #-------------------------------------------------------------------------------# import re im...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-8 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
unknown
codeparrot/codeparrot-clean
#!/bin/bash set -euxo pipefail # Download requirements cd llm-target-determinator pip install -q -r requirements.txt cd ../codellama pip install --no-build-isolation -v -e . pip install numpy==1.26.0 # Run indexer cd ../llm-target-determinator torchrun \ --standalone \ --nnodes=1 \ --nproc-per-node=1 \ ...
unknown
github
https://github.com/pytorch/pytorch
.github/scripts/td_llm_indexer.sh
import os, re, sys from ctypes import c_char_p, CDLL from ctypes.util import find_library from django.contrib.gis.gdal.error import OGRException # Custom library path set? try: from django.conf import settings lib_path = settings.GDAL_LIBRARY_PATH except (AttributeError, EnvironmentError, ImportError): lib...
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
#!/usr/env python import numpy as np import seaborn as sb import matplotlib.pyplot as plt import argparse import math from scipy.sparse import coo_matrix def plotall(datamat,domains1,domains2,bounds,legendname1,legendname2,outputname): """ Show heatmap of Hi-C data along with any domain sets given :param data...
unknown
codeparrot/codeparrot-clean
"""Logger utility classes and functions.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import os import sys import logging import traceback # -------------------------------------------------...
unknown
codeparrot/codeparrot-clean
__author__ = 'Michael Isik' from pybrain.supervised.evolino.variate import UniformVariate, GaussianVariate class Filter(object): """ Base class for all kinds of operators on the population during the evolutionary process like mutation, selection or evaluation. """ def __init__(self): pass ...
unknown
codeparrot/codeparrot-clean
/* esm.sh - esbuild bundle(os-browserify@0.3.0/browser) es2015 production */ var f=Object.create;var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var d=e=>o(e,"__esModule",{value:!0});var l=(e,t)=>()=>(t||e((...
javascript
github
https://github.com/webpack/webpack
examples/build-http/webpack.lock.data/https_cdn.esm.sh/v53_os-browserify_0.3.0_es2015_browser_476a088316baaea08336.js
"""distutils.spawn Provides the 'spawn()' function, a front-end to various platform- specific functions for launching another program in a sub-process. Also provides the 'find_executable()' to search the path for a given executable name. """ __revision__ = "$Id$" import sys import os from distutils.errors import Di...
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
spring-beans/src/main/java/org/springframework/beans/propertyeditors/ClassArrayEditor.java
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # # Maintainer: Jonathan Lange <jml@twistedmatrix.com> import time, re, StringIO from twisted.trial import unittest, runner, reporter from twisted.trial.test import erroneous class TestErrorReporting(unittest.TestCase): doubleSepara...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
unknown
codeparrot/codeparrot-clean
""" @version: 0.96(2010-08-29) @note: ABOUT EASYGUI EasyGui provides an easy-to-use interface for simple GUI interaction with a user. It does not require the programmer to know anything about tkinter, frames, widgets, callbacks or lambda. All GUI interactions are invoked by simple function calls that return results...
unknown
codeparrot/codeparrot-clean
import functools import unittest from math import isnan, nextafter from test.support import requires_IEEE_754 from test.support.hypothesis_helper import hypothesis floats = hypothesis.strategies.floats integers = hypothesis.strategies.integers def assert_equal_float(x, y): assert isnan(x) and isnan(y) or x == y ...
python
github
https://github.com/python/cpython
Lib/test/test_math_property.py
from __future__ import unicode_literals from unittest import skipIf from django.db import connection, connections from django.db.migrations.graph import NodeNotFoundError from django.db.migrations.loader import AmbiguityError, MigrationLoader from django.db.migrations.recorder import MigrationRecorder from django.tes...
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
"""A collection of modules for building different kinds of tree from HTML documents. To create a treebuilder for a new type of tree, you need to do implement several things: 1) A set of classes for various types of elements: Document, Doctype, Comment, Element. These must implement the interface of _base.treebuilders...
unknown
codeparrot/codeparrot-clean
import agents as ag import envgui as gui import random # ______________________________________________________________________________ loc_A, loc_B = (1, 1), (2, 1) # The two locations for the Vacuum world def RandomVacuumAgent(): "Randomly choose one of the actions from the vacuum environment." p = ag.Ran...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts] //// //// [augmentedClassWithPrototypePropertyOnModule.ts] declare namespace m { var f; var prototype; // This should be error since prototype would be static property on class m } declare class m { } //// [augmentedClassWithPrototypeP...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.js
/* 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 a...
go
github
https://github.com/tensorflow/tensorflow
tensorflow/go/session.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/common/serialization/Serdes.java
# -*- coding: utf-8 -*- # Copyright 2009 Jaap Karssenberg <jaap.karssenberg@gmail.com> from __future__ import with_statement import tests import sys import os from cStringIO import StringIO import logging import wsgiref.validate import wsgiref.handlers from zim.fs import File from zim.www import WWWInterface from ...
unknown
codeparrot/codeparrot-clean
from contextlib import contextmanager from numpy.testing import assert_equal, raises from skimage import io from skimage.io import manage_plugins io.use_plugin('pil') priority_plugin = 'pil' def setup_module(): manage_plugins.use_plugin('test') # see ../_plugins/test_plugin.py def teardown_module(): io.re...
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 a...
java
github
https://github.com/tensorflow/tensorflow
tensorflow/java/src/main/java/org/tensorflow/package-info.java
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
unknown
codeparrot/codeparrot-clean
'use strict'; const common = require('../common.js'); const { Buffer } = require('buffer'); const types = [ 'BigUInt64LE', 'BigUInt64BE', 'BigInt64LE', 'BigInt64BE', 'UInt8', 'UInt16LE', 'UInt16BE', 'UInt32LE', 'UInt32BE', 'UIntLE', 'UIntBE', 'Int8', 'Int16LE', 'Int16BE', 'Int32LE', 'Int...
javascript
github
https://github.com/nodejs/node
benchmark/buffers/buffer-write.js
# 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 unittest from telemetry.page import page as page_module from telemetry.page import page_set from telemetry.page import test_expectations class StubPl...
unknown
codeparrot/codeparrot-clean
// RUN: %check_clang_tidy %s bugprone-stringview-nullptr -std=c++17 %t namespace std { using size_t = long long; using nullptr_t = decltype(nullptr); template <typename T> T &&declval(); template <typename T> struct type_identity { using type = T; }; template <typename T> using type_identity_t = typename type_ident...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/checkers/bugprone/stringview-nullptr.cpp
"""Utilities for input validation""" # Authors: Olivier Grisel # Gael Varoquaux # Andreas Mueller # Lars Buitinck # Alexandre Gramfort # Nicolas Tresegnie # License: BSD 3 clause import warnings import numbers import numpy as np import scipy.sparse as sp from ..externals i...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, fmt_money from erpnext.shopping_cart.cart import _get_cart_quotation from erpnext.shopping_cart.doctype.sh...
unknown
codeparrot/codeparrot-clean
import sys, string, SambaParm from smbparm import parm_table ###################################################################### ## ## smb.conf parser class ## ## Copyright (C) Gerald Carter 2004. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU...
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/tracing/Span.java
# -*- coding: utf-8 -*- # # Flask-Neo4j documentation build configuration file, created by # sphinx-quickstart on Tue Feb 25 23:13:12 2014. # # 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
<div ngMenuBar class="retro-menubar" dir="rtl" (focusin)="onFocusIn()"> <div ngMenuItem #fileEl #fileItem="ngMenuItem" class="menu-bar-item" value="File" [submenu]="fileMenu()" > File </div> <ng-template [cdkConnectedOverlayOpen]="rendered()" [cdkConnectedOverlay]="{origin: ...
html
github
https://github.com/angular/angular
adev/src/content/examples/aria/menubar/src/rtl/retro/app/app.html
# # Copyright (c) 2008-2015 Citrix 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.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.impl.base.test.cases.components.typeCreator import com.intellij.psi...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-impl-base/testFixtures/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/typeCreator/AbstractTypeParameterTypeTest.kt
"""HTTP end-points for the User API. """ import copy import third_party_auth from django.conf import settings from django.contrib.auth.models import User from django.http import HttpResponse from django.core.urlresolvers import reverse from django.core.exceptions import ImproperlyConfigured from django.utils.translati...
unknown
codeparrot/codeparrot-clean
/*! * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Fragment, h} from 'preact'; import {TypeAliasEntryRenderable} from '../entities/renderables.mjs'; import {He...
typescript
github
https://github.com/angular/angular
adev/shared-docs/pipeline/api-gen/rendering/templates/type-alias-reference.tsx
# # Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://aws.amazon.com/apache2.0 # # or in the "license" file...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 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 cStringIO import fnmatch import optparse import os import re import sys VALID_CHANNELS = ('stable', 'beta', 'dev') ROOT_FI...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ flask._compat ~~~~~~~~~~~~~ Some py2/py3 compatibility support based on a stripped down version of six so we don't have to depend on a specific version of it. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys PY...
unknown
codeparrot/codeparrot-clean
from django.test import TestCase from django.core import mail from django.contrib.auth.models import User from userena.models import UserenaSignup from userena import settings as userena_settings from guardian.shortcuts import get_perms import datetime, re class UserenaManagerTests(TestCase): """ Test the manag...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import math DESTRUIDO = 'Destruido' ATIVO = 'Ativo' GRAVIDADE = 10 # m/s^2 class Ator(): """ Classe que representa um ator. Ele representa um ponto cartesiano na tela. """ _caracter_ativo = 'A' _caracter_destruido = ' ' def __i...
unknown
codeparrot/codeparrot-clean
# coding: utf8 """ Tests for Flask-FlatPages ~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by Simon Sapin. :license: BSD, see LICENSE for more details. """ import datetime import operator import os import shutil import sys import unicodedata import unittest from contextlib import contextmanager fro...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/nospec.h> #include <linux/io_uring.h> #include <uapi/linux/io_uring.h> #include "filetable.h" #include "sqpoll.h" ...
c
github
https://github.com/torvalds/linux
io_uring/fdinfo.c
# -*- coding: utf-8 -*- import os import re import fnmatch import threading import urllib2 import xbmc import xbmcaddon from contextlib import contextmanager, closing __addon__ = xbmcaddon.Addon() CACHE_DIR = xbmc.translatePath(__addon__.getAddonInfo("profile")) PAC_URL = "http://antizapret.prostovpn.org/proxy.pac" U...
unknown
codeparrot/codeparrot-clean
# Trains network on the full neurofinder dataset ## IMPORT import json import numpy as np from scipy.misc import imread from glob import glob import os import random import neurofinder as nf from keras.layers import Input, Convolution2D, MaxPooling2D, Convolution3D, MaxPooling3D, merge, Dropout, BatchNormalization, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy # in the file LICENSE in the source distribution or at # https://www.openssl.org/sourc...
unknown
codeparrot/codeparrot-clean
""" Django ORM model specifications for the User API application """ from django.contrib.auth.models import User from django.core.validators import RegexValidator from django.db import models from django.db.models.signals import post_delete, pre_save, post_save from django.dispatch import receiver from model_utils.mode...
unknown
codeparrot/codeparrot-clean
// Copyright 2025 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
go
github
https://github.com/etcd-io/etcd
tests/antithesis/test-template/entrypoint/main.go
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def initial_data(apps, schema_editor): ContentType = apps.get_model('contenttypes.ContentType') Group = apps.get_model('auth.Group') Page = apps.get_model('wagtailcore.Page') Site = apps.get_model(...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # grid_iaf_irr.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, o...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import from operator import attrgetter from django.core.exceptions import FieldError from django.test import TestCase from django.utils import six from .models import (Chef, CommonInfo, ItalianRestaurant, ParkingLot, Place, Post, Restaurant, Student, StudentWorker, Supplier, Worke...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Functions to format apertium style analyses from omorfi data.""" # Author: Omorfi contributors <omorfi-devel@groups.google.com> 2015 # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
unknown
codeparrot/codeparrot-clean
import logging import click from ..models import Scene from ..utils.exception_reporting import wrap_rollbar from ..uploads.landsat_historical.factories import ( process_to_cog, upload_file, MultiSpectralScannerConfig, ThematicMapperConfig, EnhancedThematicMapperConfig ) from rf.utils import io lo...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # 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 F...
unknown
codeparrot/codeparrot-clean