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
zsdonghao/tensorlayer
tensorlayer/models/mobilenetv1.py
1
7772
#! /usr/bin/python # -*- coding: utf-8 -*- """MobileNet for ImageNet.""" import os import tensorflow as tf from tensorlayer import logging from tensorlayer.layers import Layer from tensorlayer.layers import BatchNormLayer from tensorlayer.layers import Conv2d from tensorlayer.layers import DepthwiseConv2d from tens...
apache-2.0
8,372,317,474,735,186,000
40.550802
165
0.600257
false
3.394495
false
false
false
pombredanne/parakeet
parakeet/syntax/wrappers.py
2
1799
from .. import names, prims from ..ndtypes import ScalarT, Type, type_conv from .. syntax import FormalArgs, Var, UntypedFn, Return, PrimCall, Expr, Cast _untyped_fn_cache = {} def simple_untyped_fn(name, expr, n_inputs = 1, fixed_args =...
bsd-3-clause
4,797,160,838,807,259,000
34.294118
89
0.613118
false
3.253165
false
false
false
Timtam/cards-against-humanity
editor/card_panel.py
1
5429
from const import * from shared.card import CARD_BLACK, CARD_WHITE, Card class CardPanel(wx.Panel): def __init__(self, parent, card_id=-1, size=(ELEMENT_SIZE, ELEMENT_SIZE), text="", card_type=CARD_WHITE): wx.Panel.__init__(self, parent=parent, size=size, na...
mit
587,073,677,821,811,600
30.563953
86
0.664948
false
3.401629
false
false
false
neopenx/Dragon
Dragon/python/dragon/vm/tensorflow/ops/array_ops.py
1
1712
# -------------------------------------------------------- # TensorFlow @ Dragon # Copyright(c) 2017 SeetaTech # Written by Ting Pan # -------------------------------------------------------- __all__ = [ 'expand_dims', 'shape', 'zeros', 'ones', 'placeholder', 'concat', 'transpose', 'til...
bsd-2-clause
-7,993,156,920,585,479,000
20.948718
72
0.619743
false
3.508197
false
false
false
trustly/trustly-client-python
trustly/data/jsonrpcnotificationrequest.py
1
3241
""" The MIT License (MIT) Copyright (c) 2014 Trustly Group AB 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, modify, me...
mit
-3,903,244,386,552,004,600
29.009259
131
0.639309
false
4.433653
false
false
false
ActiveState/code
recipes/Python/543261_grade_keeper/recipe-543261.py
1
2222
#! /usr/bin/python # keep record of grades. Made by Caleb Herbert. 0.1-PUBLIC # NOTE! All letter answers are to be written in quotes (including dates)! print """############################################ # Welcome to Gradebook! v 0.1 # # YOUR LIGHT WEIGHT SCHOOL RECORD MANAGER! # #######################...
mit
1,034,287,084,774,473,300
44.346939
101
0.644914
false
3.277286
false
false
false
qedsoftware/commcare-hq
corehq/apps/sms/migrations/0016_add_phonenumber.py
1
1393
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import dimagi.utils.couch.migration class Migration(migrations.Migration): dependencies = [ ('sms', '0015_rename_phonenumber_to_phoneblacklist'), ] operations = [ migrations.CreateMo...
bsd-3-clause
-8,969,480,971,465,646,000
41.212121
114
0.591529
false
3.946176
false
false
false
CCI-Tools/ect-core
cate/ds/local.py
1
37425
# The MIT License (MIT) # Copyright (c) 2016, 2017 by the ESA CCI Toolbox development team and contributors # # 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 wi...
mit
7,336,491,333,073,004,000
44.034898
119
0.55737
false
4.191287
false
false
false
Julius2342/pyvlx
pyvlx/api/get_state.py
1
1220
"""Module for retrieving gateway state from API.""" from pyvlx.dataobjects import DtoState from .api_event import ApiEvent from .frames import FrameGetStateConfirmation, FrameGetStateRequest class GetState(ApiEvent): """Class for retrieving gateway state from API.""" def __init__(self, pyvlx): """In...
lgpl-3.0
1,881,356,536,945,648,400
31.972973
84
0.665574
false
4.388489
false
false
false
Slepice1/simple-web-generator
setup.py
1
9036
# -*- coding: utf-8 -*- from __future__ import print_function import os import sys import imp import subprocess ## Python 2.6 subprocess.check_output compatibility. Thanks Greg Hewgill! if 'check_output' not in dir(subprocess): def check_output(cmd_args, *args, **kwargs): proc = subprocess.Popen( ...
mit
-6,522,298,702,672,906,000
30.816901
113
0.65571
false
3.90324
true
false
false
miguelinux/vbox
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py
1
44961
## @file GenInfFile.py # # This file contained the logical of transfer package object to INF files. # # Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompa...
gpl-2.0
-570,540,731,257,356,700
38.965333
120
0.594916
false
4.286082
false
false
false
btenaglia/hpc-historias-clinicas
hpc-historias-clinicas/inter_consultas/views.py
1
3625
# -*- coding: utf-8 -*- from django.shortcuts import render from django.views.generic import ListView, CreateView, UpdateView, DeleteView from django.contrib import messages from braces.views import LoginRequiredMixin from .models import InterConsultas from ..historias.models import Historias class InterConsultasMix...
bsd-3-clause
-1,438,764,979,979,284,000
34.480392
142
0.654324
false
3.414151
false
false
false
mihneadb/suse_bug_reporter
bugreporter/gathering_modules/cmdline.py
1
1128
''' Copyright (C) 2011 Mihnea Dobrescu-Balaur 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. This program is distributed in ...
gpl-2.0
3,967,432,557,353,816,000
31.228571
79
0.734043
false
4.177778
false
false
false
SiLab-Bonn/basil
basil/utils/sim/BasilBusDriver.py
1
4344
# # ------------------------------------------------------------ # Copyright (c) All rights reserved # SiLab, Institute of Physics, University of Bonn # ------------------------------------------------------------ # # Initial version by Chris Higgs <chris.higgs@potentialventures.com> # # pylint: disable=pointless-stat...
bsd-3-clause
3,399,993,472,548,033,000
32.160305
88
0.548343
false
3.599006
false
false
false
Alzon/senlin
senlin/db/sqlalchemy/models.py
1
14127
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
apache-2.0
487,316,643,626,262,300
38.794366
75
0.673533
false
4.277021
false
false
false
ktok07b6/polyphony
tests/module/nesting03.py
1
1185
from polyphony import module from polyphony import testbench from polyphony import is_worker_running from polyphony.io import Port from polyphony.typing import int8 from polyphony.timing import clksleep, wait_value @module class Submodule: def __init__(self, param): self.i = Port(int8, 'in') self....
mit
4,188,471,329,536,636,400
23.183673
69
0.608439
false
3.093995
false
false
false
moreati/gatspy
gatspy/periodic/modeler.py
1
9034
from __future__ import division, print_function import numpy as np from .optimizer import LinearScanOptimizer class PeriodicModeler(object): """Base class for periodic modeling""" def __init__(self, optimizer=None, fit_period=False, optimizer_kwds=None, *args, **kwargs): if optimize...
bsd-2-clause
-2,890,677,519,734,160,000
33.480916
79
0.584127
false
4.448055
false
false
false
bionomicron/Redirector
util/FlatFileParser.py
1
14961
#!/usr/bin/env python ''' @author: Graham Rockwell @organization: Church Lab Harvard Genetics @version: 03/04/2013 --Rename to metabolic-model parser ''' import string, sets, re from util.Report import Report class TagedElement(dict): def __init__(self): self.annotation = {} def __str__...
mit
-9,134,324,332,474,609,000
29.532653
184
0.517078
false
4.571036
false
false
false
hcmlab/nova
bin/cml/models/templates/continuous/video/tensorflow/interface.py
1
9317
import sys import importlib if not hasattr(sys, 'argv'): sys.argv = [''] #import tensorflow as tf import numpy as np import random #import time from xml.dom import minidom import os import shutil import site import pprint import h5py import imageio from skimage.transform import resize import site as s s.getusersite...
gpl-3.0
-711,394,796,639,481,900
32.039007
212
0.572073
false
3.7031
false
false
false
sassoftware/mirrorball
updatebot/lib/util.py
1
7770
# # Copyright (c) SAS Institute, 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 ...
apache-2.0
883,881,073,296,082,200
24.064516
80
0.587902
false
3.952187
false
false
false
kmARC/Cloud99
runners/baseRunner.py
1
1077
import ha_engine.ha_infra as common LOG = common.ha_logging(__name__) class BaseRunner(object): def __init__(self, input_args): self.ha_report = [] self.input_args = {} if input_args: self.set_input_arguments(input_args) def set_input_arguments(self, input_args): ...
apache-2.0
-7,036,798,112,431,719,000
27.342105
74
0.663881
false
4.126437
false
false
false
wojla/kozaczko
biblio/settings.py
1
2066
# """ # Django settings for biblio 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(B...
mit
-726,473,775,652,205,600
23.891566
71
0.719264
false
3.253543
false
false
false
beingzy/user_recommender_framework
network_simulator/GuidedUserClickSimulator.py
1
1477
""" objective introduction Author: Yi Zhang <beingzy@gmail.com> Date: 2016/05/09 """ from .UserClickSimulator import UserClickSimulatorMixin def convert_pair_dictionary(user_connections): """ translate user pairs into user-wise dictionary """ user_conn_dict = {} for ii, (uid_a, uid_b) in enumerate(us...
gpl-3.0
-7,057,734,268,814,471,000
28.54
88
0.607312
false
3.816537
false
false
false
ask/python-github2
github2/teams.py
1
3026
# Copyright (C) 2011-2012 James Rowe <jnrowe@gmail.com> # Patryk Zawadzki <patrys@pld-linux.org> # # This file is part of python-github2, and is made available under the 3-clause # BSD license. See LICENSE for the full details. from github2.core import BaseData, GithubCommand, Attribute, requi...
bsd-3-clause
8,555,084,811,293,170,000
28.666667
79
0.579974
false
4.30441
false
false
false
michalochman/complex-networks
code/calc-users-topics-count.py
1
1552
from collections import OrderedDict import os from multiprocessing import Process, Queue, JoinableQueue, cpu_count import math import MySQLdb from MySQLdb.cursors import SSDictCursor from scur_mgr import DB_HOST, DB_USER, DB_PASS, DB_NAME, DB_TABLE_RELATIONSHIPS __DIR__ = os.path.dirname(os.path.abspath(__file__)) i...
mit
-1,621,546,364,814,652,400
31.354167
128
0.592784
false
3.359307
false
false
false
IDMIPPM/reliability-aware-resynthesis
resynthesis/resynthesis_create_subckts.py
1
39197
# coding: utf-8 __author__ = 'IDM.IPPM (Roman Solovyev)' import os import subprocess import re import random from resynthesis.resynthesis_external_stats import get_project_directory import resynthesis as sa # Получает список уникальных имен узлов из структуры merge def getUniqueNames(m): lst = [] for o in m: ...
apache-2.0
969,359,723,190,603,000
34.828829
138
0.447462
false
2.880724
false
false
false
Attorney-Fee/django-wiki
wiki/conf/settings.py
1
6506
# -*- coding: utf-8 -*- from django.conf import settings as django_settings from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext as _ # Should urls be case sensitive? URL_CASE_SENSITIVE = getattr( django_settings, 'WIKI_URL_CASE_SENSITIVE', False ) # Non-configurable (at the...
gpl-3.0
-3,424,891,487,880,541,700
42.959459
161
0.724255
false
3.377985
false
false
false
ooici/coi-services
ion/services/eoi/table_loader.py
1
13500
#!/usr/bin/python """ A Service to load data products into PostgreSQL and Geoserver """ __author__ = 'abird' from pyon.util.breakpoint import breakpoint from pyon.ion.resource import LCS, LCE, PRED from pyon.util.file_sys import FileSystem, FS import psycopg2 import requests import os from pyon.public import CFG from...
bsd-2-clause
4,371,377,394,359,796,000
38.823009
147
0.545259
false
4.127178
false
false
false
note35/sinon
sinon/test/TestSinonMatcher.py
1
5492
import sys sys.path.insert(0, '../') import unittest import lib.base as sinon from lib.matcher import SinonMatcher from lib.spy import SinonSpy from lib.stub import SinonStub """ ====================================================== FOR TEST ONLY START ===============================================...
bsd-2-clause
4,025,504,554,026,396,000
31.497041
81
0.593227
false
3.462799
true
false
false
SNeuhausen/training_management
models/teaching_selection_wizard/teaching_selection_wizard.py
1
3023
# -*- coding: utf-8 -*- from openerp.api import depends, multi from openerp.fields import Many2one, Many2many, Boolean from openerp.models import TransientModel from openerp.addons.training_management.models.model_names import ModelNames from openerp.addons.training_management.utils.action_utils import ActionUtils fr...
gpl-3.0
2,646,424,817,527,438,300
37.240506
111
0.656405
false
3.575148
false
false
false
TeamBasedLearning/Service
pgtbl/accounts/tests/test_model.py
1
2437
from rest_framework.test import APITestCase from accounts.models import User class UserTestCase(APITestCase): """ Unit test case to test user features. """ def setUp(self): """ This method will run before any test. """ self.superuser = User.objects.create_superuser( ...
gpl-3.0
198,308,726,957,194,020
30.24359
78
0.586377
false
3.778295
true
false
false
jeremiah-c-leary/vhdl-style-guide
vsg/rules/generate/rule_400.py
1
1308
from vsg.rules import align_tokens_in_region_between_tokens_when_between_tokens_unless_between_tokens from vsg import token lAlign = [] lAlign.append(token.full_type_declaration.identifier) lAlign.append(token.incomplete_type_declaration.identifier) lAlign.append(token.file_declaration.identifier) lAlign.append(toke...
gpl-3.0
-5,148,443,936,430,004,000
39.875
178
0.791284
false
3.506702
false
false
false
kwikadi/orange3
Orange/tests/test_instance.py
1
14396
from math import isnan import warnings import unittest from unittest.mock import MagicMock import numpy as np from numpy.testing import assert_array_equal from Orange.data import \ Instance, Domain, Unknown, Value, \ DiscreteVariable, ContinuousVariable, StringVariable class TestInstance(unittest.TestCase):...
bsd-2-clause
-9,191,138,324,597,714,000
38.658402
80
0.527091
false
3.716056
true
false
false
yulbryn/armory-leap
python/lib/ws4py/server/geventserver.py
2
3779
# -*- coding: utf-8 -*- __doc__ = """ WSGI entities to support WebSocket from within gevent. Its usage is rather simple: .. code-block: python from gevent import monkey; monkey.patch_all() from ws4py.websocket import EchoWebSocket from ws4py.server.geventserver import WSGIServer from ws4py.server.wsg...
gpl-3.0
-3,232,764,169,154,879,500
30.231405
97
0.63747
false
4.274887
false
false
false
google-research/sloe-logistic
sloe_experiments/p_values.py
1
2329
# coding=utf-8 # Copyright 2021 The SLOE Logistic 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...
apache-2.0
6,458,165,117,299,555,000
30.053333
78
0.717475
false
3.481315
false
false
false
rhoscanner-team/pcd-plotter
delaunay_example.py
1
1435
import numpy as np from scipy.spatial import Delaunay points = np.random.rand(30, 2) # 30 points in 2-d tri = Delaunay(points) # Make a list of line segments: # edge_points = [ ((x1_1, y1_1), (x2_1, y2_1)), # ((x1_2, y1_2), (x2_2, y2_2)), # ... ] edge_points = [] edges = set() def ad...
gpl-2.0
-7,879,795,444,467,567,000
24.175439
81
0.632753
false
2.702448
false
false
false
mathieugouin/txtWeb
mailer.py
1
4448
# User libs import mgouinlib as mgl import sendmail as sendmail # System libs import webapp2 #******************************************************************************* # http://localhost:8080/mailer?from=me@acme.com&to=mgouin@gmail.com&message=hello&subject=test&name=Mat%20Gouin&redirect=redir # http://mgouin....
gpl-2.0
3,905,436,552,790,530,000
37.017094
138
0.468076
false
3.877942
false
false
false
jakeshi/python-twitter
twitter/api.py
1
202358
#!/usr/bin/env python # # # Copyright 2007-2016 The Python-Twitter Developers # # 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 requir...
apache-2.0
864,313,760,263,173,100
38.499902
145
0.549981
false
4.699224
false
false
false
sealuzh/ContextBasedAnalytics
model/connection.py
1
1087
class Connection(object): def __init__(self, method, status, url, timestamp): self.method = method self.status = status self.url = url self.timestamp = timestamp self.label = self.assign_label() def assign_label(self): parameter_url_split = self.url.split('?') if len(parameter_url_spli...
apache-2.0
-3,840,156,015,687,418,000
26.871795
108
0.655934
false
3.386293
false
false
false
medialab/reanalyse
outside/views.py
1
34992
#!/usr/bin/python # -*- coding: utf-8 -*- import urllib, os from django.core import serializers from django.contrib.auth import login, logout, authenticate from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.models import User from django.conf import settings from...
lgpl-3.0
7,209,418,571,269,518,000
30.576715
248
0.670697
false
3.195944
false
false
false
sjholden/traveller-universe
travelleruniverse/world/world.py
1
1259
''' Created on May 30, 2017 @author: Sam Holden <sholden@holden.id.au> ''' class World(object): ''' classdocs ''' def __init__(self, port, size, atmo, hydro, pop, govt, law, tech, bases=None, extra=None): ''' Constructor ''' self._port = port ...
gpl-3.0
-8,847,898,661,072,577,000
20.927273
94
0.50834
false
3.984177
false
false
false
simonspa/django-datacollect
datacollect/survey/migrations/0074_auto_20161128_1022.py
1
2106
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-11-28 09:22 from __future__ import unicode_literals from django.db import migrations, models import select_multiple_field.models class Migration(migrations.Migration): dependencies = [ ('survey', '0073_auto_20161123_1720'), ] operations ...
gpl-3.0
1,470,687,113,668,205,800
66.935484
874
0.635802
false
3.551433
false
false
false
linvictor88/vse-lbaas-driver
quantum/plugins/brocade/QuantumPlugin.py
1
19982
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Brocade Communications System, 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 # # ...
apache-2.0
2,346,525,727,396,633,600
39.205231
79
0.564408
false
4.278801
false
false
false
nextgis-extra/tests
lib_gdal/utilities/test_gdal_grid.py
1
36399
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_grid.py 32170 2015-12-13 19:59:59Z goatbar $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_grid testing # Author: Even Rouault <even dot rouault @ mines-paris dot org> # ...
gpl-2.0
-3,094,923,045,946,894,300
37.314737
345
0.611171
false
3.156348
true
false
false
rephorm/libnotify-mozilla
indicator.py
1
3854
#!/usr/bin/env python import gtk, glib, sys, fcntl, os import gobject import indicate class MessagingServer: def __init__(self, subtype, desktop): self.indicators = {} self.actions = {} self.user_cb = None self.server_cb = None self.desktop = desktop self.srv = indicate.indicate_server_ref_...
gpl-3.0
5,225,121,163,404,387,000
24.355263
79
0.629216
false
3.12571
false
false
false
dliessi/frescobaldi
frescobaldi_app/viewers/documents.py
1
4042
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
gpl-2.0
7,887,973,219,943,224,000
33.844828
91
0.65809
false
4.491111
false
false
false
tcstewar/telluride2014
tank/tankudp.py
1
2078
import time import socket import nengo class TankUDP(nengo.Node): def __init__(self, address, port=8889, period=0.1): self.target = (address, port) self.period = period self.data = [0,0,0,0] self.last_time = None self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)...
gpl-3.0
-3,970,165,346,261,248,000
33.633333
82
0.440808
false
3.434711
false
false
false
eykd/syml
syml/parser.py
1
3207
from parsimonious import NodeVisitor, Grammar, VisitationError from . import grammars from . import nodes from .exceptions import OutOfContextNodeError class TextOnlySymlParser(NodeVisitor): grammar = Grammar(grammars.text_only_syml_grammar) def reduce_children(self, children): children = [c for c i...
mit
-4,732,940,867,475,525,000
30.752475
74
0.623636
false
4.018797
false
false
false
wangsix/vmo
vmo/plot.py
1
5141
""" plot.py drawing routines for vmo Copyright (C) 8.20.2014 Cheng-i Wang This file is part of vmo. vmo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
gpl-3.0
7,331,357,824,226,617,000
30.931677
96
0.576542
false
3.516416
false
false
false
andyseubert/doorbell
doorBellListener.py
1
1322
#!/usr/bin/python from time import sleep import os import sys import subprocess from subprocess import Popen import RPi.GPIO as GPIO # global variables for commands and status global alertcmd alertcmd = "/opt/doorbell/ringer.py" bellButtonPin=26 # board pin numbers are easier for me. If I move to another RPI versio...
unlicense
-8,915,464,939,995,576,000
29.045455
98
0.736006
false
3.346835
false
false
false
rdkit/rdkit-orig
rdkit/Chem/SATIS.py
2
3432
# $Id$ # # Copyright (C) 2001-2006 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """ Functionality for ...
bsd-3-clause
-4,643,794,991,775,500,000
26.902439
72
0.614219
false
2.989547
false
false
false
nathanshartmann/portuguese_word_embeddings
sentence_similarity.py
1
3369
""" This script evaluates a embedding model in a semantic similarity perspective. It uses the dataset of ASSIN sentence similarity shared task and the method of Hartmann which achieved the best results in the competition. ASSIN shared-task website: http://propor2016.di.fc.ul.pt/?page_id=381 Paper of Hartmann can be ...
gpl-3.0
7,752,934,141,966,542,000
32.69
79
0.646483
false
3.634304
true
false
false
aholkner/bacon
bacon/resource.py
1
1151
import os import sys from bacon import native #: Path to resources. Set to the script directory by default during development, and the executable #: directory for frozen applications. resource_dir = os.path.abspath(os.path.dirname(sys.argv[0])) if native._mock_native: resource_dir = '' # Or use frozen executab...
mit
5,605,592,067,121,228,000
31.914286
100
0.707211
false
3.665605
false
false
false
googleapis/python-dialogflow-cx
google/cloud/dialogflowcx_v3beta1/services/flows/transports/grpc_asyncio.py
1
23309
# -*- 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
-2,634,202,347,345,729,500
42.325279
88
0.617916
false
4.581171
false
false
false
botswana-harvard/tshilo-dikotla
td_maternal/forms/maternal_contact_form.py
1
1974
from django import forms from edc_constants.constants import YES from ..models import MaternalContact, MaternalLocator class MaternalContactForm(forms.ModelForm): def clean(self): cleaned_data = super(MaternalContactForm, self).clean() self.validate_maternal_locator() self.validate_conta...
gpl-2.0
-3,322,033,492,145,352,700
41.913043
105
0.611449
false
4.506849
false
false
false
google/eclipse2017
scripts/obtain_token.py
1
2613
# # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
1,149,795,917,191,979,800
35.291667
113
0.724837
false
3.54065
false
false
false
seishei/multiprocess
py3.2/multiprocess/dummy/__init__.py
2
4590
# # Support for the API of the multiprocessing package using threads # # multiprocessing/dummy/__init__.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: ...
bsd-3-clause
-2,710,518,699,465,600,000
28.235669
79
0.676688
false
4.047619
false
false
false
TiddlySpace/tiddlyspace
test/test_web_htmljavascript.py
1
2427
import pytest from test.fixtures import make_test_env, make_fake_space, get_auth from wsgi_intercept import httplib2_intercept import wsgi_intercept import httplib2 import simplejson from tiddlyweb.model.tiddler import Tiddler from tiddlyweb.web.util import encode_name def setup_module(module): make_test_env(m...
bsd-3-clause
5,711,042,658,843,738,000
34.691176
86
0.682736
false
3.206077
true
false
false
gurneyalex/odoo
addons/fleet/models/fleet_vehicle.py
4
20652
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from dateutil.relativedelta import relativedelta from odoo import api, fields, models, _ from odoo.osv import expression class FleetVehicle(models.Model): _inherit = ['mail.thread', 'mail.activity.mixin'] _nam...
agpl-3.0
-9,049,208,608,646,020,000
51.683673
209
0.617035
false
3.708386
false
false
false
avedaee/DIRAC
TransformationSystem/Client/TransformationClient.py
1
22189
""" Class that contains client access to the transformation DB handler. """ __RCSID__ = "$Id$" import types from DIRAC import S_OK, S_ERROR, gLogger from DIRAC.Core.Base.Client import Client from DIRAC.Core.Utilities.List ...
gpl-3.0
-7,001,248,997,333,648,000
42.337891
161
0.629997
false
4.145927
false
false
false
sql-machine-learning/sqlflow
python/runtime/dbapi/hive.py
1
3946
# Copyright 2020 The SQLFlow Authors. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-3,445,714,880,476,136,400
32.159664
76
0.590471
false
4.220321
false
false
false
andrewfu0325/gem5-aladdin
configs/common/Caches.py
1
3830
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
5,390,287,003,320,646,000
36.184466
72
0.747781
false
3.868687
false
false
false
franek/weboob
weboob/tools/date.py
1
4493
# -*- coding: utf-8 -*- # Copyright(C) 2010-2013 Romain Bignon # # 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 License, or # (at your...
agpl-3.0
-8,122,204,400,357,521,000
38.069565
97
0.639884
false
3.934326
false
false
false
torstehu/medlemssys
medlemssys/innhenting/management/commands/postnr_bolstad_import.py
1
2788
# -*- coding: utf-8 -*- # vim: shiftwidth=4 tabstop=4 expandtab softtabstop=4 ai # Copyright 2009-2014 Odin Hørthe Omdal # This file is part of Medlemssys. # Medlemssys 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 Sof...
agpl-3.0
2,682,141,056,814,976,500
35.657895
162
0.585786
false
3.340528
false
false
false
voytekresearch/fakespikes
fakespikes/neurons.py
1
4820
# -*- coding: utf-8 -*- import numpy as np from numpy.random import RandomState from fakespikes.util import to_spikes from fakespikes.rates import constant class Spikes(object): """Simulates statistical models of neural spiking Params ------ n : int Number of neurons t : float Sim...
mit
-3,318,524,617,815,953,400
28.390244
74
0.541079
false
3.665399
false
false
false
Didacti/botornado
botornado/s3/key.py
1
40979
#!/usr/bin/env python # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Nexenta Systems Inc. # # 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 restric...
mit
-2,260,968,066,132,986,000
44.431264
103
0.544889
false
4.949155
false
false
false
radjkarl/dataArtist
dataArtist/figures/image/tools/input/VideoStream.py
1
2582
# coding=utf-8 from __future__ import division import cv2 import numpy as np from pyqtgraph_karl.Qt import QtCore from imgProcessor.transformations import toFloatArray from dataArtist.widgets.Tool import Tool class VideoStream(Tool): ''' Capture the video stream from a connected webcam. ''' icon = ...
gpl-3.0
5,214,445,681,117,259,000
28.011236
70
0.525949
false
3.836553
false
false
false
CyrilWaechter/pyRevitMEP
pyRevitMEP.tab/Lab.panel/Lab.pulldown/AirFlowSpaceToTerminal.pushbutton/script.py
1
3085
# coding: utf8 from Autodesk.Revit.DB import ( FilteredElementCollector, BuiltInCategory, Transaction, Document, BuiltInParameter, Category, Connector, ) from Autodesk.Revit.DB.Mechanical import DuctFlowConfigurationType import rpw from pyrevit import script, forms __title__ = "AirFlowSpac...
gpl-3.0
-406,586,815,082,952,960
30.804124
104
0.631767
false
3.794588
false
false
false
martinb3/helpbot
plugins/help.py
1
1095
from lib import helps from lib import utils outputs = [] def process_message(data): if data.get('text', '').split(' ')[0] == '!help': admin_channel, botname, icon_emoji = utils.setup_bot(config) message_attrs = {'icon_emoji': icon_emoji, 'username': botname} # Translate channel id to cha...
mit
3,180,540,034,602,252,300
34.322581
71
0.603653
false
3.938849
false
false
false
Pfeter/SpaceShooter
background.py
1
1843
import sys, random import pygame from pygame.locals import * class Screen(object): def __init__(self, width=640, height=400, fps=60, stars=200): self.running = True self.fps = fps self.playtime = 0.0 self.total_stars = stars pygame.init() pygame.display.set_caption("Press ESC to quit") self.width = w...
mit
3,407,102,023,887,565,300
24.957746
107
0.657081
false
2.7882
false
false
false
icgood/pymap
pymap/plugin.py
1
3579
from __future__ import annotations from collections.abc import Callable, Iterable, Iterator, Mapping from typing import TypeVar, Generic, Optional, Final from pkg_resources import iter_entry_points, DistributionNotFound __all__ = ['PluginT', 'Plugin'] #: The plugin type variable. PluginT = TypeVar('PluginT') cla...
mit
7,337,603,406,598,405,000
30.121739
101
0.582844
false
4.338182
false
false
false
prashantas/MyDataScience
GeneralPython/PyDataStructure/multiValuedDict.py
1
1163
#http://code.activestate.com/recipes/52219-associating-multiple-values-with-each-key-in-a-dic/ #https://www.oreilly.com/library/view/python-cookbook/0596001673/ch01s06.html def repeatedValue(): # this method allows duplicate values for the same key d = dict() # To add a key->value pair, do this: #d.set...
bsd-2-clause
8,858,082,615,650,891,000
26.690476
94
0.600172
false
3.239554
false
false
false
boxed/CMi
web_frontend/CMi/tvshows/api.py
1
1578
from django.template.loader import render_to_string from django.conf.urls import patterns from CMi.tvshows.models import Episode, Category def tv_show_tile(title, episodes, category=None): return ( 10, render_to_string('tile.html', { 'url': '/tvshows/' + (('category/%s/' % category.pk) if categ...
mit
6,253,094,463,314,585,000
53.448276
304
0.607731
false
3.308176
false
false
false
khchine5/xl
lino_xl/lib/postings/mixins.py
1
2368
# -*- coding: UTF-8 -*- # Copyright 2012-2016 Luc Saffre # # License: BSD (see file COPYING for details) """ Defines models for :mod:`lino_xl.lib.postings`. """ from django.contrib.contenttypes.models import ContentType from django.utils.translation import ugettext_lazy as _ from lino.core import actions from lino....
bsd-2-clause
-8,290,678,036,793,711,000
26.218391
74
0.585726
false
3.953255
false
false
false
ajyoon/brown
tests/mocks/mock_graphic_object_interface.py
1
1231
from PyQt5 import QtWidgets from brown.core.brush_pattern import BrushPattern from brown.core.pen_cap_style import PenCapStyle from brown.core.pen_join_style import PenJoinStyle from brown.core.pen_pattern import PenPattern from brown.interface.brush_interface import BrushInterface from brown.interface.graphic_object_...
gpl-3.0
-6,671,446,716,516,352,000
35.205882
75
0.683184
false
3.846875
false
false
false
aagavin/Friday-Flair-Python-reddit-api
reddit/helpers.py
1
3568
# This file is part of reddit_api. # # reddit_api 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. # # reddit_api is distributed in the ...
gpl-3.0
1,856,128,301,368,777,000
35.408163
79
0.640415
false
3.732218
false
false
false
JoelBender/bacpypes
tests/test_constructed_data/helpers.py
1
2570
#!/usr/bin/python """ Helper classes for constructed data tests. """ from bacpypes.debugging import bacpypes_debugging, ModuleLogger, xtob from bacpypes.errors import MissingRequiredParameter from bacpypes.primitivedata import Boolean, Integer, Tag, TagList from bacpypes.constructeddata import Element, Sequence # s...
mit
3,345,657,281,038,894,000
28.204545
130
0.64358
false
3.870482
false
false
false
merenlab/anvio
anvio/drivers/MODELLER.py
1
40930
# coding: utf-8 """ Interface to MODELLER (https://salilab.org/modeller/). """ import os import anvio import shutil import argparse import subprocess import pandas as pd import anvio.utils as utils import anvio.fastalib as u import anvio.terminal as terminal import anvio.constants as constants import anvio.filesnpath...
gpl-3.0
-6,874,570,277,576,418,000
42.681964
157
0.608209
false
3.892905
false
false
false
bloomberg/chef-bcpc
virtual/bin/generate-chef-databags.py
1
1488
#!/usr/bin/env python3 # Copyright 2020, Bloomberg Finance L.P. # # 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...
apache-2.0
4,527,267,695,024,593,400
27.615385
74
0.665323
false
3.748111
false
false
false
maralla/completor.vim
tests/conftest.py
1
2190
# -*- coding: utf-8 -*- import os import sys import pytest import mock from copy import deepcopy class VimError(Exception): pass class List(object): pass class Vars(dict): def __set__(self, inst, value): if not value: inst._vars = deepcopy(self) inst._vars.update(value) ...
mit
-2,497,200,517,213,834,000
19.857143
67
0.574429
false
3.470681
false
false
false
quodlibet/mutagen
mutagen/oggopus.py
1
5334
# Copyright (C) 2012, 2013 Christoph Reiter # # 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. """Read and write Ogg Op...
gpl-2.0
-5,781,207,931,457,435,000
28.147541
78
0.627109
false
3.606491
false
false
false
pbs/django-filer
filer/utils/generate_filename.py
1
1841
import datetime import os import filer from filer.utils.files import get_valid_filename from django.core.files.uploadedfile import UploadedFile from django.utils.encoding import smart_str def by_date(instance, filename): datepart = str(datetime.datetime.now().strftime(smart_str("%Y/%m/%d"))) return os.path....
bsd-3-clause
5,553,913,049,167,690,000
28.222222
77
0.664856
false
3.60274
false
false
false
PennyDreadfulMTG/Penny-Dreadful-Tools
decksite/charts/chart.py
1
2940
import os.path import pathlib from typing import Dict import matplotlib as mpl # This has to happen before pyplot is imported to avoid needing an X server to draw the graphs. # pylint: disable=wrong-import-position mpl.use('Agg') import matplotlib.pyplot as plt import seaborn as sns from decksite.data import deck fro...
gpl-3.0
-2,024,999,655,757,413,000
37.684211
131
0.633333
false
3.248619
false
false
false
robertsj/poropy
poropy/coretools/laban.py
1
9241
''' Created on Dec 11, 2011 @author: robertsj ''' from evaluator import Evaluator import numpy as np import os class Laban(Evaluator): """ Uses the LABAN-PEL code to evaluate loading patterns. """ # Public Interface def __init__(self, rank=0) : """ Constructor Parameter...
mit
5,067,928,261,008,976,000
35.670635
108
0.450601
false
3.523065
false
false
false
opennode/nodeconductor-saltstack
src/nodeconductor_saltstack/exchange/cost_tracking.py
1
1101
from nodeconductor.cost_tracking import CostTrackingStrategy, CostTrackingRegister, ConsumableItem from . import models class ExchangeTenantStrategy(CostTrackingStrategy): resource_class = models.ExchangeTenant class Types(object): SUPPORT = 'support' STORAGE = 'storage' class Keys(obje...
mit
-468,962,099,311,564,200
32.363636
114
0.684832
false
3.809689
false
false
false
ajdawson/windspharm
examples/iris/rws_example.py
1
2190
"""Compute Rossby wave source from the long-term mean flow. This example uses the iris interface. Additional requirements for this example: * iris (http://scitools.org.uk/iris/) * matplotlib (http://matplotlib.org/) * cartopy (http://scitools.org.uk/cartopy/) """ import warnings import cartopy.crs as ccrs import i...
mit
-1,699,799,583,394,681,900
32.181818
76
0.73379
false
3.067227
false
false
false
ljwolf/pysal_core
libpysal/weights/_contW_lists.py
1
3800
from ..cg.shapes import Polygon import itertools as it from sys import version_info import collections QUEEN = 1 ROOK = 2 if version_info[0] == 2: zip = it.izip range = xrange __author__ = "Jay Laura jlaura@asu.edu" def _get_verts(pgon): if isinstance(pgon, Polygon): return pgon.vertices else:...
bsd-3-clause
1,847,765,243,791,407,600
29.894309
81
0.492632
false
4.21286
false
false
false
caperren/Archives
OSU Coursework/ROB 421 - Applied Robotics/software/windows_packages/denso_slave/Framework/arm_control_receiver.py
1
9085
##################################### # Imports ##################################### # Python native imports from PyQt5 import QtCore, QtWidgets import pythoncom import win32com.client from time import time import socket import json ##################################### # Global Variables ############################...
gpl-3.0
-7,680,143,499,272,589,000
33.942308
129
0.571491
false
3.749484
false
false
false
gkulkarni/JetMorphology
fitjet_3d.py
1
5370
""" File: fitjet_3d.py Fits a geometric model to mock jet data. Uses image subtraction; otherwise same as fitjet.py """ import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import cm import scipy.optimize as op import emcee import triangle import sys # These mock data are pr...
mit
-4,125,838,441,567,503,000
26.680412
116
0.555121
false
2.562023
false
false
false
RaspberryPiFi/CloudCode
handlers/api.py
1
5836
"""api.py: handles API requests""" __author__ = "Tom Hanson" __copyright__ = "Copyright 2014" __credits__ = ["Tom Hanson"] __license__ = "GPL" __maintainer__ = "Tom Hanson" __email__ = "tom@aporcupine.com" import json from google.appengine.api import memcache from google.appengine.ext import ndb import models from...
gpl-2.0
7,389,472,976,324,577,000
32.936047
80
0.625428
false
3.893262
false
false
false
Svjard/presto-admin
prestoadmin/workers.py
1
3726
# -*- coding: utf-8 -*- # # 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 ...
apache-2.0
-3,800,782,643,496,563,000
37.412371
77
0.580247
false
4.425178
true
false
false
Luthaf/Chemharp-python
chemfiles/trajectory.py
2
7109
# -*- coding=utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals from ctypes import c_uint64, c_char_p import sys from .utils import CxxPointer, _call_with_growing_buffer from .frame import Frame, Topology from .misc import ChemfilesError # Python 2 compatibility if sys.hexversion >= 0x...
mpl-2.0
5,389,887,010,910,090,000
31.912037
87
0.584048
false
4.032331
false
false
false
ThomasBollmeier/GObjectCreator2
src/gobjcreator2/output/sections.py
1
2533
# # Copyright 2011 Thomas Bollmeier # # This file is part of GObjectCreator2. # # GObjectCreator2 is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
gpl-3.0
6,967,641,308,313,684,000
29.890244
94
0.564943
false
4.673432
false
false
false
listen-lavender/pholcus
gdc/task/news/toutiao.py
1
2955
#!/usr/bin/env python # coding=utf-8 from datetime import * from webcrawl.character import * from webcrawl.task import * from webcrawl.urlkit import URLParse from newsspider import * from webcrawl import request #_print, logger = logprint(modulename(__file__), modulepath(__file__)) class SpiderToutiao(SpiderNewsOrig...
mit
6,648,418,480,170,023,000
38
273
0.555556
false
3.549757
false
false
false
timkofu/gitstars
stars/migrations/0001_initial.py
1
1853
# Generated by Django 3.0.8 on 2020-07-04 10:01 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ProgrammingLanguage', fiel...
mit
7,964,705,436,317,314,000
37.604167
150
0.559093
false
4.25977
false
false
false
samuelfd/harpia
harpia/bpGUI/xor.py
1
5854
# -*- coding: utf-8 -*- # [HARPIA PROJECT] # # # S2i - Intelligent Industrial Systems # DAS - Automation and Systems Department # UFSC - Federal University of Santa Catarina # Copyright: 2006 - 2007 Luis Carlos Dill Junges (lcdjunges@yahoo.com.br), Clovis Peruchi Scotti (scotti@ieee.org), # Guilh...
gpl-2.0
3,624,822,109,108,054,500
39.937063
143
0.534677
false
3.913102
false
false
false
tomschr/sdsc
src/sdsc/__init__.py
1
1375
# # Copyright (c) 2017 SUSE Linux GmbH # # This program is free software; you can redistribute it and/or # modify it under the terms of version 3 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRAN...
lgpl-2.1
-7,583,139,108,530,900,000
31.738095
77
0.734545
false
3.618421
false
false
false
sdbonin/SOQresearch
SOQswapRK4.py
1
8364
# -*- coding: utf-8 -*- """ This code uses a loop along with our set of coupled differential equations and matrix math to create arrays of 4-vector quaternions. The old plotting functions need to be updated and incorperated into the end of this code or a better visualization solution needs to be found. """ ...
mit
6,529,477,373,206,285,000
28.757353
95
0.50825
false
2.622766
false
false
false
DMS-Aus/Roam
src/roam_tests/tests_editorwidgets/test_numberwidget.py
1
2390
import pytest from roam.editorwidgets.numberwidget import NumberWidget, DoubleNumberWidget config = { "prefix": "test_pre", "suffix": "test_suf", "max": 100, "min": 0 } def test_should_return_same_value(): widget = NumberWidget().createWidget(None) wrapper = NumberWidget(widget=widget) wr...
gpl-2.0
-1,665,007,667,072,634,000
27.117647
76
0.683264
false
3.76378
true
false
false
genialis/resolwe-bio
resolwe_bio/tools/make_report.py
1
13645
#!/usr/bin/env python3 """Generate amplicon report.""" import argparse import csv import re import subprocess DECIMALS = 2 # Decimal precision when presenting results: parser = argparse.ArgumentParser(description="Fill data into tex template file.") parser.add_argument("--sample", help="Sample name.") parser.add_arg...
apache-2.0
390,329,933,350,816,100
37.114525
113
0.55317
false
3.709897
false
false
false