repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
likexx/riftwarrior | refs/heads/master | code/external/emscripten/src/relooper/fuzzer.py | 8 |
import random, subprocess, difflib
while True:
# Random decisions
num = random.randint(2, 250)
density = random.random() * random.random()
decisions = [random.randint(1, num*20) for x in range(num*3)]
branches = [0]*num
defaults = [0]*num
for i in range(num):
b = set([])
bs = random.randint(1, m... |
LewisAndClark-CIS/Test-One | refs/heads/master | Craps_Roller.py | 1 | # Craps Roller
# Demonstrates random number generation
# Original Author: Michael Dawson
# Last Edited: Thorin Schmidt
# Date Edited: 9/26/2014
impart random
# generate random numbers 1 - 6
die1 = random.randint(1, 6)
die2 = random.randrange(6)
total = 'die1' + 'die2'
print("You rolled a", die1, "and a", die2, "fo... |
magenik/perfect-world-webplatform | refs/heads/master | public/assets/vendors/ionicons/builder/scripts/generate_font.py | 13 | # Font generation script from FontCustom
# https://github.com/FontCustom/fontcustom/
# http://fontcustom.com/
import fontforge
import os
import md5
import subprocess
import tempfile
import json
import copy
SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
INPUT_SVG_DIR = os.path.join(SCRIPT_PATH, '..', '..', '... |
suzukaze/pgcli | refs/heads/master | tests/test_parseutils.py | 8 | import pytest
from pgcli.packages.parseutils import extract_tables
from pgcli.packages.parseutils import find_prev_keyword, is_open_quote
def test_empty_string():
tables = extract_tables('')
assert tables == []
def test_simple_select_single_table():
tables = extract_tables('select * from abc')
assert ... |
natanielruiz/android-yolo | refs/heads/master | jni-build/jni/include/tensorflow/contrib/distributions/python/ops/gamma.py | 3 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
TangledWeb/tangled | refs/heads/master | tangled/commands.py | 1 | import code
import glob
import os
import posixpath
import shutil
import site
import sys
import unittest
from runcommands import command
from runcommands.commands import local, remote, show_config
from runcommands.util import confirm, printer
from tangled.util import load_object
@command
def init(config, overwrite=F... |
liangazhou/django-rdp | refs/heads/master | packages/eclipse/plugins/org.python.pydev_4.4.0.201510052309/pysrc/pydevconsole.py | 11 | from _pydev_imps._pydev_thread import start_new_thread
try:
from code import InteractiveConsole
except ImportError:
from pydevconsole_code_for_ironpython import InteractiveConsole
from code import compile_command
from code import InteractiveInterpreter
import os
import sys
import _pydev_threading as threadi... |
mbauskar/erpnext | refs/heads/develop | erpnext/patches/v5_0/repost_requested_qty.py | 90 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
from erpnext.stock.stock_balance import update_bin_qty, get_indented_qty
count=0
for item_code, warehouse in frappe... |
lnls-fac/fieldmaptrack | refs/heads/master | examples/example_bo_sx_sextupoles_analysis.py | 1 | #!/usr/bin/env python3
import fieldmaptrack as fmaptrack
import fieldmaptrack.sextupole_analysis as analysis
import numpy as np
config = analysis.Config()
config.config_label = 'sx_model3' # identification label
config.fmap_filename = '/home/fac_files/data/sirius/bo/magnet_modelling/sx/fieldmaps/... |
CornerstoneAuto/CornerstoneAutoV1-Fail | refs/heads/master | contrib/wallettools/walletchangepass.py | 785 | from jsonrpc import ServiceProxy
access = ServiceProxy("http://127.0.0.1:9332")
pwd = raw_input("Enter old wallet passphrase: ")
pwd2 = raw_input("Enter new wallet passphrase: ")
access.walletpassphrasechange(pwd, pwd2)
|
Fusion-Rom/android_external_chromium_org | refs/heads/lp5.1 | tools/telemetry/telemetry/core/platform/power_monitor/ippet_power_monitor.py | 39 | # 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.
import contextlib
import csv
import logging
import operator
import os
import platform
import re
import shutil
import tempfile
import zipfile
from telemetry ... |
hanlind/nova | refs/heads/master | nova/api/openstack/compute/floating_ip_pools.py | 6 | # Copyright (c) 2011 X.commerce, a business unit of eBay 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 req... |
azumimuo/family-xbmc-addon | refs/heads/master | plugin.video.bubbles/resources/lib/sources/german/hoster/open/movie4k.py | 1 | # -*- coding: utf-8 -*-
"""
Bubbles Addon
Copyright (C) 2016 Exodus
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any l... |
Oinweb/fly-django | refs/heads/master | basepage/models.py | 10644 | from django.db import models
# Create your models here.
|
troylee/nnet-asr | refs/heads/master | tools/init/gen_sharedlinearity_init.py | 1 |
# ./gen_hamm_dct.py
# script generateing NN initialization for training with TNet
#
# author: Karel Vesely
# calling example:
# python gen_mlp_init.py --dimIn=598 --dimOut=135 --dimHid=1024:1024:1024
#
import math, random
import sys
from optparse import OptionParser
parser = OptionParser()
parser.add_option('... |
philippj/python-burningseries | refs/heads/master | yowsup/layers/auth/protocolentities/stream_error_conflict.py | 50 | from yowsup.structs import ProtocolEntity, ProtocolTreeNode
class StreamErrorConflictProtocolEntity(ProtocolEntity):
'''
<stream:error>
<conflict></conflict>
<text>Replaced by new connection</text>
</stream:error>
'''
def __init__(self, text = None):
super(StreamErrorConfl... |
sungeunbae/resbaz_lessons | refs/heads/master | python-files/readings-05.py | 5 | import sys
import numpy as np
def main():
script = sys.argv[0]
action = sys.argv[1]
filenames = sys.argv[2:]
assert action in ['--min', '--mean', '--max'], \
'Action is not one of --min, --mean, or --max: ' + action
for f in filenames:
process(f, action)
def process(filename, ac... |
unlessbamboo/grocery-shop | refs/heads/master | project/graphql/cookbook/customs/pagination.py | 1 | """
pagination.py
"""
from django.core.paginator import Paginator, EmptyPage
class XPaginator(object):
"""
Example:
XPaginator(objs, page).map(function_cb)
"""
def __init__(self, objs, page=0, page_size=10):
try:
self.paginator = Paginator(objs, page_size)
s... |
QuantEcon/QuantEcon.py | refs/heads/master | quantecon/game_theory/tests/test_repeated_game.py | 2 | """
Tests for repeated_game.py
"""
import numpy as np
from numpy.testing import assert_allclose
from quantecon.game_theory import NormalFormGame, RepeatedGame
class TestAS():
def setUp(self):
self.game_dicts = []
# Example from Abreu and Sannikov (2014)
bimatrix = [[(16, 9), (3, 13), (0,... |
AladdinSonni/youtube-dl | refs/heads/master | youtube_dl/extractor/normalboots.py | 125 | # encoding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
unified_strdate,
)
class NormalbootsIE(InfoExtractor):
_VALID_URL = r'http://(?:www\.)?normalboots\.com/video/(?P<id>[0-9a-z-]*)/?$'
_TEST = {
'url': 'http://normalboots.com/video/ho... |
Lh4cKg/sl4a | refs/heads/master | python/src/Lib/ctypes/test/test_win32.py | 53 | # Windows specific tests
from ctypes import *
from ctypes.test import is_resource_enabled
import unittest, sys
import _ctypes_test
if sys.platform == "win32" and sizeof(c_void_p) == sizeof(c_int):
# Only windows 32-bit has different calling conventions.
class WindowsTestCase(unittest.TestCase):
def ... |
drawks/ansible | refs/heads/devel | lib/ansible/modules/remote_management/imc/imc_rest.py | 26 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Dag Wieers <dag@wieers.com>
# 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',
... |
labcodes/django | refs/heads/master | django/contrib/gis/db/backends/postgis/models.py | 69 | """
The GeometryColumns and SpatialRefSys models for the PostGIS backend.
"""
from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin
from django.db import models
class PostGISGeometryColumns(models.Model):
"""
The 'geometry_columns' view from PostGIS. See the PostGIS
documentation at C... |
synconics/odoo | refs/heads/8.0 | addons/portal_sale/portal_sale.py | 34 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... |
nju520/youtube-dl | refs/heads/master | youtube_dl/extractor/xvideos.py | 87 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse_unquote,
compat_urllib_request,
)
from ..utils import (
clean_html,
ExtractorError,
determine_ext,
)
class XVideosIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.... |
getredash/redash | refs/heads/master | redash/query_runner/databricks.py | 3 | import datetime
import logging
import os
import sqlparse
from redash.query_runner import (
NotSupported,
register,
BaseSQLQueryRunner,
TYPE_STRING,
TYPE_BOOLEAN,
TYPE_DATE,
TYPE_DATETIME,
TYPE_INTEGER,
TYPE_FLOAT,
)
from redash.settings import cast_int_or_default
from redash.utils im... |
lmazuel/azure-sdk-for-python | refs/heads/master | azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/virtual_network_peering.py | 1 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
gmcquillan/django-finial | refs/heads/master | finial/decorators.py | 1 | # (c) 2013 Urban Airship and Contributors
from functools import wraps
def active_override(override_name):
"""Sets request.active_override_name to whatever the override."""
def decorate(fn):
@wraps(fn)
def wrap(request, *args, **kwargs):
request.active_override_name = override_name
... |
xpay01/xpay | refs/heads/master | contrib/wallettools/walletunlock.py | 2299 | from jsonrpc import ServiceProxy
access = ServiceProxy("http://127.0.0.1:8332")
pwd = raw_input("Enter wallet passphrase: ")
access.walletpassphrase(pwd, 60) |
pozetroninc/micropython | refs/heads/stable | tests/import/import_pkg1.py | 40 | import pkg.mod
print(pkg.__name__)
print(pkg.mod.__name__)
print(pkg.mod.foo())
# Import 2nd time, must be same module objects
pkg_ = __import__("pkg.mod")
print(pkg_ is not pkg.mod)
print(pkg_ is pkg)
print(pkg_.mod is pkg.mod)
# import using "as"
import pkg.mod as mm
print(mm is pkg.mod)
print(mm.foo())
|
ahamilton55/ansible | refs/heads/devel | lib/ansible/modules/identity/ipa/ipa_role.py | 29 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
... |
zzzombat/lucid-python-django | refs/heads/master | django/contrib/gis/db/backends/postgis/creation.py | 308 | from django.conf import settings
from django.db.backends.postgresql.creation import DatabaseCreation
class PostGISCreation(DatabaseCreation):
geom_index_type = 'GIST'
geom_index_opts = 'GIST_GEOMETRY_OPS'
def sql_indexes_for_field(self, model, f, style):
"Return any spatial index creation SQL for ... |
fw1121/CheckM | refs/heads/master | scripts/genomeTreeWorkflow.py | 3 | #!/usr/bin/env python
###############################################################################
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License... |
nicaogr/Style-Transfer | refs/heads/master | utils.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri May 16 2017
Utility function
http://warmspringwinds.github.io/tensorflow/tf-slim/2016/11/22/upsampling-and-image-segmentation-with-tensorflow-and-tf-slim/
@author: nicolas
"""
from __future__ import division
import numpy as np
import tensorflow as t... |
digitalocean/netbox | refs/heads/develop | netbox/tenancy/migrations/0008_nested_tenantgroups_rebuild.py | 1 | from django.db import migrations
def rebuild_mptt(apps, schema_editor):
TenantGroup = apps.get_model('tenancy', 'TenantGroup')
for i, tenantgroup in enumerate(TenantGroup.objects.all(), start=1):
TenantGroup.objects.filter(pk=tenantgroup.pk).update(tree_id=i)
class Migration(migrations.Migration):
... |
elkingtonmcb/bcbio-nextgen | refs/heads/master | tests/unit/test_sailfish.py | 5 | from bcbio.rnaseq import sailfish
from bcbio.utils import file_exists
import os
TEST_RESOURCES = {"fq1": "../data/110907_ERP000591/1_110907_ERP000591_1_fastq.txt",
"fq2": "../data/110907_ERP000591/1_110907_ERP000591_2_fastq.txt",
"gtf": "../data/genomes/mm9/rnaseq/ref-transcripts.gt... |
houssine78/vertical-cooperative | refs/heads/9.0 | easy_my_coop_website_taxshelter/__init__.py | 3 | # -*- coding: utf8 -*-
from . import controllers
|
unreal666/youtube-dl | refs/heads/master | youtube_dl/extractor/toongoggles.py | 59 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
int_or_none,
parse_duration,
)
class ToonGogglesIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?toongoggles\.com/shows/(?P<show_id>\d+)(?:/[^/]+/episodes/(?P<episode_id>\d+))?'
... |
scattermagic/django-wizard-builder | refs/heads/master | wizard_builder/migrations/0009_pagebase_to_questionpage.py | 2 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-08-02 21:54
from __future__ import unicode_literals
from django.db import migrations, models
def copy_to_question_page(apps, schema_editor):
current_database = schema_editor.connection.alias
QuestionPage = apps.get_model('wizard_builder.QuestionPag... |
huchoi/edx-platform | refs/heads/master | common/djangoapps/terrain/stubs/tests/test_youtube_stub.py | 51 | """
Unit test for stub YouTube implementation.
"""
import unittest
import requests
from ..youtube import StubYouTubeService
class StubYouTubeServiceTest(unittest.TestCase):
def setUp(self):
self.server = StubYouTubeService()
self.url = "http://127.0.0.1:{0}/".format(self.server.port)
sel... |
bukzor/sympy | refs/heads/master | sympy/physics/quantum/tests/test_constants.py | 130 | from sympy import Float
from sympy.physics.quantum.constants import hbar
def test_hbar():
assert hbar.is_commutative is True
assert hbar.is_real is True
assert hbar.is_positive is True
assert hbar.is_negative is False
assert hbar.is_irrational is True
assert hbar.evalf() == Float(1.05457162e... |
cchurch/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/ec2_transit_gateway_info.py | 33 | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'su... |
AndroidOpenDevelopment/android_external_chromium_org | refs/heads/lp | tools/crx_id/__init__.py | 141 | # Copyright (c) 2011 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.
'''Module crx_id
'''
pass
|
baylee-d/osf.io | refs/heads/develop | osf/utils/notifications.py | 5 | from django.utils import timezone
from website.mails import mails
from website.reviews import signals as reviews_signals
from website.settings import DOMAIN, OSF_SUPPORT_EMAIL, OSF_CONTACT_EMAIL
from osf.utils.workflows import RegistrationModerationTriggers
def get_email_template_context(resource):
is_preprint = r... |
alexandrucoman/vbox-nova-driver | refs/heads/master | nova/db/sqlalchemy/types.py | 80 | # Copyright 2011 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... |
pacoqueen/ginn | refs/heads/master | extra/install/softwin python 2.7/pyserial-2.6/test/test_iolib.py | 6 | #! /usr/bin/env python
#
# Python Serial Port Extension for Win32, Linux, BSD, Jython
# see __init__.py
#
# (C) 2001-2009 Chris Liechti <cliechti@gmx.net>
# this is distributed under a free software license, see license.txt
"""\
Some tests for the serial module.
Part of pyserial (http://pyserial.sf.net) (C)2001-2009 ... |
mfherbst/spack | refs/heads/develop | lib/spack/external/jinja2/__init__.py | 71 | # -*- coding: utf-8 -*-
"""
jinja2
~~~~~~
Jinja2 is a template engine written in pure Python. It provides a
Django inspired non-XML syntax but supports inline expressions and
an optional sandboxed environment.
Nutshell
--------
Here a small example of a Jinja2 template::
{% ... |
yatinkumbhare/openstack-nova | refs/heads/master | nova/tests/unit/test_bdm.py | 70 | # Copyright 2011 Isaku Yamahata
# 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 b... |
Stavitsky/nova | refs/heads/master | nova/weights.py | 70 | # Copyright (c) 2011-2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... |
pedro2d10/SickRage-FR | refs/heads/develop | lib/rtorrent/lib/xmlrpc/basic_auth.py | 95 | #
# Copyright (c) 2013 Dean Gardiner, <gardiner91@gmail.com>
#
# 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... |
recski/4lang | refs/heads/master | exp/bolinas/vocab_rules.py | 2 | import sys
def main():
for line in sys.stdin:
word = line.strip()
print "X -> (. :{0}) | (. :{0});".format(word)
main()
|
ferreiro/Python | refs/heads/master | 7_Starting_MongoDB_NoSQL/skel01.py | 4 | # -*- coding: utf-8 -*-
"""
Autores: Jorge García Ferreiro, Tommaso Innocenti and Luis
Grupo 12
Este código es fruto ÚNICAMENTE del trabajo de sus miembros. Declaramos no haber
colaborado de ninguna manera con otros grupos, haber compartido el ćodigo con
otros ni haberlo obtenido de una fuente externa.
"""
dbName = '... |
EUDAT-B2STAGE/http-api-base | refs/heads/master | old_stuff/rapydo/services/celery/tasks.py | 1 | # -*- coding: utf-8 -*-
"""
Tasks queued for asynchronous operations.
This service is quite anonymous.
I use the Celery class and farm just to make sure
that we tie the celery application to Flask,
and to check the connection at initialization time.
How to add a task:
@celery_app.task
def my_async_task(arg):
l... |
dcamposliz/youtube-dl | refs/heads/master | youtube_dl/extractor/udn.py | 88 | # coding: utf-8
from __future__ import unicode_literals
import json
from .common import InfoExtractor
from ..utils import (
js_to_json,
ExtractorError,
)
from ..compat import compat_urlparse
class UDNEmbedIE(InfoExtractor):
IE_DESC = '聯合影音'
_VALID_URL = r'https?://video\.udn\.com/(?:embed|play)/news/... |
britco/django-oscar-stripe | refs/heads/master | runtests.py | 3 | #!/usr/bin/env python
import sys
from coverage import coverage
from optparse import OptionParser
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
... |
bzhou26/EdmontonChinaSearch | refs/heads/master | requests/auth.py | 76 | # -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import os
import re
import time
import hashlib
from base64 import b64encode
from .compat import urlparse, str
from .cookies import extract_cookies_to_jar
from .utils import parse_dict_header, ... |
gunan/tensorflow | refs/heads/master | tensorflow/python/data/ops/multi_device_iterator_ops.py | 3 | # 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 applica... |
open-synergy/opnsynid-hr | refs/heads/8.0 | hr_employee_blood_type_from_home_address/__init__.py | 82 | # -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models
|
google/loaner | refs/heads/master | loaner/web_app/backend/actions/base_action.py | 1 | # 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 required by applicable law or a... |
Flamacue/pretix | refs/heads/master | src/tests/base/test_models.py | 1 | import datetime
import sys
from datetime import timedelta
from decimal import Decimal
import pytest
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.files.storage import default_storage
from django.core.files.uploadedfile import SimpleUploadedFile
from django.test im... |
minlexx/pyevemon | refs/heads/master | esi_client/models/get_characters_character_id_industry_jobs_200_ok.py | 1 | # coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online
OpenAPI spec version: 0.4.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class GetCharactersCharacterIdIndustryJobs200Ok(object):
"""... |
marc-sensenich/ansible | refs/heads/devel | lib/ansible/modules/cloud/ovirt/ovirt_disk_facts.py | 39 | #!/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
#... |
Deepakkothandan/ansible-modules-extras | refs/heads/devel | system/alternatives.py | 19 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Ansible module to manage symbolic link alternatives.
(c) 2014, Gabe Mulley <gabe.mulley@gmail.com>
(c) 2015, David Wittman <dwittman@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 Gene... |
vkscool/nupic | refs/heads/master | nupic/data/stats_v2.py | 9 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... |
xcbat/vnpy | refs/heads/master | archive/vn.lts_old/pyscript/generate_data_type.py | 70 | # encoding: UTF-8
__author__ = 'CHENXY'
# C++和python类型的映射字典
type_dict = {
'int': 'int',
'char': 'string',
'double': 'float',
'short': 'int'
}
def process_line(line):
"""处理每行"""
if '///' in line: # 注释
py_line = process_comment(line)
elif 'typedef' in line: # 类型申明
... |
CourseTalk/edx-platform | refs/heads/master | lms/djangoapps/courseware/access_utils.py | 8 | """
Simple utility functions for computing access.
It allows us to share code between access.py and block transformers.
"""
from datetime import datetime, timedelta
from django.conf import settings
from django.utils.timezone import UTC
from logging import getLogger
from student.roles import CourseBetaTesterRole
from c... |
vikatory/kbengine | refs/heads/master | kbe/src/lib/python/Lib/idlelib/PathBrowser.py | 73 | import os
import sys
import importlib.machinery
from idlelib.TreeWidget import TreeItem
from idlelib.ClassBrowser import ClassBrowser, ModuleBrowserTreeItem
from idlelib.PyShell import PyShellFileList
class PathBrowser(ClassBrowser):
def __init__(self, flist, _htest=False):
"""
_htest - bool, ch... |
wujuguang/sentry | refs/heads/master | tests/sentry/api/endpoints/test_project_keys.py | 27 | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.models import ProjectKey
from sentry.testutils import APITestCase
class ListProjectKeysTest(APITestCase):
def test_simple(self):
project = self.create_project()
key = ProjectKey.objects.get_or_create(... |
jcchoiling/learningPython | refs/heads/master | s13/Day05/conf/setting.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Janice Cheng
import os
import sys
APP_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(APP_DIR)
USER_INFO = os.path.join(APP_DIR, "db", "user_info.json")
SHOPPING_CART_HISTORY = os.path.join(APP_DIR, "db", "shopping_cart.json")
... |
cisco-openstack/tempest | refs/heads/proposed | tempest/lib/api_schema/response/compute/v2_41/aggregates.py | 3 | # Copyright 2018 ZTE Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... |
sloanyang/aquantic | refs/heads/master | Tools/Scripts/webkitpy/common/net/bugzilla/bug_unittest.py | 124 | # 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 f... |
wheeler-microfluidics/dmf_control_board_plugin | refs/heads/master | __init__.py | 1 | """
Copyright 2011-2017 Ryan Fobel and Christian Fobel
This file is part of dmf_control_board.
dmf_control_board 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 optio... |
scorpionis/docklet | refs/heads/master | client/venv/lib/python3.5/site-packages/pip/_vendor/cachecontrol/cache.py | 947 | """
The cache object API for implementing caches. The default is a thread
safe in-memory dictionary.
"""
from threading import Lock
class BaseCache(object):
def get(self, key):
raise NotImplemented()
def set(self, key, value):
raise NotImplemented()
def delete(self, key):
raise ... |
MalloyPower/parsing-python | refs/heads/master | front-end/testsuite-python-lib/Python-2.5/Lib/idlelib/FormatParagraph.py | 10 | # Extension to format a paragraph
# Does basic, standard text formatting, and also understands Python
# comment blocks. Thus, for editing Python source code, this
# extension is really only suitable for reformatting these comment
# blocks or triple-quoted strings.
# Known problems with comment reformatting:
# * If t... |
kmoocdev2/edx-platform | refs/heads/real_2019 | openedx/core/djangoapps/user_api/preferences/tests/test_api.py | 9 | # -*- coding: utf-8 -*-
"""
Unit tests for preference APIs.
"""
import datetime
import ddt
from mock import patch
from nose.plugins.attrib import attr
from pytz import common_timezones, utc
from django.contrib.auth.models import User
from django.test.utils import override_settings
from dateutil.parser import parse as ... |
kchodorow/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/array_ops_test.py | 16 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
rpvnwnkl/DailyWriter | refs/heads/master | Mechanize/tester.py | 1 | import sys
import mechanize
if len(sys.argv) == 1:
uri = "https://750words.com/auth"
else:
uri = sys.argv[1]
request = mechanize.Request(mechanize.urljoin(uri, ''))
response = mechanize.urlopen(request)
forms = mechanize.ParseResponse(response, backwards_compat=False)
response.close()
... |
waynechu/PythonProject | refs/heads/master | dns/renderer.py | 2 | # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
# Copyright (C) 2001-2017 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 permis... |
chris-belcher/joinmarket-clientserver | refs/heads/master | jmclient/jmclient/slowaes.py | 1 | #!/usr/bin/python
#
# aes.py: implements AES - Advanced Encryption Standard
# from the SlowAES project, http://code.google.com/p/slowaes/
#
# Copyright (c) 2008 Josh Davis ( http://www.josh-davis.org ),
# Alex Martelli ( http://www.aleax.it )
#
# Ported from C code written by Laurent Haan ( http://www.prog... |
Mirantis/mos-horizon | refs/heads/master | horizon/templatetags/shellfilter.py | 17 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... |
rishig/zulip | refs/heads/master | zerver/management/commands/archive_messages.py | 2 | from __future__ import absolute_import
from typing import Any
from django.core.management.base import BaseCommand
from zerver.lib.retention import archive_messages, clean_archived_data
class Command(BaseCommand):
def handle(self, *args: Any, **options: str) -> None:
clean_archived_data()
archiv... |
listamilton/supermilton.repository | refs/heads/supermilton.repository | plugin.audio.soundcloud/resources/lib/__init__.py | 107 | __author__ = 'bromix'
|
sadaf2605/django | refs/heads/master | tests/template_tests/templatetags/bad_tag.py | 513 | from django import template
register = template.Library()
@register.tag
def badtag(parser, token):
raise RuntimeError("I am a bad tag")
@register.simple_tag
def badsimpletag():
raise RuntimeError("I am a bad simpletag")
|
PythonScientists/Shape | refs/heads/master | env/lib/python3.5/site-packages/sqlalchemy/testing/warnings.py | 33 | # testing/warnings.py
# Copyright (C) 2005-2017 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from __future__ import absolute_import
import warnings
from .. import exc as sa... |
LittleLama/Sick-Beard-BoxCar2 | refs/heads/development | sickbeard/processTV.py | 34 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 Lice... |
YAtOff/python0-reloaded | refs/heads/master | week6/homework/triangle1.py | 1 | """
Напишете програма, която отпечатва следната фигура на екран.
#
##
###
####
#####
Използвайте вложени цикли.
"""
|
mdibaiee/servo | refs/heads/master | tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/_stream_base.py | 652 | # Copyright 2011, 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 f... |
dhamaniasad/mythbox | refs/heads/master | resources/lib/twisted/twisted/test/process_twisted.py | 96 | """A process that reads from stdin and out using Twisted."""
### Twisted Preamble
# This makes sure that users don't have to set up their environment
# specially in order to run these programs from bin/.
import sys, os, string
pos = string.find(os.path.abspath(sys.argv[0]), os.sep+'Twisted')
if pos != -1:
sys.path... |
zuloloxi/swapforth | refs/heads/master | shell/dpansf.py | 6 | words = {
"CORE" : {
"!" : "6.1.0010",
"#" : "6.1.0030",
"'" : "6.1.0070",
"(" : "6.1.0080",
"*" : "6.1.0090",
"+" : "6.1.0120",
"," : "6.1.0150",
"-" : "6.1.0160",
"." : "6.1.0180"... |
htcbug/django-avatar | refs/heads/master | avatar/views.py | 7 | from django.core.files.base import ContentFile
from django.http import HttpResponseRedirect, HttpResponse, Http404
from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from django.utils.translation import ugettext as _
from django.views.decorators.csrf import csr... |
Thraxis/SickRage | refs/heads/master | lib/pyasn1/codec/__init__.py | 3653 | # This file is necessary to make this directory a package.
|
bhavin04890/finaldashboard | refs/heads/master | modules/eden/flood.py | 8 | # -*- coding: utf-8 -*-
""" Sahana Eden Flood Model
@copyright: 2011-12 (c) Sahana Software Foundation
@license: MIT
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
... |
mollstam/UnrealPy | refs/heads/master | UnrealPyEmbed/Source/Python/Lib/python27/test/leakers/test_ctypes.py | 173 |
# Taken from Lib/ctypes/test/test_keeprefs.py, PointerToStructure.test().
from ctypes import Structure, c_int, POINTER
import gc
def leak_inner():
class POINT(Structure):
_fields_ = [("x", c_int)]
class RECT(Structure):
_fields_ = [("a", POINTER(POINT))]
def leak():
leak_inner()
gc.c... |
Semi-global/edx-platform | refs/heads/master | lms/djangoapps/courseware/tests/helpers.py | 71 | import json
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.client import RequestFactory
from courseware.access import has_access, COURSE_OVERVIEW_SUPPORTED_ACTIONS
from openedx.core.djangoapps.content.course_overviews.models i... |
opencityplatform/os-federation-addons | refs/heads/master | src/openstack_auth_fedext/views.py | 1 | # Copyright (c) 2014 INFN - "Istituto Nazionale di Fisica Nucleare" - Italy
# 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/LIC... |
zdary/intellij-community | refs/heads/master | python/testData/refactoring/extractmethod/Py479.after.py | 79 | class Foo:
def __init__(self):
self.tmp = False
def extract_method(self, condition1, condition2, condition3, condition4):
list = (1, 2, 3)
a = 6
b = False
if a in list or self.tmp:
if condition1:
print(condi... |
PetrDlouhy/django-crispy-forms | refs/heads/dev | crispy_forms/templatetags/crispy_forms_utils.py | 10 | # -*- coding: utf-8 -*-
import re
from django import template
from django.conf import settings
try: # Django < 1.4
from django.utils.encoding import force_unicode as force_text
except ImportError:
from django.utils.encoding import force_text
from django.utils.functional import allow_lazy
from crispy_forms.co... |
tfalencar/cbmobile_auth | refs/heads/master | server/flask/config.py | 1 | # Define the application directory
import os
import datetime
# by setting an environment variable in your host its possible to
# automatically differentiate the environments and load configuration accordingly.
# See app/__init__.py
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
class DefaultConfig(object):
... |
CORDEA/niconico-visualization | refs/heads/master | act1/mds_plot.py | 1 | #!/usr/bin/env python
# encoding:utf-8
#
__Author__ = "Yoshihiro Tanaka"
__date__ = "2014-11-22"
import csv, sys
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import NullFormatter
from matplotlib.font_manager import FontProperties
from sklearn import manifold
from sklearn.metrics imp... |
databricks/sbt-spark-package | refs/heads/master | src/sbt-test/sbt-spark-packages/shading/python/simple/__init__.py | 5 | # init script
print "init"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.