code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
## Input ```javascript function getNativeLogFunction(level) { return function () { let str; if (arguments.length === 1 && typeof arguments[0] === 'string') { str = arguments[0]; } else { str = Array.prototype.map .call(arguments, function (arg) { return inspect(arg, { ...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/capture-param-mutate.expect.md
use crate::spec::{ Arch, FramePointer, SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base, }; // See https://developer.android.com/ndk/guides/abis.html#arm64-v8a // for target ABI requirements. pub(crate) fn target() -> Target { Target { llvm_target: "aarch64-linux-android".into...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/aarch64_linux_android.rs
import json import math from dojo.models import Finding class PhpSecurityAuditV2(object): def __init__(self, filename, test): tree = filename.read() try: data = json.loads(str(tree, 'utf-8')) except: data = json.loads(tree) dupes = dict() for filepat...
unknown
codeparrot/codeparrot-clean
import chess import json import time import datetime import random # Bots import random_bot import basic_bot_1_2 class ChessArena(object): def __init__(self, bot1, bot2, seed=None): '''Initialize the chess arena with bot modules bot1 and bot2''' self.arena_start_time = (datetime.datetime.fromtime...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation # # 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/LICEN...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """Util funtions for XBMC server settings.""" from maraschino.tools import using_auth, get_setting_value from maraschino.models import Module, Setting, XbmcServer def server_settings(): """Get settings for active XBMC server instance""" # query all configured XBMC servers from the db ...
unknown
codeparrot/codeparrot-clean
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
import numpy as np import pytest from pandas.errors import IncompatibleFrequency from pandas import ( Index, NaT, Period, PeriodIndex, Series, date_range, offsets, period_range, ) import pandas._testing as tm class TestPeriodIndex: def test_view_asi8(self): idx = PeriodInd...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/indexes/period/test_period.py
import os import sys from django.db.backends.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): # SQLite doesn't actually support most of these types, but it "does the right # thing" given more verbose field definitions, so leave them as is so that # schema inspection is mor...
unknown
codeparrot/codeparrot-clean
# Copyright 2014: 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 b...
unknown
codeparrot/codeparrot-clean
import datetime import textwrap import unittest from email import errors from email import policy from email.message import Message from test.test_email import TestEmailBase, parameterize from email import headerregistry from email.headerregistry import Address, Group DITTO = object() class TestHeaderRegistry(TestEma...
unknown
codeparrot/codeparrot-clean
""" This file will take the csv outputs from server.py, calculate the mean and variance of the warmup_latency, average_latency, throughput and gpu_util and write these to the corresponding `results/output_{batch_size}_{compile}.md` file, appending to the file if it exists or creatng a new one otherwise. """ import arg...
python
github
https://github.com/pytorch/pytorch
benchmarks/inference/process_metrics.py
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecord.java
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * 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 req...
cpp
github
https://github.com/nodejs/node
deps/LIEF/src/DEX/Parser.cpp
#***Before using this example the motor/controller combination must be #***tuned and the settings saved to the Roboclaw using IonMotion. #***The Min and Max Positions must be at least 0 and 50000 import time import roboclaw def displayspeed(): enc1 = roboclaw.ReadEncM1(address) enc2 = roboclaw.ReadEncM2(address) s...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.core.paginator import InvalidPage, Paginator from django.db.models.query import QuerySet from django.http import Http404 from django.utils import six from django.utils.translation import ugettext as _ from djang...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Database\Concerns; use Illuminate\Container\Container; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\MultipleRecordsFoundException; use Illuminate\Database\Query\Expression; use Illuminate\Database\RecordNotFoundException; use Illuminate\Database\RecordsNotFoundException...
php
github
https://github.com/laravel/framework
src/Illuminate/Database/Concerns/BuildsQueries.php
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2012 Pexego Sistemas Informáticos All Rights Reserved # $Marta Vázquez Rodríguez$ <marta@pexego.es> # # This program is free software: you can redistribute it and/or modify # it unde...
unknown
codeparrot/codeparrot-clean
from textwrap import dedent import _pytest._code import pytest import sys from _pytest import python as funcargs from _pytest.pytester import get_public_names from _pytest.python import FixtureLookupError def test_getfuncargnames(): def f(): pass assert not funcargs.getfuncargnames(f) def g(arg): pass ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # 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. """Utilities to get and manipulate symbols from a binary.""" import collections import logging import os import re import subprocess impor...
unknown
codeparrot/codeparrot-clean
from openerp.tests.common import TransactionCase class TestUom(TransactionCase): """Tests for unit of measure conversion""" def setUp(self): super(TestUom, self).setUp() self.product = self.registry('product.product') self.uom = self.registry('product.uom') self.imd = self.regi...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2012 Therp BV (<http://therp.nl>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
unknown
codeparrot/codeparrot-clean
use crate::cursor; use crate::extractor::machine::{Machine, MachineState}; use classification_macros::ClassifyBytes; /// Extracts a string (including the quotes) from the input. /// /// Rules: /// /// - The string must start and end with the same quote character. /// - The string cannot contain any whitespace characte...
rust
github
https://github.com/tailwindlabs/tailwindcss
crates/oxide/src/extractor/string_machine.rs
/* * 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-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestClassConfiguration.java
import conf from base import BaseDbObj class SqliteDbObj(BaseDbObj): def __init__(self): try: import sqlite3 as sqlite except ImportError: from pysqlite2 import dbapi2 as sqlite self.connection = sqlite.connect(self.db_name) self.cursor = self.connection.cur...
unknown
codeparrot/codeparrot-clean
from couchdbkit.exceptions import ResourceNotFound from casexml.apps.case.models import CommCareCase from django.shortcuts import render from django.views.decorators.http import require_GET from corehq.apps.domain.decorators import login_and_domain_required from corehq.apps.reports.dispatcher import QuestionTemplateDis...
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/task/SimpleAsyncTaskSchedulerBuilder.java
# Copyright 2014 Piers Titus van der Torren <pierstitus@gmail.com> # Copyright 2015 Miguel Angel Ajo <miguelangel@ajo.es> # # 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 ...
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 ag...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/profiler/lib/profiler_factory.h
{% extends "admin/login.html" %} {% block content %} Hello from a custom login template {{ block.super }} {% endblock %}
html
github
https://github.com/django/django
tests/templates/custom_admin/login.html
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package terraform import ( "fmt" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/gocty" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/terraform/internal/lang/marks" "github.com/hashicorp/terraform/internal/tfdiags" ) /...
go
github
https://github.com/hashicorp/terraform
internal/terraform/eval_count.go
try: # installed by bootstrap.py import sqla_plugin_base as plugin_base except ImportError: # assume we're a package, use traditional import from . import plugin_base import pytest import argparse import inspect import collections import os try: import xdist # noqa has_xdist = True except Imp...
unknown
codeparrot/codeparrot-clean
from a10sdk.common.A10BaseClass import A10BaseClass class StatefulFirewall(A10BaseClass): """Class Description:: Configure Stateful Firewall direction. Class stateful-firewall supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :...
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.0/RELEASENOTES.0.23.0.md
/* * Memoryview object implementation * -------------------------------- * * This implementation is a complete rewrite contributed by Stefan Krah in * Python 3.3. Substantial credit goes to Antoine Pitrou (who had already * fortified and rewritten the previous implementation) and Nick Coghlan * (who cam...
c
github
https://github.com/python/cpython
Objects/memoryobject.c
//// [tests/cases/compiler/commentInNamespaceDeclarationWithIdentifierPathName.ts] //// //// [commentInNamespaceDeclarationWithIdentifierPathName.ts] namespace hello.hi.world { function foo() {} // TODO, blah } //// [commentInNamespaceDeclarationWithIdentifierPathName.js] "use strict"; var hello; (function (...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/commentInNamespaceDeclarationWithIdentifierPathName.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 n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/requests/FindCoordinatorRequest.java
#!/usr/bin/env python # -*- coding: utf-8 -*- ##Copyright (C) [2003] [Jügen Hamel, D-32584 Löhne] ##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 op...
unknown
codeparrot/codeparrot-clean
function Function1() { return { a: function bug(a) { return 2; }, }; } function Function2() { var bug = 1; return { bug }; }
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/strip-page-exports/getStaticProps/not-mix-up-bindings/output-default.js
#! /usr/bin/env python from numpy.testing import TestCase, assert_equal, assert_almost_equal from aubio import fvec, source from numpy import array from utils import list_all_sounds list_of_sounds = list_all_sounds('sounds') path = None class aubio_source_test_case(TestCase): def setUp(self): if not len...
unknown
codeparrot/codeparrot-clean
""" :mod: DataIntegrityHandler .. module: DataIntegrityHandler :synopsis: DataIntegrityHandler is the implementation of the Data Integrity service in the DISET framework """ from __future__ import absolute_import from __future__ import division from __future__ import print_function # imports import six # from ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of base_user_reset_access, # an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # base_user_reset_access is free software: # you can redistribute it an...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import os import subprocess from .common import FileDownloader from ..utils import ( check_executable, encodeFilename, ) class RtspFD(FileDownloader): def real_download(self, filename, info_dict): url = info_dict['url'] self.report_destination(filen...
unknown
codeparrot/codeparrot-clean
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
unknown
codeparrot/codeparrot-clean
use crate::spec::{ Abi, Arch, Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetMetadata, TargetOptions, }; pub(crate) fn target() -> Target { Target { // The below `data_layout` is explicitly specified by the ilp32e ABI in LLVM. See also // `options.llvm_abiname`. dat...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/targets/riscv32em_unknown_none_elf.rs
# @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2014, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://long.ge # @license GNU General Public License version 2 or later; import os import sys import re import sublime st_version = 2 if sublime.version() == '' or int(sublime.vers...
unknown
codeparrot/codeparrot-clean
import time from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponse from django.test import TestCase, RequestFactory from django.utils import unittest from django.views.generic import View, TemplateView, RedirectView class SimpleView(View): """ A simple view with a docstri...
unknown
codeparrot/codeparrot-clean
""" Filename: join_hist_rcp.py Author: Damien Irving, irving.damien@gmail.com Description: Join an historical and RCP data file """ # Import general Python modules import sys, os, pdb import argparse import numpy import iris from iris.experimental.equalise_cubes import equalise_attributes # Import my mod...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import numpy from numpy import savetxt import matplotlib from matplotlib import pyplot import scipy from scipy import interpolate from matplotlib.ticker import MultipleLocator, FormatStrFormatter s = matplotlib.font_manager.FontProperties() s.set_family('serif') s.set_size(14) from matplotlib import r...
unknown
codeparrot/codeparrot-clean
import { getPreviewPostBySlug } from "../../lib/api"; export default async function preview(req, res) { // Check the secret and next parameters // This secret should only be known to this API route and the CMS if ( req.query.secret !== process.env.TAKESHAPE_PREVIEW_SECRET || !req.query.slug ) { ret...
javascript
github
https://github.com/vercel/next.js
examples/cms-takeshape/pages/api/preview.js
#!/bin/env python # -*- coding: utf-8; -*- # # (c) 2016 FABtotum, http://www.fabtotum.com # # This file is part of FABUI. # # FABUI 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 Licen...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * 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 req...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/PE/ExceptionInfo.hpp
"""General floating point formatting functions. Functions: fix(x, digits_behind) sci(x, digits_behind) Each takes a number or a string and a number of digits as arguments. Parameters: x: number to be formatted; or a string resembling a number digits_behind: number of digits behind the decimal point """ ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-10-05 10:53 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('carnatic', '0001_initial'), ] operations = [ migrations.RemoveField( mode...
unknown
codeparrot/codeparrot-clean
# Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause from itertools import product import numpy as np from sklearn.base import is_classifier from sklearn.metrics import confusion_matrix from sklearn.utils._optional_dependencies import check_matplotlib_support from sklearn.utils._plotting im...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/metrics/_plot/confusion_matrix.py
""" Renaming tests. This means search for usages. I always leave a little bit of space to add room for additions, because the results always contain position informations. """ #< 4 (0,4), (3,0), (5,0) def abc(): pass #< 0 (-3,4), (0,0), (2,0) abc.d.a.bsaasd.abc.d abc abc = #< (-3,0), (0,0) abc Abc = 3 #< 6 (0,6),...
unknown
codeparrot/codeparrot-clean
from django.db import migrations class Migration(migrations.Migration): replaces = [ ("app2", "1_auto"), ("app2", "2_auto"), ] dependencies = [("app1", "1_auto")]
python
github
https://github.com/django/django
tests/migrations/test_migrations_squashed_ref_squashed/app2/1_squashed_2.py
#!/usr/bin/env python # File created on 19 Mar 2011 from __future__ import division __author__ = "Justin Kuczynski" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Justin Kuczynski", "Rob Knight", "Jai Ram Rideout", "Greg Caporaso"] __license__ = "GPL" __version__ = "1.9.1-dev" __mai...
unknown
codeparrot/codeparrot-clean
import numpy as np import pytest from numpy.testing import assert_allclose from sklearn.datasets import make_blobs from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier from sklearn.utils._testing import assert_almost_equal, assert_array_almost_equal from sklearn.utils.cla...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/utils/tests/test_class_weight.py
/* * Copyright 2010-2024 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.project.structure.impl import com.intellij.openapi.project.Project impo...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api-standalone/src/org/jetbrains/kotlin/analysis/project/structure/impl/KotlinStandaloneProjectStructureProvider.kt
#!/usr/bin/env python # # Copyright (c) 2016 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
unknown
codeparrot/codeparrot-clean
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2001 David R. Hampton # Copyright (C) 2001-2006 Donald N. Allingham # Copyright (C) 2007 Brian G. Matherly # Copyright (C) 2010 Jakim Friant # # This program is free software; you can redistribute it and/or modify # it under the terms of ...
unknown
codeparrot/codeparrot-clean
import {bootstrapApplication} from '@angular/platform-browser'; import {CdkDragDropMixedSortingExample} from './app/app'; bootstrapApplication(CdkDragDropMixedSortingExample);
typescript
github
https://github.com/angular/angular
adev/src/content/examples/drag-drop/src/mixed-sorting/main.ts
// DUMP_IR // MODULE: jvmLib // MODULE_KIND: LibraryBinary // FILE: jvmLib.kt package com.example.jvmLib fun Text(text: String) {} // MODULE: commonDep // TARGET_PLATFORM: Common // FILE: commonDep.kt package com.example.commonDep class OtherModule { inline fun getInline() : String { return getPublished...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/testData/components/compilerFacility/compilation/inlineFuncInDependencyOfDependency.kt
# coding=utf-8 """ This collector uses the [ipmitool](http://openipmi.sourceforge.net/) to read hardware sensors from servers using the Intelligent Platform Management Interface (IPMI). IPMI is very common with server hardware but usually not available in consumer hardware. #### Dependencies * [ipmitool](http://ope...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import division, unicode_literals """ This module implements more advanced transformations. """ __author__ = "Shyue Ping Ong, Stephen Dacek" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "1.0" __maintainer__ = "Shyue Ping Ong" __email__ = "shyuep@gmail.com" __d...
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...
json
github
https://github.com/apache/kafka
clients/src/main/resources/common/message/UpdateFeaturesRequest.json
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import io import optparse import os import sys jinja2_path = os.path.normpath(os.path.join(os.path.abspath(__file__), ...
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 !linux package runtime // sbrk0 returns the current process brk, or 0 if not implemented. func sbrk0() uintptr { return 0 }
go
github
https://github.com/golang/go
src/runtime/stubs_nonlinux.go
#ifndef Py_WINREPARSE_H #define Py_WINREPARSE_H #ifdef MS_WINDOWS #include <windows.h> #ifdef __cplusplus extern "C" { #endif /* The following structure was copied from http://msdn.microsoft.com/en-us/library/ff552012.aspx as the required include km\ntifs.h isn't present in the Windows SDK (at least as include...
c
github
https://github.com/python/cpython
Modules/winreparse.h
# py-motmetrics - Metrics for multiple object tracker (MOT) benchmarking. # https://github.com/cheind/py-motmetrics/ # # MIT License # Copyright (c) 2017-2020 Christoph Heindl, Jack Valmadre and others. # See LICENSE file for terms. """Preprocess data for CLEAR_MOT_M.""" from __future__ import absolute_import from __...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2010 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to show the output of the hg annotate command. """ from __future__ import unicode_literals try: str = unicode except NameError: pass import os import re from PyQt5.QtCore impor...
unknown
codeparrot/codeparrot-clean
import sys import socket import threading try: import unittest2 except ImportError: if sys.version_info < (2, 7): raise import unittest as unittest2 import mock from spamc import SpamC from spamc.exceptions import SpamCResponseError, SpamCError from _s import return_tcp class TestSpamCTCP(unitte...
unknown
codeparrot/codeparrot-clean
import numpy as np from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix from pylearn2.models.rbm import RBM from pylearn2.models.s3c import S3C, E_Step, Grad_M_Step from pylearn2.training_algorithms.default import DefaultTrainingAlgorithm from pylearn2.training_algorithms.training_algorithm import NoBat...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2008 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
java
github
https://github.com/google/guava
android/guava-tests/test/com/google/common/collect/ArrayTableRowTest.java
import { test } from '../../test'; export default test({ error: { code: 'constant_assignment', message: 'Cannot assign to constant' } });
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/compiler-errors/samples/legacy-no-const-assignment/_config.js
#!/usr/bin/env python # # Generates % delta activity metrics from graphite/statsd data # from __future__ import print_function from __future__ import absolute_import from __future__ import division import os, sys from six.moves import range sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) import optp...
unknown
codeparrot/codeparrot-clean
#!/bin/sh export MALLOC_CONF="tcache_gc_incr_bytes:2147483648"
unknown
github
https://github.com/redis/redis
deps/jemalloc/test/unit/batch_alloc.sh
import pandas as pd import numpy as np import requests import json import gspread import datetime from time import sleep from oauth2client.service_account import ServiceAccountCredentials #Facebook Login and Parameter Setting via Command Line json_fb_key = json.load(open('./Credentials/fb_api_key.json')) apikey = jso...
unknown
codeparrot/codeparrot-clean
"""Utilities to support packages.""" # NOTE: This module must remain compatible with Python 2.3, as it is shared # by setuptools for distribution with Python 2.3 and up. import os import sys import imp import os.path from types import ModuleType from org.python.core import imp as _imp, BytecodeLoader __all__ = [ ...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Reporter(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) email = models.EmailField()...
unknown
codeparrot/codeparrot-clean
//! The following code was mostly generated using GTP-4 from //! next.js/packages/next/src/shared/lib/router/utils/route-regex.ts use once_cell::sync::Lazy; use regex::Regex; use regress; use rustc_hash::FxHashMap; const INTERCEPTION_ROUTE_MARKERS: [&str; 4] = ["(..)(..)", "(.)", "(..)", "(...)"]; const NEXT_QUERY_PA...
rust
github
https://github.com/vercel/next.js
crates/next-core/src/next_edge/route_regex.rs
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Steve Pletcher <steve@steve-pletcher.com> # (c) 2016, René Moser <mail@renemoser.net> # (c) 2015, Stefan Berggren <nsg@nsg.cc> # (c) 2014, Ramon de la Fuente <ramon@delafuente.nl> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl...
unknown
codeparrot/codeparrot-clean
import itertools import time from math import floor from level import FakeChunk, MCLevel import logging from materials import pocketMaterials import os from mclevelbase import ChunkNotPresent, ChunkMalformed import nbt import numpy import struct from infiniteworld import ChunkedLevelMixin, SessionLockLost, AnvilChunk...
unknown
codeparrot/codeparrot-clean
# Global variables for Atom build process import os import platform import SCons from SConsTwin import * Args = {} Targets = [] CfgFile = '' BuildCfg = '' BuildDir = '' # brief compiling/linking output BuildBrief = 0 Cc = '' Cxx = '' CFlags = '' CxxFlags = '' LdFlags = '' # build tests along with building BuildTes...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
unknown
codeparrot/codeparrot-clean
//===--- SILPrintContext.h - Context for SIL print functions ----*- 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
include/swift/SIL/SILPrintContext.h
/** * Support package for annotation-driven bean configuration. */ @NullMarked package org.springframework.beans.factory.annotation; import org.jspecify.annotations.NullMarked;
java
github
https://github.com/spring-projects/spring-framework
spring-beans/src/main/java/org/springframework/beans/factory/annotation/package-info.java
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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 cop...
unknown
codeparrot/codeparrot-clean
"""In-memory vector store.""" from __future__ import annotations import json import uuid from pathlib import Path from typing import ( TYPE_CHECKING, Any, ) from typing_extensions import override from langchain_core.documents import Document from langchain_core.load import dumpd, load from langchain_core.ve...
python
github
https://github.com/langchain-ai/langchain
libs/core/langchain_core/vectorstores/in_memory.py
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from superde...
unknown
codeparrot/codeparrot-clean
import logging from contextlib import closing, contextmanager from functools import wraps import psycopg2.extras from minerva.util.debug import log_call_basic def connect(): conn = psycopg2.connect( '', connection_factory=psycopg2.extras.LoggingConnection, connect_timeout=3 ) conn.initialize(log...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 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 agreed to in writing, sof...
unknown
codeparrot/codeparrot-clean
"""TestCase subclass for executing the scenarios from a feature""" from six.moves import ( cStringIO as StringIO, ) import csv from importlib import import_module import io import logging import os import re import sys from unittest import ( TestCase, SkipTest, ) from nose2.util import ( exc_info_to_s...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 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
tests/framework/integration/testing.go
import sys from optparse import make_option from django.core.management import get_commands, load_command_class from django.utils.translation import activate as activate_language from django.core.management.base import BaseCommand, CommandError from django.conf import settings try: from haystack.management.comman...
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 # ...
unknown
codeparrot/codeparrot-clean
"""Test system policies.""" from homeassistant.auth.permissions import ( PolicyPermissions, system_policies, POLICY_SCHEMA) def test_admin_policy(): """Test admin policy works.""" # Make sure it's valid POLICY_SCHEMA(system_policies.ADMIN_POLICY) perms = PolicyPermissions(system_policies.ADMIN_POL...
unknown
codeparrot/codeparrot-clean