code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# frozen_string_literal: true require "cases/helper" class Account extend ActiveModel::Callbacks include ActiveModel::Attributes include ActiveModel::SchematizedJson define_model_callbacks :save attribute :settings has_json :settings, restricts_access: true, max_invites: 10, greeting: "Hello!", beta: :b...
ruby
github
https://github.com/rails/rails
activemodel/test/cases/schematized_json_test.rb
# vim:fileencoding=utf-8:noet # WARNING: using unicode_literals causes errors in argparse from __future__ import (division, absolute_import, print_function) import argparse import sys from itertools import chain from powerline.lib.overrides import parsedotval, parse_override_var from powerline.lib.dict import mergea...
unknown
codeparrot/codeparrot-clean
import os import re from ctypes import c_char_p, CDLL from ctypes.util import find_library from django.contrib.gis.gdal.error import OGRException # Custom library path set? try: from django.conf import settings lib_path = settings.GDAL_LIBRARY_PATH except (AttributeError, EnvironmentError, ImportError): li...
unknown
codeparrot/codeparrot-clean
""" Violinplot from a wide-form dataset =================================== _thumb: .6, .45 """ import seaborn as sns import matplotlib.pyplot as plt sns.set(style="whitegrid") # Load the example dataset of brain network correlations df = sns.load_dataset("brain_networks", header=[0, 1, 2], index_col=0) # Pull out a...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Author: Leonardo Pistone # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package statefile import ( "fmt" "log" ) // upgradeStateV1ToV2 is used to upgrade a V1 state representation // into a V2 state representation func upgradeStateV1ToV2(old *stateV1) (*stateV2, error) { log.Printf("[TRACE] statefile.Read: upgradin...
go
github
https://github.com/hashicorp/terraform
internal/states/statefile/version1_upgrade.go
#include <ATen/core/op_registration/infer_schema.h> #include <c10/util/irange.h> #include <fmt/format.h> namespace c10 { namespace detail::infer_schema { namespace { std::vector<Argument> createArgumentVector(c10::ArrayRef<ArgumentDef> args) { std::vector<Argument> result; result.reserve(args.size()); for (con...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/core/op_registration/infer_schema.cpp
{ "name": "@next/rspack-core", "version": "1.0.2", "homepage": "https://nextjs.org", "bugs": { "url": "https://github.com/vercel/next.js/issues" }, "repository": { "type": "git", "url": "git+https://github.com/vercel/next.js.git" }, "packageManager": "pnpm@10.13.1", "main": "lib/index.js",...
json
github
https://github.com/vercel/next.js
rspack/package.json
/* * 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.utils.io import io.ktor.utils.io.locks.* import kotlinx.atomicfu.AtomicRef import kotlinx.atomicfu.atomic import kotlinx.coroutines.suspendCancellableCoroutine import kotlinx....
kotlin
github
https://github.com/ktorio/ktor
ktor-io/common/src/io/ktor/utils/io/ByteChannel.kt
/* 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/builtin_op_data.h
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/advice/TimestampIntroductionAdvisor.java
""" These are debug machines used for content creators, so they're kind of a cross between dev machines and AWS machines. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=W0401, W0614 from .aws import * DEBUG = True TEMPLA...
unknown
codeparrot/codeparrot-clean
// Copyright 2023 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. // Preprofile creates an intermediate representation of a pprof profile for use // during PGO in the compiler. This transformation depends only on the profile /...
go
github
https://github.com/golang/go
src/cmd/preprofile/main.go
#!/usr/bin/python # # 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 # (at your option) any later version. # # Ansible is distribut...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # genramsey.py # Glenn G. Chappell # Date: 26 Aug 2016 # Requires Python 3. """Functions for finding generalized Ramsey numbers & related extremal graphs. CONVENTIONS See isograph.py for our graph representation. A set is represented as a sorted list or tuple of its elements. *Predicates* in...
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.fe10.test.cases.generated.cases.components.typeRelationChecker; imp...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fe10/tests-gen/org/jetbrains/kotlin/analysis/api/fe10/test/cases/generated/cases/components/typeRelationChecker/Fe10IdeNormalAnalysisSourceModuleNonLenientClassSymbolSubtypingTypeRelationTestGenerated.java
/* Copyright (c) 2015, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
sql/current_thd.h
# frozen_string_literal: true module Jekyll module Deprecator extend self def process(args) arg_is_present? args, "--server", "The --server command has been replaced by the \ 'serve' subcommand." arg_is_present? args, "--serve", "The --serve command has been replaced by...
ruby
github
https://github.com/jekyll/jekyll
lib/jekyll/deprecator.rb
// // Copyright 2017 The Abseil 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 by applicable law or ...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/strings/str_cat.h
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch try: from cStringIO import StringIO StringIO # work...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * read.c * routines to convert a string (legal ascii representation of node) back * to nodes * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of Cali...
c
github
https://github.com/postgres/postgres
src/backend/nodes/read.c
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Adam Števko <adam.stevko@gmail.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
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2006-2007 The Regents of The University of Michigan # Copyright (c) 2009 Advanced Micro Devices, 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 co...
unknown
codeparrot/codeparrot-clean
#ifndef CACHE_TREE_H #define CACHE_TREE_H #include "tree.h" #include "tree-walk.h" struct cache_tree; struct cache_tree_sub { struct cache_tree *cache_tree; int count; /* internally used by update_one() */ int namelen; int used; char name[FLEX_ARRAY]; }; struct cache_tree { int entry_count; /* negative means ...
c
github
https://github.com/git/git
cache-tree.h
/* * 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.references; import com.intellij.test...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/references/FirIdeNormalAnalysisScriptSourceModuleIsReferenceToTestGenerated.java
# coding: utf-8 # # Copyright 2018 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
#!/usr/bin/env python # Author: Zion Orent <zorent@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 """YAML linters wrapper script for Bazel.""" import os import subprocess import sys def run_command(cmd, **kwargs): """Run a command and exit on failure.""" result = subprocess.run(cmd, **kwargs) if result.returncode != 0: sys.exit(result.returncode) def main(): # Chang...
python
github
https://github.com/mongodb/mongo
buildscripts/yamllinters.py
//////////////////////////////////////////////////////////////////////////// // // Copyright 2021 Realm Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/li...
swift
github
https://github.com/realm/realm-swift
examples/ios/swift/Migration/Examples/Example_v5.swift
/* * Copyright (C) 2014 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
guava-tests/test/com/google/common/graph/AbstractNetworkTest.java
data = ( 'moen', # 0x00 'moenj', # 0x01 'moenh', # 0x02 'moed', # 0x03 'moel', # 0x04 'moelg', # 0x05 'moelm', # 0x06 'moelb', # 0x07 'moels', # 0x08 'moelt', # 0x09 'moelp', # 0x0a 'moelh', # 0x0b 'moem', # 0x0c 'moeb', # 0x0d 'moebs', # 0x0e 'moes', # 0x0f 'moess', #...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # 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 Li...
unknown
codeparrot/codeparrot-clean
/*! * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ type CharType = | 'letter' | 'digit' | 'point' | 'comma' | 'hyphen' | 'hash' | 'percent' | 'space' ...
typescript
github
https://github.com/angular/angular
adev/src/app/features/home/animation/parser/css-value-lexer.ts
import time import robot from keywordgroup import KeywordGroup class _WaitingKeywords(KeywordGroup): # Public def wait_for_condition(self, condition, timeout=None, error=None): """Waits until the given `condition` is true or `timeout` expires. `code` may contain multiple lines of code but mu...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import warnings from django.apps import apps from django.db import models from django.db.utils import IntegrityError, OperationalError, ProgrammingError from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import force_text, python_2_unicode...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ get props() { return { /** @type {Array<Record<string, any>>} */ objectsArray: [ { quote: 'q1', 'wrong-quote': 'wq1', 16: '16', 17: '17', class: 'class' }, { quote: 'q2', 'wrong-quote': 'wq2', 16: 'six...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/each-block-destructured-object-literal-rest/_config.js
#define DISABLE_SIGN_COMPARE_WARNINGS #include "git-compat-util.h" #include "config.h" #include "dir.h" #include "tr2_sysenv.h" /* * Each entry represents a trace2 setting. * See Documentation/technical/api-trace2.adoc */ struct tr2_sysenv_entry { const char *env_var_name; const char *git_config_name; char *va...
c
github
https://github.com/git/git
trace2/tr2_sysenv.c
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Example** ```esql TS k8s | STATS events = SUM(IDELTA(events_received)) by pod, time_bucket = TBUCKET(10minute) ``` | events:double | pod:keyword | time_bucket:datetime | | --- | --- | --- | | 9.0 | on...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/examples/idelta.md
"""check builtin data descriptors such as mode and name attributes on a file are correctly handled bug notified by Pierre Rouleau on 2005-04-24 """ from __future__ import print_function __revision__ = None class File(file): # pylint: disable=file-builtin """ Testing new-style class inheritance from file""" ...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_str, compat_urllib_parse_urlparse, ) from ..utils import ( determine_ext, int_or_none, try_get, qualities, ) class SixPlayIE(InfoExtractor): ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.contrib.auth.models import User from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Animal(models.Model): name = models.CharField(max_length=150) latin_nam...
unknown
codeparrot/codeparrot-clean
'use strict'; import utils from '../utils.js'; import AxiosError from '../core/AxiosError.js'; import transitionalDefaults from './transitional.js'; import toFormData from '../helpers/toFormData.js'; import toURLEncodedForm from '../helpers/toURLEncodedForm.js'; import platform from '../platform/index.js'; import form...
javascript
github
https://github.com/axios/axios
lib/defaults/index.js
# pylint: disable=g-bad-file-header # 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/LICENS...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import unittest from flexmock import flexmock, flexmock_teardown from avocado.core.remote import VMTestRunner from avocado.core import virt JSON_RESULTS = ('Something other than json\n' '{"tests": [{"test": "sleeptest.1", "url": "sleeptest", ' '"status": "PASS",...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework import ComparisonTestFramework from util import * from comptool import TestManager, TestInstance from mininode import * from blockt...
unknown
codeparrot/codeparrot-clean
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/plugins/current/_reimplementing_and_extending_the_analyzers.html --- # Reimplementing and extending the `smartcn` analyzer [_reimplementing_and_extending_the_analyzers] The `smartcn` analyzer could be reimplemented as a `custom` analyzer that can the...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch-plugins/_reimplementing_and_extending_the_analyzers.md
/* * 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/record/internal/AbstractRecords.java
""" Test discovery functions. """ import copy import os import sys import lit.run from lit.TestingConfig import TestingConfig from lit import LitConfig, Test def dirContainsTestSuite(path, lit_config): cfgpath = os.path.join(path, lit_config.site_config_name) if os.path.exists(cfgpath): return cfgpat...
unknown
codeparrot/codeparrot-clean
# Django settings for openflow project. from os.path import dirname, join _dir = dirname(__file__) LIB_PATH = join(_dir,'..') import sys sys.path.append(LIB_PATH) DEBUG = True TEMPLATE_DEBUG = DEBUG LOGIN_URL = 'accounts/login/' ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASE...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y' TIME_FORMAT = 'G:i:s' DAT...
unknown
codeparrot/codeparrot-clean
//===--- FileSystem.cpp - Extra helpers for manipulating files ------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
cpp
github
https://github.com/apple/swift
lib/Basic/FileSystem.cpp
#coding:utf-8 import numpy as np from mlp import MultiLayerPerceptron from sklearn.datasets import load_digits from sklearn.cross_validation import train_test_split from sklearn.preprocessing import LabelBinarizer from sklearn.metrics import confusion_matrix, classification_report """ 簡易手書き数字データの認識 scikit-learnのインストール...
unknown
codeparrot/codeparrot-clean
// Copyright 2016 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package base import ( "bytes" "fmt" "os" "path/filepath" "sort" "strings" "unicode" "github.com/cockroachdb/cockroach/pkg/cli/cliflags" "github.com/cockroachd...
go
github
https://github.com/cockroachdb/cockroach
pkg/base/store_spec.go
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. // // Code generated by generate-staticcheck; DO NOT EDIT. // //go:build bazel package sa2001 import ( util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes...
go
github
https://github.com/cockroachdb/cockroach
build/bazelutil/staticcheckanalyzers/sa2001/analyzer.go
import numpy as np from pylab import figure, clf, plot, xlabel, ylabel, xlim, ylim, title, grid, axes, show,semilogx, semilogy import scipy.fftpack import os.path import struct import argparse import PatternGeneration.DebugTools as d # Example script to read patterns and test outputs parser = argparse.ArgumentParser...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
//===-- FindSymbolsTests.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/FindSymbolsTests.cpp
### TEST UI import functools import maya.cmds as mc import pymel.core as pm from PySide import QtCore as qc from PySide import QtGui as qg #from PySide.QtCore import Slot from shiboken import wrapInstance import maya.OpenMaya as om import maya.OpenMayaUI as omui def maya_main_window(): ''' Return the Maya ma...
unknown
codeparrot/codeparrot-clean
from unittest import TestCase import lazydict class TestLazyDictionary(TestCase): def test_circular_reference_error(self): d = lazydict.LazyDictionary() d['foo'] = lambda s: s['foo'] self.assertRaises(lazydict.CircularReferenceError, d.__getitem__, 'foo') def test_constant_redefinitio...
unknown
codeparrot/codeparrot-clean
# -*- 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 # (at your option) ...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Common helper module for working with Chrome's processes and windows.""" import logging import os import psutil import re import win32gui import win32pro...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 __author__ = "AstroPrint Product Team <product@astroprint.com>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' import logging import time from threading import Thread, Event from collections import deque from gi.repository import Gst from . import EncoderBin f...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves <bmr@redhat.com> # This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU General...
unknown
codeparrot/codeparrot-clean
{ "$ref": "../../WebpackOptions.json#/definitions/CssModuleParserOptions" }
json
github
https://github.com/webpack/webpack
schemas/plugins/css/CssModuleParserOptions.json
import Nav from "../../components/Nav"; const News = () => ( <> <Nav /> <p>Hello, I'm the news page</p> </> ); export default News;
typescript
github
https://github.com/vercel/next.js
examples/active-class-name/app/news/page.tsx
# Copyright 2013 Viewfinder Inc. All Rights Reserved. __author__ = 'andy@emailscrubbed.com (Andy Kimball)' import sys from functools import partial from tornado import escape, gen from tornado.options import options from tornado.template import Template from urllib import urlencode from viewfinder.backend.base impor...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package config import ( "context" "errors" "fmt" "io" "net" "os" "path/filepath" "strings" "syscall" "time" ctconfig "github.com/hashicorp/consul-template/config" ctsignals "github.com/hashicorp/consul-template/signals" "github.com/h...
go
github
https://github.com/hashicorp/vault
command/agent/config/config.go
# Copyright (C) 2013 Kristoffer Gronlund <kgronlund@suse.com> # See COPYING for license information. import shlex import sys from . import config from . import utils from . import options from .msg import common_err, common_info, common_warn from . import ui_utils from . import userdir from . import constants # impor...
unknown
codeparrot/codeparrot-clean
from xml.dom import NamespaceErr import hashlib from urllib.parse import urlparse import re from defusedxml import ElementTree as ET from dojo.models import Endpoint, Finding __author__ = 'dr3dd589' class OpenscapXMLParser(object): def __init__(self, file, test): self.dupes = dict() self.items = (...
unknown
codeparrot/codeparrot-clean
# # FILE: TreeBrowser.py # # DESCRIPTION: # This file provides a generic hierarchical tree browser widget. # # AUTHOR: Steve Kinneberg <skinneberg@mvista.com>, # MontaVista Software, Inc. <source@mvista.com> # # Copyright 2001 MontaVista Software Inc. # # This program is free software; you can redist...
unknown
codeparrot/codeparrot-clean
//===- bolt/Passes/DominatorAnalysis.h --------------------------*- 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 // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
bolt/include/bolt/Passes/DominatorAnalysis.h
blank_issues_enabled: false contact_links: - name: Feature Request url: https://github.com/vuejs/rfcs/discussions about: Suggest new features for consideration - name: Discord Chat url: https://chat.vuejs.org about: Ask questions and discuss with other Vue users in real time. - name: Questions & D...
unknown
github
https://github.com/vuejs/core
.github/ISSUE_TEMPLATE/config.yml
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package stackeval import ( "context" "fmt" "github.com/hashicorp/hcl/v2" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" "github.com/hashicorp/terraform/internal/lang/marks" "github.com/hashicorp/terraform/internal/...
go
github
https://github.com/hashicorp/terraform
internal/stacks/stackruntime/internal/stackeval/output_value_config.go
from django.db import models from django.conf import settings from django.core.mail import send_mail from django.core.urlresolvers import reverse from django.template.loader import render_to_string # Create your models here. from localflavor.us.us_states import US_STATES class UserDefaultAddress(models.Model): us...
unknown
codeparrot/codeparrot-clean
security: access_decision_manager: service: app.access_decision_manager providers: default: memory: users: foo: { password: foo, roles: ROLE_USER } firewalls: simple: { pattern: /login, security: false }
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/access_decision_manager_service.yml
#!/usr/bin/env python # # Pretty-printer for simple trace backend binary trace files # # Copyright IBM, Corp. 2010 # # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. # # For help see docs/tracing.txt import sys import struct import re header_event_...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- # pilas engine: un motor para hacer videojuegos # # Copyright 2010-2014 - Hugo Ruscitti # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html) # # Website - http://www.pilas-engine.com.ar from pilasengine.controles import simbolos __doc__ = """ Módulo pilas.control ===================...
unknown
codeparrot/codeparrot-clean
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2017 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This program is free software; you can redistribute it and/or modify # it under the terms of ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # 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 ...
unknown
codeparrot/codeparrot-clean
""" Tests for testing the modulestore settings migration code. """ import copy import ddt from openedx.core.lib.tempdir import mkdtemp_clean from unittest import TestCase from xmodule.modulestore.modulestore_settings import ( convert_module_store_setting_if_needed, update_module_store_settings, get_mixed_...
unknown
codeparrot/codeparrot-clean
import time from django.conf import settings from django.core.cache import cache from django.db import models from .permissions import UserCanManageDevicePermissions from kolibri.core.auth.models import Facility from kolibri.core.auth.models import FacilityUser device_permissions_fields = [ 'is_superuser', '...
unknown
codeparrot/codeparrot-clean
/* Functions here use deprecated cuSPARSE API that was removed in CUDA 11. This file will be removed eventually. */ #define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/native/SparseTensorUtils.h> #include <ATen/native/sparse/cuda/SparseBlasLegacy.h> #includ...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/sparse/cuda/SparseBlasLegacy.cpp
// Copyright 2023 The Abseil 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 by applicable law or agree...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/base/prefetch.h
{ "GEORADIUS": { "summary": "Queries a geospatial index for members within a distance from a coordinate, optionally stores the result.", "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of ite...
json
github
https://github.com/redis/redis
src/commands/georadius.json
import json vocab_file="/iesl/canvas/nmonath/data/wikipedia/20160305/en/enwiki-20160305-lstm-vocab.tsv" entity_to_freebase_mapping="/iesl/canvas/nmonath/data/freebase/20160513/en-freebase_wiki_cat_title_map.txt" #Read the entity_to_freebase_mapping file print('Read the entity_to_freebase_mapping file') name_to_mid = {...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.host.common internal fun stub() { }
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-host-common/common/src/Stub.kt
/* * 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/test/java/org/springframework/boot/convert/CharArrayFormatterTests.java
from Source import Source from Components.Element import cached class List(Source, object): """The datasource of a listbox. Currently, the format depends on the used converter. So if you put a simple string list in here, you need to use a StringList converter, if you are using a "multi content list styled"-list, you ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # IkaLog # ====== # Copyright (C) 2015 Takeshi HASEGAWA # # 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/l...
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 model 'Sqoop' db.create_table('oozie_sqoop', ( ('files', self.gf('django.db.models.fields.Cha...
unknown
codeparrot/codeparrot-clean
from celery_haystack.indexes import CelerySearchIndex from haystack.constants import Indexable from haystack.fields import CharField, DateTimeField, IntegerField from cmj.sigad.models import Documento from sapl.base.search_indexes import TextExtractField class SigadTextExtractField(TextExtractField): def __init_...
unknown
codeparrot/codeparrot-clean
import sys import distutils.core import distutils.extension from setuptools.dist import _get_unpatched _Extension = _get_unpatched(distutils.core.Extension) def have_pyrex(): """ Return True if Cython or Pyrex can be imported. """ pyrex_impls = 'Cython.Distutils.build_ext', 'Pyrex.Distutils.build_ext...
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 'VotaInteligenteMessage.author_ville' db.add_column(u'elect...
unknown
codeparrot/codeparrot-clean
package overlay import ( "fmt" "strconv" "strings" "golang.org/x/net/bpf" ) // vniMatchBPF returns a BPF program suitable for passing to the iptables and // ip6tables bpf match which matches on the VXAN Network ID of encapsulated // packets. The program assumes that it will be used in a rule which only // matche...
go
github
https://github.com/moby/moby
daemon/libnetwork/drivers/overlay/bpf.go
package kotlinx.coroutines.internal /** * Analogue of java.util.concurrent.CopyOnWriteArrayList for JS. * Even though JS has no real concurrency, [CopyOnWriteList] is essential to manage any kinds * of callbacks or continuations. * * Implementation note: most of the methods fallbacks to [AbstractMutableList] (thu...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/js/src/internal/CopyOnWriteList.kt
/* SPDX-License-Identifier: GPL-2.0+ */ #ifndef _LIB_TEST_FPU_H #define _LIB_TEST_FPU_H int test_fpu(void); #endif
c
github
https://github.com/torvalds/linux
lib/test_fpu.h
""" Analize test results for finding bottlenecks """ import re import sys import csv import time import bisect import os.path import argparse import collections import yaml import texttable try: import pygraphviz as pgv except ImportError: pgv = None sys.path.append("/mnt/other/work/disk_perf_test_tool") fr...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package pki import ( "context" "crypto/rand" "testing" "time" "github.com/hashicorp/vault/helper/constants" "github.com/hashicorp/vault/sdk/helper/cryptoutil" "github.com/stretchr/testify/require" ) func TestAcmeConfig(t *testing.T) { t....
go
github
https://github.com/hashicorp/vault
builtin/logical/pki/path_config_acme_test.go
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean