code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from pandas.core.groupby.base import transformation_kernels # There is no Series.cumcount or DataFrame.cumcount series_transform_kernels = [ x for x in sorted(transformation_kernels) if x != "cumcount" ] frame_transform_kernels = [x for x in sorted(transformation_kernels) if x != "cumcount"]
python
github
https://github.com/pandas-dev/pandas
pandas/tests/apply/common.py
from __future__ import division, absolute_import, print_function import platform from distutils.unixccompiler import UnixCCompiler from numpy.distutils.exec_command import find_executable from numpy.distutils.ccompiler import simple_version_match if platform.system() == 'Windows': from numpy.distutils.msvc9compil...
unknown
codeparrot/codeparrot-clean
""" sentry.runner.commands.cleanup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import click from datetime import timedelta from django.utils import timezon...
unknown
codeparrot/codeparrot-clean
""" ============================================================ Empirical evaluation of the impact of k-means initialization ============================================================ Evaluate the ability of k-means initializations strategies to make the algorithm convergence robust as measured by the relative stan...
unknown
codeparrot/codeparrot-clean
# Joint copyright: # - Copyright 2014 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.org/licenses/LICENSE-2.0 # # Unless requ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package main import ( "context" "fmt" "os" "testing" "time" expect "github.com/Netflix/go-expect" tfe "github.com/hashicorp/go-tfe" "github.com/hashicorp/go-uuid" goversion "github.com/hashicorp/go-version" tfversion "github.com/hashicor...
go
github
https://github.com/hashicorp/terraform
internal/cloud/e2e/helper_test.go
package kotlinx.coroutines.channels import kotlinx.coroutines.* import kotlinx.coroutines.testing.* import kotlin.test.* class CancelledChannelLeakTest : TestBase() { /** * Tests that cancellation removes the elements from the channel's buffer. */ @Test fun testBufferedChannelLeak() = runTest { ...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/jvm/test/channels/CancelledChannelLeakTest.kt
# -*- coding: utf-8 -*- # Copyright (c) 2015 Jason Lowe-Power # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list o...
unknown
codeparrot/codeparrot-clean
""" Tests of completion xblock runtime services """ from completion.models import BlockCompletion from completion.services import CompletionService from completion.test_utils import CompletionWaffleTestMixin import ddt from opaque_keys.edx.keys import CourseKey from openedx.core.djangolib.testing.utils import skip_unl...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # Copyright (C) 2021 Microchip Technology, Inc. %YAML 1.2 --- $id: http://devicetree.org/schemas/media/microchip,xisc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Microchip eXtended Image Sensor Controller (XISC) maintainers: - Eugen H...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/media/microchip,xisc.yaml
# 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
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 3 of the Lic...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import division, print_function __all__ = [ "Sum", "Product", "Kernel", "ConstantKernel", "WhiteKernel", "DotProductKernel", "RadialKernel", "ExpKernel", "ExpSquaredKernel", "CosineKernel", "ExpSine2Kernel", "Matern32Kernel", "Matern52Kernel", "PythonKe...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
unknown
codeparrot/codeparrot-clean
package drvregistry import ( "testing" "github.com/moby/moby/v2/daemon/libnetwork/driverapi" "github.com/moby/moby/v2/daemon/libnetwork/scope" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) const mockDriverName = "mock-driver" type mockDriver struct { driverapi.Driver } var mockDriverCaps = drive...
go
github
https://github.com/moby/moby
daemon/libnetwork/drvregistry/networks_test.go
# Copyright 2012 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 req...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2025 Advanced Micro Devices, Inc. and The HuggingFace Team. 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 req...
unknown
github
https://github.com/huggingface/transformers
docs/source/en/quantization/quark.md
# 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
# testing/config.py # Copyright (C) 2005-2016 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 import collections requirements = None db = None db_url = None db_opts = None fil...
unknown
codeparrot/codeparrot-clean
/* Copyright 2014 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/securitycontext/util_test.go
/*[clinic input] preserve [clinic start generated code]*/ #include "pycore_modsupport.h" // _PyArg_CheckPositional() PyDoc_STRVAR(math_integer_gcd__doc__, "gcd($module, /, *integers)\n" "--\n" "\n" "Greatest Common Divisor."); #define MATH_INTEGER_GCD_METHODDEF \ {"gcd", _PyCFunction_CAST(math_integer_gcd)...
c
github
https://github.com/python/cpython
Modules/clinic/mathintegermodule.c.h
from fooster.web import web import mock test_request = 'GET / HTTP/1.1\r\n' + '\r\n' def bad_read(self): raise Exception() def run(request, handler=None, timeout=None, keepalive=True, initial_timeout=None, read_exception=False, close=True, skip=False): if not isinstance(request, bytes): request = re...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import TYPE_CHECKING, Dict, Union, Optional from typing_extensions import Literal, assert_never import httpx from ... import _legacy_response from ...types import FileChunkingStrategy...
python
github
https://github.com/openai/openai-python
src/openai/resources/vector_stores/files.py
#!/usr/bin/python ## Copyright 2017 Knossos authors, see NOTICE file ## ## 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
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from astropy import units as u from astropy.coordinates.distances import Distance from astropy.coordinates.builtin_frames import ICRS, FK5, Galactic, AltAz, SkyOffsetFrame from astropy.coordinates ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2026 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.io import io.ktor.utils.io.InternalAPI @InternalAPI public actual fun configurePlatform() { // This is unused for non-JVM platforms }
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-core/nonJvm/src/io/ktor/client/io/PlatformStaticConfig.nonJvm.kt
import * as React from "react"; import * as TestRenderer from "react-test-renderer"; import type { Path } from "react-router"; import { MemoryRouter, Routes, Route, useResolvedPath, useLocation, } from "react-router"; import { prettyDOM, render } from "@testing-library/react"; function ShowResolvedPath({ pat...
typescript
github
https://github.com/remix-run/react-router
packages/react-router/__tests__/useResolvedPath-test.tsx
# 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 # di...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/mm.h> #include <linux/sched.h> #include <linux/sched/mm.h> #include <linux/mmu_notifier.h> #include <linux/rmap.h> #include <linux/swap.h> #include <linux/mm_inline.h> #include <linux/kthread.h> #include <linux/khugepaged.h...
c
github
https://github.com/torvalds/linux
mm/khugepaged.c
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2010-2011 OpenStack, LLC. # # 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 # # U...
unknown
codeparrot/codeparrot-clean
$('body').append( '<div id="qunit"></div>' + '<div id="qunit-fixture"></div>' );
javascript
github
https://github.com/lodash/lodash
vendor/backbone/test/setup/dom-setup.js
from abc import ABCMeta, abstractstaticmethod # en la función next sucesor establecemos al siguiente sucesor dentro de la cadena #la sifuiente función el evento de la cadena class CajeroHandler(metaclass=ABCMeta): @abstractstaticmethod def next_succesor(next): @abstractstaticmethod def handle(cantidad...
unknown
codeparrot/codeparrot-clean
import dynamic from 'next/dynamic'; import somethingElse from 'something-else'; const DynamicComponent = dynamic(()=>import('../components/hello'), { loadableGenerated: { modules: [ "src/some-file.js -> " + "../components/hello" ] } }); somethingElse.dynamic('should not be transforme...
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/next-dynamic/member-with-same-name/output-dev.js
''' Mesh Manipulation Example ========================= This demonstrates creating a mesh and using it to deform the texture (the kivy log). You should see the kivy logo with a five sliders to right. The sliders change the mesh points' x and y offsets, radius, and a 'wobble' deformation's magnitude and speed. This ex...
unknown
codeparrot/codeparrot-clean
"""Tests for distutils.command.bdist_wininst.""" import unittest import os from distutils.dist import Distribution from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support class BuildWinInstTestCase(support.TempdirManager, unittest.TestCase): def te...
unknown
codeparrot/codeparrot-clean
# -*- coding: latin1 -*- ################################################################################################ # # import tweepy, datetime, sys, time, json, os, os.path, shutil, time, struct, random reload(sys) sys.setdefaultencoding('utf-8') #################################################################...
unknown
codeparrot/codeparrot-clean
from amsn2.views import StringView, MenuItemView from PyQt4 import Qt from PyQt4 import QtCore from PyQt4 import QtGui def create_menu_items_from_view(menu, items): # TODO: images & radio groups, for now only basic representation for item in items: if item.type is MenuItemView.COMMAND: it =...
unknown
codeparrot/codeparrot-clean
//go:build ignore // +build ignore //go:generate go run gen.go package main import ( "context" "fmt" "io/fs" "os" "path/filepath" "regexp" "sort" "strings" "cuelang.org/go/cue" "cuelang.org/go/cue/cuecontext" "cuelang.org/go/cue/load" "github.com/grafana/codejen" "github.com/grafana/cuetsy" "github.c...
go
github
https://github.com/grafana/grafana
kinds/gen.go
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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; e...
unknown
codeparrot/codeparrot-clean
/* GLOBAL STYLES -------------------------------------------------- */ /* Padding below the footer and lighter body text */ body { padding-top: 3rem; padding-bottom: 3rem; color: rgb(var(--bs-tertiary-color-rgb)); } /* CUSTOMIZE THE CAROUSEL -------------------------------------------------- */ /* Carousel bas...
css
github
https://github.com/twbs/bootstrap
site/src/assets/examples/carousel/carousel.rtl.css
""" Copyright (c) 2012-2015 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
unknown
codeparrot/codeparrot-clean
#!/bin/sh # Copyright IBM Corp. 2016, 2025 # SPDX-License-Identifier: BUSL-1.1 set -e # Prevent core dumps ulimit -c 0 # Allow setting VAULT_REDIRECT_ADDR and VAULT_CLUSTER_ADDR using an interface # name instead of an IP address. The interface name is specified using # VAULT_REDIRECT_INTERFACE and VAULT_CLUSTER_INTE...
unknown
github
https://github.com/hashicorp/vault
.release/docker/ubi-docker-entrypoint.sh
# Copyright 2019 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...
python
github
https://github.com/tensorflow/tensorflow
tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/shapes_for_arguments.py
#!/usr/bin/env python #------------------------------------------------------------------------------- # # shotwellfs.py # # # See usage for details. # # LIMITATIONS: Unicode tags are not supported? # #------------------------------------------------------------------------------- import datetime import errno import o...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import sys from smartcard.scard import * def tohex(l, delim='', reverse=False): if reverse: l = l[:] l.reverse() return delim.join(['%02X' % x for x in l]) def tostr(r): return ''.join(['.' if x < 0x20 or x > 0x7e else chr(x) for x in r]) def manuf(r, i): ma = tohex(...
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 not us...
unknown
codeparrot/codeparrot-clean
""" Script that trains progressive multitask models on HOPV dataset. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import shutil import numpy as np import deepchem as dc from hopv_datasets import load_hopv # Only for debug! np.random.seed(1...
unknown
codeparrot/codeparrot-clean
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model from django.conf import settings class Error(models.Model): """ Model for storing the individual errors. """ kind = models.CharField(_('type'), null=True, blank=True, max_...
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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/cc/saved_model/signature_constants.h
prelude: | obj = Object.new hash = { obj => true } benchmark: hash.key?(obj) loop_count: 30000000
unknown
github
https://github.com/ruby/ruby
benchmark/hash_key.yml
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details __version__=''' $Id$ ''' __doc__=""" The Canvas object is the primary interface for creating PDF files. See doc/reportlab-userguide.pdf for copious examples. """ __all__ = ['Canvas'] ENABLE_TRACKING = 1 # turn this off to do profile testin...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # 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) an...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from gettext import gettext as _ from bbcalc.utils import KILOGRAMS, POUNDS, MALE, FEMALE, METRIC from bbcalc.utils.unitconvertor import kg2lb, cm2in # General constants MALECOEF = 98.42 FEMALECOEF = 76.76 WAISTCOEF = 4.15 WEIGHTCOEF = 1.082 CALORIESCOEF = 13.83 def bodyfat_calc(waist, wei...
unknown
codeparrot/codeparrot-clean
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import { HIRFunction, InstructionId, Place, PrunedReactiveScopeBlock, ReactiveBlock, ReactiveFunction, ReactiveIns...
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/visitors.ts
#ifndef EDITOR_H #define EDITOR_H struct repository; struct strbuf; const char *git_editor(void); const char *git_sequence_editor(void); int is_terminal_dumb(void); /** * Launch the user preferred editor to edit a file and fill the buffer * with the file's contents upon the user completing their editing. The * th...
c
github
https://github.com/git/git
editor.h
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os.path import sys import tempfile import types import unittest from contextlib import contextmanager from django.template import Context, TemplateDoesNotExist from django.template.engine import Engine from django.test import SimpleTestCase, ignor...
unknown
codeparrot/codeparrot-clean
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["mapping"] = factory(); else root["mappi...
javascript
github
https://github.com/lodash/lodash
dist/mapping.fp.js
########################################################################## # # Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios), # its affiliates and/or its licensors. # # Copyright (c) 2011, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # Copyright (C) 2020 BAIKAL ELECTRONICS, JSC %YAML 1.2 --- $id: http://devicetree.org/schemas/hwmon/baikal,bt1-pvt.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Baikal-T1 PVT Sensor maintainers: - Serge Semin <fancer.lancer@gmail.com> ...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/hwmon/baikal,bt1-pvt.yaml
from __future__ import unicode_literals import codecs import subprocess import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from youtube_dl.utils import intlist_to_bytes from youtube_dl.aes import aes_encrypt, key_expansion secret_msg = b'Secret message goes here' d...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # 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', 'status': ['preview...
unknown
codeparrot/codeparrot-clean
from email.mime.text import MIMEText from email.utils import formatdate import smtplib from flask import Blueprint, request, render_template, redirect, url_for, abort, current_app, flash, g from flask.ext.babel import _ from werkzeug.exceptions import ServiceUnavailable from sqlalchemy import func from sqlalchemy.orm...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.fir.test.cases.generated.cases.components.containingDeclarationProvi...
java
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/containingDeclarationProvider/FirIdeNormalAnalysisScriptSourceModuleContainingDeclarationProviderForSetterParameterTestGenerated.java
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test the CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic # from test_framework.test_framework import Bit...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import import inspect import warnings class RemovedInDjango20Warning(PendingDeprecationWarning): pass class RemovedInNextVersionWarning(DeprecationWarning): pass class warn_about_renamed_method(object): def __init__(self, class_name, old_method_name, new_method_name, depr...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # coding: utf-8 # # 応答生成モジュール # 基本的には # - 入力と応答の対応リスト(argv[1]) # - 話者認識結果ID (argv[2]) # - 音声認識結果 (argv[3]) # を受け取って応答文および音声を生成する # # 前の応答への依存性を持たせたい場合は引数を追加すれば良い import sys, os #import goslate import talkey import time from recognize import music_recognize from record import record from microsoftt...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import contextlib import io import os import platform import re import socket import struct imp...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- """ """ from . raw_po...
unknown
codeparrot/codeparrot-clean
from bedrock.redirects.util import redirect redirectpatterns = ( # Bug 608370, 957664 redirect(r'^press/kit(?:.*\.html|s/?)$', 'https://blog.mozilla.org/press/kits/'), # bug 877198 redirect(r'^press/news\.html$', 'http://blog.mozilla.org/press/'), redirect(r'^press/mozilla-2003-10-15\.html$', ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "abstract_unit" class HelperMailer < ActionMailer::Base def use_mail_helper @text = "But soft! What light through yonder window breaks? It is the east, " \ "and Juliet is the sun. Arise, fair sun, and kill the envious moon, " \ "which is sick and pal...
ruby
github
https://github.com/rails/rails
actionmailer/test/mail_helper_test.rb
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes import _ from webnotes.utils import cint, cstr, date_diff, flt, formatdate, getdate, get_url_to_form, \ comma_or, get...
unknown
codeparrot/codeparrot-clean
;(function() { /** Used as a safe reference for `undefined` in pre-ES5 environments. */ var undefined; /** Used to detect when a function becomes hot. */ var HOT_COUNT = 150; /** Used as the size to cover large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** Used as the `TypeError` message for...
javascript
github
https://github.com/lodash/lodash
test/test.js
# SPDX-License-Identifier: (GPL-2.0+ OR MIT) %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/rockchip,rk3228-cru.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Rockchip RK3228 Clock and Reset Unit (CRU) maintainers: - Elaine Zhang <zhangqing@rock-chips.com> - Heiko Stuebner <heiko@snte...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/rockchip,rk3228-cru.yaml
/** * @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 {Component, inject} from '@angular/core'; import {Router, RouterOutlet} from '@angular/router'; @Component({...
typescript
github
https://github.com/angular/angular
devtools/src/app/app.component.ts
# -*- coding: utf-8 -*- """ *************************************************************************** RandomExtract.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************************...
unknown
codeparrot/codeparrot-clean
""" Support code for building Python extensions on Windows. # NT stuff # 1. Make sure libpython<version>.a exists for gcc. If not, build it. # 2. Force windows to use gcc (we're struggling with MSVC and g77 support) # 3. Force windows to use g77 """ from __future__ import division, absolute_import, p...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2017 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.quality; import org.mockito.MockitoSession; import org.mockito.exceptions.misusing.PotentialStubbingProblem; import org.mockito.exceptions.misusing.UnnecessaryStubbingException; i...
java
github
https://github.com/mockito/mockito
mockito-core/src/main/java/org/mockito/quality/Strictness.java
from testfixtures import log_capture from testsuite.base_fs import BaseFilesystem from testsuite import config from core.sessions import SessionURL from core import modules import utils from core import messages import subprocess import os class FindPerms(BaseFilesystem): def setUp(self): self.session = S...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 Mirantis 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/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2011 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. """Usage: <win-path-to-pdb.pdb> This tool will take a PDB on the command line, extract the source files that were used in building ...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python # -*- coding: utf-8 -*- # =========================================================================== # Copyright (c) 2007-2011 Barend Gehrels, Amsterdam, the Netherlands. # Copyright (c) 2008-2011 Bruno Lalande, Paris, France. # Copyright (c) 2009-2011 Mateusz Loskot (mateusz@loskot.net), Lon...
unknown
codeparrot/codeparrot-clean
# 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.1 of the License, or (a...
unknown
codeparrot/codeparrot-clean
# This module defines many standard colors that should be useful. # These colors should be exactly the same as the ones defined in # colors.tcl. # Whites antique_white = (0.9804, 0.9216, 0.8431) azure = (0.9412, 1.0000, 1.0000) bisque = (1.0000, 0.8941, 0.7686) blanched_almond = (1.0000, 0.9216, 0.8039) cornsilk = (1...
unknown
codeparrot/codeparrot-clean
# Rekall Memory Forensics # # Copyright 2014 Google Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at # your option) any later v...
unknown
codeparrot/codeparrot-clean
package overlay import ( "strconv" "github.com/moby/moby/v2/daemon/libnetwork/osl/kernel" ) var ovConfig = map[string]*kernel.OSValue{ "net.ipv4.neigh.default.gc_thresh1": {Value: "8192", CheckFn: checkHigher}, "net.ipv4.neigh.default.gc_thresh2": {Value: "49152", CheckFn: checkHigher}, "net.ipv4.neigh.default....
go
github
https://github.com/moby/moby
daemon/libnetwork/drivers/overlay/ostweaks_linux.go
# frozen_string_literal: true require "helper" require "jobs/hello_job" require "jobs/logging_job" require "jobs/nested_job" class ActiveJobTestCaseTest < ActiveJob::TestCase # this tests that this job class doesn't get its adapter set. # that's the correct behavior since we don't want to break # the `class_att...
ruby
github
https://github.com/rails/rails
activejob/test/cases/test_case_test.rb
/* * 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-test/src/main/java/org/springframework/boot/test/json/AbstractJsonMarshalTester.java
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility functions to perform Xcode-style build steps. These functions are executed via gyp-mac-tool when using the Makefile generator. ""...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2013 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
java
github
https://github.com/google/guava
android/guava-testlib/src/com/google/common/collect/testing/google/SetMultimapAsMapTester.java
""" Management command `manage_group` is used to idempotently create Django groups and set their permissions by name. """ from django.apps import apps from django.contrib.auth.models import Group, Permission from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError f...
unknown
codeparrot/codeparrot-clean
# epydoc # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: __init__.py 1691 2008-01-30 17:11:09Z edloper $ """ Automatic Python reference documentation generator. Epydoc processes Python modules and docstrings to generate formatted API documentation,...
unknown
codeparrot/codeparrot-clean
""" ============================================== Lasso model selection via information criteria ============================================== This example reproduces the example of Fig. 2 of [ZHT2007]_. A :class:`~sklearn.linear_model.LassoLarsIC` estimator is fit on a diabetes dataset and the AIC and the BIC crite...
python
github
https://github.com/scikit-learn/scikit-learn
examples/linear_model/plot_lasso_lars_ic.py
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
unknown
codeparrot/codeparrot-clean
use std::cell::RefCell; use std::collections::hash_map::Entry; use rustc_data_structures::fx::{FxHashMap, FxIndexSet}; use rustc_middle::mir::{Body, MirDumper, MirPhase, RuntimePhase}; use rustc_middle::ty::TyCtxt; use rustc_session::Session; use tracing::trace; use crate::lint::lint_body; use crate::{errors, validat...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_mir_transform/src/pass_manager.rs
import pytest from rest_framework.reverse import reverse from osmaxx.conversion import status authenticated_access_urls = [ reverse('clipping_area-list'), reverse('conversion_job-list'), reverse('conversion_parametrization-list'), ] @pytest.fixture(params=authenticated_access_urls) def access_url(request...
unknown
codeparrot/codeparrot-clean
{{ formset.management_form }}{% for form in formset %}{{ form.as_p() }}{% endfor %}
html
github
https://github.com/django/django
django/forms/jinja2/django/forms/formsets/p.html
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import * as t from '@babel/types'; import { CompilerError, CompilerErrorDetail, ErrorCategory, } from '../CompilerError'; ...
typescript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateHooksUsage.ts
# Copyright 2010-2012 RethinkDB, all rights reserved. import os import socket import time import socket # pythonic discriminated union I guess, this is kind of retarded. # actually 0 need for a base class it's really more like a comment # that happens to be runable code class RunError(Exception): def __init__(se...
unknown
codeparrot/codeparrot-clean