code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
/* * 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/src/test/java/org/springframework/boot/logging/DeferredLogTests.java
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2009 Reza Lotun http://reza.lotun.name/ # # 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, ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2005-2012 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## 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 Softw...
unknown
codeparrot/codeparrot-clean
## # Copyright 2009-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
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. """Snapshot Build Bisect Tool This script bisects a snapshot archive using binary search. It starts at a bad revision (it will try...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest from twisted.python import roots import types class RootsTest(unittest.TestCase): def testExceptions(self): request = roots.Request() try: request.write("blah") ...
unknown
codeparrot/codeparrot-clean
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
c
github
https://github.com/tensorflow/tensorflow
tensorflow/core/tpu/tpu_compile.h
# Extended Diagnostics There are many coding patterns that are technically valid to the compiler or runtime, but which may have complex nuances or caveats. These patterns may not have the intended effect expected by a developer, which often leads to bugs. The Angular compiler includes "extended diagnostics" which iden...
unknown
github
https://github.com/angular/angular
adev/src/content/reference/extended-diagnostics/overview.md
/* * 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-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2011 # Pexego Sistemas Informáticos. (http://pexego.es) # Zikzakmedia S.L. (http://zikzakmedia.com) # # This program is free software: you can redistribute it and/or modify # it under th...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python3 # -*- coding: utf-8 -*- # David Art [aka] ADcomp <david.madbox@gmail.com> import os import sys from PyQt5.QtWidgets import (QMainWindow, QApplication, QInputDialog, QLineEdit, QMessageBox) from PyQt5.QtCore import (QUrl, QObject, pyqtSlot, pyqtProperty) from PyQt5.QtWebKitWidgets import (QWebView,...
unknown
codeparrot/codeparrot-clean
from IPython.display import HTML, display, clear_output _canvas = """ <script type="text/javascript" src="./js/canvas.js"></script> <div> <canvas id="{0}" width="{1}" height="{2}" style="background:rgba(158, 167, 184, 0.2);" onclick='click_callback(this, event, "{3}")'></canvas> </div> <script> var {0}_canvas_object ...
unknown
codeparrot/codeparrot-clean
""" This module implements the Response class which is used to represent HTTP responses in Scrapy. See documentation in docs/topics/request-response.rst """ import copy from six.moves.urllib.parse import urljoin from scrapy.http.headers import Headers from scrapy.utils.trackref import object_ref from scrapy.http.co...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # # Copyright 2018 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
unknown
codeparrot/codeparrot-clean
# Copyright 2019 Eficent Business and IT Consulting Services S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models class PurchaseRequest(models.Model): _inherit = 'purchase.request' analytic_account_id2 = fields.Many2one( comodel_name='account....
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 #pylint: disable=missing-docstring #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details ...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Cisco Systems, 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 requir...
unknown
codeparrot/codeparrot-clean
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
go
github
https://github.com/kubernetes/kubernetes
pkg/controller/daemon/config/v1alpha1/defaults.go
import os, os.path, platform import ctypes import ctypes.util import numpy as nu from numpy.ctypeslib import ndpointer #Find and load the library _lib = None if platform.system()=='Darwin': _libraryname= 'libextremedeconvolution.dylib' else: _libraryname= 'libextremedeconvolution.so' _libname = ctypes.util.find...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2016 Swift Navigation Inc. # # Contact: Valeri Atamaniouk <valeri@swiftnav.com> # This source is subject to the license found in the file 'LICENSE' which must # be be distributed together with this source. All other rights reserved. # # THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF A...
unknown
codeparrot/codeparrot-clean
/* * Copyright 2014-2026 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. */ package io.ktor.client.plugins.websocket import io.ktor.utils.io.* import io.ktor.utils.io.core.* import io.ktor.websocket.* import kotlinx.coroutines.* import kotlinx.coroutines.channels.* imp...
kotlin
github
https://github.com/ktorio/ktor
ktor-client/ktor-client-core/js/src/io/ktor/client/plugins/websocket/JsWebSocketSession.kt
{ "auditLog": { "columns": { "event": "Event", "extra": "Extra", "user": "User", "when": "When" }, "filters": { "eventType": "Event Type" }, "title": "Audit Log" }, "xcom": { "add": { "error": "Failed to add XCom", "errorTitle": "Error", "suc...
json
github
https://github.com/apache/airflow
airflow-core/src/airflow/ui/public/i18n/locales/en/browse.json
{ "apiVersion": "v1", "kind": "APIGroup", "name": "certificates.k8s.io", "preferredVersion": { "groupVersion": "certificates.k8s.io/v1", "version": "v1" }, "versions": [ { "groupVersion": "certificates.k8s.io/v1", "version": "v1" }, { "groupVersion": "certificates.k8s.i...
json
github
https://github.com/kubernetes/kubernetes
api/discovery/apis__certificates.k8s.io.json
// Test UDP send/recv throughput with the "old" offset/length API 'use strict'; const common = require('../common.js'); const dgram = require('dgram'); const PORT = common.PORT; // `n` is the number of send requests to queue up each time. // Keep it reasonably high (>10) otherwise you're benchmarking the speed of // ...
javascript
github
https://github.com/nodejs/node
benchmark/dgram/offset-length.js
#!/usr/bin/env python ''' pblookup - use an index to lookup records in a protobuf stream currently only supports one index type: -i cdb ''' import sys import os import getopt def shift(L): e = L[0] ; del L[0:1] ; return e def main(): reader_format = 'pb' writer_format = 'pb' delim = '\t' fields = [] ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 import pygame, os, random, numpy, math, color_palettes, queue, name_gen, triangle from pygame.locals import * from geom import * from PIL import ImageFilter, Image class City: """docstring for City.""" def __init__(self, location, name="default"): self.name = name self.l...
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
#!/usr/bin/env python import rospy from std_msgs.msg import String from std_msgs.msg import Int16 from geometry_msgs.msg import Twist import PyCmdMessenger from ArduinoBoard import ArduinoBoard import threading import subprocess # Initialize an ArduinoBoard instance. This is where you specify baud rate and # serial ...
unknown
codeparrot/codeparrot-clean
import unittest from pygame.math import Vector2 as Vector from vectormath import * def round_vector(vector, decimal=0): return Vector(round(vector.x, decimal), round(vector.y, decimal)) class FunctionsTest(unittest.TestCase): def test_check_if_parallel(self): self.assertTrue(check_if_parallel(Vecto...
unknown
codeparrot/codeparrot-clean
import { flushSync } from 'svelte'; import { ok, test } from '../../test'; export default test({ async test({ assert, component, target }) { assert.htmlEqual(target.innerHTML, 'Loading...'); await component.promise; await Promise.resolve(); const span = target.querySelector('span'); ok(span); assert.equa...
javascript
github
https://github.com/sveltejs/svelte
packages/svelte/tests/runtime-legacy/samples/await-then-blowback-reactive/_config.js
#!/usr/bin/python2.7 # encoding: utf-8 # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
unknown
codeparrot/codeparrot-clean
# vim:ts=4:sw=4:expandtab '''The main Application and Service classes ''' import os import gc import cProfile from OpenSSL import SSL import socket import traceback import errno from greenlet import greenlet from diesel.hub import EventHub from diesel import log, Connection, UDPSocket, Loop from diesel.security import...
unknown
codeparrot/codeparrot-clean
# this is a virtual module that is entirely implemented server side # Copyright: (c) 2017, Ansible Project # 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_ve...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # coding: utf-8 -*- # Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # Copyright (c) 2013, Benno Joy <benno@ansible.com> # Copyright (c) 2013, John Dewey <john@dewey.ws> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import ...
unknown
codeparrot/codeparrot-clean
''' Name: mssim2eigen.py Date: 2014-8-25 Version: 1.01 Author: Young Description: Convert the output of MS simulation into eigenstrat format, only deal with 1 repeat siutation Input file: the output of MS simulation Output files: prefix.ind prefix.snp prefix.geno Arguments: -h --help print hel...
unknown
codeparrot/codeparrot-clean
########################### ## Code for sorting the truth root file(peak-by-peak) format into event-by-event format ## Output is a pickle file ## by Qing Lin ######### ## @ 2017-01-09 ## Please NOTE the code can only be used with single S1&S2 simulation ## Double/Multiple peak simulation is not available in merging/min...
unknown
codeparrot/codeparrot-clean
/* * 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.typeRelationChecker; 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/typeRelationChecker/FirIdeNormalAnalysisScriptSourceModuleLenientClassIdSubtypingTypeRelationTestGenerated.java
# 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 with the License. You may obtain # a ...
unknown
codeparrot/codeparrot-clean
from JumpScale import j app = j.tools.cuisine._getBaseAppClass() class CuisineNodeJS(app): NAME = 'nodejs' def __init__(self, executor, cuisine): self._executor = executor self._cuisine = cuisine def install(self): """ can install through ubuntu """ self._...
unknown
codeparrot/codeparrot-clean
def create_geometry(out_filename=None): import GEOM import salome from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) # create a cloud of points points = [ geompy.MakeVertex(0,0,0), geompy.MakeVertex(9,0,0), geompy.MakeVertex(0,9,0), geompy.MakeVertex(9,9,0), ge...
unknown
codeparrot/codeparrot-clean
#coding:utf-8 from itertools import repeat, chain from itertools import takewhile from operator import itemgetter from random import sample from typing import Iterable, List, Dict, Tuple, Iterator, Optional as Opt, Sequence as Seq, Mapping as Map from torch import stack from torch.nn.utils.rnn import pack_padded_seque...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "Ryan Abo" __copyright__ = "Copyright 2015, Ryan Abo" __email__ = "ryanabo@gmail.com" __license__ = "MIT" match_award = 1 mismatch_penalty = -2 gap_penalty = -2 # Creates empty matrix with all zeros def zeros(shape): retval = [] for x in range(shape[...
unknown
codeparrot/codeparrot-clean
# <License type="Sun Cloud BSD" version="2.2"> # # Copyright (c) 2005-2009, Sun Microsystems, 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: # # 1. Redistributions of source code must reta...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 The Pigweed 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 agreed to in ...
unknown
codeparrot/codeparrot-clean
{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2alpha1", "metadata": { "name": "v22.table_panel_align.v42" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "datasource": { "type": "grafana", "uid": "-- Grafana --...
json
github
https://github.com/grafana/grafana
apps/dashboard/pkg/migration/conversion/testdata/migrated_dashboards_output/v1beta1-mig-v22.table_panel_align.v42.v2alpha1.json
import sys import os import numpy as np from pprint import pprint from datetime import datetime from datetime import timedelta import mysql.connector import math import calendar import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib import dates SP2_ID = 44 saved_1_of_every = 8 start = datetime(201...
unknown
codeparrot/codeparrot-clean
#include <ATen/native/kleidiai/kai_ukernel_interface.h> #if AT_KLEIDIAI_ENABLED() namespace at::native::kleidiai { // Kernel Mapping - Groupwise std::unordered_map<kai_kernel_id, kai_matmul_ukernel_f32_qa8dxp_qs4c32p> groupwise_8bit_4bit_kernels = {{kai_kernel_id:: matmul_clamp_f32_qai8dxp1x8_qsi4c32p8...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/native/kleidiai/kai_ukernel_interface.cpp
########################################################## # 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_mongos_passthrough.yml
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'Y년 n월 j일' TIME_FORMAT = 'A g:i:s'...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # # 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 #...
unknown
codeparrot/codeparrot-clean
# # Module which deals with pickling of objects. # # multiprocessing/reduction.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # import copyreg import functools import io import os import pickle import socket import sys from . import context __all__ = ['send_handle', 'recv_...
unknown
codeparrot/codeparrot-clean
require 'rbconfig' require 'timeout' require 'fileutils' require 'shellwords' require_relative 'lib/colorize' require_relative 'lib/gem_env' ENV.delete("GNUMAKEFLAGS") github_actions = ENV["GITHUB_ACTIONS"] == "true" DEFAULT_ALLOWED_FAILURES = RUBY_PLATFORM =~ /mswin|mingw/ ? [ 'debug', 'irb', 'csv', ] : [] al...
ruby
github
https://github.com/ruby/ruby
tool/test-bundled-gems.rb
# (c) 2014 Michael DeHaan, <michael@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 ve...
unknown
codeparrot/codeparrot-clean
""" Convenience routines for performing common operations. @since: 0.28 """ # Copyright (C) 2009, Thomas Leonard # See the README file for details, or visit http://0install.net. import os, sys, logging from zeroinstall import support from zeroinstall import _ def get_selections_gui(iface_uri, gui_args, test_callback...
unknown
codeparrot/codeparrot-clean
"""Simple AES cipher implementation in pure Python following PEP-272 API Homepage: https://bitbucket.org/intgr/pyaes/ The goal of this module is to be as fast as reasonable in Python while still being Pythonic and readable/understandable. It is licensed under the permissive MIT license. Hopefully the code is readabl...
unknown
codeparrot/codeparrot-clean
# coding: utf-8 ''' parsers.py Contains parser objects constructed for various datasets that will be used to build the .belns, .beleq, and .belanno files. ''' from common import gzip_to_text from lxml import etree from collections import defaultdict import os import csv import gzip import urllib.request import z...
unknown
codeparrot/codeparrot-clean
""" Custom-written pure go meterpreter/reverse_https stager. Module built by @b00stfr3ak44 """ from modules.common import shellcode from modules.common import helpers from random import randint class Payload: def __init__(self): # required options self.description = "pure windows/meterpreter/r...
unknown
codeparrot/codeparrot-clean
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os from pants.backend.python.targets.python_app import PythonApp from pants.base.build_environment import get_buildroot from pants.base.exceptions import TaskError from pants.build...
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/c/eager/c_api.h
// Copyright 2023 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. package inspectz import ( "context" "encoding/json" "net/http" "strconv" "strings" "github.com/cockroachdb/cockroach/pkg/inspectz/inspectzpb" "github.com/cockro...
go
github
https://github.com/cockroachdb/cockroach
pkg/inspectz/inspectz.go
--- c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. SPDX-License-Identifier: curl Long: http2 Tags: Versions Protocols: HTTP Added: 7.33.0 Mutexed: http1.1 http1.0 http2-prior-knowledge http3 Requires: HTTP/2 Help: Use HTTP/2 Category: http Multi: mutex See-also: - http1.1 - http3 - no-alpn - proxy-h...
unknown
github
https://github.com/curl/curl
docs/cmdline-opts/http2.md
import win32gui import win32con import win32api import win32process import subprocess import time from ..core import * from ..util import * from ..screenshot import Screenshot APP_LIST = list_startmenu_applications() class Window(object): def __init__(self, win=None, display=None): object.__init__(self) ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
unknown
codeparrot/codeparrot-clean
% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it. **Description** Returns a string made of `number` spaces.
unknown
github
https://github.com/elastic/elasticsearch
docs/reference/query-languages/esql/_snippets/functions/description/space.md
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
unknown
codeparrot/codeparrot-clean
# Copyright: Copyright 2011-2017 by Luc Saffre. # License: BSD, see LICENSE for more details. """ Two TestCase classes for writing tests be run using Django's test runner (i.e. `manage.py test`). """ from __future__ import print_function import logging logger = logging.getLogger(__name__) from django.conf import se...
unknown
codeparrot/codeparrot-clean
"""Classes to represent arbitrary sets (including sets of sets). This module implements sets using dictionaries whose values are ignored. The usual operations (union, intersection, deletion, etc.) are provided as both methods and operators. Important: sets are not sequences! While they support 'x in s', 'len(s)', a...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python3 import sys import gi gi.require_version('Gst', '1.0') from gi.repository import Gst from gi.repository import GLib from gi.repository import Gtk def bus_callback(bus, message, not_used): t = message.type if t == Gst.MessageType.EOS: sys.stdout.write("End-of-stream\n") Gtk.main_quit() ...
unknown
codeparrot/codeparrot-clean
scrape_configs: - azure_sd_configs: - authentication_method: invalid subscription_id: 11AAAA11-A11A-111A-A111-1111A1111A11
unknown
github
https://github.com/prometheus/prometheus
config/testdata/azure_authentication_method.bad.yml
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import mptt.fields from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('editor', '0005_auto_20150222_0508'), ] operations = [ migrations.RemoveFi...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python #this should hopefully allow you to twist a potentiaomiter and play music import RPi.GPIO as GPIO import time import subprocess import os import signal #variables for LED GPIO LED_PIN = 5 GPIO.setmode(GPIO.BCM) GPIO.setup(LED_PIN, GPIO.OUT) #variables for chipset thingy DEBUG = 1 lastTrimPot_tu...
unknown
codeparrot/codeparrot-clean
from django.db import migrations class Migration(migrations.Migration): dependencies = [("app1", "2_auto"), ("app2", "2_auto")]
python
github
https://github.com/django/django
tests/migrations/test_migrations_squashed_ref_squashed/app1/3_auto.py
# (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import logging import datetime import sys PATH_INSTALL = "./" sys.path.append(PATH_INSTALL) from optparse import OptionParser from androguard.core.analysis import auto from androguard.core.androconf import set_debug option_0 = {'name': ('-d', '--directory'), 'help': 'directory input', 'nargs':...
unknown
codeparrot/codeparrot-clean
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2012 Sean Davis <smd.seandavis@gmail.com> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Softw...
unknown
codeparrot/codeparrot-clean
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Twig\Test\Traits; use Symfony\Component\DependencyInject...
php
github
https://github.com/symfony/symfony
src/Symfony/Bridge/Twig/Test/Traits/RuntimeLoaderProvider.php
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
unknown
codeparrot/codeparrot-clean
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- $id: http://devicetree.org/schemas/gpio/gpio-consumer-common.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# title: Common GPIO lines maintainers: - Bartosz Golaszewski <brgl@bgdev.pl> - Linus Walleij <linusw@kernel.org> descripti...
unknown
github
https://github.com/torvalds/linux
Documentation/devicetree/bindings/gpio/gpio-consumer-common.yaml
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
unknown
codeparrot/codeparrot-clean
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package funcs import ( "fmt" "strings" "testing" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/ext/customdecode" "github.com/hashicorp/hcl/v2/hclsyntax" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/function" ...
go
github
https://github.com/hashicorp/terraform
internal/lang/funcs/string_test.go
# -*- coding: utf-8 -*- from __future__ import unicode_literals from io import BytesIO, StringIO import os import gzip import tempfile import unittest import zlib from django.core.files import File from django.core.files.move import file_move_safe from django.core.files.base import ContentFile from django.core.files....
unknown
codeparrot/codeparrot-clean
import * as ts from "./_namespaces/ts.js"; // This file actually uses arguments passed on commandline and executes it // enable deprecation logging ts.Debug.loggingHost = { log(_level, s) { ts.sys.write(`${s || ""}${ts.sys.newLine}`); }, }; if (ts.Debug.isDebugging) { ts.Debug.enableDebugInfo(); ...
typescript
github
https://github.com/microsoft/TypeScript
src/tsc/tsc.ts
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
unknown
codeparrot/codeparrot-clean
"""Support the sensor of a BloomSky weather station.""" import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import (TEMP_FAHRENHEIT, CONF_MONITORED_CONDITIONS) from homeassistant.helpers.entity import Entity import homeassistant.helpers.config_v...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true require "helper" require "colorator" class TestConfiguration < JekyllUnitTest test_config = { "source" => new(nil).source_dir, "destination" => dest_dir, } context ".from" do should "create a Configuration object" do assert_instance_of Configuration, Configu...
ruby
github
https://github.com/jekyll/jekyll
test/test_configuration.rb
{ "description": "Router", "files":[ "!**/*.d.ts", "!**/*.js", "!**/*.[0-9].*" ], "tags": ["router-with-custom-matching"] }
json
github
https://github.com/angular/angular
adev/src/content/examples/routing-with-urlmatcher/stackblitz.json
""" 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, publish, distribute, sublicense, and/or sell copies of ...
unknown
codeparrot/codeparrot-clean
# aprslib - Python library for working with APRS # Copyright (C) 2013-2014 Rossen Georgiev # # 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...
unknown
codeparrot/codeparrot-clean
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)#!/usr/bin/python """ The nxos lag_interfaces fact class It is in this file the configuration is collected from the device for a given resource, parsed, and the facts tree is ...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP SA (http://www.openerp.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true module Jekyll module Filters module DateFilters # Format a date in short format e.g. "27 Jan 2011". # Ordinal format is also supported, in both the UK # (e.g. "27th Jan 2011") and US ("e.g. Jan 27th, 2011") formats. # UK format is the default. # #...
ruby
github
https://github.com/jekyll/jekyll
lib/jekyll/filters/date_filters.rb
#!/usr/bin/env bash # Copyright 2024 The Cockroach Authors. # # Use of this software is governed by the CockroachDB Software License # included in the /LICENSE file. set -euxo pipefail WORKSPACE=$(bazel info workspace) # GCAssert and unused need generated files in the workspace to work properly. bazel run //pkg/gen...
unknown
github
https://github.com/cockroachdb/cockroach
build/github/lint.sh
#ifndef COLOR_H #define COLOR_H struct strbuf; /* * The maximum length of ANSI color sequence we would generate: * - leading ESC '[' 2 * - reset ';' .................1 * - attr + ';' 2 * num_attr (e.g. "1;") * - no-attr + ';' 3 * num_attr (e.g. "22;") * - fg color + ';' ...
c
github
https://github.com/git/git
color.h
from cassandra.cluster import Cluster, NoHostAvailable from cassandra.decoder import dict_factory class CassandraConnection(object): ip = None kp = None def __init__(self, cass_ip, cass_kp): self.ip = cass_ip self.kp = cass_kp try: self.cluster = Cluster(contact_points...
unknown
codeparrot/codeparrot-clean
from utils.dictutils import deep_get, deep_set from dateutil import parser import time mapping = { "interaction.twitter.lang": "gnip.language.value", "interaction.twitter.filter_level": "twitter_filter_level", "interaction.twitter.text": "body", "interaction.twitter.created_at": "object.postedTime", #...
unknown
codeparrot/codeparrot-clean
/*------------------------------------------------------------------------- * * startup.c * * The Startup process initialises the server and performs any recovery * actions that have been specified. Notice that there is no "main loop" * since the Startup process ends as soon as initialisation is complete. * (in ...
c
github
https://github.com/postgres/postgres
src/backend/postmaster/startup.c
#include <ATen/CachedTensorUtils.h> #include <c10/util/flat_hash_map.h> namespace at::caching { using weakref_type = c10::weak_intrusive_ptr<TensorImpl, UndefinedTensorImpl>; static bool cached_tensorimpls_enabled = false; // Like `cached_casts` in autocast_mode, we hash on the TensorImpl* // and keep the pointer...
cpp
github
https://github.com/pytorch/pytorch
aten/src/ATen/CachedTensorUtils.cpp
<<<<<<< HEAD # Copyright (c) 2015 OpenStack Foundation # ======= # -*- coding: utf-8 -*- >>>>>>> 7bea44e26ee8a400564a6a746d26293bb4bbf9cd # 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 # # ...
unknown
codeparrot/codeparrot-clean