code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from Screens.Screen import Screen from Plugins.Plugin import PluginDescriptor from Components.SystemInfo import SystemInfo from Components.ConfigList import ConfigListScreen from Components.config import getConfigListEntry, config, ConfigBoolean, ConfigNothing, ConfigSlider from Components.Label import Label from Compo...
unknown
codeparrot/codeparrot-clean
"""turtledemo/sorting_animation.py A minimal sorting algorithm animation: Sorts a shelf of 10 blocks using insertion sort, selection sort and quicksort. Shelves are implemented using builtin lists. Blocks are turtles with shape "square", but stretched to rectangles by shapesize() """ from turtle import * import rand...
python
github
https://github.com/python/cpython
Lib/turtledemo/sorting_animate.py
// SPDX-License-Identifier: GPL-2.0-only /* Kernel thread helper functions. * Copyright (C) 2004 IBM Corporation, Rusty Russell. * Copyright (C) 2009 Red Hat, Inc. * * Creation is done via kthreadd, so that we get a clean environment * even if we're invoked from userspace (think modprobe, hotplug cpu, * etc.)...
c
github
https://github.com/torvalds/linux
kernel/kthread.c
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
build-tools/src/main/java/org/elasticsearch/gradle/util/PermissionUtils.java
#!/usr/bin/env python # Check to validate rabbitmq connectivity # This is an alternative to the management plugin and rabbitmqadmin # Note rabbitmqadmin is available from http://<rabbitmq>:15672/cli/ # and should be saved in /usr/local/bin # # Usage: check_rabbit.py --host myhost --port 5672 --user myuser --password my...
unknown
codeparrot/codeparrot-clean
{ "format_version": "1.0", "applyable": true, "complete": true, "planned_values": { "outputs": { "test": { "sensitive": false, "type": "string", "value": "baz" } }, "root_module": { "child_modules...
json
github
https://github.com/hashicorp/terraform
internal/command/testdata/show-json/modules/output.json
/* * 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/test/java/org/apache/kafka/common/security/oauthbearer/internals/OAuthBearerClientInitialResponseTest.java
# Classes used for pickle testing. # They are moved to separate file, so they can be loaded # in other Python version for test_xpickle. import sys class C: def __eq__(self, other): return self.__dict__ == other.__dict__ # For test_load_classic_instance class D(C): def __init__(self, arg): pas...
python
github
https://github.com/python/cpython
Lib/test/picklecommon.py
#!/usr/bin/env python3 from distutils.core import Extension, setup import numpy # Obtain the numpy include directory. numpy_include = numpy.get_include() # Array extension module _Array = Extension("_Array", ["Array_wrap.cxx", "Array1.cxx", "Array2.cxx", ...
python
github
https://github.com/numpy/numpy
tools/swig/test/setup.py
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob 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 License, or # (at your op...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
cpp
github
https://github.com/nodejs/node
deps/LIEF/src/PE/resources/AcceleratorCodes.cpp
from textwrap import dedent import numpy as np import pandas as pd from pandas import DataFrame, Series, Timestamp from pandas.core.indexes.datetimes import date_range import pandas.util.testing as tm from pandas.util.testing import assert_frame_equal, assert_series_equal test_frame = DataFrame( {"A": [1] * 20 +...
unknown
codeparrot/codeparrot-clean
def remove_kth_element(list1, L): return list1[:L-1] + list1[L:]
unknown
mbpp
""" Testing of admin inline formsets. """ from __future__ import unicode_literals import random from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compatible @pyth...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (C) 2014 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
unknown
codeparrot/codeparrot-clean
import Avatar from "../components/avatar"; import Date from "../components/date"; import CoverImage from "../components/cover-image"; import Link from "next/link"; export default function HeroPost({ title, coverImage, date, excerpt, author, slug, }) { return ( <section> <div className="mb-8 md:...
javascript
github
https://github.com/vercel/next.js
examples/cms-takeshape/components/hero-post.js
import os import zlib import tarfile import zipfile import tempfile import shutil from PIL import Image from django.core.files import File from django.core.exceptions import FieldError from django.utils.translation import ugettext_lazy as _ from oscar.core.loading import get_model from oscar.core.compat import atomic...
unknown
codeparrot/codeparrot-clean
# -*- coding:utf-8 -*- ''' Created on 2015/3/14 @author: Jimmy Liu ''' import unittest from tushare.stock import reference as fd class Test(unittest.TestCase): def set_data(self): self.code = '600848' self.start = '2015-01-03' self.end = '2015-04-07' self.year = 2014 self.q...
unknown
codeparrot/codeparrot-clean
{ "b": true }
json
github
https://github.com/webpack/webpack
test/cases/loaders/issue-2299/subdir_1/b.json
#*************************************************************************** #* * #* Copyright (c) 2011, 2012 * #* Jose Luis Cercos Pita <jlcercos@gmail.com> * #* ...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.tools import ExtractTextTool # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. ...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/tools/playwright/extract_text.py
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """ This module contains an implementation of the 'b64' transport. """ from obfsproxy.transports.base import BaseTransport import base64 import obfsproxy.common.log as logging log = logging.get_obfslogger() def _get_b64_chunks_from_str(string): """ Given a 'string...
unknown
codeparrot/codeparrot-clean
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (c) 2010, 2011, 2012 Michael Ligh <michael.ligh@mnin.org> # # This file is part of Volatility. # # Volatility 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...
unknown
codeparrot/codeparrot-clean
import datetime import decimal import zoneinfo import numpy as np import pytest from pandas._config import using_string_dtype import pandas as pd import pandas._testing as tm from pandas.api.extensions import register_extension_dtype from pandas.arrays import ( BooleanArray, DatetimeArray, FloatingArray,...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/arrays/test_array.py
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
unknown
codeparrot/codeparrot-clean
""" Helper methods for Surveys """ from survey.models import SurveyForm, SurveyAnswer from courseware.access import has_access def is_survey_required_for_course(course_descriptor): """ Returns whether a Survey is required for this course """ # check to see that the Survey name has been defined in the...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render, redirect, get_object_or_404 from django.forms import ModelForm from annoying.decorators import render_to from annoying.decorators import ajax_request from annoying.functions import get_object_or_None from django.views.d...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.contrib.sites.models import RequestSite from django.contrib.sites.models import Site from django.contrib.auth import get_user_model from registration import signals from registration.models import RegistrationProfile from registration.views import ActivationView as BaseActi...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python from setuptools import setup def load_description(): with open('docs/README.md', 'r') as f: long_description = f.read() return long_description setup( name='Viento', version='0.6.0', author='Tiger Sachse', author_email='tgsachse@gmail.com', description=('A CL...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2013 eNovance SAS <licensing@enovance.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 copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
unknown
codeparrot/codeparrot-clean
interface ArrayBuffer { /** * If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not. * * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/maxByteLength) */ get maxByteLength(): n...
typescript
github
https://github.com/microsoft/TypeScript
src/lib/es2024.arraybuffer.d.ts
{ "name": "plugin-v1", "version": "1.0.0", "type": "composer-plugin", "autoload": { "psr-0": { "Installer": "" } }, "extra": { "class": "Installer\\Plugin" }, "require": { "composer-plugin-api": "^2.0" } }
json
github
https://github.com/composer/composer
tests/Composer/Test/Plugin/Fixtures/plugin-v1/composer.json
{% load admin_list %} {% load i18n %} <nav class="paginator" aria-labelledby="pagination"> <h2 id="pagination" class="visually-hidden">{% blocktranslate with name=cl.opts.verbose_name_plural %}Pagination {{ name }}{% endblocktranslate %}</h2> {% if pagination_required %} <ul> {% for i in page_range %} ...
html
github
https://github.com/django/django
django/contrib/admin/templates/admin/pagination.html
/* * Active memory defragmentation * Try to find key / value allocations that need to be re-allocated in order * to reduce external fragmentation. * We do that by scanning the keyspace and for each pointer we have, we can try to * ask the allocator if moving it to a new address will help reduce fragmentation. * ...
c
github
https://github.com/redis/redis
src/defrag.c
package containerd import ( "context" "fmt" "io" "sync" "syscall" containerd "github.com/containerd/containerd/v2/client" "github.com/containerd/containerd/v2/pkg/cio" cerrdefs "github.com/containerd/errdefs" "github.com/containerd/log" "github.com/moby/moby/v2/daemon/internal/libcontainerd" libcontainerdt...
go
github
https://github.com/moby/moby
daemon/internal/plugin/executor/containerd/containerd.go
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
unknown
codeparrot/codeparrot-clean
# ''' # Created on Jan 4, 2014 # # @author: Chris # # # # # ''' # # import os # import sys # import unittest # from argparse import ArgumentParser # # import wx # # # class ComponentsTest(unittest.TestCase): # def setUp(self): # parser = ArgumentParser(description='Example Argparse Program') # parser.add_argu...
unknown
codeparrot/codeparrot-clean
from tower import ugettext_lazy as _ class SECTION_ADDONS: short = 'addons' pretty = _(u'Add-ons') twitter = 'twitter-addons' updates = 'updates-addons' class SECTION_MOZILLA: short = 'mozilla' pretty = _(u'Mozilla') twitter = 'twitter-mozilla' updates = 'updates-mozilla' class SECTIO...
unknown
codeparrot/codeparrot-clean
--- - hosts: all gather_facts: false tasks: - name: Ensure we can see group_vars from path with comma assert: that: - inventory_var_from_path_with_commas is defined - inventory_var_from_path_with_commas == 'here'
unknown
github
https://github.com/ansible/ansible
test/integration/targets/path_with_comma_in_inventory/playbook.yml
#TODO Test!!!! __author__ = "Paul Council, Anand Patel" __version__ = "sprint1" # imports from ServerPackage import Game class RockPaperScissorsLizardSpock(Game.Game): """ this class simulates two players playing a game of rock, paper, scissors, lizard, spock """ def __init__(self): self.name = "Roc...
unknown
codeparrot/codeparrot-clean
## Input ```javascript import {createHookWrapper, mutate, mutateAndReturn} from 'shared-runtime'; function useHook({value}) { const x = mutateAndReturn({value}); const obj = { getValue() { return value; }, }; mutate(x); return obj; } export const FIXTURE_ENTRYPOINT = { fn: createHookWrapper(...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/object-method-shorthand-aliased-mutate-after.expect.md
import oembed from oembed.providers import DjangoDateBasedProvider, DjangoProvider from oembed.utils import size_to_nearest from oembed.tests.models import Blog, Category, Rich class BlogProvider(DjangoDateBasedProvider): resource_type = 'link' class Meta: model = Blog named_view = 'test_blog...
unknown
codeparrot/codeparrot-clean
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import os import subprocess import numpy as np from scipy import sparse from scipy.spatial.distance import cdist, pdist from scipy.stats import pearsonr def _fast_cross_3d(x, y): """Compute cross pro...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # generated by wxGlade 0.6.3 on Sat Feb 09 13:41:21 2008 import wx # begin wxGlade: extracode # end wxGlade class dicomRDRViewFrame(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: dicomRDRViewFrame.__init__ kwds["style"] = wx.CAPTI...
unknown
codeparrot/codeparrot-clean
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
python
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/tests/add_n_test.py
#!/usr/bin/env python # Copyright (c) 2006 Bermi Ferrer Martinez # info at bermi dot org # See the end of this file for the free software, open source license # (BSD-style). import re from .Base import Base class English (Base): """ Inflector for pluralize and singularize English nouns. This is the defa...
unknown
codeparrot/codeparrot-clean
# 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
# 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
#include "commands.h" #include "server.h" #define MAKE_CMD(name,summary,complexity,since,doc_flags,replaced,deprecated,group,group_enum,history,num_history,tips,num_tips,function,arity,flags,acl,key_specs,key_specs_num,get_keys,numargs) name,summary,complexity,since,doc_flags,replaced,deprecated,group_enum,history,num...
c
github
https://github.com/redis/redis
src/commands.c
""" Unified interfaces to root finding algorithms. Functions --------- - root : find a root of a vector function. """ from __future__ import division, print_function, absolute_import __all__ = ['root'] import numpy as np from scipy._lib.six import callable from warnings import warn from .optimize import MemoizeJa...
unknown
codeparrot/codeparrot-clean
<div ngCombobox filterMode="auto-select"> <div #origin class="retro-autocomplete"> <span class="search-icon material-symbols-outlined" translate="no" aria-hidden="true" >search</span > <input aria-label="Label dropdown" placeholder="Select a country" [(ngModel)]="query" ngCom...
html
github
https://github.com/angular/angular
adev/src/content/examples/aria/autocomplete/src/basic/retro/app/app.html
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
docs/examples/imap-append.c
#!/usr/bin/env python '''Test that window can be set fullscreen and back again. Expected behaviour: One window will be opened. - press "f" to enter fullscreen mode. - press "g" to leave fullscreen mode. All events will be printed to the terminal. Close the window or press ESC to end the test....
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0 %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/allwinner,sun9i-a80-usb-mod-clk.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Allwinner A80 USB Module Clock maintainers: - Chen-Yu Tsai <wens@csie.org> - Maxime Ripard <mripard@kernel.org> deprecated:...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-usb-mod-clk.yaml
#!/usr/bin/python import random import datetime import os import sys import time from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand from django.db import connection, reset_queries from django.db.models import Q from django.db.transaction import commit_...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand from cadastro.models import Cliente, Cidade, Ramo, Bairro from optparse import make_option import os, csv, datetime from django.utils.encoding import smart_unicode, smart_str class Command(BaseCommand): help = ''' Sincroniza par...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Alias.created' db.add_column('hansard_alias', 'created', self.gf('django.db.models.fields.DateTime...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Doctrine\Tests\SchemaListener; use Doctrine\DBAL\Configu...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/Doctrine/Tests/SchemaListener/LockStoreSchemaListenerTest.php
# (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
unknown
codeparrot/codeparrot-clean
"use strict"; const supportsClassStaticBlock = require("../../../helpers/supportsClassStaticBlock"); module.exports = () => supportsClassStaticBlock();
javascript
github
https://github.com/webpack/webpack
test/cases/inner-graph/extend-class/test.filter.js
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016-2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.5 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the 'License') # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2017 OSGeo # # 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ hdfs.py is a python client for the thrift interface to HDFS. 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 Unles...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/kernels/diag_op.h
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test BIP68 implementation (mempool only) # from test_framework.test_framework import BitcoinTestFram...
unknown
codeparrot/codeparrot-clean
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from...
unknown
codeparrot/codeparrot-clean
// Internal PyTime_t C API: see Doc/c-api/time.rst for the documentation. // // The PyTime_t type is an integer to support directly common arithmetic // operations such as t1 + t2. // // Time formats: // // * Seconds. // * Seconds as a floating-point number (C double). // * Milliseconds (10^-3 seconds). // * Microsecon...
c
github
https://github.com/python/cpython
Include/internal/pycore_time.h
"""A central mechanism for shop-wide settings which have defaults. Repurposed from Sphene Community Tools: http://sct.sphene.net """ from django.conf import settings satchmo_settings_defaults = { # Only settings for core `satchmo` applications are defined here, # (or global settings) -- all other defaults sh...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package vault import ( "testing" "time" "github.com/hashicorp/vault/vault/cert_count" "github.com/hashicorp/vault/version" "github.com/stretchr/testify/require" ) func init() { // The BuildDate is set as part of the build process in CI so ...
go
github
https://github.com/hashicorp/vault
vault/testing_util.go
# -*- coding: utf-8 -*- from reportlab.graphics.barcode import createBarcodeDrawing from reportlab.lib.pagesizes import A4 from reportlab.lib.units import inch, mm from reportlab.platypus.doctemplate import NextPageTemplate, FrameBreak from reportlab.platypus.flowables import Spacer, HRFlowable, PageBreak, Flowable fro...
unknown
codeparrot/codeparrot-clean
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import argparse import os import sys from functools import partial from mach.decorators import ( CommandProvider, ...
unknown
codeparrot/codeparrot-clean
''' Copyright 2017 Dell Inc. or its subsidiaries. All Rights Reserved. Purpose: This utility lists the number and type of compute nodes in a stack. ''' import fit_path # NOQA: unused import import fit_common class test_list_nodes(fit_common.unittest.TestCase): def test_node_list(self): fit_common.VERB...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from sqlparse2.sql import Statement, Token from sqlparse2 import tokens as T class StatementFilter: "Filter that split stream at individual statements" def __init__(self): self._in_declare = False self._in_dbldollar = False self._is_create = False self....
unknown
codeparrot/codeparrot-clean
<!--[--><!--[!--><!---->loading...<!--]--><!--]-->
html
github
https://github.com/sveltejs/svelte
packages/svelte/tests/hydration/samples/boundary-pending-attribute/_expected.html
// 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
model/metadata/metadata.go
@page vertical { size: A4 portrait; @top-center { content: "Vertical"; } } @page :right { @top-center { content: "Preliminary edition"; } @bottom-center { content: counter(page); } } @page :first { color: green; font-size: 20pt; @top-left { content: "foo"; color: blue; } ...
css
github
https://github.com/sveltejs/svelte
packages/svelte/tests/css/samples/supports-nested-page/expected.css
from collections import namedtuple import unittest import discord from gather.discord_gather import DiscordGather, report from .helper import async_test, get_mock_coro class TestDiscordGather(unittest.TestCase): @async_test async def test_on_ready(self): gather = DiscordGather('token') gather.c...
unknown
codeparrot/codeparrot-clean
# Check every path through every method of UserDict from test import support, mapping_tests import collections d0 = {} d1 = {"one": 1} d2 = {"one": 1, "two": 2} d3 = {"one": 1, "two": 3, "three": 5} d4 = {"one": None, "two": None} d5 = {"one": 1, "two": 1} class UserDictTest(mapping_tests.TestHashMappingProtocol): ...
unknown
codeparrot/codeparrot-clean
# Authors: Manoj Kumar mks542@nyu.edu # License: BSD 3 clause import numpy as np from scipy import optimize, sparse from ..base import BaseEstimator, RegressorMixin from .base import LinearModel from ..utils import check_X_y from ..utils import check_consistent_length from ..utils import axis0_safe_slice from ..util...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 Adriano Monteiro Marques # # Authors: Amit pal<amix.pal@gmail.com> # Piotrek Wasilewski <wasilewski.piotrek@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # ______ Releasing children from poverty _ # / ____/___ ____ ___ ____ ____ ___________(_)___ ____ # / / / __ \/ __ `__ \/ __ \/ __ `/ ___/ ___/ / __ \/ __ \ # / /___/ /_/ / / / / / / /_/...
unknown
codeparrot/codeparrot-clean
""" Methods to interact with the Jenkins API to perform various tasks. """ from __future__ import absolute_import from __future__ import division import logging import math import backoff from jenkinsapi.jenkins import Jenkins from jenkinsapi.custom_exceptions import JenkinsAPIException from requests.exceptions impor...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2015 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or m...
unknown
codeparrot/codeparrot-clean
# -*- coding: UTF-8 -*- # Copyright 2012-2018 Rumma & Ko Ltd # License: BSD (see file COPYING for details) """ Creates minimal accounting demo data: - a minimal accounts chart - some journals """ from __future__ import unicode_literals import logging logger = logging.getLogger(__name__) from django.conf import se...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- #****************************************************************************** # # Project: GDAL # Purpose: Command line raster calculator with numpy syntax # Author: Chris Yesson, chris.yesson@ioz.ac.uk # #***********************************************************...
unknown
codeparrot/codeparrot-clean
import os import re from webob import Request, Response from webob import exc from tempita import HTMLTemplate VIEW_TEMPLATE = HTMLTemplate("""\ <html> <head> <title>{{page.title}}</title> </head> <body> <h1>{{page.title}}</h1> {{if message}} <div style="background-color: #99f">{{message}}</div> {{endif}} <div>{...
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
# frozen_string_literal: true require "test_helper" class ActionText::AttachableTest < ActiveSupport::TestCase test "as_json is a hash when the attachable is persisted" do freeze_time do attachable = ActiveStorage::Blob.create_after_unfurling!(io: StringIO.new("test"), filename: "test.txt", key: 123) ...
ruby
github
https://github.com/rails/rails
actiontext/test/unit/attachable_test.rb
""" Provide pre-made queries on top of the recorder component. For more details about this component, please refer to the documentation at https://home-assistant.io/components/history/ """ import asyncio from collections import defaultdict from datetime import timedelta from itertools import groupby import voluptuous ...
unknown
codeparrot/codeparrot-clean
/** * Various {@link org.springframework.aop.framework.autoproxy.TargetSourceCreator} * implementations for use with Spring's AOP auto-proxying support. */ @NullMarked package org.springframework.aop.framework.autoproxy.target; import org.jspecify.annotations.NullMarked;
java
github
https://github.com/spring-projects/spring-framework
spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/package-info.java
#!/usr/bin/env python from __future__ import absolute_import from __future__ import unicode_literals import sys import django from django.conf import settings settings.configure( DEBUG=True, AUTH_USER_MODEL='testdata.CustomUser', DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sq...
unknown
codeparrot/codeparrot-clean
""" ******************************************************* * * checkParams - CHECK USER PROVIDED ESTIMATES FOR PARAMETERS * * License: Apache 2.0 * Written by: Michael Slugocki * Created on: April 14, 2018 * Last updated: September 13, 2018 * ******************************************************* """ #...
unknown
codeparrot/codeparrot-clean
# this file uses the {{ extra }} variable
python
github
https://github.com/django/django
tests/admin_scripts/custom_templates/project_template/additional_dir/extra.py
/* Copyright 2022 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/distributed_runtime/preemption/preemption_sync_manager.h
""" A Vimwiki target. https://code.google.com/p/vimwiki/ """ from targets import _ NAME = _('Vimwiki document') TYPE = 'wiki' HEADER = """\ %%title %(HEADER1)s ## by %(HEADER2)s in %(HEADER3)s %%toc %(HEADER1)s """ TAGS = { 'title1' : '= \a =' , 'title2' : '== \...
unknown
codeparrot/codeparrot-clean
"""Contains code for an FadeCandy hardware for RGB LEDs.""" # fadecandy.py # Mission Pinball Framework # Written by Brian Madden & Gabe Knuth # Released under the MIT License. (See license info at the end of this file.) # Documentation and more info at http://missionpinball.com/mpf import logging import json import s...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # ____________ # ___/ | \_____________ _ _ ___ # / ___/ | _ __ _ _| | ___ __ _ __| | \ # / \___/ ______/ | '_ \ || | |__/ _ \/ _` / _` | \ # \ ◯ | | .__/\_, |____\___/\__,_\__,_| / # \_______\ /_______|_| |__/...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.invocation; import java.io.Serializable; import org.mockito.invocation.DescribedInvocation; import org.mockito.invocation.Location; import org.mockito.invocation.StubInf...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/internal/invocation/StubInfoImpl.java