code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the "Elastic License * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side * Public License v 1"; you may not use this file except in compliance with, ...
java
github
https://github.com/elastic/elasticsearch
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/doc/SnippetParserException.java
# Copyright 2018 the authors. # This file is part of Hy, which is free software licensed under the Expat # license. See the LICENSE. from __future__ import absolute_import import inspect try: # Check if we have the newer inspect.signature available. # Otherwise fallback to the legacy getargspec. inspect....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from bs4 import BeautifulSoup import os import re BASE_JAVADOC_URL = "http://docs.spring.io/spring/docs/current/javadoc-api/" BASE_LOCAL_JAVADOC_DIR = "./docs/javadoc-api" BASE_JAVADOC_FILE = BASE_LOCAL_JAVADOC_DIR + "/allclasses-noframe.html" def readRootFile(): rootFile = open(BASE_JAVADOC_FIL...
unknown
codeparrot/codeparrot-clean
# dialog.py -- Tkinter interface to the tk_dialog script. from Tkinter import * from Tkinter import _cnfmerge if TkVersion <= 3.6: DIALOG_ICON = 'warning' else: DIALOG_ICON = 'questhead' class Dialog(Widget): def __init__(self, master=None, cnf={}, **kw): cnf = _cnfmerge((cnf, kw)) self.w...
unknown
codeparrot/codeparrot-clean
module.exports = function() { return "This is page B."; };
javascript
github
https://github.com/webpack/webpack
examples/hybrid-routing/bPage.js
// 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
config/config_test.go
from __future__ import absolute_import from django.contrib.auth.forms import ReadOnlyPasswordHashWidget from django.contrib.admin.widgets import (AdminDateWidget, AdminTimeWidget, AdminSplitDateTime, RelatedFieldWidgetWrapper) from django.forms import (FileInput, CheckboxInput...
unknown
codeparrot/codeparrot-clean
/* chunkset_avx2.c -- AVX2 inline functions to copy small data chunks. * For conditions of distribution and use, see copyright notice in zlib.h */ #include "zbuild.h" #ifdef X86_AVX2 #include <immintrin.h> #include "../generic/chunk_permute_table.h" typedef __m256i chunk_t; #define CHUNK_SIZE 32 #define HAVE_CHUN...
c
github
https://github.com/opencv/opencv
3rdparty/zlib-ng/arch/x86/chunkset_avx2.c
# # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # #...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2016-present, Facebook, 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 agreed...
unknown
codeparrot/codeparrot-clean
/** * Test that a user may only override killOp error code if they have the proper privileges. * * @tags: [requires_fcv_83, requires_sharding] */ import {configureFailPoint} from "jstests/libs/fail_point_util.js"; import {FixtureHelpers} from "jstests/libs/fixture_helpers.js"; import {ShardingTest} from "jstests/l...
javascript
github
https://github.com/mongodb/mongo
jstests/auth/killop_error_code.js
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * nbtpreprocesskeys.c * Preprocessing for Postgres btree scan keys. * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATI...
c
github
https://github.com/postgres/postgres
src/backend/access/nbtree/nbtpreprocesskeys.c
#!/usr/bin/python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
unknown
codeparrot/codeparrot-clean
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from django.test import TestCase from django.core import mail from django.core.urlresolvers import reverse import json from django.contrib.auth.models import User class UserRelatedTests(TestCase): def create_sample_user(self): instance = User.objects.create( username ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsRelation. .. note:: 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. """ __aut...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) Stephane Wirtel # Copyright (C) 2011 Nicolas Vanhoren # Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>). # All rights reserved. # # Redistribution and use in source and binary forms, with or w...
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals from django.db.models.signals import post_save, pre_save from django.test import TestCase from .models import Account, Employee, Person, Profile, ProxyEmployee class UpdateOnlyFieldsTests(TestCase): def test_update_fields_basic(self): s = Person.objects.create(name...
unknown
codeparrot/codeparrot-clean
"""Taken and modified from the dbsettings project. http://code.google.com/p/django-values/ """ from decimal import Decimal from django import forms from django.conf import settings as django_settings from django.core.exceptions import ImproperlyConfigured from django.core.cache import cache from django.utils import si...
unknown
codeparrot/codeparrot-clean
from distutils import log, dir_util import os, sys from setuptools import Command from setuptools.archive_util import unpack_archive import pkg_resources class install_egg_info(Command): """Install an .egg-info directory for the package""" description = "Install an .egg-info directory for the package" u...
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
# The LLVM/Offload Subproject The Offload subproject aims at providing tooling, runtimes, and APIs that allow users to execute code on accelerators or other "co-processors" that may or may not match the architecture of their "host". In the long run, all kinds of targets are in scope of this effort, including but not l...
unknown
github
https://github.com/llvm/llvm-project
offload/README.md
#!/usr/bin/python3 # example call # ./master.py /dev/ttyUSB0 /dev/ttyUSB1 ## python system imports import csv import threading import queue import time import sys import os.path import AEMmailer from casyncosc import SerialServer ## diskSpaceLimit : in MB, when limit reached, processing halts diskSpaceLimit = 100 # ...
unknown
codeparrot/codeparrot-clean
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.exceptions; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.Mockito.mock; import java.lang.reflect.Field; import java.util.Co...
java
github
https://github.com/mockito/mockito
mockito-core/src/test/java/org/mockito/internal/exceptions/ReporterTest.java
import React, { Component } from 'react'; import { Alert, Button, Col, Nav, NavItem, NavLink, Row, TabContent, TabPane } from 'reactstrap'; import moment from 'moment-timezone'; import ExpressionInput from './ExpressionInput'; import GraphControls from './GraphControls'; import { GraphTabContent } from './GraphTabCo...
typescript
github
https://github.com/prometheus/prometheus
web/ui/react-app/src/pages/graph/Panel.tsx
# Copyright 2013 OpenStack Foundation # 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
""" An implementation of IdReader and IdGenerator that manages ids for the SplitMongo storage mechanism. """ from opaque_keys.edx.locator import LocalId, DefinitionLocator from xmodule.x_module import OpaqueKeyReader, AsideKeyGenerator from xmodule.modulestore.split_mongo import BlockKey # TODO: Migrate split_mongo t...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true class Image < ActiveRecord::Base belongs_to :imageable, polymorphic: true, foreign_key: :imageable_identifier, foreign_type: :imageable_class end
ruby
github
https://github.com/rails/rails
activerecord/test/models/image.rb
/* * AltiVec optimizations for libjpeg-turbo * * Copyright (C) 2014, D. R. Commander. All Rights Reserved. * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is g...
c
github
https://github.com/opencv/opencv
3rdparty/libjpeg-turbo/simd/powerpc/jccolor-altivec.c
/* * 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/test/com/google/common/io/PackageSanityTests.java
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package sql import ( "context" "sync" "github.com/cockroachdb/cockroach/pkg/util/cancelchecker" "github.com/cockroachdb/cockroach/pkg/util/metamorphic" "github.co...
go
github
https://github.com/cockroachdb/cockroach
pkg/sql/internal_result_channel.go
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2alpha1", "metadata": { "name": "v0alpha1.Repeating-a-row-with-a-repeating-horizontal-panel.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "query": { "kind": "", ...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/e2e-repeats/v0alpha1.Repeating-a-row-with-a-repeating-horizontal-panel.v42.v2alpha1.json
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/proxy/topology.go
// 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
cmd/promtool/backfill_test.go
import _parca import os import os.path from MatrixInfo import * class alignment: m = int() g = int() d = int() data = list() def __init__(self, c_al): self.m = c_al.m self.d = c_al.d self.g = c_al.g self.data = [] for a, b in c_al.data: aa = int(...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """Tests for the teams API at the HTTP request level.""" import json from datetime import datetime import pytz from dateutil import parser import ddt from elasticsearch.exceptions import ConnectionError from mock import patch from search.search_engine_base import SearchEngine from django.core.u...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # king_phisher/client/windows/rpc_terminal.py # # 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 #...
unknown
codeparrot/codeparrot-clean
# -*- coding:utf-8 -*- """ 上海银行间同业拆放利率(Shibor)数据接口 Created on 2014/07/31 @author: Jimmy Liu @group : waditu @contact: jimmysoa@sina.cn """ import pandas as pd import numpy as np from tushare.stock import cons as ct from tushare.util import dateu as du def shibor_data(year=None): """ 获取上海银行间同业拆放利率(Shibor) P...
unknown
codeparrot/codeparrot-clean
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/tableofcontents.py __version__=''' $Id$ ''' __doc__="""Experimental class to generate Tables of Contents easily This module defines a single...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0-only %YAML 1.2 --- $id: http://devicetree.org/schemas/clock/qcom,msm8996-apcc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm clock controller for MSM8996 CPUs maintainers: - Loic Poulain <loic.poulain@linaro.org> description: | Qualcomm CPU clock c...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/clock/qcom,msm8996-apcc.yaml
# -*- 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
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\HttpCache; use Symfony\Component\HttpFou...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php
def test_namedtuple(): from collections import namedtuple assert namedtuple("Point", "x y")(1, 2).x == 1 assert namedtuple(u"Point", u"x y", verbose=False, rename=False)(1, 2).x == 1 assert namedtuple(b"Point", b"x y", verbose=True, rename=True)(1, 2).x == 1 assert namedtuple("Point", ["x", "y"])(...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################### # # GetComments # Returns all comments for a specific company update. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may n...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.utils.io private const val DEVELOPMENT_MODE_KEY: String = "io.ktor.development" internal actual val DEVELOPMENT_MODE: Boolean get() = System.getProperty(DEVELOPMENT_MODE_...
kotlin
github
https://github.com/ktorio/ktor
ktor-io/jvm/src/io/ktor/utils/io/ByteChannel.jvm.kt
from __future__ import absolute_import from django.core.management.base import BaseCommand from zerver.lib.queue import queue_json_publish import sys import ujson def error(*args): raise Exception('We cannot enqueue because settings.USING_RABBITMQ is False.') class Command(BaseCommand): help = """Read JSON ...
unknown
codeparrot/codeparrot-clean
from nltk.parse.stanford import StanfordParser from nltk.stem.porter import PorterStemmer from nltk.tokenize import sent_tokenize, word_tokenize import math class SentenceParser: __parser = None __alpha = 1.0 __beta = 1.0 __gamma = 0.1 __var_d = 0.0 __var_s = 0.0 d...
unknown
codeparrot/codeparrot-clean
urlpatterns = [] class HandlerView: @classmethod def as_view(cls): def view(): pass return view handler400 = HandlerView.as_view() handler403 = HandlerView.as_view() handler404 = HandlerView.as_view() handler500 = HandlerView.as_view()
python
github
https://github.com/django/django
tests/check_framework/urls/bad_class_based_error_handlers.py
from django.conf.urls import include, url from . import views from .tests import URLObject testobj1 = URLObject('testapp', 'test-ns1') testobj2 = URLObject('testapp', 'test-ns2') default_testobj = URLObject('testapp', 'testapp') otherobj1 = URLObject('nodefault', 'other-ns1') otherobj2 = URLObject('nodefault', 'othe...
unknown
codeparrot/codeparrot-clean
# orm/relationships.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Heuristics related to join conditions as used in :func:`.relationship`. Provi...
unknown
codeparrot/codeparrot-clean
from sympy import S, Integral, sin, cos, pi, sqrt, symbols from sympy.physics.vector import (Dyadic, Point, ReferenceFrame, \ Vector) from sympy.physics.vector import (cross, dot, express, \ time_derivative, kinematic_equations, \ ...
unknown
codeparrot/codeparrot-clean
from pippi import dsp, tune from hcj import snds, keys key = 'g' rhodes = snds.load('hcj/rhodes1.wav') rhodes = dsp.transpose(rhodes, 16.0/15.0) def chord(length, freqs, amp): layers = [ keys.rhodes(length, freq, amp * dsp.rand(0.25, 0.5)) for freq in freqs ] layers = [ dsp.pan(layer, dsp.rand()) for layer i...
unknown
codeparrot/codeparrot-clean
:host { display: block; } .insert-container { border: 1px solid #dddddd; margin-top: 1em; padding: 20px 20px 0px 20px; font-weight: bold; font-size: 20px; opacity: 1; transition: opacity 200ms ease-in; @starting-style { opacity: 0; } } .deleting { opacity: 0; transform: translateY(20px); ...
css
github
https://github.com/angular/angular
adev/src/content/examples/animations/src/app/native-css/remove.css
""" This test file will run through some XBlock test scenarios regarding the recommender system """ from copy import deepcopy import json import itertools import StringIO import unittest from ddt import ddt, data from nose.plugins.attrib import attr from django.conf import settings from django.core.urlresolvers impo...
unknown
codeparrot/codeparrot-clean
import { NextRequest, NextResponse } from "next/server"; import { revalidateTag } from "next/cache"; export async function POST(request: NextRequest) { const requestHeaders = new Headers(request.headers); const secret = requestHeaders.get("x-vercel-reval-key"); if (secret !== process.env.CONTENTFUL_REVALIDATE_S...
typescript
github
https://github.com/vercel/next.js
examples/cms-contentful/app/api/revalidate/route.ts
# -*- 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
""" Created on 22/02/2017 @author: jrkarki """ class Reanimator: """This class represents lifeless bodies that can be reanimated""" def __init__(self, corpse, alive=False): """ :param corpse: The name of the corpse :type corpse: str :param alive: Is the corpse alive? Defaults ...
unknown
codeparrot/codeparrot-clean
# Copyright 2011 OpenStack Foundation # 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
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy # SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: MIT # These are supported funding model platforms github: tauri-apps patreon: # open_collective: tauri ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single T...
unknown
github
https://github.com/tauri-apps/tauri
.github/FUNDING.yml
import asyncio import traceback import inspect from collections.abc import Iterable from itertools import groupby from typing import Union, List, Any, Callable, Type import time import ray from ray.async_compat import sync_to_async from ray.serve.utils import (parse_request_item, _get_logger, chain_future, ...
unknown
codeparrot/codeparrot-clean
#include <ATen/cpu/FlushDenormal.h> #include <ATen/cpu/vec/intrinsics.h> #if !defined(__s390x__) && !defined(__powerpc__) #include <cpuinfo.h> #endif namespace at::cpu { #if defined(__SSE__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1) static constexpr unsigned int DENORMALS_ZERO = 0x0040; static co...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/cpu/FlushDenormal.cpp
/* Copyright (c) 2015, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including...
c
github
https://github.com/mysql/mysql-server
sql/temp_table_param.h
# encoding: UTF-8 from datetime import datetime from pymongo import Connection from pymongo.errors import * from eventEngine import * # 常量定义 OFFSET_OPEN = '0' # 开仓 OFFSET_CLOSE = '1' # 平仓 DIRECTION_BUY = '0' # 买入 DIRECTION_SELL = '1' # 卖出 PRICETYPE_LIMIT = '2' # 限价 #######...
unknown
codeparrot/codeparrot-clean
import traceback import maya.cmds as cmds import _functions as fnt """ Attach to existing """ def attachTimeAndFile(node, jobInfo, isConstant=False): connAttr = cmds.connectionInfo(node+".inTime", sfd=True) if connAttr == "" and not isConstant: cmds.connectAttr(jobInfo.timeCtrl+".outTime", node+".inTime") nod...
unknown
codeparrot/codeparrot-clean
#!/bin/sh test_description='signed tag tests' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh . "$TEST_DIRECTORY/lib-gpg.sh" test_expect_success GPGSSH 'create signed tags ssh' ' test_when_finished "test_unconfig commit.gpgsign" && test_config gpg.format ssh &&...
unknown
github
https://github.com/git/git
t/t7031-verify-tag-signed-ssh.sh
const idx = process.execArgv.indexOf('--cpu-prof') if (idx >= 0) process.execArgv.splice(idx, 1) module.exports = { eslint: { ignoreDuringBuilds: true, }, }
javascript
github
https://github.com/vercel/next.js
bench/nested-deps-app-router-many-pages/next.config.js
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 Red Hat, 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 #...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- from xml.sax.handler import ContentHandler from xml.sax import make_parser import sys """ Make Html a list and store """ class myContentHandler(ContentHandler): def __init__ (self): self.inItem = False self.inContent = False self.Content = "" ...
unknown
codeparrot/codeparrot-clean
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 b...
unknown
codeparrot/codeparrot-clean
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT use crate::{ error::Context, helpers::{config::Config as TauriConfig, template}, mobile::ios::LIB_OUTPUT_FILE_NAME, Error, ErrorExt, Result, }; use cargo_mobile2::{ app...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri-cli/src/mobile/ios/project.rs
"""Unsupervised nearest neighbors learner""" # Authors: The scikit-learn developers # SPDX-License-Identifier: BSD-3-Clause from sklearn.base import _fit_context from sklearn.neighbors._base import KNeighborsMixin, NeighborsBase, RadiusNeighborsMixin class NearestNeighbors(KNeighborsMixin, RadiusNeighborsMixin, Neig...
python
github
https://github.com/scikit-learn/scikit-learn
sklearn/neighbors/_unsupervised.py
#!/usr/bin/env python # # Copyright 2007,2010,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your ...
unknown
codeparrot/codeparrot-clean
name: JS Tests on: push: branches: - main pull_request: workflow_dispatch: env: FORCE_COLOR: 2 NODE: 22 permissions: contents: read jobs: run: permissions: # allow coverallsapp/github-action to create new checks issues and fetch code checks: write contents: read nam...
unknown
github
https://github.com/twbs/bootstrap
.github/workflows/js.yml
/* * 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
guava-tests/test/com/google/common/collect/CompactHashSetFloodingTest.java
from __future__ import absolute_import, division import __builtin__ import math import random import time def median(x, use_float=True): # there exist better algorithms... y = sorted(x) if not y: raise ValueError('empty sequence!') left = (len(y) - 1)//2 right = len(y)//2 sum = y[left]...
unknown
codeparrot/codeparrot-clean
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const memoize = require("./util/memoize"); /** @typedef {import("./ChunkGraph")} ChunkGraph */ /** @typedef {import("./DependenciesBlock")} DependenciesBlock */ /** @typedef {import("./Module")} Module *...
javascript
github
https://github.com/webpack/webpack
lib/Dependency.js
--- date: 2015-10-01 --- Here is the content.
unknown
github
https://github.com/jekyll/jekyll
test/source/_dates/date_without_time.md
# -*- 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 2021 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/grappler/optimizers/data/use_private_thread_pool.h
#ifndef INTERNAL_ENCODING_H /*-*-C-*-vi:se ft=c:*/ #define INTERNAL_ENCODING_H /** * @author Ruby developers <ruby-core@ruby-lang.org> * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute...
c
github
https://github.com/ruby/ruby
internal/encoding.h
<!--Copyright 2023 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/en/model_doc/univnet.md
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-11-09 10:42 from __future__ import unicode_literals from decimal import Decimal from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ (...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package command import ( "path/filepath" "regexp" "sort" "testing" "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/states/statemgr" ) // testStateBackups returns the list of backups in or...
go
github
https://github.com/hashicorp/terraform
internal/command/state_test.go
from typing import TYPE_CHECKING, Any from langchain_classic._api import create_importer if TYPE_CHECKING: from langchain_community.llms import Ollama # Create a way to dynamically look up deprecated imports. # Used to consolidate logic for raising deprecation warnings and # handling optional imports. DEPRECATED...
python
github
https://github.com/langchain-ai/langchain
libs/langchain/langchain_classic/llms/ollama.py
#!/usr/bin/python # # Copyright (C) 2009 Google 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 ...
unknown
codeparrot/codeparrot-clean
# Author: Anthony Baxter """Class representing audio/* type MIME documents. """ import sndhdr from cStringIO import StringIO from email import Errors from email import Encoders from email.MIMENonMultipart import MIMENonMultipart _sndhdr_MIMEmap = {'au' : 'basic', 'wav' :'x-wav', ...
unknown
codeparrot/codeparrot-clean
""" mailthon.response ~~~~~~~~~~~~~~~~~ Response objects encapsulate responses returned by SMTP servers. :copyright: (c) 2015 by Eeo Jun :license: MIT, see LICENSE for details. """ class Response(object): """ Encapsulates a (status_code, message) tuple returned by a server when th...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Software License Agreement (BSD License) # # Copyright (c) 2014, Ocean Systems Laboratory, Heriot-Watt University, UK. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follow...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied, # including the impl...
unknown
codeparrot/codeparrot-clean
""" Support for monitoring an OpenEVSE Charger. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.openevse/ """ import logging from requests import RequestException import voluptuous as vol import homeassistant.helpers.config_validation as cv fro...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Comunitea All Rights Reserved # $Omar Castiñeira Saavedra <omar@comunitea.com>$ # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python ######################################################################## # $HeadURL: svn+ssh://svn.cern.ch/reps/dirac/DIRAC/trunk/DIRAC/FrameworkSystem/scripts/dirac-proxy-upload.py $ # File : dirac-proxy-init.py # Author : Adrian Casajus #######################################################...
unknown
codeparrot/codeparrot-clean
first: id: 1
unknown
github
https://github.com/rails/rails
activerecord/test/fixtures/fk_object_to_point_to.yml
# (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
#!/usr/bin/python """ Generate the big keycodes table for virkeys. It read keymaps.csv from stdin and put the generated code to stdout. Please keep keymaps.csv be exactly the same as: http://git.gnome.org/browse/gtk-vnc/plain/src/keymaps.csv. If anything inconsistent happens, please change this file instead of keymap...
unknown
codeparrot/codeparrot-clean
# Natural Language Toolkit: Semantic Interpretation # # Author: Ewan Klein <ewan@inf.ed.ac.uk> # # Copyright (C) 2001-2012 NLTK Project # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ Utility functions for batch-processing sentences: parsing and extraction of the semantic representation of...
unknown
codeparrot/codeparrot-clean
### extends 'class_empty.py' ### block ClassImports # NOTICE: Do not edit anything here, it is generated code from . import gxapi_cy from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref ### endblock ClassImports ### block Header # NOTICE: The code generator will not replace the code in this block ### endb...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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 import os import json import sys from nose.plugins.skip import SkipTest i...
unknown
codeparrot/codeparrot-clean