code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#ifndef HEADER_CURL_CONFIG_RISCOS_H #define HEADER_CURL_CONFIG_RISCOS_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
c
github
https://github.com/curl/curl
lib/config-riscos.h
/* * 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/test/java/org/apache/kafka/clients/FetchSessionHandlerTest.java
from __future__ import absolute_import from django.db import models from django.test import TestCase from .models import Author, Book signal_output = [] def pre_save_test(signal, sender, instance, **kwargs): signal_output.append('pre_save signal, %s' % instance) if kwargs.get('raw'): signal_output.a...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true module ActiveModel module Validations # == \Active \Model Absence Validator class AbsenceValidator < EachValidator # :nodoc: def validate_each(record, attr_name, value) record.errors.add(attr_name, :present, **options) if value.present? end end modul...
ruby
github
https://github.com/rails/rails
activemodel/lib/active_model/validations/absence.rb
import pickle import unittest from paramiko.ssh_exception import NoValidConnectionsError class NoValidConnectionsErrorTest (unittest.TestCase): def test_pickling(self): # Regression test for https://github.com/paramiko/paramiko/issues/617 exc = NoValidConnectionsError({('127.0.0.1', '22'): Except...
unknown
codeparrot/codeparrot-clean
"""Suite Required suite: Level 0, version 0 Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2 AETE/AEUT resource version 1/0, language 0, script 0 """ import aetools import MacOS _code = 'reqd' from StdSuites.Required_Suite import * class ...
unknown
codeparrot/codeparrot-clean
# This template uses the provided list of jobs to create test one or more test jobs. # It can be used directly if needed, or through the matrix template. parameters: # A required list of dictionaries, one per test job. # Each item in the list must contain a "job" and "name" key. - name: jobs type: object jo...
unknown
github
https://github.com/ansible/ansible
.azure-pipelines/templates/test.yml
# -*- 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 'SurveyForm' db.create_table('survey_surveyform', ( ('id', self.gf('django.db.mode...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #ryan g. coleman ryangc@mail.med.upenn.edu #does everything to do travel depth, starting from a pdb file and optionally a #gridsize and optionally a path to the trisrf/trigen execs import sys import string import os import tstCreate import tstConvexHull import oldTravelDist import tstdata import...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import division, absolute_import # Copyright (C) 2007 Samuel Abels # # 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 the Li...
unknown
codeparrot/codeparrot-clean
import os from django.conf import settings from django.conf.urls import patterns, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from .crashstats import urls from .supersearch import urls as supersearch_urls from .authentication import urls as auth_urls from .monitoring import urls as mon...
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 n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/network/TransferableChannel.java
// 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. package bytes // Simple byte buffer for marshaling data. import ( "errors" "io" "unicode/utf8" ) // smallBufferSize is an initial allocation minimal capac...
go
github
https://github.com/golang/go
src/bytes/buffer.go
import sys from pathlib import Path from subprocess import PIPE, Popen from tests import TWISTED_KEEPS_TRACEBACKS class TestCmdlineCrawlPipeline: def _execute(self, spname): args = (sys.executable, "-m", "scrapy.cmdline", "crawl", spname) cwd = Path(__file__).resolve().parent proc = Popen(...
python
github
https://github.com/scrapy/scrapy
tests/test_cmdline_crawl_with_pipeline/__init__.py
#------------------------------------------------------------------------------- # Name: Account Helper with user and role dictionaries # Purpose: Queries critical information from ArcGIS Online organization which # can be used in other scripts # # Author: Kelly Gerrow kgerrow@esri.com # # ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import math import operator import sys def rem(a, b): ret = a % b if ret < 0 and a > 0 and b < 0 or \ ret > 0 and a < 0 and b > 0: ret -= b return ret FUNS = { 'add': operator.add, 'sub': operator.sub, 'mul': operator.mul, 'div': operator.truediv, ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2015 Metaswitch Networks # # 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 applicab...
unknown
codeparrot/codeparrot-clean
"""SCons.Tool.ar Tool-specific initialization for ar (library archive). There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons ...
unknown
codeparrot/codeparrot-clean
""" Unit tests for sonification methods """ import mir_eval import numpy as np import scipy def test_clicks(): # Test output length for a variety of parameter settings for times in [np.array([1.]), np.arange(10)*1.]: for fs in [8000, 44100]: click_signal = mir_eval.sonify.clicks(times, fs)...
unknown
codeparrot/codeparrot-clean
# Adapted with permission from the EdgeDB project; # license: PSFL. import weakref import sys import gc import asyncio import contextvars import contextlib from asyncio import taskgroups import unittest import warnings from test.test_asyncio.utils import await_without_task # To prevent a warning "test altered the ex...
python
github
https://github.com/python/cpython
Lib/test/test_asyncio/test_taskgroups.py
# Copyright (C) 2004-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Copyright (c) 2017 Yuwei Zhou, <yuwzho@microsoft.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without ...
unknown
codeparrot/codeparrot-clean
from datetime import ( datetime, timezone, ) from dateutil.relativedelta import MO import pytest from pandas import ( DateOffset, DatetimeIndex, Series, Timestamp, ) import pandas._testing as tm from pandas.tseries.holiday import ( SA, AbstractHolidayCalendar, EasterMonday, Go...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/tseries/holiday/test_holiday.py
# pidWX.py # base on piddleWX.py -- a wxPython backend for PIDDLE # Copyright (c) 2000 Paul & Kevin Jacobs # # 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, or (at your ...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Li...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> #ifndef _NGX_OPEN_FILE_CACHE_H_INCLUDED_ #define _NGX_OPEN_FILE_CACHE_H_INCLUDED_ #define NGX_OPEN_FILE_DIRECTIO_OFF NGX_MAX_OFF_T_VALUE typedef struct { ngx_fd_t fd; ngx_file_uniq...
c
github
https://github.com/nginx/nginx
src/core/ngx_open_file_cache.h
/* * Copyright 2012-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-boot
core/spring-boot/src/main/java/org/springframework/boot/convert/LenientStringToEnumConverterFactory.java
"""Xbox Media Player Support.""" from __future__ import annotations import re from typing import List from xbox.webapi.api.client import XboxLiveClient from xbox.webapi.api.provider.catalog.models import Image from xbox.webapi.api.provider.smartglass.models import ( PlaybackState, PowerState, SmartglassCo...
unknown
codeparrot/codeparrot-clean
"""Add uuid to comparison table and add xpai_log table Revision ID: 31fc9a032aa8 Revises: 1301ba274487 Create Date: 2016-11-10 23:31:36.173311 """ # revision identifiers, used by Alembic. revision = '31fc9a032aa8' down_revision = '1301ba274487' from alembic import op import sqlalchemy as sa import uuid import base6...
unknown
codeparrot/codeparrot-clean
''' Extension for enhancing sphinx documentation generation for cython module ''' import re import types import sys from os.path import dirname, join from sphinx.ext.autodoc import MethodDocumenter class CythonMethodDocumenter(MethodDocumenter): # XXX i don't understand the impact of having a priority more than t...
unknown
codeparrot/codeparrot-clean
import logging; logger = logging.getLogger("morse." + __name__) import bge import math import morse.core.sensor class AccelerometerClass(morse.core.sensor.MorseSensorClass): """ Accelerometer sensor """ def __init__(self, obj, parent=None): """ Constructor method. Receives the reference to th...
unknown
codeparrot/codeparrot-clean
import sys import codecs import datetime from pyphabricatordb import * from sqlalchemy.orm import sessionmaker def create_session(): DBSession = sessionmaker() return DBSession() def get_user(session, phid): return session.query(user.User).filter(user.User.phid == phid).first() def create_task_range_summ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2012 Rackspace Hosting # 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
// mksysnum_openbsd.pl // Code generated by the command above; DO NOT EDIT. package syscall const ( SYS_EXIT = 1 // { void sys_exit(int rval); } SYS_FORK = 2 // { int sys_fork(void); } SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); } SYS_WRITE = 4...
go
github
https://github.com/golang/go
src/syscall/zsysnum_openbsd_riscv64.go
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/platform/dynamic_annotations.h
#pragma once #include <c10/util/Exception.h> #include <c10/util/ParallelGuard.h> #include <c10/util/SmallVector.h> namespace at { template <class F> inline void parallel_for( const int64_t begin, const int64_t end, const int64_t grain_size, const F& f) { TORCH_INTERNAL_ASSERT_DEBUG_ONLY(grain_size ...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/Parallel-inl.h
# Some useful functions to extract data out of emails # Copyright (C) 2002-2012 John Goerzen & contributors # # 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 Lic...
unknown
codeparrot/codeparrot-clean
""" Configuration related stuff. """ import functools import json import os from urllib.parse import urljoin from .cf_app_utils.auth import USER_MANAGEMENT_PATH from .consts import DOWNLOADER_PATH, METADATA_PARSER_PATH # TODO most of this class should be extracted as a base class for other configuration objects class...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # # GNU Zebra 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, or (at your option) any # later version. # # GN...
unknown
codeparrot/codeparrot-clean
import sys import os import hashlib from distutils.version import LooseVersion # WindowsError is not defined on unix systems try: WindowsError except NameError: class WindowsError(Exception): pass def cython(pyx_files, working_path=''): """Use Cython to convert the given files to C. Parameter...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- #----------------------------------------------------------- # # fTools # Copyright (C) 2008-2011 Carson Farmer # EMAIL: carson.farmer (at) gmail.com # WEB : http://www.ftools.ca/fTools.html # # A collection of data management and analysis tools for vector data # # Geoprocessing functions adap...
unknown
codeparrot/codeparrot-clean
export * from '../shared/errors.js'; /** * MESSAGE * @param {string} PARAMETER * @returns {never} */ export function CODE(PARAMETER) { const error = new Error(`${'CODE'}\n${MESSAGE}\nhttps://svelte.dev/e/${'CODE'}`); error.name = 'Svelte error'; throw error; }
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/scripts/process-messages/templates/server-errors.js
use std::path::{Path, PathBuf}; use std::sync::Arc; use rustc_macros::{Decodable, Encodable, HashStable_Generic}; use rustc_target::spec::TargetTuple; use crate::EarlyDiagCtxt; use crate::filesearch::make_target_lib_path; #[derive(Clone, Debug)] pub struct SearchPath { pub kind: PathKind, pub dir: PathBuf, ...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_session/src/search_paths.rs
DOCUMENTATION: name: from_yaml_all version_added: 'historical' short_description: Convert a series of YAML documents into a variable structure description: - Converts a YAML documents in a string representation into an equivalent structured Ansible variable. - Ansible internally auto-converts YAML strin...
unknown
github
https://github.com/ansible/ansible
lib/ansible/plugins/filter/from_yaml_all.yml
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include <assert.h> #include <arm_neon.h> #include <qnnpack/q8avgpool.h> void pytorch_q8avgpool_uk...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/quantized/cpu/qnnpack/src/q8avgpool/up8xm-neon.c
# Copyright (c) 2004-2009 Moxie Marlinspike # # 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 distri...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import taggit.managers import mptt.fields class Migration(migrations.Migration): dependencies = [ ('taggit', '0001_initial'), migrations.swappable_dependency(s...
unknown
codeparrot/codeparrot-clean
""" This file contains celery tasks for credentials-related functionality. """ from celery import task from celery.utils.log import get_task_logger from django.conf import settings from django.contrib.auth.models import User from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.credentials.utils imp...
unknown
codeparrot/codeparrot-clean
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from django.db import migrations, models from django.db.migrations.optimizer import MigrationOptimizer from django.test import SimpleTestCase from .models import CustomModelBase, EmptyManager class OptimizerTests(SimpleTestCase): """ Tests the migration autodetector. """ def ...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * xlogwait.c * Implements waiting for WAL operations to reach specific LSNs. * * Copyright (c) 2025-2026, PostgreSQL Global Development Group * * IDENTIFICATION * src/backend/access/transam/xlogwait.c * * NOTES * This file imp...
c
github
https://github.com/postgres/postgres
src/backend/access/transam/xlogwait.c
# # 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/migrations/versions/0026_2_10_0_dag_schedule_dataset_alias_reference.py
from __future__ import absolute_import from __future__ import unicode_literals import functools import logging import pprint from itertools import chain import six def format_call(args, kwargs): args = (repr(a) for a in args) kwargs = ("{0!s}={1!r}".format(*item) for item in six.iteritems(kwargs)) return...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # CasperJS documentation # # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.a...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright: (c) 2012, Dag Wieers <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' callback: mail type: notification short_d...
unknown
codeparrot/codeparrot-clean
import requests from allauth.socialaccount.providers.globus.provider import GlobusProvider from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) class GlobusAdapter(OAuth2Adapter): provider_id = GlobusProvider.id provider_default_url = 'ht...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 Alfredo de la fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import models, fields, api class WizRunStockScheduler(models.TransientModel): _name = "wiz.run.stock.scheduler" _description = "Wizard to run manually stock scheduler" use_new_cursor...
unknown
codeparrot/codeparrot-clean
// SPDX-License-Identifier: GPL-2.0 /* calibrate.c: default delay calibration * * Excised from init/main.c * Copyright (C) 1991, 1992 Linus Torvalds */ #include <linux/delay.h> #include <linux/init.h> #include <linux/jiffies.h> #include <linux/kstrtox.h> #include <linux/percpu.h> #include <linux/printk.h> #inclu...
c
github
https://github.com/torvalds/linux
init/calibrate.c
from django.contrib.staticfiles import views from django.urls import re_path urlpatterns = [ re_path("^static/(?P<path>.*)$", views.serve), ]
python
github
https://github.com/django/django
tests/staticfiles_tests/urls/default.py
#!/usr/bin/python import sys, os, os.path from dbclient import Beansdb, db def get_dir(s, dir): def parse(line): p,h,c = line.split(' ') return p, (int(h), int(c)) return dict(parse(line) for line in filter(None, (s.get(dir) or '').split('\n'))) def is_dir(d): return len(d...
unknown
codeparrot/codeparrot-clean
/* * Copyright (C) 2017 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 agreed ...
java
github
https://github.com/google/guava
guava/src/com/google/common/primitives/ImmutableLongArray.java
// // Form text // .form-text { margin-top: $form-text-margin-top; @include font-size($form-text-font-size); font-style: $form-text-font-style; font-weight: $form-text-font-weight; color: $form-text-color; }
unknown
github
https://github.com/twbs/bootstrap
scss/forms/_form-text.scss
# Copyright 2011, 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 f...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Tests\Database; use Exception; use Generator; use Illuminate\Database\MySqlConnection; use Illuminate\Database\Schema\MySqlSchemaState; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use ReflectionMethod; use Symfony\Component\Process\Process; class Database...
php
github
https://github.com/laravel/framework
tests/Database/DatabaseMySqlSchemaStateTest.php
#._cv_part guppy.heapy.OutputHandling class OutputHandler: def __init__(self, mod, output_file): self.mod = mod self.output_file = output_file class OutputBuffer: def __init__(self, mod, opts = None): self.mod = mod self.strio = mod._root.cStringIO.StringIO() if opts == None: opts = {} self.opts =...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 import logging import multiprocessing import os import signal import sys import time try: from setproctitle import getproctitle, setproctitle except ImportError: setproctitle = None # Path Fix sys.path.append( os.path.abspath( os.path.join( os.path.dirname(__file__), "....
unknown
codeparrot/codeparrot-clean
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/dinov2_with_registers/modular_dinov2_with_registers.py. # Do NOT edit this file manually as any edits will be ove...
python
github
https://github.com/huggingface/transformers
src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py
#!/usr/bin/env python # # 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 required by applicable law or ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Tests of the neo.core.block.Block class """ # needed for python 3 compatibility from __future__ import absolute_import, division, print_function from datetime import datetime from copy import deepcopy import unittest import numpy as np try: from IPython.lib.pretty import pretty exce...
unknown
codeparrot/codeparrot-clean
import sys import app import pkutils try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup, find_packages sys.dont_write_bytecode = True requirements = list(pkutils.parse_requirements('requirements.txt')) dependencies = list(pkutils.parse_requirements('requireme...
unknown
codeparrot/codeparrot-clean
#include "parts.h" #include "util.h" static PyObject * call_pyobject_print(PyObject *self, PyObject * args) { PyObject *object; PyObject *filename; PyObject *print_raw; FILE *fp; int flags = 0; if (!PyArg_UnpackTuple(args, "call_pyobject_print", 3, 3, &object, &filen...
c
github
https://github.com/python/cpython
Modules/_testcapi/object.c
# -*- coding: utf-8 -*- # # SelfTest/Util/test_posix.py: Self-test for the OSRNG.posix.new() function # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent ...
unknown
codeparrot/codeparrot-clean
''' HomeDetect -- uses a Radio Class to open a serial port expecting a Xbee Radio that is configured as a controller that reads all broadcasts from other Xbee's in the Network It then puts the actual reading into the configurations that are expected for each of the Rooms on the network The Radios are position...
unknown
codeparrot/codeparrot-clean
import type { NodeTransform, TransformContext } from '../transform' import { type CallExpression, type ExpressionNode, NodeTypes, type SlotOutletNode, createCallExpression, createFunctionExpression, createSimpleExpression, } from '../ast' import { isSlotOutlet, isStaticArgOf, isStaticExp } from '../utils'...
typescript
github
https://github.com/vuejs/core
packages/compiler-core/src/transforms/transformSlotOutlet.ts
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Andrew Gaffney <andrew@agaffney.org> # # 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 L...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright 2017 Ricequant, 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
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2008 The Hewlett-Packard Development Company # 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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 Chris Dekter # # 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 late...
unknown
codeparrot/codeparrot-clean
############################ Copyrights and license ############################ # # # Copyright 2018 itsbruce <it.is.bruce@gmail.com> # # ...
unknown
codeparrot/codeparrot-clean
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Rackspace provisioner. """ from ._libcloud import LibcloudProvisioner from ._install import ( provision, task_open_control_firewall, ) from ._ssh import run_remotely from ._effect import sequence def get_default_username(distribution): """...
unknown
codeparrot/codeparrot-clean
# coding: latin-1 import unittest import ctypes try: ctypes.c_wchar except AttributeError: pass else: import _ctypes_test dll = ctypes.CDLL(_ctypes_test.__file__) wcslen = dll.my_wcslen wcslen.argtypes = [ctypes.c_wchar_p] class UnicodeTestCase(unittest.TestCase): def setUp(self): ...
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 n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/errors/UnsupportedByAuthenticationException.java
# Hooks Hooks are a mechanism to run routines _around_ the tests, at the test content boundaries. ## Supported hooks Specify any of the following as the `hooks` in your [Suite](../../../../buildscripts/resmokeconfig/suites/README.md) config: - [`AnalyzeShardKeysInBackground`](./analyze_shard_key.py) - A hook for ru...
unknown
github
https://github.com/mongodb/mongo
buildscripts/resmokelib/testing/hooks/README.md
"""Tests for distutils.dir_util.""" import unittest import os import stat import shutil import sys from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, ensure_relative) from distutils import log from distutils.tests import support from test.support import run_un...
unknown
codeparrot/codeparrot-clean
// // URLProtocolTests.swift // // Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.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...
swift
github
https://github.com/Alamofire/Alamofire
Tests/URLProtocolTests.swift
#!/usr/bin/env python3 VERSION = '5.1.0' long_description = '''\ ReText is simple text editor that supports Markdown and reStructuredText markup languages. It is written in Python using PyQt libraries.''' requires = ['docutils', 'Markdown', 'Markups', 'pyenchant', 'Pygments'] import re import sys from os.path import...
unknown
codeparrot/codeparrot-clean
import urllib2 import json def query_dgidb(genes): """ Batch query DGIdb for drug-gene interaction data for a set of genes. """ def convert(input): """ Convert JSON UNICODE to plain ole strings. """ if isinstance(input, dict): return {convert(key): conve...
unknown
codeparrot/codeparrot-clean
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/native/Histogram.h> #include <ATen/core/Tensor.h> #include <ATen/Dispatch.h> #include <ATen/Parallel.h> #include <c10/util/irange.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/Functions.h> #include <ATen/NativeFunctions.h> #else #include <ATen/ops/aminmax....
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/cpu/HistogramKernel.cpp
// arrayInstance.push should have the following effects: // - read on all args (rest parameter) // - mutate on receiver function Component(props) { const x = foo(props.x); const y = {y: props.y}; const arr = []; arr.push({}); arr.push(x, y); return arr; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/array-push-effect.js
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # from kubernetes_py.utils import is_valid_string class ServicePort(object): VALID_PROTOCOLS = ["TCP", "UDP"] def __init__(self, name...
unknown
codeparrot/codeparrot-clean
import os import tempfile import Image import subprocess from django.shortcuts import render, redirect from django.forms.formsets import formset_factory from django.template import RequestContext, loader from django.template.loader import render_to_string from django.contrib import messages from django.contrib.auth im...
unknown
codeparrot/codeparrot-clean
# removing this file prevents the TimmRunner from dynamically skipping models skip: all: - ~ device: cpu: - ~ # Skip these additional models when running on aarch64 cpu_aarch64: # timeout on aarch64 - dm_nfnet_f0 - nfnet_l0 - visformer_small
unknown
github
https://github.com/pytorch/pytorch
benchmarks/dynamo/timm_models.yaml
/*! * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { ChangeDetectionStrategy, Component, DestroyRef, PLATFORM_ID, computed, inject, signal, } from...
typescript
github
https://github.com/angular/angular
adev/src/app/core/layout/secondary-navigation/secondary-navigation.component.ts
// 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 ). pub mod gc_fast; pub mod gc_small;
rust
github
https://github.com/nodejs/node
deps/crates/vendor/icu_collections/benches/tries/mod.rs