code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/ChangePasswordDialog.ui'
#
# Created: Sun Jun 28 08:12:25 2015
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUt... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
import logging
from django.apps import apps
from django.dispatch import receiver
from django.db import models, connection
from django.db.models.signals import post_save
from django.contrib.contenttypes.models import ContentType
from psycopg2._psycopg import AsIs
from addons.ba... | unknown | codeparrot/codeparrot-clean | ||
# (c) 2016, Jiri Tyr <jiri.tyr@gmail.com>
#
# This file is part of Config Encoder Filters (CEF)
#
# CEF 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 | ||
"""
Xylem - Phylogenetic Pipelines with MPI
Delete.py contains tasks that delete taxa from datasets.
Copyright (C) 2015 Pranjal Vachaspati
pr@nj.al
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, e... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2018 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | go | github | https://github.com/etcd-io/etcd | pkg/netutil/doc.go |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/system_parameter.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
... | unknown | codeparrot/codeparrot-clean | ||
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#ifndef ROTATION_CONVERTERS_HPP
#define ROTATION_CONVERTERS_HPP
#include <opencv2/core.hpp>
namespace calib
{
#define CALIB... | unknown | github | https://github.com/opencv/opencv | apps/interactive-calibration/rotationConverters.hpp |
"""pytest configuration
Extends output capture as needed by pybind11: ignore constructors, optional unordered lines.
Adds docstring and exceptions message sanitizers: ignore Python 2 vs 3 differences.
"""
import pytest
import textwrap
import difflib
import re
import sys
import contextlib
import platform
import gc
_u... | unknown | codeparrot/codeparrot-clean | ||
from test.support import import_helper, threading_helper
syslog = import_helper.import_module("syslog") #skip if not supported
from test import support
import sys
import threading
import time
import unittest
from textwrap import dedent
# XXX(nnorwitz): This test sucks. I don't know of a platform independent way
# to ... | python | github | https://github.com/python/cpython | Lib/test/test_syslog.py |
# Copyright 2013 Sascha Peilicke
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
"""
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");... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
Module containing classes with common behaviour for consoles of both VMs and Instances of all types.
"""
import base64
import re
import tempfile
import time
from cfme.exceptions import ItemNotFound
from PIL import Image, ImageFilter
from pytesseract import image_to_string
from selenium.web... | unknown | codeparrot/codeparrot-clean | ||
"""This module provides the Units class for simplification of units.
It should be rolled into SymPy. It can perform simplification of
units, e.g., volts / amperes -> ohms.
Copyright 2020--2021 Michael Hayes, UCECE
"""
import sympy.physics.units as u
from sympy.physics.units.systems.si import dimsys_SI
from sympy.ph... | unknown | codeparrot/codeparrot-clean | ||
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modi... | c | github | https://github.com/nodejs/node | src/tcp_wrap.h |
// Copyright 2018 Ulf Adams
//
// The contents of this file may be used under the terms of the Apache License,
// Version 2.0.
//
// Alternatively, the contents of this file may be used under the terms of
// the Boost Software License, Version 1.0.
//
// Unless required by applicable law or agreed to in writing, this s... | c | github | https://github.com/ruby/ruby | ext/json/vendor/ryu.h |
# -*- coding: utf-8 -*-
import unittest
from pynes import sprite
class SpriteTest(unittest.TestCase):
def __init__(self, testcase_name):
unittest.TestCase.__init__(self, testcase_name)
f = open('fixtures/nerdynights/scrolling/mario.chr', 'rb')
content = f.read()
self.bin = [ord(c... | unknown | codeparrot/codeparrot-clean | ||
from bokeh.plotting import figure, HBox, output_file, show, VBox
from bokeh.models import Range1d
# create some data using python lists
x1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
y1 = [0, 8, 2, 4, 6, 9, 15, 18, 19, 25, 28]
# EXERCISE: create two more data sets, x2, y2 and x3, y3, however
# you want. Make sure the co... | unknown | codeparrot/codeparrot-clean | ||
"""
This file is part of Gnotero.
Gnotero 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.
Gnotero is distributed in the hope that it will b... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2alpha1",
"metadata": {
"name": "v34.multiple_stats_cloudwatch.v42"
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "grafana",
"uid": "-- Gr... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dashboards_from_v0_to_v2/v2beta1.v34.multiple_stats_cloudwatch.v2alpha1.json |
import {useRef} from 'react';
function Component(props) {
const ref = useRef();
return ref?.current;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [],
}; | javascript | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.ref-optional.js |
/*
* 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-internal/src/main/java/org/elasticsearch/gradle/internal/test/ClusterFeaturesMetadataTask.java |
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from ..._utils import PropertyInfo
from ..._models import BaseModel
from .response_input_file import ResponseInputFile
from .respon... | python | github | https://github.com/openai/openai-python | src/openai/types/responses/response_function_tool_call_output_item.py |
# -*- coding: utf-8 -*-
'''
Specto Add-on
Copyright (C) 2015 lambda
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any l... | unknown | codeparrot/codeparrot-clean | ||
<?php
namespace Illuminate\Database\Console\Seeds;
use Illuminate\Console\Command;
use Illuminate\Console\ConfirmableTrait;
use Illuminate\Console\Prohibitable;
use Illuminate\Database\ConnectionResolverInterface as Resolver;
use Illuminate\Database\Eloquent\Model;
use Symfony\Component\Console\Attribute\AsCommand;
u... | php | github | https://github.com/laravel/framework | src/Illuminate/Database/Console/Seeds/SeedCommand.php |
# -*- coding: utf8 -*-
###########################################################################
# This is part of the module phystricks
#
# phystricks 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... | 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 | ||
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2011, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the fol... | c | github | https://github.com/opencv/opencv | 3rdparty/openexr/IlmImf/ImfDeepScanLineInputFile.h |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# utils/update_confusables.py - Utility to update definitions of unicode
# confusables
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime... | python | github | https://github.com/apple/swift | utils/generate_confusables.py |
# Django settings for frontend project.
import os
import common
from autotest_lib.client.common_lib import global_config
DEBUG = True
TEMPLATE_DEBUG = DEBUG
FULL_ADMIN = False
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'post... | unknown | codeparrot/codeparrot-clean | ||
"""
HTTP server that implements the Python WSGI protocol (PEP 333, rev 1.21).
Based on wsgiref.simple_server which is part of the standard library since 2.5.
This is a simple server for use in testing or debugging Django apps. It hasn't
been reviewed for security issues. DON'T USE IT FOR PRODUCTION USE!
"""
from __f... | unknown | codeparrot/codeparrot-clean | ||
"""
Classes for including text in a figure.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from six.moves import zip
import math
import warnings
import contextlib
import numpy as np
from matplotlib import cbook
from matplotlib import rcPa... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
gateway tests - Testing various methods on a Big image when
renderingEngine.load() etc throws MissingPyramidException
Copyright 2013 Glencoe Software, Inc. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
"""
import omero
impo... | unknown | codeparrot/codeparrot-clean | ||
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../Chunk").ChunkChildOf... | javascript | github | https://github.com/webpack/webpack | lib/prefetch/ChunkPrefetchStartupRuntimeModule.js |
'use strict';
const { promisify } = require('util');
const { readFile } = require('fs');
const sleep = promisify(setTimeout);
const read = promisify(readFile);
const common = require('../common.js');
const {
createHook,
executionAsyncResource,
executionAsyncId,
AsyncLocalStorage,
} = require('async_hooks');
co... | javascript | github | https://github.com/nodejs/node | benchmark/async_hooks/async-resource-vs-destroy.js |
# -*- coding: utf-8 -*-
# This file is part of Invenio.
# Copyright (C) 2013 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later v... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
Setup Tool
"""
module = request.controller
resourcename = request.function
if not settings.has_module(module):
raise HTTP(404, body="Module disabled: %s" % module)
def index():
""" Show the index """
return dict()
# ----------------------------------------------------------... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
***************************************************************************
AlgorithmLocatorFilter.py
-------------------------
Date : May 2017
Copyright : (C) 2017 by Nyall Dawson
Email : nyall dot dawson at gmail dot com
******... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# Python modules
import sys, os, shutil, glob, io
# Aion modules
from Aion.utils.graphics import *
from Aion.utils.data import *
from Aion.shared.constants import *
# Third-party libraries
from androguard.session import Session
from androguard.misc import AXMLPrinter
class Garfield():
""" Garf... | unknown | codeparrot/codeparrot-clean | ||
"""
Container page in Studio
"""
from bok_choy.page_object import PageObject
from bok_choy.promise import Promise, EmptyPromise
from . import BASE_URL
from ..common.utils import click_css, confirm_prompt
from .utils import type_in_codemirror
class ContainerPage(PageObject):
"""
Container page in Studio
... | unknown | codeparrot/codeparrot-clean | ||
/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
export function greeting(a: number, b: number, c: number): void;
export function __wbindgen_add_to_stack_pointer(a: number): number;
export function __wbindgen_malloc(a: number): number;
export function __wbindgen_realloc(a: number, b: n... | typescript | github | https://github.com/webpack/webpack | examples/wasm-bindgen-esm/pkg/hi_wasm_bg.wasm.d.ts |
# Copyright 2016 Free Software Foundation, Inc.
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
from __future__ import print_function
import six
from .utils import Message, Spec
class Validator(object):
def __init__(self, scheme=None):
self._path = []
self.schem... | unknown | codeparrot/codeparrot-clean | ||
"""Support for device tracking via Xfinity Gateways."""
import logging
from requests.exceptions import RequestException
import voluptuous as vol
from xfinity_gateway import XfinityGateway
from homeassistant.components.device_tracker import (
DOMAIN,
PLATFORM_SCHEMA,
DeviceScanner,
)
from homeassistant.con... | unknown | codeparrot/codeparrot-clean | ||
//! Support inheriting generic parameters and predicates for function delegation.
//!
//! For more information about delegation design, see the tracking issue #118212.
use rustc_data_structures::debug_assert_matches;
use rustc_data_structures::fx::FxHashMap;
use rustc_hir::def::DefKind;
use rustc_hir::def_id::{DefId, ... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_hir_analysis/src/delegation.rs |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright(c)2013 NTT 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/licen... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# I, Adam Olsen, am the original author of this work. I hereby
# donate it into the public domain, and relinquish any rights I
# may have in it.
#
# I, Behdad Esfahbod, hereby disclaim any rights for my contributions
# to this code.
from __future__ import division
imp... | unknown | codeparrot/codeparrot-clean | ||
"""
Generic NAT Port mapping interface.
TODO: Example
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@version: 0.1.0
"""
__revision__ = "$id"
from twisted.internet.base import BasePort
# Public API
def get_port_mapper(proto="TCP"):
... | 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... | typescript | github | https://github.com/apache/airflow | airflow-core/src/airflow/ui/src/components/ui/Popover/CloseTrigger.tsx |
{
"definitions": {
"ExternalsType": {
"description": "Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).",
"enum": [
"var",
"module",
"assign",
"this",
"window",
"self",
... | json | github | https://github.com/webpack/webpack | schemas/plugins/container/ContainerReferencePlugin.json |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# SoundConverter - GNOME application for converting between audio formats.
# Copyright 2004 Lars Wirzenius
# Copyright 2005-2014 Gautier Portet
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as p... | unknown | codeparrot/codeparrot-clean | ||
import os
import shutil
import tempfile
import warnings
import nose
import numpy
from pickle import loads
from pickle import dumps
from sklearn.datasets import get_data_home
from sklearn.datasets import clear_data_home
from sklearn.datasets import load_files
from sklearn.datasets import load_sample_images
from sklearn... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
import datetime
import sys
from getpass import getpass
from optparse import OptionParser
from peewee import *
from peewee import print_
from peewee import __version__ as peewee_version
from playhouse.reflection import *
TEMPLATE = """from peewee import *%s
database = %s('%s', **%s)
class Unkn... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# CodeIgniter documentation build configuration file, created by
# sphinx-quickstart on Sun Aug 28 07:24:38 2011.
#
# 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.
#
#... | unknown | codeparrot/codeparrot-clean | ||
//===--- OutputLanguageMode.h - Output mode for clang printer ---*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | c | github | https://github.com/apple/swift | lib/PrintAsClang/OutputLanguageMode.h |
# ##### BEGIN GPL LICENSE BLOCK #####
#
# 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) any later version.
#
# This program is distrib... | unknown | codeparrot/codeparrot-clean | ||
# Instruction Set
This document is a reference guide of the SIL instruction set. For an overview
of SIL and OSSA see the [SIL](SIL.md) document.
## Allocation and Deallocation
These instructions allocate and deallocate memory.
### alloc_stack
```
sil-instruction ::= 'alloc_stack' alloc-stack-option* sil-type (',' ... | unknown | github | https://github.com/apple/swift | docs/SIL/Instructions.md |
# testutils.py - utility module for psycopg2 testing.
#
# Copyright (C) 2010-2011 Daniele Varrazzo <daniele.varrazzo@gmail.com>
#
# psycopg2 is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either vers... | unknown | codeparrot/codeparrot-clean | ||
/*
Copyright 2020 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/controller/endpointslicemirroring/reconciler.go |
/* Copyright 2020 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/c/experimental/gradients/math_grad.h |
#!/usr/bin/env python
"""
SocksiPy + urllib2 handler
version: 0.3
author: e<e@tr0ll.in>
This module provides a Handler which you can use with urllib2 to allow it to tunnel your connection through a socks.sockssocket socket, with out monkey patching the original socket...
"""
import ssl
try:
import urllib2
im... | unknown | codeparrot/codeparrot-clean | ||
# 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.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
from page_sets import key_mobile_sites_pages
class Key... | 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 ... | java | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/FileSystemStatisticNames.java |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2018, Ansible Project
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
/*
Copyright 2020 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 | cmd/kubeadm/test/resources/configmap.go |
# (c) 2005 Clark C. Evans
# This module is part of the Python Paste Project and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from paste.auth.digest import *
from paste.wsgilib import raw_interactive
from paste.httpexceptions import *
from paste.httpheaders import AUTHORIZATIO... | unknown | codeparrot/codeparrot-clean | ||
import csv
import shutil
import datetime
ORIGINAL = "rec-center-hourly.csv"
BACKUP = "rec-center-hourly-backup.csv"
DATE_FORMAT = "%m/%d/%y %H:%M"
def isTuesday(date):
return date.weekday() is 1
def withinOctober(date):
return datetime.datetime(2010, 10, 1) <= date < datetime.datetime(2010, 11, 1)
def run():
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env bash
# Copyright 2014 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 applica... | unknown | github | https://github.com/kubernetes/kubernetes | hack/lib/logging.sh |
#!/usr/bin/env python
"""
Copyright (c) 2013 The Regents of the University of California, AMERICAN INSTITUTES FOR RESEARCH
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 co... | unknown | codeparrot/codeparrot-clean | ||
"""
Filename globbing like the python glob module with minor differences:
* glob relative to an arbitrary directory
* include . and ..
* check that link targets exist, not just links
"""
import os, re, fnmatch
import util
_globcheck = re.compile('[[*?]')
def hasglob(p):
return _globcheck.search(p) is not None
... | unknown | codeparrot/codeparrot-clean | ||
/*
Copyright 2014 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/kubelet/lifecycle/handlers_test.go |
import _plotly_utils.basevalidators
class RangebreaksValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(self, plotly_name="rangebreaks", parent_name="layout.yaxis", **kwargs):
super(RangebreaksValidator, self).__init__(
plotly_name=plotly_name,
parent_name=... | unknown | codeparrot/codeparrot-clean | ||
use rustc_abi::Endian;
use crate::spec::{
Abi, Arch, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetMetadata, TargetOptions, base,
};
pub(crate) fn target() -> Target {
let mut base = base::freebsd::opts();
base.cpu = "ppc64".into();
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &[... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_target/src/spec/targets/powerpc64_unknown_freebsd.rs |
#
#Kylciane Cristiny Lopes Freitas - 1615310052
#Thiago Santos Borges - 1615310023
#
import random
cond = True
pedra = 1
papel = 2
tesoura = 3
spock = 4
lagarto = 5
print("Vamos brincar de Jokenpo?")
print("Digite seu nome")
nome = input()
print("1 - Pedra")
print("2 - Papel")
print("3 - Tesoura")
print("4 - Spock"... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
########################################################################
# File : dirac-admin-get-pilot-output
# Author : Stuart Paterson
########################################################################
"""
Retrieve output of a Grid pilot
Usage:
dirac-admin-get-pilot-output [options... | unknown | codeparrot/codeparrot-clean | ||
"""
contains a function for marshalling literal (and only literal) Python
data into Javascript. Supports Python None, strings, ints and floats,
dates, lists, tuples and dictionaries.
"""
import re
_jsidentifierRE=re.compile(r'[a-zA-Z_\$][a-zA-Z_\$0-9]*$')
def is_valid_js_identifier(s):
try:
return bool(_j... | unknown | codeparrot/codeparrot-clean | ||
###########################################################################
# (C) Vrije Universiteit, Amsterdam (the Netherlands) #
# #
# This file is part of AmCAT - The Amsterdam Content Analysis Toolkit #
# ... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
static ngx_int_t ngx_select_init(ngx_cycle_t *cycle, ngx_msec_t timer);
static void ngx_select_done(ngx_cycle_t *cycle);
static ngx_int_t ngx_select_add_event(ngx_event_t *ev, ngx_int_... | c | github | https://github.com/nginx/nginx | src/event/modules/ngx_select_module.c |
__author__ = 'kkennedy'
# System Imports
import sys
import os
import logging
import traceback
import wx
import wx.aui
import wx.lib
import wx.lib.mixins.inspection
from wx.lib.agw import genericmessagedialog
# Labtronyx
import labtronyx
# Package Relative Imports
from ..controllers import MainApplicationController
... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
from builtins import object
from math import *
from proteus import *
from proteus.default_p import *
try:
from .risingBubble import *
except:
from risingBubble import *
name = "pressureincrement"
from proteus.mprans import PresInc
LevelModelType = PresInc.LevelModel
coef... | unknown | codeparrot/codeparrot-clean | ||
/* eslint-env node */
if (process.env.NODE_ENV === "production") {
module.exports = require("./umd/react-router-dom.production.min.js");
} else {
module.exports = require("./umd/react-router-dom.development.js");
} | javascript | github | https://github.com/remix-run/react-router | packages/react-router/node-main-dom-export.js |
use std::io::{self, Write};
use {
bstr::ByteSlice,
grep_matcher::{
LineMatchKind, LineTerminator, Match, Matcher, NoCaptures, NoError,
},
regex::bytes::{Regex, RegexBuilder},
};
use crate::{
searcher::{BinaryDetection, Searcher, SearcherBuilder},
sink::{Sink, SinkContext, SinkFinish, S... | rust | github | https://github.com/BurntSushi/ripgrep | crates/searcher/src/testutil.rs |
#include "mbedtls/mbedtls_config.h"
#if defined (MBEDTLS_ARCH_IS_X86)
#undef MBEDTLS_AESNI_C
#endif | c | github | https://github.com/nodejs/node | deps/LIEF/config/mbedtls/config.h |
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
class IndicesClient(NamespacedClient):
@query_params('analyzer', 'attributes', 'char_filter', 'explain', 'field',
'filter', 'format', 'prefer_local', 'text', 'tokenizer')
def analyze(self, index=None, body=None, params=None):
... | unknown | codeparrot/codeparrot-clean | ||
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package convert
import (
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/hashicorp/terraform/internal/configs/configschema"
"github.com/hashicorp/terraform/internal/providers"
proto "github.com/has... | go | github | https://github.com/hashicorp/terraform | internal/plugin6/convert/schema_test.go |
# -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# Flumotion - a streaming media server
# Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com).
# All rights reserved.
# This file may be distributed and/or modified under the terms of
# the GNU General Public License version 2 as published by
# the Free Software Founda... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
S3 Shapefile codec
@copyright: 2013-14 (c) Sahana Software Foundation
@license: MIT
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
... | unknown | codeparrot/codeparrot-clean | ||
#
# (c) 2019, Ansible by Red Hat, inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
import re
import socket
from ansible.module_utils.six import iteritems
from ansible.module_utils.network.common.utils import to_list
from ansible.module_utils.network.iosxr.providers.pro... | unknown | codeparrot/codeparrot-clean | ||
"""
Module for formatting output data in Latex.
"""
from abc import ABC, abstractmethod
from typing import Iterator, List, Optional, Sequence, Tuple, Type, Union
import numpy as np
from pandas.core.dtypes.generic import ABCMultiIndex
from pandas.io.formats.format import DataFrameFormatter
def _split_into_full_short... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Opus(AutotoolsPackage):
"""Opus is a totally open, royalty-free, highly versatile audio cod... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2017 Janos Czentye
#
# 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, s... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2012-2015, Eucalyptus Systems, Inc.
#
# Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHO... | unknown | codeparrot/codeparrot-clean | ||
"""
Created on 23 Mar 2017
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
"""
import optparse
from scs_core.data.str import Str
# --------------------------------------------------------------------------------------------------------------------
class CmdMQTTClient(object):
"""unix command line ha... | unknown | codeparrot/codeparrot-clean | ||
"""
Configuration parameters:
path.internal.bin.upstream
"""
# pylint: disable=relative-import
from __future__ import print_function
import os
import re
from subprocess import Popen, PIPE
from polyglot.detect import Detector
from polyglot.detect.base import UnknownLanguage
from config import CONFIG
from langu... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2012 Andrew Bogott for the Wikimedia 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 requi... | unknown | codeparrot/codeparrot-clean | ||
{
"name": "@playground/framework-express",
"version": "0.0.0",
"private": true,
"sideEffects": false,
"type": "module",
"scripts": {
"build": "react-router build",
"dev": "node ./server.js",
"start": "cross-env NODE_ENV=production node ./server.js",
"typecheck": "react-router typegen && tsc"... | json | github | https://github.com/remix-run/react-router | playground/framework-express/package.json |
# Copyright 2020 Google LLC
#
# 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, ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# encoding: utf-8
"""
xray_background.py - remove background from small angle x-ray scattering imgs
Created by Dave Williams on 2014-10-09
"""
# System imports
import numpy as np
from scipy import optimize
import cv2
import matplotlib.pyplot as plt
# Local module imports
import support
import fa... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""A registry of :class:`Schema <marshmallow.Schema>` classes. This allows for string
lookup of schemas, which may be used with
class:`fields.Nested <marshmallow.fields.Nested>`.
.. warning::
This module is treated as private API.
Users should not need to use this module directly.
"""
... | 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/v32.no_op_migration.v42.json |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.