code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
@import "@sass/abstracts/vars"; @import "@sass/abstracts/mixins"; .promo-shadow { max-width: 960px; padding: 0; border-top-width: 3px; border-top-color: $promo-shadow-border; border-style: solid; overflow: visible; position: relative; &.promo { float: left; } > .component-content { @include...
unknown
github
https://github.com/vercel/next.js
examples/cms-sitecore-xmcloud/src/assets/sass/components/promo/_promo-shadow.scss
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Lice...
unknown
codeparrot/codeparrot-clean
from datetime import datetime import pytest from pandas.tseries.holiday import ( after_nearest_workday, before_nearest_workday, nearest_workday, next_monday, next_monday_or_tuesday, next_workday, previous_friday, previous_workday, sunday_to_monday, weekend_to_monday, ) _WEDNES...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/tseries/holiday/test_observance.py
import unittest from unittest.mock import ( call, _Call, create_autospec, MagicMock, Mock, ANY, _CallList, patch, PropertyMock ) from datetime import datetime class SomeClass(object): def one(self, a, b): pass def two(self): pass def three(self, a=None): pass class AnyTes...
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 model 'AffectedUserByGroup' db.create_table( 'sentry_affecteduserbygroup', ( ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #-*- coding:utf-8 -*- """ This file is part of OpenSesame. OpenSesame 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
//===----------------------------------------------------------------------===// // // 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/ParentVirtualCallCheck.h
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT /** * Provides APIs to create windows, communicate with other windows and manipulate the current window. * * #### Window events * * Events can be listened to using {@link Wi...
typescript
github
https://github.com/tauri-apps/tauri
packages/api/src/window.ts
# flake8: NOQA ######## # Copyright (c) 2014 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...
unknown
codeparrot/codeparrot-clean
import { assert, describe, it } from 'vitest'; import { parseCss } from 'svelte/compiler'; describe('parseCss', () => { it('parses a simple rule', () => { const ast = parseCss('div { color: red; }'); assert.equal(ast.type, 'StyleSheetFile'); assert.equal(ast.children.length, 1); assert.equal(ast.children[0].t...
typescript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/css-parse.test.ts
# 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 use ...
unknown
codeparrot/codeparrot-clean
"""these are live tests - you need to have the env vars AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY set and you will need to have (at this time) an EC2 instance, running or stopped, in the us-east-1 region TODO: setup a mock server (e.g. http://www.mbtest.org/ or http://www.mock-server.com/) as an alterna...
unknown
codeparrot/codeparrot-clean
""" This module is for inspecting OGR data sources and generating either models for GeoDjango and/or mapping dictionaries for use with the `LayerMapping` utility. """ from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal.field import ( OFTDate, OFTDateTime, OFTInteger, OFTInteger6...
python
github
https://github.com/django/django
django/contrib/gis/utils/ogrinspect.py
#!/usr/bin/env python import os import Queue import sys import traceback import time sys.path += ['plugins'] # so 'import hook' works without duplication sys.path += ['lib'] os.chdir(sys.path[0] or '.') # do stuff relative to the install directory class Bot(object): def __init__(self): self.conns = {} ...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 from __future__ import absolute_import, division, print_function from struct import Struct from .exceptions import UnexpectedEndOfFileError BIG_ENDIAN = '>' LITTLE_ENDIAN = '<' class StreamReader(object): """ Wraps a file-like object to provide access to structured data from a binary ...
unknown
codeparrot/codeparrot-clean
function Test() { const obj = { 21: 'dimaMachina', }; // Destructuring assignment const {21: myVar} = obj; return ( <div> {obj[21]} {myVar} </div> ); } export const FIXTURE_ENTRYPOINT = { fn: Test, params: [{}], };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/numeric-literal-as-object-property-key.js
# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2017, 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 import itertools import oper...
unknown
codeparrot/codeparrot-clean
import time from fabric.api import run, execute, env environment = "production" env.use_ssh_config = True env.hosts = ["shaaaaa"] branch = "master" repo = "git@github.com:konklone/shaaaaaaaaaaaaa.git" username = "shaaaaa" home = "/home/%s/%s" % (username, username) shared_path = "%s/shared" % home versions_path = "...
unknown
codeparrot/codeparrot-clean
#### Note: this error code is no longer emitted by the compiler. You can't import a type or module when the name of the item being imported is the same as another type or submodule defined in the module. An example of this error: ```compile_fail use foo::Bar; // error type Bar = u32; mod foo { pub mod Bar { } ...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0256.md
/* Copyright 2023 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/profiler/convert/trace_viewer/trace_events_to_json.h
/* * Copyright (C) 2009 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
android/guava-testlib/src/com/google/common/collect/testing/google/MapGenerators.java
# 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
# 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
""" Higher order functions built on the BlockStructureManager to interact with a django cache. """ from django.core.cache import cache from xmodule.modulestore.django import modulestore from .manager import BlockStructureManager def get_course_in_cache(course_key): """ A higher order function implemented on t...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- from __future__ import division try: import cPickle as pickle except ImportError: import pickle import sys import random import os import re import datetime # TODO memorization previous tweet corpus class MarkovChain(object): def __init__(self, db_file_path=None): self.db...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright 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 law or a...
unknown
codeparrot/codeparrot-clean
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. #ifndef OPENCV_CORE_FP_CONTROL_UTILS_PRIVATE_HPP #define OPENCV_CORE_FP_CONTROL_UTILS_PRIVATE_HPP #include "fp_control_utils...
unknown
github
https://github.com/opencv/opencv
modules/core/include/opencv2/core/utils/fp_control.private.hpp
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2013 Acysos S.L. (http://acysos.com) # Ignacio Ibeas Izquierdo <ignacio@acysos.com> # # This program is free software: you ca...
unknown
codeparrot/codeparrot-clean
name: Update Homebrew Tap description: Updates the Homebrew Tap for the Spring Boot CLI inputs: spring-boot-version: description: 'The version to publish' required: true token: description: 'Token to use for GitHub authentication' required: true runs: using: composite steps: - name: Check Ou...
unknown
github
https://github.com/spring-projects/spring-boot
.github/actions/update-homebrew-tap/action.yml
# Copyright 2011 Openstack, 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...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/test/java/org/apache/kafka/common/requests/AddPartitionsToTxnRequestTest.java
/* * Copyright 2010-2025 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.impl.base.test.cases.symbols import com.intellij.psi.PsiElement imp...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-impl-base/testFixtures/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/symbols/AbstractSymbolTest.kt
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2014 OpenERP S.A. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
unknown
codeparrot/codeparrot-clean
#import StellarMass import XrayLuminosity import numpy as n from scipy.stats import norm from scipy.integrate import quad from scipy.interpolate import interp1d import matplotlib matplotlib.use('pdf') import matplotlib.pyplot as p import glob import astropy.io.fits as fits import os import time import numpy as n impo...
unknown
codeparrot/codeparrot-clean
""" Tests of the XBlock-family functionality mixins """ from unittest import TestCase from xblock.fields import List, Scope, Integer from xblock.mixins import ScopedStorageMixin, HierarchyMixin, IndexInfoMixin, ViewsMixin class AttrAssertionMixin(TestCase): """ A mixin to add attribute assertion methods to T...
unknown
codeparrot/codeparrot-clean
use once_cell::sync::Lazy; use turbopack_trace_utils::tracing_presets::{ TRACING_OVERVIEW_TARGETS, TRACING_TURBO_TASKS_TARGETS, TRACING_TURBOPACK_TARGETS, }; pub static TRACING_NEXT_OVERVIEW_TARGETS: Lazy<Vec<&str>> = Lazy::new(|| { [ &TRACING_OVERVIEW_TARGETS[..], &[ "next_napi_bin...
rust
github
https://github.com/vercel/next.js
crates/next-core/src/tracing_presets.rs
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.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, or # (at your option) any lat...
unknown
codeparrot/codeparrot-clean
//===--- ThreadsafeFS.cpp -------------------------------------------------===// // // 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 // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/support/ThreadsafeFS.cpp
from __future__ import division, absolute_import, print_function __all__ = ['less', 'cosh', 'arcsinh', 'add', 'ceil', 'arctan2', 'floor_divide', 'fmod', 'hypot', 'logical_and', 'power', 'sinh', 'remainder', 'cos', 'equal', 'arccos', 'less_equal', 'divide', 'bitwise_or', 'bitwise_and', ...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2010 (ita) """ This tool modifies the task signature scheme to store and obtain information about the task execution (why it must run, etc):: def configure(conf): conf.load('why') After adding the tool, a full rebuild is necessary: waf clean build --zones=ta...
unknown
codeparrot/codeparrot-clean
from __future__ import annotations from io import ( BytesIO, StringIO, ) import os import numpy as np import pytest import pandas.util._test_decorators as td from pandas import ( NA, DataFrame, Index, ) import pandas._testing as tm from pandas.io.common import get_handle from pandas.io.xml impo...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/io/xml/test_to_xml.py
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest import erpnext from frappe.utils.make_random import get_random from frappe.utils import nowdate, add_days, add_years, getdate, add_months from er...
unknown
codeparrot/codeparrot-clean
import fsui from launcher.i18n import gettext from launcher.setup.setupwelcomepage import SetupWelcomePage from launcher.ui.skin import LauncherTheme from launcher.ui.widgets import PrevButton, NextButton, CloseButton class SetupWizardDialog(fsui.Window): @classmethod def open(cls, parent=None): return...
unknown
codeparrot/codeparrot-clean
from langchain_core.documents import BaseDocumentTransformer, Document __all__ = ["BaseDocumentTransformer", "Document"]
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/schema/document.py
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing_extensions import Literal from ...._models import BaseModel __all__ = ["ResponseFunctionCallArgumentsDoneEvent"] class ResponseFunctionCallArgumentsDoneEvent(BaseModel): arguments: str """The final arguments as...
python
github
https://github.com/openai/openai-python
src/openai/types/beta/realtime/response_function_call_arguments_done_event.py
# Copyright 2013 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 module to add gyp support to cr.""" import cr import os GYP_DEFINE_PREFIX = 'GYP_DEF_' class GypPrepareOut(cr.PrepareOut): """A prepare action that...
unknown
codeparrot/codeparrot-clean
import pysal import os.path import scipy.io as sio import pysal.core.FileIO as FileIO from pysal.weights import W from pysal.weights.util import full, full2W from warnings import warn __author__ = "Myunghwa Hwang <mhwang4@gmail.com>" __all__ = ["MatIO"] class MatIO(FileIO.FileIO): """ Opens, reads, and writes...
unknown
codeparrot/codeparrot-clean
// @enableInferEventHandlers import {useRef} from 'react'; // Simulates react-hook-form's handleSubmit or similar event handler wrappers function handleSubmit<T>(callback: (data: T) => void) { return (event: any) => { event.preventDefault(); callback({} as T); }; } function Component() { const ref = use...
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-ref-access-in-event-handler-wrapper.tsx
#if defined(__VSX__) #if defined(__PPC64__) && defined(__LITTLE_ENDIAN__) #include <altivec.h> #else #error "OpenCV only supports little-endian mode" #endif #else #error "VSX is not supported" #endif int main() { __vector float testF = vec_splats(0.f); testF = vec_madd(testF, te...
cpp
github
https://github.com/opencv/opencv
cmake/checks/cpu_vsx.cpp
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/requests/ConsumerGroupDescribeResponse.java
#!/usr/bin/env python # # Converts the output of ans2csv.sh to a csv with a global ranking. # # The global ranking is computing according to the Minimum Feedback # Arc Set solver described by Lopez (2012). # # import sys import csv import os from collections import namedtuple,defaultdict,Counter from argparse import Ar...
unknown
codeparrot/codeparrot-clean
Contributing to Elasticsearch ============================= Elasticsearch is a free and open project and we love to receive contributions from our community — you! There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or writin...
unknown
github
https://github.com/elastic/elasticsearch
CONTRIBUTING.md
# Copyright (c) 2018 Workonline Communications (Pty) Ltd. All rights reserved. # # The contents of this file are licensed under the Apache License version 2.0 # (the "License"); you may not use this file except in compliance with the # License. # # Unless required by applicable law or agreed to in writing, software # d...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/test/java/org/apache/kafka/clients/consumer/internals/TimedRequestStateTest.java
#!/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. ''' Checks a policy_templates.json file for conformity to its syntax specification. ''' import json import optparse import os impo...
unknown
codeparrot/codeparrot-clean
/* Auto-generated by generate-wrappers.py script. Do not modify */ #if defined(__arm__) || defined(__aarch64__) #include <q8gemm/4x8c2-xzp-neon.c> #endif /* defined(__arm__) || defined(__aarch64__) */
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/q8gemm/4x8c2-xzp-neon.c
# Licensed under a MIT licence - see file `license` import copy from warnings import warn import numpy as np from scipy.ndimage import binary_dilation from . import regions from . import findbase from . import optregion from . import fit as fitpsf __all__ = ['RegionError', 'PSFIndexError', 'BasePSFFitter'...
unknown
codeparrot/codeparrot-clean
""" =========================================== Sparse coding with a precomputed dictionary =========================================== Transform a signal as a sparse combination of Ricker wavelets. This example visually compares different sparse coding methods using the :class:`sklearn.decomposition.SparseCoder` esti...
unknown
codeparrot/codeparrot-clean
#AATC crypto module import codecs,recvall,ast,os,AATC_Config,AATC_CryptoBeta from Crypto.Cipher import AES,PKCS1_OAEP from Crypto.PublicKey import RSA class Crypter: """ A class to encrypt and decrypt a connection with AES. Takes a connection object and mode and sets up a secret key for both participants. ...
unknown
codeparrot/codeparrot-clean
import string import random import time from fabric import state from fabric.api import run, sudo, cd, prompt, task, settings from fabric.contrib import files from fabric.colors import green, red from fabric.context_managers import hide from fabric.tasks import Task from fabric.task_utils import crawl from fabtools i...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2009, 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 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-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java
/** @import { AST } from '#compiler' */ /** @import { Context } from '../types' */ import * as e from '../../../errors.js'; import { mark_subtree_dynamic } from './shared/fragment.js'; const valid = ['onerror', 'failed', 'pending']; /** * @param {AST.SvelteBoundary} node * @param {Context} context */ export functi...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/compiler/phases/2-analyze/visitors/SvelteBoundary.js
from Components.Console import Console from os import listdir as os_listdir, path as os_path from re import compile as re_compile from enigma import eEnv class Keyboard: def __init__(self): self.keyboardmaps = [] self.readKeyboardMapFiles() def readKeyboardMapFiles(self): for keymapfile in os_listdir(eEnv.res...
unknown
codeparrot/codeparrot-clean
'use strict'; const common = require('../common.js'); const { EventEmitter } = require('events'); const bench = common.createBenchmark(main, { newListener: [0, 1], removeListener: [0, 1], n: [1e6], }); function main({ newListener, removeListener, n }) { const ee = new EventEmitter(); const listeners = []; ...
javascript
github
https://github.com/nodejs/node
benchmark/events/ee-add-remove.js
#### Note: this error code is no longer emitted by the compiler. The type does not fulfill the required lifetime. Erroneous code example: ```compile_fail use std::sync::Mutex; struct MyString<'a> { data: &'a str, } fn i_want_static_closure<F>(a: F) where F: Fn() + 'static {} fn print_string<'a>(s: Mutex<M...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0477.md
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/test/java/org/apache/kafka/common/requests/GetTelemetrySubscriptionsResponseTest.java
# coding: utf-8 """ Harbor API These APIs provide services for manipulating Harbor project. OpenAPI spec version: 1.4.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys sys.path.append(os.environ["SWAGGER_CLIENT_PATH"]) ...
unknown
codeparrot/codeparrot-clean
import logging from celery import task from celery_utils.persist_on_failure import LoggedPersistOnFailureTask from django.conf import settings from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore from openedx.core.djangoapps.content.course_overviews.models import CourseOvervi...
unknown
codeparrot/codeparrot-clean
//! [`TryIntoHeaderPair`] trait and implementations. use super::{ Header, HeaderName, HeaderValue, InvalidHeaderName, InvalidHeaderValue, TryIntoHeaderValue, }; use crate::error::HttpError; /// An interface for types that can be converted into a [`HeaderName`] + [`HeaderValue`] pair for /// insertion into a [`Hea...
rust
github
https://github.com/actix/actix-web
actix-http/src/header/into_pair.rs
import numpy as np def readProbeFile(filename): with open (filename, 'rb') as csvfile: data=np.loadtxt(csvfile, delimiter=",",skiprows=1) time=data[:,0] data = data[:,1:] csvfile.seek(0) header = csvfile.readline() header = header.replace(","," ") header = he...
unknown
codeparrot/codeparrot-clean
{ "INCRBYFLOAT": { "summary": "Increment the floating point value of a key by a number. Uses 0 as initial value if the key doesn't exist.", "complexity": "O(1)", "group": "string", "since": "2.6.0", "arity": 3, "function": "incrbyfloatCommand", "command_flags"...
json
github
https://github.com/redis/redis
src/commands/incrbyfloat.json
# -*- python -*- # # File : wireshark_be.py # # Author : Frank Singleton (frank.singleton@ericsson.com) # # Copyright (C) 2001 Frank Singleton, Ericsson Inc. # # This file is a backend to "omniidl", used to generate "Wireshark" # dissectors from IDL descriptions. The output language generated # is "...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("orgs", "0014_auto_20150722_1419"), ("contacts", "0001_initial")] operations = [ migrations.Crea...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2010 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
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will b...
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-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationReactiveSupport.java
"""Define tests for the OpenUV config flow.""" from regenmaschine.errors import RainMachineError from homeassistant import data_entry_flow from homeassistant.components.rainmachine import CONF_ZONE_RUN_TIME, DOMAIN, config_flow from homeassistant.config_entries import SOURCE_USER from homeassistant.const import CONF_I...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Foundation\Console; use Illuminate\Console\GeneratorCommand; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use function Laravel\Pr...
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/Console/ExceptionMakeCommand.php
#ifndef BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED #define BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED // Copyright (c) 2003 David Abrahams // Copyright (c) 2003 Peter Dimov // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #include <boost/config/header_deprecated.hpp...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/detail/quick_allocator.hpp
""" Python Character Mapping Codec generated from 'GREEK.TXT' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,error...
unknown
codeparrot/codeparrot-clean
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT //! Identifier for plugins. use serde::{Deserialize, Deserializer, Serialize, Serializer}; use std::num::NonZeroU8; use thiserror::Error; const IDENTIFIER_SEPARATOR: u8 = b':';...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri-utils/src/acl/identifier.rs
<!-- 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 agree...
unknown
github
https://github.com/huggingface/transformers
docs/source/zh/add_new_pipeline.md
import numpy as np import astropy.units as u import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.collections import LineCollection, PolyCollection from mpl_toolkits.mplot3d.art3d import Line3DCollection, Poly3DCollection from . import common from . import callbacks def _map_none(v...
unknown
codeparrot/codeparrot-clean
/*************************************************************************************************** * Copyright (c) 2017 - 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/cuda/cutlass_extensions/gemm/warp/mma_tensorop_compute_B_with_f16.h
//// [tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts] //// //// [VariableDeclaration1_es6.ts] const //// [VariableDeclaration1_es6.js] "use strict"; const ;
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/VariableDeclaration1_es6.js
import hotshot import hotshot.log import os import pprint import unittest from test import test_support from hotshot.log import ENTER, EXIT, LINE def shortfilename(fn): # We use a really shortened filename since an exact match is made, # and the source may be either a Python source file or a # pre-compil...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2011, CloudCaptive # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import time import logging from boto3.session import Session from helpers.sit_helper import SITHelper from helpers.log import Log class CFHelper(object): FAILED_STATES = ['CREATE_FAILED', 'DELETE_FAILED', 'DELETE_COMPLETE'] COMPLETE_STATES = ['CREATE_COMPLETE', 'UPDATE_COMPLETE'] ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "test_helper" require_relative "common" class InlineAdapterTest < ActionCable::TestCase include CommonSubscriptionAdapterTest def setup super @tx_adapter.shutdown @tx_adapter = @rx_adapter end def cable_config { adapter: "inline" } end end
ruby
github
https://github.com/rails/rails
actioncable/test/subscription_adapter/inline_test.rb
import unittest from scrapy.http import Request from scrapy.spider import Spider from scrapy.utils.reqser import request_to_dict, request_from_dict class RequestSerializationTest(unittest.TestCase): def setUp(self): self.spider = TestSpider() def test_basic(self): r = Request("http://www.exa...
unknown
codeparrot/codeparrot-clean
/* * PSA hashing layer on top of Mbed TLS software crypto */ /* * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ #ifndef PSA_CRYPTO_HASH_H #define PSA_CRYPTO_HASH_H #include <psa/crypto.h> /** Calculate the hash (digest) of a message using Mbed TLS routines. ...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/library/psa_crypto_hash.h
#!/usr/bin/env python # # This example introduces the concepts of user interaction with VTK. # First, a different interaction style (than the default) is defined. # Second, the interaction is started. # # import vtk # # Next we create an instance of vtkConeSource and set some of its # properties. The instance of vtk...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ''' Created on Jul 12, 2011 @author: rafik ''' from gnuradio import gr, gru, modulation_utils from gnuradio import usrp from gnuradio import eng_notation from gnuradio.eng_option import eng_option from optparse import OptionParser import random, time, struct, sys import binascii from grc_gnura...
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 ...
kotlin
github
https://github.com/spring-projects/spring-framework
framework-docs/src/main/kotlin/org/springframework/docs/web/webmvc/mvcservlet/mvclocaleresolverinterceptor/WebConfiguration.kt
#!/usr/bin/python # File created on 27 Jan 2012. from __future__ import division __author__ = "Kishori M Konwar" __copyright__ = "Copyright 2013, MetaPathways" __credits__ = ["r"] __version__ = "1.0" __maintainer__ = "Kishori M Konwar" __status__ = "Release" try: import os, re from os import makedirs, sys, ...
unknown
codeparrot/codeparrot-clean
import numpy import six import chainer from chainer import configuration from chainer import functions from chainer import initializers from chainer import link from chainer.utils import argument from chainer import variable class BatchNormalization(link.Link): """Batch normalization layer on outputs of linear o...
unknown
codeparrot/codeparrot-clean