code
stringlengths
1
25.8M
language
stringclasses
18 values
source
stringclasses
4 values
repo
stringclasses
78 values
path
stringlengths
0
268
""" Developed by niphlod@gmail.com """ import redis from gluon import current from gluon.storage import Storage import time import logging import thread logger = logging.getLogger("web2py.session.redis") locker = thread.allocate_lock() def RedisSession(*args, **vars): """ Usage example: put in models fr...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2017, Kenneth P. J. Dyer <kenneth@avoceteditors.com> # 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, th...
unknown
codeparrot/codeparrot-clean
import unittest from Vintageous.ex.parser.parser import parse_command_line from Vintageous.ex.parser.scanner import Scanner from Vintageous.ex.parser.tokens import TokenDot from Vintageous.ex.parser.tokens import TokenSearchForward from Vintageous.ex.parser.tokens import TokenSearchBackward from Vintageous.ex.parser.t...
unknown
codeparrot/codeparrot-clean
import sys import time import logging import struct from event import Event from win_types import ObjectAttributes class Hooks: def __init__(self, vmi): self.vmi = vmi def dispatch(self, ctxt): prefix = None self.ctxt = ctxt if ctxt.event.nitro_event.direction == Event.DIRECT...
unknown
codeparrot/codeparrot-clean
# 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 os import unittest PERF_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) from telemetry.testing import system_stub from telemetry.i...
unknown
codeparrot/codeparrot-clean
import matplotlib.pyplot as plt from collections import OrderedDict ''' # Divide&conquer adaptive (keeping only the last 2 known chars) on ruptureit, try 1 seconds = OrderedDict([ ('aes128cbc', [0, 11, 8, 5, 6, 6, 11]), # 47 ('aes128gcm', [0, 6, 8, 6, 5, 6, 7]), # 38 ('aes256cbc', [0, 7, 7, 5, 6, 6, 9]),...
unknown
codeparrot/codeparrot-clean
import { execSync } from 'node:child_process' import semver from 'semver' import { DefaultMap } from '../../../tailwindcss/src/utils/default-map' import { getPackageVersionSync } from './package-version' /** * Must be of major version. * * E.g.: `isMajor(3)` */ export function isMajor(version: number) { return s...
typescript
github
https://github.com/tailwindlabs/tailwindcss
packages/@tailwindcss-upgrade/src/utils/version.ts
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP S.A. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the term...
unknown
codeparrot/codeparrot-clean
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE ####### # In a command line, you can estimate using this command: # # python urbansim/tools/start_estimation.py -c eugene.configs.baseline_estimation --model=household_location_choice_model -s eugene.e...
unknown
codeparrot/codeparrot-clean
# Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
unknown
codeparrot/codeparrot-clean
prelude: | class C attr_accessor :foo end long_lived = C.new if RUBY_VERSION >= "2.2.0" 3.times{ GC.start(full_mark: false, immediate_mark: true, immediate_sweep: true) } elsif GC.start end short_lived = '' benchmark: vm_gc_wb_obj_promoted: | long_lived.foo = short_lived # write barrie...
unknown
github
https://github.com/ruby/ruby
benchmark/vm_gc_wb_obj_promoted.yml
# Copyright (C) 2015 Philipp Baumgaertel # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE.txt file for details. import numpy as np from scipy.optimize import fmin from scipy.misc import derivative from scipy.stats import norm from .Utilitie...
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 model 'Cfda' db.create_table('data_cfda', ( ('id', self.gf('django.db.models.fields.Auto...
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/io/SortedMapWritable.java
#!/usr/bin/python3 # Credit https://github.com/oskarhane/dockerpress Written by Oskar Hane <oh@oskarhane.com> # Credit http://geraldkaszuba.com/quickly-ssh-into-a-docker-container/ import subprocess import sys import re import shutil import json from optparse import OptionParser def create_nginx_config(container_id)...
unknown
codeparrot/codeparrot-clean
# -*- 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 = r'Y. \g\a\d\a j. F' TIME_FORMAT = ...
unknown
codeparrot/codeparrot-clean
# copyright (c) 2018 paddlepaddle 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 app...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2010-2012 OpenStack Foundation # # 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 agree...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
unknown
codeparrot/codeparrot-clean
// Copyright 2021 The Cockroach Authors. // // Use of this software is governed by the CockroachDB Software License // included in the /LICENSE file. // // Code generated by generate-staticcheck; DO NOT EDIT. // //go:build bazel package sa5001 import ( util "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes...
go
github
https://github.com/cockroachdb/cockroach
build/bazelutil/staticcheckanalyzers/sa5001/analyzer.go
# -*- coding: utf-8 -*- """ pygments.formatters.html ~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for HTML output. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import os import sys import os.path from ...
unknown
codeparrot/codeparrot-clean
# frozen_string_literal: true class Project < ActiveRecord::Base has_and_belongs_to_many :developers, -> { uniq } def self.collection_cache_key(collection = all, timestamp_column = :updated_at) "projects-#{collection.count}" end end
ruby
github
https://github.com/rails/rails
actionview/test/fixtures/project.rb
# A fully-functional, drop-in proof-of-concept Next.js app using ButterCMS This Next.js starter project fully integrates with dynamic sample content from your ButterCMS account, including main menu, pages, blog posts, categories, and tags, all with a beautiful, custom theme with already-implemented search functionalit...
unknown
github
https://github.com/vercel/next.js
examples/cms-buttercms/README.md
#!/usr/bin/python import os, sys, string ANY=1 COPY=2 SKIP=3 SKIPONE=4 state = ANY static = 0 file = open(sys.argv[1]) name = sys.argv[1][:-2] out = open(name + ".h", "w") class writer: def __init__(self, file): self.file = file def write(self, text): self.file.write(text + "\n") out = writer(out...
unknown
codeparrot/codeparrot-clean
from django.test import TestCase, override_settings from django.core.urlresolvers import reverse from django.core import mail from wagtail.tests.utils import WagtailTestUtils from wagtail.wagtailcore.models import Page from wagtail.wagtailadmin.utils import send_mail class TestHome(TestCase, WagtailTestUtils): de...
unknown
codeparrot/codeparrot-clean
// Copyright IBM Corp. 2016, 2025 // SPDX-License-Identifier: BUSL-1.1 //go:build !enterprise package vault import ( "context" "github.com/hashicorp/vault/helper/identity" "github.com/hashicorp/vault/sdk/framework" ) func (c *Core) SendGroupUpdate(context.Context, *identity.Group) error { return nil } func (c...
go
github
https://github.com/hashicorp/vault
vault/identity_store_oss.go
# -*- coding: utf-8 -*- """ Models for the stats application. """ # standard library # django from django.core.urlresolvers import reverse from django.db import models from django.utils.translation import ugettext_lazy as _ # models from base.models import BaseModel from users.models import User class Stat(BaseModel...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 Yajie Miao Carnegie Mellon University # 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 # # THIS CODE IS PROVIDED *AS IS* B...
unknown
codeparrot/codeparrot-clean
/** * \file bn_mul.h * * \brief Multi-precision integer library */ /* * Copyright The Mbed TLS Contributors * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ /* * Multiply source vector [s] with b, add result * to destination vector [d] and set carry c. * * Currently supports: *...
c
github
https://github.com/nodejs/node
deps/LIEF/third-party/mbedtls/library/bn_mul.h
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not...
json
github
https://github.com/apache/kafka
clients/src/main/resources/common/message/DescribeClientQuotasRequest.json
from nose.tools import * from scripts.googledrive.connect_external_accounts import do_migration from framework.auth import Auth from tests.base import OsfTestCase from tests.factories import ProjectFactory, UserFactory from website.addons.googledrive.model import GoogleDriveUserSettings from website.addons.googledr...
unknown
codeparrot/codeparrot-clean
<!--Copyright 2020 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
unknown
github
https://github.com/huggingface/transformers
docs/source/en/model_doc/bert.md
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # import sys # import os # import importlib # # # db = None # measurements_db = None # # event = None # states = None # components = None # plugins = None # websocket = None # # # def initialize(dbpath='{}/lib/homecon/'.format(sys.prefix), dbname='homecon'): # global ...
unknown
codeparrot/codeparrot-clean
package client import ( "context" "errors" "fmt" "io" "net/http" "testing" cerrdefs "github.com/containerd/errdefs" "github.com/moby/moby/api/types/registry" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) func TestImagePushReferenceError(t *testing.T) { client, err := New(WithMockClient(func(r...
go
github
https://github.com/moby/moby
client/image_push_test.go
#ifndef Py_INTERNAL_GC_H #define Py_INTERNAL_GC_H #ifdef __cplusplus extern "C" { #endif #ifndef Py_BUILD_CORE # error "this header requires Py_BUILD_CORE define" #endif #include "pycore_interp_structs.h" // PyGC_Head #include "pycore_pystate.h" // _PyInterpreterState_GET() #include "pycore_typedefs.h" //...
c
github
https://github.com/python/cpython
Include/internal/pycore_gc.h
""" Instructor Views """ from contextlib import contextmanager import csv import json import logging import os import re import requests from collections import defaultdict, OrderedDict from markupsafe import escape from requests.status_codes import codes from StringIO import StringIO from django.conf import settings...
unknown
codeparrot/codeparrot-clean
<div class="svelte-xyz"><span class="svelte-xyz">Hello world</span></div> <p class="svelte-xyz"><strong><span class="svelte-xyz">Hello world</span></strong></p>
html
github
https://github.com/sveltejs/svelte
packages/svelte/tests/css/samples/snippets/expected.html
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package views import ( "fmt" "strings" "github.com/hashicorp/terraform/internal/command/arguments" "github.com/hashicorp/terraform/internal/tfdiags" ) // The Init view is used for the init command. type Init interface { Diagnostics(diags tfd...
go
github
https://github.com/hashicorp/terraform
internal/command/views/init.go
import warnings from django.db.migrations.exceptions import ( CircularDependencyError, NodeNotFoundError, ) from django.db.migrations.graph import RECURSION_DEPTH_WARNING, MigrationGraph from django.test import SimpleTestCase from django.utils.encoding import force_text class GraphTests(SimpleTestCase): """ ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright 2016 Fedele Mantuano (https://www.linkedin.com/in/fmantuano/) 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/...
unknown
codeparrot/codeparrot-clean
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2009-2014 DreamWorks Animation LLC. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // * ...
cpp
github
https://github.com/opencv/opencv
3rdparty/openexr/IlmImf/ImfSystemSpecific.cpp
""" Django settings for webpage project. Generated by 'django-admin startproject' using Django 1.10.5. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os...
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...
json
github
https://github.com/apache/kafka
clients/src/main/resources/common/message/DescribeAclsResponse.json
from datetime import ( datetime, timedelta, ) import operator import numpy as np import pytest from pandas import Timestamp import pandas._testing as tm class TestTimestampComparison: def test_compare_non_nano_dt64(self): # don't raise when converting dt64 to Timestamp in __richcmp__ dt =...
python
github
https://github.com/pandas-dev/pandas
pandas/tests/scalar/timestamp/test_comparisons.py
#ifndef HEADER_CURL_TOOL_DIRHIE_H #define HEADER_CURL_TOOL_DIRHIE_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
c
github
https://github.com/curl/curl
src/tool_dirhie.h
# # Copyright 2013 Quantopian, 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 wr...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # (c) 2015 Antiun Ingeniería S.L. - Sergio Teruel # (c) 2015 Antiun Ingeniería S.L. - Carlos Dauden # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields from openerp import tools class ReportProjectTaskUser(models.Model): _inherit = 'report.pr...
unknown
codeparrot/codeparrot-clean
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
unknown
codeparrot/codeparrot-clean
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: dump.py def _iterdump(connection): """ Returns an iterator to the dump of the database in an SQL text format. Used to produce an SQL dum...
unknown
codeparrot/codeparrot-clean
# Copyright (c) 2014 Rackspace, 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 wr...
unknown
codeparrot/codeparrot-clean
# Copyright 2014 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. # pylint: disable=W0401,W0614 from telemetry.page.actions.all_page_actions import * from telemetry.page import page as page_module from telemetry.page import ...
unknown
codeparrot/codeparrot-clean
# Kotlin Project Guide This file provides guidance for AI agents working with code in this repository. ## Repository Overview This is the Kotlin programming language repository containing: - Kotlin compiler (frontend and JVM, JS, WASM, Native backends) - Compiler plugins (compose, serialization, allopen, noarg, etc....
unknown
github
https://github.com/JetBrains/kotlin
.ai/guidelines.md
export type Expect<T extends true> = T; // prettier-ignore export type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false export type IsAny<T> = 0 extends 1 & T ? true : false; export type Func = (...args: any[]) => unknown; export type Pretty<T> = { [K in keyof T...
typescript
github
https://github.com/remix-run/react-router
packages/react-router/lib/types/utils.ts
# 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
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, Inc. # # Authors: # Stephen Gallagher <sgallagh@redhat.com> # # 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 Lice...
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/src/main/java/org/springframework/boot/logging/DelegatingLoggingSystemFactory.java
import numpy as np from numba import from_dtype, cuda from numba.cuda.testing import skip_on_cudasim, CUDATestCase import unittest class TestAlignment(CUDATestCase): def test_record_alignment(self): rec_dtype = np.dtype([('a', 'int32'), ('b', 'float64')], align=True) rec = from_dtype(rec_dtype) ...
unknown
codeparrot/codeparrot-clean
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
java
github
https://github.com/apache/kafka
clients/src/main/java/org/apache/kafka/clients/admin/AlterReplicaLogDirsResult.java
from random import random from bokeh.models import CustomJS, ColumnDataSource from bokeh.plotting import hplot, figure, output_file, show output_file("callback.html") x = [random() for x in range(500)] y = [random() for y in range(500)] s1 = ColumnDataSource(data=dict(x=x, y=y)) p1 = figure(plot_width=400, plot_heig...
unknown
codeparrot/codeparrot-clean
from __future__ import absolute_import import os import sys class langspec(object): def __init__(self, spec_data): self.contents = spec_data; self.identifier = ''; self.type = ''; self.name = ''; self.basedOn = None; if 'Identifier' in self.keys(): self....
unknown
codeparrot/codeparrot-clean
from __future__ import unicode_literals import collections import getpass import optparse import os import re import shutil import socket import subprocess import sys try: import urllib.request as compat_urllib_request except ImportError: # Python 2 import urllib2 as compat_urllib_request try: import ur...
unknown
codeparrot/codeparrot-clean
# Copyright 2012 Colin Scott # Copyright 2012 Andreas Wundsam # Copyright 2012 James McCauley # # This file is part of POX. # # POX 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 Licen...
unknown
codeparrot/codeparrot-clean
# Copyright 2020 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
# Downloading Kepler light curves import os import pandas as pd import kplr import kepler_data as kd def get_lc(id, KPLR_DIR="/Users/ruthangus/.kplr/data/lightcurves"): """ Downloads the kplr light curve and loads x, y and yerr. """ kid = str(int(id)).zfill(9) path = os.path.join(KPLR_DIR, "{}"...
unknown
codeparrot/codeparrot-clean
"""SCons.Tool.tlib XXX """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 Software without restr...
unknown
codeparrot/codeparrot-clean
import datetime from django.db import models class Country(models.Model): # Table Column Fields name = models.CharField(max_length=50) def __str__(self): return self.name class Person(models.Model): # Table Column Fields name = models.CharField(max_length=128) person_country_id = mod...
python
github
https://github.com/django/django
tests/foreign_object/models/person.py
// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 package command import ( "bytes" "context" "fmt" "io" "sync/atomic" "testing" "time" "github.com/hashicorp/terraform/internal/terraform" ) func TestUIInput_impl(t *testing.T) { var _ terraform.UIInput = new(UIInput) } func TestUIInputIn...
go
github
https://github.com/hashicorp/terraform
internal/command/ui_input_test.go
""" RadioRecord Top Hits Downloader """ from setuptools import find_packages, setup dependencies = ['click==6.6', 'aiohttp==0.22.5', 'lxml==3.6.1'] setup( name='rrtop100', version='0.1.0', url='https://github.com/kidig/rrtop100', license='BSD', author='Dmitrii Gerasimenko', author_email='kiddi...
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 # ...
unknown
codeparrot/codeparrot-clean
import * as documents from "./_namespaces/documents.js"; import * as fakes from "./_namespaces/fakes.js"; import * as Harness from "./_namespaces/Harness.js"; import * as ts from "./_namespaces/ts.js"; import * as Utils from "./_namespaces/Utils.js"; import * as vfs from "./_namespaces/vfs.js"; import * as vpath from "...
typescript
github
https://github.com/microsoft/TypeScript
src/testRunner/projectsRunner.ts
import re from collections import namedtuple from io import BytesIO try: from Crypto.Cipher import AES CAN_DECRYPT = True except ImportError: CAN_DECRYPT = False from livestreamer.compat import range from livestreamer.exceptions import StreamError from livestreamer.packages.flashmedia.tag import ( AAC...
unknown
codeparrot/codeparrot-clean
import sys from django.conf import settings def runtests(): settings.configure(DEBUG=True, DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, INSTALLED_APPS=('django.contrib.auth', ...
unknown
codeparrot/codeparrot-clean
import weakref from swimlane.core.cursor import Cursor from swimlane.core.resolver import SwimlaneResolver from .field import Field class FieldCursor(Cursor, SwimlaneResolver): """Base class for encapsulating a field instance's complex logic Useful in abstracting away extra request(s), lazy evaluation, pagin...
unknown
codeparrot/codeparrot-clean
<!-- LINT.IfChange --> # Create a custom multiplexer op with C++ backward compatibility This guide provides an end-to-end implementation of a new custom op that is backwards compatible with an existing custom op. The example in this guide implements a new custom op that handles inputs that are Python lists of tensors...
unknown
github
https://github.com/tensorflow/tensorflow
tensorflow/examples/custom_ops_doc/multiplex_4/README.md
# Generated by Django 1.11.1 on 2017-10-16 15:16 import django.core.validators import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- import os import sys import shutil import atexit # Checking for all required packages and if these are recent enough minimum_numpy_version = "1.6" # lower versions may work (not tested) minimum_scipy_version = "0.10" # lower versions may work (not tested) source_dir = "airballoon" if not has...
unknown
codeparrot/codeparrot-clean
"""Pin select client library functions. Find implementation details in LPC17xx CMSIS-Compliant Standard Peripheral Firmware Driver Library documentation. """ from internals import robocaller, cstruct __author__ = "Neil MacMunn" __credits__ = ["Neil MacMunn", "NXP MCU SW Application Team"] __maintainer__ = ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # (c) 2018-2019, 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': ['preview'],...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python from __future__ import print_function import sys import json import os import re class Firmware(): def __init__(self, date=None, platform=None, vehicletype=None, filepath=None, git_sha=None, frame=None): self.atts = dict() self.atts["date"] = date self.atts["platform"] =...
unknown
codeparrot/codeparrot-clean
# Copyright (C) 2009 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 of conditions and the ...
unknown
codeparrot/codeparrot-clean
#![warn(rust_2018_idioms)] #![cfg(feature = "full")] #![cfg(not(miri))] // No socket in miri. use std::io; use tokio::net::TcpListener; use tokio::runtime::Builder; fn rt() -> tokio::runtime::Runtime { Builder::new_current_thread().enable_all().build().unwrap() } #[test] fn test_is_rt_shutdown_err() { let rt...
rust
github
https://github.com/tokio-rs/tokio
tokio/tests/rt_shutdown_err.rs
# -*- coding: utf-8 -*- # # # Project name: OpenVAS2Report: A set of tools to manager OpenVAS XML report files. # Project URL: https://github.com/cr0hn/openvas_to_report # # Copyright (c) 2015, cr0hn<-AT->cr0hn.com # All rights reserved. # # Redistribution and use in source and binary forms, with or without modificatio...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2005-2008,2010 Zuza Software Foundation # # This file is part of translate. # # translate 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
```{eval-rst} .. currentmodule:: torch.func ``` (ux-limitations)= # UX Limitations torch.func, like [JAX](https://github.com/google/jax), has restrictions around what can be transformed. In general, JAX’s limitations are that transforms only work with pure functions: that is, functions where the output is completely...
unknown
github
https://github.com/pytorch/pytorch
docs/source/func.ux_limitations.md
from django.db.models import Field, FloatField from django.db.models.expressions import CombinedExpression, Func, Value from django.db.models.functions import Coalesce from django.db.models.lookups import Lookup class SearchVectorExact(Lookup): lookup_name = 'exact' def process_rhs(self, qn, connection): ...
unknown
codeparrot/codeparrot-clean
# Copyright 2015 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) 2013 Torrent-TV.RU # Writer (c) 2013, Welicobratov K.A., E-mail: 07pov23@gmail.com # Edited (c) 2015, Vorotilin D.V., E-mail: dvor85@mail.ru import xbmcgui import time import json import defines def LogToXBMC(text, type = 1): ttext = '' if type == 2: ttext = 'ERROR:' log = open(...
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...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Ansible, 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 o...
unknown
codeparrot/codeparrot-clean
import numpy as np from procedural_city_generation.polygons.Polygon2D import Polygon2D, Edge def getFoundation(poly, grid_width=0.01, eps=10**-8): rect_area = 0 rect_height = 0 rect_x = [0,0] rect_base = None #Iterate through edges which are bordering a road, find largest #rectangle for each one for base in ...
unknown
codeparrot/codeparrot-clean
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. """ bkr job-list: List Beaker jobs ============================== .. p...
unknown
codeparrot/codeparrot-clean
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Shows how to use the AWS SDK for Python (Boto3) with the Amazon Kinesis API to generate a data stream. This script generates data for the _Detecting Data Anomalies on a Stream_ example in the Amazon ...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Tom Jaspers. # # 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 ...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python import webapp2 import cgi import environment class CancelAttendanceController(webapp2.RequestHandler): def get(self): template_values = { "title": "Cancel Attendance" } template = environment.JINJA_ENVIRONMENT.get_template('cancel.html') self.resp...
unknown
codeparrot/codeparrot-clean
# -*- coding: utf-8 -*- """Module containing classes with common behaviour for both VMs and Instances of all types.""" import json from datetime import date from datetime import datetime from datetime import timedelta import attr from cached_property import cached_property from riggerlib import recursive_update from ...
unknown
codeparrot/codeparrot-clean
from satistjenesten.scene import GenericScene import numpy class MosaicScene(GenericScene): """ Mosaic scene is an extension of GenericScene where Several scenes are combined into one """ def compose_mosaic(self, scenes_list, resample_method='nn'): self.scenes = sort_scenes_by_timestamp(s...
unknown
codeparrot/codeparrot-clean
#!/usr/bin/env python3 # Unit test for generate_test_code.py # # Copyright (C) 2018, Arm Limited, All Rights Reserved # SPDX-License-Identifier: Apache-2.0 # # 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 th...
unknown
codeparrot/codeparrot-clean
# system configuration generated and used by the sysconfig module build_time_vars = {'AC_APPLE_UNIVERSAL_BUILD': 0, 'AIX_GENUINE_CPLUSPLUS': 0, 'AR': 'ar', 'ARFLAGS': 'rc', 'ASDLGEN': './Parser/asdl_c.py', 'ASDLGEN_FILES': './Parser/asdl.py ./Parser/asdl_c.py', 'AST_ASDL': './Parser/Python.asdl', 'AST_C': 'Pytho...
unknown
codeparrot/codeparrot-clean