repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
Cito/DBUtils
tests/mock_db.py
1
3341
"""This module serves as a mock object for the DB-API 2 module""" threadsafety = 2 class Error(Exception): pass class DatabaseError(Error): pass class OperationalError(DatabaseError): pass class InternalError(DatabaseError): pass class ProgrammingError(DatabaseError): pass def connect(d...
mit
-20,463,000,262,335,624
22.695035
65
0.567495
false
amaret/wind.util
windutil/main.py
1
5085
# Copyright Amaret, Inc 2011-2015. All rights reserved. ''' Wind Docker Container Util ''' import os import time import json from subprocess import call from windutil.argparser import parse from windutil.scrlogger import ScrLogger LOG = ScrLogger() DEFAULT_CONTAINER_CONFIG = [ { 'name': 'redis', ...
gpl-2.0
7,293,646,691,214,361,000
24.681818
78
0.559685
false
miconof/headphones
headphones/notifiers.py
1
28911
# This file is part of Headphones. # # Headphones 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. # # Headphones is distributed i...
gpl-3.0
-6,225,359,523,998,419,000
33.173759
140
0.593961
false
bluestemscott/librarygadget
librarygadget/librarybot/migrations/0001_initial.py
1
15532
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'UserProfile' db.create_table('librarybot_userprofile', ( ('id', se...
mit
7,919,373,460,767,869,000
64.660944
163
0.563675
false
rcmachado/pysuru
pysuru/tests/test_http.py
1
1256
# coding: utf-8 try: from unittest import mock except ImportError: import mock from pysuru.http import HttpClient def test_headers_attribute_should_always_have_authorization_header_with_token(): client = HttpClient('TARGET', 'TOKEN') assert 'Authorization' in client.headers assert client.headers[...
mit
8,830,630,026,472,141,000
28.904762
80
0.676752
false
JaneliaSciComp/Neuroptikon
Source/lib/CrossPlatform/networkx/generators/small.py
1
12813
""" Various small and named graphs, together with some compact generators. """ __author__ ="""Aric Hagberg (hagberg@lanl.gov)\nPieter Swart (swart@lanl.gov)""" # Copyright (C) 2004-2008 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights ...
bsd-3-clause
-5,615,257,374,291,116,000
30.25122
92
0.570124
false
looopTools/sw9-source
.waf-1.9.8-6657823688b736c1d1a4e2c4e8e198b4/waflib/extras/wurf/dependency.py
1
2578
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import hashlib import json import collections import pprint class Dependency(object): def __init__(self,**kwargs): assert"sha1"not in kwargs if'recurse'not in kwargs: kwargs['recurse']=True ...
mit
4,564,975,259,940,651,000
36.362319
177
0.713732
false
Artanicus/python-cozify
util/device-fade-test.py
1
1301
#!/usr/bin/env python3 from cozify import hub import numpy, time from absl import flags, app FLAGS = flags.FLAGS flags.DEFINE_string('device', None, 'Device to operate on.') flags.DEFINE_float('delay', 0.5, 'Step length in seconds.') flags.DEFINE_float('steps', 20, 'Amount of steps to divide into.') flags.DEFINE_bool...
mit
-6,221,275,703,317,243,000
27.822222
92
0.54973
false
vericred/vericred-python
vericred_client/models/network_comparison_response.py
1
13134
# coding: utf-8 """ Vericred API Vericred's API allows you to search for Health Plans that a specific doctor accepts. ## Getting Started Visit our [Developer Portal](https://developers.vericred.com) to create an account. Once you have created an account, you can create one Application for Production and an...
apache-2.0
-2,281,996,822,757,436,200
36.741379
228
0.62677
false
v1k45/django-notify-x
notify/models.py
1
14033
from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.conf import settings from django.db.models import QuerySet from jsonfield.fields import JSONField from six import python_2_unicode_compatible from django.u...
mit
1,351,748,947,462,464,800
31.941315
79
0.575643
false
Sarsate/compute-image-packages
google_compute_engine/clock_skew/tests/clock_skew_daemon_test.py
1
4640
#!/usr/bin/python # Copyright 2016 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 appli...
apache-2.0
-1,735,574,211,435,236,900
42.364486
89
0.714009
false
GoogleCloudDataproc/cloud-dataproc
codelabs/spark-nlp/topic_model.py
1
8715
# Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
3,045,869,450,984,424,400
38.256757
104
0.715089
false
Spiderlover/Toontown
toontown/suit/SuitBase.py
1
3300
import SuitDNA from SuitLegList import * import SuitTimings from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from pandac.PandaModules import * from pandac.PandaModules import Point3 from toontown.battle import SuitBattleGlobals from toontown.toonbase import TTLocalizer TI...
mit
2,053,050,987,002,632,700
28.72973
100
0.617576
false
pattywgm/funny-spider
douban/douban/spiders/movie_awards.py
1
2888
#!/usr/bin/env python # encoding: utf-8 """ @version: 1.0 @file: movie_awards.py @time: 17/10/19 下午10:35 @desc: 电影获奖数据抓取 28items/每分钟 被ban """ import re from copy import deepcopy from os.path import exists import scrapy from douban.items import AwardsItem from douban.utils.my_utils import load_obj, replace_d...
gpl-3.0
2,291,034,261,660,360,200
31.8
109
0.558465
false
rsignell-usgs/yaml2ncml
setup.py
1
1966
import os import sys from setuptools import setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = ['--verbose'] self.test_suite = True def run_tests(self): import...
mit
5,773,066,131,003,179,000
29.71875
75
0.60529
false
opencord/voltha
ofagent/main.py
1
9975
#!/usr/bin/env python # # Copyright 2017 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
8,610,598,011,498,533,000
35.944444
140
0.536441
false
giannisfs/Vault
vault/qrc_resources.py
1
335309
# -*- coding: utf-8 -*- # Resource object code # # Created: ??? ??? 21 00:36:17 2012 # by: The Resource Compiler for PyQt (Qt v4.7.4) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x01\x2b\xe6\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x...
gpl-3.0
4,246,810,687,822,081,000
64.643892
96
0.727183
false
ludojmj/treelud
server/paramiko/sftp_client.py
1
32863
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of Paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License,...
mit
1,443,517,696,664,535,600
37.689614
107
0.564982
false
arista-eosplus/pyeapi
test/system/test_api_ospf.py
1
9101
# # Copyright (c) 2016, Arista Networks, 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 condit...
bsd-3-clause
6,592,228,448,938,086,000
40.940092
99
0.572465
false
praekelt/txtalert
txtalert/apps/gateway/migrations/0002_auto__add_field_sendsms_group__add_field_pleasecallme_group.py
1
4637
# encoding: 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): # all previous data belongs to Temba Lethu Clinic from django.contrib.auth.models import Group gro...
gpl-3.0
-8,851,398,235,679,534,000
58.448718
210
0.569334
false
plotly/plotly.py
packages/python/plotly/plotly/validators/mesh3d/__init__.py
1
6255
import sys if sys.version_info < (3, 7): from ._zsrc import ZsrcValidator from ._zhoverformat import ZhoverformatValidator from ._zcalendar import ZcalendarValidator from ._z import ZValidator from ._ysrc import YsrcValidator from ._yhoverformat import YhoverformatValidator from ._ycalendar...
mit
-408,671,655,195,684,100
41.263514
60
0.667306
false
lizardsystem/freq
freq/lizard_connector.py
1
30266
import copy import datetime as dt import json import logging from pprint import pprint # left here for debugging purposes from time import time from time import sleep import urllib import numpy as np import django.core.exceptions from freq import jsdatetime try: from django.conf import settings USR, PWD = se...
gpl-3.0
-8,302,654,246,957,907,000
34.988109
90
0.52858
false
mne-tools/mne-python
mne/preprocessing/realign.py
1
4237
# -*- coding: utf-8 -*- # Authors: Eric Larson <larson.eric.d@gmail.com> # License: BSD (3-clause) import numpy as np from numpy.polynomial.polynomial import Polynomial from ..io import BaseRaw from ..utils import _validate_type, warn, logger, verbose @verbose def realign_raw(raw, other, t_raw, t_other, verbose=No...
bsd-3-clause
-3,332,209,393,944,654,300
37.509091
79
0.627007
false
jamii/inkling
jottinks/src/NoteTree2.py
1
4804
""" Copyright 2008 Jamie Brandon, Mark Haines This file is part of jottinKs. JottinKs 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 late...
gpl-3.0
634,833,686,618,809,700
24.289474
87
0.696295
false
brianjimenez/lightdock
lightdock/scoring/dfire2/driver.py
1
7814
"""DFIRE2 potential scoring function Yuedong Yang, Yaoqi Zhou. Ab initio folding of terminal segments with secondary structures reveals the fine difference between two closely related all-atom statistical energy functions. Protein Science,17:1212-1219(2008) """ import os import numpy as np from lightdock.structure.mo...
gpl-3.0
-1,820,260,206,580,369,700
57.75188
120
0.538905
false
mvaled/sentry
src/sentry/message_filters.py
1
16944
# TODO RaduW 8.06.2019 remove the sentry.filters package and rename this module to filters from __future__ import absolute_import import collections from collections import namedtuple import re from sentry.models.projectoption import ProjectOption from sentry.utils.data_filters import FilterStatKeys from rest_framewo...
bsd-3-clause
-1,040,848,108,898,830,200
28.519164
130
0.602632
false
eResearchSA/reporting-storage-hcp
ersa_storage_hcp/__init__.py
1
5549
#!/usr/bin/python3 """Application and persistence management.""" # pylint: disable=no-member, import-error, no-init, too-few-public-methods # pylint: disable=cyclic-import, no-name-in-module, invalid-name import os from flask import Flask from flask.ext import restful from flask.ext.cors import CORS from flask.ext.s...
apache-2.0
2,379,986,731,309,536,000
31.83432
78
0.605515
false
varunarya10/oslo.serialization
oslo_serialization/jsonutils.py
1
8936
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
-9,187,173,856,179,363,000
37.025532
79
0.652865
false
ryanjoneil/docker-image-construction
ipynb/examples/example1.py
1
3732
from mosek.fusion import Model, Domain, Expr, ObjectiveSense import sys # Example 1. Full representation of 3-image problem with all maximal cliques. # DICP instance: # # Resource consumption by command: # # C = {A, B, C, D} # # | x = A: 5 | # r(c) = | x = B: 10 | # | x = C: 7 | # ...
mit
2,658,812,973,706,589,700
32.927273
88
0.566184
false
clld/tsammalex
tsammalex/util.py
1
4317
from collections import OrderedDict from purl import URL from sqlalchemy.orm import joinedload, contains_eager from clld.web.util.multiselect import MultiSelect from clld.db.meta import DBSession from clld.db.models.common import Language, Unit, Value, ValueSet from clld.web.util.htmllib import HTML from clld.web.uti...
apache-2.0
-358,611,519,282,476,700
32.207692
89
0.632847
false
tsengj10/physics-admit
admissions/management/commands/jelley.py
1
1202
from django.core.management.base import BaseCommand, CommandError from admissions.models import * class Command(BaseCommand): help = 'Recalculate Jelley scores and ranks' def add_arguments(self, parser): parser.add_argument('tag', nargs='?', default='test') def handle(self, *args, **options): weights ...
gpl-2.0
-6,135,829,524,808,457,000
31.486486
92
0.624792
false
xiawei0000/Kinectforactiondetect
ChalearnLAPSample.py
1
41779
# coding=gbk #------------------------------------------------------------------------------- # Name: Chalearn LAP sample # Purpose: Provide easy access to Chalearn LAP challenge data samples # # Author: Xavier Baro # # Created: 21/01/2014 # Copyright: (c) Xavier Baro 2014 # Licence: <your lic...
mit
2,354,620,429,577,627,000
41.762538
150
0.599919
false
icandigitbaby/openchange
script/bug-analysis/buganalysis/pkgshelper.py
1
24843
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) Enrique J. Hernández 2014 # 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...
gpl-3.0
6,213,581,533,280,807,000
27.987165
91
0.434506
false
RossMcKenzie/ACJ
ACJ.py
1
20954
from __future__ import division import random import os import numpy as np import pickle import datetime import json class Decision(object): def __init__(self, pair, result, reviewer, time): self.pair = pair self.result = result self.reviewer = reviewer self.time = time def dic...
mit
-3,679,451,613,960,517,600
34.818803
142
0.537654
false
alexei-matveev/ccp1gui
jobmanager/slaveprocess.py
1
12014
""" This collection of routines are alternatives to those in subprocess.py but which create additional controlling threads. Since this feature is not needed in the GUI as a separate thread is spawned of to handle each job they are no longer needed, but retained for possible future use. """ import os,sys if __name__ =...
gpl-2.0
6,496,158,873,484,705,000
29.569975
98
0.512735
false
kbussell/pydocusign
pydocusign/client.py
1
20977
"""DocuSign client.""" from collections import namedtuple import base64 import json import logging import os import warnings import requests from pydocusign import exceptions logger = logging.getLogger(__name__) Response = namedtuple('Response', ['status_code', 'text']) class DocuSignClient(object): """DocuS...
bsd-3-clause
3,125,876,871,494,043,600
36.259325
148
0.576727
false
chfoo/cloaked-octo-nemesis
visibli/visibli_url_grab.py
1
14609
'''Grab Visibli hex shortcodes''' # Copyright 2013 Christopher Foo <chris.foo@gmail.com> # Licensed under GPLv3. See COPYING.txt for details. import argparse import base64 import collections import gzip import html.parser import http.client import logging import logging.handlers import math import os import queue impor...
gpl-3.0
7,486,077,058,854,861,000
32.126984
83
0.56075
false
jsaponara/opentaxforms
opentaxforms/ut.py
1
14660
from __future__ import print_function import logging import os import pkg_resources import re import six import sys from collections import ( namedtuple as ntuple, defaultdict as ddict, OrderedDict as odict) from datetime import datetime from os.path import join as pathjoin, exists from pint import UnitRegi...
agpl-3.0
-4,866,279,262,803,321,000
25.178571
107
0.512005
false
sbailey/redrock
py/redrock/fitz.py
1
7113
""" redrock.fitz ============ Functions for fitting minima of chi^2 results. """ from __future__ import absolute_import, division, print_function import numpy as np import scipy.constants import scipy.special from . import constants from .rebin import rebin_template from .zscan import calc_zchi2_one, spectral_dat...
bsd-3-clause
-6,433,627,876,131,985,000
28.392562
161
0.566568
false
potsmaster/cinder
cinder/volume/drivers/dothill/dothill_client.py
1
12318
# Copyright 2014 Objectif Libre # Copyright 2015 DotHill Systems # # 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 # # U...
apache-2.0
2,781,379,234,421,409,300
35.443787
79
0.551469
false
cbitstech/Purple-Robot-Django
management/commands/extractors/builtin_rawlocationprobeeventlog.py
1
2943
# pylint: disable=line-too-long import datetime import psycopg2 import pytz CREATE_PROBE_TABLE_SQL = 'CREATE TABLE builtin_rawlocationprobeeventlog(id SERIAL PRIMARY KEY, user_id TEXT, guid TEXT, timestamp BIGINT, utc_logged TIMESTAMP, provider_status TEXT, log_event TEXT, satellites BIGINT);' CREATE_PROBE_USER_ID_IN...
gpl-3.0
-4,866,252,767,588,838,000
34.890244
218
0.576283
false
cloudnull/eventlet_wsgi
example_app/app.py
1
3150
# ============================================================================= # Copyright [2014] [Kevin Carter] # License Information : # This software has no warranty, it is provided 'as is'. It is your # responsibility to validate the behavior of the routines and its accuracy # using the code provided. Consult the ...
gpl-3.0
-1,176,473,469,991,870,000
27.378378
79
0.653651
false
Codepoints/unidump
unidump/__init__.py
1
1861
#!/usr/bin/env python3 """ hexdump(1) for Unicode data """ from typing import IO from unidump.output import sanitize_char, print_line, fill_and_print from unidump.env import Env VERSION = '1.1.3' def unidump(inbytes: IO[bytes], env: Env) -> None: """take a list of bytes and print their Unicode codepoints ...
mit
131,718,491,574,732,180
27.630769
79
0.487372
false
tianon/hy
tests/compilers/test_ast.py
1
14265
# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org> # Copyright (c) 2013 Julien Danjou <julien@danjou.info> # # 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, inclu...
mit
7,320,756,591,638,390,000
27.359841
78
0.615212
false
burjorjee/evolve-parities
evolveparities.py
1
5098
from contextlib import closing from matplotlib.pyplot import plot, figure, hold, axis, ylabel, xlabel, savefig, title from numpy import sort, logical_xor, transpose, logical_not from numpy.numarray.functions import cumsum, zeros from numpy.random import rand, shuffle from numpy import mod, floor import time import clou...
gpl-3.0
-5,851,822,647,906,978,000
32.539474
108
0.620832
false
whatsthehubbub/rippleeffect
nousernameregistration/models.py
1
10449
from django.conf import settings try: from django.contrib.auth import get_user_model User = get_user_model() except: pass from django.db import models from django.db import transaction from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ import datet...
mit
-1,112,605,292,556,543,200
37.557196
91
0.620825
false
who-emro/meerkat_frontend
meerkat_frontend/views/messaging.py
1
15049
""" messaging.py A Flask Blueprint module for Meerkat messaging services. """ from flask.ext.babel import gettext from flask import Blueprint, render_template from flask import redirect, flash, request, current_app, g, jsonify import random from meerkat_frontend import app, auth import meerkat_libs as libs from .. imp...
mit
-1,059,566,002,671,606,400
37.002525
79
0.612001
false
Royal-Society-of-New-Zealand/NZ-ORCID-Hub
orcid_api_v3/models/funding_v30.py
1
16706
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six fr...
mit
2,249,127,809,126,188,500
28.939068
328
0.590028
false
tensorflow/models
official/nlp/transformer/transformer_forward_test.py
1
6052
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
6,521,580,302,785,275,000
37.547771
79
0.666061
false
jelly/calibre
src/calibre/utils/resources.py
1
3853
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import __builtin__, sys, os from calibre import config_dir class PathResolver(ob...
gpl-3.0
5,682,038,873,633,076,000
30.842975
87
0.562938
false
thaines/rfam
bin/prman_AlfParser.py
1
9166
import pyparsing as pp import re import copy class prman_AlfParser: def __init__(self): self.keywords = ['Job', 'Task', 'RemoteCmd'] def parseFile(self, fileText): commands = self.__parseCommandStructure(fileText, 0, isStart = True) #print(commands) textureCmds, Cmds, frames ...
gpl-3.0
-8,844,686,984,876,143,000
32.452555
128
0.47818
false
rainysia/dotfiles
doc/python/test/selenium_localchromeff_remoteIE.py
1
1961
#!/usr/bin/env python # coding=utf-8 #chrome localhost ''' import os from selenium import webdriver chromedriver = "/home/softs/selenium/chromedriver" os.environ["webdriver.chrome.driver"] = chromedriver driver = webdriver.Chrome(chromedriver) driver.get("http://baidu.com") driver.quit() ''' #firefox(iceweasel) localh...
mit
-1,273,232,541,183,339,300
25.310811
126
0.717514
false
CanalTP/navitia
source/jormungandr/jormungandr/scenarios/tests/journey_compare_tests.py
1
43791
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
agpl-3.0
-7,305,518,788,665,118,000
34.982744
115
0.689343
false
ami/lob-python
lob/api_requestor.py
1
2714
import requests import lob import json import resource from lob import error from version import VERSION def _is_file_like(obj): """ Checks if an object is file-like enough to be sent to requests. In particular, file, StringIO and cStringIO objects are file-like. Refs http://stackoverflow.com/question...
mit
2,569,158,319,488,001,500
34.710526
122
0.542373
false
castedo/celauth
celauth/providers.py
1
4151
import urlparse from openid.consumer import consumer from openid.extensions import sreg, ax from celauth import OpenIDCase from celauth.dj.celauth.openid_store import DjangoOpenIDStore class OpenIDChoices(object): def __init__(self, data): self.data = data def ids(self, id_prefix=''): return [...
mit
7,795,188,678,148,681,000
36.736364
92
0.589737
false
mjames-upc/python-awips
dynamicserialize/dstypes/com/raytheon/uf/common/site/notify/SiteActivationNotification.py
1
1716
## ## # # SOFTWARE HISTORY # # Date Ticket# Engineer Description # ------------ ---------- ----------- -------------------------- # 09/10/14 #3623 randerso Manually created, do not regenerate # ## class SiteActivationNotification(object): def __ini...
bsd-3-clause
1,471,667,875,984,787,200
23.169014
85
0.556527
false
reybalgs/PyRecipe-4-U
models/recipemodel.py
1
3188
############################################################################### # # recipemodel.py # # Provides the class model for a recipe. The class model is passed around in # the application proper. # ############################################################################### import simplejson as json class ...
gpl-3.0
5,876,512,158,699,858,000
31.865979
79
0.553011
false
rbuffat/pyidf
tests/test_controllerwatercoil.py
1
2641
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.controllers import ControllerWaterCoil log = logging.getLogger(__name__) class TestControllerWaterCoil(unittest.TestCase): def setUp(self): self.fd, self.path = tem...
apache-2.0
5,792,204,171,159,146,000
36.742857
131
0.677395
false
sloria/sphinx-issues
test_sphinx_issues.py
1
4598
from tempfile import mkdtemp from shutil import rmtree try: from unittest.mock import Mock except ImportError: from unittest.mock import Mock from sphinx.application import Sphinx from sphinx_issues import ( issue_role, user_role, pr_role, cve_role, commit_role, setup as issues_setup, ...
mit
1,253,900,636,710,111,700
28.101266
99
0.562853
false
macosforge/ccs-calendarserver
txdav/caldav/datastore/scheduling/ischedule/remoteservers.py
1
6936
## # Copyright (c) 2006-2017 Apple 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 l...
apache-2.0
-7,475,544,926,716,643,000
30.527273
115
0.598039
false
rocky/python3-trepan
test/unit/test-cmdfns.py
1
2471
#!/usr/bin/env python3 'Unit test for trepan.processor.command.cmdfns' import unittest from trepan.processor import cmdfns as Mcmdfns class TestCommandHelper(unittest.TestCase): def setUp(self): self.errors = [] return def errmsg(self, msg): self.errors.append(msg) return ...
gpl-3.0
3,945,148,551,867,422,000
34.811594
77
0.522461
false
spencerlyon2/pygments
pygments/lexers/data.py
2
17895
# -*- coding: utf-8 -*- """ pygments.lexers.data ~~~~~~~~~~~~~~~~~~~~ Lexers for data file format. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, ExtendedRegexLexer, LexerContext, \ ...
bsd-2-clause
-6,239,185,721,659,897,000
34.157171
83
0.486784
false
Xeralux/tensorflow
tensorflow/python/keras/_impl/keras/engine/training.py
1
72917
# 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...
apache-2.0
-4,597,388,592,989,543,400
41.344367
99
0.614041
false
annahs/atmos_research
WHI_long_term_2min_data_to_db.py
1
8596
import sys import os import numpy as np from pprint import pprint from datetime import datetime from datetime import timedelta import mysql.connector import math import calendar import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib import dates start = datetime(2009,7,15,4) #2...
mit
6,663,575,853,630,564,000
28.040541
268
0.640181
false
topix-hackademy/social-listener
application/twitter/tweets/collector.py
1
3236
from application.mongo import Connection from application.twitter.interface import TwitterInterface from application.twitter.tweets.fetcher import TweetsFetcher from application.processmanager import ProcessManager from application.utils.helpers import what_time_is_it import logging class TweetCollector(TwitterInterf...
mit
-6,503,210,330,713,277,000
43.328767
101
0.491656
false
baris/pushmanager
testing/testdb.py
1
4248
#!/usr/bin/python from datetime import datetime, timedelta import os import sqlite3 import tempfile import time from core import db def create_temp_db_file(): fd, db_file_path = tempfile.mkstemp(suffix="pushmanager.db") os.close(fd) return db_file_path def get_temp_db_uri(dbfile=None): if not dbfile...
apache-2.0
-2,265,830,634,000,755,700
32.714286
134
0.591102
false
andreashorn/lead_dbs
ext_libs/SlicerNetstim/WarpDrive/WarpDriveLib/Effects/Effect.py
1
4254
import vtk, qt, slicer class AbstractEffect(): """ One instance of this will be created per-view when the effect is selected. It is responsible for implementing feedback and label map changes in response to user input. This class observes the editor parameter node to configure itself and queries the curr...
gpl-3.0
2,148,631,814,116,157,400
35.358974
85
0.718853
false
clagiordano/projectDeploy
modules/utils.py
1
1458
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import subprocess import shlex import socket import modules.outputUtils as out def getSessionInfo(): info = {} output = subprocess.Popen(["who", "am", "i"], stdout=subprocess.PIPE).communicate() output = output[0].strip().split(' ') info['usernam...
lgpl-3.0
-8,159,037,422,695,601,000
27.588235
87
0.59465
false
mkuron/espresso
testsuite/python/dpd.py
1
15785
# # Copyright (C) 2013-2018 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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...
gpl-3.0
8,235,206,675,776,484,000
33.019397
102
0.526956
false
m4dcoder/cortex
setup.py
1
1799
#!/usr/bin/env python2.7 # 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, softw...
apache-2.0
2,384,394,651,823,324,000
28.983333
74
0.67871
false
acimmarusti/isl_exercises
chap3/chap3ex8.py
1
1315
from __future__ import print_function, division import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from pandas.tools.plotting import scatter_matrix import statsmodels.formula.api as smf #from sklearn.linear_model import LinearRegression #import scipy, scipy.stats #from statsmod...
gpl-3.0
7,163,226,941,573,105,000
26.978723
89
0.726996
false
Kwentar/ImageDownloader
vk.py
1
7993
import json import random from urllib.error import URLError from urllib.parse import urlencode from urllib.request import urlopen, http, Request import time from datetime import date from Profiler import Profiler import __setup_photo__ as setup class VkError(Exception): def __init__(self, value): self.val...
mit
-8,803,733,512,979,355,000
34.524444
106
0.505067
false
googleapis/python-compute
google/cloud/compute_v1/services/target_instances/pagers.py
1
5740
# -*- 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...
apache-2.0
-3,987,919,058,194,039,000
36.272727
89
0.655923
false