code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import unicode_literals
import json
from monty.json import MontyEncoder, MontyDecoder
from pymatgen.core.composition import Composition
from monty.json import MSONable
"""
This module implem... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
"""Let's Encrypt Apache configuration submission script"""
import argparse
import atexit
import contextlib
import os
import re
import shutil
import subprocess
import sys
import tarfile
import tempfile
import textwrap
_DESCRIPTION = """
Let's Help is a simple script you can run to help out the Let... | unknown | codeparrot/codeparrot-clean | ||
""" run test suites written for nose. """
import sys
import py
import pytest
from _pytest import unittest
def get_skip_exceptions():
skip_classes = set()
for module_name in ('unittest', 'unittest2', 'nose'):
mod = sys.modules.get(module_name)
if hasattr(mod, 'SkipTest'):
skip_clas... | unknown | codeparrot/codeparrot-clean | ||
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#include "../precomp.hpp"
#include "../usac.hpp"
#if defined(HAVE_EIGEN)
#include <Eigen/Eigen>
#elif defined(HAVE_LAPACK)
#i... | cpp | github | https://github.com/opencv/opencv | modules/calib3d/src/usac/essential_solver.cpp |
"""Cache lines from files.
This is intended to read lines from modules imported -- hence if a filename
is not found, it will look down the module search path for a file by
that name.
"""
import sys
import os
__all__ = ["getline", "clearcache", "checkcache"]
def getline(filename, lineno, module_globals=None):
li... | unknown | codeparrot/codeparrot-clean | ||
# This file was taken from https://bitbucket.org/lgs/pyramidsaml2/overview
# this was modified from django to pyramid and then to nothing.
#
# Original copyright and licence
# Copyright (C) 2011-2012 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2010 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# Licensed... | unknown | codeparrot/codeparrot-clean | ||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.ap... | unknown | codeparrot/codeparrot-clean | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
import logging
from typing import TYPE_CHECKING, List, Union, Mapping, Optional, cast
from typing_extensions import Literal, overload, assert_never
import httpx
from ... import _legacy_response
f... | python | github | https://github.com/openai/openai-python | src/openai/resources/audio/transcriptions.py |
# encoding: utf-8
"""
Custom element classes for shape-related elements like ``<w:inline>``
"""
from docx.oxml.shared import (
nsmap, nspfxmap, OxmlBaseElement, OxmlElement, qn
)
from docx.shared import Emu
class CT_Blip(OxmlBaseElement):
"""
``<a:blip>`` element, specifies image source and adjustments s... | unknown | codeparrot/codeparrot-clean | ||
// SPDX-License-Identifier: GPL-2.0
#include <linux/bug.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/gfp_types.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/of_address.h>
#include <linux/types.h>
enum devm_ioremap_type {
DEVM_IOREMAP = 0,
DEVM_I... | c | github | https://github.com/torvalds/linux | lib/devres.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 | ||
"""Tests suite for Period handling.
Parts derived from scikits.timeseries code, original authors:
- Pierre Gerard-Marchant & Matt Knox
- pierregm_at_uga_dot_edu - mattknow_ca_at_hotmail_dot_com
"""
from datetime import datetime, date, timedelta
from numpy.ma.testutils import assert_equal
from pandas import Timesta... | unknown | codeparrot/codeparrot-clean | ||
import torch
from functools import reduce
from .optimizer import Optimizer
class LBFGS(Optimizer):
"""Implements L-BFGS algorithm.
.. warning::
This optimizer doesn't support per-parameter options and parameter
groups (there can be only one).
.. warning::
Right now all parameters ... | unknown | codeparrot/codeparrot-clean | ||
"""
***********
Evaluations
***********
An evaluation_ object represents a collection of Synapse Entities that will be
processed in a particular way. This could mean scoring Entries in a challenge
or executing a processing pipeline.
Imports::
from synapseclient import Evaluation, Submission, SubmissionStatus
E... | unknown | codeparrot/codeparrot-clean | ||
import unittest
from exonum_client import ExonumClient
from exonum_client.crypto import KeyPair
from exonum_launcher.configuration import Configuration
from exonum_launcher.launcher import Launcher
from suite import (
assert_processes_exited_successfully,
run_4_nodes,
wait_network_to_start,
ExonumCryp... | unknown | codeparrot/codeparrot-clean | ||
# Authors: The scikit-learn developers
# SPDX-License-Identifier: BSD-3-Clause | python | github | https://github.com/scikit-learn/scikit-learn | sklearn/cluster/_hdbscan/__init__.py |
from __future__ import unicode_literals
import re
import warnings
from django.core.exceptions import ImproperlyConfigured
from django.core.mail import send_mail
from django.core import validators
from django.db import models
from django.db.models.manager import EmptyManager
from django.utils.crypto import get_random_s... | unknown | codeparrot/codeparrot-clean | ||
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* algif_aead: User-space interface for AEAD algorithms
*
* Copyright (C) 2014, Stephan Mueller <smueller@chronox.de>
*
* This file provides the user-space API for AEAD ciphers.
*
* The following concept of the memory management is used:
*
* The kernel maintains t... | c | github | https://github.com/torvalds/linux | crypto/algif_aead.c |
/* 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 applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/compiler/mlir/stablehlo/transforms/legalize_tf_passes.h |
import socket
import struct
import logging
import datetime
import os
import signal
from Crypto.Cipher import XOR
ECHO_REPLY = 0
ECHO_REQUEST = 8
PORT = 14900
def set_logger(log_file_name):
"""
Установка нужных настроек логирования
:param log_file_name: имя файла-лога
:return: -
"""
logging.bas... | unknown | codeparrot/codeparrot-clean | ||
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\... | c | github | https://github.com/curl/curl | lib/multi_ntfy.c |
from __future__ import print_function
import argparse
from functools import partial
def keep_line(line, pos_cols, region):
fields = line.rstrip().split(b'\t')
if fields[pos_cols[0]] == region[0]: # same chromosome
if (
region[1] < int(fields[pos_cols[1]]) < region[2]
) or (
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2009-2012 VMware, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
import XCTest
@testable import Tauri
final class TauriTests: XCTestCase {
func testExample() throws {
// This is an example of a functional test case.
// Use... | swift | github | https://github.com/tauri-apps/tauri | crates/tauri/mobile/ios-api/Tests/TauriTests/TauriTests.swift |
# encoding: utf-8
# module PyQt4.QtNetwork
# from /usr/lib/python3/dist-packages/PyQt4/QtNetwork.cpython-34m-x86_64-linux-gnu.so
# by generator 1.135
# no doc
# imports
import PyQt4.QtCore as __PyQt4_QtCore
from .QHttpHeader import QHttpHeader
class QHttpRequestHeader(QHttpHeader):
"""
QHttpRequestHeader()
... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
# :markup: markdown
module ActionController
def self.deprecator # :nodoc:
AbstractController.deprecator
end
end | ruby | github | https://github.com/rails/rails | actionpack/lib/action_controller/deprecator.rb |
// Code generated by mkmalloc.go; DO NOT EDIT.
// See overview in malloc_stubs.go.
package runtime
import (
"internal/goarch"
"internal/goexperiment"
"internal/runtime/sys"
"unsafe"
)
func mallocgcSmallScanNoHeaderSC1(size uintptr, typ *_type, needzero bool) unsafe.Pointer {
if doubleCheckMalloc {
if gcphase... | go | github | https://github.com/golang/go | src/runtime/malloc_generated.go |
import logging
from contextlib import contextmanager
from io import StringIO
from admin_scripts.tests import AdminScriptTestCase
from django.conf import settings
from django.core import mail
from django.core.files.temp import NamedTemporaryFile
from django.core.management import color
from django.db import connection... | unknown | codeparrot/codeparrot-clean | ||
"""
A class for storing a tree graph. Primarily used for filter constructs in the
ORM.
"""
import copy
class Node(object):
"""
A single internal node in the tree graph. A Node should be viewed as a
connection (the root) with the children being either leaf nodes or other
Node instances.
"""
# S... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package arguments
import (
"strings"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/hashicorp/terraform/internal/addrs"
"github.com/hashicorp/terraform/internal/plans"
)
func TestParseApply_basic... | go | github | https://github.com/hashicorp/terraform | internal/command/arguments/apply_test.go |
import logging
logging.basicConfig(level=logging.DEBUG)
import os
from threading import Event
from slack_sdk.web import WebClient
from slack_sdk.socket_mode.response import SocketModeResponse
from slack_sdk.socket_mode.request import SocketModeRequest
from slack_sdk.socket_mode.websocket_client import SocketModeClien... | unknown | codeparrot/codeparrot-clean | ||
"""Support for media browsing."""
from contextlib import suppress
import logging
import urllib.parse
from homeassistant.components.media_player import BrowseMedia
from homeassistant.components.media_player.const import (
MEDIA_CLASS_DIRECTORY,
MEDIA_TYPE_ALBUM,
)
from homeassistant.components.media_player.erro... | unknown | codeparrot/codeparrot-clean | ||
from oauth2client.client import flow_from_clientsecrets
from django.conf import settings
ADMIN_GOOGLE_ANALYTICS = {
'client_secrets' : '',
'token_file_name' : '',
'profile_id' : '',
'admin_root_url' : 'http://localhost:8000/admin/',
'interval' : 30 #how many days back should we look for data?
}
tr... | 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 Link from "next/link";
import Image from "next/image";
export default function PostPreviewCondensed({
title,
coverImage,
coverImageAlt,
excerpt,
slug,
}) {
return (
<div className="col-lg-4 col-md-8 col-sm-10">
<div className="single-blog">
{coverImage && (
<div className... | javascript | github | https://github.com/vercel/next.js | examples/cms-buttercms/components/blog/post-preview-condensed.js |
"""Module for testing long and long raw variables."""
import sys
class TestLongVar(BaseTestCase):
def __PerformTest(self, a_Type, a_InputType):
self.cursor.execute("truncate table Test%ss" % a_Type)
longString = ""
for i in range(1, 11):
char = chr(ord('A') + i - 1)
... | unknown | codeparrot/codeparrot-clean | ||
Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\ModernBundle\src\Entity\ModernPerson:
properties:
age:
- GreaterThan:
value: 18 | unknown | github | https://github.com/symfony/symfony | src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/ModernBundle/config/validation.yaml |
import unittest
from hearthbreaker.cards import Wisp, WarGolem, BloodfenRaptor, RiverCrocolisk, AbusiveSergeant, ArgentSquire
from tests.agents.trade.test_helpers import TestHelpers
from tests.agents.trade.test_case_mixin import TestCaseMixin
from hearthbreaker.agents.trade.possible_play import PossiblePlays
class Tes... | unknown | codeparrot/codeparrot-clean | ||
#ifndef OPT_COSTCONSTANTS_INCLUDED
#define OPT_COSTCONSTANTS_INCLUDED
/*
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 Foundat... | c | github | https://github.com/mysql/mysql-server | sql/opt_costconstants.h |
import unittest
from csrv.model import cards
from csrv.model import deck
from csrv.model import events
from csrv.model import game
from csrv.model import premade_decks
from csrv.model import test_base
from csrv.model import timing_phases
from csrv.model.cards import corp
from csrv.model.cards.runner import card01010
c... | unknown | codeparrot/codeparrot-clean | ||
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... | cpp | github | https://github.com/opencv/opencv | modules/core/src/tables.cpp |
from __future__ import unicode_literals
from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.tokens import default_token_generator
from django.db.models import Q
from django.utils.http import base36_to_int
from mezzanine.utils.models import get_user_model
User = get_user_model()
class Mezza... | unknown | codeparrot/codeparrot-clean | ||
# This file is a part of MediaDrop (http://www.mediadrop.net),
# Copyright 2009-2015 MediaDrop contributors
# For the exact contribution history, see the git revision log.
# The source code contained in this file is licensed under the GPLv3 or
# (at your option) any later version.
# See LICENSE.txt in the main project ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2020 kubeflow.org.
#
# 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,... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright (c) 2012, Cloudscaling
# 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... | unknown | codeparrot/codeparrot-clean | ||
use std::borrow::Borrow;
use std::collections::hash_map::Entry;
use std::fs::File;
use std::io::{Read, Seek, Write};
use std::path::{Path, PathBuf};
use std::sync::Arc;
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
use rustc_data_structures::memmap::{Mmap, MmapMut};
use rustc_data_structures::sync::{par_for... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_metadata/src/rmeta/encoder.rs |
"""Temporary location for setup-multiversion constants."""
USE_EXISTING_RELEASES_FILE = False | python | github | https://github.com/mongodb/mongo | buildscripts/resmokelib/multiversionsetupconstants.py |
class FileSystemError(Exception):
pass
class NodeDoesNotExistError(FileSystemError):
pass
class SourceNodeDoesNotExistError(NodeDoesNotExistError, FileSystemError):
pass
class DestinationNodeDoesNotExistError(NodeDoesNotExistError, FileSystemError):
pass
class FileSystemMountError(FileSystemError):
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import os
class Maker(Package):
"""MAKER is a portable and easily configurable genome annotation ... | unknown | codeparrot/codeparrot-clean | ||
"""
sentry.models.releasefile
~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2015 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.db import models
from hashlib import sha1
from sentry.db.models import FlexibleForei... | unknown | codeparrot/codeparrot-clean | ||
# revlog.py - storage back-end for mercurial
#
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
"""Storage back-end for Mercurial.
This provides efficient delta storage with O(1... | unknown | codeparrot/codeparrot-clean | ||
from app.config.cplog import CPLog
from app.lib.provider.yarr.base import torrentBase
from imdb.parser.http.bsouplxml._bsoup import SoupStrainer, BeautifulSoup
from urllib import quote_plus
from urllib2 import URLError
import time
import urllib
import urllib2
log = CPLog(__name__)
class x264(torrentBase):
"""Prov... | unknown | codeparrot/codeparrot-clean | ||
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Semantic Segmentation Example</title>
<link href="js_example_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Semantic Segmentation Example</h2>
<p>
This tutorial shows you how to write an semantic segmentation example with O... | html | github | https://github.com/opencv/opencv | doc/js_tutorials/js_assets/js_semantic_segmentation.html |
# الفلسفة
تُعد 🤗 Transformers مكتبة برمجية ذات رؤية واضحة صُممت من أجل:
- الباحثون والمُتعلّمون في مجال التعلم الآلي ممن يسعون لاستخدام أو دراسة أو تطوير نماذج Transformers واسعة النطاق.
- مُطبّقي تعلم الآلة الذين يرغبون في ضبط تلك النماذج أو تشغيلها في بيئة إنتاجية، أو كليهما.
- المهندسون الذين يريدون فقط تنزيل نمو... | unknown | github | https://github.com/huggingface/transformers | docs/source/ar/philosophy.md |
# Copyright (c) 2011 Zadara Storage Inc.
# Copyright (c) 2011 OpenStack Foundation
# Copyright 2011 University of Southern California
# 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
#
... | unknown | codeparrot/codeparrot-clean | ||
//===--- OverloadChoice.h - A Choice from an Overload Set ------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | c | github | https://github.com/apple/swift | include/swift/Sema/OverloadChoice.h |
"""
Tests suite for the views of the log watcher app.
"""
from django.conf import settings
from django.test import TestCase, Client
from django.core.urlresolvers import reverse
from django.contrib.auth import get_user_model
from ..models import LogEvent
from ..constants import (LOG_EVENT_LOGIN_SUCCESS,
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# get_base_info.py, part for evparse : EisF Video Parse, evdh Video Parse.
# get_base_info: evparse/lib/sohu
# version 0.1.0.0 test201505032157
# author sceext <sceext@foxmail.com> 2009EisF2015, 2015.05.
# copyright 2015 sceext
#
# This is FREE SOFTWARE, released under GNU GPLv3+
# please see RE... | unknown | codeparrot/codeparrot-clean | ||
/*
A thread interface implementation without any system thread.
Assumption:
* There is a only single thread in the ruby process
* No signal happens targeting the ruby process
Note:
* No thread switching in the VM
* No timer thread because thread switching won't happen
* No mutex guard because the VM won't be ... | c | github | https://github.com/ruby/ruby | thread_none.c |
#!/usr/bin/env python2.7
# -*- coding: UTF-8 -*-
#===============================================================================
# Name : check_ibm_san_directors_crcs.py
# Authors : Canux CHENG <canuxcheng@gmail.com>
# Description : Check IBM SAN Directors for CRCs on ports.
#-------------------------... | unknown | codeparrot/codeparrot-clean | ||
name: publish-technical-documentation-release
on:
push:
branches:
- release-[0-9]+.[0-9]+.[0-9]+
tags:
- v[0-9]+.[0-9]+.[0-9]+
paths:
- "docs/sources/**"
workflow_dispatch:
jobs:
sync:
if: github.repository == 'grafana/grafana'
permissions:
contents: read
id-toke... | unknown | github | https://github.com/grafana/grafana | .github/workflows/publish-technical-documentation-release.yml |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-16 20:50
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('analytics', '0006_add_subgroup_to_unique_constraints'),
]
o... | unknown | codeparrot/codeparrot-clean | ||
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
unknownField: unknown | unknown | github | https://github.com/kubernetes/kubernetes | cmd/kubeadm/app/util/config/strict/testdata/invalid_unknown_field_kubeletcfg.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 | ||
import logging
import os
import re
import shutil
import threading
import warnings
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models.loading import get_model
from django.utils.datetime_safe import datetime
from django.utils.encoding import force_unicode
from h... | unknown | codeparrot/codeparrot-clean | ||
{
"name": "basic-data-router",
"private": true,
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"serve": "vite preview"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "6.17.0-pre.2"
},
"devDependencies": {
"@rollup/plugin-replace"... | json | github | https://github.com/remix-run/react-router | examples/view-transitions/package.json |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# loompy documentation build configuration file, created by
# sphinx-quickstart on Tue Oct 3 00:11:17 2017.
#
# 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
# aut... | unknown | codeparrot/codeparrot-clean | ||
{
"GEOADD": {
"summary": "Adds one or more members to a geospatial index. The key is created if it doesn't exist.",
"complexity": "O(log(N)) for each item added, where N is the number of elements in the sorted set.",
"group": "geo",
"since": "3.2.0",
"arity": -5,
"fun... | json | github | https://github.com/redis/redis | src/commands/geoadd.json |
# 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 | ||
"""
.. module:: test_report
:platform: Unix
:synopsis: Unittests for the report module.
:license: GPL3
.. moduleauthor:: Andrea Cervesato <andrea.cervesato@mailbox.org>
"""
import os
import shutil
import unittest
import marvin.report
class TestReport(unittest.TestCase):
""" Test the report module """
... | unknown | codeparrot/codeparrot-clean | ||
"""Tests for distutils.sysconfig."""
import os
import test
import unittest
import shutil
from distutils import sysconfig
from distutils.tests import support
from test.test_support import TESTFN
class SysconfigTestCase(support.EnvironGuard,
unittest.TestCase):
def setUp(self):
super... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""Tests for jslex."""
# originally from https://bitbucket.org/ned/jslex
from __future__ import unicode_literals
from django.test import TestCase
from django.utils.jslex import JsLexer, prepare_js_for_gettext
class JsTokensTest(TestCase):
LEX_CASES = [
# ids
("a ABC $ _ a12... | unknown | codeparrot/codeparrot-clean | ||
from pychess.Utils.const import *
from pychess.Utils.Board import Board
class BlindfoldBoard(Board):
variant = BLINDFOLDCHESS
class BlindfoldChess:
__desc__ = _("Classic chess rules with hidden figurines\n" +
"http://en.wikipedia.org/wiki/Blindfold_chess")
name = _("Blindfold")
cecp_n... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- 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 L... | unknown | codeparrot/codeparrot-clean | ||
package client
import (
"context"
"encoding/json"
"net/url"
"github.com/moby/moby/api/types/swarm"
)
// ServiceListOptions holds parameters to list services with.
type ServiceListOptions struct {
Filters Filters
// Status indicates whether the server should include the service task
// count of running and de... | go | github | https://github.com/moby/moby | client/service_list.go |
# Copyright 2016 EMC Corporation
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | unknown | codeparrot/codeparrot-clean | ||
# -*- Python -*-
# -*- coding: utf-8 -*-
from __future__ import print_function
'''rtshell
Copyright (C) 2009-2015
Geoffrey Biggs
RT-Synthesis Research Group
Intelligent Systems Research Institute,
National Institute of Advanced Industrial Science and Technology (AIST),
Japan
All rights reserv... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
The MIT License
Copyright (c) 2010 Olle Johansson
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,... | unknown | codeparrot/codeparrot-clean | ||
# Parsec Cloud (https://parsec.cloud) Copyright (c) AGPLv3 2016-2021 Scille SAS
import pytest
import trio
from enum import IntEnum
from typing import Union
import io
from parsec.core.fs.exceptions import FSUnsupportedOperation, FSOffsetError, FSInvalidFileDescriptor
from parsec.core.fs.workspacefs.workspacefile import... | unknown | codeparrot/codeparrot-clean | ||
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2019 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 | ||
/*
* 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 | build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/OnlyDependencyManagementIntegrationTests.java |
#!/usr/local/bin/python
#-
# Copyright (c) 2010-2011 Varnish Software AS
# All rights reserved.
#
# Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions o... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import print_function, unicode_literals
import json
import sys
from type_alias import create_type_alias, find_type_aliases, find_union_types
from decoder import create_decoder, create_encoder, create_union_type_decoder, create_union_type_encoder
from helpers import *
def test():
testJson = """
{... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: MPL-2.0
package ldap
import (
"context"
"fmt"
"io"
"os"
"strings"
"github.com/hashicorp/vault/api"
)
type LDAPAuth struct {
mountPath string
username string
password string
passwordFile string
passwordEnv string
}
type Password st... | go | github | https://github.com/hashicorp/vault | api/auth/ldap/ldap.go |
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import determine_ext
class OnionStudiosIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?onionstudios\.com/(?:videos/[^/]+-|embed\?.*\bid=)(?P<id>\d+)(?!-)'
_TESTS = [{
'url': 'http://... | unknown | codeparrot/codeparrot-clean | ||
"""
These callables are used by django-wiki to check various permissions
a user has on an article.
"""
from course_wiki.utils import user_is_article_course_staff
def CAN_DELETE(article, user): # pylint: disable=invalid-name
"""Is user allowed to soft-delete article?"""
return _is_staff_for_article(article, u... | unknown | codeparrot/codeparrot-clean | ||
"""Suite Standard URL suite: Mac URL standard, supported by many apps
Level 1, version 1
Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'GURL'
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2022 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 ... | python | github | https://github.com/huggingface/transformers | src/transformers/models/esm/convert_esm.py |
# Django settings for DjangoTestApp project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'N... | unknown | codeparrot/codeparrot-clean | ||
"""Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2014 Benjamin Peterson
#
# 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 with... | unknown | codeparrot/codeparrot-clean | ||
"""
Extended math utilities.
"""
# Authors: Gael Varoquaux
# Alexandre Gramfort
# Alexandre T. Passos
# Olivier Grisel
# Lars Buitinck
# Stefan van der Walt
# Kyle Kastner
# License: BSD 3 clause
from __future__ import division
from functools import partial
import ... | unknown | codeparrot/codeparrot-clean | ||
"""Faux ``threading`` version using ``dummy_thread`` instead of ``thread``.
The module ``_dummy_threading`` is added to ``sys.modules`` in order
to not have ``threading`` considered imported. Had ``threading`` been
directly imported it would have made all subsequent imports succeed
regardless of whether ``_thread`` w... | unknown | codeparrot/codeparrot-clean | ||
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | unknown | codeparrot/codeparrot-clean | ||
/*-------------------------------------------------------------------------
*
* pg_publication_rel.h
* definition of the system catalog for mappings between relations and
* publications (pg_publication_rel)
*
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
* Portions Copyright (c) 199... | c | github | https://github.com/postgres/postgres | src/include/catalog/pg_publication_rel.h |
#!/usr/bin/env python
from __future__ import print_function
import docutils.core as dc
import os.path
import sys
import re
import tempfile
import glob
import shutil
from writer import writer
from conf import papers_dir, output_dir
import options
header = r'''
.. role:: ref
.. role:: label
.. role:: cite
.. raw::... | unknown | codeparrot/codeparrot-clean | ||
# 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 | ||
"""
esp-ipv6 protocl support class(es)
http://libvirt.org/formatnwfilter.html#nwfelemsRulesProtoMiscv6
"""
from virttest.libvirt_xml import accessors, xcepts
from virttest.libvirt_xml.nwfilter_protocols import base
class Esp_ipv6(base.TypedDeviceBase):
"""
Create new Esp_ipv6 xml instances
Properties:
... | unknown | codeparrot/codeparrot-clean | ||
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
import abc
from itertools import chain
import six
from django.conf import settings
from shuup.apps... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.