code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
__author__ = 'mitchell' device_id = "123@rayleigh" devices_data_resp = [ { "bts": [ -2.6026, 51.4546, 1106 ], "tzo": 2, "vsn": "CHANGE_ME", "payment_to": 123, "model": "GSM Control Expert", "last_call": 123, "name": "CHANGE_ME", "id": device_id, "privilege":...
unknown
codeparrot/codeparrot-clean
# ---------------------------------------------------------------------------- # # # # 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 ...
unknown
codeparrot/codeparrot-clean
- Feature Name: Enum Data Types in CockroachDB - Status: accepted - Start Date: 2020-03-31 - Authors: Rohan Yadav, Lucy Zhang, Andrew Werner, Jordan Lewis - RFC PR: #47070 - Cockroach Issue: #24873 # Summary This RFC proposes adding enum types to CockroachDB. # Background Enum types are a class of user defined type...
unknown
github
https://github.com/cockroachdb/cockroach
docs/RFCS/20200331_enums.md
# 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 # d...
unknown
codeparrot/codeparrot-clean
""" Provides unit tests for SSL based authentication portions of the external_auth app. """ import copy import unittest from django.conf import settings from django.contrib.auth import SESSION_KEY from django.contrib.auth.models import AnonymousUser, User from django.contrib.sessions.middleware import SessionMiddlewar...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python3 # Format du output in a tree shape import os, sys, errno def main(): p = os.popen('du ' + ' '.join(sys.argv[1:]), 'r') total, d = None, {} for line in p.readlines(): i = 0 while line[i] in '0123456789': i = i+1 size = eval(line[:i]) while line[i] in ...
unknown
codeparrot/codeparrot-clean
"""Principal Component Analysis.""" # Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause from math import lgamma, log, sqrt from numbers import Integral, Real import numpy as np from scipy import linalg from scipy.sparse import issparse from scipy.sparse.linalg import svds from sklearn.bas...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/decomposition/_pca.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # requests python-pillow import sys import os import pathlib import shutil import mimetypes from PIL import Image as img inf = float('inf') pref = 'Прогресс:' def printProgress(iteration, total, prefix=pref, end=False): print(f'{prefix} {iteration}/{total}', end='\...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 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 dragonfly || freebsd || linux || netbsd || openbsd || solaris package os import "syscall" // Pipe returns a connected pair of Files; reads from r ...
go
github
https://github.com/golang/go
src/os/pipe2_unix.go
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Install...
php
github
https://github.com/composer/composer
src/Composer/Installer/NoopInstaller.php
# 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
""" Use this module to get and run all tk tests. Tkinter tests should live in a package inside the directory where this file lives, like test_tkinter. Extensions also should live in packages following the same rule as above. """ import os import sys import unittest import importlib import test.test_support this_dir_...
unknown
codeparrot/codeparrot-clean
# Test Commands All test commands are denoted with the `.testOnly()` modifier to the `MONGO_REGISTER_COMMAND` invocation. For example: ```c++ MONGO_REGISTER_COMMAND(EchoCommand).testOnly(); ``` ## How to enable To be able to run these commands, the server must be started with the `enableTestCommands=1` server param...
unknown
github
https://github.com/mongodb/mongo
docs/test_commands.md
# Copyright 2011 Google Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge,...
unknown
codeparrot/codeparrot-clean
# 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 by applicable law or a...
unknown
codeparrot/codeparrot-clean
""" ============================================= Gabor filter banks for texture classification ============================================= In this example, we will see how to classify textures based on Gabor filter banks. Frequency and orientation representations of the Gabor filter are similar to those of the huma...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks 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', ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ # Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.cio.backend import io.ktor.network.sockets.* import io.ktor.util.network.* internal val SocketAddress.port: Int? get() = (this as? InetSocketAddress)?.port intern...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-cio/common/src/io/ktor/server/cio/backend/SocketAddressUtils.kt
//===--- GenKeyPath.h - IR generation for KeyPath ---------------*- C++ -*-===// // // 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/L...
c
github
https://github.com/apple/swift
lib/IRGen/GenKeyPath.h
/* * 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
buildSrc/src/main/java/org/springframework/boot/build/autoconfigure/AutoConfigurationPlugin.java
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from django.utils import translation from ...utils import setup class I18nGetLanguageInfoTagTests(SimpleTestCase): libraries = { 'custom': 'template_tests.templatetags.custom', 'i18n': 'django.templatetags.i18n'...
unknown
codeparrot/codeparrot-clean
class TrieNode(object): def __init__(self): """ Initialize your data structure here. """ self.childlist=[0 for _ in xrange(26)] # the node value self.val=None # end flag to determin whether it's prefix self.isend=False class Trie(object): def __i...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 Marco Conti # 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, s...
unknown
codeparrot/codeparrot-clean
#--------------------------------------------------------------------------- # Copyright 2013 The Open Source Electronic Health Record Agent # # 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
# 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 2015 Mirantis 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 appli...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser import sys from django.contrib.auth import authenticate, login, get_backends from django.core.management.base import BaseCommand from django.conf import settings from django_auth_l...
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
configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/record/NestedPropertiesRecord.java
############################################################################## # 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
import os import sys import caffe import shutil import subprocess import numpy as np from random import random class PhotoBomb(object): def __init__(self, train_path, caffe_path, img_size=96): self.train_path = train_path self.img_path = os.path.join(self.train_path, 'images') self.val_img_...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import requests import sys def get_all(): page_num = 1 price_data = '' while True: req = requests.get("http://coinbase.com/api/v1/prices/historical?page="+str(page_num)) if req.status_code == 200: price_data += '\n' + req.text else: pr...
unknown
codeparrot/codeparrot-clean
// @validatePreserveExistingMemoizationGuarantees function Component(props) { const data = useMemo(() => { // actual code is non-optional return props.items.edges.nodes ?? []; // deps are optional }, [props.items?.edges?.nodes]); return <Foo data={data} />; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-optional-member-expression-as-memo-dep-non-optional-in-body.js
# -*- coding: utf-8 -*- import unittest import numpy as np from .. import emspectrum from ...patch.pint import ureg from ...patch import jsonpickle class test_emspectrum(unittest.TestCase): def test_discrete(self): s1 = emspectrum.Discrete(ureg.Quantity([100, 200, 300], "nm"), [1, 1, 1]) s2 = ems...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 wi...
unknown
codeparrot/codeparrot-clean
import os # toolchains options ARCH='ppc' CPU='ppc405' CROSS_TOOL='gcc' TextBase = '0x00000000' PLATFORM = 'gcc' EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' BUILD = 'debug' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') if PLATFORM == 'gcc': # toolchains PREFIX...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='handling of promisor remote advertisement' . ./test-lib.sh if ! test_have_prereq PERL_TEST_HELPERS then skip_all='skipping promisor remote capabilities tests; Perl not available' test_done fi GIT_TEST_MULTI_PACK_INDEX=0 GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL=0 # Setup the reposit...
unknown
github
https://github.com/git/git
t/t5710-promisor-remote-capability.sh
import numpy as np import seaborn as sns from matplotlib import patches import matplotlib.pyplot as plt from scipy.signal import gaussian from scipy.spatial import distance XY_CACHE = {} STATIC_DIR = "_static" plt.rcParams["savefig.dpi"] = 300 def poisson_disc_sample(array_radius, pad_radius, candidates=100, d=2, se...
unknown
codeparrot/codeparrot-clean
{ "XDELEX": { "summary": "Deletes one or multiple entries from the stream.", "complexity": "O(1) for each single item to delete in the stream, regardless of the stream size.", "group": "stream", "since": "8.2.0", "arity": -5, "function": "xdelexCommand", "comm...
json
github
https://github.com/redis/redis
src/commands/xdelex.json
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/common_runtime/propagator_debug_utils.h
# Copyright 2015 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 required by...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/assignmentCompatability16.ts] //// //// [assignmentCompatability16.ts] namespace __test1__ { export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };; export var __val__obj4 = obj4; } namespace _...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/assignmentCompatability16.js
# Embedded file name: /usr/lib/enigma2/python/Components/Converter/RdsInfo.py from enigma import iRdsDecoder, iPlayableService from Components.Converter.Converter import Converter from Components.Element import cached class RdsInfo(Converter, object): RASS_INTERACTIVE_AVAILABLE = 0 RTP_TEXT_CHANGED = 1 RAD...
unknown
codeparrot/codeparrot-clean
#ifndef PSYCH_EMITTER_H #define PSYCH_EMITTER_H #include <psych.h> void Init_psych_emitter(void); #endif
c
github
https://github.com/ruby/ruby
ext/psych/psych_emitter.h
# Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause import warnings import numpy as np from sklearn.base import is_classifier, is_clusterer, is_outlier_detector, is_regressor from sklearn.preprocessing import LabelEncoder from sklearn.utils import _safe_indexing from sklearn.utils._datafra...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/inspection/_plot/decision_boundary.py
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Serial port support for Windows. Requires PySerial and pywin32. """ from __future__ import division, absolute_import # system imports from serial import PARITY_NONE from serial import STOPBITS_ONE from serial import EIGHTBITS import win32fi...
unknown
codeparrot/codeparrot-clean
import os from unittest import TestCase from prospector.profiles.profile import ProspectorProfile class ProfileTestBase(TestCase): def setUp(self): self._profile_path = [ os.path.join(os.path.dirname(__file__), 'profiles'), os.path.join(os.path.dirname(__file__), '../../prospector/...
unknown
codeparrot/codeparrot-clean
import logging from datetime import datetime from modularodm import Q from framework.auth import User from framework.celery_tasks import app as celery_app from framework.transactions.context import TokuTransaction from website.app import init_app from website import mails, settings from scripts.utils import add_fi...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from flask import (Blueprint, request, render_template, flash, url_for, redirect, session) from flask.ext.login import login_required from kraken.grade.models import Grade import json from kraken.helpers.Skynet import Skynet blueprint = Blueprint("grade", __name__, url_pref...
unknown
codeparrot/codeparrot-clean
from flask import url_for from flask_login import current_user from werkzeug.exceptions import Forbidden from werkzeug.exceptions import NotFound from werkzeug.exceptions import Unauthorized from tracker.form.admin import ERROR_EMAIL_EXISTS from tracker.form.admin import ERROR_USERNAME_EXISTS from tracker.form.login i...
unknown
codeparrot/codeparrot-clean
""" Thoroughly document Bokeh property attributes. The ``bokeh-prop`` directive generates useful type information for the property attribute, including cross links to the relevant property types. Additionally, any per-attribute docstrings are also displayed. Usage ----- This directive takes the path to an attribute ...
unknown
codeparrot/codeparrot-clean
from decimal import Decimal from sys import float_info from unittest import TestCase from django.utils.numberformat import format as nformat class TestNumberFormat(TestCase): def test_format_number(self): self.assertEqual(nformat(1234, '.'), '1234') self.assertEqual(nformat(1234.2, '.'), '1234.2'...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/compiler/blockScopedClassDeclarationAcrossFiles.ts] //// //// [c.ts] let foo: typeof C; //// [b.ts] class C { } //// [foo.js] "use strict"; let foo; class C { }
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/blockScopedClassDeclarationAcrossFiles.js
# # Copyright (c) 2006, 2007 Canonical # # Written by Gustavo Niemeyer <gustavo@niemeyer.net> # # This file is part of Storm Object Relational Mapper. # # Storm 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 Found...
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.impl.base.contracts.description.booleans import org.jetbrains.kotli...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-impl-base/src/org/jetbrains/kotlin/analysis/api/impl/base/contracts/description/booleans/KaBaseContractBooleanExpression.kt
from itertools import combinations def sub_lists(my_list): subs = [] for i in range(0, len(my_list)+1): temp = [list(x) for x in combinations(my_list, i)] if len(temp)>0: subs.extend(temp) return subs
unknown
mbpp
from django import forms, http from django.conf import settings from django.test import TestCase from django.template.response import TemplateResponse from django.utils.importlib import import_module from django.contrib.auth.models import User from django.contrib.formtools.wizard.views import (WizardView, ...
unknown
codeparrot/codeparrot-clean
import { jsonToReadableText } from "../helpers.js"; import { TscWatchCompileChange, verifyTscWatch, } from "../helpers/tscWatch.js"; import { File, FileOrFolderOrSymLinkMap, TestServerHost, } from "../helpers/virtualFileSystemWithWatch.js"; describe("unittests:: tscWatch:: emitAndErrorUpdates:: Emi...
typescript
github
https://github.com/microsoft/TypeScript
src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import xml.etree.ElementTree as ET input_list = [] for arg in sys.argv[1:]: input_list.append(arg) if len(input_list) < 1: print 'usage: makedoku.py <class_list.xml>' sys.exit(0) def validate_tag(elem, tag): if elem.tag != tag: print "Tag mismatch, expected...
unknown
codeparrot/codeparrot-clean
# Copyright 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. from telemetry.core import platform from telemetry.core.platform import cros_device from telemetry.core.platform import cros_interface from telemetry.core.pl...
unknown
codeparrot/codeparrot-clean
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
cmd/kubeadm/app/cmd/completion_test.go
#pragma once #include <ATen/core/jit_type_base.h> #include <ATen/core/ivalue.h> namespace c10 { template<class T> decltype(auto) getTypePtr(); std::string toString(const Type& type); template<class T> List<T>::List(c10::intrusive_ptr<c10::detail::ListImpl>&& elements) : impl_(std::move(elements)) {} template<class...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/core/List_inl.h
/*------------------------------------------------------------------------- * * local_source.c * Functions for using a local data directory as the source. * * Portions Copyright (c) 2013-2026, PostgreSQL Global Development Group * *------------------------------------------------------------------------- */ #...
c
github
https://github.com/postgres/postgres
src/bin/pg_rewind/local_source.c
# -*- coding: utf-8 -*- # Run with one of these commands: # > OPENERP_ADDONS_PATH='../../addons/trunk' OPENERP_PORT=8069 \ # OPENERP_DATABASE=yy PYTHONPATH=. python tests/test_ir_sequence.py # > OPENERP_ADDONS_PATH='../../addons/trunk' OPENERP_PORT=8069 \ # OPENERP_DATABASE=yy nosetests tests/test_ir_se...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without...
unknown
codeparrot/codeparrot-clean
/** * 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/TestMultiSchemeAuthenticationHandler.java
import unittest from test import support import io # C implementation. import _pyio as pyio # Python implementation. # Simple test to ensure that optimizations in the IO library deliver the # expected results. For best testing, run this under a debug-build Python too # (to exercise asserts in the C code). lengths =...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** SilentProgress.py --------------------- Date : April 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com *************************...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import sys,argparse,re,os from stanfordnlp.corenlp import * from common.AMRGraph import * from pprint import pprint import cPickle as pickle from Aligner import Aligner from common.SpanGraph import SpanGraph from depparser import CharniakParser,StanfordDepParser,ClearDepParser,TurboDepParser, MateDepP...
unknown
codeparrot/codeparrot-clean
import os import subprocess import urllib import orjson from django.conf import settings from django.http import HttpRequest, HttpResponse from django.shortcuts import redirect, render from django.views.decorators.http import require_safe from confirmation.models import Confirmation, confirmation_url from zerver.lib....
unknown
codeparrot/codeparrot-clean
/* * jdmerge.c * * This file was part of the Independent JPEG Group's software: * Copyright (C) 1994-1996, Thomas G. Lane. * libjpeg-turbo Modifications: * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB * Copyright (C) 2009, 2011, 2014-2015, 2020, 2022, D. R. Commander. * Copyright (C) 2013, Lina...
c
github
https://github.com/opencv/opencv
3rdparty/libjpeg-turbo/src/jdmerge.c
# Q-Learner for Angrybirds, using function approximation # Imanol Arrieta, Bernardo Ramos, Lars Roemheld # Adapted from a homework assignment in Percy Liang's class CS221 at Stanford University import collections import random import math class QLearningAlgorithm(): """ actions: a function (!) that takes a st...
unknown
codeparrot/codeparrot-clean
# See: http://hunterford.me/django-custom-model-manager-chaining/ import models class ArticleManagerMixin(object): def published(self, status=True): if status: return self.filter(status=models.Article.STATUS_PUBLISHED) else: return self.filter(status=models.Article.STATUS_D...
unknown
codeparrot/codeparrot-clean
import re from setuptools import setup, find_packages EXTRAS_REQUIRE = { "yaml": ["PyYAML>=3.10"], "validation": ["prance[osv]>=0.11"], "lint": ["flake8==3.9.2", "flake8-bugbear==21.4.3", "pre-commit~=2.4"], "docs": [ "marshmallow>=3.0.0", "pyyaml==5.4.1", "sphinx==4.0.3", ...
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...
unknown
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/site/markdown/release/0.23.3/RELEASENOTES.0.23.3.md
use std::io::Write; use anyhow::{Result, bail}; use turbo_rcstr::{RcStr, rcstr}; use turbo_tasks::{ResolvedVc, TryJoinIterExt, Vc, fxindexmap}; use turbo_tasks_fs::{ self, File, FileContent, FileSystemPath, FileSystemPathOption, rope::RopeBuilder, }; use turbopack_core::{ asset::{Asset, AssetContent}, chun...
rust
github
https://github.com/vercel/next.js
crates/next-core/src/page_loader.rs
# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. # # This file is part of kiwi. # # kiwi 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 la...
unknown
codeparrot/codeparrot-clean
import sys import os.path import importlib from inspect import getmembers, isclass from collections import defaultdict from optparse import make_option from django.utils import timezone from django.contrib.contenttypes.models import ContentType from django.conf import settings from django.db.models.base import ModelBa...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package depsfile import ( "github.com/google/go-cmp/cmp" ) // ProviderLockComparer is an option for github.com/google/go-cmp/cmp that // specifies how to compare values of type depsfile.ProviderLock. // // Use this, rather than crafting compariso...
go
github
https://github.com/hashicorp/terraform
internal/depsfile/testing.go
from __future__ import unicode_literals from django.contrib import admin from django.contrib.auth.models import User as AuthUser from django.contrib.contenttypes.models import ContentType from django.core import checks, management from django.db import DEFAULT_DB_ALIAS, models from django.db.models import signals from...
unknown
codeparrot/codeparrot-clean
"""Exceptions used throughout package""" class PipError(Exception): """Base pip exception""" class InstallationError(PipError): """General exception during installation""" class UninstallationError(PipError): """General exception during uninstallation""" class DistributionNotFound(InstallationError): ...
unknown
codeparrot/codeparrot-clean
"""Random variable generators. integers -------- uniform within range sequences --------- pick random element pick random sample generate random permutation distributions on the real line: ------------------------------ uniform ...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 NEC Corporation # 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
import types from Globals import * from AccessControl import ClassSecurityInfo from AccessControl import Permissions from Products.ZenModel.ZenossSecurity import * from Products.ZenModel.Organizer import Organizer from Products.ZenRelations.RelSchema import * from Products.ZenUtils.Search import makeCaseInsensitiveKeyw...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
unknown
codeparrot/codeparrot-clean
""" This config file extends the test environment configuration so that we can run the lettuce acceptance tests. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import from .test import * f...
unknown
codeparrot/codeparrot-clean
import django_comment_common.models as models from django.test import TestCase from django.test.utils import override_settings from courseware.tests.modulestore_config import TEST_DATA_MIXED_MODULESTORE from opaque_keys.edx.locations import SlashSeparatedCourseKey @override_settings(MODULESTORE=TEST_DATA_MIXED_MODULE...
unknown
codeparrot/codeparrot-clean
{ "compilerOptions": { // type checking "strict": true, "noFallthroughCasesInSwitch": true, "skipLibCheck": true, // interop constraints "allowSyntheticDefaultImports": true, "esModuleInterop": true, // js support "allowJs": true, "checkJs": false, // environment "jsx":...
json
github
https://github.com/vercel/next.js
crates/next-core/js/tsconfig.json
############################################################################### ## ## Copyright (C) 2011-2014 Tavendo GmbH ## ## 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 ## ## h...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/mfd/rohm,bd9571mwv.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: ROHM BD9571MWV/BD9574MWF Power Management Integrated Circuit (PMIC) maintainers: - Marek Vasut <marek.vasut@gmail.com> pr...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/mfd/rohm,bd9571mwv.yaml
# Note: initially copied from https://github.com/florimondmanca/httpx-sse/blob/master/src/httpx_sse/_decoders.py from __future__ import annotations import json import inspect from types import TracebackType from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, AsyncIterator, cast from typing_extensions im...
python
github
https://github.com/openai/openai-python
src/openai/_streaming.py
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import unicode_literals import bisect import io import logging import os import shutil import sys import zipimport from . im...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.rx3 import io.reactivex.rxjava3.core.* import kotlinx.coroutines.* import kotlinx.coroutines.channels.* import kotlinx.coroutines.reactive.* import kotlin.coroutines.* /** * Creates cold [flowable][Flowable] that will run a given [block] in a coroutine. * Every time the returned flowable ...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
reactive/kotlinx-coroutines-rx3/src/RxFlowable.kt
# Copyright 2015 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 page_sets.login_helpers import google_login from telemetry.page import page as page_module from telemetry.page import shared_page_state import os def...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # see http://bugs.python.org/issue8876 # this is just a quick hack so we can test build in vagrant import os if os.environ.get('USER','') == 'vagrant': del os.link from setuptools import setup, find_packages def requirements(): with open('./requirements.txt', 'r') as f: return [l...
unknown
codeparrot/codeparrot-clean
// mkerrors.sh -m32 // Code generated by the command above; DO NOT EDIT. // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m32 _const.go package syscall const ( AF_APPLETALK = 0x10 AF_ARP = 0x23 AF_ATM = 0x1e AF_BLUETO...
go
github
https://github.com/golang/go
src/syscall/zerrors_freebsd_386.go
@import "../../css/type.scss"; .content { display: flex; align-items: center; justify-content: space-around; svg { margin-right: calc(var(--base) / 2); width: var(--base); height: var(--base); } } .label { @extend %label; display: flex; align-items: center; } .button { text-decoration:...
unknown
github
https://github.com/vercel/next.js
examples/cms-payload/components/Button/index.module.scss
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # This module 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 ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ DBSCAN: Density-Based Spatial Clustering of Applications with Noise """ # Author: Robert Layton <robertlayton@gmail.com> # Joel Nothman <joel.nothman@gmail.com> # Lars Buitinck # # License: BSD 3 clause import warnings import numpy as np from scipy import sparse from ..ba...
unknown
codeparrot/codeparrot-clean
{ "variable": { "input": { "type": "string" } }, "resource": { "foo_resource": { "a": { "value": "${var.input}" } }, "bar_resource": { "c": {} } } }
json
github
https://github.com/hashicorp/terraform
internal/configs/testdata/valid-modules/with-tests-json/main.tf.json