code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# (C) Copyright 2015,2016 Hewlett Packard Enterprise Development Company LP import logging import os from six.moves import configparser import monasca_setup.agent_config import monasca_setup.detection from monasca_setup.detection.utils import find_process_name log = logging.getLogger(__name__) mysql_conf = '/root/....
unknown
codeparrot/codeparrot-clean
"""This test checks for correct fork() behavior. """ import _imp as imp import os import signal import sys import threading import time import unittest from test.fork_wait import ForkWait from test import support from test.support import warnings_helper # Skip test if fork does not exist. if not support.has_fork_sup...
python
github
https://github.com/python/cpython
Lib/test/test_fork1.py
"""A vector store stores embedded data and performs vector search. One of the most common ways to store and search over unstructured data is to embed it and store the resulting embedding vectors, and then query the store and retrieve the data that are 'most similar' to the embedded query. """ from __future__ import a...
python
github
https://github.com/langchain-ai/langchain
libs/core/langchain_core/vectorstores/base.py
import numpy from chainer.backends import cuda from chainer import optimizer _default_hyperparam = optimizer.Hyperparameter() _default_hyperparam.lr = 0.001 _default_hyperparam.eps = 1e-8 class AdaGradRule(optimizer.UpdateRule): """Update rule of AdaGrad. See :class:`~chainer.optimizers.AdaGrad` for the de...
unknown
codeparrot/codeparrot-clean
from itertools import product import pickle import numpy as np from scipy.sparse import (bsr_matrix, coo_matrix, csc_matrix, csr_matrix, dok_matrix, lil_matrix) from sklearn import metrics from sklearn.cross_validation import train_test_split, cross_val_score from sklearn.utils.testing impor...
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-beans/src/main/java/org/springframework/beans/factory/config/ConfigurableBeanFactory.java
<?php namespace Illuminate\Routing; use Illuminate\Container\Container; use Illuminate\Routing\Contracts\CallableDispatcher as CallableDispatcherContract; use ReflectionFunction; class CallableDispatcher implements CallableDispatcherContract { use ResolvesRouteDependencies; /** * The container instance...
php
github
https://github.com/laravel/framework
src/Illuminate/Routing/CallableDispatcher.php
import {Component, signal, computed, effect, ChangeDetectionStrategy} from '@angular/core'; @Component({ selector: 'app-root', template: ` <div [class]="themeClass()"> <h2>Theme Manager with Effects</h2> <div class="controls"> <button (click)="toggleTheme()"> Switch to ...
typescript
github
https://github.com/angular/angular
adev/src/content/tutorials/signals/steps/10-reacting-to-signal-changes-with-effect/answer/src/app/app.ts
from django.db import models from itertools import chain BUBBLE_ACTIONS = ( (1, 'link'), (2, 'pop'), (3, 'modal'), (4, 'ajax_crumb'), ) class Bubble(models.Model): url=models.CharField(max_length=300, blank=True, null=True...
unknown
codeparrot/codeparrot-clean
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Title: CURLOPT_PRIVATE Section: 3 Source: libcurl See-also: - CURLINFO_PRIVATE (3) - CURLOPT_STDERR (3) - CURLOPT_VERBOSE (3) Protocol: - All Added-in: 7.10.3 --- # NAME CURLOPT_PRIVATE - store a private pointer # SY...
unknown
github
https://github.com/curl/curl
docs/libcurl/opts/CURLOPT_PRIVATE.md
import logging import six from grab.spider.base import Spider from grab.spider.error import SpiderInternalError from grab.util.config import build_root_config, build_spider_config SPIDER_REGISTRY = {} logger = logging.getLogger('grab.util.module') def build_spider_registry(config): SPIDER_REGISTRY.clear() o...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 us...
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
it("should not have access to require, module and define", () => { expect( typeof require === "undefined" || require.webpackTestSuiteRequire ).toBe(true); expect(typeof module === "undefined" || module.webpackTestSuiteModule).toBe( true ); expect(typeof define).toBe("undefined"); });
javascript
github
https://github.com/webpack/webpack
test/cases/mjs/type-module/index.js
"""CAS authentication middleware""" from urllib import urlencode import datetime from django.http import HttpResponseRedirect, HttpResponseForbidden from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.views import login, logout from django.core.urlresolvers im...
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...
unknown
github
https://github.com/apache/hadoop
hadoop-common-project/hadoop-common/src/site/markdown/release/2.6.4/CHANGELOG.2.6.4.md
{ "scripts": { "antora": "node npm/antora.js" }, "dependencies": { "@antora/cli": "3.2.0-alpha.11", "@antora/site-generator": "3.2.0-alpha.11", "@antora/atlas-extension": "1.0.0-alpha.5", "@springio/antora-extensions": "1.14.7", "@springio/antora-xref-extension": "1.0.0-alpha.5", "@spr...
json
github
https://github.com/spring-projects/spring-boot
antora/package.json
# -*- coding: utf-8 -*- # # Copyright (C) 2010-2012 Sebastien Helleu <flashcode@flashtux.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; either version 3 of the License, or # (at your opt...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/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 # "Lice...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2013 ISP RAS. # 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 ...
unknown
codeparrot/codeparrot-clean
import time import unittest from ptyprocess.ptyprocess import _is_solaris from ptyprocess import PtyProcess class PtyEchoTestCase(unittest.TestCase): def _read_until_eof(self, proc): """Read away all output on ``proc`` until EOF.""" while True: try: proc.read() ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ Auth* related model. This is where the models used by the authentication stack are defined. It's perfectly fine to re-use this definition in the depotexample application, though. """ import os from datetime import datetime from hashlib import sha256 __all__ = ['User', 'Group', 'Permission...
unknown
codeparrot/codeparrot-clean
import sqlite3 import pandas as pd import csv import gzip from collections import defaultdict if __name__ == '__main__': conn = sqlite3.connect('data/instacart.db') c = conn.cursor() # Obtain the average number of sales per customer q = """ SELECT user_id, AVG(n_items) as avg_items FROM ( ...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2007 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for generic file descriptor based reactor support code. """ from twisted.trial.unittest import TestCase from twisted.internet.abstract import isIPAddress class AddressTests(TestCase): """ Tests for address-related functio...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 Tesora Inc. # 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 a...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import, unicode_literals import socket from kombu.mixins import ConsumerMixin from .case import Case, Mock, ContextMock, patch def Message(body, content_type='text/plain', content_encoding='utf-8'): m = Mock(name='Message') m.body = body m.content_type = content_type ...
unknown
codeparrot/codeparrot-clean
from collections import namedtuple from datetime import datetime, timedelta from django.shortcuts import get_object_or_404 from django.utils.timezone import now import django_filters from rest_framework.views import APIView from rest_framework.viewsets import ReadOnlyModelViewSet from rest_framework.response import R...
unknown
codeparrot/codeparrot-clean
name: 📚 Documentation Issue description: Something is wrong with the React Router docs title: "[Docs]: " labels: - docs body: - type: markdown attributes: value: | Thank you for contributing! For documentation updates - we would happily accept PRs, so feel free to update and open...
unknown
github
https://github.com/remix-run/react-router
.github/ISSUE_TEMPLATE/documentation_isse.yml
# Copyright (C) 2010 Google, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
unknown
codeparrot/codeparrot-clean
from sympy import ( Add, Mul, S, Symbol, cos, cot, pi, I, sin, sqrt, tan, root, powsimp, symbols, sinh, cosh, tanh, coth, Dummy) from sympy.simplify.fu import ( L, TR1, TR10, TR10i, TR11, TR12, TR12i, TR13, TR14, TR15, TR16, TR111, TR2, TR2i, TR3, TR5, TR6, TR7, TR8, TR9, TRmorrie, _TR56 as T, hyper...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, parse_filesize, unified_strdate, ) class XboxClipsIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?xboxclips\.com/(?:video\.php\?.*vid=|[^/]+/)(?P<id>[\w-]{36})' _TEST...
unknown
codeparrot/codeparrot-clean
// Copyright The Prometheus 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 w...
go
github
https://github.com/prometheus/prometheus
promql/promqltest/test_migrate_test.go
// Copyright 2011 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 js package net import ( "os" "syscall" ) func fileConn(f *os.File) (Conn, error) { return nil, syscall.ENOPROTOOPT } func fileListen...
go
github
https://github.com/golang/go
src/net/file_stub.go
''' A simple cache class for downloading URLs to disk, if necessary. Copyright 2014, Konstantin Tretyakov Licensed under MIT. ''' import json import os import os.path import urllib class HttpException(Exception): pass class ErrorAwareURLOpener(urllib.FancyURLopener): def http_error_default(self, url, fp, errco...
unknown
codeparrot/codeparrot-clean
# The Python Imaging Library. # $Id$ # # WAL file handling # # History: # 2003-04-23 fl created # # Copyright (c) 2003 by Fredrik Lundh. # # See the README file for information on usage and redistribution. # # NOTE: This format cannot be automatically recognized, so the reader # is not registered for use with Image....
unknown
codeparrot/codeparrot-clean
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Union, Optional from typing_extensions import Literal, Annotated, TypeAlias from ..._utils import PropertyInfo from ..._models import BaseModel __all__ = ["CreateEvalJSONLRunDataSource", "Source", "So...
python
github
https://github.com/openai/openai-python
src/openai/types/evals/create_eval_jsonl_run_data_source.py
# # simple Tokenizer for Matlab / Octave code # import re class Token(object): NAME = 1 OP = 2 COMMENT = 3 NL = 4 WHITESPACE = 5 def __init__(self, content, type): self.content = content self.type = type def __str__(self): return '"%s" [%s]' % (self.content, self....
unknown
codeparrot/codeparrot-clean
import os import sys import shutil from optparse import make_option from django.conf import settings from django.core.files.storage import get_storage_class from django.core.management.base import CommandError, NoArgsCommand from django.contrib.staticfiles import finders class Command(NoArgsCommand): """ Com...
unknown
codeparrot/codeparrot-clean
/* ** $Id: lbaselib.c,v 1.191.1.6 2008/02/14 16:46:22 roberto Exp $ ** Basic library ** See Copyright Notice in lua.h */ #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define lbaselib_c #define LUA_LIB #include "lua.h" #include "lauxlib.h" #include "lualib.h" /* ** If your system do...
c
github
https://github.com/redis/redis
deps/lua/src/lbaselib.c
//go:build linux || freebsd package zfs import ( "context" "fmt" "os" "os/exec" "path" "strconv" "strings" "sync" "time" "github.com/containerd/log" zfs "github.com/mistifyio/go-zfs/v4" "github.com/moby/locker" "github.com/moby/moby/v2/daemon/graphdriver" "github.com/moby/moby/v2/daemon/internal/mountr...
go
github
https://github.com/moby/moby
daemon/graphdriver/zfs/zfs.go
#include "test/jemalloc_test.h" #define ARENA_RESET_PROF_C_ #include "arena_reset.c"
c
github
https://github.com/redis/redis
deps/jemalloc/test/unit/arena_reset_prof.c
from __future__ import unicode_literals from django.contrib.auth import (login as auth_login, authenticate, logout as auth_logout, get_user_model) from django.contrib.auth.decorators import login_required from django.contrib.messages import info, error from django.core.urlresolvers imp...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 import werkzeug.datastructures from jinja2 import Markup, escape from flask import request, session, current_app from wtforms.fields import HiddenField from wtforms.widgets import HiddenInput from wtforms.validators import ValidationError from wtforms.ext.csrf.form import SecureForm from ._compat impo...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python2.7 -u import sys import os import subprocess import time from datetime import datetime import shutil import tempfile import hashlib import re import logging import argparse ################ #### InfluxDB Variables ################ # Packaging variables PACKAGE_NAME = "influxdb" INSTALL_ROOT_DIR = "...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2012 Nippon Telegraph and Telephone 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 appli...
unknown
codeparrot/codeparrot-clean
########################################################################## # # Copyright (c) 2010-2011, Image Engine Design 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: # # * Redis...
unknown
codeparrot/codeparrot-clean
#! /usr/bin/env python from time import strftime, localtime def convert_h(): f = open("_hermes_common_api_new.h", "w") f.write("/* Generated by convert_api.py on %s */\n\n" % \ strftime("%a %b %d %H:%M:%S %Y", localtime())); lines = open("_hermes_common_api.h").readlines() line = lines[0];...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import from datetime import timedelta from functools import wraps from apscheduler.schedulers.base import BaseScheduler from apscheduler.util import maybe_ref try: from tornado.ioloop import IOLoop except ImportError: # pragma: nocover raise ImportError('TornadoScheduler requi...
unknown
codeparrot/codeparrot-clean
"""Exceptions used throughout package""" from __future__ import absolute_import class PipError(Exception): """Base pip exception""" class InstallationError(PipError): """General exception during installation""" class UninstallationError(PipError): """General exception during uninstallation""" class Dist...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 from __future__ import unicode_literals import re from hashlib import sha1 from .common import InfoExtractor from ..compat import compat_urllib_parse_urlencode from ..utils import ( ExtractorError, determine_ext, float_or_none, int_or_none, unified_strdate, ) class ProSiebenSat1...
unknown
codeparrot/codeparrot-clean
"""DataUpdateCoordinator for the Verisure integration.""" from __future__ import annotations from datetime import timedelta from verisure import ( Error as VerisureError, ResponseError as VerisureResponseError, Session as Verisure, ) from homeassistant.config_entries import ConfigEntry from homeassistant...
unknown
codeparrot/codeparrot-clean
"""An extensible library for opening URLs using a variety of protocols The simplest way to use this module is to call the urlopen function, which accepts a string containing a URL or a Request object (described below). It opens the URL and returns the results as file-like object; the returned object has some extra me...
python
github
https://github.com/python/cpython
Lib/urllib/request.py
from datetime import date class ProbElt: def __init__(self, ID): self.id = ID self.AC = False self.first_sub = None self.first_AC = None self.sub_till_AC = 0 def update(self, status, date_sub): if not self.AC: if self.sub_till_AC == 0: self.first_sub = date_sub if status == 'AC': self.AC = ...
unknown
codeparrot/codeparrot-clean
import { test } from '../../test'; export default test({ html: ` <div> <p class="default">default fallback content</p> <input slot="bar"> </div> <div> <p class="default">default fallback content</p> bar fallback </div> ` });
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/component-slot-fallback-empty/_config.js
// Copyright 2018 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 js && wasm package syscall import ( errorspkg "errors" "internal/oserror" "internal/strconv" "sync" "unsafe" ) const direntSize = 8 + 8 + 2 +...
go
github
https://github.com/golang/go
src/syscall/syscall_js.go
import json from django.contrib.postgres import forms, lookups from django.contrib.postgres.fields.array import ArrayField from django.core import exceptions from django.db.models import Field, TextField, Transform from django.utils import six from django.utils.encoding import force_text from django.utils.translation ...
unknown
codeparrot/codeparrot-clean
from langchain_core.language_models import ( BaseLanguageModel, LanguageModelInput, LanguageModelOutput, get_tokenizer, ) from langchain_core.language_models.base import _get_token_ids_default_method __all__ = [ "BaseLanguageModel", "LanguageModelInput", "LanguageModelOutput", "_get_tok...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/schema/language_model.py
<?php declare(strict_types=1); /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Command...
php
github
https://github.com/composer/composer
src/Composer/Command/FundCommand.php
/* Copyright 2019 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/util/matmul_bcast.h
#-*- coding: ISO-8859-1 -*- # pysqlite2/test/transactions.py: tests transactions # # Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages #...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2008 Mikeal Rogers # # 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 agre...
unknown
codeparrot/codeparrot-clean
Please submit a new Abseil Issue using the template below: ## [Short title of proposed API change(s)] -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ## Background [Provide the background information th...
unknown
github
https://github.com/mysql/mysql-server
extra/abseil/abseil-cpp-20230802.1/ABSEIL_ISSUE_TEMPLATE.md
from config.redfish1_0_config import * from config.settings import * from on_http_redfish_1_0 import RedfishvApi as redfish from modules.httpd import Httpd, BaseHandler, open_ssh_forward from modules.logger import Log from modules.worker import WorkerThread, WorkerTasks from proboscis.asserts import assert_equal from p...
unknown
codeparrot/codeparrot-clean
{ "private": true, "scripts": { "prepare": "panda codegen", "dev": "next dev", "build": "next build", "start": "next start", "lint": "eslint ." }, "dependencies": { "next": "latest", "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@pandacss/dev": "^0.1...
json
github
https://github.com/vercel/next.js
examples/panda-css/package.json
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or mo...
unknown
codeparrot/codeparrot-clean
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
c
github
https://github.com/curl/curl
lib/urlapi.c
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import os import pytest from translate.sto...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='Test that adding/removing many notes triggers automatic fanout restructuring' . ./test-lib.sh path_has_fanout() { path=$1 && fanout=$2 && after_last_slash=$(($(test_oid hexsz) - $fanout * 2)) && echo $path | grep -q -E "^([0-9a-f]{2}/){$fanout}[0-9a-f]{$after_last_slash}$" } touched_...
unknown
github
https://github.com/git/git
t/t3305-notes-fanout.sh
# Copyright 2014 Google Inc. 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python """Schema validation of ansible-base's ansible_builtin_runtime.yml and collection's meta/runtime.yml""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import datetime import os import re import sys from distutils.version import StrictVersion from functools...
unknown
codeparrot/codeparrot-clean
# -*- encoding: utf-8 -*- ############################################################################## # # Partner Address on Map module for Odoo # Copyright (C) 2015 Akretion (http://www.akretion.com) # @author: Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can re...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 --- $id: http://devicetree.org/schemas/i2c/i2c-imx-lpi2c.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Freescale Low Power Inter IC (LPI2C) for i.MX maintainers: - Shawn Guo <shawnguo@kernel.org> - Sascha Hauer <s.hauer@peng...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
--- mapped_pages: - https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-disk-usage.html applies_to: serverless: unavailable stack: all navigation_title: Analyze index disk usage --- # Analyze index disk usage API example The `_disk_usage` API analyzes how much disk space each field in an index ...
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/elasticsearch/rest-apis/index-disk-usage.md
__description__ = \ """ pytc GUI using PyQt5. """ __author__ = "Hiranmyai Duvvuri" __date__ = "2017-01-06" from . import dialogs, widgets from .fit_container import FitContainer from pytc.global_fit import GlobalFit from PyQt5.QtCore import pyqtSignal from PyQt5 import QtWidgets as QW from matplotlib.backends.backe...
unknown
codeparrot/codeparrot-clean
"""Update commands that are send to the balancer manager. """ class UpdateMember(object): """A command that updates a single member. """ # pylint: disable = too-few-public-methods # pylint: disable = too-many-instance-attributes def __init__(self, cluster_name, member): """Creates a new up...
unknown
codeparrot/codeparrot-clean
__author__ = 'ZSGX' import mysql.connector from model.group import Group from model.contact import Contact import re class DbFixture: def __init__(self, host, name, user, password): self.host = host self.name = name self.user = user self.password = password self.connection...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import re import base64 from .common import InfoExtractor from ..utils import ( unified_strdate, int_or_none, ) class VideoTtIE(InfoExtractor): _WORKING = False ID_NAME = 'video.tt' IE_DESC = 'video.tt - Your True Tube' _VALID_URL = r'https?://(?:www\.)...
unknown
codeparrot/codeparrot-clean
/* Copyright 2024 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/volume/selinuxwarning/selinux_warning_controller_test.go
# Copyright (c) 2013, OpenStack # 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 b...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 ####################### # ACE3 Setup Script # ####################### import os import sys import shutil import platform import subprocess import winreg ######## GLOBALS ######### MAINDIR = "z" PROJECTDIR = "ace" CBA = "P:\\x\\cba" ########################## def main(): FULLDIR = "{}\\{...
unknown
codeparrot/codeparrot-clean
#This demo displays a binary clock on the blinkytape. #This is a key test file for the firmware... If it does something that looks goofy, #it's probably to make sure a feature gets exercised. import sys sys.path.append("../frame_protocol_client") from BlinkyTape_3 import BlinkyTape, RGB from datetime import datetime f...
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
import * as mod from "./generated/module.js"; export { mod }
javascript
github
https://github.com/webpack/webpack
test/benchmarkCases/future-defaults/index.js
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'ReportRun' db.create_table(u'ilsgateway_reportrun', ( (u'id', self.gf('django.db.model...
unknown
codeparrot/codeparrot-clean
import unittest from dnd_character import Character, modifier # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 class DndCharacterTest(unittest.TestCase): def test_ability_modifier_for_score_3_is_n4(self): self.assertEqual(modifier(3), -4) def test_ability_modifier_for_scor...
unknown
codeparrot/codeparrot-clean
import os import stat import sys import tempfile import unittest import zipfile from django.core.exceptions import SuspiciousOperation from django.test import SimpleTestCase from django.utils import archive try: import bz2 # NOQA HAS_BZ2 = True except ImportError: HAS_BZ2 = False try: import lzma ...
python
github
https://github.com/django/django
tests/utils_tests/test_archive.py
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
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/ControlledShutdownRequest.json
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/clients/admin/internals/StaticBrokerStrategy.java
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT use std::path::Path; use clap::Parser; use crate::{ error::{Context, ErrorExt}, helpers::{app_paths::resolve_tauri_dir, prompts}, Result, }; #[derive(Clone)] enum TomlOr...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri-cli/src/acl/permission/add.rs
use crate::spec::{Env, Os, TargetOptions, base, cvs}; pub(crate) fn opts() -> TargetOptions { let base = base::msvc::opts(); TargetOptions { os: Os::Windows, env: Env::Msvc, vendor: "pc".into(), dynamic_linking: true, dll_prefix: "".into(), dll_suffix: ".dll".in...
rust
github
https://github.com/rust-lang/rust
compiler/rustc_target/src/spec/base/windows_msvc.rs
package client import ( "context" "net/url" "strconv" ) // ContainerStopOptions holds the options for [Client.ContainerStop]. type ContainerStopOptions struct { // Signal (optional) is the signal to send to the container to (gracefully) // stop it before forcibly terminating the container with SIGKILL after the ...
go
github
https://github.com/moby/moby
client/container_stop.go
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014 Zuza Software Foundation # # This file is part of translate. # # translate is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of t...
unknown
codeparrot/codeparrot-clean
import pytest from ledger.compact_merkle_tree import CompactMerkleTree from plenum.common.constants import AUDIT_TXN_VIEW_NO, AUDIT_TXN_PP_SEQ_NO, TXN_METADATA, TXN_PAYLOAD, TXN_PAYLOAD_DATA from plenum.common.ledger import Ledger from plenum.server.consensus.checkpoint_service import CheckpointService @pytest.fixtur...
unknown
codeparrot/codeparrot-clean
//////////////////////////////////////////////////////////////////////////// // // Copyright 2019 Realm 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/li...
swift
github
https://github.com/realm/realm-swift
RealmSwift/Nonsync.swift
__VERSION__="ete2-2.2rev1056" # -*- coding: utf-8 -*- # #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://ete.cgenomics.org # # ETE is free software: you can redistribute it and/or modify it # under the term...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package server import ( "context" "fmt" "strings" "time" "github.com/cockroachdb/cockroach/pkg/server/authserver" "github.com/cockroachdb/cockroach/pkg/server/se...
go
github
https://github.com/cockroachdb/cockroach
pkg/server/combined_statement_stats.go
#!/usr/bin/env python import os import sys import requests from db_s3_utils import ( get_db_checksum, get_git_sha, get_prev_db_data, set_db_data, JSON_DATA_FILE, DB_FILE, ) BUCKET_NAME = os.getenv('AWS_DB_S3_BUCKET', 'bedrock-db-dev') REGION_NAME = os.getenv('AWS_DB_REGION', 'us-west-2') S3_...
unknown
codeparrot/codeparrot-clean
// Copyright The Prometheus 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 w...
go
github
https://github.com/prometheus/prometheus
util/strutil/quote_test.go