code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Copyright (c) 2012 Ecma International. All rights reserved. # This code is governed by the BSD license found in the LICENSE file. #--Imports--------------------------------------------------------------------- import argparse import os import sys import re #--Globals------------------------------------------------...
unknown
codeparrot/codeparrot-clean
import os from . import Error, Tags, register E001 = Error( "You should not set the DJANGO_ALLOW_ASYNC_UNSAFE environment variable in " "deployment. This disables async safety protection.", id="async.E001", ) @register(Tags.async_support, deploy=True) def check_async_unsafe(app_configs, **kwargs): if...
python
github
https://github.com/django/django
django/core/checks/async_checks.py
# -*- coding: utf-8 -*- import json from django.core.cache import cache from django.core.files.storage import default_storage as storage import commonware.log import lib.iarc import mkt from mkt.site.utils import JSONEncoder from mkt.translations.utils import find_language log = commonware.log.getLogger('z.webapps'...
unknown
codeparrot/codeparrot-clean
import os ROOT_PATH = os.path.dirname(__file__) TEMPLATE_DEBUG = DEBUG = True MANAGERS = ADMINS = () DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = os.path.join(ROOT_PATH, 'testdb.sqlite') TIME_ZONE = 'America/Chicago' LANGUAGE_CODE = 'en-us' SITE_ID = 1 USE_I18N = True MEDIA_ROOT = '' MEDIA_URL = '' ADMIN_MEDIA_PREFIX ...
unknown
codeparrot/codeparrot-clean
#include "test/jemalloc_test.h" static void mallctl_thread_name_get_impl(const char *thread_name_expected, const char *func, int line) { const char *thread_name_old; size_t sz; sz = sizeof(thread_name_old); expect_d_eq(mallctl("thread.prof.name", (void *)&thread_name_old, &sz, NULL, 0), 0, "%s():%d:...
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/prof_thread_name.c
import datetime import re from hashlib import md5 from sqlalchemy.schema import Column, ForeignKey from sqlalchemy.types import DateTime, Integer, String, Text, CHAR, Boolean from sqlalchemy.orm import relationship, backref, validates from sqlalchemy import event from mmmpaste.db import Base class Paste(Base): ...
unknown
codeparrot/codeparrot-clean
// run // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test simultaneous assignment. package main var a, b, c, d, e, f, g, h, i int func printit() { println(a, b, c, d, e, f, g, h, i) } func testit(p...
go
github
https://github.com/golang/go
test/simassign.go
# Authors: John Dennis <jdennis@redhat.com> # # Copyright (C) 2011 Red Hat # see file 'COPYING' for use and warranty information # # 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...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/interrupt-controller/riscv,rpmi-system-msi.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: RISC-V RPMI system MSI service group based interrupt controller maintainers: - Anup Patel <anup@br...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/interrupt-controller/riscv,rpmi-system-msi.yaml
# config.py import os.path # gets home dir cross platform HOME = os.path.expanduser("~") # for making bounding boxes pretty COLORS = ((255, 0, 0, 128), (0, 255, 0, 128), (0, 0, 255, 128), (0, 255, 255, 128), (255, 0, 255, 128), (255, 255, 0, 128)) MEANS = (104, 117, 123) # SSD300 CONFIGS voc = { 'num_...
unknown
codeparrot/codeparrot-clean
//===-- PathConfig.h - Process paths of symbols -----------------*- 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 // //===------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-include-fixer/find-all-symbols/PathConfig.h
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import smuggle_url class KickStarterIE(InfoExtractor): _VALID_URL = r'https?://www\.kickstarter\.com/projects/(?P<id>[^/]*)/.*' _TESTS = [{ 'url': 'https://www.kickstarter.com/projects/1404461844/i...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer; use PHPUnit\Framework...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/RouterCacheWarmerTest.php
# This file is autogenerated by the command `make fix-copies`, do not edit. from ..utils import DummyObject, requires_backends class Pop2PianoFeatureExtractor(metaclass=DummyObject): _backends = ["music"] def __init__(self, *args, **kwargs): requires_backends(self, ["music"]) class Pop2PianoTokenizer...
python
github
https://github.com/huggingface/transformers
src/transformers/utils/dummy_music_objects.py
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 P. Christeas <p_christ@hol.gr>. All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
unknown
codeparrot/codeparrot-clean
{ "private": true, "scripts": { "dev": "next", "build": "next build", "start": "next start" }, "dependencies": { "@stripe/react-stripe-js": "2.4.0", "@stripe/stripe-js": "2.2.2", "next": "latest", "react": "18.2.0", "react-dom": "18.2.0", "server-only": "0.0.1", "stripe":...
json
github
https://github.com/vercel/next.js
examples/with-stripe-typescript/package.json
# Miro - an RSS based video player application # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Participatory Culture Foundation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; eithe...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # 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...
unknown
codeparrot/codeparrot-clean
#!BPY """ Registration info for Blender menus: Name: 'Speed Dreams / Torcs (.acc) ...' Blender: 248 Group: 'Export' Tip: 'Export selected meshes to Speed Dreams / Torcs (.acc) format' """ __author__ = "Brian Gavin taken from Willian P. Germano .ac export script" __url__ = ("blender", "blenderartists.org", "AC3D's hom...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python '''Simple test with a blocking C++ method that should allow python threads to run.''' import unittest import threading from sample import Bucket class Unlocker(threading.Thread): def __init__(self, bucket): threading.Thread.__init__(self) self.bucket = bucket def r...
unknown
codeparrot/codeparrot-clean
base_suite: replica_sets_jscore_passthrough_base overrides: - "kill_primary.replica_sets_shell_options_mixed_binary" - "kill_primary.replica_sets_oplog_application_lag_hooks" - "kill_primary.replica_sets_oplog_application_lag_archive" - "kill_primary.replica_sets_fixture_last_lts_new_new_old" - "replica_sets_...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/mappings/replica_sets_kill_primary_jscore_passthrough_last_lts_new_new_old.yml
import os from django.conf import settings from django.test import TestCase, Client class FlatpageCSRFTests(TestCase): fixtures = ['sample_flatpages'] urls = 'django.contrib.flatpages.tests.urls' def setUp(self): self.client = Client(enforce_csrf_checks=True) self.old_MIDDLEWARE_CLASSES = ...
unknown
codeparrot/codeparrot-clean
import gzip import io import json from django.db.models import Q from django.http import HttpResponse from django.http import HttpResponseBadRequest from django.http import HttpResponseNotFound from django.views.decorators.csrf import csrf_exempt from django.views.decorators.gzip import gzip_page from rest_framework i...
unknown
codeparrot/codeparrot-clean
""" urlresolver XBMC Addon Copyright (C) 2011 t0mm0 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 3 of the License, or (at your option) any later version. ...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function Component(props) { const f = function () { return <div>{props.name}</div>; }; return f.call(); } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [{name: 'Jason'}], }; ``` ## Code ```javascript import { c as _c } from "react/compiler-runtime"; function Compon...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/function-expression-prototype-call.expect.md
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup sdict = {} execfile('cortipy/version.py', {}, sdict) def findRequirements(): """ Read the requirements.txt file and parse into requirements for setup's install_requirements option. """ retu...
unknown
codeparrot/codeparrot-clean
import csv import datetime from contextlib import contextmanager from datetime import date try: from StringIO import StringIO except ImportError: from io import StringIO from textwrap import dedent from playhouse.csv_utils import * from playhouse.tests.base import database_initializer from playhouse.tests.base...
unknown
codeparrot/codeparrot-clean
from builtins import str import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils from random import randint """ This test takes all orc files collected by Tom K and try to parse them into H2O frames. Due to test duration limitation, we do not parse all the files. Instead, we randomly choose a...
unknown
codeparrot/codeparrot-clean
import os import time import tempfile __doc__ = """ Add nfiles to a directory (two clients) and check consistency after synch. """ from smashbox.utilities import * from smashbox.utilities.hash_files import * nfiles = int(config.get('nplustwo_nfiles',10)) def adder(step): # if you don't want to cleanup server ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import unittest from unittest import TestCase from plasTeX.DOM import * class DocumentTest(TestCase): def testCreateElement(self): doc = Document() node = doc.createAttribute('node') assert isinstance(node, Node) assert node.nodeName == 'node' def testCr...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from rest_framework import generics from rest_framework import permissions from rest_framework.exceptions import NotFound from api.actions.serializers import PreprintRequestActionSerializer from api.base.views import JSONAPIBaseView from api.base import permissions as base_perm...
unknown
codeparrot/codeparrot-clean
package templates import ( "bytes" "encoding/json" "strings" "text/template" ) // basicFunctions are the set of initial // functions provided to every template. var basicFunctions = template.FuncMap{ "json": func(v any) string { buf := &bytes.Buffer{} enc := json.NewEncoder(buf) enc.SetEscapeHTML(false) ...
go
github
https://github.com/moby/moby
daemon/logger/templates/templates.go
/* * Copyright (C) 2007 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/TestEnumSetGenerator.java
# 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
""" Functions --------- .. autosummary:: :toctree: generated/ fmin_l_bfgs_b """ ## License for the Python wrapper ## ============================== ## Copyright (c) 2004 David M. Cooke <cookedm@physics.mcmaster.ca> ## Permission is hereby granted, free of charge, to any person obtaining a ## copy of this so...
unknown
codeparrot/codeparrot-clean
""" Creates permissions for all installed apps that need permissions. """ from django.contrib.auth import models as auth_app from django.db.models import get_models, signals def _get_permission_codename(action, opts): return u'%s_%s' % (action, opts.object_name.lower()) def _get_all_permissions(opts): "Retur...
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/kerberos/KerberosName.java
from __future__ import absolute_import from django.contrib.gis import admin from django.contrib.gis.geos import GEOSGeometry, Point from django.test import TestCase from django.test.utils import override_settings from .models import City GOOGLE_MAPS_API_KEY = 'XXXX' class GeoAdminTest(TestCase): urls = 'django....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """ pyforms.gui.Controls.ControlEventTimeline.TimelineWidget """ from PyQt4 import QtGui, QtCore from pyforms.gui.Controls.ControlEventTimeline.Track import Track from pyforms.gui.Controls.ControlEventTimeline.TimelinePointer import TimelinePointer from pyforms.gui.Controls....
unknown
codeparrot/codeparrot-clean
from django.template import TemplateDoesNotExist from django.template.loader import get_template, render_to_string, select_template from django.test import SimpleTestCase, override_settings from django.test.client import RequestFactory @override_settings( TEMPLATES=[ { "BACKEND": "django.templa...
python
github
https://github.com/django/django
tests/template_loader/tests.py
name: Feature or enhancement description: Submit a proposal for a new CPython feature or enhancement labels: ["type-feature"] body: - type: markdown attributes: value: | # Proposing a feature to CPython? You'll need to demonstrate widespread support for your idea among the community. ...
unknown
github
https://github.com/python/cpython
.github/ISSUE_TEMPLATE/feature.yml
# Copyright (C) 2003 Python Software Foundation import unittest import shutil import tempfile import sys import stat import os import os.path from os.path import splitdrive from distutils.spawn import find_executable, spawn from shutil import (_make_tarball, _make_zipfile, make_archive, register_ar...
unknown
codeparrot/codeparrot-clean
apiVersion: v1 kind: ServiceAccount metadata: name: node-problem-detector namespace: kube-system labels: kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: npd-binding labels: kubern...
unknown
github
https://github.com/kubernetes/kubernetes
cluster/addons/node-problem-detector/npd.yaml
"""Unit tests for memory-based file-like objects. StringIO -- for unicode strings BytesIO -- for bytes """ from __future__ import unicode_literals from __future__ import print_function import unittest from test import test_support as support import io import _pyio as pyio import pickle class MemorySeekTestMixin: ...
unknown
codeparrot/codeparrot-clean
BRANCH = "mozilla-beta" MOZ_UPDATE_CHANNEL = "beta" MOZILLA_DIR = BRANCH OBJDIR = "obj-l10n" STAGE_SERVER = "dev-stage01.srv.releng.scl3.mozilla.com" #STAGE_SERVER = "stage.mozilla.org" EN_US_BINARY_URL = "http://" + STAGE_SERVER + "/pub/mozilla.org/mobile/candidates/%(version)s-candidates/build%(buildnum)d/android/en-...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 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.apache.org/licenses/LICEN...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # 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 ANSI...
unknown
codeparrot/codeparrot-clean
import fechbase class Records(fechbase.RecordsBase): def __init__(self): fechbase.RecordsBase.__init__(self) self.fields = [ {'name': 'FORM TYPE', 'number': '1'}, {'name': 'FEC COMMITTEE ID NUMBER', 'number': '2'}, {'name': 'NAT PARTY COMMITTEES %', 'number': '3'}...
unknown
codeparrot/codeparrot-clean
""" This module contains the spatial lookup types, and the `get_geo_where_clause` routine for Oracle Spatial. Please note that WKT support is broken on the XE version, and thus this backend will not work on such platforms. Specifically, XE lacks support for an internal JVM, and Java libraries are required to use...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2020 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.util.reflection; import net.bytebuddy.ClassFileVersion; import org.mockito.plugins.MemberAccessor; import java.lang.reflect.Constructor; import java.lang.reflect.Field; ...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/internal/util/reflection/ModuleMemberAccessor.java
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package file import ( "context" "errors" "fmt" "io/ioutil" "os" "github.com/hashicorp/terraform/internal/communicator" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/provisioners" "...
go
github
https://github.com/hashicorp/terraform
internal/builtin/provisioners/file/resource_provisioner.go
This example show how to use Code Splitting with the ES6 module syntax. The standard `import` is sync. `import(module: string) -> Promise` can be used to load modules on demand. This acts as a split point for webpack and creates a chunk. Providing dynamic expressions to `import` is possible. The same limits as with ...
unknown
github
https://github.com/webpack/webpack
examples/code-splitting-harmony/template.md
from pathlib import Path from template_tests.test_response import test_processor_name from django.template import Context, EngineHandler, RequestContext from django.template.backends.django import DjangoTemplates from django.template.library import InvalidTemplateLibrary from django.test import RequestFactory, overri...
python
github
https://github.com/django/django
tests/template_backends/test_django.py
from __future__ import unicode_literals import datetime from django.conf import settings from django.db import DEFAULT_DB_ALIAS, models, transaction from django.db.utils import ConnectionHandler from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature from .models import ( Award, AwardNote, Boo...
unknown
codeparrot/codeparrot-clean
--- - hosts: localhost gather_facts: no vars: host_hash_merged: {'host_var1': 'inventory 2', 'host_var2': 'inventory 1'} host_hash_replaced: {'host_var1': 'inventory 2'} group_hash_merged: {'group_var1': 'inventory 2', 'group_var2': 'inventory 1'} group_hash_replaced: {'group_var1': 'inventory 2'} ...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/hash/test_inventory_hash.yml
import collections import json as jsonlib import os import random import re from operator import attrgetter from urlparse import urljoin from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.forms import CheckboxInput from django.utils import translation from django.utils.e...
unknown
codeparrot/codeparrot-clean
# # Builtin Definitions # from Symtab import BuiltinScope, StructOrUnionScope from Code import UtilityCode from TypeSlots import Signature import PyrexTypes import Options # C-level implementations of builtin types, functions and methods iter_next_utility_code = UtilityCode.load("IterNext", "ObjectHandling.c") get...
unknown
codeparrot/codeparrot-clean
# MapReduce import sys, argparse, random, csv from bson.code import Code from pymongo import MongoClient def map_array_field(field, field_item): map = Code( "function () {" " this." + field + ".forEach(function(z){" " emit(z."+ field_item +", 1);" " });" "...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # This file is part of Networklore's snmp library for Ansible # # The module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ...
unknown
codeparrot/codeparrot-clean
# Copyright 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 os import sys PYLINT_BLACKLIST = [] PYLINT_DISABLED_WARNINGS = ['R0923', 'R0201', 'E1101'] def _CommonChecks(input_api, output_api): results = [] ...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Foundation\Console; use Illuminate\Console\GeneratorCommand; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputOption; #[AsCommand(name: 'make:rule')] class RuleMakeCommand extends GeneratorCommand { /** * The console command name. * ...
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/Console/RuleMakeCommand.php
#!/usr/bin/env python # -*- coding: utf-8 -*- """Provides an interface to data-bearing functions.""" import json import os BALLETS = ['The Nutcracker', 'Duck Lake', 'Sleeping Beauty', 'Onegin', 'Manon', 'Le Corsair', 'Serenade', 'Agon', ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package terraform import ( "fmt" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/lang/ephemeral" "github.com/hashicorp/...
go
github
https://github.com/hashicorp/terraform
internal/terraform/node_action_invoke.go
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano # test_description='More rename detection ' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash test_expect_success 'prepare reference tree' ' COPYING_test_data >COPYING && echo frotz >rezrov && git update-index --add COPYING rezrov && t...
unknown
github
https://github.com/git/git
t/t4003-diff-rename-1.sh
######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 3 of the License, or #...
unknown
codeparrot/codeparrot-clean
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the 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/requests/OffsetDeleteResponse.java
// // use_future.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_USE_FUTURE_HPP #defi...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/asio/use_future.hpp
# 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
# Copyright (C) 2015 Nippon Telegraph and Telephone 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 appli...
unknown
codeparrot/codeparrot-clean
// This file is part of ICU4X. For terms of use, please see the file // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). //! This module implements logic for Duration parsing. use crate::{ assert_syntax, core::EncodingType, p...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/ixdtf/src/parsers/duration.rs
from __future__ import absolute_import, division, print_function from .common import Benchmark, squares_ import numpy as np ufuncs = ['abs', 'absolute', 'add', 'arccos', 'arccosh', 'arcsin', 'arcsinh', 'arctan', 'arctan2', 'arctanh', 'bitwise_and', 'bitwise_not', 'bitwise_or', 'bitwise_xor', 'cbr...
unknown
codeparrot/codeparrot-clean
.container { max-width: 600px; margin: 0 auto; padding: 40px 20px; text-align: center; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f8f9fa; border-radius: 12px; padding: 32px; margin: 32px 0; border: 2px solid #e9ecef; } .container h2 { font-size: 3...
css
github
https://github.com/angular/angular
adev/src/content/tutorials/signals/intro/src/app/app.css
#!/usr/bin/env python """ Copyright Google Inc. 2016 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 writ...
unknown
codeparrot/codeparrot-clean
import ctypes import unittest from ctypes import (CDLL, c_byte, c_ubyte, c_char, c_short, c_ushort, c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong, c_float, c_double, c_longdouble) from test import support from test.support import ...
python
github
https://github.com/python/cpython
Lib/test/test_ctypes/test_cfuncs.py
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com> # Copyright 2012 Google, 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 # # ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at you...
unknown
codeparrot/codeparrot-clean
import numbers import pickle import re from copy import deepcopy from functools import partial import joblib import numpy as np import pytest from numpy.testing import assert_allclose from sklearn import config_context from sklearn.base import BaseEstimator, ClassifierMixin from sklearn.cluster import KMeans from skl...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/metrics/tests/test_score_objects.py
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/mfd/samsung,s2dos05.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Samsung S2DOS05 Power Management IC maintainers: - Dzmitry Sankouski <dsankouski@gmail.com> description: This is a device t...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mfd/samsung,s2dos05.yaml
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package syscall import "unsafe" const ( _SYS_setgroups = SYS_SETGROUPS32 _SYS_clone3 = 435 _SYS_faccessat2 = 439 _SYS_fchmodat2 = 452 ) func setTim...
go
github
https://github.com/golang/go
src/syscall/syscall_linux_386.go
import re from mako import compat from mako import lexer from mako import parsetree class MessageExtractor(object): def process_file(self, fileobj): template_node = lexer.Lexer( fileobj.read(), input_encoding=self.config['encoding']).parse() for extracted in self.extract_no...
unknown
codeparrot/codeparrot-clean
from flask import Blueprint from flask import render_template from app.helpers.data_getter import DataGetter from app.helpers.ticketing import TicketingManager my_tickets = Blueprint('my_tickets', __name__, url_prefix='/mytickets') @my_tickets.route('/') def display_my_tickets(): page_content = {"tab_upcoming_ev...
unknown
codeparrot/codeparrot-clean
"""The unittest.TestCase for JSON Schema tests.""" from typing import Optional from buildscripts.resmokelib import logging from buildscripts.resmokelib.testing.testcases import jsrunnerfile class JSONSchemaTestCase(jsrunnerfile.JSRunnerFileTestCase): """A JSON Schema test to execute.""" REGISTERED_NAME = "j...
python
github
https://github.com/mongodb/mongo
buildscripts/resmokelib/testing/testcases/json_schema_test.py
import Avatar from "../components/avatar"; import Date from "../components/date"; import CoverImage from "../components/cover-image"; import PostTitle from "../components/post-title"; export default function PostHeader({ title, coverImage, date, author }) { return ( <> <PostTitle>{title}</PostTitle> ...
javascript
github
https://github.com/vercel/next.js
examples/cms-prepr/components/post-header.js
# torch.cuda ```{eval-rst} .. automodule:: torch.cuda ``` ```{eval-rst} .. currentmodule:: torch.cuda ``` ```{eval-rst} .. autosummary:: :toctree: generated :nosignatures: StreamContext can_device_access_peer check_error current_blas_handle current_device current_stream cudart ...
unknown
github
https://github.com/pytorch/pytorch
docs/source/cuda.md
""" Fit NH3 Cube ============ Example script to fit all pixels in an NH3 data cube. This is a bit of a mess, and fairly complicated (intrinsically), but if you have matched 1-1 + 2-2 + ... NH3 cubes, you should be able to modify this example and get something useful out. .. WARNING:: Cube fitting, particularly with ...
unknown
codeparrot/codeparrot-clean
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-instance-attributes class PersistentVolumeClaimConfig(object): ''' Handle pvc options ''' # pylint: disable=too-many-arguments def __init__(self, sname, namespace, kubeconfig, a...
unknown
codeparrot/codeparrot-clean
""" This module defines the attributes of the PyPI package for the Mbed SDK """ from shutil import copyfileobj from os.path import isfile, join from tempfile import TemporaryFile from setuptools import find_packages from distutils.core import setup LICENSE = open('LICENSE').read() DESCRIPTION = """A set of Python scr...
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
# 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 distributed in the hope that ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: UTF-8 -*- import xbmcplugin,xbmcgui,xbmc,xbmcaddon import os,sys,urllib def get_params(): param=[] paramstring=sys.argv[2] if len(paramstring)>=2: params=sys.argv[2] cleanedparams=params.replace('?','') if (par...
unknown
codeparrot/codeparrot-clean
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build ignore /* * Input to cgo -cdefs GOARCH=386 go tool cgo -cdefs defs2_linux.go >defs_linux_386.h The asm header tricks we have to use for Linux on ...
go
github
https://github.com/golang/go
src/runtime/defs2_linux.go
import numpy as np # # # r = 30.0 theta_deg = 88.2 d0 = 1.0/800 E0 = 1000.0 m = -1 # # inputs # theta = theta_deg * np.pi / 180 print("------------- INPUTS ----------------------") print("theta = %f deg = %f rad"%(theta_deg,theta)) print("1/d0 = %f lines/mm"%(1/d0)) print("r = %f m"%(r)) print("order = %d m"%(m)) p...
unknown
codeparrot/codeparrot-clean
# ################################################### # Copyright (C) 2008-2017 The Unknown Horizons Team # team@unknown-horizons.org # This file is part of Unknown Horizons. # # Unknown Horizons is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
unknown
codeparrot/codeparrot-clean
import json import hmac import hashlib import nose from nose.tools import * # noqa from tests.base import OsfTestCase from addons.gitlab import utils from addons.base.exceptions import HookError from addons.gitlab.models import NodeSettings def make_signature(secret, data): return hmac.new(secret, data, hashli...
unknown
codeparrot/codeparrot-clean
# 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 BaseHTTPServe...
unknown
codeparrot/codeparrot-clean
#!/bin/bash # shellcheck source=./common.sh source "$(dirname "${BASH_SOURCE[0]}")/common.sh" if [[ ${BUILD_ENVIRONMENT} == *onnx* ]]; then pip install click mock tabulate networkx==2.0 pip -q install "file:///var/lib/jenkins/workspace/third_party/onnx#egg=onnx" fi # Skip tests in environments where they are not...
unknown
github
https://github.com/pytorch/pytorch
.ci/caffe2/test.sh
#ifndef Py_BUILD_CORE_BUILTIN # define Py_BUILD_CORE_MODULE 1 #endif #include <Python.h> #include <ffi.h> #ifdef MS_WIN32 # include <windows.h> #else # include <sys/mman.h> # include <unistd.h> // sysconf() # if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) # define MAP_ANONYMOUS MAP_ANON # endif #...
c
github
https://github.com/python/cpython
Modules/_ctypes/malloc_closure.c
""" Encoding Aliases Support This module is used by the encodings package search function to map encodings names to module names. Note that the search function normalizes the encoding names before doing the lookup, so the mapping will have to map normalized encoding names to module names. Con...
python
github
https://github.com/python/cpython
Lib/encodings/aliases.py