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
willingc/succulent-pups
config/settings/production.py
1
5159
# -*- coding: utf-8 -*- ''' Production Configurations - Use djangosecure - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis on Heroku ''' from __future__ import absolute_import, unicode_literals from boto.s3.connection import OrdinaryCallingFormat from django.utils...
bsd-3-clause
3,801,262,370,812,564,500
36.115108
117
0.62706
false
3.74655
true
false
false
InsightSoftwareConsortium/ITKExamples
src/Core/Common/ObserveAnEvent/Code.py
1
1028
#!/usr/bin/env python # Copyright NumFOCUS # # 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.txt # # Unless required by applicable law or ...
apache-2.0
7,537,944,320,815,879,000
25.358974
74
0.747082
false
3.449664
false
false
false
zasdfgbnm/tensorflow
tensorflow/python/estimator/util.py
1
1811
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-1,776,816,529,995,017,500
30.224138
80
0.680287
false
3.886266
false
false
false
gkonstantyno/construct
construct/protocols/layer3/dhcpv4.py
1
6429
""" Dynamic Host Configuration Protocol for IPv4 http://www.networksorcery.com/enp/protocol/dhcp.htm http://www.networksorcery.com/enp/protocol/bootp/options.htm """ from binascii import unhexlify from construct import * from ipv4 import IpAddress dhcp_option = Struct("dhcp_option", Enum(Byte("code"), P...
mit
-2,805,672,608,556,438,000
31.969231
76
0.605226
false
3.671616
false
false
false
gtalarico/pyrevitplus
pyRevitPlus.tab/Smart Align.panel/smartalign.stack/Lib/smartalign/distribute.py
1
3365
""" Smart Align Provides Aligning functionality for various Revit Objects. TESTED REVIT API: 2015 | 2016 Copyright (c) 2014-2016 Gui Talarico github.com/gtalarico | @gtalarico This script is part of PyRevitPlus: Extensions for PyRevit github.com/gtalarico | @gtalarico -------------------------------------...
gpl-3.0
-8,550,756,224,317,934,000
31.316832
82
0.653492
false
3.606645
false
false
false
boknilev/diacritization
extract_data.py
1
7629
__author__ = 'belinkov' import sys import os import codecs import re from data_utils import DIACS, REGEX_DIACS REGEX_SOLUTION_DIAC = re.compile(r'\((.+?)\)') # for gold diacritized word class WordAnalysis(object): """ A simplified pos analysis from treebank pos/before-treebank files. Attributes: ...
mit
4,356,671,307,383,967,000
38.528497
119
0.565998
false
3.703398
false
false
false
transientlunatic/minke
minke/antenna.py
1
3841
""" This module provides functions to calculate antenna factors for a given time, a given sky location and a given detector. Adapted from the implementation in pylal """ import sys from math import * import lal import lalsimulation __author__ = "Alexander Dietz <Alexander.Dietz@astro.cf.ac.uk>; Daniel Williams <danie...
isc
5,938,514,258,122,833,000
30.743802
120
0.67899
false
3.163921
false
false
false
20tab/twentytab-seo
seo/template_context/context_processors.py
1
2841
from seo.models import MetaPage, MetaSite class MetaContent(object): """ MetaContent class define an object that contain informations about page or publication. These informations are included in template. """ def __init__(self): self.title = "" self.description = "" self...
mit
-8,941,388,902,364,435,000
31.284091
118
0.571278
false
4.350689
false
false
false
citrix-openstack-build/python-saharaclient
saharaclient/openstack/common/importutils.py
1
2367
# 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 req...
apache-2.0
5,951,684,899,121,669,000
31.424658
78
0.667934
false
4.005076
false
false
false
rfyiamcool/TimeCost
timecost.py
1
1310
import time import functools class TimeCost(object): def __init__(self, unit='s', precision=4, logger=None): self.start = None self.end = None self.total = 0 self.unit = unit self.precision = precision self.__unitfactor = {'s': 1, 'ms': 1000, ...
mit
9,133,844,000,565,606,000
29.465116
78
0.529008
false
3.89881
false
false
false
ahartoto/lendingclub2
lendingclub2/request.py
1
2731
# Filename: request.py """ LendingClub2 Request Module Interface functions: get post """ # Standard libraries import datetime import time # Requests import requests # Lending Club from lendingclub2.authorization import Authorization from lendingclub2.config import REQUEST_LIMIT_PER_SEC from lendingclub2.er...
mit
-9,145,021,347,564,711,000
26.585859
75
0.671183
false
3.901429
false
false
false
zyga/arrowhead
xkcd518.py
1
3193
#!/usr/bin/env python3 from arrowhead import Flow, step, arrow, main def ask(prompt): answer = None while answer not in ('yes', 'no'): answer = input(prompt + ' ') return answer class XKCD518(Flow): """ https://xkcd.com/518/ """ @step(initial=True, level=1) @arrow('do_you_un...
bsd-3-clause
-9,054,405,839,265,277,000
21.173611
62
0.509239
false
3.258163
false
false
false
EconForge/dolo
dolo/linter.py
1
17659
# import ast # import json # import ruamel.yaml as ry # from ruamel.yaml.comments import CommentedSeq # from dolo.compiler.symbolic import check_expression # from dolo.compiler.recipes import recipes # from dolo.misc.termcolor import colored # class Compare: # def __init__(self): # self.d = {} # def ...
bsd-2-clause
-5,633,091,538,059,207,000
33.693517
81
0.482474
false
3.522641
false
false
false
smurfix/HomEvenT
irrigation/rainman/migrations/0031_auto.py
1
20462
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding M2M table for field xdays on 'Group' db.create_table('rainman_group_xdays', ( ('id', mo...
gpl-3.0
4,006,488,282,154,659,000
77.402299
182
0.537973
false
3.655887
false
false
false
rwl/PyCIM
CIM14/ENTSOE/Dynamics/IEC61970/Dynamics/DynamicsMetaBlockParameterReference.py
1
4926
# Copyright (C) 2010-2011 Richard Lincoln # # 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, publish...
mit
-4,645,534,073,048,918,000
49.783505
150
0.75944
false
4.478182
false
false
false
jvce92/web-tdd
lists/tests/testView.py
1
4453
from django.test import TestCase from django.core.urlresolvers import resolve from lists.views import homePage from django.http import HttpRequest from django.template.loader import render_to_string from lists.models import Item, List from django.utils.html import escape # Create your tests here. # # class smokeTest(T...
gpl-3.0
5,634,385,062,296,922,000
33.789063
91
0.650573
false
3.86881
true
false
false
radical-cybertools/radical.repex
old/misc/experimental_async/async_with_pipeline_suspend.py
1
9815
#!/usr/bin/env python import radical.utils as ru #import radical.analytics as ra import radical.entk as re from radical.entk import Pipeline, Stage, Task, AppManager import os import tarfile import writeInputs import time import git #import replica #os.environ['RADICAL_SAGA_VERBOSE'] = 'INFO' os.environ['R...
mit
-1,247,269,295,089,884,200
34.690909
130
0.563423
false
3.856582
false
false
false
dextervip/rpv
GerenDisponibilidade/setup.py
1
1613
from distutils.core import setup from distutils.command.install import INSTALL_SCHEMES import os VERSION = '0.3' # Fazendo os dados irem para o lugar correto. [Make data go to the right place.] # http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb for scheme in INST...
gpl-3.0
-2,980,506,392,158,818,300
37.404762
104
0.688779
false
3.982716
false
false
false
ella/mypage
mypage/pages/migrations/0008_dupe_sites.py
1
3621
from south.db import db from django.db import models from django.db.models import F from mypage.pages.models import * import datetime class Migration: def forwards(self, orm): ''' if not db.dry_run: orm.UserPage.objects.update(site_copy=F('site')) orm.SessionPage.objec...
bsd-3-clause
-4,512,450,370,742,625,300
45.423077
145
0.495996
false
3.803571
false
false
false
cupy/cupy
tests/cupyx_tests/scipy_tests/linalg_tests/test_decomp_lu.py
1
4936
import unittest import warnings import numpy import cupy from cupy import testing import cupyx.scipy.linalg if cupyx.scipy._scipy_available: import scipy.linalg @testing.gpu @testing.parameterize(*testing.product({ 'shape': [(1, 1), (2, 2), (3, 3), (5, 5), (1, 5), (5, 1), (2, 5), (5, 2)], })) @testing.fix_ra...
mit
3,208,808,118,296,692,700
36.112782
78
0.595421
false
3.031941
true
false
false
bailabs/bench-v7
bench/commands/update.py
1
7760
import click import sys, os from bench.config.common_site_config import get_config from bench.app import pull_all_apps, is_version_upgrade from bench.utils import (update_bench, validate_upgrade, pre_upgrade, post_upgrade, before_update, update_requirements, backup_all_sites, patch_sites, build...
gpl-3.0
4,466,500,918,880,796,700
38.794872
160
0.677835
false
3.579336
false
false
false
Maleus/Enumerator
enumerator/lib/generic_service.py
1
2366
#!/usr/bin/env python """GenericService encapsulates any methods which are common across all service modules. @author: Steve Coward (steve<at>sugarstack.io) @version 1.0 """ import os import re class GenericService(object): static_path = '%s/../static' % os.path.dirname(os.path.realpath(__file__)) compiled_...
mit
-7,374,674,132,465,793,000
34.313433
97
0.569315
false
4.217469
false
false
false
buguen/pylayers
pylayers/util/cone.py
1
20331
#-*- coding:Utf-8 -*- r""" Class Cone ========== The following conventions are adopted + A cone has an **apex** which is a point in the plane. + A cone has two vectors which define the cone aperture. The order of those two vectors matters (u) is the starting vector (u) and (v) the ending vector. The cone region is...
lgpl-3.0
8,532,794,341,175,884,000
27.395251
128
0.4471
false
3.071148
false
false
false
danylaksono/inasafe
safe/messaging/item/row.py
1
2919
""" InaSAFE Disaster risk assessment tool developed by AusAid - **Row** Contact : ole.moller.nielsen@gmail.com .. note:: 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...
gpl-3.0
1,648,468,602,593,973,200
24.605263
78
0.578623
false
4.382883
false
false
false
rahulunair/nova
nova/tests/unit/api/openstack/compute/test_serversV21.py
1
378354
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www...
apache-2.0
1,245,279,963,337,041,000
43.045867
79
0.557206
false
3.939177
true
false
false
hansehe/Wind-Blade-Inspection
TestUnits/Test_src/Test_DroneVision/Test_DroneVision_src/Test_imgProcessing/Test_Heading/Test_EdgeHeading.py
1
4905
''' Author: Hans Erik Heggem Email: hans.erik.heggem@gmail.com Project: Master's Thesis - Autonomous Inspection Of Wind Blades Repository: Master's Thesis - CV (Computer Vision) ''' ################### UNIT TEST ######################## import unittest from Settings.TestData import TestData from TestUnits.Test_ma...
mit
4,514,450,617,151,839,000
42.035088
244
0.707441
false
3.199609
true
false
false
lddias/python-avs
debug.py
1
1030
import time def fake_mic(logger, q, mic_stopped): time.sleep(60) logger.debug("TRIGGERED") class StoppableAudioStreamLike: def __init__(self, file): self._f = file self._eof = False self._last_byte = None def read(self, size=-1): if mic_sto...
mit
-3,517,990,759,981,812,000
27.611111
95
0.495146
false
3.705036
false
false
false
tristandb/CaDaBata
cadabata.py
1
1545
from eca import * from eca.generators import start_offline_tweets import datetime @event('init') def setup(ctx, e): '''The code that will be executed at initialization: starting the offline tweet stream.''' start_offline_tweets('cadabata_static/batatweets.txt', 'tweet', time_factor=100000, arff_file='classi...
mit
3,844,286,205,517,304,000
27.090909
138
0.604531
false
3.584687
false
false
false
jeffposnick/chromium-dashboard
common.py
1
6649
# -*- coding: utf-8 -*- # Copyright 2013 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...
apache-2.0
5,276,832,687,915,904,000
30.813397
80
0.630772
false
3.563237
false
false
false
sdrdis/iarpa_contest_submission
lib_exec/StereoPipeline/libexec/asp_cmd_utils.py
1
6816
#!/usr/bin/env python # -*- coding: utf-8 -*- # __BEGIN_LICENSE__ # Copyright (c) 2009-2013, United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. All # rights reserved. # # The NGT platform is licensed under the Apache License, Version 2.0 (the # "Lic...
mit
-4,660,527,434,852,196,000
37.948571
119
0.59375
false
4.204812
false
false
false
f-frhs/queequeg
document.py
1
5023
#!/usr/bin/env python ## $Id: document.py,v 1.2 2003/07/27 13:54:05 euske Exp $ ## ## document.py - Document analyzer (HTML/TeX/PlainText) ## import re, sys from texparser import TexParser, TexTokenizer from sgmllib_rev import SGMLParser from abstfilter import AbstractFeeder, AbstractFilter, AbstractConsumer clas...
gpl-2.0
445,269,795,249,341,760
18.93254
71
0.614175
false
3.380215
false
false
false
akelm/YAMS
yams/wzm_layer.py
1
3735
import numpy as np from scipy import special from sum_conv import sum_conv def wzm_layer(ME1,MM1, MEdd, MMdd,Lambda,odl, Ceps,pin, taun, bn1mat,settings): ## wzmocnienie pola w srodku warstwy # (Cst{1}.ME,Cst{1}.MM, Cst{dd}.ME, Cst{dd}.MM,... # lambda, dip_pos ,Cepsilon{dd},theta,stPinTaun ) nNbtheta=pi...
gpl-3.0
-6,966,585,909,532,253,000
37.90625
90
0.538956
false
2.276051
false
false
false
epam/DLab
infrastructure-provisioning/src/general/scripts/azure/ssn_create_vpc.py
1
1571
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM SYSTEMS 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 # #...
apache-2.0
2,222,215,809,739,852,500
37.317073
106
0.623806
false
3.957179
false
false
false
arunchandramouli/fanofpython
code/features/datatypes/dicts.py
1
3592
''' Aim :: To demonstrate the use of a dictionary Define a simple dictionary , add values to it and iterate and print it Dictionary works based on hashing principle ... simply said key,value pairs ** A dictionary object is a mutable datatype which means it couldnt be hashed Anything that cant be hashed can...
gpl-3.0
-2,898,241,896,216,891,000
19.179775
125
0.599109
false
2.91322
false
false
false
samshara/Stock-Market-Analysis-and-Prediction
smap_nepse/preprocessing/visualization.py
1
6795
import pandas as pd import numpy as np import csv import os import matplotlib.pyplot as plt import cufflinks as cf import plotly import plotly.offline as py from plotly.offline.offline import _plot_html import plotly.graph_objs as go from plotly.tools import FigureFactory as FF cf.set_config_file(world_readable=False,...
mit
210,266,800,827,579,520
45.541096
179
0.647976
false
3.655191
false
false
false
michael-lazar/mailcap_fix
tests/test_mailcap_python.py
1
10329
############################################################################### # This file was copied from cpython/Lib/tests/test_mailcap.py # Some lines have been modified to work without the python test runner ############################################################################### import os import copy impo...
unlicense
7,113,809,215,644,407,000
41.336066
104
0.538871
false
3.762842
true
false
false
PKRoma/httpie
tests/test_compress.py
1
3882
""" We test against httpbin which doesn't return the request data in a consistent way: 1. Non-form requests: the `data` field contains base64 encoded version of our zlib-encoded request data. 2. Form requests: `form` contains a messed up version of the data. """ import base64 import zlib from .fixtures import FILE_...
bsd-3-clause
5,335,729,547,268,975,000
26.728571
73
0.607161
false
3.611163
true
false
false
alirizakeles/tendenci
tendenci/apps/accountings/management/commands/correct_membership_acct_number.py
1
2067
from django.core.management.base import BaseCommand from django.contrib.contenttypes.models import ContentType class Command(BaseCommand): """ Correct the account_number of AcctTran records for the memberships for those that are wrongly assigned with the event's account_number. Usage: python manage.p...
gpl-3.0
4,600,237,004,960,355,300
42.0625
72
0.50895
false
5.286445
false
false
false
south-coast-science/scs_core
src/scs_core/position/nmea/gpgga.py
1
4215
""" Created on 30 Dec 2016 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) Global positioning system fix data $xxGGA,time,lat,NS,long,EW,quality,numSV,HDOP,alt,M,sep,M,diffAge,diffStation*cs example sentence: $GPGGA,092725.00,4717.11399,N,00833.91590,E,1,08,1.01,499.6,M,48.0,M,,*5B example values: GPGGA:...
mit
7,338,479,952,412,405,000
27.869863
118
0.474259
false
3.53311
false
false
false
knights-lab/SHOGUN
shogun/utils/tree.py
1
2735
from collections import defaultdict import csv class Taxonomy: def __init__(self, filename: str): self.tax = self.parse_taxonomy(filename) @classmethod def parse_taxonomy(cls, filename: str) -> dict: with open(filename) as inf: csv_inf = csv.reader(inf, delimiter='\t') ...
agpl-3.0
-8,318,682,223,261,966,000
34.064103
124
0.564534
false
3.002195
false
false
false
ramovsky/lunch
tests/test_config.py
1
1313
import unittest from tempfile import NamedTemporaryFile from lunch.session import Session, SessionFinished, Config, User class TestConfig(unittest.TestCase): def test_add_place(self): config = Config() config.add_place('Sisaket') self.assertAlmostEqual(1, len(config)) config.add_...
mit
-7,776,214,906,230,288,000
29.534884
64
0.621478
false
3.954819
true
false
false
jpfairbanks/streaming
moving_average.py
1
2010
from __future__ import print_function """ This module produces a stream of random variables from a moving average model. The first command line argument is the number of samples negative means infinite. The second argument is the window size. The moving average is uniform over the window. The third argument is the fi...
bsd-3-clause
-7,765,423,684,961,808,000
29.923077
86
0.687562
false
3.378151
false
false
false
MarkusHackspacher/unknown-horizons
horizons/world/building/settler.py
1
19857
# ################################################### # Copyright (C) 2008-2017 The Unknown Horizons Team # team@unknown-horizons.org # This file is part of Unknown Horizons. # # Unknown Horizons is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
gpl-2.0
-3,310,390,831,025,852,400
42.737885
156
0.733646
false
3.315025
false
false
false
petry/django-press
press/migrations/0008_auto__add_field_author_photo.py
1
9023
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Author.photo' db.add_column(u'press_author', 'photo', self.gf('django....
bsd-3-clause
4,100,511,375,027,724,300
74.2
187
0.548155
false
3.613536
false
false
false
wtbarnes/synthesizAR
synthesizAR/analysis/eis.py
1
9639
""" Helpers for analyzing synthetic EIS data """ import os import numpy as np from sunpy.util.metadata import MetaDict from sunpy.map import Map from sunpy.io.fits import get_header from sunpy.visualization.colormaps.cm import hinodexrt import astropy.units as u import astropy.io.fits import h5py __all__ = ['EISCube'...
gpl-3.0
2,225,193,771,007,478,800
38.504098
118
0.5651
false
3.672
false
false
false
t3dev/odoo
addons/website_slides/tests/test_statistics.py
1
5815
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import math from odoo.addons.website_slides.tests import common from odoo.exceptions import AccessError, UserError from odoo.tests import tagged from odoo.tests.common import users from odoo.tools import m...
gpl-3.0
6,279,237,426,971,799,000
42.721805
145
0.663629
false
3.625312
true
false
false
gonzalolarralde/FakeARMVE
fake_firmware/messages.py
1
8599
# -*- coding: utf-8 -*- import platform import struct from construct import Container from construct.core import FieldError from datetime import datetime from time import sleep from zlib import crc32 from constants import * from structs import * from helpers import * MESSAGE_HANDLERS = [] DEBUG = True def prepare_...
agpl-3.0
1,663,717,867,268,342,800
34.979079
180
0.674148
false
3.193093
false
false
false
justas-/pyledbat
pyledbat/ledbat/baseledbat.py
1
6716
""" Copyright 2017, J. Poderys, Technical University of Denmark 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
1,560,566,274,252,504,300
38.274854
99
0.599315
false
3.877598
false
false
false
xdlinux/xidian-scripts
Python/get_xidian_news.py
1
4476
# Copyright (C) 2020 by the XiDian Open Source Community. # # This file is part of xidian-scripts. # # xidian-scripts is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or ...
lgpl-3.0
-4,134,377,156,185,125,400
24.333333
141
0.669441
false
1.890355
false
false
false
ashleywaite/django-more
django_enum/operations.py
1
17196
from enum import Enum from operator import attrgetter from django.db import models from django.db.models import sql from django.db.models.deletion import Collector from django.utils import six from django_types.operations import CustomTypeOperation from .fields import EnumField """ Use a symbol = value style as...
bsd-3-clause
4,471,117,172,481,644,500
44.734043
133
0.573447
false
4.042313
false
false
false
fukun07/neural-image-captioning
codes/pycoco/bleu/bleu.py
1
1260
#!/usr/bin/env python # # File Name : bleu.py # # Description : Wrapper for BLEU scorer. # # Creation Date : 06-01-2015 # Last Modified : Thu 19 Mar 2015 09:13:28 PM PDT # Authors : Hao Fang <hfang@uw.edu> and Tsung-Yi Lin <tl483@cornell.edu> from bleu_scorer import BleuScorer class Bleu: def __init__(self, n=4...
mit
-4,045,538,868,026,867,700
26.391304
79
0.569841
false
3.165829
false
false
false
silly-wacky-3-town-toon/SOURCE-COD
toontown/catalog/CatalogChatItem.py
1
5689
from panda3d.core import * from panda3d.direct import * import CatalogItem from toontown.toonbase import ToontownGlobals from otp.otpbase import OTPLocalizer from toontown.toonbase import TTLocalizer bannedPhrases = [11009] class CatalogChatItem(CatalogItem.CatalogItem): def makeNewItem(self, customIndex): ...
apache-2.0
6,819,379,785,983,695,000
37.181208
168
0.683951
false
3.956189
false
false
false
Audaces/ml
src/po2ml/__main__.py
1
3322
#!/usr/bin/env python3 '''{executable_name}: Importer for .po files to Audaces ML new translation format. Usage: {executable_name}: [--mark <mark>] [<file>] This program imports .po (gettext translation) files to Audaces ML .tra format. If a custom mark is set through --mark, it wil be placed on both ends of th...
mit
3,981,279,307,848,930,000
29.759259
82
0.664359
false
3.945368
false
false
false
looker/sentry
src/sentry/models/file.py
1
14550
""" sentry.models.file ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os import six import mmap import tempfile from hashlib import sha1 from uuid import uuid4 from concurre...
bsd-3-clause
-434,740,297,523,743,400
29
95
0.564948
false
4.281931
false
false
false
jopohl/urh
src/urh/plugins/ZeroHide/ZeroHideAction.py
1
2253
from PyQt5.QtWidgets import QUndoCommand from urh.signalprocessing.ProtocolAnalyzer import ProtocolAnalyzer class ZeroHideAction(QUndoCommand): def __init__(self, protocol: ProtocolAnalyzer, following_zeros: int, view: int, zero_hide_offsets: dict): super().__init__() self.protocol = protocol ...
gpl-3.0
585,459,217,494,885,800
31.666667
109
0.556147
false
4.126374
false
false
false
WilsonKiggundu/HospitalManagement_InformationSystem
hospitalmanager/app/migrations/0001_initial.py
1
1041
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-16 16:26 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
gpl-3.0
8,859,425,243,024,919,000
33.7
121
0.614793
false
4.114625
false
false
false
aminotti/yameo
lib/httpmethod.py
1
11707
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Anthony Minotti <anthony@minotti.cool>. # # # This file is part of Yameo framework. # # Yameo framework is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
7,189,659,849,950,701,000
39.50519
158
0.594396
false
4.259825
false
false
false
eayunstack/oslo.messaging
tests/test_opts.py
1
1740
# Copyright 2014 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
apache-2.0
-172,664,514,099,144,160
31.222222
78
0.644828
false
3.945578
true
false
false
alexei-matveev/ccp1gui
interfaces/cmlatominfo.py
1
4268
# # This file is part of the CCP1 Graphical User Interface (ccp1gui) # # (C) 2002-2007 CCLRC Daresbury Laboratory # # 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
4,901,287,225,231,356,000
38.88785
85
0.6209
false
4.395469
false
false
false
dyf102/Gomoku-online
server/model/game.py
1
4356
import uuid EMPTY = 0 BLACK = 1 WHITE = -1 STATUS_EMPTY = 11 STATUS_WAITING = 12 STATUS_FIGHTING = 13 STATUS_SET = (STATUS_EMPTY, STATUS_WAITING, STATUS_FIGHTING) class Game(object): def __init__(self, host_id, host_name, guest_id=None, guest_name=None): self.host_id = host_id self.host_name = ...
apache-2.0
-2,934,371,076,088,916,500
29.25
76
0.463728
false
3.748709
false
false
false
FluentTradeTechnologies/netconfigit
modules/devices/fortinet.py
1
4074
# -*- coding: utf-8 -*- """ Netconfigit Fortinet device class """ __license__ = "MIT License" __author__ = "Eric Griffin" __copyright__ = "Copyright (C) 2014, Fluent Trade Technologies" __version__ = "1.1" import logging import os import time logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class...
mit
-1,249,435,471,950,509,800
33.243697
104
0.583702
false
4.261506
true
false
false
ajmarks/gymnast
gymnast/pdf_elements/pdf_page.py
1
6340
""" PDF Document Page and Page Node elements """ import six from .pdf_element import PdfElement from ..exc import PdfParseError, PdfError from ..pdf_types import PdfType, PdfRaw, PdfArray from ..pdf_parser import PdfParser from ..pdf_operation import PdfOperation def parse_page(obj): """Parse...
mit
-6,712,480,742,190,932,000
35.647399
84
0.594322
false
3.997478
false
false
false
gutow/sagenb_slickgrid
sagenb/notebook/cell.py
1
82283
# -*- coding: utf-8 -*- """ A Cell A cell is a single input/output block. Worksheets are built out of a list of cells. """ ########################################################################### # Copyright (C) 2006 William Stein <wstein@gmail.com> # # Distributed under the terms of the GNU General Public ...
gpl-3.0
-4,787,506,408,650,216,000
30.904152
153
0.513361
false
3.834927
false
false
false
debalance/hp
hp/core/urls.py
1
1430
# -*- coding: utf-8 -*- # # This file is part of the jabber.at homepage (https://github.com/jabber-at/hp). # # This project 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 (...
gpl-3.0
-8,019,578,557,664,934,000
35.666667
99
0.732867
false
3.753281
false
false
false
adazey/Muzez
libs/nltk/corpus/reader/wordnet.py
1
78713
# -*- coding: utf-8 -*- # Natural Language Toolkit: WordNet # # Copyright (C) 2001-2016 NLTK Project # Author: Steven Bethard <Steven.Bethard@colorado.edu> # Steven Bird <stevenbird1@gmail.com> # Edward Loper <edloper@gmail.com> # Nitin Madnani <nmadnani@ets.org> # Nasruddin A’ai...
gpl-3.0
-5,074,483,420,740,756,000
36.658644
137
0.549353
false
3.932304
false
false
false
jecr/tesis-caja
recovering/recover_cyclops.py
1
1648
# -*- coding: UTF-8 -*- # Búsqueda de tweets por término import tweepy import time import sys # import os consumer_key = 'e2C0wlpcDF2HFRZ1isnWXvdTm' consumer_secret = 'muqOqWH1KByuC9ARZy006P8wclAryQcUgIsa1kcEzgXuUPw1aH' access_token = '108874877-nLkeHo0WRx6Nsz9uctXFVtt9F2oam2Y8E5UfEZjt' access_token_secret = '7puoG65...
apache-2.0
3,659,899,803,650,555,000
33.270833
78
0.648024
false
2.741667
false
false
false
rgodinez/PencilCode-Work
EtSheet.py
1
3672
''' This file is part of the EdTech library project at Full Sail University. Foobar 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 v...
bsd-3-clause
-7,684,717,401,141,878,000
28.142857
72
0.644336
false
3.841004
false
false
false
nicogid/apiTwitchStats
TwitchStats/config/urls.py
1
1047
"""api URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based ...
mit
7,464,930,889,878,722,000
31.71875
79
0.706781
false
3.432787
false
false
false
jeffmarcom/checkbox
plainbox/plainbox/impl/commands/run.py
1
13956
# This file is part of Checkbox. # # Copyright 2012-2013 Canonical Ltd. # Written by: # Zygmunt Krynicki <zygmunt.krynicki@canonical.com> # # Checkbox 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 v...
gpl-3.0
-2,891,184,283,134,012,400
41.809816
79
0.58491
false
4.350374
true
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/effective_network_security_group_py3.py
1
1806
# 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
5,913,976,556,918,401,000
44.15
122
0.665559
false
4.572152
false
false
false
pbryzek/Freedom
api_client.py
1
1099
import requests import consts.paths as paths import common.globals as globals class APIClient(object): """Creates an API client object """ def __init__(self, path, params, method="GET"): #Zillow specific key self.zws_id = "X1-ZWz19tezrsrabv_5qhl2" #Specific endpoint self.p...
mit
1,373,440,640,780,670,200
23.977273
69
0.583258
false
4.040441
false
false
false
jeffreylu9/django-cms
cms/models/pagemodel.py
1
61624
# -*- coding: utf-8 -*- from logging import getLogger from os.path import join from django.conf import settings from django.contrib.auth import get_permission_codename from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from djang...
bsd-3-clause
-2,983,917,024,553,889,000
40.498316
171
0.59162
false
4.35413
false
false
false
huggingface/pytorch-transformers
src/transformers/models/roberta/modeling_roberta.py
1
65213
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
apache-2.0
8,092,571,453,882,208,000
41.875082
213
0.633601
false
3.894709
true
false
false
alimanfoo/numcodecs
numcodecs/bz2.py
1
1266
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division import bz2 as _bz2 from numcodecs.abc import Codec from numcodecs.compat import ndarray_copy, ensure_contiguous_ndarray class BZ2(Codec): """Codec providing compression using bzip2 via the Python standard library. Para...
mit
-6,111,709,686,307,507,000
24.32
82
0.634281
false
4.22
false
false
false
tvm1/yamlif
yamlif.py
1
29488
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module loads YAML configuration, presents UI to user and allows him to set and save values to another YAML file. """ import sys import os import curses import curses.textpad import textwrap import re from editor import Editor try: import yaml except ImportEr...
mit
326,057,240,882,830,200
26.905303
79
0.518087
false
3.7104
false
false
false
CaptainDesAstres/Frames-Animated-By-Curve
multi_track/TracksList.py
1
7394
import bpy from functions import * class Track(bpy.types.PropertyGroup): '''object use to be listed as track in tracks list''' def set_end_frame(self, context): '''check that start and end frame are valid when changing end frame settings''' size = self.get(True).curve_to_frame.size # check end isn't ov...
gpl-3.0
-3,735,279,142,487,749,000
23.389439
178
0.63613
false
3.140671
false
false
false
perkinslr/pyHorde3D
pyHorde3D/horde3d_h.py
1
1776
# horde3d_h.py # # Copyright 2014 Logan Perkins <perkins@lp-programming.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the Eclipse Public License 1.0 # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without...
epl-1.0
541,706,671,798,995,260
24.73913
223
0.643018
false
2.666667
false
false
false
siliconsmiley/QGIS
python/plugins/processing/algs/otb/maintenance/parsing.py
1
6131
# -*- coding: utf-8 -*- """ *************************************************************************** parsing.py --------------------- Copyright : (C) 2013 by CS Systemes d'information (CS SI) Email : otb at c-s dot fr (CS SI) Contributors : Julien Malik (CS SI) ...
gpl-2.0
-1,898,056,095,687,286,800
35.064706
81
0.550481
false
3.863264
false
false
false
gem/sidd
sidd/operator/loaders/survey.py
1
17568
# Copyright (c) 2011-2013, ImageCat Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is...
agpl-3.0
2,007,593,762,775,590,700
44.007833
133
0.55288
false
3.816641
false
false
false
ajerneck/thatsfordinner
canonical.py
1
1153
"Use a canonical list of ingredients or foods to match." import nltk import pandas as pd import functions as f import common ## exploiting that ingredients are mentioned in instructions as well. con = common.make_engine() dfe = pd.read_sql_table('recipes_recipe', con) x = dfe.head() ## intersection of ingredients...
bsd-3-clause
7,886,874,209,994,783,000
22.06
151
0.718127
false
2.889724
false
false
false
yaybu/touchdown
touchdown/aws/apigateway/method_response.py
1
2446
# Copyright 2015 Isotoma Limited # # 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
5,690,618,798,359,818,000
30.766234
86
0.701962
false
4.117845
false
false
false
js850/pele
examples/new_potential/mypotential.py
1
3624
""" an example of how to create a new potential. """ from pele.potentials import BasePotential class MyPot(BasePotential): """a Lennard Jones potential with altered exponents V(r) = 4. * (r**-24 - r**-12) """ def __init__(self, natoms): self.natoms = natoms #number of atoms def g...
gpl-3.0
-772,127,674,280,667,800
30.789474
81
0.613962
false
3.340092
false
false
false
liampauling/flumine
examples/middleware/orders.py
1
3222
import logging from flumine import config from flumine.utils import STRATEGY_NAME_HASH_LENGTH from flumine.markets.middleware import Middleware from flumine.order.trade import Trade logger = logging.getLogger(__name__) class OrdersMiddleware(Middleware): """ Middleware to add execution complete orders to...
mit
-2,638,615,105,914,977,300
37.819277
86
0.574798
false
4.200782
false
false
false
boegel/easybuild-easyblocks
easybuild/easyblocks/generic/rubygem.py
1
4937
## # Copyright 2015-2020 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
2,007,238,328,556,488,700
38.814516
115
0.648167
false
3.760091
false
false
false
sukenda/django-api-tutorial
blog/settings.py
1
5512
""" Django settings for blog project. Generated by 'django-admin startproject' using Django 1.9. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os # Buil...
mit
5,082,875,815,669,808,000
28.956522
360
0.695573
false
3.036915
false
false
false
vianuevm/cppStyle
comment_checks.py
1
2368
import re from pyparsing import Word, Literal, alphanums def check_line_width(self, line): max_length = self.max_line_length current_length = len(line) if current_length > max_length: self.add_error(label="LINE_WIDTH", data={'length': current_length}) def check_missing_rme(self, lines): functi...
mit
1,191,410,062,008,988,000
45.45098
121
0.625845
false
3.688474
false
false
false
hyc/HyperDex
test/python/RegexSearch.py
1
2310
#!/usr/bin/env python import sys import hyperdex.client from hyperdex.client import LessEqual, GreaterEqual, Range, Regex, LengthEquals, LengthLessEqual, LengthGreaterEqual c = hyperdex.client.Client(sys.argv[1], int(sys.argv[2])) def to_objectset(xs): return set([frozenset(x.items()) for x in xs]) assert c.put('kv...
bsd-3-clause
2,271,529,638,827,483,000
61.432432
273
0.55671
false
2.541254
false
false
false
GoranLundberg/RPLCD
RPLCD/i2c.py
1
11253
# -*- coding: utf-8 -*- """ Copyright (C) 2013-2017 Danilo Bargen 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,...
mit
4,186,489,563,130,845,700
41.460377
151
0.594383
false
3.438875
false
false
false
pienkowb/omelette
omelette/compiler/parser.py
1
4614
from pyparsing import * from omelette.compiler.lexer import Lexer from omelette.compiler.uml import * from omelette.compiler import logging def callback(handler): def wrapper(self, s, l, t): handler(self, t) return wrapper class Parser(object): """A class translating code to UMLObjects.""" d...
gpl-3.0
2,444,114,487,353,214,500
32.194245
80
0.597529
false
4.394286
false
false
false
qilicun/python
python3/src/oo/vehicle0.py
1
3006
from pysketcher import * R = 1 # radius of wheel L = 4 # distance between wheels H = 2 # height of vehicle body w_1 = 5 # position of front wheel xmax = w_1 + 2*L + 3*R drawing_tool.set_coordinate_system(xmin=0, xmax=xmax, ymin=-1, ymax=2*R + 3*H, ...
gpl-3.0
-143,500,134,917,915,000
29.363636
101
0.644378
false
2.944172
false
false
false
DemocracyLab/CivicTechExchange
civictechprojects/migrations/0009_auto_20180403_1604.py
1
1786
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2018-04-03 16:04 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0002_auto_20150616_2121'),...
mit
4,902,892,915,200,710,000
41.52381
181
0.620941
false
4.153488
false
false
false
nanophotonics/nplab
nplab/instrument/monochromator/bentham_DTMc300.py
1
2962
from __future__ import print_function import ctypes from nplab.instrument import Instrument from ctypes import CDLL, c_char_p,byref,c_char, POINTER, ARRAY, WinDLL import os import numpy as np import time FILEPATH = os.path.realpath(__file__) DIRPATH = os.path.dirname(FILEPATH) ATTRS_PATH = "{0}\\{1}".format(DIRPATH,"...
gpl-3.0
-9,105,023,763,205,697,000
31.56044
159
0.698177
false
2.823642
false
false
false
trdarr/apk2
import/import.py
1
1792
import urllib from io import BytesIO from xml.etree import ElementTree import psycopg2 import requests from entity import Product, Store def create_sql(table, entity): entity_dict = entity.to_dict() columns = ', '.join(entity_dict.keys()) placeholders = ', '.join(f'%({k})s' for k in entity_dict.keys()) inse...
apache-2.0
6,123,053,057,215,423,000
34.137255
78
0.68471
false
3.486381
false
false
false
dineshsonachalam/ocr
setup.py
1
1380
from setuptools import setup, find_packages import requests import semantic_version install_requires = [ 'boto3>=1.17.78', 'botocore>=1.20.78', 'simplejson==3.17.2' ] def get_LucidDynamodb_version(): url = "https://pypi.org/pypi/LucidDynamodb/json" response = requests.request("GET", url, headers={...
mit
6,862,585,355,070,034,000
33.525
69
0.635507
false
3.631579
false
false
false
gdm/skew
skew/resources/aws/s3.py
1
1420
# Copyright (c) 2014 Scopely, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distrib...
apache-2.0
7,790,654,558,427,385,000
32.023256
72
0.628873
false
3.806971
false
false
false
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/twisted/mail/imap4.py
1
185338
# -*- test-case-name: twisted.mail.test.test_imap -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ An IMAP4 protocol implementation API Stability: Semi-stable @author: U{Jp Calderone<mailto:exarkun@twistedmatrix.com>} To do:: Suspend idle timeout while server is processin...
bsd-3-clause
-8,669,594,478,378,295,000
33.044453
125
0.570752
false
4.179739
false
false
false
BeetleChunks/redsails
rsCrypto/rsCrypto.py
1
2008
import base64 import ctypes import sys from Crypto.Cipher import AES from Crypto import Random from pbkdf2 import PBKDF2 class iv: def __init__(self, bs): self.bs = bs self.usedIVs = set() self.initializeIV() def initializeIV(self): self.value = Random.new().read(self.bs) self.usedIVs....
gpl-3.0
5,536,739,678,931,007,000
24.8
108
0.693227
false
2.983655
false
false
false
riccardofreixo/ansible_ec2_elb_healthcheck
ec2_elb_healthcheck/ec2_elb_healthcheck.py
1
4619
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015 Riccardo Freixo """ Simple Ansible module to health check instances in an ELB """ DOCUMENTATION = ''' --- module: ec2_elb_healthcheck version_added: "1.8" short_description: Get instance Health Check state from ELBs description: - Gets instance Heal...
gpl-3.0
7,849,643,962,396,327,000
27.337423
119
0.658584
false
3.725
false
false
false
nsdont/gogs_ci_demo
superlists/superlists/settings.py
1
2664
""" Django settings for superlists project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build p...
mit
6,567,312,469,750,804,000
24.615385
71
0.691066
false
3.482353
false
false
false
pchmieli/h2o-3
h2o-py/tests/testdir_jira/pyunit_hexdev_296_confusion_matrices.py
1
1271
import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils def confusion_matrices_check(): local_data = [[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[0, 'b'], [0, 'b'],[0, 'b'],[0, 'b'],[0, 'b'],[0, 'b'],[0, 'b'],[0, 'b'],[0...
apache-2.0
-4,116,032,665,391,225,000
36.382353
119
0.543666
false
2.526839
false
false
false