code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
'''
Tests for fileinput module.
Nick Mathewson
'''
import os
import sys
import re
import fileinput
import collections
import builtins
import unittest
try:
import bz2
except ImportError:
bz2 = None
try:
import gzip
except ImportError:
gzip = None
from io import BytesIO, StringIO
from fileinput import F... | 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... | python | github | https://github.com/apache/airflow | airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_structure.py |
/*
* Copyright (C) 2008 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-testlib/src/com/google/common/collect/testing/features/CollectionFeature.java |
#!/usr/bin/env python
# Copyright (c) 2012 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.
""" Parser for PPAPI IDL """
#
# IDL Parser
#
# The parser is uses the PLY yacc library to build a set of parsing rules based
# on... | unknown | codeparrot/codeparrot-clean | ||
# ----------------------------------------------------------------------
# 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 apply:
#
# This progra... | unknown | codeparrot/codeparrot-clean | ||
MASK_IDX = dict([(s,i) for i, s in enumerate(['F3', 'FC6', 'P7', 'T8', 'F7', 'F8', 'T7', 'P8', 'AF4', 'F4', 'AF3', 'O2', 'O1', 'FC5', 'qual'])])
EPOC_MASK = {
'F3': [10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7],
'FC6': [214, 215, 200, 201, 202, 203, 204, 205, 206, 207, 192, 193, 194, 195],
'P7': [84, 85, 86, ... | unknown | codeparrot/codeparrot-clean | ||
import requests
import json
import sys
import uuid
LOGIN_URL = 'https://simplisafe.com/mobile/login/'
LOGOUT_URL = 'https://simplisafe.com/mobile/logout'
LOCATIONS_URL = 'https://simplisafe.com/mobile/$UID$/locations'
DASHBOARD_URL = 'https://simplisafe.com/mobile/$UID$/sid/$LID$/dashboard'
EVENTS_URL = 'https://simpl... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python2.4
#
# 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 o... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# Authors:
# Sam Hewitt <hewittsamuel@gmail.com>
# Guillaume Mazoyer <gmazoyer@gravitons.in>
#
import getopt
import sys
from launchpadlib.launchpad import Launchpad
# Define if we can use ASCII art tables
use_table = True
try:
from texttable import Texttable
except:
use_table = False
... | unknown | codeparrot/codeparrot-clean | ||
'''
make_versions -- index many versions of a project
ALPHA code, will need modification for general use.
'''
import itertools
import re
import subprocess
import sys
import git
from django.core.management.base import BaseCommand
from natsort import natsorted
from app import models
class Project(object):
def __... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/bash
set -euo pipefail
STATUS=$(curl -s "https://api.github.com/repos/elastic/elasticsearch/branches/$BUILDKITE_BRANCH" | jq '.protected')
echo "Branch $BUILDKITE_BRANCH protection status is: $STATUS"
if [[ "$STATUS" == "false" ]]; then
echo "Development branch $BUILDKITE_BRANCH is not set as protected in Gi... | unknown | github | https://github.com/elastic/elasticsearch | .buildkite/scripts/branch-protection.sh |
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Title: libcurl-url
Section: 3
Source: libcurl
See-also:
- CURLOPT_URL (3)
- curl_url (3)
- curl_url_cleanup (3)
- curl_url_dup (3)
- curl_url_get (3)
- curl_url_set (3)
- curl_url_strerror (3)
Protocol:
- All
Ad... | unknown | github | https://github.com/curl/curl | docs/libcurl/libcurl-url.md |
#!/usr/bin/env python
# Copyright (c) 2012 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.
"""
This script runs every build as the first hook (See DEPS). If it detects that
the build should be clobbered, it will delete the... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-boot | core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataException.java |
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.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, eit... | unknown | codeparrot/codeparrot-clean | ||
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations \u0026 Alerts",
"type": "dashb... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/testdata/output/latest_version/v41.time_picker_no_time_options.v42.json |
# encoding: utf-8
from south.v2 import DataMigration
class Migration(DataMigration):
depends_on = (('socialaccount', '0002_genericmodels'),)
def forwards(self, orm):
# Migrate FB apps
app_id_to_sapp = {}
for app in orm.FacebookApp.objects.all():
sapp = orm['socialaccount.S... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Test that it's OK to have C code that does nothing other than
// initialize a global variable. This used to fail with gccgo.
package gcc68255
/*
#include "... | go | github | https://github.com/golang/go | src/cmd/cgo/internal/test/gcc68255/a.go |
# 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 applica... | python | github | https://github.com/tensorflow/tensorflow | tensorflow/compiler/tests/tensor_array_ops_test.py |
import sys
from artiq import *
class Mandelbrot(EnvExperiment):
"""Mandelbrot set demo"""
def build(self):
self.setattr_device("core")
def col(self, i):
sys.stdout.write(" .,-:;i+hHM$*#@ "[i])
def row(self):
print("")
# based on: http://warp.povusers.org/MandScripts/pyt... | unknown | codeparrot/codeparrot-clean | ||
# Set up your development environment
This folder contains useful scripts and configuration so you can:
- Configure data sources in Grafana for development.
- Configure dashboards for development and test scenarios.
- Set up an SMTP Server + Web Interface for viewing and testing emails.
- Create docker-compose file w... | unknown | github | https://github.com/grafana/grafana | devenv/README.md |
// Copyright 2018 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package sql
import (
"bytes"
"compress/zlib"
"context"
"encoding/base64"
"fmt"
"net/url"
"strings"
"github.com/cockroachdb/cockroach/pkg/featureflag"
"github.... | go | github | https://github.com/cockroachdb/cockroach | pkg/sql/opt_exec_factory.go |
#!/usr/bin/env python
from __future__ import print_function
import sys
import os
import os.path
from datetime import datetime, timedelta
simple = os.environ.get('MWS_MERCHANT', None)
if not simple:
print("""
Please set the MWS_MERCHANT environmental variable
to your Merchant or SellerId to enable M... | unknown | codeparrot/codeparrot-clean | ||
import { test } from '../../test';
export default test({
html: `
<div>
Hello
<p>bar</p>
<p>foo</p>
</div>
`
}); | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/component-slot-component-named/_config.js |
import { defineConfig } from 'tsup'
export default defineConfig({
format: ['iife'],
clean: true,
minify: true,
entry: ['src/index.ts'],
noExternal: [/.*/],
loader: {
'.css': 'text',
},
define: {
'process.env.NODE_ENV': '"production"',
'process.env.FEATURES_ENV': '"stable"',
},
esbuildPl... | typescript | github | https://github.com/tailwindlabs/tailwindcss | packages/@tailwindcss-browser/tsup.config.ts |
# Copyright 2017 Telstra Open Source
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
from rest_framework import status
from rest_framework.test import APITestCase
from .models import Empresa, Calificacion
from .views import *
class EmpresaRESTTests(APITestCase):
def test_crear_empresa(self):
data = { "nombre" : "test", "ciudad" : "ciudadtest", "sector" : "sectortest" }
response = self.client.post... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
Templates for automating the design of different wafer styles.
.. note::
Copyright 2009-2012 Lucas Heitzmann Gabrielli
Copyright 2013 Andrew G. Mark
gdsCAD (based on gdspy) is released under the terms of the GNU GPL
"""
# TODO: Make it more pythonic, create separate classes f... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2014 NEC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2015 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2015 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2015 David Barragán <bameda@dbarragan.com>
# This program 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 F... | 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 | cli/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/CommandRunnerTests.java |
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | python | github | https://github.com/tensorflow/tensorflow | tensorflow/core/tfrt/saved_model/tests/gen_dtype_coverage_v1.py |
# Scan an Apple header file, generating a Python file of generator calls.
import sys
from bgenlocations import TOOLBOXDIR, BGENDIR
sys.path.append(BGENDIR)
from scantools import Scanner_OSX
LONG = "CoreGraphics"
SHORT = "cg"
OBJECTS = ("CGContextRef",
)
# ADD object typenames here
def main():
inp... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/python3
# -*- coding: iso-8859-15 -*-
# *------------------------------------------------------------------
# * axl_zeep.py
# *
# * Cisco AXL Python
# *
# * Copyright (C) 2021 Carlos Sanz <carlos.sanzpenas@gmail.com>
# *
# * This program is free software; you can redistribute it and/or
# * modify it under... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants_test.cont... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
"""Common credentials classes and constructors."""
from __future__ import print_function
import datetime
import json
import os
import threading
import httplib2
import oauth2client
import oauth2client.client
import oauth2client.gce
import oauth2client.locked_file
import oauth2client.multistore_fi... | unknown | codeparrot/codeparrot-clean | ||
import warnings
from sqlalchemy.orm import create_session
from sqlalchemy import select, func
from zkpylons import model
from zkpylons.tests import TestBase, monkeypatch
class ModelTest(TestBase):
"""Base class for all data model domain object tests.
"""
def setUp(self):
super(ModelTest, self).s... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
#include <ngx_mail.h>
static void *ngx_mail_core_create_main_conf(ngx_conf_t *cf);
static void *ngx_mail_core_create_srv_conf(ngx_conf_t *cf);
static char *ngx_mail_core_merge_srv_conf... | c | github | https://github.com/nginx/nginx | src/mail/ngx_mail_core_module.c |
""" Defines classes and functions for working with Qt's rich text system.
"""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
# Standard library imports
import io
import os
import re
# System librar... | unknown | codeparrot/codeparrot-clean | ||
// Helper file to include dispatched functions declaration:
//
// Usage:
// #define CV_CPU_SIMD_FILENAME "<filename>.simd.hpp"
// #define CV_CPU_DISPATCH_MODE AVX2
// #include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp"
// #define CV_CPU_DISPATCH_MODE SSE2
// #include "opencv2/core/p... | unknown | github | https://github.com/opencv/opencv | modules/core/include/opencv2/core/private/cv_cpu_include_simd_declarations.hpp |
# ===============================================================================
# Copyright 2014 Jake Ross
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
c-ares security
===============
This document is intended to provide guidance on how security vulnerabilities
should be handled in the c-ares project.
Publishing Information
----------------------
All known and public c-ares vulnerabilities will be listed on [the c-ares web
site](https://c-ares.org/vulns.html).
Sec... | unknown | github | https://github.com/nodejs/node | deps/cares/SECURITY.md |
# Copyright (C) 2005, 2006 Martin von Löwis
# Licensed to PSF under a Contributor Agreement.
# The bdist_wininst command proper
# based on bdist_wininst
"""
Implements the bdist_msi command.
"""
import sys, os
from distutils.core import Command
from distutils.dir_util import remove_tree
from distutils.sysconfig import... | unknown | codeparrot/codeparrot-clean | ||
__author__ = 'SmileyBarry'
from .core import APIConnection, SteamObject, store
from .decorators import cached_property, INFINITE
class SteamApp(SteamObject):
def __init__(self, appid, name=None, owner=None):
self._id = appid
if name is not None:
import time
self._cache = di... | unknown | codeparrot/codeparrot-clean | ||
import pytest
from api.base.settings.defaults import API_BASE
from framework.auth.core import Auth
from osf.models import NodeLog
from osf_tests.factories import (
ProjectFactory,
AuthUserFactory,
)
from rest_framework import exceptions
from tests.utils import assert_latest_log, assert_latest_log_not
from osf.... | unknown | codeparrot/codeparrot-clean | ||
"""subprocess management for dak
@copyright: 2013, Ansgar Burchardt <ansgar@debian.org>
@license: GPL-2+
"""
# 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... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django_pgjson.fields
class Migration(migrations.Migration):
dependencies = [
('tasks', '0005_auto_20150114_0954'),
('issues', '0004_auto_20150114_0954'),
('userstories', '0009_r... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2017 The Abseil 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 by applicable law or agr... | c | github | https://github.com/mysql/mysql-server | extra/abseil/abseil-cpp-20230802.1/absl/synchronization/internal/thread_pool.h |
#!/usr/bin/env python
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import os
import sys
import tempfile
import zipfile
_PLATFORMS = ["linux-x64", "android-arm"]
_APPS = ["network_servic... | unknown | codeparrot/codeparrot-clean | ||
import { assert_ok, test } from '../../test';
export default test({
props: {
things: {
foo: ['animal', 'vegetable', 'mineral']
}
},
snapshot(target) {
const ul = target.querySelector('ul');
assert_ok(ul);
const lis = ul.querySelectorAll('li');
return {
ul,
lis0: lis[0],
lis1: lis[1],
li... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/hydration/samples/each-block-arg-clash/_config.js |
# coding:utf-8
import json
from django_webtest import WebTest
from django.core.urlresolvers import reverse
from django_factory_boy import auth
from journalmanager.tests import modelfactories
class DownloadMarkupFilesTests(WebTest):
def setUp(self):
self.user = auth.UserF(is_active=True)
self.col... | unknown | codeparrot/codeparrot-clean | ||
"""
Unit tests for stem.descriptor.export.
"""
import unittest
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
import stem.prereq
import test.runner
from stem.descriptor.export import export_csv, export_csv_file
from test.mocking import (
get_relay_server_descriptor,
get_brid... | unknown | codeparrot/codeparrot-clean | ||
from lxml import etree
from xmodule.editing_module import XMLEditingDescriptor
from xmodule.xml_module import XmlDescriptor
import logging
import sys
from xblock.fields import String, Scope
from exceptions import SerializationError
log = logging.getLogger(__name__)
class RawDescriptor(XmlDescriptor, XMLEditingDescrip... | unknown | codeparrot/codeparrot-clean | ||
"""Support for switches using the PiFace Digital I/O module on a RPi."""
import logging
import voluptuous as vol
from homeassistant.components import rpi_pfio
from homeassistant.components.switch import PLATFORM_SCHEMA
from homeassistant.const import ATTR_NAME, DEVICE_DEFAULT_NAME
import homeassistant.helpers.config_... | unknown | codeparrot/codeparrot-clean | ||
import re
def parse(markdown):
lines = markdown.split('\n')
html = ''
in_list = False
in_list_append = False
for line in lines:
result = parse_line(line, in_list, in_list_append)
html += result['line']
in_list = result['in_list']
in_list_append = result['in_list_appe... | unknown | codeparrot/codeparrot-clean | ||
module.exports = {
__esModule: true,
abc: "abc",
default: "default"
}; | javascript | github | https://github.com/webpack/webpack | test/cases/cjs-tree-shaking/namespace/namespace-via-literal.js |
"""Copyright 2011 The University of Michigan
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 writi... | unknown | codeparrot/codeparrot-clean | ||
from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import setup
class TemplateTagTests(SimpleTestCase):
@setup({"templatetag01": "{% templatetag openblock %}"})
def test_templatetag01(self):
output = self.engine.render_to_string("templatetag01")
... | python | github | https://github.com/django/django | tests/template_tests/syntax_tests/test_template_tag.py |
#!/usr/bin/python24
import cgi
import time
import MySQLdb
from traceback import format_exception
from sys import exc_info
from string import split
from string import strip
from sys import exit
from urllib import urlencode
import urllib2
DATADIR = "/home/user/data/"
PP_URL = "https://www.sandbox.paypal.com/cgi-bin/webs... | unknown | codeparrot/codeparrot-clean | ||
{
"applyable": true,
"complete": true,
"configuration": {
"provider_config": {
"tfcoremock": {
"full_name": "registry.terraform.io/hashicorp/tfcoremock",
"name": "tfcoremock",
"version_constraint": "0.1.1"
}
},
"root_module": {
"resources": [
{
... | json | github | https://github.com/hashicorp/terraform | testing/equivalence-tests/outputs/basic_map_null/plan.json |
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | go | github | https://github.com/kubernetes/kubernetes | pkg/apis/rbac/v1/defaults.go |
[data-foo|='bar'].svelte-xyz {
color: red;
} | css | github | https://github.com/sveltejs/svelte | packages/svelte/tests/css/samples/omit-scoping-attribute-attribute-selector-pipe-equals/expected.css |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""
Test Creator role with Program scoped roles
"""
from ggrc import db
from ggrc.models import all_models
from integration.ggrc import TestCase
from integration.ggrc.api_helper import Api
from integration.... | 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\Component\DependencyInjection\Loader\Configurator;
use Symfony\... | php | github | https://github.com/symfony/symfony | src/Symfony/Bundle/FrameworkBundle/Resources/config/fragment_renderer.php |
#!/usr/bin/python
#
# Copyright (C) 2006, 2007, 2010 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Copyright 2012, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | unknown | codeparrot/codeparrot-clean | ||
"""Spark SQL agent.""" | python | github | https://github.com/langchain-ai/langchain | libs/langchain/langchain_classic/agents/agent_toolkits/spark_sql/__init__.py |
# coding=utf-8
import re
_RE_FIND_FIRST_CAP = re.compile('(.)([A-Z][a-z]+)')
_RE_SPAN_OF_CAPS = re.compile('([a-z0-9])([A-Z])')
def camelcase_to_underscore(name):
return _RE_SPAN_OF_CAPS.sub(r'\1_\2',
_RE_FIND_FIRST_CAP.sub(r'\1_\2', name)
).lower()... | unknown | codeparrot/codeparrot-clean | ||
import {ChangeDetectionStrategy, Component, signal} from '@angular/core';
import {email, form, FormField, required} from '@angular/forms/signals';
interface LoginData {
email: string;
password: string;
rememberMe: boolean;
}
@Component({
selector: 'app-root',
templateUrl: './app.html',
styleUrl: './app.cs... | typescript | github | https://github.com/angular/angular | adev/src/content/tutorials/signal-forms/steps/3-add-validation/answer/src/app/app.ts |
Archive of books from {{ year }}. {{ object_list|length }} books found. | html | github | https://github.com/django/django | tests/generic_views/templates/generic_views/book_archive_year.html |
#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that .so files that are order only dependencies are specified by
their install location rather than by their alias.
"""
# Pyth... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
from imaplib import IMAP4
import time
import re
import json
import daemon
# change these variable values
DEBUG = False
HOSTNAME = 'mail.server.dom'
USERNAME = 'account@server.dom'
PASSWORD = 'passsword'
MAILBOX = 'Inbox'
DATAFILE='/tmp/led.db'
NEWMAIL_OFFSET = 1 # my unread messages never goes... | unknown | codeparrot/codeparrot-clean | ||
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Various utilities and cookbook-like things.
"""
# STDLIB
import codecs
import contextlib
import io
import re
import gzip
from distutils import version
__all__ = [
'convert_to_writable_filelike',
'stc_reference_frames',
'coerce_range_list... | unknown | codeparrot/codeparrot-clean | ||
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
class NonceRuntimeModule extends RuntimeModule {
constructor() {
super("nonce", RuntimeModule.ST... | javascript | github | https://github.com/webpack/webpack | lib/runtime/NonceRuntimeModule.js |
import { ok, test } from '../../test';
export default test({
get props() {
return {
/** @type {string | number | null | undefined} */
testName1: 'test1',
/** @type {string | number | null | undefined} */
testName2: 'test2'
};
},
html: '<div class="test1test2 svelte-70s021"></div>',
async test({ a... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/attribute-null-func-classnames-with-style/_config.js |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Trond Hindenes <trond@hindenes.com>, and others
#
# 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 versio... | unknown | codeparrot/codeparrot-clean | ||
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2010 Benny Malengier
#
# 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 | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | unknown | codeparrot/codeparrot-clean | ||
from operator import itemgetter
import logging
try:
from django.apps import apps
get_model = apps.get_model
except ImportError:
# django < 1.7 support
from django.db.models import get_model
from django.conf import settings
try:
from django.contrib.admin.utils import get_fields_from_path
except Impo... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2014 Freescale Semiconductor
#
# 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 | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# DXR documentation build configuration file, created by
# sphinx-quickstart on Fri Mar 14 18:40:04 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
module ActiveRecord
module Scoping
extend ActiveSupport::Concern
included do
include Default
include Named
end
module ClassMethods # :nodoc:
# Collects attributes from scopes that should be applied when creating
# an AR instance for the particul... | ruby | github | https://github.com/rails/rails | activerecord/lib/active_record/scoping.rb |
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/maxim,max77802.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim MAX77802 Power Management IC
maintainers:
- Javier Martinez Canillas <javier@dowhile0.org>
- Krzysztof Kozlowski <krzk@kernel.org>
... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/mfd/maxim,max77802.yaml |
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.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 ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
pygments.lexers.compiled
~~~~~~~~~~~~~~~~~~~~~~~~
Just export lexer classes previously contained in this module.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexers.jvm import JavaLexer, Sc... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
# Copyright (c) 2015-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 PrioritiseTransaction code
#
from test_framework.test_framework import BitcoinTestFramework
fro... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v1beta1",
"metadata": {
"name": "v0alpha1.timeseries-y-ticks-zero-decimals.v42"
},
"spec": {
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Gr... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/panel-timeseries/v0alpha1.timeseries-y-ticks-zero-decimals.v42.v1beta1.json |
# Copyright 2013 IBM Corp.
# 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 app... | unknown | codeparrot/codeparrot-clean | ||
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | unknown | codeparrot/codeparrot-clean | ||
#
# (C) Copyright 2003-2011 Jacek Konieczny <jajcus@jajcus.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License Version
# 2.1 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be u... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2011 OpenStack Foundation
# Copyright 2012 Red Hat, 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/... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2011 Tencent Inc.
# All rights reserved.
#
# Author: Michaelpeng <michaelpeng@tencent.com>
# Date: October 20, 2011
"""
This is the test module to test query function of blade.
"""
import blade_test
class TestQuery(blade_test.TargetTest):
"""Test cc_library """
def setUp(self):
""... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2020 The Weakly-Supervised Control 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 la... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build cgo && windows && !internal
package cgotest
import "testing"
func TestCallbackCallersSEH(t *testing.T) { testCallbackCallersSEH(t) } | go | github | https://github.com/golang/go | src/cmd/cgo/internal/test/seh_windows_test.go |
import os
from pypers.core.step import CmdLineStep
from pypers.utils import utils
from pypers.utils.samplesheet import SampleSheet
class CasavaDemux(CmdLineStep):
spec = {
"name": "CasavaDemux",
"version": "1.8.2",
"descr": [
"Runs Casava demultiplexing"
],
"url"... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2017 - 2025 R. Thomas
* Copyright 2017 - 2025 Quarkslab
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless req... | unknown | github | https://github.com/nodejs/node | deps/LIEF/include/LIEF/ELF/Relocation.hpp |
from __future__ import unicode_literals
from django.db import transaction
from django.test import TestCase
from django.utils import six
from .models import Article, Publication
class ManyToManyTests(TestCase):
def setUp(self):
# Create a couple of Publications.
self.p1 = Publication.objects.crea... | unknown | codeparrot/codeparrot-clean | ||
#
# Author: Gregory Fleischer (gfleischer@gmail.com)
#
# Copyright (c) 2011 RAFT Team
#
# This file is part of RAFT.
#
# RAFT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or... | unknown | codeparrot/codeparrot-clean | ||
import Logging
import NIOCore
import NIOHTTP1
import Foundation
import X509
final class HTTPServerRequestDecoder: ChannelDuplexHandler, RemovableChannelHandler {
typealias InboundIn = HTTPServerRequestPart
typealias InboundOut = Request
typealias OutboundIn = Never
enum RequestState {
case rea... | swift | github | https://github.com/vapor/vapor | Sources/Vapor/HTTP/Server/HTTPServerRequestDecoder.swift |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.