repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
paplorinc/intellij-community | refs/heads/master | python/testData/inspections/PyPackageRequirementsInspection/ImportsNotInRequirementsTxt/test1.py | 18 | import pip
import <weak_warning descr="Package containing module 'opster' is not listed in project requirements">opster</weak_warning>
from <weak_warning descr="Package containing module 'clevercss' is not listed in project requirements">clevercss</weak_warning> import convert
import <weak_warning descr="Package contai... |
joaduo/mepinta | refs/heads/master | plugins/c_and_cpp/k3dv1/plugins_tests/c_and_cpp/processors/k3dv1/__init__.py | 12133432 | |
trondhindenes/ansible-modules-extras | refs/heads/devel | __init__.py | 12133432 | |
mbareta/edx-platform-ft | refs/heads/open-release/eucalyptus.master | openedx/core/djangoapps/__init__.py | 12133432 | |
astaff/ansible | refs/heads/devel | lib/ansible/utils/module_docs_fragments/__init__.py | 12133432 | |
HeraldStudio/webservice-py | refs/heads/master | mod/library/__init__.py | 12133432 | |
UltrosBot/Ultros | refs/heads/master | system/commands/__init__.py | 13 | # coding=utf-8
__author__ = 'Gareth Coles'
|
beatrizjesus/my-first-blog | refs/heads/master | pasta/Lib/site-packages/pip/operations/freeze.py | 84 | from __future__ import absolute_import
import logging
import re
import pip
from pip.compat import stdlib_pkgs
from pip.req import InstallRequirement
from pip.utils import get_installed_distributions
from pip._vendor import pkg_resources
logger = logging.getLogger(__name__)
# packages to exclude from freeze output
... |
selkhateeb/tic | refs/heads/master | src/tic/db/__init__.py | 1 | # To change this template, choose Tools | Templates
# and open the template in the editor.
__author__="selkhateeb"
__date__ ="$Jul 17, 2010 6:50:52 PM$"
if __name__ == "__main__":
print "Hello World"
|
akhmadMizkat/odoo | refs/heads/master | addons/website_crm_partner_assign/controllers/__init__.py | 7372 | import main
|
gsnbng/erpnext | refs/heads/develop | erpnext/patches/v4_2/toggle_rounded_total.py | 120 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
global_defaults = frappe.get_doc("Global Defaults", "Global Defaults")
global_defaults.toggle_rounded_total()
|
pjuu/pjuu | refs/heads/master | pjuu/auth/backend.py | 1 | # -*- coding: utf8 -*-
"""Simple auth functions with access to the databases for use in the views.
:license: AGPL v3, see LICENSE for more details
:copyright: 2014-2021 Joe Doherty
"""
# Stdlib imports
from datetime import datetime
import re
# 3rd party imports
from flask import session
from pymongo.errors import D... |
piranna/pyfilesystem | refs/heads/master | fs/tests/test_importhook.py | 12 |
import sys
import unittest
import marshal
import imp
import struct
from textwrap import dedent
from fs.expose.importhook import FSImportHook
from fs.tempfs import TempFS
from fs.zipfs import ZipFS
from six import b
class TestFSImportHook(unittest.TestCase):
def setUp(self):
pass
def tearDown(self... |
antoinecarme/pyaf | refs/heads/master | tests/model_control/detailed/transf_Quantization/model_control_one_enabled_Quantization_Lag1Trend_BestCycle_ARX.py | 1 | import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Quantization'] , ['Lag1Trend'] , ['BestCycle'] , ['ARX'] ); |
UT-CHG/PolyADCIRC | refs/heads/master | examples/run_framework/poly_walls/concatenate_many.py | 1 | #! /usr/bin/env python
# import necessary modules
import polyadcirc.run_framework.random_wall as rmw
base_dir = '/h1/lgraham/workspace'
grid_dir = base_dir + '/ADCIRC_landuse/Inlet/inputs/poly_walls'
save_dir = base_dir + '/ADCIRC_landuse/Inlet/runs/poly_wall'
basis_dir = base_dir +'/ADCIRC_landuse/Inlet/landuse_basis... |
johnboyington/homework | refs/heads/master | ne737/final_project/extract.py | 1 | # ne737 final project
import matplotlib.pyplot as plt
import numpy as np
def Extract(name):
F = open('data/data0/{}.Spe'.format(name), 'r').readlines()
for ii in range(len(F)):
if '0 1023' in F[ii]:
line = np.array(F[ii + 1:ii + 1025])
data = np.loadtxt(line)
retur... |
klunwebale/odoo | refs/heads/8.0 | openerp/netsvc.py | 220 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2014 OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of... |
iWuzHere/node-gyp | refs/heads/master | gyp/pylib/gyp/generator/gypd.py | 1824 | # Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""gypd output module
This module produces gyp input as its output. Output files are given the
.gypd extension to avoid overwriting the .gyp files that they are ... |
hammerhead-dev/android_kernel_lge_hammerhead | refs/heads/cm-13.0 | scripts/rt-tester/rt-tester.py | 11005 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... |
GreenJoey/My-Simple-Programs | refs/heads/master | python/scrapy/OfficialSpider/tutorial/tutorial/spiders/__init__.py | 2415 | # This package will contain the spiders of your Scrapy project
#
# Please refer to the documentation for information on how to create and manage
# your spiders.
|
drtuxwang/system-config | refs/heads/mac-fix | bin/extfbfl.py | 1 | #!/usr/bin/env python3
"""
Extract Facebook friends list from saved HTML file.
"""
import argparse
import glob
import os
import re
import signal
import sys
import time
from typing import List
class Options:
"""
Options class
"""
def __init__(self) -> None:
self._args: argparse.Namespace = No... |
pyjs/pyjs | refs/heads/master | examples/misc/flaskexamples/flaskcors/Flask_JSONRPC_CORS.py | 6 | import pyjd # dummy in pyjs
from pyjamas.ui.RootPanel import RootPanel
from pyjamas.ui.TextArea import TextArea
from pyjamas.ui.Label import Label
from pyjamas.ui.Button import Button
from pyjamas.ui.HTML import HTML
from pyjamas.ui.VerticalPanel import VerticalPanel
from pyjamas.ui.HorizontalPanel import HorizontalPa... |
gangadharkadam/smrterp | refs/heads/develop | erpnext/hr/report/monthly_salary_register/__init__.py | 12133432 | |
otron/zenodo | refs/heads/master | zenodo/modules/quotas/upgrades/__init__.py | 12133432 | |
TiagoBras/audio-clip-extractor | refs/heads/master | tests/__init__.py | 12133432 | |
kayako/python-api-library | refs/heads/master | src/kayako/tests/core/__init__.py | 12133432 | |
gangadhar-kadam/verve_erp | refs/heads/v5.0 | erpnext/hr/report/monthly_salary_register/__init__.py | 12133432 | |
sunnyzwh/readthedocs.org | refs/heads/master | readthedocs/builds/models.py | 15 | import logging
import re
import os.path
from shutil import rmtree
from django.core.urlresolvers import reverse
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _, ugettext
from guardian.shortcuts import assign
from taggit.managers import TaggableManag... |
mjirayu/sit_academy | refs/heads/master | common/lib/xmodule/xmodule/modulestore/tests/test_xml.py | 119 | """
Tests around our XML modulestore, including importing
well-formed and not-well-formed XML.
"""
import os.path
import unittest
from glob import glob
from mock import patch, Mock
from xmodule.modulestore.xml import XMLModuleStore
from xmodule.modulestore import ModuleStoreEnum
from xmodule.x_module import XModuleMix... |
DiginessForever/machineLearning | refs/heads/master | chromedriver.py | 1 | import os, urllib, time, sys, requests
from PIL import Image
from selenium import webdriver
chromedriverpath = "/home/diginess/code/machineLearning/chromedriver"
browser = webdriver.Chrome(chromedriverpath)
#searchterm = "cat"
searchterm = sys.argv[1]
#Current search URL is unwieldy, check out this link for some ide... |
CuonDeveloper/cuon | refs/heads/master | cuon_client/cuon/bin/cuon/Addresses/SingleScheduling.py | 5 | # -*- coding: utf-8 -*-
##Copyright (C) [2003] [Jürgen Hamel, D-32584 Löhne]
##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 later versi... |
ar7z1/ansible | refs/heads/devel | test/units/modules/remote_management/oneview/test_oneview_fc_network_facts.py | 47 | # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from units.compat import unittest
from oneview_module_loader import FcNetworkFactsModule
from hpe_test_utils import FactsParamsTestCase
ERROR_MSG = 'Fake mes... |
ShassAro/ShassAro | refs/heads/master | DockerAdmin/dockerVirtualEnv/lib/python2.7/site-packages/django/contrib/staticfiles/apps.py | 101 | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class StaticFilesConfig(AppConfig):
name = 'django.contrib.staticfiles'
verbose_name = _("Static Files")
|
ya7lelkom/googleads-python-lib | refs/heads/master | examples/dfp/v201502/creative_set_service/get_creative_sets_by_statement.py | 3 | #!/usr/bin/python
#
# 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 b... |
jerli/sympy | refs/heads/master | examples/advanced/hydrogen.py | 119 | #!/usr/bin/env python
"""
This example shows how to work with the Hydrogen radial wavefunctions.
"""
from sympy import Eq, Integral, oo, pprint, symbols
from sympy.physics.hydrogen import R_nl
def main():
print("Hydrogen radial wavefunctions:")
a, r = symbols("a r")
print("R_{21}:")
pprint(R_nl(2, 1... |
neilLasrado/erpnext | refs/heads/develop | erpnext/education/doctype/course_topic/course_topic.py | 8 | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class CourseTopic(Document):
pass
|
rec/BiblioPixel | refs/heads/dev | bibliopixel/animation/game.py | 2 | from . matrix import Matrix
class Game(Matrix):
def __init__(self, layout, inputDev):
super().__init__(layout)
self._input_dev = inputDev
self._keys = None
self._lastKeys = None
self._speedStep = 0
self._speeds = {}
self._keyfuncs = {}
def _exit(self, ... |
umitproject/openmonitor-aggregator | refs/heads/master | django/db/__init__.py | 60 | from django.conf import settings
from django.core import signals
from django.core.exceptions import ImproperlyConfigured
from django.db.utils import (ConnectionHandler, ConnectionRouter,
load_backend, DEFAULT_DB_ALIAS, DatabaseError, IntegrityError)
__all__ = ('backend', 'connection', 'connections', 'router', 'Dat... |
stochastic-technologies/impactstory-buildpack | refs/heads/master | vendor/distribute-0.6.36/setuptools/__init__.py | 132 | """Extensions to the 'distutils' for large or complex distributions"""
from setuptools.extension import Extension, Library
from setuptools.dist import Distribution, Feature, _get_unpatched
import distutils.core, setuptools.command
from setuptools.depends import Require
from distutils.core import Command as _Command
fro... |
kelseyoo14/Wander | refs/heads/master | venv_2_7/lib/python2.7/site-packages/numpy/linalg/info.py | 264 | """\
Core Linear Algebra Tools
-------------------------
Linear algebra basics:
- norm Vector or matrix norm
- inv Inverse of a square matrix
- solve Solve a linear system of equations
- det Determinant of a square matrix
- lstsq Solve linear least-squares problem... |
lowitty/sendtrap | refs/heads/master | lib/pysnmp/proto/acmod/void.py | 6 | # Void Access Control Model
from pysnmp.proto import errind, error
from pysnmp import debug
# rfc3415 3.2
class Vacm:
accessModelID = 0
def isAccessAllowed(self,
snmpEngine,
securityModel,
securityName,
securityLeve... |
eayunstack/horizon | refs/heads/master | openstack_dashboard/dashboards/admin/metering/tables.py | 37 | # 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
# d... |
blancltd/django-latest-tweets | refs/heads/master | setup.py | 1 | #!/usr/bin/env python
from codecs import open
from setuptools import find_packages, setup
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
setup(
name='django-latest-tweets',
version='0.4.6',
description='Latest Tweets for Django',
long_description=readme,
url='https://github.c... |
Tabea-K/csvkit | refs/heads/master | csvkit/grep.py | 21 | #!/usr/bin/env python
import six
from csvkit.exceptions import ColumnIdentifierError
class FilteringCSVReader(six.Iterator):
"""
Given any row iterator, only return rows which pass the filter.
If 'header' is False, then all rows must pass the filter; by default, the first row will be passed
through u... |
EdLogan18/logan-repository | refs/heads/master | plugin.video.MediaPlay-TV/tv5.py | 67 |
import base64
import zlib, urllib,urllib2,re
key=base64.b64decode("ZXQgb3VhaSBtZWMh")
def getUrl(url, cookieJar=None,post=None, timeout=20, headers=None):
cookie_handler = urllib2.HTTPCookieProcessor(cookieJar)
opener = urllib2.build_opener(cookie_handler, urllib2.HTTPBasicAuthHandler(), urllib2.HTTPHandler()... |
ifduyue/django | refs/heads/master | django/conf/locale/zh_Hant/__init__.py | 12133432 | |
d8c/Mobile-Security-Framework-MobSF | refs/heads/master | MobSF/__init__.py | 12133432 | |
denisenkom/django-sqlserver | refs/heads/master | broken-tests/expressions_case/__init__.py | 12133432 | |
pzajda/eloquence | refs/heads/master | scons-local-2.5.0/SCons/Tool/dvipdf.py | 3 | """SCons.Tool.dvipdf
Tool-specific initialization for dvipdf.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# Permission is hereby granted, free of char... |
dkieffer/timeblob | refs/heads/master | timeblobsite/settings/base.py | 1 | """
Django settings for timeblobsite project.
Generated by 'django-admin startproject' using Django 1.9.7.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import ... |
Kagami/kisa | refs/heads/master | lib/twisted/persisted/journal/rowjournal.py | 19 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
"""Journal using twisted.enterprise.row RDBMS support.
You're going to need the following table in your database::
| CREATE TABLE journalinfo
| (
| commandIndex int
| );
| INSERT INTO journalinfo VALUES (0);
"""
from ... |
qiwihui/rss.daozhang.info | refs/heads/master | diy/handlers/zhihu.py | 1 | #_*_ coding:utf-8 _*_
import tornado.web
import tornado.gen
import tornado.httpclient
import json
ZHIHU_URL = 'http://news.at.zhihu.com/api/1.2/news/latest'
headers = {
'User-Agent':"ZhihuNotMoe/2333",
}
class ZhihuHandler(tornado.web.RequestHandler):
@tornado.web.asynchronous
@tornado.gen.coroutine
... |
w1ll1am23/home-assistant | refs/heads/dev | homeassistant/components/mqtt/vacuum/__init__.py | 7 | """Support for MQTT vacuums."""
import functools
import voluptuous as vol
from homeassistant.components.vacuum import DOMAIN
from homeassistant.helpers.reload import async_setup_reload_service
from .. import DOMAIN as MQTT_DOMAIN, PLATFORMS
from ..mixins import async_setup_entry_helper
from .schema import CONF_SCHEM... |
lbt/boss-launcher-webhook | refs/heads/master | src/participants/auto_promote.py | 1 | # Copyright (C) 2013 Jolla Ltd.
# Contact: Islam Amer <islam.amer@jollamobile.com>
# All rights reserved.
#
# 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... |
toshywoshy/ansible | refs/heads/devel | lib/ansible/modules/windows/win_say.py | 21 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# this is a windows documentation stub. actual code lives in the .ps1
# file of the same name
ANSIBLE... |
abutcher/openshift-ansible | refs/heads/master | roles/lib_utils/src/test/unit/test_repoquery.py | 63 | '''
Unit tests for repoquery
'''
import os
import sys
import unittest
import mock
# Removing invalid variable names for tests so that I can
# keep them brief
# pylint: disable=invalid-name,no-name-in-module
# Disable import-error b/c our libraries aren't loaded in jenkins
# pylint: disable=import-error,wrong-import-... |
CeltonMcGrath/TACTIC | refs/heads/master | src/tactic/protocol/rest_test.py | 6 | #!/usr/bin/python
###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way wi... |
vishnubob/snowflake | refs/heads/master | src/movie.py | 1 | class RenderMovie(object):
def __init__(self, name):
self.name = name
self.replay = LatticeReplay(name)
def run(self):
if not os.path.exists("frames"):
os.mkdir("frames")
x = iter(self.replay)
for (idx, frame) in enumerate(self.replay):
fn = "fram... |
arasuarun/shogun | refs/heads/develop | examples/undocumented/python_modular/transfer_multitask_clustered_logistic_regression.py | 17 | #!/usr/bin/env python
from numpy import array,hstack,sin,cos
from numpy.random import seed, rand
from tools.load import LoadMatrix
lm=LoadMatrix()
traindat = lm.load_numbers('../data/fm_train_real.dat')
testdat = lm.load_numbers('../data/fm_test_real.dat')
label_traindat = lm.load_labels('../data/label_train_twoclass.... |
0sw4l/villas-de-san-pablo | refs/heads/master | apps/habilidades_blandas/views.py | 1 | from django.core.urlresolvers import reverse_lazy
from django.shortcuts import render
from . import models
from . import forms
from apps.utils import views
class CapacitacionBaseView(object):
model = models.Capacitacion
form_class = forms.CapacitacionForm
success_url = reverse_lazy('habilidades_blandas:lis... |
arju88nair/projectCulminate | refs/heads/master | venv/lib/python3.5/site-packages/pkg_resources/__init__.py | 59 | """
Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is. Do not use os.path operations to manipul... |
naresh21/synergetics-edx-platform | refs/heads/oxa/master.fic | lms/djangoapps/instructor_task/models.py | 2 | """
WE'RE USING MIGRATIONS!
If you make changes to this model, be sure to create an appropriate migration
file and check it in at the same time as your model changes. To do that,
1. Go to the edx-platform dir
2. ./manage.py schemamigration instructor_task --auto description_of_your_change
3. Add the migration file cr... |
isghe/cjdns | refs/heads/master | node_build/dependencies/libuv/build/gyp/test/mac/gyptest-objc-arc.py | 249 | #!/usr/bin/env python
# Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that ARC objc settings are handled correctly.
"""
import TestGyp
import sys
if sys.platform == 'darwin':
# set |match| to ... |
ingokegel/intellij-community | refs/heads/master | python/testData/types/ConditionImportOuterScope/m2.py | 39 | foo = 0
""":type: int"""
|
zdary/intellij-community | refs/heads/master | python/testData/inspections/PyPep8NamingInspection/tmp1.py | 83 | class X:
pass |
fscherf/django-cms-extensions | refs/heads/master | cms_extensions/__init__.py | 12133432 | |
ZENGXH/scikit-learn | refs/heads/master | sklearn/tree/tests/__init__.py | 12133432 | |
claudep/pootle | refs/heads/master | tests/pootle_language/__init__.py | 12133432 | |
paulocheque/python-django-bootstrap | refs/heads/master | toolbox/management/__init__.py | 12133432 | |
tgenin/botstral | refs/heads/master | save_manager.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Botstral - a bot
# Copyright (C) 2014 Thomas Génin
#
# This file is part of Botstral.
#
# Botstral 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... |
caotianwei/django | refs/heads/master | tests/admin_scripts/management/commands/__init__.py | 12133432 | |
xwolf12/django | refs/heads/master | tests/i18n/other/locale/de/formats.py | 12133432 | |
RPi-Distro/python-gpiozero | refs/heads/master | gpiozero/devices.py | 1 | # GPIO Zero: a library for controlling the Raspberry Pi's GPIO pins
# Copyright (c) 2015-2019 Dave Jones <dave@waveform.org.uk>
# Copyright (c) 2015-2019 Ben Nuttall <ben@bennuttall.com>
# Copyright (c) 2016 Andrew Scheller <github@loowis.durge.org>
#
# Redistribution and use in source and binary forms, with or without... |
perrys/WSRC | refs/heads/master | modules/wsrc/site/competitions/migrations/0003_auto_20180626_0934.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-06-26 08:34
from __future__ import unicode_literals
from django.db import migrations
def migrate_comp_type(apps, schema_editor):
from wsrc.site.competitions.models import CompetitionType, CompetitionGroup
old_groups = [ CompetitionType(id="squash_boxe... |
ytjiang/django | refs/heads/master | django/contrib/gis/utils/ogrinfo.py | 564 | """
This module includes some utility functions for inspecting the layout
of a GDAL data source -- the functionality is analogous to the output
produced by the `ogrinfo` utility.
"""
from django.contrib.gis.gdal import DataSource
from django.contrib.gis.gdal.geometries import GEO_CLASSES
def ogrinfo(data_source, num... |
oxyrox/PokemonGo-Map | refs/heads/master | pogom/utils.py | 18 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import getpass
import argparse
import re
import uuid
import os
import json
from datetime import datetime, timedelta
import ConfigParser
from . import config
from exceptions import APIKeyException
def parse_unicode(bytestring):
decoded_string = bytestring.deco... |
raimohanska/Arduino | refs/heads/esp8266 | arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/util.py | 189 | # urllib3/util.py
# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from base64 import b64encode
from collections import namedtuple
from socket import error as Socke... |
wiltonlazary/arangodb | refs/heads/devel | 3rdParty/V8/V8-5.0.71.39/build/gyp/test/mac/gyptest-copy-dylib.py | 349 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that dylibs can be copied into app bundles.
"""
import TestGyp
import sys
if sys.platform == 'darwin':
test = TestGyp.Test... |
metadave/mongrel2 | refs/heads/master | examples/python/tests/mongrel2_org.py | 98 | from mongrel2.config import *
main = Server(
uuid="2f62bd5-9e59-49cd-993c-3b6013c28f05",
access_log="/logs/access.log",
error_log="/logs/error.log",
chroot="./",
pid_file="/run/mongrel2.pid",
default_host="mongrel2.org",
name="main",
port=6767
)
test_directory = Dir(base='tests/',
... |
kittolau/selepy | refs/heads/master | web_helper/name_generator/korean_name_generator.py | 1 | from web_helper.name_generator.abstract_name_generator import AbstractNameGenerator
class KoreanNameGenerator(AbstractNameGenerator):
#name pool from http://fantasynamegenerators.com/chinese_names.php
namesMale = ["Bae","Byeong Cheol","Byeong Ho","Byung Chul","Byung Ho","Byung Hoon","Chang Min","Chang Woo","C... |
blacktear23/django | refs/heads/master | django/contrib/admin/actions.py | 160 | """
Built-in, globally-available admin actions.
"""
from django import template
from django.core.exceptions import PermissionDenied
from django.contrib.admin import helpers
from django.contrib.admin.util import get_deleted_objects, model_ngettext
from django.db import router
from django.shortcuts import render_to_resp... |
adammaikai/OmicsPipe2.0 | refs/heads/master | build/lib.linux-x86_64-2.7/omics_pipe/Tumorseq_MUTECT.py | 2 | #!/usr/bin/env python
#from sumatra.projects import load_project
#from sumatra.parameters import build_parameters
#from sumatra.decorators import capture
from ruffus import *
import sys
import os
import time
import datetime
import drmaa
from omics_pipe.utils import *
from omics_pipe.parameters.default_pa... |
jjmleiro/hue | refs/heads/master | desktop/core/ext-py/Mako-0.8.1/mako/__init__.py | 38 | # mako/__init__.py
# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
__version__ = '0.8.1'
|
sgraham/nope | refs/heads/master | third_party/webdriver/pylib/test/selenium/webdriver/support/event_firing_webdriver_tests.py | 19 | #!/usr/bin/python
# Copyright 2011 Software Freedom Conservancy.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
mpasternak/michaldtz-fixes-518-522 | refs/heads/master | pyglet/input/darwin_hid.py | 4 | # Uses the HID API introduced in Mac OS X version 10.5
# http://developer.apple.com/library/mac/#technotes/tn2007/tn2187.html
from ctypes import *
from ctypes import util
# Load frameworks
iokit = cdll.LoadLibrary(util.find_library('IOKit'))
cf = cdll.LoadLibrary(util.find_library('CoreFoundation'))
# Core Foundatio... |
myselfHimanshu/Udacity-DataML | refs/heads/master | Intro-To-Data-Science/Lesson2/PS2_9.py | 2 | import pandas
def get_hourly_exits(df):
'''
The data in the MTA Subway Turnstile data reports on the cumulative
number of entries and exits per row. Assume that you have a dataframe
called df that contains only the rows for a particular turnstile machine
(i.e., unique SCP, C/A, and UNIT). This fu... |
roberzguerra/scout | refs/heads/master | core/views.py | 1 | # -*- coding:utf-8 -*-
from django.shortcuts import render, render_to_response
from django.template import RequestContext
def error404(request):
"""
View de Erro 404
"""
return render_to_response('core/error404.html', RequestContext(request, {}))
def error500(request):
"""
View de Erro 500
... |
mbauskar/erpnext | refs/heads/develop | erpnext/healthcare/doctype/normal_test_template/normal_test_template.py | 30 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, ESS and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
class NormalTestTemplate(Document):
pass
|
blackzw/openwrt_sdk_dev1 | refs/heads/master | staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib/python2.7/lib2to3/fixes/fix_methodattrs.py | 326 | """Fix bound method attributes (method.im_? -> method.__?__).
"""
# Author: Christian Heimes
# Local imports
from .. import fixer_base
from ..fixer_util import Name
MAP = {
"im_func" : "__func__",
"im_self" : "__self__",
"im_class" : "__self__.__class__"
}
class FixMethodattrs(fixer_base.BaseFix):
... |
MSeifert04/astropy | refs/heads/master | setup.py | 3 | #!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# NOTE: The configuration for the package, including the name, version, and
# other information are set in the setup.cfg file. Here we mainly set up
# setup_requires and install_requires since these are determined
# programmatically.... |
MasterScrat/PostMonitor | refs/heads/master | server.py | 1 | #!/usr/bin/python
import json
import itertools
import datetime
from flask import Flask, request, redirect, url_for
from tinydb import TinyDB, where
db = TinyDB('data/records.json')
app = Flask(__name__, static_url_path='')
@app.route('/')
def root():
return app.send_static_file('www/index.html')
@app.route('/all'... |
uranusjr/django | refs/heads/master | tests/backends/oracle/__init__.py | 12133432 | |
acshi/osf.io | refs/heads/develop | api/collections/__init__.py | 12133432 | |
unho/pootle | refs/heads/master | pootle/apps/pootle_data/receivers.py | 6 | # -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
import logging
from django.db.models.signal... |
naresh21/synergetics-edx-platform | refs/heads/oxa/master.fic | openedx/core/djangoapps/credentials/tests/test_utils.py | 14 | """Tests covering Credentials utilities."""
import unittest
from django.conf import settings
from django.core.cache import cache
from nose.plugins.attrib import attr
import httpretty
from edx_oauth2_provider.tests.factories import ClientFactory
from provider.constants import CONFIDENTIAL
from openedx.core.djangoapps.... |
ace-han/quanquan | refs/heads/develop | quanquan/urls/__init__.py | 1 | from django.conf import settings
from django.conf.urls import url, include, patterns
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
import django.contrib.auth.urls
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from quanquan.views import index
admin.auto... |
mozilla/fjord | refs/heads/master | vendor/packages/carrot/tests/test_with_statement.py | 9 | from __future__ import with_statement
import os
import sys
import unittest
sys.path.insert(0, os.pardir)
sys.path.append(os.getcwd())
from tests.utils import test_connection_args
from carrot.connection import BrokerConnection
from carrot.messaging import Consumer, Publisher
class TestTransactioned(unittest.TestCase)... |
sexroute/commandergenius | refs/heads/sdl_android | project/jni/python/src/Lib/test/test_ftplib.py | 56 | """Test script for ftplib module."""
# Modified by Giampaolo Rodola' to test FTP class and IPv6 environment
import ftplib
import threading
import asyncore
import asynchat
import socket
import StringIO
from unittest import TestCase
from test import test_support
from test.test_support import HOST
# the dummy data re... |
rbardaji/oceanobs | refs/heads/master | other_codes/map_plot.py | 1 | import mooda
import matplotlib.pyplot as plt
path = r"C:\Users\rbard\Desktop\MO_LATEST_TS_MO_OBSEA_20180406.nc"
wf = mooda.WaterFrame()
wf.from_netcdf(path)
for key in wf.metadata:
print(key, wf.metadata[key])
pm = mooda.PlotMap()
pm.map_mediterranean()
pm.add_point(lon=wf.metadata["last_longitude_observation"]... |
salvaorenick/django-cms-redirects | refs/heads/master | setup.py | 1 | from setuptools import setup, find_packages
import os
version = __import__('cms_redirects').__version__
install_requires = [
'setuptools',
'django',
'django-cms',
]
setup(
name = "django-cms-redirects",
version = version,
url = 'http://github.com/salvaorenick/django-cms-redirects',
licens... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.