code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
# 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.
"""Top-level presubmit script for cc.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit A... | 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... | kotlin | github | https://github.com/spring-projects/spring-framework | framework-docs/src/main/kotlin/org/springframework/docs/integration/schedulingtaskexecutorusage/LoggingTaskDecorator.kt |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2003, Fabien Pinckaers, UCL, FSA
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesse... | unknown | codeparrot/codeparrot-clean | ||
'''
New Integration Test for Multi Nics.
@author: Glody
'''
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.test_state as test_state
import zstackwoodpecker.operations.net_operations as net_ops
import zstackwoodpecker.operations.resource_operations as... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpu/arm,mali-utgard.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ARM Mali Utgard GPU
maintainers:
- Rob Herring <robh@kernel.org>
- Maxime Ripard <mripard@kernel.org>
- Heiko Stuebner <heiko@sntech.de... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml |
import datetime
import importlib
import os
import sys
from django.apps import apps
from django.core.management.base import OutputWrapper
from django.db.models import NOT_PROVIDED
from django.utils import timezone
from django.utils.version import get_docs_version
from .loader import MigrationLoader
class MigrationQue... | python | github | https://github.com/django/django | django/db/migrations/questioner.py |
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
xpath_text,
xpath_with_ns,
int_or_none,
float_or_none,
)
class TweakersIE(InfoExtractor):
_VALID_URL = r'https?://tweakers\.net/video/(?P<id>\d+)'
_TEST = {
'url': 'https://tweakers.net/vide... | unknown | codeparrot/codeparrot-clean | ||
# 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.
import copy
import hashlib
import multiprocessing
import os.path
import re
import signal
import subprocess
import sys
import gyp
import gyp.common
import gyp.msvs_... | unknown | codeparrot/codeparrot-clean | ||
'''
Created on 2015年2月3日
淨化與清理文字
@author: Guan-yu Willie Chen
'''
import unicodedata
import sys
def sample():
s = "python\fis\tawesome\r\n"
remap = {
ord("\t"): ' ',
ord("\f"): ' ',
ord("\r"): None
}
a = s.translate(remap)
print(a)
def sample1():
cmbChrs = dict.fromkeys(... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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': ['preview'],
... | unknown | codeparrot/codeparrot-clean | ||
from mms.arg_parser import ArgParser
from mms.log import get_logger
from mms.serving_frontend import ServingFrontend
from mms.client_sdk_generator import ClientSDKGenerator
logger = get_logger(__name__)
class MMS(object):
'''MXNet Model Serving
'''
def __init__(self, app_name='mms'):
# Initialize ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2014 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 re
import tempfile
from pylib import constants
from pylib import cmd_helper
_PROGUARD_CLASS_RE = re.compile(r'\s*?- Program class:\s*([\S]... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
int_or_none,
)
class InstagramIE(InfoExtractor):
_VALID_URL = r'http://instagram\.com/p/(?P<id>.*?)/'
_TEST = {
'url': 'http://instagram.com/p/aye83DjauH/?foo=bar#abc',
'md5': '0d2da1... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2020 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/saved_model/core/revived_types/tf_concrete_function.h |
#!/usr/bin/env python
# Copyright 2010-2014 RethinkDB, all rights reserved.
import sys
"""This script is used to generate the mailbox templates in
`rethinkdb/src/rpc/mailbox/typed.hpp`. It is meant to be run as follows
(assuming that the current directory is `rethinkdb/src/`):
$ ../scripts/generate_rpc_templates.py >... | unknown | codeparrot/codeparrot-clean | ||
from test.vim_test_case import VimTestCase as _VimTest
from test.constant import *
# Snippet Priority {{{#
class SnippetPriorities_MultiWordTriggerOverwriteExisting(_VimTest):
snippets = (
('test me', '${1:Hallo}', 'Types Hallo'),
('test me', '${1:World}', 'Types World'),
('test me', 'We ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2018 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
DOCUMENTATION = """
author: Ansible Core Team
connection: psrp
short_description: Run tasks over Mic... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from django.db import models
class TitleField(models.CharField):
def __init__(self,
verbose_name='Kurztitel',
max_length=30,
help_text="Das ist der Titel im Kalender",
*args, **kwargs
):
super(sel... | unknown | codeparrot/codeparrot-clean | ||
# 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
# 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.
"""
This file emits the list of reasons why a particular build needs to be clobbered
(or a list of 'landmines').
"""
import sys
impor... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
"""
Class used for representing tLane of BPMN 2.0 graph
"""
import graph.classes.base_element_type as base_element
import graph.classes.lane_set_type as lane_set
class Lane(base_element.BaseElement):
"""
Class used for representing tLane of BPMN 2.0 graph.
Fields (except inherited):
- na... | unknown | codeparrot/codeparrot-clean | ||
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
"""
Middleware that tests the validity of all generated HTML using the
`WDG HTML Validator <http://www.htmlhelp.com/tools/validator/>`_
"""
from cStri... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.matchers;
import static org.junit.Assert.assertEquals;
import java.util.regex.Pattern;
import org.junit.Test;
import org.mockito.ArgumentMatcher;
import org.mockitoutil... | java | github | https://github.com/mockito/mockito | mockito-core/src/test/java/org/mockito/internal/matchers/MatchersToStringTest.java |
//===--- ReadyForTypeCheckingCallback.h -----------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.... | c | github | https://github.com/apple/swift | lib/IDE/ReadyForTypeCheckingCallback.h |
from __future__ import (absolute_import, division, print_function, unicode_literals)
import boto
import boto.ec2.cloudwatch
import datetime
import logging
import abc
class CloudwatchMetrics(object):
__metaclass__ = abc.ABCMeta
def __init__(self, access_key_id, secret_access_key, cloudwatch_namespace):
... | unknown | codeparrot/codeparrot-clean | ||
"Test searchbase, coverage 98%."
# The only thing not covered is inconsequential --
# testing skipping of suite when self.needwrapbutton is false.
import unittest
from test.support import requires
from tkinter import Text, Tk, Toplevel
from tkinter.ttk import Frame
from idlelib import searchengine as se
from idlelib i... | python | github | https://github.com/python/cpython | Lib/idlelib/idle_test/test_searchbase.py |
#!/usr/bin/env python
# Copyright (c) 2006-2008, David Allouche, Jp Calderone, Itamar Shtull-Trauring,
# Johan Dahlin, Olivier Grisel <olivier.grisel@ensta.org>
#
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation file... | unknown | codeparrot/codeparrot-clean | ||
"""Unit tests for ModelFallbackMiddleware."""
from __future__ import annotations
import warnings
from typing import TYPE_CHECKING, Any, cast
import pytest
from langchain_core.language_models.chat_models import BaseChatModel
from langchain_core.language_models.fake_chat_models import GenericFakeChatModel
from langcha... | python | github | https://github.com/langchain-ai/langchain | libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_model_fallback.py |
# Copyright 2011 Fog Creek Software
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import os
import urllib2
from mercurial import error, httprepo, util, wireproto
from mercurial.i18n import _
import lfutil
LARGEFILES_REQUIRED_... | unknown | codeparrot/codeparrot-clean | ||
from django import template
from django.conf import settings
from django.contrib.flatpages.models import FlatPage
from django.contrib.sites.models import get_current_site
register = template.Library()
class FlatpageNode(template.Node):
def __init__(self, context_name, starts_with=None, user=None):
self.co... | unknown | codeparrot/codeparrot-clean | ||
"""
Connects to a Wink hub and loads relevant components to control its devices.
"""
import logging
# pylint: disable=no-name-in-module, import-error
import homeassistant.external.wink.pywink as pywink
from homeassistant import bootstrap
from homeassistant.loader import get_component
from homeassistant.helpers import... | unknown | codeparrot/codeparrot-clean | ||
# (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 | ||
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Florent Cailhol @ooflorent
*/
"use strict";
module.exports.STAGE_ADVANCED = 10;
module.exports.STAGE_BASIC = -10;
module.exports.STAGE_DEFAULT = 0; | javascript | github | https://github.com/webpack/webpack | lib/OptimizationStages.js |
""" test the label propagation module """
import numpy as np
import pytest
from scipy.sparse import issparse
from sklearn.semi_supervised import _label_propagation as label_propagation
from sklearn.metrics.pairwise import rbf_kernel
from sklearn.model_selection import train_test_split
from sklearn.neighbors import Ne... | unknown | codeparrot/codeparrot-clean | ||
import os, sys
from codecs import EncodedFile
from calibre.ebooks.rtf2xml import copy, check_encoding
from calibre.ptempfile import better_mktemp
public_dtd = 'rtf2xml1.0.dtd'
class ConvertToTags:
"""
Convert file to XML
"""
def __init__(self,
in_file,
bug_handler,
... | unknown | codeparrot/codeparrot-clean | ||
/* 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/PE/DosHeader.hpp |
# Copyright 2010 OpenStack Foundation
# Copyright 2012 University Of Minho
#
# 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.... | unknown | codeparrot/codeparrot-clean | ||
import * as path from "node:path";
import { test, expect } from "@playwright/test";
import { createProject, grep, build } from "./helpers/vite.js";
test("Vite / dead-code elimination for unused route exports", async () => {
let cwd = await createProject({
"app/routes/custom-route-exports.tsx": String.raw`
... | typescript | github | https://github.com/remix-run/react-router | integration/vite-unused-route-exports-test.ts |
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2011 NUMA Extreme Systems (www.numaes.com) for Cubic ERP - Teradata SAC. (http://cubicerp.com).
#
# WARNING: This program as such is intended to be use... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
#
# 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
#
# Un... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-boot | configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/lombok/LombokAccessLevelProperties.java |
# 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
from frappe.utils import cstr, flt, getdate
from frappe.model.naming import make_autoname
from frappe import _
from frappe.model.mapper i... | unknown | codeparrot/codeparrot-clean | ||
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""),... | 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/example_dags/example_kubernetes_executor.py |
# (C) 2012, 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) any lat... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright: (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# Copyright: (c) 2012, Jayson Vantuyl <jayson@aggressive.ly>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
DOCUMENTATION = """
---
module: apt_ke... | python | github | https://github.com/ansible/ansible | lib/ansible/modules/apt_key.py |
# 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):
if not db.backend_name == 'sqlite3':
# Adding field 'ProductAttribute.option'
db.add_column('produ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#encoding:utf-8
import os
import sys
import getpass
global arg
arg = []
C_YN = ['y','Y','n','N']
def promptSimple(question,default = ''):
"""
The ``promptSimple`` function
=============================
Use it for a text required input from stdin
:param question: Text displayed befor... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Methods that contains utils for adjoint sources
:copyright:
Wenjie Lei (lei@princeton.edu), 2016
:license:
GNU Lesser General Public License, version 3 (LGPLv3)
(http://www.gnu.org/licenses/lgpl-3.0.en.html)
"""
from __future__ import (absolute_import, divi... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import print_function, division
from collections import defaultdict
from sympy.core import (Basic, S, Add, Mul, Pow,
Symbol, sympify, expand_mul, expand_func,
Function, Dummy, Expr, factor_terms,
symbols, expand_power_exp)
from sympy.core.compatibility import (iterable,
ordered, range,... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
# 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 runner
import pytest
def test_log_parser():
mock_url = "http://localhost:8000/page_l... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""
Testing
=======
This module provides functions useful for running tests in vispy.
Tests can be run in a few ways:
* From Python, you can import ``vispy`` and do ``vis... | unknown | codeparrot/codeparrot-clean | ||
use alloc::boxed::Box;
use core::marker::PhantomData;
use core::mem::ManuallyDrop;
use core::ops::{Deref, DerefMut};
use core::ptr::NonNull;
/// This is equivalent to `&[T]`, except it has a stable `repr(C)` layout
#[repr(C)]
pub struct DiplomatSlice<'a, T> {
// Invariant: ptr is a valid ptr to the beginning of an... | rust | github | https://github.com/nodejs/node | deps/crates/vendor/diplomat-runtime/src/slices.rs |
# Copyright (C) 2012 Intel 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:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import copy
import locale
import logging
import re
import reportlab
import openerp.tools as tools
from openerp.tools.safe_eval import safe_eval as eval
from openerp.tools.misc import ustr
_logger = logging.getLogger(_... | unknown | codeparrot/codeparrot-clean | ||
import unittest
import openerp.tests.common as common
class test_search(common.TransactionCase):
def test_00_search_order(self):
registry, cr, uid = self.registry, self.cr, self.uid
# Create 6 partners with a given name, and a given creation order to
# ensure the order of their ID. Some... | unknown | codeparrot/codeparrot-clean | ||
<% 65536.times do |i| %>
fixture_no_<%= i %>:
id: <%= i %>
book2_id: <%= i*i %>
<% end %> | unknown | github | https://github.com/rails/rails | activerecord/test/fixtures/citations.yml |
import json
from coalib.bearlib.abstractions.Linter import linter
from dependency_management.requirements.NpmRequirement import NpmRequirement
_setting_map = {True: 'always',
False: 'never',
None: 'false'}
@linter(executable='stylint',
output_format='regex',
output_reg... | unknown | codeparrot/codeparrot-clean | ||
import urllib, socket
from sys import modules
from os import path
from boxbranding import getImageDistro, getImageType, getImageVersion
def fetchlog(logtype):
releasenotes = ""
try:
# TODO: fix url for obh
if getImageType() == 'release':
sourceurl = 'http://www.vuplus-community.net/feeds/%s/%s/%s/%s-git.log' % ... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python
import roslib
import rospy
from controller import Controller, ActionStatus
from geometry_msgs.msg import PoseStamped
from bebop_controller.msg import *
from actionlib import SimpleActionClient
from BebopActionServer import BebopActionServer
from actionlib_msgs.msg import GoalStatus
from geomet... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# 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 Lic... | unknown | codeparrot/codeparrot-clean | ||
from regulargrid.regulargrid import RegularGrid
import numpy
def test_regular_grid():
rg = RegularGrid([(0,1), (0,1)], numpy.array([[], []]), numpy.array([[1, 2], [3, 4]]))
for x in [0, 1, 0.5]:
for y in [0, 1, 0.5]:
print x, y, rg([x,y])
if __name__ == '__main__':
numpy.random.seed(0)
limits = [(-10,10), (-... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2alpha1",
"metadata": {
"name": "v35.ensure_x_axis_visibility.v42"
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "grafana",
"uid": "-- Gra... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/migrated_dashboards_output/v1beta1-mig-v35.ensure_x_axis_visibility.v42.v2alpha1.json |
## This file is part of Invenio.
## Copyright (C) 2009, 2010, 2011, 2014 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
## License, or (at your option) any later ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright 2013 Intel Corp.
#
# Authors: Yunhong Jiang <yunhong.jiang@intel.com>
# Julien Danjou <julien@danjou.info>
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package renderers
import (
"encoding/json"
"fmt"
"strings"
"github.com/zclconf/go-cty/cty"
"github.com/hashicorp/terraform/internal/command/jsonformat/collections"
"github.com/hashicorp/terraform/internal/command/jsonformat/computed"
"gith... | go | github | https://github.com/hashicorp/terraform | internal/command/jsonformat/computed/renderers/primitive.go |
# -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# Flumotion - a streaming media server
# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com).
# All rights reserved.
# This file may be distributed and/or modified under the terms of
# the GNU General Public License version 2 as published by
# the Free ... | unknown | codeparrot/codeparrot-clean | ||
//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts] ////
//// [MemberFunctionDeclaration3_es6.ts]
class C {
*[foo]() { }
}
//// [MemberFunctionDeclaration3_es6.js]
"use strict";
class C {
*[foo]() { }
} | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/MemberFunctionDeclaration3_es6.js |
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {NodePath} from '@babel/core';
import * as t from '@babel/types';
import {Scope as BabelScope} from '@babel/traverse';
i... | typescript | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Imports.ts |
from . import analysis
from .connections import get_connection
from .exceptions import IllegalOperation
from .mapping import Mapping
from .search import Search
from .update_by_query import UpdateByQuery
from .utils import merge
class IndexTemplate(object):
def __init__(self, name, template, index=None, order=None,... | unknown | codeparrot/codeparrot-clean | ||
import itertools
from time import time
import Errors
import DebugFlags
import Options
from Visitor import CythonTransform
from Errors import CompileError, InternalError, AbortError
import Naming
#
# Really small pipeline stages
#
def dumptree(t):
# For quick debugging in pipelines
print t.dump()
return t
... | unknown | codeparrot/codeparrot-clean | ||
# 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 in the hope that it will be useful,
# but... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
import logging
import re
from flexget import plugin
from flexget.event import event
from flexget.components.sites.urlrewriting import UrlRewritingError
from flexget.utils.... | unknown | codeparrot/codeparrot-clean | ||
use super::Path;
use core::fmt;
use quote::ToTokens;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use syn::parse::{self, Parse, ParseStream};
use syn::{Attribute, Ident, Meta, Token};
#[derive(Clone, PartialEq, Eq, Hash, Serialize, Deserialize, Debug, Default)]
pub struct Docs(String, Vec<RustLi... | rust | github | https://github.com/nodejs/node | deps/crates/vendor/diplomat_core/src/ast/docs.rs |
import sys
import traceback
from optparse import make_option
from django_extensions.management.email_notifications import EmailNotificationCommand
from django.conf import settings
try:
import importlib
except ImportError:
print("Runscript needs the importlib module to work. You can install it via 'pip install ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015, 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 f... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.analysis.api.fir.test.cases.generated.cases.session;
import com.intellij.testFra... | java | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/session/FirIdeNormalAnalysisSourceModuleGlobalModuleStateModificationAnalysisSessionInvalidationTestGenerated.java |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, ... | java | github | https://github.com/elastic/elasticsearch | distribution/archives/integ-test-zip/src/javaRestTest/java/org/elasticsearch/test/rest/WaitForRefreshAndCloseIT.java |
# torch.mtia.memory
The MTIA backend is implemented out of the tree, only interfaces are defined here.
```{eval-rst}
.. automodule:: torch.mtia.memory
```
```{eval-rst}
.. currentmodule:: torch.mtia.memory
```
```{eval-rst}
.. autosummary::
:toctree: generated
:nosignatures:
memory_stats
memory_all... | unknown | github | https://github.com/pytorch/pytorch | docs/source/mtia.memory.md |
# Copyright 2014 Open Source Robotics Foundation, 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... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Daniel Jaouen <dcj24@cornell.edu>
# Based on homebrew (Andrew Dunham <andrew@du.nham.ca>)
#
# 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
# t... | unknown | codeparrot/codeparrot-clean | ||
# Jenkins
The scripts in this directory are the entrypoint for testing Caffe2.
The environment variable `BUILD_ENVIRONMENT` is expected to be set to
the build environment you intend to test. It is a hint for the build
and test scripts to configure Caffe2 a certain way and include/exclude
tests. Docker images, they eq... | unknown | github | https://github.com/pytorch/pytorch | .ci/caffe2/README.md |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Yannick Vaucher (Camptocamp)
# Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Licens... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, ... | java | github | https://github.com/elastic/elasticsearch | client/benchmark/src/main/java/org/elasticsearch/client/benchmark/BenchmarkTask.java |
from warnings import warnpy3k
warnpy3k("the AL module has been removed in Python 3.0", stacklevel=2)
del warnpy3k
RATE_48000 = 48000
RATE_44100 = 44100
RATE_32000 = 32000
RATE_22050 = 22050
RATE_16000 = 16000
RATE_11025 = 11025
RATE_8000 = 8000
SAMPFMT_TWOSCOMP= 1
SAMPFMT_FLOAT =... | unknown | codeparrot/codeparrot-clean | ||
from .base import BaseJITTest
class TestBasic(BaseJITTest):
def test_while_loop(self, topaz, tmpdir):
traces = self.run(topaz, tmpdir, """
i = 0
while i < 10000
i += 1
end
""")
self.assert_matches(traces[0].loop, """
label(p0, p1, p3, p4, p5, p6, ... | unknown | codeparrot/codeparrot-clean | ||
# Cam gui init module
# (c) 2003 Juergen Riegel
#
# Gathering all the information to start FreeCAD
# This is the second one of three init scripts, the third one
# runs when the gui is up
#***************************************************************************
#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import webnotes, json
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
def validate(self):
if webnotes.conn.sql("""select count(*) from tabComme... | unknown | codeparrot/codeparrot-clean | ||
import logging
from airflow.hooks import HttpHook
from airflow.models import BaseOperator
from airflow.utils import apply_defaults, AirflowException
class SimpleHttpOperator(BaseOperator):
"""
Calls an endpoint on an HTTP system to execute an action
:param http_conn_id: The connection to run the sensor a... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2015 Therp BV <http://therp.nl>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of th... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from six.moves import zip
import warnings
import numpy as np
from matplotlib._delaunay import delaunay
from .interpolate import LinearInterpolator, NNInterpolator
from matplotlib.cbook import warn... | unknown | codeparrot/codeparrot-clean | ||
/* crc32_acle.c -- compute the CRC-32 of a data stream
* Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler
* Copyright (C) 2016 Yang Zhang
* For conditions of distribution and use, see copyright notice in zlib.h
*
*/
#ifdef ARM_ACLE
#include "acle_intrins.h"
#include "zbuild.h"
Z_INTERNAL Z_TARGET_CRC uint32_t... | c | github | https://github.com/opencv/opencv | 3rdparty/zlib-ng/arch/arm/crc32_acle.c |
//===--- Win32.h - Win32 utility functions ----------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | c | github | https://github.com/apple/swift | include/swift/Runtime/Win32.h |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | unknown | codeparrot/codeparrot-clean | ||
#-*- coding: utf-8 -*-
# Copyright (C) 2011 by
# Jordi Torrents <jtorrents@milnou.net>
# Aric Hagberg <hagberg@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
__author__ = """\n""".join(['Jordi Torrents <jtorrents@milnou.net>',
'Aric Hagberg (hagberg@lanl... | unknown | codeparrot/codeparrot-clean | ||
# 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 to in... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Import all necessary libraries
#
import argparse
from lcrequest import LCRequest
from operator import itemgetter
#
# Define some global constants
#
VERSION= '0.0.1'
MINIMUM_WITHDRAWAL_AMOUNT= 100
MAXIMUM_WITHDRAWAL_AMOUNT= 1000
# Lending Club API data structure keys
KEY_AVAILABLE_CASH= 'a... | unknown | codeparrot/codeparrot-clean | ||
# vim:tw=50
"""Exercise: For Loops (1)
For loops are pretty handy and compactly defined.
They fit the way that people think when they want
to "do something to everything in this list".
They're also good for making one list from another
one. We'll do that, here.
Sometimes you have a list, and you realy just want
to ... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.