code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
/* * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.engine.jetty import kotlinx.coroutines.* import org.eclipse.jetty.util.* import kotlin.coroutines.* internal suspend fun <R> withPromise( block: (Promise<R>) -> Un...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-jetty/jvm/src/io/ktor/client/engine/jetty/utils.kt
/* MIT License * * Copyright (c) 2024 Brad House * * 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, ...
c
github
https://github.com/nodejs/node
deps/cares/src/lib/util/ares_rand.h
/* * 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.server.engine.internal import io.ktor.server.application.* import java.lang.reflect.InvocationTargetException import java.lang.reflect.Modifier import kotlin.reflect.KClass im...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-core/jvm/src/io/ktor/server/engine/internal/CallableUtils.kt
"""Sanity test using rstcheck.""" from __future__ import absolute_import, print_function import os from lib.sanity import ( SanitySingleVersion, SanityMessage, SanityFailure, SanitySuccess, SanitySkipped, ) from lib.util import ( SubprocessError, run_command, parse_to_dict, ) from li...
unknown
codeparrot/codeparrot-clean
""" Support for Tellstick Net/Telstick Live. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.tellduslive/ """ import logging from homeassistant.components.tellduslive import TelldusLiveEntity from homeassistant.const import TEMP_CELSIUS _LOGGER =...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Show an image using gloo, with on-mouseover cross-section visualizations. """ import numpy as np from vispy import app from vispy.gloo import set_viewport, clear, set_state, Program # Image def func(x, y): return (1-x/2+x**5+y**3)*np.exp(-x**2-y**2) x = np.linspac...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 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/auto/__init__.py
import json import unittest import draganddrop from .draganddrop import PositionsCompare class Test_PositionsCompare(unittest.TestCase): """ describe""" def test_nested_list_and_list1(self): self.assertEqual(PositionsCompare([[1, 2], 40]), PositionsCompare([1, 3])) def test_nested_list_and_list...
unknown
codeparrot/codeparrot-clean
import numpy as np import mpmath DECIMALS = 60 mpmath.mp.dps = DECIMALS def jacobi_alpha(n): if n < 0: return 0 half = mpmath.mpf('.5') return (2*n*(n+half)-mpmath.mpf('.25')) / ((2*n+mpmath.mpf('1.5'))*(2*n-half)) def jacobi_beta(n): if n <= 0: return 0 half = mpmath.mpf('.5') ...
unknown
codeparrot/codeparrot-clean
# -*- coding: 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): # Adding field 'RecordingTimestamp.speaker_new' db.add_column('speeches_recordingtimestamp', 'speaker_new', ...
unknown
codeparrot/codeparrot-clean
import argparse def multi_set(**kwargs): """Return a MultiSet action for the specified values.""" class MultiSet(argparse.Action): """An argparse action that sets multiple values.""" def __call__(self, parser, namespace, values, option_string=None): if values is not None: ...
unknown
codeparrot/codeparrot-clean
#include "regenc.h" /* dummy for unsupported, stateful encoding */ ENC_DUMMY("UTF-7"); ENC_ALIAS("CP65000", "UTF-7");
c
github
https://github.com/ruby/ruby
enc/utf_7.h
# Library of functions to mark up test scripts' output suitable for # pretty-printing it in GitHub workflows. # # Copyright (c) 2022 Johannes Schindelin # # 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 Fou...
unknown
github
https://github.com/git/git
t/test-lib-github-workflow-markup.sh
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Union, Optional from typing_extensions import Literal, Required, TypeAlias, TypedDict __all__ = ["RealtimeAudioInputTurnDetectionParam", "ServerVad", "SemanticVad"] class Serve...
python
github
https://github.com/openai/openai-python
src/openai/types/realtime/realtime_audio_input_turn_detection_param.py
# (c) Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2008 Guild of Writers PyPRP Project Team # See the file AUTHORS for more info about the team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ jinja.nodes ~~~~~~~~~~~ This module implements additional nodes derived from the ast base node. It also provides some node tree helper functions like `in_lineno` and `get_nodes` used by the parser and translator in order to normalize python and jinja nodes. :co...
unknown
codeparrot/codeparrot-clean
import models def convert_domains(): rows = models.session.execute('select name, id from Domain;') for row in rows: print('') print('Domain {id} : {name}'.format(id=row.id, name=row.name)) node = models.RegistryNode('{base}{id}/'.format(base=models.Domain.PATH, id=row.id)).create() ...
unknown
codeparrot/codeparrot-clean
import logging from django.conf import settings from django.http import HttpResponseRedirect, HttpResponse from django.template.response import TemplateResponse from django.utils.http import is_safe_url from django.shortcuts import resolve_url from django.views.decorators.debug import sensitive_post_parameters from dj...
unknown
codeparrot/codeparrot-clean
''' Line (SmoothLine) Experiment ============================ This demonstrates the experimental and unfinished SmoothLine feature for fast line drawing. You should see a multi-segment path at the top of the screen, and sliders and buttons along the bottom. You can click to add new points to the segment, change the tr...
unknown
codeparrot/codeparrot-clean
/* Generated file to emulate the ts.server namespace. */ export * from "../../jsTyping/_namespaces/ts.server.js"; export * from "../../server/_namespaces/ts.server.js"; export * from "../../typingsInstallerCore/_namespaces/ts.server.js"; export * from "../client.js";
typescript
github
https://github.com/microsoft/TypeScript
src/harness/_namespaces/ts.server.ts
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, compat_str, ) from ..utils import ( ExtractorError, find_xpath_attr, fix_xml_ampersands, HEADRequest, unescapeHTML, url_basename, ...
unknown
codeparrot/codeparrot-clean
# Created By: Virgil Dupras # Created On: 2009-11-21 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-...
unknown
codeparrot/codeparrot-clean
# (C) Datadog, Inc. 2012-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from collections import defaultdict import copy import re import socket import time import urlparse # 3rd party import requests # project from checks import AgentCheck from config import _is_affirmative...
unknown
codeparrot/codeparrot-clean
from orchestra.communication.slack import create_project_slack_group from orchestra.google_apps.convenience import create_project_google_folder from orchestra.models import Project from orchestra.models import WorkflowVersion from orchestra.utils.task_lifecycle import create_subsequent_tasks def create_project_with_ta...
unknown
codeparrot/codeparrot-clean
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # 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 Free Software Foundation, eit...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2017 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.util.reflection; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.internal.util.reflection.SuperTypesLastSorter.sortSuperTypesLast; im...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockito/internal/util/reflection/SuperTypesLastSorterTest.java
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2022 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/ko/perf_train_gpu_many.md
from __future__ import unicode_literals from itertools import chain from django.conf import settings # Try the new app settings (Django 1.7) and fall back to the old system try: from django.apps import apps as django_apps auth_app = django_apps.get_app_config("auth") except ImportError: from django.contrib...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ error: { code: 'effect_invalid_placement', message: '`$effect()` can only be used as an expression statement' } });
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/compiler-errors/samples/runes-wrong-effect-placement/_config.js
""" Helper functions for creating Form classes from Django models and database field objects. """ from django.utils.encoding import smart_unicode from django.utils.datastructures import SortedDict from django.utils.text import get_text_list, capfirst from django.utils.translation import ugettext_lazy as _ from util i...
unknown
codeparrot/codeparrot-clean
""" Django Views for service status app """ import json import time from django.http import HttpResponse from dogapi import dog_stats_api from service_status import tasks from djcelery import celery from celery.exceptions import TimeoutError def index(_): """ An empty view """ return HttpResponse()...
unknown
codeparrot/codeparrot-clean
"""Bayesian Gaussian Mixture Models and Dirichlet Process Gaussian Mixture Models""" from __future__ import print_function # Author: Alexandre Passos (alexandre.tp@gmail.com) # Bertrand Thirion <bertrand.thirion@inria.fr> # # Based on mixture.py by: # Ron Weiss <ronweiss@gmail.com> # Fabian Ped...
unknown
codeparrot/codeparrot-clean
import os import sys def usage(): print '%s all -- build all bsp' % os.path.basename(sys.argv[0]) print '%s clean -- clean all bsp' % os.path.basename(sys.argv[0]) print '%s project -- update all prject files' % os.path.basename(sys.argv[0]) BSP_ROOT = '../bsp' if len(sys.argv) != 2: usage() sys.e...
unknown
codeparrot/codeparrot-clean
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
unknown
codeparrot/codeparrot-clean
// Copyright 2024 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package jobs import ( "context" "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" "github.com/cockroachdb/cockroach/pkg/settings/cluster" ) func init() { // The ...
go
github
https://github.com/cockroachdb/cockroach
pkg/jobs/retired.go
// SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/namei.h> #include <linux/io_uring.h> #include <uapi/linux/fadvise.h> #include <uapi/linux/io_uring.h> #include "io_uring.h"...
c
github
https://github.com/torvalds/linux
io_uring/advise.c
# -*- coding: utf-8 -*- from __future__ import absolute_import from kombu.async.http.curl import READ, WRITE, CurlClient from kombu.tests.case import ( HubCase, Mock, call, patch, case_no_pypy, case_requires, set_module_symbol, ) @case_no_pypy @case_requires('pycurl') class test_CurlClient(HubCase): class C...
unknown
codeparrot/codeparrot-clean
from math import log """ -- Various average (means) algorithms implementation -- See: http://en.wikipedia.org/wiki/Average -- Returns the sum of a sequence of values """ #Calculates the arithmetic mean of the list numbers and returns the result def arithmetic_mean(numbers): return float(sum(numbers))/len(numbers) ...
unknown
codeparrot/codeparrot-clean
from main import * import hmac, hashlib # ## Electrum wallets def electrum_stretch(seed): return slowsha(seed) # Accepts seed or stretched seed, returns master public key def electrum_mpk(seed): if len(seed) == 32: seed = electrum_stretch(seed) return privkey_to_pubkey(seed)[2:] # Accepts (seed or stretched...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Database\Eloquent; use Illuminate\Database\Eloquent\Attributes\CollectedBy; use ReflectionClass; /** * @template TCollection of \Illuminate\Database\Eloquent\Collection */ trait HasCollection { /** * The resolved collection class names by model. * * @var array<class-st...
php
github
https://github.com/laravel/framework
src/Illuminate/Database/Eloquent/HasCollection.php
#!/usr/bin/python2.4 # # Copyright 2009-2010 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 ...
unknown
codeparrot/codeparrot-clean
import { CMS_NAME, CMS_URL } from "@lib/constants"; export default function Intro() { return ( <section className="flex-col md:flex-row flex items-center md:justify-between mt-16 mb-16 md:mb-12"> <h1 className="text-6xl md:text-8xl font-bold tracking-tighter leading-tight md:pr-8"> Blog. </h1...
typescript
github
https://github.com/vercel/next.js
examples/cms-dotcms/components/intro.tsx
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2alpha1", "metadata": { "name": "v13.minimal_graph_config.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "datasource": { "type": "grafana", "uid": "-- Grafana...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/migrated_dashboards_output/v1beta1-mig-v13.minimal_graph_config.v42.v2alpha1.json
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redis...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import markdown from django.db import models from django.contrib.auth.models import User class TaskGroup(models.Model): """ Grupo de Tareas """ name = models.CharField(max_length=64) def __unicode__(self): return self.name ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2.7 # Copyright 2015 gRPC 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 l...
unknown
codeparrot/codeparrot-clean
/* Hash table implementation. * * This file implements in memory hash tables with insert/del/replace/find/ * get-random-element operations. Hash tables will auto resize if needed * tables of power of two in size are used, collisions are handled by * chaining. See the source code for more information... :) * * Co...
c
github
https://github.com/redis/redis
deps/hiredis/dict.h
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
configuration-metadata/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ItemHint.java
'''OpenGL extension NV.fragment_program_option This module customises the behaviour of the OpenGL.raw.GL.NV.fragment_program_option to provide a more Python-friendly API Overview (from the spec) This extension provides additional fragment program functionality to extend the standard ARB_fragment_program language a...
unknown
codeparrot/codeparrot-clean
import {useFragment} from 'shared-runtime'; function Component(props) { const user = useFragment( graphql` fragment Component_user on User { name } `, props.user ); const posts = user.timeline.posts.edges.nodes.map(node => ( <Post post={node} /> )); posts.push({}); const...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/readonly-object-method-calls.js
import re import cx_Oracle from django.db.backends import BaseDatabaseIntrospection, FieldInfo, TableInfo from django.utils.encoding import force_text foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)") class DatabaseIntrospection(BaseDatabaseIntrospecti...
unknown
codeparrot/codeparrot-clean
# tests/arguments.py --------------------------------------------*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.txt...
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 */ /* * Public API Surface of shared */ export * from './directives/index'; export * from './components/index'; expo...
typescript
github
https://github.com/angular/angular
adev/shared-docs/index.ts
# Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 a...
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-gcp/src/main/java/org/apache/hadoop/fs/gs/GcsInstrumentation.java
# flake8: noqa # -*- coding: utf-8 -*- # Author: Aziz Köksal from __future__ import absolute_import import glob import os import sys import shutil try: from os import supports_fd except ImportError: supports_fd = set() if sys.version_info >= (3,): unicode = str u = str else: unicode = unicode ...
unknown
codeparrot/codeparrot-clean
import {useIdentity, Stringify} from 'shared-runtime'; /** * TODO: Note that this `Array.from` is inferred to be mutating its first * argument. This is because React Compiler's typing system does not yet support * annotating a function with a set of argument match cases + distinct * definitions (polymorphism) * ...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/array-from-captures-arg0.js
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>React Router - Multi App Example (Inbox App)</title> </head> <body> <div id="root"></div> ...
html
github
https://github.com/remix-run/react-router
examples/multi-app/inbox/index.html
import markdown DEFAULT_URL = "http://www.freewisdom.org/projects/python-markdown/" DEFAULT_CREATOR = "Yuri Takhteyev" DEFAULT_TITLE = "Markdown in Python" GENERATOR = "http://www.freewisdom.org/projects/python-markdown/markdown2rss" month_map = { "Jan" : "01", "Feb" : "02", "March" : "03"...
unknown
codeparrot/codeparrot-clean
data = ( 'ddyels', # 0x00 'ddyelt', # 0x01 'ddyelp', # 0x02 'ddyelh', # 0x03 'ddyem', # 0x04 'ddyeb', # 0x05 'ddyebs', # 0x06 'ddyes', # 0x07 'ddyess', # 0x08 'ddyeng', # 0x09 'ddyej', # 0x0a 'ddyec', # 0x0b 'ddyek', # 0x0c 'ddyet', # 0x0d 'ddyep', # 0x0e 'ddyeh', # 0x0f ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2023 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
cmd/kube-controller-manager/names/controller_names.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 not us...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: false begin require 'psych' rescue LoadError case RUBY_ENGINE when 'jruby' warn "The Psych YAML extension failed to load.\n" \ "Check your env for conflicting versions of SnakeYAML\n" \ "See https://github.com/jruby/jruby/wiki/FAQs#why-does-the-psych-yaml-extension-fail-t...
ruby
github
https://github.com/ruby/ruby
lib/yaml.rb
# MongoDB Reader-Writer Mutex Types The following are specialized in-house shared mutex types that allow exploiting use-case specific concurrency semantics to provide low overhead synchronization. Make sure to adopt these primitives only if your use-case exactly matches the requirements listed below, or consult with t...
unknown
github
https://github.com/mongodb/mongo
docs/rwmutex.md
/// Calculate the remainder of `x / y`, the precise result of `x - trunc(x / y) * y`. #[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pub fn fmodf16(x: f16, y: f16) -> f16 { super::generic::fmod(x, y) }
rust
github
https://github.com/nodejs/node
deps/crates/vendor/libm/src/math/fmodf16.rs
#pragma once #include <ATen/cpu/vec/intrinsics.h> #include <ATen/cpu/vec/vec256/vsx/vsx_helpers.h> #include <ATen/cpu/vec/vec_base.h> #include <c10/util/irange.h> namespace at { namespace vec { // See Note [CPU_CAPABILITY namespace] inline namespace CPU_CAPABILITY { inline std::tuple<Vectorized<float>, Vectorized<fl...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/cpu/vec/vec256/vsx/vec256_bfloat16_vsx.h
from Tkinter import * from EditorWindow import EditorWindow import re import tkMessageBox class OutputWindow(EditorWindow): """An editor window that can serve as an output file. Also the future base class for the Python shell window. This class has no input facilities. """ def __init__(self, *ar...
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. import os import pyauto_functional # Must be imported before pyauto import pyauto import test_utils class PasswordTest(pyauto.Py...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2025 Google Inc. All Rights Reserved. Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ #include "static_init.h" #include "../common/platform.h" #include "../common/static_init.h" #if (BROTLI_STATIC_INIT != BROTLI_STATIC_INIT_NONE) #inclu...
c
github
https://github.com/nodejs/node
deps/brotli/c/dec/static_init.c
# Copyright 2008-2015 Nokia Solutions and Networks # # 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
""" Tests for geography support in PostGIS 1.5+ """ from __future__ import absolute_import import os from django.contrib.gis import gdal from django.contrib.gis.measure import D from django.test import TestCase from .models import City, County, Zipcode class GeographyTest(TestCase): def test01_fixture_load(sel...
unknown
codeparrot/codeparrot-clean
""" Simulates a vehicle. Implements its pedals, buttons and ECUs """ ## Copyright (C) 2010 Miguel Gonzalez <enoelrocotiv@gmail.com> ## Copyright (C) 2010 Oscar Iglesias <osc.iglesias@gmail.com> ## ## This file is part of rs232-obd-sim.py. ## ## rs232-obd-sim.py is free software; you can redistribute it an...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 Isaku Yamahata <yamahata@valinux co jp> # 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...
unknown
codeparrot/codeparrot-clean
""" TestCmd.py: a testing framework for commands and scripts. The TestCmd module provides a framework for portable automated testing of executable commands and scripts (in any language, not just Python), especially commands and scripts that require file system interaction. In addition to running tests and evaluating...
unknown
codeparrot/codeparrot-clean
"""SCons.Tool.Packaging.tarbz2 The tarbz2 SRC packager. """ # # Copyright (c) 2001 - 2016 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, includi...
unknown
codeparrot/codeparrot-clean
# watcher.py - high-level interfaces to the Linux inotify subsystem # Copyright 2006 Bryan O'Sullivan <bos@serpentine.com> # This library is free software; you can redistribute it and/or modify # it under the terms of version 2.1 of the GNU Lesser General Public # License, or any later version. '''High-level interfa...
unknown
codeparrot/codeparrot-clean
# # Copyright (C) 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be...
unknown
codeparrot/codeparrot-clean
import {knownIncompatible} from 'ReactCompilerKnownIncompatibleTest'; function Component() { const data = knownIncompatible(); return <div>Error</div>; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-known-incompatible-function.js
# Copyright (c) 2017 Keith Ito # Copyright (c) 2020, NVIDIA CORPORATION. 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/LICE...
unknown
codeparrot/codeparrot-clean
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/lite/minimal_logging.h
""" Tests for assetstore using any of the modulestores for metadata. May extend to testing the storage options too. """ from datetime import datetime, timedelta import ddt from django.test import TestCase from nose.plugins.attrib import attr import pytz import unittest from opaque_keys.edx.keys import CourseKey from o...
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...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/StorageSize.java
# Copyright 2018 Google AI, Google Brain and the HuggingFace Inc. team. # # 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 ...
python
github
https://github.com/huggingface/transformers
src/transformers/models/albert/modeling_albert.py
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/ko/main_classes/tokenizer.md
{ "caffe": [ { "model": "mobilenet_SSD", "inputSize": "300, 300", "mean": "127.5, 127.5, 127.5", "std": "0.007843", "swapRB": "false", "outType": "SSD", "labelsUrl": "https://raw.githubusercontent.com/opencv/opencv/4.x/sampl...
json
github
https://github.com/opencv/opencv
doc/js_tutorials/js_assets/js_object_detection_model_info.json
from __future__ import print_function from collections import deque import datetime from imp import reload import os import re import sys from django.core.exceptions import ImproperlyConfigured from django.db import models from django.conf import settings from django.utils import importlib from south import exceptio...
unknown
codeparrot/codeparrot-clean
import numpy as np from collections import OrderedDict from threading import RLock class FIFOLimitedArrayCache(object): '''Threadsafe cache that stores numpy arrays (or any other object that defines obj.nbytes) and limits total memory. Items are ejected, if necessary, in the same order in which they were a...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import sys def gen_test(n): print "CREATE TABLE t (a CHAR(%d));" % (n) print "--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/" print "--error ER_UNSUPPORTED_EXTENSION" print "ALTER TABLE t CHANGE COLUMN a a CHAR(%d) BINARY;" % (n) if n+1 < 256: print "--replace_regex /MariaD...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Dag Wieers <dag@wieers.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, ...
unknown
codeparrot/codeparrot-clean
framework: messenger: enabled: true mailer: dsn: 'smtp://example.com' notifier: message_bus: false chatter_transports: test: 'null' texter_transports: test: 'null'
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/notifier_with_disabled_message_bus.yml
import NIOHTTP1 extension CORSMiddleware.Configuration { /// Instantiate a CORSConfiguration struct that can be used to create a `CORSConfiguration` /// middleware for adding support for CORS in your responses. /// /// - parameters: /// - allowedOrigin: Setting that controls which origin values a...
swift
github
https://github.com/vapor/vapor
Sources/Vapor/Deprecations/CORSMiddleware+Configuration+exposedHeaders.swift
"""Example of using the Elekta XVI geometry. In this example we create an Elekta XVI geometry and use it to create some artificial data and reconstruct it using filtered backprojection. Note that this is a 3d dataset and requires some memory to run. """ import odl from odl.contrib import tomo # Get default geometry...
unknown
codeparrot/codeparrot-clean
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Sam Chen @chenxsan */ "use strict"; /** * @param {string} urlAndGlobal the script request * @returns {string[]} script url and its global variable */ module.exports = function extractUrlAndGlobal(urlAndGlobal) { const index = urlAndGlobal....
javascript
github
https://github.com/webpack/webpack
lib/util/extractUrlAndGlobal.js
<?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\Bundle\SecurityBundle\Tests\Functional; use PHPUnit\Framework\A...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/SecurityBundle/Tests/Functional/CsrfFormLoginTest.php
# coding=utf-8 from textwrap import indent from atlassian.bitbucket import Cloud cloud = Cloud(url="https://api.bitbucket.org/", username="admin", password="admin") index = 0 for w in cloud.workspaces.each(): print("Workspace name " + w.name) p = next(w.projects.each()) print(" First project name " + ...
unknown
codeparrot/codeparrot-clean
import time import re # Special sqlite cursor class DbCursor: def __init__(self, conn, db): self.conn = conn self.db = db self.cursor = conn.cursor() self.logging = False def execute(self, query, params=None): if isinstance(params, dict) and "?" in query: # Make easi...
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
buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/EphemeralBuilder.java