code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
""" My own variation on function-specific inspect-like features. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. from itertools import islice import inspect import warnings import re import os from ._compat import _basestrin...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python3 # -*- coding: utf-8 -*- ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # A list of C++ examples to run in order to ensure that they remain # buildable and runnable over time. Each tuple in the list contains # # (example_name, do_run, do_valgrind_run). #...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # 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 #...
unknown
codeparrot/codeparrot-clean
// Copyright 2022 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 agr...
c
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/absl/log/globals.h
#!/usr/bin/env python # -*- coding: utf-8 -*- """Exercise 11.2 from Kane 1985.""" from __future__ import division from sympy import expand, solve, symbols, trigsimp from sympy import sin, cos from sympy.physics.mechanics import ReferenceFrame, Point, Particle from sympy.physics.mechanics import dot, dynamicsymbols, ms...
unknown
codeparrot/codeparrot-clean
//! //! # The rustc Query System: Query Definitions and Modifiers //! //! The core processes in rustc are shipped as queries. Each query is a demand-driven function from some key to a value. //! The execution result of the function is cached and directly read during the next request, thereby improving compilation effic...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_middle/src/queries.rs
#!/usr/bin/env python -t # -*- coding: UTF-8 -*- import requests class JsonParser(object): def __init__(self, json_cont=None, url=None): if url is not None: self.url = url self.json_cont_dictionary = requests.get(url).json() self.json_cont_dictionary = json_cont def p...
unknown
codeparrot/codeparrot-clean
################################################################################# # # Copyright (c) 2013 Genome Research Ltd. # # Author: Irina Colgiu <ic4@sanger.ac.uk> # # 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 Fr...
unknown
codeparrot/codeparrot-clean
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib.auth.models import AbstractBaseUser from django.db import connection, models from django.db.migrations.autodetector import MigrationAutodetector from django.db.migrations.graph import MigrationGraph from django.db.migrations.loader import Migr...
unknown
codeparrot/codeparrot-clean
''' Multitexture Example ==================== This example blends two textures: the image mtexture1.png of the letter K and the image mtexture2.png of an orange circle. You should see an orange K clipped to a circle. It uses a custom shader, written in glsl (OpenGL Shading Language), stored in a local string. Note th...
unknown
codeparrot/codeparrot-clean
import re import markdown import bs4 import tinycss2 from . import HtmlProcessor ######################################################################################################################## # # Misc fixer classes for various retarded "protection" shit translators do. # ####################################...
unknown
codeparrot/codeparrot-clean
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ The ``codes`` object defines a mapping from common names for HTTP statuses to their numerical codes, accessible either as attributes or as dictionary items. >>> requests.codes['temporary_redirect'] 307 >>> requests.codes.teapot 418 >>> requests.codes['\o/'] 200 Some codes have multiple na...
unknown
codeparrot/codeparrot-clean
--- title: Plugins permalink: /docs/plugins/installation/ --- Jekyll has built-in support for using plugins to extend the core functionality. Primarily, any file with extension `.rb` placed within a `_plugins` directory at the root of the site's `source`, will be automatically loaded during a build session. This beh...
unknown
github
https://github.com/jekyll/jekyll
docs/_docs/plugins/installation.md
/* * 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.components import org.jetbrains.kotlin.analysis.api.components....
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KaFirSourceProvider.kt
import sys import os import json import re import html5lib import support import test_parser import test_tokenizer p = html5lib.HTMLParser() unnamespaceExpected = re.compile(r"^(\|\s*)<html ([^>]+)>", re.M).sub def main(out_path): if not os.path.exists(out_path): sys.stderr.write("Path %s does not exist...
unknown
codeparrot/codeparrot-clean
@use '../../../../../../styles/typography'; @use '../../../../../shared/object-tree-explorer/prop-action-btn'; :host { ng-docs-ref-button { margin-left: 0.125rem; } .services { margin: 0.5rem; border-radius: 0.375rem; background: color-mix(in srgb, var(--senary-contrast) 50%, var(--color-backgro...
unknown
github
https://github.com/angular/angular
devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab/property-view/property-view-body/property-view-body.component.scss
# -*- coding: utf-8 -*- # Copyright: (c) 2018, Fran Fitzpatrick <francis.x.fitzpatrick@gmail.com> fxfitz # 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 from mock import call, MagicMock...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import sys import time import mpd import os import logging import logging.handlers from sqlite3 import Error as SqlError from socket import error as SocketError from socket import timeout as SocketTimeout import dbase import daemon #------------------------------------------- # Change the follo...
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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/pages/MappedTaskInstance/index.ts
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
unknown
codeparrot/codeparrot-clean
.feature-icon { width: 4rem; height: 4rem; border-radius: .75rem; } .icon-square { width: 3rem; height: 3rem; border-radius: .75rem; } .text-shadow-1 { text-shadow: 0 .125rem .25rem rgba(0, 0, 0, .25); } .text-shadow-2 { text-shadow: 0 .25rem .5rem rgba(0, 0, 0, .25); } .text-shadow-3 { text-shadow: 0 .5r...
css
github
https://github.com/twbs/bootstrap
site/src/assets/examples/features/features.css
package kotlinx.coroutines.internal import kotlin.coroutines.* internal actual fun <E: Throwable> recoverStackTrace(exception: E, continuation: Continuation<*>): E = exception internal actual fun <E: Throwable> recoverStackTrace(exception: E): E = exception @PublishedApi internal actual fun <E : Throwable> unwrap(ex...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/native/src/internal/StackTraceRecovery.kt
# -*- coding: utf-8 -*- """ This module provides a class called :class:`AtomFeed` which can be used to generate feeds in the Atom syndication format (see :rfc:`4287`). Example:: from pyatom import AtomFeed import datetime feed = AtomFeed(title="My Blog", su...
unknown
codeparrot/codeparrot-clean
{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations \u0026 Alerts", "type": "dashb...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/testdata/output/single_version/v40.refresh_empty_string.v40.json
#!/usr/bin/env python # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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....
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # DJANGO IMPORTS from django.db import models from django.contrib.auth.models import User from django.conf import settings from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Category(models.Model): name = models.CharField("Title", max_length=50) c...
unknown
codeparrot/codeparrot-clean
# -*- coding: iso-8859-1 -*- """ MoinMoin - Wiki Synchronisation @copyright: 2006 MoinMoin:AlexanderSchremmer @license: GNU GPL, see COPYING for details. """ import os import socket import xmlrpclib from MoinMoin import wikiutil from MoinMoin.util import lock, pickle from MoinMoin.Page import Page from M...
unknown
codeparrot/codeparrot-clean
# Automated, robust apt-get mirror selection for Debian and Ubuntu. # # Author: Peter Odding <peter@peterodding.com> # Last Change: April 15, 2020 # URL: https://apt-mirror-updater.readthedocs.io """ Usage: apt-mirror-updater [OPTIONS] The apt-mirror-updater program automates robust apt-get mirror selection for Debia...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # # Copyright © 2011 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 limitation # the rights to use, copy, modify, me...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2008 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
java
github
https://github.com/google/guava
android/guava-testlib/src/com/google/common/collect/testing/testers/QueueElementTester.java
# -*- coding: utf-8 -*- # # PyCap documentation build configuration file, created by # sphinx-quickstart on Thu Jan 12 14:09:09 2012. # # 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. # # All c...
unknown
codeparrot/codeparrot-clean
from datetime import datetime, timedelta from django.db import models from cal.managers import PermittedManager from panya.models import ModelBase def save_handler_does_not_repeat(entry): # raise an error if wrong handler is triggered if entry.repeat != 'does_not_repeat': raise Exception("In handler ...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
unknown
codeparrot/codeparrot-clean
from Screen import Screen from Components.ActionMap import ActionMap from Components.Converter.ClientsStreaming import ClientsStreaming import skin import gettext from Components.Sources.StaticText import StaticText class StreamingClientsInfo(Screen): skin ="""<screen name="StreamingClientsInfo" position="center,cen...
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 */ import {h} from 'preact'; /** Convenience component to render raw html */ export function RawHtml(props: {value: st...
typescript
github
https://github.com/angular/angular
adev/shared-docs/pipeline/api-gen/rendering/templates/raw-html.tsx
from django.template.defaultfilters import slugify from django.test import SimpleTestCase from django.utils.functional import lazy from django.utils.safestring import mark_safe from ..utils import setup class SlugifyTests(SimpleTestCase): """ Running slugify on a pre-escaped string leads to odd behavior, ...
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 model 'Feedback' db.create_table(u'feedback_feedback', ( ...
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 ...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/jmx/TestJMXJsonServlet.java
""" Iceland specific form helpers. """ from __future__ import absolute_import, unicode_literals from django.contrib.localflavor.is_.is_postalcodes import IS_POSTALCODES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField from django.forms...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2012 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
java
github
https://github.com/google/guava
android/guava-testlib/src/com/google/common/collect/testing/google/TestMultimapGenerator.java
# =============================================================================== # Copyright 2014 Jake Ross # # 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...
unknown
codeparrot/codeparrot-clean
#ifndef SRC_ALIASED_STRUCT_H_ #define SRC_ALIASED_STRUCT_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "node_internals.h" #include "v8.h" #include <memory> namespace node { // AliasedStruct is a utility that allows uses a V8 Backing Store // to be exposed to the C++/C side as a struct and to t...
c
github
https://github.com/nodejs/node
src/aliased_struct.h
# -*- coding: utf-8 -*- # # Copyright (C) 2009-2010 Per Arneng <per.arneng@anyplanet.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # ...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package command import ( "reflect" "testing" "github.com/google/go-cmp/cmp" "github.com/hashicorp/go-secure-stdlib/strutil" "github.com/hashicorp/vault/api" "github.com/posener/complete" ) func TestPredictVaultPaths(t *testing.T) { t.Para...
go
github
https://github.com/hashicorp/vault
command/base_predict_test.go
<a name="feature-request"></a> # Feature request process To manage the requests we receive at scale, we introduced automation in our feature request management process. After we identify an issue as a feature request, it goes through several steps. ## Manual review First, we manually review the issue to see if it a...
unknown
github
https://github.com/angular/angular
contributing-docs/feature-request-consideration.md
from datetime import time from django.template.defaultfilters import time as time_filter from django.test import SimpleTestCase from django.utils import timezone, translation from ..utils import setup from .timezone_utils import TimezoneTestCase class TimeTests(TimezoneTestCase): """ #20693: Timezone support...
python
github
https://github.com/django/django
tests/template_tests/filter_tests/test_time.py
from __future__ import print_function import errno import json import os import platform import re import shlex import signal import signal import subprocess import sys import tempfile import textwrap import time import traceback from pynailgun import NailgunConnection, NailgunException from timing import monotonic_ti...
unknown
codeparrot/codeparrot-clean
# The default ``config.py`` def set_prefs(prefs): """This function is called before opening the project""" # Specify which files and folders to ignore in the project. # Changes to ignored resources are not added to the history and # VCSs. Also they are not returned in `Project.get_files()`. # Not...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding:utf-8 -*- from itertools import islice import pymysql import traceback def readGongdan(filePath): linesDic = {} with open(filePath, encoding = 'UTF-8') as f: for lineStr in islice(f, 1, None): lines = lineStr.replace('"', '').strip('\n').split(',') ...
unknown
codeparrot/codeparrot-clean
import oracledb from django.contrib.gis.db.backends.base.adapter import WKTAdapter from django.contrib.gis.geos import GeometryCollection, Polygon class OracleSpatialAdapter(WKTAdapter): input_size = oracledb.CLOB def __init__(self, geom): """ Oracle requires that polygon rings are in proper ...
python
github
https://github.com/django/django
django/contrib/gis/db/backends/oracle/adapter.py
# -*- encoding: utf-8 -*- ############################################################################### # # account_fiscal_position_rule_purchase for OpenERP # Copyright (C) 2009-TODAY Akretion <http://www.akretion.com> # @author Renato Lima <renato.lima@akretion.com> # This program is free software: you ca...
unknown
codeparrot/codeparrot-clean
#!/bin/sh # # Copyright (c) 2005 Junio C Hamano # test_description='Two way merge with read-tree -m -u $H $M This is identical to t1001, but uses -u to update the work tree as well. ' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-read-tree.sh compare_change () { sed >current \ -e '1{/^diff --git /d;}' \ -e '2...
unknown
github
https://github.com/git/git
t/t1002-read-tree-m-u-2way.sh
from django.shortcuts import redirect from django.http import Http404 from django.views.generic.edit import FormView, UpdateView, DeleteView from django.views.generic import ListView from django.contrib.auth import authenticate, login, logout from django.core.urlresolvers import reverse, reverse_lazy from .models impo...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import six import requests from django.conf import settings from django.core.mail.backends.base import BaseEmailBackend from django.core.mail.message import sanitize_address from requests.packages.urllib3.filepost import encode_multipart_formdata __version__ = '0.7.1' version ...
unknown
codeparrot/codeparrot-clean
//go:build !windows /* 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 a...
go
github
https://github.com/kubernetes/kubernetes
pkg/kubelet/eviction/memory_threshold_notifier_others.go
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
docs/examples/multi-post.c
def area_trapezium(base1,base2,height): area = 0.5 * (base1 + base2) * height return area
unknown
mbpp
from django.template import loader from django.utils.text import capfirst from django.core.urlresolvers import reverse, NoReverseMatch from django.utils.translation import ugettext as _ from xadmin.sites import site from xadmin.filters import SEARCH_VAR from xadmin.views import BaseAdminPlugin, CommAdminView class To...
unknown
codeparrot/codeparrot-clean
export const revalidateInSeconds = 5 * 60; export const getStaticProps = async () => { return { props: {}, revalidate: revalidateInSeconds, }; };
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/strip-page-exports/getStaticProps/issue-31855/output-data.js
# Copyright (C) 2010-2014 GRNET S.A. # # 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 i...
unknown
codeparrot/codeparrot-clean
import re import datetime class InvalidCard(Exception): pass class CardNotSupported(Exception): pass class CreditCard(object): # The regexp attribute should be overriden by the subclasses. # Attribute value should be a regexp instance regexp = None # Has to be set by the user after calling `v...
unknown
codeparrot/codeparrot-clean
from __future__ import division from linear_algebra import squared_distance, vector_mean, distance import math, random import matplotlib.image as mpimg import matplotlib.pyplot as plt class KMeans: """performs k-means clustering""" def __init__(self, k): self.k = k # number of clusters ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ /** * ByteBuddy related stuff used for mock interaction. */ package org.mockito.internal.creation.bytebuddy.access;
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/internal/creation/bytebuddy/access/package-info.java
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
unknown
codeparrot/codeparrot-clean
<!--⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be rendered properly in your Markdown viewer. --> # Webサーバー用のパイプラインの使用 <Tip> 推論エンジンの作成は複雑なトピックであり、"最適な"ソリューションはおそらく問題の領域に依存するでしょう。CPUまたはGPUを使用していますか?最低のレイテンシ、最高のスループット、多くのモデルのサポート、または特定のモデルの高度な最適化を望...
unknown
github
https://github.com/huggingface/transformers
docs/source/ja/pipeline_webserver.md
'''test for reference counting problems. If a Python object is garbage collected while another object is using its data, you will get a segmentation fault. ''' import array import gc import tempfile as tfi import cairo import py.test as test width, height = 256, 256 def draw(ctx, width, height): "example draw co...
unknown
codeparrot/codeparrot-clean
/* Weak references objects for Python. */ #ifndef Py_WEAKREFOBJECT_H #define Py_WEAKREFOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef struct _PyWeakReference PyWeakReference; PyAPI_DATA(PyTypeObject) _PyWeakref_RefType; PyAPI_DATA(PyTypeObject) _PyWeakref_ProxyType; PyAPI_DATA(PyTypeObject) _PyWeakref_Calla...
c
github
https://github.com/python/cpython
Include/weakrefobject.h
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # from __future__ import print_function import os import pprint import shutil import sys import tempfile import pytest from ipalib import api from ipalib.cli import cli_plugins import ipatests.util try: import ipaplatform # pylint: disable=un...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import os import re import datetime import requests from bs4 import BeautifulSoup as bs import django import arrow os.environ['DJANGO_SETTINGS_MODULE'] = 'kucinema.settings' django.setup() from kucinema.models import Movie, Schedule kucinema_trap = 'http://www.kucinetrap.kr/' kucinema_theque ...
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
build-plugin/spring-boot-antlib/src/main/java/org/springframework/boot/ant/package-info.java
# # 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 us...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.tools.google_scholar.tool import GoogleScholarQueryRun # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # h...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/tools/google_scholar/tool.py
/* Copyright (c) T. Zachary Laine 2018. Distributed under 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) */ #ifndef BOOST_ALGORITHM_FIND_NOT_HPP #define BOOST_ALGORITHM_FIND_NOT_HPP #include <utility> #include <boost/config.hp...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/algorithm/find_not.hpp
#-*- coding:utf-8 -*- """JsHamcrest build script. """ import re import cStringIO as StringIO from fabric.api import * # Project env.project = 'jshamcrest' env.version = '0.6.7' env.full_name = '%s-%s' % (env.project, env.version) # Build output env.build_dir = 'build' env.dist_dir = 'dist' env.rev_inf...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * 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 req...
cpp
github
https://github.com/nodejs/node
deps/LIEF/src/PE/ImportEntry.cpp
from django.db import models class Site(models.Model): name = models.CharField(max_length=100) class Article(models.Model): sites = models.ManyToManyField(Site) headline = models.CharField(max_length=100) publications = models.ManyToManyField("model_package.Publication", blank=True)
python
github
https://github.com/django/django
tests/model_package/models/article.py
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# Copyright (c) Microsoft Corporation. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the LICENSE.txt file at the root of this distribution. If # you cannot locate the Apache License, Version 2.0, please send an email to # vspython@mic...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Tests\Support; use Illuminate\Support\Optional; use PHPUnit\Framework\TestCase; use stdClass; class SupportOptionalTest extends TestCase { public function testGetExistItemOnObject() { $expected = 'test'; $targetObj = new stdClass; $targetObj->item = $expect...
php
github
https://github.com/laravel/framework
tests/Support/SupportOptionalTest.php
from __future__ import absolute_import, division, print_function from os.path import join as pjoin # Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z" _version_major = 0 _version_minor = 1 _version_micro = '' # use '' for first of series, number for 1 and above _version_extra = 'dev' # _versi...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional from ...._models import BaseModel from .annotation_delta import AnnotationDelta __all__ = ["TextDelta"] class TextDelta(BaseModel): annotations: Optional[List[AnnotationDelta]] = None val...
python
github
https://github.com/openai/openai-python
src/openai/types/beta/threads/text_delta.py
#!/usr/bin/env python3 ############################################################################### # Copyright 2017 The Apollo 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...
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
pkg/serviceaccount/keyid_test.go
# # 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 us...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Snippet.genres' db.add_column(u'spawnsong_snippet', 'genres', self.gf('...
unknown
codeparrot/codeparrot-clean
# TestSwiftRewriteClangPaths.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2018 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONT...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright 2021 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. # This is generated, do not edit. Update BuildConfigGenerator.groovy and # 3ppFetch.template instead. from __future__ import print_fun...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0 /* * linux/fs/fcntl.c * * Copyright (C) 1991, 1992 Linus Torvalds */ #include <linux/syscalls.h> #include <linux/init.h> #include <linux/mm.h> #include <linux/sched/task.h> #include <linux/fs.h> #include <linux/filelock.h> #include <linux/file.h> #include <linux/capability.h>...
c
github
https://github.com/torvalds/linux
fs/fcntl.c
/* * 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.resolver; import com.inte...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/resolver/FirIdeNormalAnalysisSourceModuleNonPhysicalResolveDanglingFileReferenceTestGenerated.java
## # Copyright 2009-2013 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
unknown
codeparrot/codeparrot-clean
"""SCons.exitfuncs Register functions which are executed when SCons exits for any reason. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentat...
unknown
codeparrot/codeparrot-clean
import cv2 import numpy as np import h5py from keras.models import Sequential, load_model from keras.layers import Dense, Convolution2D, MaxPooling2D, Activation from keras.layers import BatchNormalization from keras.callbacks import ModelCheckpoint from keras.optimizers import SGD from keras.layers import Flatten ###...
unknown
codeparrot/codeparrot-clean
import glob import pandas as pd import numpy as np import os os.chdir('/Users/evanbiederstedt/Downloads/annoOld_files') # set glob subdirectory via cell batch normalB_cellbatch_mcell = glob.glob("RRBS_NormalBCD19pCD27mcell67_88*.anno") newdf1 = pd.DataFrame() for filename in normalB_cellbatch_mcell: df = pd.read...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function import atexit import math import os import random import re import shlex import subprocess import sys import tempfile import time from math import acos, atan2, cos, pi, sqrt from subprocess import PIPE, Popen, call, check_call import pexpect from . rotmat import Matrix3, Vector3...
unknown
codeparrot/codeparrot-clean
import json import logging import os import tempfile import capture import maya.cmds as cmds from .vendor.Qt import QtCore, QtWidgets, QtGui from . import lib from . import plugin from . import presets from . import version from . import tokens from .accordion import AccordionWidget log = logging.getLogger("Capture ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ pygments.lexers.tcl ~~~~~~~~~~~~~~~~~~~ Lexers for Tcl and related languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, include, words from pygments.token import...
unknown
codeparrot/codeparrot-clean