code stringlengths 1 25.8M | language stringclasses 18
values | source stringclasses 4
values | repo stringclasses 78
values | path stringlengths 0 268 |
|---|---|---|---|---|
import sys, os, struct, random
sys.path.append(os.environ['ALAMEDA']+"/../Common")
sys.path.append(os.environ['ALAMEDA'])
from Alameda import *
brlyt = Brlyt(None, None, None)
brlyt.Width = 170
brlyt.Height = 96
brlyt.Textures.add(Brlyt.BrlytTexture("icon_title.tpl"))
brlyt.Textures.add(Brlyt.BrlytTexture("white.tp... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# coding:utf-8
import os
import optparse
import time
from function.server import server
from config.config import *
def main():
global DOWNLOAD_MODE
global THREAD_NUM
global KEY_WORD
global FETCH_TIME
global SPIDER_PROXY
global START_URLS
global IGNORE_KEY_WORD
ph... | 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
# distributed under the... | unknown | codeparrot/codeparrot-clean | ||
//// [tests/cases/compiler/accessorDeclarationEmitJs.ts] ////
//// [a.js]
export const t1 = {
p: 'value',
get getter() {
return 'value';
},
}
export const t2 = {
v: 'value',
set setter(v) {},
}
export const t3 = {
p: 'value',
get value() {
return 'value';
},
set va... | javascript | github | https://github.com/microsoft/TypeScript | tests/baselines/reference/accessorDeclarationEmitJs.js |
# -*- coding: utf-8 -*-
"""The processing engine."""
import os
from artifacts import errors as artifacts_errors
from artifacts import reader as artifacts_reader
from artifacts import registry as artifacts_registry
from dfvfs.helpers import file_system_searcher
from dfvfs.lib import errors as dfvfs_errors
from dfvfs.... | unknown | codeparrot/codeparrot-clean | ||
# These classes implement a doctest runner plugin for nose, a "known failure"
# error class, and a customized TestProgram for NumPy.
# Because this module imports nose directly, it should not
# be used except by nosetester.py to avoid a general NumPy
# dependency on nose.
import sys
import os
import doctest
import n... | unknown | codeparrot/codeparrot-clean | ||
##########################################################
# THIS IS A GENERATED FILE -- DO NOT MODIFY.
# IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE
# AND REGENERATE THE MATRIX SUITES.
#
# matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/change_strea... | unknown | github | https://github.com/mongodb/mongo | buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_sharded_collections_query_shape_hash_stability_last_continuous_new_old.yml |
//
// Copyright 2017 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 ... | c | github | https://github.com/mysql/mysql-server | extra/abseil/abseil-cpp-20230802.1/absl/base/casts.h |
# -*- coding: utf-8 -*-
"""
digparser
---------
Encode/decode DNS packets from DiG textual representation. Parses
question (if present: +qr flag) & answer sections and returns list
of DNSRecord objects.
Unsupported RR types are skipped (this is different from the packet
parser which will ... | unknown | codeparrot/codeparrot-clean | ||
import numpy as np
from scipy.constants import h, e
from scipy.constants import Boltzmann as kB
import SNfit2 as SNfit # SNfit (traditionally) & SNfit2 (for hybrid coupler)
# import PyGnuplot as gp
vc = SNfit.variable_carrier()
vc.fifolder = ''
vc.LP = 1.0
vc.Texp = 0.009
SNR = 4.0
f1 = 4.1e9
f2 = 4.1e9
vc.Ravg = 69.... | unknown | codeparrot/codeparrot-clean | ||
from django import forms
from django.db import transaction
from django.db.models import Q
from django.utils.encoding import smart_unicode
from django.utils.translation import ugettext as _
from categories.models import Category
class CategoryChoiceField(forms.ModelChoiceField):
"""
Field to select from a list... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env bash
# Copyright 2023 The Cockroach Authors.
#
# Use of this software is governed by the CockroachDB Software License
# included in the /LICENSE file.
set -euxo pipefail
dir="$(dirname $(dirname $(dirname $(dirname $(dirname "${0}")))))"
source "$dir/release/teamcity-support.sh"
# TODO: remove this b... | unknown | github | https://github.com/cockroachdb/cockroach | build/teamcity/internal/release/process/build-cockroach-release-docker.sh |
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | typescript | github | https://github.com/apache/airflow | airflow-core/src/airflow/ui/src/pages/Dag/Calendar/DailyCalendarView.tsx |
#! /usr/local/bin/ruby
require "observer"
class Tick
include Observable
def initialize
Thread.start do
loop do
sleep 0.999
now = Time.now
changed
notify_observers(now.hour, now.min, now.sec)
end
end
end
end
class Clock
def initialize(tick)
@tick = tick
... | ruby | github | https://github.com/ruby/ruby | sample/observ.rb |
#!/usr/bin/python
import scipy
import numpy
import pickle
from numpy import *
from scipy import ndimage
from scipy import interpolate
from numpy import loadtxt
import os
import numpy as np
from numpy import *
import matplotlib
from pylab import rcParams
from pylab import *
from matplotlib import pyplot
import matplotli... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2014-10-13 17:08:43
import re
import time
import json
from .sqlitebase import SQLiteMixin, SplitTableMixin
from pyspider.database.base.resultdb import Res... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/env python
# -*- python -*-
#
# Copyright 2003,2009 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 (... | unknown | codeparrot/codeparrot-clean | ||
# Modifying elements
After selecting elements and creating a transition with [*selection*.transition](./selecting.md#selection_transition), use the transition’s transformation methods to affect document content.
## *transition*.attr(*name*, *value*) {#transition_attr}
[Source](https://github.com/d3/d3-transition/blo... | unknown | github | https://github.com/d3/d3 | docs/d3-transition/modifying.md |
# -*- 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 | ||
An identifier was used like a function name or a value was expected and the
identifier exists but it belongs to a different namespace.
Erroneous code example:
```compile_fail,E0423
struct Foo { a: bool };
let f = Foo();
// error: expected function, tuple struct or tuple variant, found `Foo`
// `Foo` is a struct name... | unknown | github | https://github.com/rust-lang/rust | compiler/rustc_error_codes/src/error_codes/E0423.md |
from distutils.util import convert_path
from distutils import log
from distutils.errors import DistutilsOptionError
import os
from setuptools import Command
from setuptools.compat import basestring
class rotate(Command):
"""Delete older distributions"""
description = "delete older distributions, keeping N ne... | unknown | codeparrot/codeparrot-clean | ||
- Feature Name: init command
- Status: completed
- Start Date: 2017-03-13
- Authors: @bdarnell
- RFC PR: [#14251](https://github.com/cockroachdb/cockroach/pull/14251)
- Cockroach Issue: [#5974](https://github.com/cockroachdb/cockroach/issues/5974)
# Summary
This RFC proposes a change to the cluster initialization wor... | unknown | github | https://github.com/cockroachdb/cockroach | docs/RFCS/20170318_init_command.md |
# Copyright (c) 2014 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | unknown | codeparrot/codeparrot-clean | ||
## Input
```javascript
import {makeObject_Primitives, Stringify} from 'shared-runtime';
function Component(props) {
const object = {object: props.object};
const entries = Object.entries(object);
entries.map(([, value]) => {
value.updated = true;
});
return <Stringify entries={entries} />;
}
export cons... | unknown | github | https://github.com/facebook/react | compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/object-entries-mutation.expect.md |
//===----------------------------------------------------------------------===//
//
// 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-doc/support/File.h |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# Copyright 2012 Michael Still and Canonical 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 ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
#Get acceleration data from Chronos watch.
#Taken from info posted at: http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/32714.aspx
#
#FIXED: In old version I had the x and z value switched around.
#
#
# Copyright (c) 2010 Sean Brewer
#
# Permission is hereby gra... | 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 | ||
// RUN: %check_clang_tidy %s bugprone-assert-side-effect %t -- -config="{CheckOptions: {bugprone-assert-side-effect.CheckFunctionCalls: true, bugprone-assert-side-effect.AssertMacros: 'assert,assert2,my_assert,convoluted_assert,msvc_assert', bugprone-assert-side-effect.IgnoredFunctions: 'MyClass::badButIgnoredFunc'}}" ... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/test/clang-tidy/checkers/bugprone/assert-side-effect.cpp |
# -*- coding: utf-8 -*-
"""
/***************************************************************************
DsgTools
A QGIS plugin
Brazilian Army Cartographic Production Tools
-------------------
begin : 2017-02-08
git sha ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
"""Setup script for GDM."""
import setuptools
from gdm import __project__, __version__, CLI, DESCRIPTION
import os
if os.path.exists('README.rst'):
README = open('README.rst').read()
else:
README = "" # a placeholder, readme is generated on release
CHANGES = open('CHANGES.md').read()
... | unknown | codeparrot/codeparrot-clean | ||
"""
Transfer Student Management Command
"""
from textwrap import dedent
from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
from django.db import transaction
from opaque_keys.edx.keys import CourseKey
from common.djangoapps.student.models import CourseEnrollment
from commo... | unknown | codeparrot/codeparrot-clean | ||
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | unknown | codeparrot/codeparrot-clean | ||
from braces.views import LoginRequiredMixin
from django.conf import settings
from django.contrib.auth import authenticate, login
from django.contrib.auth.forms import SetPasswordForm
from django.contrib.auth.hashers import make_password
from django.contrib.auth.models import User
from django.contrib import messages
fro... | unknown | codeparrot/codeparrot-clean | ||
#coding=utf-8
from __future__ import division
from robofab.world import RGlyph
from mutatorMath.objects.location import Location
from mutatorMath.objects.mutator import buildMutator
from mutatorScale.objects.fonts import MutatorScaleFont
from mutatorScale.objects.errorGlyph import ErrorGlyph
from mutatorScale.utiliti... | unknown | codeparrot/codeparrot-clean | ||
import Testing
#if canImport(Darwin)
import Darwin
#elseif canImport(Glibc)
@preconcurrency import Glibc
#elseif canImport(Android)
@preconcurrency import Android
#elseif canImport(Musl)
@preconcurrency import Musl
#elseif canImport(WinSDK)
@preconcurrency import WinSDK
#endif
public enum XCTVaporContext {
@TaskLo... | swift | github | https://github.com/vapor/vapor | Sources/XCTVapor/XCTVaporContext.swift |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/azoteq,iqs7222.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Azoteq IQS7222A/B/C/D Capacitive Touch Controller
maintainers:
- Jeff LaBundy <jeff@labundy.com>
description: |
The A... | unknown | github | https://github.com/torvalds/linux | Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml |
/*
* 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-indexer/src/test/java/org/springframework/context/index/sample/type/SampleSpecializedRepo.java |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | unknown | codeparrot/codeparrot-clean | ||
import sys, unittest, re, os.path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..', 'src'))
from tempfile import NamedTemporaryFile
import Exscript.util.interact
from Exscript.util.interact import InputHistory
class InputHistoryTest(unittest.TestCase):
CORRELATE = InputHistory
def ... | unknown | codeparrot/codeparrot-clean | ||
"""
===============================================
Feature transformations with ensembles of trees
===============================================
Transform your features into a higher dimensional, sparse space. Then
train a linear model on these features.
First fit an ensemble of trees (totally random trees, a rand... | 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 field 'Person.img_url'
db.add_column('persons_person', 'img_url',
self.gf('dja... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2017 Intel Corporation.
# 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 | ||
from yowsup.layers import YowLayer, YowLayerEvent
from yowsup.layers.protocol_iq.protocolentities import IqProtocolEntity
from yowsup.layers.network import YowNetworkLayer
from yowsup.layers.auth import YowAuthenticationProtocolLayer
import inspect
class ProtocolEntityCallback(object):
def __init__(self, entityTyp... | unknown | codeparrot/codeparrot-clean | ||
// Copyright 2015 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 | server/etcdmain/config_test.go |
# -*- coding: utf-8 -*-
from unittest import TestCase
from pynes.composer import compose
from pynes.compiler import compile
from pynes import sprite
import os
from pynes.compiler import lexical, syntax, semantic
class MetaInstructionCase(type):
def __new__(cls, name, bases, args):
def gen_lex():
... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: omi
# @Date: 2014-07-15 15:48:27
# @Last Modified by: omi
# @Last Modified time: 2015-01-30 18:05:08
'''
网易云音乐 Player
'''
# Let's make some noise
import subprocess
import threading
import time
import os
import signal
import random
import re
from ui import U... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# docdist3.py - improved dot product to exploit sorted order and achieve
# linear instead of quadratic time
#
# Original version by Ronald L. Rivest on February 14, 2007
# Revision by Erik D. Demaine on September 12, 2011
#
# Usage:
# docdist3.py filename1 filename2
#
# This program c... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# This file is part of VoltDB.
# Copyright (C) 2008-2017 VoltDB 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 Foundation, either version 3 of the
# License, or (at you... | unknown | codeparrot/codeparrot-clean | ||
package kotlinx.coroutines.reactor
import kotlinx.coroutines.testing.*
import kotlinx.coroutines.*
import kotlinx.coroutines.reactive.*
import org.junit.*
import org.junit.Test
import reactor.core.publisher.*
import java.time.Duration.*
import kotlin.test.*
class FluxSingleTest : TestBase() {
@Before
fun set... | kotlin | github | https://github.com/Kotlin/kotlinx.coroutines | reactive/kotlinx-coroutines-reactor/test/FluxSingleTest.kt |
#!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2015-2016 F5 Networks 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 ... | unknown | codeparrot/codeparrot-clean | ||
from xomo import *
class xomol:
def run(self, input):
names = ["aa", "sced", "cplx", "site", "resl", "acap", "etat", "rely",
"Data", "prec", "pmat", "aexp", "flex", "pcon", "tool", "time",
"stor", "docu", "b", "plex", "pcap", "kloc", "ltex", "pr",
"ruse", "team", "pvol"]
... | unknown | codeparrot/codeparrot-clean | ||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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 compli... | unknown | codeparrot/codeparrot-clean | ||
# draggable circles adapted from draggable rectangle demo
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Circle
class DraggableRectangle:
lock = None # only one can be animated at a time
def __init__(self, rect):
self.rect = rect
self.press = None
sel... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python3
##################################################################################
# media.py - Script for copying files to generate a Plex library
#
# Copyright (c) 2019, Kenneth P. J. Dyer <kenneth@avoceteditors.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, ... | unknown | codeparrot/codeparrot-clean | ||
"""
The MIT License (MIT)
Copyright (c) 2014 NTHUOJ team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# Copyright (C) 2003. Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Test the 'glob' rule in Jamfile context.
import BoostBuild
def test_basic():
t = BoostBuild.Tester(use_... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2013, Benno Joy <benno@ansible.com>
#
# This module 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 vers... | unknown | codeparrot/codeparrot-clean | ||
#!/bin/sh
#
# Copyright (c) 2005 Junio C Hamano
#
test_description='Test built-in diff output engine.
We happen to know that all diff plumbing and diff Porcelain share the
same command line parser, so testing one should be sufficient; pick
diff-files as a representative.
'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-dif... | unknown | github | https://github.com/git/git | t/t4000-diff-format.sh |
"""
gutter.testutils
~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from functools import wraps
from gutter.client.singleton import gutter
class SwitchContextManager(object):
"""
Allows temporarily enabling or disabling a switch.
Idea... | unknown | codeparrot/codeparrot-clean | ||
from functools import partial
import inspect
import logging
import sys
import re
import six
from silk.profiling.profiler import silk_profile
Logger = logging.getLogger('silk')
def _get_module(module_name):
"""
Given a module name in form 'path.to.module' return module object for 'module'.
"""
if '.'... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
"""
# Created on Aug 12, 2016
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com) GitHub ID: grastogi23
#
# module_check: not supported
#
# 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 publ... | unknown | codeparrot/codeparrot-clean | ||
# Copyright 2024 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 applicabl... | python | github | https://github.com/huggingface/transformers | src/transformers/integrations/aqlm.py |
#!/usr/bin/env python2
#
# Test hard fork detection
#
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import os
import shutil
class HardForkDetectionTest(BitcoinTestFramework):
alert_filename = None # Set by setup_network
def setup_network(self):
se... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | unknown | codeparrot/codeparrot-clean | ||
"""
This page is in the table of contents.
The stl.py script is an import translator plugin to get a carving from an stl file.
An import plugin is a script in the interpret_plugins folder which has the function getCarving. It is meant to be run from the interpret tool. To ensure that the plugin works on platforms wh... | unknown | codeparrot/codeparrot-clean | ||
#
# Unit tests for the multiprocessing package
#
import unittest
import unittest.mock
import queue as pyqueue
import textwrap
import time
import io
import itertools
import sys
import os
import gc
import importlib
import errno
import functools
import signal
import array
import collections.abc
import socket
import rando... | python | github | https://github.com/python/cpython | Lib/test/_test_multiprocessing.py |
"""Provide a more Pythonic and object-oriented interface to tdb."""
#
# Swig interface to Samba
#
# Copyright (C) Tim Potter 2006
#
# 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 versio... | unknown | codeparrot/codeparrot-clean | ||
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | java | github | https://github.com/apache/hadoop | hadoop-cloud-storage-project/hadoop-cos/src/main/java/org/apache/hadoop/fs/cosn/CosNOutputStream.java |
- hosts: localhost
roles:
- foo,bar | unknown | github | https://github.com/ansible/ansible | test/integration/targets/playbook/old_style_role.yml |
import { ReactText, HTMLAttributes } from "react";
import { JSX as LocalJSX } from "@ionic/core";
import { JSX as IoniconsJSX } from "ionicons";
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import IonicIntrinsicElements = LocalJSX.IntrinsicElements;
// eslint-disable-next-line @typescript-eslint/no-unu... | typescript | github | https://github.com/vercel/next.js | examples/with-ionic/ionic.d.ts |
# -*- mode: python -*-
# Copyright: (c) 2012, Seth Vidal (@skvidal)
# Copyright: Ansible Team
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1... | unknown | codeparrot/codeparrot-clean | ||
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from pycket.test.testhelper import *
from pycket.values import *
from pycket.impersonators import *
from pycket.values_struct import *
import pytest
import sys
sys.setrecursionlimit(10000)
def test_impersonator_properties():
m = run_mod(
"""
#lang pycket
... | unknown | codeparrot/codeparrot-clean | ||
// SPDX-License-Identifier: GPL-2.0-only
/*
* linux/init/version.c
*
* Copyright (C) 1992 Theodore Ts'o
*
* May be freely distributed as part of Linux.
*/
#include <generated/compile.h>
#include <linux/build-salt.h>
#include <linux/elfnote-lto.h>
#include <linux/export.h>
#include <linux/init.h>
#include <li... | c | github | https://github.com/torvalds/linux | init/version.c |
#!/usr/bin/env python
'''
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: $'
from ctypes import *
import ctypes
from pyglet import app
from pyglet.app.xlib import XlibSelectDevice
from base import Display, Screen, ScreenMode, Canvas
import xlib_vidmoderestore
# XXX
#from pyglet.window import NoSuchDisp... | unknown | codeparrot/codeparrot-clean | ||
"""SCons.Tool.dvi
Common DVI Builder definition for various other Tool modules that use it.
"""
#
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the ... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of GrowthRatesPy.
# https://github.com/yoavram/GrowthRatesPy
# Licensed under the MIT license:
# http://www.opensource.org/licenses/MIT-license
# Copyright (c) 2016, Yoav Ram <yoav@yoavram.com>
from unittest import TestCase
import os
import shutil
impo... | unknown | codeparrot/codeparrot-clean | ||
<?php
namespace Illuminate\Http\Resources\JsonApi\Concerns;
use Generator;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\Concerns\AsPivot;
use Illuminate\Database\Eloquent\Relatio... | php | github | https://github.com/laravel/framework | src/Illuminate/Http/Resources/JsonApi/Concerns/ResolvesJsonApiElements.php |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Make an iOS project transportable so that it can be zipped and
# sent to another machine
#
import os, sys, shutil, codecs, glob
template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
sys.path.append(os.path.abspath(os.path.dirname(templat... | unknown | codeparrot/codeparrot-clean | ||
/** @import { Effect, TemplateNode } from '#client' */
import { Batch, current_batch } from '../../reactivity/batch.js';
import {
branch,
destroy_effect,
move_effect,
pause_effect,
resume_effect
} from '../../reactivity/effects.js';
import { hydrate_node, hydrating } from '../hydration.js';
import { create_text, s... | javascript | github | https://github.com/sveltejs/svelte | packages/svelte/src/internal/client/dom/blocks/branches.js |
// LANGUAGE: +JvmIndyAllowLambdasWithAnnotations
// WITH_FIR_TEST_COMPILER_PLUGIN
// DUMP_IR
// MODULE: lib
// MODULE_KIND: LibraryBinary
// FILE: p3/foo.kt
package p3
import org.jetbrains.kotlin.plugin.sandbox.MyInlineable
fun setContent(content: @MyInlineable () -> Unit): Int {
content()
return 3
}
// MOD... | kotlin | github | https://github.com/JetBrains/kotlin | analysis/analysis-api/testData/components/compilerFacility/firPluginPrototypeMultiModule/inlineableFunctionMultiModules2.kt |
#! /usr/bin/env python3
# -*- coding: iso-8859-1 -*-
# Originally written by Barry Warsaw <barry@python.org>
#
# Minimally patched to make it even more xgettext compatible
# by Peter Funk <pf@artcom-gmbh.de>
#
# 2002-11-22 Jürgen Hermann <jh@web.de>
# Added checks that _() only contains string literals, and
# command l... | unknown | codeparrot/codeparrot-clean | ||
/*
* 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/InternalTestArtifactExtension.java |
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | typescript | github | https://github.com/apache/airflow | airflow-core/src/airflow/ui/src/components/Graph/graphTypes.ts |
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import uuid
import sys
from telemetry.core import platform
from telemetry import decorators
from catapult_base import cloud_storage
from telemetry.internal.b... | unknown | codeparrot/codeparrot-clean | ||
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | java | github | https://github.com/apache/hadoop | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumException.java |
import os
from django.db import transaction
from django.http import (HttpResponseForbidden, HttpResponseBadRequest,
HttpResponse, Http404)
from django.utils.translation import ugettext_lazy as _
from django.utils.datastructures import MultiValueDict
from django.contrib.auth import login
from d... | unknown | codeparrot/codeparrot-clean | ||
import sys
import itertools
from collections import namedtuple
from genutil import *
# Templates
declarationTemplate = """
case ${{NAME}}
${{COMPILE_FAIL}}
values {}
vertex ""
#version 300 es
precision mediump float;
in highp vec4 dEQP_Position;
${{VARIABLE_VTX}}
void main()
{
x0 = 1.0;
x1 = 2... | unknown | codeparrot/codeparrot-clean | ||
#!/usr/bin/env python
from distutils.core import setup, Extension
import os
from distutils.sysconfig import get_config_vars
(opt,) = get_config_vars('OPT')
os.environ['OPT'] = " ".join(
flag for flag in opt.split() if flag != '-Wstrict-prototypes'
)
pathplanner = Extension('_PathPlannerNative',
sources = ['... | unknown | codeparrot/codeparrot-clean | ||
import{createRequire as __WEBPACK_EXTERNAL_createRequire}from"module";var __webpack_modules__={4966:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){if(a===undefined)a=r;Object.defineProperty(e,a,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,a){if(a===undefined)a=r;e[a... | javascript | github | https://github.com/vercel/next.js | .github/actions/validate-docs-links/dist/index.js |
@import url('https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined');
:host {
display: flex;
justify-content: flex-start;
}
[ngToolbar] {
gap: 1.5rem;
display: flex;
flex-direction: column;
padding: 1rem 0.5rem;
border-radius: 0.5rem;
background-color: var(--septenary-contrast);
}
.group... | css | github | https://github.com/angular/angular | adev/src/content/examples/aria/toolbar/src/vertical/app/app.css |
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt
def execute(filters=None):
if not filters: filters = {}
columns = get_columns(fil... | unknown | codeparrot/codeparrot-clean | ||
"""
The ScreamTracker 3.0x module format description for .s3m files.
Documents:
- Search s3m on Wotsit
http://www.wotsit.org/
Author: Christophe GISQUET <christophe.gisquet@free.fr>
Creation: 11th February 2007
"""
from hachoir_parser import Parser
from hachoir_core.field import (StaticFieldSet, FieldSet, Field,
... | unknown | codeparrot/codeparrot-clean | ||
from tests.unit import unittest
from tests.unit import AWSMockServiceTestCase
from boto.vpc import VPCConnection, RouteTable
class TestDescribeRouteTables(AWSMockServiceTestCase):
connection_class = VPCConnection
def default_body(self):
return b"""
<DescribeRouteTablesResponse xmlns="htt... | unknown | codeparrot/codeparrot-clean | ||
"""
Copyright 2011 Software Freedom Conservancy.
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 wr... | unknown | codeparrot/codeparrot-clean | ||
from django import db
from django.conf import settings
from django.core.management.base import NoArgsCommand
from data.models import FreeReducedLunchEligibleCounty
import csv
# National Priorities Project Data Repository
# import_free_reduced_lunch_eligible_county.py
# Updated 7/26/2010, Joshua Ruihley, Sunlight Found... | unknown | codeparrot/codeparrot-clean | ||
//===-- ChangeNamespace.cpp - Change namespace implementation -------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | cpp | github | https://github.com/llvm/llvm-project | clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp |
/// An error that occurs when parsing a human readable size description.
///
/// This error provides an end user friendly message describing why the
/// description couldn't be parsed and what the expected format is.
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ParseSizeError {
original: String,
kind: Pars... | rust | github | https://github.com/BurntSushi/ripgrep | crates/cli/src/human.rs |
#!/usr/bin/python
################################################################
# JetScanner - Command-line utility to scan pages from an HP
# JetDirect device without using the web interface. Currently
# it only supports HP JetDirect 175x (J6035B). Others not tested
# Copyright (C) 2011 Dante Lanznaster, www.yourn... | unknown | codeparrot/codeparrot-clean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.