code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
# -*- coding: utf-8 -*- """ timer2 ~~~~~~ Scheduler for Python functions. """ from __future__ import absolute_import from __future__ import with_statement import atexit import heapq import os import sys import threading from datetime import datetime from functools import wraps from itertools import coun...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011, 2012 CERN. ## ## Invenio 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 opt...
unknown
codeparrot/codeparrot-clean
module.exports = { content: [ "./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}", ], theme: { extend: { colors: { "accent-1": "#FAFAFA", "accent-2": "#EAEAEA", "accent-7": "#333", success: "#0070f3", cyan: "#79FFE1", }, spacing...
javascript
github
https://github.com/vercel/next.js
examples/cms-enterspeed/tailwind.config.js
from zmusic import app, db from zmusic.database import Song, Download from zmusic.login import login_required from zmusic.streams import send_process, send_file_partial from zmusic.filename import generate_download_filename from zmusic.picard.file import MIMETYPES as mimetypes from flask import abort, request from werk...
unknown
codeparrot/codeparrot-clean
"""Support for Toon thermostat.""" import logging from typing import Any, Dict, List, Optional from homeassistant.components.climate import ClimateDevice from homeassistant.components.climate.const import ( CURRENT_HVAC_HEAT, CURRENT_HVAC_IDLE, HVAC_MODE_HEAT, PRESET_AWAY, PRESET_COMFORT, PRES...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ pygments.styles.manni ~~~~~~~~~~~~~~~~~~~~~ A colorful style, inspired by the terminal highlighting style. This is a port of the style used in the `php port`_ of pygments by Manni. The style is called 'default' there. :copyright: Copyright 2006-2013 by the Pygments...
unknown
codeparrot/codeparrot-clean
import math from decimal import Decimal from django.db.models import DecimalField from django.db.models.functions import Tan from django.test import TestCase from django.test.utils import register_lookup from ..models import DecimalModel, FloatModel, IntegerModel class TanTests(TestCase): def test_null(self): ...
python
github
https://github.com/django/django
tests/db_functions/math/test_tan.py
# Copyright 2012 10gen, 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 to in writing, soft...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- from gettext import gettext as _ NAME = _('Lavalleja') STATES = [ (_('Treinta y Tres'), 254, 574, 66, 0), (_('Florida'), 253, 107, 174, 0), (_('Canelones'), 252, 31, 779, 90), (_('Maldonado'), 251, 334, 832, 0), (_('Rocha'), 250, 699, 566, 0), (_('Lavalleja'), 249, 398...
unknown
codeparrot/codeparrot-clean
import numpy as np from numpy.linalg import svd def rank_est(A, atol=1e-13, rtol=0): """Estimate the rank (i.e. the dimension of the nullspace) of a matrix. The algorithm used by this function is based on the singular value decomposition of `A`. Parameters ---------- A : ndarray A sho...
unknown
codeparrot/codeparrot-clean
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT //! Utilities for unit testing on Tauri applications. //! //! # Stability //! //! This module is unstable. //! //! # Examples //! //! ```rust //! use tauri::test::{mock_builder, ...
rust
github
https://github.com/tauri-apps/tauri
crates/tauri/src/test/mod.rs
""" Integration tests for importing courses containing pure XBlocks. """ from xblock.core import XBlock from xblock.fields import String from xmodule.modulestore.django import modulestore from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.xml_importer import import_course_from_xml from xmodule.m...
unknown
codeparrot/codeparrot-clean
# Copyright 2016-2021 Marcus Furlong <furlongm@gmail.com> # # This file is part of Patchman. # # Patchman is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 only. # # Patchman is distributed in the hope...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. // // Code generated by generate-staticcheck; DO NOT EDIT. // //go:build bazel package sa3000 import ( util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes...
go
github
https://github.com/cockroachdb/cockroach
build/bazelutil/staticcheckanalyzers/sa3000/analyzer.go
/* origin: FreeBSD /usr/src/lib/msun/src/e_log10f.c */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is free...
rust
github
https://github.com/nodejs/node
deps/crates/vendor/libm/src/math/log10f.rs
# Copyright 2011 OpenStack Foundation. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance w...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/common/security/scram/ScramCredential.java
from __future__ import annotations from typing import ( TYPE_CHECKING, Any, Literal, Self, cast, overload, ) import warnings import numpy as np from pandas._config import ( is_nan_na, using_python_scalars, ) from pandas._libs import ( algos as libalgos, lib, missing as li...
python
github
https://github.com/pandas-dev/pandas
pandas/core/arrays/masked.py
// Copyright 2022 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/promote_experimental_flag_test.go
// run // 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. // Test implicit and explicit conversions of constants. package main const ( ci8 = -1 << 7 ci16 = -1<<15 + 100 ci32 = -1<<31 + 100000 ci64 = -1<<...
go
github
https://github.com/golang/go
test/intcvt.go
/* * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.server.netty import io.ktor.http.* import io.netty.handler.codec.http.* import io.netty.handler.codec.http.HttpHeaders public class NettyApplicationRequestHeaders(request: Ht...
kotlin
github
https://github.com/ktorio/ktor
ktor-server/ktor-server-netty/jvm/src/io/ktor/server/netty/NettyApplicationRequestHeaders.kt
<?php $container->loadFromExtension('framework', [ 'messenger' => [ 'buses' => [ 'command_bus' => [ 'middleware' => [ [ 'foo' => ['qux'], 'bar' => ['baz'], ], ], ]...
php
github
https://github.com/symfony/symfony
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/messenger_middleware_factory_erroneous_format.php
from __future__ import unicode_literals import base64 import logging import string from datetime import datetime, timedelta from django.conf import settings from django.contrib.sessions.exceptions import SuspiciousSession from django.core.exceptions import SuspiciousOperation from django.utils import timezone from dj...
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-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/override/OverrideAutoConfigurationEnabledTrueIntegrationTests.java
""" Tests for discrete models Notes ----- DECIMAL_3 is used because it seems that there is a loss of precision in the Stata *.dta -> *.csv output, NOT the estimator for the Poisson tests. """ # pylint: disable-msg=E1101 from statsmodels.compat.python import range import os import numpy as np from numpy.testing import ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsSpatialiteProvider .. 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. ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ *************************************************************************** ModelerAlgorithm.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********************...
unknown
codeparrot/codeparrot-clean
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from numpy.testing import assert_equal, assert_allclose from astropy.stats.jackknife import jackknife_resampling, jackknife_stats from astropy.utils.exceptions import AstropyDeprecationWarning from astropy.utils.compat.op...
unknown
codeparrot/codeparrot-clean
# orm/session.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 """Provides the Session class and related utilities.""" import weakref from .. import...
unknown
codeparrot/codeparrot-clean
""" Test functions for 1D array set operations. """ from numpy.testing import * import numpy as np from numpy.lib.arraysetops import * import warnings class TestAso(TestCase): def test_unique( self ): a = np.array( [5, 7, 1, 2, 1, 5, 7] ) ec = np.array( [1, 2, 5, 7] ) c = unique( a ) ...
unknown
codeparrot/codeparrot-clean
import copy import inspect from importlib import import_module from django.db import router from django.db.models.query import QuerySet from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class BaseManager(object): # Tracks each time a Manager in...
unknown
codeparrot/codeparrot-clean
import bisect import calendar import collections import functools import re import weakref from datetime import datetime, timedelta, tzinfo from . import _common, _tzpath EPOCH = datetime(1970, 1, 1) EPOCHORDINAL = datetime(1970, 1, 1).toordinal() # It is relatively expensive to construct new timedelta objects, and ...
python
github
https://github.com/python/cpython
Lib/zoneinfo/_zoneinfo.py
''' Accounting class to stores network metrics gathered by perfSONARs. ''' __RCSID__ = "$Id$" from DIRAC.AccountingSystem.Client.Types.BaseAccountingType import BaseAccountingType class Network( BaseAccountingType ): ''' Accounting type to stores network metrics gathered by perfSONARs. ''' def __init__( self...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v1beta1", "metadata": { "name": "v0alpha1.Repeating-a-panel-vertically.v42" }, "spec": { "annotations": { "list": [ { "builtIn": 1, "datasource": { "uid": "-- Grafana --" }, "e...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/output/migrated_dev_dashboards/e2e-repeats/v0alpha1.Repeating-a-panel-vertically.v42.v1beta1.json
# 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
# -*- coding: UTF-8 -*- # Copyright 2017 Luc Saffre # License: BSD (see file COPYING for details) from __future__ import unicode_literals from django.conf import settings from lino.api import dd, rt, _ from lino.utils import Cycler # Questions originally copied from https://www.politicalcompass.org QUESTIONS = """ ...
unknown
codeparrot/codeparrot-clean
scrape_configs: - job_name: prometheus kubernetes_sd_configs: - role: pod api_server: "https://localhost:1234" bearer_token: 1234 basic_auth: username: user password: password
unknown
github
https://github.com/prometheus/prometheus
config/testdata/kubernetes_bearertoken_basicauth.bad.yml
# -*- coding: utf-8 -*- from __future__ import absolute_import from zerver.lib import cache from zerver.lib.test_helpers import ( AuthedTestCase, queries_captured, stub, tornado_redirected_to_list ) from zerver.decorator import ( JsonableError ) from zerver.lib.test_runner import ( slow ) from zerver.m...
unknown
codeparrot/codeparrot-clean
import * as React from "react"; import * as TestRenderer from "react-test-renderer"; import { MemoryRouter, Routes, Route, Outlet } from "react-router"; describe("A layout route", () => { it("does not match when none of its children do", () => { let renderer: TestRenderer.ReactTestRenderer; TestRenderer.act(...
typescript
github
https://github.com/remix-run/react-router
packages/react-router/__tests__/layout-routes-test.tsx
# Docker Swarm Service Driller(ssd) ssd is a troubleshooting utility for Docker swarm networks. ### control-plane and datapath consistency check on a node ssd checks for the consistency between docker network control-plane (from the docker daemon in-memory state) and kernel data path programming. Currently the tool c...
unknown
github
https://github.com/moby/moby
daemon/libnetwork/cmd/ssd/README.md
// errorcheck // Copyright 2013 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. // Test compiler diagnosis of function missing return statements. // See issue 65 and golang.org/s/go11return. package p type T int var x inte...
go
github
https://github.com/golang/go
test/return.go
from __future__ import absolute_import, division, unicode_literals from types import ModuleType from pip._vendor.six import text_type try: import xml.etree.cElementTree as default_etree except ImportError: import xml.etree.ElementTree as default_etree __all__ = ["default_etree", "MethodDispatcher", "isSurro...
unknown
codeparrot/codeparrot-clean
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
unknown
codeparrot/codeparrot-clean
# Copyright 2011-2013 Andreas Wundsam # Copyright 2011-2013 Colin Scott # # 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...
unknown
codeparrot/codeparrot-clean
//===--- TBD.h -- generates and validates TBD files -------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
c
github
https://github.com/apple/swift
lib/FrontendTool/TBD.h
# -*- coding: utf-8 -*- import collections import copy import datetime from . import exceptions import hashlib import hmac import json import logging try: import cPickle as pickle except ImportError: import pickle import sys import threading import time from xml.etree import ElementTree from authomatic.except...
unknown
codeparrot/codeparrot-clean
""" Process class can also be subclassed just like threading.Thread; Queue works like queue.Queue but for cross-process, not cross-thread """ import os, time, queue from multiprocessing import Process, Queue # process-safe shared queue # queue is a pipe + ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'CourseMode', fields ['course_id', 'currency', 'mode_slug'] db.create_unique('c...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """ pygments.formatters._mapping ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter mapping definitions. This file is generated by itself. Everytime you change something on a builtin formatter definition, run this script from the formatters folder to update it. Do not alter the FOR...
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
// @validateMemoizedEffectDependencies import {useLayoutEffect} from 'react'; function Component(props) { const data = {}; useLayoutEffect(() => { console.log(props.value); }, [data]); mutate(data); return data; }
javascript
github
https://github.com/facebook/react
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-useLayoutEffect-dep-not-memoized.js
# $Id$ # # Copyright (C) 2005 Gregory P. Smith (greg@krypto.org) # Licensed to PSF under a Contributor Agreement. # __doc__ = """hashlib module - A common interface to many hash functions. new(name, string='') - returns a new hash object implementing the given hash function; initializing th...
unknown
codeparrot/codeparrot-clean
# ***************************************************************************** # Copyright (c) 2016 IBM Corporation and other Contributors. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution,...
unknown
codeparrot/codeparrot-clean
//===--- FreestandingMacroExpansion.cpp -----------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2023 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE....
cpp
github
https://github.com/apple/swift
lib/AST/FreestandingMacroExpansion.cpp
""" sentry.plugins.bases.issue ~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django import forms from django.conf import settings from django.utils.html import format_h...
unknown
codeparrot/codeparrot-clean
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ColumnBox.height' db.add_column('lizard_box_columnbox', 'height', self.gf('django.db.models.fields...
unknown
codeparrot/codeparrot-clean
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unknown
codeparrot/codeparrot-clean
''' ModalView ========= .. versionadded:: 1.4.0 The :class:`ModalView` widget is used to create modal views. By default, the view will cover the whole "parent" window. Remember that the default size of a Widget is size_hint=(1, 1). If you don't want your view to be fullscreen, either use size hints with values lower...
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
storage/remote/write_otlp_handler.go
#!/usr/bin/env python # This is a patched version of sheel.py to fix # https://code.google.com/p/apsw/issues/detail?id=142 import sys import apsw import shlex import os import csv import re import textwrap import time import codecs import base64 if sys.platform=="win32": _win_colour=False try: import ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 """ Simple static site generator for the pandas web. pandas_web.py takes a directory as parameter, and copies all the files into the target directory after converting markdown files into html and rendering both markdown and html files with a context. The context is obtained by parsing the file `...
python
github
https://github.com/pandas-dev/pandas
web/pandas_web.py
from django import forms from oscar.core.loading import get_model from django.utils.translation import ugettext_lazy as _ Vote = get_model('reviews', 'vote') ProductReview = get_model('reviews', 'productreview') class ProductReviewForm(forms.ModelForm): name = forms.CharField(label=_('Name'), required=True) e...
unknown
codeparrot/codeparrot-clean
from __future__ import division, print_function, absolute_import import numpy as np from scipy.sparse import csr_matrix, isspmatrix, isspmatrix_csc from ._tools import csgraph_to_dense, csgraph_from_dense,\ csgraph_masked_from_dense, csgraph_from_masked DTYPE = np.float64 def validate_graph(csgraph, directed, dt...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0 %YAML 1.2 --- $id: http://devicetree.org/schemas/gpu/vivante,gc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Vivante GPU description: Vivante GPU core devices maintainers: - Lucas Stach <l.stach@pengutronix.de> properties: compatible: const: vivante,...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/gpu/vivante,gc.yaml
<table border="1" class="dataframe"> <thead> <tr> <th>columns.name.0</th> <th colspan="2" halign="left">a</th> </tr> <tr> <th>columns.name.1</th> <th>b</th> <th>c</th> </tr> </thead> <tbody> <tr> <th>0</th> <td>0</td> <td>0</td> </tr> <tr...
html
github
https://github.com/pandas-dev/pandas
pandas/tests/io/formats/data/html/index_unnamed_standard_columns_named_multi.html
#!/usr/bin/env python """Train an LSTM network to recognize the embedded Reber grammar.""" import random import numpy as np # State transition table TRANSITIONS = [ [('T', 1), ('P', 2)], # 0=B [('X', 3), ('S', 1)], # 1=BT [('V', 4), ('T', 2)], # 2=BP [('X', 2), ('S', 5)], # 3=BTX [('P', 3), ('...
unknown
codeparrot/codeparrot-clean
# This file is part of OpenHatch. # Copyright (C) 2010 Jack Grigg # Copyright (C) 2010 John Stumpo # Copyright (C) 2010, 2011 OpenHatch, Inc. # # 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 Free Software Foundat...
unknown
codeparrot/codeparrot-clean
import yaml import pyaml from os.path import join as join_path from collections import OrderedDict from pycmm.settings import DFLT_JOB_ALLOC_TIME from pycmm.utils import get_dict_val from pycmm.utils.jobman import JobManager from pycmm.cmmlib.samplelib import params_to_yaml_doc from pycmm.cmmlib.samplelib import MutRep...
unknown
codeparrot/codeparrot-clean
@file:JvmMultifileClass @file:JvmName("FlowKt") @file:Suppress("unused") package kotlinx.coroutines.flow import kotlinx.coroutines.* import kotlinx.coroutines.channels.* import kotlinx.coroutines.flow.internal.* import kotlinx.coroutines.internal.* import kotlin.jvm.* import kotlinx.coroutines.flow.internal.unsafeFlo...
kotlin
github
https://github.com/Kotlin/kotlinx.coroutines
kotlinx-coroutines-core/common/src/flow/operators/Merge.kt
/* * Copyright 2010-2025 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.analysis.api.symbols import org.jetbrains.kotlin.analysis.api.KaExperimentalApi ...
kotlin
github
https://github.com/JetBrains/kotlin
analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/symbols/KaDeclarationSymbol.kt
""" This module collects helper functions and classes that "span" multiple levels of MVC. In other words, these functions/classes introduce controlled coupling for convenience's sake. """ from django.http import ( Http404, HttpResponse, HttpResponsePermanentRedirect, HttpResponseRedirect, ) from django.template imp...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'tanchao' def word_ladder(start, end_len, dic): word_queue, cur_word = [], start word_queue.append(start) while word_queue: cur_word = word_queue.pop(0) # FIFO check words if len(cur_word) == end_len: if cur_word in di...
unknown
codeparrot/codeparrot-clean
""" ================================================== Discrete Fourier transforms (:mod:`scipy.fftpack`) ================================================== Fast Fourier Transforms (FFTs) ============================== .. autosummary:: :toctree: generated/ fft - Fast (discrete) Fourier Transform (FFT) ifft ...
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
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
unknown
codeparrot/codeparrot-clean
""" MAVProxy help/versioning module """ import os, time, platform, re from urllib2 import Request, urlopen, URLError, HTTPError from pymavlink import mavwp, mavutil from MAVProxy.modules.lib import mp_util from MAVProxy.modules.lib import mp_module if mp_util.has_wxpython: from MAVProxy.modules.lib.mp_menu impo...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # SPDX-License-Identifier: AGPL-3.0-or-later # # snippy - software development and maintenance notes manager. # Copyright 2017-2020 Heikki J. Laaksonen <laaksonen.heikki.j@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
unknown
codeparrot/codeparrot-clean
"""Module-level functions.""" import bisect import os import glob import random import re import subprocess as sp from collections.abc import Iterable from appdirs import user_config_dir from pyfaidx import Fasta, Sequence from genomepy.provider import ProviderBase from genomepy.plugin import get_active_plugins, init_...
unknown
codeparrot/codeparrot-clean
# coding=utf-8 # Copyright (C) Duncan Macleod (2013) # # This file is part of GWSumm. # # GWSumm 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
# Test packages (dotted-name import) import sys import os import tempfile import textwrap import unittest from test import support # Helpers to create and destroy hierarchies. def cleanout(root): names = os.listdir(root) for name in names: fullname = os.path.join(root, name) if os.path.isdir(...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cint, get_link_to_form from frappe.model.document import Document class Ass...
unknown
codeparrot/codeparrot-clean
''' largely adapts: https://github.com/aymericdamien/TensorFlow-Examples/blob/master/examples/2_BasicModels/linear_regression.py goal is to show linear dependency between number of variables in SELECT statement and execution time ''' from __future__ import print_function from bio_select_variables import * import te...
unknown
codeparrot/codeparrot-clean
<?php namespace Illuminate\Http\Middleware; use Illuminate\Contracts\Foundation\Application; use Illuminate\Http\Request; class TrustHosts { /** * The application instance. * * @var \Illuminate\Contracts\Foundation\Application */ protected $app; /** * The trusted hosts that have...
php
github
https://github.com/laravel/framework
src/Illuminate/Http/Middleware/TrustHosts.php
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
unknown
codeparrot/codeparrot-clean
""" Helper utility for cross validating a supervised classifier configuration. The classifier used should NOT be configured to save its model since this process requires us to train the classifier multiple times. Configuration ------------- - plugins - supervised_classifier Supervised Classifie...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 # # Copyright 2020 The Oppia 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 requi...
unknown
codeparrot/codeparrot-clean
"""Pre-trained ImageNet networks.""" import sys from typing import Any, Callable, Dict, NamedTuple, Optional, Tuple import numpy as np import tensorflow as tf import tensorflow.contrib.slim as tf_slim # pylint: disable=unused-import # Workaround of missing slim's import # see https://github.com/tensorflow/tensorflow/...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 import torch import torch.nn as nn import torch.nn.functional as F def initialize_weights(module): if isinstance(module, nn.Conv2d): nn.init.kaiming_normal_(module.weight.data, mode='fan_out') elif isinstance(module, nn.BatchNorm2d): module.weight.data.fill_(1) module.b...
unknown
codeparrot/codeparrot-clean
{ "compilerOptions": { // Setting the "baseUrl" to a different directory than "packages/" because otherwise // packages like the native "http" module are resolved to the Angular "http" package. "baseUrl": "..", "declaration": true, "downlevelIteration": true, "experimentalDecorators": true, ...
json
github
https://github.com/angular/angular
packages/tsconfig.json
name: Check Tiny Models on: push: branches: - check_tiny_models* repository_dispatch: schedule: - cron: "0 2 * * *" env: TOKEN: ${{ secrets.TRANSFORMERS_HUB_BOT_HF_TOKEN }} jobs: check_tiny_models: name: Check tiny models runs-on: ubuntu-22.04 steps: - name: Checkout transfo...
unknown
github
https://github.com/huggingface/transformers
.github/workflows/check_tiny_models.yml
# function for doing a morph between two sounds using the hpsModel import numpy as np import matplotlib.pyplot as plt from scipy.signal import get_window import sys, os sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../models/')) sys.path.append(os.path.join(os.path.dirname(os.path.re...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2002-present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
java
github
https://github.com/spring-projects/spring-framework
spring-context/src/main/java/org/springframework/stereotype/Service.java
# coding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..utils import ( determine_ext, js_to_json, parse_duration, remove_end, ) class LRTIE(InfoExtractor): IE_NAME = 'lrt.lt' _VALID_URL = r'https?://(?:www\.)?lrt\.lt/mediateka/ira...
unknown
codeparrot/codeparrot-clean
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/lite/simple_memory_arena.h
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/test/java/org/apache/kafka/common/requests/DeleteGroupsRequestTest.java
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- $id: http://devicetree.org/schemas/arm/qcom-soc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Qualcomm SoC compatibles naming convention maintainers: - Bjorn Andersson <andersson@kernel.org> description: | Guidelines for ...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/arm/qcom-soc.yaml
"""Ttk wrapper. This module provides classes to allow using Tk themed widget set. Ttk is based on a revised and enhanced version of TIP #48 (http://tip.tcl.tk/48) specified style engine. Its basic idea is to separate, to the extent possible, the code implementing a widget's behavior from the code implementing its ap...
python
github
https://github.com/python/cpython
Lib/tkinter/ttk.py
""" Attack equipment for battles. """ import copy import pygame as pg from .. import tools, setup from .. import constants as c class Sword(object): """ Sword that appears during regular attacks. """ def __init__(self, player): self.player = player self.sprite_sheet = setup.GFX['shopsig...
unknown
codeparrot/codeparrot-clean
'use client' import React from 'react' import Comp from '../../components/index.jsx' export default function Home() { return ( <> <h1>Hello!</h1> <Comp /> </> ) }
javascript
github
https://github.com/vercel/next.js
bench/nested-deps-app-router/app/client-components-only/page.js
"use client"; /* eslint-disable import/no-extraneous-dependencies */ // eslint-disable-next-line no-use-before-define import React from "react"; import { ElementButton } from "payload/components/rich-text"; import Icon from "../Icon"; const baseClass = "rich-text-large-body-button"; const ToolbarButton: React.FC<{ p...
typescript
github
https://github.com/vercel/next.js
examples/cms-payload/payload/fields/richText/largeBody/Button/index.tsx