code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
#VERSION: 2.16
#AUTHORS: Diego de las Heras (diegodelasheras@gmail.com)
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
/*-------------------------------------------------------------------------
*
* pg_trigger.h
* definition of the "trigger" system catalog (pg_trigger)
*
*
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/inc... | c | github | https://github.com/postgres/postgres | src/include/catalog/pg_trigger.h |
""" Python Character Mapping Codec for CP858, modified from cp850.
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors='strict'):
return codecs.charmap_decod... | unknown | codeparrot/codeparrot-clean | ||
"""test_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Cla... | 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 | ||
"""
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
import logging
from sleekxmpp.stanza import Message
from sleekxmpp.xmlstream import register_stanza_plugin
from sleekxmpp.xmls... | unknown | codeparrot/codeparrot-clean | ||
use serde_derive::Serialize;
#[derive(Serialize)]
#[serde(from = "u64", try_from = "u64")]
struct S {
a: u8,
}
fn main() {} | rust | github | https://github.com/serde-rs/serde | test_suite/tests/ui/conflict/from-try-from.rs |
#!/usr/bin/python
# SWD adapter for the Nucon NUC1XX series.
__author__ = 'Pascal Hahn <ph@lxd.bz>'
import struct
import SWDCommon
class Error(Exception):
pass
class NotReadyForCommandException(Error):
pass
class UnlockFailedException(Error):
pass
class FlashDataInvalid(Error):
pass
class FlashA... | unknown | codeparrot/codeparrot-clean | ||
"""Contains the Player class which represents a player in a pinball game."""
import copy
import logging
from mpf.core.utility_functions import Util
class Player:
"""Base class for a player in a game.
One instance of this class is automatically created for each player.
The game mode maintains a ``player... | unknown | codeparrot/codeparrot-clean | ||
<% (1..5).each do |id| %>
vertex_<%= id %>:
id: <%= id %>
<% end %> | unknown | github | https://github.com/rails/rails | activerecord/test/fixtures/vertices.yml |
import os
import numpy as np
from uncertainties.unumpy import uarray
import data
import helpers as hel
import plot_helpers as plot
import main as m
import functions as f
import matplotlib as mpl
import matplotlib.pyplot as plt
#plot.plot(range(len(m.q)),m.q, "Teilchennummer","Ladung","../plots/ladung.pdf", None)
#p... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
This module manages placeholder caching. We use a cache-versioning strategy
in which each (placeholder x lang x site_id) manages its own version. The
actual cache includes additional keys appropriate for the placeholders
get_vary_cache_on().
Invalidation of a placeholder's cache simply inc... | 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 * as Diff from "diff";
import fs from "fs";
import pathModule from "path";
import * as compiler from "./_namespaces/compiler.js";
import * as documents from "./_namespaces/documents.js";
import * as fakes from "./_namespaces/fakes.js";
import {
RunnerBase,
TypeWriterResult,
TypeWriterWalker,
} from "... | typescript | github | https://github.com/microsoft/TypeScript | src/harness/harnessIO.ts |
"""
Enrollment API for creating, updating, and deleting enrollments. Also provides access to enrollment information at a
course level, such as available course modes.
"""
from django.utils import importlib
import logging
from django.conf import settings
from django.core.cache import cache
from enrollment import errors... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# 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, eith... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import print_function
O=Omega()
from yade import plot, pack,utils,ymport
#### controling parameters
packing='parallellepiped_10_persistentPlane30Deg'
smoothContact=True
jointFrict=radians(20)
jointDil=radians(0)
output='jointDip30_jointFrict20'
maxIter=10000
#### Import of the... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
import sys
def generate_tag( ref, xml=False ):
ref_name, match = ref
return "<link rel='"+ ["mismatch","match"][match] + "' href='" + ref_name + "'"+ [">"," />"][xml]
def find_refs(reftest_list):
tests = {}
for entry in reftest_list:
if entry.strip() == '':
continue
split_entry = entry.sp... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
"""
Runs one boundary algorithm and a label algorithm on a specified audio file or
dataset.
"""
import argparse
import logging
import os
import time
# MSAF import
import msaf
def main():
"""Main function to parse the arguments and call the main process."""
parser = argparse.ArgumentPars... | unknown | codeparrot/codeparrot-clean | ||
---
title: Markdown 101
permalink: /docs/markdown-101/
---
# TO WRITE | unknown | github | https://github.com/jekyll/jekyll | docs/_docs/markdown-101.md |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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 'OrganizationMember.role'
db.add_column('sentry_organizatio... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <assert.h>
#include <fxdiv.h>
#include <qnnpack/u8lut32norm.h>
static inline uint32_t com... | c | github | https://github.com/pytorch/pytorch | aten/src/ATen/native/quantized/cpu/qnnpack/src/u8lut32norm/scalar.c |
/***************************************************************************************************
* Copyright (c) 2017 - 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are p... | c | github | https://github.com/pytorch/pytorch | aten/src/ATen/native/cuda/cutlass_extensions/gemm/threadblock/dq_mma_multistage.h |
from lepl.stream.core import DUMMY_HELPER, s_next
# The contents of this file are subject to the Mozilla Public License
# (MPL) Version 1.1 (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.mozilla.org/MPL/
#
# Software distributed ... | unknown | codeparrot/codeparrot-clean | ||
## Input
```javascript
import invariant from 'invariant';
import {makeObject_Primitives, mutate, sum, useIdentity} from 'shared-runtime';
/**
* Here, `z`'s original memo block is removed due to the inner hook call.
* However, we also infer that `z` is non-reactive, so by default we would create
* the memo block fo... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-invalid-pruned-scope-leaks-value-via-alias.expect.md |
assert_equal %q{1}, %q{
1.times{
begin
a = 1
ensure
foo = nil
end
}
}
assert_equal %q{2}, %q{
[1,2,3].find{|x| x == 2}
}
assert_equal %q{2}, %q{
class E
include Enumerable
def each(&block)
[1, 2, 3].each(&block)
end
end
E.new.find {|x| x == 2 }
}
assert_equal %q{6},... | ruby | github | https://github.com/ruby/ruby | bootstraptest/test_block.rb |
/*
* Copyright (c) 2009-2011, Salvatore Sanfilippo <antirez at gmail dot com>
* Copyright (c) 2010-2011, Pieter Noordhuis <pcnoordhuis at gmail dot com>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... | c | github | https://github.com/redis/redis | deps/hiredis/read.h |
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of... | unknown | github | https://github.com/twbs/bootstrap | CODE_OF_CONDUCT.md |
use super::prelude::*;
pub(crate) struct AsPtrParser;
impl<S: Stage> NoArgsAttributeParser<S> for AsPtrParser {
const PATH: &[Symbol] = &[sym::rustc_as_ptr];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::F... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_attr_parsing/src/attributes/lint_helpers.rs |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import itertools
import json
from telemetry.internal.results import output_formatter
from telemetry.value import summary as summary_modul... | unknown | codeparrot/codeparrot-clean | ||
from sedot import Package, NoPackageError
from sedot import SEDOT_CONFIG
import os
import time
import shutil
class Generator:
def __init__(self, outdir):
self.outdir = outdir
self.report_name = "Status"
self.output_file = "index.html"
global SEDOT_CONFIG
self.name = SEDOT_CONFIG.get('MIRROR_NAME', None)
... | 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/requests/RequestAndSize.java |
{
"Id": "sha256:44cc64492fb6a6d78d3e6d087f380ae6e479aa1b2c79823b32cdacfcc2f3d715",
"RepoTags": [
"paketo-buildpacks/cnb:base",
"paketo-buildpacks/builder:base-platform-api-0.2"
],
"RepoDigests": [
"paketo-buidpacks/cnb@sha256:5b03a853e636b78c44e475bbc514e2b7b140cc41cca8ab907e9753431ae8c0b0"
],
"Parent": "",... | json | github | https://github.com/spring-projects/spring-boot | buildpack/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/image-with-no-run-image-tag.json |
#!/usr/bin/env python
# Copyright 2011 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... | 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 | ||
###
# Imports
###
from __future__ import unicode_literals
from slackclient import SlackClient
import yaml
###
# Classes
###
class Command:
def __init__(self, name, function, num_args=0):
self.name = name
self.function = function
self.num_args = num_args
class Player:
def __init__(se... | unknown | codeparrot/codeparrot-clean | ||
from aiohttp import web
import json
import os
from model import *
from data_reader import DataReader
from vocab import Vocab
from tensor_generator import TensorGenerator
from download_data import OPEN_CORPORA_DEST_FILE
def init():
global loader, vocab, tensor_generator
loader = DataReader(OPEN_CORPORA_DEST_FI... | 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/apps/v1beta1/zz_generated.validations.go |
#!/usr/bin/env python
#
# Copyright (C) 2014 Google Inc.
#
# 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
# (at your option) any later version.
#
# YouCompl... | unknown | codeparrot/codeparrot-clean | ||
"use strict";
module.exports = (globalTimeout = 2000, nameSuffix = "") => {
const state = global.JEST_STATE_SYMBOL;
let currentDescribeBlock;
let currentlyRunningTest;
let runTests = -1;
const disposables = [];
// this function allows to release memory in fn context
// manually, usually after the suite has bee... | javascript | github | https://github.com/webpack/webpack | test/helpers/createLazyTestEnv.js |
"""A PEP 517 interface to setuptools
Previously, when a user or a command line tool (let's call it a "frontend")
needed to make a request of setuptools to take a certain action, for
example, generating a list of installation requirements, the frontend would
would call "setup.py egg_info" or "setup.py bdist_wheel" on t... | unknown | codeparrot/codeparrot-clean | ||
#########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# 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
#... | unknown | codeparrot/codeparrot-clean | ||
"""Support for Twente Milieu sensors."""
import logging
from typing import Any, Dict
from twentemilieu import (
WASTE_TYPE_NON_RECYCLABLE,
WASTE_TYPE_ORGANIC,
WASTE_TYPE_PAPER,
WASTE_TYPE_PLASTIC,
TwenteMilieu,
TwenteMilieuConnectionError,
)
from homeassistant.components.twentemilieu.const imp... | unknown | codeparrot/codeparrot-clean | ||
package conversion
import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"strings"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"k8s.io/apimachinery/pkg/runtime"
dashv2alpha1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1"
dashv2beta1 "github.c... | go | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/v2beta1_to_v2alpha1_test.go |
# -*- coding: utf-8 -*-
from .common import KARMA, TestForumCommon
from ..models.forum import KarmaError
from openerp.exceptions import Warning, AccessError
from openerp.tools import mute_logger
class TestForum(TestForumCommon):
@mute_logger('openerp.addons.base.ir.ir_model', 'openerp.models')
def test_ask(s... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2009-2014 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman 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 you... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks 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 | ||
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=W0401,W0614
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class SkiaBuildbotDeskto... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# ESP8266 ROM Bootloader Utility
# https://github.com/themadinventor/esptool
#
# Copyright (C) 2014 Fredrik Ahlberg
#
# 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; eith... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2022 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package backup
import (
"context"
"net/url"
"sort"
"time"
"github.com/cockroachdb/cockroach/pkg/backup/backupdest"
"github.com/cockroachdb/cockroach/pkg/cloud"
... | go | github | https://github.com/cockroachdb/cockroach | pkg/backup/backup_telemetry.go |
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal, TypeAlias
__all__ = ["RunStatus"]
RunStatus: TypeAlias = Literal[
"queued",
"in_progress",
"requires_action",
"cancelling",
"cancelled",
"failed",
"completed",
... | python | github | https://github.com/openai/openai-python | src/openai/types/beta/threads/run_status.py |
//// [tests/cases/compiler/aliasOnMergedModuleInterface.ts] ////
//// [aliasOnMergedModuleInterface_0.ts]
declare module "foo"
{
namespace B {
export interface A {
}
}
interface B {
bar(name: string): B.A;
}
export = B;
}
//// [aliasOnMergedModuleInterface_1.ts]
///<referen... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/aliasOnMergedModuleInterface.js |
#
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
# (c) 2017 Red Hat, Inc
#
# Copyright (c) 2016 Dell Inc.
#
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamica... | unknown | codeparrot/codeparrot-clean | ||
#include "test.h"
#include "test2.h"
namespace a {
int Foo::f() {
return 0;
}
int Foo::f2(int a, int b) {
return a + b;
}
} // namespace a | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-move/Inputs/test.cpp |
#ifdef USE_VULKAN_API
#include <ATen/native/vulkan/ops/Common.h>
#include <ATen/native/vulkan/ops/QuantizedFunctions.h>
#include <ATen/native/vulkan/ops/Utils.h>
#include <torch/library.h>
namespace at {
namespace native {
namespace vulkan {
namespace ops {
using namespace api::utils;
static api::ShaderInfo get_quan... | cpp | github | https://github.com/pytorch/pytorch | aten/src/ATen/native/vulkan/ops/QuantizedTensor.cpp |
"""
This module provides support for Twisted to interact with the glib mainloop.
This is like gtk2, but slightly faster and does not require a working
$DISPLAY. However, you cannot run GUIs under this reactor: for that you must
use the gtk2reactor instead.
In order to use this support, simply do the following::
|... | unknown | codeparrot/codeparrot-clean | ||
//===----------------------------------------------------------------------===//
//
// 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 | clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.h |
# File: TscSshLib.py ; This file is part of Twister.
# version: 2.001
#
# Copyright (C) 2012-2013 , Luxoft
#
# Authors:
# Adrian Toader <adtoader@luxoft.com>
#
#
# 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 co... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright 2011 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... | unknown | codeparrot/codeparrot-clean | ||
import platform
import sys
import pytest
import numpy as np
from numpy import (
arange,
array,
dtype,
errstate,
geomspace,
isnan,
linspace,
logspace,
ndarray,
nextafter,
sqrt,
stack,
)
from numpy._core import sctypes
from numpy._core.function_base import add_newdoc
from... | python | github | https://github.com/numpy/numpy | numpy/_core/tests/test_function_base.py |
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2016 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 | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: MPL-2.0
package metricregistry
import (
"testing"
promsink "github.com/hashicorp/go-metrics/compat/prometheus"
"github.com/stretchr/testify/require"
)
var testGauges = []GaugeDefinition{
{
Name: []string{"test_gauge"},
Help: "A test gauge",
},
... | go | github | https://github.com/hashicorp/vault | sdk/helper/metricregistry/metricregistry_test.go |
<?php
namespace Illuminate\Tests\Filesystem;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\LazyCollection;
use Illuminate\Testing\Assert;
use Mockery as m;
use PHPUnit\Framework\Attributes\AfterClass;
use PHPUnit\Framework\Attributes\BeforeClas... | php | github | https://github.com/laravel/framework | tests/Filesystem/FilesystemTest.php |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | unknown | codeparrot/codeparrot-clean | ||
from skybase import schemas
schemas.set_indicators()
#Directory schemas layout of the directories
artiball_schema = [
[[''],['skybase.yaml']],
# [['app'], []],
[['app_config'], ['main_app_config.yaml']],
[['installation'], []],
[['installation', 'chef', 'cookbooks'], []],
[['installation', 'ch... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2009-2010 Reza Lotun http://reza.lotun.name/
# Copyright (c) 2011 Jann Kleen
#
# 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 limitat... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
"""
Allows connection of the uBlox u-Center software to
a uBlox GPS device connected to a PX4 or Pixhawk device,
using Mavlink's SERIAL_CONTROL support to route serial
traffic to/from the GPS, and exposing the data to u-Center
via a local TCP connection.
@author: Matthew Lloyd (github@matthewlloyd.ne... | unknown | codeparrot/codeparrot-clean | ||
from ..Qt import QtGui, QtCore
from .. import functions as fn
import numpy as np
__all__ = ['ArrowItem']
class ArrowItem(QtGui.QGraphicsPathItem):
"""
For displaying scale-invariant arrows.
For arrows pointing to a location on a curve, see CurveArrow
"""
def __init__(self, **opts):
"""
... | unknown | codeparrot/codeparrot-clean | ||
def sum_Natural(n):
sum = (n * (n + 1))
return int(sum)
def sum_Even(l,r):
return (sum_Natural(int(r / 2)) - sum_Natural(int((l - 1) / 2))) | unknown | mbpp | ||
#!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/local/bin/python2.6
#
# This file is part of PerconaFT.
# Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
#
import sys
import os
import optparse
import getpass
import pexpect
import time
from multiprocessing import Process
# options
parser = optparse.OptionParser()
parser.add_opti... | unknown | codeparrot/codeparrot-clean | ||
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
# Also licenced under the Apache License, 2.0: http://opensource.org/licenses/apache2.0.php
# Licensed to PSF under a Contributor Agreement
"""
Middlew... | unknown | codeparrot/codeparrot-clean | ||
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\... | c | github | https://github.com/curl/curl | src/tool_filetime.c |
# 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 2024 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/ko/tasks/image_feature_extraction.md |
/*
* 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/main/java/org/springframework/context/i18n/TimeZoneAwareLocaleContext.java |
import os
from Components.Task import Task, Job, DiskspacePrecondition, Condition, ToolExistsPrecondition
from Components.Harddisk import harddiskmanager
from Screens.MessageBox import MessageBox
class png2yuvTask(Task):
def __init__(self, job, inputfile, outputfile):
Task.__init__(self, job, "Creating menu video"... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
###############################################################################
#
# UpdateItem
# Allows you to add or remove photos and tips from items on user-created lists.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (th... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
import collections
from rest_framework.compat import OrderedDict, unicode_to_repr
class ReturnDict(OrderedDict):
"""
Return object from `serialier.data` for the `Serializer` class.
Includes a backlink to the serializer instance for renderers
to use if they need r... | unknown | codeparrot/codeparrot-clean | ||
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Title: curl_global_sslset
Section: 3
Source: libcurl
See-also:
- curl_global_init (3)
- libcurl (3)
Protocol:
- All
Added-in: 7.56.0
---
# NAME
curl_global_sslset - select SSL backend to use
# SYNOPSIS
~~~c
#include <... | unknown | github | https://github.com/curl/curl | docs/libcurl/curl_global_sslset.md |
# Design a data structure that supports all following operations in average O(1) time.
#
# insert(val): Inserts an item val to the set if not already present.
# remove(val): Removes an item val from the set if present.
# getRandom: Returns a random element from current set of elements. Each element must have the same p... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Matt Martz <matt@sivel.net>
# Copyright (C) 2015 Rackspace US, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of ... | unknown | codeparrot/codeparrot-clean | ||
from typing import Callable, cast
import numpy
from .backends import Ops
from .config import registry
from .types import FloatsXd, Shape
from .util import partial
# TODO: Harmonize naming with Keras, and fill in missing entries
# https://keras.io/initializers/ We should also have He normal/uniform
# and probably lecu... | unknown | codeparrot/codeparrot-clean | ||
"""Given a test name, path to log file and exit code, generate/append an Evergreen report.json."""
import json
import os
import pathlib
from typing import List
import click
from typing_extensions import TypedDict
class Result(TypedDict, total=False):
"""Evergreen test result."""
status: str
exit_code: i... | python | github | https://github.com/mongodb/mongo | buildscripts/simple_report.py |
# -*- coding: utf-8 -*-
from distutils.version import LooseVersion
import django
import os
gettext = lambda s: s
urlpatterns = []
DJANGO_1_3 = LooseVersion(django.get_version()) < LooseVersion('1.4')
def configure(**extra):
from django.conf import settings
os.environ['DJANGO_SETTINGS_MODULE'] = 'filer.test_u... | unknown | codeparrot/codeparrot-clean | ||
"""
===========================================
Robust linear model estimation using RANSAC
===========================================
In this example we see how to robustly fit a linear model to faulty data using
the RANSAC algorithm.
"""
import numpy as np
from matplotlib import pyplot as plt
from sklearn import ... | unknown | codeparrot/codeparrot-clean | ||
## Input
```javascript
function Component(props) {
// x is mutated conditionally based on a reactive value,
// so it needs to be considered reactive
let x = [];
if (props.cond) {
x.push(1);
}
// Since x is reactive, y is now reactively controlled too:
let y = false;
switch (x[0]) {
case 1: {
... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/reactive-control-dependency-via-mutation-switch.expect.md |
/**
* @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
*/
import {
ComponentExplorerViewQuery,
ComponentType,
DebugSignalGraphNode,
DevToolsNode,
DirectivePosition,... | typescript | github | https://github.com/angular/angular | devtools/projects/ng-devtools-backend/src/lib/client-event-subscribers.ts |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | unknown | codeparrot/codeparrot-clean | ||
A method was implemented when another trait item was expected.
Erroneous code example:
```compile_fail,E0324
struct Bar;
trait Foo {
const N : u32;
fn M();
}
impl Foo for Bar {
fn N() {}
// error: item `N` is an associated method, which doesn't match its
// trait `<Bar as Foo>`
}
```
To... | unknown | github | https://github.com/rust-lang/rust | compiler/rustc_error_codes/src/error_codes/E0324.md |
#
# 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/test_double_trigger.py |
# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 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,sm8550-gcc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Global Clock & Reset Controller on SM8550
maintainers:
- Bjorn Andersson <andersson@kernel.org>
description: ... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/clock/qcom,sm8550-gcc.yaml |
val d = 1
val p = <expr>42 / d</expr> | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api/testData/components/compileTimeConstantProvider/evaluate/propertyInit_DivByOtherProperty_val.kt |
import { bench } from 'vitest'
import { buildDesignSystem } from './design-system'
import { Theme } from './theme'
function loadDesignSystem() {
let theme = new Theme()
theme.add('--spacing-0_5', '0.125rem')
theme.add('--spacing-1', '0.25rem')
theme.add('--spacing-3', '0.75rem')
theme.add('--spacing-4', '1re... | typescript | github | https://github.com/tailwindlabs/tailwindcss | packages/tailwindcss/src/intellisense.bench.ts |
<!--Copyright 2023 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/ja/glossary.md |
// 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 | discovery/eureka/eureka_test.go |
import os
import oriskami
import warnings
from oriskami.test.helper import (OriskamiTestCase)
class OriskamiAPIResourcesTests(OriskamiTestCase):
def test_event_label_retrieve(self):
response = oriskami.EventLabel.retrieve("1")
event = response.data[0]
self.assertEqual(event["id"], "1")
... | unknown | codeparrot/codeparrot-clean | ||
from django.conf import settings
from django.contrib.syndication.views import Feed
from django.utils.feedgenerator import Atom1Feed
from django.views.generic import ListView
from django.views.generic.detail import DetailView
from blog.models import Post
class BlogIndexView(ListView):
template_name = "blog/index.h... | unknown | codeparrot/codeparrot-clean | ||
r'''
Copyright 2014 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 agreed to i... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.