code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
/* * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.tests.server.cio import io.ktor.client.request.* import io.ktor.client.statement.* import io.ktor.http.* import io.ktor.http.content.* import io.ktor.network.selector.* import...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-cio/common/test/io/ktor/tests/server/cio/CIOEngineTest.kt
from hachoir_core.field import BasicFieldSet, GenericFieldSet, ParserError, createRawField from hachoir_core.error import HACHOIR_ERRORS # getgaps(int, int, [listof (int, int)]) -> generator of (int, int) # Gets all the gaps not covered by a block in `blocks` from `start` for `length` units. def getgaps(start, length,...
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.standalone.fir.test.cases.generated.cases.symbols; import com.intel...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/symbols/FirStandaloneNormalAnalysisSourceModuleSymbolByJavaPsiTestGenerated.java
//! Adaptors from `AsyncRead`/`AsyncWrite` to Stream/Sink //! //! Raw I/O objects work with byte sequences, but higher-level code usually //! wants to batch these into meaningful chunks, called "frames". //! //! This module contains adapters to go from streams of bytes, [`AsyncRead`] and //! [`AsyncWrite`], to framed s...
rust
github
https://github.com/tokio-rs/tokio
tokio-util/src/codec/mod.rs
/* Copyright 2018 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/common_runtime/eager/tensor_handle.h
#pragma once #include <ATen/ATen.h> #include <ATen/core/op_registration/op_registration.h> #include <torch/library.h> namespace at { // If an operator doesn't have a batching rule implemented then we fallback // to this implementation. The fallback only works on out-of-place operators // that return only tensors with...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/LegacyBatchedFallback.h
#!/usr/bin/env python # # Copyright 2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
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 n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/clients/admin/internals/AdminMetadataManager.java
doctests = """ Basic class construction. >>> class C: ... def meth(self): print("Hello") ... >>> C.__class__ is type True >>> a = C() >>> a.__class__ is C True >>> a.meth() Hello >>> Use *args notation for the bases. >>> class A: pass >>> class B: pass >>>...
unknown
codeparrot/codeparrot-clean
//go:build !enterprise // Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package vault import ( "context" "time" ) func (c *Core) UpdateTransformCallCounts(ctx context.Context, currentMonth time.Time) (uint64, error) { // No-op in OSS return 0, nil } func (c *Core) GetStoredTransformCallCou...
go
github
https://github.com/hashicorp/vault
vault/consumption_billing_util_stubs_oss.go
# coding: utf-8 from __future__ import unicode_literals import json from .common import InfoExtractor from ..utils import ( int_or_none, js_to_json, ) class KrasViewIE(InfoExtractor): IE_DESC = 'Красвью' _VALID_URL = r'https?://krasview\.ru/(?:video|embed)/(?P<id>\d+)' _TEST = { 'url': '...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Copyright 2016 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 subprocess im...
unknown
codeparrot/codeparrot-clean
// _sysconfig provides data for the Python sysconfig module #ifndef Py_BUILD_CORE_BUILTIN # define Py_BUILD_CORE_MODULE 1 #endif #include "Python.h" #include "pycore_importdl.h" // _PyImport_DynLoadFiletab #include "pycore_long.h" // _PyLong_GetZero, _PyLong_GetOne /*[clinic input] module _sysconfig [clini...
c
github
https://github.com/python/cpython
Modules/_sysconfig.c
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package command import ( "bytes" "fmt" "strings" "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/states/statefile" "github.com/hashicorp/terraform/internal/states/statemgr" ) // StatePull...
go
github
https://github.com/hashicorp/terraform
internal/command/state_pull.go
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Monolog\Handler\FingersCrossed; use Monolog\Handler\Fing...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/Monolog/Handler/FingersCrossed/HttpCodeActivationStrategy.php
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
unknown
codeparrot/codeparrot-clean
{ "title": "V39 TimeSeriesTable Transformation Migration Test Dashboard", "schemaVersion": 38, "panels": [ { "type": "table", "title": "Panel with TimeSeriesTable Transformation - Single Stat", "id": 1, "transformations": [ { "id": "timeSeriesTable", "option...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/testdata/input/v39.transform_timeseries_table.json
# -*- coding: latin-1 -*- import xbmcgui class DialogProgress: def __init__(self): self.dlg = xbmcgui.DialogProgress() self.__reset__() def __reset__(self): self.head = '' self.firstline = '' self.secondline = None self.thirdline = None self.percent = ...
unknown
codeparrot/codeparrot-clean
DOCUMENTATION: name: subset author: Ansible Core version_added: "2.4" aliases: [issubset] short_description: is the list a subset of this other list description: - Validate if the first list is a sub set (is included) of the second list. options: _input: description: List. type: list ...
unknown
github
https://github.com/ansible/ansible
lib/ansible/plugins/test/issubset.yml
#!/usr/bin/python # -*- coding: utf-8 -*- # TODO: # Ability to set CPU/Memory reservations try: import json except ImportError: import simplejson as json HAS_PYSPHERE = False try: from pysphere import VIServer, VIProperty, MORTypes from pysphere.resources import VimService_services as VI from py...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE A...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.7 # TODO add error checking/doc strings # TODO this needs more testing, especially testing change in core state # figure out when to lock core # how the fuk to import? # get emitter isnt working. am i sure tmpname is ok to use? # catch all kill signals? # maybe each systemd service can map to multipl...
unknown
codeparrot/codeparrot-clean
# Prometheus configuration for cockroach clusters. # Requires prometheus 2.X # # Run with: # $ prometheus -config.file=prometheus.yml global: scrape_interval: 10s evaluation_interval: 10s rule_files: - "rules/alerts.rules.yml" - "rules/aggregation.rules.yml" # Alert manager running on the same host: alerting: a...
unknown
github
https://github.com/cockroachdb/cockroach
monitoring/prometheus.yml
#! /usr/bin/env python from __future__ import print_function from openturns import * TESTPREAMBLE() RandomGenerator.SetSeed(0) try: # Instanciate one distribution object distribution = Chi(1.5) print("Distribution ", repr(distribution)) print("Distribution ", distribution) # Is this distribution...
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 n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/requests/LeaveGroupRequest.java
from libsaas import http, parsers from libsaas.services import base from .resource import ( serialize_param, TrelloFieldMixin, TrelloFilterMixin, TrelloResource, TrelloCollection, TrelloReadonlyResource, TrelloReadonlyCollection) class Board(TrelloReadonlyResource, TrelloFieldMixin): path = 'board' c...
unknown
codeparrot/codeparrot-clean
// Copyright 2022 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/framework/integration/integration.go
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2014, Red Hat, Inc. # Tim Bielawa <tbielawa@redhat.com> # Magnus Hedemark <mhedemar@redhat.com> # Copyright 2017, Dag Wieers <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ impo...
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/PropertyDescriptorUtils.java
# -*- coding: utf8 -*- """ Tests for pika.adapters.blocking_connection.BlockingChannel """ from collections import deque import logging try: import mock except ImportError: from unittest import mock try: import unittest2 as unittest except ImportError: import unittest from pika.adapters import block...
unknown
codeparrot/codeparrot-clean
import logging logger = logging.getLogger(__name__) from redbean.secure.identity import SessionIdentity from redbean.secure.keeper import UserIdentityKeeper from redbean.asyncid import AsyncID64 from test.security.app import rest, etcd_endpoint user_id_generator = AsyncID64('/asyncid/user_sn', etcd_endpoint) keeper ...
unknown
codeparrot/codeparrot-clean
/* 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/stablehlo/transforms/fold_broadcast_pass.h
## Input ```javascript function f() { let x = 1; x = x + 1; x += 1; x >>>= 1; return x; } export const FIXTURE_ENTRYPOINT = { fn: f, params: [], isComponent: false, }; ``` ## Code ```javascript function f() { return 1; } export const FIXTURE_ENTRYPOINT = { fn: f, params: [], isComponent: f...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/assignment-variations.expect.md
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- $id: http://devicetree.org/schemas/mfd/sprd,sc2731.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Spreadtrum SC27xx PMIC maintainers: - Orson Zhai <orsonzhai@gmail.com> - Baolin Wang <baolin.wang7@gmail.com> - Chunyan Zha...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
# strategy_best.py # Strategy pattern -- function-based implementation # selecting best promotion from static list of functions """ >>> joe = Customer('John Doe', 0) >>> ann = Customer('Ann Smith', 1100) >>> cart = [LineItem('banana', 4, .5), ... LineItem('apple', 10, 1.5), ... Line...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python __version__ = "1.13.2010.21:00" __author__ = "Marfi" ''' This is the installer file for airdrop-ng. It first checks for different dependancies, such as make, svn, etc. ''' import os, sys from shutil import rmtree if os.geteuid() != 0: print "Installer must be root to run. \nPlease 'su' or 'sud...
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 n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/requests/EnvelopeRequest.java
for a, b, c in b: pass else: 1/0 for : keyword.control.flow.python, source.python : source.python a : source.python , : punctuation.separator.element.python, source.python : source.python b : source.python , : punctuation.sep...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import sys """ Python 3 Stuff ============================================================================= """ PY3 = sys.version_info[0] == 3 if PY3: # pragma: no cover string_type = str text_type = str int2str = chr else: # prag...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function foo(a, b, c) { const x = []; if (a) { const y = []; y.push(b); x.push(<div>{y}</div>); } else { x.push(c); } return x; } export const FIXTURE_ENTRYPOINT = { fn: foo, params: ['TodoAdd'], isComponent: 'TodoAdd', }; ``` ## Code ```javascript import { c ...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reactive-scopes-if.expect.md
--- layout: default --- <section class="docs"> <div class="grid"> {% include docs_contents_mobile.html -%} <div class="unit four-fifths"> <article> {% include improve_doc_link.html %} <h1>{{ page.title }}</h1> {{ content }} </article> </div> {% include docs_content...
html
github
https://github.com/jekyll/jekyll
docs/_layouts/docs.html
# -*- 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
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2012 OpenERP - Team de Localización Argentina. # https://launchpad.net/~openerp-l10n-ar-localization # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
unknown
codeparrot/codeparrot-clean
name: Static Typing description: Report an issue with the NumPy typing hints. title: "TYP: <Please write a comprehensive title after the 'TYP: ' prefix>" labels: [41 - Static typing] body: - type: markdown attributes: value: > Thank you for taking the time to report this issue. Please make sure that ...
unknown
github
https://github.com/numpy/numpy
.github/ISSUE_TEMPLATE/typing.yml
#!/usr/bin/python # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/commentsCommentParsing.ts] //// //// [commentsCommentParsing.ts] /// This is simple /// comments function simple() { } simple(); /// multiLine /// Comments /// This is example of multiline /// comments /// Another multiLine function multiLine() { } multiLine(); /** this is eg of single li...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/commentsCommentParsing(target=es2015).js
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import POINTER, c_char_p, c_double, c_int, c_long, c_uint, c_void_p from django.contrib.gis.gdal.envelope import OGREnvelope fro...
python
github
https://github.com/django/django
django/contrib/gis/gdal/prototypes/ds.py
//// [tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts] //// //// [asyncArrowFunction6_es6.ts] var foo = async (a = await): Promise<void> => { } //// [asyncArrowFunction6_es6.js] "use strict"; var foo = (...args_1) => __awaiter(void 0, [...args_1], void 0, function* (a = yield ) { });
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/asyncArrowFunction6_es6.js
# Copyright 2015 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
# -*- coding: utf-8 -*- # GTK3 widget to implement statuses in Turpial import re from gi.repository import Gtk from gi.repository import Gdk from gi.repository import Pango from gi.repository import GdkPixbuf from turpial.ui.lang import i18n from turpial.ui.gtk.common import * from turpial.ui.gtk.statusmenu import ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Unit test that checks preprocessing of files. Tests preprocessing by adding having the preprocessor provide the actual rct...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
unknown
codeparrot/codeparrot-clean
# Copyright 2024 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 applicabl...
python
github
https://github.com/huggingface/transformers
src/transformers/models/clip/__init__.py
"""SCons.Tool.mwld Tool-specific initialization for the Metrowerks CodeWarrior linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0-only /* * linux/fs/binfmt_script.c * * Copyright (C) 1996 Martin von Löwis * original #!-checking implemented by tytso. */ #include <linux/module.h> #include <linux/string.h> #include <linux/stat.h> #include <linux/binfmts.h> #include <linux/init.h> #include <linux/file.h> ...
c
github
https://github.com/torvalds/linux
fs/binfmt_script.c
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Scientific Package. This package holds all simulators, and # analysers necessary to run brain-simulations. You can use it stand alone or # in conjunction with TheVirtualBrain-Framework Package. See content of the # documentation-folder for more details. See also http://www...
unknown
codeparrot/codeparrot-clean
#ifndef Py_INTERNAL_AUDIT_H #define Py_INTERNAL_AUDIT_H #ifdef __cplusplus extern "C" { #endif #ifndef Py_BUILD_CORE # error "this header requires Py_BUILD_CORE define" #endif /* Runtime audit hook state */ typedef struct _Py_AuditHookEntry { struct _Py_AuditHookEntry *next; Py_AuditHookFunction hookCFuncti...
c
github
https://github.com/python/cpython
Include/internal/pycore_audit.h
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
unknown
codeparrot/codeparrot-clean
import base64 import io import json import os import platform import signal import subprocess import tempfile import zipfile from abc import ABCMeta, abstractmethod import mozinfo import mozleak import mozversion from mozprocess import ProcessHandler from mozprofile import FirefoxProfile, Preferences from mozrunner im...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import print_function # Form implementation generated from reading ui file './acq4/modules/DataManager/FileInfoViewTemplate.ui' # # Created: Tue Dec 24 01:49:10 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! from PyQt4 impo...
unknown
codeparrot/codeparrot-clean
import numpy as np import scipy.misc import scipy.signal import math import draw import ref # ============================================================================= # General image processing functions # ============================================================================= def get_transform(center, sc...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # # 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 "L...
unknown
codeparrot/codeparrot-clean
/* * By downloading, copying, installing or using the software you agree to this license. * If you do not agree to this license, do not download, install, * copy or use the software. * * * License Agreement * For Open Source Computer Vision Library * ...
cpp
github
https://github.com/opencv/opencv
hal/carotene/src/laplacian.cpp
#ifndef Py_SSL_H #define Py_SSL_H /* OpenSSL header files */ #include "openssl/evp.h" #include "openssl/x509.h" /* * ssl module state */ typedef struct { /* Types */ PyTypeObject *PySSLContext_Type; PyTypeObject *PySSLSocket_Type; PyTypeObject *PySSLMemoryBIO_Type; PyTypeObject *PySSLSession_Typ...
c
github
https://github.com/python/cpython
Modules/_ssl.h
// Copyright 2023 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. package runtime_test import ( "testing" _ "unsafe" ) //go:linkname heapObjectsCanMove runtime.heapObjectsCanMove func heapObjectsCanMove() bool func TestHe...
go
github
https://github.com/golang/go
src/runtime/heap_test.go
import copy import json from geowatchutil.buffer.base import GeoWatchBuffer from geowatchutil.channel.base import GeoWatchChannelTopic, GeoWatchChannelError class GeoWatchChannelSlack(GeoWatchChannelTopic): # Public message_templates = None # Private _buffer = None # Used for temporarily caching me...
unknown
codeparrot/codeparrot-clean
data = ( 'Xi ', # 0x00 'Kao ', # 0x01 'Lang ', # 0x02 'Fu ', # 0x03 'Ze ', # 0x04 'Shui ', # 0x05 'Lu ', # 0x06 'Kun ', # 0x07 'Gan ', # 0x08 'Geng ', # 0x09 'Ti ', # 0x0a 'Cheng ', # 0x0b 'Tu ', # 0x0c 'Shao ', # 0x0d 'Shui ', # 0x0e 'Ya ', # 0x0f 'Lun ', # 0x10 'Lu '...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para documentaristreaming # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # by dentaku65, DrZ3r0 # ------------------------------------------------------------ import urlparse, urllib2, ...
unknown
codeparrot/codeparrot-clean
#pragma once // The legacy mechanism for dispatching operators in ATen is a Type // object, which is essentially a giant virtual dispatch table // for every operation we support dynamically dispatching over. // // This has been deprecated in favor of ATenDispatch, and in the future, // c10 dispatcher. // TODO: Clean u...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/core/LegacyTypeDispatch.h
#!/usr/bin/env python2 #!---coding:utf-8--- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 from selenium.webdriver.support import expected_conditions as EC # available since 2.26.0 from selenium.common.exceptions...
unknown
codeparrot/codeparrot-clean
--- name: updatecli-compose on: workflow_dispatch: schedule: - cron: "0 6 * * *" permissions: contents: read jobs: setup-matrix: if: github.repository == 'elastic/elasticsearch' runs-on: ubuntu-latest outputs: branches: ${{ steps.set-matrix.outputs.matrix }} steps: - uses: act...
unknown
github
https://github.com/elastic/elasticsearch
.github/workflows/updatecli-compose.yml
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('deck', '0010_create_activities_from_proposals'), ] operations = [ migrations.RemoveField( model_name='proposal', ...
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 # ...
unknown
codeparrot/codeparrot-clean
"""Unit tests for buildscripts.patch_builds patckage."""
python
github
https://github.com/mongodb/mongo
buildscripts/tests/patch_builds/__init__.py
######################################################################### # # # # ## # # # # # # # # # # # # # # # # # ##### # # #...
unknown
codeparrot/codeparrot-clean
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
unknown
codeparrot/codeparrot-clean
from langchain_classic.schema.cache import __all__ EXPECTED_ALL = ["BaseCache", "RETURN_VAL_TYPE"] def test_all_imports() -> None: assert set(__all__) == set(EXPECTED_ALL)
python
github
https://github.com/langchain-ai/langchain
libs/langchain/tests/unit_tests/schema/test_cache.py
# -*- coding: utf-8 -*- # Copyright 2020 Google 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 applicable law or...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can red...
unknown
codeparrot/codeparrot-clean
################################################################################### ## MODULE : spell.__init__ ## DATE : Mar 18, 2011 ## PROJECT : SPELL ## DESCRIPTION: Module initialization ## -------------------------------------------------------------------------------- ## ## Copyright (C) 2008, 2015 ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.contrib.auth.handlers.modwsgi import ( check_password, groups_for_user, ) from django.contrib.auth.models import Group, User from django.contrib.auth.tests.custom_user import CustomUser from django.test import TransactionTestCase, override_settings # This must b...
unknown
codeparrot/codeparrot-clean
# This is a component of AXIS, a front-end for emc # Copyright 2007 Anders Wallin <anders.wallin@helsinki.fi> # # TJP 12 04 2007 # Rugludallur saw that spinbuttons had no initial value until after thumbs inc'd or de'c # TJP saw that if xml prescribed <value>1234</value> the spinbutton locked up after the in...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 Google LLC. 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
########################################################################## # # Copyright (c) 2012, John Haddon. 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 sou...
unknown
codeparrot/codeparrot-clean
// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modi...
c
github
https://github.com/nodejs/node
src/base_object.h
from django.core.checks.compatibility.django_1_8_0 import \ check_duplicate_template_settings from django.test import SimpleTestCase from django.test.utils import override_settings class CheckDuplicateTemplateSettingsTest(SimpleTestCase): def test_not_raised_if_no_templates_setting(self): self.assertE...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # Authors: Nicolas Bessi, Guewen Baconnier # Copyright Camptocamp SA 2011 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2015 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/framework/tensor_util.h
"""Profiler tools for CherryPy. CherryPy users ============== You can profile any of your pages as follows: from cherrypy.lib import profiler class Root: p = profile.Profiler("/path/to/profile/dir") def index(self): self.p.run(self._index) index.exposed = True d...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ This script is used to run tests, create a coverage report and output the statistics at the end of the tox run. To run this script just execute ``tox`` """ import re from fabric.api import local, warn from fabric.colors import green, red if __name__ == '__main__': local('flake8 --ignore=...
unknown
codeparrot/codeparrot-clean
from common_fixtures import * # NOQA def test_compute_free(super_client, new_context): admin_client = new_context.client count = 5 host = super_client.reload(new_context.host) image_uuid = new_context.image_uuid start_free = host.computeFree assert start_free > count containers = [] ...
unknown
codeparrot/codeparrot-clean
# Takes lists of objects returned by the zkclient module, and # consolidates the information for display. import logging class NullHandler(logging.Handler): def emit(self, record): pass logger = logging.getLogger('kafka.codec').addHandler(NullHandler()) import struct import socket from collections impor...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional from typing_extensions import Literal from ...._models import BaseModel __all__ = ["ConversationItemContent"] class ConversationItemContent(BaseModel): id: Optional[str] = None """ ID of a p...
python
github
https://github.com/openai/openai-python
src/openai/types/beta/realtime/conversation_item_content.py
import os from rpython.rlib import jit from bf import bytecode from bf.parser import parse # ----------------------------------------------------------------------------- # -- Interpreter -------------------------------------------------------------- def get_location(pc, bc, bcode): lines, i, x = [], 0, 0...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ Cleans up *.mae files. Accepts multiple filenames and glob as the argument(s). This version adds in the custom conformational search properties to Maestro structures, atoms and bonds if they don't already exist. Default for all values is zero. """ import os import sys from schrodinger impor...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2019 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 to i...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/reflect/IgnoreJRERequirement.java
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import frappe import erpnext from frappe.utils import flt, nowdate, add_days, cint from frappe import _ def reorder_item(): """ Reorder item if stock reaches reorder level""" # if initial s...
unknown
codeparrot/codeparrot-clean