code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# -*- coding: utf-8 -*- """QGIS Unit tests for the postgres raster provider. Note: to prepare the DB, you need to run the sql files specified in tests/testdata/provider/testdata_pg.sh Read tests/README.md about writing/launching tests with PostgreSQL. Run with ctest -V -R PyQgsPostgresProvider .. note:: This progra...
unknown
codeparrot/codeparrot-clean
#******************************************************************************* # Copyright (c) 2015 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/li...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Simon Dodsley (simon@purestorage.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': '1.1',...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (c) 2016 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
unknown
codeparrot/codeparrot-clean
// Copyright 2014 Manu Martinez-Almeida. All rights reserved. // Use of this source code is governed by a MIT style // license that can be found in the LICENSE file. package gin import ( "bytes" "context" "errors" "fmt" "html/template" "io" "io/fs" "mime/multipart" "net" "net/http" "net/http/httptest" "ne...
go
github
https://github.com/gin-gonic/gin
context_test.go
/* ** $Id: ldblib.c,v 1.104.1.4 2009/08/04 18:50:18 roberto Exp $ ** Interface from Lua to its debug API ** See Copyright Notice in lua.h */ #include <stdio.h> #include <stdlib.h> #include <string.h> #define ldblib_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" static int db_getregistr...
c
github
https://github.com/redis/redis
deps/lua/src/ldblib.c
#!/usr/bin/python # used by count.sh import re import sys import string fname = sys.argv[1] str = (open(fname, 'r')).read() #measures = [(str[a.start():(3+string.find(str,"@-}", a.start()))]) for a in list(re.finditer('{-@ measure', str)) ] other = [(str[a.start():(3+string.find(str,"@-}", a.start()))]) for a i...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django_pgjson.fields class Migration(migrations.Migration): dependencies = [ ('custom_attributes', '0004_create_empty_customattributesvalues_for_existen_object'), ] operations = [ ...
unknown
codeparrot/codeparrot-clean
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/plugins/current/discovery-gce-usage-cloning.html --- # Cloning your existing machine [discovery-gce-usage-cloning] In order to build a cluster on many nodes, you can clone your configured instance to new nodes. You won’t have to reinstall everything!...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch-plugins/discovery-gce-usage-cloning.md
import re import pytz import datetime from billy.scrape.events import EventScraper, Event from openstates.utils import LXMLMixin class WYEventScraper(EventScraper, LXMLMixin): jurisdiction = 'wy' _tz = pytz.timezone('US/Mountain') def normalize_time(self, time_string): time_string = time_string....
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/clients/ClientResponse.java
/* * Copyright (C) 2007 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 agreed ...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/util/concurrent/ExecutionList.java
/* * Copyright (C) 2012 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-tests/benchmark/com/google/common/hash/HashFunctionBenchmark.java
# Copyright (C) 2008, One Laptop Per Child # Copyright (C) 2009, Tomeu Vizoso # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later v...
unknown
codeparrot/codeparrot-clean
/** * Implementation package for JSR-107 (javax.cache aka "JCache") based caches. * Provides a {@link org.springframework.cache.CacheManager CacheManager} * and {@link org.springframework.cache.Cache Cache} implementation for * use in a Spring context, using a JSR-107 compliant cache provider. */ @NullMarked packa...
java
github
https://github.com/spring-projects/spring-framework
spring-context-support/src/main/java/org/springframework/cache/jcache/package-info.java
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
cmd/kube-controller-manager/app/options/garbagecollectorcontroller.go
#!/usr/bin/python # # cim.py - Copyright (C) 2010 Red Hat, Inc. # Written by Mike Burns <mburns@redhat.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; version 2 of the License. # # This p...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context-indexer/src/test/java/org/springframework/context/index/sample/jpa/SampleEmbeddable.java
# TensorFlow C API - See [www.tensorflow.org/install/lang_c](https://www.tensorflow.org/install/lang_c) - Nightly builds: - [Linux CPU-only](https://storage.googleapis.com/tensorflow-nightly/github/tensorflow/lib_package/libtensorflow-cpu-linux-x86_64.tar.gz) - [Linux GPU](https://storage.googleapis.com/tensorflow...
unknown
github
https://github.com/tensorflow/tensorflow
tensorflow/c/README.md
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# coding:utf8 from __future__ import print_function class Property(object): " Emulate PyProperty_Type() in Objects/descrobject.c 该类时Property的python实现方式 参考:https://stackoverflow.com/questions/17330160/how-does-the-property-decorator-work " def __init__(self, fget=None, fset=None, fd...
unknown
codeparrot/codeparrot-clean
"""Bing Search API toolkit.""" from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.tools import BingSearchResults, BingSearchRun # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising depre...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/tools/bing_search/__init__.py
#!/usr/bin/python2.6 # -*- coding: utf-8 -*- # This file is a part of Metagam project. # # Metagam 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 # any later version. # # ...
unknown
codeparrot/codeparrot-clean
import os from disposableredis import DisposableRedis REDIS_MODULE_PATH_ENVVAR = 'REDIS_MODULE_PATH' REDIS_PATH_ENVVAR = 'REDIS_PATH' REDIS_PORT_ENVVAR = 'REDIS_PORT' def execute_query(redis_graph, query_desc, query): print(query_desc) print("query: {query}".format(query=query)) print("execution plan:\n{p...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from unittest import skipUnless from django.db import connection from django.db.utils import DatabaseError from django.test import TransactionTestCase, mock, skipUnlessDBFeature from .models import Article, Reporter class IntrospectionTests(TransactionTestCase): availabl...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # vi:ts=4:et import socket import pycurl import unittest try: import urllib.parse as urllib_parse except ImportError: import urllib as urllib_parse from . import appmanager from . import util setup_module, teardown_module = appmanager.setup(('app', 8380)) ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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 ...
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/LogbackLoggingSystemProperties.java
# Copyright 2013 Free Software Foundation, Inc. # # This 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 program i...
unknown
codeparrot/codeparrot-clean
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: from __future__ import with_statement from __future__ import absolute_import import gc import warnings import numpy as np from nipy.modalities.fmri.api import axis0_generator, FmriImageList from nipy.cor...
unknown
codeparrot/codeparrot-clean
__author__ = 'chris hamm' #NetworkServer_r13B #Created: 2/19/2015 #DEsigned to run with NetworkClient_r13B #Changes from previous revision: #(Implemented) Replace the stackOfChunksThatNeedToBeReassigned with the queue of chunks #changed receive chunk from controller setup to have chunk stored in the queue...
unknown
codeparrot/codeparrot-clean
from kivy.uix.floatlayout import FloatLayout from kivy.properties import NumericProperty, ObjectProperty, BoundedNumericProperty, ListProperty from .node import Node from math import sqrt class HexCanvas(FloatLayout): last_node = ObjectProperty(None, allownone=True) grid = ObjectProperty([]) row_count = B...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it und...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright © 2012 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or impli...
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 applica...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2014-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. # # Test node handling # from test_framework.test_framework import BitcoinTestFramework from test_framew...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2alpha1", "metadata": { "name": "v32.no_op_migration.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "datasource": { "type": "grafana", "uid": "-- Grafana --" ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/migrated_dashboards_output/v1beta1-mig-v32.no_op_migration.v42.v2alpha1.json
/* * Copyright (c) 2020, Michael Grunder <michael dot grunder at gmail dot com> * * 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 abo...
c
github
https://github.com/redis/redis
deps/hiredis/sdscompat.h
#ifndef SRC_JSON_UTILS_H_ #define SRC_JSON_UTILS_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include <iomanip> #include <limits> #include <ostream> #include <string> #include <string_view> namespace node { constexpr bool NeedsJsonEscape(std::string_view str) { for (const char c : str) { if (c ...
c
github
https://github.com/nodejs/node
src/json_utils.h
from django.conf import settings from django.db import models from meetup.api import MeetupClient import datetime STATUSES = [(s, s) for s in ('past','pending','upcoming')] API_KEY = getattr(settings, 'MEETUP_KEY', None) class Account(models.Model): key = models.CharField(max_length=128) description = models....
unknown
codeparrot/codeparrot-clean
import numpy import itertools import operator from tm_dataset import PytablesBitextIterator class HomogenousData(PytablesBitextIterator): def __init__(self, *args, **kwargs): PytablesBitextIterator.__init__(self, *args, **kwargs) self.batch_iter = None def get_homogenous_batch_iter(self): ...
unknown
codeparrot/codeparrot-clean
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ import sys from django.db.backends import * from django.db.backends.postgresql_psycopg2.operations import DatabaseOperations from django.db.backends.postgresql_psycopg2.client import DatabaseClient from django.db.b...
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) import unittest from...
unknown
codeparrot/codeparrot-clean
// Copyright 2024 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import ( "context" "github.com/cockroachdb/cockroach/pkg/docs" "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgcode" "github.com/cockroachdb/cockroa...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/unimplemented.go
""" Generic thread pool class. Modeled after Java's ThreadPoolExecutor. Please note that this ThreadPool does *not* fully implement the PEP 3148 ThreadPool! """ from threading import Thread, Lock, currentThread from weakref import ref import logging import atexit try: from queue import Queue, Empty except ImportE...
unknown
codeparrot/codeparrot-clean
#pragma once #include <c10/util/BFloat16.h> #include <c10/util/Half.h> C10_CLANG_DIAGNOSTIC_PUSH() #if C10_CLANG_HAS_WARNING("-Wimplicit-float-conversion") C10_CLANG_DIAGNOSTIC_IGNORE("-Wimplicit-float-conversion") #endif namespace c10 { template <typename T> struct is_reduced_floating_point : std::integral_cons...
c
github
https://github.com/pytorch/pytorch
c10/util/BFloat16-math.h
# 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. import os from telemetry.page import page_measurement_results class BlockPageMeasurementResults( page_measurement_results.PageMeasurementResults): ...
unknown
codeparrot/codeparrot-clean
from django.conf.urls.defaults import * from django.contrib import messages from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext, Template def add(request, message_type): # ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from textx.metamodel import metamodel_from_str call_counter = 0 grammar1 = """ foo: 'foo' m_formula = Formula ; Formula: ( values=FormulaExpression values='+' ( values=FormulaExpression)* ) ; FormulaExpression: values=bar ; bar: m_id=/[a-f0-9]+/ ; """ grammar...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Author: Laurent Mignon # Copyright 2014 'ACSONE SA/NV' # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from cmdutils import * import os def run(): r=RunTestLib() r.run_test('VMbaseConcurre...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0 #include <linux/fs.h> #include <linux/security.h> #include <linux/fscrypt.h> #include <linux/fsnotify.h> #include <linux/fileattr.h> #include <linux/export.h> #include <linux/syscalls.h> #include <linux/namei.h> #include "internal.h" /** * fileattr_fill_xflags - initialize fileatt...
c
github
https://github.com/torvalds/linux
fs/file_attr.c
""" Tests for Bookmarks models. """ from contextlib import contextmanager import datetime import ddt from freezegun import freeze_time import mock from nose.plugins.attrib import attr import pytz from opaque_keys.edx.keys import UsageKey from opaque_keys.edx.locator import CourseLocator, BlockUsageLocator from xmodule...
unknown
codeparrot/codeparrot-clean
from __future__ import division, absolute_import, print_function import sys import time from datetime import date import numpy as np from numpy.compat import asbytes, asbytes_nested from numpy.testing import ( run_module_suite, TestCase, assert_, assert_equal, assert_allclose, assert_raises ) from numpy.l...
unknown
codeparrot/codeparrot-clean
""" Classes to represent the default SQL aggregate functions """ import copy import warnings from django.db.models.fields import FloatField, IntegerField from django.db.models.query_utils import RegisterLookupMixin from django.utils.deprecation import RemovedInDjango110Warning from django.utils.functional import cache...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015 by Ron Frederick <ronf@timeheart.net>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # # Cont...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts] //// //// [awaitCallExpression2_es6.ts] declare var a: boolean; declare var p: Promise<boolean>; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boole...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/awaitCallExpression2_es6.js
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.words.protocols.jabber.jid}. """ from twisted.trial import unittest from twisted.words.protocols.jabber import jid class JIDParsingTest(unittest.TestCase): def test_parse(self): """ Test different for...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='Windows named pipes' . ./test-lib.sh if ! test_have_prereq MINGW then skip_all='skipping Windows-specific tests' test_done fi test_expect_success 'o_append write to named pipe' ' GIT_TRACE="$(pwd)/expect" git status >/dev/null 2>&1 && { test-tool windows-named-pipe t0051 >actual 2>&1 ...
unknown
github
https://github.com/git/git
t/t0051-windows-named-pipe.sh
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/errors/InconsistentTopicIdException.java
//// [tests/cases/compiler/ClassDeclaration21.ts] //// //// [ClassDeclaration21.ts] class C { 0(); 1() { } } //// [ClassDeclaration21.js] "use strict"; class C { 1() { } }
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/ClassDeclaration21.js
"Commonly-used date structures" from google.appengine._internal.django.utils.translation import ugettext_lazy as _ WEEKDAYS = { 0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'), 5:_('Saturday'), 6:_('Sunday') } WEEKDAYS_ABBR = { 0:_('Mon'), 1:_('Tue'), 2:_('Wed'), 3:_('Thu')...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/test/java/org/apache/kafka/common/message/ApiMessageTypeTest.java
# -*- encoding: utf-8 -*- # # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
unknown
codeparrot/codeparrot-clean
"""Arcam component.""" import asyncio from contextlib import suppress import logging from arcam.fmj import ConnectionFailed from arcam.fmj.client import Client import async_timeout from homeassistant import config_entries from homeassistant.const import CONF_HOST, CONF_PORT, EVENT_HOMEASSISTANT_STOP import homeassist...
unknown
codeparrot/codeparrot-clean
// Boost.Function library // Copyright Douglas Gregor 2002-2003. Use, modification and // distribution is subject to 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) // For more information, see http://www.boost.org #include <b...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/function/function0.hpp
# (c) 2013, Jayson Vantuyl <jayson@aggressive.ly> # (c) 2012-17 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ lookup: sequence author: Jayso...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # (Python >= 2.6 including >= 3) # Using regexps for parsing C++ is, of course, entirely a hack. # Configuration that you might want to change is in this file, # below the help message and above the trickier code. import re, os, sys, subprocess, glob if len(sys.argv) < 2 or sys.argv[1] in set([...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Django settings for foundation project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from __future__ import absolute_import, unicode_...
unknown
codeparrot/codeparrot-clean
""" Implementation of the XDG Menu Specification Version 1.0.draft-1 http://standards.freedesktop.org/menu-spec/ """ from __future__ import generators import locale, os, xml.dom.minidom from xdg.BaseDirectory import * from xdg.DesktopEntry import * from xdg.Exceptions import * import xdg.Locale import xdg.Config EL...
unknown
codeparrot/codeparrot-clean
from __future__ import annotations from time import time from typing import TYPE_CHECKING from urllib.parse import urldefrag from twisted.web.client import URI from scrapy.core.downloader.contextfactory import load_context_factory_from_settings from scrapy.core.downloader.handlers.base import BaseDownloadHandler fro...
python
github
https://github.com/scrapy/scrapy
scrapy/core/downloader/handlers/http2.py
/* * Copyright 2010-2024 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.standalone.fir.test.cases.generated.cases.types; import com.intelli...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-standalone/tests-gen/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/generated/cases/types/FirStandaloneNormalAnalysisSourceModuleTypePointerConsistencyTestGenerated.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
#ifndef HEADER_CURL_ASYN_H #define HEADER_CURL_ASYN_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| ...
c
github
https://github.com/curl/curl
lib/asyn.h
{ "Id": "sha256:44cc64492fb6a6d78d3e6d087f380ae6e479aa1b2c79823b32cdacfcc2f3d715", "RepoTags": [ "paketo-buildpacks/cnb:base", "paketo-buildpacks/builder:base-platform-api-0.2" ], "RepoDigests": [ "paketo-buidpacks/cnb@sha256:5b03a853e636b78c44e475bbc514e2b7b140cc41cca8ab907e9753431ae8c0b0" ], "Parent": "",...
json
github
https://github.com/spring-projects/spring-boot
buildpack/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/image-with-platform.json
{ "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start" }, "dependencies": { "@mantine/core": "^4.1.4", "@mantine/hooks": "^4.1.4", "@mantine/next": "^4.1.4", "next": "latest", "react": "18.0.0", "react-dom": "18.0.0" }, "devDepende...
json
github
https://github.com/vercel/next.js
examples/with-mantine/package.json
import logging, requests class Writer: def add_args(self, parser): parser.add_argument('--host', type=str, default='localhost') parser.add_argument('--port', type=int, default=5984) parser.add_argument('--name', type=str, required=True) parser.add_argument('--user', type=str) parser.add_argument...
unknown
codeparrot/codeparrot-clean
# OJO: La parte de base de datos sólo está implementada a manera de prueba de concepto. (FK's fijos, etc.) # pip install bs4 from bs4 import BeautifulSoup # Este no recuerdo si lo bajé con pip, si da error debe ser eso. import requests # pip install urlextract from urlextract import URLExtract # pip install sqlalch...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import itertools import re import types from sqlparse import tokens as T from sqlparse.sql import * def _group_left_right(tlist, ttype, value, cls, check_right=lambda t: True, include_semicolon=False): [_group_left_right(sgroup, ttype, value, cl...
unknown
codeparrot/codeparrot-clean
'use strict'; const common = require('../common.js'); const assert = require('node:assert'); const bench = common.createBenchmark(main, { n: [1e6], }, { flags: ['--expose-internals'] }); function main({ n }) { const { EventTarget } = require('internal/event_target'); let target; bench.start(); for (let i...
javascript
github
https://github.com/nodejs/node
benchmark/events/eventtarget-creation.js
# Copyright (c) Aaron Gallagher <_@habnab.it> # See COPYING for details. import collections import cProfile import inspect import sys from twisted.internet import defer from twisted.python import log FunctionData = collections.namedtuple('FunctionData', ['calls', 'time']) FunctionCall = collections.namedtuple('Funct...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # GrovePi Example for using the Grove - I2C ADC(http://www.seeedstudio.com/depot/Grove-I2C-ADC-p-1580.html) # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi # # Have a question about this example? Ask o...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function import sys, os, pdb sys.path.insert(0, 'src') import numpy as np, scipy.misc from optimize import optimize from argparse import ArgumentParser from utils import save_img, get_img, exists, list_files import evaluate CONTENT_WEIGHT = 7.5e0 STYLE_WEIGHT = 1e2 TV_WEIGHT = 2e2 LEARNIN...
unknown
codeparrot/codeparrot-clean
from django.db import migrations, models class Migration(migrations.Migration): initial = True operations = [ migrations.CreateModel( "Author", [ ("id", models.AutoField(primary_key=True)), ("name", models.CharField(max_length=255)), ...
python
github
https://github.com/django/django
tests/migrations/test_migrations_namespace_package/0001_initial.py
# coding=utf-8 # Copyright 2014 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) import os import uni...
unknown
codeparrot/codeparrot-clean
{ "backfill": { "affected_few": "{{count}} مهام ستُشغّل.", "affected_many": "{{count}} مهمة ستُشغّل.", "affected_one": "مهمة واحدة ستُشغّل.", "affected_other": "{{count}} مهمة ستُشغل.", "affected_two": "مهمتان ستُشغّلان.", "affected_zero": "لا توجد أي مهمة ستُشغَّل.", "affectedNone": "لا ت...
json
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/public/i18n/locales/ar/components.json
"""Setup some common test helper things.""" import functools import logging import pytest import requests_mock as _requests_mock from homeassistant import util from homeassistant.util import location from .common import async_test_home_assistant from .test_util.aiohttp import mock_aiohttp_client logging.basicConfig...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 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
# -*- coding: utf-8 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2016 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function from re import compile from ..scraper import _BasicScraper from ..util imp...
unknown
codeparrot/codeparrot-clean
# _*_ coding: utf-8 _*_ ''' lutil: library functions for XBMC video plugins. Copyright (C) 2013 José Antonio Montes (jamontes) 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 v...
unknown
codeparrot/codeparrot-clean
/* * By downloading, copying, installing or using the software you agree to this license. * If you do not agree to this license, do not download, install, * copy or use the software. * * * License Agreement * For Open Source Computer Vision Library * ...
cpp
github
https://github.com/opencv/opencv
hal/carotene/src/min_max.cpp
#! /usr/bin/env python """Test program for the fcntl C module. OS/2+EMX doesn't support the file locking operations. Roger E. Masse """ import struct import fcntl import os, sys from test.test_support import verbose, TESTFN filename = TESTFN try: os.O_LARGEFILE except AttributeError: start_len = "ll" el...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true module Jekyll Generator = Class.new(Plugin) end
ruby
github
https://github.com/jekyll/jekyll
lib/jekyll/generator.rb
import unittest from django.db import NotSupportedError, connection from django.db.models import CharField, F, Value from django.db.models.functions import Cast, JSONArray, JSONObject, Lower from django.test import TestCase from django.test.testcases import skipIfDBFeature, skipUnlessDBFeature from django.utils import...
python
github
https://github.com/django/django
tests/db_functions/json/test_json_array.py
// run // Copyright 2025 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 main // Issue #45624 is the proposal to accept new(expr) in go1.26. // Here we test its run-time behavior. func main() { { p := new(123) // ...
go
github
https://github.com/golang/go
test/newexpr.go
#![allow(rustc::symbol_intern_string_literal)] use rustc_hashes::Hash64; use rustc_span::def_id::{DefPathHash, StableCrateId}; use rustc_span::edition::Edition; use rustc_span::{Symbol, create_session_globals_then}; use crate::definitions::{DefKey, DefPathData, DisambiguatedDefPathData}; #[test] fn def_path_hash_dep...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_hir/src/tests.rs
from twisted.internet.task import react from twisted.internet.defer import inlineCallbacks as coroutine from autobahn.twisted.connection import Connection def main(reactor, connection): @coroutine def on_join(session, details): print("on_join: {}".format(details)) try: print(sessio...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2012-2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest, fft, filter, blocks import math def sig_source_c(samp_rate, freq, amp, N): t = [float(x) / samp_rate for x in rang...
unknown
codeparrot/codeparrot-clean