code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/usr/bin/env python # -*- coding: utf-8 -*- """ $Id: Project.py 1092 2011-06-13 14:40:56Z sumpfralle $ Copyright 2010 Lars Kruse <devel@sumpfralle.de> This file is part of PyCAM. PyCAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the F...
unknown
codeparrot/codeparrot-clean
""" Tests for Term. """ from collections import Counter from itertools import product from unittest import TestCase from zipline.errors import ( DTypeNotSpecified, InputTermNotAtomic, InvalidDType, TermInputsNotSpecified, WindowLengthNotSpecified, ) from zipline.pipeline import Factor, TermGraph fr...
unknown
codeparrot/codeparrot-clean
import datetime from decimal import Decimal from django.db.models.fields import ( AutoField, BinaryField, BooleanField, CharField, DateField, DateTimeField, DecimalField, EmailField, FilePathField, FloatField, GenericIPAddressField, IntegerField, IPAddressField, NullBooleanField, PositiveIntegerField, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ Main python eyetracking wrapper - takes calibration and gaze video filenames as input - controls calibration and gaze estimation workflow Example ---- >>> mrgaze_batch.py <Calibration Video> <Gaze Video> AUTHOR : Mike Tyszka PLACE : Caltech DATES : 2014-05-07 JMT From scratch Th...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # encoding: utf-8 """ PyRoc.py Created by Marcel Caraciolo on 2009-11-16. Copyright (c) 2009 Federal University of Pernambuco. All rights reserved. IMPORTANT: Based on the original code by Eithon Cadag (http://www.eithoncadag.com/files/pyroc.txt) Python Module for calculating the area under the...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2011 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. """ lastchange.py -- Chromium revision fetching utility. """ import re import optparse import os import subprocess import sys cla...
unknown
codeparrot/codeparrot-clean
from kivy.app import App from kivy.uix.gridlayout import GridLayout from kivy.uix.boxlayout import BoxLayout from kivy.uix.label import Label from kivy.uix.behaviors import FocusBehavior from kivy.graphics import Color, Rectangle class FocusWithColor(FocusBehavior): ''' Class that when focused, changes its backgro...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2005-2007 The Regents of The University of Michigan # 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 ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.platform.projectStructure import com.intellij.openapi.components.se...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-platform-interface/src/org/jetbrains/kotlin/analysis/api/platform/projectStructure/KotlinCompilerPluginsProvider.kt
# synstructure [![Latest Version](https://img.shields.io/crates/v/synstructure.svg)](https://crates.io/crates/synstructure) [![Documentation](https://docs.rs/synstructure/badge.svg)](https://docs.rs/synstructure) [![Build Status](https://github.com/mystor/synstructure/actions/workflows/ci.yml/badge.svg)](https://githu...
unknown
github
https://github.com/nodejs/node
deps/crates/vendor/synstructure/README.md
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='oauth2-proxy-cookie', ...
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
configuration-metadata/spring-boot-configuration-metadata/src/test/java/org/springframework/boot/configurationmetadata/JsonReaderTests.java
# This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for the list of ...
unknown
codeparrot/codeparrot-clean
# Copyright 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 required by ...
unknown
codeparrot/codeparrot-clean
import sys import traceback ERROR_WRONG_USAGE = 1 ERROR_EXCEPTION = 4 def usage(): sys.stderr.write('Usage: conda_packaging_tool.py listall | channels | versions PACKAGE\n') sys.stderr.flush() exit(ERROR_WRONG_USAGE) def do_list_available_packages(): import conda version = conda.__version__ v...
unknown
codeparrot/codeparrot-clean
data = ( 'A', # 0x00 'a', # 0x01 'A', # 0x02 'a', # 0x03 'E', # 0x04 'e', # 0x05 'E', # 0x06 'e', # 0x07 'I', # 0x08 'i', # 0x09 'I', # 0x0a 'i', # 0x0b 'O', # 0x0c 'o', # 0x0d 'O', # 0x0e 'o', # 0x0f 'R', # 0x10 'r', # 0x11 'R', # 0x12 'r', # 0x13 'U', # 0...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 IBM Corp. # # 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...
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
""" The MIT License (MIT) Copyright (c) 2015 Guillermo Romero Franco (AKA Gato) 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
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from cryptography import utils from cryptography.exceptions import Unsupp...
unknown
codeparrot/codeparrot-clean
/* Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/apis/authorization/validation/validation.go
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import multiprocessi...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.http.content import io.ktor.http.content.* import io.ktor.server.application.* internal actual fun platformTransformDefaultContent( call: ApplicationCall, valu...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-core/nonJvm/src/io/ktor/server/http/content/DefaultTransform.nonJvm.kt
# Copyright 2014 eNovance. # # 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...
unknown
codeparrot/codeparrot-clean
import os import sys import shutil import os.path import uuid from future.utils import iteritems from pandaharvester.harvestercore import core_utils from .base_stager import BaseStager from pandaharvester.harvestermover import mover_utils from rucio.client import Client as RucioClient from rucio.common.exception impo...
unknown
codeparrot/codeparrot-clean
""" Reference mappings for isogeometric analysis. """ import numpy as nm from sfepy.discrete.common.mappings import Mapping from sfepy.discrete.common.extmods.mappings import CMapping import sfepy.discrete.iga.extmods.igac as iga class IGMapping(Mapping): """ Reference mapping for isogeometric analysis based ...
unknown
codeparrot/codeparrot-clean
#pragma once #include <ATen/core/Tensor.h> namespace at::native { Tensor& qembeddingbag_byte_prepack_out( Tensor& output, const Tensor& weight, const std::optional<Tensor>& rowwise_min_max_opt = std::nullopt); Tensor qembeddingbag_byte_prepack(const Tensor& weight); Tensor qembeddingbag_byte_prepack_met...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/quantized/cpu/qembeddingbag_prepack.h
############################################################################# # Copyright 2016 Mass KonFuzion Games # # 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.o...
unknown
codeparrot/codeparrot-clean
# postgresql/pypostgresql.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 """Support for the PostgreSQL database via py-postgresql. Connecting -----...
unknown
codeparrot/codeparrot-clean
import itertools try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict from wtforms.compat import with_metaclass, iteritems, itervalues from wtforms.meta import DefaultMeta __all__ = ( 'BaseForm', 'Form', ) class BaseForm(object): """ Base Form Class...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Cache; use Illuminate\Contracts\Cache\Store; abstract class TaggableStore implements Store { /** * Begin executing a new tags operation. * * @param mixed $names * @return \Illuminate\Cache\TaggedCache */ public function tags($names) { return n...
php
github
https://github.com/laravel/framework
src/Illuminate/Cache/TaggableStore.php
# # (c) 2018 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 d...
unknown
codeparrot/codeparrot-clean
""" We perform uniqueness checks explicitly on the serializer class, rather the using Django's `.full_clean()`. This gives us better separation of concerns, allows us to use single-step object creation, and makes it possible to switch between using the implicit `ModelSerializer` class and an equivalent explicit `Seria...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2010 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
java
github
https://github.com/google/guava
android/guava-testlib/src/com/google/common/collect/testing/testers/SortedSetNavigationTester.java
# Mercurial extension to provide the 'hg bookmark' command # # Copyright 2008 David Soria Parra <dsp@php.net> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '''track a line of development with movable markers Bookmarks are local...
unknown
codeparrot/codeparrot-clean
# # Copyright 2009, 2013, Shaheed Haque <srhaque@theiet.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; either version 2 of # the License or (at your option) version 3 or any later versi...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # (c) 2013, Sebastien Goasguen <runseb@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 ...
unknown
codeparrot/codeparrot-clean
export const EXAMPLE_PATH = "cms-prismic"; export const CMS_NAME = "Prismic"; export const CMS_URL = "https://prismic.io/"; export const HOME_OG_IMAGE_URL = "https://og-image.vercel.app/Next.js%20Blog%20Example%20with%20**Prismic**.png?theme=light&md=1&fontSize=75px&images=https%3A%2F%2Fassets.vercel.com%2Fimage%2Fup...
typescript
github
https://github.com/vercel/next.js
examples/cms-prismic/lib/constants.ts
// Copyright 2023 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package backup import ( "context" "github.com/cockroachdb/cockroach/pkg/kv" "github.com/cockroachdb/cockroach/pkg/kv/kvpb" "github.com/cockroachdb/cockroach/pkg/ro...
go
github
https://github.com/cockroachdb/cockroach
pkg/backup/revision_reader.go
/* * 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...
kotlin
github
https://github.com/spring-projects/spring-framework
spring-beans/src/test/kotlin/org/springframework/beans/factory/ListableBeanFactoryExtensionsTests.kt
#pragma once #ifdef USE_VULKAN_API #include <ATen/native/vulkan/ops/Common.h> #include <ATen/native/vulkan/ops/VulkanPackedContext.h> namespace at { namespace native { namespace vulkan { namespace ops { enum Conv2dMethod { Conv2dDepthwise, Conv2dPointwise, Conv2dSlidingWindow, }; namespace conv2d { Tensor r...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/vulkan/ops/Convolution.h
.list-group { width: 100%; max-width: 460px; margin-inline: 1.5rem; } .form-check-input:checked + .form-checked-content { opacity: .5; } .form-check-input-placeholder { border-style: dashed; } [contenteditable]:focus { outline: 0; } .list-group-checkable .list-group-item { cursor: pointer; } .list-grou...
css
github
https://github.com/twbs/bootstrap
site/src/assets/examples/list-groups/list-groups.css
from typing import Any, Union from ..utils import add_end_docstrings, is_vision_available from .base import GenericTensor, Pipeline, build_pipeline_init_args if is_vision_available(): from PIL import Image from ..image_utils import load_image @add_end_docstrings( build_pipeline_init_args(has_image_proce...
python
github
https://github.com/huggingface/transformers
src/transformers/pipelines/image_feature_extraction.py
# 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. """Small utility library of python functions used during SDK building. """ import os import re import sys # pylint: disable=E0602 # Reuse last change ...
unknown
codeparrot/codeparrot-clean
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" """ setup.py for installing F2PY Usage: python setup.py install Copyright 2001-2005 Pearu Peterson all rights reserved, Pearu Peterson <pearu@cens.ioc.ee> Permission to use, modify, and distribute this software is ...
unknown
codeparrot/codeparrot-clean
The test directory contains tests of the Go tool chain and runtime. It includes black box tests, regression tests, and error output tests. They are run as part of all.bash. To run just these tests, execute: ../bin/go test cmd/internal/testdir To run just tests from specified files in this directory, execute: ../b...
unknown
github
https://github.com/golang/go
test/README.md
from __future__ import absolute_import from kombu import transport from kombu.tests.case import Case, Mock, patch class test_supports_librabbitmq(Case): def test_eventlet(self): with patch('kombu.transport._detect_environment') as de: de.return_value = 'eventlet' self.assertFalse...
unknown
codeparrot/codeparrot-clean
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. ```esql FROM sample_data | WHERE @timestamp > NOW() - 1 hour ```
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/commands/examples/date.csv-spec/docsNowWhere.md
from __future__ import print_function, unicode_literals import importlib import os import sys from django.apps import apps from django.db.models.fields import NOT_PROVIDED from django.utils import datetime_safe, six, timezone from django.utils.six.moves import input from .loader import MigrationLoader class Migrati...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import frappe.defaults import datetime from frappe.utils import get_datetime from six import string_types # global values -- used for caching dateformats = { 'yyyy...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 import os import json import glob # import dataset from normality import slugify # from datetime import datetime from pprint import pprint # noqa from common import DATA_PATH SOURCE_PATH = os.path.join(DATA_PATH, 'flexicadastre', 'raw') try: os.makedirs(SOURCE_PATH) except: pass DEST_PATH = o...
unknown
codeparrot/codeparrot-clean
An invalid number of arguments was passed when calling a function. Erroneous code example: ```compile_fail,E0061 fn f(u: i32) {} f(); // error! ``` The number of arguments passed to a function must match the number of arguments specified in the function signature. For example, a function like: ``` fn f(a: u16, b:...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0061.md
# 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
model/labels/regexp_test.go
import Vapor import XCTest open class XCTVaporTests: XCTestCase { open var app: Application! open override func setUpWithError() throws { // The XCTest runner calls this function before setUp() try super.setUpWithError() // this optional check due to prior usage by users // ...
swift
github
https://github.com/vapor/vapor
Sources/XCTVapor/XCTVaporTests.swift
#!/usr/bin/env python """ NAME: sparser.py SYNOPSIS: sparser.py [options] filename DESCRIPTION: The sparser.py script is a Specified PARSER. It is unique (as far as I can tell) because it doesn't care about the delimiter(s). The user specifies what is expected, and the order, for each line of t...
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/clients/admin/DeleteTopicsOptions.java
import setuptools with open('VERSION.txt', 'r') as f: version = f.read().strip() setuptools.setup( name="odoo12-addons-oca-manufacture", description="Meta package for oca-manufacture Odoo addons", version=version, install_requires=[ 'odoo12-addon-account_move_line_manufacture_info', ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # XCint documentation build configuration file, created by # sphinx-quickstart on Thu Jun 12 14:59:50 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. # # All c...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package mfa func (c *Config) SentinelGet(key string) (interface{}, error) { if c == nil { return nil, nil } switch key { case "type": return c.Type, nil case "name": return c.Name, nil case "mount_accessor": return c.MountAccessor, n...
go
github
https://github.com/hashicorp/vault
helper/identity/mfa/sentinel.go
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. # # SPDX-License-Identifier: curl name: 'URLs' 'on': push: branches: - master - '*/ci' pull_request: branches: - master schedule: - cron: '10 5 * * *' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_reque...
unknown
github
https://github.com/curl/curl
.github/workflows/checkurls.yml
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from pytest import mark from translate.misc import wStringIO from translate.storage import po, xliff from translate.tools import pomerge def test_str2bool(): """test the str2bool function""" assert pomerge.str2bool("yes") assert pomerge.str2bool...
unknown
codeparrot/codeparrot-clean
import os import sys from setuptools import setup, find_packages version = '0.1.5' def read(f): return open(os.path.join(os.path.dirname(__file__), f)).read().strip() setup(name='android-resource-remover', version=version, description=('Android resource remover'), long_description='\n\n'.join((...
unknown
codeparrot/codeparrot-clean
use std::{collections::BTreeMap, sync::LazyLock}; use anyhow::{Context, Result}; use either::Either; use rustc_hash::FxHashMap; use turbo_rcstr::{RcStr, rcstr}; use turbo_tasks::{FxIndexMap, ResolvedVc, Vc, fxindexmap}; use turbo_tasks_fs::{FileSystem, FileSystemPath, to_sys_path}; use turbopack_core::{ issue::{Is...
rust
github
https://github.com/vercel/next.js
crates/next-core/src/next_import_map.rs
""" A general resource system. Use the classes in this file to create a resource system that supports registering of resource classes, lazy validation of resource attributes, and resource caching. You would not typically have users create `Resource` instances directly; instead, some factory would be responsible for cr...
unknown
codeparrot/codeparrot-clean
//! #[diplomat::attr] and other attributes use crate::ast; use crate::ast::attrs::{AttrInheritContext, DiplomatBackendAttrCfg, StandardAttribute}; use crate::hir::lowering::ErrorStore; use crate::hir::{ EnumVariant, LoweringError, Method, Mutability, OpaqueId, ReturnType, SelfType, SuccessType, TraitDef, Type,...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/diplomat_core/src/hir/attrs.rs
export class CancelError extends Error { constructor(message: string) { super(message); this.name = 'CancelError'; } public get isCancelled(): boolean { return true; } } export interface OnCancel { readonly isResolved: boolean; readonly isRejected: boolean; readonly isCancelled: boolean; (cancelHandler...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/openapi-gen/requests/core/CancelablePromise.ts
# Gnome15 - Suite of tools for the Logitech G series keyboards and headsets # Copyright (C) 2010 Brett Smith <tanktarta@blueyonder.co.uk> # # 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, e...
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
<!--Copyright 2020 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/model_doc/bert.md
import os from six.moves.urllib.parse import urljoin from abc import ABCMeta, abstractmethod, abstractproperty def get_source_file(source_files, tests_root, manifest, path): def make_new(): from .sourcefile import SourceFile return SourceFile(tests_root, path, manifest.url_base) if source_fil...
unknown
codeparrot/codeparrot-clean
This directory contains all Redis dependencies, except for the libc that should be provided by the operating system. * **Jemalloc** is our memory allocator, used as replacement for libc malloc on Linux by default. It has good performances and excellent fragmentation behavior. This component is upgraded from time to ti...
unknown
github
https://github.com/redis/redis
deps/README.md
from chanutils import get_doc, select_all, select_one from chanutils import get_attr, get_text, get_text_content from playitem import PlayItem, PlayItemList, MoreEpisodesAction _PREFIX = 'https://www.itv.com' _SEARCH_URL = _PREFIX + '/itvplayer/search/term/' _FEEDLIST = [ {'title':'Popular', 'url':'https://www.itv....
unknown
codeparrot/codeparrot-clean
#!venv/bin/python # -*- coding: utf-8 -*- import tornado import tornado.websocket import tornado.wsgi import logging import time import json import random from app import app, db from app.models import User, Game, Fact, Deck, ROLE_USER, ROLE_ADMIN, get_object_or_404 a = {'あ':'a', 'い':'i', 'う':'u', 'え':'e', 'お':'o', '...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (C) Citrix Systems Inc. # # This program 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; version 2.1 only. # # This program is distributed in the hope that it will be use...
unknown
codeparrot/codeparrot-clean
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2013 Stanford University and the Authors # # Authors: Robert McGibbon # Contributors: # # MDTraj is free software: y...
unknown
codeparrot/codeparrot-clean
""" Get API information encoded in C files. See ``find_function`` for how functions should be formatted, and ``read_order`` for how the order of the functions should be specified. """ import sys, os, re try: import hashlib md5new = hashlib.md5 except ImportError: import md5 md5new = md5.new if sys.vers...
unknown
codeparrot/codeparrot-clean
test_kind: fsm_workload_test selector: roots: - jstests/concurrency/fsm_workloads/**/*.js exclude_files: ## # Disabled due to MongoDB restrictions and/or workload restrictions ## exclude_with_any_tags: - requires_standalone - requires_sharding executor: archive: hooks: - Sim...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/simulate_crash_concurrency_replication.yml
# 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, software # distributed under t...
unknown
codeparrot/codeparrot-clean
import os import sys import obd import shutil from PiHud import PiHud from PyQt4 import QtGui from GlobalConfig import GlobalConfig try: import RPi.GPIO as GPIO except: print "[pihud] Warning: RPi.GPIO library not found" # file paths running_dir = os.path.dirname(os.path.realpath(__file__)) default_co...
unknown
codeparrot/codeparrot-clean
from cms.utils.compat.dj import is_installed from django.conf.urls import include, url from cms.apphook_pool import apphook_pool from cms.views import details from django.conf import settings if settings.APPEND_SLASH: reg = url(r'^(?P<slug>[0-9A-Za-z-_.//]+)/$', details, name='pages-details-by-slug') else: reg...
unknown
codeparrot/codeparrot-clean
require 'optparse' parser = OptionParser.new parser.on('--true_class=TRUE_CLASS', TrueClass) do |value| p [value, value.class] end parser.parse!
ruby
github
https://github.com/ruby/ruby
doc/optparse/ruby/true_class.rb
# Copyright (C) 2015, Carlo de Franchis <carlo.de-franchis@cmla.ens-cachan.fr> # Copyright (C) 2015, Gabriele Facciolo <facciolo@cmla.ens-cachan.fr> # Copyright (C) 2015, Enric Meinhardt <enric.meinhardt@cmla.ens-cachan.fr> # Copyright (C) 2015, Julien Michel <julien.michel@cnes.fr> import os import numpy as np import...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 The Abseil 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 by applicable law or agr...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/base/internal/atomic_hook_test_helper.h
package multierror import ( "errors" "fmt" "testing" "gotest.tools/v3/assert" ) func TestErrorJoin(t *testing.T) { t.Run("single", func(t *testing.T) { err := Join(fmt.Errorf("invalid config: %w", Join(errors.New("foo")))) const expected = `invalid config: foo` assert.Equal(t, err.Error(), expected) }) ...
go
github
https://github.com/moby/moby
daemon/internal/multierror/multierror_test.go
from opencog.cogserver import MindAgent from opencog.atomspace import types from pln.chainers import Chainer from pln.rules import * class InferenceAgent(MindAgent): def __init__(self): self.chainer = None self.num_steps_per_cycle = 100 def create_chainer(self, atomspace): # Note: usin...
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-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java
# tempfile.py unit tests. import tempfile import os import sys import re import warnings import unittest from test import support if hasattr(os, 'stat'): import stat has_stat = 1 else: has_stat = 0 has_textmode = (tempfile._text_openflags != tempfile._bin_openflags) has_spawnl = hasattr(os, 'spawnl') # ...
unknown
codeparrot/codeparrot-clean
def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) response.headers.set("Content-Security-Policy", "font-src *") response.headers.set("X-Content...
unknown
codeparrot/codeparrot-clean
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ An implementation of U{Web Resource Gateway Interface<http://www.python.org/dev/peps/pep-0333/>}. """ __metaclass__ = type from sys import exc_info from zope.interface import implements from twisted.python.log import msg, err from twisted....
unknown
codeparrot/codeparrot-clean
# From EderSantana's https://github.com/EderSantana/seya repository import numpy as np import theano import theano.tensor as T import keras.backend as K from keras.layers.core import Layer floatX = theano.config.floatX class SpatialTransformer(Layer): """Spatial Transformer Layer Implements a spatial transf...
unknown
codeparrot/codeparrot-clean
from sqlalchemy import ( Table, Column, INTEGER, String, Text, TIMESTAMP, DateTime, func) from .basic import metadata # login table login_info = Table("login_info", metadata, Column("id", INTEGER, primary_key=True, autoincrement=True), Column("name", String(100), unique=True)...
unknown
codeparrot/codeparrot-clean
--- body: - type: markdown attributes: value: | For NGINX troubleshooting/technical help, please visit our community forum instead of asking your questions here. We will politely redirect these types of questions to the forum. - type: textarea id: q-a attributes: label: What question...
unknown
github
https://github.com/nginx/nginx
.github/DISCUSSION_TEMPLATE/q-a.yml
#include "perf_precomp.hpp" namespace opencv_test { using namespace perf; typedef tuple<std::string, cv::Size> String_Size_t; typedef perf::TestBaseWithParam<String_Size_t> String_Size; PERF_TEST_P(String_Size, asymm_circles_grid, testing::Values( String_Size_t("cv/cameracalibration/asymmetric_circle...
cpp
github
https://github.com/opencv/opencv
modules/calib3d/perf/perf_cicrlesGrid.cpp
//! Error and Result module // This is meant to be a glob import of the whole error module except for `Error`. Rustdoc can't yet // correctly resolve the conflicting `Error` type defined in this module, so these re-exports are // expanded manually. // // See <https://github.com/rust-lang/rust/issues/83375> pub use act...
rust
github
https://github.com/actix/actix-web
actix-web/src/error/mod.rs
# # TODO: # parse vertex colors and UV coordinates # remove faces with the hole material # from erlang_ext import * import types import pprint import mesh try: import Image except: pass def safe_append(ctr, key, value): if ctr.has_key(key): ctr[key].append(value) else: ctr[key] = [value] class wings_re...
unknown
codeparrot/codeparrot-clean
"""The tests for the State vacuum Mqtt platform.""" from copy import deepcopy import json from homeassistant.components import mqtt, vacuum from homeassistant.components.mqtt import CONF_COMMAND_TOPIC, CONF_STATE_TOPIC from homeassistant.components.mqtt.discovery import async_start from homeassistant.components.mqtt.v...
unknown
codeparrot/codeparrot-clean
/* Copyright 2022 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
pkg/apis/certificates/v1alpha1/doc.go
"""Exceptions used by amqp""" # Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> # # 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 your o...
unknown
codeparrot/codeparrot-clean