code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
/* * psql - the PostgreSQL interactive terminal * * Copyright (c) 2000-2026, PostgreSQL Global Development Group * * src/bin/psql/variables.c */ #include "postgres_fe.h" #include <math.h> #include "common.h" #include "common/logging.h" #include "variables.h" /* * Check whether a variable's name is allowed. *...
c
github
https://github.com/postgres/postgres
src/bin/psql/variables.c
// Copyright 2023 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package server import ( "context" "fmt" "sort" "strconv" "time" "github.com/cockroachdb/cockroach/pkg/clusterversion" "github.com/cockroachdb/cockroach/pkg/keys...
go
github
https://github.com/cockroachdb/cockroach
pkg/server/span_stats_server.go
import Foundation extension Application.Passwords.Provider { public static var plaintext: Self { .init { $0.passwords.use { _ in PlaintextHasher() } } } } private struct PlaintextHasher: PasswordHasher { func hash<Password>(_ password: Password) thro...
swift
github
https://github.com/vapor/vapor
Sources/Vapor/Passwords/PlaintextHasher.swift
// This fails if the `type` keyword is removed import { type usePathname } from 'next/navigation';
typescript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/react-server-components/pack-3186/output.ts
//// [tests/cases/conformance/ambient/ambientShorthand_declarationEmit.ts] //// //// [ambientShorthand_declarationEmit.ts] declare module "foo"; //// [ambientShorthand_declarationEmit.js] "use strict"; //// [ambientShorthand_declarationEmit.d.ts] declare module "foo";
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/ambientShorthand_declarationEmit.js
#!/usr/bin/env python # coding: utf-8 """ Copyright 2015 SmartBear Software 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 Unle...
unknown
codeparrot/codeparrot-clean
const API_URL = `https://api.takeshape.io/project/${process.env.TAKESHAPE_PROJECT_ID}/graphql`; const API_KEY = process.env.TAKESHAPE_API_KEY; async function fetchAPI(query, { variables } = {}) { const res = await fetch(API_URL, { method: "POST", headers: { "Content-Type": "application/json", Aut...
javascript
github
https://github.com/vercel/next.js
examples/cms-takeshape/lib/api.js
from menus.base import Menu, NavigationNode from example.sampleapp.models import Category from django.core.urlresolvers import reverse, NoReverseMatch from menus.menu_pool import menu_pool from cms.app_base import CMSApp from django.utils.translation import ugettext_lazy as _ from cms.menu_bases import CMSAttachMenu c...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import os import shutil import unittest import numpy as np from pymatgen.core.structure import Structure from pymatgen.io.cif import CifFile, CifParser from pymatgen.io.feff.inputs import Atoms, Header, Poten...
unknown
codeparrot/codeparrot-clean
// mkerrors.sh -m64 // Code generated by the command above; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go package syscall const ( AF_ALG = 0x26 AF_APPLETALK = 0x5 AF_ASH = 0x12 AF_ATMPVC ...
go
github
https://github.com/golang/go
src/syscall/zerrors_linux_amd64.go
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django import forms from django.core.exceptions import ValidationError ...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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....
unknown
codeparrot/codeparrot-clean
""" Copyright (c) 2007 Jan-Klaas Kollhof This file is part of jsonrpc. jsonrpc is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 def probe(verbose=False): """Searches for probable ports on the system""" import platform from gsmmodem import GsmModem import serial # Common baudrates in approximate popularity order baudrates = [115200, 9600, 19200] ports ...
unknown
codeparrot/codeparrot-clean
// Code generated - EDITING IS FUTILE. DO NOT EDIT. package v1beta1
go
github
https://github.com/grafana/grafana
apps/dashboard/pkg/apis/dashboard/v1beta1/dashboard_spec_gen.go
# Copyright 2012 Google Inc. All Rights Reserved. """Base and helper classes for Google RESTful APIs.""" __all__ = ['add_sync_methods'] import httplib import time from . import api_utils try: from google.appengine.api import app_identity from google.appengine.ext import ndb except ImportError: from google.ap...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ # @Title : test_TDCT_correlation # @Project : 3DCTv2 # @Description : pytest test # @Author : Jan Arnold # @Email : jan.arnold (at) coraxx.net # @Copyright : Copyright (C) 2016 Jan Arnold # @License : GPLv3 (see LICENSE file) # @Credits : # @Maintainer ...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package vault import ( "context" "encoding/base64" "errors" "fmt" "testing" "time" "github.com/hashicorp/vault/helper/namespace" "github.com/hashicorp/vault/sdk/framework" "github.com/hashicorp/vault/sdk/logical" uicustommessages "githu...
go
github
https://github.com/hashicorp/vault
vault/logical_system_custom_messages_test.go
/* * Frozen * Copyright 2016 QuarksLab * * 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 Lice...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/frozen/include/frozen/set.h
/* 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/kubelet/images/image_manager.go
"""Use pika with the libev IOLoop via pyev""" import pyev import signal import array import logging import warnings from collections import deque from pika.adapters.base_connection import BaseConnection LOGGER = logging.getLogger(__name__) global_sigint_watcher, global_sigterm_watcher = None, None class LibevConnec...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # (c) 2016, Flavio Percoco <flavio@redhat.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'stat...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (C) 2018 Red Hat, Inc. # # 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. # # This p...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # test_split_simulation.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 L...
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
# -*- test-case-name: twisted.words.test.test_jabberclient -*- # # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.internet import defer from twisted.words.xish import domish, xpath, utility from twisted.words.protocols.jabber import xmlstream, sasl, error from twisted.word...
unknown
codeparrot/codeparrot-clean
import numpy as np from numpy.testing import assert_array_almost_equal from dipy.align import floating from dipy.align import crosscorr as cc def test_cc_factors_2d(): r""" Compares the output of the optimized function to compute the cross- correlation factors against a direct (not optimized, but less erro...
unknown
codeparrot/codeparrot-clean
/* interpreters module */ /* low-level access to interpreter primitives */ #ifndef Py_BUILD_CORE_BUILTIN # define Py_BUILD_CORE_MODULE 1 #endif #include "Python.h" #include "pycore_crossinterp.h" // _PyXIData_t #include "pycore_interp.h" // _PyInterpreterState_LookUpID() #include "pycore_pystate.h" //...
c
github
https://github.com/python/cpython
Modules/_interpchannelsmodule.c
# -*- coding: utf-8 -*- # Copyright 2019, Andrew Klychkov @Andersson007 <aaklychkov@mail.ru> # Copyright 2019, Sviatoslav Sydorenko <webknjaz@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metac...
unknown
codeparrot/codeparrot-clean
/* The latency monitor allows to easily observe the sources of latency * in a Redis instance using the LATENCY command. Different latency * sources are monitored, like disk I/O, execution of commands, fork * system call, and so forth. * * ----------------------------------------------------------------------------...
c
github
https://github.com/redis/redis
src/latency.c
""" self-contained to write legacy storage pickle files To use this script. Create an environment where you want generate pickles, say its for 0.20.3, with your pandas clone in ~/pandas . activate pandas_0.20.3 cd ~/pandas/pandas $ python -m tests.io.generate_legacy_storage_files \ tests/io/data/legacy_pickle/0....
python
github
https://github.com/pandas-dev/pandas
pandas/tests/io/generate_legacy_storage_files.py
#------------------------------------------------------------------------- # Copyright (c) Microsoft. 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.apa...
unknown
codeparrot/codeparrot-clean
// RUN: clang-reorder-fields -record-name ::bar::Foo -fields-order z,y,x %s -- | FileCheck %s namespace bar { #define ADD_Z // The order of fields should not change. struct Foo { int x; // CHECK: {{^ int x;}} int y; // CHECK-NEXT: {{^ int y;}} #ifdef ADD_Z // CHECK-NEXT: {{^#ifdef ADD_Z}} int z; ...
cpp
github
https://github.com/llvm/llvm-project
clang-tools-extra/test/clang-reorder-fields/PreprocessorDirectiveInDefinition.cpp
import play import midi pattern = play.pattern(tempo=65) pattern.append([ {'time': 0, 'duration': 800, 'pitch': midi.A_3}, {'time': 0, 'duration': 200, 'pitch': midi.B_4, 'velocity': 50}, {'time': 0, 'duration': 200, 'pitch': midi.C_5, 'velocity': 50}, {'time': 0, 'duration': 200, 'pitch': midi.E_5, 'v...
unknown
codeparrot/codeparrot-clean
#pragma once #include <c10/macros/Export.h> #include <c10/util/ArrayRef.h> #include <c10/util/Exception.h> #include <c10/util/intrusive_ptr.h> #include <cstdint> #include <optional> #include <ostream> #include <string> C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wunused-parameter") namespace c10 { class SymNodeImp...
c
github
https://github.com/pytorch/pytorch
c10/core/SymNodeImpl.h
# 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
// Copyright 2018 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql_test import ( gosql "database/sql" "testing" "github.com/cockroachdb/cockroach/pkg/util/leaktest" "github.com/cockroachdb/cockroach/pkg/util/log" "git...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/comment_on_database_test.go
# sql/sqltypes.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """SQL specific types. """ import datetime as dt import codecs from .type_api imp...
unknown
codeparrot/codeparrot-clean
import { isGitIgnored } from 'globby' import path from 'node:path' import postcss, { type Result } from 'postcss' import { DefaultMap } from '../../../../tailwindcss/src/utils/default-map' import { segment } from '../../../../tailwindcss/src/utils/segment' import { Stylesheet, type StylesheetConnection } from '../../st...
typescript
github
https://github.com/tailwindlabs/tailwindcss
packages/@tailwindcss-upgrade/src/codemods/css/analyze.ts
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
unknown
codeparrot/codeparrot-clean
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from resources.datatables import FactionStatus from java.util import Vector def addTemplate(cor...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # Program Parameters # import os import s...
unknown
codeparrot/codeparrot-clean
""" Pushbullet platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.pushbullet/ """ import logging import mimetypes import voluptuous as vol from homeassistant.components.notify import ( ATTR_DATA, ATTR_TARGET, ATTR_...
unknown
codeparrot/codeparrot-clean
#Load stuff: import os os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" # see issue #152 os.environ["CUDA_VISIBLE_DEVICES"] = "" import pickle import numpy as np import json from representation import parseJsonLine, extractPreprocessUrl from keras.preprocessing.sequence import pad_sequences from keras.models import lo...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # 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. """ Provides an augmented `git log --graph` view. In particular, it also annotates commits with branches + tags that point to them. Ite...
unknown
codeparrot/codeparrot-clean
# -*- test-case-name: twisted.python.test.test_util -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. import os, sys, hmac, errno, new, inspect, warnings try: import pwd, grp except ImportError: pwd = grp = None try: from os import setgroups, getgroups except ImportError...
unknown
codeparrot/codeparrot-clean
# Kubernetes Metadata Agent Metadata Agent is a source of metadata required by logging and monitoring agents running on a cluster.
unknown
github
https://github.com/kubernetes/kubernetes
cluster/addons/metadata-agent/README.md
from django.core.management.base import BaseCommand class Command(BaseCommand): help = "Say hello." args = "" output_transaction = True def handle(self, *args, **options): return "Hello!"
python
github
https://github.com/django/django
tests/user_commands/management/commands/transaction.py
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const AMDDefineDependency = require("./AMDDefineDependency"); const AMDRequireArrayDependency = require("./AMDRequireArrayDependency"); const AMDRequir...
javascript
github
https://github.com/webpack/webpack
lib/dependencies/AMDDefineDependencyParserPlugin.js
#Copyright 2013 Paul Barton # #This program is free software: you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation, either version 3 of the License, or #(at your option) any later version. # #This program is distributed in the hope tha...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # pylibftdi documentation build configuration file, created by # sphinx-quickstart on Mon Oct 31 22:36:38 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
unknown
codeparrot/codeparrot-clean
# Authors: # Trevor Perrin # Dimitris Moraitis - Anon ciphersuites # # See the LICENSE file for legal information regarding use of this file. """ A helper class for using TLS Lite with stdlib clients (httplib, xmlrpclib, imaplib, poplib). """ from tlslite.checker import Checker class ClientHelper(object): ""...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import json from jinja2 import Template from moto.core.responses import BaseResponse from .models import cloudformation_backend class CloudFormationResponse(BaseResponse): def create_stack(self): stack_name = self._get_param('StackName') stack_body = self....
unknown
codeparrot/codeparrot-clean
//===--- Suffix.swift -----------------------------------------*- swift -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
swift
github
https://github.com/apple/swift
benchmark/single-source/Suffix.swift
#################################################################################################### # pimms/table.py # Classes for storing immutable data tables. # By Noah C. Benson import copy, types, sys, pint, six import numpy as np import pyrsistent as ps from functo...
unknown
codeparrot/codeparrot-clean
main: templates_path: _templates base_template: "layout.html" production_url: "https://pandas.pydata.org/" ignore: - _templates/layout.html - config.yml github_repo_url: pandas-dev/pandas context_preprocessors: - pandas_web.Preprocessors.current_year - pandas_web.Preprocessors.navbar_add_inf...
unknown
github
https://github.com/pandas-dev/pandas
web/pandas/config.yml
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not...
json
github
https://github.com/apache/kafka
clients/src/main/resources/common/message/PushTelemetryResponse.json
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
docs/examples/sessioninfo.c
# -*- 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
/* * 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 ...
java
github
https://github.com/apache/hadoop
hadoop-cloud-storage-project/hadoop-gcp/src/main/java/org/apache/hadoop/fs/gs/ApiErrorExtractor.java
//===-------- ParseableOutput.cpp - Helpers for parseable output ----------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2020 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/ParseableOutput.cpp
#!/usr/bin/python # coding: utf-8 -*- # (c) 2015, Hewlett-Packard Development Company, L.P. # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your optio...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2006 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the Qt configuration page. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSlot from E5Gui.E5Completers import E5DirCompleter from E5Gui import E5FileDialog from .Conf...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 import numpy as np from numpy.core.numeric import array from sklearn.metrics import pairwise from collections import OrderedDict from scipy.linalg import eig from scipy import interpolate as ip from pyspark.mllib.linalg.distributed import IndexedRow, RowMatrix, IndexedRowMatrix, CoordinateMatrix, ...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/callOnClass.ts] //// //// [callOnClass.ts] class C { } var c = C(); //// [callOnClass.js] "use strict"; class C { } var c = C();
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/callOnClass.js
""" Django management command to create a course in a specific modulestore """ from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from xmodule.modulestore import ModuleStoreEnum from contentstore.views.course import create_new_course_in_store from contentstore....
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ linear.py: A set of implementations of linear neural layers. @author: vharisop """ from __future__ import division import numpy import theano import theano.tensor as T class LinearLayer(object): """ A neuron that implements a linear neuron, with an optional non-linearity at th...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * detoast.c * Retrieve compressed or external variable size attributes. * * Copyright (c) 2000-2026, PostgreSQL Global Development Group * * IDENTIFICATION * src/backend/access/common/detoast.c * *-------------------------------...
c
github
https://github.com/postgres/postgres
src/backend/access/common/detoast.c
// 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. //go:build js && wasm package os import ( "internal/filepathlite" "syscall" "time" ) func fillFileStatFromSys(fs *fileStat, name string) { fs.name = file...
go
github
https://github.com/golang/go
src/os/stat_js.go
// Circular buffer library header file. // Copyright (c) 2003-2008 Jan Gaspar // 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) // See www.boost.org/libs/circular_buffer for docu...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/circular_buffer.hpp
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # model __init__.py from __future__ import unicode_literals import frappe import json no_value_fields = ('Section Break', 'Column Break', 'HTML', 'Table', 'Button', 'Image', 'Fold', 'Heading') display_fieldtypes = ('Se...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.osv import fields, osv from openerp.tools.translate import _ import re from openerp.exceptions import UserError class crm_lead2opportunity_partner(osv.osv_memory): _name = 'crm.lead2opportunity.partner'...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright IBM Corp. 2016, 2025 # SPDX-License-Identifier: BUSL-1.1 set -euo pipefail fail() { echo "$1" 1>&2 exit 1 } logger() { DT=$(date '+%Y/%m/%d %H:%M:%S') echo "$DT $0: $1" } [[ -z "${RETRY_INTERVAL}" ]] && fail "RETRY_INTERVAL env variable has not been set" [[ -z "${TIMEOUT_SECO...
unknown
github
https://github.com/hashicorp/vault
enos/modules/benchmark/set_up_k6/scripts/install-k6.sh
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Generate Pygments Documentation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Generates a bunch of html files containing the documentation. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (c) 2015 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
""" Handlers for video module. StudentViewHandlers are handlers for video module instance. StudioViewHandlers are handlers for video descriptor instance. """ import os import json import logging from webob import Response from xblock.core import XBlock from xmodule.exceptions import NotFoundError from xmodule.fields...
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/context/config/StandardConfigDataResource.java
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
cluster/gce/gci/apiserver_etcd_test.go
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('auth', '0006_require_contenttypes_0002'), ] operations = [ migrations.CreateModel( name='MyUser',...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "cases/helper" require "models/post" require "models/comment" require "models/author" require "models/rating" require "models/categorization" module ActiveRecord class RelationTest < ActiveRecord::TestCase fixtures :posts, :comments, :authors, :author_addresses, :ratings, :...
ruby
github
https://github.com/rails/rails
activerecord/test/cases/relation_test.rb
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011 CERN. ## ## Invenio 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) a...
unknown
codeparrot/codeparrot-clean
import unittest from datetime import date, timedelta from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.test import TestCase from django.utils.six import PY3 class TokenGeneratorTest(TestCase): def test_make_...
unknown
codeparrot/codeparrot-clean
#!/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
# The bytecode interpreter This document describes the workings and implementation of the bytecode interpreter, the part of python that executes compiled Python code. Its entry point is in [Python/ceval.c](../Python/ceval.c). At a high level, the interpreter consists of a loop that iterates over the bytecode instruct...
unknown
github
https://github.com/python/cpython
InternalDocs/interpreter.md
# -*- coding: utf-8 -*- from os import path from gluon import * from gluon.storage import Storage from s3 import * # ============================================================================= class index(): """ Custom Home Page """ def __call__(self): request = current.request response =...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 from __future__ import unicode_literals import re from hashlib import sha1 from .common import InfoExtractor from ..compat import ( compat_urllib_parse, ) from ..utils import ( ExtractorError, determine_ext, float_or_none, int_or_none, unified_strdate, ) class ProSiebenSat1I...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # GoodFET Client Library # # # Good luck with alpha / beta code. # Contributions and bug reports welcome. # import sys, binascii, struct import atlasutils.smartprint as asp #Global Commands READ = 0x00 WRITE = 0x01 PEEK = 0x02 POKE = 0x03 SETUP = 0x10 START = 0x20 STOP = 0x21 CALL = 0x30 EX...
unknown
codeparrot/codeparrot-clean
# ###################################################################### # Copyright (c) 2014, Brookhaven Science Associates, Brookhaven # # National Laboratory. All rights reserved. # # # # @author: Li Li (lili@bnl.g...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # Copyright 2024 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. # # This script is run by the Pebble Nightly Metamorphic Two Instance - TeamCity # build configuration. set -euo pipefail dir="$(dirname $(dirname $(d...
unknown
github
https://github.com/cockroachdb/cockroach
build/teamcity/cockroach/nightlies/pebble_nightly_metamorphic_two_instance.sh
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package terraform import ( "bytes" "errors" "fmt" "path/filepath" "sort" "strings" "sync" "testing" "time" "github.com/davecgh/go-spew/spew" "github.com/google/go-cmp/cmp" "github.com/hashicorp/hcl/v2" "github.com/zclconf/go-cty-debug...
go
github
https://github.com/hashicorp/terraform
internal/terraform/context_plan2_test.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 sa9006 import ( util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes...
go
github
https://github.com/cockroachdb/cockroach
build/bazelutil/staticcheckanalyzers/sa9006/analyzer.go
# frozen_string_literal: true require "abstract_unit" require "controller/fake_models" class RenderXmlTest < ActionController::TestCase class XmlRenderable def to_xml(options) options[:root] ||= "i-am-xml" "<#{options[:root]}/>" end end class TestController < ActionController::Base prot...
ruby
github
https://github.com/rails/rails
actionpack/test/controller/render_xml_test.rb
# -*- coding: utf-8 -*- # # test_refractory.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014 VMware, 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...
unknown
codeparrot/codeparrot-clean
use crate::io::util::read_line::finish_string_read; use crate::io::util::read_to_end::read_to_end_internal; use crate::io::util::vec_with_initialized::VecWithInitialized; use crate::io::AsyncRead; use pin_project_lite::pin_project; use std::future::Future; use std::marker::PhantomPinned; use std::pin::Pin; use std::ta...
rust
github
https://github.com/tokio-rs/tokio
tokio/src/io/util/read_to_string.rs
import sys from numpy.distutils.fcompiler import FCompiler compilers = ['NAGFCompiler'] class NAGFCompiler(FCompiler): compiler_type = 'nag' description = 'NAGWare Fortran 95 Compiler' version_pattern = r'NAGWare Fortran 95 compiler Release (?P<version>[^\s]*)' executables = { 'version_cmd'...
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
--- applies_to: stack: ga serverless: ga navigation_title: "Type conversion functions" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-functions-operators.html#esql-type-conversion-functions --- # {{esql}} type conversion functions [esql-type-conversion-functions] ::::{tip} ...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/functions-operators/type-conversion-functions.md
# -*- 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
""" API for the gating djangoapp """ import json import logging from django.contrib.auth.models import User from django.urls import reverse from django.utils.translation import ugettext as _ from completion.models import BlockCompletion from lms.djangoapps.courseware.access import _has_access_to_course from lms.djan...
unknown
codeparrot/codeparrot-clean