code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Lice...
unknown
codeparrot/codeparrot-clean
# -*- 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): # Deleting field 'City.e' db.delete_column('geo_city', 'e') # Deleting field 'City.n' db.del...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Queue; class WorkerOptions { /** * The name of the worker. * * @var string */ public $name; /** * The number of seconds to wait before retrying a job that encountered an uncaught exception. * * @var int|int[] */ public $backoff; ...
php
github
https://github.com/laravel/framework
src/Illuminate/Queue/WorkerOptions.php
from symengine import (Symbol, Integer, sympify, SympifyError, log, function_symbol, I, E, pi, oo, zoo, nan, true, false, exp, gamma, have_mpfr, have_mpc, DenseMatrix, sin, cos, tan, cot, csc, sec, asin, acos, atan, acot, acsc, asec, sinh, cosh, tanh, coth, asinh, acosh, atanh, acoth, Ad...
unknown
codeparrot/codeparrot-clean
/* Copyright 2016 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
pkg/controller/deployment/recreate.go
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright: (c) 2019, Bojan Vitnik <bvitnik@mainstream.rs> # 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 import pytest from .FakeAnsibleModule import FakeAns...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 Harry Marr http://hmarr.com/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # wit...
unknown
codeparrot/codeparrot-clean
from ctypes import * import unittest from ctypes.test import xfail class VarSizeTest(unittest.TestCase): @xfail def test_resize(self): class X(Structure): _fields_ = [("item", c_int), ("array", c_int * 1)] self.assertEqual(sizeof(X), sizeof(c_int) * 2) ...
unknown
codeparrot/codeparrot-clean
""" This file shields Flask-User code from database/ORM specific functions. :copyright: (c) 2013 by Ling Thio :author: Ling Thio (ling.thio@gmail.com) :license: Simplified BSD License, see LICENSE.txt for more details.""" from __future__ import print_function from datetime import datetime from flask_login...
unknown
codeparrot/codeparrot-clean
export const object = $state({ ok: true }); export const primitive = $state('nope'); export function update_object() { object.ok = !object.ok; } export function update_primitive() { primitive = 'yep'; }
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/compiler-errors/samples/export-state/main.svelte.js
#![warn(rust_2018_idioms)] #![cfg(all(feature = "full", not(target_os = "wasi")))] // WASI does not support all fs operations use std::io::Write; use tempfile::NamedTempFile; use tokio::fs::OpenOptions; use tokio::io::AsyncReadExt; const HELLO: &[u8] = b"hello world..."; #[tokio::test] async fn open_with_open_option...
rust
github
https://github.com/tokio-rs/tokio
tokio/tests/fs_open_options.rs
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2018, Yanis Guenane <yanis+ansible@guenane.org> # 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':...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from django.core.mail import send_mail from django.db import models from django.utils import timezone from django.utils.http import urlquote try: import re from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, UserManager from django.core import validators f...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import itertools import telemetry.timeline.event_container as event_container import telemetry.timeline.sample as tracing_sample import telemetry.timeline.sl...
unknown
codeparrot/codeparrot-clean
import contextlib import logging import queue import time import unittest import sys import io from concurrent.futures._base import BrokenExecutor from concurrent.futures.process import _check_system_limits from logging.handlers import QueueHandler from test import support from test.support import warnings_helper fr...
python
github
https://github.com/python/cpython
Lib/test/test_concurrent_futures/test_init.py
import urllib from PIL import Image, ImageTk import time def make_request(filename, style_id): import requests r = requests.post('http://turbo.deepart.io/api/post/', data={'style': style_id, 'return_url': 'http://my.return/'}, files={'input_image': ('file.jpg', open(filename, 'rb'), 'ima...
unknown
codeparrot/codeparrot-clean
const { a } = $props();
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/compiler-errors/samples/runes-wrong-props-placement-module/main.svelte.js
from .base_settings import * # Debug ALLOWED_HOSTS = ["localhost"] DEBUG = True MTURK_TARGET = 'sandbox' MTURK_FORM_TARGET = MTURK_FORM_TARGETS[MTURK_TARGET] MTURK_HOST = 'https://localhost:8000' # Database # https://docs.djangoproject.com/en/1.11/ref/settings/#databases DATABASES = { 'test': { 'ENGINE': ...
unknown
codeparrot/codeparrot-clean
""" This module defines export functions for decision trees. """ # Authors: Gilles Louppe <g.louppe@gmail.com> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # Brian Holt <bdholt1@gmail.com> # Noel Dawe <noel@dawe.me> # Satrajit Gosh <satrajit.ghosh@gmail.com> # Trevor...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Script to migrate dataverse projects to accomodate changes in their 4.0 API. This assumes that the script `migrate_credentials_to_token` has been run. Changes: - Rename node_addon.study to node_addon.dataset - Rename node_addon.study_hdl to node_addon.dataset_doi ""...
unknown
codeparrot/codeparrot-clean
--- setup: - do: something: here: ok --- teardown: - do: something_else: here: true --- "First test": - do: something: that_is: true - do: and: again - do: deep: key: "below" body: actions: output: web...
unknown
github
https://github.com/elastic/elasticsearch
build-tools-internal/src/test/resources/rest/transform/text/text_replace_original.yml
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: silent Short: s Help: Silent mode Category: important verbose Added: 4.0 Multi: boolean See-also: - verbose - stderr - no-progress-meter Example: - -s $URL --- # `--silent` Silent or quiet mode. Do not show prog...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/silent.md
#! /usr/bin/env python # -*- coding: utf-8 -*- """Make phone-level target labels for the End-to-End model (TIMIT corpus).""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from os.path import join, basename from tqdm import tqdm from utils.labels.phone i...
unknown
codeparrot/codeparrot-clean
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class Scope(object): USERINFO_PROFILE = "/authenticate" class OrcidAccount(ProviderAccount): def get_profile_url(self): return extract_from_dict(self.account.extr...
unknown
codeparrot/codeparrot-clean
from tests import BaseTestCase from redash.models import db class TestEmbedVisualization(BaseTestCase): def test_sucesss(self): vis = self.factory.create_visualization() vis.query_rel.latest_query_data = self.factory.create_query_result() db.session.add(vis.query_rel) res = self.ma...
unknown
codeparrot/codeparrot-clean
""" Functions for identifying peaks in signals. """ from __future__ import division, print_function, absolute_import import numpy as np from scipy._lib.six import xrange from scipy.signal.wavelets import cwt, ricker from scipy.stats import scoreatpercentile __all__ = ['argrelmin', 'argrelmax', 'argrelextrema', 'find...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Validation\Rules; use Closure; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Collection; use function Illuminate\Support\enum_value; trait DatabaseRule { /** * The table to run the query against. * * @var stri...
php
github
https://github.com/laravel/framework
src/Illuminate/Validation/Rules/DatabaseRule.php
# frozen_string_literal: true require "active_support/core_ext/hash/indifferent_access" module ActiveRecord # = Active Record \Store # # Store gives you a thin wrapper around serialize for the purpose of storing hashes in a single column. # It's like a simple key/value store baked into your record when you do...
ruby
github
https://github.com/rails/rails
activerecord/lib/active_record/store.rb
/* Copyright 2017 - 2025 R. Thomas * Copyright 2017 - 2025 Quarkslab * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
unknown
github
https://github.com/nodejs/node
deps/LIEF/include/LIEF/OAT.hpp
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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 published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
unknown
codeparrot/codeparrot-clean
from datetime import date from django.conf import settings from django.utils.http import int_to_base36, base36_to_int from django.utils.crypto import constant_time_compare, salted_hmac class PasswordResetTokenGenerator(object): """ Strategy object used to generate and check tokens for the password reset me...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** ProcessingLog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************************...
unknown
codeparrot/codeparrot-clean
import sys import os import re import time import base64 import tempfile import subprocess import threading if __name__ == '__main__': print 'Please do not launch this file directly.' sys.exit(0) def module_path(): if hasattr(sys, "frozen"): return os.path.dirname(sys.executable) return os.path.dirname(__file__...
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 u...
unknown
codeparrot/codeparrot-clean
import io import re from os.path import splitext from .settings.group_names import GroupName from .exceptions.processor_errors import InvalidSnippetError, RequiredSettingNotFoundError, \ ToManyDefaultSettingsOccurencesError, IllagalSettingOccurenceError from .kernel_engine import KernelEngine from .output_manager...
unknown
codeparrot/codeparrot-clean
const idx = process.execArgv.indexOf('--cpu-prof') if (idx >= 0) process.execArgv.splice(idx, 1) /** @type {import("next").NextConfig} */ module.exports = { eslint: { ignoreDuringBuilds: true, }, experimental: { // With Scope Hoisting ESM require cost is 0 and that's not what we want to test turbopac...
javascript
github
https://github.com/vercel/next.js
bench/module-cost/next.config.js
# -*- coding: utf-8 -*- from __future__ import unicode_literals import modelcluster.fields import wagtail.wagtailcore.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0010_change_page_owner_to_null_on_delete'), ] operations ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. # # SPDX-License-Identifier: curl name: 'Linux HTTP/3' 'on': push: branches: - master - '*/ci' paths-ignore: - '**/*.md' - '.circleci/**' - 'appveyor.*' - 'Dockerfile' - 'projects/**' pull_request: bran...
unknown
github
https://github.com/curl/curl
.github/workflows/http3-linux.yml
from chainer.backends import cuda from chainer import function_node from chainer import utils from chainer.utils import type_check class LinearInterpolate(function_node.FunctionNode): def check_type_forward(self, in_types): type_check._argname(in_types, ('p', 'x', 'y')) p_type, x_type, y_type = in...
unknown
codeparrot/codeparrot-clean
""" SimpleGtkBuilderApp.py Module that provides an object oriented abstraction to pygtk and gtkbuilder Copyright (C) 2009 Michael Vogt based on ideas from SimpleGladeBuilder by Sandino Flores Moreno """ # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Ge...
unknown
codeparrot/codeparrot-clean
#################################################### #Software License: # #--------------------------------------------------# #The Artistic License 2.0 # # # # Copyright (c) 2016, Daniel Santoyo Gomez. # # ...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/python # # PROCESS.PY # # Description: Sensor fusion for the sonic anemometer # #! /usr/bin/python # # FUSION.PY # # Description: Sensor fusion for the sonic anemometer # import zmq import math import time import numpy as np import hexdump as hx # TODO: Take port as input zmq_CH1 = "tcp://localhost:5555...
unknown
codeparrot/codeparrot-clean
//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts] //// //// [assignmentCompatWithDiscriminatedUnion.ts] // see 'typeRelatedToDiscriminatedType' in checker.ts: // IteratorResult namespace Example1 { type S = { done: boolean, value: number }; ...
javascript
github
https://github.com/microsoft/TypeScript
tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.js
import os import unittest import shelve import glob from test import test_support test_support.import_module('anydbm', deprecated=True) class TestCase(unittest.TestCase): fn = "shelftemp" + os.extsep + "db" def test_close(self): d1 = {} s = shelve.Shelf(d1, protocol=2, writeback=False) ...
unknown
codeparrot/codeparrot-clean
# -*- 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
# test + + print( 97989513389222316022151446562729620153292831887555425160965597396 | 23716683549865351578586448630079789776107310103486834795830390982) print( 53817081128841898634258263553430908085326601592682411889506742059 | 37042558948907407488299113387826240429667200950043601129661240876) print( 261675...
unknown
codeparrot/codeparrot-clean
/* MIT License * * Copyright (c) 2023 Brad House * * 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, modify, ...
c
github
https://github.com/nodejs/node
deps/cares/src/lib/util/ares_rand.c
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
c
github
https://github.com/llvm/llvm-project
clang-tools-extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h
// This code has been modified from its original form by The Cockroach Authors. // All modifications are Copyright 2024 The Cockroach Authors. // // Copyright 2015 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. /...
go
github
https://github.com/cockroachdb/cockroach
pkg/raft/log_test.go
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=no-self-use, pointless-statement, missing-docstring, unneeded-not, len-as-condition import pytest import six from ..match import Match, Matches from ..pattern import StringPattern, RePattern from ..formatters import formatters class TestMatchClass(objec...
unknown
codeparrot/codeparrot-clean
""" pigpio is a Python module for the Raspberry which talks to the pigpio daemon to allow control of the general purpose input outputs (gpios). [http://abyz.co.uk/rpi/pigpio/python.html] *Features* o the pigpio Python module can run on Windows, Macs, or Linux o controls one or more Pi's o independent PWM on any of...
unknown
codeparrot/codeparrot-clean
import os import Image def thumbnail(filename, size='104x104', x2=False): # defining the size x, y = [int(x) for x in size.split('x')] # defining the filename and the miniature filename filehead, filetail = os.path.split(filename) basename, format = os.path.splitext(filetail) miniature = basena...
unknown
codeparrot/codeparrot-clean
{ "components": { "schemas": { "io.k8s.api.admissionregistration.v1alpha1.ApplyConfiguration": { "description": "ApplyConfiguration defines the desired configuration values of an object.", "properties": { "expression": { "description": "expression will be evaluated by C...
json
github
https://github.com/kubernetes/kubernetes
api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json
# general purpose 'tooltip' routines - currently unused in idlefork # (although the 'calltips' extension is partly based on this code) # may be useful for some purposes in (or almost in ;) the current project scope # Ideas gleaned from PySol from tkinter import * class ToolTipBase: def __init__(self, button): ...
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/main/java/org/springframework/context/annotation/PropertySources.java
# Copyright 2016 Pinterest, 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 writi...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de> # Copyright (C) 2016 Takuo Yonezawa <Yonezawa-T2@mail.dnp.co.jp> # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. ...
unknown
codeparrot/codeparrot-clean
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 # This file was automatically generated from src/transformers/models/exaone4/modular_exaone4.py. # Do NOT edit this file manually as any edits will be overwritten by the generation o...
python
github
https://github.com/huggingface/transformers
src/transformers/models/exaone4/configuration_exaone4.py
import type { ThemeConfig } from "antd"; const theme: ThemeConfig = { token: { fontSize: 16, colorPrimary: "#52c41a", }, }; export default theme;
typescript
github
https://github.com/vercel/next.js
examples/with-ant-design/app/themeConfig.ts
# (c) 2017, 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
import json from django.contrib.auth import logout from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseServerError from django.shortcuts import render, HttpResponseRedirect, HttpResponse from django.urls import reverse from django.views.generic.list import View from .forms imp...
unknown
codeparrot/codeparrot-clean
# unit tests for ansible fact collectors # -*- coding: utf-8 -*- # # 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. # # Ansibl...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 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
# Copyright (c) 2006-2011 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
#!/usr/bin/env python # # Copyright 2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
unknown
codeparrot/codeparrot-clean
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. // This is .hpp file included from test_utils.cpp #include <thread> // std::thread #include "opencv2/core/utils/tls.hpp" ...
unknown
github
https://github.com/opencv/opencv
modules/core/test/test_utils_tls.impl.hpp
// // Copyright(c) 2016-2018 Gabi Melman. // Distributed under the MIT License (http://opensource.org/licenses/MIT) // #pragma once // // Include a bundled header-only copy of fmtlib or an external one. // By default spdlog include its own copy. // #include <spdlog/tweakme.h> #if defined(SPDLOG_USE_STD_FORMAT) // S...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/spdlog/include/spdlog/fmt/fmt.h
import Avatar from "./avatar"; import Date from "./date"; import CoverImage from "./cover-image"; import Link from "next/link"; export default function HeroPost({ title, coverImage, date, excerpt, author, slug, }) { return ( <section> <div className="mb-8 md:mb-16"> <CoverImage ...
javascript
github
https://github.com/vercel/next.js
examples/cms-datocms/components/hero-post.js
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
python
github
https://github.com/apache/airflow
airflow-core/tests/unit/utils/test_config.py
from datetime import datetime, timedelta from decimal import Decimal from typing import Optional, Tuple from django.db.models import Count from django.utils import timezone from churchill.apps.profiles.exception import InvalidStatsCalculationStrategyException from churchill.apps.profiles.models import Profile from ch...
unknown
codeparrot/codeparrot-clean
# # TkHelp.py -- help module for Ginga Tk backend # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. class Timer(object): """Abstraction of a GUI-toolkit implemented timer.""" def __init__(self, ival_sec, expire_cb, data=None, tkcanvas=None): ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2013, Dylan Martin <dmartin@seattlecentral.edu> # # 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 ...
unknown
codeparrot/codeparrot-clean
--- layout: page title: Philosophy permalink: /philosophy/ --- Jekyll offers a unique philosophy when approaching the problem of static site generation. This core philosophy drives development and product decisions. When a contributor, maintainer, or user asks herself what Jekyll is about, the following principles sho...
unknown
github
https://github.com/jekyll/jekyll
docs/pages/philosophy.md
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
unknown
codeparrot/codeparrot-clean
import unittest2 as unittest import urllib import parser import scraper known_good_indeces = [1, 2, 3, 11874, 1234] known_metadata_mappings = { 1234 : { 'url_to_lores_img': u'http://digitalmedia.fws.gov/cgi-bin/getimage.exe?CISOROOT=/natdiglib&CISOPTR=1234&DMSCALE=66.66667&DMWIDTH=700&DMHEIGHT=700&DMX=0&...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2023 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.engine.darwin.internal.legacy import io.ktor.client.call.* import io.ktor.http.content.* import io.ktor.utils.io.* import kotlinx.cinterop.* import kotlinx.coroutines.*...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-darwin-legacy/darwin/src/io/ktor/client/engine/darwin/internal/legacy/DarwinLegacyUtils.kt
# ################################ # ######## Imports ################# # ################################ from urllib import unquote, urlencode from sys import exit try: from owslib.wmts import WebMapTileService from owslib.util import ServiceException import owslib print("Depencencies - owslib vers...
unknown
codeparrot/codeparrot-clean
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, 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 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-aop/src/main/java/org/springframework/aop/aspectj/annotation/MetadataAwareAspectInstanceFactory.java
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Mellanox Technologies, Ltd # # 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 # #...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (C) 2014 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.com/license.html. # # This software consists of vo...
unknown
codeparrot/codeparrot-clean
/* src/lib/ares_config.h. Generated from ares_config.h.in by configure. */ /* src/lib/ares_config.h.in. Generated from configure.ac by autoheader. */ /* a suitable file/device to read random data from */ #define CARES_RANDOM_FILE "/dev/urandom" /* Set to 1 if non-pubilc shared library symbols are hidden */ #defin...
c
github
https://github.com/nodejs/node
deps/cares/config/netbsd/ares_config.h
# -*- coding: utf-8 -*- """ Imports and provides the 'correct' version of readline for the platform. Readline is used throughout IPython as:: import IPython.utils.rlineimpl as readline In addition to normal readline stuff, this module provides have_readline boolean and _outputfile variable used in IPython.utils....
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # file fig2pstex.py # This file is part of LyX, the document processor. # Licence details can be found in the file COPYING. # # \author Angus Leeming # \author Bo Peng # # Full author contact details are available in file CREDITS # This script converts an XFIG image to something that latex can...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 """InaSAFE Disaster risk tool by Australian Aid - Parameter definition for Flood Vector on Building QGIS IF Contact : ole.moller.nielsen@gmail.com .. note:: 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 ...
unknown
codeparrot/codeparrot-clean
#ifndef HEADER_CURL_SETUP_OS400_H #define HEADER_CURL_SETUP_OS400_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
c
github
https://github.com/curl/curl
lib/setup-os400.h
#! python # # Python Serial Port Extension for Win32, Linux, BSD, Jython # see __init__.py # # This module implements a simple socket based client. # It does not support changing any port parameters and will silently ignore any # requests to do so. # # The purpose of this module is that applications using pySerial can ...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( clean_html, xpath_text, int_or_none, ) class NTVRuIE(InfoExtractor): IE_NAME = 'ntv.ru' _VALID_URL = r'https?://(?:www\.)?ntv\.ru/(?:[^/]+/)*(?P<id>[^/?#&]+)' _TESTS = [{ 'u...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python3 import argparse from datetime import datetime, timedelta from collections import Callable from getpass import getpass from jira.client import JIRA from jira.exceptions import JIRAError import os import textwrap import color from config import ConfigFile from state import Worklog, Task, GoHome, Dumm...
unknown
codeparrot/codeparrot-clean
import {CONST_STRING0} from 'shared-runtime'; function t(props) { let x = [, CONST_STRING0, props]; return x; } export const FIXTURE_ENTRYPOINT = { fn: t, params: [{a: 1, b: 2}], isComponent: false, };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/holey-array-expr.js
#!/usr/bin/python # A simple python tool to help automate the pulling of a changeset # into a working modules repository. # # Will generate the shell commands to grab the changeset, to be # run in one of the examples directory. # # i.e. in examples/allinone # ./05_up # ./10_setup_master.sh # ./11_setup_havana.sh # pyt...
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
connect/api/src/main/java/org/apache/kafka/connect/util/ConnectorUtils.java
#!/usr/bin/env python import tornado.httpserver import tornado.ioloop import tornado.web import optparse import pprint import Image import StringIO import os import uuid # for downloading PNG image from url import urllib, cStringIO import json # C API wrapper from tesseractcapi import TesseactWrapper # global variab...
unknown
codeparrot/codeparrot-clean
import random from unittest import TestCase from unittest.mock import MagicMock, create_autospec, patch from django.contrib.auth.models import User from django.utils import timezone from learn.infrastructure.configuration import LearnConfiguration from learn.infrastructure.database import Database from learn.models i...
unknown
codeparrot/codeparrot-clean
print ("You enter a dark room with two doors. Do you go through door #1 or door #2?") door = input("> ") if door == "1": print ("There's a giant bear here eating a cheese cake. What do you do?") print ("1. Take the cake.") print ("2. Scream at the bear.") print ("3. Run like you've never run before....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import string import sys import re from Numeric import * from pychart import * from xml.dom import minidom class exception: pass class res: """ A 'structure' representing the results of a test. """ def __init__(self, x_label, y_label, cntnr_list, cntnr_descs, res_sets): self.x_label = x_labe...
unknown
codeparrot/codeparrot-clean
"""Support for WebDav Calendar.""" import copy from datetime import datetime, timedelta import logging import re import caldav import voluptuous as vol from homeassistant.components.calendar import ( ENTITY_ID_FORMAT, PLATFORM_SCHEMA, CalendarEventDevice, calculate_offset, get_date, is_offset_...
unknown
codeparrot/codeparrot-clean
package config import ( "context" "strings" "github.com/containerd/log" "github.com/moby/moby/v2/daemon/libnetwork/cluster" "github.com/moby/moby/v2/daemon/libnetwork/datastore" "github.com/moby/moby/v2/daemon/libnetwork/ipamutils" "github.com/moby/moby/v2/pkg/plugingetter" ) const ( warningThNetworkControlP...
go
github
https://github.com/moby/moby
daemon/libnetwork/config/config.go