code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
################################################################################
## ##
## This file is a part of TADEK. ##
## ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Author: Zion Orent <zorent@ics.com>
# Copyright (c) 2015 Intel Corporation.
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
# self file was generated automatically by the Snowball to Python interpreter
from .basestemmer import BaseStemmer
from .among import Among
class SwedishStemmer(BaseStemmer):
'''
self class was automatically generated by a Snowball to Python interpreter
It implements the stemming algorithm defined by a sn... | unknown | codeparrot/codeparrot-clean | ||
"""
Gaussian Mixture Models.
This implementation corresponds to frequentist (non-Bayesian) formulation
of Gaussian Mixture Models.
"""
# Author: Ron Weiss <ronweiss@gmail.com>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Bertrand Thirion <bertrand.thirion@inria.fr>
import warnings
import numpy as... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
#
# URL: https://sickrage.github.io
#
# This file is part of SickRage.
#
# SickRage 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 | ||
from django.test import TestCase
from django.test.utils import override_settings
from template_preprocess.processor import process_template_content
from template_preprocess.test import get_test_template_settings
template_settings = get_test_template_settings()
@override_settings(**template_settings)
class TestExtendB... | unknown | codeparrot/codeparrot-clean | ||
config:
allow-labels:
- test-fips
steps:
- label: part-5-fips-140-3
command: .ci/scripts/run-gradle.sh -Dignore.tests.seed -Dtests.fips.enabled=true -Dtests.fips.mode=140-3 checkPart5
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2404
machineType:... | unknown | github | https://github.com/elastic/elasticsearch | .buildkite/pipelines/pull-request/part-5-fips-140-3.yml |
#!/usr/bin/python
"""
Copyright 2014 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
Compare results of two render_pictures runs.
TODO(epoger): Start using this module to compare ALL images (whether they
were generated from GMs or SKPs), and rename it ac... | unknown | codeparrot/codeparrot-clean | ||
import click
import click_shell
# Test shell decorator
def test_shell_decorator(cli_runner):
@click_shell.shell(prompt='app# ')
def app():
pass
result = cli_runner.invoke(app)
assert result.output == 'app# \n'
# Test with one command
def test_command_decorator(cli_runner):
@click_shell.... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python3
'''!
@file test_epcalcwin.py
@package test_epcalcwin.py
@brief This is a little tool for tracking the EPs of Role Master Characters
@date (C) 2015-2021
@author Marcus Schwamberger
@email marcus@lederzeug.de
@license GNU V3.0
@version 1.2.0
----
@todo
- adding a RR window
- adding a cat/skill checke... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Bottle is a fast and simple micro-framework for small web applications. It
offers request dispatching (Routes) with url parameter support, templates,
a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and
template engines - all in a single file an... | unknown | codeparrot/codeparrot-clean | ||
// Tests that type error points to the path in attribute
use serde_derive::Deserialize;
#[derive(Deserialize)]
#[serde(default = "main")]
struct Struct {
#[serde(default = "main")]
f1: u8,
f2: u8,
#[serde(default = "main")]
f3: i8,
}
fn main() {} | rust | github | https://github.com/serde-rs/serde | test_suite/tests/ui/default-attribute/incorrect_type_struct.rs |
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import SceneXplainAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/langchain_classic/utilities/scenexplain.py |
//
// MasterViewController.swift
//
// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
//
// 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 restric... | swift | github | https://github.com/Alamofire/Alamofire | Example/Source/MasterViewController.swift |
## 1.15.0 (Unreleased)
NEW FEATURES:
* We now produce builds for Windows ARM64 ([#32719](https://github.com/hashicorp/terraform/issues/32719))
* You can set a `deprecated` attribute on variable and output blocks to indicate that they are deprecated. This will produce warnings when passing in a value for a deprecated... | unknown | github | https://github.com/hashicorp/terraform | CHANGELOG.md |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | unknown | codeparrot/codeparrot-clean | ||
//go:build linux
/*
Copyright 2015 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 agre... | go | github | https://github.com/kubernetes/kubernetes | pkg/kubelet/cm/helpers_linux_test.go |
/*
* Python Universal Functions Object -- Math for all types, plus fast
* arrays math
*
* Full description
*
* This supports mathematical (and Boolean) functions on arrays and other python
* objects. Math on large arrays of basic C types is rather efficient.
*
* Travis E. Oliphant 2005, 2006 oliphant@ee.byu.... | c | github | https://github.com/numpy/numpy | numpy/_core/src/umath/ufunc_object.c |
# 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 | ||
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Natsu @xiaoxiaojx
*/
"use strict";
const { updateHashForEntryStartup } = require("./StartupHelpers");
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../Module")} Module */
/** @typedef {import("../Chunk")} Chunk */... | javascript | github | https://github.com/webpack/webpack | lib/javascript/ChunkFormatHelpers.js |
from datetime import datetime
import pyotp
from flask import flash, redirect, request, render_template, session, url_for
from flask_login import current_user, login_required
from app.constants import event_type
from app.lib.db_utils import create_object, update_object
from app.lib.fernet_utils import decrypt_string, ... | unknown | codeparrot/codeparrot-clean | ||
"""Test deCONZ component setup process."""
import asyncio
from copy import deepcopy
from homeassistant.components.deconz import (
DeconzGateway,
async_setup_entry,
async_unload_entry,
)
from homeassistant.components.deconz.const import DOMAIN as DECONZ_DOMAIN
from homeassistant.components.deconz.gateway i... | unknown | codeparrot/codeparrot-clean | ||
# buildReactiveScopeTerminalsHIR
## File
`src/HIR/BuildReactiveScopeTerminalsHIR.ts`
## Purpose
This pass transforms the HIR by inserting `ReactiveScopeTerminal` nodes to explicitly demarcate the boundaries of reactive scopes within the control flow graph. It converts the implicit scope ranges (stored on identifiers ... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/docs/passes/17-buildReactiveScopeTerminalsHIR.md |
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... | 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 | codeparrot/codeparrot-clean | ||
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
compat_HTTPError,
compat_str,
)
from ..utils import (
extract_attributes,
try_get,
urlencode_postdata,
ExtractorError,
)
class TVPlayerIE(InfoExtractor):
_VALID_URL = r'https?:/... | unknown | codeparrot/codeparrot-clean | ||
def string_length(str1):
count = 0
for char in str1:
count += 1
return count | unknown | mbpp | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 ASMlover. 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
# ... | unknown | codeparrot/codeparrot-clean | ||
import beanstalkc
import yaml
import logging
import pprint
import sys
from collections import OrderedDict
from .config import config
from . import report
log = logging.getLogger(__name__)
def connect():
host = config.queue_host
port = config.queue_port
if host is None or port is None:
raise Runti... | unknown | codeparrot/codeparrot-clean | ||
import itertools
import os
import re
from django.conf import global_settings, settings
from django.contrib.sites.models import Site, RequestSite
from django.contrib.admin.models import LogEntry
from django.contrib.auth.models import User
from django.core import mail
from django.core.urlresolvers import reverse, NoReve... | unknown | codeparrot/codeparrot-clean | ||
"""Support for tracking MQTT enabled devices."""
import logging
import voluptuous as vol
from homeassistant.components import mqtt
from homeassistant.components.device_tracker import PLATFORM_SCHEMA
from homeassistant.const import CONF_DEVICES
from homeassistant.core import callback
import homeassistant.helpers.confi... | unknown | codeparrot/codeparrot-clean | ||
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | unknown | github | https://github.com/huggingface/transformers | docs/source/en/quantization/awq.md |
#!/usr/bin/env python
"""
@package mi.dataset.driver.flort_dj.sio
@file mi-dataset/mi/dataset/driver/flort_dj/sio/flort_dj_sio_telemetered_driver.py
@author Joe Padula
@brief Telemetered driver for the flort_dj_sio instrument
Release notes:
Initial Release
"""
__author__ = 'jpadula'
from mi.dataset.dataset_parser ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
##########################################################################
#
# Copyright 2015 VMware, Inc.
# Copyright 2011 Jose Fonseca
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... | unknown | codeparrot/codeparrot-clean | ||
import unittest
from simpletex.base import Brace, Command, Environment
class TestBrace(unittest.TestCase):
def test_empty(self):
self.assertEqual(Brace()(), '')
def test_args(self):
self.assertEqual(Brace()('a', 'b', 'c'), '{a}{b}{c}')
class TestCommand(unittest.TestCase):
def test_simpl... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#!encoding:utf-8
import os
import sys
import re
import commands
import glob
import fnmatch
import string
from xml.etree import ElementTree as ET
from optparse import OptionParser
def iterfindfiles(path, fnexp):
for root, dirs, files in os.walk(path):
for filename in fnmatch.filter(files,... | 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.
"""
Verify the settings that cause a set of programs to be created in
a specific build directory, and that no intermediate built files
get c... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright (c) 2014, 2025, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is designed to work with certain software (including... | c | github | https://github.com/mysql/mysql-server | include/mutex_lock.h |
# 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 | ||
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Title: CURLINFO_NUM_CONNECTS
Section: 3
Source: libcurl
See-also:
- curl_easy_getinfo (3)
- curl_easy_setopt (3)
Protocol:
- All
Added-in: 7.12.3
---
# NAME
CURLINFO_NUM_CONNECTS - number of created connections
# SYNOP... | unknown | github | https://github.com/curl/curl | docs/libcurl/opts/CURLINFO_NUM_CONNECTS.md |
/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-boot | core/spring-boot/src/main/java/org/springframework/boot/task/ThreadPoolTaskSchedulerCustomizer.java |
# frozen_string_literal: true
module ActiveRecord
module ConnectionAdapters
class PoolConfig # :nodoc:
include MonitorMixin
attr_reader :db_config, :role, :shard, :connection_descriptor
attr_writer :schema_reflection, :server_version
def schema_reflection
@schema_reflection ||= ... | ruby | github | https://github.com/rails/rails | activerecord/lib/active_record/connection_adapters/pool_config.rb |
# 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 | ||
// RUN: %check_clang_tidy %s cppcoreguidelines-pro-type-cstyle-cast %t
void reinterpretcast() {
int i = 0;
void *j;
j = (int*)j;
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: do not use C-style cast to convert between unrelated types [cppcoreguidelines-pro-type-cstyle-cast]
}
void constcast() {
int* i;
cons... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-cstyle-cast.cpp |
/*
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.analysis.api.fir.test.cases.generated.cases.components.symbolDeclarationOverrides... | java | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/symbolDeclarationOverridesProvider/FirIdeNormalAnalysisSourceModuleIsSubclassOfTestGenerated.java |
# (c) 2016, Ansible by Red Hat <info@ansible.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 later v... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notic... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) 2012 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 | android/guava/src/com/google/common/math/PairedStatsAccumulator.java |
##########################################################################
#
# Copyright (c) 2019, John Haddon. 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 so... | unknown | codeparrot/codeparrot-clean | ||
from itertools import groupby
from pkg_resources import iter_entry_points
from httpie.plugins import AuthPlugin, FormatterPlugin, ConverterPlugin
from httpie.plugins.base import TransportPlugin
ENTRY_POINT_NAMES = [
'httpie.plugins.auth.v1',
'httpie.plugins.formatter.v1',
'httpie.plugins.converter.v1',
... | unknown | codeparrot/codeparrot-clean | ||
import unittest
import tkp.db
from tkp.testutil import db_subs
class TestAugmentedRunningcatalog(unittest.TestCase):
def setUp(self):
"""
create a fake transient. Taken from the transient test.
:return:
"""
self.database = tkp.db.Database()
self.dataset = tkp.db.Data... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: false
$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
$srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
inits = $srcs.map {|s| File.basename(s, ".*")}
inits.delete("init")
inits.map! {|s|"X(#{s})"}
$defs << "-DTEST_INIT_FUNCS(X)=\"#{inits.join(' ')}\""
create_makefile("-test-/rational") | ruby | github | https://github.com/ruby/ruby | ext/-test-/rational/extconf.rb |
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | unknown | github | https://github.com/huggingface/transformers | docs/source/ko/pipeline_tutorial.md |
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
from... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
import os
import re
import uuid
import urllib
import logging
import datetime
import urlparse
from collections import OrderedDict
import warnings
import pytz
from flask import request
from django.core.urlresolvers import reverse
from HTMLParser import HTMLParser
from modularodm import Q
from mo... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
from __future__ import unicode_literals
from cio.conf import settings
class BasePlugin(object):
ext = None
@property
def settings(self):
return settings.get(self.ext.upper(), {})
def load(self, content):
"""
Return plugin data for content string
"""
... | unknown | codeparrot/codeparrot-clean | ||
"""SCons.Conftest
Autoconf-like configuration support; low level implementation of tests.
"""
#
# Copyright (c) 2003 Stichting NLnet Labs
# Copyright (c) 2001, 2002, 2003 Steven Knight
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation file... | unknown | codeparrot/codeparrot-clean | ||
Compact Backtrace Format
========================
We would like to be able to efficiently store and access backtraces,
but we also wish to minimise the memory used to store them. Since
backtraces typically contain a good deal of redundancy, it should be
possible to compress the data.
Compact Backtrace Format (CBF) i... | unknown | github | https://github.com/apple/swift | docs/CompactBacktraceFormat.md |
use std::ops::ControlFlow;
use either::Either;
use itertools::Itertools as _;
use rustc_data_structures::fx::FxIndexSet;
use rustc_errors::{Diag, Subdiagnostic};
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_middle::mir::{self, ConstraintCategory, Location};
use rustc_middle::ty::{
self, Ty, TyCtxt... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_borrowck/src/diagnostics/opaque_types.rs |
# Copyright (C) 2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
from itertools import chain, count
import networkx as nx
from networkx.utils import make_str
__author__ = """Aric Hagberg (hagberg@lanl.gov... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python
"""Runner Script for Robot Framework SeleniumLibrary Demo
Tests are run by giving a path to the tests to be executed as an argument to
this script. Possible Robot Framework options are given before the path.
Examples:
rundemo.py login_tests # Run all tests in a directo... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP - Account renumber wizard
# Copyright (C) 2009 Pexego Sistemas Informáticos.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gene... | unknown | codeparrot/codeparrot-clean | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
from ..shared.function_definition import FunctionDefinition
__all__ = ["ChatCompletionFunctionTool"]
class ChatCompletionFunctionTool(BaseModel):
"""A func... | python | github | https://github.com/openai/openai-python | src/openai/types/chat/chat_completion_function_tool.py |
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/renesas,ceu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas Capture Engine Unit (CEU)
maintainers:
- Jacopo Mondi <jacopo+renesas@jmondi.org>
- linux-renesas-soc@vger.kernel.org
... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/media/renesas,ceu.yaml |
"""View for block details specialized for a GASSupplierOrder"""
from django.utils.translation import ugettext as _, ugettext_lazy as _lazy
from django.http import HttpResponse
from django.db import transaction
from flexi_auth.models import ObjectWithContext
from gasistafelice.lib.shortcuts import render_to_response,... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
"""
Collect the elasticsearch stats for the local node.
Supports multiple instances. When using the 'instances'
parameter the instance alias will be appended to the
'path' parameter.
#### Dependencies
* urlib2
"""
import urllib2
import re
from diamond.collector import str_to_bool
try:
import ... | unknown | codeparrot/codeparrot-clean | ||
it("should hide stack in details", function() {
expect(function f() {
require("./loader!");
}).toThrow();
}); | javascript | github | https://github.com/webpack/webpack | test/cases/compile/error-hide-stack/index.js |
# Copyright 2014 Arista Networks, 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 | ||
import difflib
from lxml import etree
from lxml.html import fragment_fromstring
import re
__all__ = ['html_annotate', 'htmldiff']
try:
from html import escape as html_escape
except ImportError:
from cgi import escape as html_escape
try:
_unicode = unicode
except NameError:
# Python 3
_unicode = st... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019 Bootlin
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/xylon,logicvc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xylon LogiCVC multi-function device
maintainers:
- Paul Kocialkowski <paul.kocialkowski@bootlin.com>
d... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/mfd/xylon,logicvc.yaml |
from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.contrib.contenttypes.models import ContentType
from django.db import models
class Relation(models.Model):
pass
class AbstractPerson(models.Model):
# DATA fields
data_abstract = models.CharField(max_lengt... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright (c) 2000, 2025, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is designed to work with certain software (including... | c | github | https://github.com/mysql/mysql-server | include/mysql_com.h |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package ssh
import (
"context"
"fmt"
"github.com/hashicorp/go-secure-stdlib/strutil"
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/logical"
)
// Structure to hold roles that are allowed to accept any IP address.... | go | github | https://github.com/hashicorp/vault | builtin/logical/ssh/path_config_zeroaddress.go |
# coding: utf-8
from __future__ import absolute_import, unicode_literals
from django.core import cache
from ..base import BaseTestCase
class CachePanelTestCase(BaseTestCase):
def setUp(self):
super(CachePanelTestCase, self).setUp()
self.panel = self.toolbar.get_panel_by_id('CachePanel')
... | unknown | codeparrot/codeparrot-clean | ||
use rustc_abi::{FieldIdx, VariantIdx};
use rustc_middle::mir::interpret::Scalar;
use rustc_middle::mir::*;
use rustc_middle::thir::*;
use rustc_middle::ty;
use rustc_middle::ty::cast::mir_cast_kind;
use rustc_span::Span;
use rustc_span::source_map::Spanned;
use super::{PResult, ParseCtxt, parse_by_kind};
use crate::bu... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_mir_build/src/builder/custom/parse/instruction.rs |
# pylint:disable=consider-using-with
from typing import List, Dict
import json
import subprocess
import argparse
import tempfile
import os
import itertools
from collections import defaultdict
import angr
UNIQUE_STRING_COUNT = 20
# strings longer than MAX_UNIQUE_STRING_LEN will be truncated
MAX_UNIQUE_STRING_LEN = 70
... | unknown | codeparrot/codeparrot-clean | ||
//===--- JSONTransport.cpp - sending and receiving LSP messages over JSON -===//
//
// 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/JSONTransport.cpp |
import requests
from django.core.management.base import BaseCommand, CommandError
from vote.models import Category, Option, OptionPicture
def epsilonator(target):
def epsilon(media):
return abs(media['width'] - target)
return epsilon
thumbnail_epsilon = epsilonator(120)
preview_epsilon = epsilonato... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import jsonfield.fields
import badges.models
from django.conf import settings
import django.utils.timezone
from model_utils import fields
from openedx.core.djangoapps.xmodule_django.models import CourseKeyField
cl... | unknown | codeparrot/codeparrot-clean | ||
"""Test cases for the fnmatch module."""
from test import test_support
import unittest
from fnmatch import fnmatch, fnmatchcase
class FnmatchTestCase(unittest.TestCase):
def check_match(self, filename, pattern, should_match=1):
if should_match:
self.assert_(fnmatch(filename, pattern),
... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import "C"
var sink []byte
//export GoFunction7
func GoFunction7() {
sink = make([]byte, 4096)
}
func main() {
} | go | github | https://github.com/golang/go | src/cmd/cgo/internal/testcarchive/testdata/libgo7/sink.go |
<?php
namespace Illuminate\Support;
use Carbon\CarbonInterval;
use Closure;
use DateInterval;
use Illuminate\Support\Traits\Macroable;
use PHPUnit\Framework\Assert as PHPUnit;
use RuntimeException;
class Sleep
{
use Macroable;
/**
* The fake sleep callbacks.
*
* @var array
*/
public ... | php | github | https://github.com/laravel/framework | src/Illuminate/Support/Sleep.php |
fun foo() {
} | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-standalone/testData/sessionBuilder/otherModuleUsage/dependent/dependent.kt |
# basic_source.py
# Copyright (c) 2013-2016 Pablo Acosta-Serafini
# See LICENSE for details
# pylint: disable=C0103,C0111,E0611,R0201,R0204,W0212,W0232,W0612
# PyPI imports
from numpy import array
import pytest
# Putil imports
from putil.plot import BasicSource as FUT
from putil.test import AE, AI, APROP, AROPROP
###... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2016 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.client.plugin.tracing
import io.ktor.websocket.*
internal class WebSocketSessionTracer(
requestId: String,
tracer: Tracer,
private val delegate: DefaultWebSocketSes... | kotlin | github | https://github.com/ktorio/ktor | ktor-client/ktor-client-plugins/ktor-client-tracing/common/src/WebSocketSessionTracer.kt |
function Component(props) {
for (const x in props.value) {
return x;
}
return null;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{value: {a: 'A!'}}],
}; | javascript | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/for-in-statement-body-always-returns.js |
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse
from django.views import generic
from django.views.generic.detail import DetailView
from django.views.generic.edit import FormView, CreateView, UpdateView, Delet... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
oauthlib.oauth1.rfc5849.endpoints.access_token
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of the access token provider logic of
OAuth 1.0 RFC 5849. It validates the correctness of access token requests,
creates and persists tokens as well as create the p... | unknown | codeparrot/codeparrot-clean | ||
{"files":{"Cargo.toml":"b1c07acb994f88418a0bbb0d393f76c4ca4276d9f4497ca734eb182286169ea8","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"d9ca174c5818d7885265f0242d3193dd2963c2ee1da84aed8b93... | json | github | https://github.com/nodejs/node | deps/crates/vendor/serde_core/.cargo-checksum.json |
'''
Created on Dec 29, 2012
@author: dstrauss
Copyright 2013 David Strauss
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 | ||
"""
Monitors home energy use for the eliq online service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.eliqonline/
"""
import logging
from urllib.error import URLError
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_NAME, STATE_UNKNOWN
... | unknown | codeparrot/codeparrot-clean | ||
import unittest
import os
from pkget import Yaml
class YamlTest(unittest.TestCase):
def test_load_all(self):
def test_load_all(*args, **kwargs):
result = []
for item in Yaml.load_all(*args, **kwargs):
result.append(item)
return result
def assert_... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 l... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2021 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/c/experimental/ops/gen/cpp/renderers/namespace_renderer.h |
//! Logic for lowering higher-kinded outlives constraints
//! (with placeholders and universes) and turn them into regular
//! outlives constraints.
use rustc_data_structures::frozen::Frozen;
use rustc_data_structures::fx::FxIndexMap;
use rustc_data_structures::graph::scc;
use rustc_data_structures::graph::scc::Sccs;
u... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_borrowck/src/handle_placeholders.rs |
##########################################################
# THIS IS A GENERATED FILE -- DO NOT MODIFY.
# IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE
# AND REGENERATE THE MATRIX SUITES.
#
# matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/sharding_max... | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_max_mirroring_opportunistic_secondary_targeting.yml |
# 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__ = ["ChatCompletionContentPartInputAudioParam", "InputAudio"]
class InputAudio(TypedDict, total=False):
data: Required[str]
... | python | github | https://github.com/openai/openai-python | src/openai/types/chat/chat_completion_content_part_input_audio_param.py |
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2005-2012, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that th... | cpp | github | https://github.com/opencv/opencv | 3rdparty/openexr/IlmThread/IlmThreadPosix.cpp |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from PyQt5.QtWidgets import QApplication, QWidget
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QLabel, QGridLayout
from PyQt5.QtWidgets import QLineEdit, QPushButton, QHBoxLayout
from PyQt5.QtWidgets import QMessageBox
from PyQt5.QtCore import Qt
class Kalkulato... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.