code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
/*
* 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/validation/SimpleErrors.java |
#
# 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 | ||
import numpy as np
from sklearn.utils.testing import (assert_array_almost_equal,
assert_array_equal, assert_true, assert_raise_message)
from sklearn.datasets import load_linnerud
from sklearn.cross_decomposition import pls_
from nose.tools import assert_equal
def test_pls():
d = ... | unknown | codeparrot/codeparrot-clean | ||
/*-------------------------------------------------------------------------
*
* assert.c
* Assert support code.
*
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* src/backend/utils/error/as... | c | github | https://github.com/postgres/postgres | src/backend/utils/error/assert.c |
#!/usr/bin/env python
from ConfigParser import ConfigParser
from twisted.web import http
from twisted.internet import protocol
from twisted.internet import reactor, threads
from twisted.web.server import Site
from twisted.web.static import File
from twisted.web.resource import Resource
from twisted.web.error import No... | unknown | codeparrot/codeparrot-clean | ||
module.exports = {
data: "ok",
default: "default"
}; | javascript | github | https://github.com/webpack/webpack | test/cases/mjs/cjs-import-default/cjs.js |
# -*- 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 | ||
//===----------------------------------------------------------------------===//
//
// 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
//
//===---------------------------... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/clang-tidy/bugprone/ComparePointerToMemberVirtualFunctionCheck.cpp |
"""
=================================================================
Permutation Importance with Multicollinear or Correlated Features
=================================================================
In this example, we compute the permutation importance on the Wisconsin
breast cancer dataset using :func:`~sklearn.i... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from shuup.apps import AppConfig
class ShuupNotifyAppConfig(AppC... | unknown | codeparrot/codeparrot-clean | ||
"""
Timezone-related classes and functions.
"""
from datetime import datetime, timedelta, tzinfo
from threading import local
import pytz
from django.conf import settings
from django.utils import lru_cache, six
from django.utils.decorators import ContextDecorator
__all__ = [
'utc', 'get_fixed_timezone',
'get... | unknown | codeparrot/codeparrot-clean | ||
##########################################################
# THIS IS A GENERATED FILE -- DO NOT MODIFY.
# IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE
# AND REGENERATE THE MATRIX SUITES.
#
# matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/replica_sets... | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/matrix_suites/generated_suites/replica_sets_jscore_pqs_hints.yml |
import {runAllRoleManagementCommandsTests} from "jstests/auth/role_management_commands_lib.js";
let conn = MongoRunner.runMongod({auth: "", useHostname: false});
runAllRoleManagementCommandsTests(conn);
MongoRunner.stopMongod(conn); | javascript | github | https://github.com/mongodb/mongo | jstests/auth/role_management_commands_standalone.js |
#Your code here
#You can import some modules or create additional functions
def checkio(maze_map):
#replace this for solution
#This is just example for first maze
MOVE = {"S": (1, 0), "N": (-1, 0), "W": (0, -1), "E": (0, 1)}
copy_maze_map = [row[:] for row in maze_map]
#print type(copy_maze_map)
... | unknown | codeparrot/codeparrot-clean | ||
'''
Functions for handling star formation rates
'''
import time
import numpy as np
# --- local ---
import util as UT
def LogSFR_sfms(logMstar, z_in, sfms_dict=None):
''' Wrapper for SFMS star formation rates
'''
if sfms_dict['name'] == 'constant_offset':
# the offset from the average SFMS is pre... | unknown | codeparrot/codeparrot-clean | ||
/*
* GIT - The information manager from hell
*
* Copyright (C) Linus Torvalds, 2005
* Copyright (C) Johannes Schindelin, 2005
*
*/
#include "git-compat-util.h"
#include "abspath.h"
#include "advice.h"
#include "date.h"
#include "branch.h"
#include "config.h"
#include "dir.h"
#include "parse.h"
#include "convert.... | c | github | https://github.com/git/git | config.c |
from __future__ import division
import statsmodels.tsa.stattools as sta
import linecache
from random import shuffle
from math import isnan
import numpy as np
from numpy import mean
import time
import sys
import os
mydir = os.path.expanduser("~/GitHub/Micro-Encounter")
sys.path.append(mydir + "/model/bide")
import bide... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
The rrule module offers a small, complete, and very fast, implementation of
the recurrence rules documented in the
`iCalendar RFC <http://www.ietf.org/rfc/rfc2445.txt>`_,
including support for caching of results.
"""
import itertools
import datetime
import calendar
import sys
from fractions... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright (c) 2013, 2025, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is designed to work with certain software (including... | c | github | https://github.com/mysql/mysql-server | include/my_icp.h |
import {Component, output} from '@angular/core';
@Component({
selector: 'app-child',
styles: `
.btn {
padding: 5px;
}
`,
template: ` <button class="btn" (click)="addItem()">Add Item</button> `,
})
export class Child {
addItem() {}
} | typescript | github | https://github.com/angular/angular | adev/src/content/tutorials/learn-angular/steps/9-output/src/app/child.ts |
#include <cmath>
#include <limits>
#include <vector>
#include <c10/util/Half.h>
#include <c10/util/floating_point_utils.h>
#include <c10/util/irange.h>
#include <gtest/gtest.h>
namespace {
float halfbits2float(unsigned short h) {
unsigned sign = ((h >> 15) & 1);
unsigned exponent = ((h >> 10) & 0x1f);
unsigned... | cpp | github | https://github.com/pytorch/pytorch | c10/test/util/Half_test.cpp |
# Copyright 2012 NEC Corporation
# Copyright 2015 Cisco Systems, 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
#
# Un... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright 2015 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 appli... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) 2010 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | java | github | https://github.com/google/guava | android/guava/src/com/google/common/base/Ascii.java |
/*
* 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... | kotlin | github | https://github.com/spring-projects/spring-framework | framework-docs/src/main/kotlin/org/springframework/docs/integration/mailusage/OrderManager.kt |
#
# gdb helper commands and functions for Linux kernel debugging
#
# module tools
#
# Copyright (c) Siemens AG, 2013
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
from linux import cpus, utils
module_type = utils.CachedType("stru... | 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/jmx/support/MBeanRegistrationSupport.java |
"""
======================================================
Imputing missing values before building an estimator
======================================================
This example shows that imputing the missing values can give better
results than discarding the samples containing any missing value.
Imputing does not ... | unknown | codeparrot/codeparrot-clean | ||
trigger:
batch: true
branches:
include:
- devel
- stable-*
pr:
autoCancel: true
branches:
include:
- devel
- stable-*
schedules:
- cron: 0 7 * * *
displayName: Nightly
always: true
branches:
include:
- devel
- stable-*
variables:
- name: c... | unknown | github | https://github.com/ansible/ansible | .azure-pipelines/azure-pipelines.yml |
#!/usr/bin/python
# Copyright (c) 2013 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.
""" Look through skia-autogen, searching for all checksums which should have
corresponding files in Google Storage, and verify that th... | unknown | codeparrot/codeparrot-clean | ||
//// [tests/cases/conformance/classes/classStaticBlock/classStaticBlock6.ts] ////
//// [classStaticBlock6.ts]
class B {
static a = 1;
}
class C extends B {
static {
let await = 1;
let arguments = 1;
let eval = 1;
}
static {
await: if (true) {
}
argume... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/classStaticBlock6(target=es5).js |
#!/usr/bin/env python
from __future__ import print_function
import sys
import gi
from gi.repository import GObject as gobject, Gst as gst
from livestreamer import Livestreamer, StreamError, PluginError, NoPluginError
def exit(msg):
print(msg, file=sys.stderr)
sys.exit()
class LivestreamerPlayer(object):
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# (c) 2016, Tomas Karasek <tom.to.the.k@gmail.com>
# (c) 2016, Matt Baldwin <baldwin@stackpointcloud.com>
# (c) 2016, Thibaud Morel l'Horset <teebes@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, divisi... | unknown | codeparrot/codeparrot-clean | ||
import pickle
import unittest
from collections.abc import Iterator, Iterable
from string.templatelib import Template, Interpolation, convert
from test.test_string._support import TStringBaseCase, fstring
class TestTemplate(unittest.TestCase, TStringBaseCase):
def test_common(self):
self.assertEqual(type(... | python | github | https://github.com/python/cpython | Lib/test/test_string/test_templatelib.py |
#
# The Python Imaging Library.
# $Id$
#
# EPS file handling
#
# History:
# 1995-09-01 fl Created (0.1)
# 1996-05-18 fl Don't choke on "atend" fields, Ghostscript interface (0.2)
# 1996-08-22 fl Don't choke on floating point BoundingBox values
# 1996-08-23 fl Handle files from Macintosh (0.3)
# 2001-02-17 fl ... | unknown | codeparrot/codeparrot-clean | ||
/* Copyright 2022 - 2025 R. Thomas
*
* 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... | unknown | github | https://github.com/nodejs/node | deps/LIEF/include/LIEF/DWARF/types/Base.hpp |
from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:9332")
else:
access = Serv... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
'''
Production Configurations
- Use djangosecure
- Use Amazon's S3 for storing static files and uploaded media
- Use sendgrid to send emails
- Use MEMCACHIER on Heroku
'''
from __future__ import absolute_import, unicode_literals
from boto.s3.connection import OrdinaryCallingFormat
from django.... | unknown | codeparrot/codeparrot-clean | ||
#
# ff7.scene - Final Fantasy VII battle scene handling
#
# Copyright (C) 2014 Christian Bauer <www.cebix.net>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all... | unknown | codeparrot/codeparrot-clean | ||
import collections
NOT_FLATTEN_KEYS = ['additionalIdentifiers',
'additionalClassifications',
'suppliers',
'changes',
'tenderers'
]
class IdValue(str):
'''This is basically a string but is used to differentiate itsel... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
require "cases/helper"
require "models/topic"
require "models/person"
class ConfirmationValidationTest < ActiveModel::TestCase
def teardown
Topic.clear_validators!
end
def test_no_title_confirmation
Topic.validates_confirmation_of(:title)
t = Topic.new(author_name: "... | ruby | github | https://github.com/rails/rails | activemodel/test/cases/validations/confirmation_validation_test.rb |
# -*- coding: utf-8 -*-
###############################################################################
#
# ListZoneOperations
# Retrieves the list of Zone Operation resources contained within the specified Zone.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, V... | unknown | codeparrot/codeparrot-clean | ||
"""Ported cmemcached tests"""
import pylibmc
from nose.tools import eq_
from tests import PylibmcTestCase
class TestCmemcached(PylibmcTestCase):
def testSetAndGet(self):
self.mc.set("num12345", 12345)
eq_(self.mc.get("num12345"), 12345)
self.mc.set("str12345", "12345")
eq_(self.mc.... | unknown | codeparrot/codeparrot-clean | ||
"""
Atomic coordinate featurizer.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
__author__ = "Joseph Gomes and Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "LGPL v2.1+"
import numpy as np
from deepchem.utils.... | unknown | codeparrot/codeparrot-clean | ||
"""HTML 2.0 parser.
See the HTML 2.0 specification:
http://www.w3.org/hypertext/WWW/MarkUp/html-spec/html-spec_toc.html
"""
from warnings import warnpy3k
warnpy3k("the htmllib module has been removed in Python 3.0",
stacklevel=2)
del warnpy3k
import sgmllib
from formatter import AS_IS
__all__ = ["HTMLPars... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
# Copyright (C) 2010 Andras Becsi (abecsi@inf.u-szeged.hu), University of Szeged
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following c... | unknown | codeparrot/codeparrot-clean | ||
"""
A Django command that dumps the structure of a course as a JSON object.
The resulting JSON object has one entry for each module in the course:
{
"$module_url": {
"category": "$module_category",
"children": [$module_children_urls... ],
"metadata": {$module_metadata}
},
"$module_url": ....
...
... | unknown | codeparrot/codeparrot-clean | ||
/*
* subtrans.h
*
* PostgreSQL subtransaction-log manager
*
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/access/subtrans.h
*/
#ifndef SUBTRANS_H
#define SUBTRANS_H
extern void SubTransSetParent(Tr... | c | github | https://github.com/postgres/postgres | src/include/access/subtrans.h |
"""Ttk wrapper.
This module provides classes to allow using Tk themed widget set.
Ttk is based on a revised and enhanced version of
TIP #48 (http://tip.tcl.tk/48) specified style engine.
Its basic idea is to separate, to the extent possible, the code
implementing a widget's behavior from the code implementing its
ap... | unknown | codeparrot/codeparrot-clean | ||
"""Platform for the Aladdin Connect cover component."""
import logging
from aladdin_connect import AladdinConnectClient
import voluptuous as vol
from homeassistant.components.cover import (
PLATFORM_SCHEMA,
SUPPORT_CLOSE,
SUPPORT_OPEN,
CoverDevice,
)
from homeassistant.const import (
CONF_PASSWORD... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Favien documentation build configuration file, created by
# sphinx-quickstart on Sat Sep 6 16:22:43 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# aut... | unknown | codeparrot/codeparrot-clean | ||
class HParams(object):
def __init__(self, **kwargs):
self._items = {}
for k, v in kwargs.items():
self._set(k, v)
def _set(self, k, v):
self._items[k] = v
setattr(self, k, v)
def __str__(self):
return str(self._items)
def parse(self, str_value):
... | unknown | codeparrot/codeparrot-clean | ||
input = """
strategic(451)|strategic(412)|strategic(1560).
strategic(1399)|strategic(1168)|strategic(1834)|strategic(726).
strategic(1291)|strategic(1361)|strategic(68).
strategic(610)|strategic(572)|strategic(1343)|strategic(783).
strategic(729)|strategic(1448)|strategic(113)|strategic(1649).
strategic(301)|strategic(... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# coding: utf-8 -*-
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
# 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 | ||
import sys
import os
from multiprocessing import Process, Queue, Manager
from threading import Timer
from wadi_harness import Harness
from wadi_debug_win import Debugger
import time
import hashlib
def test(msg):
while True:
print 'Process 2:' + msg
#print msg
def test2():
print 'Process 1'
time.sleep(2)
while ... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.server.config.yaml
import com.charleskorn.kaml.Yaml
import com.charleskorn.kaml.YamlMap
import io.ktor.server.config.*
import kotlinx.serialization.Serializable
import kotlinx... | kotlin | github | https://github.com/ktorio/ktor | ktor-server/ktor-server-config-yaml/jvmAndPosix/test/YamlConfigTest.kt |
# -*- coding: utf-8 -*-
import logging
import os
import time
import openerp
import openerp.addons.hw_proxy.controllers.main as hw_proxy
import threading
import subprocess
from openerp import http
from openerp.http import request
from openerp.tools.translate import _
_logger = logging.getLogger(__name__)
upgrade_temp... | unknown | codeparrot/codeparrot-clean | ||
import argparse
import os
import sys
import textwrap
import pandas as pd
# Hack to have something similar to DISABLED_TEST. These models are flaky.
flaky_models = {
"yolov3",
"detectron2_maskrcnn_r_101_c4",
"XGLMForCausalLM", # discovered in https://github.com/pytorch/pytorch/pull/128148
"moondream"... | python | github | https://github.com/pytorch/pytorch | benchmarks/dynamo/check_accuracy.py |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | python | github | https://github.com/apache/airflow | airflow-core/src/airflow/api_fastapi/core_api/datamodels/version.py |
---
applies_to:
stack: ga
serverless: ga
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/es-build-connector.html
---
# Self-managed connectors [es-build-connector]
::::{admonition} Naming history
Self-managed connectors were initially known as "connector clients". You might find ... | unknown | github | https://github.com/elastic/elasticsearch | docs/reference/search-connectors/self-managed-connectors.md |
''' Convenience class for writing cron scripts'''
# pylint: disable=R0903
# Copyright 2014 42Lines, Inc.
# Original Author: Jim Browne
#
# 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
#
# ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# Copyright 2003, 2004 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
import BoostBuild
t = BoostBuild.Tester()
# Regression test: when staging V2 used to change suffixes on targets
# corr... | unknown | codeparrot/codeparrot-clean | ||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, 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
#
# ... | unknown | codeparrot/codeparrot-clean | ||
/*
Copyright 2017-2021 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CORE_POINTER_TRAITS_HPP
#define BOOST_CORE_POINTER_TRAITS_HPP
#include <boost/config.hpp>
#include <boost/core/addressof.hpp>
#include <c... | unknown | github | https://github.com/mysql/mysql-server | extra/boost/boost_1_87_0/boost/core/pointer_traits.hpp |
"""
LUFA Library
Copyright (C) Dean Camera, 2017.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
"""
"""
Front-end programmer for the LUFA HID class bootloader.
Usage:
python hid_bootloader_loader.py <Device> <Input>.hex
Example:
python hid_bootload... | unknown | codeparrot/codeparrot-clean | ||
from shared import RequestHandler, cross_origin
import json #hm
class GraphQLEndpoint(RequestHandler):
def get(self):
"""
Renders the GraphiQL IDE, populated with a query if it exists
"""
query = self.request.GET.get('query')
# this does shit all, but might be useful later
... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
from .mtv import MTVServicesInfoExtractor
from .common import InfoExtractor
class ComedyCentralIE(MTVServicesInfoExtractor):
_VALID_URL = r'''(?x)https?://(?:www\.)?cc\.com/
(video-clips|episodes|cc-studios|video-collections|shows(?=/[^/]+/(?!full-episodes)))
... | unknown | codeparrot/codeparrot-clean | ||
"""SCons.Tool.sunf95
Tool-specific initialization for sunf95, the Sun Studio F95 compiler.
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, 20... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) 2008 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | java | github | https://github.com/google/guava | android/guava-testlib/src/com/google/common/collect/testing/testers/ListRemoveTester.java |
# -*- coding: utf-8 -*-
# Import Python Libs
from __future__ import absolute_import
import multiprocessing
import ctypes
import logging
import os
import hashlib
import shutil
import binascii
# Import Salt Libs
import salt.crypt
import salt.payload
import salt.master
import salt.utils.event
from salt.utils.cache impor... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env bash
# Copyright 2023 The Cockroach Authors.
#
# Use of this software is governed by the CockroachDB Software License
# included in the /LICENSE file.
BASE_SHA="$1"
HEAD_SHA="$2"
if [ -z "$HEAD_SHA" ];then
echo "Usage: $0 <base-sha> <head-sha>"
exit 1
fi
git diff --name-only "${BASE_SHA}..${H... | unknown | github | https://github.com/cockroachdb/cockroach | build/ghactions/changed-go-pkgs.sh |
#
# 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 | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import pytz
import pytest
def test_utcts_fail():
from pynunzen.helpers import utcts
dt = datetime.datetime(2017, 1, 1, 12, 0, 0)
mytz = pytz.timezone('Europe/Amsterdam')
dt = mytz.normalize(mytz.localize(dt, is_dst=True))
with pytest.rai... | unknown | codeparrot/codeparrot-clean | ||
#############################################################################
##
## Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
##
## This file is part of PyQt4.
##
## This file may be used under the terms of the GNU General Public License
## version 3.0 as published by the Free Softwar... | unknown | codeparrot/codeparrot-clean | ||
test_kind: js_test
selector:
roots:
- src/mongo/db/modules/*/jstests/streams_kafka/*.js
exclude_files:
- src/mongo/db/modules/enterprise/jstests/streams_kafka/kafka_utils.js
executor:
fixture:
class: ReplicaSetFixture
mongod_options:
bind_ip_all: ""
set_parameters:
enableTest... | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/suites/streams_kafka.yml |
"""Support for information from HP iLO sensors."""
from datetime import timedelta
import logging
import hpilo
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_HOST,
CONF_MONITORED_VARIABLES,
CONF_NAME,
CONF_PASSWORD,
CONF_P... | unknown | codeparrot/codeparrot-clean | ||
from ctypes import c_void_p
from django.contrib.gis.geos.error import GEOSException
# Trying to import GDAL libraries, if available. Have to place in
# try/except since this package may be used outside GeoDjango.
try:
from django.contrib.gis import gdal
except ImportError:
# A 'dummy' gdal module.
class ... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017-2018 Matthias Klumpp <matthias@tenstral.net>
#
# Licensed under the GNU Lesser General Public License Version 3
#
# This program 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... | unknown | codeparrot/codeparrot-clean | ||
/*
Copyright 2020 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/kubelet/util/nodelease.go |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pyatv/mrp/protobuf/RemoveClientMessage.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as ... | unknown | codeparrot/codeparrot-clean | ||
import os
import subprocess
import sys
from PyQt5 import QtCore, QtWidgets
from ouf.filemodel.proxymodel import FileProxyModel
from ouf.view.filenamedelegate import FileNameDelegate
from ouf import shortcuts
# TODO: modifiers to open in new window
# TODO: switch icons / tree
# TODO: modify icon size
class FileView(... | unknown | codeparrot/codeparrot-clean | ||
import numpy as np
from numpy.testing import assert_equal, assert_, assert_raises
import pandas
import pandas.util.testing as ptesting
from statsmodels.base import data as sm_data
from statsmodels.formula import handle_formula_data
#class TestDates(object):
# @classmethod
# def setupClass(cls):
# nrows =... | unknown | codeparrot/codeparrot-clean | ||
"""
==============================================================
Post-tuning the decision threshold for cost-sensitive learning
==============================================================
Once a classifier is trained, the output of the :term:`predict` method outputs class
label predictions corresponding to a thre... | python | github | https://github.com/scikit-learn/scikit-learn | examples/model_selection/plot_cost_sensitive_learning.py |
---
name: Bug report
about: Report a problem to help us improve
---
<!--
Thanks for taking an interest in Scrapy!
If you have a question that starts with "How to...", please see the Scrapy Community page: https://scrapy.org/community/.
The GitHub issue tracker's purpose is to deal with bug reports and feature reques... | unknown | github | https://github.com/scrapy/scrapy | .github/ISSUE_TEMPLATE/bug_report.md |
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package stackplan
import (
"context"
"fmt"
"github.com/zclconf/go-cty/cty"
"github.com/hashicorp/terraform/internal/addrs"
"github.com/hashicorp/terraform/internal/collections"
"github.com/hashicorp/terraform/internal/configs"
"github.com/... | go | github | https://github.com/hashicorp/terraform | internal/stacks/stackplan/from_plan.go |
//go:build linux
package bridge
import (
"context"
"errors"
"fmt"
"os"
"github.com/containerd/log"
"github.com/moby/moby/v2/daemon/libnetwork/drivers/bridge/internal/firewaller"
)
const (
ipv4ForwardConf = "/proc/sys/net/ipv4/ip_forward"
ipv6ForwardConfDefault = "/proc/sys/net/ipv6/conf/default/forwa... | go | github | https://github.com/moby/moby | daemon/libnetwork/drivers/bridge/setup_ip_forwarding.go |
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org 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 Reserved.
#
# Con... | unknown | codeparrot/codeparrot-clean | ||
"""
Testing for export functions of decision trees (sklearn.tree.export).
"""
from io import StringIO
from re import finditer, search
from textwrap import dedent
import numpy as np
import pytest
from numpy.random import RandomState
from sklearn.base import is_classifier
from sklearn.exceptions import NotFittedError
... | python | github | https://github.com/scikit-learn/scikit-learn | sklearn/tree/tests/test_export.py |
import sys
import re
import socket
import helpers
import options
import client
import server
import firewall
import hostwatch
from helpers import log, Fatal
# 1.2.3.4/5 or just 1.2.3.4
def parse_subnet4(s):
m = re.match(r'(\d+)(?:\.(\d+)\.(\d+)\.(\d+))?(?:/(\d+))?$', s)
if not m:
raise Fatal('%r is not... | unknown | codeparrot/codeparrot-clean | ||
{
"schemaVersion": 1,
"title": "V2 Comprehensive Migration Test Dashboard",
"services": {
"filter": {
"time": {
"from": "now-6h",
"to": "now"
},
"list": [
{
"name": "server",
"type": "query",
"datasource": "prometheus",
"query":... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/testdata/input/v2.panels-and-services.json |
# -*- coding: utf-8 -*-
"""
Dependencies: flask, tornado
"""
from __future__ import absolute_import, division, print_function
import random
import math
from flask import request, current_app, url_for
from ibeis.control import controller_inject
from ibeis import constants as const
from ibeis.constants import KEY_DEFAULT... | unknown | codeparrot/codeparrot-clean | ||
import pytest
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.exceptions import OutputParserException
from langchain_classic.agents.output_parsers.react_single_input import (
ReActSingleInputOutputParser,
)
def test_action() -> None:
"""Test standard parsing of action/action inp... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/tests/unit_tests/agents/output_parsers/test_react_single_input.py |
<!DOCTYPE html>
<html lang="en">
<head>
<title>DownloadResponse Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></scrip... | html | github | https://github.com/Alamofire/Alamofire | docs/Structs/DownloadResponse.html |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package database
import (
"context"
"strings"
"testing"
"github.com/hashicorp/vault/helper/namespace"
"github.com/hashicorp/vault/helper/versions"
"github.com/hashicorp/vault/sdk/helper/consts"
"github.com/hashicorp/vault/sdk/logical"
)
f... | go | github | https://github.com/hashicorp/vault | builtin/logical/database/path_config_connection_test.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 n... | java | github | https://github.com/apache/kafka | clients/src/test/java/org/apache/kafka/common/requests/ListOffsetsRequestTest.java |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package pki
import (
"context"
"encoding/pem"
"fmt"
"net/http"
"strings"
"time"
"github.com/hashicorp/vault/builtin/logical/pki/issuing"
"github.com/hashicorp/vault/builtin/logical/pki/observe"
"github.com/hashicorp/vault/builtin/logical... | go | github | https://github.com/hashicorp/vault | builtin/logical/pki/path_fetch.go |
import numpy as np
import pytest
from pandas.errors import DataError
from pandas.core.dtypes.common import pandas_dtype
from pandas import (
NA,
DataFrame,
Series,
)
import pandas._testing as tm
# gh-12373 : rolling functions error on float32 data
# make sure rolling functions works for different dtypes... | python | github | https://github.com/pandas-dev/pandas | pandas/tests/window/test_dtypes.py |
import EventHandler from '../../src/dom/event-handler.js'
import Modal from '../../src/modal.js'
import ScrollBarHelper from '../../src/util/scrollbar.js'
import {
clearBodyAndDocument, clearFixture, createEvent, getFixture, jQueryMock
} from '../helpers/fixture.js'
describe('Modal', () => {
let fixtureEl
befor... | javascript | github | https://github.com/twbs/bootstrap | js/tests/unit/modal.spec.js |
/*
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/apis/authentication/doc.go |
/*
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.analysis.api.projectStructure
/**
* A list of all modules of type [M] that the ... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/projectStructure/dependencies.kt |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.