code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
{
"drips": {
"ethereum": {
"ownedBy": "0xCE08E02c37d90d75C2bf7D9e55f7606C8DB80E70"
}
}
} | json | github | https://github.com/sveltejs/svelte | FUNDING.json |
'''
Metrics
=======
.. versionadded:: 1.5.0
A screen is defined by its physical size, density and resolution. These
factors are essential for creating UI's with correct size everywhere.
In Kivy, all the graphics pipelines work with pixels. But using pixels as a
measurement unit is problematic because sizes change ac... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2018 The Abseil 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 by applicable law or agr... | c | github | https://github.com/mysql/mysql-server | extra/abseil/abseil-cpp-20230802.1/absl/container/internal/unordered_set_lookup_test.h |
// errorcheck
// Copyright 2012 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.
// Verify that the Go compiler will not
// die after running into an undefined
// type in the argument list for a
// function.
// Does not compil... | go | github | https://github.com/golang/go | test/typecheck.go |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: MPL-2.0
package api
import (
"context"
"errors"
"fmt"
"net/http"
"github.com/mitchellh/mapstructure"
)
// GetPluginRuntimeInput is used as input to the GetPluginRuntime function.
type GetPluginRuntimeInput struct {
Name string `json:"-"`
// Type ... | go | github | https://github.com/hashicorp/vault | api/sys_plugins_runtimes.go |
# Copyright 2015 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 | ||
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | unknown | codeparrot/codeparrot-clean | ||
/*
* Copyright (c) 2022 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockitousage.annotation;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockMakers;
import org.m... | java | github | https://github.com/mockito/mockito | mockito-integration-tests/programmatic-tests/src/test/java/org/mockitousage/annotation/ProgrammaticMockMakerAnnotationTest.java |
import re
import select
import socket
import subprocess
import sys
from multiprocessing import Value
import json
import base64
import requests
from flask import Flask, abort
from flask import jsonify
from flask import render_template
from flask import request, send_from_directory
from flask_cors import CORS
from flask... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2012, GPy authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
from .gp_regression import GPRegression
from .gp_classification import GPClassification
from .sparse_gp_regression import SparseGPRegression
from .sparse_gp_classification import SparseGPClassification, Spa... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# 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
#
# Unle... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
# Image Occlusion Enhanced Add-on for Anki
#
# Copyright (C) 2016-2020 Aristotelis P. <https://glutanimate.com/>
# Copyright (C) 2012-2015 Tiago Barroso <tmbb@campus.ul.pt>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General ... | unknown | codeparrot/codeparrot-clean | ||
package v2
import (
"errors"
"reflect"
"testing"
)
func TestNewSettable(t *testing.T) {
contexts := []struct {
arg string
name string
field string
value string
err error
}{
{"name=value", "name", "", "value", nil},
{"name", "name", "", "", nil},
{"name.field=value", "name", "field", "value",... | go | github | https://github.com/moby/moby | daemon/pkg/plugin/v2/settable_test.go |
{
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"mobx": "^6.6.1",
"mobx-react-lite": "^3.4.0",
"next": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
} | json | github | https://github.com/vercel/next.js | examples/with-mobx/package.json |
#include "git-compat-util.h"
#include "gettext.h"
#include "parse.h"
static uintmax_t get_unit_factor(const char *end)
{
if (!*end)
return 1;
else if (!strcasecmp(end, "k"))
return 1024;
else if (!strcasecmp(end, "m"))
return 1024 * 1024;
else if (!strcasecmp(end, "g"))
return 1024 * 1024 * 1024;
return 0... | c | github | https://github.com/git/git | parse.c |
from random import randrange
from sympy.simplify.hyperexpand import (ShiftA, ShiftB, UnShiftA, UnShiftB,
MeijerShiftA, MeijerShiftB, MeijerShiftC, MeijerShiftD,
MeijerUnShiftA, MeijerUnShiftB, MeijerUnShiftC,
MeijerUnShiftD,
Re... | unknown | codeparrot/codeparrot-clean | ||
# hw1.py
# Name: Connor Durkin
# netID : cwd28
# Date: 29 September 2015
# Class: CPSC 458
# Instructor: Prof. Stephen Slade
import random
import numpy
import json
# initialize some useful global variables
global in_play
in_play = False
global outcome
outcome = " start game"
score = 0
# define globals for cards
SUIT... | unknown | codeparrot/codeparrot-clean | ||
# coding: utf-8
#-----------------------------------------------------------------------------
# Copyright (C) 2013 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-------------------------------------... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding:utf-8 -*-
'''
InCar单元测试.
'''
import inspect
import os
import unittest
from ..incar import InCar
from . import path
class InCarTest(unittest.TestCase):
def setUp(self):
# Create an InCar object.
self.maxDiff = True
def test_rdata(self):
" Test data line in INCAR can be r... | unknown | codeparrot/codeparrot-clean | ||
import pytest
from openshift_checks.package_version import PackageVersion, OpenShiftCheckException
def task_vars_for(openshift_release, deployment_type):
return dict(
ansible_pkg_mgr='yum',
openshift=dict(common=dict(service_type=deployment_type)),
openshift_release=openshift_release,
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# this is a windows documentation stub. actual code lives in the .ps1
# file of the same name
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'... | unknown | codeparrot/codeparrot-clean | ||
- name: Test no warnings ref "http://github.com/ansible/ansible/issues/37535"
hosts: testhost
gather_facts: false
tasks:
- name: set ssh jump host args
set_fact:
ansible_ssh_common_args: "-o ProxyCommand='ssh -W %h:%p -q root@localhost'"
- name: set ssh jump host args (FQCN)
ansible.bu... | unknown | github | https://github.com/ansible/ansible | test/integration/targets/set_fact/nowarn_clean_facts.yml |
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | c | github | https://github.com/tensorflow/tensorflow | tensorflow/compiler/mlir/tensorflow/transforms/passes.h |
// Copyright 2016 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/integration/clientv3/naming/resolver_test.go |
# Copyright 2017 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | unknown | codeparrot/codeparrot-clean | ||
{
"private": true,
"scripts": {
"predev": "npm run i18n:compile",
"dev": "next dev",
"prebuild": "npm run i18n:compile",
"build": "next build",
"start": "next start",
"lint": "eslint .",
"i18n:extract": "formatjs extract 'pages/**/*.ts*' 'components/**/*.ts*' --out-file lang/en.json",
... | json | github | https://github.com/vercel/next.js | examples/with-react-intl/package.json |
exports.abc = "abc";
Object.defineProperty(module, "exports", {
value: {
abc: "abc",
def: "def"
}
}); | javascript | github | https://github.com/webpack/webpack | test/cases/cjs-tree-shaking/bailouts/define-module-property.js |
import socket
try:
from select import poll, POLLIN
except ImportError: # `poll` doesn't exist on OSX and other platforms
poll = False
try:
from select import select
except ImportError: # `select` doesn't exist on AppEngine.
select = False
def is_connection_dropped(conn): # Platform-s... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0011_contactinformation_referenceitem_slideritem'),
]
operations = [
migrations.AlterModelOptions(
name='c... | unknown | codeparrot/codeparrot-clean | ||
'use strict';
const common = require('../common.js');
const { AsyncLocalStorage } = require('async_hooks');
/**
* This benchmark verifies the performance degradation of
* async resource propagation on the increasing number of
* active `AsyncLocalStorage`s.
*
* - AsyncLocalStorage.run()
* - Promise
* - Promi... | javascript | github | https://github.com/nodejs/node | benchmark/async_hooks/async-local-storage-propagate-promise.js |
# -*- coding: utf-8 -*-
"""
===============================
Computing source space SNR
===============================
This example shows how to compute and plot source space SNR as in [1]_.
"""
# Author: Padma Sundaram <tottochan@gmail.com>
# Kaisu Lankinen <klankinen@mgh.harvard.edu>
#
# License: BSD (3-clau... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 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 | ||
#!/usr/bin/python
# (c) 2017, NetApp, 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['deprecated'],
... | unknown | codeparrot/codeparrot-clean | ||
/*-------------------------------------------------------------------------
*
* binaryheap.c
* A simple binary heap implementation
*
* Portions Copyright (c) 2012-2026, PostgreSQL Global Development Group
*
* IDENTIFICATION
* src/common/binaryheap.c
*
*-----------------------------------------------------... | c | github | https://github.com/postgres/postgres | src/common/binaryheap.c |
/*
* 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 | buildSrc/src/main/java/org/springframework/build/multirelease/MultiReleaseJarPlugin.java |
#!/usr/bin/env python
# Copyright 2015 IIX Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ver... | unknown | codeparrot/codeparrot-clean | ||
# frozen_string_literal: true
# :markup: markdown
require "rack/utils"
require "rack/request"
require "rack/session/abstract/id"
require "action_dispatch/middleware/cookies"
module ActionDispatch
module Session
class SessionRestoreError < StandardError # :nodoc:
def initialize
super("Session cont... | ruby | github | https://github.com/rails/rails | actionpack/lib/action_dispatch/middleware/session/abstract_store.rb |
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resol... | json | github | https://github.com/vercel/next.js | examples/with-yoga/tsconfig.json |
# Copyright 2008-2013 Nokia Siemens Networks Oyj
#
# 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 | ||
import AxiosHeaders from '../../../lib/core/AxiosHeaders.js';
import assert from 'assert';
const [nodeMajorVersion] = process.versions.node.split('.').map(v => parseInt(v, 10));
describe('AxiosHeaders', function () {
it('should support headers argument', function () {
const headers = new AxiosHeaders({
x:... | javascript | github | https://github.com/axios/axios | test/unit/core/AxiosHeaders.js |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
tests a test set of data using a specified, pre-trained model and weights
python -c "import ibeis_cnn"
"""
from __future__ import absolute_import, division, print_function, unicode_literals
# from ibeis_cnn import utils
from ibeis_cnn import models
#from ibeis_cnn impo... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2013, FinByz Tech Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import json
import re
from frappe import _
from frappe.utils import nowdate
def execute(filters=None):
if not filters: filters.setdefault('posting_date'... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2013 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | unknown | codeparrot/codeparrot-clean | ||
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/ktime.h>
#include <linux/debugfs.h>
#include <linux/highmem.h>
#include "gup_test.h"
static void put_back_pages(unsigned int cmd, struct page **pages,
unsigned lo... | c | github | https://github.com/torvalds/linux | mm/gup_test.c |
"""local_session_caching.py
Grok everything so far ? This example
creates a new dogpile.cache backend that will persist data in a dictionary
which is local to the current session. remove() the session
and the cache is gone.
Create a new Dogpile cache backend that will store
cached data local to the current Sessio... | unknown | codeparrot/codeparrot-clean | ||
# (c) 2014, Brian Coca, Josh Drake, et al
#
# 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.
... | 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 | buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/type/VolumeNameTests.java |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2013 Async Open Source
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or... | unknown | codeparrot/codeparrot-clean | ||
from coloredcoinlib import (ColorSet, IncompatibleTypesError, InvalidValueError,
SimpleColorValue, ColorValue)
from coloredcoinlib.comparable import ComparableMixin
from decimal import Decimal
class AssetDefinition(object):
"""Stores the definition of a particular asset, including its c... | 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-testcontainers/src/test/java/org/springframework/boot/testcontainers/service/connection/DatabaseConnectionDetails.java |
from pyramid.renderers import render
def includeme(config):
config.add_renderer(name='chart',
factory='chartfood.InlineChartRenderer')
config.add_renderer(name='chart_response',
factory='chartfood.ChartResponseRenderer')
class ChartRenderer(object):
def cac... | unknown | codeparrot/codeparrot-clean | ||
'''
Contain the plotting tools portion of the analysis toolbox
Note: There is an equivalent file for analysis v2, include your new code there,
unless it is only inteded for analysis v1
'''
import lmfit
import matplotlib.pyplot as plt
import matplotlib
from matplotlib import cm
import numpy as np
import matplotlib.color... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
########################################################################
#
# (C) 2013, James Cammarata <jcammarata@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 ... | unknown | codeparrot/codeparrot-clean | ||
"""turtledemo/chaos.py
A demonstration of chaos.
"""
from turtle import *
N = 80
def f(x):
return 3.9*x*(1-x)
def g(x):
return 3.9*(x-x**2)
def h(x):
return 3.9*x-3.9*x*x
def jumpto(x, y):
penup(); goto(x,y)
def line(x1, y1, x2, y2):
jumpto(x1, y1)
pendown()
goto(x2, y2)
def coosys()... | python | github | https://github.com/python/cpython | Lib/turtledemo/chaos.py |
/*
* Copyright 2010-2024 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.fir.test.cases.generated.cases.components.substitutorProvider;
impo... | java | github | https://github.com/JetBrains/kotlin | analysis/analysis-api-fir/tests-gen/org/jetbrains/kotlin/analysis/api/fir/test/cases/generated/cases/components/substitutorProvider/FirIdeDependentAnalysisScriptSourceModuleCreateInheritanceTypeSubstitutorTestGenerated.java |
# coding=utf-8
"""Test file for transform counts to ratios."""
import unittest
from safe.test.utilities import qgis_iface, load_test_vector_layer
from safe.definitions.fields import (
female_count_field, female_ratio_field, size_field, population_count_field)
from safe.gis.vector.from_counts_to_ratios import fr... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# Peteris Krumins (peter@catonmat.net)
# http://www.catonmat.net -- good coders code, great reuse
#
# http://www.catonmat.net/blog/python-library-for-google-sponsored-links-search/
#
# Code is licensed under MIT license.
#
import re
import urllib
import random
from htmlentitydefs import name2code... | unknown | codeparrot/codeparrot-clean | ||
# MySQL-specific implementations for south
# Original author: Andrew Godwin
# Patches by: F. Gabriel Gosselin <gabrielNOSPAM@evidens.ca>
from south.db import generic
from south.db.generic import DryRunError, INVALID
from south.logger import get_logger
def delete_column_constraints(func):
"""
Decorates column ... | unknown | codeparrot/codeparrot-clean | ||
'''
Created on 10.01.2011
@author: michi
'''
from PyQt4.QtGui import QStyledItemDelegate
from PyQt4.QtCore import Qt
from ems import qt4
class ColumnNameDelegate(QStyledItemDelegate):
def __init__(self, parent=None):
super(ColumnNameDelegate, self).__init__(parent)
self.delegates = {}
def s... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# ERPNext - web based ERP (http://erpnext.com)
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, flt, get... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
#
# Copyright (C) 2008 The Android Open Source Project
#
# 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 la... | unknown | codeparrot/codeparrot-clean | ||
from __future__ import unicode_literals
import datetime
from dateutil.parser import parse
from decimal import Decimal
import re
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from django.utils import datetime_safe, importlib
from django.utils import six
from tastypie.bundle import Bundle... | unknown | codeparrot/codeparrot-clean | ||
# Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your o... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2012 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 -*-
import gettext
import json
import os
from os import path
import unittest
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test import (
LiveServerTestCase, TestCase, modify_settings, override_settings)
from django.utils import six
from django.utils._o... | unknown | codeparrot/codeparrot-clean | ||
from pygame import Rect
from pygame.draw import lines
from thorpy.painting.painters.basicframe import BasicFrame
from thorpy.miscgui import style
from thorpy._utils.rectscomputing import get_top_coords, get_bottom_coords
from thorpy._utils.colorscomputing import grow_color, normalize_color
class ClassicFrame(BasicFra... | unknown | codeparrot/codeparrot-clean | ||
{
"name": "@swc/wasm-typescript",
"collaborators": [
"강동윤 <kdy1997.dev@gmail.com>"
],
"description": "wasm module for swc",
"version": "1.15.11",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/swc-project/swc.git"
},
"files": [
"wasm.js",
"wasm.d... | json | github | https://github.com/nodejs/node | deps/amaro/dist/package.json |
# Copyright 2013 IBM Corp.
# 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 app... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# openvz.py
#
# Copyright 2014 jordonr <jordon@beamsyn.net>
#
# 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 ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test that mining RPC continues to supply correct transaction metadata after
the Nov 2018 protocol upgr... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python2
#LumexData.py
import datetime as dt
import numpy as np
import scipy.optimize as opt
import matplotlib.pyplot as plt
omitFlagged = True
def storeAsDatetime(date, time):
day = int(date.split(".")[0])
month = int(date.split(".")[1])
year = int(date.split(".")[2])
hour = int(time.spli... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import argparse
from kmeans import KMeans
from mixture import GaussianMixtureModel
def parse_args(*argument_array):
parser = argparse.ArgumentParser()
parser.add_argument('data_csv')
parser.add_argument('--num-clu... | unknown | codeparrot/codeparrot-clean | ||
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""The deep heap profiler script for Chrome."""
from collections import defaultdict
import os
import re
import subprocess
import s... | unknown | codeparrot/codeparrot-clean | ||
import sys, unittest, re, os.path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', 'src'))
from tempfile import mkdtemp
from shutil import rmtree
from Exscript import Host
from Exscript.FileLogger import FileLogger
from LoggerTest import LoggerTest, FakeJob
class FakeError(Exception):
pass
... | 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/bugprone/PointerArithmeticOnPolymorphicObjectCheck.h |
<?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\Bridge\Twig\Validator\Constraints;
use Symfony\Component\Valida... | php | github | https://github.com/symfony/symfony | src/Symfony/Bridge/Twig/Validator/Constraints/TwigValidator.php |
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | c | github | https://github.com/llvm/llvm-project | clang-tools-extra/clang-tidy/llvm/TypeSwitchCaseTypesCheck.h |
# -*- coding: utf-8 -*-
# Stores chart blocks for the various pages
class PageBlockLookup:
#
# MAIN DATA PAGES CHART BLOCKS
#
def get_uof_blocks(short_name):
''' Use of Force main data page blocks
'''
if short_name == 'BPD':
return {
'introduction':... | unknown | codeparrot/codeparrot-clean | ||
"""
This module implements a class to deal with Uniform Diffie-Hellman handshakes.
The class `UniformDH' is used by the server as well as by the client to handle
the Uniform Diffie-Hellman handshake used by ScrambleSuit.
"""
import const
import random
import binascii
import Crypto.Hash.SHA256
import util
import myc... | unknown | codeparrot/codeparrot-clean | ||
import builtins
open = builtins.open
# for seek()
SEEK_SET = 0
SEEK_CUR = 1
SEEK_END = 2
r"""File-like objects that read from or write to a string buffer.
This implements (nearly) all stdio methods.
f = StringIO() # ready for writing
f = StringIO(buf) # ready for reading
f.close() # explicitly rel... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (c) 2015 Red Hat, 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 require... | 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 | framework-docs/src/main/java/org/springframework/docs/web/websocket/websocketserverruntimeconfiguration/MyEchoHandler.java |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-30 19:21
from __future__ import unicode_literals
from urllib2 import quote, unquote
from django_bulk_update.helper import bulk_update
from django.db import migrations
def unquote_folder_paths(state, schema):
try:
NodeSettings = state.get_mode... | unknown | codeparrot/codeparrot-clean | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing_extensions import Literal
from ..._models import BaseModel
__all__ = ["InputAudioBufferSpeechStoppedEvent"]
class InputAudioBufferSpeechStoppedEvent(BaseModel):
"""
Returned in `server_vad` mode when the server... | python | github | https://github.com/openai/openai-python | src/openai/types/realtime/input_audio_buffer_speech_stopped_event.py |
//// [tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts] ////
//// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts]
namespace A {
export class Point {
... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js |
<?php
namespace Illuminate\Cache;
class RedisLock extends Lock
{
/**
* The Redis factory implementation.
*
* @var \Illuminate\Redis\Connections\Connection
*/
protected $redis;
/**
* Create a new lock instance.
*
* @param \Illuminate\Redis\Connections\Connection $redis... | php | github | https://github.com/laravel/framework | src/Illuminate/Cache/RedisLock.php |
from django.db import models
from django.utils import timezone
from edc_base.model.models import BaseUuidModel
from edc_export.models import ExportTrackingFieldsMixin
from edc_sync.models import SyncModelMixin, SyncHistoricalRecords
from ..managers import OrderItemManager
from .aliquot import Aliquot
from .order imp... | unknown | codeparrot/codeparrot-clean | ||
// Copyright IBM Corp. 2016, 2025
// SPDX-License-Identifier: BUSL-1.1
package command
import (
"context"
"fmt"
"strings"
"github.com/hashicorp/cli"
"github.com/hashicorp/go-secure-stdlib/strutil"
"github.com/posener/complete"
)
var (
_ cli.Command = (*MonitorCommand)(nil)
_ cli.CommandAutocompl... | go | github | https://github.com/hashicorp/vault | command/monitor.go |
import re
import os
# The regular expression for freeze directives. These are comments with the
# word macfreeze immedeately followed by a colon, followed by a directive,
# followed by argument(s)
#
# The directives supported are
# include - Include a module or file
# exclude - Exclude a module
# optional - Include a ... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2017 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_test
import (
"fmt"
"math"
)
func ExampleAcos() {
fmt.Printf("%.2f", math.Acos(1))
// Output: 0.00
}
func ExampleAcosh() {
fmt.Printf("%.2f... | go | github | https://github.com/golang/go | src/math/example_test.go |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# 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.
#... | unknown | codeparrot/codeparrot-clean | ||
# -*- coding: utf-8 -*-
from __future__ import with_statement
import json
import datetime
from cms import api
from cms.utils.urlutils import admin_reverse
from djangocms_text_ckeditor.cms_plugins import TextPlugin
from djangocms_text_ckeditor.models import Text
from django.contrib import admin
from django.contrib.admi... | unknown | codeparrot/codeparrot-clean | ||
# Copyright (C) 2018 PrivacyScore 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 3 of the License, or
# (at your option) any later version.
#
# This program is dis... | 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/test/java/org/springframework/context/annotation/DestroyMethodInferenceTests.java |
# (C) British Crown Copyright 2013 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | unknown | codeparrot/codeparrot-clean | ||
//===- bolt/Passes/RegReAssign.h --------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | c | github | https://github.com/llvm/llvm-project | bolt/include/bolt/Passes/RegReAssign.h |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.