code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
import attr
from widgetastic.exceptions import NoSuchElementException
from wrapanapi.systems import VMWareSystem
from cfme.common.candu_views import VMUtilizationView
from cfme.common.provider import DefaultEndpoint
from cfme.common.provider import DefaultEndpointForm
from cfme.common.provider import VMRCEndpoint
from... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: 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 'UserProfile.country'
db.add_column('auth_userprofile', 'country',
self.... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
try:
import simplejson as json
except ImportError:
import json
import logging
import werkzeug
from openerp import http
from openerp.http import request
_logger = logging.getLogger(__name__)
class SipsController(http.Controller):
_notify_url = '/payment/sips/ipn/'
_return_url ... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package main
import (
"os"
hclog "github.com/hashicorp/go-hclog"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/builtin/credential/userpass"
"github.com/hashicorp/vault/sdk/plugin"
)
func main() {
apiClientMeta := &api.Plugin... | go | github | https://github.com/hashicorp/vault | builtin/credential/userpass/cmd/userpass/main.go |
# frame_AddItem.py
# This file is part of Wallet
#
# Copyright (C) 2016 Leonardo Landi
#
# 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) an... | unknown | codeparrot/codeparrot-clean | ||
# This code is supporting material for the book
# Building Machine Learning Systems with Python
# by Willi Richert and Luis Pedro Coelho
# published by PACKT Publishing
#
# It is made available under the MIT License
from __future__ import print_function
from sklearn.linear_model import LinearRegression
from load_ml100... | unknown | codeparrot/codeparrot-clean | ||
import numpy as np
from robotarium import Robotarium, transformations, controllers, graph
if __name__ == '__main__':
# Run for 300 Iterations
iterations = 2000
u_h = None
# Get Robotarium object and set the save parameters
r = Robotarium()
n = r.get_available_agents()
r.initialize(n)
... | 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 ag... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/core/kernels/image/adjust_hsv_gpu.cu.h |
#
# Table generated with pycrc
# http://www.tty1.net/pycrc/index_en.html
#
# $ python pycrc.py --algorithm=table-driven --model=crc-8 --generate=c \
# --poly=0xD5
#
# Polynomial is x^8 + x^7 + x^6 + x^4 + x^2 + x^0 (0xD5)
crc_table = [
0x00, 0xd5, 0x7f, 0xaa, 0xfe, 0x2b, 0x81, 0x54,
0x29, 0xfc, 0x56, 0x83, 0xd7,... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Ansible, inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# this is a windows documentation stub. actual code lives in the .ps1
# file of the same name
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | unknown | codeparrot/codeparrot-clean | ||
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: variable
Arg: <[%]name=text/@file>
Help: Set variable
Category: curl
Added: 8.3.0
Multi: append
See-also:
- config
Example:
- --variable name=smith --expand-url "$URL/{{name}}"
---
# `--variable`
Set a variable with... | unknown | github | https://github.com/curl/curl | docs/cmdline-opts/variable.md |
from django.http import HttpRequest
from django.conf import settings
from django.contrib.auth.models import User
import logging
from threading import currentThread
class UserService:
_user_data = {}
logger = logging.getLogger(__name__)
def _get_current_user_data(self):
thread_id = currentThread()... | unknown | codeparrot/codeparrot-clean | ||
@_documentation(visibility: internal) @_exported import AsyncKit
@_documentation(visibility: internal) @_exported import class AsyncHTTPClient.HTTPClient
@_documentation(visibility: internal) @_exported import struct AsyncHTTPClient.HTTPClientError
@_documentation(visibility: internal) @_exported import Crypto
@_docume... | swift | github | https://github.com/vapor/vapor | Sources/Vapor/Exports.swift |
"""SCons.Script
This file implements the main() function used by the scons script.
Architecturally, this *is* the scons script, and will likely only be
called from the external "scons" wrapper. Consequently, anything here
should not be, or be considered, part of the build engine. If it's
something that we expect ot... | unknown | codeparrot/codeparrot-clean | ||
from concurrent.futures import ThreadPoolExecutor, wait
from functools import partial
from itertools import chain
import os
import sys
from h2o.job import H2OJob
sys.path.insert(1, os.path.join("..","..",".."))
import h2o
from tests import pyunit_utils as pu
from h2o.automl import H2OAutoML
def flatten(it):
retu... | unknown | codeparrot/codeparrot-clean | ||
import tensorflow as tf
import re
FLAGS = tf.app.flags.FLAGS
tf.app.flags.DEFINE_boolean('use_fp16', False,
"""Train the model using fp16.""")
TOWER_NAME = 'tower'
NUM_CLASSES = 3
def _variable_on_cpu(name, shape, initializer):
"""Helper to create a Variable stored on CPU memory.
... | unknown | codeparrot/codeparrot-clean | ||
'''This is a custom layout for the RPi InfoScreen wordclock screen.
Custom layouts can be created for the screen by creating a new file in the
"layouts" folder.
Each layout must have the following variables:
LAYOUT: The grid layout. Must be a single string.
MAP: The mapping required... | unknown | codeparrot/codeparrot-clean | ||
import { candidate, css, html, js, json, test, ts } from '../utils'
test(
'Config files (CJS)',
{
fs: {
'package.json': json`
{
"dependencies": {
"tailwindcss": "workspace:^",
"@tailwindcss/cli": "workspace:^"
}
}
`,
'index.html': ht... | typescript | github | https://github.com/tailwindlabs/tailwindcss | integrations/cli/config.test.ts |
# vi: ts=4 expandtab
#
# Copyright (C) 2009-2010 Canonical Ltd.
# Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P.
# Copyright (C) 2012 Yahoo! Inc.
#
# Author: Scott Moser <scott.moser@canonical.com>
# Author: Juerg Hafliger <juerg.haefliger@hp.com>
# Author: Joshua Harlow <harlowja@... | unknown | codeparrot/codeparrot-clean | ||
-- zlib is disabled | sql | github | https://github.com/postgres/postgres | contrib/pgcrypto/sql/pgp-zlib-DISABLED.sql |
#
# The Python Imaging Library.
# $Id$
#
# standard image operations
#
# History:
# 2001-10-20 fl Created
# 2001-10-23 fl Added autocontrast operator
# 2001-12-18 fl Added Kevin's fit operator
# 2004-03-14 fl Fixed potential division by zero in equalize
# 2005-05-05 fl Fixed equalize for low number of values
... | 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",
"target": {
... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/input/migrated_dev_dashboards/transforms/v1beta1.filter.v42.json |
"""gettext tool
"""
# Copyright (c) 2001 - 2015 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"), to deal in the Software without restriction, including
# without limitation the rights to use, ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# http://www.privacyidea.org
# (c) Cornelius Kölbel, privacyidea.org
#
# 2015-02-26 Cornelius Kölbel, <cornelius@privacyidea.org>
# Initial writeup
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
# L... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
#
# 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 appli... | unknown | codeparrot/codeparrot-clean | ||
name: 'VSCode Angular Language Service extension'
description: Report an issue or suggest a feature for the VSCode Angular Language Service extension
body:
- type: checkboxes
id: bug-report-or-feature-request
attributes:
label: Is this a bug report or a feature request?
description: Select one.
... | unknown | github | https://github.com/angular/angular | .github/ISSUE_TEMPLATE/5-vscode.yaml |
# This file is part of the myhdl library, a Python package for using
# Python as a Hardware Description Language.
#
# Copyright (C) 2003-2008 Jan Decaluwe
#
# The myhdl library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as
# published by t... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2014, 2015 Robert Simmons
#
# This file is part of PlagueScanner.
#
# PlagueScanner 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/python
# Copyright 2003 Dave Abrahams
# Copyright 2002, 2003, 2004 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Test that we can specify a dependency property in project requirements, and
# tha... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: iso-8859-15 -*-
# Copyright (C) 2008-2009 Open Society Institute
# Thomas Moroz: tmoroz.org
# 2010-2011 Large Blue
# Fergus Doyle: fergus.doyle@largeblue.com
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU ... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
determine_ext,
int_or_none,
parse_iso8601,
qualities,
)
class NDRBaseIE(InfoExtractor):
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
dis... | unknown | codeparrot/codeparrot-clean | ||
//// [tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIntersectionType.ts] ////
//// [comparisonOperatorWithIntersectionType.ts]
declare let a: { a: 1 }
a > 1;
declare let b: { a: 1 } & { b: number }
b > 1;
//// [comparisonOperatorWithIntersectionType.js]
"use strict";
a ... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/comparisonOperatorWithIntersectionType.js |
"""
Installs the development dependancies
"""
import os
import _project_cfg_importer
project_cfg = _project_cfg_importer.get_project_cfg()
def main():
"""
Entry point of script
"""
print("********************************************************************************\n"
"* ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | unknown | codeparrot/codeparrot-clean | ||
package kotlinx.coroutines
import kotlin.test.*
import kotlin.time.*
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.nanoseconds
import kotlin.time.Duration.Companion.seconds
class DurationToMillisTest {
@Test
fun testNegativeDurationCoercedToZeroMillis() {
as... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | kotlinx-coroutines-core/common/test/DurationToMillisTest.kt |
# -----------------------------------------------------------------------------
# hedit.py
#
# Paring of Fortran H Edit descriptions (Contributed by Pearu Peterson)
#
# These tokens can't be easily tokenized because they are of the following
# form:
#
# nHc1...cn
#
# where n is a positive integer and c1 ... cn are ch... | unknown | codeparrot/codeparrot-clean | ||
from django.conf import settings
from django.template import loader
from django.utils.encoding import force_text
from django.utils.translation import pgettext
import jinja2
from django_jinja import library
from olympia import amo
from olympia.amo.utils import urlparams
@library.global_function
def emaillink(email, ... | unknown | codeparrot/codeparrot-clean | ||
""" Contains Imagenette and Imagewoof datasets """
import os
from os.path import dirname, basename
import tempfile
import logging
import urllib.request
import tarfile
from io import BytesIO
import PIL
import tqdm
import numpy as np
from sklearn.preprocessing import LabelEncoder
from . import ImagesOpenset
logger = ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.net>
#
# 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 Lice... | unknown | codeparrot/codeparrot-clean | ||
import django_tables2 as tables
from ccbclib.models import Book, Borrower, Transaction
class BookTable(tables.Table):
idbook = tables.Column(verbose_name="id")
get_area = tables.Column(verbose_name="Field",orderable=False)
get_language = tables.Column(verbose_name="Language",orderable=False)
get_book_s... | unknown | codeparrot/codeparrot-clean | ||
import logging, sys
from logging.handlers import RotatingFileHandler
def filter_status(record):
""""
Only displays log messages about status info
or ERROR level
"""
if ("Status:" in str(record.msg)) or (record.levelname == 'ERROR'):
return 1
else:
return 0
def log(logFile, leve... | unknown | codeparrot/codeparrot-clean | ||
from logging.handlers import TimedRotatingFileHandler
from logging import WARNING, Formatter
import os
class TimedFile(TimedRotatingFileHandler):
"""
Timed File Driver
"""
def __init__(self, app, log_path, filename, prefix='', when='D', interval=1, backup_count=0, level=WARNING, format=None):
... | unknown | codeparrot/codeparrot-clean | ||
#ifndef INTERNAL_VM_H /*-*-C-*-vi:se ft=c:*/
#define INTERNAL_VM_H
/**
* @author Ruby developers <ruby-core@ruby-lang.org>
* @copyright This file is a part of the programming language Ruby.
* Permission is hereby granted, to either redistribute and/... | c | github | https://github.com/ruby/ruby | internal/vm.h |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014, 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your optio... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
num_get_values = {
'GL_ACCUM_ALPHA_BITS' : 1,
'GL_ACCUM_BLUE_BITS' : 1,
'GL_ACCUM_CLEAR_VALUE': 4,
'GL_ACCUM_GREEN_BITS' : 1,
'GL_ACCUM_RED_BITS' : 1,
'... | 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
# distributed under t... | unknown | codeparrot/codeparrot-clean | ||
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may n... | java | github | https://github.com/apache/kafka | clients/src/main/java/org/apache/kafka/clients/admin/UserScramCredentialUpsertion.java |
package streamformatter
import (
"bytes"
"testing"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)
func TestStreamWriterStdout(t *testing.T) {
buffer := &bytes.Buffer{}
content := "content"
sw := NewStdoutWriter(buffer)
size, err := sw.Write([]byte(content))
assert.NilError(t, err)
assert.Check... | go | github | https://github.com/moby/moby | daemon/internal/streamformatter/streamwriter_test.go |
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Test basic commands"
requires_system_checks = []
def add_arguments(self, parser):
parser.add_argument("args", nargs="*")
parser.add_argument("--option_a", "-a", default="1")
parser.add_argument(... | python | github | https://github.com/django/django | tests/admin_scripts/management/commands/base_command.py |
# -*- encoding: utf-8 -*-
import itertools
import ply
from abjad.tools import abctools
from abjad.tools import durationtools
from abjad.tools import indicatortools
from abjad.tools import lilypondfiletools
from abjad.tools import markuptools
from abjad.tools import pitchtools
from abjad.tools import scoretools
from abj... | unknown | codeparrot/codeparrot-clean | ||
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: oauth2-bearer
Help: OAuth 2 Bearer Token
Arg: <token>
Protocols: IMAP LDAP POP3 SMTP HTTP
Category: auth imap pop3 smtp ldap
Added: 7.33.0
Multi: single
See-also:
- basic
- ntlm
- digest
Example:
- --oauth2-bearer... | unknown | github | https://github.com/curl/curl | docs/cmdline-opts/oauth2-bearer.md |
"""
A module for finding, managing, and using fonts across platforms.
This module provides a single :class:`FontManager` instance that can
be shared across backends and platforms. The :func:`findfont`
function returns the best TrueType (TTF) font file in the local or
system font path that matches the specified :class... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mmc/mxs-mmc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale MXS MMC controller
maintainers:
- Shawn Guo <shawnguo@kernel.org>
description: |
The Freescale MXS Synchronous Seria... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/mmc/mxs-mmc.yaml |
import Link from "next/link";
import PostPreviewCondensed from "./post-preview-condensed";
export default function Blog({ posts }) {
return (
<section id="blog" className="blog-section">
<div className="container">
<div className="row justify-content-center">
<div className="col-lg-6 col... | javascript | github | https://github.com/vercel/next.js | examples/cms-buttercms/components/blog/blog.js |
from __future__ import unicode_literals
from django import forms
from django.forms.formsets import DELETION_FIELD_NAME, BaseFormSet
from django.forms.models import (
BaseModelFormSet, inlineformset_factory, modelform_factory,
modelformset_factory,
)
from django.forms.utils import ErrorDict, ErrorList
from djan... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# generator.py
# simple C++ generator, originally targetted for Spidermonkey bindings
#
# Copyright (c) 2011 - Zynga Inc.
from clang import cindex
import sys
import pdb
import ConfigParser
import yaml
import re
import os
import inspect
import traceback
from Cheetah.Template import Template
type_... | unknown | codeparrot/codeparrot-clean | ||
import warnings
from django.test import SimpleTestCase
from django.utils.deprecation import (
DeprecationInstanceCheck, RemovedInNextVersionWarning, RenameMethodsBase,
)
class RenameManagerMethods(RenameMethodsBase):
renamed_methods = (
('old', 'new', DeprecationWarning),
)
class RenameMethodsTes... | 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
# ... | unknown | codeparrot/codeparrot-clean | ||
# (C) Datadog, Inc. 2014-2016
# (C) Leif Walsh <leif.walsh@gmail.com> 2014
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# stdlib
import time
import types
# 3p
import bson
from pymongo import (
MongoClient,
ReadPreference,
uri_parser,
version as py_version,
)
# project
f... | unknown | codeparrot/codeparrot-clean | ||
# This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will b... | unknown | codeparrot/codeparrot-clean | ||
#
# Copyright (c) 2004 Conectiva, Inc.
#
# Written by Gustavo Niemeyer <niemeyer@conectiva.com>
#
# This file is part of Smart Package Manager.
#
# Smart Package Manager 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 Fou... | unknown | codeparrot/codeparrot-clean | ||
test_kind: mongos_test
selector:
test: ""
executor: {} | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/suites/mongos_test.yml |
from django.forms.models import inlineformset_factory
from django.test import TestCase
from .models import (
AutoPKChildOfUUIDPKParent, AutoPKParent, ChildRelatedViaAK,
ChildWithEditablePK, ParentWithUUIDAlternateKey, UUIDPKChild,
UUIDPKChildOfAutoPKParent, UUIDPKParent,
)
class InlineFormsetTests(TestCas... | unknown | codeparrot/codeparrot-clean | ||
from django.core.checks import Tags
from django.core.management.base import BaseCommand
class Command(BaseCommand):
requires_system_checks = [Tags.staticfiles, Tags.models]
def handle(self, *args, **options):
pass | python | github | https://github.com/django/django | tests/user_commands/management/commands/specific_system_checks.py |
# Copyright (C) Research In Motion Limited 2011. 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, this list of conditions... | unknown | codeparrot/codeparrot-clean | ||
# (c) 2012-2014, Toshio Kuratomi <a.badger@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | python | github | https://github.com/ansible/ansible | lib/ansible/utils/unicode.py |
# -*- coding: utf-8 -*-
###############################################################################
#
# CSW Client
# ---------------------------------------------------------
# QGIS Catalog Service client.
#
# Copyright (C) 2014 Tom Kralidis (tomkralidis@gmail.com)
#
# This source is free software; you can redistri... | unknown | codeparrot/codeparrot-clean | ||
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may n... | java | github | https://github.com/apache/kafka | clients/src/main/java/org/apache/kafka/common/errors/UnsupportedSaslMechanismException.java |
/*
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | java | github | https://github.com/spring-projects/spring-framework | spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/interceptor/TimestampIntroductionInterceptor.java |
# -*- coding: utf-8 -*-
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import api, fields, models
from openerp import SUPERUSER_ID # TODO remove in v10
class BaseImportMatch(models.Model):
_name = "base_import.ma... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
#
# Copyright (C) 2017 Lenovo, 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 Licens... | unknown | codeparrot/codeparrot-clean | ||
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | unknown | codeparrot/codeparrot-clean | ||
import fnmatch
import glob
import os
import re
import sys
from itertools import dropwhile
from optparse import make_option
from subprocess import PIPE, Popen
import django
from django.core.management.base import CommandError, NoArgsCommand
from django.utils.text import get_text_list
from django.utils.jslex import prep... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# This file is part of Invenio.
# Copyright (C) 2012, 2013, 2014, 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your o... | unknown | codeparrot/codeparrot-clean | ||
# modified by Yu Huang
from controllers.pid_controller import PIDController
import math
import numpy
class MovingToPoint2(PIDController):
"""FollowPath (i.e. move to next point) steers the robot to a predefined position in the world."""
def __init__(self, params):
"""Initialize internal variables"""
... | unknown | codeparrot/codeparrot-clean | ||
set enable_seqscan=off;
CREATE TABLE test_numeric (
i numeric
);
INSERT INTO test_numeric VALUES (-2),(-1),(0),(1),(2),(3);
CREATE INDEX idx_numeric ON test_numeric USING gin (i);
SELECT * FROM test_numeric WHERE i<'1'::numeric ORDER BY i;
SELECT * FROM test_numeric WHERE i<='1'::numeric ORDER BY i;
SELECT * FROM ... | sql | github | https://github.com/postgres/postgres | contrib/btree_gin/sql/numeric.sql |
#!/usr/bin/env python
"""
Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from lib.core.common import Backend
from lib.core.common import Format
from lib.core.data import conf
from lib.core.data import kb
from lib.core.data import logger
from lib.co... | unknown | codeparrot/codeparrot-clean | ||
# This module is responsible for the per-connection Broker object
import types
from itertools import count
from zope.interface import implements
from twisted.python import failure, log
from twisted.internet import defer, error, reactor
from twisted.pb import schema, banana, tokens, ipb
from twisted.pb import call, s... | unknown | codeparrot/codeparrot-clean | ||
<select name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>{% for group_name, group_choices, group_index in widget.optgroups %}{% if group_name %}
<optgroup label="{{ group_name }}">{% endif %}{% for option in group_choices %}
{% include option.template_name with widget=option %}{% endfor %}{% ... | html | github | https://github.com/django/django | django/forms/templates/django/forms/widgets/select.html |
//! # Token Streams
//!
//! `TokenStream`s represent syntactic objects before they are converted into ASTs.
//! A `TokenStream` is, roughly speaking, a sequence of [`TokenTree`]s,
//! which are themselves a single [`Token`] or a `Delimited` subsequence of tokens.
use std::borrow::Cow;
use std::hash::Hash;
use std::ops... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_ast/src/tokenstream.rs |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | 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:
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('interfaces', parent_package, top_path)
config.add_subpackage('... | unknown | codeparrot/codeparrot-clean | ||
"""SCons.Tool.CVS.py
Tool-specific initialization for CVS.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2016-11-29 07:26
from __future__ import unicode_literals
import re
import json
try:
from html.parser import HTMLParser # py3
except ImportError:
from HTMLParser import HTMLParser # py2
import warnings
from django.db import migrations
from djangocms_text... | unknown | codeparrot/codeparrot-clean | ||
"""Script to fix up our MSI files."""
import argparse
import msilib
import shutil
def exec_delete(db, query):
"""Execute delete on db."""
view = db.OpenView(query)
view.Execute(None)
cur_record = view.Fetch()
view.Modify(msilib.MSIMODIFY_DELETE, cur_record)
view.Close()
def exec_update(db, q... | python | github | https://github.com/mongodb/mongo | buildscripts/msitrim.py |
# -*- coding: utf-8 -*-
"""
Managing Vocab Caching.
@summary: RDFa parser (distiller)
@requires: U{RDFLib<http://rdflib.net>}
@organization: U{World Wide Web Consortium<http://www.w3.org>}
@author: U{Ivan Herman<a href="http://www.w3.org/People/Ivan/">}
@license: This software is available for use under the
U{W3C® SOF... | unknown | codeparrot/codeparrot-clean | ||
# Volatility
#
# Authors
# Michael Cohen <scudette@users.sourceforge.net>
#
# 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 Software Foundation; either version 2 of the License, or... | unknown | codeparrot/codeparrot-clean | ||
# Since this package contains a "django" module, this is required on Python 2.
from __future__ import absolute_import
import sys
import warnings
from importlib import import_module
from pkgutil import walk_packages
from django.apps import apps
from django.conf import settings
from django.template import TemplateDoesN... | unknown | codeparrot/codeparrot-clean | ||
"""Defines ``Group`` and ``UserPartition`` models for partitioning"""
from collections import namedtuple
# We use ``id`` in this file as the IDs of our Groups and UserPartitions,
# which Pylint disapproves of.
# pylint: disable=invalid-name, redefined-builtin
class Group(namedtuple("Group", "id name")):
"""
An... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2014 Fabio Niephaus <fabio.niephaus@gmail.com>,
# Dean Jackson <deanishe@deanishe.net>
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2014-08-16
#
"""Self-updating from GitHub.
.. versionadded:: 1.9
.. note::
This module is n... | unknown | codeparrot/codeparrot-clean | ||
#pragma once
#include <c10/macros/Export.h>
#include <cstdint>
// A simple thread local enumeration, used to link forward and backward pass
// ops and is used by autograd and observers framework
namespace at::sequence_number {
TORCH_API uint64_t peek();
TORCH_API uint64_t get_and_increment();
} // namespace at::seq... | c | github | https://github.com/pytorch/pytorch | aten/src/ATen/SequenceNumber.h |
# FreeCAD init script of the Image module
# (c) 2001 Juergen Riegel
#***************************************************************************
#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 *
#* *
#* This file is p... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2002-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | kotlin | github | https://github.com/spring-projects/spring-framework | framework-docs/src/main/kotlin/org/springframework/docs/web/webmvc/mvcconfig/mvcconfigcustomize/WebConfiguration.kt |
import unittest
from coalib.results.AbsolutePosition import AbsolutePosition, calc_line_col
from coalib.misc.Constants import COMPLEX_TEST_STRING
class AbsolutePositionTest(unittest.TestCase):
def test_calc_line_col_newlines(self):
# no newlines
text = ("find position of 'z'",)
z_pos = te... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright (c) 2012, 2025, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is designed to work with certain software (including
b... | c | github | https://github.com/mysql/mysql-server | include/pfs_rwlock_provider.h |
# Twisted, the Framework of Your Internet
# Copyright (C) 2001 Matthew W. Lefkowitz
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the... | unknown | codeparrot/codeparrot-clean | ||
# Radix UI Example
This example showcases a few basic Radix UI components
## Deploy your own
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/radix-ui&project-name=radix-ui&repository-name=radix-ui)
## How to use
E... | unknown | github | https://github.com/vercel/next.js | examples/radix-ui/README.md |
/* 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/MachO/FunctionVariants.cpp |
SOCIAL_AUTH_SETTINGS = {
'SOCIAL_AUTH_LOGIN_URL': '/',
'SOCIAL_AUTH_LOGIN_REDIRECT_URL': '/done',
'SOCIAL_AUTH_USER_MODEL': 'example.models.User',
'SOCIAL_AUTH_LOGIN_FUNCTION': 'example.auth.login_user',
'SOCIAL_AUTH_LOGGEDIN_FUNCTION': 'example.auth.login_required',
'SOCIAL_AUTH_AUTHENTICATION_... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=no-self-use, pointless-statement, missing-docstring, unbalanced-tuple-unpacking
import re
import pytest
from ..pattern import StringPattern, RePattern, FunctionalPattern, REGEX_AVAILABLE
from ..match import Match
class TestStringPattern(object):
"""... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.