repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | 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 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
EDUlib/edx-platform | common/lib/xmodule/xmodule/modulestore/exceptions.py | 1 | 3789 | """
Exceptions thrown by KeyStore objects
"""
class ItemNotFoundError(Exception):
pass
class ItemWriteConflictError(Exception):
pass
class MultipleCourseBlocksFound(Exception):
"""
Raise this exception when Iterating over the course blocks return multiple course blocks.
"""
pass # lint-am... | agpl-3.0 | 3,610,771,503,910,648,300 | 29.071429 | 166 | 0.663236 | false | 4.484024 | false | false | false |
stormi/tsunami | src/primaires/scripting/parser/nombre.py | 1 | 3620 | # -*-coding:Utf-8 -*
# Copyright (c) 2010 LE GOFF Vincent
# 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
# l... | bsd-3-clause | -257,016,107,874,898,900 | 33.692308 | 79 | 0.660754 | false | 3.938865 | false | false | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_3_0_0/models/relatedperson_tests.py | 1 | 7168 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 on 2017-03-22.
# 2017, SMART Health IT.
import io
import json
import os
import unittest
from . import relatedperson
from .fhirdate import FHIRDate
class RelatedPersonTests(unittest.TestCase):
def instantiate_from(self, filename... | bsd-3-clause | 8,045,643,496,570,569,000 | 47.734694 | 95 | 0.664294 | false | 3.422838 | true | false | false |
peterayeni/django-smsgateway | smsgateway/south_migrations/0006_auto__add_field_queuedsms_using.py | 1 | 2515 | # 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 field 'QueuedSMS.using'
db.add_column('smsgateway_queuedsms', 'using', self.gf('django.db.models.... | bsd-3-clause | 799,461,428,937,790,200 | 51.395833 | 160 | 0.561829 | false | 3.703976 | false | false | false |
Zokol/The-Great-Dalmuti | dalmut.py | 1 | 8497 | import random
"""
THE GREAT DALMUTI
Heikki "Zokol" Juva 2015 - heikki@juva.lu
"""
## Exception raised when all players have skipped the round
class SkipException(Exception):
pass
class RestartRound(Exception):
pass
class Card:
def __init__(self, value):
self.value = value
def __repr__(self):
return "Card:... | mit | -4,180,557,527,489,499,000 | 26.237179 | 120 | 0.645993 | false | 3.007788 | false | false | false |
hpd/MitsubaForMaya | plug-ins/mitsuba/volumes/volume.py | 1 | 2498 | import sys
import maya.OpenMaya as OpenMaya
import maya.OpenMayaMPx as OpenMayaMPx
kPluginNodeName = "MitsubaVolume"
kPluginNodeClassify = "shader/volume"
kPluginNodeId = OpenMaya.MTypeId(0x87033)
class volume(OpenMayaMPx.MPxNode):
def __init__(self):
OpenMayaMPx.MPxNode.__init__(self)
mSourcefile... | mit | -3,909,570,042,202,730,500 | 29.463415 | 96 | 0.658927 | false | 3.380244 | false | false | false |
awwong1/CMPUT404LAB9_W2016 | iguana/iguana/urls.py | 1 | 1469 | """iguana URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-base... | mit | 7,628,134,095,978,440,000 | 38.702703 | 83 | 0.724983 | false | 3.514354 | false | false | false |
dborzov/practicin | 67-binary-heap/solution.py | 1 | 1403 | class Heap:
def __init__(self):
self.bh = []
def pop(self):
if len(self.bh)==0: raise StandardError('No more elements in the heap')
if len(self.bh)==1:
return self.bh.pop()
return_value, self.bh[0] = self.bh[0], self.bh[-1]
self.bh = self.bh[:len(self.bh)-1]
... | mit | -2,426,201,212,558,269,400 | 30.177778 | 85 | 0.570207 | false | 2.840081 | false | false | false |
sajuptpm/neutron-ipam | neutron/tests/unit/bigswitch/test_capabilities.py | 1 | 2608 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2014 Big Switch Networks, 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/lice... | apache-2.0 | -2,216,588,186,026,200,800 | 39.123077 | 79 | 0.61273 | false | 4.126582 | true | false | false |
fastavro/fastavro | fastavro/_write_py.py | 1 | 22640 | # cython: auto_cpdef=True
"""Python code for writing AVRO files"""
# This code is a modified version of the code at
# http://svn.apache.org/viewvc/avro/trunk/lang/py/src/avro/ which is under
# Apache 2.0 license (http://www.apache.org/licenses/LICENSE-2.0)
import json
from io import BytesIO
from os import urandom, S... | mit | 5,944,205,814,396,213,000 | 31.906977 | 88 | 0.60371 | false | 4.008499 | false | false | false |
songmonit/CTTMSONLINE_V8 | openerp/release.py | 1 | 2596 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 | 7,346,447,488,891,795,000 | 45.357143 | 117 | 0.645223 | false | 3.556164 | false | false | false |
orcmkit/ORCmKit | Python27/ORCSim/LiquidReceiver.py | 1 | 4981 | from __future__ import division
from CoolProp.CoolProp import PropsSI
import pylab
from ACHPTools import Write2CSV
from matplotlib.pyplot import plot, show, figure, semilogy, xlim, ylim, title, xlabel, ylabel, legend
from math import pi,exp,log,sqrt,tan,cos,sin
from scipy.optimize import brentq
from scipy.constants i... | mit | 3,989,023,316,795,235,300 | 37.323077 | 116 | 0.598474 | false | 3.552782 | false | false | false |
jar3k/django-model-options | model_options/mixins.py | 1 | 1737 | from django.contrib.contenttypes.fields import GenericRelation
from django.core.cache import cache
from django.db import models, IntegrityError, transaction
from .utils import detect_type
from .models import Option
class OptionsMixin(models.Model):
options = GenericRelation(Option)
class Meta:
abst... | mit | -4,955,214,051,976,959,000 | 27.016129 | 74 | 0.633851 | false | 3.817582 | false | false | false |
ericholscher/djangoembed | oembed/views.py | 1 | 4618 | import re
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse, get_resolver
from django.http import HttpResponse, HttpResponseBadRequest, Http404
from django.template import defaultfilters
from django.utils import simplejson
from django.utils.encoding import smart_str
import oemb... | mit | -8,876,648,113,996,773,000 | 31.293706 | 87 | 0.64097 | false | 4.32397 | false | false | false |
schreiberx/sweet | benchmarks_sphere/report_konwihr_rexi_nl/compare_wt_dt_vs_accuracy_galewsky_new_rexi/rexi_benchmarks.py | 1 | 8037 | #! /usr/bin/env python3
import os
import sys
import math
from itertools import product
# REXI
from mule_local.rexi.REXICoefficients import *
from mule_local.rexi.pcirexi.BeanREXI import BeanREXI
from mule_local.rexi.pcirexi.LRREXI import LRREXI
from mule_local.rexi.trexi.TREXI import *
from mule_local.rexi.cirexi.CI... | mit | -5,738,522,908,586,182,000 | 32.348548 | 126 | 0.520717 | false | 3.506545 | false | false | false |
apdjustino/DRCOG_Urbansim | src/opus_gui/results_manager/run/indicator_framework/visualizer/visualizers/mapnik_animated_map.py | 1 | 7430 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington
# See opus_core/LICENSE
import os
from opus_core.logger import logger
from opus_core.store.attribute_cache import AttributeCache
from opus_core.simulation_state import Simulatio... | agpl-3.0 | 8,432,913,646,352,047,000 | 46.025316 | 166 | 0.517766 | false | 4.790458 | false | false | false |
won0089/oppia | core/domain/skins_services.py | 1 | 3513 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | apache-2.0 | -8,853,533,049,173,117,000 | 30.648649 | 77 | 0.619129 | false | 3.890365 | false | false | false |
georgebv/coastlib | coastlib/stats/extreme.py | 1 | 165750 | # coastlib, a coastal engineering Python library
# Copyright (C), 2019 Georgii Bocharov
#
# 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) a... | gpl-3.0 | -9,124,196,757,702,102,000 | 45.572071 | 120 | 0.527463 | false | 4.534512 | false | false | false |
harikishen/addons-server | src/olympia/editors/tests/test_sql_model.py | 1 | 10512 | # -*- coding: utf-8 -*-
"""Tests for SQL Model.
Currently these tests are coupled tighly with MySQL
"""
from datetime import datetime
from django.db import connection, models
from django.db.models import Q
import pytest
from olympia.amo.tests import BaseTestCase
from olympia.editors.sql_model import RawSQLModel
d... | bsd-3-clause | -8,566,747,079,214,111,000 | 35.430556 | 78 | 0.551754 | false | 3.801449 | true | false | false |
takmid/inasafe | safe_qgis/impact_functions_doc_base.py | 1 | 9760 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'impact_functions_doc_base.ui'
#
# Created: Fri Sep 14 14:43:14 2012
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromU... | gpl-3.0 | 9,172,954,171,871,963,000 | 57.795181 | 167 | 0.727254 | false | 3.837987 | false | false | false |
robertnishihara/ray | python/ray/tune/examples/ax_example.py | 1 | 2352 | """This test checks that AxSearch is functional.
It also checks that it is usable with a separate scheduler.
"""
import numpy as np
import time
import ray
from ray import tune
from ray.tune.schedulers import AsyncHyperBandScheduler
from ray.tune.suggest.ax import AxSearch
def hartmann6(x):
alpha = np.array([1.0... | apache-2.0 | -7,999,556,598,531,771,000 | 26.670588 | 79 | 0.517857 | false | 2.980989 | false | false | false |
wesm/ibis | ibis/expr/datatypes.py | 1 | 19843 | # Copyright 2014 Cloudera 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, so... | apache-2.0 | -6,465,158,278,819,873,000 | 23.407134 | 79 | 0.545835 | false | 3.969394 | false | false | false |
Mariaanisimova/pythonintask | IVTp/2014/Shcherbakov_R_A/task_09_22.py | 1 | 1636 | # Задача 9. Вариант 22.
# Создайте игру, в которой компьютер выбирает какое-либо слово, а игрок должен
# его отгадать. Компьютер сообщает игроку, сколько букв в слове, и дает пять попыток
# узнать, есть ли какая-либо буква в слове, причем программа может отвечать только
# "Да" и "Нет". Вслед за тем игрок должен попробо... | apache-2.0 | 3,770,639,365,246,442,000 | 31.571429 | 85 | 0.67807 | false | 1.503958 | false | false | false |
dsonbill/DMPHive | xmlrsa.py | 1 | 3988 | import rsa
import base64
import math
import xml.etree.ElementTree as ET
# Utility functions
def bytes_to_int(byte_data):
return int.from_bytes(byte_data, 'big')
def bytes_from_int(integer):
byte_length = math.ceil(integer.bit_length() / 8)
return integer.to_bytes(byte_length, 'big')
class RSA():
d... | cc0-1.0 | -5,861,631,085,719,822,000 | 40.978947 | 113 | 0.650201 | false | 3.185304 | false | false | false |
mice-software/maus | bin/scifi/GenerateMomentumCorrections.py | 1 | 2173 | #!/usr/bin/env python
"""
Generate an MC data file and calculate the required Pattern Recognition
momentum corrections required for the track reconstruction.
This will simulate MICE spills through the entirety of MICE using Geant4, then
digitize and reconstruct tracker hits to space points. Finally a
reducer is used... | gpl-3.0 | 8,634,506,744,995,396,000 | 34.622951 | 80 | 0.716521 | false | 3.544861 | false | false | false |
Savvysherpa/provenance | provenance/migrations/env.py | 1 | 2032 | from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from provenance import models
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
# add your model's MetaData object here
# for ... | mit | -6,248,009,298,735,235,000 | 28.449275 | 69 | 0.692913 | false | 4.172485 | true | false | false |
novapost/python-pussycache | setup.py | 1 | 2924 | # -*- coding: utf-8 -*-
"""Python packaging."""
from os.path import abspath, dirname, join
from setuptools import setup
def read_relative_file(filename):
"""Returns contents of the given file, which path is supposed relative
to this module."""
with open(join(dirname(abspath(__file__)), filename)) as f:
... | mit | -3,581,475,447,714,496,500 | 29.778947 | 78 | 0.588577 | false | 4.106742 | false | false | false |
jokey2k/pyClanSphere | pyClanSphere/plugins/bulletin_board/database.py | 1 | 3321 | # -*- coding: utf-8 -*-
"""
pyClanSphere.plugins.bulletin_board.database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Our needed tables are declared here (now)
:copyright: (c) 2009 - 2010 by the pyClanSphere Team,
see AUTHORS for more details.
:license: BSD, see LICENSE for more de... | bsd-3-clause | -5,117,481,362,407,669,000 | 37.616279 | 113 | 0.662752 | false | 3.673673 | false | false | false |
franek/weboob | weboob/capabilities/gauge.py | 1 | 3325 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2012 Romain Bignon, Florent Fourcot
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | agpl-3.0 | 1,626,210,802,505,838,600 | 27.663793 | 95 | 0.623459 | false | 3.93026 | false | false | false |
Centurion89/ModLogin | modules/Square.py | 1 | 2724 | import requests
import json
from lxml import html
from BaseModule import BaseModule
class Square(BaseModule):
def login(self, username, password, useragent):
useragent = BaseModule().define_user_agent(useragent)
headers = {'user-agent': useragent}
session = requests.Session()
logi... | mit | 6,636,884,052,703,252,000 | 35.810811 | 75 | 0.517254 | false | 4.32381 | false | false | false |
gjost/django-linkpile | runtests.py | 1 | 1091 | import sys
try:
from django.conf import settings
settings.configure(
DEBUG=True,
USE_TZ=True,
DATABASES={
"default": {
"ENGINE": "django.db.backends.sqlite3",
}
},
ROOT_URLCONF="linkpile.urls",
INSTALLED_APPS=[
... | bsd-3-clause | 8,139,445,616,342,015,000 | 20 | 85 | 0.549954 | false | 3.981752 | true | false | false |
procool/mygw | web/apps/cabinet/views.py | 1 | 2966 | import logging
import datetime
from sqlalchemy import func, and_, or_, not_
from flask import url_for, session
from misc.mixins import myTemplateView, JSONView
from utils.arp_list import get_mac_by_ip
from models.all_models import InetEther, ARPCache
from models.session import session
from utils.server.http_client... | bsd-2-clause | -5,029,251,846,019,144,000 | 34.73494 | 113 | 0.633176 | false | 3.648216 | false | false | false |
rdegges/django-twilio | setup.py | 1 | 3277 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from os.path import abspath, dirname, join, normpath
from setuptools import find_packages, setup
import sys
INSTALL_PYTHON_REQUIRES = []
# We are intending to keep up to date with the supported Django versions.
# For the official suppor... | unlicense | 6,593,338,256,977,965,000 | 37.552941 | 223 | 0.646628 | false | 3.43501 | false | false | false |
xjchensz/LSFS | LSFS/LSFS_TEST.py | 1 | 1803 | #!usr/bin/python
# -*- coding:utf-8 -*-
import pandas as pd
import numpy as np
import scipy as sp
import os
import random
import time
import sys
def append_module_path():
import sys
paths = [ \
"../gen_data",
"../evaluate",
"../read_data"
]
for path in paths:
if pa... | gpl-3.0 | -6,408,282,040,506,266,000 | 21 | 104 | 0.533555 | false | 2.871019 | false | false | false |
vvinuv/pymorph | pymorph/yetbackfunc.py | 1 | 3453 | import os
import sys
import numpy as np
import pymconvolve
import numpy.ma as ma
import fitsio
from mask_or_fit import GetSExObj
from runsexfunc import RunSex
def QuarterMask(z, zm, xcntr, ycntr, bbya, pa, quarter):
nxpts, nypts = z.shape
zmm = np.ones_like(z)
co = np.cos(pa * np.pi / 180.0)
si = np.s... | gpl-2.0 | 7,017,160,199,089,343,000 | 27.073171 | 87 | 0.523313 | false | 2.664352 | false | false | false |
DataDog/integrations-core | network/datadog_checks/network/network.py | 1 | 47373 | # (C) Datadog, Inc. 2010-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
"""
Collects network metrics.
"""
import array
import distutils.spawn
import os
import re
import socket
import struct
from collections import defaultdict
import psutil
from six import PY3, iteritems, itervalu... | bsd-3-clause | 250,857,119,354,836,900 | 44.993204 | 149 | 0.522956 | false | 3.717862 | false | false | false |
pFernbach/hpp-rbprm-corba | script/scenarios/sandbox/dynamic/slalom_hyq_interpKino05.py | 1 | 4188 | #Importing helper class for RBPRM
from hpp.corbaserver.rbprm.rbprmbuilder import Builder
from hpp.corbaserver.rbprm.rbprmfullbody import FullBody
from hpp.corbaserver.rbprm.problem_solver import ProblemSolver
from hpp.gepetto import Viewer
#calling script darpa_hyq_path to compute root path
import slalom_hyq_pathKino0... | lgpl-3.0 | -8,926,711,783,031,606,000 | 28.914286 | 126 | 0.776027 | false | 2.723017 | true | false | false |
endolith/scikit-image | skimage/restoration/_denoise.py | 1 | 10008 | # coding: utf-8
import numpy as np
from .. import img_as_float
from ..restoration._denoise_cy import _denoise_bilateral, _denoise_tv_bregman
from .._shared.utils import _mode_deprecations
def denoise_bilateral(image, win_size=5, sigma_range=None, sigma_spatial=1,
bins=10000, mode='constant', cva... | bsd-3-clause | -854,628,907,179,249,500 | 34.211268 | 92 | 0.6072 | false | 3.67242 | false | false | false |
JMMolenaar/cadnano2.5 | cadnano/part/removeallstrandscmd.py | 1 | 1893 | from cadnano.cnproxy import UndoCommand
class RemoveAllStrandsCommand(UndoCommand):
"""
1. Remove all strands. Emits strandRemovedSignal for each.
2. Remove all oligos.
"""
def __init__(self, part):
super(RemoveAllStrandsCommand, self).__init__("remove all strands")
self._part = pa... | mit | 4,979,934,590,713,284,000 | 32.22807 | 76 | 0.555203 | false | 3.65444 | false | false | false |
cthit/CodeIT | behaviours/Jump.py | 1 | 1201 | import random
import pygame
from behaviours.Behaviour import Behaviour
from behaviours.Collide import Collide
from src.GameMethods import GameMethods
class Jump(Behaviour):
def __init__(self, jump_velocity=10, jump_key=None):
self.jump_velocity = jump_velocity
self.can_jump = False
self.... | mit | -5,081,456,756,045,194,000 | 29.794872 | 74 | 0.592007 | false | 3.574405 | false | false | false |
tyiannak/inf_teiste_info_theory_lab | compressText.py | 1 | 2472 | import ITlib, sys, bitarray, cPickle, os
if __name__ == '__main__':
mode, inputFilePath, outputFilePath = (sys.argv[1], sys.argv[2], sys.argv[3])
if mode == "compress":
method = sys.argv[4]
f = open(inputFilePath) # read the input file
text = f.rea... | apache-2.0 | -2,836,186,854,288,598,000 | 60.825 | 112 | 0.529531 | false | 3.974277 | false | false | false |
mbaldessari/pcp | src/python/setup.py | 1 | 2568 | """ Build script for the PCP python package """
#
# Copyright (C) 2012-2014 Red Hat.
# Copyright (C) 2009-2012 Michael T. Werner
#
# This file is part of the "pcp" module, the python interfaces for the
# Performance Co-Pilot toolkit.
#
# This program is free software; you can redistribute it and/or modify it
# under th... | lgpl-2.1 | 4,887,346,861,633,221,000 | 41.098361 | 80 | 0.630841 | false | 4 | false | false | false |
AMOboxTV/AMOBox.LegoBuild | plugin.video.exodus/resources/lib/sources/primewire_mv_tv.py | 1 | 9244 | # -*- coding: utf-8 -*-
'''
Exodus Add-on
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... | gpl-2.0 | 5,713,432,665,606,945,000 | 40.828054 | 188 | 0.535482 | false | 3.66099 | false | false | false |
aerialhedgehog/VyPy | tests/data/ordered_bunch.py | 1 | 5662 |
# ----------------------------------------------------------------------
# Imports
# ----------------------------------------------------------------------
from VyPy.data import OrderedBunch, Property
import pickle
from copy import deepcopy
from time import time, sleep
import numpy as np
# ---... | bsd-3-clause | -5,173,433,652,382,378,000 | 23.399103 | 80 | 0.310138 | false | 4.652424 | true | false | false |
aosprey/rose | lib/python/rose/suite_hook.py | 1 | 5734 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2012-8 Met Office.
#
# This file is part of Rose, a framework for meteorological suites.
#
# Rose is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... | gpl-3.0 | -6,236,962,520,064,511,000 | 37.483221 | 79 | 0.571503 | false | 3.970914 | false | false | false |
mcdallas/nba_py | nba_py/constants.py | 1 | 17673 | CURRENT_SEASON = '2016-17'
TEAMS = {
'ATL': {
'abbr': 'ATL',
'city': 'Atlanta',
'code': 'hawks',
'conference': 'Eastern',
'displayAbbr': 'ATL',
'displayConference': 'Eastern',
'division': 'Southeast',
'id': '1610612737',
'name': 'Hawks',
... | bsd-3-clause | -3,240,081,273,265,094,000 | 21.951948 | 90 | 0.502009 | false | 2.995424 | false | false | false |
swiftcoder/ashima-iv | src/game.py | 1 | 2465 |
import pyglet
from pyglet.gl import *
import math
from app import AppState, enter_state
from outcome import OutcomeState
from window import Window
from entity import World
import factories
from euclid import Vector3
from resources import Resources
from camera import Camera
from controller import Controller
from te... | bsd-3-clause | 3,728,101,832,243,301,400 | 22.037383 | 81 | 0.691278 | false | 2.833333 | false | false | false |
Reilithion/xmms2-reilithion | wafadmin/Tools/gas.py | 1 | 1258 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2008 (ita)
"as and gas"
import os, sys
import Task
from TaskGen import extension, taskgen, after, before
EXT_ASM = ['.s', '.S', '.asm', '.ASM', '.spp', '.SPP']
as_str = '${AS} ${ASFLAGS} ${_ASINCFLAGS} ${SRC} -o ${TGT}'
Task.simple_task_type('asm', as_str, 'PIN... | lgpl-2.1 | 4,753,860,226,152,624,000 | 26.347826 | 78 | 0.651828 | false | 2.615385 | false | false | false |
YannickB/odoo-hosting | clouder_template_gitlab/oneclick.py | 1 | 3584 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Yannick Buron
# Copyright 2015, TODAY Clouder SASU
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License with Attribution
# ... | agpl-3.0 | 4,088,218,775,987,584,500 | 37.12766 | 79 | 0.57394 | false | 4.133795 | false | false | false |
FairyDevicesRD/FairyMaCorpus | scripts/validate.py | 1 | 1535 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import codecs
import sys
def operation(inf, outf):
'''
Check
'''
err = False
annotations = set([])
for line in inf:
if line.startswith(";"):
continue
items = line[:-1].split("\t")
if len(items)... | apache-2.0 | -762,907,266,110,665,200 | 23.365079 | 88 | 0.517915 | false | 3.8375 | false | false | false |
codebox/star-charts | diagram.py | 1 | 2486 |
from svg import Svg
import codecs
MARGIN_X=20
MARGIN_Y=60
MAGNIFICATION = 500
MIN_D = 1
MAX_D = 4
DIMMEST_MAG = 6
BRIGHTEST_MAG = -1.5
LABEL_OFFSET_X = 4
LABEL_OFFSET_Y = 3
FONT_SIZE=16
FONT_COLOUR='#167ac6'
TITLE_SIZE=16
TITLE_COLOUR='#000'
COORDS_SIZE=12
COORDS_COLOUR='#000'
STAR_COLOUR='#000'
CURVE_WIDTH = 0... | mit | -7,223,114,317,514,982,000 | 30.871795 | 174 | 0.604988 | false | 2.690476 | false | false | false |
avinassh/prawoauth2 | prawoauth2/PrawOAuth2Server.py | 1 | 3785 | #!/usr/bin/env python
import webbrowser
import tornado.ioloop
import tornado.web
__all__ = ['PrawOAuth2Server']
application = None
REDIRECT_URL = 'http://127.0.0.1:65010/authorize_callback'
SCOPES = ['identity', 'read']
REFRESHABLE = True
CODE = None
class AuthorizationHandler(tornado.web.RequestHandler):
de... | mit | -6,661,762,104,879,166,000 | 35.747573 | 81 | 0.639102 | false | 3.94682 | false | false | false |
d1m0/bap_play | lib/z3_embed/embedder.py | 1 | 8204 | from bap import disasm
from bap.adt import Visitor, visit
from ..util import flatten
from z3 import If, eq, Const, And, BitVecRef, ArrayRef, BitVecNumRef, \
BitVecVal, BitVecSort, Context
from re import compile
def boolToBV(boolExp, ctx):
return If(boolExp, BitVecVal(1, 1, ctx=ctx), BitVecVal(0, 1, ctx=ct... | gpl-3.0 | 1,772,084,412,615,283,500 | 29.498141 | 76 | 0.53998 | false | 3.630088 | false | false | false |
eguil/ENSO_metrics | scripts/driverCCollection_testMC3.py | 1 | 27073 | from cdms2 import open as CDMS2open
from os.path import join as join_path
from os import environ
from sys import exit
#from EnsoMetrics.EnsoCollectionsLib import CmipVariables, defCollection, ReferenceObservations
#from EnsoMetrics.EnsoComputeMetricsLib import ComputeCollection
from EnsoCollectionsLib import CmipVaria... | bsd-3-clause | -6,984,128,249,758,549,000 | 57.221505 | 144 | 0.518635 | false | 3.342346 | false | false | false |
sglumac/pyislands | pyislands/evolution.py | 1 | 1937 | from itertools import islice
def evolution(island):
'''
Infinite generator for evolution of some population.
This generator yields population:
population - tuple together containing tuples/individuals
population_0 = create()
population_1 = evolve(population_0, info_0)
.
.
popu... | mit | 3,788,803,665,080,810,000 | 27.910448 | 75 | 0.681466 | false | 4.018672 | false | false | false |
pekin0609/- | agent/cognitive/interpreter.py | 1 | 27170 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
interpreter.py
=====
This module contains the class `NetworkBuilder` and `AgentkBuilder` which interprets
the contents of BriCA language files.
"""
# BriCA Language Interpreter for V1 (Interpreter version 1)
# Originally licenced for WBAI (wbai.jp) under the Apache... | apache-2.0 | 1,350,167,149,328,328,400 | 39.549254 | 120 | 0.536109 | false | 4.38618 | false | false | false |
rossgoodwin/bizarromoma | bot.py | 1 | 5642 | import os
import time
import json
import string
from collections import defaultdict, Counter
from random import random
import tweepy
class TwitterAPI:
"""
Class for accessing the Twitter API.
Requires API credentials to be available in environment
variables. These will be set appropriately if the bot... | gpl-3.0 | 573,573,843,229,703,900 | 28.694737 | 90 | 0.55654 | false | 3.457108 | false | false | false |
eugeneks/zmeyka | zmeyka_auth/user_auth.py | 1 | 3511 |
import datetime
from datetime import datetime
import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy import Table, Column, Integer, String, DateTime, ForeignKey, UniqueConstraint
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
try:
... | mit | -7,564,987,325,090,481,000 | 24.635036 | 124 | 0.569638 | false | 3.779333 | false | false | false |
steveb/heat | heat/common/exception.py | 1 | 15643 | #
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
#
# 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 a... | apache-2.0 | -5,168,321,806,644,968,000 | 29.91502 | 78 | 0.623729 | false | 4.086468 | false | false | false |
pmarcis/nlp-example | train-truecaser.py | 1 | 1640 | """
This script trains the TrueCase System
"""
import nltk
import os
import sys
import argparse
import cPickle
script_path=os.path.dirname(os.path.realpath(__file__))
truecaser_script_dir = os.path.join(script_path,"dependencies","truecaser")
sys.path.insert(1,truecaser_script_dir)
from TrainFunctions import *
def mai... | mit | -6,295,123,703,930,949,000 | 37.139535 | 115 | 0.710976 | false | 3.628319 | false | false | false |
jrydberg/edgy | src/edgy/xml/utils.py | 1 | 1436 | from edgy.xml.element import _namespace_map
def lookupPrefix(uri):
return _namespace_map.get(uri, None)
def findtext(n, qname, default=None):
for c in n.getchildren():
#print repr(c), qname
if c.tag == str(qname):
return c.text
return default
def find(n, qname, default=None)... | mit | -5,665,341,722,381,874,000 | 18.944444 | 50 | 0.533426 | false | 3.536946 | false | false | false |
EndPointCorp/lg_ros_nodes | lg_mirror/scripts/touch_router_node.py | 1 | 1598 | #!/usr/bin/env python3
from functools import partial
import rospy
import sys
from lg_mirror.touch_router import TouchRouter
from lg_common.helpers import on_new_scene, load_director_message
from lg_msg_defs.msg import StringArray
from lg_common.helpers import handle_initial_state
from lg_mirror.touch_router import Su... | apache-2.0 | 7,490,353,579,126,744,000 | 27.535714 | 80 | 0.717772 | false | 3.451404 | false | false | false |
felipenaselva/repo.felipe | plugin.video.salts/scrapers/moviewatcher_scraper.py | 1 | 5058 | """
SALTS XBMC Addon
Copyright (C) 2014 tknorris
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 version.
T... | gpl-2.0 | 9,100,844,278,614,173,000 | 41.864407 | 167 | 0.566825 | false | 3.826021 | false | false | false |
xArm-Developer/xArm-Python-SDK | xarm/x3/utils.py | 1 | 4241 | # !/usr/bin/env python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2018, UFACTORY, Inc.
# All rights reserved.
#
# Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com>
import time
import functools
from ..core.utils.log import logger
from .code import APIState
def check_modbus_baud(baud=20... | bsd-3-clause | -534,950,684,337,418,000 | 32.928 | 116 | 0.560481 | false | 3.615516 | false | false | false |
yassersouri/omgh | src/utils.py | 1 | 1183 | import numpy
import sklearn.metrics
import os
import cv2
import numpy as np
def mean_accuracy(groundtruth, predictions):
groundtruth_cm = sklearn.metrics.confusion_matrix(groundtruth, groundtruth).astype(numpy.float32)
predictions_cm = sklearn.metrics.confusion_matrix(predictions, groundtruth).astype(numpy.fl... | mit | 7,947,427,460,157,325,000 | 26.511628 | 101 | 0.662722 | false | 2.935484 | false | false | false |
abinashk-inf/AstroBox | src/astroprint/api/cloud.py | 1 | 7527 | # coding=utf-8
__author__ = "AstroPrint Product Team <product@astroprint.com>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
import os
import json
import uuid
from flask import request, jsonify, abort
from flask.ext.login import current_user
from requests import ConnectionErr... | agpl-3.0 | 6,595,280,205,975,772,000 | 29.848361 | 107 | 0.554271 | false | 4.055496 | false | false | false |
bcgov/gwells | app/backend/aquifers/models/__init__.py | 1 | 31074 | """
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
distri... | apache-2.0 | 2,642,793,636,649,225,000 | 46.496942 | 841 | 0.661655 | false | 3.890656 | false | false | false |
wfxiang08/Nuitka | misc/make-pypi-upload.py | 1 | 2245 | #!/usr/bin/env python
# Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this fi... | apache-2.0 | -1,278,441,740,454,644,000 | 32.014706 | 78 | 0.700223 | false | 3.541009 | false | false | false |
Parallels/githooks | test.py | 1 | 19045 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:expandtab
#
'''
Unit tests for githooks
How it works:
* Create a workspace tmp/ in cwd, set up a dummy STASH_HOME,
a remote repo and a local repo there.
* Replace temp/remote_repo.git/hooks/update in the remote repo with
hook_fixture.py. The hook_fixt... | mit | -1,477,752,506,485,911,800 | 32.350263 | 123 | 0.564722 | false | 3.531059 | true | false | false |
jackyyf/paste.py | src/paste.py | 1 | 2800 | _version = '0.0.1'
import sys
import os
import argparse
from lib import logger, config, uri
from lib.provider import ProviderBase, getProvider
# Change default encoding to UTF-8
reload(sys)
sys.setdefaultencoding('UTF-8')
del sys.setdefaultencoding
sys.path = [os.path.abspath('.')] + sys.path
class _Smart_formatt... | mit | 9,107,660,406,084,468,000 | 46.457627 | 121 | 0.666786 | false | 3.553299 | false | false | false |
AnhellO/DAS_Sistemas | Ene-Jun-2021/guerrero-lopez-cristian-edgardo/PARCIAL 1 PRACTICA 1/Practica 1.py | 1 | 1520 | class Automovil:
def __init__(self, Vel, Kilometraje_Marcado, Cupo_Max):
self.Vel = Vel
self.Kilometraje_Marcado = Kilometraje_Marcado
self.Cupo_Max = Cupo_Max
def Costo(self, Cupo_Max):
Costo = self.Cupo_Max*100
return Costo
def Precio(self, Cupo_Max):
... | mit | -3,127,128,528,588,065,300 | 34.372093 | 157 | 0.589474 | false | 2.593857 | false | false | false |
Nablaquabla/sns-analysis | run-am-analysis-v4.py | 1 | 3313 | import os
import time as tm
import sys
# Handles the creation of condor files for a given set of directories
# -----------------------------------------------------------------------------
def createCondorFile(dataDir,outDir,run,day,times):
# Condor submission file name convention: run-day-time.condor
with ope... | gpl-3.0 | -7,294,928,957,756,611,000 | 31.165049 | 102 | 0.532146 | false | 3.535752 | false | false | false |
PeytonXu/learn-python | cases/henghan_oa_checkin_checkout/test_fun.py | 1 | 1511 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import logging.handlers
import configparser
import re
import time
handler = logging.handlers.TimedRotatingFileHandler(filename="test", when='s', interval=2, backupCount=5,
encoding='UTF-8')
handler.suffix = '%Y-%m-%d-%H-... | mit | 6,081,286,916,630,466,000 | 30.479167 | 105 | 0.632694 | false | 3.410835 | true | false | false |
smlbiobot/SML-Cogs | royalerant/royalerant.py | 1 | 6221 | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2017 SML
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... | mit | -1,134,916,283,987,317,100 | 35.810651 | 96 | 0.620961 | false | 3.825953 | false | false | false |
rupak0577/ginga | ginga/misc/plugins/SaveImage.py | 1 | 17618 | """Save output images local plugin for Ginga."""
from __future__ import absolute_import, division, print_function
from ginga.util.six import itervalues
from ginga.util.six.moves import map
# STDLIB
import os
import shutil
# THIRD-PARTY
from astropy.io import fits
# GINGA
from ginga.GingaPlugin import GlobalPlugin
fr... | bsd-3-clause | -5,133,613,292,894,115,000 | 33.887129 | 240 | 0.566353 | false | 3.972492 | false | false | false |
MatthieuDartiailh/eapii | eapii/core/iprops/proxies.py | 1 | 4998 | # -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# Copyright 2014 by Eapii Authors, see AUTHORS for more details.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENCE, distributed with this software.
#------------... | bsd-3-clause | -3,187,524,225,825,217,500 | 31.666667 | 79 | 0.576631 | false | 4.606452 | false | false | false |
victronenergy/dbus-fronius | test/src/fronius_sim/app.py | 1 | 5868 | #!/usr/bin/python -u
import datetime
import modbus_tcp_sim
import os
import sys
from twisted.internet import reactor
from fronius_sim import FroniusSim
app_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
bottle_dir = os.path.normpath(os.path.join(app_dir, '..', '..', 'software', 'ext', 'bottle'))
sy... | mit | -4,941,800,377,040,512,000 | 31.966292 | 134 | 0.605658 | false | 2.794286 | false | false | false |
cloud9ers/j25framework | j25/loaders/ControllerLoader.py | 1 | 2345 | from j25.web import Controller
import inspect
import logging
import pkgutil
import traceback
logger = logging.getLogger("ControllerLoader")
class AutoControllerLoader(object):
@classmethod
def load(cls, app_name, router, dispatcher, package_or_packages):
if not isinstance(package_or_packages, list):
... | lgpl-3.0 | -2,055,934,310,574,117,400 | 51.133333 | 180 | 0.53049 | false | 5 | false | false | false |
nejstastnejsistene/gardendb | gardendb/postgres.py | 1 | 5218 | import binascii
import threading
import psycopg2
from psycopg2.extensions import new_type, register_type
try:
import cPickles as pickle
except ImportError:
import pickle
from . import BaseGarden
def adapt_bytea(obj):
'''Adapt an object to a bytea by pickling.'''
if isinstance(obj, str):
# Co... | bsd-3-clause | 2,349,762,603,324,349,000 | 28.150838 | 72 | 0.561518 | false | 3.873794 | false | false | false |
zhaipro/AlphaLineupPuzzle | AlphaLineupPuzzle/models/__init__.py | 1 | 1118 | # coding: utf-8
import numpy as np
import chainer.links as L
import chainer.functions as F
from chainer import serializers, Variable
import policy
from AlphaLineupPuzzle.preprocessing import preprocessing
def load_policy_network(name):
in_dim = preprocessing.state_to_tensor.features
out_dim = preprocessing.a... | mit | 446,345,322,601,292,350 | 28.135135 | 74 | 0.648423 | false | 3.358255 | false | false | false |
estaban/pyload | module/plugins/hoster/YoupornCom.py | 1 | 1531 | # -*- coding: utf-8 -*-
import re
from module.plugins.Hoster import Hoster
class YoupornCom(Hoster):
__name__ = "YoupornCom"
__type__ = "hoster"
__pattern__ = r'http://(?:www\.)?youporn\.com/watch/.+'
__version__ = "0.2"
__description__ = """Youporn.com hoster plugin"""
__author_name__ = "wil... | gpl-3.0 | 1,178,821,542,456,942,600 | 28.442308 | 111 | 0.556499 | false | 3.448198 | false | false | false |
ExCiteS/geokey-airquality | geokey_airquality/serializers.py | 1 | 10302 | """All serializers for the extension."""
import json
from django.core.exceptions import ValidationError
from django.contrib.gis.geos import Point
from django.utils import timezone
from django.utils.dateparse import parse_datetime
from rest_framework.serializers import BaseSerializer
from geokey_airquality.models im... | mit | 3,727,138,254,284,817,400 | 28.019718 | 78 | 0.553582 | false | 5.158738 | false | false | false |
arnau126/django-mysql | src/django_mysql/forms.py | 1 | 9665 | import json
from django import forms
from django.core import validators
from django.core.exceptions import ValidationError
from django.utils.text import format_lazy
from django.utils.translation import ugettext_lazy as _
from django_mysql.validators import (
ListMaxLengthValidator,
ListMinLengthValidator,
... | bsd-3-clause | -4,095,754,749,629,425,700 | 32.793706 | 88 | 0.455354 | false | 5.213053 | false | false | false |
takeflight/wagtailannotatedimage | wagtailannotatedimage/edit_handlers.py | 1 | 2726 | import json
from django import forms
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from wagtail.wagtailadmin.edit_handlers import (BaseCompositeEditHandler,
FieldPanel, widget_with_script)
from wagtail.wagtailimages.edi... | bsd-3-clause | -207,208,430,859,362,340 | 36.861111 | 80 | 0.628393 | false | 4.074738 | false | false | false |
ultrabug/py3status | py3status/modules/wanda_the_fish.py | 1 | 5557 | """
Display a fortune-telling, swimming fish.
Wanda has no use what-so-ever. It only takes up disk space and compilation time,
and if loaded, it also takes up precious bar space, memory, and cpu cycles.
Anybody found using it should be promptly sent for a psychiatric evaluation.
Configuration parameters:
cache_ti... | bsd-3-clause | -7,311,590,463,705,585,000 | 29.032432 | 86 | 0.559935 | false | 3.353048 | false | false | false |
bmccary/csvu | csvu/tail.py | 1 | 1800 |
import traceback
from csvu import (
reader_make,
writer_make,
)
from csvu.cli import (
default_arg_parser,
positive_int,
)
def cli_arg_parser():
description = 'CSVU Tail is like GNU Tail, but for CSV files.'
parser = default_arg_parser(
descripti... | mit | -4,675,949,467,743,082,000 | 20.95122 | 66 | 0.455556 | false | 4.368932 | false | false | false |
chkothe/pylsl | pylsl/pylsl.py | 1 | 51549 | """Python API for the lab streaming layer.
The lab streaming layer provides a set of functions to make instrument data
accessible in real time within a lab network. From there, streams can be
picked up by recording programs, viewing programs or custom experiment
applications that access data streams in real time.
The... | mit | 5,422,760,942,595,016,000 | 40.571774 | 88 | 0.599721 | false | 4.23853 | false | false | false |
ArcAwe/coseq | Software/RaspberryPi/main/xbox_read.py | 1 | 1990 |
# from https://github.com/zephod/lego-pi/blob/master/lib/xbox_read.py
from os import popen
from sys import stdin
import re
import time
s = re.compile('[ :]')
class Event:
def __init__(self,key,value,old_value):
self.key = key
self.value = value
self.old_value = old_value
def is_press... | mit | 3,269,753,871,665,201,700 | 22.702381 | 75 | 0.513568 | false | 3.251634 | false | false | false |
igorvc/iso8583py | examples/echoClient.py | 1 | 2943 | """
(C) Copyright 2009 Igor V. Custodio
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
any later version.
This program is distributed in the hope that ... | gpl-3.0 | 1,896,742,353,546,762,200 | 22.731092 | 90 | 0.638464 | false | 3.049741 | false | false | false |
w1z2g3/crossbar | crossbar/adapter/rest/test/test_signature.py | 1 | 11871 | #####################################################################################
#
# Copyright (C) Tavendo GmbH
#
# Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you
# have purchased a commercial license), the license terms below apply.
#
# Should you enter into a separate licen... | agpl-3.0 | 3,433,306,572,119,676,000 | 35.082067 | 96 | 0.61486 | false | 4.364338 | true | false | false |
Southpaw-TACTIC/TACTIC | src/tactic/startup/first_run_init.py | 1 | 4352 | ###########################################################
#
# Copyright (c) 2005-2008, 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 without written ... | epl-1.0 | 8,725,499,631,576,695,000 | 31.969697 | 88 | 0.55239 | false | 3.981702 | true | false | false |
kkamkou/gitmostwanted.com | tests/unit/lib/test_bigquery.py | 1 | 2352 | from unittest import TestCase
from gitmostwanted.lib.bigquery.result import ResultJob
class LibBigQueryResultTestCase(TestCase):
def setUp(self):
pass
def test_convert_incoming_obj(self):
result = ResultJob(self.response_example())
self.assertEqual(len(result), 2)
self.assert... | mit | -4,338,712,916,941,077,500 | 30.36 | 85 | 0.39966 | false | 4.761134 | true | false | false |
jakobzhao/qq-xingyun | qqcrawler/report.py | 1 | 2335 | # !/usr/bin/python
# -*- coding: utf-8 -*-
#
# Created on Oct 16, 2015
# @author: Bo Zhao
# @email: bo_zhao@hks.harvard.edu
# @website: http://yenching.org
# @organization: Harvard Kennedy School
# libraries
import socket
import smtplib
from pymongo import MongoClient
from qqcrawler.settings import ... | lgpl-3.0 | -3,129,869,230,584,553,500 | 27.47561 | 84 | 0.604711 | false | 3.080475 | false | false | false |
eustislab/horton | doc/conf.py | 1 | 9564 | # -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2015 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | gpl-3.0 | -3,263,852,963,252,831,000 | 32.795053 | 95 | 0.700544 | false | 3.699807 | false | false | false |
chipaca/snapcraft | snapcraft/internal/project_loader/_extensions/kde_neon.py | 1 | 4701 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2018-2019 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in ... | gpl-3.0 | -2,491,254,435,194,227,700 | 34.613636 | 94 | 0.581578 | false | 3.927318 | false | false | false |
mitodl/open-discussions | notifications/api.py | 1 | 9247 | """Notifications API"""
import logging
from django.conf import settings
from django.db.models import Q
from django.contrib.auth.models import User
from channels.models import Subscription, ChannelGroupRole, Channel
from channels.api import get_admin_api
from channels.constants import ROLE_MODERATORS
from notificatio... | bsd-3-clause | 3,742,379,848,601,232,400 | 34.293893 | 88 | 0.670704 | false | 4.380388 | false | false | false |
jaredscarr/django-imager | imagersite/imagersite/settings.py | 1 | 4051 | """
Django settings for imagersite project.
Generated by 'django-admin startproject' using Django 1.9.2.
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 os... | mit | 2,117,890,535,857,599,700 | 24.639241 | 91 | 0.691681 | false | 3.489233 | false | false | false |
xswxm/nrf24-injection | Experiments/Scripts/ping.py | 1 | 1628 | #!/usr/bin/env python2
'''
Author: xswxm
Blog: xswxm.com
This script will measure the successful pings per seconds.
e.g.: sudo python ping.py -l -a 61:8E:9C:CD:03 -f 74 -t 0 -r 0
'''
import sys, time, threading
from lib import common
common.init_args('./ping.py')
common.parser.add_argument('-a', '--address', type=str... | gpl-3.0 | 6,024,926,676,848,217,000 | 28.089286 | 129 | 0.677518 | false | 3.100952 | false | false | false |
REGOVAR/Regovar | regovar/core/managers/pipeline_manager.py | 1 | 12599 | #!env/python3
# coding: utf-8
try:
import ipdb
except ImportError:
pass
import os
import shutil
import json
import zipfile
import datetime
import time
import uuid
import subprocess
import requests
from config import *
from core.framework.common import *
from core.framework.postgresql import execute
from co... | agpl-3.0 | -2,622,789,942,192,497,000 | 35.625 | 159 | 0.560124 | false | 4.442525 | false | false | false |
asanfilippo7/osf.io | website/addons/wiki/model.py | 1 | 8106 | # -*- coding: utf-8 -*-
import datetime
import functools
import logging
from bleach import linkify
from bleach.callbacks import nofollow
from website.models import NodeLog
import markdown
from markdown.extensions import codehilite, fenced_code, wikilinks
from modularodm import fields
from framework.forms.utils impo... | apache-2.0 | 2,979,544,810,616,633,300 | 30.297297 | 93 | 0.613003 | false | 4.127291 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.