code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/usr/bin/env python __copyright__ = "Copyright 2013-2014, http://radical.rutgers.edu" __license__ = "MIT" import sys import radical.pilot as rp """ DESCRIPTION: Tutorial 4: A workload consisting of of MPI tasks """ # READ: The RADICAL-Pilot documentation: # http://radicalpilot.readthedocs.org/en/latest # # Tr...
unknown
codeparrot/codeparrot-clean
import random from ete2 import Tree # Creates a normal tree t = Tree( '((H:0.3,I:0.1):0.5, A:1, (B:0.4,(C:0.5,(J:1.3, (F:1.2, D:0.1):0.5):0.5):0.5):0.5);' ) print t # Let's locate some nodes using the get common ancestor method ancestor=t.get_common_ancestor("J", "F", "C") # the search_nodes method (I take only the fir...
unknown
codeparrot/codeparrot-clean
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
unknown
codeparrot/codeparrot-clean
"""Restricted Boltzmann Machine """ # Authors: Yann N. Dauphin <dauphiya@iro.umontreal.ca> # Vlad Niculae # Gabriel Synnaeve # Lars Buitinck # License: BSD 3 clause import time import numpy as np import scipy.sparse as sp from ..base import BaseEstimator from ..base import TransformerMixi...
unknown
codeparrot/codeparrot-clean
/* (unused) [data-active='true'] > span { background-color: red; }*/
css
github
https://github.com/sveltejs/svelte
packages/svelte/tests/css/samples/unused-ts-as-expression/expected.css
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java
/* * Copyright (C) 2015 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 agreed ...
java
github
https://github.com/google/guava
guava-tests/test/com/google/common/util/concurrent/AbstractFutureFallbackAtomicHelperTest.java
import signal import weakref from unittest2.compatibility import wraps __unittest = True class _InterruptHandler(object): def __init__(self, default_handler): self.called = False self.original_handler = default_handler if isinstance(default_handler, int): if default_handler ==...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts] //// //// [FunctionDeclaration9_es6.ts] function * foo() { var v = { [yield]: foo } } //// [FunctionDeclaration9_es6.js] "use strict"; function* foo() { var v = { [yield]: foo }; }
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/FunctionDeclaration9_es6.js
--- navigation_title: "API tutorial" applies_to: stack: ga serverless: elasticsearch: ga mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/es-connectors-tutorial-api.html --- # Connector API tutorial [es-connectors-tutorial-api] Learn how to set up a self-managed connector usin...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/search-connectors/api-tutorial.md
"""Heap queue algorithm (a.k.a. priority queue). Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for all k, counting elements from 0. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of a heap is that a[0] is always its smallest element. Usag...
python
github
https://github.com/python/cpython
Lib/heapq.py
import { cacheTag } from 'next/cache' export async function test() { cacheTag('test') return null }
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/errors/react-server-components/client-graph/cache-tag/input.js
{ "requiredAction_one": "आवश्यक क्रिया", "requiredAction_other": "आवश्यक क्रियाएं", "requiredActionState": "आवश्यक क्रिया स्थिति", "response": { "error": "प्रतिक्रिया विफल", "optionsDescription": "इस टास्क इंस्टेंस के लिए अपने विकल्प चुनें", "optionsLabel": "विकल्प", "received": "प्रतिक्रिया प्र...
json
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/public/i18n/locales/hi/hitl.json
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing_extensions import Literal from ..._models import BaseModel __all__ = ["ResponseMcpCallCompletedEvent"] class ResponseMcpCallCompletedEvent(BaseModel): """Emitted when an MCP tool call has completed successfully.""...
python
github
https://github.com/openai/openai-python
src/openai/types/responses/response_mcp_call_completed_event.py
# 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. import os import subprocess import threading from telemetry.core import util from telemetry.core.backends.chrome import android_browser_finder from telemetr...
unknown
codeparrot/codeparrot-clean
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/c/experimental/ops/gen/cpp/views/arg_view.h
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # encoding: utf-8 # Copyright 2014 Xinyu, He <legendmohe@foxmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
unknown
codeparrot/codeparrot-clean
import Avatar from "./avatar"; import Date from "./date"; import CoverImage from "./cover-image"; import Link from "next/link"; import Author from "../types/author"; import Picture from "../types/picture"; type Props = { title: string; coverImage: Picture; date: string; excerpt: string; author: Author; slu...
typescript
github
https://github.com/vercel/next.js
examples/cms-umbraco/components/post-preview.tsx
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013-2015 Marcos Organizador de Negocios SRL http://marcos.do # Write by Eneldo Serrata (eneldo@marcos.do) # # This program is free software: you can redistribute it and/or modify # it un...
unknown
codeparrot/codeparrot-clean
use hir::def_id::{DefId, LocalDefId}; use rustc_hir as hir; use rustc_middle::bug; use rustc_middle::traits::ObligationCause; use rustc_middle::traits::solve::Goal; use rustc_middle::ty::error::{ExpectedFound, TypeError}; use rustc_middle::ty::{ self, BottomUpFolder, OpaqueTypeKey, ProvisionalHiddenType, Ty, TyCtxt...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_infer/src/infer/opaque_types/mod.rs
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """ Class representing the list of files in a distribution. Equivalent to distutils.filelist, but fixes some problems. """ import fnmatch import logging import os import re from . import DistlibEx...
unknown
codeparrot/codeparrot-clean
# ast.py # Copyright (C) Mako developers # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Handles parsing of Python code. Parsing to AST is done via _ast on Python > 2.5, otherwise the compiler module is used. """ from StringIO import Stri...
unknown
codeparrot/codeparrot-clean
from neo.io.basefromrawio import BaseFromRaw from neo.rawio.elanrawio import ElanRawIO class ElanIO(ElanRawIO, BaseFromRaw): """ Class for reading data from Elan. Elan is software for studying time-frequency maps of EEG data. Elan is developed in Lyon, France, at INSERM U821 https://elan.lyon.in...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Title: CURLOPT_DEBUGFUNCTION Section: 3 Source: libcurl See-also: - CURLINFO_CONN_ID (3) - CURLINFO_XFER_ID (3) - CURLOPT_DEBUGDATA (3) - CURLOPT_VERBOSE (3) - curl_global_trace (3) Protocol: - All Added-in: 7.9.6 -...
unknown
github
https://github.com/curl/curl
docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 Soft...
unknown
codeparrot/codeparrot-clean
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # This file contains code/hooks at different point during processing a request, # specific to type of resource. For eg. allocation of mac/ip-addr for a port # during its creation. import copy from cfgm_common import jsonutils as json from cfgm_commo...
unknown
codeparrot/codeparrot-clean
"""Paths and patches""" from matplotlib.patches import PathPatch from matplotlib.path import Path from numpy import asarray, concatenate, ones class Polygon(object): # Adapt Shapely or GeoJSON/geo_interface polygons to a common interface def __init__(self, context): if hasattr(context, 'interiors'): ...
unknown
codeparrot/codeparrot-clean
import h2.exceptions import time import enum from mitmproxy import connections # noqa from mitmproxy import exceptions from mitmproxy import http from mitmproxy import flow from mitmproxy.proxy.protocol import base from mitmproxy.proxy.protocol.websocket import WebSocketLayer from mitmproxy.net import websockets cla...
unknown
codeparrot/codeparrot-clean
""" Elliptic integrals. """ from __future__ import print_function, division from sympy.core import S, pi, I from sympy.core.function import Function, ArgumentIndexError from sympy.functions.elementary.hyperbolic import atanh from sympy.functions.elementary.trigonometric import sin, tan from sympy.functions.elementary...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * pg_namespace.h * definition of the "namespace" system catalog (pg_namespace) * * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * s...
c
github
https://github.com/postgres/postgres
src/include/catalog/pg_namespace.h
# Copyright 2015 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 base64 import csv import json import optparse import os import shutil import sys import tempfile import urllib2 import zipfile sys.path.append(os.pat...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import import xadmin from xadmin import views from .models import IDC, Host, MaintainLog, HostGroup, AccessRecord from xadmin.layout import Main, TabHolder, Tab, Fieldset, Row, Col, AppendedText, Side from xadmin.plugins.inline import Inline from xadmin.plugins.batch import BatchChangeAc...
unknown
codeparrot/codeparrot-clean
"""A generally useful event scheduler class. Each instance of this class manages its own queue. No multi-threading is implied; you are supposed to hack that yourself, or use a single instance per application. Each instance is parametrized with two functions, one that is supposed to return the current time, one that i...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # daemon/version/__init__.py # Part of python-daemon, an implementation of PEP 3143. # # Copyright © 2008–2010 Ben Finney <ben+python@benfinney.id.au> # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version ...
unknown
codeparrot/codeparrot-clean
# # Created by: Pearu Peterson, March 2002 # """ Test functions for linalg.basic module """ from __future__ import division, print_function, absolute_import import warnings import itertools import numpy as np from numpy import (arange, array, dot, zeros, identity, conjugate, transpose, float32) imp...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import urllib from frappe.utils.nestedset import NestedSet from frappe.website.website_generator import WebsiteGenerator from frappe.websi...
unknown
codeparrot/codeparrot-clean
function Component(props) { if (props.cond) { return undefined; } return props.value; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: ['TodoAdd'], isComponent: 'TodoAdd', };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/return-undefined.js
#!/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 distributed...
unknown
codeparrot/codeparrot-clean
import sys try: import distutils.msvc9compiler except ImportError: pass unpatched = dict() def patch_for_specialized_compiler(): """ Patch functions in distutils.msvc9compiler to use the standalone compiler build for Python (Windows only). Fall back to original behavior when the standalone co...
unknown
codeparrot/codeparrot-clean
import datetime import pytest import json from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker, scoped_session from sqlalchemy.sql import and_ from nbgrader import api @pytest.fixture def db(request): engine = create_engine("sqlite:///:memory:") db = scoped_session(sessionmaker(autoflu...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2022 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/ko/model_doc/time_series_transformer.md
import matplotlib.delaunay as md from scipy import ndimage from pylab import * from numpy import * from PCV.geometry import homography def image_in_image(im1,im2,tp): """ Put im1 in im2 with an affine transformation such that corners are as close to tp as possible. tp are homogeneous and counter-c...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Field.order' db.add_column('forms_field', 'order', self.gf('django.db.models.fields.IntegerField')...
unknown
codeparrot/codeparrot-clean
""" We have a few different kind of Matrices Matrix, ImmutableMatrix, MatrixExpr Here we test the extent to which they cooperate """ from sympy import symbols from sympy.matrices import (Matrix, MatrixSymbol, eye, Identity, ImmutableMatrix) from sympy.core.compatibility import range from sympy.matrices.expres...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/type/ManifestTests.java
from __future__ import absolute_import from setuptools import setup, find_packages import owslib from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite =...
unknown
codeparrot/codeparrot-clean
import { addRange, append, Bundle, chainBundle, CompilerOptions, createEmitHelperFactory, CustomTransformer, CustomTransformerFactory, CustomTransformers, Debug, DiagnosticWithLocation, disposeEmitNodes, EmitFlags, EmitHelper, EmitHint, EmitHost, EmitO...
typescript
github
https://github.com/microsoft/TypeScript
src/compiler/transformer.ts
#!/usr/bin/env python """ Build F90 module support for f2py2e. Copyright 2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 200...
unknown
codeparrot/codeparrot-clean
# # This module contains logic for accessing the database # # Authors: # Nathan Hamiel # Gregory Fleischer (gfleischer@gmail.com) # Justin Engler # Seth Law # # Copyright (c) 2011-2013 RAFT Team # # This file is part of RAFT. # # RAFT is free software: you can redistribute it and/or ...
unknown
codeparrot/codeparrot-clean
def initializeTables(ui): from ValueTable import ValueTable from ChoiceTable import ActiveChoiceTable, StateTable,ActiveMultiChoiceTable from ProficiencyTable import ProficiencyTable from ConfigTable import ConfigTable from ModifierTable import ModifierTable global UI,Value,Modifier,Config,Profi...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ make-release ~~~~~~~~~~~~ Helper script that performs a release. Does pretty much everything automatically for us. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys import os import re from dat...
unknown
codeparrot/codeparrot-clean
def adduser(): import os import expensedata as ed import newuser as n import getpass import option_selector as o import userdb as u os.system('color 9F') print "\n\n\n\t\t WELCOME TO EXPENSE MANAGER " print "\n\t\t Hello new user" s=str(raw_input("\n\t>username: ")) p=getpass.getpass("\t>password: "...
unknown
codeparrot/codeparrot-clean
import warnings from django.forms import models as model_forms from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponseRedirect from django.utils.encoding import force_text from django.views.generic.base import TemplateResponseMixin, ContextMixin, View from django.views.generic.deta...
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...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableCounterInt.java
# Various tests that don't fit into the other categories and don't make their own really. import os import yaml from test_helpers import get_expanded_config __maintainer__ = 'branden' __contact__ = 'dcos-cluster-ops@mesosphere.io' # Test that user config is loadable # TODO(cmaloney): Validate it contains some sett...
unknown
codeparrot/codeparrot-clean
from hachoir_metadata.metadata import RootMetadata, registerExtractor from hachoir_parser.program import ExeFile from hachoir_metadata.safe import fault_tolerant, getValue class ExeMetadata(RootMetadata): KEY_TO_ATTR = { u"ProductName": "title", u"LegalCopyright": "copyright", u"LegalTradem...
unknown
codeparrot/codeparrot-clean
"use client"; import { type ClientLoaderFunctionArgs, useLoaderData, useRouteError, Form, useActionData, type ClientActionFunctionArgs, isRouteErrorResponse, } from "react-router"; import { Counter } from "../../counter"; import type { action, loader } from "./about"; export async function clientActio...
typescript
github
https://github.com/remix-run/react-router
playground/rsc-vite/src/routes/about/about.client.tsx
- targats: - localhost:9100
unknown
github
https://github.com/prometheus/prometheus
cmd/promtool/testdata/bad-sd-file-format.yml
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('auth', '0006_require_contenttypes_0002'), ] operations = [ migrations.CreateModel( n...
unknown
codeparrot/codeparrot-clean
layers: - name: APPLICATION categories: - name: CHANGEFEEDS metrics: - name: changefeed.admit_latency exported_name: changefeed_admit_latency description: 'Event admission latency: a difference between event MVCC timestamp and the time it was admitted into changefeed pipeline; Note: this metric ...
unknown
github
https://github.com/cockroachdb/cockroach
docs/generated/metrics/metrics.yaml
# Copyright 2007 by Tiago Antao. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. from math import sqrt from sys import argv,exit from os import sep, mkdir import re from Bio.Po...
unknown
codeparrot/codeparrot-clean
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html #include "precomp.hpp" #include "opencv2/core/mat.hpp" namespace cv { template<typename T1, typename T2> void convertData_(c...
cpp
github
https://github.com/opencv/opencv
modules/core/src/matrix_sparse.cpp
# -*- coding: utf-8 -*- # # Copyright 2008 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 of the License, or # (at y...
unknown
codeparrot/codeparrot-clean
- hosts: localhost gather_facts: no vars: debug_me: hi mom dictvar: subdict1: list1: - value1 - value2 tasks: - name: test item being present in the output debug: var=item loop: [1, 2, 3] - name: ensure that explicitly-tagged unsafe debug var fails ...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/debug/main.yml
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
unknown
codeparrot/codeparrot-clean
# Author: Fred L. Drake, Jr. # fdrake@acm.org # # This is a simple little module I wrote to make life easier. I didn't # see anything quite like it in the library, though I may have overlooked # something. I wrote this when I was trying to read some heavily nested # tuples with fairly non-desc...
unknown
codeparrot/codeparrot-clean
"""test partial slicing on Series/Frame""" from datetime import datetime import numpy as np import pytest from pandas import ( DataFrame, DatetimeIndex, Index, MultiIndex, Series, Timedelta, Timestamp, date_range, to_datetime, ) import pandas._testing as tm class TestSlicing: ...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/indexes/datetimes/test_partial_slicing.py
# -*- coding: utf-8 -*- """ werkzeug.contrib.profiler ~~~~~~~~~~~~~~~~~~~~~~~~~ This module provides a simple WSGI profiler middleware for finding bottlenecks in web application. It uses the :mod:`profile` or :mod:`cProfile` module to do the profiling and writes the stats to the stream provide...
unknown
codeparrot/codeparrot-clean
/** * Abstraction for determining the current Locale, * plus global holder that exposes a thread-bound Locale. */ @NullMarked package org.springframework.context.i18n; import org.jspecify.annotations.NullMarked;
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/main/java/org/springframework/context/i18n/package-info.java
""" Test grade calculation. """ from django.http import Http404 from django.test import TestCase from django.test.client import RequestFactory from mock import patch, MagicMock from nose.plugins.attrib import attr from opaque_keys.edx.locations import SlashSeparatedCourseKey from opaque_keys.edx.locator import CourseL...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: compressed-ssh Help: Enable SSH compression Protocols: SCP SFTP Added: 7.56.0 Category: scp ssh Multi: boolean See-also: - compressed Example: - --compressed-ssh sftp://example.com/ --- # `--compressed-ssh` Enable S...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/compressed-ssh.md
#### Note: this error code is no longer emitted by the compiler. This error indicates that the bindings in a match arm would require a value to be moved into more than one location, thus violating unique ownership. Code like the following is invalid as it requires the entire `Option<String>` to be moved into a variabl...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0007.md
import json from PIL import Image, ImageTk from cv2 import imread, imwrite from numpy import zeros, unique from tkinter import Toplevel, Label from glob import glob import os from re import search def change_values(data): removex = data[0]["X"] removey = data[0]["Y"] for cell in data: cell["X"] = c...
unknown
codeparrot/codeparrot-clean
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.cloud.errorreporting_v1beta1.proto import ( report_errors_service_pb2 as google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_report__errors__service__pb2, ) class ReportErrorsServiceStub(object): """An...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
unknown
codeparrot/codeparrot-clean
# Helper to get the id of the currently running job in a GitHub Actions # workflow. GitHub does not provide this information to workflow runs, so we # need to figure it out based on what they *do* provide. import argparse import json import operator import os import re import sys import time import urllib import urlli...
python
github
https://github.com/pytorch/pytorch
.github/scripts/get_workflow_job_id.py
import csv import itertools import logging import operator try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import psycopg2 from openerp.osv import orm, fields from openerp.osv.orm import BaseModel from openerp.tools.translate import _ FIELDS_RECURSION_LIMIT = 2 ERROR_PR...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 Metacloud # # 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, s...
unknown
codeparrot/codeparrot-clean
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the 'License'); you may not use th...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import random import numpy import matplotlib.pyplot as plt import pickle from outlier_cleaner import outlierCleaner ### load up some practice data with outliers in it ages = pickle.load( open("practice_outliers_ages.pkl", "r") ) net_worths = pickle.load( open("practice_outliers_net_worths.pkl", "r"...
unknown
codeparrot/codeparrot-clean
/*============================================================================= Boost.Wave: A Standard compliant C++ preprocessor library http://www.boost.org/ See http://www.boost.org/libs/wave for documentation Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost Software License...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/wave.hpp
# 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 may not use this file ex...
unknown
codeparrot/codeparrot-clean
# # PCMSolver, an API for the Polarizable Continuum Model # Copyright (C) 2019 Roberto Di Remigio, Luca Frediani and contributors. # # This file is part of PCMSolver. # # PCMSolver is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by ...
unknown
codeparrot/codeparrot-clean
""" API implementation for course-oriented interactions. """ from collections import namedtuple import json import logging from django.conf import settings from django.http import Http404 from rest_framework.authentication import OAuth2Authentication, SessionAuthentication from rest_framework.exceptions import Authen...
unknown
codeparrot/codeparrot-clean
import irclib import rapidsms from rapidsms.message import Message from rapidsms.connection import Connection class Backend(rapidsms.backends.Backend): def configure(self, host="irc.freenode.net", port=6667, nick=None, channels=["#rapidsms"]): self.host = host self.port = p...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #-*- coding: utf-8 -*- import define import tw8836 import spi import fontosd import bmposd import sx1505 import string import time import sys img = [ #0x000000, 0x0015C0, 0x0044A0, 0x007390, 0x00A2A0, 0x00D1B0, 0x0100B0, 0x013020, 0x015F60, 0x018EE0, 0x01BEA0, 0x01EED0, 0x021EC0, 0x024F00, 0x02...
unknown
codeparrot/codeparrot-clean
from django.test import TestCase import registration from registration.tests.backends import * from registration.tests.forms import * from registration.tests.models import * from registration.tests.views import * class RegistrationVersionInfoTests(TestCase): """ Test django-registration's internal version-re...
unknown
codeparrot/codeparrot-clean
from tastypie.resources import ModelResource from tastypie import fields from tastypie.authentication import ApiKeyAuthentication from tastypie.authorization import Authorization from timetracker.tracker.models import Tbluser from timetracker.tracker.trackingentry import TrackingEntry from timetracker.utils.datemaps i...
unknown
codeparrot/codeparrot-clean
import urwid from todoman import widgets _palette = [("error", "light red", "")] class TodoEditor: """ The UI for a single todo entry. """ def __init__(self, todo, lists, formatter): """ :param model.Todo todo: The todo object which will be edited. """ self.current_li...
unknown
codeparrot/codeparrot-clean
""" savedialog ========== **Module** : ``menubar.menus.filechoosers.savedialog.py`` Contains the class :py:class:`.SaveDialog`, used to show a filechooser for saving. """ from kivy.uix.popup import Popup from kivy.properties import ObjectProperty import os class SaveDialog(Popup): """A popup that shows a filec...
unknown
codeparrot/codeparrot-clean
"""Library functions for powercycle.""" import getpass import logging import os import shlex import stat import subprocess import sys import yaml from buildscripts.resmokelib.plugin import Subcommand from buildscripts.resmokelib.powercycle import powercycle_constants from buildscripts.resmokelib.powercycle.lib.named...
python
github
https://github.com/mongodb/mongo
buildscripts/resmokelib/powercycle/lib/__init__.py
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Nyancat(MakefilePackage): """Nyancat in your terminal, rendered through ANSI escape sequence...
unknown
codeparrot/codeparrot-clean
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from examples/modular-transformers/modular_super.py. # Do NOT edit this file manually as any edits will be overwritten by the generation of # ...
python
github
https://github.com/huggingface/transformers
examples/modular-transformers/modeling_super.py
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package keysutil import ( "context" "encoding/base64" "errors" "fmt" "io" "sync" "sync/atomic" "time" "github.com/hashicorp/errwrap" "github.com/hashicorp/vault/sdk/helper/jsonutil" "github.com/hashicorp/vault/sdk/helper/locksutil" "gi...
go
github
https://github.com/hashicorp/vault
sdk/helper/keysutil/lock_manager.go
# Copyright 2012 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.common import Backend from lib.core.common import getLimitRange from lib.core.common import isAdminFromPrivileges from lib.core.common import isInferenceAvailabl...
unknown
codeparrot/codeparrot-clean
//===-- ParsedASTTests.cpp ------------------------------------------------===// // // 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/ParsedASTTests.cpp
# -*- coding: utf-8 -*- """ (c) 2014-2017 - Copyright Red Hat Inc Authors: Pierre-Yves Chibon <pingou@pingoured.fr> """ # pylint: disable=too-many-return-statements # pylint: disable=too-many-branches # pylint: disable=too-many-arguments # pylint: disable=too-many-locals # pylint: disable=too-many-statements #...
unknown
codeparrot/codeparrot-clean