code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
# encoding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urlparse,
)
from ..utils import (
ExtractorError,
clean_html,
)
class NaverIE(InfoExtractor):
_VALID_URL = r'https?://(?:m\.)?tvcast\.naver\.com... | unknown | codeparrot/codeparrot-clean | ||
# flash LED #1 using inline assembler
# this version is overly verbose and uses word stores
@micropython.asm_thumb
def flash_led(r0):
movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xFFFF)
movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7FFF)
movw(r2, 1 << 13)
movt(r2, 0)
movw(r3, 0)
movt(r3, 1 << 13... | unknown | codeparrot/codeparrot-clean | ||
from will.plugin import WillPlugin
from will.decorators import respond_to, periodic, hear, randomly, route, rendered_template, require_settings
class StoragePlugin(WillPlugin):
@respond_to("^How big is the db?", acl=["admins"])
def db_size(self, message):
self.bootstrap_storage()
self.say("It'... | unknown | codeparrot/codeparrot-clean | ||
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
# Copyright (c) 2010-2015 openpyxl
from .data_source import NumDataSource, NumRef, AxDataSource
from .reference import Reference
from .series import Series, XYSeries, SeriesLabel, StrRef
from ..utils import SHEETRANGE_RE, rows_from_range, quote_sheetname
def SeriesFactory(values... | unknown | codeparrot/codeparrot-clean | ||
<?php
namespace Illuminate\Cache;
class ApcWrapper
{
/**
* Get an item from the cache.
*
* @param string $key
* @return mixed
*/
public function get($key)
{
$fetchedValue = apcu_fetch($key, $success);
return $success ? $fetchedValue : null;
}
/**
*... | php | github | https://github.com/laravel/framework | src/Illuminate/Cache/ApcWrapper.php |
# -*- coding: utf-8 -*-
################################################################################
# Copyright (C) 2012 Travis Shirk <travis@pobox.com>
#
# 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 So... | unknown | codeparrot/codeparrot-clean | ||
package schemaversion
import (
"context"
"math"
"sort"
)
// V17 migrates panel minSpan property to maxPerRow property.
// This migration converts the deprecated minSpan property to the newer maxPerRow property
// which controls how many panels can be displayed in a single row.
//
// The conversion algorithm:
// 1.... | go | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/schemaversion/v17.go |
// Copyright The Prometheus 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 w... | go | github | https://github.com/prometheus/prometheus | promql/query_logger.go |
import type { DesignSystem } from '../../design-system'
import type { SourceLocation } from '../../source-maps/source'
import colors from '../colors'
import type { PluginWithConfig } from '../plugin-api'
import { createThemeFn } from '../plugin-functions'
import { deepMerge, isPlainObject } from './deep-merge'
import {... | typescript | github | https://github.com/tailwindlabs/tailwindcss | packages/tailwindcss/src/compat/config/resolve-config.ts |
# 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 contextlib
import json
import logging
import re
import urllib2
from telemetry.core import util
from telemetry.core.backends.chrome import chrome_brow... | unknown | codeparrot/codeparrot-clean | ||
import datetime
import random
import unittest
import uuid
from nose.plugins.attrib import attr
import mock
from opaque_keys.edx.locator import CourseLocator, BlockUsageLocator
from xmodule.modulestore import ModuleStoreEnum
from xmodule.x_module import XModuleMixin
from xmodule.modulestore.inheritance import Inherita... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import division, print_function, absolute_import
import itertools
import threading
import time
import numpy as np
from numpy.testing import TestCase, assert_equal, run_module_suite
from numpy.testing.decorators import slow
import scipy.interpolate
from scipy._lib._testutils import knownfailure_overrid... | unknown | codeparrot/codeparrot-clean | ||
"""Facility to use the Expat parser to load a minidom instance
from a string or file.
This avoids all the overhead of SAX and pulldom to gain performance.
"""
# Warning!
#
# This module is tightly bound to the implementation details of the
# minidom DOM and can't be used with other DOM implementations. This
# is due... | unknown | codeparrot/codeparrot-clean | ||
test_kind: fsm_workload_test
selector:
roots:
- jstests/concurrency/fsm_workloads/**/*.js
exclude_files:
# Disabled due to MongoDB restrictions and/or workload restrictions
# These workloads sometimes trigger 'Could not lock auth data update lock'
# errors because the AuthorizationManager currentl... | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn.yml |
package kotlinx.coroutines.rx2
import kotlinx.coroutines.testing.*
import kotlinx.coroutines.*
import kotlinx.coroutines.flow.*
import org.junit.Test
import org.reactivestreams.*
import java.util.concurrent.*
import kotlin.test.*
@Suppress("ReactiveStreamsSubscriberImplementation")
class FlowAsFlowableTest : TestBase... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | reactive/kotlinx-coroutines-rx2/test/FlowAsFlowableTest.kt |
from astropy import units as u
from astropy.tests.helper import assert_quantity_allclose
from poliastro.bodies import Earth
from poliastro.spheroid_location import SpheroidLocation
def test_cartesian_coordinates():
expected_cords = [
3764258.64785411 * u.m,
3295359.33856106 * u.m,
3942945.... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1'... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package version
import (
"bytes"
"fmt"
"time"
)
type VersionInfo struct {
Revision string `json:"revision,omitempty"`
Version string `json:"version,omitempty"`
VersionPrerelease string `json:"version_prerelease,omitempty"... | go | github | https://github.com/hashicorp/vault | version/version.go |
"""SCons.Script
This file implements the main() function used by the scons script.
Architecturally, this *is* the scons script, and will likely only be
called from the external "scons" wrapper. Consequently, anything here
should not be, or be considered, part of the build engine. If it's
something that we expect ot... | unknown | codeparrot/codeparrot-clean | ||
import pytest
import mock
from django.core.exceptions import ValidationError
# AWX
from awx.main.models import (
Host,
Inventory,
InventorySource,
InventoryUpdate,
)
from awx.main.utils.filters import SmartFilter
@pytest.mark.django_db
class TestSCMUpdateFeatures:
def test_automatic_project_upda... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
import xmlrpclib
import unittest
from config import *
class SystemSearchTests(RhnTestCase):
def test_searchByNameAndDescription(self):
systems = client.system.search.ip(self.session_key, SYS_SEARCH_NAME_DESCRP)
self.assertTrue(systems != None)
for s in systems:
... | unknown | codeparrot/codeparrot-clean | ||
<docs-step title="Step 1">
Do the first thing.
</docs-step>
<docs-step title="Step B">
Do another thing after that.
</docs-step> | unknown | github | https://github.com/angular/angular | adev/shared-docs/pipeline/shared/marked/test/docs-step/docs-step.md |
"""The tests for the Sun component."""
from datetime import datetime, timedelta
from unittest.mock import patch
from pytest import mark
import homeassistant.components.sun as sun
import homeassistant.core as ha
import homeassistant.util.dt as dt_util
from homeassistant.const import EVENT_STATE_CHANGED
from homeassist... | 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 | cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java |
from django.contrib import admin, messages
from django.shortcuts import redirect, render
from .forms import ActivateUserKeyForm
from .models import UserKey, SecretRole, Secret
@admin.register(UserKey)
class UserKeyAdmin(admin.ModelAdmin):
actions = ['activate_selected']
list_display = ['user', 'is_filled', 'i... | unknown | codeparrot/codeparrot-clean | ||
<!--Copyright 2021 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/ja/model_doc/deit.md |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.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... | unknown | codeparrot/codeparrot-clean | ||
# (c) 2018, Matt Martz <matt@sivel.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | unknown | codeparrot/codeparrot-clean | ||
"""Concrete date/time and related types -- prototype implemented in Python.
See http://www.zope.org/Members/fdrake/DateTimeWiki/FrontPage
See also http://dir.yahoo.com/Reference/calendars/
For a primer on DST, including many current DST rules, see
http://webexhibits.org/daylightsaving/
For more about DST than you e... | unknown | codeparrot/codeparrot-clean | ||
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'd F Y'
TIME_FORMAT = 'H:i:s'
DATETIME_FORMAT = 'd F Y H:i:s'
YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'd F'
SHORT_DATE_FORMAT = 'd M Y'
SHORT_DATETIME_FORMAT = 'd M Y H:i:s'
FIRST_DAY_OF_WEEK = 1 # P... | unknown | codeparrot/codeparrot-clean | ||
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# License: BSD 3 clause
import numpy as np
from scipy import sparse
from sklearn.utils.testing import (assert_array_almost_equal, assert_equal,
assert_greater, assert_almost_equal,
... | unknown | codeparrot/codeparrot-clean | ||
/*-------------------------------------------------------------------------
*
* proclang.c
* PostgreSQL LANGUAGE support code.
*
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* src/backend/co... | c | github | https://github.com/postgres/postgres | src/backend/commands/proclang.c |
/* 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/kernels/cwise_ops.h |
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | c | github | https://github.com/llvm/llvm-project | clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.h |
import { matchPath } from "react-router";
describe("matchPath", () => {
it("matches the root / URL", () => {
expect(matchPath("/", "/")).toMatchObject({
pathname: "/",
pathnameBase: "/",
});
});
describe("when the pattern has no leading slash", () => {
it("fails to match a pathname that ... | typescript | github | https://github.com/remix-run/react-router | packages/react-router/__tests__/matchPath-test.tsx |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
串口RTU通道类
通过调用管理类对象的process_data函数实现信息的发送。
"""
import logging
import serial
from pymodbus.client.sync import ModbusSerialClient
from libs.modbus_define import *
from libs.base_channel import BaseChannel
logger = logging.getLogger('linkworld')
class SerialRtuChannel(... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# Copyright (c) 2018 Hai Cao, <t-haicao@microsoft.com>, Yunge Zhu <yungez@microsoft.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadat... | 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 applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/core/common_runtime/eager/execute_node.h |
# -*- coding: utf-8 -*-
# $Id$
"""
TestBox Script - Upgrade from local file ZIP.
"""
__copyright__ = \
"""
Copyright (C) 2012-2014 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.org. This file is free software;
you can redistribute it and/or modi... | unknown | codeparrot/codeparrot-clean | ||
package kotlinx.coroutines.selects
import kotlinx.coroutines.*
import kotlin.time.*
/**
* Clause that selects the given [block] after a specified timeout passes.
* If timeout is negative or zero, [block] is selected immediately.
*
* **Note: This is an experimental api.** It may be replaced with light-weight timer... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/common/src/selects/OnTimeout.kt |
# Copyright 2018 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, Bojan Vitnik <bvitnik@mainstream.rs>
# 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 atexit
import time
import re
HAS_XENAPI = Fal... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import division
import numpy as np
from numpy import dot
from dipy.core.geometry import sphere2cart
from dipy.core.geometry import vec2vec_rotmat
from dipy.reconst.utils import dki_design_matrix
# Diffusion coefficients for white matter tracts, in mm^2/s
#
# Based roughly on values from:
#
# Pierpao... | unknown | codeparrot/codeparrot-clean | ||
{
"jupyter-lite-schema-version": 0,
"jupyter-config-data": {
"appName": "Pandas REPL",
"appUrl": "./repl",
"enableMemoryStorage": true,
"settingsStorageDrivers": ["memoryStorageDriver"],
"contentsStorageDrivers": ["memoryStorageDriver"]
}
} | json | github | https://github.com/pandas-dev/pandas | web/interactive_terminal/jupyter-lite.json |
import os
import math
from pyglet import window
from pyglet import resource
from pyglet import image
from pyglet.window import key
from pyglet import clock
import spryte
import view
win = window.Window(vsync=False)
fps = clock.ClockDisplay(color=(1, 1, 1, 1))
map = [
[ 0, 1, 1, 1, 2, 3],
[ 5, 6, 16, 1... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
from django.db import models
from django.conf import settings
from django.contrib.auth.models import AbstractBaseUser, UserManager, \
PermissionsMixin
from django.dispatch import receiver
from zerver.lib.cache import cache_with_key, flush_user_profile, flush_realm, \
user... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# kvserver.py
#
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | unknown | codeparrot/codeparrot-clean | ||
import unittest
from conans.client.tools import environment_append
from cpt.test.utils.tools import TestClient, TestServer
from cpt.test.test_client.tools import get_patched_multipackager
class InvalidConfigTest(unittest.TestCase):
conanfile = """from conans import ConanFile
from conans.errors import ConanInval... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# Copyright 2014 Google 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 required b... | unknown | codeparrot/codeparrot-clean | ||
require 'optparse'
parser = OptionParser.new
parser.on('--string=STRING', String) do |value|
p [value, value.class]
end
parser.parse! | ruby | github | https://github.com/ruby/ruby | doc/optparse/ruby/string.rb |
//
// Brand guidelines
//
// Logo series wrapper
.bd-brand-logos {
color: $bd-violet;
.inverse {
color: $white;
background-color: $bd-violet;
}
}
// Individual items
.bd-brand-item {
+ .bd-brand-item {
border-top: 1px solid var(--bs-border-color);
}
@include media-breakpoint-up(md) {
+ .... | unknown | github | https://github.com/twbs/bootstrap | site/src/scss/_brand.scss |
'use strict';
const common = require('../common');
const tmpdir = require('../../test/common/tmpdir');
const { run } = require('node:test');
const { writeFileSync, mkdirSync } = require('node:fs');
const { join } = require('node:path');
const fixtureContent = "const test = require('node:test'); test('test has ran');"... | javascript | github | https://github.com/nodejs/node | benchmark/test_runner/run-single-test-file.js |
//
// cancellation_signal.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_ASIO_CA... | unknown | github | https://github.com/mysql/mysql-server | extra/boost/boost_1_87_0/boost/asio/cancellation_signal.hpp |
---
# tasks to cleanup after creating a repo file, specifically for testing the 'mode' arg
- name: Delete existing repo
file:
path: "{{ test_repo_path }}"
state: absent | unknown | github | https://github.com/ansible/ansible | test/integration/targets/apt_repository/tasks/mode_cleanup.yaml |
"""Mock socket module used by the smtplib tests.
"""
# imported for _GLOBAL_DEFAULT_TIMEOUT
import socket as socket_module
# Mock socket module
_defaulttimeout = None
_reply_data = None
# This is used to queue up data to be read through socket.makefile, typically
# *before* the socket object is even created. It is i... | python | github | https://github.com/python/cpython | Lib/test/mock_socket.py |
/* Copyright 2025 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/compiler/mlir/lite/quantization/common/quantization_lib/tfl_quantization_driver.h |
"""Mapping a polymorphic-valued vertical table as a dictionary.
Builds upon the dictlike.py example to also add differently typed
columns to the "fact" table, e.g.::
Table('properties', metadata
Column('owner_id', Integer, ForeignKey('owner.id'),
primary_key=True),
Column('key', Unico... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/
#
# 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, mod... | unknown | codeparrot/codeparrot-clean | ||
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright (c) 2023, 2025, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is designed to work with certain software (including... | c | github | https://github.com/mysql/mysql-server | sql/aggregated_stats_buffer.h |
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#if (( __i386__ || __amd64__ ) && ( __GNUC__ || __INTEL_COMPILER ))
static ngx_inline void ngx_cpuid(uint32_t i, uint32_t *buf);
#if ( __i386__ )
static ngx_inline void
ngx_cpuid(uint32_t i, uint32_t *buf... | c | github | https://github.com/nginx/nginx | src/core/ngx_cpuinfo.c |
use rustc_ast as ast;
use rustc_ast::token::{self, MetaVarKind};
use rustc_ast::tokenstream::ParserRange;
use rustc_ast::{AttrItemKind, Attribute, attr};
use rustc_errors::codes::*;
use rustc_errors::{Diag, PResult, inline_fluent};
use rustc_span::{BytePos, Span};
use thin_vec::ThinVec;
use tracing::debug;
use super::... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_parse/src/parser/attr.rs |
---
MainSourceFile: no.cpp
Diagnostics:
- DiagnosticName: test-header-format
DiagnosticMessage:
Message: Fix
FilePath: $(path)/no.cpp
FileOffset: 36
Replacements:
- FilePath: $(path)/no.cpp
Offset: 36
Length: 17
ReplacementTe... | unknown | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-apply-replacements/Inputs/format_header/no.yaml |
from collections import defaultdict
from jedi.evaluate.utils import PushBackIterator
from jedi.evaluate import analysis
from jedi.evaluate.lazy_context import LazyKnownContext, \
LazyTreeContext, LazyUnknownContext
from jedi.evaluate import docstrings
from jedi.evaluate import pep0484
from jedi.evaluate.context 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 | build-plugin/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/WarPluginAction.java |
name: Automations
on:
# For: fast-forward
check_run:
types: [ completed ]
# For: fast-forward
pull_request_review:
types: [ submitted ]
# For: auto-approve, fast-forward
pull_request_target:
types: [ labeled ]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
P... | unknown | github | https://github.com/ktorio/ktor | .github/workflows/automations.yml |
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
"""
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2010-2013 by Yaco Sistemas <goinnn@gmail.com> or <pmartin@yaco.es>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option)... | 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 | core/spring-boot-test/src/test/java/org/springframework/boot/test/system/OutputCaptureTests.java |
# -*- coding: utf-8 -*-
"""
***************************************************************************
inOutSelector.py
---------------------
Date : April 2011
Copyright : (C) 2011 by Giuseppe Sucameli
Email : brush dot tyler at gmail dot com
*************... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from functools import wraps
import logging
from psycopg2 import IntegrityError, OperationalError, errorcodes
import random
import threading
import time
import openerp
from openerp.tools.translate import translate
from openerp.osv.orm import except_orm
from contextlib import contextmanager
imp... | unknown | codeparrot/codeparrot-clean | ||
/**
* Normalize CSS var value created by `v-bind` in `<style>` block
* See https://github.com/vuejs/core/pull/12461#issuecomment-2495804664
*/
export function normalizeCssVarValue(value: unknown): string {
if (value == null) {
return 'initial'
}
if (typeof value === 'string') {
return value === '' ? '... | typescript | github | https://github.com/vuejs/core | packages/shared/src/cssVars.ts |
/*!
* @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 {isDevMode} from '@angular/core';
import type {NavigationItem} from '@angular/docs';
// These imports are exp... | typescript | github | https://github.com/angular/angular | adev/src/app/routing/navigation-entries/index.ts |
# coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import json
import o... | unknown | codeparrot/codeparrot-clean | ||
from modeltranslation.translator import translator, TranslationOptions
from moocng.courses.models import Course, StaticPage, Unit, KnowledgeQuantum, Question, Option
class CourseTranslationOptions(TranslationOptions):
fields = ('name', 'description', 'requirements', 'learning_goals', 'intended_audience', 'promotion_m... | unknown | codeparrot/codeparrot-clean | ||
"""Lists physical networks"""
from baseCmd import *
from baseResponse import *
class listPhysicalNetworksCmd (baseCmd):
typeInfo = {}
def __init__(self):
self.isAsync = "false"
"""list physical network by id"""
self.id = None
self.typeInfo['id'] = 'uuid'
"""List by keyw... | unknown | codeparrot/codeparrot-clean | ||
import type { ResolvedConfig } from './config/types'
import type { PluginAPI } from './plugin-api'
export function darkModePlugin({ addVariant, config }: Pick<PluginAPI, 'addVariant' | 'config'>) {
let darkMode = config('darkMode', null) as ResolvedConfig['darkMode']
let [mode, selector = '.dark'] = Array.isArray(... | typescript | github | https://github.com/tailwindlabs/tailwindcss | packages/tailwindcss/src/compat/dark-mode.ts |
#!/usr/bin/python
# 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
# "Licen... | unknown | codeparrot/codeparrot-clean | ||
/**
* \file pkcs7.h
*
* \brief PKCS #7 generic defines and structures
* https://tools.ietf.org/html/rfc2315
*/
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/
/**
* Note: For the time being, this implementation of the PKCS #7 cryptographic
* message sy... | c | github | https://github.com/nodejs/node | deps/LIEF/third-party/mbedtls/include/mbedtls/pkcs7.h |
"""passlib.apache - apache password support"""
# XXX: relocate this to passlib.ext.apache?
#=============================================================================
# imports
#=============================================================================
from __future__ import with_statement
# core
from hashlib imp... | 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 us... | unknown | codeparrot/codeparrot-clean | ||
#include "test/jemalloc_test.h"
#include "jemalloc/internal/util.h"
static void
test_switch_background_thread_ctl(bool new_val) {
bool e0, e1;
size_t sz = sizeof(bool);
e1 = new_val;
expect_d_eq(mallctl("background_thread", (void *)&e0, &sz,
&e1, sz), 0, "Unexpected mallctl() failure");
expect_b_eq(e0, !e1... | c | github | https://github.com/redis/redis | deps/jemalloc/test/unit/background_thread.c |
from aubio.aubioclass import *
from params import taskparams
class task(taskparams):
""" default template class to apply tasks on a stream """
def __init__(self,input,output=None,params=None):
""" open the input file and initialize default argument
parameters should be set *before* calling this method.
"""
i... | unknown | codeparrot/codeparrot-clean | ||
from core.himesis import Himesis, HimesisPreConditionPatternLHS
import uuid
class HContract08_IsolatedLHS(HimesisPreConditionPatternLHS):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HContract08_IsolatedLHS
"""
# Flag this instance as compiled now
self.is_compiled = True
... | unknown | codeparrot/codeparrot-clean | ||
from base import kafka, pipeline, clean_db, eventually
import json
import threading
import time
def test_basic(pipeline, kafka, clean_db):
"""
Produce and consume several topics into several streams and verify that
all resulting data is correct
"""
pipeline.create_stream('stream0', x='integer')
pipeline.cr... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockitousage.stacktrace;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.*;
import org.junit.Before;
impo... | java | github | https://github.com/mockito/mockito | mockito-core/src/test/java/org/mockitousage/stacktrace/PointingStackTraceToActualInvocationInOrderTest.java |
# Copyright (c) 2010 Aldo Cortesi
# Copyright (c) 2010-2011 Paul Colomiets
# Copyright (c) 2011 Mounier Florian
# Copyright (c) 2011 Tzbob
# Copyright (c) 2012 roger
# Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2013 Tao Sauvage
# Copyright (c) 2014 ramnes
# Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 d... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/local/bin/python
# rfc1751.py : Converts between 128-bit strings and a human-readable
# sequence of words, as defined in RFC1751: "A Convention for
# Human-Readable 128-bit Keys", by Daniel L. McDonald.
__revision__ = "$Id: RFC1751.py,v 1.6 2003/04/04 15:15:10 akuchling Exp $"
import string, binascii
binary={... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2014-10-07 10:33:38
import os
import time
import unittest2 as unittest
from pyspider.libs import utils
from pyspider.libs import rabbitmq
@unittest.skipI... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2021 The FedLearner 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 mock import Mock, patch, call
import docker
from nose.tools import nottest
from ....fixtures import premade_app
from ....testcases import DustyTestCase
from dusty.systems.docker.testing_image import (_ensure_base_image, _create_tagged_image, _get_split_volumes, _get_create_container_volumes,
... | unknown | codeparrot/codeparrot-clean | ||
import xbmc, xbmcaddon, xbmcgui, xbmcplugin, os, sys, xbmcvfs, glob
import shutil
import urllib2,urllib
import re
import uservar
from datetime import date, datetime, timedelta
from resources.libs import extract, downloader, notify, loginit, debridit, traktit, skinSwitch, uploadLog, wizard as wiz
ADDON_ID = userv... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | unknown | codeparrot/codeparrot-clean | ||
# textDisplay.py
# --------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.e... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf8
import asyncio
import logging
import requests
from aiohttp import ClientSession
from api import entryprocessor
from api.exceptions import NoWordException
from api.output import Output
from api.servicemanager import DictionaryServiceManager
from database.exceptions.http import WordDoesNotExistException
... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-framework | spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java |
//go:build windows
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ag... | go | github | https://github.com/kubernetes/kubernetes | cmd/kubeadm/app/util/chroot_windows.go |
"""
Base IO code for all datasets
"""
# Copyright (c) 2007 David Cournapeau <cournape@gmail.com>
# 2010 Fabian Pedregosa <fabian.pedregosa@inria.fr>
# 2010 Olivier Grisel <olivier.grisel@ensta.org>
# License: BSD 3 clause
import os
import csv
import sys
import shutil
from os import environ... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.