repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
1ta/study_python | refs/heads/master | files/circumference.py | 1 | import math
rs = input("enter the r of circle:")
ri = int(rs)
cf = 2 * math.pi * ri
area = math.pi * (ri ** 2)
print("The cirumference is: ", cf, ", and the area is:",area)
|
brokenjacobs/ansible | refs/heads/devel | lib/ansible/modules/inventory/add_host.py | 56 | # -*- mode: 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 distr... |
andysim/psi4 | refs/heads/master | psi4/driver/qcdb/cfour.py | 3 | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of ... |
pengzhangdev/PokemonGo-Bot | refs/heads/master | pokemongo_bot/cell_workers/complete_tutorial.py | 1 | import random
from pokemongo_bot import logger
from pokemongo_bot.inventory import player
from pokemongo_bot.base_task import BaseTask
from pokemongo_bot.worker_result import WorkerResult
from pokemongo_bot.human_behaviour import sleep
class CompleteTutorial(BaseTask):
SUPPORTED_TASK_API_VERSION = 1
def i... |
microblink/NNPACK | refs/heads/master | src/x86_64-fma/2d-fourier-16x16.py | 3 | from __future__ import absolute_import
from __future__ import division
import fft16x16
import fft.complex_soa
import fft.two_real_to_two_complex_soa_perm_planar
import fft.two_complex_soa_perm_to_two_real_planar
arg_t_pointer = Argument(ptr(const_float_), name="t")
arg_f_pointer = Argument(ptr(float_), name="f")
arg... |
etkirsch/scikit-learn | refs/heads/master | examples/linear_model/plot_lasso_coordinate_descent_path.py | 254 | """
=====================
Lasso and Elastic Net
=====================
Lasso and elastic net (L1 and L2 penalisation) implemented using a
coordinate descent.
The coefficients can be forced to be positive.
"""
print(__doc__)
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# License: BSD 3 clause
import num... |
jgoclawski/django | refs/heads/master | tests/migrations/migrations_test_apps/normal/__init__.py | 12133432 | |
froyobin/ceilometer | refs/heads/out_branch | ceilometer/api/controllers/__init__.py | 12133432 | |
nicoTrombon/DjangoPolls | refs/heads/master | env/Lib/site-packages/django/contrib/flatpages/urls.py | 667 | from django.conf.urls import url
from django.contrib.flatpages import views
urlpatterns = [
url(r'^(?P<url>.*)$', views.flatpage, name='django.contrib.flatpages.views.flatpage'),
]
|
laginha/django-easy-response | refs/heads/master | example/example/settings.py | 1 | """
Django settings for example project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
im... |
ericholscher/django-tastypie | refs/heads/master | tests/complex/api/resources.py | 30 | from django.contrib.auth.models import User, Group
from django.contrib.comments.models import Comment
from tastypie.fields import CharField, ForeignKey, ManyToManyField, OneToOneField, OneToManyField
from tastypie.resources import ModelResource
from complex.models import Post, Profile
class ProfileResource(ModelResou... |
avanov/django | refs/heads/master | tests/template_tests/filter_tests/test_cut.py | 521 | from django.template.defaultfilters import cut
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class CutTests(SimpleTestCase):
@setup({'cut01': '{% autoescape off %}{{ a|cut:"x" }} {{ b|cut:"x" }}{% endautoescape %}'})
def test_cut01(self):
... |
mcrowson/django | refs/heads/master | django/contrib/sites/apps.py | 590 | from django.apps import AppConfig
from django.db.models.signals import post_migrate
from django.utils.translation import ugettext_lazy as _
from .management import create_default_site
class SitesConfig(AppConfig):
name = 'django.contrib.sites'
verbose_name = _("Sites")
def ready(self):
post_migr... |
RicardoJohann/um | refs/heads/master | erpnext/stock/report/delivery_note_trends/__init__.py | 12133432 | |
uptane/uptane | refs/heads/develop | tests/__init__.py | 12133432 | |
stefanw/froide | refs/heads/master | froide/georegion/__init__.py | 12133432 | |
ondra-novak/chromium.src | refs/heads/nw | tools/find_runtime_symbols/reduce_debugline.py | 161 | #!/usr/bin/env python
# Copyright (c) 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.
"""Reduces result of 'readelf -wL' to just a list of starting addresses.
It lists up all addresses where the corresponding source f... |
damoxc/vmail | refs/heads/master | vmail/tests/test_common.py | 1 | from vmail.common import *
from vmail.tests.test import BaseUnitTest
class CommonTestCase(BaseUnitTest):
def test_fsize(self):
self.failUnless(fsize(112245) == '109.6 KiB')
def test_address_parse(self):
addr = Address.parse('John Smith <john.smith@example.com>')
self.failUnless(addr.a... |
nkmk/python-snippets | refs/heads/master | notebook/janome_count.py | 1 | from janome.tokenizer import Tokenizer
import collections
t = Tokenizer()
s = '人民の人民による人民のための政治'
for token in t.tokenize(s):
print(token)
# 人民 名詞,一般,*,*,*,*,人民,ジンミン,ジンミン
# の 助詞,連体化,*,*,*,*,の,ノ,ノ
# 人民 名詞,一般,*,*,*,*,人民,ジンミン,ジンミン
# による 助詞,格助詞,連語,*,*,*,による,ニヨル,ニヨル
# 人民 名詞,一般,*,*,*,*,人民,ジンミン,ジンミン
# の 助詞,連体化,*,*,*,*,の... |
campbe13/openhatch | refs/heads/master | vendor/packages/docutils/test/functional/tests/standalone_rst_latex.py | 18 | exec(open('functional/tests/_standalone_rst_defaults.py').read())
# Source and destination file names.
test_source = "standalone_rst_latex.txt"
test_destination = "standalone_rst_latex.tex"
# Keyword parameters passed to publish_file.
writer_name = "latex"
# Settings
# use "smartquotes" transition:
settings_override... |
Undeterminant/euler-python | refs/heads/master | euler/misc.py | 1 | def gcd(x, y):
return gcd(y, x % y) if y else x
def lcm(x, y):
return x * y // gcd(x, y)
def triplet(a, b, c):
return a * a + b * b == c * c
def isint(x):
return x == int(x)
__all__ = ['gcd', 'lcm', 'triplet', 'isint']
|
bitmazk/md-pypispy-users | refs/heads/master | manage.py | 1 | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault(
'DJANGO_SETTINGS_MODULE', 'md_pypispy_users.tests.south_settings')
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
|
602p/orth | refs/heads/master | compiler/transformer.py | 1 | from transform import Transformer
from grammar import *
import transform
import datamodel
import intrinsics
from transform import get_type, do_var_alloc, ret_local
"""
_______ ___ ________
)_ ( '-,) ) _(
)_ \_//_/ _(
)___ ___(
))
((
``
Here be dragons
This is the ... |
seem-sky/kbengine | refs/heads/master | kbe/src/lib/python/Lib/test/script_helper.py | 60 | # Common utility functions used by various script execution tests
# e.g. test_cmd_line, test_cmd_line_script and test_runpy
import importlib
import sys
import os
import os.path
import tempfile
import subprocess
import py_compile
import contextlib
import shutil
import zipfile
from importlib.util import source_from_ca... |
Fale/ansible | refs/heads/devel | lib/ansible/plugins/become/sudo.py | 29 | # -*- coding: utf-8 -*-
# Copyright: (c) 2018, 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
DOCUMENTATION = """
name: sudo
short_description: Substitute User D... |
okhiroyuki/blynk-library | refs/heads/master | scripts/blynk/gateway/__init__.py | 12133432 | |
zerc/django | refs/heads/master | tests/bash_completion/management/__init__.py | 12133432 | |
darkfeline/pymsmtpq | refs/heads/master | tests/__init__.py | 12133432 | |
edcast-inc/edx-platform-edcast | refs/heads/master | openedx/core/djangoapps/content/course_overviews/migrations/__init__.py | 12133432 | |
renegelinas/mi-instrument | refs/heads/master | mi/instrument/seabird/sbe26plus/ooicore/test/__init__.py | 12133432 | |
chris48s/UK-Polling-Stations | refs/heads/master | polling_stations/apps/addressbase/migrations/__init__.py | 12133432 | |
katiecheng/Bombolone | refs/heads/master | env/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/gb2312freq.py | 3131 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
google/TensorNetwork | refs/heads/master | tensornetwork/matrixproductstates/mpo_test.py | 1 | import pytest
import numpy as np
import tensorflow as tf
import jax
import torch
from tensornetwork.backends import backend_factory
#pylint: disable=line-too-long
from tensornetwork.matrixproductstates.mpo import (FiniteMPO,
BaseMPO,
... |
richardcornish/lpthw | refs/heads/master | exercises/ex28.py | 2 | # Exercise 28
# https://learnpythonthehardway.org/book/ex28.html
print True and True # True
print False and True # False
print 1 == 1 and 2 == 1 # False
print "test" == "test" # True
print 1 == 1 or 2 != 1 # True
print True and 1 == 1 # True
print False and 0 != 0 # False
print True or 1 == 1 # True
print "tes... |
mdiller/MangoByte | refs/heads/master | resource/dev/showerthoughts_getter.py | 1 | import praw
import json
from datetime import datetime
with open("../../settings.json", "r") as f:
settings = json.loads(f.read())
reddit = praw.Reddit(client_id=settings["reddit"]["client_id"],
client_secret=settings["reddit"]["client_secret"],
user_agent=settings["reddit"]["user_agent"])
data = []
for s... |
ChinaQuants/PTVS | refs/heads/master | Python/Tests/TestData/DebuggerProject/A/module1.py | 36 |
def do_something():
for i in range(100):
print(i)
|
gameduell/kythe | refs/heads/master | third_party/googletest/test/gtest_color_test.py | 3259 | #!/usr/bin/env python
#
# Copyright 2008, 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... |
ganeshnalawade/ansible | refs/heads/devel | test/integration/targets/async_extra_data/library/junkping.py | 65 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
def main():
print("junk_before_module_output")
print(json.dumps(dict(changed=False, source='user')))
print("junk_after_module_output")
if __name__ == '__main__':
main()
|
SohKai/ChronoLogger | refs/heads/master | web/flask/lib/python2.7/site-packages/migrate/tests/versioning/test_runchangeset.py | 41 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os,shutil
from migrate.tests import fixture
from migrate.versioning.schema import *
from migrate.versioning import script
class TestRunChangeset(fixture.Pathed,fixture.DB):
level=fixture.DB.CONNECT
def _setup(self, url):
super(TestRunChangeset, se... |
Chilledheart/vbox | refs/heads/master | src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/CommonDataClass/PackageClass.py | 11 | ## @file
# This file is used to define a class object to describe a package
#
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The ... |
citrix-openstack/nodepool | refs/heads/master | nodepool/tests/__init__.py | 1 | # Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
# Copyright (C) 2014 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/license... |
jherico/qtwebkit | refs/heads/5.5 | Tools/Scripts/webkitpy/layout_tests/models/test_results.py | 126 | # Copyright (C) 2010 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 ... |
claudep/django-calendarium | refs/heads/master | calendarium/south_migrations/0002_auto__add_field_occurrence_cancelled__chg_field_event_rule.py | 4 | # flake8: noqa
# -*- 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 'Occurrence.cancelled'
db.add_column('calendarium_occurrence', 'cancelled',
... |
shtouff/django | refs/heads/master | django/contrib/gis/db/backends/spatialite/schema.py | 518 | from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
from django.db.utils import DatabaseError
class SpatialiteSchemaEditor(DatabaseSchemaEditor):
sql_add_geometry_column = (
"SELECT AddGeometryColumn(%(table)s, %(column)s, %(srid)s, "
"%(geom_type)s, %(dim)s, %(null)s)"
)
sq... |
albertomurillo/ansible | refs/heads/devel | lib/ansible/executor/play_iterator.py | 41 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... |
adambrenecki/django | refs/heads/master | django/contrib/sites/tests.py | 124 | from __future__ import unicode_literals
from django.conf import settings
from django.contrib.sites.models import Site, RequestSite, get_current_site
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.http import HttpRequest
from django.test import TestCase
from django.test.utils import ... |
mancoast/CPythonPyc_test | refs/heads/master | cpython/260_test_genexps.py | 58 | doctests = """
Test simple loop with conditional
>>> sum(i*i for i in range(100) if i&1 == 1)
166650
Test simple nesting
>>> list((i,j) for i in range(3) for j in range(4) )
[(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (1, 3), (2, 0), (2, 1), (2, 2), (2, 3)]
Test nesting with the inner ... |
wiredmind/movie-project | refs/heads/master | media.py | 1 | import os
import requests
# Loads environmental variables from a file,
# by default it will load all variables from '.env'
from env_tools import apply_env; apply_env()
# TMDb API configuration
API_VERSION = '3'
API_ROOT_URL = 'https://api.themoviedb.org/{version}'.format(version=API_VERSION)
API_KEY = os.environ['TMD... |
GauravSahu/odoo | refs/heads/8.0 | addons/website_gengo/__openerp__.py | 385 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP S.A. (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the term... |
Senseg/Py4A | refs/heads/master | python3-alpha/python3-src/Lib/test/test_codecencodings_iso2022.py | 55 | #!/usr/bin/env python
#
# Codec encoding tests for ISO 2022 encodings.
from test import support
from test import test_multibytecodec_support
import unittest
COMMON_CODEC_TESTS = (
# invalid bytes
(b'ab\xFFcd', 'replace', 'ab\uFFFDcd'),
(b'ab\x1Bdef', 'replace', 'ab\x1Bdef'),
(b'ab\x1B$... |
RuanJG/git-repo | refs/heads/master | pyversion.py | 79 | #
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... |
galileo-project/Galileo-dockyard | refs/heads/master | server/dockyard/driver/app/_model/build.py | 1 | from dockyard.utils.mongo import Mongo
class Build(Mongo):
"""
_id
app_id
user_id
timestamp
build_no
result
"""
pass
|
seletskiy/screenkey-1 | refs/heads/master | Screenkey/__init__.py | 1 | import gettext
gettext.install('screenkey', unicode=True)
APP_NAME = "Screenkey"
APP_DESC = _("Screencast your keys")
APP_URL = 'http://www.thregr.org/~wavexx/software/screenkey/'
VERSION = '0.7.0'
|
felixjimenez/django | refs/heads/nonrel-1.6 | django/utils/regex_helper.py | 229 | """
Functions for reversing a regular expression (used in reverse URL resolving).
Used internally by Django and not intended for external use.
This is not, and is not intended to be, a complete reg-exp decompiler. It
should be good enough for a large class of URLS, however.
"""
from __future__ import unicode_literals
... |
ahlfors/omaha | refs/heads/master | enterprise/installer/build_enterprise_installer.py | 61 | #!/usr/bin/python2.4
#
# Copyright 2009-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 applicable ... |
rpappalax/deploy-verify | refs/heads/dev | deploy_verify/bugzilla_rest_client.py | 1 | """This module enables CRUD operations with Bugzilla 5.1 REST API
.. _Bugzilla REST API Docs:
https://wiki.mozilla.org/Bugzilla:REST_API
http://bugzilla.readthedocs.org/en/latest/api/index.html
"""
import os
import sys
import json
import requests
from output_helper import OutputHelper
PRODUCT_PROD = 'Cloud Ser... |
googleapis/googleapis-gen | refs/heads/master | google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/services/services/billing_setup_service/client.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
theodorachu/ihavenewsforyou | refs/heads/master | NewsProcessorServer/runAndStoreScraper.py | 1 | from server import app, db
from server.models import Article
from scraper.scrapeRSSFeeds import scrapeRSSFeeds
def scrapeArticles():
articles = scrapeRSSFeeds()
nonDuplicates = 0
for article in articles:
dbArticle = Article(article)
nonDuplicates += addToDB(dbArticle)
print nonDuplicates, "new articles out of"... |
zozo123/buildbot | refs/heads/master | master/buildbot/changes/p4poller.py | 1 | # This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... |
palaniyappanBala/thug | refs/heads/master | src/DOM/W3C/Notation.py | 8 | #!/usr/bin/env python
from DOMException import DOMException
from Node import Node
class Notation(Node):
@property
def publicId(self):
pass
@property
def systemId(self):
pass
@property
def nodeName(self):
pass
@property
def nodeType(self):
return Node.... |
execunix/vinos | refs/heads/master | crypto/external/bsd/netpgp/dist/bindings/python/netpgppython.py | 4 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 1.3.31
#
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
import _netpgppython
import new
new_instancemethod = new.instancemethod
try:
_swig_property = pro... |
mistercrunch/panoramix | refs/heads/master | superset/migrations/versions/d416d0d715cc_add_limiting_factor_column_to_query_.py | 2 | # 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... |
jamespcole/home-assistant | refs/heads/master | homeassistant/components/sochain/__init__.py | 36 | """The sochain component."""
|
MartinOehler/LINBO-ClientGUI | refs/heads/master | linboweb/__init__.py | 12133432 | |
tartley/toml | refs/heads/master | test_sys/__init__.py | 12133432 | |
dgenr8/bitcoin | refs/heads/0.12 | qa/rpc-tests/test_framework/__init__.py | 12133432 | |
mmerickel/plaster | refs/heads/master | tests/__init__.py | 12133432 | |
njmube/erpnext | refs/heads/develop | erpnext/stock/doctype/landed_cost_voucher/__init__.py | 12133432 | |
Kryz/sentry | refs/heads/master | src/sentry/migrations/0182_auto__add_field_auditlogentry_actor_label__add_field_auditlogentry_act.py | 34 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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 'AuditLogEntry.actor_label'
db.add_column('sentry_auditlog... |
pgraziano/ursula | refs/heads/master | plugins/filters/sensu_filters.py | 18 |
def sensu_dependencies(check_name, hostvars, host_groups, check_groups):
deps = set()
check_groups = check_groups.split(',')
for group in check_groups:
if not group in host_groups:
continue
for host in host_groups[group]:
client_name = '{}.{}-{}'.format(host, hostva... |
ZachLiuGIS/django-allauth | refs/heads/master | allauth/socialaccount/providers/coinbase/views.py | 60 | import requests
from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter,
OAuth2LoginView,
OAuth2CallbackView)
from .provider import CoinbaseProvider
class CoinbaseOAuth2Adapter(OAuth2Ada... |
omni5cience/django-inlineformfield | refs/heads/master | .tox/py27/lib/python2.7/site-packages/pip/_vendor/distlib/wheel.py | 164 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals
import base64
import codecs
import datetime
import distutils.util
from email import message_from_file... |
qtekfun/htcDesire820Kernel | refs/heads/master | external/chromium_org/tools/telemetry/telemetry/core/backends/chrome/chrome_browser_options.py | 23 | # 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.
from telemetry.core import browser_options
from telemetry.core.backends.chrome import cros_interface
def CreateChromeBrowserOptions(br_options):
browser_... |
nthien/zulip | refs/heads/master | api/zulip/__init__.py | 116 | # -*- coding: utf-8 -*-
# Copyright © 2012-2014 Zulip, Inc.
#
# 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, mod... |
etos/django | refs/heads/master | django/conf/locale/pt/__init__.py | 12133432 | |
baishancloud/pykit | refs/heads/master | utfjson/test/__init__.py | 12133432 | |
sam-tsai/django | refs/heads/master | tests/postgres_tests/array_index_migrations/__init__.py | 12133432 | |
SDoc/py-sdoc | refs/heads/master | sdoc/SDoc.py | 1 | import configparser
import os
from typing import List, Optional
from cleo.styles import OutputStyle
from sdoc import sdoc2
from sdoc.error import SDocError
from sdoc.format.Format import Format
from sdoc.sdoc1.SDoc1Interpreter import SDoc1Interpreter
from sdoc.sdoc2.NodeStore import NodeStore
from sdoc.sdoc2.SDoc2Int... |
waidyanatha/sambro-eden | refs/heads/master | controllers/stats.py | 6 | # -*- coding: utf-8 -*-
"""
Sahana Eden Stats Controller
"""
module = request.controller
resourcename = request.function
if not settings.has_module(module):
raise HTTP(404, body="Module disabled: %s" % module)
# -----------------------------------------------------------------------------
def parameter():
... |
CJ8664/servo | refs/heads/master | tests/wpt/web-platform-tests/websockets/handlers/echo_wsh.py | 163 | #!/usr/bin/python
from mod_pywebsocket import msgutil
from mod_pywebsocket import common
_GOODBYE_MESSAGE = u'Goodbye'
def web_socket_do_extra_handshake(request):
# This example handler accepts any request. See origin_check_wsh.py for how
# to reject access from untrusted scripts based on origin value.
if... |
nguyentu1602/pyexp | refs/heads/master | scripts/relative_imports.py | 1 | """
for absolute import to work well with script running in your python dir, you need:
1 - either install your package with pip/some systems
2 - using the -m flag - i.e. running python modules as script: python -m
https://stackoverflow.com/questions/6323860/sibling-package-imports/23542795#23542795
"""
from pyexp imp... |
pv/scikit-learn | refs/heads/master | sklearn/tests/test_init.py | 335 | # Basic unittests to test functioning of module's top-level
__author__ = 'Yaroslav Halchenko'
__license__ = 'BSD'
from sklearn.utils.testing import assert_equal
try:
from sklearn import *
_top_import_error = None
except Exception as e:
_top_import_error = e
def test_import_skl():
# Test either abo... |
titeuf87/evennia | refs/heads/master | evennia/scripts/migrations/0002_auto_20150118_1625.py | 12 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def convert_defaults(apps, schema_editor):
ScriptDB = apps.get_model("scripts", "ScriptDB")
for script in ScriptDB.objects.filter(db_typeclass_path="src.scripts.scripts.Script"):
script.db_typeclas... |
yugangw-msft/azure-cli | refs/heads/dev | src/azure-cli/azure/cli/command_modules/eventgrid/tests/latest/__init__.py | 1233 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
tonyli71/designate | refs/heads/master | designate/tests/unit/__init__.py | 12133432 | |
imouren/crab | refs/heads/master | scikits/crab/datasets/tests/__init__.py | 12133432 | |
uhobawuhot/interceptor | refs/heads/master | interceptor/api/middleware/__init__.py | 12133432 | |
neilLasrado/erpnext | refs/heads/develop | erpnext/compliance/doctype/__init__.py | 12133432 | |
CoutinhoElias/danibraz | refs/heads/master | danibraz/static/material/frontend/migrations/__init__.py | 12133432 | |
longmen21/edx-platform | refs/heads/master | common/djangoapps/terrain/stubs/tests/__init__.py | 12133432 | |
daikeren/short_url | refs/heads/master | short_url/url_shortener/migrations/__init__.py | 12133432 | |
solashirai/edx-platform | refs/heads/master | lms/djangoapps/student_account/test/__init__.py | 12133432 | |
Anonymouslemming/ansible | refs/heads/devel | lib/ansible/modules/database/postgresql/__init__.py | 12133432 | |
rajsadho/django | refs/heads/master | tests/string_lookup/__init__.py | 12133432 | |
matthewoliver/turbo-hipster | refs/heads/master | turbo_hipster/task_plugins/__init__.py | 12133432 | |
meteotest/hurray | refs/heads/master | hurray/server/platform/__init__.py | 12133432 | |
garnermccloud/OLD_DJANGO | refs/heads/master | Writigain/__init__.py | 12133432 | |
mmalter/dlstats | refs/heads/master | dlstats/tests/fetchers/test_eurostat.py | 2 | # -*- coding: utf-8 -*-
import tempfile
import datetime
import os
from copy import deepcopy
from pprint import pprint
from urllib.parse import urlparse
from urllib.request import url2pathname, pathname2url
from dlstats.fetchers._commons import Datasets
from dlstats.fetchers import eurostat
from dlstats import constan... |
Stavitsky/nova | refs/heads/master | nova/cmd/xvpvncproxy.py | 27 | # Copyright (c) 2010 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 r... |
quodlibet/mutagen | refs/heads/master | tests/test_mp4.py | 1 |
import os
import struct
import subprocess
from io import BytesIO
import pytest
from tests import TestCase, DATA_DIR, get_temp_copy
from mutagen.mp4 import (MP4, Atom, Atoms, MP4Tags, MP4Info, delete, MP4Cover,
MP4MetadataError, MP4FreeForm, error, AtomDataType,
AtomE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.