code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
use language_tags::LanguageTag; use super::{common_header, QualityItem, CONTENT_LANGUAGE}; common_header! { /// `Content-Language` header, defined /// in [RFC 7231 §3.1.3.2](https://datatracker.ietf.org/doc/html/rfc7231#section-3.1.3.2) /// /// The `Content-Language` header field describes the natural...
rust
github
https://github.com/actix/actix-web
actix-web/src/http/header/content_language.rs
""" Does the following: 1. Generates and saves random secret keys for django and database access in env.example ansible/host_vars/{{cookiecutter.production_host_name}} A portion of this code was adopted from Django's standard crypto functions and utilities, specifically: https://github.com/django/django/blob/master...
unknown
codeparrot/codeparrot-clean
// @validateNoVoidUseMemo @loggerTestOnly function Component() { useMemo(() => { return []; }, []); return <div />; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/invalid-unused-usememo.js
from common_fixtures import * # NOQA TEST_HANDLER_PREFIX = 'test-handler-' @pytest.fixture(scope='module', autouse=True) def tear_down(request, admin_user_client): request.addfinalizer(lambda: _disable_test_handlers(admin_user_client)) def _get_extension(admin_client, extension_point_name, impl_name, ...
unknown
codeparrot/codeparrot-clean
""" Django settings for ssms project. Generated by 'django-admin startproject' using Django 1.10.5. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os #...
unknown
codeparrot/codeparrot-clean
"""Tests songpal setup.""" from homeassistant.components import songpal from homeassistant.setup import async_setup_component from . import ( CONF_DATA, _create_mocked_device, _patch_config_flow_device, _patch_media_player_device, ) from tests.async_mock import patch from tests.common import MockConfi...
unknown
codeparrot/codeparrot-clean
""" A few bits of helper functions for comment views. """ import textwrap from django.http import HttpResponseRedirect from django.shortcuts import render_to_response, resolve_url from django.template import RequestContext from django.core.exceptions import ObjectDoesNotExist from django.contrib import comments from ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true #-- # Copyright (c) David Heinemeier Hansson # # 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...
ruby
github
https://github.com/rails/rails
activerecord/lib/active_record.rb
# -*- coding: us-ascii -*- # frozen_string_literal: false # $RoughId: extconf.rb,v 1.3 2001/08/14 19:54:51 knu Exp $ # $Id$ require "mkmf" require File.expand_path("../../digest_conf", __FILE__) if try_static_assert("RUBY_API_VERSION_MAJOR < 3", "ruby/version.h") $defs << "-DNDEBUG" end $objs = [ "rmd160init.#{$OB...
ruby
github
https://github.com/ruby/ruby
ext/digest/rmd160/extconf.rb
from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive import time import csv timeID='1dOSC8bndzenu6MRX5jmmnvbASc57E0FH7bVZgGoxaOc' #the is is the fileID for the google sheet 'time.csv' for i in range(10): #get the curret time date_time=time.asctime() date_time_split=date_time.split(' ') #g...
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_UTILS_PLUGIN_LOADER_HPP #define OPENCV_UTILS_PLUGIN_LOADER_HPP #include "opencv2/core/utils/filesystem.hpp" #...
unknown
github
https://github.com/opencv/opencv
modules/core/include/opencv2/core/utils/plugin_loader.private.hpp
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Invenio-Records is a metadata storage module.""" import os from setuptools impor...
unknown
codeparrot/codeparrot-clean
global: extra_scrape_metrics: true scrape_configs: - job_name: prometheus static_configs: - targets: ['localhost:8080'] extra_scrape_metrics: false
unknown
github
https://github.com/prometheus/prometheus
config/testdata/local_disable_extra_scrape_metrics.good.yml
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
import os.path from test import support from test.support import load_package_tests # Creating a virtual environment and building C extensions is slow support.requires('cpu') # Load all tests in package def load_tests(*args): return load_package_tests(os.path.dirname(__file__), *args)
python
github
https://github.com/python/cpython
Lib/test/test_peg_generator/__init__.py
import os class GermanCreditData2PrologConverter(object): def __init__(self): self._rules = [] self._const_cntr = 1 self._const_pattern = 'const%03i' self._attr_comments = { 'checkingAccountStatus1': 'less than 0 DM per salary assignments for at least 1 ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package rpcapi import ( "bytes" "context" "errors" "fmt" "io" "log" "net/http" "net/http/httptest" "net/url" "testing" plugin "github.com/hashicorp/go-plugin" svchost "github.com/hashicorp/terraform-svchost" "github.com/hashicorp/terr...
go
github
https://github.com/hashicorp/terraform
internal/rpcapi/stacks_grpc_client_test.go
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.utilities import SQLDatabase from langchain_community.utilities.sql_database import truncate_word # Create a way to dynamically look up deprecated imports. # Used to consolidate...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/utilities/sql_database.py
""" This module defines the Link object used in Link extractors. For actual link extractors implementation see scrapy.linkextractors, or its documentation in: docs/topics/link-extractors.rst """ import six class Link(object): """Link objects represent an extracted link by the LinkExtractor.""" __slots__ = [...
unknown
codeparrot/codeparrot-clean
#-*- coding: iso-8859-1 -*- # pysqlite2/test/hooks.py: tests for various SQLite-specific hooks # # Copyright (C) 2006-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for...
unknown
codeparrot/codeparrot-clean
""" Feed Exports extension See documentation in docs/topics/feed-exports.rst """ import sys, os, posixpath from tempfile import TemporaryFile from datetime import datetime from six.moves.urllib.parse import urlparse from ftplib import FTP from zope.interface import Interface, implements from twisted.internet import ...
unknown
codeparrot/codeparrot-clean
# Manage internal options on messages/enums/fields/enum values. from udpa.annotations import versioning_pb2 def AddHideOption(options): """Mark message/enum/field/enum value as hidden. Hidden messages are ignored when generating output. Args: options: MessageOptions/EnumOptions/FieldOptions/EnumValueOptio...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 from __future__ import unicode_literals import json import re import itertools from .common import InfoExtractor from .subtitles import SubtitlesInfoExtractor from ..utils import ( compat_HTTPError, compat_urllib_parse, compat_urllib_request, clean_html, get_element_by_attribute,...
unknown
codeparrot/codeparrot-clean
//! A test for the logic that updates the state in a `ResultsCursor` during seek. use std::marker::PhantomData; use rustc_index::IndexVec; use rustc_middle::ty; use rustc_span::DUMMY_SP; use super::*; /// Creates a `mir::Body` with a few disconnected basic blocks. /// /// This is the `Body` that will be used by the...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_mir_dataflow/src/framework/tests.rs
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/gpio/renesas,rcar-gpio.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Renesas R-Car General-Purpose Input/Output Ports (GPIO) maintainers: - Geert Uytterhoeven <geert+renesas@glider.be> p...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml
import re from functools import partial from livestreamer.plugin import Plugin from livestreamer.plugin.api import http, validate from livestreamer.stream import HLSStream, HDSStream STREAM_INFO_URL = "http://live.daserste.de/{0}/livestream.xml" SWF_URL = "http://live.daserste.de/lib/br-player/swf/main.swf" STREAMIN...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
import csv import logging import argparse import os from datetime import timedelta import pickle import math import itertools import pandas import numpy import cointeg _ETFS = ( 'SCHF', 'AMJ', 'FEZ', 'EMB', 'EWC', 'UUP', 'EWY', 'IWF', 'HEDJ', 'VOO', 'BND', 'VEU', 'ITB', 'IWD', 'DBC', 'VTI', 'EWG', 'USMV', '...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. import pytest import re from tests.common.impala_test_suite import ImpalaTestSuite from tests.common.test_vector import TestDimension class TestRowsAvailability(ImpalaTestSuite): """Tests that the 'Rows available' timeline event is marke...
unknown
codeparrot/codeparrot-clean
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Dakota(CMakePackage): """The Dakota toolkit provides a flexible, extensible interface betwe...
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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/context/openGroups/Context.ts
#!/usr/bin/env python """fanotify: wrapper aroudn the fanotify family of syscalls for watching for file modifcation""" from __future__ import print_function from cffi import FFI as _FFI from os import O_RDONLY, O_WRONLY, O_RDWR from os import fdopen import errno as _errno from warnings import warn warn(PendingDeprec...
unknown
codeparrot/codeparrot-clean
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/common_runtime/dma_helper.h
# coding: utf-8 """ Copyright 2015 SmartBear Software 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.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compatible ## Basic tests @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=50, uniqu...
unknown
codeparrot/codeparrot-clean
/* * 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 agreed ...
java
github
https://github.com/google/guava
guava/src/com/google/common/util/concurrent/Service.java
#!/usr/bin/python # Test Bug 500198 import mock import sys class FlagsTest(mock.TestCase): """Simulate /proc/cmdline parameters parsing (#500198)""" def setUp(self): self.setupModules(["_isys", "block", "ConfigParser"]) self.fs = mock.DiskIO() import pyanaconda.flags self....
unknown
codeparrot/codeparrot-clean
from collections import deque from enum import Enum from hwt.hdl.constants import READ, WRITE, NOP from hwt.hdl.types.bits import Bits from hwt.interfaces.std import D, Signal, VectSignal from hwt.simulator.agentBase import SyncAgentBase from hwt.synthesizer.interface import Interface from hwt.synthesizer.param import...
unknown
codeparrot/codeparrot-clean
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void; declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void; declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPro...
typescript
github
https://github.com/microsoft/TypeScript
src/lib/decorators.legacy.d.ts
# 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
# 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. """Quits Chrome. This script sends a WM_CLOSE message to each window of Chrome and waits until the process terminates. """ import optparse import os import...
unknown
codeparrot/codeparrot-clean
@import url('https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined'); :host { display: flex; justify-content: center; font-family: var(--inter-font); --primary: var(--hot-pink); } .material-autocomplete { display: flex; position: relative; align-items: center; } .material-symbols-outlined ...
css
github
https://github.com/angular/angular
adev/src/content/examples/aria/autocomplete/src/basic/material/app/app.css
import sublime from .global_vars import * class Location: """Object containing line and offset (one-based) of file location Location is a server protocol. Both line and offset are 1-based. """ def __init__(self, line, offset): self.line = line self.offset = offset def to_dict(se...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the fol...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package plugin import ( "context" "errors" "testing" "github.com/hashicorp/go-hclog" "github.com/hashicorp/vault/sdk/helper/consts" "github.com/hashicorp/vault/sdk/helper/logging" "github.com/hashicorp/vault/sdk/helper/pluginutil" "github...
go
github
https://github.com/hashicorp/vault
builtin/plugin/backend_lazyLoad_test.go
__author__ = 'Tom Schaul, tom@idsia.ch' from pybrain.utilities import iterCombinations, Named from pybrain.structure.moduleslice import ModuleSlice from functools import reduce class ModuleMesh(Named): """ An multi-dimensional array of modules, accessible by their coordinates. All modules need to have the sam...
unknown
codeparrot/codeparrot-clean
r"""UUID objects (universally unique identifiers) according to RFC 4122. This module provides immutable UUID objects (class UUID) and the functions uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5 UUIDs as specified in RFC 4122. If all you want is a unique ID, you should probably call uuid1() ...
unknown
codeparrot/codeparrot-clean
<!DOCTYPE html> <html lang="en"> <head> <title>BoolEncoding Enumeration Reference</title> <link rel="stylesheet" type="text/css" href="../../css/jazzy.css" /> <link rel="stylesheet" type="text/css" href="../../css/highlight.css" /> <meta charset="utf-8"> <script src="../../js/jquery.min.js" defer>...
html
github
https://github.com/Alamofire/Alamofire
docs/Structs/URLEncoding/BoolEncoding.html
""" Tests of various instructor dashboard features that include lists of students """ from django.conf import settings from django.test.client import RequestFactory from django.test.utils import override_settings from markupsafe import escape from xmodule.modulestore.tests.django_utils import TEST_DATA_MOCK_MODULESTO...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import pygtk import gtk import dill import pango import os import subprocess import time pygtk.require('2.0') from os.path import expanduser from lib.Project import Project from pipeline_editor import PipelineEditor from lib.Module import Module from dialog import Dialog from util.library import...
unknown
codeparrot/codeparrot-clean
use std::{ net::SocketAddr, rc::Rc, time::{Duration, Instant}, }; use bytes::BytesMut; use crate::{date::DateService, KeepAlive}; /// A builder for creating a [`ServiceConfig`] #[derive(Default, Debug)] pub struct ServiceConfigBuilder { inner: Inner, } impl ServiceConfigBuilder { /// Creates a n...
rust
github
https://github.com/actix/actix-web
actix-http/src/config.rs
import collections import contextlib import functools import json import logging import os import platform import re import shutil import sys import tempfile import time import concurrent.futures import jsonschema import pystache import six from dcos import constants from dcos.errors import DCOSException def get_logg...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 OpenStack Foundation # 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 requ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Make sure that the egfrd system is added to your PYTHONPATH # This means, in bash for example: # $ export PYTHONPATH=$HOME/egfrd # # python plot.py irr.-2.out 0.000000125 irr.-1.out 0.00000125 irr.0.out 0.0000125 irr.1.out 0.000125 irr.2.out 0.00125 irr.3.out 0.0125 # irr.-3.out 0.0000000125...
unknown
codeparrot/codeparrot-clean
from enum import Enum from PyQt5.QtWidgets import QMenu, QAction, QApplication from model.game import GameState import logging logger = logging.getLogger(__name__) class ChatterMenuItems(Enum): SELECT_AVATAR = "Select avatar" SEND_ORCS = "Send the Orcs" CLOSE_GAME = "Close Game" KICK_PLAYER = "Close ...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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
name: Release next-rspack bindings on: workflow_dispatch: inputs: dry-run: description: 'Run in dry-run mode (no actual publishing)' required: false default: false type: boolean npm-name: description: 'NPM package name to publish' required: false ...
unknown
github
https://github.com/vercel/next.js
.github/workflows/release-next-rspack.yml
# # 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...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/migrations/versions/0094_3_2_0_remove_team_id.py
/* Generated from finnish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */ #include "stem_UTF_8_finnish.h" #include <stddef.h> #include "snowball_runtime.h" struct SN_local { struct SN_env z; int i_p2; int i_p1; unsigned char b_ending_removed; symbol * s_x; }; typedef struct SN_local SN_loc...
c
github
https://github.com/postgres/postgres
src/backend/snowball/libstemmer/stem_UTF_8_finnish.c
#include "git-compat-util.h" #include "hash.h" #include "oidmap.h" static int oidmap_neq(const void *hashmap_cmp_fn_data UNUSED, const struct hashmap_entry *e1, const struct hashmap_entry *e2, const void *keydata) { const struct oidmap_entry *a, *b; a = container_of(e1, const struct oidmap_e...
c
github
https://github.com/git/git
oidmap.c
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'FolderPermission.can_edit_new' db.add_column('filer_folderpermission', 'can_edit_new', ...
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-aspects/src/test/java/org/springframework/cache/config/TestEntity.java
from django.contrib.syndication import views from django.core.exceptions import ObjectDoesNotExist import warnings # This is part of the deprecated API from django.contrib.syndication.views import FeedDoesNotExist, add_domain class Feed(views.Feed): """Provided for backwards compatibility.""" def __init__(sel...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import warnings warnings.filterwarnings("ignore", "the sets module is deprecated", DeprecationWarning, "test\.test_sets") import unittest, operator, copy, pickle, random from sets import Set, ImmutableSet from test import test_support empty_set = Set() #================...
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
/* * This is adapted from FreeBSD's src/bin/mkdir/mkdir.c, which bears * the following copyright notice: * * Copyright (c) 1983, 1992, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted pr...
c
github
https://github.com/postgres/postgres
src/port/pgmkdirp.c
# # 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
from rest_framework import serializers from models import Condominio, Edificio, Departamento, Servicio, LecturaServicio from models import AdministradorEdificio, Conserje class ConserjeSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Conserje class AdministradorEdificioSerializer(s...
unknown
codeparrot/codeparrot-clean
""" Inception Cloud ARP module """ from pox.core import core from pox.lib.packet.arp import arp from pox.lib.packet.ethernet import ethernet from pox.lib.util import dpid_to_str import pox.openflow.libopenflow_01 as of from ext import priority LOGGER = core.getLogger() class InceptionArp(object): """ Incepti...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 import numpy as np from ._draw import _coords_inside_image def _ellipse_in_shape(shape, center, radiuses): """Generate coordinates of points within ellipse bounded by shape.""" y, x = np.ogrid[0:float(shape[0]), 0:float(shape[1])] cy, cx = center ry, rx = radiuses distances = ((y - ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 wit...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 //go:build !enterprise package vault import "github.com/hashicorp/vault/sdk/framework" // entAddAuthTuneRequestFields is a stub implementation for CE func entAddAuthTuneRequestFields(fields map[string]*framework.FieldSchema) { // No additional f...
go
github
https://github.com/hashicorp/vault
vault/logical_system_fields_stubs_oss.go
# 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
/* Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
cmd/kubeadm/app/cmd/phases/init/main_test.go
# Owner(s): ["module: fx"] import torch from torch.fx import symbolic_trace from torch.fx.experimental.proxy_tensor import make_fx from torch.testing._internal.common_utils import run_tests, TestCase class TestFxGraphPrint(TestCase): """Tests for GraphModule.print_readable() with additional_meta.""" def test...
python
github
https://github.com/pytorch/pytorch
test/test_fx_graph_print.py
## Input ```javascript // @loggerTestOnly @validateNoSetStateInEffects @outputMode:"lint" import {useEffect, useState} from 'react'; function Component() { const [state, setState] = useState(0); useEffect(() => { setState(s => s + 1); }); return state; } ``` ## Code ```javascript // @loggerTestOnly @va...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/invalid-setState-in-useEffect.expect.md
# -*- coding: utf-8 -*- """A simple number and datetime addition JSON API. Run the app: $ python examples/flaskrestful_example.py Try the following with httpie (a cURL-like utility, http://httpie.org): $ pip install httpie $ http GET :5001/ $ http GET :5001/ name==Ada $ http POST :5001/add x=40 y...
unknown
codeparrot/codeparrot-clean
""" A buffered iterator for big arrays. This module solves the problem of iterating over a big file-based array without having to read it into memory. The `Arrayterator` class wraps an array object, and when iterated it will return sub-arrays with at most a user-specified number of elements. """ from __future__ impor...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/types/primitives/number/assignFromNumberInterface2.ts] //// //// [assignFromNumberInterface2.ts] interface Number { doStuff(): string; } interface NotNumber { toString(radix?: number): string; toFixed(fractionDigits?: number): string; toExponential(fractionDigits?: number...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/assignFromNumberInterface2.js
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/VIntWritable.java
# Copyright (C) 2014 SEE AUTHORS FILE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distr...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, 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) an...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ''' Provides feeds interface to FAS ''' # # Copyright © 2008 Ricky Zhou # Copyright © 2008 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. Thi...
unknown
codeparrot/codeparrot-clean
''' Copyright 2015 University of Auckland 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...
unknown
codeparrot/codeparrot-clean
/* Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/kubelet/status/status_manager.go
import hail as hl from hail.linalg import BlockMatrix from hail.typecheck import typecheck, nullable, sequenceof, oneof from hail.expr.expressions import expr_float64, expr_numeric, expr_locus from hail.utils import new_temp_file, wrap_to_list @typecheck(entry_expr=expr_float64, locus_expr=expr_locus(), ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
unknown
codeparrot/codeparrot-clean
""" koan = kickstart over a network a tool for network provisioning of virtualization (xen,kvm/qemu,vmware) and network re-provisioning of existing Linux systems. used with 'cobbler'. see manpage for usage. Copyright 2006-2008 Red Hat, Inc. Michael DeHaan <mdehaan@redhat.com> This program is free software; you can r...
unknown
codeparrot/codeparrot-clean
# -*- coding: UTF-8 -*- from flask import request, jsonify, current_app, send_file import io from . import api import json import requests import redis import hashlib import random """ 获取新闻 新增redis 内存数据库支持 """ @api.route('/news/<int:NewsId>', methods=['GET']) def getText(NewsId): REDIS_NEWS_TIME = current_app.con...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (C) 2012 Tianyang Li # tmy1018@gmail.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 Software Foundation, either version 3 of the License, or # (at your option) any lat...
unknown
codeparrot/codeparrot-clean
bugfixes: - "copy - when a single-file local directory was specified as the source, ``changed`` used to be ``false`` even when the source was actually copied. It now makes sure ``changed`` is ``true`` in this case. (https://github.com/ansible/ansible/issues/85833)"
unknown
github
https://github.com/ansible/ansible
changelogs/fragments/85834-fix-copy-in-single-file-directory.yml
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. # # SPDX-License-Identifier: curl # https://docs.github.com/code-security/dependabot/working-with-dependabot/dependabot-options-reference version: 2 updates: - package-ecosystem: 'github-actions' directory: '/' schedule: interval: 'monthly' ...
unknown
github
https://github.com/curl/curl
.github/dependabot.yml
# Copyright 2025 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/licenses/LICENSE-2.0 # # Unless required by applicab...
python
github
https://github.com/huggingface/transformers
src/transformers/models/blt/modular_blt.py
"""Support for Mikrotik routers as device tracker.""" import logging from homeassistant.components.device_tracker.config_entry import ScannerEntity from homeassistant.components.device_tracker.const import ( DOMAIN as DEVICE_TRACKER, SOURCE_TYPE_ROUTER, ) from homeassistant.core import callback from homeassist...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 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 by applicable law or a...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # 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.apac...
unknown
codeparrot/codeparrot-clean
# Copyright 2011-2014 Free Software Foundation, Inc. # # This 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 prog...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
unknown
codeparrot/codeparrot-clean
//===-- FileIndexTests.cpp ---------------------------*- 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 // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/unittests/FileIndexTests.cpp
from collections import OrderedDict from json.tests import PyTest, CTest class TestUnicode(object): def test_encoding1(self): encoder = self.json.JSONEncoder(encoding='utf-8') u = u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK CAPITAL LETTER OMEGA}' s = u.encode('utf-8') ju = encoder.encode...
unknown
codeparrot/codeparrot-clean