code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
/* Generated from catalan.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "stem_ISO_8859_1_catalan.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p2;
int i_p1;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
#endif
exter... | c | github | https://github.com/postgres/postgres | src/backend/snowball/libstemmer/stem_ISO_8859_1_catalan.c |
#!/usr/bin/env python
#
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Writes dependency ordered list of native libraries.
The list excludes any Android system libraries, as those are not bundled with... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3.4
__author__ = 'mdc_hk'
version = '1.0'
#===========================================================================================================
import datetime, logging, multiprocessing, os, re, subprocess, sys, time
import pandas as pd
from pandas import Series
from bs4 import BeautifulSoup... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env bash
set -eux -o pipefail
export GIT_TOP_LEVEL SUBMODULE_DST
GIT_TOP_LEVEL="${WORK_DIR}/super/ansible_collections/ns/col"
SUBMODULE_DST="sub"
source collection-tests/git-common.bash | unknown | github | https://github.com/ansible/ansible | test/integration/targets/ansible-test-git/collection-tests/git-at-collection-base.sh |
# Status: ported
# Base revision: 64456.
# Copyright David Abrahams 2004.
# Copyright Vladimir Prus 2010.
# Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
import b2.build.type as type
# The following naming scheme ... | unknown | codeparrot/codeparrot-clean | ||
# -----------------------------------------------------------------------------
# yacc_simple.py
#
# A simple, properly specifier grammar
# -----------------------------------------------------------------------------
import sys
if ".." not in sys.path: sys.path.insert(0,"..")
import ply.yacc as yacc
from calclex imp... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2013 Google Inc. All Rights Reserved.
"""A module to make it easy to set up and run CLIs in the Cloud SDK."""
import os.path
import subprocess
import sys
import httplib2
from oauth2client import client
from googlecloudsdk.calliope import cli as calliope
from googlecloudsdk.core import config
from google... | unknown | codeparrot/codeparrot-clean | ||
'''
VGDL example: a simplified variant of the classic space-invaders.
@author: Tom Schaul
'''
# the (initial) level as a block of characters
aliens_level = """
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
w w
w1 w
w000 w
w000 ... | 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-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/TemplateAvailabilityProvider.java |
@import "richtext";
@import "richtext-files-icons"; | unknown | github | https://github.com/vercel/next.js | examples/cms-sitecore-xmcloud/src/assets/sass/base/richtext/index.scss |
# pylint: disable=import-error,no-name-in-module
from distutils.version import StrictVersion
import unittest
import re
import os
import pkg_resources
from sphinx import __version__ as __sphinx_version__
from sphinx.builders.html import StandaloneHTMLBuilder
from lxml import etree
try:
from StringIO import StringIO... | unknown | codeparrot/codeparrot-clean | ||
---
title: useActionData
---
# useActionData
<!--
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
Thank you for helping improve our documentation!
This file is auto-generated from the JSDoc comments in the source
code, so please edit the JSDoc comments in the file below and this
file will be re-generated once those changes are merged.
http... | unknown | github | https://github.com/remix-run/react-router | docs/api/hooks/useActionData.md |
# -*- coding: utf-8 -*-
# This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and
# is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012)
from django.conf import settings
from django.core.mail import send_mail
from django.core.... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Romain Bignon
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the ... | unknown | codeparrot/codeparrot-clean | ||
#***************************************************************************
#* *
#* Copyright (c) 2011, 2012 *
#* Jose Luis Cercos Pita <jlcercos@gmail.com> *
#* ... | unknown | codeparrot/codeparrot-clean | ||
import operator_benchmark as op_bench
import torch
import torch.ao.nn.quantized as nnq
"""Microbenchmarks for quantized Cat operator"""
# Configs for PT Cat operator
qcat_configs_short = op_bench.config_list(
attr_names=["M", "N", "K", "L", "dim"],
attrs=[
[256, 512, 1, 2, 0],
[512, 512, 2, 1... | python | github | https://github.com/pytorch/pytorch | benchmarks/operator_benchmark/pt/qcat_test.py |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Chatham Financial <oss@chathamfinancial.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... | unknown | codeparrot/codeparrot-clean | ||
try:
import uctypes
except ImportError:
print("SKIP")
raise SystemExit
S1 = {}
assert uctypes.sizeof(S1) == 0
S2 = {"a": uctypes.UINT8 | 0}
assert uctypes.sizeof(S2) == 1
S3 = {
"a": uctypes.UINT8 | 0,
"b": uctypes.UINT8 | 1,
}
assert uctypes.sizeof(S3) == 2
S4 = {
"a": uctypes.UINT8 | 0,
... | unknown | codeparrot/codeparrot-clean | ||
"""
Communicability and centrality measures.
"""
# Copyright (C) 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
from networkx.utils import *
__author__ = "\n".join(['Aric Hagberg (... | unknown | codeparrot/codeparrot-clean | ||
from django.core.exceptions import ValidationError
from django.forms import MultipleChoiceField
from django.test import SimpleTestCase
class MultipleChoiceFieldTest(SimpleTestCase):
def test_multiplechoicefield_1(self):
f = MultipleChoiceField(choices=[('1', 'One'), ('2', 'Two')])
with self.assert... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/memory-controllers/mediatek,mt7621-memc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MT7621 SDRAM controller
maintainers:
- Sergio Paracuellos <sergio.paracuellos@gmail.com>
properties:... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/memory-controllers/mediatek,mt7621-memc.yaml |
"""
This inline script allows conditional TLS Interception based
on a user-defined strategy.
Example:
> mitmdump -s tls_passthrough.py
1. curl --proxy http://localhost:8080 https://example.com --insecure
// works - we'll also see the contents in mitmproxy
2. curl --proxy http://localhost:8080 https:... | unknown | codeparrot/codeparrot-clean | ||
## Input
```javascript
function useFoo(props) {
[x] = props;
return {x};
}
```
## Error
```
Found 1 error:
Error: Cannot reassign variables declared outside of the component/hook
Variable `x` is declared outside of the component/hook. Reassigning this value during render is a form of side effect, which can ca... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-destructure-assignment-to-global.expect.md |
/*
* Copyright (C) 2007 The Guava 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 ... | java | github | https://github.com/google/guava | android/guava/src/com/google/common/io/MultiInputStream.java |
use crate::cursor;
use crate::extractor::bracket_stack::BracketStack;
use crate::extractor::machine::{Machine, MachineState};
use crate::extractor::string_machine::StringMachine;
use crate::extractor::CssVariableMachine;
use classification_macros::ClassifyBytes;
use std::marker::PhantomData;
#[derive(Debug, Default)]
... | rust | github | https://github.com/tailwindlabs/tailwindcss | crates/oxide/src/extractor/arbitrary_property_machine.rs |
"""
Tests for VF2 isomorphism algorithm for weighted graphs.
"""
from nose.tools import assert_true, assert_false
from operator import eq
import networkx as nx
import networkx.algorithms.isomorphism as iso
def test_simple():
# 16 simple tests
w = 'weight'
edges = [(0,0,1),(0,0,1.5),(0,1,2),(1,0,3)]
... | unknown | codeparrot/codeparrot-clean | ||
{
"apiVersion": "v1",
"groupVersion": "scheduling.k8s.io/v1alpha1",
"kind": "APIResourceList",
"resources": [
{
"kind": "Workload",
"name": "workloads",
"namespaced": true,
"singularName": "workload",
"storageVersionHash": "7X3nQnlLxCA=",
"verbs": [
"create",
... | json | github | https://github.com/kubernetes/kubernetes | api/discovery/apis__scheduling.k8s.io__v1alpha1.json |
import logging
from autotest.client.shared import error
from virttest import utils_test
def run_timedrift_with_migration(test, params, env):
"""
Time drift test with migration:
1) Log into a guest.
2) Take a time reading from the guest and host.
3) Migrate the guest.
4) Take a second time read... | unknown | codeparrot/codeparrot-clean | ||
export const colorPool = [
'#008000',
'#008080',
'#800000',
'#800080',
'#808000',
'#808080',
'#0000c0',
'#008040',
'#0080c0',
'#800040',
'#8000c0',
'#808040',
'#8080c0',
'#00c000',
'#00c080',
'#804000',
'#804080',
'#80c000',
'#80c080',
'#0040c0',
'#00c040',
'#00c0c0',
'#804... | typescript | github | https://github.com/prometheus/prometheus | web/ui/react-app/src/pages/graph/ColorPool.ts |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Provides a command container for additional tox commands, used in "tox.ini".
COMMANDS:
* copytree
* copy
* py2to3
REQUIRES:
* argparse
"""
from glob import glob
import argparse
import inspect
import os.path
import shutil
import sys
import collections
__aut... | unknown | codeparrot/codeparrot-clean | ||
#
# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
#... | unknown | codeparrot/codeparrot-clean | ||
import bz2
__doc__ = bz2.__doc__
del bz2
from bz2 import * | python | github | https://github.com/python/cpython | Lib/compression/bz2.py |
'''
Analyse observation basket
'''
import argparse
import joblib
import pandas as pd
import apriori
import helpers
from rules import RuleGenerator
parser = argparse.ArgumentParser(description='Convert Halias RDF dataset for data mining')
parser.add_argument('minsup', help='Minimum support', nargs='?', type=float, de... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014, 2015 CERN.
#
# Invenio 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 optio... | unknown | codeparrot/codeparrot-clean | ||
import unittest
import mock
open_name = "cshare.controller.google_adapter.open"
from uuid import uuid4
from cshare.controller import GoogleAdapter
FAKE_ACCESS_URL = "https://localhost:63000/request_url"
class TestAdapter(unittest.TestCase):
def setUp(self):
self._access_token = str(uuid4())
sel... | 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 | build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/CyclonedxPluginActionIntegrationTests.java |
"""command doit info - display info on task metadata"""
import pprint
from .cmd_base import DoitCmdBase
from .exceptions import InvalidCommand
opt_hide_status = {
'name': 'hide_status',
'long': 'no-status',
'type': bool,
'default': False,
'help': """Hides reasons why this task would be executed.
... | unknown | codeparrot/codeparrot-clean | ||
# -*- Mode: Python; tab-width: 4 -*-
#
# Author: Sam Rushing <rushing@nightmare.com>
# Copyright 1997 by Sam Rushing
# All Rights Reserved.
#
# standard python modules
import os
import re
import posixpath
import stat
import string
import time
# medusa modules
import http_date
import http... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2017 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package bench
import (
"context"
gosql "database/sql"
"flag"
"fmt"
"net"
"net/url"
"reflect"
"runtime"
"strings"
"testing"
"github.com/cockroachdb/cockroach... | go | github | https://github.com/cockroachdb/cockroach | pkg/bench/foreachdb.go |
#!/usr/bin/env python
'''
EC2 external inventory script
=================================
Generates inventory that Ansible can understand by making API request to
AWS EC2 using the Boto library.
NOTE: This script assumes Ansible is being executed where the environment
variables needed for Boto have already been set:... | unknown | codeparrot/codeparrot-clean | ||
from werkzeug import FileStorage
from wtforms import FileField as _FileField
from wtforms import ValidationError
class FileField(_FileField):
"""
Werkzeug-aware subclass of **wtforms.FileField**
Provides a `has_file()` method to check if its data is a FileStorage
instance with an actual file.
"""
... | unknown | codeparrot/codeparrot-clean | ||
"""
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2011 Nathanael C. Fritz
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
import logging
from sleekxmpp.stanza import Iq, StreamFeatures
from sleekxmpp.xmlstream import register_stanza_plugin
from sleekxmpp.plugins im... | unknown | codeparrot/codeparrot-clean | ||
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
/** @typedef {import("../Compilation")} Compilation */
/** @typedef {import("../Chunk").... | javascript | github | https://github.com/webpack/webpack | lib/prefetch/ChunkPrefetchTriggerRuntimeModule.js |
#!/usr/bin/env python
"""Linux client repackers."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import io
import logging
import os
import shutil
import subprocess
import zipfile
from grr_response_client_builder im... | unknown | codeparrot/codeparrot-clean | ||
# Python for Android
If you obtained this README as part of a release package, then the only
applicable sections are "Prerequisites", "Testing", and "Using in your own app".
If you obtained this README as part of the CPython source tree, then you can
also follow the other sections to compile Python for Android yourse... | unknown | github | https://github.com/python/cpython | Android/README.md |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.template.defaultfilters import force_escape
from django.test import SimpleTestCase
from django.utils.safestring import SafeData
from ..utils import setup
class ForceEscapeTests(SimpleTestCase):
"""
Force_escape is applied immediately... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
import sys
sys.dont_write_bytecode = True
import glob
import yaml
import json
import os
import sys
import time
import logging
from argparse import ArgumentParser
from slackclient import SlackClient
def dbg(debug_string):
if debug:
logging.info(debug_string)
USER_DICT = {}
class R... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
import uuid
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
class BaseProfile(models.Model):
user = models.OneToOneFiel... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# 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... | unknown | codeparrot/codeparrot-clean | ||
use rustc_abi::{BackendRepr, FieldsShape, Scalar, Variants};
use rustc_middle::ty::layout::{
HasTyCtxt, LayoutCx, LayoutError, LayoutOf, TyAndLayout, ValidityRequirement,
};
use rustc_middle::ty::{PseudoCanonicalInput, ScalarInt, Ty, TyCtxt};
use rustc_middle::{bug, ty};
use rustc_span::DUMMY_SP;
use crate::const_... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_const_eval/src/util/check_validity_requirement.rs |
// Copyright 2020 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | go | github | https://github.com/etcd-io/etcd | tests/integration/lazy_cluster.go |
// This file was automatically generated from shared-mutable-state-and-concurrency.md by Knit tool. Do not edit.
package kotlinx.coroutines.guide.exampleSync06
import kotlinx.coroutines.*
import kotlinx.coroutines.sync.*
import kotlin.system.*
suspend fun massiveRun(action: suspend () -> Unit) {
val n = 100 // n... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/jvm/test/guide/example-sync-06.kt |
import os
import imp
from itertools import product, starmap
import distutils.command.install_lib as orig
class install_lib(orig.install_lib):
"""Don't add compiled flags to filenames of non-Python files"""
def run(self):
self.build()
outfiles = self.install()
if outfiles is not None:
... | unknown | codeparrot/codeparrot-clean | ||
"""Test cases for the API stream sensor."""
from homeassistant.bootstrap import async_setup_component
from homeassistant.components.websocket_api.auth import TYPE_AUTH_REQUIRED
from homeassistant.components.websocket_api.http import URL
from .test_auth import test_auth_active_with_token
async def test_websocket_api(... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# _ _ _
# __ _ ___ ___(_|_) |_ _ __ ___ _ __
# / _` / __|/ __| | | __| '__/ _ \| '_ \
# | (_| \__ \ (__| | | |_| | | (_) | | | |
# \__,_|___/\___|_|_|\__|_| \___/|_| |_|
#
# A Light Cyc... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | unknown | codeparrot/codeparrot-clean | ||
import {mutate} from 'shared-runtime';
function Component({foo, bar}) {
let x = {foo};
let y = {bar};
const f0 = function () {
let a = {y};
let b = x;
a.x = b;
};
f0();
mutate(y);
return x;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{foo: 2, bar: 3}],
sequentialRende... | javascript | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/capturing-fun-alias-captured-mutate-2.js |
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | unknown | codeparrot/codeparrot-clean | ||
test_kind: fsm_workload_test
selector:
roots:
- jstests/concurrency/fsm_workloads/**/*.js
- src/mongo/db/modules/*/jstests/concurrency/fsm_workloads/*.js
exclude_files:
##
# Disabled due to MongoDB restrictions and/or workload restrictions
##
exclude_with_any_tags:
- requires_standalone
... | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/suites/concurrency_replication_causal_consistency.yml |
"""
utility functions for converting between
datetime, iso date and 14-digit timestamp
"""
import re
import time
import datetime
import calendar
from six.moves import map
from email.utils import parsedate, formatdate
#=================================================================
# str <-> datetime conversion
#===... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
#[tauri::command]
fn app_completed_successfully() {
std::process::exit(0);
}
fn main() {
tauri::Builder::... | rust | github | https://github.com/tauri-apps/tauri | bench/tests/cpu_intensive/src-tauri/src/main.rs |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#####################################################################
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2011-2012 Ludovic Fauvet <etix@videolan.org>
# Jean-Baptiste Kempf <jb@videolan.org>
#... | unknown | codeparrot/codeparrot-clean | ||
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html
#include "precomp.hpp"
#include "opencl_kernels_core.hpp"
#include "stat.hpp"
#include "opencv2/core/detail/dispatch_helper.im... | cpp | github | https://github.com/opencv/opencv | modules/core/src/minmax.cpp |
# Copyright 2011 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 | ||
#!/usr/bin/env python3
# This file is part of OpenSoccerManager-Editor.
#
# OpenSoccerManager 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 | ||
#!/usr/bin/python
# Copyright (c) 2015 IBM Corporation
#
# This module 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.
#
# This softwar... | unknown | codeparrot/codeparrot-clean | ||
interface Stats {
name: string;
value: number;
}
interface HeadStats {
numSeries: number;
numLabelPairs: number;
chunkCount: number;
minTime: number;
maxTime: number;
}
// Result type for /api/v1/status/tsdb endpoint.
// See: https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-stats
export i... | typescript | github | https://github.com/prometheus/prometheus | web/ui/mantine-ui/src/api/responseTypes/tsdbStatus.ts |
# Copyright 2010-2020 Kurt McKee <contactme@kurtmckee.org>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
# This file is a part of feedparser.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistrib... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from config.config import ARTICLE_PER_PAGE
from exception import Unauthorized
from helper.model_control import get_board, get_article_page
from helper.permission import is_anybody, can_write
from helper.resource import YuzukiResource
from helper.template import render_template
class Board(Yuzuk... | unknown | codeparrot/codeparrot-clean | ||
testimonials:
header: Kundenstimmen
# footer omitted by design | unknown | github | https://github.com/jekyll/jekyll | test/source/_data/i18n.yml |
#!/usr/bin/env python3
#
# 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 "Li... | unknown | codeparrot/codeparrot-clean | ||
"""
Support the sensor of a BloomSky weather station.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/sensor.bloomsky/
"""
import logging
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const impo... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package terraform
import (
"sync"
"testing"
"github.com/zclconf/go-cty/cty"
"github.com/hashicorp/terraform/internal/addrs"
"github.com/hashicorp/terraform/internal/plans"
"github.com/hashicorp/terraform/internal/providers"
"github.com/has... | go | github | https://github.com/hashicorp/terraform | internal/terraform/hook_test.go |
def follow(n, scramble=True):
'''Create n new pynguins, each
one following one of the others.
Each pynguin has its own forward
speed and turn speed randomly generated.
If a pynguin happens to wander off the
screen, it will head back to the center
before resuming following its chosen
ot... | unknown | codeparrot/codeparrot-clean | ||
"""SCons.Tool.sunf77
Tool-specific initialization for sunf77, the Sun Studio F77 compiler.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 20... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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 (c) 2017 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.util;
import static java.util.Arrays.asList;
import java.util.Collection;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class StringUtil {
... | java | github | https://github.com/mockito/mockito | mockito-core/src/main/java/org/mockito/internal/util/StringUtil.java |
# -*- coding: utf-8 -*-
"""
UY-specific form helpers.
"""
import re
from django.core.validators import EMPTY_VALUES
from django.forms.fields import Select, RegexField
from django.forms import ValidationError
from django.utils.translation import ugettext_lazy as _
from django.contrib.localflavor.uy.util import get_vali... | unknown | codeparrot/codeparrot-clean | ||
from ..abstract_command import AbstractModelCommand
class Command(AbstractModelCommand):
help = 'Creates new basic identity for existing principal.'
def add_command_arguments(self, parser):
principal_parser = parser.add_mutually_exclusive_group(required=True)
principal_parser.add_argument(
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from fnmatch import fnmatch
import logging
from urlparse import urlparse
from appengine_url_fetcher import AppEngineUrlFetcher
from caching_rietveld_patcher... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# flake8: noqa
# Disable Flake8 because of all the sphinx imports
#
# 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 licens... | unknown | codeparrot/codeparrot-clean | ||
"""
Various retrieval models for scoring a individual document for a given query.
@author: Faegheh Hasibi (faegheh.hasibi@idi.ntnu.no)
@author: Krisztian Balog (krisztian.balog@uis.no)
"""
from __future__ import division
import math
from lucene_tools import Lucene
class Scorer(object):
"""Base scorer class."""
... | unknown | codeparrot/codeparrot-clean | ||
from openelex.base.transform import Transform, registry
from openelex.models import RawResult
class FixVanBurenTransform(Transform):
"""
s/VanBuren/Van Buren in RawResults from the source file
20001107__ia__general__state_senate__county.csv
"""
name = 'fix_van_buren'
def __call__(self):
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#!/usr/bin/python
# This is a component of AXIS, a front-end for LinuxCNC
# Copyright 2004, 2005, 2006 Jeff Epler <jepler@unpythonic.net> and
# Chris Radek <chris@timeguy.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Ge... | unknown | codeparrot/codeparrot-clean | ||
# DDE support for Pythonwin
#
# Seems to work fine (in the context that IE4 seems to have broken
# DDE on _all_ NT4 machines I have tried, but only when a "Command Prompt" window
# is open. Strange, but true. If you have problems with this, close all Command Prompts!
import win32ui
import win32api, win32con
from pyw... | unknown | codeparrot/codeparrot-clean | ||
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | unknown | codeparrot/codeparrot-clean | ||
"""Tests for the pindent script in the Tools directory."""
import os
import sys
import unittest
import subprocess
import textwrap
from test import support
from test.script_helper import assert_python_ok
from test.test_tools import scriptsdir, skip_if_missing
skip_if_missing()
class PindentTests(unittest.TestCase):
... | unknown | codeparrot/codeparrot-clean | ||
#
# Created as part of the StratusLab project (http://stratuslab.eu),
# co-funded by the European Commission under the Grant Agreement
# INFSO-RI-261552."
#
# Copyright (c) 2011, SixSq Sarl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | unknown | codeparrot/codeparrot-clean | ||
//@ts-nocheck
// DO NOT MODIFY THIS FILE. This file is automatically generated by Tina
export function gql(strings: TemplateStringsArray, ...args: string[]): string {
let str = ''
strings.forEach((string, i) => {
str += string + (args[i] || '')
})
return str
}
export type Maybe<T> = T | null
export type Inp... | typescript | github | https://github.com/vercel/next.js | examples/cms-tina/.tina/__generated__/types.ts |
"""Generate and work with PEP 425 Compatibility Tags."""
from __future__ import absolute_import
import re
import sys
import warnings
try:
import sysconfig
except ImportError: # pragma nocover
# Python < 2.7
import distutils.sysconfig as sysconfig
import distutils.util
_osx_arch_pat = re.compile(r'(.+)_(... | unknown | codeparrot/codeparrot-clean | ||
"""This module contains acceptance tests of scripts that bring up dockerized
test environment.
"""
__author__ = "Jakub Kudzia"
__copyright__ = "Copyright (C) 2016 ACK CYFRONET AGH"
__license__ = "This software is released under the MIT license cited in " \
"LICENSE.txt"
from tests import *
from tests.uti... | unknown | codeparrot/codeparrot-clean | ||
.example-container {
width: 400px;
max-width: 100%;
margin: 0 25px 25px 0;
display: inline-block;
vertical-align: top;
}
.example-list {
border: solid 1px #ccc;
min-height: 60px;
background: white;
border-radius: 4px;
overflow: hidden;
display: block;
}
h2 {
font-family: sans-serif;
}
.exampl... | css | github | https://github.com/angular/angular | adev/src/content/examples/drag-drop/src/disable-sorting/app/app.css |
CHANGELOG
=========
8.0
---
* Remove `Symfony\Component\Intl\Transliterator\EmojiTransliterator`, use `Symfony\Component\Emoji\EmojiTransliterator` instead
7.4
---
* Allow Kosovo as a component region, controlled by the `SYMFONY_INTL_WITH_USER_ASSIGNED` env var
* Generate legal and validity metadata for currenci... | unknown | github | https://github.com/symfony/symfony | src/Symfony/Component/Intl/CHANGELOG.md |
# Copyright 2010 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 | ||
# Standard imports
import unittest
import datetime as pydt
import logging
import uuid
import json
import emission.storage.timeseries.abstract_timeseries as esta
import emission.storage.decorations.analysis_timeseries_queries as esda
import emission.storage.timeseries.timequery as estt
import emission.core.get_databas... | unknown | codeparrot/codeparrot-clean | ||
# Initialisation for epydemic
#
# Copyright (C) 2017--2020 Simon Dobson
#
# This file is part of epydemic, epidemic network simulations in Python.
#
# epydemic 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, e... | unknown | codeparrot/codeparrot-clean | ||
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v1beta1",
"metadata": {
"name": "legacy-ds-ref"
},
"spec": {
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana ... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/input/v1beta1.legacy-ds-ref.json |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.