code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017 Orcun Gumus # """A function for calculate the communicability of two nodes of a big big graph""" import networkx import numpy import math import fastremover import time from scipy.sparse import csr_matrix, lil_matrix from bigmultiplier import bigmultip...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import unittest from idl_lexer import IDLLexer from idl_ppapi_lexer import IDLPPAPILexer # # FileToTokens # # From a so...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Title: CURLOPT_NEW_DIRECTORY_PERMS Section: 3 Source: libcurl See-also: - CURLOPT_FTP_CREATE_MISSING_DIRS (3) - CURLOPT_NEW_FILE_PERMS (3) - CURLOPT_UPLOAD (3) Protocol: - SFTP - SCP - FILE Added-in: 7.16.4 --- # N...
unknown
github
https://github.com/curl/curl
docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.md
import time from django.http import Http404 from django.shortcuts import render, get_object_or_404, redirect from django.contrib.auth.decorators import login_required from jay.utils import superadmin from django.core.urlresolvers import reverse from settings.models import VotingSystem from settings.forms import E...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional from typing_extensions import Literal from .._models import BaseModel from .file_object import FileObject __all__ = ["Upload"] class Upload(BaseModel): """The Upload object can accept byte chunks in...
python
github
https://github.com/openai/openai-python
src/openai/types/upload.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Title: Dumpscript management command Project: Hardytools (queryset-refactor version) Author: Will Hardy (http://willhardy.com.au) Date: June 2008 Usage: python manage.py dumpscript appname > scripts/scriptname.py $Revision: 217 $ Descripti...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from configs.module import Module import running import time def init(options): options['server'].state['lastpong'] = time.time() m = Module('ping') m.set_help('Reply to PING messages from the IRC server.') m.add_base_hook('recv', recv) m.add_base_hook('ctcp.ping', ctcp_ping...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
unknown
codeparrot/codeparrot-clean
# Software License Agreement (BSD License) # # Copyright (c) 2009-2011, Eucalyptus Systems, Inc. # All rights reserved. # # Redistribution and use of this software in source and binary forms, with or # without modification, are permitted provided that the following conditions # are met: # # Redistributions of source ...
unknown
codeparrot/codeparrot-clean
from django import forms from territori.fields import TerritoriChoices, TerritoriClusterChoices, TerritoriChoicesClassifiche from django.utils.translation import ugettext_lazy as _ class TerritoriSearchFormHome(forms.Form): territori = TerritoriChoices( to_field_name = 'slug', required=True, ...
unknown
codeparrot/codeparrot-clean
# These are versions of the functions in django.utils.translation.trans_real # that don't actually do anything. This is purely for performance, so that # settings.USE_I18N = False can use this module rather than trans_real.py. from django.conf import settings from django.utils.encoding import force_text from django.ut...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python import vcsn from test import * # Check both syntaxes: `aut.multiply(n)` and `aut ** n`. def check(aut, n, exp): CHECK_EQ(exp, aut ** n) CHECK_EQ(exp, aut.multiply(n)) a = vcsn.B.expression('a').standard() check(a, 0, vcsn.B.expression('\e').standard()) check(a, 5, '''digraph { vcsn_c...
unknown
codeparrot/codeparrot-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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://...
unknown
codeparrot/codeparrot-clean
package kotlinx.coroutines.internal import kotlinx.coroutines.testing.* import junit.framework.Assert.* import kotlinx.coroutines.* import kotlinx.coroutines.debug.internal.* import org.junit.* import kotlin.concurrent.* class ConcurrentWeakMapCollectionStressTest : TestBase() { private data class Key(val i: Int)...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/jvm/test/internal/ConcurrentWeakMapCollectionStressTest.kt
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
python
github
https://github.com/apache/airflow
airflow-core/tests/unit/dag_processing/test_dagbag.py
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
framework-docs/src/main/java/org/springframework/docs/integration/jms/jmsreceivingasyncmessagelisteneradapter/TextMessageDelegate.java
from __future__ import unicode_literals from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation ) from django.contrib.contenttypes.models import ContentType from django.db import models from django.test import TestCase from django.utils.encoding import python_2_unicode_compatible from ...
unknown
codeparrot/codeparrot-clean
#include <gtest/gtest.h> #include <ATen/ATen.h> #include <ATen/test/test_assert.h> #include <cmath> #include <iostream> #include <limits> #include <sstream> #include <type_traits> using namespace at; TEST(TestHalf, Arithmetic) { Half zero = 0; Half one = 1; ASSERT_EQ(zero + one, one); ASSERT_EQ(zero + zero, ...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/test/half_test.cpp
/* Copyright 2013 Google Inc. All Rights Reserved. Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ /* Sliding window over the input data. */ #ifndef BROTLI_ENC_RINGBUFFER_H_ #define BROTLI_ENC_RINGBUFFER_H_ #include "../common/platform.h" #include "...
c
github
https://github.com/nodejs/node
deps/brotli/c/enc/ringbuffer.h
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/cache/starfive,jh8100-starlink-cache.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: StarFive StarLink Cache Controller maintainers: - Joshua Yeong <joshua.yeong@starfivetech.com> description: ...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/cache/starfive,jh8100-starlink-cache.yaml
// These just test that serde_derive is able to produce code that compiles // successfully when there are a variety of generics and non-(de)serializable // types involved. #![deny(warnings)] #![allow( confusable_idents, unknown_lints, mixed_script_confusables, clippy::derive_partial_eq_without_eq, ...
rust
github
https://github.com/serde-rs/serde
test_suite/tests/test_gen.rs
/* * LibXDiff by Davide Libenzi ( File Differential Library ) * Copyright (C) 2003 Davide Libenzi * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of t...
c
github
https://github.com/git/git
xdiff/xprepare.h
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing_extensions import Literal from ..._models import BaseModel __all__ = ["ResponseAudioDoneEvent"] class ResponseAudioDoneEvent(BaseModel): """Returned when the model-generated audio is done. Also emitted when a ...
python
github
https://github.com/openai/openai-python
src/openai/types/realtime/response_audio_done_event.py
//// [tests/cases/conformance/constEnums/constEnum4.ts] //// //// [constEnum4.ts] if (1) const enum A { } else if (2) const enum B { } else const enum C { } //// [constEnum4.js] "use strict"; if (1) ; else if (2) ; else ;
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/constEnum4.js
#!/usr/bin/env python3 import unittest from test import support import smtplib ssl = support.import_module("ssl") support.requires("network") class SmtpTest(unittest.TestCase): testServer = 'smtp.gmail.com' remotePort = 25 context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) def test_connect_starttls(self...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ############################################################################### # # # compare.py # # ...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.callbacks.trubrics_callback import TrubricsCallbackHandler # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/callbacks/trubrics_callback.py
import os import tempfile import socket import subprocess import mock import pytest import shentry class _Any(object): def __eq__(self, other): return True def __ne__(self, other): return False ANY = _Any() @pytest.mark.parametrize('argv,expected_full_command,expected_command_ws,expected_s...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Tests\Database; use Illuminate\Database\Capsule\Manager as DB; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model as Eloquent; use Illuminate\Database\Eloqu...
php
github
https://github.com/laravel/framework
tests/Database/DatabaseEloquentInverseRelationMorphOneTest.php
/* Copyright 2019 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/phases/reset/removeetcdmember.go
Version 1.93.1 (2026-02-12) =========================== <a id="1.93.1"></a> - [Don't try to recover keyword as non-keyword identifier](https://github.com/rust-lang/rust/pull/150590), fixing an ICE that especially [affected rustfmt](https://github.com/rust-lang/rustfmt/issues/6739). - [Fix `clippy::panicking_unwrap` f...
unknown
github
https://github.com/rust-lang/rust
RELEASES.md
# Copyright (C) 2010-2014 GRNET S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed i...
unknown
codeparrot/codeparrot-clean
{ "html": { "type": "Fragment", "start": 0, "end": 41, "children": [ { "type": "EachBlock", "start": 0, "end": 41, "children": [ { "type": "Element", "start": 22, "end": 33, "name": "p", "attributes": [], "children": [ { "type": "Mustac...
json
github
https://github.com/sveltejs/svelte
packages/svelte/tests/parser-legacy/samples/unusual-identifier/output.json
<table border="1" class="dataframe"> <thead> <tr style="text-align: right;"> <th></th> <th>columns.name</th> <th>0</th> <th>1</th> </tr> </thead> <tbody> <tr> <th rowspan="2" valign="top">a</th> <th>b</th> <td>0</td> <td>0</td> </tr> <tr> <...
html
github
https://github.com/pandas-dev/pandas
pandas/tests/io/formats/data/html/index_unnamed_multi_columns_named_standard.html
// run // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test methods on slices. package main type T []int func (t T) Len() int { return len(t) } type I interface { Len() int } func main() { var t T ...
go
github
https://github.com/golang/go
test/method3.go
import os import sys import tempfile import operator import functools import itertools import re import contextlib import pickle import textwrap from setuptools.extern import six from setuptools.extern.six.moves import builtins, map import pkg_resources.py31compat if sys.platform.startswith('java'): import org.p...
unknown
codeparrot/codeparrot-clean
doctests = """ Unpack tuple >>> t = (1, 2, 3) >>> a, b, c = t >>> a == 1 and b == 2 and c == 3 True Unpack list >>> l = [4, 5, 6] >>> a, b, c = l >>> a == 4 and b == 5 and c == 6 True Unpack implied tuple >>> a, b, c = 7, 8, 9 >>> a == 7 and b == 8 and c == 9 True Unpa...
unknown
codeparrot/codeparrot-clean
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
unknown
codeparrot/codeparrot-clean
/* * X.509 internal, common functions for writing * * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ #include "common.h" #if defined(MBEDTLS_X509_CSR_WRITE_C) || defined(MBEDTLS_X509_CRT_WRITE_C) #include "mbedtls/x509_crt.h" #include "x509_internal.h" #include...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/library/x509write.c
from twilio.twiml import Response from django_twilio.decorators import twilio_view from django.template.defaultfilters import striptags from django.views.decorators.http import require_http_methods from django.views.decorators.cache import never_cache from django.utils import timezone from dateutil.parser import parse ...
unknown
codeparrot/codeparrot-clean
import operator_benchmark as op_bench import torch tensor_conversion_short_configs = op_bench.cross_product_configs( M=[32], N=[128], device=["cpu", "cuda"], dtype_one=[ torch.bool, torch.uint8, torch.int8, torch.int16, torch.int32, torch.int64, ...
python
github
https://github.com/pytorch/pytorch
benchmarks/operator_benchmark/pt/tensor_to_test.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
''' This is a file which stores various statistics for AI metrics: ''' import random, sys, time, math, dictionarywords class AIStats(): FILENAME = "wordsmithed/media/aistats.txt" #'media/heuristic/heuristic_tilequantile_5_5.txt' COLLECT_WORD_DATA = False #if True, this will collect data on timing/letterPlays C...
unknown
codeparrot/codeparrot-clean
"""unit tests for sparse utility functions""" from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_equal from pytest import raises as assert_raises from scipy.sparse import sputils from scipy.sparse.sputils import matrix from scipy._lib._numpy_compat imp...
unknown
codeparrot/codeparrot-clean
// Copyright 2024 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 unix package runtime import _ "unsafe" // used in internal/syscall/unix //go:linkname fcntl
go
github
https://github.com/golang/go
src/runtime/linkname_unix.go
<!--Copyright 2020 The HuggingFace 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 applicable law or agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/zh/main_classes/deepspeed.md
/* * 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.renderer.declarations.renderers.callables import org.jetbrains.kotl...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/renderer/declarations/renderers/callables/KaAnonymousFunctionSymbolRenderer.kt
# -*- coding: utf-8 -*- """Test forms.""" from webapp.public.forms import LoginForm from webapp.user.forms import RegisterForm class TestRegisterForm: """Register form.""" def test_validate_user_already_registered(self, user): """Enter username that is already registered.""" form = RegisterFo...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2007-2021 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
unknown
codeparrot/codeparrot-clean
mod queue; mod shutdown; mod yield_now; /// Full runtime loom tests. These are heavy tests and take significant time to /// run on CI. /// /// Use `LOOM_MAX_PREEMPTIONS=1` to do a "quick" run as a smoke test. /// /// In order to speed up the C use crate::runtime::tests::loom_oneshot as oneshot; use crate::runtime::{se...
rust
github
https://github.com/tokio-rs/tokio
tokio/src/runtime/tests/loom_multi_thread.rs
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Self-test for skimage. import filecmp import os import subprocess import sys import tempfile class BinaryNotFoundException(Exce...
unknown
codeparrot/codeparrot-clean
from django.contrib import admin from labourwages.models import * # Register your models here. class AgoperationAdmin(admin.ModelAdmin): fields=('name',) admin.site.register(Agoperation,AgoperationAdmin) class WagetypeAdmin(admin.ModelAdmin): fields=('name',) admin.site.register(Wagetype,WagetypeAdmin) class Workp...
unknown
codeparrot/codeparrot-clean
# $HeadURL$ """ PlottingClient is a client of the Plotting Service """ __RCSID__ = "$Id$" import types, tempfile from DIRAC import S_OK, S_ERROR from DIRAC.Core.DISET.RPCClient import RPCClient from DIRAC.Core.DISET.TransferClient import TransferClient class PlottingClient: def __init__( self, rpcClient = None, ...
unknown
codeparrot/codeparrot-clean
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Background Subtraction Example</title> <link href="js_example_style.css" rel="stylesheet" type="text/css" /> </head> <body> <h2>Background Subtraction Example</h2> <p> Click <b>Start/Stop</b> button to start or stop the camera capture.<br> The <b>video...
html
github
https://github.com/opencv/opencv
doc/js_tutorials/js_assets/js_bg_subtraction.html
# Owner(s): ["module: tests"] # ruff: noqa: F841 import itertools import math import operator import random import sys import warnings from functools import partial from itertools import chain, product from numbers import Number import numpy as np import torch import torch.autograd.forward_ad as fwAD from torch impo...
python
github
https://github.com/pytorch/pytorch
test/test_binary_ufuncs.py
__author__ = 'srodgers' from .Dialog import * """ This file is part of chargectrl-python-buspirate. chargectrl-python-buspirate 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...
unknown
codeparrot/codeparrot-clean
//===--- OptimizerBridging.h - header for the OptimizerBridging module ----===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2025 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/SILOptimizer/OptimizerBridging.h
#!/usr/bin/python import re import sys def remove_rtti(text): return re.sub(r'dynamic_cast<(.* \*)>', r'(\1)', text) def make_dalvik_compat(text): init_text = """/* Utility class for managing the JNI environment */ class JNIEnvWrapper { const Director *director_; JNIEnv *jenv_; public: JNI...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2020 The HuggingFace 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 applicable law or agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/en/model_doc/openai-gpt.md
from __future__ import unicode_literals from django.contrib import admin from django.contrib.admin.options import ModelAdmin from django.contrib.auth.models import User from django.test import RequestFactory, TestCase from .models import ( Band, DynOrderingBandAdmin, Song, SongInlineDefaultOrdering, SongInlin...
unknown
codeparrot/codeparrot-clean
// This file is part of ICU4X. For terms of use, please see the file // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). //! This module contains types and implementations for the Julian calendar. //! //! ```rust //! use icu::calendar::{c...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/icu_calendar/src/cal/julian.rs
# XXX TO DO: # - popup menu # - support partial or total redisplay # - key bindings (instead of quick-n-dirty bindings on Canvas): # - up/down arrow keys to move focus around # - ditto for page up/down, home/end # - left/right arrows to expand/collapse & move out/in # - more doc strings # - add icons for "file", ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
unknown
codeparrot/codeparrot-clean
import tempfile import unittest from boto.compat import StringIO, six, json from textwrap import dedent from boto.cloudfront.distribution import Distribution class CloudfrontSignedUrlsTest(unittest.TestCase): cloudfront = True notdefault = True def setUp(self): self.pk_str = dedent(""" ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import sys import logging from framework.transactions.context import TokuTransaction from website.app import init_app from website.models import NodeLog, Node from scripts import utils as script_utils from modularodm import Q logger = logging.getLogger(__name__) # Use a system to mark migrate...
unknown
codeparrot/codeparrot-clean
# Copyright 2017, Google, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
unknown
codeparrot/codeparrot-clean
# Owner(s): ["module: PrivateUse1"] import sys import torch from torch.testing._internal.common_utils import run_tests, skipIfTorchDynamo, TestCase class DummyPrivateUse1Module: @staticmethod def is_available(): return True @staticmethod def is_autocast_enabled(): return True @st...
python
github
https://github.com/pytorch/pytorch
test/test_extension_utils.py
from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from optparse import make_option from django.core.management.base import BaseCommand from zerver.lib.actions import do_remove_subscription from zerver.models import Realm, UserProf...
unknown
codeparrot/codeparrot-clean
"""Support for reading data from a serial port.""" import asyncio import json import logging from serial import SerialException import serial_asyncio import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_NAME, CONF_VALUE_TEMPLATE, EVENT_HOMEASSISTANT...
unknown
codeparrot/codeparrot-clean
// Copyright 2022 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. // This file lives in the runtime package // so we can get access to the runtime guts. // The rest of the implementation of this test is in align_test.go. pack...
go
github
https://github.com/golang/go
src/runtime/align_runtime_test.go
# The original Tempita implements all of its templating code here. # Moved it to _tempita.py to make the compilation portable. from ._tempita import *
python
github
https://github.com/numpy/numpy
numpy/_build_utils/tempita/__init__.py
/* contrib/amcheck/amcheck--1.3--1.4.sql */ -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "ALTER EXTENSION amcheck UPDATE TO '1.4'" to load this file. \quit -- In order to avoid issues with dependencies when updating amcheck to 1.4, -- create new, overloaded versions of the 1.2 ...
sql
github
https://github.com/postgres/postgres
contrib/amcheck/amcheck--1.3--1.4.sql
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Description** Converts a multivalued expression into a single valued column containing the first value. This is most useful when reading from a function that emits multivalued columns in a known order ...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/description/mv_first.md
function useSomething() { useLayoutEffect({ "useSomething.useLayoutEffect": ()=>{} }["useSomething.useLayoutEffect"]); useEffect({ "useSomething.useEffect": ()=>{} }["useSomething.useEffect"]); const onClick = useCallback({ "useSomething.useCallback[onClick]": ()=>[] }["u...
javascript
github
https://github.com/vercel/next.js
crates/next-custom-transforms/tests/fixture/debug-fn-name/composite-hook/output.js
#!/bin/bash set -ex # MKL MKL_VERSION=2024.2.0 MKLROOT=/opt/intel mkdir -p ${MKLROOT} pushd /tmp python3 -mpip install wheel python3 -mpip download -d . mkl-static==${MKL_VERSION} python3 -m wheel unpack mkl_static-${MKL_VERSION}-py2.py3-none-manylinux1_x86_64.whl python3 -m wheel unpack mkl_include-${MKL_VERSION}-p...
unknown
github
https://github.com/pytorch/pytorch
.ci/docker/common/install_mkl.sh
/* * Low level 3-way in-core file merge. */ #ifndef LL_MERGE_H #define LL_MERGE_H #include "xdiff/xdiff.h" /** * * Calling sequence: * ---------------- * * - Prepare a `struct ll_merge_options` to record options. * If you have no special requests, skip this and pass `NULL` * as the `opts` parameter to u...
c
github
https://github.com/git/git
merge-ll.h
import ddapp.visualization as vis from ddapp import filterUtils import ddapp.vtkAll as vtk import ddapp.vtkNumpy as vnp from ddapp.shallowCopy import shallowCopy from ddapp import ioUtils import numpy as np def createTexturedPlane(): source = vtk.vtkPlaneSource() textureMap = vtk.vtkTextureMapToPlane() tex...
unknown
codeparrot/codeparrot-clean
'''Handling HBNL files ''' import os import shutil import subprocess from collections import OrderedDict from datetime import datetime import h5py import numpy as np import pandas as pd import db.database as D from .utils.compilation import join_allcols, extract_session_fromuID, join_ufields, column_split from .util...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 """ Parsování dokladů z pirátské wiki do csv 1. Dataplugin v Docuwiki ukladá data do sqlite2, tu si stáhneme: scp <path>/data.sqlite ucto2.db 2. Nejdřívě je třeba převést sqlite2 do sqlite3: sqlite ucto2.db .dump | sqlite3 ucto3.db # konverze sqlite 2 do sqlite 3 3. Potom spustit tento skript ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Contracts\Auth; interface Authenticatable { /** * Get the name of the unique identifier for the user. * * @return string */ public function getAuthIdentifierName(); /** * Get the unique identifier for the user. * * @return mixed */ pu...
php
github
https://github.com/laravel/framework
src/Illuminate/Contracts/Auth/Authenticatable.php
import numpy as np from ase.optimize.optimize import Dynamics from ase.optimize.fire import FIRE from ase.units import kB from ase.parallel import world from ase.io.trajectory import PickleTrajectory class BasinHopping(Dynamics): """Basin hopping algorythm. After Wales and Doye, J. Phys. Chem. A, vol 101 (19...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, print_function, division # Run using # mpiexec -np 2 python _test_mpi_roundtrip.py from mpi4py import MPI import theano from theano.tensor.io import send, recv, mpi_cmps from theano.gof.sched import sort_schedule_fn import numpy as np from sys import stdout, stderr, exit comm =...
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 req...
unknown
codeparrot/codeparrot-clean
from __future__ import division from random import shuffle, choice, randint, seed from os.path import expanduser from numpy import log10 from scipy import stats import numpy as np import time import math import copy import sys import os from pprint import pprint as pp mydir = expanduser("~/") sys.path.append(mydir + "...
unknown
codeparrot/codeparrot-clean
package libnetwork import ( "context" "fmt" "sync" "time" "github.com/containerd/log" "github.com/moby/moby/api/types/system" "github.com/moby/moby/v2/daemon/libnetwork/internal/nftables" "github.com/moby/moby/v2/daemon/libnetwork/iptables" "github.com/moby/moby/v2/daemon/libnetwork/osl" ) // FirewallBacken...
go
github
https://github.com/moby/moby
daemon/libnetwork/controller_linux.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\Depende...
php
github
https://github.com/composer/composer
src/Composer/DependencyResolver/Operation/MarkAliasInstalledOperation.php
# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 ############################################################################### # OpenLP - Open Source Lyrics Projection # # ------------------------------------------------------...
unknown
codeparrot/codeparrot-clean
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.vectorstores import PGVector from langchain_community.vectorstores.pgvector import DistanceStrategy # Create a way to dynamically look up deprecated imports. # Used to consolida...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/vectorstores/pgvector.py
# Copyright (C) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
unknown
codeparrot/codeparrot-clean
import { type ComponentInternalInstance, type ComponentOptions, warn, } from 'vue' import { compile } from '@vue/compiler-ssr' import { NO, extend, generateCodeFrame, isFunction } from '@vue/shared' import type { CompilerError, CompilerOptions } from '@vue/compiler-core' import type { PushFn } from '../render' i...
typescript
github
https://github.com/vuejs/core
packages/server-renderer/src/helpers/ssrCompile.ts
#!/usr/bin/env python # -*- coding: utf-8 -*- # Call Web2py scheduler in app models context and run a specified task using # its scheduled arguments. Two options for running this script: # # cd web2py # python applications/<app>/static/scripts/tools/run_scheduler_tasks.py --app=<app> --task=<task> # -- or -- # export...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * file_ops.h * Helper functions for operating on files * * Copyright (c) 2013-2026, PostgreSQL Global Development Group * *------------------------------------------------------------------------- */ #ifndef FILE_OPS_H #define FILE_...
c
github
https://github.com/postgres/postgres
src/bin/pg_rewind/file_ops.h
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
unknown
codeparrot/codeparrot-clean
"""Module that defines indexed objects The classes IndexedBase, Indexed and Idx would represent a matrix element M[i, j] as in the following graph:: 1) The Indexed class represents the entire indexed object. | ___|___ ' ' M[i, j] ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Doctrine 2 ORM documentation build configuration file, created by # sphinx-quickstart on Fri Dec 3 18:10:24 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2011-2012, 30loops.net # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of condition...
unknown
codeparrot/codeparrot-clean