code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from __future__ import print_function import sys from math import e from random import randint from gi.repository import Gtk, GObject from gi.repository import Gdk from pychess.System import uistuff from pychess.System.idle_add import idle_add from pychess.System.prefix import addDataPrefix from pychess.Utils.const i...
unknown
codeparrot/codeparrot-clean
""" This script is used to deploy the ODrive python tools to PyPi so that users can install them easily with "pip install odrive" To install the package and its dependencies locally, run: sudo pip install -r requirements.txt To build and package the python tools into a tar archive: python setup.py sdist Warn...
unknown
codeparrot/codeparrot-clean
import contextlib from pathlib import Path import re import uuid import numpy as np import pytest import pandas as pd from pandas import DataFrame import pandas._testing as tm from pandas.io.excel import ( ExcelWriter, _OpenpyxlWriter, ) from pandas.io.excel._openpyxl import OpenpyxlReader openpyxl = pytest...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/io/excel/test_openpyxl.py
""" This is a straightforward Python wrapper for ssdeep by Jesse Kornblum, which is a library for computing Context Triggered Piecewise Hashes (CTPH). """ import os import six from ssdeep.__about__ import ( __author__, __copyright__, __email__, __license__, __summary__, __title__, __uri__, __version__ ) from...
unknown
codeparrot/codeparrot-clean
from test.support import verbose import unittest import locale import sys import codecs class BaseLocalizedTest(unittest.TestCase): # # Base class for tests using a real locale # @classmethod def setUpClass(cls): if sys.platform == 'darwin': import os tlocs = ("en_U...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation; /** * An event generated on the serv...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/HttpFoundation/ServerEvent.php
''' ''' # 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");...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011 Blue Pines Technologies LLC, Brad Carleton # www.bluepines.org # Copyright (c) 2012 42 Lines Inc., Jim Browne # # Permission is hereby granted, free of charge, to any person obtaining a # copy...
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
#!/usr/bin/env python # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
unknown
codeparrot/codeparrot-clean
# (C) Copyright David Abrahams 2001. Permission to copy, use, modify, sell and # distribute this software is granted provided this copyright notice appears in # all copies. This software is provided "as is" without express or implied # warranty, and with no claim as to its suitability for any purpose. from b2.util...
unknown
codeparrot/codeparrot-clean
import unittest, time, sys, random sys.path.extend(['.','..','../..','py']) import h2o, h2o_browse as h2b, h2o_import as h2i class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): h2o.init(1,java_heap_GB=10) @classmethod ...
unknown
codeparrot/codeparrot-clean
test_kind: js_test selector: roots: - jstests/change_streams/**/*.js exclude_files: # Parallel Shell - we do not signal the override to end a txn when a parallel shell closes. - jstests/change_streams/only_wake_getmore_for_relevant_changes.js # TODO: SERVER-98064 Investigate split_large_event.js fa...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokeconfig/suites/change_streams_multi_stmt_txn_sharded_collections_passthrough.yml
# Copyright 2025 The HuggingFace Inc. 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 required by appl...
python
github
https://github.com/huggingface/transformers
src/transformers/quantizers/quantizer_mxfp4.py
# This file is being contributed to pyasn1-modules software. # # Created by Russ Housley with assistance from asn1ate v.0.6.0. # # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # # Multicast Email (MULE) over Allied Communications Publication 142 # # ASN.1 source from: # htt...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest, blocks, filter, digital class test_simple_correlator(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_...
unknown
codeparrot/codeparrot-clean
{ "fooJSON": "foo_json_tfvars_value" }
json
github
https://github.com/hashicorp/terraform
internal/command/testdata/test/tfvars_in_test_dir/alternate/vars.auto.tfvars.json
# frozen_string_literal: true class DlKeyedBelongsTo < ActiveRecord::Base self.primary_key = "belongs_key" belongs_to :destroy_async_parent, dependent: :destroy_async, foreign_key: :destroy_async_parent_id, primary_key: :parent_id, class_name: "DestroyAsyncParent" belongs_to :destroy_async_parent...
ruby
github
https://github.com/rails/rails
activerecord/test/models/dl_keyed_belongs_to.rb
# Owner(s): ["module: nn"] import unittest from dataclasses import dataclass from functools import partial from itertools import chain, product import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import CrossEntropyLoss from torch.nn.utils._expanded_weights import ExpandedWeight from torch...
python
github
https://github.com/pytorch/pytorch
test/test_expanded_weights.py
#!/usr/bin/env python # coding=utf-8 import libsbml import libsbmlsim import numpy as np import matplotlib.pyplot as plt from biopredyn import result # Simulation conditions model_file = "FEBS_antimony.xml" start = 0.0 end = 20.0 steps = 100.0 step = (end - start) / steps # Open SBML file reader = libsbml.SBMLReader...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, John Dewey <john@dewey.ws> # 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
from __future__ import print_function, division from sympy import Basic, Expr from .matexpr import ShapeError class Trace(Expr): """Matrix Trace Represents the trace of a matrix expression. >>> from sympy import MatrixSymbol, Trace, eye >>> A = MatrixSymbol('A', 3, 3) >>> Trace(A) Trace(A) ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash # if no version string is passed as an argument, read VERSION file if [ $# -eq 0 ]; then VERSION="$(< VERSION)" else VERSION=$1 fi # Remove leading 'v' if present VERSION="${VERSION#v}" # Extract MAJOR, MINOR, and REST MAJOR="${VERSION%%.*}" MINOR="${VERSION#*.}"; MINOR="${MINOR%%.*}" RES...
unknown
github
https://github.com/prometheus/prometheus
scripts/get_module_version.sh
/*------------------------------------------------------------------------- * * pg_crc32c_sse42.c * Compute CRC-32C checksum using Intel SSE 4.2 or AVX-512 instructions. * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of Californ...
c
github
https://github.com/postgres/postgres
src/port/pg_crc32c_sse42.c
"""A module with the precisions of platform-specific `~numpy.number`s.""" from ._nbit_base import _8Bit, _16Bit, _32Bit, _64Bit, _96Bit, _128Bit # To-be replaced with a `npt.NBitBase` subclass by numpy's mypy plugin type _NBitByte = _8Bit type _NBitShort = _16Bit type _NBitIntC = _32Bit type _NBitIntP = _32Bit | _64B...
python
github
https://github.com/numpy/numpy
numpy/_typing/_nbit.py
{ "html": { "type": "Fragment", "start": 0, "end": 38, "children": [ { "type": "Element", "start": 0, "end": 38, "name": "div", "attributes": [ { "type": "Attribute", "start": 5, "end": 9, "name": "a", "name_loc": { "start": { "line": 1, ...
json
github
https://github.com/sveltejs/svelte
packages/svelte/tests/parser-legacy/samples/attribute-empty/output.json
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
unknown
codeparrot/codeparrot-clean
# orm/dynamic.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 """Dynamic collection API. Dynamic collections act like Query() objects for read ope...
unknown
codeparrot/codeparrot-clean
/*--------------------------------------------------------------------------- * * Ryu floating-point output for double precision. * * Portions Copyright (c) 2018-2026, PostgreSQL Global Development Group * * IDENTIFICATION * src/common/d2s_full_table.h * * This is a modification of code taken from github.com...
c
github
https://github.com/postgres/postgres
src/common/d2s_full_table.h
#input: code directory that contains c/c++/java source code #output: static code profile: classification of statements based on their operators and the data types of the variables import os, fnmatch, sys, string, xml.dom.minidom def Arithmetic(expr, xmldoc): itemlist = xmldoc.getElementsByTagName(expr) # the ...
unknown
codeparrot/codeparrot-clean
from django import template from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.db import models, transaction from django.forms.models import modelform_factory from django.http import Http404, HttpResponse from django.utils.encoding import force_unicode, smart_unicode from django.utils.h...
unknown
codeparrot/codeparrot-clean
import unittest import time import threading from pywin32_testutil import str2bytes # py3k-friendly helper import win32pipe import win32file import win32event import pywintypes import winerror import win32con class PipeTests(unittest.TestCase): pipename = "\\\\.\\pipe\\python_test_pipe" def _serverThread(sel...
unknown
codeparrot/codeparrot-clean
declare module '*.css' { const content: string export default content }
typescript
github
https://github.com/tailwindlabs/tailwindcss
packages/@tailwindcss-browser/src/types.d.ts
import { type RouteConfig } from "@react-router/dev/routes"; import { flatRoutes } from "@react-router/fs-routes"; export default flatRoutes() satisfies RouteConfig;
typescript
github
https://github.com/remix-run/react-router
integration/helpers/cloudflare-dev-proxy-template/app/routes.ts
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build wasip1 || js package net import "os/exec" func installTestHooks() {} func uninstallTestHooks() {} func forceCloseSockets() {} func addCmdInheri...
go
github
https://github.com/golang/go
src/net/main_wasm_test.go
import chainer from chainercv.links import Conv2DBNActiv from chainercv.links.model.yolo.yolo_v2 import _leaky_relu from chainercv.links.model.yolo.yolo_v2 import _maxpool from chainercv.links.model.yolo import YOLOv2Base class DarknetExtractor(chainer.ChainList): """A Darknet based feature extractor for YOLOv2T...
unknown
codeparrot/codeparrot-clean
import unittest from test import support class Empty: def __repr__(self): return '<Empty>' class Cmp: def __init__(self,arg): self.arg = arg def __repr__(self): return '<Cmp %s>' % self.arg def __eq__(self, other): return self.arg == other class Anything: def __e...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # This code has been adapted from PyBrain. See http://pybrain.org. # # Copyright (c) 2009, PyBrain-Developers # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Red...
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 use thi...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """ isshub Github issues client Using python with qt4 author: Pablo Alejandro Seibelt website: www.sicarul.com.ar """ #Username - case sensitive, a-z A-Z 0-9 - (dash), cannot begin with dash #Reponame - case sensitive, a-z A-Z 0-9 - (dash) import sys from PySide import QtGu...
unknown
codeparrot/codeparrot-clean
#![feature(str_split_remainder)] #![feature(impl_trait_in_assoc_type)] #![feature(arbitrary_self_types)] #![feature(arbitrary_self_types_pointers)] #![feature(iter_intersperse)] mod app_page_loader_tree; pub mod app_structure; mod base_loader_tree; mod bootstrap; mod embed_js; mod emit; pub mod hmr_entry; pub mod inst...
rust
github
https://github.com/vercel/next.js
crates/next-core/src/lib.rs
import re import numpy as np import pytest from pandas.core.dtypes import generic as gt import pandas as pd import pandas._testing as tm class TestABCClasses: tuples = [[1, 2, 2], ["red", "blue", "red"]] multi_index = pd.MultiIndex.from_arrays(tuples, names=("number", "color")) datetime_index = pd.to_da...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/dtypes/test_generic.py
data = ( 'Han ', # 0x00 'Xuan ', # 0x01 'Yan ', # 0x02 'Qiu ', # 0x03 'Quan ', # 0x04 'Lang ', # 0x05 'Li ', # 0x06 'Xiu ', # 0x07 'Fu ', # 0x08 'Liu ', # 0x09 'Ye ', # 0x0a 'Xi ', # 0x0b 'Ling ', # 0x0c 'Li ', # 0x0d 'Jin ', # 0x0e 'Lian ', # 0x0f 'Suo ', # 0x10 'Chii...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env bash set -eux ansible-playbook playbook.yml --start-at-task 'task 2' "$@"
unknown
github
https://github.com/ansible/ansible
test/integration/targets/play_iterator/runme.sh
#!/usr/bin/python # Copyright (c)2011-2012 the Boeing Company. # See the LICENSE file included in this distribution. # # author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> # ''' ns3lte.py - This script demonstrates using CORE with the ns-3 LTE model. *** Note that this script is not currently functional, see note...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function import os, sys from nose import with_setup import cPickle as pickle from tacc_stats.pickler import job_pickles from tacc_stats.pickler import job_stats, batch_acct sys.modules['pickler.job_stats'] = job_stats sys.modules['pickler.batch_acct'] = batch_acct path = os.path.dirname(o...
unknown
codeparrot/codeparrot-clean
"""Utility functions, node construction macros, etc.""" # Author: Collin Winter from itertools import islice # Local imports from .pgen2 import token from .pytree import Leaf, Node from .pygram import python_symbols as syms from . import patcomp ########################################################### ### Common ...
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
# ===--- SwiftIntTypes.py ----------------------------*- coding: utf-8 -*-===// # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.t...
unknown
codeparrot/codeparrot-clean
// Copyright 2025 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. package runtime_test import ( "fmt" "internal/testenv" "os" "regexp" "strings" "testing" ) func TestGoroutineLeakProfile(t *testing.T) { // Some tests ...
go
github
https://github.com/golang/go
src/runtime/goroutineleakprofile_test.go
from flask import Flask application = Flask(__name__)
python
github
https://github.com/pallets/flask
tests/test_apps/cliapp/inner1/__init__.py
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- $id: http://devicetree.org/schemas/mfd/nxp,pf1550.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: NXP PF1550 Power Management IC maintainers: - Samuel Kayode <samuel.kayode@savoirfairelinux.com> description: PF1550 PMIC pro...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mfd/nxp,pf1550.yaml
# -*- coding: utf-8 -*- import sys import glob try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import csv import re files_path = sys.argv[1] print 'files_path', files_path files = glob.glob('%s/*.txt' % files_path) import_options = {'separator': ';'} csv.field_size_limi...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 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 # # ...
unknown
codeparrot/codeparrot-clean
import json import re from typing import Any, MutableMapping, Optional, Tuple from zerver.models import SubMessage def get_widget_data(content: str) -> Tuple[Optional[str], Optional[str]]: valid_widget_types = ['tictactoe', 'poll', 'todo'] tokens = content.split(' ') # tokens[0] will always exist if ...
unknown
codeparrot/codeparrot-clean
import numpy as np import pytest from pandas.errors import Pandas4Warning from pandas import ( Categorical, CategoricalDtype, CategoricalIndex, Index, ) import pandas._testing as tm class TestCategoricalIndexConstructors: def test_construction_disallows_scalar(self): msg = "must be called...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/indexes/categorical/test_constructors.py
""" This module gathers tree-based methods, including decision, regression and randomized trees. Single and multi-output problems are both handled. """ # Authors: Gilles Louppe <g.louppe@gmail.com> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # Brian Holt <bdholt1@gmail.com> # Noel Da...
unknown
codeparrot/codeparrot-clean
#========================================================================= # pisa_jr_test.py #========================================================================= import pytest import random import pisa_encoding from pymtl import Bits from PisaSim import PisaSim from pisa_inst_test_utils import * #----------...
unknown
codeparrot/codeparrot-clean
/// <reference lib="es2015.symbol" /> interface SymbolConstructor { /** * A method that determines if a constructor object recognizes an object as one of the * constructor’s instances. Called by the semantics of the instanceof operator. */ readonly hasInstance: unique symbol; /** * A B...
typescript
github
https://github.com/microsoft/TypeScript
src/lib/es2015.symbol.wellknown.d.ts
# encoding: utf-8 import string EOF = -1 class BaseLexer(object): EOF = -1 # No Comments, no brackets, braces, parens, but space SPACE = ' ' UNDERSCORE = '_' punctuation_marks = '#!"$%&\'*+,-./:;<=>?@\\^`|~' whitespace_no_break = '\x0b\x0c\t ' german_letters = 'äöüÄÖÜß' letters = string...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # @lint-avoid-python-3-compatibility-imports # # opensnoop Trace open() syscalls. # For Linux, uses BCC, eBPF. Embedded C. # # USAGE: opensnoop [-h] [-t] [-x] [-p PID] # # Copyright (c) 2015 Brendan Gregg. # Licensed under the Apache License, Version 2.0 (the "License") # # 17-Sep-2015 Bre...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-aop/src/main/java/org/springframework/aop/framework/adapter/AdvisorAdapter.java
<?php namespace Illuminate\Foundation; use Illuminate\Support\HtmlString; use Illuminate\Support\Str; class Mix { /** * Get the path to a versioned Mix file. * * @param string $path * @param string $manifestDirectory * @return \Illuminate\Support\HtmlString|string * * @thro...
php
github
https://github.com/laravel/framework
src/Illuminate/Foundation/Mix.php
# -*- 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 may not u...
unknown
codeparrot/codeparrot-clean
{ "REMOVE": { "summary": "Stops monitoring.", "complexity": "O(1)", "group": "sentinel", "since": "2.8.4", "arity": 3, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "...
json
github
https://github.com/redis/redis
src/commands/sentinel-remove.json
# 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 u...
python
github
https://github.com/apache/airflow
airflow-core/tests/unit/core/test_airflow_module.py
# Fluorescence Analysis import os import cv2 import numpy as np import pandas as pd from plotnine import ggplot, geom_label, aes, geom_line from plantcv.plantcv import print_image from plantcv.plantcv import plot_image from plantcv.plantcv import fatal_error from plantcv.plantcv import params from plantcv.plantcv impo...
unknown
codeparrot/codeparrot-clean
""" .. _tut-sensors-time-freq: ============================================ Frequency and time-frequency sensor analysis ============================================ The objective is to show you how to explore the spectral content of your data (frequency and time-frequency). Here we'll work on Epochs. We will use th...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2004-2009 Bastian Kleineidam # # 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 program is distr...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Unit Tests for `hbase_wraqpper` module. """ from mock import Mock import pytest from HBaseBoard.hbase_wrapper import HBaseWrapper @pytest.fixture(autouse=True) def no_requests(monkeypatch): monkeypatch.setattr("happybase.Connection", Mock()) @pytest.mark.unittes...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2003-2006 Sylvain Thenault (thenault@gmail.com). # Copyright (c) 2003-2011 LOGILAB S.A. (Paris, FRANCE). # 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 L...
unknown
codeparrot/codeparrot-clean
package client import ( "net/http" "testing" cerrdefs "github.com/containerd/errdefs" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) func TestConfigUpdateError(t *testing.T) { client, err := New( WithMockClient(errorMock(http.StatusInternalServerError, "Server error")), ) assert.NilError(t, err...
go
github
https://github.com/moby/moby
client/config_update_test.go
import re import os import base64 try: # Python 3 from urllib.parse import urlencode except (ImportError): # Python 2 from urllib import urlencode from .json_api_client import JSONApiClient from ..downloaders.downloader_exception import DownloaderException # Used to map file extensions to formats _re...
unknown
codeparrot/codeparrot-clean
#------------------------------------------------------------------------- # 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.apac...
unknown
codeparrot/codeparrot-clean
# -*- 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
#!/usr/bin/env python import argparse import sys from yahoo_finance import Share def init_argparse(): parser = argparse.ArgumentParser(description="hl52") parser.add_argument("--symfile", dest="symFile", help="Path to the symbols file to analyze.") return parser.parse_args() def l...
unknown
codeparrot/codeparrot-clean
// Copyright 2016-2019 Cargo-Bundle developers <https://github.com/burtonageo/cargo-bundle> // Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT use super::{app, icon::create_icns_file}; use crate::{ bundle::{settings::Arch, Bund...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri-bundler/src/bundle/macos/dmg/mod.rs
<?php namespace Illuminate\Tests\Container; use Illuminate\Container\RewindableGenerator; use PHPUnit\Framework\TestCase; class RewindableGeneratorTest extends TestCase { public function testCountUsesProvidedValue() { $generator = new RewindableGenerator(function () { yield 'foo'; ...
php
github
https://github.com/laravel/framework
tests/Container/RewindableGeneratorTest.php
import itertools import functools import rlcompleter from textwrap import dedent from unittest import TestCase from unittest.mock import MagicMock from test.support import force_colorized_test_class, force_not_colorized_test_class from .support import handle_all_events, handle_events_narrow_console from .support impor...
python
github
https://github.com/python/cpython
Lib/test/test_pyrepl/test_reader.py
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package database import ( "context" "errors" "fmt" v5 "github.com/hashicorp/vault/sdk/database/dbplugin/v5" "github.com/hashicorp/vault/sdk/framework" "github.com/hashicorp/vault/sdk/helper/automatedrotationutil" "github.com/hashicorp/vaul...
go
github
https://github.com/hashicorp/vault
builtin/logical/database/path_config_connection.go
/* * Copyright (C) 2009 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/src/com/google/common/collect/Cut.java
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AnnotationPointcutTests.java
# -*- coding: utf-8 -*- """ pygments.console ~~~~~~~~~~~~~~~~ Format colored console output. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ esc = "\x1b[" codes = {} codes[""] = "" codes["reset"] = esc + "39;49;00m" codes["bold"] = ...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # # G...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2023 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.netty import io.netty.channel.* import io.netty.channel.epoll.* import io.netty.channel.kqueue.* import io.netty.channel.nio.* import io.netty.channel.socket.* import i...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-netty/jvm/src/io/ktor/server/netty/EventLoopGroupProxy.kt
""" Views for returning XModule JS (used by requirejs) """ import json from django.conf import settings from django.http import HttpResponse from staticfiles.storage import staticfiles_storage from edxmako.shortcuts import render_to_response def get_xmodule_urls(): """ Returns a list of the URLs to hit to grab...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2010-2025 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.symbols import org.jetbrains.kotlin.analysis.api.annotations.Ka...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/symbols/KaFirPropertyGetterSymbol.kt
# # A Python binding for cracklib. # # Parts of this code are based on work Copyright (c) 2003 by Domenico # Andreoli. # # Copyright (c) 2008, 2009 Jan Dittberner <jan@dittberner.info> # # This file is part of cracklib. # # This library is free software; you can redistribute it and/or modify it under # the terms of the...
unknown
codeparrot/codeparrot-clean
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 that it will b...
unknown
codeparrot/codeparrot-clean
import web from functools import wraps from social.utils import setting_name, module_member from social.backends.utils import user_backends_data from social.strategies.utils import get_strategy DEFAULTS = { 'STRATEGY': 'social.strategies.webpy_strategy.WebpyStrategy', 'STORAGE': 'social.apps.webpy_app.models...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2007 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
java
github
https://github.com/google/guava
android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java
/* This is a WebAssembly userland setjmp/longjmp implementation based on Binaryen's Asyncify. Inspired by Alon Zakai's snippet released under the MIT License: * https://github.com/kripken/talks/blob/991fb1e4b6d7e4b0ea6b3e462d5643f11d422771/jmp.c WebAssembly doesn't have context-switching mechanism for now, so emul...
c
github
https://github.com/ruby/ruby
wasm/setjmp.c
from fabric.api import env, sudo, run, cd, local, put, prefix, roles, execute, task from fabric.api import settings as fab_settings from geonodes import GEONODE_INSTANCES as GN def _build_env(target): if target in GN: GNT = GN[target] e = { 'user': GNT['user'], 'hosts': [GN...
unknown
codeparrot/codeparrot-clean
kind: Service apiVersion: v1 metadata: name: the-service spec: selector: deployment: hello type: LoadBalancer ports: - protocol: TCP port: 8666 targetPort: 8080
unknown
github
https://github.com/kubernetes/kubernetes
hack/testdata/kustomize/service.yaml
/* * 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-docker-compose/src/test/java/org/springframework/boot/docker/compose/core/DockerEnvTests.java
__author__ = 'rcj1492' __created__ = '2017.05' __license__ = 'MIT' ''' list services list instances (ec2, heroku) TODO: list images TODO: list containers TODO: list instances on other platforms (gcp, azure, bluemix, rackspace) ''' _list_details = { 'title': 'List', 'description': 'Generates a list of the reso...
unknown
codeparrot/codeparrot-clean
"""Master process which detects hardware and launches controllers.""" import collections import json import logging import multiprocessing import select import shutil import socket import threading import time from pathlib import Path import pyudev import setproctitle from .devices import BOARDS LOGGER = logging.ge...
unknown
codeparrot/codeparrot-clean