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
tbenthompson/taskloaf
taskloaf/promise.py
1
5194
import asyncio import taskloaf from .refcounting import Ref from .object_ref import put, is_ref, ObjectRef import logging logger = logging.getLogger(__name__) def await_handler(args): req_addr = args[0] pr = args[1] async def await_wrapper(): result_ref = await pr._get_future() taskloa...
mit
-699,904,581,837,523,300
25.100503
78
0.587986
false
3.432915
false
false
false
AndrewBMartin/pygurobi
pygurobi/pygurobi.py
1
31972
""" Functions to support rapid interactive modification of Gurobi models. For reference on Gurobi objects such as Models, Variables, and Constraints, see http://www.gurobi.com/documentation/7.0/refman/py_python_api_overview.html. """ import csv import json try: import gurobipy as gp except ImportError: raise ...
mit
-5,063,125,041,988,328,000
26.777585
99
0.613412
false
4.125952
false
false
false
akx/shoop
shoop/core/models/_units.py
1
1973
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import with_statement from decimal import Decimal from dja...
agpl-3.0
-1,413,495,837,681,102,800
30.822581
95
0.692854
false
3.906931
false
false
false
xiangke/pycopia
process/pycopia/rsynclib.py
1
2736
#!/usr/bin/python2.4 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # # $Id$ # # Copyright (C) 1999-2006 Keith Dart <keith@kdart.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software...
lgpl-2.1
7,716,549,130,176,562,000
31.963855
83
0.660453
false
3.539457
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/operation_list_result.py
1
1314
# 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
546,748,436,018,200,060
31.85
76
0.577626
false
4.439189
false
false
false
kizniche/Mycodo
mycodo/inputs/rpi_signal_revolutions.py
1
4596
# coding=utf-8 import time import copy from mycodo.inputs.base_input import AbstractInput # Measurements measurements_dict = { 0: { 'measurement': 'revolutions', 'unit': 'rpm' } } # Input information INPUT_INFORMATION = { 'input_name_unique': 'SIGNAL_RPM', 'input_manufacturer': 'Rasp...
gpl-3.0
8,378,247,199,154,533,000
27.196319
103
0.57376
false
3.653418
false
false
false
freieslabor/info-display
info_display/screens/event_schedule/management/commands/updateevents.py
1
1290
from django.core.management.base import BaseCommand from django.conf import settings from datetime import datetime from pytz import timezone from dateutil.tz import tzlocal from icalendar import Calendar import urllib.request from ...models import Event, CalendarFeed class Command(BaseCommand): help = 'Updates...
mpl-2.0
-4,256,452,507,034,026,000
32.947368
77
0.584496
false
4.795539
false
false
false
desihub/desispec
py/desispec/pipeline/control.py
1
46258
# # See top-level LICENSE.rst file for Copyright information # # -*- coding: utf-8 -*- """ desispec.pipeline.control =========================== Tools for controling pipeline production. """ from __future__ import absolute_import, division, print_function import os import sys import re import time from collections ...
bsd-3-clause
5,987,236,070,991,762,000
33.75432
91
0.581543
false
3.697091
false
false
false
rwstauner/python-photo-shrinker
shrinkphotos.py
1
2783
#!/usr/bin/env python "shrink photos so that it doesn't take 8 days to transfer them" # Copyright (c) 2012 Randy Stauner # Licensed under the MIT License: http://opensource.org/licenses/MIT from PIL import Image import os from os.path import join, isfile, isdir, dirname, basename import re import sys # configur...
mit
-1,206,501,911,200,051,200
26.284314
74
0.651096
false
3.254971
false
false
false
50wu/gpdb
contrib/unaccent/generate_unaccent_rules.py
7
12976
#!/usr/bin/python # -*- coding: utf-8 -*- # # This script builds unaccent.rules on standard output when given the # contents of UnicodeData.txt [1] and Latin-ASCII.xml [2] given as # arguments. Optionally includes ligature expansion and Unicode CLDR # Latin-ASCII transliterator, enabled by default, this can be disabled...
apache-2.0
150,941,420,492,318,900
43.896194
361
0.677996
false
3.781696
false
false
false
clarkerubber/irwin
modules/irwin/training/Evaluation.py
1
3292
from default_imports import * from conf.ConfigWrapper import ConfigWrapper from modules.game.Player import Player from modules.game.GameStore import GameStore from modules.game.AnalysedGame import GameAnalysedGame from modules.irwin.PlayerReport import PlayerReport class Evaluation(NamedTuple('Evaluation', [ ...
agpl-3.0
6,676,919,598,307,802,000
44.109589
202
0.593864
false
3.566631
false
false
false
HybridF5/jacket
jacket/api/compute/openstack/compute/legacy_v2/contrib/server_diagnostics.py
1
2408
# Copyright 2011 OpenStack Foundation # 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 requ...
apache-2.0
4,184,177,910,797,046,000
37.222222
79
0.675249
false
4.217163
false
false
false
uclouvain/osis
program_management/forms/prerequisite.py
1
3264
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
6,778,399,643,430,902,000
48.439394
120
0.652467
false
3.861538
false
false
false
auto-mat/klub
apps/aklub/migrations/0040_auto_20170117_1325.py
1
1245
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-17 13:25 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('aklub', '0039_auto_20161221_1256'), ] operations =...
gpl-3.0
-6,172,260,691,570,445,000
34.571429
191
0.625703
false
4.278351
false
false
false
tejal29/pants
src/python/pants/goal/aggregated_timings.py
1
1733
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from colle...
apache-2.0
-8,865,574,243,113,284,000
36.673913
94
0.663012
false
3.595436
false
false
false
vene/marseille
experiments/exp_rnn.py
1
5162
import os import dill import numpy as np from sklearn.model_selection import KFold from marseille.custom_logging import logging from marseille.datasets import get_dataset_loader, load_embeds from marseille.io import cache_fname from marseille.argrnn import ArgumentLSTM def argrnn_cv_score(dataset, dynet_weight_deca...
bsd-3-clause
-241,226,134,149,875,740
38.106061
79
0.509299
false
4.146185
false
false
false
dementrock/nbgrader
nbgrader/tests/nbextensions/test_assignment_list.py
1
13208
import pytest import os from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException, NoSuchElementException from .. import run_python_module def _wait(brow...
bsd-3-clause
4,586,161,533,023,483,000
44.232877
138
0.696548
false
3.464848
true
false
false
merc-devel/merc
merc/errors.py
1
2503
from merc import message class BaseError(Exception, message.Reply): pass class Error(Exception, message.Message): NAME = "ERROR" FORCE_TRAILING = True def __init__(self, reason): self.reason = reason def as_params(self, client): return [self.reason] class LinkError(Error): NAME = "ERROR" F...
mit
-4,638,788,628,289,347,000
17.819549
67
0.703556
false
3.29776
false
false
false
ypcs/bearded-adventure
bearded_adventure/webvm/api.py
1
1904
from tastypie.resources import ModelResource, ALL, ALL_WITH_RELATIONS from webvm.models import Slave, Snapshot, VirtualMachine, MachineImage, HwConfiguration, JobQueueItem from bearded_adventure.common import CamelCaseJSONSerializer from tastypie import fields from tastypie.authentication import ApiKeyAuthentication c...
gpl-3.0
-1,674,742,944,250,033,200
37.857143
210
0.669118
false
3.95842
false
false
false
zenoss/ZenPacks.community.IBMSystemxIMM
ZenPacks/community/IBMSystemxIMM/modeler/plugins/community/snmp/IBMIMMMemVpdMap.py
1
3309
# ============================================================================== # IBMIMMMemVpdMap modeler plugin # # Zenoss community Zenpack for IBM SystemX Integrated Management Module # version: 0.3 # # (C) Copyright IBM Corp. 2011. All Rights Reserved. # # This program is free software; you can redistribute it an...
gpl-2.0
-2,510,824,104,534,055,400
37.476744
93
0.598368
false
3.77309
false
false
false
pikhovkin/instructor
instructor/model.py
1
2702
from collections import OrderedDict from .errors import InvalidData, InvalidDataSize, InvalidModelDeclaration from .fields import BaseFieldInstructor, DefaultByteOrder __all__ = ( 'InstructorModel', ) class Opts(object): pass class MetaInstructor(type): def __new__(cls, name, bases, attrs): d...
mit
4,084,107,766,100,893,700
29.022222
118
0.551813
false
4.344051
false
false
false
rzarzynski/tempest
tempest/scenario/test_volume_boot_pattern.py
1
8285
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
-8,211,220,916,780,681,000
41.706186
79
0.620881
false
4.008224
true
false
false
soft-matter/mr
mr/tests/test_feature_saving.py
1
1721
import unittest import nose from numpy.testing import assert_almost_equal, assert_allclose from numpy.testing.decorators import slow from pandas.util.testing import (assert_series_equal, assert_frame_equal) import os from tempfile import NamedTemporaryFile import pandas as pd from pandas import DataFrame, Series imp...
gpl-3.0
2,259,999,253,511,794,400
34.122449
75
0.606043
false
3.858744
true
false
false
alexryndin/ambari
ambari-server/src/test/python/TestAmbariServer.py
1
340374
''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
apache-2.0
1,978,595,072,674,674,700
38.286011
256
0.669998
false
3.448851
true
false
false
gena/qgis-earthengine-plugin
ee_plugin.py
1
5587
# -*- coding: utf-8 -*- """ Main plugin file. """ from __future__ import absolute_import import configparser import requests import webbrowser from builtins import object import os.path import json from qgis.PyQt.QtCore import QSettings, QTranslator, qVersion, QCoreApplication from qgis.PyQt.QtWidgets import QAction...
mit
1,137,429,394,335,913,300
35.756579
254
0.646501
false
4.238998
false
false
false
1905410/Misago
misago/users/management/commands/synchronizeusers.py
1
1305
import time from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from misago.core.management.progressbar import show_progress from misago.core.pgutils import batch_update class Command(BaseCommand): help = 'Synchronizes users' def handle(self, *args, **options)...
gpl-2.0
5,006,594,123,180,027,000
31.625
78
0.638314
false
3.760807
false
false
false
ybalgir/Quantop
Lec7.py
1
1822
import numpy as np import pandas as pd from statsmodels import regression import statsmodels.api as sm import matplotlib.pyplot as plt import math import pandas_datareader.data as web from datetime import datetime def Starter_Lec7(): start = datetime(2014, 1, 1) end = datetime(2015, 1, 1) asset = web.Da...
gpl-3.0
5,670,257,389,628,504,000
25.405797
107
0.623491
false
2.977124
false
false
false
studywolf/pydmps
pydmps/dmp_rhythmic.py
1
5004
""" Copyright (C) 2013 Travis DeWolf This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope t...
gpl-3.0
-4,765,107,268,492,839,000
29.888889
79
0.592126
false
3.378798
false
false
false
openstack/sahara-dashboard
sahara_dashboard/content/data_processing/clusters/cluster_templates/workflows/create.py
1
16094
# 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 under the...
apache-2.0
-5,240,183,144,820,533,000
36.168591
79
0.581832
false
4.432388
true
false
false
SahilTikale/haas
hil/cli/project.py
2
1764
"""Commands related to projects are in this module""" import click import sys from hil.cli.client_setup import client @click.group() def project(): """Commands related to project""" @project.command(name='create') @click.argument('project') def project_create(project): """Create a new project""" client....
apache-2.0
-3,346,851,995,693,047,000
24.565217
79
0.665533
false
3.425243
false
false
false
greenapes/python-blitline
tools/scrape.py
1
1910
import re import string import urllib.request, urllib.error, urllib.parse from datetime import datetime from lxml import etree def function_name(text, rex=re.compile(r'"name"\s*:\s*"([^"]+)"')): match = rex.search(text) if match: return match.group(1) return None parser = etree.HTMLParser() tree...
mit
-1,458,529,492,265,877,500
25.901408
78
0.624607
false
3.422939
false
false
false
python-gitlab/python-gitlab
gitlab/v4/objects/hooks.py
1
3071
from gitlab.base import RequiredOptional, RESTManager, RESTObject from gitlab.mixins import CRUDMixin, NoUpdateMixin, ObjectDeleteMixin, SaveMixin __all__ = [ "Hook", "HookManager", "ProjectHook", "ProjectHookManager", "GroupHook", "GroupHookManager", ] class Hook(ObjectDeleteMixin, RESTObjec...
lgpl-3.0
785,224,633,121,416,800
25.938596
80
0.529144
false
4.089214
false
false
false
DistrictDataLabs/topicmaps
topics/models.py
1
3031
# topics.models # Topic modeling for data survey analysis # # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Tue Sep 08 19:43:58 2015 -0400 # # Copyright (C) 2015 District Data Labs # For license information, see LICENSE.txt # # ID: models.py [] benjamin@bengfort.com $ """ Topic modeling for ...
mit
8,940,932,464,342,906,000
28.715686
105
0.527549
false
4.287129
false
false
false
edmorley/treeherder
treeherder/services/pulse/consumers.py
1
5645
import logging import newrelic.agent from kombu import (Exchange, Queue) from kombu.mixins import ConsumerMixin from treeherder.etl.common import fetch_json from treeherder.etl.tasks.pulse_tasks import (store_pulse_jobs, store_pulse_pushes) from .excha...
mpl-2.0
-7,936,321,859,886,278,000
35.419355
100
0.620903
false
4.237988
false
false
false
tigeorgia/fixmystreet
apps/users/migrations/0001_initial.py
1
2962
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ] operations = [ migrations.CreateMode...
gpl-2.0
3,277,017,067,668,940,000
49.20339
257
0.597907
false
4.368732
false
false
false
WalkingMachine/sara_behaviors
sara_flexbe_behaviors/src/sara_flexbe_behaviors/action_receive_bag_sm.py
1
3679
#!/usr/bin/env python # -*- coding: utf-8 -*- ########################################################### # WARNING: Generated code! # # ************************** # # Manual changes may get lost if file is generated again. # # Only code inside the [MANUAL] ta...
bsd-3-clause
1,963,174,731,779,528,200
32.144144
157
0.633052
false
3.305481
false
false
false
fparrel/regepe
vps/gpxparser.py
1
8080
# For xml parsing try: from etree.ElementTree import ElementTree except ImportError: from xml.etree.ElementTree import ElementTree # For date parsing from datetime import datetime import time # Model classes from model import Bounds,Point,Track #i18n from flask_babel import gettext # gpx creator="KeyMaze 5...
gpl-3.0
-4,651,196,639,429,337,000
34.911111
100
0.576485
false
3.417936
false
false
false
Outernet-Project/outernet-broadman
broadman/db.py
1
1973
""" Functions for working with broadcast database Copyright 2015, Outernet Inc. Some rights reserved. This software is free software licensed under the terms of GPLv3. See COPYING file that comes with the source code, or http://www.gnu.org/licenses/gpl.txt. """ import sqlite3 import datetime import sqlize as sql f...
gpl-3.0
4,505,186,145,183,440,000
26.027397
79
0.580335
false
3.899209
false
false
false
mgeorgehansen/FIFE_Technomage
tests/analyzers/dep_analyzer.py
1
7256
#!/usr/bin/env python # -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2009 by the FIFE team # http://www.fifengine.de # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Le...
lgpl-2.1
2,913,993,431,824,117,000
28.258065
117
0.645535
false
2.97499
false
false
false
genevolv/dbrev
py/freevolv/models/dbrev/table.py
1
8372
''' dbrev.table can be thought of as a bean or a template. It has only attributes with getters and setters. ''' import logging LOG = logging.getLogger(__name__) # LOG.setLevel(logging.INFO) # Long lines expected. # pylint: disable=C0301 # Cyclic imports protected by functions # pylint: disable=R0401 class Table...
bsd-2-clause
-5,223,640,026,249,078,000
47.674419
221
0.627807
false
3.78481
false
false
false
openstack/ironic
ironic/drivers/modules/agent_power.py
1
8765
# 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 under t...
apache-2.0
-4,038,878,199,996,820,000
38.840909
79
0.607872
false
4.349876
false
false
false
christophreimer/pytesmo
tests/test_sat/test_ers.py
1
4902
# Copyright (c) 2013,Vienna University of Technology, # Department of Geodesy and Geoinformation # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the...
bsd-3-clause
3,637,355,955,954,336,000
43.563636
81
0.612403
false
3.859843
true
false
false
andrewromanenco/pyjvm
pyjvm/platform/java/lang/object.py
1
3672
# PyJVM (pyjvm.org) Java Virtual Machine implemented in pure Python # Copyright (C) 2014 Andrew Romanenco (andrew@romanenco.com) # # 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 ...
gpl-3.0
-3,382,427,627,073,679,000
33.971429
71
0.601852
false
3.596474
false
false
false
fracturica/shardlib
shardlib/comp_analysis/SIMCompAnalysis.py
1
23592
import dataProcessing as dp import plotFuncs as pf import numpy as np from matplotlib.ticker import MultipleLocator, FormatStrFormatter from mpl_toolkits.axes_grid1 import host_subplot import mpl_toolkits.axisartist as AA from matplotlib.path import Path from mpl_toolkits.mplot3d import Axes3D import matplotlib as mp...
mit
8,652,777,072,238,680,000
33.951111
110
0.525348
false
3.488393
false
false
false
DTOcean/dtocean-core
dtocean_core/tools/external.py
1
3947
# -*- coding: utf-8 -*- # Copyright (C) 2016-2018 Mathew Topper # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
gpl-3.0
-1,000,664,811,130,914,200
27.395683
79
0.584241
false
4.96478
false
false
false
bowen0701/algorithms_data_structures
lc0314_binary_tree_vertical_order_traversal.py
1
3585
"""Leetcode 314. Binary Tree Vertical Order Traversal Medium URL: https://leetcode.com/problems/binary-tree-vertical-order-traversal/ Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column). If two nodes are in the same row and column, the order shoul...
bsd-2-clause
4,864,136,224,572,877,000
17.769634
78
0.499861
false
2.8958
false
false
false
all-of-us/raw-data-repository
rdr_service/alembic/versions/cd009f1475ff_deceased_report_cause_of_death.py
1
1935
"""deceased report cause of death Revision ID: cd009f1475ff Revises: a4ab3afcb460 Create Date: 2020-09-08 11:48:27.208496 """ from alembic import op import sqlalchemy as sa import rdr_service.model.utils from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus from rdr_...
bsd-3-clause
7,756,733,859,795,774,000
31.25
125
0.749871
false
3.589981
false
false
false
Sjc1000/PyRC
UI/NickName.py
1
1047
#!/usr/bin/env python3 from gi.repository import Gtk, Pango class NickName(): servers = {} active_server = None active_channel = None def __init__(self, MainWindow): self.MainWindow = MainWindow self.position = [0, 9, 1, 1] def prebuild(self): self.MainWindow.ui_plugin...
gpl-2.0
5,602,756,022,163,896,000
25.2
84
0.613181
false
3.877778
false
false
false
DanielFSFE/test1
adventure.py
1
13152
import random class Game(object): """ holds all information for a game. Later it may be possible to run several game instances at once """ number = 0 def __init__(self): self.number = Game.number Game.number += 1 self.rooms = {} # dictionary of rooms, key is room number...
gpl-2.0
-631,206,587,626,773,600
34.260054
86
0.577783
false
3.706877
false
false
false
lukas-bednar/jenkins-job-builder
tests/cmd/subcommands/test_update.py
1
6946
# Joint copyright: # - Copyright 2015 Hewlett-Packard Development Company, 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 req...
apache-2.0
6,729,732,295,201,519,000
42.685535
78
0.610135
false
3.915445
true
false
false
rgayon/plaso
tests/parsers/syslog.py
1
8396
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the syslog parser.""" from __future__ import unicode_literals import unittest from plaso.parsers import syslog from tests.parsers import test_lib class SyslogParserTest(test_lib.ParserTestCase): """Tests for the syslog parser.""" def testParseRsyslo...
apache-2.0
6,114,675,966,977,430,000
33.547325
76
0.694937
false
3.592212
true
false
false
gallandarakhneorg/autolatex
plugins/gedit3/autolatexeditor/utils/gedit_runner.py
1
4936
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # autolatex/utils/gedit_runner.py # Copyright (C) 2013-14 Stephane Galland <galland@arakhne.org> # # 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 Foundatio...
gpl-2.0
-5,963,256,746,123,358,000
34.510791
91
0.674635
false
3.432545
false
false
false
Q-Leap-Networks/pyside-segfault
wizard.py
1
3656
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys import argparse from Qt import QtGui, QtCore, loadUi from QtCore import Slot from HWWizard import HWWizard class Host: def __init__(self, name, autodetect): self.name = name self.autodetect = autodetect class Name: def __init__(self, nam...
gpl-2.0
-8,578,192,647,075,169,000
29.722689
57
0.390591
false
3.678068
false
false
false
fle-internal/content-curation
contentcuration/contentcuration/utils/celery_signals.py
1
2657
import ast import logging import os import traceback from celery.signals import after_task_publish, task_failure, task_success from celery.utils.log import get_task_logger from django.core.exceptions import ObjectDoesNotExist from contentcuration.models import Task, User # because Celery connects signals upon import...
mit
-5,897,802,746,775,080,000
38.073529
126
0.687618
false
3.930473
false
false
false
hidext/oemedical
oemedical_socioeconomics/oemedical_socioeconomics/oemedical_socioeconomics.py
1
6182
# -*- coding: utf-8 -*- ############################################################################## # # Tech-Receptives Solutions Pvt. Ltd. # Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>) # Special Credit and Thanks to Thymbra Latinoamericana S.A. # # This program is free soft...
agpl-3.0
-6,396,801,684,019,565,000
43.157143
79
0.531381
false
4.15178
false
false
false
dann/python-hookable
docs/conf.py
1
9257
# -*- coding: utf-8 -*- # # hookable documentation build configuration file, created by # sphinx-quickstart on Wed Jan 4 21:12:53 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
bsd-3-clause
-1,558,838,466,794,074,600
31.031142
215
0.703684
false
3.741714
true
false
false
joopert/nad_receiver
nad_receiver/__init__.py
1
11483
""" NAD has an RS232 interface to control the receiver. Not all receivers have all functions. Functions can be found on the NAD website: http://nadelectronics.com/software """ import codecs import socket from time import sleep from typing import Any, Dict, Iterable, Optional, Union from nad_receiver.nad_commands impo...
mit
423,061,647,140,104,700
35.804487
115
0.570844
false
3.93928
false
false
false
Tesora/tesora-python-troveclient
troveclient/tests/osc/v1/test_database_flavors.py
1
1636
# 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 # distrib...
apache-2.0
2,906,566,030,713,005,600
38.902439
77
0.702323
false
3.726651
true
false
false
erigones/esdc-ce
ans/roles/cluster/library/pcs_resource.py
1
15877
#!/usr/bin/python # Copyright: (c) 2018, Ondrej Famera <ondrej-xa2iel8u@famera.cz> # GNU General Public License v3.0+ (see LICENSE-GPLv3.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 (see LICENSE-APACHE2.txt or http://www.apache.org/licenses/LICENSE-2.0) from __future__ import absolute_import,...
apache-2.0
-6,543,868,427,845,486,000
43.598315
159
0.580336
false
4.053357
true
false
false
jolid/script.module.donnie
lib/donnie/hgtv.py
1
3410
import urllib2, urllib, sys, os, re, random, copy import urlresolver from BeautifulSoup import BeautifulSoup, Tag, NavigableString import xbmc,xbmcplugin,xbmcgui,xbmcaddon from t0mm0.common.net import Net from t0mm0.common.addon import Addon from scrapers import CommonScraper net = Net() ''' ########################...
gpl-2.0
-1,216,272,242,217,462,300
20.049383
118
0.637243
false
3.061041
false
false
false
MacHu-GWU/pyknackhq-project
setup.py
1
4034
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Frequent used classifiers List = [ "Development Status :: 1 - Planning", "Development Status :: 2 - Pre-Alpha", "Development Status :: 3 - Alpha", "Development Status :: 4 - Beta", "Development Status :: 5 - Production/Stable", "Development Stat...
mit
-7,294,247,463,790,889,000
32.907563
85
0.65171
false
3.827324
false
false
false
INFN-Catania/FedManager
fednodes/abstract_classes.py
1
2405
""" Copyright 2015 INFN (Italy) 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
-6,429,133,711,305,096,000
22.125
85
0.665696
false
4.580952
true
false
false
Azure/azure-sdk-for-python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_configuration.py
1
3238
# 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 may ...
mit
-288,816,339,190,468,300
44.605634
129
0.66677
false
4.522346
true
false
false
town-hall-pinball/project-omega
pin/service/matrix.py
1
3862
# Copyright (c) 2014 - 2016 townhallpinball.org # # 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, merge, p...
mit
-4,653,638,042,930,319,000
35.093458
77
0.586225
false
3.858142
false
false
false
fuku-ys/earthquake
pyearthquake/OLD.orchestrator/explorer.py
1
10760
from abc import ABCMeta, abstractmethod import colorama import random import json from eventlet.greenthread import sleep from eventlet.timeout import Timeout from eventlet.queue import * import six import time from .. import LOG as _LOG from ..signal.signal import EventBase, ActionBase from .digestible import Digesti...
apache-2.0
-7,532,178,620,348,961,000
37.705036
137
0.598978
false
3.672355
false
false
false
nickmarton/Vivid
vivid/classes/parsers/point_parser.py
1
2439
"""This section introduces the PointParser class.""" import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from point import Point class PointParser(object): """ PointParser class. The PointParser class is used for parsing Point object related expressions. ...
mit
2,184,414,222,683,700,700
29.111111
79
0.568676
false
3.914928
false
false
false
meyerbe/pycles
generate_namelist.py
1
70404
import argparse import json import pprint from sys import exit import uuid import ast def main(): parser = argparse.ArgumentParser(prog='Namelist Generator') parser.add_argument('case_name') # Optional Arguments for CGILS parser.add_argument('--perturbed_temperature', default='False', ...
gpl-3.0
-4,516,272,211,340,390,400
32.287943
167
0.590066
false
3.448979
false
false
false
msduketown/SublimeKodi
libs/polib/polib.py
1
61741
# -* coding: utf-8 -*- # # License: MIT (see LICENSE file provided) # vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: """ **polib** allows you to manipulate, create, modify gettext files (pot, po and mo files). You can load existing files, iterate through it's entries, add, modify entries, comments or metada...
gpl-3.0
-7,919,191,279,515,197,000
32.830685
79
0.524076
false
4.292936
false
false
false
google-research/language
language/boolq/utils/ops_test.py
1
2375
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
apache-2.0
-7,743,939,903,547,159,000
33.318841
78
0.650338
false
3.402299
true
false
false
yephper/django
django/db/models/sql/datastructures.py
1
5769
""" Useful auxiliary data structures for query construction. Not useful outside the SQL domain. """ from django.db.models.sql.constants import INNER, LOUTER class EmptyResultSet(Exception): pass class MultiJoin(Exception): """ Used by join construction code to indicate the point at which a ...
bsd-3-clause
3,852,059,462,190,992,400
36.46
98
0.596637
false
4.051264
false
false
false
Zephrys/monica
monica/monica.py
1
8780
r""" monica is a command line chef that brings you tasty food Usage: monica surprise monica restaurant <restaurant-id> monica search [QUERY ...] monica reviews <restaurant-id> monica budget <budget> monica cuisine (<cuisine-id>| list) monica configure monica (-h |--help) monica Options: -h --help ...
mit
-6,934,554,040,084,423,000
34.695122
220
0.609795
false
3.358837
true
false
false
netvl/contrib-python-qubell-client
qubell/api/private/environment.py
1
9095
# Copyright (c) 2013 Qubell Inc., http://qubell.com # # 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 agr...
apache-2.0
8,695,219,347,984,874,000
37.538136
130
0.624739
false
3.905109
true
false
false
tsheets/api_python
tsheets/model.py
1
5132
import pytz from . import helpers import dateutil.parser from datetime import datetime, date class Model(object): _accessors = {} _default_type = "anything" def __init__(self, **kwargs): self._dynamic_accessors = [] if kwargs: self.__class__.mass_assign(self, kwargs) @clas...
mit
2,925,916,794,490,887,000
29.366864
99
0.521239
false
4.287385
false
false
false
rupakc/Kaggle-Compendium
Santas Stolen Sleigh/SantaUtil.py
1
6924
# -*- coding: utf-8 -*- """ Created on Wed Jan 13 23:21:29 2016 Defines a set of utility functions to be used for prediction @author: Rupak Chakraborty """ import math from trip import Trip from gift import Gift import random import time import pandas as pd import operator RADIUS_EARTH = 6773 NORTH_POLE_LAT = 90 NOR...
mit
4,864,461,835,213,508,000
24.09058
139
0.677643
false
3.372625
false
false
false
DataONEorg/d1_python
lib_common/src/d1_common/system_metadata.py
1
14840
# This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
apache-2.0
5,772,235,243,419,589,000
31.121212
88
0.674124
false
3.701671
false
false
false
rhiever/MarkovNetwork
MarkovNetwork/MarkovNetwork.py
1
10471
# -*- coding: utf-8 -*- """ Copyright 2016 Randal S. Olson 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, merge...
mit
3,013,961,939,012,819,500
44.724891
163
0.615892
false
4.185052
false
false
false
googleapis/python-compute
tests/unit/gapic/compute_v1/test_reservations.py
1
72826
# -*- 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,268,545,840,816,535,800
38.882804
111
0.654615
false
4.164579
true
false
false
crawfordsm/pyspectrograph
PySpectrograph/Utilities/makeplots.py
1
1688
# # MAKEPLOTS--A library for making plots for demaniacs # # # from pylab import * import numpy def plotframe(data): """Plot the entire data array returns a figure """ nimg = 10 ywidth = 0.08 xlen = len(data[0]) / nimg for i in range(nimg): yax = 0.90 - ywidth * 1.1 * i ...
bsd-3-clause
-7,940,486,904,649,295,000
22.774648
79
0.507109
false
2.726979
false
false
false
robert-giaquinto/text-analysis
src/topic_model/build_cdtm_data.py
1
2688
from __future__ import division, print_function, absolute_import import os import argparse def day_counts(keys_file, rounding_days=None): """ keys_file: input file with float of date (normalized so first journals begin at zero) in the 4th column. rounding_days: number of days to round the d...
mit
6,814,561,433,682,251,000
36.859155
146
0.59747
false
3.424204
true
false
false
PhloxAR/phloxar
PhloxAR/dc1394/mode.py
1
12891
# -*- coding: utf-8 -*- from __future__ import division, print_function from __future__ import absolute_import, unicode_literals from .core import * from ctypes import c_int32, c_uint32, c_uint64, c_float, byref, pointer __all__ = [ 'Mode', 'Format7', 'mode_map' ] class Mode(object): """ Video mode fo...
apache-2.0
-2,508,890,066,847,390,700
29.839713
80
0.551082
false
3.745206
false
false
false
bdestombe/flopy-1
flopy/utils/mflistfile.py
1
25207
""" This is a set of classes for reading budget information out of MODFLOW-style listing files. Cumulative and incremental budgets are returned as numpy recarrays, which can then be easily plotted. """ import collections import os import re import sys from datetime import timedelta import numpy as np from ..utils.u...
bsd-3-clause
148,176,429,000,663,900
30.907595
101
0.509105
false
4.124857
false
false
false
glaubitz/fs-uae-debian
launcher/amitools/fs/validate/DirScan.py
1
6950
from __future__ import absolute_import from __future__ import print_function from .BlockScan import BlockScan from amitools.fs.FSString import FSString from amitools.fs.FileName import FileName from amitools.fs.validate.Log import Log import amitools.fs.DosType as DosType class DirChainEntry: """entry of the hash c...
gpl-2.0
-242,199,672,101,419,070
28.324895
147
0.602734
false
3.153358
false
false
false
zjurelinac/Linker
utils.py
1
2492
"""Module containing utility functions""" import base64 import hashlib import random import re import string from datetime import datetime from math import * def hashfunc( str ): """Returns a hash value of a given string Takes a string and returns its SHA512 hash value, encoded in base64 """ ...
mit
6,123,698,279,064,488,000
28.666667
103
0.567014
false
3.648609
false
false
false
hirokiky/django-webcommands
webcommands/forms.py
1
1779
from django import forms from django.utils import six from webcommands import utils as webcommands_utils def field_for_option(option): if option.type == 'string': field = forms.CharField(label=str(option), max_length='255') elif option.type == 'int': field = forms.IntegerField(label=str(optio...
mit
8,279,747,194,203,811,000
30.767857
79
0.641372
false
4.006757
false
false
false
ksurct/MercuryRoboticsEmbedded2016
ksurobot/hardware/_wiringpi.py
1
1766
from ctypes import cdll, c_int, CFUNCTYPE, POINTER, pointer, c_ubyte from enum import Enum, IntEnum from ..util import get_config from .utils import Wrapper libwiringpi = Wrapper('/usr/local/lib/libwiringPi.so.2.32') wiringPiISR_cb = CFUNCTYPE(None) wiringPiPiSPIDataRW_data = POINTER(c_ubyte) class PinModes(IntE...
apache-2.0
712,612,528,227,094,300
15.819048
68
0.671574
false
2.616296
false
false
false
vanzhiganov/jftpgw
support/cachepurgy.py
1
2239
#!/usr/bin/env python # # cachepurgy - script to reduce the size of a jftpgw cache # # (C) 2001 Julian Einwag <julian@brightstar.swin.de> # from sys import * from os import * from string import * from stat import * from time import * maxsize = 40*1024*1024 cachedir = "/tmp/cache" # This class stores the informati...
gpl-2.0
-3,612,532,231,312,575,000
20.528846
77
0.562305
false
3.570973
false
false
false
teeheee/RobocupSoccerSimulator
robotsimul.py
1
5679
#!/usr/bin/env python3 from game import * from debugger import Debugger from logSaver import Logger from gameconfig import gc from popup_menu import * import sys import time #TODO more comments #TODO clean up this mess class App: def __init__(self): # flag for shutdown of the simulation self._run...
gpl-3.0
7,155,189,578,462,399,000
32.803571
117
0.534777
false
3.88175
false
false
false
mikkokeskinen/tunnistamo
oidc_apis/models.py
1
6847
from django.core.exceptions import ValidationError from django.core.validators import RegexValidator from django.db import models from django.utils.crypto import get_random_string from django.utils.translation import ugettext_lazy as _ from multiselectfield import MultiSelectField from oidc_provider.models import Clien...
mit
4,226,253,380,893,948,400
32.89604
79
0.621732
false
4.182651
false
false
false
PeteE/roro
python/driver.py
1
2957
import time import signal import sys import smbus import robot_data_pb2 from oled_display import OledDisplay class RobotDriver: SERVO_STOP = 90 def __init__(self, i2c_address=0x04, i2c_bus=1, oled_display=None): self.i2c_address = i2c_address self.i2c_bus = smbus.SMBus(i2c_bus) self.ol...
bsd-3-clause
8,227,827,704,568,035,000
32.602273
94
0.554616
false
3.253025
false
false
false
dansbecker/what-celebrity
data_grabbers.py
1
4607
import concurrent.futures import indicoio import json import os import socket import urllib.request from os.path import join, exists from PIL import Image, ImageDraw class Grabber(object): def __enter__(self): try: with open(self._captured_data_path, 'r') as f: self.captured_da...
mit
-6,785,651,822,177,585,000
38.042373
96
0.572173
false
3.535687
false
false
false
ashutosh-mishra/youtube-dl
youtube_dl/extractor/spiegel.py
1
2462
import re import xml.etree.ElementTree from .common import InfoExtractor class SpiegelIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?spiegel\.de/video/[^/]*-(?P<videoID>[0-9]+)(?:\.html)?(?:#.*)?$' _TESTS = [{ u'url': u'http://www.spiegel.de/video/vulkan-tungurahua-in-ecuador-ist-wieder-aktiv-v...
unlicense
-2,908,200,738,147,478,000
36.30303
112
0.542242
false
3.152369
false
false
false
hyperized/ansible
lib/ansible/modules/net_tools/basics/uri.py
1
25199
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Romeo Theriault <romeot () hawaii.edu> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_ver...
gpl-3.0
-2,665,481,652,045,576,700
34.692635
129
0.620183
false
3.892339
false
false
false
memeticlabs/mongokit
listembed-test.py
1
4479
try: import unittest2 as unittest except ImportError: import unittest from mongokit import Document, Connection class DescriptorsTestCase(unittest.TestCase): def setUp(self): self.connection = Connection() self.col = self.connection['test']['mongokit'] def tearDown(self): ...
bsd-3-clause
-1,479,203,696,639,042,800
22.698413
73
0.385577
false
5.257042
true
false
false
TheWardoctor/Wardoctors-repo
script.module.uncoded/lib/resources/lib/modules/sources.py
1
56371
# -*- coding: utf-8 -*- ''' Covenant Add-on This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This prog...
apache-2.0
7,397,716,890,154,723,000
46.370588
499
0.509021
false
3.863674
false
false
false
vgrem/Office365-REST-Python-Client
office365/runtime/queries/client_query.py
1
1772
class ClientQuery(object): """Client query""" def __init__(self, context, binding_type=None, parameter_type=None, parameter_name=None, return_type=None): """ Base query :type context: office365.runtime.client_runtime_context.ClientRuntimeContext :type binding_type: office365.ru...
mit
-7,357,655,738,722,110,000
30.642857
120
0.649549
false
4.082949
false
false
false
mago1chi/cTPR
parse_proc.py
1
3278
import os import re import cTPR class Parser(): def __init__(self, fileName="tweet.txt"): self.fileName = fileName self.parsed_list = [] self.count_dic = {} self.raw_list = [] def parse(self, tweet): self.parsed_list = [] self.count_dic = {} self.raw_list = [] filtered_tweet...
gpl-2.0
7,673,179,145,309,621,000
24.033333
85
0.494008
false
2.535021
false
false
false
fedora-infra/fmn
fmn/fasjson_client.py
1
2072
import logging import requests import requests.exceptions from gssapi import Credentials, exceptions from requests.compat import urlencode, urljoin from requests_gssapi import HTTPSPNEGOAuth log = logging.getLogger(__name__) class Client(object): """ A fasjson client to make very specific requests to fasjs...
lgpl-2.1
297,541,774,851,337,700
31.888889
74
0.6139
false
4.12749
false
false
false
dorianamouroux/snak
snak/commands/init.py
1
1780
import os from collections import namedtuple import click from ..config import GlobalConfig _, current_folder = os.path.split(os.getcwd()) UserInput = namedtuple('UserInput', ['name', 'version', 'author', 'description']) class Init(object): def __init__(self, filename=None): self.config = GlobalConfi...
mit
2,407,176,973,942,881,000
34.6
81
0.594944
false
4.110855
true
false
false
cwilhelm/django-teams
teams/admin.py
1
5240
from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from models import * class PersonAttributeInline(admin.TabularInline): model = PersonAttribute list_display = ('email', 'birthdate', 'height', 'weight') class PlayerInline(admin.TabularInline): model = Player e...
bsd-3-clause
5,131,194,923,734,271,000
28.772727
74
0.627481
false
3.603851
false
false
false
elimence/edx-platform
common/lib/capa/capa/util.py
1
3147
from calc import evaluator, UndefinedVariable from cmath import isinf #----------------------------------------------------------------------------- # # Utility functions used in CAPA responsetypes def compare_with_tolerance(v1, v2, tol): ''' Compare v1 to v2 with maximum tolerance tol tol is relative if it ...
agpl-3.0
1,461,137,611,740,416,500
30.787879
78
0.597394
false
3.919054
false
false
false