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 |
|---|---|---|---|---|---|---|---|---|---|---|
MTASZTAKI/ApertusVR | plugins/physics/bulletPhysics/3rdParty/bullet3/examples/pybullet/examples/frictionCone.py | 2 | 1428 | import pybullet as p
import time
import math
p.connect(p.GUI)
useMaximalCoordinates = False
p.setGravity(0, 0, -10)
plane = p.loadURDF("plane.urdf", [0, 0, -1], useMaximalCoordinates=useMaximalCoordinates)
p.setRealTimeSimulation(0)
velocity = 1
num = 40
p.configureDebugVisualizer(p.COV_ENABLE_GUI, 0)
p.configureDe... | mit | -7,391,915,528,216,929,000 | 30.043478 | 89 | 0.69888 | false |
mfasDa/raadev | analysis/base/WeightHandler.py | 1 | 4146 | '''
Created on 26.09.2014
@author: markusfasel
'''
from base.DataCollection import DataCollection, Datapoint
class PtHatBin:
"""
Data entry of the pt-hat bin
"""
def __init__(self, binId, weighthist, trialsHist):
"""
Construct pt-hat bin. Automatically calculates the weight
... | gpl-3.0 | 6,686,758,008,336,999,000 | 28.834532 | 114 | 0.543898 | false |
adist/drunken-sansa | openerp/addons/web_gallery/__openerp__.py | 1 | 2457 | # -*- coding: utf-8 -*-
##############################################################################
#
# Authors: Boris Timokhin, Alexey Samoukin, Dmitry Zhuravlev-Nevsky.
#
# Copyright InfoSreda LLC.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 | -8,003,031,910,546,322,000 | 38 | 173 | 0.632479 | false |
sinnwerkstatt/landmatrix | apps/landmatrix/models/deal.py | 1 | 45041 | import json
from typing import Optional, Set
from django.contrib.postgres.fields import ArrayField as _ArrayField, JSONField
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import models, transaction
from django.db.models import Sum, F
from django.utils import timezone
from djang... | agpl-3.0 | -6,320,456,179,746,793,000 | 33.431193 | 102 | 0.579847 | false |
team172011/ps_cagebot | helper/res_ex.py | 1 | 1351 | """
Pyhton script for resizing existing images
@author: wimmer simon-justus
@param dir: 1 directory that contains the raw data
@param w: width of file
@param h: height of file
"""
import sys
import os
import cv2
import numpy as np
from time import sleep
# function for resizing existing images
def resize_images(dir,w... | mit | -462,203,332,837,399,500 | 27.145833 | 84 | 0.597335 | false |
NSLS-II-HXN/ipython_ophyd | profile_collection/startup/90-alignment.py | 1 | 21703 | from scipy.optimize import curve_fit
import scipy
import pickle
import numpy as np
def erfunc3(z,a,b,c,d,e):
return d+e*z+c*(scipy.special.erf((z-a)/(b*np.sqrt(2.0)))+1.0)
def erfunc4(z,a,b,c,d,e):
return d+e*z+c*(1.0-scipy.special.erf((z-a)/(b*np.sqrt(2.0))))
def erfunc1(z,a,b,c):
return c*(scipy.special... | bsd-2-clause | -1,949,531,605,902,140,400 | 33.7248 | 132 | 0.561766 | false |
gabrielelanaro/solfege | solfege/tests/test_utils.py | 1 | 1170 | # Solfege - free ear training software
# Copyright (C) 2007, 2008 Tom Cato Amundsen
# License is GPL, see file COPYING
from __future__ import absolute_import
import unittest
from solfege.utils import string_get_line_at
class TestStringGetLineAt(unittest.TestCase):
def test1(self):
self.assertEquals(strin... | gpl-3.0 | 686,349,003,247,011,200 | 45.8 | 86 | 0.635043 | false |
glyuck/pyazure | pyazure/storage/blob.py | 1 | 4994 | #!/usr/bin/env python
# encoding: utf-8
"""
Python wrapper around Windows Azure storage and management APIs
Authors:
Sriram Krishnan <sriramk@microsoft.com>
Steve Marx <steve.marx@microsoft.com>
Tihomir Petkov <tpetkov@gmail.com>
License:
GNU General Public Licence (GPL)
This file is part of ... | gpl-3.0 | 3,742,457,949,542,161,400 | 40.272727 | 142 | 0.639167 | false |
bilke/OpenSG-1.8 | Tools/osgBench/run2.py | 2 | 1104 | import sys
from osgbench import *
def usage():
print "usage."
return -1
def main(argv=sys.argv):
if len(argv) != 2:
return usage()
filename = argv[1]
print "Loading %s..." % filename
scene = loadScene(filename)
print "Traversing..."
travscene = scene.clone()
g = createGr... | lgpl-2.1 | 3,164,337,428,044,516,400 | 18.368421 | 44 | 0.583333 | false |
finder/mako_base | comments/migrations/0001_initial.py | 1 | 2619 | # 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 'Comment'
db.create_table('comments_comment', (
('created', self.gf('django... | mit | -989,954,441,979,735,000 | 49.365385 | 136 | 0.569683 | false |
meghana0507/grpc-java-poll | lib/netty/protobuf/python/google/protobuf/internal/unknown_fields_test.py | 1 | 10555 | #! /usr/bin/python
# -*- coding: utf-8 -*-
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the f... | bsd-3-clause | 4,768,307,321,628,404,000 | 38.981061 | 80 | 0.742397 | false |
omry/omegaconf | tests/test_config_eq.py | 1 | 5811 | from typing import Any
from pytest import mark, param
from omegaconf import AnyNode, DictConfig, ListConfig, OmegaConf
from tests import Group, User
@mark.parametrize(
"i1,i2",
[
# === LISTS ===
# empty list
param([], [], id="empty"),
# simple list
param(["a", 12, "15... | bsd-3-clause | -2,212,196,357,625,401,300 | 33.182353 | 103 | 0.467389 | false |
forin-xyz/statistical-learning-method | naive_bayes_MLE.py | 1 | 1494 | import numpy as np
def naive_bayes_MLE_train(x, X, y, xl=None, yl=None):
x = np.array(x)
X = np.array(X)
y = np.array(y)
N, n = X.shape
if not xl:
xl = [list(set(X[:,i])) for i in range(n)]
if not yl:
yl = list(set(y))
K = len(yl)
# 统计y各个结果出现的频次
yf = np.array([(y==yl... | mit | 6,628,210,675,403,508,000 | 26.461538 | 67 | 0.452381 | false |
virt-who/virt-who | tests/test_config_section_esx.py | 1 | 1845 | # -*- coding: utf-8 -*-
from __future__ import print_function
#
# 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 (at your option) any later version.
#
# Thi... | gpl-2.0 | 6,993,055,215,667,175,000 | 28.285714 | 81 | 0.651491 | false |
rzinkstok/skymap | skymap/stars/cluster_points.py | 1 | 5734 | import numpy as np
from skymap.geometry import rotation_matrix, sky2cartesian, cartesian2sky, distance
# Brute force clustering
def brute_cluster(points, threshold):
"""Naive method for clustering points that are closer than the given threshold.
Args:
points (numpy.ndarray): a (Nx2) array containing ... | gpl-3.0 | 479,544,851,786,517,950 | 31.39548 | 120 | 0.606209 | false |
rikirenz/inspire-next | inspirehep/modules/authors/__init__.py | 1 | 1069 | # -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2014-2017 CERN.
#
# INSPIRE 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 ... | gpl-3.0 | 5,031,681,870,383,006,000 | 35.862069 | 77 | 0.75304 | false |
tutRPi/Snake-Game-MAX7219 | Point.py | 1 | 1275 | #!/usr/bin/env python
# ---------------------------------------------------------
# Filename: Points.py
# ---------------------------------------------------------
# 2D Point Class with elementary functions
#
# v1.0
# F.Stern 2014
# ---------------------------------------------------------
class Point(object):
__slot... | mit | -1,374,413,793,477,428,200 | 31.717949 | 99 | 0.523922 | false |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/campaign_simulation_service/transports/base.py | 1 | 3788 | # -*- 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 | -8,053,536,719,708,833,000 | 36.137255 | 79 | 0.656283 | false |
luiscape/hdxscraper-worldpop | collector/parser.py | 1 | 2112 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
PARSER:
-------
This parser will intake dataverse dataset classes and
generate an HDX-like dictionary. It was designed to
register datasets in HDX in a posterior process.
'''
import os
import sys
import json
import requests
from copy import copy
from slugify import slugif... | mit | 3,010,196,625,316,848,600 | 31.492308 | 167 | 0.586174 | false |
ktsitsikas/odemis | src/odemis/util/test/img_test.py | 1 | 23632 | # -*- coding: utf-8 -*-
'''
Created on 19 Sep 2012
@author: piel
Copyright © 2012-2013 Éric Piel & Kimon Tsitsikas, Delmic
This file is part of Odemis.
Odemis 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
Fo... | gpl-2.0 | -1,478,070,857,941,330,700 | 35.403698 | 92 | 0.573859 | false |
jtara1/MiscScripts | misc_scripts/images_to_pdf.py | 1 | 1706 | from fpdf import FPDF
import os
import glob
import PIL
from PIL import Image
import click
__doc__ = """
saves each image in a directory on a page of a newly created PDF
"""
letter_width_inches = 8.5
letter_height_inches = 11
def images_to_pdf(path, offset_coords=(-5, 0), ext='.png'):
path = os... | apache-2.0 | -5,656,233,141,856,130,000 | 22.724638 | 88 | 0.576202 | false |
theflockers/sober-filter | modules/content_filter/antispam.py | 1 | 7217 | import socket
import hashlib
import email
import sober.config
import sober.datasource
import others.spamc as spamc
import others.bogofilter as bogofilter
import sober.definitions as defines
class Scanner:
ST_OK = 0
ST_FOUND = 1
ST_ERROR = -1
ST_SCORE = 0
AGENT = ''
handler = None
ds ... | gpl-2.0 | 3,543,545,112,940,012,500 | 40.959302 | 134 | 0.528752 | false |
lyzardiar/RETools | PublicTools/bin/tools/PackTool/src/process/PackProcess.py | 1 | 11517 | #coding=utf-8
'''
Created on 2015骞�12鏈�24鏃�
@author: Administrator
'''
import os
from queue import Queue
import re
import shutil
import Config
from process import Context, queueProcess, execCmd
from util import PackHelper, Log, Constant
def process(ctx):
if run(ctx, removebom) :
Log.pr... | mit | 5,479,199,132,816,214,000 | 34.759197 | 137 | 0.633518 | false |
orbkit/orbkit | orbkit/read/tools.py | 1 | 4394 | '''
Some tools needed by Orbkit functions
'''
import gzip
import numpy
import os
import re
from orbkit.display import display
from orbkit.tools import *
from orbkit import options
def descriptor_from_file(filename, index=0, ci_descriptor=False):
from .tar import is_tar_file, get_file_from_tar
if is_tar_file(fil... | lgpl-3.0 | 2,306,039,931,406,107,000 | 29.303448 | 125 | 0.636322 | false |
jayshonzs/ESL | Boosting/AdaBoost_M1_stump.py | 1 | 4396 | '''
Created on 2014-7-21
@author: xiajie
'''
import numpy as np
'''
Useful for simple classifiers
'''
def simulate_data():
kai = 9.34
X = np.zeros((200,10))
Y = np.zeros(200)
for i in range(200):
x = []
for j in range(10):
xj = np.random.standard_normal(1)[0]
x... | mit | -5,393,195,133,004,806,000 | 22.382979 | 93 | 0.44586 | false |
dhermes/bezier | src/python/bezier/_base.py | 1 | 3784 | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | 7,216,606,857,195,215,000 | 29.764228 | 78 | 0.62685 | false |
postlund/home-assistant | homeassistant/components/mcp23017/binary_sensor.py | 1 | 2708 | """Support for binary sensor using I2C MCP23017 chip."""
import logging
from adafruit_mcp230xx.mcp23017 import MCP23017 # pylint: disable=import-error
import board # pylint: disable=import-error
import busio # pylint: disable=import-error
import digitalio # pylint: disable=import-error
import voluptuous as vol
fr... | apache-2.0 | 8,175,896,494,191,840,000 | 29.772727 | 86 | 0.671344 | false |
jeremiah-c-leary/vhdl-style-guide | vsg/rules/concurrent/rule_008.py | 1 | 8198 |
from vsg import parser
from vsg import rule
from vsg import token
from vsg import violation
from vsg.rules import utils as rules_utils
from vsg.vhdlFile import utils
lTokens = []
lTokens.append(parser.comment)
lSkip = []
lSkip.append(parser.comment)
oLeftToken = token.architecture_body.begin_keyword
oRightToken ... | gpl-3.0 | -2,131,509,014,755,846,700 | 39.584158 | 127 | 0.537814 | false |
japareaggae/smtracker-python | smtracker/utils/parse.py | 1 | 14941 | #!/usr/bin/python3
# Copyright (C) 2016 Renan Guilherme Lebre Ramos
# This file is a part of smtracker.
#
# smtracker 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 y... | gpl-3.0 | 1,061,561,790,680,995,600 | 30.857143 | 87 | 0.578475 | false |
rrallo/GenomeBrowser | GenomeBrowser/mkII.py | 1 | 5855 | import os
import sys
import time
from multiprocessing import Process
from wikitools import wiki, category, page
import json
VCF_FILE = 'data/example.vcf'
OUTPUT_TEMPLATE = 'snpediaMap'
LOCAL_SNPEDIA = 'data/localsnpedia.json'
LOCAL_RSNUMS = 'data/localrsnums.txt'
NUM_OF_PROCESSES = 10
if(not os.path.isfi... | apache-2.0 | -9,495,163,808,366,236 | 27.872449 | 110 | 0.642357 | false |
wtsi-hgi/CoGS-Webapp | cogs/scheduler/constants.py | 1 | 2866 | """
Copyright (c) 2017, 2018 Genome Research Ltd.
Authors:
* Christopher Harrison <ch12@sanger.ac.uk>
This program 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 License, or (at
y... | agpl-3.0 | -8,237,669,403,853,655,000 | 34.382716 | 87 | 0.659456 | false |
maruel/fortuna | testdata/generate_generator.py | 1 | 1027 | #!/usr/bin/env python
# Copyright 2013 Marc-Antoine Ruel. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Generates the test data for generator_test.go in generator.json.
The data is base64 encoded.
"""
import json
import os... | apache-2.0 | 8,679,376,572,794,414,000 | 19.959184 | 75 | 0.605648 | false |
CoSandu/PythonCourses | Database_with_python/week_3/tracks.py | 1 | 2714 | import xml.etree.ElementTree as ET
import sqlite3
conn = sqlite3.connect('trackdb.sqlite')
cur = conn.cursor()
# Make some fresh tables using executescript()
cur.executescript('''
DROP TABLE IF EXISTS Artist;
DROP TABLE IF EXISTS Album;
DROP TABLE IF EXISTS Track;
DROP TABLE IF EXISTS Genre;
CREATE TABLE Artist (
... | apache-2.0 | -3,735,514,575,106,256,000 | 26.693878 | 68 | 0.627119 | false |
ssoto/hack4medAND | lisa_graph/lisa_search/views.py | 1 | 3321 | from django.shortcuts import render
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404, redirect
from lisa_search.forms import UploadDataForm
from lisa_modules.csv_reader import CSV
from lisa_models.table import Table_Model
from lisa_modules.db_middleware impor... | gpl-2.0 | 7,278,657,375,242,269,000 | 35.9 | 94 | 0.609756 | false |
tjcsl/ion | intranet/apps/users/migrations/0016_auto_20170802_1355.py | 1 | 1233 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-02 17:55
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('users', '0015_auto_2017073... | gpl-2.0 | -1,936,351,148,027,555,600 | 33.25 | 147 | 0.580697 | false |
ysegorov/wt | tests/wt/jinja/test_jinja.py | 1 | 2505 | # -*- coding: utf-8 -*-
from unittest import mock
import jinja2
import pytest
from wt import jinja
def describe_Registry():
def must_properly_register_filter(jinja_registry):
assert len(list(jinja_registry)) == 0
def fltr(d):
return d
res = jinja_registry.add(fltr)
... | mit | -8,136,741,219,537,568,000 | 21.981651 | 66 | 0.584032 | false |
rgant/saas-api-boilerplate | tests/ourapi/test_relations.py | 1 | 7571 | """
Tests for Related model endpoints.
"""
from __future__ import (absolute_import, division, print_function, unicode_literals)
try:
from builtins import * # pylint: disable=unused-wildcard-import,redefined-builtin,wildcard-import
except ImportError:
import sys
print("WARNING: Cannot Load builtins for py3 ... | gpl-3.0 | 7,184,175,165,478,859,000 | 48.162338 | 122 | 0.568749 | false |
FederatedAI/FATE | python/fate_client/pipeline/param/cross_validation_param.py | 1 | 3233 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE 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/lic... | apache-2.0 | -6,524,227,808,206,576,000 | 38.91358 | 128 | 0.69069 | false |
adorton-adobe/user-sync.py | user_sync/app.py | 1 | 24682 | # Copyright (c) 2016-2017 Adobe Inc. All rights reserved.
#
# 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, modif... | mit | -1,218,348,103,532,224,800 | 45.307692 | 124 | 0.662102 | false |
BrechtBa/webopt | django/customauth/migrations/0001_initial.py | 1 | 2816 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-14 13:59
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0007_alter_validators_add_error_mess... | gpl-3.0 | 1,186,491,150,130,176,500 | 66.047619 | 266 | 0.649148 | false |
edineicolli/daruma-exemplo-python | scripts/fiscal/ui_fiscal_rverificarnumeroseriecodificado.py | 1 | 4510 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_fiscal_rverificarnumeroseriecodificado.ui'
#
# Created: Mon Nov 24 22:26:36 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
from pydaruma... | gpl-2.0 | 4,459,383,970,151,381,500 | 60.739726 | 261 | 0.761926 | false |
RedHatQE/cfme_tests | cfme/tests/intelligence/reports/test_widgets.py | 1 | 8291 | # -*- coding: utf-8 -*-
import fauxfactory
import pytest
from cfme import test_requirements
from cfme.automate.simulation import simulate
from cfme.intelligence.reports.dashboards import DefaultDashboard
from cfme.intelligence.reports.widgets import AllDashboardWidgetsView
from cfme.utils.appliance.implementations.ui ... | gpl-2.0 | 836,231,613,049,815,400 | 36.515837 | 99 | 0.627669 | false |
hbiyik/tribler | src/tribler-core/tribler_core/modules/metadata_store/restapi/channels_endpoint.py | 1 | 16551 | import base64
import codecs
from binascii import unhexlify
from aiohttp import ClientSession, ContentTypeError, web
from aiohttp_apispec import docs, json_schema
from ipv8.REST.schema import schema
from ipv8.database import database_blob
from marshmallow.fields import Boolean, Dict, Integer, String
from pony.orm i... | lgpl-3.0 | 263,258,750,905,813,950 | 44.345205 | 120 | 0.565404 | false |
molmod/yaff | yaff/analysis/test/test_blav.py | 1 | 1509 | # -*- coding: utf-8 -*-
# YAFF is yet another force-field code.
# Copyright (C) 2011 Toon Verstraelen <Toon.Verstraelen@UGent.be>,
# Louis Vanduyfhuys <Louis.Vanduyfhuys@UGent.be>, Center for Molecular Modeling
# (CMM), Ghent University, Ghent, Belgium; all rights reserved unless otherwise
# stated.
#
# This file is pa... | gpl-3.0 | 5,426,821,956,627,277,000 | 33.295455 | 84 | 0.70444 | false |
thombashi/pytablewriter | pytablewriter/writer/_table_writer.py | 1 | 39176 | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import abc
import copy
import math
import warnings
from typing import Any, Dict, List, Mapping, Optional, Sequence, Union, cast
import typepy
from dataproperty import (
ColumnDataProperty,
DataProperty,
DataPropertyExtractor,
Form... | mit | 1,817,155,229,100,829,200 | 32.115807 | 100 | 0.591459 | false |
kanairen/RegularIcosahedronDict | src/view/qt_gl.py | 1 | 7087 | #!/usr/bin/env python
# coding: utf-8
from PyQt4 import QtCore, QtGui, QtOpenGL
from OpenGL import GL
from src.util.qt_util import Color
class GLWidget(QtOpenGL.QGLWidget):
"""
OpenGLを用いた3D描画を行うQtウィジェットクラス
"""
class GLLight(object):
def __init__(self, type, position, diffuse):
se... | mit | -1,250,920,222,807,381,000 | 26.532189 | 75 | 0.53749 | false |
mattilyra/gensim | gensim/test/test_doc2vec.py | 1 | 27194 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
Automated tests for checking transformation algorithms (the models package).
"""
from __future__ import with_statement
import log... | lgpl-2.1 | -4,429,006,509,720,186,000 | 42.691318 | 119 | 0.628091 | false |
Sildra/PyTester | PyTester/data/Color.py | 1 | 1677 | """ Module used to colorize strings """
red_color = ""
green_color = ""
yellow_color = ""
orange_color = ""
blue_color = ""
violet_color = ""
reset = ""
def debug():
return violet_color + "[DEBUG]" + reset
def module():
return violet_color + "[MODULE]" + reset
def core():
return orange_color + "[_COR... | apache-2.0 | -3,903,670,671,379,794,400 | 16.28866 | 44 | 0.60167 | false |
AEDA-Solutions/matweb | backend/Database/Controllers/Ass_turma_sala_horario.py | 1 | 1420 | from Framework.BancoDeDados import BancoDeDados
from Database.Models.Ass_turma_sala_horario import Ass_turma_sala_horario as ModelAss_turma_sala_horario
class Ass_turma_sala_horario(object):
def pegarAss_turma_sala_horarios(self, condicao, valores):
associacoes = []
for associacao in BancoDeDados().consultarM... | mit | 4,347,031,136,120,827,000 | 53.615385 | 188 | 0.760563 | false |
google/brax | brax/tests/mujoco_test.py | 1 | 2866 | # Copyright 2021 The Brax 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 required by applicable law or agreed to in wri... | apache-2.0 | 4,757,807,615,098,514,000 | 39.942857 | 133 | 0.634334 | false |
Koellmannco/Sturmfrei-API | project/user.py | 1 | 3440 | from project.database import db
from sqlalchemy.sql import func
from flask import g
from marshmallow import Schema, fields, post_load
from itsdangerous import SignatureExpired, BadSignature, TimedJSONWebSignatureSerializer
from flask_httpauth import HTTPBasicAuth
from project.security import pwd_context
import os
aut... | mit | 5,093,339,332,674,536,000 | 30.272727 | 115 | 0.639826 | false |
davidam/python-examples | sparql/surnames.py | 1 | 1463 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2019 David Arroyo Menéndez
# Author: David Arroyo Menéndez <davidam@gnu.org>
# Maintainer: David Arroyo Menéndez <davidam@gnu.org>
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as p... | gpl-3.0 | -5,587,727,338,471,887,000 | 31.444444 | 84 | 0.718493 | false |
Met48/League-of-Legends-DB | loldb/skin.py | 1 | 1036 | class Skin(object):
id = -1
name = ''
portrait_path = ''
splash_path = ''
is_base = False
champion_id = -1
rank = -1
def __init__(self, internal_name):
self.internal_name = internal_name
def __lt__(self, other):
return self.rank < other.rank
def __repr__(self):... | mit | 6,803,336,650,610,015,000 | 24.9 | 79 | 0.612934 | false |
fcarsten/ai_playground | legacy/battle_toe.py | 1 | 3977 | #
# Copyright 2017 Carsten Friedrich (Carsten.Friedrich@gmail.com). All rights reserved
#
# Based on: http://efavdb.com/battleship/ by Jonathan Landy
#
import tensorflow as tf
import numpy as np
import legacy.ttt_board as ttt
BOARD_SIZE = 9
hidden_units = BOARD_SIZE
output_units = BOARD_SIZE
input_positions = tf.pl... | apache-2.0 | 2,107,856,686,815,271,200 | 30.314961 | 115 | 0.62434 | false |
samjabrahams/anchorhub | anchorhub/lib/armedswitch.py | 1 | 2249 | """
Class file for the ArmedSwitch class
"""
class ArmedSwitch(object):
"""
ArmedSwitch is a boolean switch that must be explicitly re-armed after
each time it switches, or else it keeps the same state.
"""
# __init__: ArmedSwitch initializer
def __init__(self, switched=False, armed=True):
... | apache-2.0 | -1,738,622,528,995,806,200 | 27.1125 | 80 | 0.573144 | false |
GNS3/vboxwrapper | setup.py | 1 | 1941 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013 GNS3 Technologies Inc.
#
# 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 (at your option) any later version.
... | gpl-2.0 | -8,821,394,577,161,628,000 | 37.82 | 81 | 0.667182 | false |
nullic/DPLocalizationManager | dpstrings.py | 1 | 6046 | import io
import argparse
import codecs
import os
import re
class DPStringExtractor:
pattern_src_1 = re.compile("(?<=DPLocalizedString\(@\").*?(?=\")")
pattern_src_2 = re.compile(".*?\.autolocalizationKey\s*=\s*@?\"(.*?)\"")
pattern_src_3 = re.compile("\[.*?\ssetAutolocalizationKey:\s*@\"(.*?)\"\]")
pa... | mit | 4,202,086,629,707,676,700 | 36.320988 | 139 | 0.559709 | false |
Autostew/autostew | autostew_back/event_handlers/notification_winner_finished_race.py | 1 | 1059 | from autostew_back.event_handlers.base_event_handler import BaseEventHandler
from autostew_web_enums.models import EventType, SessionStage
from autostew_web_session.models.event import Event
first_player_finished = [
"",
"",
"Congratulations to {winner_name} for winning this race!",
"See this race resu... | agpl-3.0 | -2,808,436,810,670,851,000 | 35.517241 | 81 | 0.68933 | false |
stevenjson/CuisineClassifying | RecipeScraper.py | 1 | 2782 | import os
from bs4 import BeautifulSoup
import urllib.request
import argparse
def ParseRecipe(html):
soup = BeautifulSoup(html, 'html.parser')
ingredient_list = []
instruction_list = []
for ingredient in soup.find_all("span", class_="recipe-ingred_txt added"):
ingredient_list.append(ingredi... | mit | 2,806,399,432,955,648,500 | 25.495238 | 107 | 0.55248 | false |
UNINETT/nav | setup.py | 1 | 1774 | import os
from glob import glob
from setuptools import setup, find_packages
from distutils.command.build import build
TOP_SRCDIR = os.path.abspath(os.path.dirname(__file__))
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def etc_files():
return [(d, [os.path.join(d, f) ... | gpl-2.0 | -5,029,524,893,007,105,000 | 25.477612 | 77 | 0.598083 | false |
datascopeanalytics/nhl-streak | Codes/parse_nhl.py | 1 | 5658 | import sys
from bs4 import BeautifulSoup
import glob
import pickle
from pprint import pprint
filenames = glob.glob('../web/data/html_per_year/*')
filenames = sorted(filenames,reverse=True)
# filenames = ['../web/data/html_per_year/NHL_1993_games.html']
nhl_dict = {}
tie_count=0
game_count=0
ppg = []
for fname in f... | mit | 7,000,501,841,323,862,000 | 28.936508 | 73 | 0.486921 | false |
jortel/gofer | src/gofer/messaging/adapter/connect.py | 1 | 1190 | from time import sleep
from logging import getLogger
from gofer import Thread
from gofer.messaging.adapter.reliability import YEAR
DELAY = 10
MAX_DELAY = 90
RETRIES = YEAR / MAX_DELAY
DELAY_MULTIPLIER = 1.2
log = getLogger(__name__)
def retry(*exception):
def _fn(fn):
def inner(connection):
... | lgpl-2.1 | -4,496,474,766,036,852,000 | 26.674419 | 64 | 0.458824 | false |
mjg2203/edx-platform-seas | common/lib/xmodule/xmodule/modulestore/__init__.py | 1 | 16932 | """
This module provides an abstraction for working with XModuleDescriptors
that are stored in a database an accessible using their Location as an identifier
"""
import logging
import re
from collections import namedtuple
from abc import ABCMeta, abstractmethod
from .exceptions import InvalidLocationError, Insuffic... | agpl-3.0 | 5,191,680,666,560,372,000 | 31.87767 | 121 | 0.613277 | false |
collective/alm.solrindex | alm/solrindex/tests/test_index.py | 1 | 13971 | import unittest
from zope.testing.cleanup import cleanUp
class SolrIndexTests(unittest.TestCase):
def setUp(self):
cleanUp()
def tearDown(self):
cleanUp()
def _getTargetClass(self):
from alm.solrindex.index import SolrIndex
return SolrIndex
def _makeOne(self, id, so... | bsd-3-clause | -8,782,370,230,053,780,000 | 32.028369 | 76 | 0.593086 | false |
flightwatching/wilco-api | python/sampleCsvToWilco.py | 1 | 1329 | import sys, getopt
import io
import datetime
import requests
import json
apikey = sys.argv[1]
eventId = 9846
def pushToWilco(sample):
sample.pop('id', None)
sample.pop('paramId', None)
sample.pop('minScale', None)
sample.pop('maxScale', None)
sample.pop('minOK', None)
sample.pop('maxOK' , Non... | apache-2.0 | 1,933,878,786,630,401,000 | 29.204545 | 128 | 0.65237 | false |
chadversary/chromiumos.chromite | cbuildbot/stages/generic_stages.py | 1 | 27068 | # Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Module containing the generic stages."""
import contextlib
import fnmatch
import json
import os
import re
import sys
import time
import traceback
... | bsd-3-clause | -4,606,501,446,704,969,000 | 34.153247 | 80 | 0.677183 | false |
brandon-rhodes/publicanus | publican/frontend/documents.py | 1 | 2015 | """Views that know how to generate non-HTML documents.
To prevent confusion, we keep special views like this separate from the
template-driven bread-and-butter views over in views.py.
"""
import os
from decimal import Decimal
from django.http import Http404, HttpResponse
from pyPdf import PdfFileWriter, PdfFileReader... | mit | -8,005,846,556,782,075,000 | 29.530303 | 78 | 0.648635 | false |
Curious72/sympy | sympy/solvers/ode.py | 2 | 331427 | r"""
This module contains :py:meth:`~sympy.solvers.ode.dsolve` and different helper
functions that it uses.
:py:meth:`~sympy.solvers.ode.dsolve` solves ordinary differential equations.
See the docstring on the various functions for their uses. Note that partial
differential equations support is in ``pde.py``. Note t... | bsd-3-clause | 3,555,591,517,086,862,300 | 38.834976 | 279 | 0.530753 | false |
jansel/opentuner | opentuner/search/simulatedannealing.py | 1 | 5078 | from __future__ import division
from builtins import range
from past.utils import old_div
from opentuner.search import technique
import math
import random
#Default interval steps for cooling schedules
DEFAULT_INTERVAL = 100
#Pseudo-annealing - no relative energy input into acceptance function
class PseudoAnnealingSear... | mit | 4,958,629,059,253,496,000 | 36.338235 | 137 | 0.633911 | false |
auvsi-suas/interop | server/server/settings.py | 1 | 6606 | """
Django settings for the interop server.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ..... | apache-2.0 | -8,790,477,207,395,203,000 | 28.101322 | 85 | 0.594157 | false |
magul/pywikibot-core | scripts/casechecker.py | 1 | 30973 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Bot to find all pages on the wiki with mixed latin and cyrilic alphabets."""
#
# (C) Pywikibot team, 2006-2017
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, unicode_literals
import codecs
import itertools
import os
import re
f... | mit | -4,263,445,044,048,832,000 | 38.451985 | 86 | 0.471862 | false |
1905410/Misago | misago/markup/pipeline.py | 1 | 1055 | from importlib import import_module
from django.conf import settings
from django.utils import six
from bs4 import BeautifulSoup
class MarkupPipeline(object):
"""
Small framework for extending parser
"""
def extend_markdown(self, md):
for extension in settings.MISAGO_MARKUP_EXTENSIONS:
... | gpl-2.0 | -4,104,574,123,998,761,000 | 30.969697 | 63 | 0.633175 | false |
guoxiaoyong/simple-useful | stdlib.py | 1 | 1094 | # You may need to use setuptools.distutils depending on Python distribution.
import distutils
import glob
import os
import pkgutil
import sys
def get_python_library():
# Get list of the loaded source modules on sys.path.
modules = {
module
for _, module, package in list(pkgutil.iter_modules())
if... | cc0-1.0 | 6,357,847,452,291,048,000 | 31.176471 | 78 | 0.698355 | false |
Whatang/Listen--Learn--Play | src/midiLearnPairedDialog.py | 1 | 1792 | """
Created on 29 Jan 2012
@author: Mike Thomas
"""
from PyQt4.QtGui import QDialog
from ui_midiLearnPaired import Ui_MidiLearnPairedDialog
from midiMessages import MidiControlThread
from controlSet import PairedMidi
class MidiLearnPairedDialog(QDialog, Ui_MidiLearnPairedDialog):
"""
classdocs
"""
... | gpl-3.0 | 2,788,645,504,491,347,500 | 27.444444 | 67 | 0.638951 | false |
QISKit/qiskit-sdk-py | examples/python/ibmq/using_qiskit_terra_level_2.py | 1 | 3798 | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | apache-2.0 | -6,309,878,272,910,645,000 | 26.521739 | 77 | 0.75961 | false |
conwetlab/ckanext-oauth2 | ckanext/oauth2/tests/test_plugin.py | 1 | 9248 | # -*- coding: utf-8 -*-
# Copyright (c) 2014 CoNWeT Lab., Universidad Politécnica de Madrid
# Copyright (c) 2018 Future Internet Consulting and Development Solutions S.L.
# This file is part of OAuth2 CKAN Extension.
# OAuth2 CKAN Extension is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 | -5,949,973,789,040,639,000 | 44.107317 | 126 | 0.588515 | false |
GeoscienceAustralia/PyRate | tests/test_covariance.py | 1 | 10145 | # This Python module is part of the PyRate software package.
#
# Copyright 2020 Geoscience Australia
#
# 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/... | apache-2.0 | -2,516,326,680,450,531,300 | 38.321705 | 117 | 0.547659 | false |
rjschwei/azure-sdk-for-python | azure-mgmt-eventhub/azure/mgmt/eventhub/models/resource_list_keys.py | 1 | 2071 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -4,411,591,858,105,520,600 | 43.06383 | 142 | 0.648479 | false |
craftbase/chicago-murders | src/data/extractor/analysis.py | 1 | 8796 | import numpy as np
import pandas as pd
import sys
sys.path.append("..")
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.linear_model import LogisticRegression
import src.data.extractor.preprocessing as preprocessing
from sklearn.model_selection import train_test_split
from sklearn.metrics import clas... | mit | 5,230,764,982,377,061,000 | 32.834615 | 137 | 0.628695 | false |
ProfessorX/Config | .PyCharm30/system/python_stubs/-1247971765/PyQt4/QtNetwork/QHostInfo.py | 1 | 3066 | # encoding: utf-8
# module PyQt4.QtNetwork
# from /usr/lib/python3/dist-packages/PyQt4/QtNetwork.cpython-34m-x86_64-linux-gnu.so
# by generator 1.135
# no doc
# imports
import PyQt4.QtCore as __PyQt4_QtCore
class QHostInfo(): # skipped bases: <class 'sip.simplewrapper'>
"""
QHostInfo(int id=-1)
QHostInfo... | gpl-2.0 | 8,235,246,424,030,505,000 | 32.692308 | 113 | 0.621331 | false |
stephanie-wang/ray | rllib/tests/mock_worker.py | 1 | 1674 | import numpy as np
from ray.rllib.evaluation import SampleBatch
from ray.rllib.utils.filter import MeanStdFilter
class _MockWorker:
def __init__(self, sample_count=10):
self._weights = np.array([-10, -10, -10, -10])
self._grad = np.array([1, 1, 1, 1])
self._sample_count = sample_count
... | apache-2.0 | -3,996,345,101,757,121,000 | 32.48 | 78 | 0.603943 | false |
pguillem/RaspPI3-acoustic-pure-tone-canceling | SWHear.py | 1 | 9289 | """
UNIVERSIDAD EL BOSQUE
PROYECTO INTEGRADO - TRANSFORMADAS / TRANSDUCTORES
PEDRO GUILLEM
LUISA ECHEVERRY
DIANA NUNEZ
Copyright:
Libreria SWHear descargada de: http://github.com/swharden
Autor: Scott Harden (swharden@gmail.com)
Modificada por: PEDRO GUILLEM
"""
import pyaudio
import math
import sys
import time
i... | bsd-3-clause | 4,836,195,842,748,167 | 34.319392 | 129 | 0.604909 | false |
Feasoron/red-squirrel | red_squirrel_api/settings.py | 1 | 2986 | """
Django settings for red_squirrel_api project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR... | apache-2.0 | 7,430,413,582,235,650,000 | 26.915888 | 74 | 0.672137 | false |
SensibilityTestbed/clearinghouse | node_state_transitions/tests/test_onepercentmanyevents_to_onepercentmanyevents.py | 1 | 5325 | """
<Program>
test_onepercentmanyevents_to_onepercentmanyevents.py
<Purpose>
Test out the onepercentmanyevents_to_onepercentmanyevents transition state.
Test to see if the database is updated properly
<Authour>
Monzur Muhammad
monzum@cs.washington.edu
<Started>
Aug 21, 2009
"""
# The clearinghouse test... | mit | 6,969,548,475,115,442,000 | 28.41989 | 117 | 0.650141 | false |
nikhilponnuru/codeCrumbs | code/create_file.py | 1 | 4006 | #!/usr/bin/env python
#to create a file in codesnippets folder
import pyperclip
import os
import re
import subprocess
def get_extension(file_name):
if file_name.find('.')!=-1:
ext = file_name.split('.')
return (ext[1])
else:
return 'txt'
def cut(str, len1):
return str[len1 + ... | mit | 5,022,439,893,287,783,000 | 25.183007 | 233 | 0.579131 | false |
oVirt/ovirt-engine-cli | src/ovirtcli/state/dfsastate.py | 1 | 1455 | #
# Copyright (c) 2013 Red Hat, 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 t... | apache-2.0 | 6,227,748,644,943,980,000 | 33.642857 | 74 | 0.659107 | false |
enanablancaynumeros/OpenWeatherForecast | open_weather_forecast/info_extractor/forecast/get_forecast.py | 1 | 1571 | from datetime import datetime
from open_weather_forecast.info_extractor.get_info import GetInfo
from open_weather_forecast.info_extractor.forecast.forecast_weather_info import Base, ForecastWeather, Temperature
from open_weather_forecast.conf.constants import WEATHER_DATE_FORMAT
class GetForecast(GetInfo):
def ... | mit | 3,966,293,941,133,073,400 | 35.534884 | 140 | 0.629535 | false |
andersonsilvade/python_C | Python32/web2py/applications/welcome/controllers/default.py | 3 | 2497 | # -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
#########################################################################
## This is a samples controller
## - index is the default action of any application
## - user is required for authentication and authorizatio... | mit | 3,264,892,465,878,544,000 | 32.293333 | 79 | 0.607529 | false |
MrHalfman/gabbler | core/templatetags/extras.py | 1 | 1530 | from django import template
from django.utils.safestring import mark_safe
from core.models import User
import re
register = template.Library()
@register.filter
def userlink(user):
return mark_safe("<a href='/user/%s'>%s</a>" % (user.username, user.username))
@register.filter
def toArray(object):
return [obj... | gpl-2.0 | -2,104,744,418,143,281,400 | 23.693548 | 100 | 0.647712 | false |
jseabold/statsmodels | statsmodels/regression/mixed_linear_model.py | 4 | 104783 | """
Linear mixed effects models are regression models for dependent data.
They can be used to estimate regression relationships involving both
means and variances.
These models are also known as multilevel linear models, and
hierarchical linear models.
The MixedLM class fits linear mixed effects models to data, and
p... | bsd-3-clause | 7,344,253,325,813,677,000 | 34.423597 | 79 | 0.551483 | false |
mosajjal/mitmproxy | mitmproxy/connections.py | 1 | 8435 | import time
import os
from mitmproxy import stateobject
from mitmproxy import certs
from mitmproxy.net import tcp
from mitmproxy.utils import strutils
class ClientConnection(tcp.BaseHandler, stateobject.StateObject):
"""
A client connection
Attributes:
address: Remote address
ssl_estab... | mit | 109,459,879,326,476,290 | 31.072243 | 112 | 0.59182 | false |
fatadama/mavlink-vscl | MAVProxy-master/modules/mavproxy_CUAV/camera.py | 1 | 29321 | #!/usr/bin/env python
'''camera control for ptgrey chameleon camera'''
import time, threading, sys, os, numpy, Queue, errno, cPickle, signal, struct, fcntl, select, cStringIO
import cv2.cv as cv
# use the camera code from the cuav repo (see githib.com/tridge)
sys.path.insert(0, os.path.join(os.path.dirname(os.path.re... | lgpl-3.0 | -3,917,443,366,669,114,000 | 37.835762 | 140 | 0.573753 | false |
FAForever/client | src/util/theme.py | 1 | 12917 | from PyQt5 import QtGui, QtWidgets, QtCore, QtMultimedia, uic
from semantic_version import Version
import os
import logging
logger = logging.getLogger(__name__)
class Theme():
"""
Represents a single FAF client theme.
"""
def __init__(self, themedir, name):
"""
A 'None' themedir repre... | gpl-3.0 | -2,073,837,444,401,225,700 | 36.33237 | 135 | 0.589378 | false |
ScorpionResponse/freelancefinder | freelancefinder/jobs/tests/test_posts.py | 1 | 3349 | """Tests related to Posts."""
import pytest
from remotes.models import Source
from ..models import Job, Post
def test_post_list(admin_group_client, post):
"""Simple test for the posts list page."""
response = admin_group_client.get('/jobs/post-list/')
assert response.status_code == 200
def test_post_l... | bsd-3-clause | 4,468,538,165,679,423,000 | 33.173469 | 156 | 0.665572 | false |
darnould/integrations-core | twemproxy/test_twemproxy.py | 1 | 1590 | # stdlib
from nose.plugins.attrib import attr
# 3p
# project
from tests.checks.common import AgentCheckTest
instance = {
'host': '127.0.0.1',
'port': 6222,
}
GLOBAL_STATS = set([
'curr_connections',
'total_connections'
])
POOL_STATS = set([
'client_eof',
'client_err',
'client_connectio... | bsd-3-clause | -560,309,525,104,468,500 | 20.780822 | 79 | 0.593711 | false |
janvc/astronx | source/scripts/showtrj.py | 1 | 3910 | #!/usr/bin/env python3
# Copyright 2012-2017 Jan von Cosel
#
# This file is part of astronx.
#
# astronx if 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) ... | gpl-3.0 | 6,579,715,909,527,065,000 | 35.886792 | 153 | 0.557801 | false |
eek6/squeakspace | test/server/test8.py | 1 | 23411 | #!/usr/bin/python2.7
import httplib as ht
import json
import client_path
import squeakspace.client.client as cl
import squeakspace.common.util as ut
import client_types as tp
import test_params
conn = ht.HTTPConnection(test_params.server_address, test_params.server_port)
client = cl.Client(conn, test_params.node_n... | gpl-3.0 | -7,333,848,318,645,493,000 | 30.424161 | 150 | 0.654991 | false |
uktrade/directory-ui-supplier | find_a_supplier/tests/test_forms.py | 1 | 5134 | from unittest import mock
from django.forms.fields import Field
from directory_validators.common import not_contains_url_or_email
from find_a_supplier import forms
import pytest
REQUIRED_MESSAGE = Field.default_error_messages['required']
def test_contact_company_form_required_fields():
form = forms.ContactCom... | mit | -7,800,043,369,400,254,000 | 29.742515 | 75 | 0.66829 | false |
appleorange1/praw | praw/__init__.py | 1 | 113099 | # This file is part of PRAW.
#
# PRAW 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.
#
# PRAW is distributed in the hope that it will ... | gpl-3.0 | -4,379,440,777,575,112,000 | 41.711103 | 79 | 0.587857 | false |
sauloal/cnidaria | scripts/venv/lib/python2.7/site-packages/pandas/tseries/tests/test_period.py | 1 | 120010 | """Tests suite for Period handling.
Parts derived from scikits.timeseries code, original authors:
- Pierre Gerard-Marchant & Matt Knox
- pierregm_at_uga_dot_edu - mattknow_ca_at_hotmail_dot_com
"""
from datetime import datetime, date, timedelta
from numpy.ma.testutils import assert_equal
from pandas import Timesta... | mit | -2,589,192,073,943,415,300 | 40.015038 | 98 | 0.559453 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.