code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# event/attr.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Attribute implementation for _Dispatch classes. The various listener targets for a p...
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 "Lic...
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\Test; trait WebTestAssertionsTrait { ...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Test/WebTestAssertionsTrait.php
/* * 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/idea/EnablePreviewFeaturesTask.java
# Copyright 2014-2015 ARM Limited # # 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...
unknown
codeparrot/codeparrot-clean
#pragma once #include <condition_variable> #include <memory> #include <optional> #include <tuple> #include <type_traits> #include <utility> #include <ATen/core/Dict.h> #include <ATen/core/List.h> #include <ATen/core/IListRef.h> #include <ATen/core/functional.h> #include <ATen/core/jit_type.h> #include <ATen/core/qual...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/core/ivalue_inl.h
############################ Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2.6 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2010,2011,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from collections imp...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # coding=UTF-8 import re import sys import urllib2 class Downloader: def __init__(self): """ do nothing """ @staticmethod def _file_size(file_name): file_size = os.path.getsize(file_name) if file_size < 1024: return str(file_size) + 'byte...
unknown
codeparrot/codeparrot-clean
set -o errexit cd src git clone --branch=v0.3.0-jepsen-mongodb-master --depth=1 https://x-access-token:${github_token}@github.com/10gen/jepsen.git jepsen-mongodb cd jepsen-mongodb lein install
unknown
github
https://github.com/mongodb/mongo
evergreen/do_jepsen_setup/install_jepsen.sh
""" ============= Masked Arrays ============= Arrays sometimes contain invalid or missing data. When doing operations on such arrays, we wish to suppress invalid values, which is the purpose masked arrays fulfill (an example of typical use is given below). For example, examine the following array: >>> x = np.array(...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.plugins.di import io.ktor.server.config.* import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Deferred import kotlin.reflect.KProperty /** * Functional...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-plugins/ktor-server-di/common/src/io/ktor/server/plugins/di/DependencyResolution.kt
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Kenneth D. Evensen <kevensen@redhat.com> # 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
# Written to test interrupted system calls interfering with our many buffered # IO implementations. http://bugs.python.org/issue12268 # # This tests the '_io' module. Similar tests for Python 2.x's older # default file I/O implementation exist within test_file2k.py. # # It was suggested that this code could be merged...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.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, modi...
unknown
codeparrot/codeparrot-clean
name: check-style # Get the repository with all commits to ensure that we can analyze # all of the commits contributed via the Pull Request. on: pull_request: types: [opened, synchronize] # Avoid unnecessary builds. Unlike the main CI jobs, these are not # ci-configurable (but could be). concurrency: group: ...
unknown
github
https://github.com/git/git
.github/workflows/check-style.yml
#!/usr/bin/env python ''' A PPP over MAVLink module Andrew Tridgell May 2012 ''' import time, os, fcntl, pty from MAVProxy.modules.lib import mp_module class PPPModule(mp_module.MPModule): def __init__(self, mpstate): super(PPPModule, self).__init__(mpstate, "ppp", "PPP link") self.command = "noa...
unknown
codeparrot/codeparrot-clean
# -*- test-case-name: twisted.test.test_formmethod -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Form-based method objects. This module contains support for descriptive method signatures that can be used to format methods. """ import calendar class FormException(Exception): """...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from lxml import objectify import urlparse from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment.tests.common import PaymentAcquirerCommon from openerp.addons.payment_adyen.controllers.main import AdyenController from openerp.osv.orm import exce...
unknown
codeparrot/codeparrot-clean
import numpy as nm import libxml2 from array import * from libxml2 import xmlAttr import matplotlib.pyplot as plt # read data eVdoc = libxml2.parseFile("./eV.xml") ctxt = eVdoc.xpathNewContext() Volume=nm.array(map(float,map(xmlAttr.getContent,ctxt.xpathEval("//@volume")))) totalEnergy=nm.array(map(float,map(xmlAttr.ge...
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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/platform/cloud/oauth_client.h
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package clistate import ( "encoding/json" "errors" "fmt" "io" "io/ioutil" "os" "path/filepath" "sync" "time" "github.com/hashicorp/terraform/internal/command/workdir" "github.com/hashicorp/terraform/internal/states/statemgr" ) // Local...
go
github
https://github.com/hashicorp/terraform
internal/command/clistate/local_state.go
// Copyright 2025 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
server/auth/main_test.go
# Copyright 2012 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 2013 IBM Corp. # # 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...
unknown
codeparrot/codeparrot-clean
// This file was automatically generated from channels.md by Knit tool. Do not edit. package kotlinx.coroutines.guide.exampleChannel03 import kotlinx.coroutines.* import kotlinx.coroutines.channels.* fun CoroutineScope.produceSquares(): ReceiveChannel<Int> = produce { for (x in 1..5) send(x * x) } fun main() = r...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/jvm/test/guide/example-channel-03.kt
{ "name": "angular.dev", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "angular.dev", "version": "0.0.0", "dependencies": { "@angular/common": "^21.1.0-next", "@angular/compiler": "^21.1.0-next", "@angular/core": "^21.1.0-...
json
github
https://github.com/angular/angular
adev/src/content/tutorials/homepage/package-lock.json
--- navigation_title: "SAMPLE" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-sample --- # {{esql}} `SAMPLE` command [esql-sample] :::{include} ../_snippets/commands/layout/sample.md :::
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/commands/sample.md
/* * 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-test/src/main/java/org/springframework/boot/test/json/GsonTester.java
# # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from units.compat.mock import patch from ansible.modules.network.onyx impor...
unknown
codeparrot/codeparrot-clean
#!venv/bin/python # Creates a new post entry def create(config): from app import create_slug template = 'page' if config.template == None else config.template vars = { 'title' : config.title, 'template': template, 'tags' : config.tags, 'date' : datetime.now().strft...
unknown
codeparrot/codeparrot-clean
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import cmd import pprint import sys from ansible.plugins.strategy.linear import StrategyModule as LinearStrategyModule from ansible.compat.six.moves import reduce try: from __main__ import display except ImportError: from...
unknown
codeparrot/codeparrot-clean
""" End-to-end tests for the main LMS Dashboard (aka, Student Dashboard). """ from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc from common.test.acceptance.pages.common.auto_auth import AutoAuthPage from common.test.acceptance.pages.lms.dashboard import DashboardPage from common.test.a...
unknown
codeparrot/codeparrot-clean
# Owner(s): ["module: unknown"] # ruff: noqa: F841 import functools import unittest import torch import torch.nn.functional as F import torch.utils.flop_counter from torch._subclasses.fake_tensor import FakeTensorMode from torch.testing._internal.common_cuda import ( PLATFORM_SUPPORTS_CUDNN_ATTENTION, PLATFORM...
python
github
https://github.com/pytorch/pytorch
test/test_flop_counter.py
"""**Docstores** are classes to store and load Documents. The **Docstore** is a simplified version of the Document Loader. """ from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.docstore.arbitrary_fn import DocstoreFn from lang...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/docstore/__init__.py
# -*- coding: utf-8; -*- # This file is part of Superdesk. # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license # # Author : superdesk # Creation: 2017-08-14 11:47 from superdesk.commands....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENSE...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import json from flask import jsonify from flask import render_template, request, url_for, redirect import time, random #------------------------------------------------------------------------------ def get_desktop_items_data(): """ Returns items for Desktop in JSON array: title ...
unknown
codeparrot/codeparrot-clean
import { isReactRouterRepo } from "../config/is-react-router-repo"; export const ssrExternals = isReactRouterRepo() ? [ // This is only needed within this repo because these packages // are linked to a directory outside of node_modules so Vite // treats them as internal code by default. "reac...
typescript
github
https://github.com/remix-run/react-router
packages/react-router-dev/vite/ssr-externals.ts
from datetime import date from django.db import models from django.test import TestCase from django.contrib.auth.models import User from turbion.bits.utils import merging class MyProfile(models.Model): user_ptr = models.ForeignKey(User, unique=True) nickname = models.CharField(max_length=100) www = model...
unknown
codeparrot/codeparrot-clean
# 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 'WMSSource.metadata' db.add_column('lizard_wms_wmssource', 'metadata', self.gf('jsonfield.fields.JS...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
unknown
codeparrot/codeparrot-clean
"""Timing benchmark for AlexNet inference. To run, use: bazel run -c opt --config=cuda \ third_party/tensorflow/models/image/alexnet:alexnet_benchmark Across 100 steps on batch size = 128. Forward pass: Run on Tesla K40c: 145 +/- 1.5 ms / batch Run on Titan X: 70 +/- 0.1 ms / batch Forward-backward pass...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class URPlayIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?ur(?:play|skola)\.se/(?:program|Produkter)/(?P<id>[0-9]+)' _TESTS = [{ 'url': 'http://urplay.se/program/190031-tripp-trapp-trad-sovkudde', 'md5': 'ad5f0de86f...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 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
""" Disk management utilities. """ # Authors: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Lars Buitinck <L.J.Buitinck@uva.nl> # Copyright (c) 2010 Gael Varoquaux # License: BSD Style, 3 clauses. import errno import os import shutil import sys import time def disk_used(path): """ Return t...
unknown
codeparrot/codeparrot-clean
# META: timeout=long import pytest from tests.support.asserts import assert_dialog_handled, assert_error, assert_success def close(session): return session.transport.send( "DELETE", "session/{session_id}/window".format(**vars(session))) @pytest.fixture def check_user_prompt_closed_without_exception(sess...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright, (c) 2018, Ansible Project # Copyright, (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # # 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__ =...
unknown
codeparrot/codeparrot-clean
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # coding=UTF-8 # Author: Dennis Lutter <lad1337@gmail.com> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Softwa...
unknown
codeparrot/codeparrot-clean
""" Testing the `next_token_action` decorator on a toy class. """ import mws import unittest # pylint: disable=invalid-name ACTION = "SomeAction" class ToyClass(object): """ Example class using a method designed to be run with a `next_token`, calling the corresponding `action_by_next_token` method """...
unknown
codeparrot/codeparrot-clean
// Formatting library for C++ - implementation // // Copyright (c) 2012 - 2016, Victor Zverovich // All rights reserved. // // For the license information refer to format.h. #ifndef FMT_FORMAT_INL_H_ #define FMT_FORMAT_INL_H_ #ifndef FMT_MODULE # include <algorithm> # include <cerrno> // errno # include <climits>...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/spdlog/include/spdlog/fmt/bundled/format-inl.h
# -*- coding: utf-8 -*- """ flask.debughelpers ~~~~~~~~~~~~~~~~~~ Various helpers to make the development experience better. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from ._compat import implements_to_string class UnexpectedUnicodeError(AssertionErr...
unknown
codeparrot/codeparrot-clean
//////////////////////////////////////////////////////////////////////////// // // Copyright 2014 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...
c
github
https://github.com/realm/realm-swift
Realm/RLMObjectBase.h
use core::ops::ControlFlow; use std::borrow::Cow; use std::iter; use hir::def_id::{DefId, DefIdMap, LocalDefId}; use rustc_data_structures::fx::{FxIndexMap, FxIndexSet}; use rustc_errors::codes::*; use rustc_errors::{Applicability, ErrorGuaranteed, MultiSpan, pluralize, struct_span_code_err}; use rustc_hir::def::{DefK...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_hir_analysis/src/check/compare_impl_item.rs
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package jsonformat import ( "fmt" "slices" "github.com/hashicorp/terraform/internal/command/jsonformat/computed" "github.com/hashicorp/terraform/internal/command/jsonformat/differ" "github.com/hashicorp/terraform/internal/command/jsonformat/s...
go
github
https://github.com/hashicorp/terraform
internal/command/jsonformat/diff.go
## common/zeroconf/zeroconf.py ## ## Copyright (C) 2006 Stefan Bethge <stefan@lanpartei.de> ## ## This file is part of Gajim. ## ## Gajim 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; version 3 only. ...
unknown
codeparrot/codeparrot-clean
"""Sanity test using yamllint.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import os from .. import types as t from ..sanity import ( SanitySingleVersion, SanityMessage, SanityFailure, SanitySuccess, SANITY_ROOT, ) from ..target import (...
unknown
codeparrot/codeparrot-clean
import sys import numpy as np from PyQt5.QtGui import QIntValidator, QDoubleValidator from PyQt5.QtWidgets import QApplication, QSizePolicy from orangewidget import gui from orangewidget.settings import Setting from orangewidget import widget from oasys.widgets import widget as oasyswidget, gui as oasysgui import orang...
unknown
codeparrot/codeparrot-clean
/* Copyright 2022 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/transforms/utils/pdll/utils.h
# -*- coding: iso-8859-1 -*- """ MoinMoin - inter-thread communication commands This file defines command objects used by notification bot's threads to communicate among each other. @copyright: 2007 by Karol Nowak <grywacz@gmail.com> @license: GNU GPL, see COPYING for details. """ from pyxmpp.jid...
unknown
codeparrot/codeparrot-clean
""" Thread server class implementation """ import logging import os import signal import subprocess import traceback import time import psutil from retry import retry from pytest_server_fixtures import CONFIG from pytest_server_fixtures.base import ProcessReader from .common import ServerClass, is_debug log = loggin...
unknown
codeparrot/codeparrot-clean
import numpy as np import pylab from mpl_toolkits.mplot3d import Axes3D from .TransitFlux import FluxQuad from . import Cnst from . import PlanetOrbit ############################################################################### def EccLightCurve(par,t,plot=False): """Lightcurve function for eccentric orbits."""...
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 # "Licens...
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-context/src/main/java/org/springframework/ui/ModelMap.java
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # The gui # import gettext import os from config import Config from PyQt5.QtWidgets import QLabel, QLineEdit, QMainWindow, QPushButton, QWidget, QVBoxLayout, QAction from PyQt5.QtCore import pyqtSlot localedir = os.path.join(os.path.abspath(os.path.dirname(__file__)),...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, int_or_none, url_or_none, urlencode_postdata, ) class HiDiveIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?hidive\.com/st...
unknown
codeparrot/codeparrot-clean
import lru class ormcache(object): """ LRU cache decorator for orm methods, """ def __init__(self, skiparg=2, size=8192, multi=None, timeout=None): self.skiparg = skiparg self.size = size self.method = None self.stat_miss = 0 self.stat_hit = 0 self.stat_err ...
unknown
codeparrot/codeparrot-clean
/* quirc -- QR-code recognition library * Copyright (C) 2010-2012 Daniel Beer <dlbeer@gmail.com> * * 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. ...
c
github
https://github.com/opencv/opencv
3rdparty/quirc/src/version_db.c
/** * @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 {FilterFn, FilterFnGenerator, FilterMatch} from './filter.component'; // // Types & Constants // type Token...
typescript
github
https://github.com/angular/angular
devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/filter/directive-forest-filter-fn-generator.ts
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of the Shiboken Python Bindings Generator project. # # Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). # # Contact: PySide team <contact@pyside.org> # # This program is free software; you can redistribute it and/or # modify it under the terms...
unknown
codeparrot/codeparrot-clean
# Copyright 2019 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
# Copyright 1999 by Jeffrey Chang. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Index.py This module provides a way to create indexes to text files. Classes: Index D...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'CourseOverview.cert_html_view_enabled' # The default valu...
unknown
codeparrot/codeparrot-clean
-- float4 check CREATE TABLE float4tmp (a float4); \copy float4tmp from 'data/float4.data' SET enable_seqscan=on; SELECT count(*) FROM float4tmp WHERE a < -179.0; SELECT count(*) FROM float4tmp WHERE a <= -179.0; SELECT count(*) FROM float4tmp WHERE a = -179.0; SELECT count(*) FROM float4tmp WHERE a >= -179.0;...
sql
github
https://github.com/postgres/postgres
contrib/btree_gist/sql/float4.sql
// This file was automatically generated from shared-mutable-state-and-concurrency.md by Knit tool. Do not edit. package kotlinx.coroutines.guide.exampleSync04 import kotlinx.coroutines.* import kotlin.system.* suspend fun massiveRun(action: suspend () -> Unit) { val n = 100 // number of coroutines to launch ...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/jvm/test/guide/example-sync-04.kt
/* * Copyright (C) 2015 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
java
github
https://github.com/google/guava
android/guava-testlib/src/com/google/common/collect/testing/testers/MapForEachTester.java
# written in python 3.6.1 #-*- coding: utf-8 -*- from urllib.request import urlopen import json import string import re from bs4 import BeautifulSoup import logging import time FILE_PATH = "./boxofficemojo.com/movie_data.txt" LOG_PATH = "./boxofficemojo.com/scraping.log" logging.basicConfig(filename=LOG_PATH,level=lo...
unknown
codeparrot/codeparrot-clean
"""WeChatTicket URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Clas...
unknown
codeparrot/codeparrot-clean
# This file is part of OpenHatch. # Copyright (C) 2009 OpenHatch, Inc. # # 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 your option) any later v...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # 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
module.exports = function b() { require("./a"); return "This is c"; };
javascript
github
https://github.com/webpack/webpack
test/fixtures/c.js
from __future__ import absolute_import from django.utils.translation import ugettext_lazy as _ from acls.api import class_permissions #from agencies.classes import AgencyElement from agencies.models import Agency from common.utils import encapsulate from navigation.api import register_top_menu, register_model_list_co...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################### # # RetrieveUserInfo # Returns the available resources for a specific user and the URIs for accessing them. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Ve...
unknown
codeparrot/codeparrot-clean
""" WSGI config for DjangoApplication7 project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APP...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron, Nicolas Petit # Copyright 2015, TODAY Clouder SASU # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License with...
unknown
codeparrot/codeparrot-clean
# Ansible module to manage CheckPoint Firewall (c) 2019 # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dist...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2011 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
/* * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.fir import com.intellij.psi.PsiElement import com.intellij.psi.sear...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/FirSyntheticFunctionInterfaceSourceProvider.kt
// @flow @validatePreserveExistingMemoizationGuarantees @enableUseTypeAnnotations import {useMemo} from 'react'; import {useFragment} from 'shared-runtime'; // This is a version of error.todo-repro-missing-memoization-lack-of-phi-types // with explicit type annotations and using enableUseTypeAnnotations to demonstrate...
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-missing-memoization-lack-of-phi-types-explicit-types.js
# ext/associationproxy.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Contain the ``AssociationProxy`` class. The ``AssociationProxy`` is a Pyth...
unknown
codeparrot/codeparrot-clean
/* Copyright 2015 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/lib/io/record_writer.h
from django.shortcuts import get_object_or_404 from django.utils.html import strip_tags from django_socketio import events from chat.models import ChatRoom @events.on_message(channel="^room-") def message(request, socket, context, message): """ Event handler for a room receiving a message. First validates a ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python '''Add an Item to Pocket''' __author__ = 'Felipe Borges' import sys sys.path.append("..") import getopt import pocket USAGE = '''Usage: save_to_pocket [options] url This script adds an Item to Pocket. Options: -h --help: print this help --consumer_key : the Pocket API consumer ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2016 Uber Technologies, Inc. # # 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, merge, publ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2020 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. # This script makes it easy to make custom builds. # # It creates a tag for a SHA that triggers a build in the Make and Publish # Build TeamCity build c...
unknown
github
https://github.com/cockroachdb/cockroach
scripts/tag-custom-build.sh
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
unknown
codeparrot/codeparrot-clean
// mksyscall.pl -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go // Code generated by the command above; DO NOT EDIT. //go:build linux && mipsle package syscall import "unsafe" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func faccessat(dirfd int, path string, mode uint32) (...
go
github
https://github.com/golang/go
src/syscall/zsyscall_linux_mipsle.go
# encoding: utf-8 from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Permission' db.create_table('permissions_permission', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ...
unknown
codeparrot/codeparrot-clean