code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
<?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\Depende... | php | github | https://github.com/composer/composer | src/Composer/DependencyResolver/SolverBugException.php |
import * as React from "react";
import type {
unstable_Blocker as Blocker,
unstable_BlockerFunction as BlockerFunction,
} from "react-router-dom";
import { useActionData } from "react-router-dom";
import {
createBrowserRouter,
createRoutesFromElements,
Form,
json,
Link,
Outlet,
Route,
RouterProvider... | typescript | github | https://github.com/remix-run/react-router | examples/navigation-blocking/src/app.tsx |
import os as _os
_on_rtd = _os.environ.get('READTHEDOCS', None) == 'True'
if not _on_rtd:
import matplotlib.pyplot as _plt
import logging as _logging
logger = _logging.getLogger(__name__)
def addlabel(ax=None, toplabel=None, xlabel=None, ylabel=None, zlabel=None, clabel=None, cb=None, windowlabel=None, fig=None, a... | unknown | codeparrot/codeparrot-clean | ||
from django import forms
from django.contrib.contenttypes.models import ContentType
from forms_builder.forms.forms import FormForForm
from .models import SurveyFieldEntry, SurveyFormEntry
class SurveyFormForForm(FormForForm):
field_entry_model = SurveyFieldEntry
content_type = forms.ModelChoiceField(
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
from django.contrib.admin.util import reverse_field_path, get_limit_choices_to_from_path
try:
from django.contrib.admin.filterspecs import FilterSpec, AllValuesFilterSpec
filterspec = True
except ImportError:
from django.contrib.admin.filters import RelatedFieldListFilter, AllValuesFieldLis... | unknown | codeparrot/codeparrot-clean | ||
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2016, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# Author: Kiall Mac Innes <kiall@hp.com>
#
# 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/L... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/core/kernels/winograd_transform.h |
import pytz
from dateutil.parser import parse
from nose.tools import * # noqa
from tests.base import OsfTestCase
from scripts.analytics.migrate_analytics import generate_events_between_events, fill_in_event_gaps
class TestMigrateAnalytics(OsfTestCase):
def setUp(self):
super(TestMigrateAnalytics, self).s... | unknown | codeparrot/codeparrot-clean | ||
'''
Detects anomalies in sounds
'''
import numpy as np
import unittest
from numpy.testing import assert_array_almost_equal,assert_almost_equal, assert_equal
from abc import ABCMeta, abstractmethod
import math
class AnomalyDetector(object):
# basic dependency injection
def __init__(self, logger, repository):
... | unknown | codeparrot/codeparrot-clean | ||
/*!
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {isPlatformBrowser} from '@angular/common';
import {Directive, ElementRef, PLATFORM_ID, inject} from '@angula... | typescript | github | https://github.com/angular/angular | adev/shared-docs/directives/external-link/external-link.directive.ts |
/*
* Copyright (c) 1999-2000 Image Power, Inc. and the University of
* British Columbia.
* Copyright (c) 2001-2002 Michael David Adams.
* All rights reserved.
*/
/* __START_OF_JASPER_LICENSE__
*
* JasPer License Version 2.0
*
* Copyright (c) 2001-2006 Michael David Adams
* Copyright (c) 1999-2000 Image Pow... | c | github | https://github.com/opencv/opencv | 3rdparty/libjasper/jpc_flt.h |
framework:
ssi:
enabled: false | unknown | github | https://github.com/symfony/symfony | src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/ssi_disabled.yml |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, erpnext
from frappe import _
from frappe.utils import flt, fmt_money, getdate, formatdate
from frappe.model.document import Document
from... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2008-2012 Nokia Siemens Networks Oyj
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""API test module."""
#
# (C) Pywikibot team, 2007-2016
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, unicode_literals
import datetime
import types
import pywikibot.data.api as api
import pywikibot.family
import pywikibot.login
import pywikibot.... | unknown | codeparrot/codeparrot-clean | ||
from django.contrib.auth.models import AnonymousUser
from django.contrib.sites.models import Site
from django.core import mail
from django.conf import settings
from django.test import TestCase
from userena.models import UserenaSignup, upload_to_mugshot
from userena import settings as userena_settings
from userena.test... | unknown | codeparrot/codeparrot-clean | ||
#Copyright ReportLab Europe Ltd. 2000-2017
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/paraparser.py
__version__='3.3.0'
__doc__='''The parser used to process markup within paragraphs'''
import string
import re
import sys
import ... | unknown | codeparrot/codeparrot-clean | ||
"""Support for UK Met Office weather service."""
import logging
import voluptuous as vol
from homeassistant.components.sensor.metoffice import (
CONDITION_CLASSES, ATTRIBUTION, MetOfficeCurrentData)
from homeassistant.components.weather import PLATFORM_SCHEMA, WeatherEntity
from homeassistant.const import (
C... | unknown | codeparrot/codeparrot-clean | ||
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Title: curl_unescape
Section: 3
Source: libcurl
See-also:
- RFC 2396
- curl_easy_escape (3)
- curl_easy_unescape (3)
- curl_free (3)
Protocol:
- All
Added-in: 7.1
---
# NAME
curl_unescape - URL decode a string
# SY... | unknown | github | https://github.com/curl/curl | docs/libcurl/curl_unescape.md |
#!/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.
"""A script for configuring constraint networks.
Sets up a constrained network configuration on a specific port. Traffic on this
p... | unknown | codeparrot/codeparrot-clean | ||
- name: uninstall gpg
command: brew uninstall gpg
become: yes
become_user: >-
{{ brew_stat.stat.pw_name }}
environment:
HOMEBREW_NO_AUTO_UPDATE: True | unknown | github | https://github.com/ansible/ansible | test/integration/targets/ansible-galaxy-collection/handlers/main.yml |
# coding: utf-8
from __future__ import unicode_literals
import re
from .turner import TurnerBaseIE
from ..utils import (
int_or_none,
parse_iso8601,
)
class TruTVIE(TurnerBaseIE):
_VALID_URL = r'https?://(?:www\.)?trutv\.com/(?:shows|full-episodes)/(?P<series_slug>[0-9A-Za-z-]+)/(?:videos/(?P<clip_slug>[... | 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 | ||
from __future__ import print_function
import copy
import traceback
import os
import sys
import time
import subprocess
from capstone import *
from capstone.x86 import *
from flags import flags
flags_maks = {
"CF": 0x00001,
"PF": 0x00004,
"AF": 0x00010,
"ZF": 0x00040,
"SF": 0x00080,
"DF": 0x00400... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
# compare.py - Makes comparison between two graphs.
# Author: Franck Michea < franck.michea@gmail.com >
# License: New BSD License (See LICENSE)
def compare_graphs(graph1, graph2):
addr_checked, stack, blocks_diff = [], [0x10000], 0
while stack:
addr, block1, block2 = stack.pop(), None, None
if... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# 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
import os
import json
import pytest
import sys
if sys.version_info < (2... | unknown | codeparrot/codeparrot-clean | ||
#
# OCSP request/response syntax
#
# Derived from a minimal OCSP library (RFC2560) code written by
# Bud P. Bruegger <bud@ancitel.it>
# Copyright: Ancitel, S.p.a, Rome, Italy
# License: BSD
#
#
# current limitations:
# * request and response works only for a single certificate
# * only some values are parsed out of t... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2012, Dane Summers <dsummers@pinedesk.biz>
# (c) 2013, Mike Grozak <mike.grozak@gmail.com>
# (c) 2013, Patrick Callahan <pmc@patrickcallahan.com>
# (c) 2015, Evan Kaufman <evan@digitalflophouse.com>
# (c) 2015, Luca Berruti <nadirio@gmail.com>
#
# This file is part of ... | unknown | codeparrot/codeparrot-clean | ||
from pandac.PandaModules import *
from direct.task.Task import Task
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import StateData
from direct.fsm import ClassicFSM, State
from direct.fsm import State
class Walk(StateData.StateData):
notify = DirectNotifyGlobal.directNotify.newCategory('Walk')... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
import subprocess
import os
import sys
import glob
import json
import traceback
import re
import logging
log = logging.getLogger('run-ci')
import time
import threading
from benchmark import framework_test
from benchmark.utils import gather_tests
from benchmark.utils import header
# Cross-platfor... | 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 multiprocessing
import optparse
import os
import sys
from pylib import android_commands
from pylib import constants
from ... | unknown | codeparrot/codeparrot-clean | ||
# many threads, one mutex, many condvars
require 'thread'
m = Thread::Mutex.new
cv1 = Thread::ConditionVariable.new
cv2 = Thread::ConditionVariable.new
max = 1000
n = 100
waiting = 0
scvs = []
waiters = n.times.map do |i|
start_cv = Thread::ConditionVariable.new
scvs << start_cv
start_mtx = Thread::Mutex.new
st... | ruby | github | https://github.com/ruby/ruby | benchmark/vm_thread_condvar2.rb |
# 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 | ||
from django.conf import settings
from django.http import HttpResponse, StreamingHttpResponse
from django.test import TestCase
from misago.core import fileserver
class FileServerTests(TestCase):
def test_send_file(self):
"""send file produces valid response"""
with self.settings(MISAGO_SENDFILE_HEA... | 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 | ||
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import ExtractorError
class RTVNHIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?rtvnh\.nl/video/(?P<id>[0-9]+)'
_TEST = {
'url': 'http://www.rtvnh.nl/video/131946',
'md5': 'cdbec9f44550... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse_unquote,
compat_xpath,
)
from ..utils import (
int_or_none,
find_xpath_attr,
xpath_text,
update_url_query,
)
class NozIE(InfoExtractor):
_VALID_URL = r'https... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
import time
from copy import copy
from Adafruit_I2C import Adafruit_I2C
# ============================================================================
# LEDBackpack Class
# ============================================================================
class LEDBackpack:
i2c = None
# Registers
... | unknown | codeparrot/codeparrot-clean | ||
package kotlinx.coroutines.reactor
import kotlinx.coroutines.testing.*
import kotlinx.coroutines.*
import kotlinx.coroutines.reactive.*
import org.junit.*
import java.util.*
import kotlin.coroutines.*
class FluxCompletionStressTest : TestBase() {
private val N_REPEATS = 10_000 * stressTestMultiplier
private ... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | reactive/kotlinx-coroutines-reactor/test/FluxCompletionStressTest.kt |
//===--- TypesInternal.h - Intermediate structures used for analysis C++-*-===//
//
// 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/include-cleaner/lib/TypesInternal.h |
// Copyright 2021 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
//
// Code generated by generate-staticcheck; DO NOT EDIT.
//
//go:build bazel
package sa1029
import (
util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes... | go | github | https://github.com/cockroachdb/cockroach | build/bazelutil/staticcheckanalyzers/sa1029/analyzer.go |
// errorcheck -0 -m
// Copyright 2025 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 escape
const globalConstSize = 128
var globalVarSize = 128
//go:noinline
func testSlices() {
{
size := 128
_ = make([]byte,... | go | github | https://github.com/golang/go | test/escape_make_non_const.go |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Joseph Callen <jcallen () csc.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 Li... | unknown | codeparrot/codeparrot-clean | ||
function mutate(x, y) {
'use no forget';
if (!Array.isArray(x.value)) {
x.value = [];
}
x.value.push(y);
if (y != null) {
y.value = x;
}
}
function Component(props) {
const a = {};
const b = [a]; // array elements alias
const c = {};
const d = {c}; // object values alias
// capture all t... | javascript | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/mutable-lifetime-with-aliasing.js |
"""Python 'base64_codec' Codec - base64 content transfer encoding.
This codec de/encodes from bytes to bytes.
Written by Marc-Andre Lemburg (mal@lemburg.com).
"""
import codecs
import base64
### Codec APIs
def base64_encode(input, errors='strict'):
assert errors == 'strict'
return (base64.encodebytes(input... | unknown | codeparrot/codeparrot-clean | ||
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "commit.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
#include "commit-graph.h"
#include "odb.h"
#include "progress.h"
#include "replace-object.h"
#include "strbuf.h"
#include "tag.h"
#in... | c | github | https://github.com/git/git | builtin/commit-graph.c |
# -*- coding: utf-8 -*-
"""
/***************************************************************************
Name : DB Manager
Description : Database manager plugin for QGIS
Date : May 23, 2011
copyright : (C) 2011 by Giuseppe Sucameli
email : brush.tyler@... | unknown | codeparrot/codeparrot-clean | ||
//! See docs in build/expr/mod.rs
use rustc_ast::{AsmMacro, InlineAsmOptions};
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::stack::ensure_sufficient_stack;
use rustc_hir as hir;
use rustc_hir::lang_items::LangItem;
use rustc_middle::mir::*;
use rustc_middle::span_bug;
use rustc_middle::thir::*;... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_mir_build/src/builder/expr/into.rs |
/*
* Copyright (C) 2008 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 agre... | java | github | https://github.com/google/guava | guava/src/com/google/common/collect/Platform.java |
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import hamming, triang, blackmanharris
import sys, os, functools, time
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/'))
import sineModel as SM
import utilFunctions as UF
(fs, x) = UF.wavread(os.p... | unknown | codeparrot/codeparrot-clean | ||
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Alexander Akait @alexander-akait
*/
"use strict";
const Hash = require("../Hash");
const { digest, update } = require("./hash-digest");
/** @typedef {import("../../../declarations/WebpackOptions").HashDigest} Encoding */
/** @typedef {() => H... | javascript | github | https://github.com/webpack/webpack | lib/util/hash/BulkUpdateHash.js |
interface A
interface B
fun <T> T.foo() where T: A, T: B {}
var a: Any = 1
fun test() {
if (a is A && a is B) {
<expr>a</expr>.foo()
}
} | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api/testData/components/dataFlowInfoProvider/smartCastInfo/multiSmartcastAsReceiver_unstable.kt |
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
from __future__ import absolute_import
import copy
import xml.etree.ElementTree as ET
import os
import re
from svtplay_dl.output import progress_stream, output, ETA, progressbar
from svtplay_dl.utils.urllib import urljoin
from svt... | 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.client.tests
import io.ktor.client.call.*
import io.ktor.client.engine.mock.*
import io.ktor.client.request.*
import io.ktor.client.test.base.*
import io.ktor.http.*
import ko... | kotlin | github | https://github.com/ktorio/ktor | ktor-client/ktor-client-tests/jvm/test/io/ktor/client/tests/MockedEngineTests.kt |
from django.conf.urls import url
from oscar.core.application import Application
from oscar.core.loading import get_class
class RangeDashboardApplication(Application):
name = None
default_permissions = ['is_staff', ]
list_view = get_class('dashboard.ranges.views', 'RangeListView')
create_view = get_cl... | unknown | codeparrot/codeparrot-clean | ||
"""
Module to process the wat file output by s2wasm, and remove unneeded exported functions
"""
def canRemoveExport(export, exports, enabledFlags):
"""
Cycles through each exported function, comparing its name to those in the enabled
set of functions, if it isn't present it returns true
"""
# Get the function... | unknown | codeparrot/codeparrot-clean | ||
import json
import requests
from six import wraps
class MockResponse(object):
def __init__(self, method=None, url=None, params=None, headers=None,
timeout=None, data=None):
self.url = url
self.method = method
self.params = params
self.headers = headers
self.... | unknown | codeparrot/codeparrot-clean | ||
from webob import acceptparse
Accept = acceptparse.Accept
MIMEAccept = acceptparse.MIMEAccept
class Broker(object):
"""
Function dispatch based on MIME Accept-* headers.
Initialize a broker with some dispatched-to functions matched against MIME
types::
>>> b = Broker()
>>> html_hand... | unknown | codeparrot/codeparrot-clean | ||
import re
driveData = re.compile("(?:x)(\d+)(?:-y)(\d+)(?:\s+)(\d+)(?:T\s+)(\d+)(?:T\s+)(\d+)")
lines = open("inputs/Day22.txt", "r").readlines()
# X, Y, Size, Used, Available
# 0, 1, 2, 3, 4
drives = map(lambda line: driveData.search(line).groups(), lines)
drives = list(map(lambda drive: list(map(int, dri... | unknown | codeparrot/codeparrot-clean | ||
""" Tests for commerce views. """
import json
from uuid import uuid4
from nose.plugins.attrib import attr
import ddt
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test import TestCase
import mock
from student.tests.factories import UserFactory
class UserMixin(object):
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2014 Cisco Systems, Inc. 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 requir... | unknown | codeparrot/codeparrot-clean | ||
/** @import { Source } from '#client' */
import { DEV } from 'esm-env';
import { set, source, state, increment } from '../internal/client/reactivity/sources.js';
import { label, tag } from '../internal/client/dev/tracing.js';
import { get, update_version } from '../internal/client/runtime.js';
/**
* A reactive versio... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/src/reactivity/map.js |
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck4.ts] ////
//// [ES5For-ofTypeCheck4.ts]
var union: string | string[];
for (const v of union) { }
//// [ES5For-ofTypeCheck4.js]
"use strict";
var union;
for (var _i = 0, union_1 = union; _i < union_1.length; _i++) {
var v = union_1[_i];
} | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/ES5For-ofTypeCheck4(target=es5).js |
import { test, expect } from "@playwright/test";
import {
createAppFixture,
createFixture,
js,
} from "./helpers/create-fixture.js";
import type { Fixture, AppFixture } from "./helpers/create-fixture.js";
import { PlaywrightFixture } from "./helpers/playwright-fixture.js";
import { type TemplateName } from "./he... | typescript | github | https://github.com/remix-run/react-router | integration/catch-boundary-data-test.ts |
# Copyright 2026 Mobile Perception Systems Lab at TU/e and The HuggingFace Inc. 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/licens... | python | github | https://github.com/huggingface/transformers | src/transformers/models/eomt_dinov3/convert_eomt_dinov3_to_hf.py |
#!/usr/bin/env python3
#
# Copyright (c) 2020, The OTNS Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, th... | unknown | codeparrot/codeparrot-clean | ||
from email.MIMEBase import MIMEBase
from django.core.mail.backends.base import BaseEmailBackend
from django.core.mail import EmailMultiAlternatives
from django.core.exceptions import ImproperlyConfigured
from google.appengine.api import mail as aeemail
from google.appengine.runtime import apiproxy_errors
def _send_def... | 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.descriptors.symbols.descriptorBased
import org.jetbrains.kotlin.ana... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/KaFe10DescTypeParameterSymbol.kt |
#!/usr/bin/env python
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
#
# This file is part of Shinken.
#
# Shinken is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the F... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright (c) 2019 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
from ansible.module_utils.facts.hardware import linux
from . linux_data impor... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# utils/sil-opt-verify-all-modules.py - Verifies Swift modules -*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https:/... | unknown | codeparrot/codeparrot-clean | ||
use std::ops::ControlFlow;
use super::ty::{
Allocation, Binder, ConstDef, ExistentialPredicate, FnSig, GenericArgKind, GenericArgs,
MirConst, Promoted, Region, RigidTy, TermKind, Ty, UnevaluatedConst,
};
use crate::Opaque;
use crate::ty::TyConst;
pub trait Visitor: Sized {
type Break;
fn visit_ty(&mut... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_public/src/visitor.rs |
import optparse, yaml, json
class OptionResolver(object):
"""Resolve user input options"""
def __init__(self):
self.parser = optparse.OptionParser()
self.set_options()
def set_options(self):
"""Use optparser to manage options"""
self.parser.add_option(
"--mani... | 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 | ||
#
# pysmsd.lib.json
#
# Copyright 2009 Helsinki Institute for Information Technology
# and the authors.
#
# Authors: Ken Rimey <rimey@hiit.fi>
#
# 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 Softwa... | unknown | codeparrot/codeparrot-clean | ||
from .common import BaseController
from .mpapi.mp import statistics as mpStat
'''
yiw"lpfuviwpyiw2jfu;viwp3k2d3j
'''
class Statistics(BaseController):
def user_summary(self, startTime, timeSection=None):
args = (startTime,) if timeSection is None else (startTime, timeSection)
return self.determine... | unknown | codeparrot/codeparrot-clean | ||
"""Linear Estimators."""
# 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
#
#... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
"""
file: tests/CMIP5/db_fixture.py
author: Scott Wales <scott.wales@unimelb.edu.au>
Copyright 2015 ARC Centre of Excellence for Climate Systems Science
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obta... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
""" Update an Attendify schedule XLSX file with the currently accepted
talks.
Usage: manage.py attendify_schedule_xlsx ep2016 schedule.xlsx
Note that for Attendify you have to download the schedule before
running this script, since they add meta data to the downloaded
file ... | unknown | codeparrot/codeparrot-clean | ||
########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Andi Albrecht, albrecht.andi@gmail.com
#
# This module is part of python-sqlparse and is released under
# the BSD License: https://opensource.org/licenses/BSD-3-Clause
from sqlparse import sql, tokens as T
from sqlparse.compat import text_type
from sqlparse.utils import o... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2013 IBM Corp.
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
# Generated by Django 1.11.23 on 2019-08-23 21:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('zerver', '0244_message_copy_pub_date_to_date_sent'),
]
operations = [
migrations.RunSQL(
"""
DROP TRIGGER zerver_me... | 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.renderer.declarations.modifiers
import org.jetbrains.kotlin.analysi... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/renderer/declarations/modifiers/KaDeclarationModifiersRenderer.kt |
# -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing
# dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
i... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/sh
test_description='test for-each-refs usage of ref-filter APIs'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-gpg.sh
test_expect_success 'setup some history and refs' '
test_commit one &&
git branch -M main &&
test_commit two &&
test_commit three &&
git checkout -b side &&
test_commit four &&
git tag -m "A... | unknown | github | https://github.com/git/git | t/t6302-for-each-ref-filter.sh |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the Chrome Preferences file parser."""
import unittest
# pylint: disable=unused-import
from plaso.formatters import chrome_preferences as chrome_preferences_formatter
from plaso.lib import timelib
from plaso.parsers import chrome_preferences
from tests.parsers i... | unknown | codeparrot/codeparrot-clean | ||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012, Nachi Ueno, NTT MCL, Inc.
# 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://ww... | unknown | codeparrot/codeparrot-clean | ||
"""Get log settings."""
import os
import platform
import sys
from logging.handlers import SysLogHandler
LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
def get_logger_config(log_dir,
logging_env="no_env",
tracking_filename="tracking.log",
... | 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
# d... | unknown | codeparrot/codeparrot-clean | ||
import datetime
from django.core import signing
from django.test import SimpleTestCase, override_settings
from django.test.utils import freeze_time
from django.utils.crypto import InvalidAlgorithm
class TestSigner(SimpleTestCase):
def test_signature(self):
"signature() method should generate a signature"
... | python | github | https://github.com/django/django | tests/signing/tests.py |
import { test } from '../../test';
export default test({
html: `
<p>2, 3, 4</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>2, 3, 4</p>
`,
ssrHtml: `
<p>1, 2, 3</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>1, 2, 3</p>
`
}); | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/component-binding-each-reassigned/_config.js |
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 unique constraint on 'Batch', fields ['survey', 'name']
db.create_unique(u'survey_groupcondition', ['value', 'attribute', 'c... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.network.sockets
import io.ktor.network.sockets.nodejs.*
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.*
import kotlinx.io.*
import kotlin.coroutines.*
intern... | kotlin | github | https://github.com/ktorio/ktor | ktor-network/web/src/io/ktor/network/sockets/ServerSocketContext.kt |
#!/bin/sh
test_description='test log with i18n features'
. ./lib-gettext.sh
if ! test_have_prereq ICONV
then
skip_all='skipping log i18n tests; iconv not available'
test_done
fi
# two forms of é
utf8_e=$(printf '\303\251')
latin1_e=$(printf '\351')
# invalid UTF-8
invalid_e=$(printf '\303\50)') # ")" at end to c... | unknown | github | https://github.com/git/git | t/t4210-log-i18n.sh |
from django.db.models.functions import Random
from django.test import TestCase
from ..models import FloatModel
class RandomTests(TestCase):
def test(self):
FloatModel.objects.create()
obj = FloatModel.objects.annotate(random=Random()).first()
self.assertIsInstance(obj.random, float)
... | python | github | https://github.com/django/django | tests/db_functions/math/test_random.py |
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Union, Iterable, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
from ..._types import SequenceNotStr
from ..shared.chat_model import ChatModel
fr... | python | github | https://github.com/openai/openai-python | src/openai/types/beta/assistant_create_params.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.