code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
""" CMS Video """ import time import os import requests from bok_choy.promise import EmptyPromise, Promise from bok_choy.javascript import wait_for_js, js_defined from ....tests.helpers import YouTubeStubConfig from ...lms.video.video import VideoPage from ...common.utils import wait_for_notification from selenium.webd...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts] //// //// [ambientExternalModuleWithRelativeExternalImportDeclaration.ts] declare module "OuterModule" { import m2 = require("./SubModule"); class SubModule { public static StaticVar: number; public Instan...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.js
# Copyright (C) 2012-2014 The python-bitcoinlib developers # # This file is part of python-bitcoinlib. # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of python-bitcoinlib, including this file, may be copied, modified, # propagated, or dist...
unknown
codeparrot/codeparrot-clean
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
unknown
codeparrot/codeparrot-clean
/* esm.sh - esbuild bundle(clean-stack@4.1.0) es2015 production */ import s from"/v53/os-browserify@0.3.0/es2015/browser.js";import i from"/v53/escape-string-regexp@5.0.0/es2015/escape-string-regexp.js";var p=/\s+at.*[(\s](.*)\)?/,l=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-poly...
javascript
github
https://github.com/webpack/webpack
examples/build-http/webpack.lock.data/https_cdn.esm.sh/v53_clean-stack_4.1.0_es2015_clean-stack_87b32b37ae264a8e8a1c.js
from __future__ import unicode_literals import datetime import os from decimal import Decimal from unittest import skipUnless from django import forms from django.core.exceptions import FieldError, ImproperlyConfigured, NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.va...
unknown
codeparrot/codeparrot-clean
from scipy import weave import numpy as np import cv2 import sys def _thinningIteration(im, iter): I, M = im, np.zeros(im.shape, np.uint8) expr = """ for (int i = 1; i < NI[0]-1; i++) { for (int j = 1; j < NI[1]-1; j++) { int p2 = I2(i-1, j); int p3 = I2(i-1, j+1); int p4 = I2(i, j+1); int p5 = I2(i+1...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( ExtractorError, ) class UdemyIE(InfoExtractor): IE_NAME = 'udemy' _VALID_URL = r'https?://www\.udemy\.com/(?:[^#]+#/lectur...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 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 by applicable law or ag...
unknown
codeparrot/codeparrot-clean
import logging import os import types from io import BytesIO, IOBase import pickle import string from collections import defaultdict import archinfo from archinfo.arch_soot import SootAddressDescriptor, ArchSoot import cle from .misc.ux import deprecated l = logging.getLogger(name=__name__) def load_shellcode(shell...
unknown
codeparrot/codeparrot-clean
<!DOCTYPE html> <html lang="en"> <head> <title>Options Structure Reference</title> <link rel="stylesheet" type="text/css" href="../../css/jazzy.css" /> <link rel="stylesheet" type="text/css" href="../../css/highlight.css" /> <meta charset="utf-8"> <script src="../../js/jquery.min.js" defer></scrip...
html
github
https://github.com/Alamofire/Alamofire
docs/Classes/RevocationTrustEvaluator/Options.html
#!/usr/bin/python3 """ Planbot's Facebook application. Handles requests and responses through the Facebook Graph API. Converts location data to postcode with Postcodes.io API. """ import os import logging import requests from bottle import Bottle, request, debug from engine import Engine # set environmental variabl...
unknown
codeparrot/codeparrot-clean
""" Mr Nilsson's methods to install and configure libvirt/KVM based virtualisation onto a RHEL-flavoured (e.g. CentOS) hardware node. """ """ Copyright 2012 Nils Toedtmann <http://nils.toedtmann.net/> This file is part of Mr. Nilsson's Little System Monkeys: <https://github.com/MrNilsson/mrnilssons-system-monkey...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # encoding: utf-8 """ generate DSDLC headers for uavcan """ from waflib import Logs, Task, Utils, Node from waflib.TaskGen import feature, before_method, extension import os import os.path from xml.etree import ElementTree as et class uavcangen(Task.Task): """generate uavcan header files"""...
unknown
codeparrot/codeparrot-clean
# Coded using: # http://www.binarytides.com/python-packet-sniffer-code-linux/ # https://github.com/GoozeyX/python_lldp import struct import socket import binascii import fcntl try: import ctypes class ifreq(ctypes.Structure): _fields_ = [("ifr_ifrn", ctypes.c_char * 16), ("ifr_flag...
unknown
codeparrot/codeparrot-clean
- markdown: | ## Attention! native_functions.yaml was changed If you are adding a new function or defaulted argument to native_functions.yaml, you cannot use it from pre-existing Python frontend code until our FC window passes (two weeks). Split your PR into two PRs, one which adds the new C++ functionality, a...
unknown
github
https://github.com/pytorch/pytorch
.github/nitpicks.yml
/* * Copyright (C) 2016 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/graph/UndirectedNetworkConnections.java
from __future__ import absolute_import import sys from collections import Iterable, Mapping from kombu.five import string_t __all__ = ['lazy', 'maybe_evaluate', 'is_list', 'maybe_list'] class lazy(object): """Holds lazy evaluation. Evaluated when called or if the :meth:`evaluate` method is called. The...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os from calibre.customize.conversion import InputFormatPlugin, OptionRecomme...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from setuptools import setup, find_packages import os, re PKG='oauth2' VERSIONFILE = os.path.join('oauth2', '_version.py') verstr = "unknown" try: verstrline = open(VERSIONFILE, "rt").read() except EnvironmentError: pass # Okay, there is no version file. else: MVSRE = r"^manual_verstr...
unknown
codeparrot/codeparrot-clean
import functools from pathlib import Path from django.conf import settings from django.template.backends.django import DjangoTemplates from django.template.loader import get_template from django.utils.functional import cached_property from django.utils.module_loading import import_string @functools.lru_cache def get_...
python
github
https://github.com/django/django
django/forms/renderers.py
# uen.py - functions for handling Singapore UEN numbers # coding: utf-8 # # Copyright (C) 2020 Leandro Regueiro # Copyright (C) 2020 Arthur de Jong # # This library 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 F...
unknown
codeparrot/codeparrot-clean
/* Copyright 2018 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/core/grappler/graph_analyzer/sig_node.h
/*! * @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 {TestBed} from '@angular/core/testing'; import {TerminalHandler} from './terminal-handler.service'; import {W...
typescript
github
https://github.com/angular/angular
adev/src/app/editor/terminal/terminal-handler.service.spec.ts
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package http import ( "bytes" "crypto/md5" "encoding/base64" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/url" "github.com/hashicorp/go-retryablehttp" "github.com/hashicorp/terraform/internal/states/remote" "github.com/hashic...
go
github
https://github.com/hashicorp/terraform
internal/backend/remote-state/http/client.go
""" Django settings for dihts project. Generated by 'django-admin startproject' using Django 1.9.7. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os # B...
unknown
codeparrot/codeparrot-clean
from test.support import TESTFN import unittest from test import audiotests from audioop import byteswap import sys import wave class WaveTest(audiotests.AudioWriteTests, audiotests.AudioTestsWithSourceFile): module = wave class WavePCM8Test(WaveTest, unittest.TestCase): sndfilename = 'pluck-pc...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.db import models from django.core.urlresolvers import reverse Q = models.Q class Castle(models.Model): TYPE = ( (0, '?'), (1, 'Hauptburg'), (2, '?'), # Raubritter (3, 'Hauptstadt'), # Hauptstadt (4, 'Aussenposten'), ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2016 Red Hat, 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 require...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'G:i' DATET...
unknown
codeparrot/codeparrot-clean
# Time: O(1) # Space: O(1) # A binary watch has 4 LEDs on the top which represent the hours (0-11), # and the 6 LEDs on the bottom represent the minutes (0-59). # # Each LED represents a zero or one, with the least significant bit on the right. # # For example, the above binary watch reads "3:25". # # Given a non-neg...
unknown
codeparrot/codeparrot-clean
### # Copyright (c) 2002-2004, Jeremiah Fincher # Copyright (c) 2008, James Vega # 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 copyri...
unknown
codeparrot/codeparrot-clean
""" This module houses ctypes interfaces for GDAL objects. The following GDAL objects are supported: CoordTransform: Used for coordinate transformations from one spatial reference system to another. Driver: Wraps an OGR data source driver. DataSource: Wrapper for the OGR data source object, supports OGR-su...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/binaryArithmatic3.ts] //// //// [binaryArithmatic3.ts] var v = undefined | undefined; //// [binaryArithmatic3.js] "use strict"; var v = undefined | undefined;
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/binaryArithmatic3.js
#!/usr/bin/env python3 from pathlib import Path from unittest import main, SkipTest, TestCase from gitutils import ( _shasum, are_ghstack_branches_in_sync, GitRepo, patterns_to_regex, PeekableIterator, retries_decorator, ) BASE_DIR = Path(__file__).parent class TestPeekableIterator(TestCase):...
python
github
https://github.com/pytorch/pytorch
.github/scripts/test_gitutils.py
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import signal import subprocess import sys import tempfile from telemetry.core import exceptions from telemetry.core import util from telemetry.core.pla...
unknown
codeparrot/codeparrot-clean
"""Form views for certificates in web app""" from django.core.exceptions import ObjectDoesNotExist from django.urls import reverse_lazy from django.views.generic.edit import FormView from django_ical.views import ICalFeed from webapp.forms import ( AddClientCertificateForm, AddIntermediateCAForm, AddRootCAForm, A...
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
github
https://github.com/apache/airflow
README.md
{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations \u0026 Alerts", "type": "dashboard" } ] }, "e...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/input/migrated_dev_dashboards/panel-polystat/v1beta1.polystat_test.v42.json
img[alt].svelte-xyz { border: 1px solid green; } /* (unused) img[alt=""] { border: 1px solid red; }*/
css
github
https://github.com/sveltejs/svelte
packages/svelte/tests/css/samples/unused-selector-empty-attribute/expected.css
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """ Goes through locale files and gives a breakdown of percentage translated by app for each locale. Requires: * polib For usage help, type:: $ python l10n_completion.py --help """ import json import os import sys import time from optparse import OptionParser import polib USAGE = 'usa...
unknown
codeparrot/codeparrot-clean
from ..Qt import QtGui, QtCore, USE_PYSIDE, USE_PYQT5 import matplotlib if not USE_PYQT5: if USE_PYSIDE: matplotlib.rcParams['backend.qt4']='PySide' from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTA...
unknown
codeparrot/codeparrot-clean
import threading from django.contrib.gis.geos.libgeos import ( CONTEXT_PTR, error_h, lgeos, notice_h, ) class GEOSContextHandle(object): """ Python object representing a GEOS context handle. """ def __init__(self): # Initializing the context handler for this thread with # the notic...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "fileutils" require "abstract_unit" require "mailers/base_mailer" require "mailers/caching_mailer" CACHE_DIR = "test_cache" # Don't change '/../temp/' cavalierly or you might hose something you don't want hosed FILE_STORE_PATH = File.join(__dir__, "/../temp/", CACHE_DIR) class F...
ruby
github
https://github.com/rails/rails
actionmailer/test/caching_test.rb
# -*- coding: utf-8 -*- # (c) 2015 Serv. Tecnol. Avanzados - Pedro M. Baeza # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp.tests.common import TransactionCase class TestQualityControlSample(TransactionCase): def setUp(self): super(TestQualityControlSample, self).setUp() ...
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
# frozen_string_literal: true module ActiveRecord module ConnectionAdapters module PostgreSQL module OID # :nodoc: class Timestamp < DateTime # :nodoc: def type real_type_unless_aliased(:timestamp) end end end end end end
ruby
github
https://github.com/rails/rails
activerecord/lib/active_record/connection_adapters/postgresql/oid/timestamp.rb
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
unknown
codeparrot/codeparrot-clean
import pytest def create_dummy_request(method): from collections import namedtuple return namedtuple('Request', ['method'])(method) class TestViewConfig(object): def target(self): from uiro.view import view_config return view_config def makeone(self, view_callable): return sel...
unknown
codeparrot/codeparrot-clean
export let currentTick = 0; export const report = name => { entries.push(`${name} ${currentTick}`); }; export let entries = []; let running = false; export const start = async () => { entries = []; running = true; currentTick = 0; while (running) { await 0; currentTick++; } }; export const stop = () => { run...
javascript
github
https://github.com/webpack/webpack
test/cases/async-modules/micro-ticks-parents/tick.js
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cint, flt from webnotes.model import db_exists from webnotes.model.doc import Document from webnotes.model.bean import get...
unknown
codeparrot/codeparrot-clean
# Copyright 2019 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. from __future__ import print_function from __future__ import division from __future__ import absolute_import import json import unittest from dashboard.api...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/allowSyntheticDefaultImports9.ts] //// //// [b.d.ts] export function foo(); export function bar(); //// [a.ts] import { default as Foo } from "./b"; Foo.bar(); Foo.foo(); //// [a.js] "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && ...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/allowSyntheticDefaultImports9.js
"""Tests of comprehensive theming.""" from django.conf import settings from django.contrib import staticfiles from django.test import TestCase from path import path # pylint: disable=no-name-in-module import edxmako from openedx.core.djangoapps.theming.tests.test_util import with_comprehensive_theme from openedx.cor...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0-only #include <linux/slab.h> #include <linux/stat.h> #include <linux/sched/xacct.h> #include <linux/fcntl.h> #include <linux/file.h> #include <linux/uio.h> #include <linux/fsnotify.h> #include <linux/security.h> #include <linux/export.h> #include <linux/syscalls.h> #include <linux/pa...
c
github
https://github.com/torvalds/linux
fs/remap_range.c
import parseHeaders from '../../../lib/helpers/parseHeaders'; describe('helpers::parseHeaders', function () { it('should parse headers', function () { const date = new Date(); const parsed = parseHeaders( 'Date: ' + date.toISOString() + '\n' + 'Content-Type: application/json\n' + 'Connectio...
javascript
github
https://github.com/axios/axios
test/specs/helpers/parseHeaders.spec.js
# -*- coding: utf-8 -*- # Natural Language Toolkit: Twitter client # # Copyright (C) 2001-2016 NLTK Project # Author: Ewan Klein <ewan@inf.ed.ac.uk> # Lorenzo Rubio <lrnzcig@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Authentication utilities to accompany :module:`twitte...
unknown
codeparrot/codeparrot-clean
import liblo import time from liblo import make_method target = liblo.Address(12002) class SerialOsc(liblo.Server): def __init__(self, *args, **kwargs): liblo.Server.__init__(self, *args, **kwargs) self.devices = [] @make_method('/serialosc/device', 'ssi') def list_device(self, path, args...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class TinyPicIE(InfoExtractor): IE_NAME = 'tinypic' IE_DESC = 'tinypic.com videos' _VALID_URL = r'http://(?:.+?\.)?tinypic\.com/player\.php\?v=(?P<id>[^&]+)&s=\d+' _TESTS = [ ...
unknown
codeparrot/codeparrot-clean
use serde_derive::Deserialize; #[derive(Deserialize)] #[serde(transparent)] struct S { #[serde(skip)] a: u8, #[serde(default)] b: u8, } fn main() {}
rust
github
https://github.com/serde-rs/serde
test_suite/tests/ui/transparent/de_at_least_one.rs
// @enableAssumeHooksFollowRulesOfReact true function Component(props) { const x = {}; // In enableAssumeHooksFollowRulesOfReact mode hooks freeze their inputs and return frozen values const y = useFoo(x); // Thus both x and y are frozen here, and x can be independently memoized bar(x, y); return [x, y]; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/immutable-hooks.js
// Copyright The Prometheus 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 w...
go
github
https://github.com/prometheus/prometheus
model/rulefmt/rulefmt.go
class HelloState(object): def __init__(self): self.calls = [] def sayHello(self, int_value=None, string_value=None): print(int_value, string_value) self.calls.append((int_value, string_value)) return "Said hello to {0}".format(string_value) class Java: implements = ...
unknown
codeparrot/codeparrot-clean
/* * AltiVec optimizations for libjpeg-turbo * * Copyright (C) 2014-2015, 2024, D. R. Commander. All Rights Reserved. * Copyright (C) 2014, Jay Foad. All Rights Reserved. * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damag...
c
github
https://github.com/opencv/opencv
3rdparty/libjpeg-turbo/simd/powerpc/jccolext-altivec.c
/** * 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 * distribute...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/LdapConstants.java
import unittest from uspto_tools.fetch.tests import GOOD_PAIR from uspto_tools.fetch import patft from uspto_tools.parse import patft_html class TestParse(unittest.TestCase): def setUp(self): self.soup = patft.fetch_with_patent_id_and_family_id(*GOOD_PAIR) def test_parse_abstract(self): abs...
unknown
codeparrot/codeparrot-clean
import time import loadmaker from dtest import Tester class TestLoadmaker(Tester): def loadmaker_test(self): cluster = self.cluster cluster.populate(1).start() node1 = cluster.nodelist()[0] time.sleep(.2) host, port = node1.network_interfaces['thrift'] lm = loadm...
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\JsonStreamer; use Symfony\Component\TypeInfo\Type; /...
php
github
https://github.com/symfony/symfony
src/Symfony/Component/JsonStreamer/StreamReaderInterface.php
#ifndef SRC_NODE_LOCKS_H_ #define SRC_NODE_LOCKS_H_ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include <deque> #include <string> #include <unordered_map> #include <unordered_set> #include "base_object.h" #include "env.h" #include "node_mutex.h" #include "v8.h" namespace node::worker::locks { class Lo...
c
github
https://github.com/nodejs/node
src/node_locks.h
- vars: venv_cmd: "{{ ansible_python_interpreter ~ ' -m venv' }}" venv_dest: "{{ galaxy_dir }}/test_resolvelib_{{ resolvelib_version }}" block: - name: install another version of resolvelib that is unsupported by ansible-galaxy pip: name: resolvelib version: "{{ resolvelib_version }}...
unknown
github
https://github.com/ansible/ansible
test/integration/targets/ansible-galaxy-collection/tasks/unsupported_resolvelib.yml
#!C:\Python27\python # specify any options necessary when building installers nsis_options = '' # if makensis.exe is not in your PATH, specify explicit pathname here nsis = 'c:\Program Files\NSIS\makensis.exe' # name used for temporary file that contains branded splash screen BRANDED_JPG = 'splashb.jpg' VCREDIST = '...
unknown
codeparrot/codeparrot-clean
#define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE #include <numpy/ndarraytypes.h> NPY_NO_EXPORT PyObject * array_device(PyObject *NPY_UNUSED(self), void *NPY_UNUSED(ignored)) { return PyUnicode_FromString("cpu"); } NPY_NO_EXPORT PyObject * array_to_device(PyObject *self, PyObject *args, PyO...
c
github
https://github.com/numpy/numpy
numpy/_core/src/multiarray/array_api_standard.c
<div class="svelte-xyz foo:bar">Hello world</div>
html
github
https://github.com/sveltejs/svelte
packages/svelte/tests/css/samples/directive-special-character/expected.html
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Example** ```esql TS k8s | STATS max_rate=MAX(RATE(network.total_bytes_in)) BY time_bucket = TBUCKET(5minute) ``` | max_rate: double | time_bucket:date | | --- | --- | | 64.5 | 2024-05-10T00:20:00.000...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/examples/rate.md
A unrecognized representation attribute was used. Erroneous code example: ```compile_fail,E0552 #[repr(D)] // error: unrecognized representation hint struct MyStruct { my_field: usize } ``` You can use a `repr` attribute to tell the compiler how you want a struct or enum to be laid out in memory. Make sure you'...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0552.md
#!/usr/bin/env python """ sage_server.py -- unencrypted forking TCP server. Note: I wrote functionality so this can run as root, create accounts on the fly, and serve sage as those accounts. Doing this is horrendous from a security point of view, and I'm definitely not doing this. None of that functionality is actua...
unknown
codeparrot/codeparrot-clean
""" A sparse matrix in COOrdinate or 'triplet' format""" from __future__ import division, print_function, absolute_import __docformat__ = "restructuredtext en" __all__ = ['coo_matrix', 'isspmatrix_coo'] from warnings import warn import numpy as np from scipy._lib.six import zip as izip from ._sparsetools import c...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals, print_function from future import standard_library standard_library.install_aliases() from builtins import next import configparser from mock import patch import responses from bugwarrior.services.trello import TrelloService, TrelloIssue from .base import ConfigTest, ServiceTe...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2006, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
sql/sql_insert.h
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies building a target and a subsidiary dependent target from a .gyp file in a subdirectory, without specifying an explicit output b...
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-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingTests.java
## Input ```javascript // @flow @validatePreserveExistingMemoizationGuarantees @enablePreserveExistingMemoizationGuarantees:false @validateExhaustiveMemoizationDependencies:false import {useFragment} from 'react-relay'; import LogEvent from 'LogEvent'; import {useCallback, useMemo} from 'react'; component Component(i...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-repro-missed-memoization-from-inferred-mutation-in-logger.expect.md
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String Base = declarative_base() class Participant(Base): __tablename__ = 'participations' id = Column(String(32), primary_key=True) team_id = Column(String(41)) match_id = Column(Integer) summoner_id ...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2016 Google, Inc # Written by Simon Glass <sjg@chromium.org> # # Entry-type module for external blobs, not built by U-Boot # import os from binman.etype.blob import Entry_blob from dtoc import fdt_util from patman import tools from patman import tout class Entry_bl...
unknown
codeparrot/codeparrot-clean
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package strconv_test import ( . "strconv" "strings" "testing" "unicode" ) // Verify that our IsPrint agrees with unicode.IsPrint. func TestIsPrint(t *test...
go
github
https://github.com/golang/go
src/strconv/quote_test.go
# -*- coding: utf-8 -*- # 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 require...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='git merge and other operations that rely on merge Testing the influence of the diff algorithm on the merge output.' . ./test-lib.sh test_expect_success 'setup' ' cp "$TEST_DIRECTORY"/t7615/base.c file.c && git add file.c && git commit -m c0 && git tag c0 && cp "$TEST_DIRECTORY"/t761...
unknown
github
https://github.com/git/git
t/t7615-diff-algo-with-mergy-operations.sh
import NIOCore public enum BodyStreamResult: Sendable { /// A normal data chunk. /// There will be 0 or more of these. case buffer(ByteBuffer) /// Indicates an error. /// There will be 0 or 1 of these. 0 if the stream closes cleanly. case error(Error) /// Indicates the stream has completed....
swift
github
https://github.com/vapor/vapor
Sources/Vapor/HTTP/BodyStream.swift
# Copyright 2016 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 ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import json from termcolor import colored def diff(actual, expected, keypath=[], indent=''): tp = type(expected) if tp != type(actual): return [_unequal(keypath, actual, expected, indent)] if tp == list: return _diff_lists(actual, expected, keypath, indent) if...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package clusterversion import ( "fmt" "github.com/cockroachdb/cockroach/pkg/roachpb" ) // Key is a unique identifier for a version of CockroachDB. type Key int // ...
go
github
https://github.com/cockroachdb/cockroach
pkg/clusterversion/cockroach_versions.go
from __future__ import absolute_import, unicode_literals, division, print_function from . import model_base from .dynamicdq import dynamic_mask __all__ = ['FringeModel'] class FringeModel(model_base.DataModel): """ A data model for 2D fringe correction images. Parameters ---------- init : any ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import sys import numpy as np from arthur.imaging import full_calculation, calculate_lag from arthur.io import read_full from arthur.plot import plot_image, plot_lag, plot_chan_power, plot_corr_mat, plot_diff from arthur.constants import NUM_CHAN from matplotlib import pyplot FRQ = 58398437.5 ...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.document_loaders.parsers.txt import TextParser # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling ...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/document_loaders/parsers/txt.py
############################################################################## # 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
# 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
# Crop import os import cv2 import numpy as np from plantcv.plantcv import plot_image from plantcv.plantcv import print_image from plantcv.plantcv import params def crop(img, x, y, h, w): """Crop image. Inputs: img = RGB, grayscale, or hyperspectral image data x = X coordinate ...
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...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/api_fastapi/core_api/services/public/variables.py
/*! * 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/queries/useBulkDeleteConnections.tsx