code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# -*- coding:utf-8 -*- """ /*************************************************************************** Python Console for QGIS ------------------- begin : 2012-09-10 copyright : (C) 2012 by Salvatore Larosa email : lrssvtml (at) gmail (dot) com ***...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals import re import time import itertools from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlencode, compat_str, ) from ..utils import ( dict_get, ExtractorError, float_or_none, int_or_none, remove_start, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 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. """Installs deps for using SDK emulator for testing. The script will download the SDK and system images, if they are not present, ...
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/util/SemaphoredDelegatingExecutor.java
{ "format_version": "1.0", "valid": false, "error_count": 4, "warning_count": 0, "diagnostics": [ { "severity": "error", "summary": "Missing required argument", "detail": "The argument \"source\" is required, but no definition was found.", "range": { "filename": "testdata/v...
json
github
https://github.com/hashicorp/terraform
internal/command/testdata/validate-invalid/incorrectmodulename/output.json
exe = "tester" # "gnu" or "clang" toolchain = "gnu" # optional link_pool_depth = 1 # optional builddir = { "gnu" : "build" , "msvc" : "build" , "clang" : "build" } includes = { "gnu" : [ "-I." ] , "msvc" : [ "/I." ] , "clang" : [ "-I." ] } defines = { "gnu" : [ ] , "msvc" : [ ] ,...
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 us...
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 2010-2012 RethinkDB, all rights reserved. import sys, os sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) import memcached_workload_common def readline(s): buf = "" while not buf.endswith("\r\n"): buf += s.recv(1) ...
unknown
codeparrot/codeparrot-clean
# Suffix not supported This diagnostic detects when the `.px`, `.%`, and `.em` suffixes are used with an attribute binding. ```html <img [attr.width.px]="5" /> ``` ## What's wrong with that? These suffixes are only available for style bindings. They do not have any meaning when binding to an attribute. ## What sho...
unknown
github
https://github.com/angular/angular
adev/src/content/reference/extended-diagnostics/NG8106.md
{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations \u0026 Alerts", "type": "dashb...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/testdata/output/single_version/v33.panel_ds_name_to_ref.v33.json
# -*- coding: utf-8 -*- # # This file is part of RERO ILS. # Copyright (C) 2017 RERO. # # RERO ILS 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 lat...
unknown
codeparrot/codeparrot-clean
"""Test config_key, coverage 98%. Coverage is effectively 100%. Tkinter dialog is mocked, Mac-only line may be skipped, and dummy function in bind test should not be called. Not tested: exit with 'self.advanced or self.keys_ok(keys) ...' False. """ from idlelib import config_key from test.support import requires imp...
python
github
https://github.com/python/cpython
Lib/idlelib/idle_test/test_config_key.py
# frozen_string_literal: true require "test_helper" class ActionMailbox::IncinerationJobTest < ActiveJob::TestCase setup { @inbound_email = create_inbound_email_from_fixture("welcome.eml") } test "ignoring a missing inbound email" do @inbound_email.destroy! perform_enqueued_jobs do assert_nothing_...
ruby
github
https://github.com/rails/rails
actionmailbox/test/jobs/incineration_job_test.rb
# -*- encoding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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/LICE...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
connect/api/src/test/java/org/apache/kafka/connect/data/DateTest.java
# frozen_string_literal: true class PrefixedJob < ActiveJob::Base self.queue_name_prefix = "production" def perform; end end
ruby
github
https://github.com/rails/rails
activejob/test/jobs/prefixed_job.rb
""" Form Widget classes specific to the Django admin site. """ from itertools import chain from django import forms from django.forms.widgets import RadioFieldRenderer, RadioChoiceInput from django.utils.encoding import force_str from django.utils.safestring import mark_safe from django.utils.html import conditional_es...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import rospy, os from std_msgs.msg import String from std_msgs.msg import Bool mapping = False navigation = False autonomous = False manual = False motion_detection = False capture = False submit = False command = "Standby" sys_comm = "" timer = 0.0 def command_parser(cmd): global mapping, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python -u import sys import libxml2 # Memory debug specific libxml2.debugMemory(1) log = "" class callback: def startDocument(self): global log log = log + "startDocument:" def endDocument(self): global log log = log + "endDocument:" def startElement(self, tag...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010, Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package cloudplugin1 import ( "context" "fmt" "io" "log" "github.com/hashicorp/terraform/internal/cloudplugin/cloudproto1" "github.com/hashicorp/terraform/internal/pluginshared" ) // GRPCCloudClient is the client interface for interacting w...
go
github
https://github.com/hashicorp/terraform
internal/cloudplugin/cloudplugin1/grpc_client.go
""" Test scalar buffer interface adheres to PEP 3118 """ import pytest import numpy as np from numpy._core._multiarray_tests import get_buffer_info from numpy._core._rational_tests import rational from numpy.testing import assert_, assert_equal, assert_raises # PEP3118 format strings for native (standard alignment an...
python
github
https://github.com/numpy/numpy
numpy/_core/tests/test_scalarbuffer.py
########################################################## # THIS IS A GENERATED FILE -- DO NOT MODIFY. # IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE # AND REGENERATE THE MATRIX SUITES. # # matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/replica_sets...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/matrix_suites/generated_suites/replica_sets_jscore_passthrough_execution_control_with_prioritization.yml
/* This is a ucontext-like userland context switching API for WebAssembly based on Binaryen's Asyncify. * NOTE: * This mechanism doesn't take care of stack state. Just save and restore program counter and * registers (rephrased as locals by Wasm term). So use-site need to save and restore the C stack pointer. * T...
c
github
https://github.com/ruby/ruby
wasm/fiber.c
from tools import widget_form, widget_menu class SiteForm: def __init__(self, sitename, timingtemplate, description): self.menulist = [] n = self.__class__.__name__ self.menudata = { '_text': '', '_backtitle': 'Developed by Bernhard - Module: ' + n, '_ti...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Software License Agreement (BSD License) # # Copyright (c) 2013, Juergen Sturm, TUM # 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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash set -eux [ -f "${INVENTORY}" ] ANSIBLE_HOST_KEY_CHECKING=false ansible-playbook download_binary_modules.yml -i "${INVENTORY}" -v "$@" ANSIBLE_HOST_KEY_CHECKING=false ansible-playbook test_binary_modules.yml -i "${INVENTORY}" -v "$@"
unknown
github
https://github.com/ansible/ansible
test/integration/targets/binary_modules/test.sh
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # # 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 # # Unle...
python
github
https://github.com/huggingface/transformers
src/transformers/models/bert/tokenization_bert_legacy.py
# -*- coding: utf-8 -*- """ Created on Sun May 06 05:32:15 2012 Author: Josef Perktold editted by: Paul Hobson (2012-08-19) """ # example with the new ProbPlot class from matplotlib import pyplot as plt import numpy as np from scipy import stats import statsmodels.api as sm #example from docstring data = sm.datasets...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import logging import urlparse import time import lxml.html import openerp import re _logger = logging.getLogger(__name__) class Crawler(openerp.tests.HttpCase): """ Test suite crawling an openerp CMS instance and checking that all internal links lead to a 200 response. If a use...
unknown
codeparrot/codeparrot-clean
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2012, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the fol...
c
github
https://github.com/opencv/opencv
3rdparty/openexr/IlmThread/IlmThreadNamespace.h
""" A helper module that can work with paths that can refer to data inside a zipfile XXX: Need to determine if isdir("zipfile.zip") should return True or False. Currently returns True, but that might do the wrong thing with data-files that are zipfiles. """ import os as _os import zipfile as _zipfile import errno as _...
unknown
codeparrot/codeparrot-clean
@file:JvmMultifileClass @file:JvmName("FlowKt") package kotlinx.coroutines.flow import kotlinx.coroutines.* import kotlin.jvm.* /** * A terminal operator that returns `true` and immediately cancels the flow * if at least one element matches the given [predicate]. * * If the flow does not emit any elements or no ...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/common/src/flow/terminal/Logic.kt
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'xieshaoxin' from transwrap.db import next_id from transwrap.orm import FloatField,Model,StringField,BooleanFiled,IntegerField,TextField import time class User(Model): __table__ = 'user' id = StringField(primary_key=True, default=next_id(), type="v...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 OpenStack Foundation # # 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
/*! * 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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/layouts/Details/Grid/utils.ts
"""Provide functionality to TTS.""" import asyncio import ctypes import functools as ft import hashlib import io import logging import mimetypes import os import re from aiohttp import web import voluptuous as vol from homeassistant.components.http import HomeAssistantView from homeassistant.components.media_player.c...
unknown
codeparrot/codeparrot-clean
"""Tests for Sentry integration.""" import logging import pytest from homeassistant.components.sentry import get_channel, process_before_send from homeassistant.components.sentry.const import ( CONF_DSN, CONF_ENVIRONMENT, CONF_EVENT_CUSTOM_COMPONENTS, CONF_EVENT_HANDLED, CONF_EVENT_THIRD_PARTY_PAC...
unknown
codeparrot/codeparrot-clean
package drivers import ( "fmt" "net/http" "net/http/httptest" "net/url" "strings" "testing" "github.com/docker/go-connections/tlsconfig" "github.com/moby/moby/v2/pkg/plugins" ) func TestVolumeRequestError(t *testing.T) { mux := http.NewServeMux() server := httptest.NewServer(mux) defer server.Close() mu...
go
github
https://github.com/moby/moby
daemon/volume/drivers/proxy_test.go
// RUN: %check_clang_tidy -check-suffixes=NSTRICT,STRICT %s cppcoreguidelines-pro-type-static-cast-downcast %t // RUN: %check_clang_tidy -check-suffix=NSTRICT %s cppcoreguidelines-pro-type-static-cast-downcast %t -- -config="{CheckOptions: {cppcoreguidelines-pro-type-static-cast-downcast.StrictMode: false}}" class B...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-static-cast-downcast.cpp
#! /usr/bin/env python import sys import ddlib # DeepDive python utility ARR_DELIM = '~^~' # For each input tuple for row in sys.stdin: parts = row.strip().split('\t') if len(parts) != 6: print >>sys.stderr, 'Failed to parse row:', row continue # Get all fields from a row words = parts[0].split(...
unknown
codeparrot/codeparrot-clean
import collections import marshal import pstats from _colorize import ANSIColors from .collector import Collector, extract_lineno from .constants import MICROSECONDS_PER_SECOND, PROFILING_MODE_CPU class PstatsCollector(Collector): def __init__(self, sample_interval_usec, *, skip_idle=False): self.result =...
python
github
https://github.com/python/cpython
Lib/profiling/sampling/pstats_collector.py
from generator.actions import Actions import random import string class MsgNode() : def __init__(self, name, options, responses, branches) : self.name = name self.options = options self.responses = responses self.branches = branches def toCDef(self, dumped = {}): s = "" if self.name in du...
unknown
codeparrot/codeparrot-clean
'''' Copyright (c) 2013-2015, Joshua Pitts 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.5 # Copyright (C) 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
unknown
codeparrot/codeparrot-clean
# -*- 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
# -*- test-case-name: twisted.python.test.test_syslog -*- # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Classes and utility functions for integrating Twisted and syslog. You probably want to call L{startLogging}. """ syslog = __import__('syslog') from twisted.python import lo...
unknown
codeparrot/codeparrot-clean
import string class predictions(object): def __init__(self, positions=None, scores=None): self.positions=positions self.scores=scores def set_positions(self, positions): self.positions=positions; def get_positions(self): return self.positions def set_scores(self, scores): self.scores=scores def get_sc...
unknown
codeparrot/codeparrot-clean
import pylab import numpy as np import pymc import matplotlib.patches from mpl_toolkits.axes_grid1 import make_axes_locatable import scipy.stats def frac_inside_poly(x,y,polyxy): """Calculate the fraction of points x,y inside polygon polyxy. polyxy -- list of x,y coordinates of vertices. """ xy = np....
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): from sentry.receivers.rules import create_default_rules Project = orm['sentry.Project'] Rule = orm['sent...
unknown
codeparrot/codeparrot-clean
"""SCons.Tool.BitKeeper.py Tool-specific initialization for the BitKeeper source code control system. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Pe...
unknown
codeparrot/codeparrot-clean
# (C) 2013 Andy McCormick, Ryan Schuster # MIT license # see LICENSE.txt for details import regtran # control board interface module # TODO: # factor out HEX file parsing to a separate module def wordToByteString(word): return eval('"\\x' + hex(word & 0xff)[2:].rjust(2, '0') + '\\x' + hex((word & 0xff00) >> 8)[2:]...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet accounts properly when there are cloned transactions with malleated scriptsigs.""" fro...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from redbot.message import headers from redbot.speak import Note, categories, levels from redbot.syntax import rfc7230 from redbot.type import AddNoteMethodType class transfer_encoding(headers.HttpHeader): canonical_name = "Transfer-Encoding" description = """\ The `Transfer-Encoding` he...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2015 Red Hat, 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...
unknown
codeparrot/codeparrot-clean
scrape_configs: - job_name: node scrape_protocols: ["OpenMetricsText1.0.0", "PrometheusProto", "OpenMetricsText1.0.0"] static_configs: - targets: ['localhost:8080']
unknown
github
https://github.com/prometheus/prometheus
config/testdata/scrape_config_files_scrape_protocols2.bad.yml
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test account RPCs. RPCs tested are: - getaccountaddress - getaddressesbyaccount - listaddressgr...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ html: ` <div>'foo'<span></span></div> ` });
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/html-non-entities-inside-elements/_config.js
# -*- coding: utf-8 -*- ''' 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 wil...
unknown
codeparrot/codeparrot-clean
from enigma import * from Screens.Screen import Screen from Components.ActionMap import ActionMap from Components.Sources.List import List from Tools.Directories import resolveFilename, SCOPE_CURRENT_PLUGIN from Tools.LoadPixmap import LoadPixmap from Components.Label import Label def MessageBoxEntry(name, picture): ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <algorithm> #include <cassert> #include <cmath> #include <cstddef> #include <c...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/quantized/cpu/qnnpack/test/hardswish-operator-tester.h
#!/bin/sh test_description='Test automatic use of a pager.' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-pager.sh . "$TEST_DIRECTORY"/lib-terminal.sh test_expect_success 'setup' ' sane_unset GIT_PAGER GIT_PAGER_IN_USE && test_unconfig core.pager && PAGER="cat >paginated.out" && export PAGER && test_commit initial ...
unknown
github
https://github.com/git/git
t/t7006-pager.sh
# frozen_string_literal: true module Psych ### # YAML event parser class. This class parses a YAML document and calls # events on the handler that is passed to the constructor. The events can # be used for things such as constructing a YAML AST or deserializing YAML # documents. It can even be fed back to ...
ruby
github
https://github.com/ruby/ruby
ext/psych/lib/psych/parser.rb
""" Tests of CourseKeys and CourseLocators """ import ddt from bson.objectid import ObjectId from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator from opaque_keys.edx.tests import LocatorBaseTest, TestDeprecated @ddt...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/apis/networking/v1/defaults.go
#-*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.test import TestCase from django.test.client import RequestFactory from django.utils import timezone from misago.core.utils import (clean_return_path, is_request_to_misago, slugify, is_referer_local, ...
unknown
codeparrot/codeparrot-clean
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
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/cc/saved_model/metrics.h
import { defineRoutes } from "../defineRoutes"; describe("defineRoutes", () => { it("returns an array of routes", () => { let routes = defineRoutes((route) => { route("/", "routes/home.js"); route("inbox", "routes/inbox.js", () => { route("/", "routes/inbox/index.js", { index: true }); ...
typescript
github
https://github.com/remix-run/react-router
packages/react-router-remix-routes-option-adapter/__tests__/defineRoutes-test.ts
/* 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/signature/types.hpp
# 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 json from extensions_paths import CHROME_EXTENSIONS from test_file_system import MoveAllTo from test_util import ReadFile FAKE_TABS_IDL = '\n'.join(...
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, json from frappe import _ from frappe.utils import nowdate from erpnext.setup.utils import get_exchange_rate from erpnext.stock.get_item_...
unknown
codeparrot/codeparrot-clean
-- reads luac listings and reports global variable usage -- lines where a global is written to are marked with "*" -- typical usage: luac -p -l file.lua | lua globals.lua | sort | lua table.lua while 1 do local s=io.read() if s==nil then break end local ok,_,l,op,g=string.find(s,"%[%-?(%d*)%]%s*([GS])ETGLOBAL.-;%s+...
unknown
github
https://github.com/redis/redis
deps/lua/test/globals.lua
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django.core.urlresolvers import reverse from django.http import Http404...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python '''Test that HTML data is decoded into a formatted document. Press ESC to exit the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: ELEMENT.py 1764 2008-02-16 05:24:46Z Alex.Holkner $' import unittest import pyglet from pyglet.text import caret, document, layout doctext = ''' ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- r""" werkzeug.contrib.securecookie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements a cookie that is not alterable from the client because it adds a checksum the server checks for. You can use it as session replacement if all you have is a user id or something to mark ...
unknown
codeparrot/codeparrot-clean
"""Implementation of the objects for the ArcGIS Server REST Administration API""" import cgi import itertools import os.path import urllib import urlparse import urllib2 from arcrest import server, GenerateToken __all__ = ['Admin', 'Folder', 'Services', 'Service', 'Machine', 'Machines', 'SiteMachines',...
unknown
codeparrot/codeparrot-clean
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Command...
php
github
https://github.com/composer/composer
src/Composer/Command/BumpCommand.php
//===--- LibPrespecialized.h - Interface for prespecializations -*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2024 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/LibPrespecialized.h
# Copyright 2013 VMware, 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 a...
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 'Revision.tags' db.add_column('wiki_revision', 'tags', self.gf('django.db.models.fields.CharField')...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
import re import types from lib.hachoir_core.error import error from lib.hachoir_core.i18n import _ from lib.hachoir_parser import Parser, HachoirParser import sys ### Parser list ################################################################ class ParserList(object): VALID_CATEGORY = ("archive", "audio", "cont...
unknown
codeparrot/codeparrot-clean
// Copyright 2022 Peter Dimov. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_HASH_IS_DESCRIBED_CLASS_HPP_INCLUDED #define BOOST_HASH_IS_DESCRIBED_CLASS_HPP_INCLUDED #include <boost/describe/bases.hpp> #include <boost/describe/members.hpp> #include...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/container_hash/is_described_class.hpp
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package roachprod import ( "context" "github.com/cockroachdb/cockroach/pkg/roachprod/install" "github.com/cockroachdb/cockroach/pkg/roachprod/logger" ) // StartSer...
go
github
https://github.com/cockroachdb/cockroach
pkg/roachprod/multitenant.go
//===--- ModuleNameLookup.h - Name lookup within a module -------*- 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/AST/ModuleNameLookup.h
from unittest import TestCase import numpy as np from hrv.filters import moving_average, moving_median, quotient, threshold_filter from hrv.rri import RRi class Filter(TestCase): def test_moving_average_order_3(self): fake_rri = np.array([810, 830, 860, 790, 804]) rri_filt = moving_average(fake_...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json import os from django.db import migrations, models def create_course(Commander, Course, data): cmdr, _ = Commander.objects.get_or_create( name=data['created_by'] ) course, _ = Course.objects.get_or_create( title=d...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.engine.winhttp.internal import io.ktor.client.network.sockets.* import kotlinx.cinterop.* import platform.windows.* import platform.winhttp.ERROR_WINHTTP_TIMEOUT @OptI...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-winhttp/windows/src/io/ktor/client/engine/winhttp/internal/WinHttpExceptions.kt
# 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 ...
unknown
codeparrot/codeparrot-clean
import json from unittest import mock from mitmproxy.test import taddons from mitmproxy.test import tflow from mitmproxy import flowfilter from mitmproxy.tools.web.app import flow_to_json from mitmproxy.tools.web import static_viewer from mitmproxy.addons import save def test_save_static(tmpdir): tmpdir.mkdir('...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2004,2006,2007,2008,2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or...
unknown
codeparrot/codeparrot-clean
""" Tests for Windows-flavoured pathlib.types._JoinablePath """ import os import unittest from .support import is_pypi from .support.lexical_path import LexicalWindowsPath if is_pypi: from pathlib_abc import vfspath else: from pathlib._os import vfspath class JoinTestBase: def test_join(self): P...
python
github
https://github.com/python/cpython
Lib/test/test_pathlib/test_join_windows.py
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,sys from waflib import Configure,Options,Utils from waflib.Tools import ccroot,ar from waflib.Configure import conf @conf def find_gxx(conf): cxx=conf.find_program(...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010 Spotify AB # # 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, dis- # t...
unknown
codeparrot/codeparrot-clean
# -*- 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) 2012 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
unknown
codeparrot/codeparrot-clean