code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# -*- coding: utf-8 -*- # # Test links: # http://remixshare.com/download/z8uli # # Note: # The remixshare.com website is very very slow, so # if your download not starts because of pycurl timeouts: # Adjust timeouts in /usr/share/pyload/module/network/HTTPRequest.py import re from module.plugins.internal.SimpleHoster...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2021 The 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 # # U...
python
github
https://github.com/huggingface/transformers
examples/pytorch/image-classification/run_image_classification.py
""" Sahana Eden Automated Test - ORG001 Create Organisation @copyright: 2011-2012 (c) Sahana Software Foundation @license: MIT 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 ...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package database import ( "context" "fmt" "time" "github.com/hashicorp/vault/helper/versions" v5 "github.com/hashicorp/vault/sdk/database/dbplugin/v5" "github.com/hashicorp/vault/sdk/framework" "github.com/hashicorp/vault/sdk/logical" "gi...
go
github
https://github.com/hashicorp/vault
builtin/logical/database/path_rotate_credentials.go
A multi-line (doc-)comment is unterminated. Erroneous code example: ```compile_fail,E0758 /* I am not terminated! ``` The same goes for doc comments: ```compile_fail,E0758 /*! I am not terminated! ``` You need to end your multi-line comment with `*/` in order to fix this error: ``` /* I am terminated! */ /*! I am...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0758.md
#!/usr/bin/env python # coding: utf-8 # Copyright 2013 The Font Bakery 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/LIC...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- import sys sys.path += ['../'] from mingus.containers.note import Note import unittest from mingus.containers.mt_exceptions import NoteFormatError class test_Note(unittest.TestCase): def setUp(self): self.c = Note('C', 5) self.c1 = Note('C') self.c...
unknown
codeparrot/codeparrot-clean
# 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 # d...
unknown
codeparrot/codeparrot-clean
"""Context management for tracers.""" from __future__ import annotations from contextlib import contextmanager from contextvars import ContextVar from typing import ( TYPE_CHECKING, Any, Literal, cast, ) from uuid import UUID from langsmith import run_helpers as ls_rh from langsmith import utils as l...
python
github
https://github.com/langchain-ai/langchain
libs/core/langchain_core/tracers/context.py
""" Timedelta benchmarks with non-tslibs dependencies. See benchmarks.tslibs.timedelta for benchmarks that rely only on tslibs. """ from pandas import ( DataFrame, Series, timedelta_range, ) class DatetimeAccessor: def setup_cache(self): N = 100000 series = Series(timedelta_range("1 d...
python
github
https://github.com/pandas-dev/pandas
asv_bench/benchmarks/timedelta.py
#!env/python3 # coding: utf-8 try: import ipdb except ImportError: pass import os import hashlib import datetime import logging import traceback import uuid import time import asyncio import subprocess import re import json import requests import concurrent.futures from config import LOG_DIR, CACHE_DIR, CACHE...
unknown
codeparrot/codeparrot-clean
""" Constants specific to the SQL storage portion of the ORM. """ from collections import namedtuple import re # Valid query types (a set is used for speedy lookups). These are (currently) # considered SQL-specific; other storage systems may choose to use different # lookup types. QUERY_TERMS = set([ 'exact', 'ie...
unknown
codeparrot/codeparrot-clean
import errno import os import shutil import tempfile import uuid from collections import namedtuple from filecmp import cmp from unittest import mock import pyfakefs.fake_filesystem as fake_fs import requests from django.test import SimpleTestCase from ESSArch_Core.storage.copy import copy_chunk_remotely, copy_dir, c...
unknown
codeparrot/codeparrot-clean
# # Copyright (C) 2009-2016 Nexedi SA # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed...
unknown
codeparrot/codeparrot-clean
#------------------------------------------------------------------------------- # Name: calculate the moving average of LSWI # Inputs: LSWImax for each tile for each year (2001~2014) # # Author: Yao Zhang # # Created: 12/01/2015 # Modified: 05/04/2016 # Copyright: (c) eomf 2015 # Licence: <you...
unknown
codeparrot/codeparrot-clean
{ "kind": "DashboardWithAccessInfo", "apiVersion": "dashboard.grafana.app/v2beta1", "metadata": { "name": "groupby-test" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "query": { "kind": "DataQuery", "group": "grafana", ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/v1beta1.groupby.v2beta1.json
# -*- Mode: Python; test-case-name: flumotion.test.test_flavors -*- # vi:si:et:sw=4:sts=4:ts=4 # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. # Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. # # This file may be distributed and/or modified un...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2004-2006 Zuza Software Foundation # # This file is part of translate. # # translate 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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
unknown
codeparrot/codeparrot-clean
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Todo} from './todo'; export abstract class TodosService { getAll(): Promise<Todo[]> { throw new Error...
typescript
github
https://github.com/angular/angular
devtools/src/app/demo-app/todo/home/todos.service.ts
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This module helps emulate Visual Studio 2008 behavior on top of other build systems, primarily ninja. """ import os import re import subprocess import sys im...
unknown
codeparrot/codeparrot-clean
/* (unused) x y z { color: red; }*/
css
github
https://github.com/sveltejs/svelte
packages/svelte/tests/css/samples/descendant-selector-unmatched/expected.css
# Copyright (c) 2001, Stanford University # All rights reserved. # # See the file LICENSE.txt for information on redistributing this software. import sys sys.path.append( "../glapi_parser" ) import apiutil keys = apiutil.GetDispatchedFunctions() apiutil.CopyrightC() print """ /* DO NOT EDIT - THIS FILE GENERATED BY...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ''' Covenant Add-on 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. This prog...
unknown
codeparrot/codeparrot-clean
#"INTEL CONFIDENTIAL" #Copyright 2015 Intel Corporation All Rights Reserved. # #The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers and...
unknown
codeparrot/codeparrot-clean
from Cython.Compiler import TypeSlots from Cython.Compiler.ExprNodes import not_a_constant import cython cython.declare(UtilityCode=object, EncodedString=object, BytesLiteral=object, Nodes=object, ExprNodes=object, PyrexTypes=object, Builtin=object, UtilNodes=object, Naming=object) import...
unknown
codeparrot/codeparrot-clean
"""`OutputParser` classes parse the output of an LLM call into structured data. !!! tip "Structured output" Output parsers emerged as an early solution to the challenge of obtaining structured output from LLMs. Today, most LLMs support [structured output](https://docs.langchain.com/oss/python/langchain/m...
python
github
https://github.com/langchain-ai/langchain
libs/core/langchain_core/output_parsers/__init__.py
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2012, Jim Richardson <weaselkeeper@gmail.com> # All rights reserved. # # 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 F...
unknown
codeparrot/codeparrot-clean
import dogstats_wrapper as dog_stats_api import logging from .grading_service_module import GradingService log = logging.getLogger(__name__) class ControllerQueryService(GradingService): """ Interface to controller query backend. """ METRIC_NAME = 'edxapp.open_ended_grading.controller_query_service'...
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...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/serialization/definitions/param.py
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
unknown
codeparrot/codeparrot-clean
""" Creates a launcher instance which runs a socket server that can take incoming commands and launches them to a rapd launch instance that is determined by the IP address of the host and the optional passed-in tag """ __license__ = """ This file is part of RAPD Copyright (C) 2009-2018, Cornell University All rights ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package terraform import ( "context" "github.com/hashicorp/hcl/v2" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/actions" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/ch...
go
github
https://github.com/hashicorp/terraform
internal/terraform/eval_context.go
/** * Constant-time functions * * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ #ifndef MBEDTLS_CONSTANT_TIME_INTERNAL_H #define MBEDTLS_CONSTANT_TIME_INTERNAL_H #include <stdint.h> #include <stddef.h> #include "common.h" #if defined(MBEDTLS_BIGNUM_C) #incl...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/library/constant_time_internal.h
from compare import expect from django.contrib.sites.models import RequestSite from django.test import TestCase import oaipmh.error import oaipmh.interfaces from ...provider.base import BaseProvider class BaseProviderTestCase(TestCase): def setUp(self): class FakeRequest(): def get_host(sel...
unknown
codeparrot/codeparrot-clean
/* contrib/pg_trgm/pg_trgm--1.5--1.6.sql */ -- complain if script is sourced in psql, rather than via ALTER EXTENSION \echo Use "ALTER EXTENSION pg_trgm UPDATE TO '1.6'" to load this file. \quit ALTER OPERATOR FAMILY gin_trgm_ops USING gin ADD OPERATOR 11 pg_catalog.= (text, text); ALTER OPERATO...
sql
github
https://github.com/postgres/postgres
contrib/pg_trgm/pg_trgm--1.5--1.6.sql
#include <ATen/native/vulkan/api/Tensor.h> #include <ATen/native/vulkan/api/Utils.h> namespace at { namespace native { namespace vulkan { namespace { /* * Calculates the strides of a contiguous tensor. empty_tensor_restride from * TensorImpl.h was used as a reference. */ std::vector<int64_t> calc_contiguous_strid...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/vulkan/api/Tensor.cpp
# example.js ```javascript document.body.innerHTML = ` <pre id="history"></pre> <form> <input id="message" type="text"> <button id="send">Send Message</button> </form> <p>Computing fibonacci without worker:</p> <input id="fib1" type="number"> <pre id="output1"></pre> <p>Computing fibonacci with worker:</p> <...
unknown
github
https://github.com/webpack/webpack
examples/worker/README.md
# Python Standard Library Imports import logging # External Imports from sqlalchemy import Column from sqlalchemy import String, INTEGER, FLOAT from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import scoped_session, sessionmaker # Custom Imports import c...
unknown
codeparrot/codeparrot-clean
""" ISO_C_BINDING maps for f2py2e. Only required declarations/macros/functions will be used. Copyright 1999 -- 2011 Pearu Peterson all rights reserved. Copyright 2011 -- present NumPy Developers. Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRANTY IS EXPR...
python
github
https://github.com/numpy/numpy
numpy/f2py/_isocbind.py
from __future__ import absolute_import import cython cython.declare(PyrexTypes=object, ExprNodes=object, Nodes=object, Builtin=object, InternalError=object, error=object, warning=object, py_object_type=object, unspecified_type=object, object_expr=object, fake_rhs_expr=objec...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Make sure LTCG is working properly. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.TestGyp(formats=['msvs...
unknown
codeparrot/codeparrot-clean
# This validates date properties of Tenders. class TenderDate_validation: STATE=None # It takes arguments such as callForTendersPublicationDate, bidDeadlineDate, contractAwardNoticePublicationDate, and parentContractAwardDate def __init__(self, callForTendersPublicationDate, bidDeadlineDate, contractAwa...
unknown
codeparrot/codeparrot-clean
# # Kivy - Crossplatform NUI toolkit # http://kivy.org/ # from __future__ import print_function import sys from copy import deepcopy import os from os.path import join, dirname, sep, exists, basename, isdir, abspath from os import walk, environ, makedirs, listdir from distutils.version import LooseVersion from collec...
unknown
codeparrot/codeparrot-clean
"""Module definitions of agent types together with corresponding agents.""" from enum import Enum from langchain_core._api import deprecated from langchain_classic._api.deprecation import AGENT_DEPRECATION_WARNING @deprecated( "0.1.0", message=AGENT_DEPRECATION_WARNING, removal="1.0", ) class AgentType(...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/agents/agent_types.py
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * 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 req...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/ELF/NoteDetails/Properties.hpp
# SPDX-License-Identifier: GPL-2.0 %YAML 1.2 --- $id: http://devicetree.org/schemas/display/brcm,bcm2835-hvs.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Broadcom VC4 (VideoCore4) Hardware Video Scaler maintainers: - Eric Anholt <eric@anholt.net> properties: compatible: enum: - b...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
"""build_ext tests """ import sys, os, shutil, tempfile, unittest, site, zipfile from setuptools.command.upload_docs import upload_docs from setuptools.dist import Distribution SETUP_PY = """\ from setuptools import setup setup(name='foo') """ class TestUploadDocsTest(unittest.TestCase): def setUp(self): ...
unknown
codeparrot/codeparrot-clean
from . import IDLEenvironment import string import win32ui import win32api import win32con from . import keycodes import sys import traceback HANDLER_ARGS_GUESS=0 HANDLER_ARGS_NATIVE=1 HANDLER_ARGS_IDLE=2 HANDLER_ARGS_EXTENSION=3 next_id = 5000 event_to_commands = {}# dict of integer IDs to event names. command_to_e...
unknown
codeparrot/codeparrot-clean
import pytest from flask import template_rendered @pytest.mark.parametrize( ("path", "template_name"), ( ("/", "fetch.html"), ("/plain", "xhr.html"), ("/fetch", "fetch.html"), ("/jquery", "jquery.html"), ), ) def test_index(app, client, path, template_name): def check(se...
python
github
https://github.com/pallets/flask
examples/javascript/tests/test_js_example.py
#!/usr/bin/python from PiMinerInfo import PiMinerInfo from Adafruit_CharLCDPlate import Adafruit_CharLCDPlate class PiMinerDisplay: col = [] prevCol = 0 lcd = Adafruit_CharLCDPlate() info = None mode = 1 offset = 0 maxOffset = 0 screen = [] def __init__(self): self.lcd.clear() self.col = (self.lcd.ON, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # encoding: utf-8 """ tests.py TODO: These tests need to be updated to support the Python 2.7 runtime """ import os import unittest from google.appengine.ext import testbed from application import app class DemoTestCase(unittest.TestCase): def setUp(self): # Flask apps testing. Se...
unknown
codeparrot/codeparrot-clean
# These are supported funding model platforms github: [robjtede, JohnTitor]
unknown
github
https://github.com/actix/actix-web
.github/FUNDING.yml
from test.test_support import run_unittest, check_py3k_warnings import unittest class TestImplementationComparisons(unittest.TestCase): def test_type_comparisons(self): self.assertTrue(str < int or str > int) self.assertTrue(int <= str or int >= str) self.assertTrue(cmp(int, str) != 0) ...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 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 -*- """ Kay authentication views. :Copyright: (c) 2009 Takashi Matsuo <tmatsuo@candit.jp> All rights reserved. :license: BSD, see LICENSE for more details. """ from werkzeug import ( unescape, redirect, Response, ) from kay.i18n import lazy_gettext as _ from kay.cache import NoCacheMixin from ...
unknown
codeparrot/codeparrot-clean
from django.core.management.base import BaseCommand class Command(BaseCommand): help = "Test No-args commands" requires_system_checks = [] def handle(self, **options): print("EXECUTE: noargs_command options=%s" % sorted(options.items()))
python
github
https://github.com/django/django
tests/admin_scripts/management/commands/noargs_command.py
@file:OptIn(ExperimentalCoroutinesApi::class) import org.junit.* import kotlinx.coroutines.* import kotlinx.coroutines.debug.* import org.junit.Ignore import org.junit.Test import java.io.* import java.lang.IllegalStateException import kotlin.test.* class DynamicAttachDebugJpmsTest { /** * This test is disa...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
integration-testing/jpmsTest/src/debugDynamicAgentJpmsTest/kotlin/DynamicAttachDebugJpmsTest.kt
{ "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start" }, "dependencies": { "@xstate/react": "^4.1.2", "next": "latest", "react": "^18.3.1", "react-dom": "^18.3.1", "xstate": "^5.18.1" }, "devDependencies": { "@types/node": "^22.5....
json
github
https://github.com/vercel/next.js
examples/with-xstate/package.json
# -*- coding: utf-8 -*- # # Copyright (c) 2013 the BabelFish authors. All rights reserved. # Use of this source code is governed by the 3-clause BSD license # that can be found in the LICENSE file. # from __future__ import unicode_literals from collections import namedtuple from pkg_resources import resource_stream # ...
unknown
codeparrot/codeparrot-clean
name: periodic-rocm-mi355 on: schedule: - cron: 29 8 * * * # about 1:29am PDT, for mem leak check and rerun disabled tests push: tags: - ciflow/periodic-rocm-mi355/* branches: - release/* workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.numbe...
unknown
github
https://github.com/pytorch/pytorch
.github/workflows/periodic-rocm-mi355.yml
# # big5.py: Python Unicode Codec for BIG5 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_tw, codecs import _multibytecodec as mbc codec = _codecs_tw.getcodec('big5') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrementalE...
python
github
https://github.com/python/cpython
Lib/encodings/big5.py
# -*- coding: utf-8 -*- """ pygments.lexers._tsql_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These are manually translated lists from https://msdn.microsoft.com. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # See https://msdn.microsof...
unknown
codeparrot/codeparrot-clean
/* * This program is licensed under the same licence as Ruby. * (See the file 'COPYING'.) */ #include "ossl.h" #define NewPKCS12(klass) \ TypedData_Wrap_Struct((klass), &ossl_pkcs12_type, 0) #define SetPKCS12(obj, p12) do { \ if(!(p12)) ossl_raise(rb_eRuntimeError, "PKCS12 wasn't initialized."); \ RTYP...
c
github
https://github.com/ruby/ruby
ext/openssl/ossl_pkcs12.c
""" A sparse matrix in COOrdinate or 'triplet' format""" from __future__ import division, print_function, absolute_import __docformat__ = "restructuredtext en" __all__ = ['coo_matrix', 'isspmatrix_coo'] from warnings import warn import numpy as np from scipy._lib.six import xrange, zip as izip from ._sparsetools ...
unknown
codeparrot/codeparrot-clean
"""PyPI and direct package downloading""" import sys, os.path, re, urlparse, urllib, urllib2, shutil, random, socket, cStringIO import base64 import httplib from pkg_resources import * from distutils import log from distutils.errors import DistutilsError try: from hashlib import md5 except ImportError: from md5...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
unknown
codeparrot/codeparrot-clean
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-annotated-text-highlighter.html --- # Using the annotated highlighter [mapper-annotated-text-highlighter] The `annotated-text` plugin includes a custom highlighter designed to mark up search hits in a way which is respectful of...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch-plugins/mapper-annotated-text-highlighter.md
/* Copyright (c) 2022, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not lim...
c
github
https://github.com/mysql/mysql-server
components/test_server_telemetry_metrics/required_services.h
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack LLC. # # 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 # # htt...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python """ (C) Copyright 2020-2021 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent """ import time import random import threading from itertools import product from test_utils_pool import TestPool from write_host_file import write_host_file from daos_racer_utils import DaosRacerCommand ...
unknown
codeparrot/codeparrot-clean
import { render_effect, effect, teardown } from '../../../reactivity/effects.js'; import { listen } from './shared.js'; /** @param {TimeRanges} ranges */ function time_ranges_to_array(ranges) { var array = []; for (var i = 0; i < ranges.length; i += 1) { array.push({ start: ranges.start(i), end: ranges.end(i) });...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/src/internal/client/dom/elements/bindings/media.js
DOCUMENTATION: name: all author: Ansible Core version_added: "2.4" short_description: are all conditions in a list true description: - This test checks each condition in a list for truthiness. - Same as the C(all) Python function. options: _input: description: List of conditions, each can ...
unknown
github
https://github.com/ansible/ansible
lib/ansible/plugins/test/all.yml
"""Common operations on Posix pathnames. Instead of importing this module directly, import os and refer to this module as os.path. The "os.path" name is an alias for this module on Posix systems; on other systems (e.g. Mac, Windows), os.path provides the same operations in a manner specific to that platform, and is a...
unknown
codeparrot/codeparrot-clean
""" Code which dynamically discovers comprehensive themes. Deliberately uses no Django settings, as the discovery happens during the initial setup of Django settings. """ import os from path import Path def get_theme_base_dirs_from_settings(theme_dirs=None): """ Return base directories that contains all the th...
unknown
codeparrot/codeparrot-clean
framework: serializer: enabled: false
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/serializer_disabled.yml
# # Python documentation build configuration file # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (module imports are okay, they're removed automatically). import sys, os, time sy...
unknown
codeparrot/codeparrot-clean
import operator_benchmark as op_bench import torch """Microbenchmarks for add_(matmul) operator. Supports both Caffe2/PyTorch.""" # Configs for PT add operator addmm_long_configs = op_bench.cross_product_configs( M=[256, 1024, 3000], N=[512, 4096], K=[512, 4096], device=["cuda"], tags=["long"], ...
python
github
https://github.com/pytorch/pytorch
benchmarks/operator_benchmark/pt/addmm_test.py
# # create symlinks for picons # usage: create_picon_sats lamedb # run in picon directory. # It will read the servicenames from the lamedb and create symlinks # for the servicereference names. # # by pieterg, 2008 import os, sys f = open(sys.argv[1]).readlines() f = f[f.index("services\n")+1:-3] while len(f) > 2:...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_HTTPError from ..utils import ( ExtractorError, int_or_none, str_or_none, strip_or_none, try_get, unified_timestamp, update_url_query, ) class KakaoIE(InfoExtractor): ...
unknown
codeparrot/codeparrot-clean
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import os import sys from xml.dom import minidom # STRINGTABLE DIAG TOOL # Author: KoffeinFlummi # --------------------- # Checks for missing translations and all that jazz. def get_all_languages(projectpath): """ Checks what languages exist in the repo. """ languages = [] for mo...
unknown
codeparrot/codeparrot-clean
""" Internationalization support. """ from __future__ import unicode_literals import re from django.utils import six from django.utils.decorators import ContextDecorator from django.utils.encoding import force_text from django.utils.functional import lazy __all__ = [ 'activate', 'deactivate', 'override', 'deacti...
unknown
codeparrot/codeparrot-clean
#pragma once #include <c10/core/impl/HermeticPyObjectTLS.h> #include <c10/core/impl/PyInterpreter.h> #include <c10/core/impl/PyInterpreterHooks.h> #include <c10/util/python_stub.h> #include <optional> #include <atomic> namespace torch::utils { class PyObjectPreservation; } namespace c10::impl { struct C10_API PyOb...
c
github
https://github.com/pytorch/pytorch
c10/core/impl/PyObjectSlot.h
""" remove old short uuid 1/2 Revision ID: 4ae8cbbb5550 Revises: 3175f81dd541 Create Date: 2015-07-31 14:28:46.318087 """ # revision identifiers, used by Alembic. revision = '4ae8cbbb5550' down_revision = '3175f81dd541' from alembic import op from uuid import uuid4 import sqlalchemy as sa def table(name): engi...
unknown
codeparrot/codeparrot-clean
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Example** ```esql FROM sample_data | WHERE message != "Connection error" | EVAL sha1 = sha1(message) | KEEP message, sha1 ``` | message:keyword | sha1:keyword | | --- | --- | | Connected to 10.1.0.1 |...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/examples/sha1.md
from langchain_classic.output_parsers.regex import RegexParser def load_output_parser(config: dict) -> dict: """Load an output parser. Args: config: config dict Returns: config dict with output parser loaded """ if "output_parsers" in config and config["output_parsers"] is not Non...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/output_parsers/loading.py
from OpenGL.GL import * import copy import bloom_engine import bloom_vector class bloomEntity: def __init__(self, position): self.position = position self.old_position = copy.deepcopy(self.position) self.velocity = bloom_vector.bloomVector(0.0, 0.0) self.acceleration = bloom_vecto...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2020 Ansible Project # 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 import pytest from ansible.module_utils._text import to_native from ansible.m...
unknown
codeparrot/codeparrot-clean
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
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-context/src/main/java/org/springframework/scheduling/config/Task.java
#!/usr/bin/env python # Copyright 2013 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. """Simple script which asks user to manually check result of bisection. Typically used as by the run-bisect-manual-test.py script. """...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2025 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/en/quantization/finegrained_fp8.md
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, copy, modify, merge, publish, ...
unknown
codeparrot/codeparrot-clean
# 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. """Presubmit script for changes affecting extensions. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-'8' "-*-" import hashlib import hmac import logging import time import urlparse from openerp import api, fields, models from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment_authorize.controllers.main import AuthorizeController from openerp.tools.floa...
unknown
codeparrot/codeparrot-clean
import pytest from sqlalchemy_utils.relationships import chained_join from ..mixins import ( ThreeLevelDeepManyToMany, ThreeLevelDeepOneToMany, ThreeLevelDeepOneToOne ) @pytest.mark.usefixtures('postgresql_dsn') class TestChainedJoinFoDeepToManyToMany(ThreeLevelDeepManyToMany): def test_simple_join(...
unknown
codeparrot/codeparrot-clean
import time import random import datetime import pytest import pytz import freezegun from tempora import schedule __metaclass__ = type @pytest.fixture def naive_times(monkeypatch): monkeypatch.setattr( 'irc.schedule.from_timestamp', datetime.datetime.fromtimestamp) monkeypatch.setattr('irc.schedule.now', date...
unknown
codeparrot/codeparrot-clean