code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
#__all__ = ['deque', 'defaultdict', 'Counter']
from _collections import deque, defaultdict
#from itertools import repeat as _repeat, chain as _chain, starmap as _starmap
__all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList',
'UserString', 'Counter', 'OrderedDict']
# For bootstrapping re... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2018, Simon Dodsley (simon@purestorage.com)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',... | unknown | codeparrot/codeparrot-clean | ||
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014 Tech Receptives (<http://techreceptives.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the te... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
import rospy
from std_msgs.msg import Int8
from geometry_msgs.msg import Twist
from sensor_msgs.msg import JointState
from brics_actuator.msg import JointPositions, JointValue, JointVelocities
import sys
import copy
import numpy
import time
class switch(object):
value = None
def __new__... | unknown | codeparrot/codeparrot-clean | ||
name: Run CodeQL
on:
schedule:
- cron: 0 0 * * *
permissions:
contents: read
jobs:
analyze:
name: Analyze
runs-on: ubuntu-slim
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [cpp, javascrip... | unknown | github | https://github.com/nodejs/node | .github/workflows/codeql.yml |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name' : 'Invoicing',
'version' : '1.1',
'summary': 'Invoices & Payments',
'sequence': 10,
'description': """
Invoicing & Payments
====================
The specific and easy-to-use Invoicing system i... | unknown | codeparrot/codeparrot-clean | ||
# coding=utf-8
# 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 requ... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python
__author__ = 'Brett Bowman'
__email__ = 'bbowman@pacificbiosciences.com'
import logging, logging.config
import subprocess
import tempfile
import shlex
from pbhla import __LOG__
from pbhla.utils import which
logging.config.fileConfig( __LOG__ )
log = logging.getLogger(__name__)
class External... | unknown | codeparrot/codeparrot-clean | ||
import { CMS_NAME, CMS_URL } from "@/lib/constants";
export default function Intro() {
return (
<section className="flex-col md:flex-row flex items-center md:justify-between mt-16 mb-16 md:mb-12">
<h1 className="text-6xl md:text-8xl font-bold tracking-tighter leading-tight md:pr-8">
Blog.
</h... | javascript | github | https://github.com/vercel/next.js | examples/cms-datocms/components/intro.js |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const makeSerializable = require("../util/makeSerializable");
const ContextDependency = require("./ContextDependency");
const ModuleDependencyTemplateAsRequireId = require("./ModuleDependencyTemplateAsReq... | javascript | github | https://github.com/webpack/webpack | lib/dependencies/RequireContextDependency.js |
import discord
import json
from discord.ext import commands
from sys import argv
class Helper_list:
"""
Management of active helpers.
"""
def __init__(self, bot):
self.bot = bot
print('Addon "{}" loaded'.format(self.__class__.__name__))
@commands.has_permissions(administrator=True)... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
import csv
import itertools
import sys
import time
import warnings
from contextlib import nullcontext
import click
import numpy as np
from operator_inp_utils import OperatorInputsLoader
from tqdm import tqdm
import torch
from torch._dynamo.backends.cudagraphs import cudagraphs_inner
from torch.... | python | github | https://github.com/pytorch/pytorch | benchmarks/dynamo/microbenchmarks/operatorbench.py |
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.util;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.mockito.mock.MockType;
import org.mockitoutil.TestBase;
public class MockNameImplTe... | java | github | https://github.com/mockito/mockito | mockito-core/src/test/java/org/mockito/internal/util/MockNameImplTest.java |
//===----------------------------------------------------------------------===//
//
// 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/utils/DesignatedInitializers.cpp |
#!/usr/bin/python
import numpy
# based on the vicar2png module by Jessica McKellar (jesstess at mit.edu)
# substantial modifications have been made to the code. However for
# thoroughness, I am including her Copyright under the MIT License below:
'''
The MIT License (MIT)
Copyright (c) 2012-2013 Jessica McKellar
... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the F... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
class Binary < ActiveRecord::Base
end | ruby | github | https://github.com/rails/rails | activerecord/test/models/binary.rb |
"""All Error Types pertaining to Enrollment."""
class CourseEnrollmentError(Exception):
"""Generic Course Enrollment Error.
Describes any error that may occur when reading or updating enrollment information for a user or a course.
"""
def __init__(self, msg, data=None):
super(CourseEnrollment... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/bash
# Copyright 2021 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... | unknown | github | https://github.com/prometheus/prometheus | web/ui/module/lezer-promql/generate-types.sh |
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package vault_test
import (
"encoding/json"
"testing"
"time"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/helper/testhelpers/minimal"
)
func TestExpiration_RenewToken_TestCluster(t *testing.T) {
t.Parallel()
cluster := min... | go | github | https://github.com/hashicorp/vault | vault/expiration_integ_test.go |
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package refactoring
import (
"fmt"
"github.com/hashicorp/terraform/internal/addrs"
"github.com/hashicorp/terraform/internal/configs"
"github.com/hashicorp/terraform/internal/states"
"github.com/hashicorp/terraform/internal/tfdiags"
)
type Mo... | go | github | https://github.com/hashicorp/terraform | internal/refactoring/move_statement.go |
import collections
from math import ceil
from django.utils import six
class InvalidPage(Exception):
pass
class PageNotAnInteger(InvalidPage):
pass
class EmptyPage(InvalidPage):
pass
class Paginator(object):
def __init__(self, object_list, per_page, orphans=0,
allow_empty_first_pag... | unknown | codeparrot/codeparrot-clean | ||
# -*- test-case-name: twisted.conch.test.test_insults -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
VT102 and VT220 terminal manipulation.
@author: Jp Calderone
"""
from zope.interface import implementer, Interface
from twisted.internet import protocol, defer, interfaces as iintern... | unknown | codeparrot/codeparrot-clean | ||
"""
:mod:`pandas.io.formats.xml` is a module for formatting data in XML.
"""
from __future__ import annotations
import codecs
import io
from typing import (
TYPE_CHECKING,
Any,
final,
)
from pandas.errors import AbstractMethodError
from pandas.util._decorators import cache_readonly
from pandas.core.dtyp... | python | github | https://github.com/pandas-dev/pandas | pandas/io/formats/xml.py |
# This file is part of Lazylibrarian.
#
# Lazylibrarian 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.
#
# Lazylibrarian is dis... | unknown | codeparrot/codeparrot-clean | ||
import numpy as np
import pytest
from pandas import Categorical
import pandas._testing as tm
@pytest.fixture(params=[True, False])
def allow_fill(request):
"""Boolean 'allow_fill' parameter for Categorical.take"""
return request.param
class TestTake:
# https://github.com/pandas-dev/pandas/issues/20664
... | python | github | https://github.com/pandas-dev/pandas | pandas/tests/arrays/categorical/test_take.py |
from django.conf import settings
from django.contrib.flatpages.models import FlatPage
from django.contrib.sites.shortcuts import get_current_site
from django.http import Http404, HttpResponse, HttpResponsePermanentRedirect
from django.shortcuts import get_object_or_404
from django.template import loader, RequestContext... | unknown | codeparrot/codeparrot-clean | ||
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
addonmanager.kubernetes.io/mode: Reconcile
k8s-app: konnectivity-agent
namespace: kube-system
name: konnectivity-agent
spec:
selector:
matchLabels:
k8s-app: konnectivity-agent
updateStrategy:
type: RollingUpdate
template:
me... | unknown | github | https://github.com/kubernetes/kubernetes | cluster/gce/addons/konnectivity-agent/konnectivity-agent-ds.yaml |
##########################################################################
#
# Copyright (c) 2007, 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:
#
# * Redistribu... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1'... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2011 Isaku Yamahata
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | unknown | codeparrot/codeparrot-clean | ||
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Cryptographic API.
*
* Copyright (c) 2023 Herbert Xu <herbert@gondor.apana.org.au>
*/
#ifndef _LOCAL_CRYPTO_HASH_H
#define _LOCAL_CRYPTO_HASH_H
#include <crypto/internal/hash.h>
#include "internal.h"
extern const struct crypto_type crypto_shash_type;
int hash... | c | github | https://github.com/torvalds/linux | crypto/hash.h |
from __future__ import absolute_import
from __future__ import unicode_literals
from functools import reduce
import six
from .const import LABEL_CONTAINER_NUMBER
from .const import LABEL_PROJECT
from .const import LABEL_SERVICE
class Container(object):
"""
Represents a Docker container, constructed from the ... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import division
import numbers
import re
import ezodf
import numpy as np
import logging
import typing
from openglider.airfoil import BezierProfile2D, Profile2D
from openglider.vector.spline import Bezier, SymmetricBezier, SymmetricBSpline
from openglider.vector import Interpolation
from openglider.g... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | unknown | codeparrot/codeparrot-clean | ||
#retriever
from retriever.lib.templates import DownloadOnlyTemplate
from pkg_resources import parse_version
try:
from retriever.lib.defaults import VERSION
except ImportError:
from retriever import VERSION
class main(DownloadOnlyTemplate):
def __init__(self, **kwargs):
DownloadOnlyTemplate.__init__... | unknown | codeparrot/codeparrot-clean | ||
from PeacockActor import PeacockActor
import vtk
from vtk.util.colors import peacock, tomato, red, white, black
class ClippedActor(PeacockActor):
def __init__(self, original_actor, plane):
PeacockActor.__init__(self, original_actor.renderer)
self.original_actor = original_actor
self.plane = plane
s... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2020 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
package server_test
import (
"context"
"fmt"
"sort"
"testing"
"github.com/cockroachdb/cockroach/pkg/base"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver"
"gi... | go | github | https://github.com/cockroachdb/cockroach | pkg/server/multi_store_test.go |
# Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of so... | unknown | codeparrot/codeparrot-clean | ||
import {
createApp,
defineComponent,
getCurrentInstance,
h,
nodeOps,
render,
shallowReadonly,
} from '@vue/runtime-test'
import type {
ComponentInternalInstance,
ComponentOptions,
} from '../src/component'
describe('component: proxy', () => {
test('data', () => {
let instance: ComponentInternal... | typescript | github | https://github.com/vuejs/core | packages/runtime-core/__tests__/componentPublicInstance.spec.ts |
/* Copyright 2017 - 2025 R. Thomas
* Copyright 2017 - 2025 Quarkslab
*
* 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 | github | https://github.com/nodejs/node | deps/LIEF/include/LIEF/COFF/AuxiliarySymbols/AuxiliaryCLRToken.hpp |
# Copyright 2014 IBM Corp.
#
# 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 | codeparrot/codeparrot-clean | ||
from __future__ import division, absolute_import, print_function
import os
import re
import sys
from numpy.distutils.fcompiler import FCompiler
from numpy.distutils.exec_command import exec_command, find_executable
from numpy.distutils.misc_util import make_temp_file
from distutils import log
compilers = ['IBMFCompi... | 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 applicable ... | unknown | codeparrot/codeparrot-clean | ||
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | unknown | codeparrot/codeparrot-clean | ||
#._cv_part guppy.etc.RE
from guppy.etc.RE_Rect import chooserects
from guppy.etc.IterPermute import iterpermute
class InfiniteError(Exception):
pass
class WordsMemo:
def __init__(self, re, ch):
self.re = re
self.ch = ch
self.xs = {}
self.N = 0
def get_words_of_length(self, N):
# Return a list of wo... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
//! The Assets module allows you to read files that have been bundled by tauri
//! during both compile time and runtime.
#[doc(hidden)]
pub use phf;
use std::{
borrow::Cow,
... | rust | github | https://github.com/tauri-apps/tauri | crates/tauri-utils/src/assets.rs |
/*
* 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/clients/admin/internals/AbortTransactionHandlerTest.java |
# Some useful functions to extract data out of emails
# Copyright (C) 2002-2015 John Goerzen & contributors
#
# 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 Lic... | unknown | codeparrot/codeparrot-clean | ||
"""
parser.http.utils module (imdb package).
This module provides miscellaneous utilities used by
the imdb.parser.http classes.
Copyright 2004-2012 Davide Alberani <da@erlug.linux.it>
2008 H. Turgut Uyar <uyar@tekir.org>
This program is free software; you can redistribute it and/or modify
it under the... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
# Copyright: (c) 2019, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import argparse
import os.path
import pathlib
impor... | unknown | codeparrot/codeparrot-clean | ||
set -o verbose
rm -rf \
/data/db/* \
mongo-diskstats* \
mongo-*.tgz \
mongo-*.zst \
~/.aws \
~/.boto \
venv \
/data/install \
/data/multiversion
exit 0 | unknown | github | https://github.com/mongodb/mongo | evergreen/cleanup_environment.sh |
#!/usr/bin/python -u
import sys
import libxml2
#memory debug specific
libxml2.debugMemory(1)
called = ""
def foo(ctx, x):
global called
#
# test that access to the XPath evaluation contexts
#
pctxt = libxml2.xpathParserContext(_obj=ctx)
ctxt = pctxt.context()
called = ctxt.function()
... | unknown | codeparrot/codeparrot-clean | ||
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014 OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publi... | unknown | codeparrot/codeparrot-clean | ||
# Generated by h2py from /usr/include/netinet/in.h
# Included from net/nh.h
# Included from sys/machine.h
LITTLE_ENDIAN = 1234
BIG_ENDIAN = 4321
PDP_ENDIAN = 3412
BYTE_ORDER = BIG_ENDIAN
DEFAULT_GPR = 0xDEADBEEF
MSR_EE = 0x8000
MSR_PR = 0x4000
MSR_FP = 0x2000
MSR_ME = 0x1000
MSR_FE = 0x0800
MSR_FE0 = 0x0800
MSR_SE = ... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (C) 2016 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/graph/DirectedMultiNetworkConnections.java |
# -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, 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 | ||
# Copyright 2011 OpenStack Foundation
#
# 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 l... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
"""
@file pois2inductionLoops.py
@author Daniel Krajzewicz
@author Michael Behrisch
@date 2010-02-18
@version $Id: pois2inductionLoops.py 13811 2013-05-01 20:31:43Z behrisch $
Converts a given pois located on lanes into induction loop detectors;
Each poi is replicated to cover all lanes o... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
'''
Open Facebook allows you to use Facebook's open graph API with simple python code
**Features**
* Supported and maintained
* Tested so people can contribute
* Facebook exceptions are mapped
* Logging
**Basic examples**::
facebook = OpenFacebook(access_token)
# Ge... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# pelisalacarta 4
# Copyright 2015 tvalacarta@gmail.com
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#
# Distributed under the terms of GNU General Public License v3 (GPLv3)
# http://www.gnu.org/licenses/gpl-3.0.html
# --... | 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.
"""This script tests the installer with test cases specified in the config file.
For each test case, it checks that the machine states after the execution o... | unknown | codeparrot/codeparrot-clean | ||
import praw
import re
import time
from random import random
from ImageScript import build_image, delete_image
from config import MEMORABLE_QUOTE_REGEX, source, start, stop
from config import bot_username, delete_threshold, already_stopped, stopped
from config import started, stopauto, startauto, PMme, numfigs
from data... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2014 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.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class ToughImageCasesPage(page_module.Page):
def __i... | unknown | codeparrot/codeparrot-clean | ||
"""A parser for HTML and XHTML."""
# This file is based on sgmllib.py, but the API is slightly different.
# XXX There should be a way to distinguish between PCDATA (parsed
# character data -- the normal case), RCDATA (replaceable character
# data -- only char and entity references and end tags are special)
# and CDAT... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2009 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.
package math
// The original C code, the long comment, and the constants
// below were from http://netlib.sandia.gov/cephes/cmath/sin.c,
// available from http... | go | github | https://github.com/golang/go | src/math/tanh.go |
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html
#include "precomp.hpp"
namespace cv { namespace hal {
CV_CPU_OPTIMIZATION_NAMESPACE_BEGIN
void split8u(const uchar* src, uch... | unknown | github | https://github.com/opencv/opencv | modules/core/src/split.simd.hpp |
#!/usr/bin/python
#
# 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.
#
# Ansible is distribut... | unknown | codeparrot/codeparrot-clean | ||
//===--- Bridging/LangOptsBridging.cpp ------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2022-2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LIC... | cpp | github | https://github.com/apple/swift | lib/Basic/LangOptionsBridging.cpp |
import os
import include.download_dict_sound as download_dict_sound
import sys
import glob
units_root = os.path.relpath("Units")
######## REMOVE HIDDEN (.) FILES ##########
for root, dirs, files in os.walk("./"):
for f in files:
if f.startswith(".") and "Learning-English.app" not in root and f != ".gitignore":
... | unknown | codeparrot/codeparrot-clean | ||
function useFreeze() {}
function foo() {}
function Component(props) {
const x = [];
const y = useFreeze(x);
foo(y, x);
return (
<Component>
{x}
{y}
</Component>
);
} | javascript | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/hook-call.js |
# -*- coding: utf-8 -*-
import os
import sys
import time
import logging
import threading
from itertools import chain
from .base import Cli
__all__ = ['App']
logger = logging.getLogger(__name__)
try:
MAXFD = os.sysconf("SC_OPEN_MAX")
except: # pragma: no cover
MAXFD = 256
def flush_fds():
for fd in ran... | unknown | codeparrot/codeparrot-clean | ||
"""
This module houses ctypes interfaces for GDAL objects. The following GDAL
objects are supported:
CoordTransform: Used for coordinate transformations from one spatial
reference system to another.
Driver: Wraps an OGR data source driver.
DataSource: Wrapper for the OGR data source object, supports
OGR-supported ... | python | github | https://github.com/django/django | django/contrib/gis/gdal/__init__.py |
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""Vispy configuration functions
"""
import os
from os import path as op
import json
import sys
import platform
import getopt
import traceback
import tempfile
import atexit
f... | unknown | codeparrot/codeparrot-clean | ||
from enigma import eDVBFrontendParametersSatellite, eDVBFrontendParametersTerrestrial, eDVBFrontendParametersCable, eDVBFrontendParameters, eDVBResourceManager, eTimer
class Tuner:
def __init__(self, frontend, ignore_rotor=False):
self.frontend = frontend
self.ignore_rotor = ignore_rotor
# transponder = (freque... | unknown | codeparrot/codeparrot-clean | ||
/*!
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {EditorState, Extension} from '@codemirror/state';
import {
lineNumbers,
highlightActiveLineGutter,
hi... | typescript | github | https://github.com/angular/angular | adev/src/app/editor/code-editor/constants/code-editor-extensions.ts |
# 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.
#
# Ansible is distributed in the hope that ... | unknown | codeparrot/codeparrot-clean | ||
/** @import { AST } from '#compiler' */
/** @import { Context } from '../types' */
import * as e from '../../../errors.js';
import { is_event_attribute } from '../../../utils/ast.js';
import { disallow_children } from './shared/special-element.js';
/**
* @param {AST.SvelteBody} node
* @param {Context} context
*/
ex... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/src/compiler/phases/2-analyze/visitors/SvelteBody.js |
from __future__ import unicode_literals
import re
import json
from .common import InfoExtractor
from .gigya import GigyaBaseIE
from ..compat import compat_HTTPError
from ..utils import (
ExtractorError,
strip_or_none,
float_or_none,
int_or_none,
merge_dicts,
parse_iso8601,
str_or_none,
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
'''
example to show optical flow
USAGE: opt_flow.py [<video_source>]
Keys:
1 - toggle HSV flow visualization
2 - toggle glitch
Keys:
ESC - exit
'''
# Python 2/3 compatibility
from __future__ import print_function
import numpy as np
import cv2
import video
def draw_flow(img, flow, s... | unknown | codeparrot/codeparrot-clean | ||
import { test } from '../../test';
export default test({
props: {
foo: true,
bar: true
},
trim_whitespace: false,
snapshot(target) {
const div = target.querySelector('div');
const ps = target.querySelectorAll('p');
return {
div,
p0: ps[0],
p1: ps[1]
};
}
}); | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/tests/hydration/samples/if-block-anchor/_config.js |
class ApiException(Exception):
def __init__(self, type, message=None, code=None, body=None):
super(ApiException, self).__init__(message)
self.type = type
self.code = code
self.body = body
@staticmethod
def create(type, message=None, code=None, body=None):
if type == 'request-error':
return RequestExcep... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Copyright 2007 Doug Hellmann.
#
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in all
# copies and tha... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
#
# 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
... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (c) 2009-Present, Redis Ltd.
* All rights reserved.
*
* Copyright (c) 2024-present, Valkey contributors.
* All rights reserved.
*
* Licensed under your choice of (a) the Redis Source Available License 2.0
* (RSALv2); or (b) the Server Side Public License v1 (SSPLv1); or (c) the
* GNU Affero Gene... | c | github | https://github.com/redis/redis | src/t_set.c |
from gluon.contrib.memcache.memcache import Client
from gluon.cache import CacheAbstract
import time
"""
examle of usage:
cache.memcache = MemcacheClient(request,[127.0.0.1:11211],debug=true)
"""
import cPickle as pickle
import thread
from gluon import current
DEFAULT_TIME_EXPIRE = 300 # seconds (must be the same a... | unknown | codeparrot/codeparrot-clean | ||
import numpy as np
from pyrr import Matrix44
import moderngl
from ported._example import Example
def grid(size, steps):
u = np.repeat(np.linspace(-size, size, steps), 2)
v = np.tile([-size, size], steps)
w = np.zeros(steps * 2)
return np.concatenate([np.dstack([u, v, w]), np.dstack([v, u, w])])
class... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notic... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
import numpy.testing as npt
from scipy import integrate
from scipy import stats
from scipy.special import betainc
from common_tests import (check_normalization, check_moment, check_mean_expect,
... | unknown | codeparrot/codeparrot-clean | ||
// Copyright The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... | go | github | https://github.com/prometheus/prometheus | web/api/v1/openapi.go |
import discord
from discord.ext import commands
import asyncio
class lyriccommands:
"""lyriccommands"""
def __init__(self, bot):
self.bot = bot
sleep = asyncio.sleep
sing = self.bot.say
@commands.command()
async def fuckthisshit(self):
"""Fuck this shit I'm out."""
... | unknown | codeparrot/codeparrot-clean | ||
# This is a pretty brittle way to get the assembly reference
sys.path.append("C:\\Program Files\\National Instruments\\MeasurementStudioVS2005\\DotNET\\Assemblies\\Current")
clr.AddReference("NationalInstruments.DAQmx.dll")
from NationalInstruments.DAQmx import *
from DAQ.Environment import *
from math import *
def r... | unknown | codeparrot/codeparrot-clean | ||
# Python test set -- built-in functions
import test.test_support, unittest
import sys
import pickle
import itertools
import warnings
warnings.filterwarnings("ignore", "integer argument expected",
DeprecationWarning, "unittest")
# pure Python implementations (3 args only), for comparison
def p... | 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
//
//===---------------------------... | c | github | https://github.com/llvm/llvm-project | clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.h |
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cluster.html
applies_to:
deployment:
ess:
self:
---
# Cluster-level shard allocation and routing settings [modules-cluster]
Shard allocation is the process of assigning shard copies to nodes. This can happen during... | unknown | github | https://github.com/elastic/elasticsearch | docs/reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md |
# $Id: confbot.py 2912 2009-08-24 11:56:13Z bennylp $
#
# SIP Conference Bot
#
# Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.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 Software Foundation; eithe... | unknown | codeparrot/codeparrot-clean | ||
import unittest
from programy.processors.post.formatnumbers import FormatNumbersPostProcessor
from programy.bot import Bot
from programy.brain import Brain
from programy.config.brain import BrainConfiguration
from programy.config.bot import BotConfiguration
class FormatNmbersTests(unittest.TestCase):
def setUp(se... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
# Copyright (c) 2019 Pieter Wuille
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utility functions related to output descriptors"""
INPUT_CHARSET = "0123456789()[],'/*abcdefgh@:$%{}IJKLMNOPQRSTUVWXYZ&+-... | unknown | codeparrot/codeparrot-clean | ||
#![cfg(feature = "macros")]
#![allow(clippy::disallowed_names)]
#[cfg(all(target_family = "wasm", not(target_os = "wasi")))]
use wasm_bindgen_test::wasm_bindgen_test as maybe_tokio_test;
#[cfg(not(all(target_family = "wasm", not(target_os = "wasi"))))]
use tokio::test as maybe_tokio_test;
use tokio::sync::oneshot;
u... | rust | github | https://github.com/tokio-rs/tokio | tokio/tests/macros_select.rs |
# coders by Vlamo 2012 (version: 0.2)
from Components.Converter.Converter import Converter
from Components.Element import cached
from Poll import Poll
from os import popen, statvfs
SIZE_UNITS = ["B", "KB", "MB", "GB", "TB", "PB", "EB"]
class ProgressDiskSpaceInfo(Poll, Converter):
HDDTEMP = 0
LOADAVG = 1
MEMTOTAL ... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.