code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from __future__ import absolute_import, division, unicode_literals from collections import OrderedDict import re from pip._vendor.six import string_types from . import base from .._utils import moduleFactoryFactory tag_regexp = re.compile("{([^}]*)}(.*)") def getETreeBuilder(ElementTreeImplementation): Element...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ''' Copyright (C) 2010 Aurelio A. Heckert, aurium (a) gmail dot com 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 late...
unknown
codeparrot/codeparrot-clean
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. """ Base for Atmel AVR series of microcontrollers """ from SCons.Script import Builder, DefaultEnvironment env = DefaultEnvironment() env.Replace( AR="avr-ar", AS="avr-as", CC="avr-gcc", CXX="avr-g++", OBJCOPY="avr-obj...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 OpenStack Foundation # 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 requ...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
from mongoengine.errors import OperationError from mongoengine.queryset.base import (BaseQuerySet, DO_NOTHING, NULLIFY, CASCADE, DENY, PULL) __all__ = ('QuerySet', 'QuerySetNoCache', 'DO_NOTHING', 'NULLIFY', 'CASCADE', 'DENY', 'PULL') # The maximum number of items to ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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
import os import re from typing import Optional, Set MONGO_DOCUMENT_SOURCE_DIR = "src/mongo/db/pipeline" # Regex to find bool requiresAuthzChecks() const override { return false; } AUTHZ_OPT_OUT_PATTERN = re.compile( r"bool\s+requiresAuthzChecks\s*\(\s*\)\s*const\s*override\s*\{\s*return\s+false;\s*\}", re.DO...
python
github
https://github.com/mongodb/mongo
buildscripts/get_agg_stages_no_authz.py
// Basic functions on sparse tensors #define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/InitialTensorOptions.h> #include <ATen/Layout.h> #include <ATen/Parallel.h> #include <ATen/SparseCsrTensorImpl.h> #include <ATen/SparseCsrTensorUtils.h> #include <ATen...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/sparse/SparseCsrTensor.cpp
"""Support for file notification.""" import os import voluptuous as vol from homeassistant.components.notify import ( ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA, BaseNotificationService, ) from homeassistant.const import CONF_FILENAME import homeassistant.helpers.config_validation as cv import ho...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. """ This module allows you to bring up and tear down keyspaces. """ import cgi import json import subprocess import sy...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import tempfile import subprocess import pymongo import shutil import time import sys from camomile import Camomile URL = 'http://localhost:3000' CLIENT = Camomile(URL, debug=False) MONGO_DIR = None MONGO_PROCESS = None NODE_PROCESS = None ROOT_USERNAME = 'root' ROOT_PASSWORD...
unknown
codeparrot/codeparrot-clean
//////////////////////////////////////////////////////////////////////////// // // Copyright 2015 Realm Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/li...
swift
github
https://github.com/realm/realm-swift
RealmSwift/Tests/RealmConfigurationTests.swift
# 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
# FILE: autoload/conque_term/conque_sole_shared_memory.py # AUTHOR: Nico Raffo <nicoraffo@gmail.com> # WEBSITE: http://conque.googlecode.com # MODIFIED: 2011-08-12 # VERSION: 2.2, for Vim 7.0 # LICENSE: # Conque - Vim terminal/console emulator # Copyright (C) 2009-__YEAR__ Nico Raffo # # MIT License # # Permiss...
unknown
codeparrot/codeparrot-clean
#saks from bs4 import BeautifulSoup import urllib2 import sys from urlparse import urljoin #import lxml sys.path.append("/Users/fcolombo/Documents/gilt"); import defaultparser import crawler #import html5lib class SaksCrawler: def getProductParser(self): def findBrand(soup): brandTag = soup.find('h1', class_=...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2010 Patrick Crews # # 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 ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './pyqtgraph/flowchart/FlowchartCtrlTemplate.ui' # # Created: Mon Dec 23 10:10:50 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtC...
unknown
codeparrot/codeparrot-clean
import functools from urlparse import urlunparse from django.conf import settings from django.contrib.sites.models import Site from django.core.urlresolvers import reverse as simple_reverse def current_site_domain(): domain = Site.objects.get_current().domain prefix = 'www.' if getattr(settings, 'REMOVE_...
unknown
codeparrot/codeparrot-clean
#include "test/jemalloc_test.h" #define INVALID_ARENA_IND ((1U << MALLOCX_ARENA_BITS) - 1) TEST_BEGIN(test_arena_slab_regind) { szind_t binind; for (binind = 0; binind < SC_NBINS; binind++) { size_t regind; edata_t slab; const bin_info_t *bin_info = &bin_infos[binind]; edata_init(&slab, INVALID_ARENA_IND, ...
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/slab.c
/* * 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/system/SystemProperties.java
# -*- coding: utf-8 -*- """ Exodus Add-on 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 later version. This progra...
unknown
codeparrot/codeparrot-clean
from sympy import var, sqrt, exp, simplify, S, integrate, oo, Symbol from sympy.physics.hydrogen import R_nl, E_nl, E_nl_dirac from sympy.utilities.pytest import raises var("r Z") def feq(a, b, max_relative_error=1e-12, max_absolute_error=1e-12): a = float(a) b = float(b) # if the numbers are close enough...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Netflix, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
unknown
codeparrot/codeparrot-clean
# Copyright 2007 Matt Chaput. 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 and the...
unknown
codeparrot/codeparrot-clean
""" soap2_wrapper.py A wrapper script for SOAP2 Copyright Peter Li peter@gigasciencejournal.com """ import sys, optparse, os, tempfile, shutil, subprocess def stop_err(msg): sys.stderr.write('%s\n' % msg) sys.exit() def cleanup_before_exit(tmp_dir): if tmp_dir and os.path.exists(tmp_dir): shutil....
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 NEC 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 #...
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\AssetMapper; use Symfony\Component\AssetMapper\Import...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/AssetMapper/MappedAsset.php
//! Essentials helper functions and types for application registration. //! //! # Request Extractors //! - [`Data`]: Application data item //! - [`ThinData`]: Cheap-to-clone application data item //! - [`ReqData`]: Request-local data item //! - [`Path`]: URL path parameters / dynamic segments //! - [`Query`]: URL query...
rust
github
https://github.com/actix/actix-web
actix-web/src/web.rs
#!/usr/bin/env python # See LICENSE.txt for license details. # Author: # Yonggang Luo(luoyonggang@gmail.com) # Trent Mick(TrentM@ActiveState.com) r"""Find the full path to commands. which(command, path=None, verbose=0, exts=None) Return the full path to the first match of the given command on the path. w...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2023 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. PLATFORM=darwin-arm64 ./build/teamcity/internal/release/process/make-and-publish-build-artifacts-per-platform.sh
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity/internal/release/process/make-and-publish-build-artifacts-darwin-arm64.sh
--- navigation_title: "Release notes" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/8.18/es-connectors-release-notes.html --- # Connector release notes :::{admonition} Enterprise Search is discontinued in Elastic 9.0.0 Please note that Enterprise Search is not available in Elastic 9.0+, in...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/search-connectors/release-notes.md
"""feather-format compat""" from __future__ import annotations from typing import ( TYPE_CHECKING, Any, ) import warnings import numpy as np from pandas._config import using_string_dtype from pandas._libs import lib from pandas.compat._optional import import_optional_dependency from pandas.errors import Pa...
python
github
https://github.com/pandas-dev/pandas
pandas/io/feather_format.py
/* * 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/test/java/org/springframework/aop/support/PointcutsTests.java
#! /usr/bin/env python # -*- coding: UTF-8 -*- import os import sys import setuptools try: # work-around to avoid "setup.py test" error # see: http://bugs.python.org/issue15881#msg170215 import multiprocessing assert multiprocessing except ImportError: pass py_version = sys.version_info with ope...
unknown
codeparrot/codeparrot-clean
/* * 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
distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/OverheadSystemMemoryInfo.java
[ { "@level": "info", "@message": "tfcoremock_nested_list.nested_list: Plan to update", "@module": "terraform.ui", "change": { "action": "update", "resource": { "addr": "tfcoremock_nested_list.nested_list", "implied_provider": "tfcoremock", "module": "", "re...
json
github
https://github.com/hashicorp/terraform
testing/equivalence-tests/outputs/nested_list_update/apply.json
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/mtd/mediatek,nand-ecc-engine.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: MediaTek(MTK) SoCs NAND ECC engine maintainers: - Xiangsheng Hou <xiangsheng.hou@mediatek.com> description: | ...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mtd/mediatek,nand-ecc-engine.yaml
# Copyright 2012 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package oci import ( "crypto/rsa" "crypto/tls" "crypto/x509" "fmt" "net" "net/http" "os" "path" "path/filepath" "regexp" "runtime" "strconv" "strings" "github.com/hashicorp/terraform/version" "github.com/oracle/oci-go-sdk/v65/common...
go
github
https://github.com/hashicorp/terraform
internal/backend/remote-state/oci/auth.go
# Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 Lic...
unknown
codeparrot/codeparrot-clean
<svg width="6" height="10" viewBox="0 0 6 10" fill="none" xmlns="http://www.w3.org/2000/svg" {{ $attributes }}> <path d="M0.875 9.25L5.125 5L0.875 0.75" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg>
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/resources/exceptions/renderer/components/icons/chevron-right.blade.php
use std::io::Error; use std::path::{Path, PathBuf}; use rustc_errors::codes::*; use rustc_errors::{ Applicability, Diag, DiagCtxtHandle, DiagSymbolList, Diagnostic, EmissionGuarantee, Level, MultiSpan, inline_fluent, }; use rustc_hir::Target; use rustc_hir::attrs::{MirDialect, MirPhase}; use rustc_macros::{Dia...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_passes/src/errors.rs
# Copyright 2013 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 json import logging from cStringIO import StringIO import posixpath import traceback from zipfile import ZipFile import appengine_blobstore as blobst...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0-only /* * fs/fs-writeback.c * * Copyright (C) 2002, Linus Torvalds. * * Contains all the functions related to writing back and waiting * upon dirty inodes against superblocks, and writing back dirty * pages against inodes. ie: data writeback. Writeout of the * inode itself ...
c
github
https://github.com/torvalds/linux
fs/fs-writeback.c
{ "ZSCAN": { "summary": "Iterates over members and scores of a sorted set.", "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.", "group": "sorted_set", ...
json
github
https://github.com/redis/redis
src/commands/zscan.json
import BaseComponent from '../../../src/base-component.js' import { enableDismissTrigger } from '../../../src/util/component-functions.js' import { clearFixture, createEvent, getFixture } from '../../helpers/fixture.js' class DummyClass2 extends BaseComponent { static get NAME() { return 'test' } hide() { ...
javascript
github
https://github.com/twbs/bootstrap
js/tests/unit/util/component-functions.spec.js
# python # This file is generated by a program (mib2py). Any edits will be lost. from pycopia.aid import Enum import pycopia.SMI.Basetypes Range = pycopia.SMI.Basetypes.Range Ranges = pycopia.SMI.Basetypes.Ranges from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, N...
unknown
codeparrot/codeparrot-clean
/* crc32_fold_vpclmulqdq_tpl.h -- VPCMULQDQ-based CRC32 folding template. * Copyright Wangyang Guo (wangyang.guo@intel.com) * For conditions of distribution and use, see copyright notice in zlib.h */ #ifdef COPY static size_t fold_16_vpclmulqdq_copy(__m128i *xmm_crc0, __m128i *xmm_crc1, __m128i *xmm_crc2, __m12...
c
github
https://github.com/opencv/opencv
3rdparty/zlib-ng/arch/x86/crc32_fold_vpclmulqdq_tpl.h
# Copyright 2010 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """GDB Pretty printers and convenience functions for Go's runtime structures. This script is loaded by GDB when it finds a .debug_gdb_scripts section in the compi...
unknown
codeparrot/codeparrot-clean
import re import sys def negate(condition): """ Returns a CPP conditional that is the opposite of the conditional passed in. """ if condition.startswith('!'): return condition[1:] return "!" + condition class Monitor: """ A simple C preprocessor that scans C source and computes, li...
unknown
codeparrot/codeparrot-clean
//===--- LetPropertyLowering.swift -----------------------------------------==// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
swift
github
https://github.com/apple/swift
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LetPropertyLowering.swift
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # # # Copyright (c) 2008 University of Dundee. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at ...
unknown
codeparrot/codeparrot-clean
import os import sys import inspect import core.plugin def load_plugins(dir, instantiate = False, shell = None): plugins = {} for root, dirs, files in os.walk(dir): sys.path.append(root) # make forward slashes on windows module_root = root.replace(dir, "").replace("\\", "/") ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # # Author: Nicolas Bessi # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, o...
unknown
codeparrot/codeparrot-clean
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
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\Bundle\FrameworkBundle\Tests\Controller; use PHPUnit\Framework\...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/Controller/RedirectControllerTest.php
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import re import fnmatch import sys import subprocess import datetime import os #############################...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (2016-2017) Hewlett Packard Enterprise Development LP # # 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 optio...
unknown
codeparrot/codeparrot-clean
export var __N_SSG = true; export function Noop() {} export default function Test() { return __jsx("div", null); }
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/strip-page-exports/getStaticProps/not-remove-extra-named-export-function-declarations/output-default.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
benchmarks/src/main/java/org/elasticsearch/benchmark/index/codec/tsdb/EncodeTimestampLikeBenchmark.java
# Copyright (c) 2015 Shaun McCance <shaunm@gnome.org> # # 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, modify, me...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2017 Matthew C. Zwier and Lillian T. Chong # # This file is part of WESTPA. # # WESTPA 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...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.rx3 import kotlinx.coroutines.testing.* import kotlinx.coroutines.* import org.junit.* import java.util.* import kotlin.coroutines.* class ObservableCompletionStressTest : TestBase() { private val N_REPEATS = 10_000 * stressTestMultiplier private fun CoroutineScope.range(context: C...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
reactive/kotlinx-coroutines-rx3/test/ObservableCompletionStressTest.kt
#!/usr/bin/env python # # Copyright 2004,2005,2007,2010,2012,2013,2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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 ver...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0015_add_more_verbose_names'), ('wagtailsearch', '0003_remove_editors_pick'), ] operations = [ migrations.SeparateDatabaseAndState( ...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Matt Chaput. 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 and the...
unknown
codeparrot/codeparrot-clean
# # PEDA - Python Exploit Development Assistance for GDB # # Copyright (C) 2012 Long Le Dinh <longld at vnsecurity.net> # # License: see LICENSE file for details # # change below settings to match your needs ## BEGIN OF SETTINGS ## # external binaries, required for some commands READELF = "/usr...
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.parsers.pdf import ( AmazonTextractPDFParser, DocumentIntelligenceParser, PDFMinerParser, PDFPlumberParser, PyMuPDFParser, ...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/document_loaders/parsers/pdf.py
#!/usr/bin/python # Copyright (c) 2016 Hewlett-Packard Enterprise Corporation # 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', ...
unknown
codeparrot/codeparrot-clean
package container // Mount contains information for a mount operation. type Mount struct { Source string `json:"source"` Destination string `json:"destination"` Writable bool `json:"writable"` }
go
github
https://github.com/moby/moby
daemon/container/mounts_windows.go
import os import pygame import sys from diamond_game.model.models import Board import Queue def main(): pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("test.png") ballrect = ball.get_rect() ...
unknown
codeparrot/codeparrot-clean
import uuid from datetime import datetime import hmac from base64 import b64encode from django.conf import settings from django.utils import timezone from zeep import Client, xsd from agir.payments.models import Subscription from agir.system_pay import SystemPayError from agir.system_pay.utils import get_recurrence_r...
unknown
codeparrot/codeparrot-clean
import logging import os import re import shlex import subprocess import sys from time import sleep from streamlink_cli.compat import is_win32, stdout from streamlink_cli.constants import PLAYER_ARGS_INPUT_DEFAULT, PLAYER_ARGS_INPUT_FALLBACK, SUPPORTED_PLAYERS from streamlink_cli.utils import ignored if is_win32: ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2019 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/podautoscaler/config/v1alpha1/defaults.go
from decimal import Decimal _ = lambda x:x #from i18n import _ from electrum import WalletStorage, Wallet from electrum.util import format_satoshis, set_verbosity from electrum.bitcoin import is_valid, COIN, TYPE_ADDRESS from electrum.network import filter_protocol import sys, getpass, datetime # minimal fdisk like gu...
unknown
codeparrot/codeparrot-clean
""" ========================================= Comparison of Manifold Learning methods ========================================= An illustration of dimensionality reduction on the S-curve dataset with various manifold learning methods. For a discussion and comparison of these algorithms, see the :ref:`manifold module ...
python
github
https://github.com/scikit-learn/scikit-learn
examples/manifold/plot_compare_methods.py
'use strict'; import AxiosError from '../core/AxiosError.js'; import parseProtocol from './parseProtocol.js'; import platform from '../platform/index.js'; const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; /** * Parse data uri to a Buffer or Blob * * @param {String} uri * @param {?Boolean}...
javascript
github
https://github.com/axios/axios
lib/helpers/fromDataURI.js
"""Import hook support. Consistent use of this module will make it possible to change the different mechanisms involved in loading modules independently. While the built-in module imp exports interfaces to the built-in module searching and loading algorithm, and it is possible to replace the built-in function __impor...
unknown
codeparrot/codeparrot-clean
//===-- InsertionPointTess.cpp -------------------------------------------===// // // 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/clangd/unittests/InsertionPointTests.cpp
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
unknown
codeparrot/codeparrot-clean
from base64 import b64encode import mimetypes import os, urlparse from webassets.filter.cssrewrite.base import CSSUrlRewriter __all__ = ('CSSDataUri',) class CSSDataUri(CSSUrlRewriter): """Will replace CSS url() references to external files with internal `data: URIs <http://en.wikipedia.org/wiki/Data_URI_sch...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -* # # iso9075.py - Python codec for ISO-9075 # # Copyright 2011 Jesús Torres <jmtorres@ull.es> # # 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 # #...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='test handling of --alternate-refs traversal' . ./test-lib.sh # Avoid test_commit because we want a specific and known set of refs: # # base -- one # \ \ # two -- merged # # where "one" and "two" are on separate refs, and "merged" is available only in # the dependent child...
unknown
github
https://github.com/git/git
t/t5618-alternate-refs.sh
# -*- coding: utf-8 -*- ############################################################################### # # GetBuyLinks # Retrieves a list of Buy Links for a particular Album. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may...
unknown
codeparrot/codeparrot-clean
""" Acceptance tests for Studio's New Icon Display Days Test """ from .base_studio_test import StudioCourseTest from ...pages.studio.ga_course_rerun import CourseRerunPage from ...pages.studio.ga_index import DashboardPage from ...pages.studio.settings_advanced import AdvancedSettingsPage class NewIconDisplayDaysTes...
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/compiler/mlir/lite/transforms/lift_tflite_flex_ops.h
// // basic_streambuf_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_BA...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/asio/basic_streambuf_fwd.hpp
import datetime import os import shutil import sys import tempfile import threading import time import unittest from io import StringIO from pathlib import Path from urllib.request import urlopen from django.conf import DEFAULT_STORAGE_ALIAS, STATICFILES_STORAGE_ALIAS from django.core.cache import cache from django.co...
python
github
https://github.com/django/django
tests/file_storage/tests.py
# Copyright 2015 gRPC 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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import sys import os import deadpool_dfa import phoenixAES import binascii def processinput(iblock, blocksize): #p=b'%0*x' % (2*blocksize, iblock) # Requires python3.5 p=('%0*x' % (2*blocksize, iblock)).encode('utf8') open('foo', 'wb').write(binascii.unhexlify(p)*4) return (Non...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 OpenStack Foundation # 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 ...
unknown
codeparrot/codeparrot-clean
""" Helper module for Python version 2.7 - Ordered dictionaries - Encoding/decoding urls - Unicode - Exception handling (except Exception as e) """ import base64 from urllib import unquote, quote from collections import OrderedDict def modulename(): return "Helper module for Python version 2.7" def url_decode(uri):...
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 us...
unknown
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/tests/e2e/README.md
package remote import ( "bytes" "context" "encoding/json" "errors" "fmt" "io" "net" "net/http" "net/http/httptest" "os" "path/filepath" "runtime" "testing" "github.com/moby/moby/v2/daemon/libnetwork/discoverapi" "github.com/moby/moby/v2/daemon/libnetwork/driverapi" "github.com/moby/moby/v2/daemon/libn...
go
github
https://github.com/moby/moby
daemon/libnetwork/drivers/remote/driver_test.go
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.exceptions.base; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import org.junit.Test; import org.mockitoutil.TestBase; public class MockitoAs...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockito/exceptions/base/MockitoAssertionErrorTest.java
<?php namespace Illuminate\Tests\Database; use Illuminate\Contracts\Support\Arrayable; enum StringStatus: string { case draft = 'draft'; case pending = 'pending'; case done = 'done'; } enum IntegerStatus: int { case draft = 0; case pending = 1; case done = 2; } enum NonBackedStatus { ca...
php
github
https://github.com/laravel/framework
tests/Database/Enums.php
"""Extend ExpatParser with hydroshare-specific functionality.""" import base64 import os.path from StringIO import StringIO from xml.sax import xmlreader, saxutils from xml.sax.expatreader import ExpatParser from django.conf import settings XML_CACHE = os.path.join(settings.PROJECT_ROOT, '_xmlcache') class Cataloge...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package reflect import ( "internal/abi" "internal/goarch" "unsafe" ) // These variables are used by the register assignment // algorithm in this file. // /...
go
github
https://github.com/golang/go
src/reflect/abi.go