code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
// 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 ).
//! Other Use Extensions is a list of extensions other than unicode,
//! transform or private.
//!
//! Those extensio... | rust | github | https://github.com/nodejs/node | deps/crates/vendor/icu_locale_core/src/extensions/other/mod.rs |
{% if field.use_fieldset %}
<fieldset{% if field.aria_describedby %} aria-describedby="{{ field.aria_describedby }}"{% endif %}>
{% if field.label %}{{ field.legend_tag }}{% endif %}
{% else %}
{% if field.label %}{{ field.label_tag }}{% endif %}
{% endif %}
{% if field.help_text %}<div class="helptext"{% if fiel... | html | github | https://github.com/django/django | django/forms/templates/django/forms/field.html |
"""
Indent the each enum item in the enum block.
== Violation ==
enum A {
A_A, <== Violation
A_B <== Violation
}
== Good ==
enum A {
A_A, <== Good
A_B
}
"""
from nsiqcppstyle_rulehelper import *
from nsiqcppstyle_reporter import *
from nsiqcppstyle_rulemanager import ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
import unittest
from mock import Mock
from xmodule.html_module import HtmlModule
from . import get_test_system
class HtmlModuleSubstitutionTestCase(unittest.TestCase):
descriptor = Mock()
def test_substitution_works(self):
sample_xml = '''%%USER_ID%%'''
module_data = {'data': sample_xml}
... | unknown | codeparrot/codeparrot-clean | ||
//===--- Compiler.cpp --------------------------------------------*- C++-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/clangd/Compiler.cpp |
from django.urls import re_path
from . import views
urlpatterns = [
re_path(
r"^more/(?P<extra>\w+)/$",
views.empty_view,
{"sub-extra": True},
name="inner-more",
),
] | python | github | https://github.com/django/django | tests/urlpatterns/more_urls.py |
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2011 OpenERP S.A. (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it an... | unknown | codeparrot/codeparrot-clean | ||
# -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*-
#
# Copyright (C) 2006 Adam Zimmerman <adam_zimmerman@sfu.ca>
# Copyright (C) 2006 James Livingston <doclivingston@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Publi... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# coding: utf-8
import tempfile
import subprocess
from os.path import dirname
from sklearn.base import BaseEstimator, ClusterMixin
from sklearn.utils import check_random_state, check_symmetric
from sklearn.utils.validation import check_array
from sklearn.metrics.pairwise import pairwise_kernels
f... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env bash
set -eu
python.py world.py | unknown | github | https://github.com/ansible/ansible | test/integration/targets/ansible-test-coverage/ansible_collections/ns/col/tests/integration/targets/hello/runme.sh |
"""Module defining the interface for training algorithms."""
from pylearn2.datasets.dataset import Dataset
class TrainingAlgorithm(object):
"""
An abstract superclass that defines the interface of training
algorithms.
"""
def _register_update_callbacks(self, update_callbacks):
"""
... | unknown | codeparrot/codeparrot-clean | ||
"""Nearest Neighbor Regression"""
# Authors: Jake Vanderplas <vanderplas@astro.washington.edu>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Sparseness support by Lars Buitinck
# Multi-output support by Arnaud Joly <a.joly@ulg.ac... | unknown | codeparrot/codeparrot-clean | ||
"""
==============================================
Face completion with a multi-output estimators
==============================================
This example shows the use of multi-output estimator to complete images.
The goal is to predict the lower half of a face given its upper half.
The first column of images sho... | python | github | https://github.com/scikit-learn/scikit-learn | examples/miscellaneous/plot_multioutput_face_completion.py |
# 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 | ||
"""
WSGI config for ahha project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` set... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011-2013 Codernity (http://codernity.com)
#
# 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/L... | unknown | codeparrot/codeparrot-clean | ||
# -*- 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 | ||
"""ndg_httpsclient HTTPS module containing PyOpenSSL implementation of
httplib.HTTPSConnection
PyOpenSSL utility to make a httplib-like interface suitable for use with
urllib2
"""
__author__ = "P J Kershaw (STFC)"
__date__ = "09/12/11"
__copyright__ = "(C) 2012 Science and Technology Facilities Council"
__license__ = ... | unknown | codeparrot/codeparrot-clean | ||
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may n... | java | github | https://github.com/apache/kafka | clients/src/test/java/org/apache/kafka/common/requests/TxnOffsetCommitResponseTest.java |
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 10 17:53:38 2014
@author: Toberer Lab
"""
import sys
import traceback
import logging
def setup_logging_to_file(filename):
logging.basicConfig( filename=filename,
filemode='a',
level=logging.DEBUG,
... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/sh
test_description='reset --pathspec-from-file'
. ./test-lib.sh
test_tick
test_expect_success setup '
echo A >fileA.t &&
echo B >fileB.t &&
echo C >fileC.t &&
echo D >fileD.t &&
git add . &&
git commit --include . -m "Commit" &&
git tag checkpoint
'
restore_checkpoint () {
git reset --hard checkpoi... | unknown | github | https://github.com/git/git | t/t7107-reset-pathspec-file.sh |
"""
NTLM authenticating pool, contributed by erikcederstran
Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""
from __future__ import absolute_import
from logging import getLogger
from ntlm import ntlm
from .. import HTTPSConnectionPool
from ..packages.six.moves.http_client import HTTPSConnecti... | 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... | json | github | https://github.com/apache/kafka | clients/src/test/resources/common/message/SimpleArraysMessage.json |
# (c) 2015, Ansible 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 di... | python | github | https://github.com/ansible/ansible | lib/ansible/plugins/action/package.py |
# -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2018 The gPodder Team
#
# gPodder 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 Licens... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2019 Ericsson
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | unknown | codeparrot/codeparrot-clean | ||
//
// system_executor.hpp
// ~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot 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)
//
#ifndef BOOST_ASIO_SYSTEM_EXE... | unknown | github | https://github.com/mysql/mysql-server | extra/boost/boost_1_87_0/boost/asio/system_executor.hpp |
//go:build linux
package nftabler
import (
"context"
"fmt"
"net/netip"
"strings"
"github.com/moby/moby/v2/daemon/libnetwork/drivers/bridge/internal/firewaller"
"github.com/moby/moby/v2/daemon/libnetwork/internal/nftables"
)
func (n *network) AddEndpoint(ctx context.Context, epIPv4, epIPv6 netip.Addr) error {
... | go | github | https://github.com/moby/moby | daemon/libnetwork/drivers/bridge/internal/nftabler/endpoint.go |
from __future__ import (absolute_import, division, print_function)
from owslib.util import nspath_eval
from owslib.namespaces import Namespaces
from owslib.util import testXMLAttribute, testXMLValue, InfiniteDateTime, NegativeInfiniteDateTime
from dateutil import parser
from datetime import timedelta
from owslib.etr... | unknown | codeparrot/codeparrot-clean | ||
# CC installer network interfaces tooling
#
# Copyright (C) 2014 Mathilde Ffrench
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) ... | unknown | codeparrot/codeparrot-clean | ||
use rustc_ast::token;
use rustc_ast::tokenstream::{DelimSpacing, DelimSpan, Spacing, TokenStream, TokenTree};
use rustc_errors::ErrorGuaranteed;
use rustc_expand::base::{AttrProcMacro, ExtCtxt};
use rustc_span::Span;
use rustc_span::symbol::{Ident, Symbol, kw};
pub(crate) struct ExpandRequires;
pub(crate) struct Expa... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_builtin_macros/src/contracts.rs |
# -*- coding:utf-8 -*-
from ...errors.saklientexception import SaklientException
from ..client import Client
from .resource import Resource
from ...util import Util
import saklient
# module saklient.cloud.resources.licenseinfo
class LicenseInfo(Resource):
## ライセンス種別情報。
# (instance field) m_id
# (instan... | unknown | codeparrot/codeparrot-clean | ||
from core.engine.hplayer import HPlayer2
from core.engine import network
import os, sys, types, platform
# DIRECTORY / FILE
profilename = os.path.basename(__file__).split('.')[0]
base_path = ['/data/sync/'+profilename, '/data/usb']
# INIT HPLAYER
hplayer = HPlayer2(base_path, "/data/hplayer2-"+profilename+".cfg")
#... | unknown | codeparrot/codeparrot-clean | ||
import subprocess, re, os
def RunGetOutput(cmd,chk_err=True):
try:
output=subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
except subprocess.CalledProcessError,e :
if chk_err :
print('CalledProcessError. Error Code is ' + str(e.returncode) )
print('CalledProcessError. Command string was ... | 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/main/java/org/apache/kafka/common/security/oauthbearer/internals/secured/assertion/AssertionJwtTemplate.java |
"""A Python class hierarchy wrapping the StGit on-disk metadata."""
import os.path
from stgit import exception, utils
from stgit.lib import git, stackupgrade
from stgit.config import config
class StackException(exception.StgException):
"""Exception raised by L{stack} objects."""
class Patch(object):
"""Repre... | unknown | codeparrot/codeparrot-clean | ||
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import unittest
from django.conf import settings
from django.core.checks import Error
from django.db import models, connections
from django.test.utils import override_settings
from .base import IsolatedModelsTestCase
def get_max_column_name_length():... | unknown | codeparrot/codeparrot-clean | ||
#define TORCH_ASSERT_NO_OPERATORS
#include <ATen/Dispatch.h>
#include <ATen/Parallel.h>
#include <ATen/native/CPUBlas.h>
#include <ATen/native/cpu/zmath.h>
#include <ATen/native/cpu/ReducedPrecisionFloatGemvFastPathKernel.h>
#include <c10/util/irange.h>
#include <c10/util/Unroll.h>
#if !defined(C10_MOBILE)
namespace a... | cpp | github | https://github.com/pytorch/pytorch | aten/src/ATen/native/cpu/BlasKernel.cpp |
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | c | github | https://github.com/llvm/llvm-project | clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.h |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.net>
# 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | unknown | codeparrot/codeparrot-clean | ||
'''Kernel Ridge Regression for local non-parametric regression'''
import numpy as np
from scipy import spatial as ssp
from numpy.testing import assert_equal
import matplotlib.pylab as plt
def plt_closeall(n=10):
'''close a number of open matplotlib windows'''
for i in range(n): plt.close()
def kernel_rbf(x,y... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-framework | spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java |
#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import pickle
import re
import simplejson
import pyauto_functional # Must be imported before pyauto
impo... | unknown | codeparrot/codeparrot-clean | ||
from openai import AzureOpenAI
# may change in the future
# https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#rest-api-versioning
api_version = "2023-07-01-preview"
# gets the API Key from environment variable AZURE_OPENAI_API_KEY
client = AzureOpenAI(
api_version=api_version,
# https://lea... | python | github | https://github.com/openai/openai-python | examples/azure.py |
import os
import sysconfig
import unittest
try:
from _testinternalcapi import perf_map_state_teardown, write_perf_map_entry
except ImportError:
raise unittest.SkipTest("requires _testinternalcapi")
def supports_trampoline_profiling():
perf_trampoline = sysconfig.get_config_var("PY_HAVE_PERF_TRAMPOLINE")
... | python | github | https://github.com/python/cpython | Lib/test/test_perfmaps.py |
// mksyscall_libc.pl -solaris -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go
// Code generated by the command above; DO NOT EDIT.
//go:build solaris && amd64
package syscall
import "unsafe"
//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
//go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so... | go | github | https://github.com/golang/go | src/syscall/zsyscall_solaris_amd64.go |
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// ... | c | github | https://github.com/opencv/opencv | 3rdparty/protobuf/src/google/protobuf/inlined_string_field.h |
"""distutils.command.install_headers
Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory."""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id: install_headers.py 37828 2004-11-10 22:23:15Z loewis $"
import os
from distutils.co... | unknown | codeparrot/codeparrot-clean | ||
"""Tests for polyutils module.
"""
import numpy as np
import numpy.polynomial.polyutils as pu
from numpy.testing import (
assert_almost_equal, assert_raises, assert_equal, assert_,
)
class TestMisc:
def test_trimseq(self):
for i in range(5):
tgt = [1]
res = pu.trimseq([1] ... | unknown | codeparrot/codeparrot-clean | ||
# Engine API
[](https://pkg.go.dev/github.com/moby/moby/api)

[](https://goreportcard.com/report/github.com/moby/moby... | unknown | github | https://github.com/moby/moby | api/README.md |
"""Kept for backwards compatibility."""
from langchain_text_splitters import (
Language,
RecursiveCharacterTextSplitter,
TextSplitter,
Tokenizer,
TokenTextSplitter,
)
from langchain_text_splitters.base import split_text_on_tokens
from langchain_text_splitters.character import CharacterTextSplitter
... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/langchain_classic/text_splitter.py |
"""
Models for bulk email
WE'RE USING MIGRATIONS!
If you make changes to this model, be sure to create an appropriate migration
file and check it in at the same time as your model changes. To do that,
1. Go to the edx-platform dir
2. ./manage.py lms schemamigration bulk_email --auto description_of_your_change
3. Add... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.util;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import s... | java | github | https://github.com/mockito/mockito | mockito-core/src/test/java/org/mockito/internal/util/MockUtilTest.java |
# -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2014 Vincent Jacques <vincent@vincent-ja... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# (c) 2018, NetApp, Inc
# 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
"""
OpenAPI spec version:
Generated by: https://github.com/swagger-api/swagger-codegen.git
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.... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package mssql
import (
"context"
"database/sql"
"fmt"
"regexp"
"sort"
"strconv"
"strings"
"time"
metrics "github.com/armon/go-metrics"
_ "github.com/denisenkom/go-mssqldb"
log "github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-s... | go | github | https://github.com/hashicorp/vault | physical/mssql/mssql.go |
#!/usr/bin/env python
"""
Spacewalk external inventory script
=================================
Ansible has a feature where instead of reading from /etc/ansible/hosts
as a text file, it can query external programs to obtain the list
of hosts, groups the hosts are in, and even variables to assign to each host.
To use... | 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 us... | unknown | codeparrot/codeparrot-clean | ||
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import matplotlib.patches as patches
from matplotlib.ticker import FormatStrFormatter
import matplotlib as mpl
mpl.style.use('classic') # Use Matplotlib v1 defaults (plot was designed on this!)
mpl.rc('text', usetex=True)
from cycler import cycler... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# 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 distribut... | unknown | codeparrot/codeparrot-clean | ||
"""
=================================
Compare BIRCH and MiniBatchKMeans
=================================
This example compares the timing of Birch (with and without the global
clustering step) and MiniBatchKMeans on a synthetic dataset having
100,000 samples and 2 features generated using make_blobs.
If ``n_clusters... | unknown | codeparrot/codeparrot-clean | ||
"""Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
"""
import collections as _collections
from google.protobuf import text_format as _text_format
from tensorflow.core.framework import op_def_pb2 as _op_def_pb2
# Needed to trigger the call to _set_call_cpp_shape_fn.
from tensorfl... | unknown | codeparrot/codeparrot-clean | ||
DEBUG = False
# 6.00 Problem Set 5
# RSS Feed Filter
import feedparser
import string
import re
import time
import copy
from project_util import translate_html
from news_gui import Popup
#-----------------------------------------------------------------------
#
# Problem Set 5
#======================
# Code for retr... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
# Copyright 2015 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)
import os
from textw... | unknown | codeparrot/codeparrot-clean | ||
#
# Copyright (c) 2008--2016 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2011 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 law or a... | unknown | codeparrot/codeparrot-clean | ||
import * as React from "react";
import type {
UNSAFE_AssetsManifest as AssetsManifest,
UNSAFE_RouteModules as RouteModules,
DataRouter,
HydrationState,
RouterInit,
ClientOnErrorFunction,
} from "react-router";
import {
UNSAFE_getHydrationData as getHydrationData,
UNSAFE_invariant as invariant,
UNSAFE... | typescript | github | https://github.com/remix-run/react-router | packages/react-router/lib/dom-export/hydrated-router.tsx |
// Copyright 2023 The etcd 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 t... | go | github | https://github.com/etcd-io/etcd | client/pkg/transport/keepalive_listener_openbsd.go |
module.exports = "fail"; | javascript | github | https://github.com/webpack/webpack | test/cases/context/ignore-hidden-files/folder/.file.js |
#include "test/jemalloc_test.h"
#define N_PTRS 3
static void
test_combinations(szind_t ind, size_t sizes_array[N_PTRS],
int flags_array[N_PTRS]) {
#define MALLCTL_STR_LEN 64
assert(opt_prof && opt_prof_stats);
char mallctl_live_str[MALLCTL_STR_LEN];
char mallctl_accum_str[MALLCTL_STR_LEN];
if (ind < SC_NBINS... | c | github | https://github.com/redis/redis | deps/jemalloc/test/unit/prof_stats.c |
"""
$Id: win32dns.py,v 1.3.2.1 2007/05/22 20:26:49 customdesigned Exp $
Extract a list of TCP/IP name servers from the registry 0.1
0.1 Strobl 2001-07-19
Usage:
RegistryResolve() returns a list of ip numbers (dotted quads), by
scouring the registry for addresses of name servers
Tested on Windows NT4 S... | unknown | codeparrot/codeparrot-clean | ||
# Status: ported.
# Base revision: 64488.
#
# Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice appears in
# all copies. This software is provided "as is" without express or implied
# warranty, and with no claim as to its... | unknown | codeparrot/codeparrot-clean | ||
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | unknown | codeparrot/codeparrot-clean | ||
##############################################################################
#
# 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 Affero General Public L... | unknown | codeparrot/codeparrot-clean | ||
# Swift Binary Serialization Format
The fundamental unit of distribution for Swift code is a *module.* A module
contains declarations as an interface for clients to write code against. It may
also contain implementation information for any of these declarations that can
be used to optimize client code. Conceptually, t... | unknown | github | https://github.com/apple/swift | docs/Serialization.md |
"""
These are tests for the refactored choicemodels MNL codebase.
"""
import numpy as np
import pandas as pd
import pytest
from pandas.testing import assert_frame_equal
from patsy import dmatrix
from choicemodels import MultinomialLogit
from choicemodels.tools import MergedChoiceTable
@pytest.fixture
def obs():
... | unknown | codeparrot/codeparrot-clean | ||
import asyncio
import enum
import logging
from collections import defaultdict
from multidict import CIMultiDict
from async_timeout import timeout as Timeout
from . import utils
from .message import Request, Response
from .transaction import UnreliableTransaction, ProxyTransaction
from .auth import Auth
LOG = loggin... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package gcp
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"time"
cleanhttp "github.com/hashicorp/go-cleanhttp"
"github.com/hashicorp/go-gcp-common/gcputil"
hclog "github.com/hashicorp/go-hclog"
"github.com/hashicorp... | go | github | https://github.com/hashicorp/vault | command/agentproxyshared/auth/gcp/gcp.go |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import unittest, frappe
from frappe.test_runner import make_test_records
make_test_records("User")
make_test_records("Email Account")
class TestEmail(unittest.TestCase):
def s... | unknown | codeparrot/codeparrot-clean | ||
import datetime
from django.contrib.sites.models import Site
from django.http import Http404
from django.template import TemplateDoesNotExist
from django.test import RequestFactory, TestCase
from django.test.utils import override_settings
from django.views.defaults import (
bad_request,
page_not_found,
per... | python | github | https://github.com/django/django | tests/view_tests/tests/test_defaults.py |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
/*
* 'OpenSSL for Ruby' project
* Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
*
* All rights reserved.
*
* This program is licensed under the same licence as Ruby.
* (See the file 'COPYING'.)
*/
#include "ossl.h"
static VALUE mRandom;
static VALUE eRandomError;
/*
* call-seq:
* seed(str)... | c | github | https://github.com/ruby/ruby | ext/openssl/ossl_rand.c |
import pandas
df = pandas.read_csv("perf.csv")
ops = pandas.unique(df["operator"])
nops = len(ops)
pivot_op_shape = df.pivot_table(
values="time", index=["operator", "shape"], columns=["fuser"]
)
pivot_speedups = (pivot_op_shape.T / pivot_op_shape["eager"]).T
import matplotlib.pyplot as plt
plt.rcParams["figure... | python | github | https://github.com/pytorch/pytorch | benchmarks/fuser/plot_speedups.py |
# Jacobi computation, using persitent requests
from mpi4py import MPI
try:
import numpy
except ImportError:
raise SystemExit
n = 5 * MPI.COMM_WORLD.Get_size()
# compute number of processes and myrank
p = MPI.COMM_WORLD.Get_size()
myrank = MPI.COMM_WORLD.Get_rank()
# compute size of local block
m = n/p
if my... | unknown | codeparrot/codeparrot-clean | ||
"""
Hash implementations for Numba types
"""
import math
import numpy as np
import sys
import ctypes
import warnings
from collections import namedtuple
import llvmlite.binding as ll
import llvmlite.llvmpy.core as lc
from llvmlite import ir
from numba.core.extending import (
overload, overload_method, intrinsic, ... | unknown | codeparrot/codeparrot-clean | ||
from configparser import SafeConfigParser
import logging
class botcfgreader(object):
def __init__(self,filename):
self.__filename = filename
self.__client_secret = None
self.__client_id = None
self.__debug = None
self.__logfile = None
self.__subreddits = list()
self.__jindex = None
self.__upvotes = N... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
***************************************************************************
QtSql.py
---------------------
Date : March 2016
Copyright : (C) 2016 by Juergen E. Fischer
Email : jef at norbit dot de
********************************... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
# Copyright 2015 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)
import os
import uni... | unknown | codeparrot/codeparrot-clean | ||
import re
import cStringIO
import functools
import pycurl
def slow_writer(f, buf):
from time import sleep
sleep(0.1)
f.write(buf)
def download(url, destination, follow_redirects=False, request_timeout=600):
_error = _effective_url = None
with open(destination, 'wb') as destination_file:
hd... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2016 Hewlett Packard Enterprise Development Company LP
# Copyright (c) 2016 Cray 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/LIC... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015 Rackspace Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/brcm,bcm6328-gpio-sysctl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom BCM6328 GPIO System Controller
maintainers:
- Álvaro Fernández Rojas <noltari@gmail.com>
- Jonas Gors... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/mfd/brcm,bcm6328-gpio-sysctl.yaml |
# -*- 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 | ||
[
{
"targets": ["localhost:9090", "example.org:443"],
"labels": {
"foo": "bar"
}
},
{
"targets": ["my.domain"]
}
] | json | github | https://github.com/prometheus/prometheus | discovery/file/fixtures/valid.json |
import time
import fnmatch
import logging
import collections
import regex
import synapse.exc as s_exc
import synapse.common as s_common
import synapse.lib.auth as s_auth
import synapse.lib.tufo as s_tufo
import synapse.lib.cache as s_cache
import synapse.lib.syntax as s_syntax
import synapse.lib.interval as s_interv... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2021 The etcd 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 t... | go | github | https://github.com/etcd-io/etcd | server/etcdserver/api/membership/store.go |
{
"favorite": {
"favoriteDags_one": "第 {{ count }} 个收藏的 Dag",
"favoriteDags_other": "前 {{ count }} 个收藏的 Dag",
"noDagRuns": "此 Dag 尚未被触发过。",
"noFavoriteDags": "尚无收藏的 Dag。请点击 Dag 列表旁的星号图示,将 Dag 加入收藏。"
},
"group": "分组",
"health": {
"dagProcessor": "Dag 处理器",
"health": "健康状态",
"healthy":... | json | github | https://github.com/apache/airflow | airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dashboard.json |
#
# Copyright 2009 Red Hat, Inc.
# Cole Robinson <crobinso@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later versi... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.