code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals import sys import six fr...
unknown
codeparrot/codeparrot-clean
use swc_core::{ ecma::{ ast::*, visit::{VisitMut, VisitMutWith}, }, quote, }; enum WrappedExpr { Eval, WasmCompile, WasmInstantiate, } /// Replaces call / expr to dynamic evaluation in the give code to wrapped expression /// (__next_eval__, __next_webassembly_compile__,..) to r...
rust
github
https://github.com/vercel/next.js
crates/next-custom-transforms/src/transforms/middleware_dynamic.rs
/* * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.plugins import io.ktor.client.* import io.ktor.client.request.* import io.ktor.client.statement.* import io.ktor.http.* import io.ktor.http.content.* import io.ktor.uti...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-core/jvm/src/io/ktor/client/plugins/DefaultTransformersJvm.kt
{ "name": "bench-nested-deps", "scripts": { "prepare-bench": "rimraf components && fuzzponent -d 2 -s 206 -o components", "dev-application": "cross-env NEXT_PRIVATE_LOCAL_WEBPACK=1 next dev", "build-application": "cross-env NEXT_PRIVATE_LOCAL_WEBPACK=1 next build", "start": "cross-env NEXT_PRIVATE_L...
json
github
https://github.com/vercel/next.js
bench/nested-deps/package.json
from bitmovin.resources import AbstractIdResource class EncodingStatus(AbstractIdResource): def __init__(self, status, number_of_segments=None, id_=None, messages=None, subtasks=None, created_at=None, queued_at=None, finished_at=None, error_at=None, progress=None): super().__init__(id_=id...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ werkzeug.testsuite.routing ~~~~~~~~~~~~~~~~~~~~~~~~~~ Routing tests. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest from werkzeug.testsuite import WerkzeugTestCase from werkzeug import routing as r from werkzeu...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de> # # 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 = { 'meta...
unknown
codeparrot/codeparrot-clean
# socket example - server side # usage: ruby svr.rb # this server might be blocked by an ill-behaved client. # see tsvr.rb which is safe from client blocking. require "socket" gs = TCPServer.open(0) addr = gs.addr addr.shift printf("server is on %s\n", addr.join(":")) socks = [gs] loop do nsock = select(socks); ...
ruby
github
https://github.com/ruby/ruby
sample/svr.rb
"""Tests of email marketing signal handlers.""" from __future__ import absolute_import import logging import ddt from django.test import TestCase from mock import patch from student.tests.factories import UserFactory from edx_django_utils.cache import TieredCache from openedx.features.enterprise_support.tests.factori...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 IBM Corp. # # 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 agree...
unknown
codeparrot/codeparrot-clean
from django.test import TestCase from .models import SlugPage class RestrictedConditionsTests(TestCase): def setUp(self): slugs = [ 'a', 'a/a', 'a/b', 'a/b/a', 'x', 'x/y/z', ] SlugPage.objects.bulk_create([SlugPage(slu...
unknown
codeparrot/codeparrot-clean
// #docplaster import {Component, signal} from '@angular/core'; @Component({ selector: 'app-leave', templateUrl: 'leave.html', styleUrls: ['leave.css'], }) export class Leave { isShown = signal(false); toggle() { this.isShown.update((isShown) => !isShown); } }
typescript
github
https://github.com/angular/angular
adev/src/content/examples/animations/src/app/enter-and-leave/leave.ts
"""Tests for distutils.command.bdist_wininst.""" import unittest from test.test_support import run_unittest from distutils.command.bdist_wininst import bdist_wininst from distutils.tests import support class BuildWinInstTestCase(support.TempdirManager, support.LoggingSilencer, ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, smuggle_url, ) class MinistryGridIE(InfoExtractor): _VALID_URL = r'https?://www\.ministrygrid.com/([^/?#]*/)*(?P<id>[^/#?]+)/?(?:$|[?#])' _TEST = { 'url': 'http://www.ministrygrid.c...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 Conchylicultor. 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 ...
unknown
codeparrot/codeparrot-clean
/* Copyright (c) 2012, 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/named_pipe.h
/* * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.tests.http import io.ktor.http.* import io.ktor.util.date.* import kotlin.test.* class CookieDateParserTest { @Test fun testHttpGmtFormats() { val eleven = G...
kotlin
github
https://github.com/ktorio/ktor
ktor-http/common/test/io/ktor/tests/http/CookieDateParserTest.kt
#!/usr/bin/env python # Copyright 2015 The Shaderc 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ## ## Biskit, a toolkit for the manipulation of macromolecular structures ## Copyright (C) 2004-2018 Raik Gruenberg & Johan Leckner ## ## 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 Softwar...
unknown
codeparrot/codeparrot-clean
import os from pytest import fixture, yield_fixture from sqlalchemy.engine import create_engine from sqlalchemy.orm import Session from .entities import Base, Music, Tag TEST_DATABASE_URL = os.environ.get('DODOTABLE_TEST_DATABASE_URL', 'sqlite:///dodotable_test.db') @yield_fixture...
unknown
codeparrot/codeparrot-clean
name: Get LLVM Version description: >- Get the LLVM version from the llvm-project source tree. This action assumes the llvm-project sources have already been checked out into GITHUB_WORKSPACE. outputs: major: description: LLVM major version value: ${{ steps.version.outputs.major }} minor: descript...
unknown
github
https://github.com/llvm/llvm-project
.github/workflows/get-llvm-version/action.yml
""" Test for the registration code status information. """ from courseware.tests.factories import InstructorFactory from xmodule.modulestore.tests.factories import CourseFactory from django.utils.translation import ugettext as _ from shoppingcart.models import ( Invoice, CourseRegistrationCodeInvoiceItem, CourseReg...
unknown
codeparrot/codeparrot-clean
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 # # Author: Jorg Bornschein <bornschein@fias.uni-frankfurt.de) # Lincense: Academic Free License (AFL) v3.0 # from __future__ import division import sys sys.path.insert(0, '..') import numpy as np from mpi4py import MPI from matplotlib import use from pulp.utils.parallel import pprint fro...
unknown
codeparrot/codeparrot-clean
#************************************************************************** # Copyright (c) 2018 Werner Mayer <wmayer[at]users.sourceforge.net> * # * # This file is part of the FreeCAD CAx development system. * # ...
unknown
codeparrot/codeparrot-clean
""" This example shows how to use a path patch to draw a bunch of rectangles for an animated histogram """ import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.path as path import matplotlib.animation as animation fig, ax = plt.subplots() # histogram our data with...
unknown
codeparrot/codeparrot-clean
#!/bin/env python """job_thread.py - stdci categories and JobThread object""" from collections import namedtuple STDCI_CATEGORIES = ('stage', 'substage', 'distro', 'arch') class JobThread(namedtuple('_JobThread', STDCI_CATEGORIES + ('options',))): def with_modified( self, stage=None, substage=None, distr...
unknown
codeparrot/codeparrot-clean
#!/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. from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from ...
unknown
codeparrot/codeparrot-clean
from electrum import Wallet from electrum_gui.kivy.i18n import _ from kivy.app import App from kivy.uix.widget import Widget from kivy.core.window import Window from kivy.clock import Clock from kivy.factory import Factory import sys import threading from functools import partial import weakref from create_restore i...
unknown
codeparrot/codeparrot-clean
apiAttachAvailable = u'API\u53ef\u7528' apiAttachNotAvailable = u'\u7121\u6cd5\u4f7f\u7528' apiAttachPendingAuthorization = u'\u7b49\u5f85\u6388\u6b0a' apiAttachRefused = u'\u88ab\u62d2' apiAttachSuccess = u'\u6210\u529f' apiAttachUnknown = u'\u4e0d\u660e' budDeletedFriend = u'\u5df2\u5f9e\u670b\u53cb\u540d\u55ae\u522a...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #coding:utf-8 # Author: mozman # Purpose: package definition file # Created: 08.09.2010 # License: MIT License # Copyright (C) 2010-2014 Manfred Moitzi """ A Python library to create SVG drawings. SVG is a language for describing two-dimensional graphics in XML. SVG allows for three types of g...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python3 import serial, time import subprocess from subprocess import call, Popen from argparse import ArgumentParser import re import unittest import os import sys def do_test(port, baudrate, test_name): databits = serial.EIGHTBITS stopbits = serial.STOPBITS_ONE parity = serial.PARITY_NONE...
unknown
codeparrot/codeparrot-clean
from pandas.core.internals.api import make_block # 2023-09-18 pyarrow uses this from pandas.core.internals.concat import concatenate_managers from pandas.core.internals.managers import ( BlockManager, SingleBlockManager, ) __all__ = [ "Block", # pyright:ignore[reportUnsupportedDunderAll)] "BlockManag...
python
github
https://github.com/pandas-dev/pandas
pandas/core/internals/__init__.py
function f(a) { let x; (() => { x = {}; })(); // this is not reactive on `x` as `x` is never reactive return <div x={x} />; } export const FIXTURE_ENTRYPOINT = { fn: f, params: ['TodoAdd'], isComponent: 'TodoAdd', };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/lambda-mutated-ref-non-reactive.js
# # 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
import collections import datetime import json import os from absl.testing import absltest from absl.testing import parameterized import kubernetes import event_publisher from google.protobuf import duration_pb2 from google.protobuf import timestamp_pb2 from google.protobuf import json_format import metrics_pb2 _STA...
unknown
codeparrot/codeparrot-clean
# test interactions between int, float, Decimal and Fraction import unittest import random import math import sys import operator from decimal import Decimal as D from fractions import Fraction as F # Constants related to the hash implementation; hash(x) is based # on the reduction of x modulo the prime _PyHASH_MOD...
python
github
https://github.com/python/cpython
Lib/test/test_numeric_tower.py
import logging import logging.config class Logger(object): def __init__(self, log_level=logging.DEBUG, stdout_level=logging.INFO, filename='pyAl.log'): """ Init actlearn.logger class :type log_level: int :param log_level: Log level for Log File :type stdout_level: int ...
unknown
codeparrot/codeparrot-clean
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/oncrpc/RegistrationClient.java
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/api_fastapi/core_api/services/ui/dependencies.py
# -*- coding: utf-8 -*- from nose.tools import * # noqa: from osf.models import Node, Registration from framework.auth.core import Auth from osf_tests.factories import ( AuthUserFactory, NodeFactory, ProjectFactory, RegistrationFactory, ) class RegistrationListFilteringMixin(object): def setUp(s...
unknown
codeparrot/codeparrot-clean
from functools import partial import rdflib.plugins.sparql.parser as p from rdflib.plugins.sparql.sparql import QueryContext, SPARQLError, Prologue from rdflib.plugins.sparql.algebra import traverse, translatePName from rdflib.plugins.sparql.operators import simplify from rdflib import Variable, Literal from nose.to...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python """ # Created on Aug 12, 2016 # # @author: Gaurav Rastogi (grastogi@avinetworks.com) GitHub ID: grastogi23 # # module_check: supported # # Copyright: (c) 2016 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # """ ...
unknown
codeparrot/codeparrot-clean
# # epytext.py: epydoc formatted docstring parsing # Edward Loper # # Created [04/10/01 12:00 AM] # $Id: epytext.py,v 1.1 2008/06/01 17:58:03 slefevr Exp $ # """ Parser for epytext strings. Epytext is a lightweight markup whose primary intended application is Python documentation strings. This parser converts Epytex...
unknown
codeparrot/codeparrot-clean
#include <gtest/gtest.h> #include <ATen/core/type_ptr.h> #include <ATen/core/jit_type.h> using c10::SingletonOrSharedTypePtr; namespace { TEST(SingletonOrSharedTypePtr, Empty) { SingletonOrSharedTypePtr<int> empty; EXPECT_TRUE(!empty); EXPECT_EQ(nullptr, empty.get()); EXPECT_EQ(empty, nullptr); std::shared...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/test/type_ptr_test.cpp
#!/usr/bin/env python # graphviz -- Python interface to the GraphViz graphing utility. # # Copyright 2002 by Kevin Quick <quick@null.net>. All rights reserved. import string # # ### ### # ### ### # # ### ### # # ### # # # # # # # # # # # # ## # ...
unknown
codeparrot/codeparrot-clean
@import url('https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined'); @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); :host { display: flex; justify-content: center; font-size: 0.8rem; font-family: 'Press Start 2P'; --retro-button-color: color-mix(in srgb, v...
css
github
https://github.com/angular/angular
adev/src/content/examples/aria/listbox/src/horizontal/retro/app/app.css
# -*- coding: utf-8 -*- # Copyright (C) 2012-2016 Xue Can <xuecan@gmail.com> and contributors. # Licensed under the MIT license: http://opensource.org/licenses/mit-license from ganggu.datastructures import * import pytest def test_object(): obj1 = Object(a=1, b=2) assert obj1.a == 1 and obj1.b == 2, 'somethin...
unknown
codeparrot/codeparrot-clean
#include <ATen/native/vulkan/ops/Common.h> #include <ATen/native/vulkan/ops/Utils.h> #include <torch/library.h> namespace at { namespace native { namespace vulkan { namespace ops { namespace { using namespace api::utils; void set_cumsum_kernel_params( const long long num_dims, const long long dim, const ...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/vulkan/ops/cumsum.cpp
# 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
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html #include "precomp.hpp" #include "opencv2/core/mat.hpp" namespace cv { typedef Vec<int, 5> Vec5i; typedef Vec<int, 7> Vec7i; ...
cpp
github
https://github.com/opencv/opencv
modules/core/src/matrix_wrap.cpp
A type mismatched an associated type of a trait. Erroneous code example: ```compile_fail,E0271 trait Trait { type AssociatedType; } fn foo<T>(t: T) where T: Trait<AssociatedType=u32> { // ~~~~~~~~ ~~~~~~~~~~~~~~~~~~ // | | // This says `foo` can | ...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0271.md
#! /usr/bin/env python import sys, numpy sys.path.append('../../') from tMOPSO_module import CPV_evaluation_manager, get_F_vals_at_specified_OFE_budgets def optAlg(y): ''' y = [CPV_1, OFE_budget, randomSeed] ''' n = numpy.random.randint(5,10) E = numpy.arange(1,n) F = numpy.arange(1,n) return F, E...
unknown
codeparrot/codeparrot-clean
// Code generated by 'go generate'; DO NOT EDIT. package syscall import ( "internal/syscall/windows/sysdll" "unsafe" ) var _ unsafe.Pointer // Do the interface allocations only once for common // Errno values. const ( errnoERROR_IO_PENDING = 997 ) var ( errERROR_IO_PENDING error = Errno(errnoERROR_IO_PENDING) ...
go
github
https://github.com/golang/go
src/syscall/zsyscall_windows.go
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models, connections class Migration(SchemaMigration): def forwards(self, orm): if 'auth_user' in connections['default'].introspection.table_names(): return self.cr...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # This is the MIT License # http://www.opensource.org/licenses/mit-license.php # # Copyright (c) 2008 Nick Galbreath # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software...
unknown
codeparrot/codeparrot-clean
"""Support for X10 lights.""" import logging from subprocess import STDOUT, CalledProcessError, check_output import voluptuous as vol from homeassistant.components.light import ( ATTR_BRIGHTNESS, PLATFORM_SCHEMA, SUPPORT_BRIGHTNESS, LightEntity, ) from homeassistant.const import CONF_DEVICES, CONF_ID,...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0 /* * sparse memory mappings. */ #include <linux/mm.h> #include <linux/slab.h> #include <linux/mmzone.h> #include <linux/memblock.h> #include <linux/compiler.h> #include <linux/highmem.h> #include <linux/export.h> #include <linux/spinlock.h> #include <linux/vmalloc.h> #include <linu...
c
github
https://github.com/torvalds/linux
mm/sparse.c
# CONTRIBUTING The libuv project welcomes new contributors. This document will guide you through the process. ### FORK Fork the project [on GitHub](https://github.com/libuv/libuv) and check out your copy. ``` $ git clone https://github.com/username/libuv.git $ cd libuv $ git remote add upstream https://github.com/l...
unknown
github
https://github.com/nodejs/node
deps/uv/CONTRIBUTING.md
# Copyright (C) 2013 Claudio "nex" Guarnieri (@botherder) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This pro...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ''' parse a MAVLink protocol XML file and generate a python implementation Copyright Andrew Tridgell 2011 Released under GNU GPL version 3 or later ''' import sys, textwrap, os from . import mavparse, mavtemplate t = mavtemplate.MAVTemplate() def generate_preamble(outf, msgs, basename, args, x...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # encoding: utf-8 """ Flat binary file utilities :author: David Hoese (davidh) :contact: david.hoese@ssec.wisc.edu :organization: Space Science and Engineering Center (SSEC) :copyright: Copyright (c) 2013 University of Wisconsin SSEC. All rights reserved. :date: Jan 2013 :li...
unknown
codeparrot/codeparrot-clean
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: https://sickrage.tv # Git: https://github.com/SiCKRAGETV/SickRage.git # # This file is part of SickRage. # # SickRage 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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Copyright 2013 Google Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
unknown
codeparrot/codeparrot-clean
#!/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 multiple rpc user config option rpcauth # from test_framework.test_framework import BitcoinTest...
unknown
codeparrot/codeparrot-clean
"""Test Local Media Source.""" import ast import pytest from homeassistant.components import media_source from homeassistant.components.media_source import const from homeassistant.components.media_source.models import PlayMedia from homeassistant.components.netatmo import DATA_CAMERAS, DATA_EVENTS, DOMAIN from homea...
unknown
codeparrot/codeparrot-clean
import os from "os"; import * as ts from "../typescript/typescript.js"; import { StartInput } from "./common.js"; import { initializeNodeSystem } from "./nodeServer.js"; function findArgumentStringArray(argName: string): readonly string[] { const arg = ts.server.findArgument(argName); if (arg === undefined) { ...
typescript
github
https://github.com/microsoft/TypeScript
src/tsserver/server.ts
import cgi import errno import mimetypes import os import posixpath import re import shutil import stat import sys import tempfile from os import path import django from django.core.management.base import BaseCommand, CommandError from django.core.management.utils import handle_extensions from django.template import C...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import pickle import random wordlength = 3 def process_word(w,g): w=w.lower() for i in range(0,len(w)-(wordlength-1)): chunk=w[i:i+wordlength] if g.has_key(chunk) and g[chunk]: g[chunk]+=1 else: g[chunk]=1 def process_text(filename,g): f=open(filename,"r") for s in f.readlines(): ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2017 Google 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib import urllib2 from sqlalchemy import create_engine, and_ from sqlalchemy.orm import sessionmaker import json import settings import models import re import datetime db_engine = create_engine( settings.DATABASE_DSN, echo=settings.DEBUG ) db = sessio...
unknown
codeparrot/codeparrot-clean
import fixtures import constants from authomatic.providers import oauth1 conf = fixtures.get_configuration('twitter') CONFIG = { 'login_xpath': '//*[@id="username_or_email"]', 'password_xpath': '//*[@id="password"]', 'consent_xpaths': [ '//*[@id="allow"]', ], 'class_': oauth1.Twitter, ...
unknown
codeparrot/codeparrot-clean
/*! * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/tests/e2e/pages/TaskInstancesPage.ts
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be>, Alexander Bulimov <lazywolf0@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 So...
unknown
codeparrot/codeparrot-clean
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_EXCEPTION_FEE5120A6C1211DE94E8BC9155D89593 #define BOOST_EXCEPTION_FEE5120A6C1211DE94...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/exception/errinfo_file_name.hpp
# coding=utf-8 # Copyright 2021 Google 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 # # Unless required by applicable law or agreed ...
unknown
codeparrot/codeparrot-clean
// Test for auth counters in serverStatus. let expectedSuccessLogs; let expectedFailureLogs; function authnSuccessIncrementsServerStatusTotalAuthTime(mongodRunner) { jsTest.log( "============================ authnSuccessIncrementsServerStatusTotalAuthTime ============================", ); const ad...
javascript
github
https://github.com/mongodb/mongo
jstests/auth/auth-metrics.js
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 package mysql import ( "context" "crypto/tls" "crypto/x509" "database/sql" "errors" "fmt" "io/ioutil" "math" "net/url" "os" "sort" "strconv" "strings" "sync" "time" "unicode" metrics "github.com/armon/go-metrics" mysql "github.c...
go
github
https://github.com/hashicorp/vault
physical/mysql/mysql.go
""" Django settings for Web project. Generated by 'django-admin startproject' using Django 1.11.2. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os # ...
unknown
codeparrot/codeparrot-clean
"""Implementation of :class:`ExpressionDomain` class. """ from __future__ import print_function, division from sympy.polys.domains.field import Field from sympy.polys.domains.simpledomain import SimpleDomain from sympy.polys.domains.characteristiczero import CharacteristicZero from sympy.core import sympify, Sympify...
unknown
codeparrot/codeparrot-clean
name: mac-build on: workflow_call: inputs: build-environment: required: true type: string description: Top-level label for what's being built/tested. runner-type: required: true type: string description: Name of the GitHub-managed runner type to use for...
unknown
github
https://github.com/pytorch/pytorch
.github/workflows/_mac-build.yml
# 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
# -*- coding: utf-8 -*- # # Copyright (C) 2015 McKinsey Academy # # Authors: # Jonathan Piacenti <jonathan@opencraft.com> # # This software's license gives you freedom; you can copy, convey, # propagate, redistribute and/or modify this program under the terms of # the GNU Affero General Public License (AGPL) a...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # (c) 2016, NetApp, Inc # # 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) any later version....
unknown
codeparrot/codeparrot-clean
from django_extensions.management.utils import setup_logger, signalcommand from django.core.management.base import BaseCommand, CommandError from optparse import make_option from smtpd import SMTPServer import sys import asyncore from logging import getLogger logger = getLogger(__name__) class ExtensionDebuggingServe...
unknown
codeparrot/codeparrot-clean
// Copyright 2023 The etcd 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 t...
go
github
https://github.com/etcd-io/etcd
server/etcdserver/apply/auth_test.go
const FIXTURE_ID = 'fixture' export const getFixture = () => { let fixtureElement = document.getElementById(FIXTURE_ID) if (!fixtureElement) { fixtureElement = document.createElement('div') fixtureElement.setAttribute('id', FIXTURE_ID) fixtureElement.style.position = 'absolute' fixtureElement.styl...
javascript
github
https://github.com/twbs/bootstrap
js/tests/helpers/fixture.js
# Authors: Mark McLoughlin <markmc@redhat.com> # # Copyright (C) 2007 Red Hat # see file 'COPYING' for use and warranty information # # 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 vers...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ html: '<span class="red">A</span>\n<div><span class="red">B</span></div>' });
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/inline-expressions-subtree/_config.js
#!/usr/bin/python # -*- coding: utf-8 -*- # 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 mymongo import MyMongo from dnsclient import DNSClient import random, time import os, sys import datetime import re dns_username = os.environ['FDNS_UN'] dns_password = os.environ['FDNS_PW'] print dns_username print dns_password mandrill_1 = os.environ['MANDRILL_1'] mandrill_2 = os.environ['MANDRILL_2'] dns = DNSC...
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
/* 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 applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/kernels/data/experimental/parallel_interleave_dataset_op.h
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (c) 2020 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 addr response caching""" import time from test_framework.messages import msg_getaddr from test_framew...
unknown
codeparrot/codeparrot-clean
#!/usr/local/bin/python # Copyright 2015 The Switch Authors. All rights reserved. # Licensed under the Apache License, Version 2, which is in the LICENSE file. """ Illustrate the use of switch to construct and run a very simple production-cost model with a single load zone, one investment period, and four timepoints....
unknown
codeparrot/codeparrot-clean
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot-test/src/test/java/org/springframework/boot/test/context/filter/annotation/FilterAnnotationsTests.java
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 package ldaputil import ( "bytes" "crypto/tls" "crypto/x509" "encoding/binary" "encoding/hex" "fmt" "math" "net" "net/url" "strings" "sync" "text/template" "time" "github.com/go-ldap/ldap/v3" hclog "github.com/hashicorp/go-hclog" m...
go
github
https://github.com/hashicorp/vault
sdk/helper/ldaputil/client.go
NODE_SUBSCRIPTIONS_AVAILABLE = { 'comments': 'Comments added', 'file_updated': 'Files updated' } # Note: if the subscription starts with 'global_', it will be treated like a default # subscription. If no notification type has been assigned, the user subscription # will default to 'email_transactional'. USER_SU...
unknown
codeparrot/codeparrot-clean