code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
/** * 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...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/codec/HHXORErasureCodec.java
data = ( 'ruk', # 0x00 'rut', # 0x01 'rup', # 0x02 'ruh', # 0x03 'rweo', # 0x04 'rweog', # 0x05 'rweogg', # 0x06 'rweogs', # 0x07 'rweon', # 0x08 'rweonj', # 0x09 'rweonh', # 0x0a 'rweod', # 0x0b 'rweol', # 0x0c 'rweolg', # 0x0d 'rweolm', # 0x0e 'rweolb', # 0x0f 'rweols',...
unknown
codeparrot/codeparrot-clean
from pip._vendor.packaging.utils import canonicalize_name from pip._internal.exceptions import CommandError from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Optional, Set, FrozenSet class FormatControl(object): """Helper for managing formats from which a pac...
unknown
codeparrot/codeparrot-clean
""" Sets up the terminal color scheme. """ import os import sys from django.utils import termcolors def supports_color(): """ Returns True if the running system's terminal supports color, and False otherwise. """ unsupported_platform = (sys.platform in ('win32', 'Pocket PC')) # isatty is not ...
unknown
codeparrot/codeparrot-clean
# flake8: noqa # -*- coding: utf-8 -*- import datetime from django.core.exceptions import ObjectDoesNotExist from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): for category_title in orm[ 'multilin...
unknown
codeparrot/codeparrot-clean
// Make sure that listCommands doesn't require authentication. export function runTest(conn) { const admin = conn.getDB("admin"); // Commands should succeed in auth-bypass mode regardless of requiresAuth(). assert.commandWorked(admin.runCommand({listDatabases: 1}), "listDatabases shouldn't work pre-auth");...
javascript
github
https://github.com/mongodb/mongo
jstests/auth/listcommands_preauth_base.js
import "./some-module";
javascript
github
https://github.com/webpack/webpack
test/cases/inner-graph/switch/chunk.js
// @gating @panicThreshold:"none" @compilationMode:"infer" let someGlobal = 'joe'; function Component() { someGlobal = 'wat'; return <div>{someGlobal}</div>; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: [], };
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/should-bailout-without-compilation-infer-mode.js
#!/usr/bin/env python from __future__ import print_function import json from collections import defaultdict import re import time import shutil import unittest from ruffus import pipeline_run, pipeline_printout, Pipeline, transform, follows, posttask, merge, \ mkdir, suffix, originate, regex, inputs, jobs_limit, fi...
unknown
codeparrot/codeparrot-clean
############################################################################### ## ## Copyright (C) 2014 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http:/...
unknown
codeparrot/codeparrot-clean
--- title: <svelte:document> --- ```svelte <svelte:document onevent={handler} /> ``` ```svelte <svelte:document bind:prop={value} /> ``` Similarly to `<svelte:window>`, this element allows you to add listeners to events on `document`, such as `visibilitychange`, which don't fire on `window`. It also lets you use [ac...
unknown
github
https://github.com/sveltejs/svelte
documentation/docs/05-special-elements/03-svelte-document.md
from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = "Useless command." def add_arguments(self, parser): parser.add_argument( "args", metavar="app_label", nargs="*", help="Specify the app label(s) to works ...
python
github
https://github.com/django/django
tests/user_commands/management/commands/hal.py
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing_extensions import Literal, Required, TypedDict __all__ = ["ConversationItemDeleteEventParam"] class ConversationItemDeleteEventParam(TypedDict, total=False): """Send this event wh...
python
github
https://github.com/openai/openai-python
src/openai/types/realtime/conversation_item_delete_event_param.py
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package json import ( "encoding/json" "fmt" ctyjson "github.com/zclconf/go-cty/cty/json" "github.com/hashicorp/terraform/internal/plans" "github.com/hashicorp/terraform/internal/states" "github.com/hashicorp/terraform/internal/tfdiags" ) t...
go
github
https://github.com/hashicorp/terraform
internal/command/views/json/output.go
folder: répertoire
unknown
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/translations/messages.fr.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): # Deleting model 'CourseRegistrationCode' db.delete_table('student_courseregistrationcode') def backward...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from math import sqrt, ceil, floor from PIL import Image from .helpers import get_basename class Tile(object): """Represents a single tile.""" def __init__(self, image, number, position, coords, filename=None): self.image = image self....
unknown
codeparrot/codeparrot-clean
// Copyright 2016 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
client/v3/maintenance.go
# 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 os import stat import sys import tempfile import unittest from django.core.exceptions import SuspiciousOperation from django.test import SimpleTestCase from django.utils import archive class TestArchive(unittest.TestCase): def setUp(self): self.testdir = os.path.join(os.path.dirname(__file__), 'ar...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth.backends import ModelBackend from django.contrib.auth import get_user_model User = get_user_model() class EmailAuthBackend(ModelBackend): def authenticate(self, username=None, password=None, **kwargs): # TODO: auth...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2018 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.moduletest; import org.mockito.Mockito; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; impor...
java
github
https://github.com/mockito/mockito
mockito-integration-tests/module-tests/src/test/java/org/mockito/moduletest/ReplicatingClassLoader.java
self.description = "install with recursive/cascading deps" sp = pmpkg("pacman", "4.0.1-2") sp.depends = ["glibc>=2.15", "curl"] self.addpkg2db("sync", sp) glibcdep = pmpkg("glibc", "2.15-1") self.addpkg2db("sync", glibcdep) gcldep = pmpkg("gcc-libs", "4.6.2-5") gcldep.depends = ["glibc>=2.14"] self.addpkg2db("sync",...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. # # 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...
unknown
codeparrot/codeparrot-clean
# FILE: autoload/conque_term/conque_sole_communicator.py # AUTHOR: Nico Raffo <nicoraffo@gmail.com> # WEBSITE: http://conque.googlecode.com # MODIFIED: 2011-09-02 # VERSION: 2.3, for Vim 7.0 # LICENSE: # Conque - Vim terminal/console emulator # Copyright (C) 2009-2011 Nico Raffo # # MIT License # # Permission i...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.contrib.admin.utils import quote from django.core.urlresolvers import reverse from django.template.response import TemplateResponse from django.test import TestCase, override_settings from .models import Action, Person, Car @override_settings(PASSWORD_HASHERS=('dja...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms o...
unknown
codeparrot/codeparrot-clean
from bpy import data, types, context from .. import logger def _camera(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: """ if isinstance(name, types.Camera): camera = name ...
unknown
codeparrot/codeparrot-clean
//===- bolt/Passes/PointerAuthCFIFixup.h ----------------------------------===// // // 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
bolt/include/bolt/Passes/PointerAuthCFIFixup.h
from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urlparse class TheSceneIE(InfoExtractor): _VALID_URL = r'https?://thescene\.com/watch/[^/]+/(?P<id>[^/#?]+)' _TEST = { 'url': 'https://thescene.com/watch/vogue/narciso-rodriguez-spring-2013-ready-to...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Title: curl_multi_notify_enable Section: 3 Source: libcurl See-also: - CURLMOPT_NOTIFYFUNCTION (3) - CURLMOPT_NOTIFYDATA (3) - curl_multi_notify_disable (3) Protocol: - All Added-in: 8.17.0 --- # NAME curl_multi_notif...
unknown
github
https://github.com/curl/curl
docs/libcurl/curl_multi_notify_enable.md
__all__ = ['logspace', 'linspace'] import numeric as _nx from numeric import array def linspace(start, stop, num=50, endpoint=True, retstep=False): """ Return evenly spaced numbers over a specified interval. Returns `num` evenly spaced samples, calculated over the interval [`start`, `stop` ]. Th...
unknown
codeparrot/codeparrot-clean
name: Windows on: push: pull_request: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true permissions: contents: read jobs: windows-minimal-exts: name: x86 / minimal-exts / lowest-php defaults: run: shell: pwsh runs-on: ...
unknown
github
https://github.com/symfony/symfony
.github/workflows/windows.yml
from collections import OrderedDict import datetime import calendar import pandas as pd from functions import adjust_date_to_EOM from config import config def pricing(price_type="strip", output_excel_file=""): date_series = pd.date_range( config["production_start_date"], periods=config["max_life_months"],...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2013 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
from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlparse, compat_urllib_request, ) from ..utils import ( int_or_none, str_to_int, ) from ..aes import aes_decrypt_text class Tube8IE(InfoExtractor): _VALID_UR...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Ansible, 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 o...
unknown
codeparrot/codeparrot-clean
''' Created on 26.07.2012 @author: michi ''' from PyQt4.QtCore import Qt, pyqtSignal from PyQt4.QtGui import QGraphicsView, QGraphicsItem class FixableGraphicsView(QGraphicsView): scrollingEnabledStateChanged = pyqtSignal(bool) def __init__(self, *args, **kwargs): QGraphicsView.__init__(self, *args,...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import sys; from structs import structs; # command line arguments outfile = sys.argv[1]; archs = sys.argv[2:]; f = open(outfile, "w"); f.write(''' /* * sanity checks for generated foreign headers: * - verify struct sizes * * generated by %s -- DO NOT EDIT */ #include <stdio.h> #include <std...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python import os import re import sys import time import json import common import hashlib import getpass import datetime from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select def downloadaccount(b, params): if "password" not in p...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import re import subprocess import sys import tarfile import tempfile import test_server import unittest import zipfile ...
unknown
codeparrot/codeparrot-clean
from depot.models import Depot, Organization from rental.models import Rental from verleihtool.test import ClientTestCase from datetime import datetime class RentalsTestCase(ClientTestCase): def create_rental(self, depot, firstname, lastname, state): return Rental.objects.create( depot=depot, ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import os import unittest from gppylib.mainUtils import ExceptionNoStackTraceNeeded from gppylib.operations.reload import GpReload from mock import MagicMock, Mock, mock_open, patch class GpReloadTestCase(unittest.TestCase): def setUp(self): class Options: def __init__(...
unknown
codeparrot/codeparrot-clean
""" Simple tester for the vgg19_trainable """ import tensorflow as tf from tensoflow_vgg import vgg19_trainable as vgg19 from tensoflow_vgg import utils img1 = utils.load_image("./test_data/tiger.jpeg") img1_true_result = [1 if i == 292 else 0 for i in range(1000)] # 1-hot result for tiger batch1 = img1.reshape((1...
unknown
codeparrot/codeparrot-clean
import datetime from unittest import skipUnless import ddt import pytz from django.conf import settings from mock import patch, DEFAULT, Mock from openedx.core.djangoapps.schedules.management.commands import SendEmailBaseCommand from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory, SiteC...
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. */ #pragma once #include <cstddef> #include <cstdlib> #include <algorithm> #include <cfloat> #include ...
c
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/quantized/cpu/qnnpack/test/zip-microkernel-tester.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...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Vauxoo C.A. (http://openerp.com.ve/) All Rights Reserved. # Javier Duran <javier@vauxoo.com> # # # WARNING: This program as such is intended to be used by professional # pro...
unknown
codeparrot/codeparrot-clean
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 Lockheed Martin Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
unknown
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...
python
github
https://github.com/apache/airflow
airflow-core/src/airflow/api_fastapi/core_api/routes/ui/connections.py
# encoding: utf-8 from __future__ import unicode_literals from ..compat import compat_urllib_parse from .common import InfoExtractor from ..utils import ( parse_duration, int_or_none, ExtractorError, ) class Porn91IE(InfoExtractor): IE_NAME = '91porn' _VALID_URL = r'(?:https?://)(?:www\.|)91porn\....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (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_v...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2012 Gabriel Henao. # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessi...
unknown
codeparrot/codeparrot-clean
"""Support for the Mopar vehicle lock.""" import logging from homeassistant.components.lock import LockDevice from homeassistant.components.mopar import DOMAIN as MOPAR_DOMAIN from homeassistant.const import STATE_LOCKED, STATE_UNLOCKED _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_entit...
unknown
codeparrot/codeparrot-clean
## Input ```javascript import {useState} from 'react'; function Foo() { const [state, setState] = useState({foo: {bar: 3}}); const foo = state.foo; foo.bar = 1; return state; } ``` ## Error ``` Found 1 error: Error: This value cannot be modified Modifying a value returned from 'useState()', which should ...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.modify-state-2.expect.md
# 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
from math import ceil from pandas import concat, DataFrame from pymongo.errors import AutoReconnect from bamboo.core.frame import add_id_column, DATASET_ID, INDEX from bamboo.lib.datetools import now, parse_timestamp_query from bamboo.lib.mongo import MONGO_ID, MONGO_ID_ENCODED from bamboo.lib.parsing import parse_col...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 #from hamster indicator import gtk import datetime as dt import gobject from hamster.lib import Fact, stuff from hamster.configuration import dialogs, runtime, conf from collections import OrderedDict have_appindicator = True try: import appindicator except: have_appindicator = False def get_s...
unknown
codeparrot/codeparrot-clean
<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl --> # `llist` - linked lists #include "llist.h" This is the internal module for linked lists. The API is designed to be flexible but also to avoid dynamic memory allocation. None of the involved structs should be accesse...
unknown
github
https://github.com/curl/curl
docs/internals/LLIST.md
"""SQLite-specific tests.""" from sqlalchemy.test.testing import eq_, assert_raises, \ assert_raises_message import datetime from sqlalchemy import * from sqlalchemy import exc, sql, schema from sqlalchemy.dialects.sqlite import base as sqlite, \ pysqlite as pysqlite_dialect from sqlalchemy.test import * clas...
unknown
codeparrot/codeparrot-clean
## Input ```javascript function Component(props) { if (props.cond) { return undefined; } return props.value; } export const FIXTURE_ENTRYPOINT = { fn: Component, params: ['TodoAdd'], isComponent: 'TodoAdd', }; ``` ## Code ```javascript function Component(props) { if (props.cond) { return; }...
unknown
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/return-undefined.expect.md
import fs from "node:fs"; import path from "node:path"; import { test, expect } from "@playwright/test"; import getPort from "get-port"; import dedent from "dedent"; import { createProject, build, viteConfig } from "./helpers/vite.js"; const js = String.raw; function createRoute(path: string) { return { [`app/...
typescript
github
https://github.com/remix-run/react-router
integration/vite-manifests-test.ts
# # 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...
unknown
codeparrot/codeparrot-clean
############################################################################### ## ## Copyright (C) 2011-2014 Tavendo GmbH ## ## 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 ## ## h...
unknown
codeparrot/codeparrot-clean
""" This module houses the GEOS ctypes prototype functions for the topological operations on geometries. """ __all__ = ['geos_boundary', 'geos_buffer', 'geos_cascaded_union', 'geos_centroid', 'geos_convexhull', 'geos_difference', 'geos_envelope', 'geos_intersection', 'geos_linemerge', ...
unknown
codeparrot/codeparrot-clean
from django.conf import settings from django.conf.urls import include, url from django.contrib import admin from django.views import generic from django.shortcuts import render from formtools.wizard.views import SessionWizardView from material.frontend import urls as frontend_urls from . import forms def index_view(r...
unknown
codeparrot/codeparrot-clean
//===--- PostOrderAnalysis.h - SIL POT and RPOT Analysis --------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
c
github
https://github.com/apple/swift
include/swift/SILOptimizer/Analysis/PostOrderAnalysis.h
"""SCons.Tool.gcc Tool-specific initialization for MinGW (http://www.mingw.org/) 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 T...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, with_statement import logging import os import signal import subprocess import sys from tornado.httpclient import HTTPClient, HTTPError from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from tornado.log im...
unknown
codeparrot/codeparrot-clean
# Copyright 2010 Michael Murr # # This file is part of LibForensics. # # LibForensics 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 3 of the License, or # (at your option) any later ver...
unknown
codeparrot/codeparrot-clean
from django.db import models from django.template.defaultfilters import default # Create your models here. class Membresia(models.Model): MODALIDAD_CHOICES=( #('D','Diario'), ('M','Mensual'), #('S','Semestral'), #('A','Anual'), ) STATE_CHOICES=( ('A','Activo'), ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- { 'name': 'Logos Set Up Data', 'version': '8.0.1.2.0', 'category': 'Accounting', 'sequence': 14, 'summary': '', 'description': """ Logos Set Up Data & customizations ================================== * make user (commercial) required on partners if "customer" is true * n...
unknown
codeparrot/codeparrot-clean
"""Config flow for BMW ConnectedDrive integration.""" from bimmer_connected.account import ConnectedDriveAccount from bimmer_connected.country_selector import get_region_from_name import voluptuous as vol from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_PASSWORD, CONF_REG...
unknown
codeparrot/codeparrot-clean
--- permalink: /issues.html redirect_to: https://github.com/jekyll/jekyll/issues ---
html
github
https://github.com/jekyll/jekyll
docs/pages/redirects/issues.html
/** * 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...
java
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSError.java
#!/usr/bin/python # Copyright: 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', 'status': ['deprecated'],...
unknown
codeparrot/codeparrot-clean
# ada This project implements WHATWG URL specification in a performant way. The source is pulled from: https://github.com/ada-url/ada Active development occurs in the default branch (currently named `main`). ## Updating See [tools/dep_updaters/README.md#ada](../../tools/dep_updaters/README.md#ada) for instructions...
unknown
github
https://github.com/nodejs/node
deps/ada/README.md
from tkinter import * from tkinter.ttk import Frame, Scrollbar from idlelib import macosx class ScrolledList: default = "(None)" def __init__(self, master, **options): # Create top frame, with scrollbar and listbox self.master = master self.frame = frame = Frame(master) self....
python
github
https://github.com/python/cpython
Lib/idlelib/scrolledlist.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...
typescript
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/src/components/RunTypeIcon.tsx
def dumpSvg(): with open("icons.svg") as f: with open("out.txt", "w+") as o: write = "" content = f.read() parsed = [] for i in content.split('glyph-name="'): try: write += i.split('unicode="')[0].split('"')[0] + "\t" write += i.split('unicode="')[1][0:8] + "\n" except: continue ...
unknown
codeparrot/codeparrot-clean
# (c) 2017, Adrian Likins <alikins@redhat.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) any later vers...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import unittest import re from libs.mock import * from runner.sensei import Sensei from runner.writeln_decorator import WritelnDecorator from runner.mockable_test_result import MockableTestResult from runner import path_to_enlightenment class AboutParrots: ...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
unknown
codeparrot/codeparrot-clean
export * from "react"; export * from "react-dom"; export * from "acorn"; export * from "core-js"; export * from "date-fns"; export * from "lodash"; export * from "lodash-es"; export * from "xxhashjs";
javascript
github
https://github.com/webpack/webpack
examples/lazy-compilation/all.js
#!/usr/bin/env python3 import sys, os from cookiejar import PersistentCookieJar from leftpane import LeftPane from notifier import Notifier from resources import Resources from systray import Systray from wrapper import Wrapper from os.path import expanduser from PyQt4 import QtCore, QtGui, QtWebKit from PyQt4.Qt impor...
unknown
codeparrot/codeparrot-clean
# Import import csv import math import os import random import string import time import webbrowser from contextlib import closing import sys # Get Python version ver = sys.version_info[0] #print('Version: '+str(ver)) if ver==2: # Python 2 import urllib else: # Python 3+ import urllib.request, urllib.pa...
unknown
codeparrot/codeparrot-clean
from flask import * from flask_wtf import FlaskForm from flask_bootstrap import Bootstrap from wtforms import validators, TextField, IntegerField, SubmitField, SelectField, SelectMultipleField from datetime import datetime import psycopg2 import os import urllib.parse as urlparse import subprocess import time from math...
unknown
codeparrot/codeparrot-clean
/** * Test that the replica set connections to the secondaries will have the right auth credentials * even when these connections are shared within the same connection pool. * @tags: [requires_replication] */ import {ReplSetTest} from "jstests/libs/replsettest.js"; let NUM_NODES = 3; let rsTest = new ReplSetTest(...
javascript
github
https://github.com/mongodb/mongo
jstests/auth/repl_auth.js
#!/usr/bin/env python # Copyright 2013 The Flutter 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 argparse import errno import os import shutil import subprocess import sys def main(): parser = argparse.ArgumentParser( ...
unknown
codeparrot/codeparrot-clean
# Create your views here. from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from django.core.context_processors import csrf from django.contrib.auth.decorators import login_required from forms import * @login_required def userprofile(request,action = False): if request...
unknown
codeparrot/codeparrot-clean
//! HTTP response. mod builder; mod head; #[allow(clippy::module_inception)] mod response; pub(crate) use self::head::BoxedResponseHead; pub use self::{builder::ResponseBuilder, head::ResponseHead, response::Response};
rust
github
https://github.com/actix/actix-web
actix-http/src/responses/mod.rs
# # Copyright (C) 2014 Dell, 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 wri...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/interconnect/qcom,sm8550-rpmh.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm RPMh Network-On-Chip Interconnect on SM8550 maintainers: - Abel Vesa <abel.vesa@linaro.org> - Neil Armstr...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/interconnect/qcom,sm8550-rpmh.yaml
package otelutil import ( "os" ) const ( traceParentKey = "traceparent" traceStateKey = "tracestate" // See https://github.com/open-telemetry/opentelemetry-specification/issues/740 // and https://github.com/open-telemetry/oteps/pull/258. traceParentEnvVar = "TRACEPARENT" traceStateEnvVar = "TRACESTATE" ) t...
go
github
https://github.com/moby/moby
daemon/internal/otelutil/environ_carrier.go
<?php namespace Illuminate\Tests\Database; use Illuminate\Contracts\Database\Query\Expression; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Database\Query\Builder as Base...
php
github
https://github.com/laravel/framework
tests/Database/DatabaseEloquentHasOneTest.php
# This code is supporting material for the book # Building Machine Learning Systems with Python # by Willi Richert and Luis Pedro Coelho # published by PACKT Publishing # # It is made available under the MIT License # This script shows an example of simple (ordinary) linear regression # The first edition of the book ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ''' these tables are generated from the STM32 datasheets for the STM32F732 ''' # additional build information for ChibiOS build = { "CHIBIOS_STARTUP_MK" : "os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f7xx.mk", "CHIBIOS_PLATFORM_MK" : "os/hal/ports/STM32/STM32F7xx/platform.mk" ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding:utf-8 -*- # author: lintao from __future__ import print_function class HelperReadOnly(object): def __init__(self, val): self.val = val def __get__(self, obj, objtype): return self.val def __set__(self, obj, val): raise AttributeError("can't modify attribute") cla...
unknown
codeparrot/codeparrot-clean