code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# frozen_string_literal: true ActiveJob::Base.queue_adapter = :inline
ruby
github
https://github.com/rails/rails
activejob/test/adapters/inline.rb
//===-- SerializationTests.cpp - Binary and YAML serialization unit tests -===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clangd/unittests/SerializationTests.cpp
name: JIT on: pull_request: paths: - '**jit**' - 'Python/bytecodes.c' - 'Python/optimizer*.c' - 'Python/executor_cases.c.h' - 'Python/optimizer_cases.c.h' - '**_testinternalcapi**' - '!Python/perf_jit_trampoline.c' - '!**/*.md' - '!**/*.ini' push: paths:...
unknown
github
https://github.com/python/cpython
.github/workflows/jit.yml
#!/usr/bin/env python3 """calculate BLEU scores script taken from https://github.com/vikasnar/Bleu and adjusted by Jörg Tiedemann """ import sys import codecs import os import math import operator import json import functools def fetch_data(cand, ref): """ Store each reference and candidate sentences as a list ...
unknown
codeparrot/codeparrot-clean
""" Views for user API """ from completion.exceptions import UnavailableCompletionData from completion.utilities import get_key_to_last_completed_block from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.contrib.auth.signals import user_logged_in from django.shor...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import base import readers try: import numpy as np except: import mynumpy as np import os.path import sys import external_forces as forces if len(sys.argv) < 4: base.Logger.log("Usage is %s configuration topology external_forces_file" % sys.argv[0], base.Logger.CRITICAL) sys.exit...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eithe...
unknown
codeparrot/codeparrot-clean
/* * This file was automatically generated. * DO NOT MODIFY BY HAND. * Run `yarn fix:special` to update */ "use strict";function e(t,{instancePath:r="",parentData:o,parentDataProperty:s,rootData:a=t}={}){let n=null,l=0;if(0===l){if(!t||"object"!=typeof t||Array.isArray(t))return e.errors=[{params:{type:"object"}}],...
javascript
github
https://github.com/webpack/webpack
schemas/plugins/css/CssModuleGeneratorOptions.check.js
# Copyright (c) 2014 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality o...
unknown
codeparrot/codeparrot-clean
import numpy as np import pytest from pandas import ( DataFrame, HDFStore, Index, Series, date_range, ) tables = pytest.importorskip("tables") pytestmark = [pytest.mark.single_cpu] def test_keys(temp_hdfstore): temp_hdfstore["a"] = Series( np.arange(10, dtype=np.float64), index=date_...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/io/pytables/test_keys.py
# Copyright (c) Aaron Gallagher <_@habnab.it> # See COPYING for details. import socket grammarSource = r""" byte = anything:b -> ord(b) short = byte:high byte:low -> (high << 8) | low cstring = <(~'\x00' anything)*>:string '\x00' -> string ipv4Address = <anything{4}>:packed -> socket.inet_ntop(socket.AF_INET, packe...
unknown
codeparrot/codeparrot-clean
import chalk from 'chalk'; export const colorize = (...colors) => { if(!colors.length) { colors = ['green', 'cyan', 'magenta', 'blue', 'yellow', 'red']; } const colorsCount = colors.length; return (strings, ...values) => { const {length} = values; return strings.map((str, i) => i < length ? str +...
javascript
github
https://github.com/axios/axios
bin/helpers/colorize.js
use rustc_hir::def::DefKind; use rustc_hir::{Expr, ExprKind}; use rustc_middle::ty; use rustc_middle::ty::adjustment::{Adjust, DerefAdjustKind}; use rustc_session::{declare_lint, declare_lint_pass}; use rustc_span::sym; use crate::context::LintContext; use crate::lints::{ NoopMethodCallDiag, SuspiciousDoubleRefClo...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_lint/src/noop_method_call.rs
import argparse import os.path import shlex import sys from test.support import os_helper, Py_DEBUG from .utils import ALL_RESOURCES, RESOURCE_NAMES, TestFilter USAGE = """\ python -m test [options] [test_name1 [test_name2 ...]] python path/to/Lib/test/regrtest.py [options] [test_name1 [test_name2 ...]] """ DESCRIPTI...
python
github
https://github.com/python/cpython
Lib/test/libregrtest/cmdline.py
export default function PostTitle({ children }) { return ( <h1 className="text-6xl md:text-7xl lg:text-8xl font-bold tracking-tighter leading-tight md:leading-none mb-12 text-center md:text-left"> {children} </h1> ); }
typescript
github
https://github.com/vercel/next.js
examples/cms-agilitycms/components/post-title.tsx
# This is equivalent to the core suite, but runs with CBR with heursitic CE enabled. test_kind: js_test selector: roots: - jstests/core/**/*.js - jstests/core_standalone/**/*.js exclude_files: # Transactions are not supported on MongoDB standalone nodes, so we do not run these tests in the # 'core'...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/query_cbr_heuristic_jscore_passthrough.yml
# -*- coding: utf-8 -*- # # Copyright © 2014-2015 Colin Duquesnoy # Copyright © 2009- The Spyder Development Team # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) """ Provides QtGui classes and functions. .. warning:: Only PyQt4/PySide QtGui classes compatible with PyQt5.QtGui are ex...
unknown
codeparrot/codeparrot-clean
"""Heatmap collector for Python profiling with line-level execution heat visualization.""" import base64 import collections import html import importlib.resources import json import locale import math import os import platform import site import sys from dataclasses import dataclass, field from pathlib import Path fro...
python
github
https://github.com/python/cpython
Lib/profiling/sampling/heatmap_collector.py
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: alt-svc Arg: <filename> Protocols: HTTPS Help: Enable alt-svc with this cache file Added: 7.64.1 Category: http Multi: append See-also: - resolve - connect-to Example: - --alt-svc svc.txt $URL --- # `--alt-svc` En...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/alt-svc.md
import math from test.test_json import PyTest, CTest class TestFloat: def test_floats(self): for num in [1617161771.7650001, math.pi, math.pi**100, math.pi**-100, 3.1]: self.assertEqual(float(self.dumps(num)), num) self.assertEqual(self.loads(self.dumps(num)), num) def test_int...
unknown
codeparrot/codeparrot-clean
from django.db import connections from django.db.models.query import sql from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.sql import aggregates as gis_aggregates from django.contrib.gis.db.models.sql.conversion import AreaField, DistanceField, GeomField from django.contri...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/test/java/org/apache/kafka/clients/consumer/CooperativeStickyAssignorTest.java
#!/usr/bin/env python from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from youtube_dl.jsinterp import JSInterpreter class TestJSInterpreter(unittest.TestCase): def test_basic(sel...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
unknown
codeparrot/codeparrot-clean
# Display the About Page from FruityDisplay # includes import dot3k.lcd as lcd from dot3k.menu import MenuOption class About(MenuOption): def __init__(self): MenuOption.__init__(self) def redraw(self, menu): lcd.clear() menu.write_option(row=0, text="About this App") menu.write_optio...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import os import re import sys from file_types import * cpp_c_headers = { 'assert.h' : 'cassert', 'ctype.h' : 'cctype', 'errno.h' : 'cerrno', 'float.h' : 'cfloat', 'limits.h' : 'climits', 'locale.h' : 'clocale', 'math.h' : 'cmath', 'setjmp.h' : 'csetjmp', ...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import json import o...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2019-01-21 13:34 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('account_keeping', '0006_auto_20190102_1114'), ] operations = [ migrations.A...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, division, print_function, unicode_literals class CursorContextManager(object): """Instantiated once per :py:func:`~postgres.Postgres.get_cursor` call. :param pool: a :py:class:`psycopg2.pool.*ConnectionPool` The return value of :py:func:`CursorContextManager.__...
unknown
codeparrot/codeparrot-clean
""" Linux swap file. Documentation: Linux kernel source code, files: - mm/swapfile.c - include/linux/swap.h Author: Victor Stinner Creation date: 25 december 2006 (christmas ;-)) """ from lib.hachoir_parser import Parser from lib.hachoir_core.field import (ParserError, GenericVector, UInt32, String, Bytes,...
unknown
codeparrot/codeparrot-clean
# Used by the ErrorHandlerResolutionTests test case. urlpatterns = [] handler400 = "urlpatterns_reverse.views.empty_view" handler403 = "urlpatterns_reverse.views.empty_view" handler404 = "urlpatterns_reverse.views.empty_view" handler500 = "urlpatterns_reverse.views.empty_view"
python
github
https://github.com/django/django
tests/urlpatterns_reverse/urls_error_handlers.py
from django import template from django.utils.safestring import mark_safe from suit import config from suit.config import get_config register = template.Library() def get_form_size(fieldset): form_size_by_config = get_config('form_size') # Fallback to model admin definition form_size_by_model_admin = get...
unknown
codeparrot/codeparrot-clean
#!/bin/bash set -e # The purpose of this script is to install build dependencies and set # $build_env to a function that sets appropriate environment variables, # to enable (mingw32|mingw64) environment if we want to compile with gcc, or # (mingw32|mingw64) + vcvarsall.bat if we want to compile with cl.exe if [[ "$T...
unknown
github
https://github.com/redis/redis
deps/jemalloc/scripts/windows/before_install.sh
# Copyright 2025 HuggingFace Inc. 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 applicab...
python
github
https://github.com/huggingface/transformers
src/transformers/masking_utils.py
--- MainSourceFile: order-dependent.cpp Diagnostics: - DiagnosticName: test-order-dependent-insertion DiagnosticMessage: Message: Fix FilePath: $(path)/order-dependent.cpp FileOffset: 12 Replacements: - FilePath: $(path)/order-dependent.cpp Offset: 12 ...
unknown
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-apply-replacements/Inputs/order-dependent/file1.yaml
# -*- coding: utf-8 -*- import logging import commands import simplejson import os import os.path import openerp import time import random import subprocess import simplejson import werkzeug import werkzeug.wrappers _logger = logging.getLogger(__name__) from openerp import http from openerp.http import request # Thos...
unknown
codeparrot/codeparrot-clean
#include "test/jemalloc_test.h" #include "jemalloc/internal/prof_data.h" #include "jemalloc/internal/prof_sys.h" static int prof_dump_open_file_intercept(const char *filename, int mode) { int fd; fd = open("/dev/null", O_WRONLY); assert_d_ne(fd, -1, "Unexpected open() failure"); return fd; } static void set_pr...
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/prof_reset.c
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT package com.plugin.sample import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 import org.junit.Test import org.junit....
kotlin
github
https://github.com/tauri-apps/tauri
examples/api/src-tauri/tauri-plugin-sample/android/src/androidTest/java/com/plugin/sample/ExampleInstrumentedTest.kt
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing_extensions import TypedDict __all__ = ["CallRejectParams"] class CallRejectParams(TypedDict, total=False): status_code: int """SIP response code to send back to the caller. ...
python
github
https://github.com/openai/openai-python
src/openai/types/realtime/call_reject_params.py
#!/usr/bin/python # -*- coding: utf-8 -*- import urllib from django.conf import settings from django.contrib.auth import login from django.contrib.auth.models import User from django.contrib.sessions.models import Session from django.core import signing from django.core.context_processors import csrf from django.core.s...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # # Mixpanel, Inc. -- http://mixpanel.com/ # # Python API client library to consume mixpanel.com analytics data. # # Copyright 2010-2013 Mixpanel, 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 o...
unknown
codeparrot/codeparrot-clean
'use strict' /** * Module dependencies. */ var express = require('../../'); var app = module.exports = express(); // create an error with .status. we // can then use the property in our // custom error handler (Connect respects this prop as well) function error(status, msg) { var err = new Error(msg); err.st...
javascript
github
https://github.com/expressjs/express
examples/web-service/index.js
<!--- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may...
unknown
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/site/markdown/release/0.21.1/CHANGELOG.0.21.1.md
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2013, Dylan Martin <dmartin@seattlecentral.edu> # # 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 v...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python -tt # 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 distrib...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2012, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
unknown
codeparrot/codeparrot-clean
from LogAnalyzer import Test,TestResult import DataflashLog class TestEvents(Test): '''test for erroneous events and failsafes''' # TODO: need to check for vehicle-specific codes def __init__(self): Test.__init__(self) self.name = "Event/Failsafe" def run(self, logdata, verbose): self.result = TestResult()...
unknown
codeparrot/codeparrot-clean
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // ...
c
github
https://github.com/opencv/opencv
3rdparty/protobuf/src/google/protobuf/generated_message_bases.h
# 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 json import o...
unknown
codeparrot/codeparrot-clean
<html> <body> <script src="dist/output.js"></script> </body> </html>
html
github
https://github.com/webpack/webpack
examples/asset-svg-data-uri/index.html
#!/usr/bin/env python # -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011 CERN. ## ## Invenio 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 ##...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 the rootpy developers # distributed under the terms of the GNU General Public License from __future__ import absolute_import import re import sys if sys.version_info[0] >= 3: import io file = io.TextIOBase import ROOT from .. import log; log = log[__name__] from .. import QROOT from ..utils ...
unknown
codeparrot/codeparrot-clean
// Copyright 2018 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
go
github
https://github.com/etcd-io/etcd
client/pkg/tlsutil/cipher_suites.go
""" Test for LMS courseware app. """ import mock from mock import Mock from unittest import TestCase from django.core.urlresolvers import reverse from django.test.utils import override_settings from textwrap import dedent from xmodule.error_module import ErrorDescriptor from xmodule.modulestore.django import modulest...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> ngx_int_t ngx_thread_cond_create(ngx_thread_cond_t *cond, ngx_log_t *log) { ngx_err_t err; err = pthread_cond_init(cond, NULL); if (err == 0) { return NGX_OK; } ngx_log_error(N...
c
github
https://github.com/nginx/nginx
src/os/unix/ngx_thread_cond.c
# -*- coding:utf-8 -*- import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) try: with open(os.path.join(here, 'README.rst')) as f: README = f.read() with open(os.path.join(here, 'CHANGES.txt')) as f: CHANGES = f.read() except IOErro...
unknown
codeparrot/codeparrot-clean
# -*- test-case-name: twisted.test.test_internet -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Very basic functionality for a Reactor implementation. """ import socket # needed only for sync-dns from zope.interface import implements, classImplements import sys import warnings from h...
unknown
codeparrot/codeparrot-clean
# Test failures do not block the apply for valid resources. # pod-a and pod-c should apply, while POD-B is invalid # because of the capitialization. apiVersion: v1 kind: Pod metadata: name: pod-a spec: containers: - name: kubernetes-pause image: registry.k8s.io/pause:3.10.1 --- apiVersion: v1 kind: Pod metada...
unknown
github
https://github.com/kubernetes/kubernetes
hack/testdata/multi-resource-3.yaml
from collections.abc import Iterator LOG_EMERG = 0 LOG_ALERT = 1 LOG_CRIT = 2 LOG_ERR = 3 LOG_WARNING = 4 LOG_NOTICE = 5 LOG_INFO = 6 LOG_DEBUG = 7 DEFAULT_CONVERTERS = {} class Reader(Iterator): """ Mock systemd.journal.Reader so we can run tests in its absence """ def get_next(self): raise...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2010 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ sphinx.pycode.nodes ~~~~~~~~~~~~~~~~~~~ Parse tree node implementations. :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ class BaseNode(object): """ Node superclass for both terminal and nonterminal n...
unknown
codeparrot/codeparrot-clean
# Author: Wei Xue <xuewei4d@gmail.com> # Thierry Guillemot <thierry.guillemot.work@gmail.com> # License: BSD 3 clauseimport warnings import sys import warnings import numpy as np from scipy import stats, linalg from sklearn.covariance import EmpiricalCovariance from sklearn.datasets.samples_generator import...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import import datetime try: import pytz except ImportError: pytz = None from django.test import TestCase from django.test.utils import override_settings from django.utils import timezone from django.utils.unittest import skipIf from .models import Article, Comment, Category ...
unknown
codeparrot/codeparrot-clean
r""" ======================================= Robust vs Empirical covariance estimate ======================================= The usual covariance maximum likelihood estimate is very sensitive to the presence of outliers in the data set. In such a case, it would be better to use a robust estimator of covariance to guar...
unknown
codeparrot/codeparrot-clean
""" Here is probably the place to write the docs, since the test-cases show how the type behave. Later... """ from ctypes import * import sys, unittest try: WINFUNCTYPE except NameError: # fake to enable this test on Linux WINFUNCTYPE = CFUNCTYPE import _ctypes_test dll = CDLL(_ctypes_test.__file__) if ...
unknown
codeparrot/codeparrot-clean
name: Proposals description: New external API or other notable changes title: "proposal: import/path: proposal title" labels: ["Proposal"] body: - type: markdown attributes: value: "Our proposal process is documented here: https://go.dev/s/proposal-process" - type: textarea id: proposal-details at...
unknown
github
https://github.com/golang/go
.github/ISSUE_TEMPLATE/10-proposal.yml
@file:OptIn(ObsoleteWorkersApi::class) package kotlinx.coroutines import kotlin.coroutines.* import kotlin.native.concurrent.* import kotlin.time.* internal actual abstract class EventLoopImplPlatform : EventLoop() { private val current = Worker.current protected actual fun unpark() { current.execu...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/native/src/EventLoop.kt
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Florian Boudin # Date: 10-02-2018 """ExpandRank keyphrase extraction model. Graph-based ranking approach to keyphrase extraction described in: * Xiaojun Wan and Jianguo Xiao. Single Document Keyphrase Extraction Using Neighborhood Knowledge. *In proceedings...
unknown
codeparrot/codeparrot-clean
{ "name": "svelte-monorepo", "version": "0.0.1", "description": "monorepo for svelte and friends", "private": true, "type": "module", "license": "MIT", "packageManager": "pnpm@10.4.0", "engines": { "pnpm": ">=9.0.0" }, "repository": { "type": "git", "url": "git+https://github.com/sveltej...
json
github
https://github.com/sveltejs/svelte
package.json
# (c) 2013, Jan-Piet Mens <jpmens(at)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) any later ver...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package terraform import ( "log" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/dag" ) // GraphNodeAttachResourceConfig is an interface that must be i...
go
github
https://github.com/hashicorp/terraform
internal/terraform/transform_attach_config_resource.go
from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import CookieStorage from django.contrib.messages.storage.session import SessionStorage class FallbackStorage(BaseStorage): """ Try to store all messages in the first backend. Store any unstored message...
unknown
codeparrot/codeparrot-clean
import logging import re from django.contrib.staticfiles.storage import staticfiles_storage from django.contrib.staticfiles import finders from django.conf import settings from xmodule.contentstore.content import StaticContent from opaque_keys.edx.locator import AssetLocator from six import text_type log = logging....
unknown
codeparrot/codeparrot-clean
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>React Router - Route Objects Example</title> </head> <body> <div id="root"></div> <script type="module" src="/src/main.tsx"></script> </body> </htm...
html
github
https://github.com/remix-run/react-router
examples/route-objects/index.html
# -*- coding: utf-8 -*- """ *************************************************************************** ogr2ogr.py --------------------- Date : November 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *****************************...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2014 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 applica...
unknown
github
https://github.com/kubernetes/kubernetes
hack/verify-boilerplate.sh
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2013, Steven Dossett <sdossett@panath.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations DOCUMENTATION = """ name: inventory_hostnames author...
python
github
https://github.com/ansible/ansible
lib/ansible/plugins/lookup/inventory_hostnames.py
// Copyright 2019 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/status/status_payload_printer.h
# coding: utf8 """ webencodings.tests ~~~~~~~~~~~~~~~~~~ A basic test suite for Encoding. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. """ from __future__ import unicode_literals from . import (lookup, LABELS, decode, encode, iter_decode, iter_encode, ...
unknown
codeparrot/codeparrot-clean
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // ...
c
github
https://github.com/opencv/opencv
3rdparty/protobuf/src/google/protobuf/metadata.h
import functools import typing from ._meta import PackageMetadata md_none = functools.partial(typing.cast, PackageMetadata) """ Suppress type errors for optional metadata. Although Distribution.metadata can return None when metadata is corrupt and thus None, allow callers to assume it's not None and crash if that's ...
python
github
https://github.com/python/cpython
Lib/importlib/metadata/_typing.py
"""Test GroupDataset module.""" from .context import GroupDataset from .context import IndexGenerator # from nose.tools import raises from tensorflow.examples.tutorials.mnist import input_data mnist_raw = input_data.read_data_sets('../data/MNIST_data', one_hot=True) MNIST_size = 28 images_per_sample = 5 amount_of_cla...
unknown
codeparrot/codeparrot-clean
# # Copyright 2017 Michael De La Rue | Ansible # # 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 ver...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash source ../collection/setup.sh set -x # common args for all tests common=(--venv --color --truncate 0 "${@}") # run a lightweight test that generates code coverage output ansible-test sanity --test import "${common[@]}" --coverage --python "${ANSIBLE_TEST_PYTHON_VERSION}" # run an integration te...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-test-coverage/runme.sh
from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_b64decode from ..utils import ( determine_ext, ExtractorError, int_or_none, KNOWN_EXTENSIONS, parse_filesize, url_or_none, urlencode_postdata, ) class SharedBaseIE(InfoExtractor): def ...
unknown
codeparrot/codeparrot-clean
use std::hash::Hash; use std::mem; use rustc_data_structures::hash_table::{Entry, HashTable}; use rustc_data_structures::stack::ensure_sufficient_stack; use rustc_data_structures::{outline, sharded, sync}; use rustc_errors::{Diag, FatalError, StashKey}; use rustc_middle::dep_graph::DepsType; use rustc_middle::ty::TyCt...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_query_impl/src/execution.rs
# parameters.py # -*- coding: utf-8 -*- ''' IIIF Image API parameters as objects. The attributes of this class should make it possible to work with most imaging libraries without any further need to process the IIIF syntax. ''' import re from decimal import Decimal from math import floor from logging import getLogge...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
unknown
codeparrot/codeparrot-clean
from django.core.management.base import BaseCommand from datetime import timedelta from django.utils.timezone import now from cl.donate.models import Donation TOO_MANY_DAYS_AGO = now() - timedelta(days=7) class Command(BaseCommand): help = 'Deletes donations that never went through so they are not in ' \ ...
unknown
codeparrot/codeparrot-clean
function Component(props) { const a = [props.a, props.b, 'hello']; const x = a.length; const y = a.push; return {a, x, y, z: a.concat}; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [{a: [1, 2], b: 2}], isComponent: false, };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/array-properties.js
#!/usr/bin/python # Copyright (c) 2018 Catalyst IT Ltd. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['pre...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Simon Dodsley (simon@purestorage.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 ANSIBLE_METADATA = {'metadata_version': '1.1',...
unknown
codeparrot/codeparrot-clean
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import socorro.lib.ver_tools as vtl phs = vtl._padding_high_string pl = vtl._padding_list tests = [('3', [...
unknown
codeparrot/codeparrot-clean
import numpy as np import pytest import pandas as pd from pandas import DataFrame import pandas._testing as tm class TestDataFrameFilter: def test_filter(self, float_frame, float_string_frame): # Items filtered = float_frame.filter(["A", "B", "E"]) assert len(filtered.columns) == 2 ...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/frame/methods/test_filter.py
@file:Suppress("NAMED_ARGUMENTS_NOT_ALLOWED", "DEPRECATION") // KT-21913 package kotlinx.coroutines import kotlinx.coroutines.testing.* import kotlin.test.* import kotlin.time.* import kotlin.time.Duration.Companion.seconds import kotlin.time.Duration.Companion.nanoseconds class DelayDurationTest : TestBase() { ...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/common/test/DelayDurationTest.kt
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package vault import ( "context" "fmt" "reflect" "strings" "sync" "testing" "time" log "github.com/hashicorp/go-hclog" "github.com/hashicorp/vault/sdk/helper/logging" "github.com/hashicorp/vault/sdk/physical" "github.com/hashicorp/vaul...
go
github
https://github.com/hashicorp/vault
vault/rekey_test.go
import mock class BugzillaBaseClassTest(mock.TestCase): def setUp(self): self.setupModules(['report.plugins.bugzilla', 'report.plugins.bugzilla.filer']) self.fs = mock.DiskIO() def tearDown(self): self.tearDownModules() def connect_and_login_test(self):...
unknown
codeparrot/codeparrot-clean
// Copyright 2015 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import ( "context" "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" "github.com/cockroachdb/cockroach/pkg/kv/kvpb" "github.com/cockroachdb/cockroach/...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/truncate.go