code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Copyright (c) 2006-2009 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
#define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "config.h" #include "diff.h" #include "environment.h" #include "gettext.h" #include "hash.h" #include "hex.h" #include "parse-options.h" #include "setup.h" static void flush_current_id(size_t patchlen, struct object_id *id, struct object_id *result) { ...
c
github
https://github.com/git/git
builtin/patch-id.c
import json import os import time import urllib2 base_url = 'http://datasurfer.sandag.org/api' comp_url = 'http://localhost/api' #comp_url = 'http://datasurfer-dev.sandag.org/api' def ordered(obj): if isinstance(obj, dict): return sorted((k, ordered(v)) for k, v in obj.items()) if isinstance(obj, list...
unknown
codeparrot/codeparrot-clean
//===-- DefineInlineTests.cpp -----------------------------------*- C++ -*-===// // // 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/tweaks/DefineInlineTests.cpp
// RUN: not clang-tidy %s --checks="-*,google-explicit-constructor" 2>&1 | FileCheck %s // NOLINTBEGIN(*) class B { B(int i); }; // NOLINTEND(google-explicit-constructor) // Note: the expected output has been split over several lines so that clang-tidy // does not see the "no lint" suppression comment and mista...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-glob-end-specific.cpp
// @enableTreatFunctionDepsAsConditional function Component(props) { function getLength() { return props.bar.length; } return props.bar && getLength(); } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [{bar: null}], };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/functionexpr–conditional-access.js
#!/usr/bin/python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
unknown
codeparrot/codeparrot-clean
{ "name": "auth", "private": true, "scripts": { "dev": "vite", "build": "tsc && vite build", "serve": "vite preview" }, "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.15.0" }, "devDependencies": { "@rollup/plugin-replace": "^5.0.2", "@...
json
github
https://github.com/remix-run/react-router
examples/auth-router-provider/package.json
from sqlalchemy.engine import reflection from sqlalchemy.schema import MetaData, Table, ForeignKeyConstraint from sqlalchemy.schema import DropTable, DropConstraint # http://www.sqlalchemy.org/trac/wiki/UsageRecipes/DropEverything def drop_everything(engine, keep_tables=[], reset_columns={}): """ Drops all tables ...
unknown
codeparrot/codeparrot-clean
/* * 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.impl.base.test.cases.components.scopeProvider import org.jetbrains....
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-impl-base/testFixtures/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/scopeProvider/AbstractFileImportingScopeContextTest.kt
from django.contrib.auth import models from django.contrib.auth.mixins import ( LoginRequiredMixin, PermissionRequiredMixin, UserPassesTestMixin, ) from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied from django.http import HttpResponse from django.test import Re...
unknown
codeparrot/codeparrot-clean
/* @Copyright Barrett Adair 2015-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_CLBL_TRTS_HAS_VOID_RETURN_HPP #define BOOST_CLBL_TRTS_HAS_VOID_RETURN_HPP #include <boost/callable_traits/detail/core.hpp> ...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/callable_traits/has_void_return.hpp
{ "compilerOptions": { "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": false, "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", "reso...
json
github
https://github.com/vercel/next.js
examples/custom-server/tsconfig.json
// tidy-alphabetical-start #![feature(extern_types)] // tidy-alphabetical-end use std::cell::RefCell; use std::{ptr, slice}; use libc::size_t; unsafe extern "C" { /// Opaque type that allows C++ code to write bytes to a Rust-side buffer, /// in conjunction with `RawRustStringOstream`. Use this as `&RustStrin...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_llvm/src/lib.rs
/*------------------------------------------------------------------------- * * gistvacuum.c * vacuuming routines for the postgres GiST index access method. * * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * I...
c
github
https://github.com/postgres/postgres
src/backend/access/gist/gistvacuum.c
from django import forms from django.conf import settings from django.forms.models import inlineformset_factory from django.utils.translation import ugettext_lazy as _ from oscar.apps.promotions.conf import PROMOTION_CLASSES from oscar.forms.fields import ExtendedURLField from oscar.core.loading import get_classes, ge...
unknown
codeparrot/codeparrot-clean
/* * 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.fir.test.cases.generated.cases.components.javaInteroperabilityCompon...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/javaInteroperabilityComponent/FirIdeNormalAnalysisScriptSourceModuleDeclarationTypeAsPsiTypeTestGenerated.java
// Copyright 2009 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. // Garbage collector: type and heap bitmaps. // // Stack, data, and bss bitmaps // // Stack frames and global variables in the data and bss sections are // desc...
go
github
https://github.com/golang/go
src/runtime/mbitmap.go
#------------------------------------------------------------------------------- # Name: nirams.py # Purpose: The main script for NIRAMS II. # # Author: James Sample # # Created: 18/01/2012 # Copyright: (c) James Sample and JHI, 2012 # Licence: <your licence> #---------------------------------...
unknown
codeparrot/codeparrot-clean
/* Copyright 2024 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
cmd/kubeadm/app/cmd/options/argslice.go
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
unknown
codeparrot/codeparrot-clean
"use strict"; var __getOwnPropNames = Object.getOwnPropertyNames; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; // node_modules/@isaacs/balanced-match/dist/commonjs/index.js var require_commonjs = __commonJS...
javascript
github
https://github.com/nodejs/node
deps/minimatch/index.js
import scipy.cluster.hierarchy as sch from scipy.spatial import distance from bootstrap_cluster import bootstrapFeatures, bootstrapObservations import numpy as np import pandas as pd from functools import partial from .comparison import _alignClusterMats, alignClusters from .preprocessing import partialCorrNormalize fr...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true module ActionView # :nodoc: module PathRegistry # :nodoc: @view_paths_by_class = {} @file_system_resolvers = {} @file_system_resolver_mutex = Mutex.new @file_system_resolver_hooks = [] class << self attr_reader :file_system_resolver_hooks end def self...
ruby
github
https://github.com/rails/rails
actionview/lib/action_view/path_registry.rb
This is a miniature implementation of a concurrent, lock-free (as in lock-less) hash map with weak keys where keys respect reference equality. Such a hash map removes entries containing collected keys by either: 1. Inline removal (entries that contain to collected keys are removed as a result of interaction with the m...
unknown
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/internal/util/concurrent/README.md
__auther__='Sudhanshu Patel' import xlrd #find top 3 frequently occuring genere Wbook = xlrd.open_workbook('PicturePerfect.xlsx') #global data def TopGenere(limit=3): #top n genere #print 'no of sheets ',Wbook.nsheets # we r goint to process only first sheet data = Wbook.sheet_by_index(0) genreS...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 """ [VRM DRIVER] EXCEPTION """ from cinder import exception """ Exception definitions. """ class UnsupportedFeature(exception.CinderException): ''' UnsupportedFeature ''' pass class UnsupportedVersion(UnsupportedFeature): ''' UnsupportedVersion ...
unknown
codeparrot/codeparrot-clean
import logging from django.contrib.auth.decorators import login_required from django.shortcuts import render_to_response from openassessment.assessment.api.peer import get_assessments from submissions.api import SubmissionRequestError, get_submissions log = logging.getLogger(__name__) @login_required() def get_eval...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright (c) 1999--2015 Red Hat, Inc. Distributed under GPLv2. # # Author: Adrian Likins <alikins@redhat.com> # import os import re import sys sys.path.append("/usr/share/rhn") from up2date_client import config cfg = config.initUp2dateConfig() __rhnexport__ = [ 'update', 'rpmmacros', ...
unknown
codeparrot/codeparrot-clean
import os import mysql.connector as mysql sql_host = os.environ["SQL_HOST"] query_on = os.environ["QUERY_ON"] metrics_mysql_password = os.environ["METRICS_MYSQL_PWD"] ''' This script populates the user_id column in the user_info table. It is built to backfill the records fro scratch or to add on if the Unuique key g...
unknown
codeparrot/codeparrot-clean
#include <stdlib.h> #include "wasm/machine.h" #include "wasm/asyncify.h" #ifndef WASM_SCAN_STACK_BUFFER_SIZE # define WASM_SCAN_STACK_BUFFER_SIZE 6144 #endif struct asyncify_buf { void *top; void *end; uint8_t buffer[WASM_SCAN_STACK_BUFFER_SIZE]; }; static void init_asyncify_buf(struct asyncify_buf* buf)...
c
github
https://github.com/ruby/ruby
wasm/machine.c
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: tcp-nodelay Help: Set TCP_NODELAY Added: 7.11.2 Category: connection Multi: boolean See-also: - no-buffer Example: - --tcp-nodelay $URL --- # `--tcp-nodelay` Turn on the TCP_NODELAY option. This option disables the...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/tcp-nodelay.md
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/lite/c/c_test.c
#!/usr/bin/env python """ Copyright (C) 2010 Stephen Georg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version....
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from sqlalchemy.testing import eq_, is_ from sqlalchemy import * from sqlalchemy.testing import fixtures, AssertsCompiledSQL from sqlalchemy import testing class IdiosyncrasyTest(fixtures.TestBase, AssertsCompiledSQL): __only_on__ = 'mysql' __backend__ = True @testing.emits_warning() ...
unknown
codeparrot/codeparrot-clean
from django.db import connection, models from .fields import ( ArrayField, BigIntegerRangeField, DateRangeField, DateTimeRangeField, FloatRangeField, HStoreField, IntegerRangeField, JSONField, ) class PostgreSQLModel(models.Model): class Meta: abstract = True required_db_vendor = 'postgres...
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/record/internal/RemoteLogInputStreamTest.java
# test the invariant that # iff a==b then hash(a)==hash(b) # # Also test that hash implementations are inherited as expected import unittest from test import support from collections import Hashable class HashEqualityTestCase(unittest.TestCase): def same_hash(self, *objlist): # Hash each object given a...
unknown
codeparrot/codeparrot-clean
from unittest import TestCase from django.utils.baseconv import ( BaseConverter, base2, base16, base36, base56, base62, base64, ) from django.utils.six.moves import range class TestBaseConv(TestCase): def test_baseconv(self): nums = [-10 ** 10, 10 ** 10] + list(range(-100, 100)) for converter...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # --------------------------------------------------------------------------...
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-beans/src/test/java/org/springframework/beans/factory/config/CustomScopeConfigurerTests.java
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, flt, cstr, comma_or from frappe import _, throw from erpnext.stock.get_item_details import get_bin_details ...
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/common/errors/SslAuthenticationException.java
from __future__ import print_function, division from pyglet.gl import * from pyglet.window import Window from pyglet.clock import Clock from threading import Thread, Lock gl_lock = Lock() class ManagedWindow(Window): """ A pyglet window with an event loop which executes automatically in a separate threa...
unknown
codeparrot/codeparrot-clean
/* Copyright 2016 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/deployment/sync.go
#!/usr/local/bin/python # ---------------------------------------------------------------------- # MR-MPI = MapReduce-MPI library # http://www.cs.sandia.gov/~sjplimp/mapreduce.html # Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories # # Copyright (2009) Sandia Corporation. Under the terms of Co...
unknown
codeparrot/codeparrot-clean
""" Fixtures. Fixtures are a way of loading data into the database in bulk. Fixure data can be stored in any serializable format (including JSON and XML). Fixtures are identified by name, and are stored in either a directory named 'fixtures' in the application directory, or in one of the directories named in the ``FIX...
python
github
https://github.com/django/django
tests/fixtures/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import codecs import os import shutil from django.apps import apps from django.db import connection, models from django.core.management import call_command, CommandError from django.db.migrations import questioner from django.test import override_setting...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package azure import ( "context" "encoding/json" "fmt" "io" "net/http" "net/url" "time" "github.com/hashicorp/vault/api" ) type AzureAuth struct { roleName string mountPath string resource string } var _ api.AuthMethod = (*AzureAuth...
go
github
https://github.com/hashicorp/vault
api/auth/azure/azure.go
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='AlertSubscription', fields=[ ('id', models.AutoF...
unknown
codeparrot/codeparrot-clean
"""Benchmarks for polynomials over Galois fields. """ from __future__ import print_function, division from sympy.polys.galoistools import gf_from_dict, gf_factor_sqf from sympy.polys.domains import ZZ from sympy import pi, nextprime from sympy.core.compatibility import range def gathen_poly(n, p, K): return gf_f...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: ec2_ami...
unknown
codeparrot/codeparrot-clean
"""Support for Tasmota fans.""" from hatasmota import const as tasmota_const from homeassistant.components import fan from homeassistant.components.fan import FanEntity from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.util.percentage impo...
unknown
codeparrot/codeparrot-clean
# empty program assert_equal '', '' assert_equal '', ' ' assert_equal '', "\n" # special const assert_equal 'true', 'true' assert_equal 'TrueClass', 'true.class' assert_equal 'false', 'false' assert_equal 'FalseClass', 'false.class' assert_eq...
ruby
github
https://github.com/ruby/ruby
bootstraptest/test_literal.rb
"""Routines related to PyPI, indexes""" from __future__ import absolute_import import logging import cgi from collections import namedtuple import itertools import sys import os import re import mimetypes import posixpath import warnings from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor....
unknown
codeparrot/codeparrot-clean
import chainer.cuda import math from chainermn.communicators import _communication_utility from chainermn.communicators import _memory_utility from chainermn.communicators import mpi_communicator_base from chainermn import nccl class HierarchicalCommunicator(mpi_communicator_base.MpiCommunicatorBase): def __init...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import posixpath import re from compiled_file_system import Cache from extensions_paths import EXAMPLES from samples_data_source ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2015 Blizzard Entertainment # # 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, publi...
unknown
codeparrot/codeparrot-clean
import unittest import numpy import chainer from chainer.backends import cuda import chainer.functions as F from chainer import gradient_check from chainer import testing from chainer.testing import attr @testing.parameterize(*testing.product({ 'func_name': ['cos', 'sin', 'tan'], 'shape': [(3, 2), ()], '...
unknown
codeparrot/codeparrot-clean
""" Implementation of functions in the Numpy package. """ from __future__ import print_function, division, absolute_import import numpy import math import sys import itertools from collections import namedtuple from llvmlite.llvmpy import core as lc from . import builtins, ufunc_db, arrayobj from .imputils import i...
unknown
codeparrot/codeparrot-clean
import re from framework.plugins.api import BasePlugin from externals.moduleman.plugin import moduleman_plugin @moduleman_plugin class listing(BasePlugin): name = "listing" description = "Looks for directory listing vulnerabilities" category = ["default", "passive"] priority = 99 def __init__(sel...
unknown
codeparrot/codeparrot-clean
{ "private": true, "scripts": { "dev": "next", "build": "next build", "start": "next start" }, "dependencies": { "@neshca/cache-handler": "^1.3.2", "next": "latest", "react": "^18.2.0", "react-dom": "^18.2.0", "redis": "latest" }, "devDependencies": { "@types/node": "^20"...
json
github
https://github.com/vercel/next.js
examples/cache-handler-redis/package.json
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
unknown
codeparrot/codeparrot-clean
''' Find the amount of emission recovered in a high-resolution map, based on a low-resolution map ''' from spectral_cube import SpectralCube import numpy as np from radio_beam import Beam from astropy.convolution import convolve_fft from astropy import units as u from astropy import wcs from FITS_tools.header_tools im...
unknown
codeparrot/codeparrot-clean
#!/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. from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test...
unknown
codeparrot/codeparrot-clean
# sqlalchemy/interfaces.py # Copyright (C) 2007-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # Copyright (C) 2007 Jason Kirtland jek@discorporate.us # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Deprecated core ...
unknown
codeparrot/codeparrot-clean
// Warning: this file is included twice in // aten/src/ATen/test/cuda_complex_math_test.cu #include <c10/util/complex.h> #include <gtest/gtest.h> #ifndef PI #define PI 3.141592653589793238463 #endif #ifndef tol #define tol 1e-6 #endif // Exponential functions C10_DEFINE_TEST(TestExponential, IPi) { // exp(i*pi) ...
c
github
https://github.com/pytorch/pytorch
c10/test/util/complex_math_test_common.h
from django.conf import settings from django.utils.importlib import import_module from misago.thread import local __all__ = ('merge_contexts', 'process_context', 'process_templates') def load_middlewares(): """ Populate _middlewares with list of template middlewares instances """ middlewares = [] ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2010 Google, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Created on Tue May 26 08:08:14 2015 @author: rwb27 """ import numpy as np class AttributeDict(dict): """This class extends a dictionary to have a "create" method for compatibility with h5py attrs objects.""" def create(self, name, data): self[name] = data def mod...
unknown
codeparrot/codeparrot-clean
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ Python Character Mapping Codec based on gsm0338 generated from './GSM0338.TXT' with gencodec.py. With extra sauce to deal with the 'multibyte' extensions! """#" import codecs import re ### Codec APIs # # Shared funcs # def _encode(input,errors='strict'): # s...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Written by Bram Cohen and Myers Carpenter # Modifications by various people # see LICENSE.txt for license information from BitTornado import PSYCO if PSYCO.psyco: try: import psyco assert psyco.__version__ >= 0x010100f0 psyco.full() except: pass from sy...
unknown
codeparrot/codeparrot-clean
"""A dumb and slow but simple dbm clone. For database spam, spam.dir contains the index (a text file), spam.bak *may* contain a backup of the index (also a text file), while spam.dat contains the data (a binary file). XXX TO DO: - seems to contain a bug when updating... - reclaim free space (currently, space once o...
unknown
codeparrot/codeparrot-clean
""" Defines forms for providing validation of embargo admin details. """ from django import forms from embargo.models import EmbargoedCourse, EmbargoedState, IPFilter from embargo.fixtures.country_codes import COUNTRY_CODES import ipaddr from xmodule.modulestore.django import modulestore from opaque_keys import Inv...
unknown
codeparrot/codeparrot-clean
/* * 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 agre...
java
github
https://github.com/google/guava
android/guava-tests/test/com/google/common/collect/FilteredBiMapTest.java
#!/usr/bin/env python # *-* coding: UTF-8 *-* """Tuxy dorește să împlementeze un nou paint pentru consolă. În timpul dezvoltării proiectului s-a izbit de o problemă pe care nu o poate rezolva singur și a apelat la ajutorul tău. Aplicația ține un istoric al tuturor mișcărilor pe care le-a făcut utlizatorul în fișieru...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2006-2009 The Trustees of Indiana University. # 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
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
unknown
codeparrot/codeparrot-clean
import errno import os import sys import textwrap import unittest import subprocess from test import support from test.support import force_colorized, force_not_colorized, os_helper from test.support.script_helper import assert_python_ok from _colorize import get_theme @support.requires_subprocess() @support.skip_if...
python
github
https://github.com/python/cpython
Lib/test/test_json/test_tool.py
lockfileVersion: '9.0' settings: autoInstallPeers: false excludeLinksFromLockfile: false overrides: '@babel/runtime': 7.27.0 '@embroider/macros': 1.15.0 '@messageformat/runtime': 3.0.2 ansi-html: 0.0.8 async: 2.6.4 braces: 3.0.3 eslint-utils: 1.4.3 express: 4.22.1 https-proxy-agent: 2.2.4 ini:...
unknown
github
https://github.com/hashicorp/vault
ui/pnpm-lock.yaml
/* * Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.http.content import io.ktor.http.* import io.ktor.server.request.* import io.ktor.server.routing.* import java.io.* /** * Serves a single-page application. * You can...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-core/jvm/src/io/ktor/server/http/content/SinglePageApplication.kt
# Copyright 2011 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 compliance with the License. You may obtain # a ...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 James McCauley # # This file is part of POX. # # POX 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. # # POX is distri...
unknown
codeparrot/codeparrot-clean
"""Support for Dutch Smart Meter Requirements. Also known as: Smartmeter or P1 port. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.dsmr/ Technical overview: DSMR is a standard to which Dutch smartmeters must comply. It specifies that the smart...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2013 GitHub, Inc. # Copyright (c) 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. """Convert pdb to sym for given directories""" import errno import glob import optparse import o...
unknown
codeparrot/codeparrot-clean
import Picture from "./picture"; type Author = { id: string; name: string; picture: Picture; }; export default Author;
typescript
github
https://github.com/vercel/next.js
examples/cms-umbraco/types/author.ts
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # 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
import six SERIALIZABLE_TYPES = (dict, list, tuple, set, bool, type(None)) + \ six.integer_types + six.string_types + \ (six.text_type, six.binary_type,) def partial_to_session(strategy, next, backend, request=None, *args, **kwargs): user = kwargs.get('user') social =...
unknown
codeparrot/codeparrot-clean
from .common import Benchmark import numpy as np avx_ufuncs = ['sin', 'cos', 'exp', 'log', 'sqrt', 'absolute', 'reciprocal', 'square', 'rint', 'floor', 'ceil' , 'tr...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 Google Inc. 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 ...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/interrupt-controller/loongson,liointc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Loongson Local I/O Interrupt Controller maintainers: - Jiaxun Yang <jiaxun.yang@flygoat.com> descripti...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations \u0026 Alerts", "type": "dashboard" }, { ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/input/migrated_dev_dashboards/datasource-mysql/v1beta1.mysql_unittest.v42.json
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // ...
c
github
https://github.com/opencv/opencv
3rdparty/protobuf/src/google/protobuf/stubs/bytestream.h
/*------------------------------------------------------------------------- * * Load data from a backup manifest into memory. * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/bin/pg_combinebackup/load_manifest...
c
github
https://github.com/postgres/postgres
src/bin/pg_combinebackup/load_manifest.h
#-*- coding: utf-8 -*- """ Enable SSL and other security settings for Django and django-secure_ app. Django-secure install instructions: http://django-secure.rtfd.org/latest/index.html#installation .. _django-secure: http://django-secure.readthedocs.org/ """ from __future__ import absolute_import, division, print_f...
unknown
codeparrot/codeparrot-clean
interface ObjectConstructor { /** * Returns an array of values of the enumerable own properties of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ values<T>(o: { [s: string]: T; } | ...
typescript
github
https://github.com/microsoft/TypeScript
src/lib/es2017.object.d.ts
"""Unit tests for the buildscripts.resmokelib.selector module.""" import collections import fnmatch import os.path import re import sys import unittest import buildscripts.resmokelib.config from buildscripts.resmokelib import errors, parser, selector from buildscripts.resmokelib.utils import globstar FIXTURE_PREFIX ...
python
github
https://github.com/mongodb/mongo
buildscripts/tests/resmokelib/test_selector.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from config.template_middleware import TemplateResponse from gaepermission.decorator import login_not_required from tekton import router from gaecookie.decorator import no_csrf from cliente_app import cliente_facade from routes.clientes im...
unknown
codeparrot/codeparrot-clean
"""Proposal forms for the 2016 advocate europe participation process. Proposals are not versionable anymore. """ from adhocracy_core.resources import add_resource_type_to_registry from adhocracy_core.resources import process from adhocracy_core.resources import proposal from adhocracy_core.interfaces import ISimple f...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Pow...
c
github
https://github.com/opencv/opencv
3rdparty/libjasper/jasper/jas_stream.h