code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Red Hat, inc # Written by Seth Vidal # based on the mount modules from salt and puppet # # 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 ...
unknown
codeparrot/codeparrot-clean
import sys import pandas as pd import numpy as np import locale import datetime as dt import matplotlib as mpl from matplotlib import pyplot as plt from matplotlib import patches from matplotlib.dates import MONDAY from matplotlib.dates import WeekdayLocator, DateFormatter # # Style settings # plt.style.use('ggplot') ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2022 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/data/service/snapshot/path_utils.h
# -*- 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
import json import os import platform import sys from telnetlib import Telnet import pexpect import pytest import ray def test_ray_debugger_breakpoint(shutdown_only): ray.init(num_cpus=1) @ray.remote def f(): ray.util.pdb.set_trace() return 1 result = f.remote() # Wait until the...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true $: << File.expand_path("test", COMPONENT_ROOT) require "bundler/setup" require "rails/test_unit/runner" require "rails/test_unit/reporter" require "rails/test_unit/line_filtering" require "active_support" require "active_support/test_case" ActiveSupport::TestCase.extend Rails::LineFilt...
ruby
github
https://github.com/rails/rails
tools/test.rb
import django import time import string from Crypto.Random import random from Crypto.Cipher import Blowfish from django import forms from django.conf import settings from django.core.cache import cache from django.forms import widgets from django.forms.forms import pretty_name from django.forms.forms import NON_FIEL...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # 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, eithe...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package command import ( "strings" "testing" "github.com/hashicorp/cli" ) func TestGet(t *testing.T) { wd := tempWorkingDirFixture(t, "get") t.Chdir(wd.RootModuleDir()) ui := cli.NewMockUi() c := &GetCommand{ Meta: Meta{ testingOverr...
go
github
https://github.com/hashicorp/terraform
internal/command/get_test.go
/* SELECTOR (FILTER INTERFACE) */ .selector { display: flex; flex: 1; gap: 0 10px; } .selector select { height: 17.2em; flex: 1 0 auto; overflow: scroll; width: 100%; } .selector-available, .selector-chosen { display: flex; flex-direction: column; flex: 1 1; } .selector-avail...
css
github
https://github.com/django/django
django/contrib/admin/static/admin/css/widgets.css
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const util = require("util"); const memoize = require("./util/memoize"); /** @typedef {import("../declarations/WebpackOptions").Entry} Entry */ /** @typedef {import("../declarations/WebpackOptions").Entr...
javascript
github
https://github.com/webpack/webpack
lib/index.js
#!/usr/bin/env python # -*- coding: utf-8 -*- import tests_common as common from cpmoptimize import cpmoptimize, xrange start = 32 step = 43 def naive(count): res = 0 for elem in xrange(start, start + step * count, step): res += elem return res def formula(count): return (start * 2 + step * ...
unknown
codeparrot/codeparrot-clean
# 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
import unittest from test._test_multiprocessing import install_tests_in_module_dict install_tests_in_module_dict(globals(), 'fork', only_type="processes") if __name__ == '__main__': unittest.main()
python
github
https://github.com/python/cpython
Lib/test/test_multiprocessing_fork/test_processes.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 not u...
unknown
github
https://github.com/apache/airflow
providers/.pre-commit-config.yaml
import Tkinter import Test import Pmw Test.initialise() if Tkinter.TkVersion >= 8.4: expected1 = 'TclError: bad relief "bogus": must be ' else: expected1 = 'TclError: bad relief type "bogus": must be ' c = Pmw.RadioSelect kw_1 = {'labelpos' : 'nw', 'label_text' : 'Radio Select:'} tests_1 = ( (c.pack, (), {'pa...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007 # # 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 #...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Incident Reporting System - Controllers """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) # ----------------------------------------------------------------------------- def ind...
unknown
codeparrot/codeparrot-clean
from django.http import HttpResponseRedirect from django.contrib import messages from django.shortcuts import render, get_object_or_404 from django.urls import reverse from tlssite.models import Site from group.models import Group from alert.models import SiteAlert, TagAlert, GroupAlert from alert.forms import EnableSi...
unknown
codeparrot/codeparrot-clean
# binary to decimal and vice versa def choice(): ch = input("press 1 : binary to decimal\n" "press 2 : decimal to binary\n" ": ") if ch == '1': print("binary to decimal converion") number = int(input("enter your number that you want to convert decimal: ")) ...
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/BrokerRegistrationRequest.json
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com> # Stephen Fromm <sfromm@gmail.com> # Brian Coca <briancoca+dev@gmail.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 publish...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import paho.mqtt.client as mqtt import time # from influxdb import InfluxDBClient from influxdb.influxdb08 import InfluxDBClient # db_client = InfluxDBClient('188.166.238.158', 32485, 'root', 'root', 'k8s') # db_client = InfluxDBClient('127.0.0.1', 8086, 'root', 'root', 'cadvisor') # db_client = ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
unknown
codeparrot/codeparrot-clean
// Copyright 2013 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 !plan9 package net import ( "bytes" "internal/testenv" "os" "reflect" "runtime" "syscall" "testing" "time" ) func TestReadUnixgramWithUnna...
go
github
https://github.com/golang/go
src/net/unixsock_test.go
# -*- coding: utf-8 -*- """ DTW computation =============== This example illustrates DTW computation between time series and plots the optimal alignment path [1]. The image represents cost matrix, that is the squared Euclidean distance for each time point between both time series, which are represented at the left an...
unknown
codeparrot/codeparrot-clean
# Module 'os2emxpath' -- common operations on OS/2 pathnames """Common pathname manipulations, OS/2 EMX version. Instead of importing this module directly, import os and refer to this module as os.path. """ import os import stat from genericpath import * from ntpath import (expanduser, expandvars, isabs, islink, spli...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 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/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
unknown
codeparrot/codeparrot-clean
// Copyright 2025 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 cgo && darwin package cgotest import "testing" func TestIssue76023(t *testing.T) { issue76023(t) }
go
github
https://github.com/golang/go
src/cmd/cgo/internal/test/cgo_darwin_test.go
from sys import maxsize class ContactGroup: def __init__(self, firstname=None, lastname=None, nickname=None, company=None, address=None, email=None, email2=None, email3=None, address2=None, middlename=None, notes=None, id=None, home=None, mobile=None, work=None, homephone=None, m...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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
# -*- coding: utf-8 -*- """ *************************************************************************** test_qgsembeddedsymbolrenderer.py --------------------- Date : March 2021 Copyright : (C) 2021 by Nyall Dawson Email : nyall dot dawson at gmail dot com ...
unknown
codeparrot/codeparrot-clean
import MySQLdb as mdb import json import re import time import os import sys from operator import attrgetter import math from decimal import * from collections import Counter config = open('config.json') config = json.load(config) getcontext().prec = 3 statements = [] def getKeyValue(key, array): for pair in arra...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013 Daniel Reis # # 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...
unknown
codeparrot/codeparrot-clean
/* Copyright 2014 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/kubelet/kubelet.go
# Copyright (c) 2014, Georgios Is. Detorakis (gdetor@gmail.com) and # Nicolas P. Rougier (nicolas.rougier@inria.fr) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redis...
unknown
codeparrot/codeparrot-clean
import * as React from "react"; import * as TestRenderer from "react-test-renderer"; import { MemoryRouter, Route, Routes, useParams } from "react-router"; describe("<Routes> with a location", () => { function Home() { return <h1>Home</h1>; } function User() { let { userId } = useParams(); return ( ...
typescript
github
https://github.com/remix-run/react-router
packages/react-router/__tests__/Routes-location-test.tsx
# Copyright (C) 2003-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
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/transform/do_/ReplaceKeyInDo.java
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import subprocess import sys import twine.cli from . import package_name, package_root, has_tests_package from .build import run as build def run(): """ Creates a sdist .tar.gz and a bdist_wheel --univeral .wh...
unknown
codeparrot/codeparrot-clean
""" This module contains the base classes for menu and menu items. """ import sys from django.conf import settings from django.db import models # for backward-compatibility from admin_tools import menu from admin_tools.menu import items from admin_tools.deprecate_utils import import_path_is_changed user_model = geta...
unknown
codeparrot/codeparrot-clean
// Copyright 2017 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
server/etcdserver/api/etcdhttp/doc.go
import node class LinkedList(): def __init__(self, head=None): self.head = head def prepend(self, num): if self.head == None: self.head = node.node(num) else: temp = node.node(num) temp.set_next(self.head) self.head = temp def append(...
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
--- name: Bug Report about: Create a report to help us improve --- > ℹ Please fill out this template when filing an issue. > All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info. > > Per our [*CONTRIBUTING guidelines](https://github.com/A...
unknown
github
https://github.com/Alamofire/Alamofire
.github/ISSUE_TEMPLATE/bug_report.md
# Copyright (c) 2001, Stanford University # All rights reserved. # # See the file LICENSE.txt for information on redistributing this software. import sys import apiutil apiutil.CopyrightDef() # NOTE: if we need a LIBRARY statement, we would need to create a defs-x86.py to generate a .def file for VBoxOGL-x86 librar...
unknown
codeparrot/codeparrot-clean
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Alexander Akait @alexander-akait */ "use strict"; /** * @param {string | Buffer} strOrBuffer string or buffer * @returns {string | Buffer} result without BOM */ module.exports = (strOrBuffer) => { if (typeof strOrBuffer === "string" && str...
javascript
github
https://github.com/webpack/webpack
lib/util/removeBOM.js
# Simple test that errors should not block apply of valid # resources. The ConfigMap should successfully apply, while # the custom resource fails because the CRD is missing. apiVersion: v1 kind: ConfigMap metadata: name: foo --- apiVersion: example.com/v1 kind: Bogus metadata: name: foo
unknown
github
https://github.com/kubernetes/kubernetes
hack/testdata/multi-resource-2.yaml
import os import re import sys import time import logging import subprocess if sys.version_info[:2] >= (3, 0): # pylint: disable=E0611,F0401,I0011 from urllib.request import build_opener from urllib.error import HTTPError, URLError from urllib.parse import parse_qs, urlparse uni, pyver = str, 3 el...
unknown
codeparrot/codeparrot-clean
from fnmatch import fnmatch from loguru import logger from flexget import plugin from flexget.config_schema import one_or_more from flexget.event import event logger = logger.bind(name='content_filter') class FilterContentFilter: """ Rejects entries based on the filenames in the content. Torrent files only ...
unknown
codeparrot/codeparrot-clean
from __future__ import division import numpy as np from . import common_args from ..util import scale_samples, read_param_file, nonuniform_scale_samples def sample(problem, N, seed=None): """Generate model inputs using Latin hypercube sampling (LHS). Returns a NumPy matrix containing the model inputs genera...
unknown
codeparrot/codeparrot-clean
"""composite primary key port ip association Revision ID: 3b467be51e43 Revises: 26e984b48a0d Create Date: 2014-10-09 15:42:58.104964 """ # revision identifiers, used by Alembic. revision = '3b467be51e43' down_revision = '26e984b48a0d' import contextlib import itertools from alembic import op import sqlalchemy as s...
unknown
codeparrot/codeparrot-clean
/* * 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
spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java
# Copyright: (c) 2018, Jordan Borean (@jborean93) <jborean93@gmail.com> # MIT License (see LICENSE or https://opensource.org/licenses/MIT) import struct class GssChannelBindingsStruct(object): INITIATOR_ADDTYPE = 'initiator_addtype' INITIATOR_ADDRESS_LENGTH = 'initiator_address_length' ACCEPTOR_ADDRTYPE ...
unknown
codeparrot/codeparrot-clean
import {Component} from '@angular/core'; @Component({ selector: 'app-root', template: ` Hello `, styles: ` :host { color: blue; } `, }) export class App {}
typescript
github
https://github.com/angular/angular
adev/src/content/tutorials/learn-angular/steps/1-components-in-angular/src/app/app.ts
{ "private": true, "workspaces": [ "packages/*" ], "devDependencies": { "@babel/cli": "^7.10.5", "@babel/code-frame": "^7.10.4", "@babel/core": "^7.11.1", "@babel/helper-define-map": "^7.18.6", "@babel/helper-module-imports": "^7.10.4", "@babel/parser": "^7.11.3", "@babel/plugin-...
json
github
https://github.com/facebook/react
package.json
/* * 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
spring-context/src/main/java/org/springframework/format/datetime/DateFormatterRegistrar.java
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # Contributors: # Jeff Bryner jbryner@mozilla.com # # A...
unknown
codeparrot/codeparrot-clean
""" MySQL database backend for Django. Requires MySQLdb: http://sourceforge.net/projects/mysql-python """ import re import sys try: import MySQLdb as Database except ImportError, e: from django.core.exceptions import ImproperlyConfigured raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) ...
unknown
codeparrot/codeparrot-clean
"""SCons.Job This module defines the Serial and Parallel classes that execute tasks to complete a build. The Jobs class provides a higher level interface to start, stop, and wait on jobs. """ # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining ...
unknown
codeparrot/codeparrot-clean
# The internal time series database (tsdb) Alongside the SQL layer exposed to client apps, CockroachDB also implements another database engine on top of the KV layer: a native, embedded *time series database*. This timeseries database exists solely for the purpose of storing metrics efficiently inside CockroachDB and...
unknown
github
https://github.com/cockroachdb/cockroach
docs/tech-notes/timeseries.md
#!/usr/bin/env python """ Setuptools bootstrapping installer. Run this script to install or upgrade setuptools. """ import os import shutil import sys import tempfile import zipfile import optparse import subprocess import platform import textwrap import contextlib import warnings from distutils import log try: ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Pow...
c
github
https://github.com/opencv/opencv
3rdparty/libjasper/jasper/jas_image.h
use crate::cursor; use crate::extractor::bracket_stack::BracketStack; use crate::extractor::css_variable_machine::CssVariableMachine; use crate::extractor::machine::{Machine, MachineState}; use crate::extractor::string_machine::StringMachine; use classification_macros::ClassifyBytes; use std::marker::PhantomData; #[de...
rust
github
https://github.com/tailwindlabs/tailwindcss
crates/oxide/src/extractor/arbitrary_variable_machine.rs
// origin: FreeBSD /usr/src/lib/msun/src/e_rem_pio2.c // // ==================================================== // Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. // // Developed at SunPro, a Sun Microsystems, Inc. business. // Permission to use, copy, modify, and distribute this // software is freel...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/libm/src/math/rem_pio2.rs
// Copyright 2022 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/robustness/identity/lease_ids.go
''' Carousel ======== .. versionadded:: 1.4.0 The :class:`Carousel` widget provides the classic mobile-friendly carousel view where you can swipe between slides. You can add any content to the carousel and have it move horizontally or vertically. The carousel can display pages in a sequence or a loop. Example:: ...
unknown
codeparrot/codeparrot-clean
# We can test part of the module without zlib. try: import zlib except ImportError: zlib = None import zipfile, os, unittest, sys, shutil, struct from StringIO import StringIO from tempfile import TemporaryFile from random import randint, random import test.test_support as support from test.test_support impo...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # 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 # "Li...
unknown
codeparrot/codeparrot-clean
import "../globals.css"; import { SpeedInsights } from "@vercel/speed-insights/next"; import type { Metadata } from "next"; import { VisualEditing, toPlainText, type PortableTextBlock, } from "next-sanity"; import { Inter } from "next/font/google"; import { draftMode } from "next/headers"; import AlertBanner fr...
typescript
github
https://github.com/vercel/next.js
examples/cms-sanity/app/(blog)/layout.tsx
// Copyright 2006, 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 ...
c
github
https://github.com/google/googletest
googletest/include/gtest/gtest_prod.h
# -*- 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
# Swift Runtime Libraries This directory contains the pieces of the Swift runtime libraries. ## Development While we're bringing up the new standard library build, please do not commit the standard library source files. Use the `Resync.cmake` file to copy the files as needed. ```sh $ cmake -P Resync.cmake ``` > [!...
unknown
github
https://github.com/apple/swift
Runtimes/Readme.md
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from examples/modular-transformers/modular_from_uppercase_model.py. # Do NOT edit this file manually as any edits will be overwritten by the g...
python
github
https://github.com/huggingface/transformers
examples/modular-transformers/modeling_from_uppercase_model.py
# Orca # # Copyright 2006-2009 Sun Microsystems Inc. # # 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 License, or (at your option) any later version. # # This...
unknown
codeparrot/codeparrot-clean
""" Base test classes for LMS instructor-initiated background tasks """ import os import json from mock import Mock import shutil import unicodecsv from uuid import uuid4 from celery.states import SUCCESS, FAILURE from django.core.urlresolvers import reverse from django.conf import settings from django.test.testcases...
unknown
codeparrot/codeparrot-clean
#![warn(rust_2018_idioms)] #![cfg(feature = "full")] use tokio::io::{duplex, AsyncReadExt, AsyncWriteExt}; #[tokio::test] async fn ping_pong() { let (mut a, mut b) = duplex(32); let mut buf = [0u8; 4]; a.write_all(b"ping").await.unwrap(); b.read_exact(&mut buf).await.unwrap(); assert_eq!(&buf, b...
rust
github
https://github.com/tokio-rs/tokio
tokio/tests/io_mem_stream.rs
# Copyright 2023 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 applicabl...
python
github
https://github.com/huggingface/transformers
src/transformers/models/align/__init__.py
import types import mock import pytest import librarian.data.meta.archive as mod # UNIT TESTS @mock.patch.object(mod, 'exts') @mock.patch.object(mod.Archive, 'MetaWrapper') @mock.patch.object(mod.Archive.Processor, 'is_entry_point') def test__analyze(is_entry_point, MetaWrapper, exts): is_entry_point.return_val...
unknown
codeparrot/codeparrot-clean
// For format details, see https://containers.dev/implementors/json_reference/. { "name": "Rails project development", "dockerComposeFile": "compose.yaml", "service": "rails", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Features to add to the dev container. More info: https://containers.d...
json
github
https://github.com/rails/rails
.devcontainer/devcontainer.json
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """OSX platform implementation.""" import errno import functools import os from collections import namedtuple from . import _commo...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # from gppylib.testold.testDriver import TestDriver from gppylib.programs.clsSystemState import * from gppylib.mainUtils import * from gppylib.testold.testUtils import * from gppylib.system import fileSystemImplTest, fileSystemInterface from gppylib.gplog import get_default_logger programName =...
unknown
codeparrot/codeparrot-clean
from django.urls import path from . import views urlpatterns = [ path("request_attrs/", views.request_processor), path("debug/", views.debug_processor), path("csp_nonce/", views.csp_nonce_processor), ]
python
github
https://github.com/django/django
tests/context_processors/urls.py
# 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 applica...
unknown
codeparrot/codeparrot-clean
#![cfg(feature = "macros")] #![allow(clippy::disallowed_names)] use std::sync::Arc; #[cfg(all(target_family = "wasm", not(target_os = "wasi")))] #[cfg(target_pointer_width = "64")] use wasm_bindgen_test::wasm_bindgen_test as test; #[cfg(all(target_family = "wasm", not(target_os = "wasi")))] use wasm_bindgen_test::wasm...
rust
github
https://github.com/tokio-rs/tokio
tokio/tests/macros_join.rs
"""AnalogInput.py Part of the AQuA Cesium Controller software package author=Martin Lichtman created=2014-08-19 modified>=2014-08-19 This file holds everything needed to set up a finite acquisition of a fixed number of data points during the experiment from a National Instruments DAQmx card. It communicates to LabVie...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.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...
unknown
codeparrot/codeparrot-clean
import logging import sys from datetime import datetime, timedelta from traceback import format_tb from pytz import utc from apscheduler.events import ( JobExecutionEvent, EVENT_JOB_MISSED, EVENT_JOB_ERROR, EVENT_JOB_EXECUTED) async def run_coroutine_job(job, jobstore_alias, run_times, logger_name): """Corou...
unknown
codeparrot/codeparrot-clean
"""Test zha fan.""" from unittest.mock import call, patch from homeassistant.components import fan from homeassistant.const import STATE_ON, STATE_OFF, STATE_UNAVAILABLE from homeassistant.components.fan import ATTR_SPEED, DOMAIN, SERVICE_SET_SPEED from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_ON, SERVIC...
unknown
codeparrot/codeparrot-clean
import logging import os import sys PROJECT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) # Overrides for os.environ env_ext = {'DJANGO_SETTINGS_MODULE': 'settings'} def setup_env(): """Configures app engine environment for command-line apps.""" # Try to import the appengine code from the...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import _pytest._code import inspect import os import py import pytest import sys import types from _pytest import runner, main, outcomes class TestSetupState(object): def test_setup(self, testdir): ss = runner.SetupS...
unknown
codeparrot/codeparrot-clean
--- title: getRSCStream unstable: true --- # unstable_getRSCStream <!-- ⚠️ ⚠️ IMPORTANT ⚠️ ⚠️ Thank you for helping improve our documentation! This file is auto-generated from the JSDoc comments in the source code, so please edit the JSDoc comments in the file below and this file will be re-generated once those cha...
unknown
github
https://github.com/remix-run/react-router
docs/api/rsc/getRSCStream.md
"""TELNET client class. Based on RFC 854: TELNET Protocol Specification, by J. Postel and J. Reynolds Example: >>> from telnetlib import Telnet >>> tn = Telnet('www.python.org', 79) # connect to finger port >>> tn.write('guido\r\n') >>> print tn.read_all() Login Name TTY Idle When ...
unknown
codeparrot/codeparrot-clean
"""Collect instruction counts for continuous integration.""" # mypy: ignore-errors import argparse import hashlib import json import time from typing import Union from core.expand import materialize from definitions.standard import BENCHMARKS from execution.runner import Runner from execution.work import WorkOrder ...
python
github
https://github.com/pytorch/pytorch
benchmarks/instruction_counts/applications/ci.py
from django.db import models class Bar(models.Model): name = models.CharField(max_length=5) class Meta: app_label = "complex_app"
python
github
https://github.com/django/django
tests/admin_scripts/complex_app/models/bar.py
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockitousage.stubbing; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import static org.mockit...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockitousage/stubbing/BasicStubbingTest.java
# Volatility # Copyright (c) 2008-2013 Volatility Foundation # Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu> # # This file is part of Volatility. # # Volatility 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...
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...
cpp
github
https://github.com/nodejs/node
deps/LIEF/src/PE/resources/ResourceDialog.cpp
import re import os import tempfile import numpy,math,random import time from PyML.utils import misc rfCodeLocation = os.path.join(os.environ['HOME'], 'random_forests/rf5.f') from PyML.evaluators import assess from PyML.classifiers.baseClassifiers import Classifier def substituteInt(string, number, line) : retu...
unknown
codeparrot/codeparrot-clean
import logging import os import sys from mongoengine.errors import NotUniqueError sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)) + "/../") import base from pulp_cds.api.managers.cds_cluster import CDSClusterManager log = logging.getLogger(__name__) class TestCDSClusterManager(base.BaseTestCase): ...
unknown
codeparrot/codeparrot-clean