code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
/* * 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/test/java/org/apache/hadoop/http/TestProfileServlet.java
/*------------------------------------------------------------------------- * * execGrouping.c * executor utility routines for grouping, hashing, and aggregation * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * *...
c
github
https://github.com/postgres/postgres
src/backend/executor/execGrouping.c
import os import re from Cookie import BaseCookie, SimpleCookie, CookieError from pprint import pformat from urllib import urlencode from urlparse import urljoin try: # The mod_python version is more efficient, so try importing it first. from mod_python.util import parse_qsl except ImportError: from cgi imp...
unknown
codeparrot/codeparrot-clean
import types import inspect import re import traceback from lib.jsonrpclib import config iter_types = [ types.DictType, types.ListType, types.TupleType ] string_types = [ types.StringType, types.UnicodeType ] numeric_types = [ types.IntType, types.LongType, types.FloatType ] value_t...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
unknown
codeparrot/codeparrot-clean
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright 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...
go
github
https://github.com/kubernetes/kubernetes
pkg/apis/batch/zz_generated.deepcopy.go
from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import CookieStorage from django.contrib.messages.storage.session import SessionStorage class FallbackStorage(BaseStorage): """ Tries to store all messages in the first backend, storing any unstored mes...
unknown
codeparrot/codeparrot-clean
import unittest from tests.baseclass import ParserTest from pykickstart.errors import formatErrorMsg, KickstartError, KickstartParseError, \ KickstartVersionError, _format_error_message class ErrorMessage_TestCase(ParserTest): def runTest(self): # For now, just verify that calling formatErrorMsg with ...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ html: ` <p>OK</p> <p>OK</p> <pre>one</pre> <pre>two</pre> ` });
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/each-block-recursive-with-function-condition/_config.js
/* * 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
benchmarks/src/test/java/org/elasticsearch/benchmark/vector/scorer/VectorScorerInt8OperationBenchmarkTests.java
import os import logging import pkgutil import importlib logger = logging.getLogger(__name__) def dummy_notify_factory(notify_func): def factory(conf, value): return notify_func return factory def load_notifiers(): path = os.path.dirname(os.path.abspath(__file__)) before, sep, _ = __name__.rp...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Regression tests for the Test Client, especially the customized assertions. """ from __future__ import unicode_literals import os import itertools from django.core.urlresolvers import reverse, NoReverseMatch from django.template import TemplateSyntaxError, Context, Template from django.tes...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: doh-cert-status Help: Verify DoH server cert status OCSP-staple Added: 7.76.0 Category: dns tls Protocols: DNS Multi: boolean See-also: - doh-insecure Example: - --doh-cert-status --doh-url https://doh.example $URL --...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/doh-cert-status.md
use crate::spec::base::apple::{Arch, TargetEnv, base}; use crate::spec::{Os, SanitizerSet, Target, TargetMetadata, TargetOptions}; pub(crate) fn target() -> Target { let (opts, llvm_target, arch) = base(Os::IOs, Arch::X86_64, TargetEnv::MacCatalyst); Target { llvm_target, metadata: TargetMetada...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/x86_64_apple_ios_macabi.rs
// 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
server/etcdserver/version/errors.go
# # javadoc.py: javadoc docstring parsing # Edward Loper # # Created [07/03/03 12:37 PM] # $Id: javadoc.py 1574 2007-03-07 02:55:14Z dvarrazzo $ # """ Epydoc parser for U{Javadoc<http://java.sun.com/j2se/javadoc/>} docstrings. Javadoc is an HTML-based markup language that was developed for documenting Java APIs with ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package statefile import ( "encoding/json" "fmt" "strconv" "strings" "github.com/hashicorp/hcl/v2/hclsyntax" "github.com/zclconf/go-cty/cty" ctyjson "github.com/zclconf/go-cty/cty/json" "maps" "github.com/hashicorp/terraform/internal/ad...
go
github
https://github.com/hashicorp/terraform
internal/states/statefile/version3_upgrade.go
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
cpp
github
https://github.com/opencv/opencv
modules/calib3d/src/main.cpp
import functools import inspect from textwrap import dedent class ResultsWrapper(object): """ Class which wraps a statsmodels estimation Results class and steps in to reattach metadata to results (if available) """ _wrap_attrs = {} _wrap_methods = {} def __init__(self, results): se...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package stackeval import ( "context" "strings" "testing" "github.com/davecgh/go-spew/spew" "github.com/google/go-cmp/cmp" "github.com/zclconf/go-cty-debug/ctydebug" "github.com/zclconf/go-cty/cty" "github.com/hashicorp/terraform/internal/...
go
github
https://github.com/hashicorp/terraform
internal/stacks/stackruntime/internal/stackeval/stack_call_test.go
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/memory-controllers/brcm,brcmstb-memc-ddr.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Memory controller (MEMC) for Broadcom STB maintainers: - Florian Fainelli <f.fainelli@gmail.com> pr...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/memory-controllers/brcm,brcmstb-memc-ddr.yaml
"""Filter that uses an LLM to rerank documents listwise and select top-k.""" from collections.abc import Sequence from typing import Any from langchain_core.callbacks import Callbacks from langchain_core.documents import BaseDocumentCompressor, Document from langchain_core.language_models import BaseLanguageModel fro...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/retrievers/document_compressors/listwise_rerank.py
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # # 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 la...
unknown
codeparrot/codeparrot-clean
""" NOTE: Anytime a `key` is passed into a function here, we assume it's a raw byte string. It should *not* be a string representation of a hex value. In other words, passing the `str` value of `"32fe72aaf2abb44de9e161131b5435c8d37cbdb6f5df242ae860b283115f2dae"` is bad. You want to pass in the result of calling .decode...
unknown
codeparrot/codeparrot-clean
// 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/crc/internal/crc_internal.h
# Copyright (c) 2012 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 or agreed to...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (C) 2011, 2012 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 # (...
unknown
codeparrot/codeparrot-clean
"""This file contains the default (English) substitutions for the PyAIML kernel. These substitutions may be overridden by using the Kernel.loadSubs(filename) method. The filename specified should refer to a Windows-style INI file with the following format: # lines that start with '#' are comments # The 'gen...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import webapp2 from webapp2_extras import sessions from webapp2_extras import sessions_memcache import test_base app = webapp2.WSGIApplication(config={ 'webapp2_extras.sessions': { 'secret_key': 'my-super-secret', }, }) class TestMemcacheSession(test_base.BaseTestCase): #f...
unknown
codeparrot/codeparrot-clean
{ "compilerOptions": { "module": "esnext", "lib": ["esnext", "dom", "dom.iterable"], "target": "esnext", "noEmit": true, "moduleResolution": "bundler", "resolveJsonModule": true, "noEmitOnError": true, "noErrorTruncation": true, "allowSyntheticDefaultImports": true, "verbatimModuleSyntax": true, ...
json
github
https://github.com/sveltejs/svelte
packages/svelte/tsconfig.json
from __future__ import division from math import sqrt as Sqrt from sympy import sqrt, Symbol, legendre from scipy.sparse import eye, diags from .common import function, tensor_product import numpy as np def shen_basis(n, symbol='x'): ''' List of first n basis function due to Shen - combinations of Legendre ...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
unknown
codeparrot/codeparrot-clean
// 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
prompb/codec.go
import csv, sqlite3, os from datetime import datetime, timedelta from tkinter import * bilgiler = ("demo", "demo") def girisYap(): kAdi = isim.get() parola = sifre.get() print ( kAdi, " - ", parola ) print ("Kontrol ediliyor ...") if kAdi == bilgiler[0] and parola == bilgiler[1]: print ("Bi...
unknown
codeparrot/codeparrot-clean
from Converter import Converter from Components.Element import cached from Components.config import configfile class ConfigEntryTest(Converter, object): def __init__(self, argstr): Converter.__init__(self, argstr) args = argstr.split(',') self.argerror = False self.checkSourceBoolean = False self.invert = ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.core.validators import localflavor.us.models class Migration(migrations.Migration): dependencies = [ ('clients', '0008_merge'), ] operations = [ migrations.RemoveField( ...
unknown
codeparrot/codeparrot-clean
import os import unittest from django.contrib.gis.gdal import DataSource, Envelope, OGRGeometry, OGRException, OGRIndexError, GDAL_VERSION from django.contrib.gis.gdal.field import OFTReal, OFTInteger, OFTString from django.contrib.gis.geometry.test_data import get_ds_file, TestDS, TEST_DATA # List of acceptable data ...
unknown
codeparrot/codeparrot-clean
name: 'Lock Threads' on: schedule: - cron: '0 * * * *' workflow_dispatch: permissions: issues: write pull-requests: write discussions: write concurrency: group: lock-threads jobs: action: runs-on: ubuntu-latest steps: - uses: dessant/lock-threads@v5 with: issue-inac...
unknown
github
https://github.com/realm/realm-swift
.github/workflows/lock-threads.yml
/** * 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/dev-support/jdiff/Null.java
#!/bin/bash set -euo pipefail LUCENE_BUILD_ID=${LUCENE_BUILD_ID:-} if [[ -z "$LUCENE_BUILD_ID" ]]; then build_json=$(curl -sH "Authorization: Bearer $BUILDKITE_API_TOKEN" "https://api.buildkite.com/v2/organizations/elastic/pipelines/$BUILDKITE_PIPELINE_SLUG/builds/$BUILDKITE_BUILD_NUMBER") LUCENE_BUILD_ID=$(jq -...
unknown
github
https://github.com/elastic/elasticsearch
.buildkite/scripts/lucene-snapshot/upload-snapshot.sh
# -*- coding: utf-8 -*- # (c) 2016, Tom Melendez (@supertom) <tom@supertom.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 ...
unknown
codeparrot/codeparrot-clean
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
unknown
codeparrot/codeparrot-clean
"""Strptime-related classes and functions. CLASSES: LocaleTime -- Discovers and stores locale-specific time information TimeRE -- Creates regexes for pattern matching a string of text containing time information FUNCTIONS: _getlang -- Figure out what language is being used for the locale ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package terraform import ( "log" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs" "github.com/hashicorp/terraform/internal/moduletest/mocking" ) // OutputTransformer is a GraphTransformer that ...
go
github
https://github.com/hashicorp/terraform
internal/terraform/transform_output.go
# -*- coding: utf-8 -*- from gluon import * from s3 import * from eden.layouts import * try: from .layouts import * except ImportError: pass import eden.menus as default # Below is an example which you can base your own template's menus.py on # - there are also other examples in the other templates folders #...
unknown
codeparrot/codeparrot-clean
""" Fixtures. Fixtures are a way of loading data into the database in bulk. Fixure data can be stored in any serializable format (including JSON and XML). Fixtures are identified by name, and are stored in either a directory named 'fixtures' in the application directory, or in one of the directories named in the ``FIX...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2012-2013 Daniel Reis # # This program 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 Sof...
unknown
codeparrot/codeparrot-clean
from io import BytesIO from itertools import product import warnings import numpy as np import pandas as pd import pytest from numpy.testing import assert_allclose, assert_array_equal from statsmodels import tools from statsmodels.regression.linear_model import WLS from statsmodels.regression.rolling import RollingWL...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2025 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.symbols import org.jetbrains.kotlin.analysis.api.KaExperimentalApi ...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/symbols/KaDestructuringDeclarationSymbol.kt
/* * 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/transport/TransportVersionDefinition.java
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/interconnect/qcom,sdx75-rpmh.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm RPMh Network-On-Chip Interconnect on SDX75 maintainers: - Rohit Agarwal <quic_rohiagar@quicinc.com> descrip...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/interconnect/qcom,sdx75-rpmh.yaml
# The cycle GC collector can be executed when any GC-tracked object is # allocated, e.g. during a call to PyList_New(), PyDict_New(), ... # Moreover, it can invoke arbitrary Python code via a weakref callback. # This means that there are many places in the source where an arbitrary # mutation could unexpectedly occur. ...
python
github
https://github.com/python/cpython
Lib/test/crashers/mutation_inside_cyclegc.py
/* * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ use crate::media::{ AsyncWriter, MediaCodec, MediaHandler, MediaSample, MediaStreamSink, MediaStreamSinkWrapper, MediaStreamTrack, }; use crate::rtc::RtcError; use async_trait::async_t...
rust
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-webrtc/ktor-client-webrtc-rs/common/rust/media/sink.rs
#!/usr/bin/env python # Copyright 2013 Quanta Research Cambridge, 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 # # U...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import datetime from module.plugins.internal.Addon import Addon, Expose from module.plugins.internal.misc import seconds_to_nexthour class LogMarker(Addon): __name__ = "LogMarker" __type__ = "hook" __version__ = "0.06" __status__ = "testing" __config__ = [("activat...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2015] Michał Szczygieł, M4GiK Software # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
unknown
codeparrot/codeparrot-clean
# # 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
import io import itertools import os import sys import tempfile from unittest import skipIf from django.core.files.base import ContentFile from django.http import FileResponse from django.test import SimpleTestCase class UnseekableBytesIO(io.BytesIO): def seekable(self): return False class FileResponseTe...
python
github
https://github.com/django/django
tests/responses/test_fileresponse.py
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.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 Li...
unknown
codeparrot/codeparrot-clean
// Copyright 2007, 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 ...
c
github
https://github.com/google/googletest
googlemock/include/gmock/gmock-actions.h
//===--- SILMoveOnlyDeinit.h ----------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2022 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/SIL/SILMoveOnlyDeinit.h
#!/usr/bin/env python3.5 """ PACE TODO: * model training/testing * more models (technically) * multithreading """ import sys import os import argparse import hashlib import typing from enforce import runtime_validation as types from tqdm import tqdm import numpy as np import numpy.linalg as linal...
unknown
codeparrot/codeparrot-clean
from decimal import Decimal as D from django.test import TestCase from oscar.apps.offer import models from oscar.test.basket import add_product, add_products from oscar.test import factories class TestACountConditionWithPercentageDiscount(TestCase): def setUp(self): range = models.Range.objects.create( ...
unknown
codeparrot/codeparrot-clean
import unittest import requests_mock from alertaclient.api import Client class HeartbeatTestCase(unittest.TestCase): def setUp(self): self.client = Client() self.heartbeat = """ { "heartbeat": { "createTime": "2017-10-02T23:54:05.214Z", "custo...
unknown
codeparrot/codeparrot-clean
from gettext import gettext as _ from pulp.client.commands.criteria import CriteriaCommand from pulp.common import constants DESC_SEARCH = _('searches for repositories on the server') class RepoSearchCommand(CriteriaCommand): """ Searches for repositories using the normal criteria search features """ ...
unknown
codeparrot/codeparrot-clean
''' This illustrates the NonUniformImage class, which still needs an axes method interface; either a separate interface, or a generalization of imshow. ''' from matplotlib.pyplot import figure, show import numpy as np from matplotlib.image import NonUniformImage from matplotlib import cm interp='nearest' x = np.lins...
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
from Screens.Screen import Screen from Plugins.Plugin import PluginDescriptor from enigma import eTPM import sha def bin2long(s): return reduce( lambda x,y:(x<<8L)+y, map(ord, s)) def long2bin(l): res = "" for byte in range(128): res += chr((l >> (1024 - (byte + 1) * 8)) & 0xff) return res def rsa_pub1024(src,...
unknown
codeparrot/codeparrot-clean
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <base href="/" /> <title>Elements</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> </head> <body> <app-root></app-root> </body> </html>
html
github
https://github.com/angular/angular
adev/src/content/examples/elements/src/index.html
# frozen_string_literal: true module ActiveModel # = Active \Model \API # # Includes the required interface for an object to interact with # Action Pack and Action View, using different Active \Model modules. # It includes model name introspections, conversions, translations, and # validations. Besides tha...
ruby
github
https://github.com/rails/rails
activemodel/lib/active_model/api.rb
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright 2019 Google LLC */ #ifndef __LINUX_BLK_CRYPTO_INTERNAL_H #define __LINUX_BLK_CRYPTO_INTERNAL_H #include <linux/bio.h> #include <linux/blk-mq.h> /* Represents a crypto mode supported by blk-crypto */ struct blk_crypto_mode { const char *name; /* name of this m...
c
github
https://github.com/torvalds/linux
block/blk-crypto-internal.h
function setup_mongo_task_generator { if [ ! -f mongo-task-generator ]; then curl -L https://github.com/mongodb/mongo-task-generator/releases/download/v3.5.1/mongo-task-generator --output mongo-task-generator chmod +x mongo-task-generator fi } ## Comment above and uncomment below to test unrele...
unknown
github
https://github.com/mongodb/mongo
evergreen/prelude_mongo_task_generator.sh
#!/usr/bin/env python # Author: Costin Constantin <costin.c.constantin@intel.com> # Copyright (c) 2015 Intel Corporation. # # Contributors: Alex Tereschenko <alext.mkrs@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
unknown
codeparrot/codeparrot-clean
#ifndef SRC_NODE_TASK_RUNNER_H_ #define SRC_NODE_TASK_RUNNER_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "node_internals.h" #include "simdjson.h" #include "spawn_sync.h" #include "uv.h" #include <filesystem> #include <optional> #include <string_view> #include <tuple> namespace node::task_run...
c
github
https://github.com/nodejs/node
src/node_task_runner.h
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import loggi...
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\Tests\Functional\Bundle\SecuredPageBundle\...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/SecuredPageBundle/Controller/AdminController.php
#coding:utf-8 #author 'sai' import xadmin from xadmin import widgets from xadmin.views import LoginView,BaseAdminView,BaseAdminPlugin, ModelFormAdminView, \ DetailAdminView,ModelAdminView,ListAdminView,CreateAdminView,UpdateAdminView from django.contrib.auth import login,authenticate from django.contrib.auth.models...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, division, print_function import os, struct, sys, time from serial import Serial from serial import SerialException from builtins import range from . import ispBase, intelHex class Stk500v2(ispBase.IspBase): def __init__(self): self.serial = None self.seq = 1 self.lastAd...
unknown
codeparrot/codeparrot-clean
from collections import defaultdict import re from django.utils.translation import ugettext_noop import os import yaml def load_custom_commcare_settings(): path = os.path.join(os.path.dirname(__file__), 'static', 'app_manager', 'json') settings = [] with open(os.path.join(path, '...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/test/java/org/springframework/context/annotation/ConfigurationWithFactoryBeanAndAutowiringTests.java
# Copyright (c) 2009 Bea Lam. All rights reserved. # # This file is part of LightBlue. # # LightBlue 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 l...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #-*- coding:utf-8 -*- # # Copyright (C) 2010 - Jens Knutson <jens.knutson at gmail dot com> # This software is licensed under the GNU General Public License # version 3 or later (see the file COPYING). """Misc. app-wide constants.""" from __future__ import absolute_import, division, print_function...
unknown
codeparrot/codeparrot-clean
/** * This is the style sheet for customized colors of scikit-learn. * Tints and shades are generated by https://colorkit.co/color-shades-generator/ * * This file is compiled into styles/colors.css by sphinxcontrib.sass, see: * https://sass-lang.com/guide/ */ :root { /* scikit-learn cyan */ --sk-cyan-tint-9:...
unknown
github
https://github.com/scikit-learn/scikit-learn
doc/scss/colors.scss
/* Copyright 2014 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/kubelet/prober/prober.go
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2011 Patrick Crews # # # 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 Softwar...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- '''common mavproxy utility functions''' import math import os # Some platforms (CYGWIN and others) many not have this library has_wxpython = False try: import wx has_wxpython = True except ImportError, e: pass radius_of_earth = 6378100.0 # in meters def gps_...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/zh/task_summary.md
# -*- coding: utf-8 -*- """ ================================================================ Convert a radial velocity to the Galactic Standard of Rest (GSR) ================================================================ Radial or line-of-sight velocities of sources are often reported in a Heliocentric or Solar-syst...
unknown
codeparrot/codeparrot-clean
scrape_config_files: - scrape_config_files.good.yml
unknown
github
https://github.com/prometheus/prometheus
config/testdata/scrape_config_files_only.good.yml
/* * 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.darwin.internal import io.ktor.http.* import io.ktor.util.* import platform.Foundation.* internal fun Url.toNSUrl(): NSURL { val userEncoded = encodedUser.o...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-darwin/darwin/src/io/ktor/client/engine/darwin/internal/DarwinUrlUtils.kt
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Handle version information related to Visual Stuio.""" import errno import os import re import subprocess import sys import gyp import glob class VisualStudio...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2013 Hewlett-Packard Development Company, L.P. # Copyright 2011-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....
unknown
codeparrot/codeparrot-clean
from django.core.urlresolvers import reverse from django.shortcuts import redirect import mock from mock import patch from nose.tools import eq_, ok_ from remo.base.tests import RemoTestCase, requires_permission from remo.featuredrep.models import FeaturedRep from remo.featuredrep.tests import FeaturedRepFactory from...
unknown
codeparrot/codeparrot-clean
""" ====================== Fig Axes Labels Simple ====================== """ import numpy as np import matplotlib.pyplot as plt # nodebox section if __name__ == '__builtin__': # were in nodebox import os import tempfile W = 800 inset = 20 size(W, 600) plt.cla() plt.clf() plt.close(...
unknown
codeparrot/codeparrot-clean
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
unknown
codeparrot/codeparrot-clean
import tempfile import os from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from mrec.testing import get_random_coo_matrix from mrec.testing import assert_sparse_matrix_equal from mrec.sparse import loadtxt from mrec.sparse import savez from mrec.sparse import loadz f...
unknown
codeparrot/codeparrot-clean
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2013 Contributor # # 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 t...
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/sensors/__init__.py