code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
unknown
codeparrot/codeparrot-clean
import os from socket import ( AF_INET, SO_REUSEADDR, SOCK_STREAM, SOL_SOCKET, socket ) from neptune.handler import NRequest from neptune.adapter import NAdapter from neptune.router import NRouter from neptune.session import NSession class NServer(object): """ Neptune Server """ d...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # 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 # "L...
unknown
codeparrot/codeparrot-clean
XK_Hangul = 0xff31 XK_Hangul_Start = 0xff32 XK_Hangul_End = 0xff33 XK_Hangul_Hanja = 0xff34 XK_Hangul_Jamo = 0xff35 XK_Hangul_Romaja = 0xff36 XK_Hangul_Codeinput = 0xff37 XK_Hangul_Jeonja = 0xff38 XK_Hangul_Banja = 0xff39 XK_Hangul_PreHanja = 0xff3a XK_Hangul_PostHanja = 0xff3b XK_Hangul_SingleCandidate = 0xff3c XK_Han...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\AccessToken; ...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/AccessToken/OidcUserInfoTokenHandlerFactory.php
#!/usr/bin/env python3 import os import unittest import json import datetime import random import copy from potnanny.apps.action.schemas import ActionSchema base = { "name": "test control", "sleep_minutes": 60, "is_active": True, "sensor": "any", "measurement_type": "temperature", "data": json...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function Component(props) { const pattern = /foo/g; const value = makeValue(); // We treat RegExp instances as mutable objects (bc they are) // so by default we assume this could be mutating `value`: if (pattern.test(value)) { return <div>{value}</div>; } return <div>Default</d...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/regexp-literal.expect.md
# -*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2012 - 2014 Odoo Canada. All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publish...
unknown
codeparrot/codeparrot-clean
{ "name": "@playground/vite-plugin-cloudflare", "version": "0.0.0", "private": true, "sideEffects": false, "type": "module", "scripts": { "dev": "react-router dev", "build": "react-router build", "typegen": "wrangler types && react-router typegen", "typecheck": "pnpm typegen && tsc" }, "...
json
github
https://github.com/remix-run/react-router
playground/vite-plugin-cloudflare/package.json
""" Staff view of courseware """ from bok_choy.page_object import PageObject from .courseware import CoursewarePage class StaffPage(CoursewarePage): """ View of courseware pages while logged in as course staff """ url = None PREVIEW_MENU_CSS = '.preview-menu' VIEW_MODE_OPTIONS_CSS = '.preview-...
unknown
codeparrot/codeparrot-clean
# Scan an Apple header file, generating a Python file of generator calls. import sys from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner_OSX LONG = "Files" SHORT = "file" def main(): input = ["Files.h", "Aliases.h", "Finder.h"] output = SHORT + "gen.py" de...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package locking import ( "slices" "strings" ) // ParseDetectDeadlockConfigParameter takes the detectDeadlockConfigParameter string // and transforms it to a lowercase version of the string, then splits it into // a slice of strings by interpret...
go
github
https://github.com/hashicorp/vault
helper/locking/core_locking.go
#!/usr/bin/python2.7 # Copyright (C) 2012 Michael Spreitzenbarth, Sven Schmitt, Tobias Latzo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
unknown
codeparrot/codeparrot-clean
""" This file is part of the pyquaternion python module Author: Kieran Wynn Website: https://github.com/KieranWynn/pyquaternion Documentation: http://kieranwynn.github.io/pyquaternion/ Version: 1.0.0 License: The MIT License (MIT) Copyright (c) 2015 Kieran Wynn Permission is hereby g...
unknown
codeparrot/codeparrot-clean
// Copyright 2022 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
go
github
https://github.com/etcd-io/etcd
tests/framework/interfaces/interface.go
# 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 appl...
unknown
codeparrot/codeparrot-clean
import TsvReader import os, cPickle def main(): base_dir = "/home/emre/arastirma/data/drug/sider" label_file = base_dir + "label_mapping.tsv" side_effect_file = base_dir + "adverse_effects_raw.tsv" meddra_side_effect_file = base_dir + "meddra_adverse_effects.tsv" dump_file = base_dir + "sider.pcl" ...
unknown
codeparrot/codeparrot-clean
# SF [ 729683 ] html output method can garble mixed HTML and XML # Submitted By: # Nils Klarlund (klarlund) from Xml.Xslt import test_harness source_1 = """<?xml version="1.0" encoding="UTF-8"?> <html> <head> <contents> <a title="...">tab_1</a> <a title="...">tab_2</a> </contents> </head> <body></body> ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/metrics/stats/WindowedCount.java
/*------------------------------------------------------------------------- * * arraysubs.c * Subscripting support functions for arrays. * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION * s...
c
github
https://github.com/postgres/postgres
src/backend/utils/adt/arraysubs.c
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Image pipeline reader = vtk.vtkImageReader() reader.ReleaseDataFlagOff() reader.SetDataByteOrderToLittleEndian() reader.SetDataExtent(0,63,0,63,1,93) reader.SetDataSpacing(3.2,3.2,1...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2013 Linaro Limited # # Author: Neil Williams <neil.williams@linaro.org> # Senthil Kumaran <senthil.kumaran@linaro.org> # # This file is part of LAVA Scheduler. # # LAVA Scheduler 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
from operator import attrgetter from django.db.models import Min from mkt.constants.base import STATUS_PUBLIC from mkt.search.indexers import BaseIndexer from mkt.translations.models import attach_trans_dict class ExtensionIndexer(BaseIndexer): translated_fields = ('description', 'name', ) fields_with_langua...
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
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2014-2015, Epic Games, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
unknown
codeparrot/codeparrot-clean
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ describe('Angular Elements', () => { beforeEach(() => { cy.visit('/'); }); it('should recognize the zippy...
javascript
github
https://github.com/angular/angular
devtools/cypress/integration/elements.e2e.js
<?php namespace Illuminate\View\Compilers\Concerns; use Illuminate\Contracts\Support\CanBeEscapedWhenCastToString; use Illuminate\Support\Str; use Illuminate\View\AnonymousComponent; use Illuminate\View\ComponentAttributeBag; trait CompilesComponents { /** * The component name hash stack. * * @var...
php
github
https://github.com/laravel/framework
src/Illuminate/View/Compilers/Concerns/CompilesComponents.php
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com import uuid import mimetypes from thumbor.handlers import ImageApiH...
unknown
codeparrot/codeparrot-clean
"""urlconf for devices""" from django.conf.urls.defaults import url, patterns from django.views.generic import TemplateView from inventory.devices.views import * urlpatterns = patterns('', # ex: /devices url(r'^$', DevicesListView.as_view(), kwargs={'device_type': 'ipads'}, name='index...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 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...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
go
github
https://github.com/etcd-io/etcd
etcdutl/etcdutl/printer_protobuf.go
from __future__ import unicode_literals import itertools import hashlib import json import re from .common import InfoExtractor from ..compat import ( compat_str, compat_HTTPError, ) from ..utils import ( ExtractorError, get_element_by_attribute, int_or_none, lowercase_escape, std_headers,...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright (c) 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. """Certificate chain with 1 intermediary, where the target is expired (violates validity.notBefore). Verification is expected to fail."...
unknown
codeparrot/codeparrot-clean
import argparse import os from sadit.util import abstract_method, load_para ROOT = os.environ.get('SADIT_ROOT') class BaseExper(object): ROOT = ROOT def __init__(self, argv, parser=None): # import ipdb;ipdb.set_trace() if parser is None: parser = argparse.ArgumentParser(add_help=F...
unknown
codeparrot/codeparrot-clean
""" MUSE -- A Multi-algorithm-collaborative Universal Structure-prediction Environment Copyright (C) 2010-2017 by Zhong-Li Liu 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 version 2 of t...
unknown
codeparrot/codeparrot-clean
""" Support for eQ-3 Bluetooth Smart thermostats. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/climate.eq3btsmart/ """ import logging import voluptuous as vol from homeassistant.components.climate import ( ClimateDevice, PLATFORM_SCHEMA, PRECISIO...
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/debug/Pogo.hpp
"""SCons.Tool.Packaging.tarbz2 The tarbz2 SRC packager. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to de...
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/tests/unit/dags_corrupted/test_impersonation_custom.py
from django.http import HttpResponse from django.template import loader, Context, RequestContext class ContentNotRenderedError(Exception): pass class SimpleTemplateResponse(HttpResponse): def __init__(self, template, context=None, mimetype=None, status=None, content_type=None): # It would...
unknown
codeparrot/codeparrot-clean
from hwt.code import If from hwt.hdl.types.bits import Bits from hwt.interfaces.std import Signal, VectSignal, Clk from hwt.simulator.simTestCase import SimTestCase from hwt.synthesizer.unit import Unit from hwtSimApi.constants import CLK_PERIOD class ConstCondition(Unit): def _declr(self): self.clk = Clk(...
unknown
codeparrot/codeparrot-clean
name: Check Frontend Test Coverage on: pull_request: types: [opened, synchronize, reopened, labeled, unlabeled] paths: - '**/*.js' - '**/*.jsx' - '**/*.ts' - '**/*.tsx' - 'package.json' - '.github/CODEOWNERS' permissions: {} jobs: setup: name: Setup opted-in teams ...
unknown
github
https://github.com/grafana/grafana
.github/workflows/check-frontend-test-coverage.yml
import os import subprocess import sys import shutil import sphinx import setuptools import distutils import numpy.distutils try: from paver.tasks import VERSION as _PVER if not _PVER >= '1.0': raise RuntimeError("paver version >= 1.0 required (was %s)" % _PVER) except ImportError, e: raise Runti...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright: (c) 2019, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations class ModuleDocFragment(object): DOCUMENTATION = r""" options: stage: description: - Control when this vars ...
python
github
https://github.com/ansible/ansible
lib/ansible/plugins/doc_fragments/vars_plugin_staging.py
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-10-31 14:13 # Django import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('foia', '0040_foiacommunication_hidden'), ] operations = [ ...
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/ipc/ProtocolInfo.java
"""Provide kiskadee queues and operations on them.""" import time from multiprocessing import Queue import kiskadee analysis = Queue() results = Queue() packages = Queue() class Queues(): """Provide kiskadee queues objects.""" @staticmethod def enqueue_analysis(package_to_analysis): """Put a ana...
unknown
codeparrot/codeparrot-clean
from graphserver.ext.gtfs.gtfsdb import GTFSDatabase from graphserver.ext.osm.osmdb import OSMDB from graphserver.graphdb import GraphDatabase from graphserver.core import Link import sys from optparse import OptionParser def main(): usage = """usage: python gdb_link_osm_gtfs.py <graphdb_filename> <osmdb_filename...
unknown
codeparrot/codeparrot-clean
""" Decorators for views based on HTTP headers. """ import datetime from functools import wraps from inspect import iscoroutinefunction from django.http import HttpResponseNotAllowed from django.middleware.http import ConditionalGetMiddleware from django.utils import timezone from django.utils.cache import get_condit...
python
github
https://github.com/django/django
django/views/decorators/http.py
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.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
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/MutedTestPlugin.java
from pypov.pov import Texture, Pigment, Intersection, Cylinder, Torus from pypov.pov import Union, Difference, Object, Box, Sphere, Merge, Isosurface from pypov.common import grey, white from pypov.colors import Colors from lib.base import ten_by_ten from lib.textures import cross_hatch, cross_hatch_2, wall_texture_1,...
unknown
codeparrot/codeparrot-clean
"""distutils.command.clean Implements the Distutils 'clean' command.""" # contributed by Bastian Kleineidam <calvin@cs.uni-sb.de>, added 2000-03-18 __revision__ = "$Id: clean.py,v 1.12 2000/10/14 04:06:40 gward Exp $" import os from distutils.core import Command from distutils.dir_util import remove_tree class cle...
unknown
codeparrot/codeparrot-clean
fun test() { buildFoo { <expr>value</expr> = produceString() } } fun buildFoo(builder: Foo.() -> Unit): Foo { val foo = Foo() foo.builder() return foo } class Foo { var value: String? = null } fun produceString(): String = ""
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/testData/components/dataFlowInfoProvider/exitPointSnapshot/defaultValues/assignmentTarget.kt
// Copyright The Prometheus 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 w...
go
github
https://github.com/prometheus/prometheus
config/reload_test.go
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing_extensions import Literal from ..._models import BaseModel __all__ = ["FileRetrieveResponse"] class FileRetrieveResponse(BaseModel): id: str """Unique identifier for the file.""" bytes: int """Size of ...
python
github
https://github.com/openai/openai-python
src/openai/types/containers/file_retrieve_response.py
#!/usr/bin/env python from xml.sax.saxutils import escape, quoteattr from emit import Emit from param import known_param_fields, known_units from lxml import etree # Emit ArduPilot documentation in an machine readable XML format for Mission Planner class XmlEmitMP(Emit): def __init__(self, *args, **kwargs): ...
unknown
codeparrot/codeparrot-clean
""" Python Character Mapping Codec iso8859_7 generated from 'MAPPINGS/ISO8859/8859-7.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
unknown
codeparrot/codeparrot-clean
import re import os import random import download_episodes if not os.path.isdir("episodes"): download_episodes.scrape_all_seasons() if not os.path.isfile("catchphrases.txt"): catchphrases = open("catchphrases.txt", "a+") screenplay_re = r'(?<=<div class="scrolling-script-container">)(.*?)(?=</div>)' ...
unknown
codeparrot/codeparrot-clean
import {assertDropCollection} from "jstests/libs/collection_drop_recreate.js"; import {ReplSetTest} from "jstests/libs/replsettest.js"; import {ShardingTest} from "jstests/libs/shardingtest.js"; // Tests renaming the system.buckets collection. // Set up the test database. const dbName = "test"; const collName = "mongo...
javascript
github
https://github.com/mongodb/mongo
jstests/auth/rename_system_buckets_collection.js
- block: - name: Disable ubuntu repos so system packages are not upgraded and do not change testing env command: mv /etc/apt/sources.list /etc/apt/sources.list.backup - name: install latest foo apt: name: foo state: latest allow_unauthenticated: yes - name: check foo version shell:...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/apt/tasks/downgrade.yml
import os import signal import subprocess import sys from pathlib import Path from unittest import mock, skipUnless from django.db import connection from django.db.backends.mysql.client import DatabaseClient from django.test import SimpleTestCase class MySqlDbshellCommandTestCase(SimpleTestCase): def settings_to_...
python
github
https://github.com/django/django
tests/dbshell/test_mysql.py
# -*- coding: utf-8 -*- # 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, softw...
unknown
codeparrot/codeparrot-clean
""" Database of molecules outside the G2_1 set """ molecule_names = ['Be2','C7NH5','BDA','biphenyl','C60'] data = { 'Be2': { 'description': "Diatomic Beryllium", 'name': "Be_2", 'enthalpy': 155.1, 'ZPE': 1.0000, 'thermal correction': 5.0600, 'symbols': 'BeBe', 'magmoms': None, 'positi...
unknown
codeparrot/codeparrot-clean
scrape_configs: -
unknown
github
https://github.com/prometheus/prometheus
config/testdata/empty_scrape_config.bad.yml
#!/usr/bin/python2 """ Rezonable is a personal recursive DNS resolver that keeps its cache perpetually updated. The idea is to flood the cache with nonsense so that eavesdroppers can't determine anything from DNS traffic. UDP only. Terminology: we answer queries from "customers" and query upstream from "suppliers". Wo...
unknown
codeparrot/codeparrot-clean
import sys import math import itertools import geo from pf import Prefab from PySide.QtCore import * from PySide.QtGui import * X,Y = 0,1 class GridWidget(QGraphicsView): overlapped = Signal(bool) prefab_outline = QPen(QColor(0, 0, 0, 255)) spacing = 2 grid_width = 16 factor = spacing+grid_width ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2011 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
import datetime from structobject import * class em_datagram(structObject): _byte_order=little_endian _field_order=( "stx", "datagram_type", "sonar_model", "date", "time", "ping_number", "system_serial", "body", "etx", "checksum") ...
unknown
codeparrot/codeparrot-clean
//go:build !windows package main import ( "context" "fmt" "net" "net/http" "os" "path/filepath" "runtime" "strings" "sync" "testing" "time" "github.com/cloudflare/cfssl/csr" "github.com/cloudflare/cfssl/helpers" "github.com/cloudflare/cfssl/initca" "github.com/moby/moby/api/types/container" "github.c...
go
github
https://github.com/moby/moby
integration-cli/docker_api_swarm_test.go
#!/usr/bin/env bash # Copyright 2023 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. set -euo pipefail export RUNS_PER_TEST=3 export EXTRA_TEST_ARGS="--define gotags=bazel,gss,deadlock --test_env=COCKROACH_NIGHTLY_STRESS=true --test_tim...
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity/cockroach/nightlies/stress_engflow_deadlock.sh
//===--- DiverseStack.h - Stack of variably-sized objects -------*- 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/Basic/DiverseStack.h
# Copyright (C) 2009 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 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. from telemetry.core import gpu_device class GPUInfo(object): """Provides information about the GPUs on the system.""" def __init__(self, device_array, ...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/test/java/org/apache/kafka/common/acl/AclOperationTest.java
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package remote import ( "context" "fmt" "log" "strings" tfe "github.com/hashicorp/go-tfe" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclsyntax" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/back...
go
github
https://github.com/hashicorp/terraform
internal/backend/remote/backend_context.go
/* Copyright 2016 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
cmd/kube-controller-manager/app/discovery.go
# # 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
--- - name: Assert that a embedded vault of a string with no newline works assert: that: - 'vault_encrypted_one_line_var == "Setec Astronomy"' - name: Assert that a multi line embedded vault works, including new line assert: that: - vault_encrypted_var == "Setec Astronomy\n" # TODO: add a expe...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-vault/roles/test_vault_embedded/tasks/main.yml
#!/usr/bin/python3 import RPi.GPIO as GPIO from lib_nrf24 import NRF24 import time import spidev GPIO.setmode(GPIO.BCM) pipes=[[0xe3,0xe3,0xe3,0xe3,0xe3],[0xc2,0xc2,0xc2,0xc2,0xc2]] radio = NRF24(GPIO,spidev.SpiDev()) radio.begin(0,17) radio.setPayloadSize(32) radio.setChannel(0x60) radio.setDataRate(NRF24.BR_2MBPS) r...
unknown
codeparrot/codeparrot-clean
# file openpyxl/style.py # Copyright (c) 2010 openpyxl # # 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, ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2016 Therp BV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from datetime import date from dateutil.relativedelta import relativedelta from openerp import fields from openerp.exceptions import ValidationError from .test_partner_relation_common import TestPart...
unknown
codeparrot/codeparrot-clean
from mesa import Agent, Model import configuration.settings class Time(Agent): def __init__(self): self.timeByStep = configuration.settings.time_by_step self.day = 0 self.hour = 8 self.minute = 0 self.seg = 0 self.clock = 00.00 def step(self): self.seg...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 """ Operator Interface This module exports a set of functions corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expression x+y. The function names are those used for special methods; variants without leading and trailing '__' are also prov...
unknown
codeparrot/codeparrot-clean
-- -- Verify correct calculation of checksums -- -- Postgres' checksum algorithm produces different answers on little-endian -- and big-endian machines. The results of this test also vary depending -- on the configured block size. This test has several different expected -- results files to handle the following possi...
sql
github
https://github.com/postgres/postgres
contrib/pageinspect/sql/checksum.sql
// Copyright 2022 The Abseil Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/log/internal/structured.h
#!/usr/bin/python3 import toml import argparse import scipy.optimize import re # 2017 table (could predict it moves with inflation?) # only married joint at the moment taxrates = [[0, 0.00, 0], [0.1, 0.10, 0.01], # fake level to fix 0 [18700, 0.15, 1900], [75900, 0.25...
unknown
codeparrot/codeparrot-clean
import argparse import time from collections import defaultdict from unittest import TextTestResult as _TextTestResult from unittest import TextTestRunner from scrapy.commands import ScrapyCommand from scrapy.contracts import ContractsManager from scrapy.utils.conf import build_component_list from scrapy.utils.misc im...
python
github
https://github.com/scrapy/scrapy
scrapy/commands/check.py
import unittest import os from test_all import db, test_support, get_new_environment_path, get_new_database_path class DBSequenceTest(unittest.TestCase): def setUp(self): self.int_32_max = 0x100000000 self.homeDir = get_new_environment_path() self.filename = "test" self.dbenv = db...
unknown
codeparrot/codeparrot-clean
""" Copyright 2018 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
unknown
codeparrot/codeparrot-clean
<!-- BEGIN MUNGE: GENERATED_TOC --> - [v1.17.17](#v11717) - [Downloads for v1.17.17](#downloads-for-v11717) - [Source Code](#source-code) - [Client binaries](#client-binaries) - [Server binaries](#server-binaries) - [Node binaries](#node-binaries) - [Changelog since v1.17.16](#changelog-since-v1171...
unknown
github
https://github.com/kubernetes/kubernetes
CHANGELOG/CHANGELOG-1.17.md
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # import sys import time import logging import getopt from multiprocessing import Process from util.preprocess import mergeMultiProcessMatFiles from util.UniGridDisOnlyPoints import UniGridDisOnlyPoints def processTask(x, city, directory, inum, onum, GRIDSNUM, subopath): ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2015-2017 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 multiple RPC users.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
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
r"""zipextimporter - an importer which can import extension modules from zipfiles This file and also _memimporter.pyd is part of the py2exe package. Overview ======== zipextimporter.py contains the ZipExtImporter class which allows to load Python binary extension modules contained in a zip.archive, without unpacking...
unknown
codeparrot/codeparrot-clean
import os import subprocess from git_remote_helpers.util import check_call, check_output class GitImporter(object): """An importer for testgit repositories. This importer simply delegates to git fast-import. """ def __init__(self, repo): """Creates a new importer for the specified repo. ...
unknown
codeparrot/codeparrot-clean
module.exports = { removals: [/FeatureToggles\..*/], additions: [/FeatureToggles\..*/], changes: [/FeatureToggles\..*/], };
javascript
github
https://github.com/grafana/grafana
.levignore.js