code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
"""
=======================
BRIEF binary descriptor
=======================
This example demonstrates the BRIEF binary description algorithm.
The descriptor consists of relatively few bits and can be computed using
a set of intensity difference tests. The short binary descriptor results
in low memory footprint and ve... | unknown | codeparrot/codeparrot-clean | ||
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
#
# 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 you... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Subtitle Decoder
Uses some library files from
http://xbmc-addon-repository.googlecode.com
Thanks!
"""
# import lxml
import os.path
import re
import shutil
import sys
#import HTMLParser
import altfuncs
from bs4 import BeautifulSoup
from crunchyDec import CrunchyDec
from u... | unknown | codeparrot/codeparrot-clean | ||
# OData Python Client and Server Libraries ver. 1.0.0
# Copyright (c) Microsoft Corporation
# All rights reserved.
# MIT License
# 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 res... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
module FooHelper
redefine_method(:baz) { }
end | ruby | github | https://github.com/rails/rails | actionpack/test/fixtures/alternate_helpers/foo_helper.rb |
/*
Copyright 2019 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/controller/ttlafterfinished/config/v1alpha1/doc.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 u... | unknown | codeparrot/codeparrot-clean | ||
//===--- RangeContains.swift ----------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2024 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.... | swift | github | https://github.com/apple/swift | benchmark/single-source/RangeContains.swift |
# UrbanFootprint v1.5
# Copyright (C) 2017 Calthorpe Analytics
#
# This file is part of UrbanFootprint version 1.5
#
# UrbanFootprint is distributed under the terms of the GNU General
# Public License version 3, as published by the Free Software Foundation. This
# code is distributed WITHOUT ANY WARRANTY, without impli... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-boot | core/spring-boot/src/test/java/org/springframework/boot/TestApplicationEnvironment.java |
# 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.
"""Top-level presubmit script for Blink.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmi... | 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-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectMetadata.java |
# -*- coding: utf-8 -*-
"""
***************************************************************************
LinesIntersection.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*********************... | unknown | codeparrot/codeparrot-clean | ||
// This file was automatically generated from flow.md by Knit tool. Do not edit.
package kotlinx.coroutines.guide.exampleFlow21
import kotlinx.coroutines.*
import kotlinx.coroutines.flow.*
fun main() = runBlocking<Unit> {
val nums = (1..3).asFlow().onEach { delay(300) } // numbers 1..3 every 300 ms
val strs =... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/jvm/test/guide/example-flow-21.kt |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
class _Reasons(object):
BACKEND_MISSING_INTERFACE = object()
UNSU... | unknown | codeparrot/codeparrot-clean | ||
#########
# Copyright (c) 2015 GigaSpaces Technologies Ltd. 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... | unknown | codeparrot/codeparrot-clean | ||
import unittest
class TestEquality(object):
"""Used as a mixin for TestCase"""
# Check for a valid __eq__ implementation
def test_eq(self):
for obj_1, obj_2 in self.eq_pairs:
self.assertEqual(obj_1, obj_2)
self.assertEqual(obj_2, obj_1)
# Check for a valid __ne__ imple... | python | github | https://github.com/python/cpython | Lib/test/test_unittest/support.py |
#!/usr/bin/env python
"""Porter Stemming Algorithm
This is the Porter stemming algorithm, ported to Python from the
version coded up in ANSI C by the author. It may be be regarded
as canonical, in that it follows the algorithm presented in
Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
no. 3, pp 1... | 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 | ||
# A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API.
#
# This is used for generating API documentation and the types used by the
# client/server. See api/README.md for more information.
#
# Some style notes:
# - This file is used by ReDoc, which allows GitHub Flavored Markdown in
# descriptions.
# - There i... | unknown | github | https://github.com/moby/moby | api/docs/v1.49.yaml |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
/** @typedef {import("../Compilation")} Compilation */
class GetFullHashRuntimeModule extends RuntimeModule {
constructor() {
... | javascript | github | https://github.com/webpack/webpack | lib/runtime/GetFullHashRuntimeModule.js |
# 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 u... | unknown | github | https://github.com/apache/airflow | .github/actions/breeze/action.yml |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'pending.ui'
#
# Created by: PyQt5 UI code generator 5.7.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_PendingWidget(object):
def setupUi(self, PendingWidget):
Pen... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
flask.testsuite.helpers
~~~~~~~~~~~~~~~~~~~~~~~
Various helpers.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
import flask
import unittest
from logging import StreamHandler
from flask.testsuite import FlaskTestCase,... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2012 OpenStack Foundation
# 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 requ... | unknown | codeparrot/codeparrot-clean | ||
"""
Copyright 2017 Oliver Smith
This file is part of pmbootstrap.
pmbootstrap is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pmbootstrap ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_b... | unknown | codeparrot/codeparrot-clean | ||
//===- bolt/Profile/DataAggregator.h - Perf data aggregator -----*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | c | github | https://github.com/llvm/llvm-project | bolt/include/bolt/Profile/DataAggregator.h |
"""
[Amun - low interaction honeypot]
Copyright (C) [2014] [Jan Goebel]
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 ... | unknown | codeparrot/codeparrot-clean | ||
import urllib2
import urllib
import json
import subprocess
def genAllCodes():
base_url = "http://query.yahooapis.com/v1/public/yql?format=json&env=store%3A%2F%2F\
datatables.org%2Falltableswithkeys&q="
codes = []
for industry in range(110, 137):
print "Industry: {}".format(industry)
query =... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os_test
import (
"bytes"
"internal/poll"
"io"
"net"
. "os"
"strconv"
"syscall"
"testing"
)
func TestSendFile(t *testing.T) {
sizes := []int{
... | go | github | https://github.com/golang/go | src/os/writeto_linux_test.go |
# Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""Factory functions for symmetric cryptography."""
import os
from tlslite.utils import python_aes
from tlslite.utils import python_aesgcm
from tlslite.utils import python_rc4
from tlslite.utils import cryptomath
tripl... | unknown | codeparrot/codeparrot-clean | ||
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("auth", "0011_update_proxy_permissions"),
]
operations = [
migrations.AlterField(
model_name="user",
name="first_name",
field=models.CharField(
... | python | github | https://github.com/django/django | django/contrib/auth/migrations/0012_alter_user_first_name_max_length.py |
import os
import random
import fnmatch
import re
import glob
import zipfile
import json
from thlib.environment import env_mode, env_server, env_inst
if env_mode.py3:
import urllib as urllib2
else:
import urllib2
import thlib.global_functions as gf
# import thlib.tactic_classes as tc
def get_version(major=0, mi... | 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 (t... | unknown | codeparrot/codeparrot-clean | ||
import { test } from '../../test';
export default test({
test({ assert, window }) {
assert.equal(window.document.title, '');
}
}); | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/head-title-empty/_config.js |
import logging
from django.contrib.sessions.backends.base import CreateError, SessionBase
from django.core.exceptions import SuspiciousOperation
from django.db import IntegrityError, router, transaction
from django.utils import timezone
from django.utils.encoding import force_text
from django.utils.functional import c... | unknown | codeparrot/codeparrot-clean | ||
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage 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,... | unknown | codeparrot/codeparrot-clean | ||
from numpy import zeros, asarray, eye, poly1d, hstack, r_
from scipy import linalg
__all__ = ["pade"]
def pade(an, m, n=None):
"""
Return Pade approximation to a polynomial as the ratio of two polynomials.
Parameters
----------
an : (N,) array_like
Taylor series coefficients.
m : int
... | 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 applica... | unknown | codeparrot/codeparrot-clean | ||
import unittest, random, time, sys, string
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_browse as h2b
print "Not sure if we'll need quotes around these time formats"
def a0(epochTime): return time.asctime(epochTime)
def a1(epochTime): return time.strftime("%c... | unknown | codeparrot/codeparrot-clean | ||
"""
Mostly deprecated clustering and data structural analysis routines.
"""
from typing import Tuple
import numpy as np
from matplotlib import pyplot as plt
from scipy import sparse as spmat
from bioflow.annotation_network.knowledge_access_analysis import ref_param_set, \
get_go_interface_instance
from bioflow.... | unknown | codeparrot/codeparrot-clean | ||
"""
This module contains a custom dialog class used to personalize the appearance of a
L{FlatMenu} on the fly, allowing also the user of your application to do the same.
"""
import wx
from UserDict import UserDict
from artmanager import ArtManager
from fmresources import *
from labelbook import LabelBook
_ = wx.GetT... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2014 PerfKitBenchmarker 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 appli... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import optparse
import sys
import os
sys.path.insert(0, "bin/python")
import samba
samba.ensure_external_module("testtools", "testtools")
samba.ensure_external_module("subunit", "subunit/python")
import samba.getopt as options
from samba.auth import system_session
from ... | unknown | codeparrot/codeparrot-clean | ||
/*
Copyright 2018 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/kubeadm/app/apis/kubeadm/fuzzer/fuzzer_test.go |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package command
import (
"strings"
"testing"
"github.com/hashicorp/cli"
)
func testOperatorSealCommand(tb testing.TB) (*cli.MockUi, *OperatorSealCommand) {
tb.Helper()
ui := cli.NewMockUi()
return ui, &OperatorSealCommand{
BaseCommand: ... | go | github | https://github.com/hashicorp/vault | command/operator_seal_test.go |
from functools import partial
import math
import actions
from actions import _get_as_str
import call_definitions
from call_definitions import xpcom_constructor as xpcom_const, python_wrap
from entity_values import entity
import instanceactions
from jstypes import JSWrapper
from validator.compat import FX47_DEFINITION
... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python
# CMSIS-DAP Interface Firmware
# Copyright (c) 2009-2014 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | unknown | codeparrot/codeparrot-clean | ||
import os
import unittest
from mako import compat
from mako import exceptions
from mako import lookup
from mako import runtime
from mako.template import Template
from mako.util import FastEncodingBuffer
from test import assert_raises_message
from test import eq_
from test import template_base
from test.util import res... | 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/ToolRunner.java |
#!/usr/bin/env python
#
# Copyright 2017 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 o... | unknown | codeparrot/codeparrot-clean | ||
-- the sieve of of Eratosthenes programmed with coroutines
-- typical usage: lua -e N=1000 sieve.lua | column
-- generate all the numbers from 2 to n
function gen (n)
return coroutine.wrap(function ()
for i=2,n do coroutine.yield(i) end
end)
end
-- filter the numbers generated by `g', removing multiples of `p... | unknown | github | https://github.com/redis/redis | deps/lua/test/sieve.lua |
from Screen import Screen
from Components.ConfigList import ConfigListScreen
from Components.ActionMap import NumberActionMap
from Components.config import config, getConfigListEntry, ConfigNothing, NoSave, configfile
from Components.Sources.StaticText import StaticText
from Screens.MessageBox import MessageBox
from S... | unknown | codeparrot/codeparrot-clean | ||
from win32com.shell import shell, shellcon
import win32api
import os
def testSHFileOperation(file_cnt):
temp_dir=os.environ['temp']
orig_fnames=[win32api.GetTempFileName(temp_dir,'sfo')[0] for x in range(file_cnt)]
new_fnames=[os.path.join(temp_dir,'copy of '+os.path.split(orig_fnames[x])[1]) for x in rang... | unknown | codeparrot/codeparrot-clean | ||
"""SCons.Platform.win32
Platform-specific initialization for Win32 systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201... | unknown | codeparrot/codeparrot-clean | ||
from typing import TYPE_CHECKING, Any
from langchain_core.document_loaders import Blob, BlobLoader
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.document_loaders import (
FileSystemBlobLoader,
YoutubeAudioLoader,
)
# Create a way to dynamically... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/langchain_classic/document_loaders/blob_loaders/__init__.py |
{
"headers": [
{
"source": "/fonts/(.*).woff2",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
}
]
}
]
} | json | github | https://github.com/facebook/react | compiler/apps/playground/vercel.json |
# -*- coding: utf-8 -*-
import openerp.modules.registry
import openerp
from openerp.tests import common
from openerp.tools.misc import mute_logger
def ok(n):
""" Successful import of ``n`` records
:param int n: number of records which should have been imported
"""
return n, 0, 0, 0
def error(row, me... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# (c) 2018, Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | unknown | codeparrot/codeparrot-clean | ||
#
# ElementTree
# $Id: ElementInclude.py 3375 2008-02-13 08:05:08Z fredrik $
#
# limited xinclude support for element trees
#
# history:
# 2003-08-15 fl created
# 2003-11-14 fl fixed default loader
#
# Copyright (c) 2003-2004 by Fredrik Lundh. All rights reserved.
#
# fredrik@pythonware.com
# http://www.pythonware... | python | github | https://github.com/python/cpython | Lib/xml/etree/ElementInclude.py |
# 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
# d... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | python | github | https://github.com/tensorflow/tensorflow | tensorflow/compiler/tests/special_math_test.py |
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "v0alpha1.timeseries-thresholds.v42"
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"query": {
"kind": "DataQuery",
"group": "",
... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/panel-timeseries/v0alpha1.timeseries-thresholds.v42.v2beta1.json |
package org.pytorch;
import com.facebook.soloader.nativeloader.NativeLoader;
public class PyTorchCodegenLoader {
public static void loadNativeLibs() {
try {
NativeLoader.loadLibrary("torch-code-gen");
} catch (Throwable t) {
// Loading the codegen lib is best-effort since it's only there for qu... | java | github | https://github.com/pytorch/pytorch | android/pytorch_android/src/main/java/org/pytorch/PyTorchCodegenLoader.java |
# 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 | ||
version: 2.0.0
filters:
- "*":
approvers:
- 10gen/devprod-build
- "jstest_timeout*":
approvers:
- 10gen/devprod-correctness
- "verify_resmoke_coredump_test.sh":
approvers:
- 10gen/devprod-correctness | unknown | github | https://github.com/mongodb/mongo | buildscripts/bazel_testbuilds/OWNERS.yml |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/i2c-mt65xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MediaTek I2C controller
description:
This driver interfaces with the native I2C controller present in
various MediaTek SoCs.... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml |
# -*- coding: utf-8 -*-
# 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 "Lic... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/qcom,sm7150-videocc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Video Clock & Reset Controller on SM7150
maintainers:
- Danila Tikhonov <danila@jiaxyga.com>
- David Wro... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/clock/qcom,sm7150-videocc.yaml |
"""Definitions for the `Line` class."""
import numexpr as ne
import numpy as np
from astropy import constants as c
from astropy import units as u
from mosfit.modules.seds.sed import SED
from mosfit.constants import SQRT_2_PI
# Important: Only define one ``Module`` class per file.
class Line(SED):
"""Line spectral... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
"""
import json
import textwrap
import intelmq.lib.harmonization
from intelmq import HARMONIZATION_CONF_FILE
print("""
Harmonization field names
=========================
|Section|Name|Type|Description|
|:------|:---|:---|:----------|""")
with open(HARMONIZATION_CO... | unknown | codeparrot/codeparrot-clean | ||
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from time import time
from datetime import datetime
import struct
import os
import socket
import logging
log = logging.getLogger(__name__)
# default protocol version before negotiation
proto_version = 3
class CellError(Exception):
... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
u"""Test slugify."""
from __future__ import unicode_literals
import nikola.utils
def test_ascii():
"""Test an ASCII-only string."""
o = nikola.utils.slugify(u'hello', lang='en')
assert o == u'hello'
assert isinstance(o, nikola.utils.unicode_str)
def test_ascii_dash():
"""... | unknown | codeparrot/codeparrot-clean | ||
# This file is part of the Printrun suite.
#
# Printrun is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Printrun is distributed in ... | 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 'CurriculumVitae.show_contact_number'
db.add_column('base_curriculumvitae', 'show_contact_number', ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
Strongly connected components.
"""
# Copyright (C) 2004-2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
__authors__ = "\n".join(['Eben Kenah',
... | unknown | codeparrot/codeparrot-clean | ||
import json
from coalib.bearlib.abstractions.Lint import Lint
from coalib.bears.LocalBear import LocalBear
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY
from coalib.results.Result import Result
class DockerfileLintBear(LocalBear, Lint):
executable = 'dockerfile_lint'
arguments = '--json -f'
s... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Implement DNS inclusion proof checking, see [TBD].
#
# Unfortunately, getting at the SCTs in general is hard in Python, so this
# does not start with an SSL connection, but instead fetches a log entry by
# index and then verifies the proof over DNS.
# You will need to install DNSPython (http:/... | unknown | codeparrot/codeparrot-clean | ||
"""Unit tests for memory-based file-like objects.
StringIO -- for unicode strings
BytesIO -- for bytes
"""
from __future__ import unicode_literals
from __future__ import print_function
import unittest
from test import test_support as support
import io
import _pyio as pyio
import pickle
class MemorySeekTestMixin:
... | 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/MachO/MainCommand.hpp |
/* Copyright (c) 2021, 2025, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is designed to work with certain software (including... | c | github | https://github.com/mysql/mysql-server | include/manifest.h |
# General utilities for MAPI and MAPI objects.
# We used to use these old names from the 'types' module...
TupleType=tuple
ListType=list
IntType=int
from pywintypes import TimeType
import pythoncom
import mapi, mapitags
prTable = {}
def GetPropTagName(pt):
if not prTable:
for name, value in mapitags.__dict__.iterit... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
"""Postapocalyptic Zombiegame
1. Implement Fight Concept
2. Add Equipment (Armor, Weapons) + Health + Stamina
3. Add GameState and get rid of globals
4. First attempt at classes, don't judge ;)
5. sketch of a fight system:
http://inventwithpython.c... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import unittest
import random
import subprocess
from pattern import text
from pattern import en
try:
PATH = os.path.dirname(os.path.realpath(__file__))
except:
PATH = ""
#--------------------------------... | 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/pages/Variables/ManageVariable/AddVariableButton.tsx |
# Copyright 2008-2009 WebDriver committers
# Copyright 2008-2009 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 requ... | unknown | codeparrot/codeparrot-clean | ||
# pylint: skip-file
# flake8: noqa
class Edit(OpenShiftCLI):
''' Class to wrap the oc command line tools
'''
# pylint: disable=too-many-arguments
def __init__(self,
kind,
namespace,
resource_name=None,
kubeconfig='/etc/origin/master/ad... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2008 Doug Hellmann All rights reserved.
#
"""Using a Condition to control sequencing between workers.
"""
#end_pymotw_header
import multiprocessing
import time
def stage_1(cond):
"""perform first stage of work, then notify stage_2 to continue"""
name = ... | unknown | codeparrot/codeparrot-clean | ||
from unittest.mock import call, Mock, patch
from alexa_client.refreshtoken import http_server, handlers
@patch.object(handlers.AmazonAlexaServiceLoginHandler, '__init__',
return_value=None)
@patch.object(http_server.AmazonLoginHttpServer, 'server_bind', Mock)
def test_http_server_passes_args(mock__init_... | unknown | codeparrot/codeparrot-clean | ||
"""
articles module (imdb package).
This module provides functions and data to handle in a smart way
articles (in various languages) at the beginning of movie titles.
Copyright 2009 Davide Alberani <da@erlug.linux.it>
2009 H. Turgut Uyar <uyar@tekir.org>
This program is free software; you can redistribute... | unknown | codeparrot/codeparrot-clean | ||
#
#
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2012, 2013 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later versi... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2008 Fred Gansevles <fred@betterbe.com>
#
# This file is part of rdiff-backup.
#
# rdiff-backup is free software; you can redistribute it and/or modify
# 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) a... | unknown | codeparrot/codeparrot-clean | ||
/*
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 | pkg/controller/volume/persistentvolume/pv_controller_test.go |
/// This file implements Knuth-Bendix completion and the normal form algorithm.
enum RewritingError: Error {
case tooManyRounds
case tooManyRules
case tooManyNodes
case ruleTooLong
case tooManySteps
case reducedWordTooLong
}
let debug = false
func log(_ str: @autoclosure () -> String) {
if debug {
... | swift | github | https://github.com/apple/swift | benchmark/multi-source/Monoids/RewritingSystem.swift |
#include <torch/library.h>
TORCH_LIBRARY_IMPL(_, BackendSelect, m) {
m.fallback(torch::CppFunction::makeFallthrough());
} | cpp | github | https://github.com/pytorch/pytorch | aten/src/ATen/core/BackendSelectFallbackKernel.cpp |
from django.db import models
from django.core.validators import MinValueValidator
class Company(models.Model):
"""Describes a company/organization participating or interested in D-Dagen"""
def __str__(self):
return self.name + ": " + self.area_of_business
# filled in by company
AREA_OF_BUSINE... | unknown | codeparrot/codeparrot-clean | ||
import { expect, it } from 'vitest'
import { segment } from './segment'
it('should result in a single segment when the separator is not present', () => {
expect(segment('foo', ':')).toEqual(['foo'])
})
it('should split by the separator', () => {
expect(segment('foo:bar:baz', ':')).toEqual(['foo', 'bar', 'baz'])
}... | typescript | github | https://github.com/tailwindlabs/tailwindcss | packages/tailwindcss/src/utils/segment.test.ts |
#!/usr/bin/env bash
# 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 applica... | unknown | github | https://github.com/kubernetes/kubernetes | build/lib/release.sh |
name: Self-hosted runner scale set (AMD mi355 scheduled CI caller)
# Note: For every job in this workflow, the name of the runner scale set is finalized in the runner yaml i.e. huggingface/hf-workflows/.github/workflows/transformers_amd_ci_scheduled_arc_scale_set.yaml
# For example, 1gpu : amd-mi355-ci-1gpu
# ... | unknown | github | https://github.com/huggingface/transformers | .github/workflows/self-scheduled-amd-mi355-caller.yml |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.