code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
name: Auto-milestone on: pull_request_target: types: - opened - reopened - closed - ready_for_review permissions: pull-requests: write contents: write # Note: this action runs with write permissions on GITHUB_TOKEN even from forks # so it must not run untrusted code (such as checking...
unknown
github
https://github.com/grafana/grafana
.github/workflows/auto-milestone.yml
#ifndef DATE_TIME_DATE_DURATION__ #define DATE_TIME_DATE_DURATION__ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff G...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/date_time/date_duration.hpp
# -*-python-*- # GemRB - Infinity Engine Emulator # Copyright (C) 2003 The GemRB Project # # 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) ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2020-2021 Dmitry Marakasov <amdmi3@amdmi3.ru> # # This file is part of repology # # repology 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 optio...
unknown
codeparrot/codeparrot-clean
"""distutils.cmd Provides the Command class, the base class for the command classes in the distutils.command package. """ import sys, os, re from distutils.errors import DistutilsOptionError from distutils import util, dir_util, file_util, archive_util, dep_util from distutils import log class Command: """Abstra...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2016 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 agre...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/graph/NetworkConnections.java
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'Michael Liao' ''' JSON API definition. ''' import json, logging, inspect, functools class Page(object): ''' Page object for display pages. ''' def __init__(self, item_count, page_index=1, page_size=10): ''' Init Pagination...
unknown
codeparrot/codeparrot-clean
from django.db import models class DebugObject(models.Model): pass
python
github
https://github.com/django/django
tests/context_processors/models.py
# Copyright (c) 2013 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...
unknown
codeparrot/codeparrot-clean
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import datetime import functools import operator import itertools import time import psycopg2 import pytz from openerp.osv import orm from openerp.tools.translate import _ from openerp.tools.misc import DEFAULT_SERVER_DATE_FORMAT,\ DEFAULT_SERVER_DATETIME_FORMAT ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package blocktoattr import ( "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/ext/dynblock" "github.com/hashicorp/hcl/v2/hcldec" "github.com/hashicorp/terraform/internal/configs/configschema" ) // ExpandedVariables finds all of the g...
go
github
https://github.com/hashicorp/terraform
internal/lang/blocktoattr/variables.go
# Copyright 2014 Google. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
unknown
codeparrot/codeparrot-clean
--- title: <svelte:boundary> --- ```svelte <svelte:boundary onerror={handler}>...</svelte:boundary> ``` > [!NOTE] > This feature was added in 5.3.0 Boundaries allow you to 'wall off' parts of your app, so that you can: - provide UI that should be shown when [`await`](await-expressions) expressions are first resolvi...
unknown
github
https://github.com/sveltejs/svelte
documentation/docs/05-special-elements/01-svelte-boundary.md
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
unknown
codeparrot/codeparrot-clean
package opts import ( "fmt" "strings" "github.com/moby/moby/api/types/system" ) // RuntimeOpt defines a map of Runtimes type RuntimeOpt struct { name string stockRuntimeName string values *map[string]system.Runtime } // NewNamedRuntimeOpt creates a new RuntimeOpt func NewNamedRuntimeOpt(...
go
github
https://github.com/moby/moby
daemon/pkg/opts/runtime.go
(function(global, factory) { typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define([ "exports" ], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.ActionText = {})); })(this, (function...
javascript
github
https://github.com/rails/rails
actiontext/app/assets/javascripts/actiontext.js
from fabric.api import * import json env.type = 'dev' env.hosts = ['127.0.0.1:2200'] env.user = 'vagrant' env.password = 'vagrant' @task(default=True) def everything(destroy=False): if destroy: local('vagrant destroy') local('vagrant up --provider virtualbox') # Update to latest sudo('apt-get -yqq u...
unknown
codeparrot/codeparrot-clean
# 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
MIN_SIZE = ENV.fetch('SMALL_ARRAY_MIN', 0).to_i MAX_SIZE = ENV.fetch('SMALL_ARRAY_MAX', 16).to_i ITERATIONS = ENV.fetch('SMALL_ARRAY_ITERATIONS', 100).to_i ARRAYS = (MIN_SIZE..MAX_SIZE).map do |size1| (MIN_SIZE..MAX_SIZE).map do |size2| [Array.new(size1) { rand(MAX_SIZE) }, Array.new(size2) { rand(MAX_SIZE) }] ...
ruby
github
https://github.com/ruby/ruby
benchmark/array_small_or.rb
## Input ```javascript function Component(props) { const x = {}; let y; if (props.cond) { y = [props.value]; } else { y = []; } // This should be inferred as `<store> y` s.t. `x` can still // be independently memoized. *But* this also must properly // extend the mutable range of the array liter...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/phi-type-inference-array-push.expect.md
from django.template.loader import render_to_string from django.core.mail import send_mail as django_send_mail from django.conf import settings from django.contrib.auth import get_user_model from django.db.models import Q from modelcluster.fields import ParentalKey from wagtail.wagtailcore.models import Page, PageRev...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ requests.session ~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). """ from .defaults import defaults from .models import Request from .hooks import dispatch_hook from .utils import header_expand from .packages...
unknown
codeparrot/codeparrot-clean
import h2o_nodes from h2o_test import dump_json, verboseprint import h2o_util import h2o_print as h2p from h2o_test import OutputObj #************************************************************************ def runStoreView(node=None, **kwargs): print "FIX! disabling runStoreView for now" return {} if not...
unknown
codeparrot/codeparrot-clean
# Grafana frontend packages ## Exporting code conventions All the `@grafana` packages in this repo (except `@grafana/schema`) make use of `exports` in package.json to define entrypoints that Grafana core and Grafana plugins can access. Exports can also be used to restrict access to internal files in packages. Packag...
unknown
github
https://github.com/grafana/grafana
packages/README.md
import re import types from hachoir_core.error import error from hachoir_core.i18n import _ from hachoir_parser import Parser, HachoirParser import sys ### Parser list ################################################################ class ParserList(object): VALID_CATEGORY = ("archive", "audio", "container", "fil...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2014 Mirantis 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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/media/amlogic,c3-mipi-adapter.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Amlogic C3 MIPI adapter receiver maintainers: - Keke Li <keke.li@amlogic.com> description: MIPI adapter is u...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/media/amlogic,c3-mipi-adapter.yaml
# Copyright (c) 2008, Aldo Cortesi. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify,...
unknown
codeparrot/codeparrot-clean
// This part of YJIT helps interfacing with the rest of CRuby and with the OS. // Sometimes our FFI binding generation tool gives undesirable outputs when it // sees C features that Rust doesn't support well. We mitigate that by binding // functions which have simple parameter types. The boilerplate C functions for // ...
c
github
https://github.com/ruby/ruby
yjit.c
# orm/scoping.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from sqlalchemy import exc as sa_exc from sqlalchemy.util import ScopedRegistry, Thread...
unknown
codeparrot/codeparrot-clean
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
unknown
codeparrot/codeparrot-clean
"""Self documenting XML-RPC Server. This module can be used to create XML-RPC servers that serve pydoc-style documentation in response to HTTP GET requests. This documentation is dynamically generated based on the functions and methods registered with the server. This module is built upon the pydoc and SimpleXMLRPCSe...
unknown
codeparrot/codeparrot-clean
/* SHA2 module */ /* This provides an interface to NIST's SHA2 224, 256, 384, & 512 Algorithms */ /* See below for information about the original code this module was based upon. Additional work performed by: Andrew Kuchling (amk@amk.ca) Greg Stein (gstein@lyra.org) Trevor Perrin (trevp@trevp.net) Jon...
c
github
https://github.com/python/cpython
Modules/sha2module.c
"""SCons.Tool.packaging.msi The msi packager. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"...
unknown
codeparrot/codeparrot-clean
# spdlog [![ci](https://github.com/gabime/spdlog/actions/workflows/linux.yml/badge.svg)](https://github.com/gabime/spdlog/actions/workflows/linux.yml)&nbsp; [![ci](https://github.com/gabime/spdlog/actions/workflows/windows.yml/badge.svg)](https://github.com/gabime/spdlog/actions/workflows/windows.yml)&nbsp; [![ci](htt...
unknown
github
https://github.com/nodejs/node
deps/LIEF/third-party/spdlog/README.md
from IntervalReport import * class GatTracker(IntervalTracker): pass # class GatGenomicContextTable( GatTracker ): # pattern = "gat_context_(.*)$" # def __call__(self, track): # return self.getAll( "SELECT * FROM gat_context_%(track)s" ) # class GatGenomicAnnotationTable( GatTracker ): # pat...
unknown
codeparrot/codeparrot-clean
''' main script for meta-pipeline, that run the scripts: - quality_control.py - generate_classify.py with given parameters. ''' #@author: Philipp Sehnert #@contact: philipp.sehnert[a]gmail.com # global imports import sys, os from argparse import ArgumentParser import subprocess import shlex #import generate_classif...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright © 2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or impli...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 option) any later...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import sys import os import re import ftools # A parser that can be used to identify weather a line is a test result or a section statement. class Lparser(object): def __init__(self, test_0_pass_regex, test_0_fail_regex, section_0_begin_regex=None, section_0_end_regex=None, **kwargs): ...
unknown
codeparrot/codeparrot-clean
# orm/persistence.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """private module containing functions used to emit INSERT, UPDATE and DELETE sta...
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. #if !defined CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY && \ !defined CV_DISABLE_OPTIMIZATION && defined CV_ENABLE_INTRINSICS /...
unknown
github
https://github.com/opencv/opencv
modules/core/test/test_intrin512.simd.hpp
s = "01234567890123456789012345678901234567890123456789" sa1 = [s] sa2 = [sa1, sa1] sa3 = [sa2, sa2, sa2] sa4 = [sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3] da1 = {s : s} da2 = {s : da1, '1' : da1} da3 = {s : da2, '1' : da2, '2' : da2} da4 = {s : da3, '01': da3...
unknown
codeparrot/codeparrot-clean
import threading from sleekxmpp.test import SleekTest def generate_fulfilled_test_case(method, value, module=None, name=None): class TestFulfilled(SleekTest): def __init__(self, *args, **kwargs): super(TestFulfilled, self).__init__(*args, **kwargs) self._test_case = method ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This...
unknown
codeparrot/codeparrot-clean
Experiment(description='Trying latest code on classic data sets', data_dir='../data/tsdlr-renamed/', max_depth=10, random_order=False, k=1, debug=False, local_computation=False, n_rand=9, sd=2, jitter_sd=0.1, m...
unknown
codeparrot/codeparrot-clean
export { computedPlugin } from "scripts/config/plugins/computed"; export { fallbackPlugin } from "scripts/config/plugins/fallback"; export { packageJsonPlugin } from "scripts/config/plugins/package-json"; export { scjssconfigPlugin } from "scripts/config/plugins/scjssconfig";
typescript
github
https://github.com/vercel/next.js
examples/cms-sitecore-xmcloud/scripts/temp/config-plugins.ts
from collections import defaultdict import logging import pickle import json from typing import Dict, Optional, Tuple from ray.tune import ExperimentAnalysis from ray.tune.sample import Domain, Float, Quantized from ray.tune.suggest.variant_generator import parse_spec_vars from ray.tune.utils.util import unflatten_dic...
unknown
codeparrot/codeparrot-clean
# -*- coding: ascii -*- """ lots of Excel Magic Numbers """ # Boundaries BIFF8+ MAX_ROW = 65536 MAX_COL = 256 biff_records = { 0x0000: "DIMENSIONS", 0x0001: "BLANK", 0x0002: "INTEGER", 0x0003: "NUMBER", 0x0004: "LABEL", 0x0005: "BOOLERR", 0x0006: "FORMULA", 0x0007: "STRING", 0x000...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2014,2015 VA Linux Systems Japan K.K. # Copyright (C) 2014,2015 YAMAMOTO Takashi <yamamoto at valinux co jp> # 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 t...
unknown
codeparrot/codeparrot-clean
import unittest import wethepeople as wtp from wethepeople.objects import PetitionResponse, SignatureResponse from wethepeople.objects import Petition, Signature # No requests are made for this, this just silences the ua warning # These Tests make sure that Nationstates obj keeps concurrent all object values class a...
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/openmp/ExceptionEscapeCheck.h
# 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
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/es/tokenizer_summary.md
# -*- coding: utf-8 -*- """ *************************************************************************** r_proj.py --------- Date : October 2017 Copyright : (C) 2017 by Médéric Ribreux Email : medspx at medspx dot fr *****************************************...
unknown
codeparrot/codeparrot-clean
import pandas as pd #Enumerate colors. class COLOR: RED = "tomato" GREEN = "yellowgreen" BLUE = "lightblue" NEWLINE_INDENT = "\n " def fill(color): return f"[style=filled fillcolor=\"{color}\"]" def dual_label(weapon, n): return f"[label=\"{weapon}\" taillabel=\"{n}\"]" def solo_node(player, color): return f...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import os import re from .._compat import pjoin from .._globals import IDENTITY, THREAD_LOCAL from .._gae import classobj, gae, ndb, namespace_manager, NDBPolyModel, rdbms from ..objects import Table, Field, Expression, Query from ..helpers.classes import SQLCustomType, SQLALL, \ Reference,...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "test_helper" require "stubs/test_server" class ActionCable::Connection::AuthorizationTest < ActionCable::TestCase class Connection < ActionCable::Connection::Base attr_reader :websocket def connect reject_unauthorized_connection end def send_async(metho...
ruby
github
https://github.com/rails/rails
actioncable/test/connection/authorization_test.rb