code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
from datetime import datetime import sys import numpy as np import pytest from pandas.compat import PYPY import pandas as pd from pandas import ( DataFrame, Index, Series, ) import pandas._testing as tm from pandas.core.accessor import PandasDelegate from pandas.core.base import ( NoNewAttributesMixi...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/base/test_constructors.py
""" stats.py: Simple statistics for PyLink IRC Services. """ import datetime import time from pylinkirc import conf, utils, world from pylinkirc.coremods import permissions from pylinkirc.log import log def timediff(before, now): """ Returns the time difference between "before" and "now" as a formatted string...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who ...
unknown
codeparrot/codeparrot-clean
""" Module for abstract serializer/unserializer base classes. """ from StringIO import StringIO from django.db import models from django.utils.encoding import smart_str, smart_unicode from django.utils import datetime_safe class SerializationError(Exception): """Something bad happened during serialization.""" ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 """Unit tests for rss2irc.py.""" import io import logging import os import sys import time from unittest.mock import patch import pytest import rss2irc # noqa:I202 SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__)) @pytest.mark.parametrize( 'url,msg_attrs,handle,expected', [ ...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package jobs import ( "context" "fmt" "strings" "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" "github.com/cockroachdb/cockroach/pkg/kv" "github.com/cockroac...
go
github
https://github.com/cockroachdb/cockroach
pkg/jobs/utils.go
from __future__ import with_statement import socket import threading from packetstream import JSONDecoder, JSONFileEncoder class _SocketFile(object): def __init__(self, socket): self.socket = socket def read(self, size): try: return self.socket.recv(size) except socket.err...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2022-present MongoDB, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the Server Side Public License, version 1, # as published by MongoDB, Inc. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without e...
python
github
https://github.com/mongodb/mongo
buildscripts/cost_model/config.py
export async function foo() { return 'data'; } export async function bar() { return 'data'; } export async function baz() { return 'data'; } export async function qux() { return 'data'; } export async function quux() { return 'data'; }
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/errors/server-actions/server-graph/28/output.js
""" This module contains the 'base' GEOSGeometry object -- all GEOS Geometries inherit from this object. """ from __future__ import unicode_literals # Python, ctypes and types dependencies. from ctypes import addressof, byref, c_double from django.contrib.gis import memoryview # super-class for mutable list behavio...
unknown
codeparrot/codeparrot-clean
#include "test/jemalloc_test.h" TEST_BEGIN(test_pages_huge) { size_t alloc_size; bool commit; void *pages, *hugepage; alloc_size = HUGEPAGE * 2 - PAGE; commit = true; pages = pages_map(NULL, alloc_size, PAGE, &commit); expect_ptr_not_null(pages, "Unexpected pages_map() error"); if (init_system_thp_mode == th...
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/pages.c
# -*- coding: utf-8 -*- # Django settings for addons-server project. import environ import json import logging import os import socket from datetime import datetime import sentry_sdk from kombu import Queue from sentry_sdk.integrations.celery import CeleryIntegration from sentry_sdk.integrations.django import Django...
unknown
codeparrot/codeparrot-clean
############################################################################## # Copyright (c) 2013-2017, 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 IBM Corp. 2016, 2025 // SPDX-License-Identifier: MPL-2.0 //go:build !enterprise package cacheutil import "errors" type EvictionFunc func(key interface{}, value interface{}) type Cache struct{} func NewCache(_ int, _ EvictionFunc) (*Cache, error) { return nil, errors.New("self-managed static roles on...
go
github
https://github.com/hashicorp/vault
sdk/database/helper/cacheutil/cache_stubs_oss.go
{ "name": "notes", "private": true, "scripts": { "dev": "vite", "build": "tsc && vite build", "serve": "vite preview" }, "dependencies": { "localforage": "^1.10.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.15.0" }, "devDependencies": { "@rollup/pl...
json
github
https://github.com/remix-run/react-router
examples/notes/package.json
# This file is part of versuchung. # # versuchung 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. # # versuchung is distributed in the ...
unknown
codeparrot/codeparrot-clean
from datetime import datetime, date import os import time from django.utils.dateformat import format from django.utils import dateformat, translation, unittest from django.utils.tzinfo import FixedOffset, LocalTimezone class DateFormatTests(unittest.TestCase): def setUp(self): self.old_TZ = os.environ.get...
unknown
codeparrot/codeparrot-clean
from django.test import TestCase, RequestFactory from django.utils import timezone from django.core.urlresolvers import reverse from jdrpoly.utils import AuthenticatedTestCase, randomword from .models import Code from .views import CodeUseForm, CodeUseView, UserUpdateView, SelfProfileView class CodeUseFormTestCase(Te...
unknown
codeparrot/codeparrot-clean
<!DOCTYPE html> <html lang="en"> <head> <title>ParameterEncodingFailureReason Enumeration 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/jqu...
html
github
https://github.com/Alamofire/Alamofire
docs/Enums/AFError/ParameterEncodingFailureReason.html
from core.models import Participant,Score,Tournament,RefereeUserProfile,Match,Round,TournamentRuleset from django.contrib.auth.models import User from guardian.shortcuts import assign_perm import datetime import random one = Participant.objects.create(full_name='Magnus Carlsen', country="NO", elo_rating=2853) one.pict...
unknown
codeparrot/codeparrot-clean
#pragma once #include <string> #include <c10/macros/Export.h> namespace c10 { C10_API void setThreadName(std::string name); C10_API std::string getThreadName(); } // namespace c10
c
github
https://github.com/pytorch/pytorch
c10/util/thread_name.h
# mypy: allow-untyped-defs import re import torch._C as C """ PythonDispatcher class is a thin python-binding to C++ dispatcher and it is designed to show how dispatcher precompute works. In particular, it shows for a certain op `foo`, what the computed dispatch table looks like after user register their kernels to c...
python
github
https://github.com/pytorch/pytorch
torch/_python_dispatcher.py
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Matt Martz <matt@sivel.net>, and others # # 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 t...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Nebula, Inc. # 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...
unknown
codeparrot/codeparrot-clean
from __future__ import print_function, division, absolute_import from collections import defaultdict, deque, OrderedDict from datetime import datetime, timedelta import logging import math from math import log import os import pickle import random import resource import socket from time import time from timeit import ...
unknown
codeparrot/codeparrot-clean
""" Django settings for something project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) ...
unknown
codeparrot/codeparrot-clean
### Import necessary packages from __future__ import absolute_import from __future__ import division from __future__ import print_function from xml.etree import ElementTree as et import cv2, os, sys, shutil, glob, argparse, re, io import numpy as np import tensorflow as tf import PIL, hashlib, logging from PIL import ...
unknown
codeparrot/codeparrot-clean
from collections import defaultdict from django.db import connections, models, transaction from itertools import groupby def query_to_grouped_dict(cursor, groupid='id'): """ Converts a cursor query into a list of dictionaries, grouped together on a key, usually the primary key. This is used primarily w...
unknown
codeparrot/codeparrot-clean
#!/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. """ Test that environment variables are ignored when --ignore-environment is specified. """ import os import TestGyp os.environ['GYP_DEFI...
unknown
codeparrot/codeparrot-clean
{ "kind": "DashboardWithAccessInfo", "apiVersion": "dashboard.grafana.app/v2beta1", "metadata": { "name": "adt885j", "namespace": "default", "uid": "yTWet6JgBjlRIWnqRE9ZOmUycfT0tEkr2mljaln1GWIX", "resourceVersion": "2", "generation": 2, "creationTimestamp": "2025-12-16T10:44:31Z", "labels": ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/input/v2beta1.tab-with-multiple-panels.json
/* Copyright 2017 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/upgrade/upgrade.go
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'File' db.create_table('cmsplugin_file', ( ('cmsplugin_ptr', self.gf('django.db.mo...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # disable missing docstring # pylint: disable=missing-docstring from lettuce import world, step from nose.tools import assert_true # pylint: disable=no-name-in-module from video_editor import RequestHandlerWithSessionId, success_upload_file @step('I (?:upload|replace) handout file(?: by)? "([...
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...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/models/errors.py
# Modules POC This folder contains a POC implementation of a module metrics tracker and enforcement. This documentation includes basic information about modules, and commands which will run the scanner across the entire first-party codebase and merge the results. All commands are assumed to run at the root of the chec...
unknown
github
https://github.com/mongodb/mongo
modules_poc/README.md
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
unknown
codeparrot/codeparrot-clean
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Strelka(CMakePackage): """Somatic and germline small variant caller for mapped sequencing ...
unknown
codeparrot/codeparrot-clean
import types import inspect import re import traceback from jsonrpclib import config iter_types = [ types.DictType, types.ListType, types.TupleType ] string_types = [ types.StringType, types.UnicodeType ] numeric_types = [ types.IntType, types.LongType, types.FloatType ] value_types...
unknown
codeparrot/codeparrot-clean
--- navigation_title: "RENAME" mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-commands.html#esql-rename --- # {{esql}} `RENAME` command [esql-rename] :::{include} ../_snippets/commands/layout/rename.md :::
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/commands/rename.md
""" Tests common to genericpath, macpath, ntpath and posixpath """ import genericpath import os import sys import unittest import warnings from test import support def safe_rmdir(dirname): try: os.rmdir(dirname) except OSError: pass class GenericTest: common_attributes = ['commonprefix', ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Harry Marr http://hmarr.com/ # # 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 # wit...
unknown
codeparrot/codeparrot-clean
"""Functions for builtin CherryPy tools.""" import logging import re import cherrypy from cherrypy._cpcompat import basestring, ntob, md5, set from cherrypy.lib import httputil as _httputil # Conditional HTTP request support # def validate_etags(autotags=False, debug=False): ...
unknown
codeparrot/codeparrot-clean
// DON'T include this except from Binary*.cu files. It should not leak into // headers. #pragma once #define TORCH_ASSERT_NO_OPERATORS #include <ATen/AccumulateType.h> #include <ATen/Dispatch.h> #include <ATen/native/BinaryOps.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/TensorIterator.h> #include <c1...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/cuda/BinaryInternal.h
import time import operator as op import RPi.GPIO as GPIO #Output helper functions def getCode(n): #Generates code for the numbers code = [] if(n==0): code = [1,0,0,0,0] elif(n==1): code = [1,0,0,0,1] elif(n==2): code = [1,0,0,1,0] elif(n==3): code = [1,0,0,1,1] elif(n==4): code = [1,0,1,0,0] elif(n==5...
unknown
codeparrot/codeparrot-clean
// This file was automatically generated from cancellation-and-timeouts.md by Knit tool. Do not edit. package kotlinx.coroutines.guide.exampleCancel02 import kotlinx.coroutines.* fun main() = runBlocking { val startTime = currentTimeMillis() val job = launch(Dispatchers.Default) { var nextPrintTime = ...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/jvm/test/guide/example-cancel-02.kt
""" Tests for the bdist_wheel tag options (--python-tag and --universal) """ import sys import shutil import pytest import py.path import tempfile import subprocess SETUP_PY = """\ from setuptools import setup setup( name="Test", version="1.0", author_email="author@example.com", py_modules=["test"], ...
unknown
codeparrot/codeparrot-clean
from Components.Converter.Converter import Converter from Components.Element import cached, ElementError from Tools.Directories import fileExists, SCOPE_SKIN_IMAGE, SCOPE_CURRENT_SKIN, resolveFilename from Tools.LoadPixmap import LoadPixmap class ValueToPixmap(Converter, object): LANGUAGE_CODE = 0 PATH = 1 def __i...
unknown
codeparrot/codeparrot-clean
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP857.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
unknown
codeparrot/codeparrot-clean
""" This is some of the code behind 'cobbler sync'. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distribute...
unknown
codeparrot/codeparrot-clean
import unittest from test import test_support, test_genericpath from test import test_support as support import posixpath import os import sys from posixpath import realpath, abspath, dirname, basename # An absolute path to a temporary filename for testing. We can't rely on TESTFN # being an absolute path, so we need...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2010, 2011, 2012, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your...
unknown
codeparrot/codeparrot-clean
# Copyright 2024 HuggingFace Inc. team. All rights reserved. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
python
github
https://github.com/huggingface/transformers
src/transformers/models/emu3/configuration_emu3.py
# coding=utf-8 from django.db import models # Create your models here. class Publisher(models.Model): name = models.CharField(max_length=30) address = models.CharField(max_length=50) city = models.CharField(max_length=60) state_province = models.CharField(max_length=30) country = models.Char...
unknown
codeparrot/codeparrot-clean
# -*- coding: windows-1251 -*- # Portions are Copyright (C) 2005 Roman V. Kiseliov # Portions are Copyright (c) 2004 Evgeny Filatov <fufff@users.sourceforge.net> # Portions are Copyright (c) 2002-2004 John McNamara (Perl Spreadsheet::WriteExcel) from BIFFRecords import BiffRecord from struct import pack, unpack d...
unknown
codeparrot/codeparrot-clean
import numpy as np llf = np.array([-240.29558272688]) nobs = np.array([ 202]) k = np.array([ 5]) k_exog = np.array([ 1]) sigma = np.array([ .79494581155191]) chi2 = np.array([ 1213.6019521322]) df_model = np.array([ 3]) k_ar = np.array([ 2]) k...
unknown
codeparrot/codeparrot-clean
#include <c10/util/TypeCast.h> namespace c10 { [[noreturn]] void report_overflow(const char* name) { std::ostringstream oss; oss << "value cannot be converted to type " << name << " without overflow"; throw std::runtime_error(oss.str()); // rather than domain_error (issue 33562) } } // namespace c10
cpp
github
https://github.com/pytorch/pytorch
c10/util/TypeCast.cpp
""" This module provides date summary blocks for the Course Info page. Each block gives information about a particular course-run-specific date which will be displayed to the user. """ from datetime import datetime from babel.dates import format_timedelta from django.core.urlresolvers import reverse from django.utils....
unknown
codeparrot/codeparrot-clean
Something other than a type has been used when one was expected. Erroneous code examples: ```compile_fail,E0573 enum Dragon { Born, } fn oblivion() -> Dragon::Born { // error! Dragon::Born } const HOBBIT: u32 = 2; impl HOBBIT {} // error! enum Wizard { Gandalf, Saruman, } trait Isengard { fn w...
unknown
github
https://github.com/rust-lang/rust
compiler/rustc_error_codes/src/error_codes/E0573.md
from sympy.core.compatibility import range from sympy.ntheory.generate import Sieve, sieve from sympy.ntheory.primetest import (mr, is_lucas_prp, is_square, is_strong_lucas_prp, is_extra_strong_lucas_prp, isprime) from sympy.utilities.pytest import slow @slow def test_prps(): oddcomposites = [n for n in range...
unknown
codeparrot/codeparrot-clean
from __future__ import division, print_function, absolute_import import numpy as np from nose import SkipTest from numpy.testing import assert_array_almost_equal try: from scipy.sparse.csgraph import breadth_first_tree, depth_first_tree, \ csgraph_to_dense, csgraph_from_dense except ImportError: # Old...
unknown
codeparrot/codeparrot-clean
{ "ZDIFF": { "summary": "Returns the difference between multiple sorted sets.", "complexity": "O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.", "group": "sorted_set", "since":...
json
github
https://github.com/redis/redis
src/commands/zdiff.json
<?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\Test\Pa...
php
github
https://github.com/composer/composer
tests/Composer/Test/Package/Version/VersionParserTest.php
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Code to validate and convert settings of the Microsoft build tools. This file contains code to validate and convert settings of the Microsoft build tools. The...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand from zerver.models import Message, Realm, Stream, Recipient import datetime import time class Command(BaseCommand): default_cutoff = time.time() - 60 * 60 * 24 * 30 # 30 days. option_l...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseRedirect from django.core.exceptions import SuspiciousOperation from django.shortcuts import render_to_response from django.utils import simplejson from django.utils.encoding impo...
unknown
codeparrot/codeparrot-clean
// Code generated by "stringer -type Action"; DO NOT EDIT. package plans import "strconv" func _() { // An "invalid array index" compiler error signifies that the constant values have changed. // Re-run the stringer command to generate them again. var x [1]struct{} _ = x[NoOp-0] _ = x[Create-43] _ = x[Read-859...
go
github
https://github.com/hashicorp/terraform
internal/plans/action_string.go
import h5py import numpy as np import tensorflow as tf import math def load_dataset(): train_dataset = h5py.File('datasets/train_signs.h5', "r") train_set_x_orig = np.array(train_dataset["train_set_x"][:]) # your train set features train_set_y_orig = np.array(train_dataset["train_set_y"][:]) # your train s...
unknown
codeparrot/codeparrot-clean
import os import re import warnings from django import http from django.conf import settings from django.contrib.formtools import preview, utils from django.contrib.formtools.wizard import FormWizard from django.test import TestCase from django.test.utils import get_warnings_state, restore_warnings_state from django.u...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/media/qcom,sdm845-venus-v2.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm SDM845 Venus v2 video encode and decode accelerators maintainers: - Stanimir Varbanov <stanimir.varbanov@linar...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml
<?php namespace Illuminate\Routing; use Illuminate\Support\Collection; class SortedMiddleware extends Collection { /** * Create a new Sorted Middleware container. * * @param array $priorityMap * @param \Illuminate\Support\Collection|array $middlewares */ public function __constru...
php
github
https://github.com/laravel/framework
src/Illuminate/Routing/SortedMiddleware.php
/** * \file ecp_internal_alt.h * * \brief Function declarations for alternative implementation of elliptic curve * point arithmetic. */ /* * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ /* * References: * * [1] BERNSTEIN, Daniel J. Curve25519: new Diffie...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/library/ecp_internal_alt.h
import io from jinja2 import Template from bokeh.embed import components from bokeh.models import Range1d from bokeh.plotting import figure from bokeh.resources import INLINE from bokeh.util.browser import view # create some data x1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12] y1 = [0, 8, 2, 4, 6, 9, 5, 6, 25, 28, 4, 7]...
unknown
codeparrot/codeparrot-clean
from django.test import TestCase from .models import Document class FileFieldTests(TestCase): def test_clearable(self): """ FileField.save_form_data() will clear its instance attribute value if passed False. """ d = Document(myfile='something.txt') self.assertEqual...
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/src/main/java/org/springframework/boot/context/config/SystemEnvironmentConfigDataLoader.java
#include "perf_precomp.hpp" namespace opencv_test { using namespace perf; CV_ENUM(ROp, REDUCE_SUM, REDUCE_AVG, REDUCE_MAX, REDUCE_MIN, REDUCE_SUM2) typedef tuple<Size, MatType, ROp> Size_MatType_ROp_t; typedef perf::TestBaseWithParam<Size_MatType_ROp_t> Size_MatType_ROp; PERF_TEST_P(Size_MatType_ROp, reduceR, ...
cpp
github
https://github.com/opencv/opencv
modules/core/perf/perf_reduce.cpp
{ "consumingDags": "Dag Consumatori", "createEvent": { "button": "Creare un Evento", "manual": { "description": "Crea manualmente un Evento Asset", "extra": "Extra dell'Evento Asset", "label": "Manuale" }, "materialize": { "description": "Attiva il Dag upstream di questo asse...
json
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/public/i18n/locales/it/assets.json
# -*- coding: utf-8 -*- # ***************************************************************************** # Copyright (C) 2003-2006 Gary Bishop. # Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu> # # Distributed under the terms of the BSD License. The full license is in # the file COPYI...
unknown
codeparrot/codeparrot-clean
## Input ```javascript import {conditionalInvoke} from 'shared-runtime'; function Component({doReassign1, doReassign2}) { let x = {}; const reassign1 = () => { x = 2; }; const reassign2 = () => { x = 3; }; conditionalInvoke(doReassign1, reassign1); conditionalInvoke(doReassign2, reassign2); re...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/context-variable-reassigned-two-lambdas.expect.md
//! Safe wrappers for coverage-specific FFI functions. use std::ffi::CString; use crate::coverageinfo::ffi; use crate::llvm; pub(crate) fn covmap_var_name() -> CString { CString::new(llvm::build_byte_buffer(|s| { llvm::LLVMRustCoverageWriteCovmapVarNameToString(s); })) .expect("covmap variable na...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_codegen_llvm/src/coverageinfo/llvm_cov.rs
import base64 import json import logging import time import threading import requests # This is designed for OpenHab # TODO: Refactor to work with arbitrary REST Server class OpenHabRestInterface(threading.Thread): prev_state = {} # stores item states update = False def __init__(self, host, port, user, ...
unknown
codeparrot/codeparrot-clean
# Django settings for pennprojects project. from secret import key DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'ora...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Bitcoin base58 encoding and decoding. Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain) ''' import has...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """Unit tests for Beautiful Soup. These tests make sure the Beautiful Soup works as it should. If you find a bug in Beautiful Soup, the best way to express it is as a test case like this that fails.""" import unittest from BeautifulSoup import * class SoupTest(unittest.TestCase): def ass...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0) %YAML 1.2 --- $id: http://devicetree.org/schemas/memory-controllers/nvidia,tegra124-mc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: NVIDIA Tegra124 SoC Memory Controller maintainers: - Jon Hunter <jonathanh@nvidia.com> - Thierry Reding <thierry.reding@gm...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-mc.yaml
import type { Config } from '../../../../tailwindcss/src/compat/plugin-api' import type { DesignSystem } from '../../../../tailwindcss/src/design-system' export function migrateEmptyArbitraryValues( designSystem: DesignSystem, _userConfig: Config | null, rawCandidate: string, ): string { // We can parse the ca...
typescript
github
https://github.com/tailwindlabs/tailwindcss
packages/@tailwindcss-upgrade/src/codemods/template/migrate-handle-empty-arbitrary-values.ts
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView urlpatterns = [ url(r'^$', TemplateView.as_view(templ...
unknown
codeparrot/codeparrot-clean
from JumpScale import j import sys import psutil import importlib import time class Dummy: pass class DummyDaemon: def __init__(self): self.cmdsInterfaces = {} def _adminAuth(self, user, passwd): raise RuntimeError("permission denied") def addCMDsInterface(self, cmdInterfaceClass, ...
unknown
codeparrot/codeparrot-clean
# # Regions # AP_NORTHEAST_1 = 'ap-northeast-1' AP_NORTHEAST_2 = 'ap-northeast-2' AP_SOUTHEAST_1 = 'ap-southeast-1' AP_SOUTHEAST_2 = 'ap-southeast-2' EU_WEST_1 = 'eu-west-1' EU_CENTRAL_1 = 'eu-central-1' SA_EAST_1 = 'sa-east-1' US_EAST_1 = 'us-east-1' US_WEST_1 = 'us-west-1' US_WEST_2 = 'us-west-2' # # Availability Z...
unknown
codeparrot/codeparrot-clean
# -*- coding: iso-8859-1 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Zip Tools # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import base64, re, urllib, string, sys, zipfile, os, os.path import ...
unknown
codeparrot/codeparrot-clean
# # This file is part of Dragonfly. # (c) Copyright 2007, 2008 by Christo Butcher # Licensed under the LGPL. # # Dragonfly is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation, either version 3 of the L...
unknown
codeparrot/codeparrot-clean
# # Copyright 2018 Red Hat | Ansible # # 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
# *************************************************************************** # * * # * Copyright (c) 2016 - Bernd Hahnebach <bernd@bimstatik.org> * # * * # * Th...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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 requir...
unknown
codeparrot/codeparrot-clean
# (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # CAUTION: This implementation of the collection loader is used by ansible-test. # Because of this, it must be compatible with all Python versions supported on the controller or remote. fro...
python
github
https://github.com/ansible/ansible
lib/ansible/utils/collection_loader/_collection_config.py
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/KeystorePasswordTerminal.java
#!/usr/bin/env python # Copyright (c) 2012 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. """CPU, Memory, and FPS performance test for <video>. Calculates decoded fps, dropped fps, CPU, and memory statistics while playin...
unknown
codeparrot/codeparrot-clean
from django.db import ProgrammingError from django.utils.functional import cached_property class BaseDatabaseFeatures: # An optional tuple indicating the minimum supported database version. minimum_database_version = None gis_enabled = False # Oracle can't group by LOB (large object) data types. al...
python
github
https://github.com/django/django
django/db/backends/base/features.py
""" The lookup API This demonstrates features of the database API. """ from __future__ import unicode_literals from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=100) class Me...
unknown
codeparrot/codeparrot-clean
// // Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) // // 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_COBALT_PROMISE_HPP #define BOOST_COBALT_PROMISE_HPP #include <boost/co...
unknown
github
https://github.com/mysql/mysql-server
extra/boost/boost_1_87_0/boost/cobalt/promise.hpp
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ~ Author: Pavel Ivanov from flask import Blueprint from flask_httpauth import HTTPTokenAuth from asterisk.ami import AMIClient, AMIClientAdapter from flask_server import app, jsonrpc from models import asterisk from models.session import Session import jinja2 import ...
unknown
codeparrot/codeparrot-clean