code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
{
"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/v40.refresh_string.v40.json |
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.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 restriction, including
# without limitation the rights to use, copy, modi... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""sdist tests"""
import os
import shutil
import sys
import tempfile
import unicodedata
import contextlib
import io
from setuptools.extern import six
from setuptools.extern.six.moves import map
import pytest
import pkg_resources
from setuptools.command.sdist import sdist
from setuptools.comm... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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 | ||
"""SCons.Executor
A module for executing actions with specific lists of target and source
Nodes.
"""
#
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
import numpy as np
import scipy as sp
from gat.core.sna import excel_parser
###############
### GLOBALS ###
###############
A = (-.8,-.6)
B = (-.6,-.3)
C = (-.3,.3)
D = (.3,.6)
E = (.6,.8)
IO_keys = ["Warmth", "Affiliation", "Legitimacy", "Dominance", "Competence"]
legit_keys = ["Title","Role","Belief","Knowledge"]... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# mtypes.py ---
#
# Filename: mtypes.py
# Description:
# Author:
# Maintainer:
# Created: Fri Feb 8 11:29:36 2013 (+0530)
# Version:
# Last-Updated: Tue Mar 1 02:52:35 2016 (-0500)
# By: subha
# Update #: 182
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
# Utility to d... | unknown | codeparrot/codeparrot-clean | ||
// SPDX-License-Identifier: GPL-2.0
#include <linux/io.h>
#include <linux/export.h>
/**
* check_signature - find BIOS signatures
* @io_addr: mmio address to check
* @signature: signature block
* @length: length of signature
*
* Perform a signature comparison with the mmio address io_addr. This
* address shoul... | c | github | https://github.com/torvalds/linux | lib/check_signature.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... | java | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/http/TestHttpServerLifecycle.java |
# -*- encoding: utf-8 -*-
import copy
from abjad.tools.topleveltools import iterate
from abjad.tools.topleveltools import mutate
def apply_full_measure_tuplets_to_contents_of_measures_in_expr(
expr, supplement=None):
r'''Applies full-measure tuplets to contents of measures in `expr`:
::
>>> staff... | unknown | codeparrot/codeparrot-clean | ||
"""distutils.command.build_ext
Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP)."""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id$"
import sys, os, string, re
from types import *
fr... | unknown | codeparrot/codeparrot-clean | ||
// This file is part of ICU4X. For terms of use, please see the file
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
#[cfg(feature = "alloc")]
use crate::preferences::extensions::unicode::enum_keyword;
#[cfg(feature = "alloc")]
enum_... | rust | github | https://github.com/nodejs/node | deps/crates/vendor/icu_locale_core/src/preferences/extensions/unicode/keywords/variant.rs |
# -*- coding: utf-8 -*-
#
# 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
#... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
import ast
from mccabe import PathGraphingAstVisitor
from prospector.message import Location, Message
from prospector.tools.base import ToolBase
__all__ = (
'McCabeTool',
)
class McCabeTool(ToolBase):
def __init__(self, *args, **kwargs):
super(McCabeTool, self)... | unknown | codeparrot/codeparrot-clean | ||
from sympy.vector.coordsysrect import CoordSysCartesian
from sympy.vector.scalar import BaseScalar
from sympy import sin, cos, pi, ImmutableMatrix as Matrix, \
symbols, simplify, zeros
from sympy.vector.functions import express
from sympy.vector.point import Point
from sympy.vector.vector import Vector
from sympy.... | unknown | codeparrot/codeparrot-clean | ||
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# 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, eithe... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | unknown | codeparrot/codeparrot-clean | ||
from django.http import HttpResponse
from django.template import loader, Context, RequestContext
from django.utils import six
class ContentNotRenderedError(Exception):
pass
class SimpleTemplateResponse(HttpResponse):
rendering_attrs = ['template_name', 'context_data', '_post_render_callbacks']
def __init... | unknown | codeparrot/codeparrot-clean | ||
---
applies_to:
stack:
serverless:
navigation_title: "Rank features"
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/rank-features.html
---
# Rank features field type [rank-features]
A `rank_features` field can index numeric feature vectors, so that they can later be used to boos... | unknown | github | https://github.com/elastic/elasticsearch | docs/reference/elasticsearch/mapping-reference/rank-features.md |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='UserLocationVisualization',
fields=[
('id', mode... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2010 OpenStack Foundation
#
# 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 | ||
# (c) 2017 Red Hat Inc.
#
# 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 version.
#
# Ansible is dis... | 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 use ... | 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 | storage/remote/otlptranslator/prometheusremotewrite/context.go |
# Copyright 2025 The HuggingFace Inc. team
#
# 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 t... | python | github | https://github.com/huggingface/transformers | src/transformers/generation/continuous_batching/scheduler.py |
# util/topological.py
# Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Topological sorting algorithms."""
from ..exc import CircularDependencyError
f... | unknown | codeparrot/codeparrot-clean | ||
#
# Copyright (C) 2013-2018 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
from setuptools import setup, find_packages
requirements = ['Django>=1.7.0', ]
try:
from unittest import mock
except ImportError:
requirements.append('mock')
setup(
name="django-doberman",
version="0.5.9",
author="Nicolas Mendoza",
author_email="niccolasmendoza@gmail.com... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright(C) 2010-2012 Romain Bignon, Florent Fourcot
#
# This file is part of weboob.
#
# weboob 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 Licen... | unknown | codeparrot/codeparrot-clean | ||
# (C) British Crown Copyright 2014, Met Office
#
# This file is part of Biggus.
#
# Biggus 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 late... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012-2013, Timothy Appnel <tim@appnel.com>
#
# 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 | ||
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import locale
from django.contrib.auth import get_user_model
from django.contrib.auth.management.commands import createsuperuser
from django.contrib.auth.models import User, AnonymousUser
from django.contrib.auth.tests.custom_user import CustomUser
fro... | unknown | codeparrot/codeparrot-clean | ||
import json
# Create your models here.
class TrafficReport(object):
"""A representation of a traffic report from http://www.internettrafficreport.com/details.htm as a python object. Generically,
speaking, it is a immutable wrapper around a list that only supports ReportEntry instances.
"""
def __init... | 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... | python | github | https://github.com/apache/airflow | airflow-core/src/airflow/__init__.py |
import numpy
from scipy.stats import gaussian_kde
from .plot_tools import PlotTools
import pandas as pd
def plotGaussianKDE(plot_context):
"""
@type plot_context: ert_gui.plottery.PlotContext
"""
ert = plot_context.ert()
key = plot_context.key()
config = plot_context.plotConfig()
axes = plo... | unknown | codeparrot/codeparrot-clean | ||
"""
Django module container for classes and operations related to the "Course Module" content type
"""
import json
import logging
from cStringIO import StringIO
from datetime import datetime
import requests
from lazy import lazy
from lxml import etree
from path import Path as path
from pytz import utc
from xblock.fiel... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright (C) 2006-2007 Søren Roug, European Environment Agency
#
# This library 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 2.1 of the License, or (at you... | unknown | codeparrot/codeparrot-clean | ||
"""
Agglomerative clustering with different metrics
===============================================
Demonstrates the effect of different metrics on the hierarchical clustering.
The example is engineered to show the effect of the choice of different
metrics. It is applied to waveforms, which can be seen as
high-dimens... | unknown | codeparrot/codeparrot-clean | ||
/* This header is designed to be copy-pasted into downstream packages, since it provides
a compatibility layer between the old C struct complex types and the new native C99
complex types. The new macros are in numpy/npy_math.h, which is why it is included here. */
#ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_2_COMPLEXCOM... | c | github | https://github.com/numpy/numpy | numpy/_core/include/numpy/npy_2_complexcompat.h |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package transit
import (
"context"
"testing"
"github.com/hashicorp/vault/sdk/logical"
)
func TestTransit_BackupRestore(t *testing.T) {
// Test encryption/decryption after a restore for supported keys
testBackupRestore(t, "aes128-gcm96", "en... | go | github | https://github.com/hashicorp/vault | builtin/logical/transit/path_backup_test.go |
{
"name": "my-vend/my-app",
"license": "MIT",
"require": {
"my-vend/my-other-lib": "1.*"
},
"require-dev": {
"my-vend/my-other-lib-tests": "1.*"
},
"provide": {
"my-vend/my-other-interface": "1.*"
},
"suggest": {
"my-vend/my-other-optional-extension": ... | json | github | https://github.com/composer/composer | tests/Composer/Test/Config/Fixtures/composer-one-of-everything.json |
{
"$schema": "https://turbo.build/schema.json",
"ui": "tui",
"tasks": {
"@tailwindcss/oxide#build": {
"dependsOn": ["^build"],
"outputs": ["./index.d.ts", "./index.js", "./*.node"],
"inputs": [
"./src/**/*",
"./build.rs",
"./package.json",
"./Cargo.toml",
... | json | github | https://github.com/tailwindlabs/tailwindcss | turbo.json |
from collections import OrderedDict
import numpy as np
import pytest
from pandas._libs.tslib import Timestamp
from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike
import pandas as pd
from pandas import Index, MultiIndex, date_range
import pandas.util.testing as tm
def test_constructor_single... | unknown | codeparrot/codeparrot-clean | ||
#include <c10/hip/HIPCachingAllocator.h>
#include <ATen/hip/impl/HIPCachingAllocatorMasqueradingAsCUDA.h>
namespace c10 { namespace hip {
namespace HIPCachingAllocatorMasqueradingAsCUDA {
c10::cuda::CUDACachingAllocator::CUDAAllocator* get() {
return c10::cuda::CUDACachingAllocator::get();
}
void recordStreamMasqu... | cpp | github | https://github.com/pytorch/pytorch | aten/src/ATen/hip/impl/HIPCachingAllocatorMasqueradingAsCUDA.cpp |
# unittest? What's that?
#
# You'll need Mark Pilgrim's feed_parser, from
# http://diveintomark.org/projects/feed_parser/
# The test takes a structure, converts it to XML,
# reads it back using feed_parser, and compares
# the two stuctures. feed_parser doesn't handle
# everything, so I needed to filter some items.
#... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
"""
Phoenix
LICENSE
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dis... | unknown | codeparrot/codeparrot-clean | ||
import numpy as np
from scipy import linalg
from sklearn.decomposition import nmf
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_false
from sklearn.utils.testing import raises
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_gr... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# @date 160902 - Enhanced user profile update
"""
Business logic for User management.
"""
import uuid
from datetime import timezone
import pytz
from django.core.exceptions import ObjectDoesNotExist
from website.local_settings import DISPLAY_TIMEZONE
from auth_sys.models import MyUser, Grou... | unknown | codeparrot/codeparrot-clean | ||
use std::collections::VecDeque;
use rustc_index::Idx;
use rustc_index::bit_set::DenseBitSet;
/// A work queue is a handy data structure for tracking work left to
/// do. (For example, basic blocks left to process.) It is basically a
/// de-duplicating queue; so attempting to insert X if X is already
/// enqueued has ... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_data_structures/src/work_queue.rs |
/*
Copyright 2024 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/apis/kubeadm/types_test.go |
"""
Entrance Exams view module -- handles all requests related to entrance exam management via Studio
Intended to be utilized as an AJAX callback handler, versus a proper view/screen
"""
from functools import wraps
import json
import logging
from django.contrib.auth.decorators import login_required
from django.views.d... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) Corporation for National Research Initiatives
import sys
import os
from org.python.core import PyModule, PyJavaClass, PyClass, \
PyJavaPackage, PyBeanEventProperty
from util import lookup
def wrapJava(mod):
if isinstance(mod, PyModule):
return Module(mod)
elif isinstance(mod, Py... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 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 | ||
/* Generated file to emulate the Harness namespace. */
export * from "../../harness/_namespaces/Harness.js";
import * as Parallel from "./Harness.Parallel.js";
export { Parallel };
export * from "../fourslashRunner.js";
export * from "../compilerRunner.js";
export * from "../transpileRunner.js";
export * from "../ru... | typescript | github | https://github.com/microsoft/TypeScript | src/testRunner/_namespaces/Harness.ts |
// Copyright 2018 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 a
// typedef struct S ST;
// static ST* F() { return 0; }
import "C"
func F1() {
C.F()
} | go | github | https://github.com/golang/go | src/cmd/cgo/internal/test/issue26430/a.go |
// Copyright 2023 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.
//go:build aix || dragonfly || freebsd || illumos || linux || netbsd
package net
import (
"syscall"
"testing"
)
const (
syscall_TCP_KEEPIDLE = syscall.TC... | go | github | https://github.com/golang/go | src/net/tcpconn_keepalive_conf_unix_test.go |
/*
* Copyright (c) 2017 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.invocation;
import java.lang.reflect.Method;
import java.util.concurrent.Callable;
import org.mockito.internal.creation.DelegatingMethod;
import org.mockito.internal.deb... | java | github | https://github.com/mockito/mockito | mockito-core/src/main/java/org/mockito/internal/invocation/DefaultInvocationFactory.java |
/** @import { Task } from '#client' */
/** @import { SpringOpts, SpringUpdateOpts, TickContext } from './private.js' */
/** @import { Spring as SpringStore } from './public.js' */
import { writable } from '../store/shared/index.js';
import { loop } from '../internal/client/loop.js';
import { raf } from '../internal/cli... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/src/motion/spring.js |
#
# Copyright 2005,2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# any later version... | unknown | codeparrot/codeparrot-clean | ||
## Input
```javascript
import {identity} from 'shared-runtime';
function Component(props) {
const $ = identity('jQuery');
const t0 = identity([$]);
return t0;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{}],
};
```
## Code
```javascript
import { c as _c } from "react/compiler-runtime";... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/conflicting-dollar-sign-variable.expect.md |
/* Copyright 2017 - 2025 R. Thomas
* Copyright 2017 - 2025 Quarkslab
*
* 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 req... | cpp | github | https://github.com/nodejs/node | deps/LIEF/src/PE/Builder.cpp |
# -*- coding: utf-8 -*-
#
# windmultipliers documentation build configuration file, created by
# sphinx-quickstart on Fri Sep 12 12:03:35 2014.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
from __future__ import print_function
import tarfile, inspect, os
from six.moves.urllib.request import urlretrieve
from ..utils.generic_utils import Progbar
def get_file(fname, origin, untar=False):
datadir = os.path.expanduser(os.path.join('~', '.deuNet', 'datasets'))
... | unknown | codeparrot/codeparrot-clean | ||
"""
Generally helpful utility functions.
"""
def _ask_for_it_by_name(name):
"Returns an object referenced by absolute path."
bits = name.split(".")
## what if there is no absolute reference?
if len(bits)>1:
modulename = ".".join(bits[:-1])
else:
modulename=bits[0]
module = __i... | unknown | codeparrot/codeparrot-clean | ||
"""
Scrapy Telnet Console extension
See documentation in docs/topics/telnetconsole.rst
"""
import pprint
import logging
from twisted.internet import protocol
try:
from twisted.conch import manhole, telnet
from twisted.conch.insults import insults
TWISTED_CONCH_AVAILABLE = True
except ImportError:
TWI... | unknown | codeparrot/codeparrot-clean | ||
#include "test/jemalloc_test.h"
#include "jemalloc/internal/prof_data.h"
static void
mallctl_bool_get(const char *name, bool expected, const char *func, int line) {
bool old;
size_t sz;
sz = sizeof(old);
expect_d_eq(mallctl(name, (void *)&old, &sz, NULL, 0), 0,
"%s():%d: Unexpected mallctl failure reading %... | c | github | https://github.com/redis/redis | deps/jemalloc/test/unit/prof_active.c |
pr: 140198
summary: Preconditioning
area: Vector Search
type: enhancement
issues:
- 131223 | unknown | github | https://github.com/elastic/elasticsearch | docs/changelog/140198.yaml |
# -*- 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 | ||
"""Tests for unix_events.py."""
import collections
import gc
import errno
import io
import os
import pprint
import signal
import socket
import stat
import sys
import tempfile
import threading
import unittest
from unittest import mock
if sys.platform == 'win32':
raise unittest.SkipTest('UNIX only')
import asyncio... | unknown | codeparrot/codeparrot-clean | ||
# -*- test-case-name: twisted.mail.test.test_imap -*-
# Copyright (c) 2001-2010 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
An IMAP4 protocol implementation
@author: Jp Calderone
To do::
Suspend idle timeout while server is processing
Use an async message parser instead of buffering in memory
F... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package vault
import (
"net/http"
"strings"
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/logical"
)
const (
// Auth paths patterns
patternAuth = "auth$"
patternAuthTune = "auth/(?P<path>.+?)/tune$"
patte... | go | github | https://github.com/hashicorp/vault | vault/logical_system_paths.go |
# frozen_string_literal: true
module ActiveRecord
module AttributeMethods
# = Active Record Attribute Methods \Serialization
module Serialization
extend ActiveSupport::Concern
class ColumnNotSerializableError < StandardError
def initialize(name, type)
super <<~EOS
C... | ruby | github | https://github.com/rails/rails | activerecord/lib/active_record/attribute_methods/serialization.rb |
# 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 | ||
#
## Licensed to the .NET Foundation under one or more agreements.
## The .NET Foundation licenses this file to you under the MIT license.
## See the LICENSE file in the project root for more information.
#
#
#USAGE:
#Add Events: modify <root>src/vm/ClrEtwAll.man
#Look at the Code in <root>/src/scripts/genXplatLttng.... | unknown | codeparrot/codeparrot-clean | ||
<!--Copyright 2021 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | unknown | github | https://github.com/huggingface/transformers | docs/source/zh/main_classes/feature_extractor.md |
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "always"
},
"editor.renderWhitespace": "all",
"scss.validate": false,
"stylelint.enable": true,
"stylelint.validate": ["scss"]
} | json | github | https://github.com/twbs/bootstrap | .vscode/settings.json |
# This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | 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 applica... | python | github | https://github.com/tensorflow/tensorflow | tensorflow/lite/tools/visualize_test.py |
from __future__ import unicode_literals
from django.conf.urls import include, url
from django.core.urlresolvers import RegexURLResolver
from rest_framework.settings import api_settings
def apply_suffix_patterns(urlpatterns, suffix_pattern, suffix_required):
ret = []
for urlpattern in urlpatterns:
if ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os.path
import unittest
import datetime
from simiki.config import parse_config, get_default_config
test_path = os.path.dirname(os.path.abspath(__file__))
class TestParseConfig(unittest.TestCase):
def setUp(self):
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# coding=utf-8
# Mathieu Courtois - EDF R&D, 2013 - http://www.code-aster.org
"""
When a project has a lot of options the 'waf configure' command line can be
very long and it becomes a cause of error.
This tool provides a convenient way to load a set of configuration parameters
from a local file ... | 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 | ||
// Copyright 2004-present Facebook. All Rights Reserved.
#include <c10/util/irange.h>
#include <gtest/gtest.h>
#include <array>
using namespace ::testing;
TEST(irangeTest, range_test) {
std::vector<int> test_vec;
for (const auto i : c10::irange(4, 11)) {
test_vec.push_back(i);
}
const std::vector<int> ... | cpp | github | https://github.com/pytorch/pytorch | c10/test/util/irange_test.cpp |
import json
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.http import Http404
from django.test import TestCase
from django.test.client import RequestFactory
from django.test.utils import override_setting... | 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... | unknown | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/site/markdown/release/0.3.2/CHANGELOG.0.3.2.md |
{
"applyable": true,
"complete": true,
"configuration": {
"provider_config": {
"tfcoremock": {
"full_name": "registry.terraform.io/hashicorp/tfcoremock",
"name": "tfcoremock",
"version_constraint": "0.1.1"
}
},
"root_module": {
"resources": [
{
... | json | github | https://github.com/hashicorp/terraform | testing/equivalence-tests/outputs/simple_object_update/plan.json |
/* Copyright 2017 - 2025 R. Thomas
* Copyright 2017 - 2025 Quarkslab
*
* 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 req... | cpp | github | https://github.com/nodejs/node | deps/LIEF/src/MachO/CodeSignature.cpp |
""" Base setup """
import pytest
import numpy as np
from pandas.util import testing as tm
from pandas import DataFrame, MultiIndex
@pytest.fixture
def mframe():
index = MultiIndex(levels=[['foo', 'bar', 'baz', 'qux'], ['one', 'two',
'three']],
... | unknown | codeparrot/codeparrot-clean | ||
import unittest
import os
from skrf.media import DistributedCircuit
from skrf.network import Network
class MediaTestCase(unittest.TestCase):
'''
'''
def setUp(self):
'''
'''
self.files_dir = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
'qucs_prj... | unknown | codeparrot/codeparrot-clean | ||
# uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: dbrecio.py
"""
File-like objects that read from or write to a bsddb record.
This implements (nearly) all stdio methods.
f = DBRecIO(db, key, txn=Non... | unknown | codeparrot/codeparrot-clean | ||
<?php
namespace Illuminate\Testing\Fluent\Concerns;
use Closure;
use Illuminate\Support\Arr;
use PHPUnit\Framework\Assert as PHPUnit;
trait Has
{
/**
* Assert that the prop is of the expected size.
*
* @param string|int $key
* @param int|null $length
* @return $this
*/
publi... | php | github | https://github.com/laravel/framework | src/Illuminate/Testing/Fluent/Concerns/Has.php |
# 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 | ||
/**
* 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/test/java/org/apache/hadoop/fs/TestChecksumFileSystem.java |
#!/usr/bin/env python2
# Creates experiment with evo. algorithm
import re
import os
import shutil
import logging
import argparse
import ConfigParser
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
logging.basicConfig()
# Source files
src = ["ea.c", "ea.h", "main.c", "ca.c", "ca.h", "params.h", "ma... | unknown | codeparrot/codeparrot-clean | ||
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.db.models.fields import FieldDoesNotExist
from django.forms.models import (BaseModelForm, BaseModelFormSet, fields_for_model,
_get_foreign_key)
from django.contrib.admin.util import get_fields_from_path, NotRelationFiel... | unknown | codeparrot/codeparrot-clean | ||
import time, os, pickle, struct
from allmydata.storage.crawler import ShareCrawler
from allmydata.storage.shares import get_share_file
from allmydata.storage.common import UnknownMutableContainerVersionError, \
UnknownImmutableContainerVersionError
from twisted.python import log as twlog
class LeaseCheckingCrawle... | unknown | codeparrot/codeparrot-clean | ||
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.query_constructors.databricks_vector_search import (
DatabricksVectorSearchTranslator,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate ... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/langchain_classic/retrievers/self_query/databricks_vector_search.py |
#
# BitBake Graphical GTK User Interface
#
# Copyright (C) 2013 Intel Corporation
#
# Authored by Cristiana Voicu <cristiana.voicu@intel.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Fo... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.