code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
//===--- ClassLayout.cpp - Layout of class instances ---------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LI...
cpp
github
https://github.com/apple/swift
lib/IRGen/ClassLayout.cpp
/* statement.h - definitions for the statement type * * Copyright (C) 2005-2010 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 any damages * arising from the use...
c
github
https://github.com/python/cpython
Modules/_sqlite/statement.h
<?php namespace Illuminate\Foundation\Console; use Illuminate\Console\Command; use Illuminate\Console\ConfirmableTrait; use Illuminate\Encryption\Encrypter; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'key:generate')] class KeyGenerateCommand extends Command { use ConfirmableTrait; ...
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/Console/KeyGenerateCommand.php
# 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
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Title: curl_url_cleanup Section: 3 Source: libcurl See-also: - CURLOPT_CURLU (3) - curl_url (3) - curl_url_dup (3) - curl_url_get (3) - curl_url_set (3) Protocol: - All Added-in: 7.62.0 --- # NAME curl_url_cleanup...
unknown
github
https://github.com/curl/curl
docs/libcurl/curl_url_cleanup.md
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015, 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in...
unknown
codeparrot/codeparrot-clean
""" HAVE NOT TESTED FOR SPEED (but second one seems better) Decent link here about ip spoofing - http://esd.io/blog/flask-apps-heroku-real-ip-spoofing.html I think it has already been incorporated and my code works on his committed change. """ __author__ = 'donal' __project__ = 'ribcage' from json import loads from u...
unknown
codeparrot/codeparrot-clean
"""Test the Kuler Sky lights.""" from unittest.mock import MagicMock, patch import pykulersky import pytest from homeassistant import setup from homeassistant.components.kulersky.light import DOMAIN from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_HS_COLOR, ATTR_RGB_COLOR, ATTR_WHITE...
unknown
codeparrot/codeparrot-clean
[ "1.2.3.4/32", "2001:0db8:0000:0000:0000:0000:0000:0001/64" ]
json
github
https://github.com/prometheus/prometheus
discovery/ovhcloud/testdata/dedicated_server/dedicated_servers_abcde_ips.json
#!/usr/bin/env 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 A...
unknown
codeparrot/codeparrot-clean
from openerp.osv import fields,osv class cashback_lines_wizard(osv.osv_memory): _name = "cashback.lines.wizard" _columns = { "customer_ids" : fields.many2many('res.partner', 'cashback_lines_wizard_partner_rel', 'wiz_id', 'partner_id', 'Customers',), "cashback_id" : fields.many2one('account.cashback',"Cashback...
unknown
codeparrot/codeparrot-clean
"""Access Ansible Core CI remote services.""" from __future__ import absolute_import, print_function import json import os import traceback import uuid import errno import time from lib.http import ( HttpClient, HttpResponse, HttpError, ) from lib.util import ( ApplicationError, run_command, ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.rx3 import kotlinx.coroutines.testing.* import io.reactivex.rxjava3.core.* import kotlinx.coroutines.* import kotlinx.coroutines.flow.consumeAsFlow import org.junit.Test import org.junit.runner.* import org.junit.runners.* import kotlin.coroutines.* import kotlin.test.* @RunWith(Parameteriz...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
reactive/kotlinx-coroutines-rx3/test/IntegrationTest.kt
function Component(props) { const maybeMutable = new MaybeMutable(); return <Foo.Bar>{maybeMutate(maybeMutable)}</Foo.Bar>; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-member-expression-tag-grouping.js
#!/usr/bin/python # Copyright (c) 2014-2016, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright # notice, this...
unknown
codeparrot/codeparrot-clean
/* 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 agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
cmd/kube-controller-manager/app/options/podgccontroller.go
/* 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/profiler/lib/traceme.h
#!/usr/bin/python # # Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.com> # Copyright (c) 2019 Matti Ranta, (@techknowlogick) # # 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 ANS...
unknown
codeparrot/codeparrot-clean
from django.db import models from django.contrib.auth.models import User from django.forms import ModelForm, ImageField from rest_framework import serializers class Competition(models.Model): name = models.CharField(max_length=200, null=False) image = models.ImageField(upload_to='static/upload_files/competitio...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics 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) any later ver...
unknown
codeparrot/codeparrot-clean
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandUtils.java
#include "test/jemalloc_test.h" #include "test/bench.h" static void malloc_free(void) { /* The compiler can optimize away free(malloc(1))! */ void *p = malloc(1); if (p == NULL) { test_fail("Unexpected malloc() failure"); return; } free(p); } static void mallocx_free(void) { void *p = mallocx(1, 0); if (p ...
c
github
https://github.com/redis/redis
deps/jemalloc/test/stress/microbench.c
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals from datetime import datetime, timedelta import frappe from frappe import _ from frappe.utils import cstr, cint from frappe.model.document import...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.7 # -*- encoding=utf-8 -*- import gevent from gevent import monkey import itertools from urlparse import urljoin from utils import flatten, get_json, get_xpath, parse_cell, sanitize, split monkey.patch_all() class BaseCrawler(object): url_image_base = 'http://info.nec.go.kr' attrs = [] ...
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 """Helpers to get/set default values.""" from safe.definitions import GLOBAL, zero_default_value from safe.definitions.utilities import definition __copyright__ = "Copyright 2016, The InaSAFE Project" __license__ = "GPL version 3" __email__ = "info@inasafe.org" __revision__ = '$Format:%H$' def set_in...
unknown
codeparrot/codeparrot-clean
#![warn(rust_2018_idioms)] #![cfg(feature = "full")] #![cfg(not(target_os = "wasi"))] // Wasi doesn't support threads use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use tokio::runtime::Builder; use tokio::sync::Notify; #[test] fn before_park_wakes_block_on_task() { let notify = Arc::new(Notify...
rust
github
https://github.com/tokio-rs/tokio
tokio/tests/rt_common_before_park.rs
#!/usr/bin/env python """Implement low level disk access using the sleuthkit.""" import stat import pytsk3 from grr.client import client_utils from grr.client import vfs from grr.lib import rdfvalue from grr.lib import utils class CachedFilesystem(object): """A container for the filesystem and image.""" def __...
unknown
codeparrot/codeparrot-clean
# -*- test-case-name: twisted.runner.test.test_procmon -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Support for starting, monitoring, and restarting child process. """ import warnings from twisted.python import log from twisted.internet import error, protocol, reactor as _...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2016-2017 VMware, 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 requ...
unknown
codeparrot/codeparrot-clean
#include <c10/cuda/CUDADeviceAssertionHost.h> #include <c10/cuda/CUDAException.h> #include <c10/cuda/CUDAFunctions.h> #include <c10/util/env.h> #include <c10/util/irange.h> #include <memory> #include <string> #ifdef TORCH_USE_CUDA_DSA #include <chrono> #include <thread> #endif #define C10_CUDA_CHECK_WO_DSA(EXPR) ...
cpp
github
https://github.com/pytorch/pytorch
c10/cuda/CUDADeviceAssertionHost.cpp
//===--- IntegerParsing.swift -------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LIC...
swift
github
https://github.com/apple/swift
benchmark/single-source/IntegerParsing.swift
#!/usr/bin/python
python
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-sanity-shebang/ansible_collections/ns/col/plugins/modules/python.py
from .state import EOF from .tokens import TokenEof from .tokens_base import TOKEN_COMMAND_PRINT from .tokens_base import TokenOfCommand from Vintageous import ex @ex.command('print', 'p') class TokenCommandPrint(TokenOfCommand): def __init__(self, params, *args, **kwargs): super().__init__(params, ...
unknown
codeparrot/codeparrot-clean
#ifndef Py_INTERNAL_CONDVAR_H #define Py_INTERNAL_CONDVAR_H #ifndef Py_BUILD_CORE # error "this header requires Py_BUILD_CORE define" #endif #include "pycore_pythread.h" // _POSIX_THREADS #ifdef _POSIX_THREADS /* * POSIX support */ #define Py_HAVE_CONDVAR #ifdef HAVE_PTHREAD_H # include <pthread.h> ...
c
github
https://github.com/python/cpython
Include/internal/pycore_condvar.h
""" Tests for views/tools.py. """ import datetime import mock import json import unittest from django.utils.timezone import utc from django.test.utils import override_settings from nose.plugins.attrib import attr from courseware.field_overrides import OverrideFieldData from lms.djangoapps.ccx.tests.test_overrides im...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies building a target and a subsidiary dependent target from a .gyp file in a subdirectory, without specifying an explicit output b...
unknown
codeparrot/codeparrot-clean
# -*- coding: iso-8859-1 -*- import unittest, test.test_support import sys, cStringIO class SysModuleTest(unittest.TestCase): def test_original_displayhook(self): import __builtin__ savestdout = sys.stdout out = cStringIO.StringIO() sys.stdout = out dh = sys.__displayhook_...
unknown
codeparrot/codeparrot-clean
// 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
prompb/custom.go
''' Copyright (C) 2013 Travis DeWolf 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 the hope t...
unknown
codeparrot/codeparrot-clean
//---------------------------------------------------------------------------// // Copyright (c) 2013-2014 Kyle Lutz <kyle.r.lutz@gmail.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 // // See http://boosto...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/compute/memory.hpp
/* * 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/clients/admin/AlterShareGroupOffsetsOptions.java
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2018 João Pedro Rodrigues # # 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 # # Unl...
unknown
codeparrot/codeparrot-clean
# filters.py # Copyright (C) 2006, 2007, 2008 Geoffrey T. Dairiki <dairiki@dairiki.org> and Michael Bayer <mike_mp@zzzcomputing.com> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re, cgi, urllib, htmlentitydefs, codecs from StringIO i...
unknown
codeparrot/codeparrot-clean
""" Ansible action plugin to ensure inventory variables are set appropriately and no conflicting options have been provided. """ import fnmatch import json import re from ansible.plugins.action import ActionBase from ansible import errors # pylint: disable=import-error,no-name-in-module from ansible.module_utils.six.m...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from collections import namedtuple from ansible.executor.task_queue_manager import TaskQueueManager from ansible.inventory import Inventory from ansible.parsing.dataloader import DataLoader from ansible.playbook.play import Play from ansible.plugins.callback import CallbackBase from ansible.vars...
unknown
codeparrot/codeparrot-clean
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/kernels/data/experimental/assert_cardinality_dataset_op.h
from __future__ import absolute_import import zipfile import datetime import calendar import glob import mimetypes import os from ..packages.six.moves import http_client as httplib from ..web._base import BaseWebOperations ########################################################################### class BaseCMP(BaseWe...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from tapi_server.models.base_model_ import Model from tapi_server import util class TapiOduMappingType(Model): """NOTE: This class is auto generated by OpenAPI Gen...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2004-2006 Zuza Software Foundation # # This file is part of translate. # # translate is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.document_loaders.nuclia import NucliaLoader # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling opt...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/document_loaders/nuclia.py
{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations \u0026 Alerts", "type": "dashb...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/testdata/output/single_version/v10.table_thresholds.v10.json
#include <torch/csrc/jit/api/module.h> #include <torch/jit.h> #include <torch/script.h> #include <fstream> #include <iostream> #include <string> int main(int argc, char* argv[]) { std::string input_file_path{argv[1]}; std::string output_file_path{argv[2]}; std::ifstream ifs(input_file_path); std::stringstrea...
cpp
github
https://github.com/pytorch/pytorch
android/pytorch_android/generate_test_asset.cpp
/* * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ import io.ktor.utils.io.* import io.ktor.utils.io.charsets.* import kotlinx.coroutines.delay import kotlinx.coroutines.test.runTest import kotlinx.io.EOFException import kotlin.test.* class R...
kotlin
github
https://github.com/ktorio/ktor
ktor-io/common/test/ReadLineTest.kt
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/fsi/ibm,p9-scom.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: IBM FSI-attached SCOM engine maintainers: - Eddie James <eajames@linux.ibm.com> description: The SCOM engine is an interfa...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/fsi/ibm,p9-scom.yaml
from libsaas import http, parsers from libsaas.services import base from . import resource class ResourceMixin(object): def create(self, *args, **kwargs): raise base.MethodNotSupported() def update(self, *args, **kwargs): raise base.MethodNotSupported() def delete(self, *args, **kwargs)...
unknown
codeparrot/codeparrot-clean
--- navigation_title: "Processor reference" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/processors.html --- # Ingest processor reference [processors] :::{note} This section provides detailed **reference information** for ingest processors. Refer to [Transform and enrich data](do...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/enrich-processor/index.md
""" Provide classes to perform the groupby aggregate operations. These are not exposed to the user and provide implementations of the grouping operations, primarily in cython. These classes (BaseGrouper and BinGrouper) are contained *in* the SeriesGroupBy and DataFrameGroupBy objects. """ from __future__ import annot...
python
github
https://github.com/pandas-dev/pandas
pandas/core/groupby/ops.py
// Copyright 2011 Google Inc. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the COPYING file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing project authors may // be...
c
github
https://github.com/opencv/opencv
3rdparty/libwebp/src/dsp/cpu.c
#! /usr/bin/python #M3 -- Meka Robotics Robot Components #Copyright (c) 2010 Meka Robotics #Author: edsinger@mekabot.com (Aaron Edsinger) #M3 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 versi...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
unknown
codeparrot/codeparrot-clean
"""Support for Amcrest IP camera sensors.""" from datetime import timedelta import logging from amcrest import AmcrestError from homeassistant.const import CONF_NAME, CONF_SENSORS, PERCENTAGE from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity import Entity from .c...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, 2014, Jan-Piet Mens <jpmens () 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...
unknown
codeparrot/codeparrot-clean
use crate::Stream; use core::future::Future; use core::marker::PhantomPinned; use core::pin::Pin; use core::task::{ready, Context, Poll}; use pin_project_lite::pin_project; pin_project! { /// Future for the [`all`](super::StreamExt::all) method. #[derive(Debug)] #[must_use = "futures do nothing unless you...
rust
github
https://github.com/tokio-rs/tokio
tokio-stream/src/stream_ext/all.rs
# frozen_string_literal: true require "cases/migration/helper" module ActiveRecord class Migration class ReferencesStatementsTest < ActiveRecord::TestCase include ActiveRecord::Migration::TestHelper def setup super @table_name = :test_models add_column table_name, :supplier...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/migration/references_statements_test.rb
/** @import { AST, Binding } from '#compiler' */ /** @import { Scope } from '../../scope' */ /** @import { Context } from '../types' */ import { validate_block_not_empty, validate_opening_tag } from './shared/utils.js'; import * as e from '../../../errors.js'; /** * @param {AST.SnippetBlock} node * @param {Context} ...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/compiler/phases/2-analyze/visitors/SnippetBlock.js
""" General functions for HTML manipulation. """ import re as _re from html.entities import html5 as _html5 __all__ = ['escape', 'unescape'] def escape(s, quote=True): """ Replace special characters "&", "<" and ">" to HTML-safe sequences. If the optional flag quote is true (the default), the quotation m...
unknown
codeparrot/codeparrot-clean
from collections import defaultdict import itertools import sys from bs4.element import ( CharsetMetaAttributeValue, ContentMetaAttributeValue, whitespace_re ) __all__ = [ 'HTMLTreeBuilder', 'SAXTreeBuilder', 'TreeBuilder', 'TreeBuilderRegistry', ] # Some useful features for a Tree...
unknown
codeparrot/codeparrot-clean
{ "extends": "../tsconfig.base.json", "compilerOptions": { "lib": ["es2022", "esnext.disposable", "dom", "dom.iterable"], }, }
json
github
https://github.com/tailwindlabs/tailwindcss
packages/@tailwindcss-browser/tsconfig.json
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT // taken from <https://github.com/ChrisDenton/static_vcruntime/> // we're not using static_vcruntime directly because we want this for debug builds too use std::{env, fs, io::Wr...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri-build/src/static_vcruntime.rs
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing_extensions import Literal, Required, TypedDict __all__ = ["InputAudioBufferCommitEventParam"] class InputAudioBufferCommitEventParam(TypedDict, total=False): """ Send this eve...
python
github
https://github.com/openai/openai-python
src/openai/types/realtime/input_audio_buffer_commit_event_param.py
from __future__ import unicode_literals import datetime from django.contrib.admin.templatetags.admin_static import static from django.contrib.admin.templatetags.admin_urls import add_preserved_filters from django.contrib.admin.utils import ( display_for_field, display_for_value, label_for_field, lookup_field, ) f...
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/security/oauthbearer/internals/secured/assertion/DynamicAssertionJwtTemplateTest.java
# (c) 2013, Michael DeHaan <michael.dehaan@gmail.com> # (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 annotations DOCUMENTATION = """ name: random_choice author: Michael DeHaan version_added: "1.1" short_desc...
python
github
https://github.com/ansible/ansible
lib/ansible/plugins/lookup/random_choice.py
# # General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall # model for 1st, 2nd and 3rd generation solar cells. # Copyright (C) 2012-2017 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com # # https://www.gpvdm.com # Room B86 Coates, University Park, Nottingham, NG7 2RD,...
unknown
codeparrot/codeparrot-clean
# # Copyright 2012 Red Hat, 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 agreed to in writi...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import multiprocessing import threading import traceback from six.moves.queue import Empty from collections import namedtuple from multiprocessing import Process, current_process, Queue from mozlog import structuredlog, capture # Special value used as a sentinal in various com...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies simple rules when using an explicit build target of 'all'. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('actions...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 Mirantis 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 agreed to in writ...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional from typing_extensions import Literal from pydantic import Field as FieldInfo from .._models import BaseModel __all__ = ["Moderation", "Categories", "CategoryAppliedInputTypes", "CategoryScores"] ...
python
github
https://github.com/openai/openai-python
src/openai/types/moderation.py
steps: - label: part-4 command: .ci/scripts/run-gradle.sh -Dignore.tests.seed checkPart4 timeout_in_minutes: 300 agents: provider: gcp image: family/elasticsearch-ubuntu-2404 machineType: n1-standard-32 buildDirectory: /dev/shm/bk
unknown
github
https://github.com/elastic/elasticsearch
.buildkite/pipelines/pull-request/part-4.yml
/*------------------------------------------------------------------------- * * namespace.c * code to support accessing and searching namespaces * * This is separate from pg_namespace.c, which contains the routines that * directly manipulate the pg_namespace system catalog. This module * provides routines ass...
c
github
https://github.com/postgres/postgres
src/backend/catalog/namespace.c
# coding=utf-8 # Copyright 2014 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) from textwrap import...
unknown
codeparrot/codeparrot-clean
from __future__ import division, absolute_import, print_function ''' >>> p = np.poly1d([1.,2,3]) >>> p poly1d([ 1., 2., 3.]) >>> print(p) 2 1 x + 2 x + 3 >>> q = np.poly1d([3.,2,1]) >>> q poly1d([ 3., 2., 1.]) >>> print(q) 2 3 x + 2 x + 1 >>> print(np.poly1d([1.89999+2j, -3j, -5.12345678, 2+1j])) ...
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...
unknown
github
https://github.com/apache/hadoop
dev-support/docker/README.md
import inspect from enum import Enum from typing import Any, List, Optional import pydantic from pydantic import BaseModel, PositiveInt, validator, NonNegativeFloat from ray import cloudpickle as cloudpickle from ray.serve.constants import DEFAULT_HTTP_HOST, DEFAULT_HTTP_PORT class BackendConfig(BaseModel): """C...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2011-2013 Therp BV (<http://therp.nl>) # # This program is free software: you can redistribute it and/or modify # it under the terms...
unknown
codeparrot/codeparrot-clean
"""Support Wink alarm control panels.""" import logging import homeassistant.components.alarm_control_panel as alarm from homeassistant.const import ( STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED) from . import DOMAIN, WinkDevice _LOGGER = logging.getLogger(__name__) DEPENDENCIES = ['win...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Cisco Systems, 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 o...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/python3.5 # -*- coding: utf-8 import numpy as np import re def read_data(file): """ Give a .dat file, we read the: - n - W - D """ opened_file = open(file) n = int(opened_file.readline().strip('\n')) W = np.zeros((n, n)) D = np.zeros((n, n)) opened_f...
unknown
codeparrot/codeparrot-clean
import logging class NullHandler(logging.Handler): def emit(self, record): pass log = logging.getLogger('coapMessage') log.setLevel(logging.ERROR) log.addHandler(NullHandler()) import coapOption as o import coapUtils as u import coapException as e import coapDefines as d def sortOptions(options):...
unknown
codeparrot/codeparrot-clean
# 01-01: Implement an algorithm to determine if a string has all unique # characters # Example: Funny StorY => NO # Example: Quick tall dog => YES import unittest class UniqueCharacterString: 'Checks a string for duplicate characters' def __init__(self): self.character_map = [False] * 26 retu...
unknown
codeparrot/codeparrot-clean
import { createCodeFixActionWithoutFixAll, registerCodeFix, } from "../_namespaces/ts.codefix.js"; import { addRange, CallExpression, CodeFixAction, CodeFixContext, Diagnostics, factory, findAncestor, getEmitModuleKind, getNamespaceDeclarationNode, getQuotePreference, ...
typescript
github
https://github.com/microsoft/TypeScript
src/services/codefixes/fixInvalidImportSyntax.ts
/* * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.utils.io.errors import kotlinx.cinterop.ExperimentalForeignApi import kotlinx.cinterop.memScoped import kotlinx.cinterop.toKString import platform.posix.* private val KnownPo...
kotlin
github
https://github.com/ktorio/ktor
ktor-io/posix/src/io/ktor/utils/io/errors/PosixErrors.kt
## Input ```javascript import {identity} from 'shared-runtime'; const DISPLAY = true; function Component({cond = false, id}) { return ( <> <div className={identity(styles.a, id !== null ? styles.b : {})}></div> {cond === false && ( <div className={identity(styles.c, DISPLAY ? styles.d : {})...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-separate-scopes-for-divs.expect.md
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os import tempfile import shutil from tempfile import mkdtemp from shutil import rmtree import numpy as np import nibabel as nb from nipype.testing import (assert_equal, assert_not_equal, ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.conf import settings from django.contrib.admin.utils import quote from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import NoReverseMatch, reverse from django.db import models from django.utils import timezone from django.utils....
unknown
codeparrot/codeparrot-clean
# pylint: disable=missing-docstring,redefined-outer-name,no-self-use,protected-access import os from io import StringIO import pytest from dump2polarion.exceptions import Dump2PolarionException from dump2polarion.results import csvtools from tests import conf class TestCSVFileldNames: def test_fieldnames_export...
unknown
codeparrot/codeparrot-clean
## Input ```javascript import {useRef} from 'react'; import {Stringify} from 'shared-runtime'; /** * Fixture showing that Ref types may be reactive. * We should always take a dependency on ref values (the outer box) as * they may be reactive. Pruning should be done in * `pruneNonReactiveDependencies` */ function...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reactive-ref.expect.md