code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
"""Treadmill allocation REST api. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import flask import flask_restplus as restplus from flask_restplus import fields # Disable E0611: No 'name' in module from treadmi...
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 applica...
unknown
codeparrot/codeparrot-clean
import NIOCore import Foundation import NIOHTTP1 /// Decodes instances of `Decodable` types from `application/x-www-form-urlencoded` data. /// /// ```swift /// print(data) // "name=Vapor&age=3" /// let user = try URLEncodedFormDecoder().decode(User.self, from: data) /// print(user) // User /// ``` /// /// URL-encoded ...
swift
github
https://github.com/vapor/vapor
Sources/Vapor/URLEncodedForm/URLEncodedFormDecoder.swift
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
build-plugin/spring-boot-maven-plugin/src/intTest/projects/aot-jdk-proxy/src/main/java/org/test/SampleApplication.java
import re import dateutil.parser from xml.dom import minidom, Node from django.utils.encoding import smart_unicode, smart_str from django.utils.translation import ugettext as _ from onadata.libs.utils.common_tags import XFORM_ID_STRING class XLSFormError(Exception): pass class DuplicateInstance(Exception): d...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 """ Cubehelix color maps and palettes. The Cubehelix algorithm makes color scales with monotonic changes in perceived brightness. This means that a cubehelix color map gracefully degrades into a monotonic grayscale color map when rendered without color. Cubehelix maps are generated algorithmically, gi...
unknown
codeparrot/codeparrot-clean
import numpy as np from matplotlib import pyplot from spm1d import rft1d ''' WARNING! Calls to rft1d.random.randn1d must set pad=True when FWHM is greater than 50 ''' #(0) Set parameters: np.random.seed(0) nResponses = 1000 nNodes = 101 ### generate a field mask: nodes = np.array([True]*nNodes) #nothin...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "active_model/validations/comparability" require "active_model/validations/resolve_value" module ActiveModel module Validations class ComparisonValidator < EachValidator # :nodoc: include Comparability include ResolveValue def check_validity! unle...
ruby
github
https://github.com/rails/rails
activemodel/lib/active_model/validations/comparison.rb
from sympy.core.basic import Basic from sympy.vector.scalar import BaseScalar from sympy import eye, trigsimp, ImmutableMatrix as Matrix, Symbol from sympy.core.compatibility import string_types, range from sympy.core.cache import cacheit from sympy.vector.orienters import (Orienter, AxisOrienter, BodyOrienter, ...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# # # Copyright 2009-2018 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (...
unknown
codeparrot/codeparrot-clean
// @throwUnknownException__testonly:true function Component() {} export const FIXTURE_ENTRYPOINT = { fn: Component, params: [], };
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.handle-unexpected-exception-pipeline.ts
# -*- coding: utf-8 -*- """ *************************************************************************** lasinfo.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com --------------------- D...
unknown
codeparrot/codeparrot-clean
""" originally from http://www.djangosnippets.org/snippets/828/ by dnordberg """ import logging from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from six.moves import configparser, input from django_extensions.management.utils import s...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Union from typing_extensions import Literal from ..._models import BaseModel __all__ = ["SupervisedHyperparameters"] class SupervisedHyperparameters(BaseModel): """The hyperparameters used for the fine-tunin...
python
github
https://github.com/openai/openai-python
src/openai/types/fine_tuning/supervised_hyperparameters.py
from django.contrib.postgres.indexes import ( BloomIndex, BrinIndex, BTreeIndex, GinIndex, GistIndex, HashIndex, OpClass, PostgresIndex, SpGistIndex, ) from django.db import connection from django.db.models import CharField, F, Index, Q from django.db.models.functions import Cast, Co...
python
github
https://github.com/django/django
tests/postgres_tests/test_indexes.py
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """ ...
unknown
codeparrot/codeparrot-clean
""" 26. Invalid models This example exists purely to point out errors in models. """ from django.contrib.contenttypes import generic from django.db import models class FieldErrors(models.Model): charfield = models.CharField() charfield2 = models.CharField(max_length=-1) charfield3 = models.CharField(max_...
unknown
codeparrot/codeparrot-clean
# `create-react-router` ## 7.13.0 _No changes_ ## 7.12.0 _No changes_ ## 7.11.0 _No changes_ ## 7.10.1 _No changes_ ## 7.10.0 _No changes_ ## 7.9.6 _No changes_ ## 7.9.5 _No changes_ ## 7.9.4 _No changes_ ## 7.9.3 _No changes_ ## 7.9.2 _No changes_ ## 7.9.1 _No changes_ ## 7.9.0 _No changes_ ##...
unknown
github
https://github.com/remix-run/react-router
packages/create-react-router/CHANGELOG.md
//! Checks necessary for externally implementable items: //! Are all items implemented etc.? use std::iter; use rustc_data_structures::fx::FxIndexMap; use rustc_hir::attrs::{EiiDecl, EiiImpl}; use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE}; use rustc_middle::ty::TyCtxt; use rustc_session::config::CrateType; u...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_passes/src/eii.rs
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package testing import ( "os" "testing" ) func init() { testTesting = true if err := os.Setenv(TestEnvVar, "1"); err != nil { panic(err) } } func TestTest_noEnv(t *testing.T) { // Unset the variable if err := os.Setenv(TestEnvVar, "");...
go
github
https://github.com/hashicorp/vault
helper/testhelpers/logical/testing_test.go
import sys if __name__ == '__main__': import os pkg_dir = os.path.split(os.path.abspath(__file__))[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = (pkg_name == 'tests' and os.path.split(parent_dir)[1] == 'pygame') if not is_pygame_pkg: sys.path.insert(0,...
unknown
codeparrot/codeparrot-clean
groups: - name: test rules: - record: job:http_requests:rate5m expr: sum by (job)(rate(http_requests_total[5m]))
unknown
github
https://github.com/prometheus/prometheus
rules/fixtures/rules.yaml
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.http.cio import io.ktor.http.cio.internals.* import io.ktor.utils.io.pool.* import kotlin.math.absoluteValue private const val EXPECTED_HEADERS_QTY = 128 /* * index array str...
kotlin
github
https://github.com/ktorio/ktor
ktor-http/ktor-http-cio/common/src/io/ktor/http/cio/HttpHeadersMap.kt
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
unknown
codeparrot/codeparrot-clean
"""Init file for HassIO util for rest api.""" import json import hashlib import logging from aiohttp import web from aiohttp.web_exceptions import HTTPServiceUnavailable import voluptuous as vol from voluptuous.humanize import humanize_error from ..const import ( JSON_RESULT, JSON_DATA, JSON_MESSAGE, RESULT_OK, R...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2011-2014 The developers of Aqualid project - http://aqualid.googlecode.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 without limitation...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # Copyright (c) 2012 X.commerce, a business unit of eBay Inc. # # Licensed under the Apache License, Version 2.0 (the "License")...
unknown
codeparrot/codeparrot-clean
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Example** ```esql TS k8s | EVAL full_clamped_cost = clamp(network.cost, clamp_max(network.bytes_in, 5), network.bytes_in / 100) | KEEP full_clamped_cost, @timestamp ``` | full_clamped_cost:double | @t...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/examples/clamp.md
class TestIteration: def test_keys(self, datetime_series): assert datetime_series.keys() is datetime_series.index def test_iter_datetimes(self, datetime_series): for i, val in enumerate(datetime_series): assert val == datetime_series.iloc[i] def test_iter_strings(self, string_s...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/series/test_iteration.py
// Copyright 2017 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
pkg/report/weighted.go
#!/bin/bash ROOT=$(pwd) FF_LOCATION="$ROOT/third_party/flatbuffers" cd "$FF_LOCATION" || exit mkdir build cd build || exit cmake .. cmake --build . --target flatc mkdir -p "$ROOT/build/torch/csrc/jit/serialization" ./flatc --cpp --gen-mutable --scoped-enums \ -o "$ROOT/torch/csrc/jit/serialization" \ -c "$ROO...
unknown
github
https://github.com/pytorch/pytorch
tools/gen_flatbuffers.sh
# -*- coding: utf-8 -*- """ /*************************************************************************** NNJoin_nogui NNJoin plugin to run from command-line Usage: -------------- from NNJoin_nogui import runnogui NNinst = runnogui(inputvectorlayer, joinvectorlayer, outputlay...
unknown
codeparrot/codeparrot-clean
""" Record Arrays ============= Record arrays expose the fields of structured arrays as properties. Most commonly, ndarrays contain elements of a single type, e.g. floats, integers, bools etc. However, it is possible for elements to be combinations of these using structured types, such as:: >>> a = np.array([(1, 2...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
unknown
codeparrot/codeparrot-clean
"""single pie chart metric Revision ID: 80a67c5192fa Revises: afb7730f6a9c Create Date: 2018-06-14 14:31:06.624370 """ # revision identifiers, used by Alembic. revision = '80a67c5192fa' down_revision = 'afb7730f6a9c' import json from alembic import op from sqlalchemy.ext.declarative import declarative_base from sq...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ **highlighters.py** **Platform:** Windows, Linux, Mac Os X. **Description:** Defines the Application themes classes. **Others:** """ from __future__ import unicode_literals from PyQt4.QtGui import QColor from PyQt4.QtGui import QTextCharFormat import fou...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Publishable.last_updated' db.alter_column('core_publishable', 'last_updated', self.gf('django.db....
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. # On Android we build unit test bundles as shared libraries. To run # tests, we launch a special "test runner" apk which loads t...
unknown
codeparrot/codeparrot-clean
# Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
unknown
codeparrot/codeparrot-clean
# This classifies the same digit as the logistic regression classifiers from # the first step. But here we're using a pre-trained neural network classifier # (loaded from data/ex3weights.mat) import numpy as np from scipy import io from sklearn import metrics # Load the data. filename = 'data/ex3data1.mat' data = io.l...
unknown
codeparrot/codeparrot-clean
#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP #define BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // polymorphic_xml_oarchive.hpp // (C) Copy...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/archive/polymorphic_xml_oarchive.hpp
# # Copyright 2006 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) # any later version. # #...
unknown
codeparrot/codeparrot-clean
# Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:#www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ List of reserved usernames (pre-defined list of special banned and reserved keywords in names, such as "root", "www", "admin"). Useful when creating public systems, where users can choose a login name or a sub-domain name. __References:__ 1. http://ww...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright 2002 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Tests that we can use objects from other projects, i.e. with other project # root. Test also that we can refer to those targ...
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/readability/RedundantInlineSpecifierCheck.h
import unittest from mockredis.client import MockRedis from src.reshaper.runner import Runner from test.test_data.sql import DBWrapper from test.test_data.transformers import * class TestCache(unittest.TestCase): pass """ def setUp(self): self.db = DBWrapper() self.db.connect() s...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/externModule.ts] //// //// [externModule.ts] declare module { export class XDate { public getDay():number; public getXDate():number; // etc. // Called as a function // Not supported anymore? public (): string; // Called as a constructor constructor(year: numbe...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/externModule.js
#pragma once // DO NOT DEFINE STATIC DATA IN THIS HEADER! // See Note [Do not compile initializers with AVX] #include <ATen/cpu/vec/vec.h> namespace at::vec { // BFloat16 specification template <typename scalar_t> struct VecScalarType { using type = scalar_t; }; template <> struct VecScalarType<BFloat16> { using...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/cpu/vec/functional_bfloat16.h
/* * qsort.c: standard quicksort algorithm */ #include "c.h" #define ST_SORT pg_qsort #define ST_ELEMENT_TYPE_VOID #define ST_COMPARE_RUNTIME_POINTER #define ST_SCOPE #define ST_DECLARE #define ST_DEFINE #include "lib/sort_template.h" /* * qsort comparator wrapper for strcmp. */ int pg_qsort_strcmp(const void *a...
c
github
https://github.com/postgres/postgres
src/port/qsort.c
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2009 Christopher Lenz # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """Python client API for CouchDB. >>> server = Server() >>> db = server.create('python-tests') >>> ...
unknown
codeparrot/codeparrot-clean
import json import os import shutil from os.path import join from bzt import TaurusConfigError from bzt.modules.proxy2jmx import Proxy2JMX, BZAProxy from bzt.modules.selenium import SeleniumExecutor from bzt.utils import is_windows, is_linux, get_full_path, RESOURCES_DIR from tests.unit import BZTestCase, EngineEmul ...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.query_constructors.milvus import ( MilvusTranslator, process_value, ) # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for r...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/retrievers/self_query/milvus.py
/*! * @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 */ export * from './calc-css-value';
typescript
github
https://github.com/angular/angular
adev/src/app/features/home/animation/calculations/index.ts
######################################################################### # # Copyright (C) 2012 OpenPlans # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
unknown
codeparrot/codeparrot-clean
# 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 applica...
unknown
codeparrot/codeparrot-clean
name: (Compiler) Publish Prereleases on: workflow_call: inputs: commit_sha: required: true default: '' type: string release_channel: required: true type: string dist_tag: required: true type: string version_name: required: tr...
unknown
github
https://github.com/facebook/react
.github/workflows/compiler_prereleases.yml
#! /usr/bin/env python2.3 ############################################################################## # # Copyright (c) 2001, 2002 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.0 (ZPL). A copy of the ZPL should accomp...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import import time import logging from collections import namedtuple from itertools import takewhile import email import re from ..exceptions import ( ConnectTimeoutError, MaxRetryError, ProtocolError, ReadTimeoutError, ResponseError, InvalidHeader, ) from ..pack...
unknown
codeparrot/codeparrot-clean
use std::ops::Deref; use rustc_data_structures::fx::FxIndexMap; use rustc_data_structures::undo_log::UndoLogs; use rustc_middle::bug; use rustc_middle::ty::{self, OpaqueTypeKey, ProvisionalHiddenType, Ty}; use tracing::instrument; use crate::infer::snapshot::undo_log::{InferCtxtUndoLogs, UndoLog}; #[derive(Default, ...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_infer/src/infer/opaque_types/table.rs
use super::*; // The tests below compare the computed hashes to particular expected values // in order to test that we produce the same results on different platforms, // regardless of endianness and `usize` and `isize` size differences (this // of course assumes we run these tests on platforms that differ in those //...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_data_structures/src/stable_hasher/tests.rs
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package vault import ( "strings" "github.com/hashicorp/vault/sdk/framework" ) // authTuneRequestFields returns the request fields for auth tuning endpoints. // Used in: // - POST /sys/auth/{path}/tune // - POST /sys/mounts/auth/{path}/tune func...
go
github
https://github.com/hashicorp/vault
vault/logical_system_fields.go
import { flushSync } from 'svelte'; import { test } from '../../test'; export default test({ get props() { return { items: [ { done: false, text: 'one' }, { done: true, text: 'two' }, { done: false, text: 'three' } ] }; }, html: ` <div> <input type="checkbox"> <input type="text"><p>on...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/binding-input-text-contextual-reactive-prop/_config.js
# # Copyright (c) 2017 Cisco and/or its affiliates. # # 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...
unknown
codeparrot/codeparrot-clean
from django.core.exceptions import ValidationError from django.db import models from django.forms import ChoiceField, Form from django.test import SimpleTestCase from . import FormFieldAssertionsMixin class ChoiceFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_choicefield_1(self): f = Choice...
python
github
https://github.com/django/django
tests/forms_tests/field_tests/test_choicefield.py
from __future__ import annotations import functools import inspect import json import logging from typing import TYPE_CHECKING, Any, TypeVar, overload from itemadapter import ItemAdapter from twisted.internet.defer import Deferred, maybeDeferred from w3lib.url import is_url from scrapy.commands import BaseRunSpiderC...
python
github
https://github.com/scrapy/scrapy
scrapy/commands/parse.py
/* Copyright 2020 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/core/api/verifier.h
# 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__ = ["CodeInterpreterOutputImage", "Image"] class Image(BaseModel): file_id: Optional[str] = None """ The [file...
python
github
https://github.com/openai/openai-python
src/openai/types/beta/threads/runs/code_interpreter_output_image.py
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer; use C...
php
github
https://github.com/composer/composer
src/Composer/Config.php
import librosa import librosa.filters import math import numpy as np from scipy import signal from hparams import hparams def load_wav(path): return librosa.core.load(path, sr=hparams.sample_rate)[0] def save_wav(wav, path): wav *= 32767 / max(0.01, np.max(np.abs(wav))) librosa.output.write_wav(path, wav.astype...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2013 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
############################################################################## # # Copyright (c) 2009 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SO...
unknown
codeparrot/codeparrot-clean
//===--- ExprContextAnalysis.cpp - Expession context analysis -------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2018 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE....
cpp
github
https://github.com/apple/swift
lib/IDE/ExprContextAnalysis.cpp
#!/usr/bin/env python import os from setuptools import setup, find_packages from inkblock import __name__ as package_name DESCRIPTION = "A simple, end-to-end publishing platform." ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) VERSION = "0.6.4" reqs = [] with open("requirements.txt", "r+") a...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>) # Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>) # # This program is f...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/tf2xla/literal_util.h
from apps.plus_permissions.interfaces import InterfaceReadProperty, InterfaceWriteProperty, InterfaceCallProperty, InterfaceReadWriteProperty from apps.plus_permissions.models import SetSliderOptions, SetAgentDefaults, SetPossibleTypes, SetSliderAgents from apps.plus_contacts.models import Contact from apps.plus_grou...
unknown
codeparrot/codeparrot-clean
/* * 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.network.selector public actual interface Selectable internal actual abstract class SelectableBase : Selectable
kotlin
github
https://github.com/ktorio/ktor
ktor-network/web/src/io/ktor/network/selector/Selectable.web.kt
#!/usr/bin/python # (c) 2013, Cove Schneider # (c) 2014, Joshua Conner <joshua.conner@gmail.com> # (c) 2014, Pavel Antonov <antonov@adwz.ru> # # 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__ = t...
unknown
codeparrot/codeparrot-clean
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation # # 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...
unknown
codeparrot/codeparrot-clean
""" File: simple-algorithm-test-module.py Course: Senior Design Project - CSE 181B / EECS 159B Authors: Michael Ishimoto Tyler Hom Ji Yeon Kim David Tran """ import subprocess import json import urllib2 import time desiredTemp = 70.0; # This is in Fahrenheit ...
unknown
codeparrot/codeparrot-clean
""" This script is responsible for disabling Handoff Commands used: - /usr/local/zetta/mac_os_scripts/external/disable_handoff.sh Scripts referenced: - disable_handoff.sh #!/bin/bash hardware_uuid=$(/usr/sbin/system_profiler SPHardwareDataType | grep "Hardware UUID" | cut -d ':' -f 2 | xargs) current_user=$USER ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ This script splits out log file portions based on full log files and "ls -l" snapshots that document their size at various points in time. """ # Force Python 2 to use float division even for ints from __future__ import division from __future__ import print_function import argparse import ...
unknown
codeparrot/codeparrot-clean
// RUN: %check_clang_tidy -std=c++14-or-later %s cppcoreguidelines-pro-bounds-pointer-arithmetic %t // Fix PR36489 and detect auto-deduced value correctly. typedef char* charPtr; char *getPtr(); auto getPtrAuto() { return getPtr(); } decltype(getPtr()) getPtrDeclType(); decltype(auto) getPtrDeclTypeAuto() { return ge...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-bounds-pointer-arithmetic-pr36489.cpp
# Copyright 2013 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 required by appl...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import import functools import requests from twisted.internet.threads import deferToThread from twisted.internet.defer import CancelledError from twisted.web.resource import Resource from twisted.web.server import NOT_DONE_YET from PyQt4.QtNetwork import QNetworkRequest from .ferry im...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
buildSrc/src/main/java/org/springframework/boot/build/architecture/ArchitectureCheckAnnotation.java
import autosar def create_workspace_and_packages(): ws = autosar.workspace(version="4.2.2") package = ws.createPackage('DataTypes', role='DataType') package.createSubPackage('CompuMethods', role='CompuMethod') package.createSubPackage('DataConstrs', role='DataConstraint') package.createSubPackage('...
unknown
codeparrot/codeparrot-clean
# # Copyright (c) 2001 - 2015 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 limitation the rights to use, copy, modify, merge...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2007 Francisco José Rodríguez Bogado # # (pacoqueen@users.sourceforge.net) # # ...
unknown
codeparrot/codeparrot-clean
""" OpenVZ containers ================= """ from fabtools import openvz as vz class Container(object): """ Object-oriented interface to OpenVZ containers. """ def __init__(self, ctid): self.ctid = ctid def __enter__(self): return self def __exit__(self, exc_type, exc_value, t...
unknown
codeparrot/codeparrot-clean
#!/bin/bash export LANG=C set -e if [ $# -lt 1 ]; then echo "Usage: PROGNAME=foo LICENSE=bar $0 <bpf object file>" exit 1 fi self=$0 filename=$1 funcname=$PROGNAME generate_head() { cat << END /* AUTO-GENERATED, DO NOT EDIT. */ #include <stddef.h> #include <stdint.h> #include "ngx_bpf.h" END } gene...
unknown
github
https://github.com/nginx/nginx
src/event/quic/bpf/bpfgen.sh
# 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 os from adb_profile_chrome import trace_packager from adb_profile_chrome import ui from pylib import constants def _StartTracing(controllers, inter...
unknown
codeparrot/codeparrot-clean
""" Module dealing with Configure/Tasks section. """ import re import attr from navmazing import NavigateToAttribute from widgetastic.exceptions import RowNotFound from widgetastic.widget import View from widgetastic_patternfly import Dropdown from cfme.common import BaseLoggedInPage from cfme.modeling.base import Ba...
unknown
codeparrot/codeparrot-clean
""" controller device support class(es) http://libvirt.org/formatdomain.html#elementsControllers """ from virttest.libvirt_xml import accessors from virttest.libvirt_xml.devices import base, librarian class Controller(base.TypedDeviceBase): __slots__ = ('type', 'index', 'model', 'ports', 'vectors', 'driver', ...
unknown
codeparrot/codeparrot-clean
r""" ============================================== Scaling the regularization parameter for SVCs ============================================== The following example illustrates the effect of scaling the regularization parameter when using :ref:`svm` for :ref:`classification <svm_classification>`. For SVC classificat...
python
github
https://github.com/scikit-learn/scikit-learn
examples/svm/plot_svm_scale_c.py
/* This file is a copy of ForEvolve/bootstrap-dark dark theme: https://github.com/ForEvolve/bootstrap-dark/blob/master/scss/toggle-bootstrap-dark.scss but with Bootstrap reboot import removed. See https://github.com/prometheus/prometheus/pull/8604#issuecomment-820391870 and https://github.com/ForEvolve/boot...
unknown
github
https://github.com/prometheus/prometheus
web/ui/react-app/src/themes/_bootstrap_dark.scss
#!/usr/bin/env python # -*- coding: utf-8 -*- # This script allows easy testing of the template project. The only argument # is the directory to which to copy and generate the template project. from __future__ import print_function import os import sys import shutil import argparse import subprocess from distutils.di...
unknown
codeparrot/codeparrot-clean
# Written by Bram Cohen # see LICENSE.txt for license information from cStringIO import StringIO from socket import error as socketerror protocol_name = 'BitTorrent protocol' # header, reserved, download id, my id, [length, message] class NatCheck: def __init__(self, resultfunc, downloadid, peerid, ip, port, ra...
unknown
codeparrot/codeparrot-clean