code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
import logging import subprocess import signal from lnst.Common.Parameters import Param, StrParam, IntParam, FloatParam from lnst.Common.Parameters import IpParam, DeviceOrIpParam from lnst.Tests.BaseTestModule import BaseTestModule, TestModuleError class TestPMD(BaseTestModule): coremask = StrParam(mandatory=True...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://...
unknown
codeparrot/codeparrot-clean
""" Handlers for video module. StudentViewHandlers are handlers for video module instance. StudioViewHandlers are handlers for video descriptor instance. """ import json import logging from datetime import datetime from webob import Response from xblock.core import XBlock from xmodule.exceptions import NotFoundErro...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Ansible Project # 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
#!/usr/bin/python # # Copyright (c) 2010, Ryan Marquardt # 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 lis...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@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...
unknown
codeparrot/codeparrot-clean
import { registerServerReference } from "private-next-rsc-server-reference"; /* __next_internal_action_entry_do_not_use__ {"406a88810ecce4a4e8b59d53b8327d7e98bbf251d7":{"name":"$$RSC_SERVER_ACTION_0"}} */ import { redirect } from 'navigation'; export const $$RSC_SERVER_ACTION_0 = async function action(formData) { r...
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/server-actions/server-graph/47/output.js
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2018, Yanis Guenane <yanis+ansible@guenane.org> # 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':...
unknown
codeparrot/codeparrot-clean
# pylint: disable-msg=W0232,R0903,C0103 # Copyright 2008 German Aerospace Center (DLR) # # 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 # # U...
unknown
codeparrot/codeparrot-clean
<?php // autoload_real.php @generated by Composer class ComposerAutoloaderInitTargetDir { private static $loader; public static function loadClassLoader($class) { if ('Composer\Autoload\ClassLoader' === $class) { require __DIR__ . '/ClassLoader.php'; } } /** * @r...
php
github
https://github.com/composer/composer
tests/Composer/Test/Autoload/Fixtures/autoload_real_target_dir.php
// Copyright The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
go
github
https://github.com/prometheus/prometheus
scrape/clientprotobuf.go
/* * 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-context/src/test/java/org/springframework/context/annotation/BeanAnnotationHelperTests.java
# 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
#!/usr/bin/env python # -*- coding: utf8 -*- # :Id: $Id: latex2mathml.py 7058 2011-06-27 11:38:56Z milde $ # :Copyright: © 2010 Günter Milde. # Based on rst2mathml.py from the latex_math sandbox project # © 2005 Jens Jørgen Mortensen # :License: Released under the terms of the `2-Clause BSD lic...
unknown
codeparrot/codeparrot-clean
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Directive, ElementRef, inject, input, DestroyRef, output} from '@angular/core'; import {WINDOW} from '../../...
typescript
github
https://github.com/angular/angular
devtools/projects/ng-devtools/src/lib/shared/split/responsive-split.directive.ts
# Copyright 2016 The Meson development team # 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 ...
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...
java
github
https://github.com/spring-projects/spring-framework
spring-aop/src/main/java/org/springframework/aop/support/ClassFilters.java
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'XForm.xls' db.add_column('odk_logger_xform', 'xls', self.gf('django.db.models.fields.files.FileFie...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import codecs import datetime from decimal import Decimal import locale from django.utils.functional import Promise from django.utils import six from django.utils.six.moves.urllib.parse import quote, unquote if six.PY3: from urllib.parse import unq...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- $id: http://devicetree.org/schemas/incomplete-devices.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Rejected, Legacy or Incomplete Devices maintainers: - Rob Herring <robh@kernel.org> description: Some devices will not or...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/incomplete-devices.yaml
<?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\Form; use Symfony\Component\OptionsResolver\OptionsRe...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/Form/AbstractTypeExtension.php
{% include "./../three.html" %}
html
github
https://github.com/django/django
tests/template_tests/relative_templates/error_include.html
/* * 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
configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/source/ImmutableSource.java
# -*- 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
# # Copyright (C) 2012-2013 Red Hat, Inc. # # Licensed under the GNU Lesser General Public License Version 2.1 # # This 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 the Free Software Foundation; either # version 2.1 of th...
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\Intl; use Symfony\Component\Intl\Exception\MissingRes...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/Intl/Scripts.php
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from django.utils.tran...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2010 Jeremy S. Sanders # Email: Jeremy Sanders <jeremy@jeremysanders.net> # # 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
import re from PyQt4 import QtCore, QtGui, Qt Ok = "#96D899" Failed = "#FBE3E4" class FormValidator(QtGui.QValidator): def __init__(self, parent=None): QtGui.QValidator.__init__(self, parent) def setBackground(self, color): if self.parent() is None: return p = Qt.QPalette...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- ## # This script is an exmple of using the ib.opt.messagetools module. ## from time import sleep from ib.ext.Contract import Contract from ib.ext.TickType import TickType from ib.opt import ibConnection, message from ib.opt import messagetools all_messages = [] def my_a...
unknown
codeparrot/codeparrot-clean
import os import unittest from pavelib.utils.test.suites.bokchoy_suite import BokChoyTestSuite REPO_DIR = os.getcwd() class TestPaverBokChoy(unittest.TestCase): def setUp(self): self.request = BokChoyTestSuite('') def _expected_command(self, expected_text_append): if expected_text_append: ...
unknown
codeparrot/codeparrot-clean
from __future__ import division, absolute_import, print_function import collections import tempfile import sys import os import shutil import warnings import operator import io import itertools if sys.version_info[0] >= 3: import builtins else: import __builtin__ as builtins from decimal import Decimal import...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # *************************************...
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 OPENCV_NDSRVP_HAL_HPP #define OPENCV_NDSRVP_HAL_HPP #include <nds_intrinsic.h> #include "opencv2/core/hal/interface...
unknown
github
https://github.com/opencv/opencv
hal/ndsrvp/ndsrvp_hal.hpp
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import unittest from test import run_only from mock import patch from mock import ANY import configobj from diamond.handler.stats_d import StatsdHandler from diamond.metric import Metric def r...
unknown
codeparrot/codeparrot-clean
# # https://yade-dem.org/wiki/ScriptParametricStudy # ## read parameters from table here from yade import plot readParamsFromTable(gravity=-9.81,density=2400,initialSpeed=10,noTableOk=True) from yade.params.table import * print gravity,density,initialSpeed O.materials.append(FrictMat(young=30e9,density=density,poisso...
unknown
codeparrot/codeparrot-clean
import logging import unittest from neuro.history import History from neuro.softmax import Softmax import numpy from neuro.backpropagation import BackpropagationTrainer from neuro.classification import ClassificationNetwork, class_errors from neuro.model import FeedForwardNeuralNetwork from neuro.logistic import Logis...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional from typing_extensions import Literal from ..._models import BaseModel from .conversation_item import ConversationItem __all__ = ["ConversationItemCreatedEvent"] class ConversationItemCreatedEvent(BaseM...
python
github
https://github.com/openai/openai-python
src/openai/types/realtime/conversation_item_created_event.py
package kotlinx.coroutines.internal import kotlinx.cinterop.* import kotlinx.coroutines.* import kotlinx.atomicfu.locks.withLock as withLock2 /** * @suppress **This an internal API and should not be used from general code.** */ @InternalCoroutinesApi public actual typealias SynchronizedObject = kotlinx.atomicfu.loc...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/native/src/internal/Synchronized.kt
/* * 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
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/CloseableConnectorContext.java
//===--- SILOptFunctionBuilder.h --------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2018 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
include/swift/SILOptimizer/Utils/SILOptFunctionBuilder.h
# Author Conor O'Kelly """ This package will attempted to take the name of a director from the IMDB api. This will the return the average career score of that director. """ from bs4 import BeautifulSoup import urllib.request as request import urllib import re import unicodedata class MetaCriticRequestFailed(Exceptio...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ *************************************************************************** v.out.ogr.pg.py --------------------- Date : July 2009 Copyright : (C) 2009 by Radim Blazek Email : radim dot blazek at gmail dot ...
unknown
codeparrot/codeparrot-clean
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config file for Python...
unknown
codeparrot/codeparrot-clean
#!/bin/sh # # Copyright (c) 2023 Teng Long # test_description='Test commit notes with stripspace behavior' . ./test-lib.sh MULTI_LF="$LF$LF$LF" write_script fake_editor <<\EOF echo "$MSG" >"$1" echo "$MSG" >&2 EOF GIT_EDITOR=./fake_editor export GIT_EDITOR test_expect_success 'setup the commit' ' test_commit 1st '...
unknown
github
https://github.com/git/git
t/t3321-notes-stripspace.sh
#!/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
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Kore Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test pruning code # ******** # WARNING: # This test uses 4GB of disk space. # This test takes 30 mins or...
unknown
codeparrot/codeparrot-clean
## Input ```javascript // @validateNoSetStateInEffects @enableVerboseNoSetStateInEffect import {useState, useEffect} from 'react'; function Child({firstName, lastName}) { const [fullName, setFullName] = useState(''); useEffect(() => { setFullName(firstName + ' ' + lastName); }, [firstName, lastName]); ret...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/invalid-set-state-in-effect-verbose-non-local-derived.expect.md
//===--- MD5Stream.h - raw_ostream that compute MD5 ------------*- 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
include/swift/Basic/MD5Stream.h
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ELEVATOR_H #define _ELEVATOR_H #include <linux/percpu.h> #include <linux/hashtable.h> #include "blk-mq.h" struct io_cq; struct elevator_type; struct blk_mq_debugfs_attr; /* * Return values from elevator merger */ enum elv_merge { ELEVATOR_NO_MERGE = 0, ELEVATOR_FRO...
c
github
https://github.com/torvalds/linux
block/elevator.h
import gi gi.require_version('Notify', '0.7') gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gio, GLib, Gdk, Notify from gettext import gettext as _ from usage.log import * from usage.window import Window class Application(Gtk.Application): def __repr__(self): return '<Application>' ...
unknown
codeparrot/codeparrot-clean
from m_pool.matrix_pool import MatrixPool from m_pool.axis_obj import Axis from math import log10 MP = MatrixPool(name='CHECK') epsAxis = Axis({'name':'eps', 'valueL':[10., 20., 30., 40., 50.], 'units':'', 'transform':'log10'}) pcAxis = Axis({'name':'pc', 'valueL':[100.,200.,300,400], 'units':'psia', 'transform':'log1...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2007, 2012 Red Hat, Inc # Michael DeHaan <michael.dehaan@gmail.com> # Seth Vidal <skvidal@fedoraproject.org> # 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_f...
unknown
codeparrot/codeparrot-clean
""" Wrapper class that takes a list of template loaders as an argument and attempts to load templates from them in order, caching the result. """ import hashlib from django.template.base import TemplateDoesNotExist from django.template.loader import BaseLoader, get_template_from_string, find_template_loader, make_orig...
unknown
codeparrot/codeparrot-clean
"""<title>Integration with a Game</title> For games, it is usually preferrable to not have your game within a GUI framework. This GUI framework can be placed within your game. """ import time import random import pygame from pygame.locals import * # the following line is not needed if pgu is installed import sys; sy...
unknown
codeparrot/codeparrot-clean
# -*- coding: latin-1 -*- # stdlib import os import os.path import tempfile import unittest # project from config import get_config, load_check_directory from util import is_valid_hostname, windows_friendly_colon_split from utils.pidfile import PidFile from utils.platform import Platform # No more hardcoded default c...
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/src/airflow/models/team.py
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013-2014, Epic Games, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (...
unknown
codeparrot/codeparrot-clean
#!/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. """Extracts native methods from a Java file and generates the JNI bindings. If you change this, please run and update the tests."""...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 Nagappan Alagappan All Rights Reserved. # This file is part of ATOMac. #@author: Nagappan Alagappan <nagappan@gmail.com> #@copyright: Copyright (c) 2009-13 Nagappan Alagappan #http://ldtp.freedesktop.org # ATOMac is free software; you can redistribute it and/or modify # it under the terms of th...
unknown
codeparrot/codeparrot-clean
from django.contrib.auth.backends import ModelBackend class CaseInsensitiveUsernameFieldBackendMixin(object): def authenticate(self, username=None, password=None, **kwargs): """ This authentication backend assumes that usernames are email addresses and simply lowercases a username before an...
unknown
codeparrot/codeparrot-clean
# sort three num count=0 print 'please input three num for sort' while count <3: print 'please input num%d'%(count+1) input=raw_input('num%d='%(count+1)) if input.isdigit()==False: print 'input error, not a num' continue count+=1 if count==1: num1=input #print 'num1 is',num1 elif count==2: num2=input...
unknown
codeparrot/codeparrot-clean
from django.http import * import os, sys, logging from vt_manager_kvm.common.rpc4django import rpcmethod from vt_manager_kvm.common.rpc4django import * from vt_manager_kvm.communication.geni.v3.configurators.handlerconfigurator import HandlerConfigurator #URL_NAME GAPI3_URL = "gapi" # Parameter Types CREDENTIALS_TYPE...
unknown
codeparrot/codeparrot-clean
from Policy import * from Architecture import * from Environment import * from TrainingFunction import * class RLAgent: def __init__(self, environment, architecture, knowledge): # reward? self.environment = environment self.architecture = architecture self.agent_function = AgentFunction(k...
unknown
codeparrot/codeparrot-clean
""" URL configuration for the new XBlock API """ from django.conf.urls import include, url from . import views # Note that the exact same API URLs are used in Studio and the LMS, but the API # may act a bit differently in each (e.g. Studio stores user state ephemerally). # If necessary at some point in the future, th...
unknown
codeparrot/codeparrot-clean
# tls-client.py # # Copyright (C) 2006-2017 wolfSSL Inc. # # This file is part of wolfSSL. (formerly known as CyaSSL) # # wolfSSL 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...
unknown
codeparrot/codeparrot-clean
"""Options used for building process.""" import re class PathOptions: """Get options/methods to resolve path-related stuff.""" main_binary_folder_name = "bin" shared_library_folder_name = "lib" # extend the below list if there are new types of shared libraries _shared_library_file_patterns = [r"...
python
github
https://github.com/mongodb/mongo
buildscripts/build_system_options.py
# Copyright 2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Team membership support for Launchpad. The primary form of communication between the RP and Launchpad is an OpenID authentication request. Our solution is to piggyback a team m...
unknown
codeparrot/codeparrot-clean
""" Arithmetic operations for PandasObjects This is not a public API. """ from __future__ import annotations from pandas.core.ops.array_ops import ( arithmetic_op, comp_method_OBJECT_ARRAY, comparison_op, fill_binop, get_array_op, logical_op, maybe_prepare_scalar_for_op, ) from pandas.cor...
python
github
https://github.com/pandas-dev/pandas
pandas/core/ops/__init__.py
# -*- coding: utf-8 -*- """ Created on Wed Apr 15 14:51:49 2015 @author: remi """ def exporting_pacth_from_server(): from datetime import datetime #loop on all patches id of a table import psycopg2 import multiprocessing as mp; connection_string = """host=172.16.3.50 dbname=test_pointcloud user=po...
unknown
codeparrot/codeparrot-clean
/* 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/data/service/url.h
import unittest from unittest import mock from django.utils.lorem_ipsum import paragraph, paragraphs, sentence, words class LoremIpsumTests(unittest.TestCase): def test_negative_words(self): """words(n) returns n + 19 words, even if n is negative.""" self.assertEqual( words(-5), ...
python
github
https://github.com/django/django
tests/utils_tests/test_lorem_ipsum.py
#ifndef BOOST_CORE_MEMORY_RESOURCE_HPP_INCLUDED #define BOOST_CORE_MEMORY_RESOURCE_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // Copyright 2023 Peter Dimov // Distributed under the Boost Software License, Version 1.0. // https://ww...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/core/memory_resource.hpp
""" This module contains the core classes of version 2.0 of SAX for Python. This file provides only default classes with absolutely minimum functionality, from which drivers and applications can be subclassed. Many of these classes are empty and are included only as documentation of the interfaces. $Id: handler.py,v ...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 OpenStack LLC. # 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 b...
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/logging/logback/SpringBootJoranConfigurator.java
import dot2html if __name__ == "__main__": dot2html.main()
python
github
https://github.com/llvm/llvm-project
bolt/utils/dot2html/__main__.py
"""**Graphs** provide a natural language interface to graph databases.""" from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.graphs.index_creator import GraphIndexCreator from langchain_community.graphs.networkx_graph import Net...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/indexes/graph.py
# -*- 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 'Carrier.color' db.add_column(u'carriers_carrier', 'color', self.gf('dja...
unknown
codeparrot/codeparrot-clean
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright 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...
go
github
https://github.com/kubernetes/kubernetes
pkg/apis/admissionregistration/v1beta1/zz_generated.defaults.go
test_kind: js_test selector: roots: - jstests/with_mongot/vector_search_mocked/*.js exclude_with_any_tags: - requires_auth executor: config: shell_options: nodb: ""
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/vector_search.yml
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
unknown
codeparrot/codeparrot-clean
import hashlib import re import os from collections import deque from io import BytesIO from urllib.parse import urljoin from fnmatch import fnmatch MYPY = False if MYPY: # MYPY is set to True when run under Mypy. from typing import Any from typing import BinaryIO from typing import Callable from t...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.document_loaders import UnstructuredPowerPointLoader # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # han...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/document_loaders/powerpoint.py
""" This module is for reading the html tables that list world leaders off of varying webpages. It is not very dynamic or robust, and has priority for updates. More tables of FEs from countries around the world will be added so users can compare their data sets to different world leaders. """ import pandas as pd # A...
unknown
codeparrot/codeparrot-clean
//@ts-ignore export { enableDraftHandler as GET } from "@contentful/vercel-nextjs-toolkit/app-router";
typescript
github
https://github.com/vercel/next.js
examples/cms-contentful/app/api/draft/route.ts
""" imdb package. This package can be used to retrieve information about a movie or a person from the IMDb database. It can fetch data through different media (e.g.: the IMDb web pages, a SQL database, etc.) Copyright 2004-2012 Davide Alberani <da@erlug.linux.it> This program is free software; you can redistribute i...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2014 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 logging import optparse import subprocess import sys import threading import time from git_common import GIT_EXE, GIT_TRANSIENT...
unknown
codeparrot/codeparrot-clean
# -*-coding:utf-8 -* # Copyright (c) 2011-2015, Intel Corporation # 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, thi...
unknown
codeparrot/codeparrot-clean
# Configuration file for jupyter-notebook. #------------------------------------------------------------------------------ # Application(SingletonConfigurable) configuration #------------------------------------------------------------------------------ ## This is an application. ## The date format used by logging f...
unknown
codeparrot/codeparrot-clean
from django.contrib.gis.gdal import SpatialReference from django.db import DEFAULT_DB_ALIAS, connections def add_srs_entry(srs, auth_name='EPSG', auth_srid=None, ref_sys_name=None, database=None): """ This function takes a GDAL SpatialReference system and adds its information to the `spat...
unknown
codeparrot/codeparrot-clean
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/modernize/UseStdPrintCheck.cpp
This directory contains files copied from `src/fastertransformer/cutlass_extensions/include/cutlass_extensions` directory of the source tree of [*FasterTransformer*](https://github.com/NVIDIA/FasterTransformer) project. These are intended for supporting mixed datatypes GEMM implementation, in `aten/src/ATen/native/cud...
unknown
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/cuda/cutlass_extensions/README.md
import libxml2mod import types import sys # The root of all libxml2 errors. class libxmlError(Exception): pass # Type of the wrapper class for the C objects wrappers def checkWrapper(obj): try: n = type(_obj).__name__ if n != 'PyCObject' and n != 'PyCapsule': return 1 except: ...
unknown
codeparrot/codeparrot-clean
"""Document layout engine.""" class Layout: """The document layout engine.""" def __init__(self,rect=None): """initialize the object with the size of the box.""" self._widgets = [] self.rect = rect def add(self,e): """Add a document element to the layout. The docu...
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 u...
unknown
codeparrot/codeparrot-clean
from django.contrib.auth.models import User from api_openvpn.models import UserProfile, Server from rest_framework.test import APIClient from rest_framework.test import APITestCase from functions import EasyRSAFuncions from rest_framework import exceptions import time class ApiTest(APITestCase): """ It tests b...
unknown
codeparrot/codeparrot-clean
// This file is part of ICU4X. // // The contents of this file implement algorithms from Calendrical Calculations // by Reingold & Dershowitz, Cambridge University Press, 4th edition (2018), // which have been released as Lisp code at <https://github.com/EdReingold/calendar-code2/> // under the Apache-2.0 license. Acco...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/calendrical_calculations/src/helpers.rs
# 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
An invalid `self` import was made. Erroneous code example: ```compile_fail,E0431 use {self}; // error: `self` import can only appear in an import list with a // non-empty prefix ``` You cannot import the current module into itself, please remove this import or verify you didn't misspell it.
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0431.md