code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
# ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# $Id$
# pylint: disable=C0302
"""
Test eXecution Service Client.
"""
__copyright__ = \
"""
Copyright (C) 2010-2014 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.org. This file is free software;
you can redistribute it and... | unknown | codeparrot/codeparrot-clean | ||
from kivy.adapters.dictadapter import DictAdapter
from kivy.uix.selectableview import SelectableView
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.listview import ListView, ListItemButton
from kivy.lang import Builder
from kivy.factory import Factory
from fixtures im... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 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.
import math
import os
from core import perf_benchmark
from telemetry import benchmark
from telemetry import page as page_module
from telemetry.page import ... | unknown | codeparrot/codeparrot-clean | ||
## Example app using Facebook Pixel
This example shows how to use Next.js along with Facebook Pixel. A custom [\_document](https://nextjs.org/docs/advanced-features/custom-document) is used to inject [base code](https://developers.facebook.com/docs/facebook-pixel/implementation/?locale=en_US). A [\_app](https://nextjs... | unknown | github | https://github.com/vercel/next.js | examples/with-facebook-pixel/README.md |
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | typescript | github | https://github.com/apache/airflow | airflow-core/src/airflow/ui/src/components/ui/index.ts |
/*
* 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 | framework-docs/src/main/java/org/springframework/docs/core/aot/hints/importruntimehints/SpellCheckService.java |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name' : 'Invoicing',
'version' : '1.1',
'summary': 'Send Invoices and Track Payments',
'sequence': 30,
'description': """
Invoicing & Payments
====================
The specific and easy-to-use Invoi... | 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... | java | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestResponseBuffer.java |
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
from django.contrib.contenttypes.models import ContentType
from django.db import models
class Episode(models.Model):
name = models.CharField(max_length=100)
length = models.CharField(max_length=100, blank=True)
author = model... | python | github | https://github.com/django/django | tests/generic_inline_admin/models.py |
<?php
namespace Illuminate\Console\View\Components;
use Symfony\Component\Console\Output\OutputInterface;
class BulletList extends Component
{
/**
* Renders the component using the given arguments.
*
* @param array<int, string> $elements
* @param int $verbosity
* @return void
*/... | php | github | https://github.com/laravel/framework | src/Illuminate/Console/View/Components/BulletList.php |
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | c | github | https://github.com/llvm/llvm-project | clang-tools-extra/clang-tidy/darwin/DispatchOnceNonstaticCheck.h |
import re
from livestreamer.compat import urlparse
from livestreamer.plugin import Plugin
from livestreamer.plugin.api import http, validate
from livestreamer.plugin.api.utils import parse_json, parse_query
from livestreamer.stream import RTMPStream, HTTPStream
SWF_LIVE_URL = "https://www.filmon.com/tv/modules/FilmOn... | unknown | codeparrot/codeparrot-clean | ||
"""Examine callable regions following genome mapping of short reads.
Identifies callable analysis regions surrounded by larger regions lacking
aligned bases. This allows parallelization of smaller chromosome chunks
through post-processing and variant calling, with each sub-section
mapping handled separately.
Regions ... | unknown | codeparrot/codeparrot-clean | ||
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# 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/... | unknown | codeparrot/codeparrot-clean | ||
import re
import numpy as np
import pytest
from pandas.compat import WASM
from pandas import (
Index,
Interval,
IntervalIndex,
Series,
)
import pandas._testing as tm
class TestIntervalIndex:
@pytest.fixture
def series_with_interval_index(self):
"""
Fixture providing a Series ... | python | github | https://github.com/pandas-dev/pandas | pandas/tests/indexing/interval/test_interval_new.py |
# -*- 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 | ||
"""For neatly implementing static typing in pip.
`mypy` - the static type analysis tool we use - uses the `typing` module, which
provides core functionality fundamental to mypy's functioning.
Generally, `typing` would be imported at runtime and used in that fashion -
it acts as a no-op at runtime and does not have an... | unknown | codeparrot/codeparrot-clean | ||
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | unknown | codeparrot/codeparrot-clean | ||
---
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: data-raw
Arg: <data>
Protocols: HTTP
Help: HTTP POST data, '@' allowed
Added: 7.43.0
Category: http post upload
Multi: append
See-also:
- data
Example:
- --data-raw "hello" $URL
- --data-raw "@at@at@" $URL
---
# `-... | unknown | github | https://github.com/curl/curl | docs/cmdline-opts/data-raw.md |
# coding:utf-8
from django.db import models
from django.test import TestCase
from rest_framework.generics import ListAPIView
from rest_framework.serializers import ModelSerializer
from rest_framework.test import APIRequestFactory
from rest_framework import permissions
from .filter import FullWordSearchFilter
class F... | unknown | codeparrot/codeparrot-clean | ||
from flask import Flask, url_for, session, request, jsonify
from flask_oauthlib.client import OAuth, OAuthException
CLIENT_ID = '1EssHrEXtGdmJHFQ2YEU1leNsHljVPZp1RmRsYDZ'
CLIENT_SECRET = 'WtAikOHT38puo0FHhNrqYbCi6shLFSJjsmc2KVsms8i7utni1h'
app = Flask(__name__)
app.debug = True
app.secret_key = 'secret'
oauth = OAuth... | 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 | ||
import warnings
import itertools
from contextlib import contextmanager
import numpy as np
from matplotlib import transforms
from .. import utils
from .. import _py3k_compat as py3k
class Renderer(object):
@staticmethod
def ax_zoomable(ax):
return bool(ax and ax.get_navigate())
@staticmethod
... | unknown | codeparrot/codeparrot-clean | ||
# Find Objects Partially Inside Region of Interest or Cut Objects to Region of Interest
import cv2
import numpy as np
from . import print_image
from . import plot_image
from . import fatal_error
def roi_objects(img, roi_type, roi_contour, roi_hierarchy, object_contour, obj_hierarchy, device, debug=None):
"""Find ... | unknown | codeparrot/codeparrot-clean | ||
//=== NondeterministicPointerIterationOrderCheck.h - clang-tidy -*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | c | github | https://github.com/llvm/llvm-project | clang-tools-extra/clang-tidy/bugprone/NondeterministicPointerIterationOrderCheck.h |
# frozen_string_literal: true
require "abstract_unit"
require "support/system_helper"
require "action_dispatch/system_testing/test_helpers/screenshot_helper"
require "capybara/dsl"
require "selenium/webdriver"
class ScreenshotHelperTest < ActiveSupport::TestCase
def setup
@new_test = DrivenBySeleniumWithChrome.... | ruby | github | https://github.com/rails/rails | actionpack/test/dispatch/system_testing/screenshot_helper_test.rb |
/*
* Copyright (C) 2012 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-tests/benchmark/com/google/common/base/JoinerBenchmark.java |
# coding=UTF-8
"""
Tests courseware views.py
"""
import unittest
from datetime import datetime
from mock import MagicMock, patch
from pytz import UTC
from django.test import TestCase
from django.http import Http404
from django.test.utils import override_settings
from django.contrib.auth.models import User, AnonymousU... | unknown | codeparrot/codeparrot-clean | ||
import unittest
from .rcrs.vars_interés import modelo, exper, exper_obs_1_1
class PruebaVarsInterés(unittest.TestCase):
def _verif_incluido(símismo, l_vars, res):
for var in l_vars:
mód, var = var.split('.')
with símismo.subTest(mód=mód, var=var):
símismo.assertIsN... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Getting Things GNOME! - a personal organizer for the GNOME desktop
# Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau
#
# This program is free software: you can redistribute it and/or modify it under
# t... | unknown | codeparrot/codeparrot-clean | ||
"""
[6/14/2014] Challenge #166b [Easy] Planetary Gravity Calculator
https://www.reddit.com/r/dailyprogrammer/comments/284mep/6142014_challenge_166b_easy_planetary_gravity/
# [](#EasyIcon) _(Easy)_: Planetary Gravity Calculator
Welcome to this week's rebooted challenges. While this challenge is very simple at its core... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import absolute_import # Avoid importing `importlib` from this package.
import copy
import imp
from importlib import import_module
import os
import sys
import warnings
from django.core.exceptions import ImproperlyConfigured
from django.utils import six
from django.utils.deprecation import RemovedInDj... | unknown | codeparrot/codeparrot-clean | ||
"""
Signal handlers for invalidating cached data.
"""
from django.conf import settings
from django.dispatch.dispatcher import receiver
from xmodule.modulestore.django import SignalHandler
from .api import clear_course_from_cache
from .tasks import update_course_in_cache
@receiver(SignalHandler.course_published)
def ... | unknown | codeparrot/codeparrot-clean | ||
// RUN: %check_clang_tidy -std=c++98-or-later %s bugprone-tagged-union-member-count %t \
// RUN: -config='{CheckOptions: { \
// RUN: bugprone-tagged-union-member-count.StrictMode: true, \
// RUN: bugprone-tagged-union-member-count.EnableCountingEnumHeuristic: false, \
// RUN: }}' --
// CHECK-MESSAGES: ... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-tidy/checkers/bugprone/tagged-union-member-count-counting-enum-heuristic-is-disabled.cpp |
<!--#docregion greeting-->
<h1>Hello i18n!</h1>
<!--#enddocregion greeting-->
<!--#docregion i18n-attribute-->
<h1 i18n>Hello i18n!</h1>
<!--#enddocregion i18n-attribute-->
<!--#docregion i18n-attribute-desc-->
<h1 i18n="An introduction header for this sample">Hello i18n!</h1>
<!--#enddocregion i18n-attribute-desc-->... | html | github | https://github.com/angular/angular | adev/src/content/examples/i18n/doc-files/app.component.html |
import time
import serial
from serial.tools.list_ports import comports
def list_ports():
ports = [p[0] for p in comports()]
return ports
class TrommelboldCom(object):
'''Serial interface class for Arduino Trommelbold'''
_port = None
portname = None
def __init__(self, portname=None, baudrate=N... | unknown | codeparrot/codeparrot-clean | ||
name: vm
# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
con... | unknown | github | https://github.com/moby/moby | .github/workflows/vm.yml |
#!/usr/bin/python
#This file contains some helpers for the files
import struct
from sys import version_info
if version_info < (3,0):
xrange = xrange
else:
xrange = range
SEEK_SET = 0
SEEK_CUR = 1
SEEK_END = 2
def FillLine(f):
i = f.tell()
n = (16 - ((i) % 16))#Calculate the bytes needed to fill up the 0x10 ( == 1... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2011 Daniele Simonetti
#
# 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 your option) any later version.
#
# This program is distributed... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
/*
* The healthcheck package attempts to allow generic checks of arbitrary
* engines, while providing a common framework with some performance
* efficiencies in mind.
*
* The core of this package is the Executor context; a caller would
* prov... | go | github | https://github.com/hashicorp/vault | command/healthcheck/healthcheck.go |
#ifndef JEMALLOC_INTERNAL_MACROS_H
#define JEMALLOC_INTERNAL_MACROS_H
#ifdef JEMALLOC_DEBUG
# define JEMALLOC_ALWAYS_INLINE static inline
#else
# ifdef _MSC_VER
# define JEMALLOC_ALWAYS_INLINE static __forceinline
# else
# define JEMALLOC_ALWAYS_INLINE JEMALLOC_ATTR(always_inline) static inline
# endif
#endi... | c | github | https://github.com/redis/redis | deps/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h |
from __future__ import annotations
import os
import platform
import subprocess
from .optional_submodules import checkout_nccl
from .setup_helpers.cmake import CMake, USE_NINJA
from .setup_helpers.env import (
check_env_flag,
check_negative_env_flag,
IS_64BIT,
IS_WINDOWS,
)
def _get_vc_env(vc_arch: st... | python | github | https://github.com/pytorch/pytorch | tools/build_pytorch_libs.py |
'''
This script takes a set of DPM outputs for cars detected and runs them through a CNN that classifies the
detected cars by their viewpoint / angle and outputs that data to a CSV.
'''
import cv2
import os
import sys
import scipy.io as sio
from keras.models import load_model
import numpy as np
from scipy.misc import i... | unknown | codeparrot/codeparrot-clean | ||
import datetime
import icalendar
import os
import pytz
import unittest
from pykolab.xml import Attendee
from pykolab.xml import Event
from pykolab.xml import EventIntegrityError
from pykolab.xml import InvalidAttendeeParticipantStatusError
from pykolab.xml import InvalidEventDateError
from pykolab.xml import event_fro... | unknown | codeparrot/codeparrot-clean | ||
import itertools
import operator
import six
from .utils.pp import pp_class
from .utils.immutable_class import ImmutableClass
from .utils.str_compat import StrCompatMixin
class CNFPublicMixin(ImmutableClass, StrCompatMixin):
"""
Objects that implement this class will be exposed to and manipulated by
externa... | unknown | codeparrot/codeparrot-clean | ||
def indent(string, level=1, lstrip_first=False):
"""Multiline string indent.
Indent each line of the provided string by the specified level.
Args:
string: The string to indent, possibly containing linebreaks.
level: The level to indent (``level * ' '``). Defaults to 1.
lstrip_firs... | unknown | codeparrot/codeparrot-clean | ||
'''
Texture compression tool
========================
This tool is designed to compress images into:
- PVRTC (PowerVR Texture Compression), mostly iOS devices
- ETC1 (Ericson compression), working on all GLES2/Android devices
Usage
-----
In order to compress a texture::
texturecompress.py [--dir <directory>] <... | unknown | codeparrot/codeparrot-clean | ||
import { flushSync } from 'svelte';
import { ok, test } from '../../test';
export default test({
async test({ assert, target, raf }) {
const button = /** @type {HTMLButtonElement} */ (target.querySelector('#button'));
const container = target.querySelector('#container');
ok(button);
ok(container);
// Multi... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/runtime-legacy/samples/component-transition/_config.js |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
""" A WebIDL parser. """
from ply import lex, yacc
import re
import os
import traceback
import math
import string
from ... | unknown | codeparrot/codeparrot-clean | ||
#
# Python script to generate BOM in multiple formats from a KiCad generic netlist.
#
import kicad_netlist_reader
import os
import csv
class KicadBom:
def __init__(self,netlist_path=None):
self._netlist_ext = '.xml'
self._netlist_path = None
self._netlist = None
self._grouped_compon... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Copyright (c) 2016, Kersten Doering <kersten.doering@gmail.com>
"""
# import modules
# to connect to Xapian
import xappy
# debug: sys.exit(0)
import sys
# path options
import os
# runtime
import time
# to connect to PostgreSQL
import psycopg2
from psycopg2 import e... | unknown | codeparrot/codeparrot-clean | ||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Cloudbase Solutions Srl
# 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.ap... | unknown | codeparrot/codeparrot-clean | ||
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Test for -rpcbind, as well as -rpcallowip and -rpcconnect
# Add python-bitcoinrpc to module search path:
im... | unknown | codeparrot/codeparrot-clean | ||
# app.views.py
#
# Views for dynamic content
import logging, urllib
from django.shortcuts import render
from yacon.models.pages import Page, PageType, Block
logger = logging.getLogger(__name__)
# ============================================================================
NEWS_PAGE_TYPE = None
# =================... | unknown | codeparrot/codeparrot-clean | ||
import json
import os
import requests
from fanart.core import Request
from fanart.immutable import Immutable
class LeafItem(Immutable):
KEY = NotImplemented
@Immutable.mutablemethod
def __init__(self, id, url, likes):
self.id = int(id)
self.url = url
self.likes = int(likes)
... | unknown | codeparrot/codeparrot-clean | ||
import core.modules
import core.modules.module_registry
from core.modules.vistrails_module import Module, ModuleError
import scipy
import scipy.interpolate
import scipy.ndimage
import vtk
from Array import *
from Matrix import *
class ArrayInterpModule(object):
my_namespace = 'scipy|interpolation'
class RBFInterp... | unknown | codeparrot/codeparrot-clean | ||
"""Support for INSTEON dimmers via PowerLinc Modem."""
import logging
from homeassistant.components.switch import DOMAIN, SwitchEntity
from .insteon_entity import InsteonEntity
from .utils import async_add_insteon_entities
_LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2018 Guenter Bartsch
#
# 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 | ||
// @compilationMode:"infer"
function useStateValue(props) {
const [state, _] = useState(null);
return [state];
} | javascript | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/infer-functions-hook-with-hook-call.js |
"""
Peasauce - interactive disassembler
Copyright (C) 2012-2017 Richard Tew
Licensed using the MIT license.
"""
"""
Unit testing.
"""
import logging
import os
import random
import sys
import types
import unittest
from Qt import QtCore, QtGui, QtWidgets
from . import disassembly
from . import disassembly... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# Ceres Solver - A fast non-linear least squares minimizer
# Copyright 2013 Google Inc. All rights reserved.
# http://code.google.com/p/ceres-solver/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#... | unknown | codeparrot/codeparrot-clean | ||
// SPDX-License-Identifier: GPL-2.0
/*
* Tag allocation using scalable bitmaps. Uses active queue tracking to support
* fairer distribution of tags between multiple submitters when a shared tag map
* is used.
*
* Copyright (C) 2013-2014 Jens Axboe
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <l... | c | github | https://github.com/torvalds/linux | block/blk-mq-tag.c |
# frozen_string_literal: true
module Jekyll
class ThemeAssetsReader
attr_reader :site
def initialize(site)
@site = site
end
def read
return unless site.theme&.assets_path
Find.find(site.theme.assets_path) do |path|
next if File.directory?(path)
if File.symlink?(p... | ruby | github | https://github.com/jekyll/jekyll | lib/jekyll/readers/theme_assets_reader.rb |
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Ansible, a Red Hat company
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import annotations
DOCUMENTATION = r"""
module: meta
short_description: Execute Ansible 'actions'
version_added: '1.2'
description:
... | python | github | https://github.com/ansible/ansible | lib/ansible/modules/meta.py |
# This file is part of the MapProxy project.
# Copyright (C) 2010 Omniscale <http://omniscale.de>
#
# 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... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2012-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-boot | core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/template/TemplateRuntimeHintsTests.java |
# Migration to the `inject` function
Angular's [`inject`](/api/core/inject) function offers more accurate types and better compatibility with standard decorators, compared to constructor-based injection.
This schematic converts constructor-based injection in your classes to use the [`inject`](/api/core/inject) functi... | unknown | github | https://github.com/angular/angular | adev/src/content/reference/migrations/inject-function.md |
// Test behavior and edge cases in usersInfo
export function runTest(conn) {
let db = conn.getDB("test");
let emptyDB = conn.getDB("test2");
let otherDB = conn.getDB("other");
const userCount = 200;
for (let i = 0; i < userCount; ++i) {
assert.commandWorked(db.runCommand({createUser: "user"... | javascript | github | https://github.com/mongodb/mongo | jstests/auth/usersInfo_base.js |
from enum import IntEnum
import src.irulez.util as util
from abc import ABC, abstractmethod
import src.irulez.log as log
from datetime import time
from typing import List, Dict, Optional
import src.irulez.constants as constants
from threading import Timer
logger = log.get_logger('button_domain')
class ArduinoPinType(... | unknown | codeparrot/codeparrot-clean | ||
<!--Copyright 2020 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 applicable law or agreed... | unknown | github | https://github.com/huggingface/transformers | docs/source/fr/index.md |
from django.test import TestCase
class ObjectListTest(TestCase):
fixtures = ['testdata.json']
def check_pagination(self, url, expected_status_code, object_count=None):
response = self.client.get(url)
self.assertEqual(response.status_code, expected_status_code)
if object_count:
... | unknown | codeparrot/codeparrot-clean | ||
#
# (c) 2019, Ansible by Red Hat, inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.connection import Connection
from ansible.module_utils.network.eos.providers import providers
from ansible.m... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# Script to provide an aggregated interface to all sorts of storage
# handled by explorers
# This is so that scripts that need to know about host storage don't
# need to code for all the variations, and new types can be added here
# rather than in a number of other scripts.
#
# Written by Dougal Scot... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2025 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | go | github | https://github.com/etcd-io/etcd | tests/e2e/reproduce_19406_test.go |
/* Copyright 2018 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/compiler/jit/xla_cluster_util.h |
# -*- coding: utf-8 -*-
###############################################################################
#
# SendEmail
# Sends an email using a specified Gmail account.
#
# Python version 2.6
#
###############################################################################
from temboo.core.choreography import Choreogr... | unknown | codeparrot/codeparrot-clean | ||
/*------------------------------------------------------------------------
*
* geqo_pmx.c
*
* partially matched crossover [PMX] routines;
* PMX operator according to Goldberg & Lingle
* (Proc Int'l Conf on GA's)
*
* src/backend/optimizer/geqo/geqo_pmx.c
*
*------------------------------------------------------------... | c | github | https://github.com/postgres/postgres | src/backend/optimizer/geqo/geqo_pmx.c |
/*
* 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/DeleteShareGroupsHandler.java |
area: ES|QL
issues: []
pr: 141568
summary: Fix TS bug when grouping on aliases
type: bug | unknown | github | https://github.com/elastic/elasticsearch | docs/changelog/141568.yaml |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# fileicon.py
#
# Copyright 2011 Daniel Francis <santiago.danielfrancis@gmail.com>
#
# 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 Soft... | unknown | codeparrot/codeparrot-clean | ||
'use client'
import * as React from 'react'
import { Button } from '@/components/ui/button'
import {
Popover,
PopoverContent,
PopoverTrigger,
} from '@/components/ui/popover'
import { ChevronDown, CheckIcon } from 'lucide-react'
import { cn } from '@/lib/utils'
export interface MultiSelectPropOption {
value: ... | typescript | github | https://github.com/vercel/next.js | apps/bundle-analyzer/components/ui/multi-select.tsx |
#!/usr/bin/env python
#
# specialize_node_d.py output_file src/node.d flavor arch
#
# Specialize node.d for given flavor (`freebsd`) and arch (`x64` or `ia32`)
#
from __future__ import print_function
import re
import sys
if len(sys.argv) != 5:
print("usage: specialize_node_d.py outfile src/node.d flavor arch")
s... | python | github | https://github.com/nodejs/node | tools/specialize_node_d.py |
#!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Kiseliov Roman
from xlwt import *
wb = Workbook()
ws0 = wb.add_sheet('sheet0')
fnt1 = Font()
fnt1.name = 'Verdana'
fnt1.bold = True
fnt1.height = 18*0x14
pat1 = Pattern()
pat1.pattern = Pattern.SOLID_PATTERN
pat1.pattern_fore_colour = 0x16
b... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# #############################################################################
#
# Brazillian Carrier Correios Sigep WEB
# Copyright (C) 2015 KMEE (http://www.kmee.com.br)
# @author: Michell Stuttgart <michell.stuttgart@kmee.com.br>
#
# Sponsored by Europestar www.europestar.com.br
... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright 2014-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package io.ktor.client.webrtc.utils
import io.ktor.client.webrtc.*
import io.ktor.utils.io.*
import kotlin.time.Duration.Companion.milliseconds
@OptIn(ExperimentalKtorApi::class)
actual fun ... | kotlin | github | https://github.com/ktorio/ktor | ktor-client/ktor-client-webrtc/ios/test/io/ktor/client/webrtc/utils/ConnectionUtils.ios.kt |
import {
anyContext,
FormatContext,
FormattingContext,
getAllRules,
Rule,
RuleAction,
RuleSpec,
} from "../_namespaces/ts.formatting.js";
import {
Debug,
every,
FormatCodeSettings,
FormattingHost,
SyntaxKind,
} from "../_namespaces/ts.js";
/** @internal */
export functio... | typescript | github | https://github.com/microsoft/TypeScript | src/services/formatting/rulesMap.ts |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
//go:build memprofiler
package command
import (
"os"
"path/filepath"
"runtime"
"runtime/pprof"
"time"
)
func init() {
memProfilerEnabled = true
}
func (c *ServerCommand) startMemProfiler() {
profileDir := filepath.Join(os.TempDir(), "vau... | go | github | https://github.com/hashicorp/vault | command/server_profile.go |
# Copyright (C) 2017 Lenovo, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansi... | unknown | codeparrot/codeparrot-clean | ||
# Distributed TensorFlow
This directory contains the initial open-source implementation of the
distributed TensorFlow runtime, using [gRPC](http://grpc.io) for inter-process
communication.
To learn how to use the distributed runtime to create a TensorFlow cluster, see
the
[Distributed TensorFlow](https://www.tensorfl... | unknown | github | https://github.com/tensorflow/tensorflow | tensorflow/core/distributed_runtime/README.md |
# Copyright 2018 The HuggingFace Inc. team.
#
# 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 ... | python | github | https://github.com/huggingface/transformers | src/transformers/convert_slow_tokenizers_checkpoints_to_fast.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... | json | github | https://github.com/apache/kafka | clients/src/main/resources/common/message/AlterPartitionResponse.json |
import { test } from '../../test';
export default test({
error: {
code: 'css_global_block_invalid_combinator',
message: 'A `:global` selector cannot follow a `>` combinator',
position: [79, 88]
}
}); | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/compiler-errors/samples/css-global-block-combinator-2/_config.js |
# Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility 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 your o... | unknown | codeparrot/codeparrot-clean | ||
"""Management utilities.
Example Usage:
- fab vagrant create_admin_user
- fab vagrant runserver
"""
from fabric.api import cd, prompt, run, task
from fabtools.vagrant import vagrant
APP_ROOT = "/vagrant"
@task
def create_admin_user(username=None, firstname=None, lastname=None,
email... | unknown | codeparrot/codeparrot-clean | ||
# python3
# Copyright 2018 DeepMind Technologies Limited. 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 re... | unknown | codeparrot/codeparrot-clean | ||
from django.db.models.query import QuerySet
from django.db import models
from django.db.models import Count, Min, Max, Sum, Avg
from manabi.apps.utils.time_utils import start_and_end_of_day
from .constants import MATURE_INTERVAL_MIN
class CardHistoryManagerMixin:
def of_user(self, user):
if not user.is_au... | unknown | codeparrot/codeparrot-clean | ||
## 21.1.1 (2026-01-22)
- fix(vscode-extension): add syntax highlighting for arrow functions ([a649fc8f57](https://github.com/angular/angular/commit/a649fc8f57bc4f9686a263022011a614b878048c))
- fix(vscode-extension): add syntax highlighting for spread/rest expressions ([8f16846dd9](https://github.com/angular/angular/co... | unknown | github | https://github.com/angular/angular | vscode-ng-language-service/CHANGELOG.md |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.