code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
#!/usr/bin/env python
# CMCE PDUs
from scapy.packet import Packet, bind_layers
from scapy.fields import BitField, BitEnumField, ConditionalField
from .cmce import D_SDS_DATA
# Table 446: Text message transfer SDU contents
class SDS_TRANSFER(Packet):
name = 'SDS-Transfer'
fields_desc = [
BitField('de... | unknown | codeparrot/codeparrot-clean | ||
import ed25519
from python_sha3.python_sha3 import *
import base64
import hashlib
from binascii import hexlify, unhexlify
class Account:
def __init__(self, hexPrivKey, network='mainnet'):
self.hexPrivKey = hexPrivKey
self.network = network
self._calculateKeyPair()
self._calculateAd... | unknown | codeparrot/codeparrot-clean | ||
---
title: Stores
---
<!-- - how to use
- how to write
- TODO should the details for the store methods belong to the reference section? -->
A _store_ is an object that allows reactive access to a value via a simple _store contract_. The [`svelte/store` module](../svelte-store) contains minimal store implementations w... | unknown | github | https://github.com/sveltejs/svelte | documentation/docs/06-runtime/01-stores.md |
import pymysql
import re
import string
import logging, coloredlogs
from modules.config import *
class Database:
def __init__(self, host, user, password, name, autocommit):
self.host = host
self.user = user
self.password = password
self.name = name
self.autocommit = autocommit
self.db = self.database_conn... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import lambdainst.models
from django.conf import settings
import datetime
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(setti... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | python | github | https://github.com/huggingface/transformers | tests/test_pipeline_mixin.py |
'''"Executable documentation" for the pickle module.
Extensive comments about the pickle protocols and pickle-machine opcodes
can be found here. Some functions meant for external use:
genops(pickle)
Generate all the opcodes in a pickle, as (opcode, arg, position) triples.
dis(pickle, out=None, memo=None, indentl... | python | github | https://github.com/python/cpython | Lib/pickletools.py |
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | unknown | codeparrot/codeparrot-clean | ||
"""
Data migration creation command
"""
from __future__ import print_function
import sys
import os
import re
from optparse import make_option
try:
set
except NameError:
from sets import Set as set
from django.core.management.base import BaseCommand
from django.core.management.color import no_style
from djan... | unknown | codeparrot/codeparrot-clean | ||
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-update... | unknown | github | https://github.com/redis/redis | .github/dependabot.yml |
########
# Copyright (c) 2014 GigaSpaces Technologies Ltd. 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... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Python Serial Port Extension for Win32, Linux, BSD, Jython
# module for serial IO for POSIX compatible systems, like Linux
# see __init__.py
#
# (C) 2001-2010 Chris Liechti <cliechti@gmx.net>
# this is distributed under a free software license, see license.txt
#
# parts based on code from Gran... | unknown | codeparrot/codeparrot-clean | ||
"""
Python shell for Diofant.
This is just a normal Python shell (IPython shell if you have the
IPython package installed), that adds default imports and run
some initialization code.
"""
import argparse
import ast
import atexit
import code
import os
import readline
from diofant.interactive.session import (Automatic... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
###############################################################################
#
# ResetPassword
# Resets a user's password to new randomized password.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you ma... | unknown | codeparrot/codeparrot-clean | ||
/*-------------------------------------------------------------------------
*
* postinit.c
* postgres initialization utilities
*
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* src/backend... | c | github | https://github.com/postgres/postgres | src/backend/utils/init/postinit.c |
# -*- 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):
# Adding model 'Session'
db.create_table('tafe_session', (
('id', self.gf('django.db.models.field... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import collections
import datetime
import errno
import io
import itertools
import json
import locale
import os
import platform
import re
import shutil
import subprocess
import socket
import sys
import time
import tr... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import
from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.exceptions import CommandError
class HelpCommand(Command):
"""Show help for commands"""
name = 'help'
usage = """
%prog <command>"""
sum... | unknown | codeparrot/codeparrot-clean | ||
##########################################################################
#
# Copyright (c) 2008-2013, 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 | ||
// Copyright 2014 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.
int issue8811Initialized = 0;
void issue8811Init() {
} | c | github | https://github.com/golang/go | src/cmd/cgo/internal/test/issue8811.c |
/**
* Constant-time functions
*/
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/
#ifndef MBEDTLS_CONSTANT_TIME_H
#define MBEDTLS_CONSTANT_TIME_H
#include <stddef.h>
/** Constant-time buffer comparison without branches.
*
* This is equivalent to the stan... | c | github | https://github.com/nodejs/node | deps/LIEF/third-party/mbedtls/include/mbedtls/constant_time.h |
/*-------------------------------------------------------------------------
*
* htup_details.h
* POSTGRES heap tuple header definitions.
*
*
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/access/ht... | c | github | https://github.com/postgres/postgres | src/include/access/htup_details.h |
# This code was mostly based on ipaddr-py
# Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/
# Licensed under the Apache License, Version 2.0 (the "License").
from django.core.exceptions import ValidationError
from django.utils.six.moves import xrange
def clean_ipv6_address(ip_str, unpack_ipv4=False,
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2012-2014 Red Hat, 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... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This is a simplified Makefile generator for single-target gyp files.
It was originally designed for generating readable Makefiles for the
the NaCL examples.
"""... | unknown | codeparrot/codeparrot-clean | ||
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.llms import HuggingFaceHub
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DE... | python | github | https://github.com/langchain-ai/langchain | libs/langchain/langchain_classic/llms/huggingface_hub.py |
############################################################################
#
# Program: GDCM (Grassroots DICOM). A DICOM library
#
# Copyright (c) 2006-2011 Mathieu Malaterre
# All rights reserved.
# See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
#
# This software is distributed ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for the gdata_lib module."""
from __future__ import print_function
import getpass
import mox
import re
import atom.service
import gda... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# $Id$
# Copyright (c) 2000-2015 Board of Trustees of Leland Stanford Jr. University,
# all rights reserved.
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | unknown | codeparrot/codeparrot-clean | ||
exports.abc = "abc";
exports.default = "default";
const flagIt = () => (exports.__esModule = true);
const query = __resourceQuery;
if (query.includes("yes")) flagIt(); | javascript | github | https://github.com/webpack/webpack | test/cases/cjs-tree-shaking/mjs/cjs-dynamic.js |
###
# Copyright (c) 2002-2005, Jeremiah Fincher
# 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 co... | unknown | codeparrot/codeparrot-clean | ||
// Text truncate
// Requires inline-block or block for proper styling
@mixin text-truncate() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} | unknown | github | https://github.com/twbs/bootstrap | scss/mixins/_text-truncate.scss |
import wx, os
from pyo import *
s=Server(duplex=1).boot()
wildcard = "AIF (*.aif)|*.aif;*.aiff|" \
"WAV (*.wav)|*.wav;*.wave;*.WAV|" \
class ControlPanel(wx.Panel):
def __init__(self, parent, fxp=None):
wx.Panel.__init__(self, parent)
self.StartStopText = wx.StaticText(self, id=-1,... | unknown | codeparrot/codeparrot-clean | ||
/* Return the full version string. */
#include "Python.h"
#include "patchlevel.h"
static int initialized = 0;
static char version[300];
void _Py_InitVersion(void)
{
if (initialized) {
return;
}
initialized = 1;
#ifdef Py_GIL_DISABLED
const char *buildinfo_format = "%.80s free-threading build... | c | github | https://github.com/python/cpython | Python/getversion.c |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
// 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 ... | go | github | https://github.com/prometheus/prometheus | tsdb/fileutil/flock_test.go |
#define DISABLE_SIGN_COMPARE_WARNINGS
#include "git-compat-util.h"
#include "config.h"
#include "json-writer.h"
#include "repository.h"
#include "run-command.h"
#include "version.h"
#include "trace2/tr2_dst.h"
#include "trace2/tr2_tbuf.h"
#include "trace2/tr2_sid.h"
#include "trace2/tr2_sysenv.h"
#include "trace2/tr2_... | c | github | https://github.com/git/git | trace2/tr2_tgt_event.c |
# Copyright (c) 2016 EMC Corporation
# 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 requir... | unknown | codeparrot/codeparrot-clean | ||
from email import message_from_string
from email.utils import parseaddr
from django.conf import settings
from django.core.files.storage import get_storage_class
import commonware.log
import waffle
from email_reply_parser import EmailReplyParser
from access.models import Group
from users.models import UserProfile
fr... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | unknown | codeparrot/codeparrot-clean | ||
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "migrants.settings")
import django
django.setup()
from migrants.data import centers
from invoke import task
from openpyxl import load_workbook
from openpyxl.cell import get_column_letter
import pycountry
from migrants.base.models import Country, DataCategory, ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Gregory Shulov (gregory.shulov@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... | unknown | codeparrot/codeparrot-clean | ||
"""
====================
Theil-Sen Regression
====================
Computes a Theil-Sen Regression on a synthetic dataset.
See :ref:`theil_sen_regression` for more information on the regressor.
Compared to the OLS (ordinary least squares) estimator, the Theil-Sen
estimator is robust against outliers. It has a breakd... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# + Python 3 support
# + sublime text 3 support
import sublime
import sublime_plugin
# import sys
import os
import glob
import datetime
import zipfile
import re
PACKAGE_NAME = 'SublimeTmpl'
TMLP_DIR = 'templates'
KEY_SYNTAX = 'syntax'
KEY_FILE_EXT = 'extension'
# st3: In... | unknown | codeparrot/codeparrot-clean | ||
from common.exceptions import LogicError
from plenum.common.constants import TXN_TYPE
from plenum.common.messages.node_messages import RequestNack
from plenum.common.request import Request
from plenum.server.request_handlers.handler_interfaces.read_request_handler import ReadRequestHandler
from plenum.server.request_ma... | unknown | codeparrot/codeparrot-clean | ||
"use strict";
import { fileURLToPath } from "node:url";
import { isSwcError, wrapAndReThrowSwcError } from "./errors.js";
import { transformSync } from "./index.js";
export async function load(url, context, nextLoad) {
const { format } = context;
if (format?.endsWith("-typescript")) {
try {
const { source... | javascript | github | https://github.com/nodejs/node | deps/amaro/dist/strip-loader.js |
# -*- test-case-name: twisted.trial.test.test_script -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from __future__ import print_function
import gc
import inspect
import os
import pdb
import random
import sys
import time
import warnings
from twisted.internet import defer
from twisted.app... | unknown | codeparrot/codeparrot-clean | ||
Text to force this as inline.
<docs-pill href="#pill-row" title="Same Page"/>
<docs-pill href="http://angular.dev" title="External Page"/>
<docs-pill href="./this-other-page" title="Another Page"/>
<docs-pill href="./some-target-page" target="_some_target" title="Some Target Page"/>
<docs-pill href="./download-page-exa... | unknown | github | https://github.com/angular/angular | adev/shared-docs/pipeline/shared/marked/test/docs-pill/docs-pill.md |
/*-------------------------------------------------------------------------
*
* reloptions.c
* Core support for relation options (pg_class.reloptions)
*
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIF... | c | github | https://github.com/postgres/postgres | src/backend/access/common/reloptions.c |
## Input
```javascript
import {identity} from 'shared-runtime';
function Component(props) {
let {x} = props;
const foo = () => {
x = identity(props.x);
};
foo();
return {x};
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{x: 42}],
};
```
## Code
```javascript
import { c as _c } fr... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/destructure-object-declaration-to-context-var.expect.md |
#! /usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
"""
oauthlib.oauth1.rfc5849
~~~~~~~~~~~~~~
This module is an implementation of various logic needed
for signing and checking OAuth 1.0 RFC 5849 requests.
"""
from __future__ import absolute_import, unicode_literals
from . import SIGNATURE_METHODS, utils
class RequestValidator(object):
""... | unknown | codeparrot/codeparrot-clean | ||
"""distutils.command.bdist
Implements the Distutils 'bdist' command (create a built [binary]
distribution)."""
import os
from distutils.core import Command
from distutils.errors import *
from distutils.util import get_platform
def show_formats():
"""Print list of available formats (arguments to "--format" option... | unknown | codeparrot/codeparrot-clean | ||
use rustc_data_structures::fx::FxIndexMap;
use rustc_hir::def::DefKind;
use rustc_hir::def_id::DefId;
use rustc_middle::ty::{self, GenericArg, GenericArgKind, Ty, TyCtxt};
use rustc_span::Span;
use tracing::debug;
use super::explicit::ExplicitPredicatesMap;
use super::utils::*;
/// Infer predicates for the items in t... | rust | github | https://github.com/rust-lang/rust | compiler/rustc_hir_analysis/src/outlives/implicit_infer.rs |
import os
from sys import maxint
_proc_status = '/proc/%d/status' % os.getpid()
#_scale = {'kB': 1024.0, 'mB': 1024.0*1024.0,
# 'KB': 1024.0, 'MB': 1024.0*1024.0}
_scale = {'kB': 1, 'mB': 1024, 'gB': 1024 * 1024,
'KB': 1, 'MB': 1024, 'GB': 1024 * 1024}
def _VmB(VmKey):
'''Private.
'''
g... | unknown | codeparrot/codeparrot-clean | ||
""" tests for otupdate.buildroot.file_actions
Checks functionality and error cases for the update utility functions there
"""
import binascii
import hashlib
import os
import subprocess
from unittest import mock
import zipfile
import pytest
from otupdate.buildroot import file_actions
def test_unzip(downloaded_update... | 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 | ||
/*
* 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/access/NotificationListenerRegistrar.java |
#!/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.
try:
import hashlib
_new_md5 = hashlib.md5
except ImportError:
import md5
_new_md5 = md5.new
"""64-bit fingerprint support... | unknown | codeparrot/codeparrot-clean | ||
{
"title": "V18 Gauge Options Migration Test Dashboard",
"schemaVersion": 17,
"panels": [
{
"id": 1,
"type": "gauge",
"title": "Complete Gauge Panel",
"options-gauge": {
"unit": "ms",
"stat": "last",
"decimals": 2,
"prefix": "Value: ",
"suffix": ... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/testdata/input/v18.gauge_options.json |
#!/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 sys
import re
import tarfile
import tempfile
import unittest
from sdktools_test import SdkToolsTestCase
SCRIPT_DI... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2021 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | python | github | https://github.com/huggingface/transformers | src/transformers/cli/add_new_model_like.py |
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.concurrentmockito;
import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock;
import org.junit.Test;
import org.mockito.InOrder;
import org.mockitoutil.TestBase;
... | java | github | https://github.com/mockito/mockito | mockito-core/src/test/java/org/concurrentmockito/VerificationInOrderFromMultipleThreadsTest.java |
from __future__ import unicode_literals
import re
from .common import InfoExtractor
class SexuIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?sexu\.com/(?P<id>\d+)'
_TEST = {
'url': 'http://sexu.com/961791/',
'md5': 'ff615aca9691053c94f8f10d96cd7884',
'info_dict': {
'... | unknown | codeparrot/codeparrot-clean | ||
###############################################################################
##
## Copyright 2011-2013 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 | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2014, Max Riveiro, <kavu13@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... | unknown | codeparrot/codeparrot-clean | ||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Red Hat, 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 requi... | unknown | codeparrot/codeparrot-clean | ||
"""
Skyrock OAuth1 backend, docs at:
http://psa.matiasaguirre.net/docs/backends/skyrock.html
"""
from social.backends.oauth import BaseOAuth1
class SkyrockOAuth(BaseOAuth1):
"""Skyrock OAuth authentication backend"""
name = 'skyrock'
ID_KEY = 'id_user'
AUTHORIZATION_URL = 'https://api.skyrock.com/v... | unknown | codeparrot/codeparrot-clean | ||
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may n... | java | github | https://github.com/apache/kafka | connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/WorkerGroupMember.java |
# Example app with next-sass
This example demonstrates how to use Next.js' built-in Global Sass/Scss imports and Component-Level Sass/Scss modules support.
## Deploy your own
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/e... | unknown | github | https://github.com/vercel/next.js | examples/with-sass/README.md |
/*
@Copyright Barrett Adair 2015-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CLBL_TRTS_IS_CONST_MEMBER_HPP
#define BOOST_CLBL_TRTS_IS_CONST_MEMBER_HPP
#include <boost/callable_traits/detail/core.hpp>
... | unknown | github | https://github.com/mysql/mysql-server | extra/boost/boost_1_87_0/boost/callable_traits/is_const_member.hpp |
# vim: sts=4 sw=4 et
# GladeVcp Widgets
#
# Copyright (c) 2010 Pavel Shramov <shramov@mexmat.net>
#
# 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 2 of the License, or
# (at you... | unknown | codeparrot/codeparrot-clean | ||
"""
Helper functions for loading environment settings.
"""
from __future__ import print_function
import os
import sys
import json
from lazy import lazy
from path import Path as path
import memcache
class Env(object):
"""
Load information about the execution environment.
"""
# Root of the git repositor... | unknown | codeparrot/codeparrot-clean | ||
import array
import codecs
import locale
import os
import pickle
import sys
import threading
import time
import unittest
import warnings
import weakref
from collections import UserList
from test import support
from test.support import os_helper, threading_helper
from test.support.script_helper import assert_python_ok
f... | python | github | https://github.com/python/cpython | Lib/test/test_io/test_textio.py |
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python2
#Dumps the memory of a seagate hd using the jumper pin serial interface
import serial
import sys,os,re,argparse
import time
from wgetstyle import *
debug=0
#automagicly set to 115200 baud
fast=1
#1 is slow 0 is fastest 0.1 is the sweetspot
timeout=0.2
benchmark=1
writing=0
try:
device=sys.argv[... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2012 Rackspace Hosting
# 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 req... | unknown | codeparrot/codeparrot-clean | ||
from script import (
QUERY_TITLES_GET, get_connector, copy_titles, load_config,
update_data, update_many_data, to_chunks
)
from mock import patch
import os
conns = {}
QUERY_TITLES_GET_ORDER = "{} {}".format(
QUERY_TITLES_GET,
'ORDER BY emp_no DESC'
)
def setup_function(function):
conf_db_in, conf_... | unknown | codeparrot/codeparrot-clean | ||
# 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):
# Deleting field 'Source.storage'
db.delete_column('easy_thumbnails_source', 'storage_id')
# Deleting fie... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) 2015 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/src/com/google/common/collect/CollectSpliterators.java |
# Copyright 2017 Capital One Services, 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... | unknown | codeparrot/codeparrot-clean | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/ipmi/ssif-bmc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SSIF IPMI BMC interface
description: SSIF IPMI BMC device bindings
maintainers:
- Quan Nguyen <quan@os.amperecomputing.com>
p... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml |
<?php
namespace Illuminate\Tests\Support;
use Illuminate\Support\ConfigurationUrlParser;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
class ConfigurationUrlParserTest extends TestCase
{
#[DataProvider('databaseUrls')]
public function testDatabaseUrlsAreParsed($config, $expec... | php | github | https://github.com/laravel/framework | tests/Support/ConfigurationUrlParserTest.php |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012, Nachi Ueno, NTT MCL, 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... | unknown | codeparrot/codeparrot-clean | ||
{
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"cors": "^2.8.5",
"next": "latest",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/cors": "^2.8.17",
"@types/node": "^22.10.1",... | json | github | https://github.com/vercel/next.js | examples/api-routes-cors/package.json |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test the interaction between trial and errors logged during test run.
"""
from __future__ import division, absolute_import
import time
from twisted.internet import reactor, task
from twisted.python import failure, log
from twisted.trial impo... | unknown | codeparrot/codeparrot-clean | ||
{
"kind": "Dashboard",
"apiVersion": "dashboard.grafana.app/v2alpha1",
"metadata": {
"name": "v18.gauge_options.v42"
},
"spec": {
"annotations": [
{
"kind": "AnnotationQuery",
"spec": {
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
... | json | github | https://github.com/grafana/grafana | apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dashboards_from_v0_to_v2/v2beta1.v18.gauge_options.v2alpha1.json |
/* https://github.com/eslint/eslint/blob/v9.36.0/packages/js/src/configs/eslint-recommended.js */
/*
Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), ... | javascript | github | https://github.com/django/django | eslint-recommended.js |
from sqlalchemy.orm import create_session, relationship, mapper, \
contains_eager, joinedload, subqueryload, subqueryload_all,\
Session, aliased, with_polymorphic
from sqlalchemy import Integer, String, ForeignKey
from sqlalchemy.engine import default
from sqlalchemy.testing import AssertsCompiledSQL, fixture... | unknown | codeparrot/codeparrot-clean | ||
DOCUMENTATION:
name: link
author: Ansible Core
version_added: "2.5"
short_description: does the path reference existing symbolic link
aliases: [islink]
description:
- Check if the provided path maps to an existing symlink on the controller's filesystem (localhost).
options:
_input:
descripti... | unknown | github | https://github.com/ansible/ansible | lib/ansible/plugins/test/is_link.yml |
"""Reproduce an input boolean state."""
import asyncio
import logging
from typing import Any, Dict, Iterable, Optional
from homeassistant.const import (
ATTR_ENTITY_ID,
SERVICE_TURN_OFF,
SERVICE_TURN_ON,
STATE_OFF,
STATE_ON,
)
from homeassistant.core import Context, State
from homeassistant.helpers... | unknown | codeparrot/codeparrot-clean | ||
import pkgutil
import pytest
from ..csuconf import CSUConf
from ..csuconf import CSUBarModel, CSUBarModelL, CSUBarModelR
from ..csuconf import PhysicalBar, PhysicalBarL, PhysicalBarR
from ..csuconf import LogicalSlit, TargetType
from ..csuconf import create_bar_models, read_csu_from_header
from ..csuconf import merge... | unknown | codeparrot/codeparrot-clean | ||
import collections
import json
import re
from functools import partial
from itertools import chain
from django.core.exceptions import EmptyResultSet, FieldError, FullResultSet
from django.db import DatabaseError, NotSupportedError
from django.db.models.constants import LOOKUP_SEP
from django.db.models.expressions impo... | python | github | https://github.com/django/django | django/db/models/sql/compiler.py |
# This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | unknown | codeparrot/codeparrot-clean | ||
"""
Votes for reviews. Ether positive (vote is True) or negative (vote is False).
"""
from critiquebrainz.data import db
from sqlalchemy.dialects.postgresql import UUID
from critiquebrainz.data.model.mixins import DeleteMixin
from datetime import datetime
class Vote(db.Model, DeleteMixin):
__tablename__ = 'vote'
... | unknown | codeparrot/codeparrot-clean | ||
#include <tuple>
#include <vector>
#include <ATen/ATen.h>
#include <torch/library.h>
#include <ATen/native/quantized/cpu/fbgemm_utils.h>
#include <ATen/native/quantized/cpu/QnnpackUtils.h>
#include <ATen/native/quantized/cpu/OnednnUtils.h>
#include <ATen/native/quantized/cpu/QuantUtils.h>
#include <ATen/native/quantiz... | cpp | github | https://github.com/pytorch/pytorch | aten/src/ATen/native/quantized/cpu/qconv_unpack_impl.cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.