repo_name
stringlengths
6
90
path
stringlengths
4
230
copies
stringlengths
1
4
size
stringlengths
4
7
content
stringlengths
734
985k
license
stringclasses
15 values
hash
int64
-9,223,303,126,770,100,000
9,223,233,360B
line_mean
float64
3.79
99.6
line_max
int64
19
999
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
8.06
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
SDA-SALLE/Resuspendido
src/core/wcsv.py
1
11471
#created by @ceapalaciosal #under code Creative Commons # -*- encoding: utf-8 -*- #! /usr/bin/env python import csv import os from excelmatriz import * def wcsv(data, noun): folder = os.path.join('..','data','out','EmissionGrid', 'VP', '') keys = data.keys() Types = data[keys[0]]['Emissions'].keys () for Type ...
gpl-3.0
1,759,134,557,773,414,000
32.252174
308
0.609973
false
2.382842
false
false
false
eszkadev/epub-creator
epubcreator.py
1
4601
#!/usr/bin/python from zipfile import ZipFile from abc import ABCMeta, abstractmethod from enum import Enum class ElementType(Enum): Text = 1 Paragraph = 2 Body = 3 class ElementAttribute: def __init__(self, attr, value): self.name = attr self.value = value class Element: __metaclass__ = ABCMeta def addC...
mit
9,217,288,539,111,069,000
25.291429
271
0.628559
false
2.970303
false
false
false
orbitfp7/nova
nova/cmd/api_metadata.py
2
1804
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
apache-2.0
-305,663,328,649,816,500
32.407407
77
0.743348
false
3.781971
false
false
false
kxxoling/Plim
plim/console.py
2
3105
""" This module contains entry points for command-line utilities provided by Plim package. """ import sys import os import argparse import codecs from pkg_resources import get_distribution from pkg_resources import EntryPoint from mako.template import Template from mako.lookup import TemplateLookup from .util import ...
mit
8,517,816,924,161,395,000
39.855263
116
0.612882
false
4.259259
false
false
false
nblock/ofxstatement-austrian
src/ofxstatement/plugins/livebank.py
1
2242
#!/usr/bin/env python3 # This file is part of ofxstatement-austrian. # See README.rst for more information. import csv from ofxstatement import statement from ofxstatement.parser import CsvStatementParser from ofxstatement.plugin import Plugin from ofxstatement.statement import generate_transaction_id from ofxstatemen...
gpl-3.0
-6,944,329,782,161,680,000
28.116883
76
0.627119
false
3.905923
false
false
false
tomvlk/maniaplanet-ws-python-sdk
maniaplanet_ws/mixins/maniaflash.py
1
1277
from . import WebserviceMixin, WebserviceMethods class Methods(WebserviceMethods): """ Maniaflash Methods. """ def channel(self, id): """ Get channel information based on the string identifier. :param id: String identifier of the channel. :type id: str :return: server response :rtype: requests.Respon...
lgpl-3.0
-8,437,025,694,462,736,000
25.604167
115
0.701644
false
3.274359
false
false
false
dmnfarrell/peat
pKaTool/pI.py
1
1524
#!/usr/bin/env python # # pKaTool - analysis of systems of titratable groups # Copyright (C) 2010 Jens Erik Nielsen # # 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 Lice...
mit
3,122,734,049,069,874,000
30.75
71
0.650262
false
3.463636
false
false
false
fredzannarbor/pagekicker-community
scripts_python_3/bitcoin/fileserver/server.py
1
1510
#!/usr/bin/env python3 import os import sys import json import random import os.path from flask import Flask from flask import request from flask import send_from_directory from two1.wallet import Wallet from two1.bitserv.flask import Payment app = Flask(__name__) wallet = Wallet() payment = Payment(app, wallet) # ...
apache-2.0
9,220,273,083,471,248,000
23.354839
71
0.693377
false
3.282609
false
false
false
lthurlow/Network-Grapher
proj/external/matplotlib-1.2.1/build/lib.linux-i686-2.7/matplotlib/lines.py
2
39103
""" This module contains all the 2D line class which can draw with a variety of line styles, markers and colors. """ # TODO: expose cap and join style attrs from __future__ import division, print_function import warnings import numpy as np from numpy import ma from matplotlib import verbose import artist from artist...
mit
9,024,864,752,938,221,000
31.183539
97
0.557604
false
3.879266
false
false
false
quantopian/zipline
zipline/utils/pandas_utils.py
1
9666
""" Utilities for working with pandas objects. """ from contextlib import contextmanager from copy import deepcopy from itertools import product import operator as op import warnings import numpy as np import pandas as pd from distutils.version import StrictVersion from trading_calendars.utils.pandas_utils import days...
apache-2.0
-8,811,193,459,821,820,000
25.409836
79
0.603248
false
3.8664
false
false
false
armgilles/Gender-Street-Plot
Plot_the_city.py
1
20183
# -*- coding: utf-8 -*- import pandas as pd import json import matplotlib.pyplot as plt import plotly.plotly as py from plotly.graph_objs import * import os import numpy as np from nltk.corpus import stopwords from math import radians, cos, sin, asin, sqrt from string import capwords """"""""""""""""""""" # Script ht...
mit
6,662,989,902,183,244,000
31.96732
132
0.557175
false
3.109587
false
false
false
trulia/legoo
legoo.py
2
84010
#!/usr/bin/python # Patrick Luo # innovation week of Mar 25, 2013 # objective: high performance, easy to use and maintain, flexibility to run anywhere on any DB (HIVE and MySQL), etc. import os, sys, subprocess, inspect import MySQLdb # MySQL DB module import ConfigParser # parse mysql ini file import csv ...
mit
-791,391,043,524,213,600
50.986386
237
0.569468
false
3.694371
true
false
false
ollitapa/VTT-Raytracer
python_source/plotAllDetector.py
1
1291
# # Copyright 2015 VTT Technical Research Center of Finland # # 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 applicabl...
apache-2.0
857,431,494,185,219,800
25.895833
74
0.70488
false
3.310256
false
false
false
mxOBS/deb-pkg_trusty_chromium-browser
native_client/tests/untrusted_crash_dump/untrusted_crash_dump_test.py
8
2530
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import linecache import os import re import sys # Import decode_dump for small testing. SCRIPT_DIR = os.path.dirname(os.path.abs...
bsd-3-clause
-414,876,577,398,869,400
31.857143
73
0.636759
false
3.174404
false
false
false
clayball/Dissembling-Ferret
lib/initialSeqFerret.py
1
5253
""" This is all the functionality we need to exfiltrate a message by smuggling it in TCP sequence numbers in SYN packets, much like a SYN stealth scan, execpt that we're sending SYN packets over and over to the same host. One advantage of this approach is that we can spoof the source address since we don't care what h...
gpl-3.0
6,391,828,812,780,308,000
31.425926
95
0.626499
false
3.673427
false
false
false
santiavenda2/griffith
lib/plugins/movie/PluginMovieWP.py
4
6114
# -*- coding: utf-8 -*- __revision__ = '$Id$' # Copyright (c) 2005-2010 Piotr Ożarowski # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option)...
gpl-2.0
7,746,506,842,029,545,000
37.15625
116
0.579197
false
3.111621
false
false
false
SurrealTiggi/mess
python/Work stuff/discover_syslog_functions.py
1
1168
''' Author: Tiago Baptista (F3902293) Purpose: To assist in Zabbix auto discovery for various BA functions ''' #/usr/bin/env python import json import os import functions # Variables logfile = '/var/log/' functionsList = [] class Functions: def __init__(self): Functions.mJsonDataList = [] print...
mit
-4,903,918,527,102,440,000
21.461538
68
0.559932
false
3.507508
false
false
false
NovaSyst/chocolate
chocolate/sample/grid.py
1
3397
import numpy from ..base import SearchAlgorithm from ..space import Distribution class ParameterGrid(object): def __init__(self, space): self.space = space assert self.space.isdiscrete(), "Cannot place a grid on continuous distributions, use random sampling instead" def __len__(self): ...
bsd-3-clause
-2,774,675,389,624,726,000
34.385417
118
0.575213
false
4.529333
false
false
false
stuckj/dupeguru
qt/base/result_window.py
1
14954
# Created By: Virgil Dupras # Created On: 2009-04-25 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-...
gpl-3.0
8,908,811,047,175,698,000
43.638806
119
0.671325
false
3.935263
false
false
false
xArm-Developer/xArm-Python-SDK
example/wrapper/common/3003-playback_trajectory.py
1
1148
#!/usr/bin/env python3 # Software License Agreement (BSD License) # # Copyright (c) 2019, UFACTORY, Inc. # All rights reserved. # # Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com> """ Description: playback trajectory 1. requires firmware 1.2.0 and above support 2. need to record the trajectory i...
bsd-3-clause
7,856,304,783,406,345,000
20.660377
68
0.58101
false
3.457831
false
false
false
GeoLabs/QgsWPSClient
apicompat/sipv1/compat.py
3
2383
# -*- coding: utf-8 -*- """ /*************************************************************************** ApiCompat A QGIS plugin API compatibility layer ------------------- begin : 2013-07-02 copyright : (C) 2013 ...
gpl-2.0
-6,493,134,217,714,992,000
38.065574
106
0.493496
false
4.462547
false
false
false
UXE/local-edx
lms/djangoapps/student_profile/test/test_views.py
10
7445
# -*- coding: utf-8 -*- """ Tests for student profile views. """ from urllib import urlencode import json from mock import patch import ddt from django.test import TestCase from django.conf import settings from django.core.urlresolvers import reverse from util.testing import UrlResetMixin from openedx.core.djangoapp...
agpl-3.0
-1,792,251,317,552,195,000
36.734694
104
0.655354
false
3.888538
true
false
false
alexfalcucc/anaconda
anaconda_lib/callback.py
5
7065
# -*- coding: utf8 -*- # Copyright (C) 2014 - Oscar Campos <oscar.campos@member.fsf.org> # This program is Free Software see LICENSE file for details """Minimalist Callbacks implementation based on @NorthIsUp pull request """ import sys import uuid import logging from threading import RLock from functools import par...
gpl-3.0
-7,476,825,227,892,414,000
31.260274
79
0.576787
false
4.53466
false
false
false
treycucco/pxp
pxp/parser.py
1
13861
"""This parser was generated by pyebnf on 2015-09-15T18:59:39.370833.""" from enum import Enum from pyebnf import parser_base as PB from pyebnf.primitive import alternation, concatenation, exclusion, one_or_more from pyebnf.primitive import option, repeated, repetition, terminal, zero_or_more class TokenType(Enum): ...
bsd-3-clause
-8,391,973,663,857,100,000
25.15283
95
0.538922
false
4.020012
false
false
false
jphalip/django-react-djangocon2015
photos/api.py
2
1793
from django.shortcuts import get_object_or_404 from rest_framework.response import Response from rest_framework import status from rest_framework import routers, serializers, viewsets from photos.models import Photo, Favorite class PhotoSerializer(serializers.ModelSerializer): class Meta: model = Photo ...
mit
6,943,426,689,703,378,000
29.931034
77
0.70106
false
4.093607
false
false
false
openilabs/falconlab
env/lib/python2.7/site-packages/falcon/http_error.py
1
4535
"""Defines the HTTPError class. Copyright 2013 by Rackspace Hosting, 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 applicab...
mit
3,542,584,754,328,776,700
34.429688
79
0.632856
false
4.788807
false
false
false
komakino/script.traktorbeam
resources/site-packages/traktorbeam/trakt.py
1
4069
from datetime import datetime, timedelta from traktorbeam import log, addon import urllib2, pytz from dateutil.parser import parse as parseDate USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36" class traktAPI(): token = None ...
gpl-3.0
5,873,873,014,539,877,000
32.089431
134
0.528385
false
3.89751
false
false
false
genialwang/lambda-image
lambdaimage/imgprocessing/transformation.py
1
2501
""" Transformations produced by registration methods """ from numpy import asarray from lambdaimage.utils.serializable import Serializable class Transformation(object): """ Base class for transformations """ def apply(self, im): raise NotImplementedError class Displacement(Transformation, Serializa...
bsd-3-clause
6,673,678,693,291,356,000
25.606383
99
0.588964
false
4.364747
false
false
false
ThreatConnect-Inc/tcex
app_init/playbook/run.py
2
2437
"""Playbook App""" # standard library import traceback # first-party from app_lib import AppLib # pylint: disable=no-member def run() -> None: """Update path and run the App.""" # update the path to ensure the App has access to required modules app_lib = AppLib() app_lib.update_path() # import ...
apache-2.0
-3,166,799,835,203,069,000
32.383562
99
0.599097
false
3.911717
false
false
false
rrader/django-ical
django_ical/tests.py
1
7242
#:coding=utf-8: import six import pytz import icalendar from datetime import datetime from django.test import TestCase from django.test.client import RequestFactory from django_ical.feedgenerator import ICal20Feed from django_ical.views import ICalFeed class TestICalFeed(ICalFeed): feed_type = ICal20Feed t...
mit
449,431,120,775,018,400
35.39196
99
0.593068
false
3.825674
true
false
false
lonvia/osgende
tools/osgende-mapserv-falcon.py
1
9619
# This file is part of Osgende # Copyright (C) 2020 Sarah Hoffmann # # This is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or any later version. # # This program is distribu...
gpl-3.0
-4,295,489,087,702,811,000
29.731629
99
0.556087
false
3.435357
true
false
false
LaurentClaessens/mazhe
src_yanntricks/yanntricksIOCTooePeHGCXH.py
1
1513
# -*- coding: utf8 -*- from yanntricks import * def IOCTooePeHGCXH(): pspict,fig = SinglePicture("IOCTooePeHGCXH") #pspict.dilatation_X(1) #pspict.dilatation_Y(1) pspict.dilatation(2) R1=1 R2=1.5 C1=Point(0,R1) C2=Point(R1+R2-0.5,R2) Cir1=Circle(C1,R1) Cir2=Circle(C2,R2) gt...
gpl-3.0
-988,535,751,671,338,500
28.096154
91
0.630535
false
2.155271
false
false
false
pikachuchu/id
cell.py
1
3522
import random import copy class Cell: # read only def __init__(self, team, strength, dna): self.team = team self.strength = strength self.dna = dna self.updatePheno() def updatePheno(self): self.pheno = [self.dna[0][i] + self.dna[1][i] + self.dna[2][i] for i in range...
gpl-3.0
6,081,038,890,430,684,000
32.542857
201
0.564168
false
3.19311
false
false
false
bitmazk/django-booking
booking/migrations/0001_initial.py
1
7978
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-18 15:40 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_countries.fields import django_libs.models_mixins class Migration(migrations.Migrati...
mit
4,593,984,948,790,277,000
56.395683
179
0.591627
false
4.161711
false
false
false
citrix-openstack-build/nova
nova/virt/libvirt/driver.py
2
203725
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2012 Univer...
apache-2.0
5,073,693,985,675,303,000
41.196562
79
0.536174
false
4.520993
true
false
false
vismartltd/edx-platform
common/djangoapps/course_about/data.py
12
2143
"""Data Aggregation Layer for the Course About API. This is responsible for combining data from the following resources: * CourseDescriptor * CourseAboutDescriptor """ import logging from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from course_about.serializers import serialize_content...
agpl-3.0
6,910,722,121,036,751,000
27.197368
108
0.695754
false
4.286
false
false
false
OpenTwinCities/mnpay
server/wages/management/commands/extractors/__init__.py
1
1307
import os from . import minneapolis_park_board from . import migrated from . import mn_state def _load_minneapolis_park_board(resource_path): results = [] path = os.path.join(resource_path, 'minneapolis_park_board') for year in range(2007, 2018): filename = '{0}.csv'.format(year) full_pat...
mit
-6,142,614,542,526,231,000
29.395349
67
0.661056
false
3.243176
false
false
false
b-jesch/service.fritzbox.callmonitor
resources/lib/PhoneBooks/pyicloud/vendorlibs/requests/packages/urllib3/util/ssl_.py
152
11624
from __future__ import absolute_import import errno import warnings import hmac from binascii import hexlify, unhexlify from hashlib import md5, sha1, sha256 from ..exceptions import SSLError, InsecurePlatformWarning, SNIMissingWarning SSLContext = None HAS_SNI = False create_default_context = None IS_PYOPENSSL = F...
gpl-2.0
-8,028,164,455,658,428,000
35.325
93
0.639023
false
4.047354
false
false
false
MirichST/patchcap
src/migration/versions/032801b9c4e5_event_comments_not_required.py
1
1500
"""event comments not required Revision ID: 032801b9c4e5 Revises: f4889cdd3b93 Create Date: 2016-04-26 09:52:22.863215 """ # revision identifiers, used by Alembic. revision = '032801b9c4e5' down_revision = 'f4889cdd3b93' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgra...
gpl-2.0
-6,935,908,685,002,155,000
31.608696
63
0.609333
false
3.826531
false
false
false
openstack/monasca-api
monasca_api/conf/dispatcher.py
2
3553
# Copyright 2014 IBM Corp # (C) Copyright 2015,2016 Hewlett Packard Enterprise Development LP # Copyright 2017 Fujitsu 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://...
apache-2.0
-1,185,648,965,430,486,300
42.864198
78
0.653532
false
4.322384
false
false
false
SeleniumHQ/selenium
py/test/selenium/webdriver/common/implicit_waits_tests.py
8
2592
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
9,026,409,434,488,198,000
34.027027
93
0.75
false
3.630252
true
false
false
SpamScope/spamscope
src/modules/redis_client.py
1
5240
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright 2016 Fedele Mantuano (https://www.linkedin.com/in/fmantuano/) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/...
apache-2.0
4,007,741,343,053,280,000
25.734694
78
0.597901
false
4.229217
false
false
false
ddbourgin/bookworm_db
bookworm/variableSet.py
1
33184
#!/usr/bin/python # -*- coding: utf-8 -*- import warnings import json import os import decimal import re from MySQLdb import escape_string def to_unicode(obj, encoding='utf-8'): if isinstance(obj, basestring): if not isinstance(obj, unicode): obj = unicode(obj, encoding) if isinstance(obj,...
mit
1,380,784,033,192,822,500
43.12766
427
0.572927
false
4.331549
false
false
false
apple/llvm-project
lldb/examples/python/crashlog.py
3
49951
#!/usr/bin/env python3 #---------------------------------------------------------------------- # Be sure to add the python path that points to the LLDB shared library. # # To use this in the embedded python interpreter using "lldb": # # cd /path/containing/crashlog.py # lldb # (lldb) script import crashlog # "...
apache-2.0
5,083,743,668,601,571,000
40.591174
185
0.531941
false
4.277359
false
false
false
cclauss/stash
bin/gh.py
1
6947
# coding: utf-8 ''' Usage: gh <command> [<args>...] gh <command> (-h|--help) supported commands are: gh fork <repo> forks user/repo gh create <repo> creates a new repo gh pull <repo> <base> <head> create a pull request gh list_keys list user keys gh create_key <title> [<public_key_path>] add a key to gi...
mit
378,736,039,787,514,200
25.116541
134
0.637397
false
2.952401
false
false
false
lu18887/perhapsgeekblog
perhapsgeek/zinnia/settings.py
3
5072
"""Settings of Zinnia""" from django.conf import settings PING_DIRECTORIES = getattr(settings, 'ZINNIA_PING_DIRECTORIES', ('http://django-blog-zinnia.com/xmlrpc/',)) SAVE_PING_DIRECTORIES = getattr(settings, 'ZINNIA_SAVE_PING_DIRECTORIES', bool(PING_DIRECTORIE...
mit
-1,336,642,802,956,586,000
43.104348
79
0.615339
false
3.038945
false
false
false
StuntsPT/Structure_threader
tests/structure_function_tests.py
1
2902
#!/usr/bin/python3 # Copyright 2017-2018 Francisco Pina Martins <f.pinamartins@gmail.com> # This file is part of structure_threader. # structure_threader 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...
gpl-3.0
-6,192,314,837,027,068,000
31.606742
78
0.643349
false
3.351039
true
false
false
prasanna08/oppia
scripts/start.py
1
8569
# Copyright 2019 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
7,092,035,335,530,440,000
37.773756
92
0.6478
false
3.87037
false
false
false
cesc-park/attend2u
scripts/cnn_feature_extractor.py
1
4927
import os import tensorflow as tf from tensorflow.python.framework import ops from tensorflow.python.ops import math_ops from tensorflow.python.ops import control_flow_ops from tensorflow.python.ops import gen_image_ops from tensorflow.python.ops import string_ops from tensorflow.contrib.slim.python.slim.nets import r...
mit
3,905,631,663,684,149,000
32.517007
82
0.635681
false
3.414414
false
false
false
Roasbeef/seneca
python-bitcoinlib/bitcoin/core/key.py
3
5113
# # key.py - OpenSSL wrapper # Source: git://github.com/joric/brutus.git # which was forked from git://github.com/samrushing/caesure.git # """ECC secp256k1 crypto routines WARNING: This module does not mlock() secrets; your private keys may end up on disk in swap! Use with caution! """ import ctypes import ctypes.u...
unlicense
3,420,010,850,721,341,000
31.987097
106
0.611187
false
3.132966
false
false
false
apache/tashi
src/tashi/clustermanager/data/getentoverride.py
1
3107
# 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 u...
apache-2.0
-398,506,263,050,929,600
30.07
99
0.746379
false
3.538724
false
false
false
schriftgestalt/Mekka-Scripts
Anchors/Reposition top and bottom Anchors in Combining Accents.py
1
3095
#MenuTitle: Reposition top & bottom Anchors in Combining Accents # -*- coding: utf-8 -*- __doc__=""" On all layers in selected glyphs, repositions top/bottom anchors for stacking in all top/bottom combining marks in line with the italic angle of the respective master. Keeps the anchor's y height, only moves horizontall...
apache-2.0
-2,998,987,349,499,186,700
40.266667
221
0.746365
false
3.569781
false
false
false
gisce/primestg
spec/Report_S21_spec.py
1
3307
from expects import expect, equal from primestg.report import Report from ast import literal_eval with description('Report S21 example'): with before.all: self.data_filenames = [ 'spec/data/S21.xml', 'spec/data/S21_with_error.xml', 'spec/data/S21_empty.xml', ] ...
agpl-3.0
4,530,626,670,975,302,000
33.821053
75
0.485032
false
4.032927
false
false
false
maas/maas
src/provisioningserver/rackdservices/lease_socket_service.py
1
4295
# Copyright 2014-2016 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Twisted service recieves lease information from the MAAS dhcpd.sock.""" from collections import deque import json import os from twisted.application.service import Servi...
agpl-3.0
-8,100,528,211,433,442,000
35.092437
79
0.669616
false
4.678649
false
false
false
teozkr/Flask-Pushrod
flask_pushrod/resolver.py
1
9877
from flask import current_app, request as current_request from werkzeug.wrappers import BaseResponse from . import renderers as _renderers, normalizers from .renderers import RendererNotFound, UnrenderedResponse from functools import wraps from collections import defaultdict import logging import datetime from typ...
mit
-847,982,744,566,310,400
39.150407
255
0.640478
false
4.570569
false
false
false
candlepin/subscription-manager
src/subscription_manager/cli_command/facts.py
1
2720
# # Subscription manager command line utility. # # Copyright (c) 2021 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICU...
gpl-2.0
3,333,423,898,493,870,600
35.756757
74
0.636765
false
4.25
false
false
false
mikemcfarlane/TickleMeNAO
Idea_Development/tickle_eyes.py
1
1225
""" Explore LED colour changes in a list. """ import sys from naoqi import ALProxy IP = "mistcalf.local" PORT = 9559 try: proxy = ALProxy("ALLeds", IP, PORT) except Exception,e: print "Could not create proxy to ALLeds" print "Error was: ",e sys.exit(1) def convertRGBToHex(list): if len(list) =...
gpl-2.0
-5,311,701,780,821,955,000
24.020408
62
0.553469
false
3.198433
false
false
false
bicv/SLIP
SLIP/__init__.py
1
2414
#! /usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import __author__ = "(c) Laurent Perrinet INT - CNRS" __version__ = '20191113' __licence__ = 'GPLv2' from .SLIP import Image, imread ############################ FIGURES ######################################## ...
gpl-2.0
8,809,102,216,611,853,000
37.935484
110
0.537697
false
3.777778
false
false
false
recalbox/recalbox-configgen
configgen/tests/settings/emulationstationSettings_test.py
2
1776
#!/usr/bin/env python import sys import os.path import unittest import shutil sys.path.append( os.path.abspath(os.path.join(os.path.dirname(__file__), "../../"))) import configgen.settings.emulationstationSettings as esSettings shutil.copyfile(os.path.abspath(os.path.join(os.path.dirname(__file__), "../resources...
mit
8,996,649,093,088,549,000
30.714286
114
0.644144
false
3.580645
true
false
false
mokaspar/edx-presenter
edx-presenter.py
1
26474
#!/usr/bin/env python # -*- coding: utf-8 -*- # To see the full help, type: ./edx-presenter.py --help """ README This comman line tool requires the PyYAML library. This library can be installed by the following two commands in your shell: $ easy_install pip $ pip install pyyaml """ usage = """usage: %prog [optio...
agpl-3.0
2,870,450,299,419,578,400
31.285366
243
0.662839
false
3.23643
false
false
false
shrinidhi666/rbhus
etc/blend_lin/default.py
1
5828
#!/usr/bin/env python2 #-*- coding: utf-8 -*- __author__ = "Shrinidhi Rao" __license__ = "GPL" __email__ = "shrinidhi666@gmail.com" import os import sys import pwd import time import socket import subprocess import simplejson rbhus_main_path = os.sep.join(os.path.abspath(__file__).split(os.sep)[0:-3]) sys.path.appen...
gpl-3.0
-2,364,216,174,216,356,400
31.926554
343
0.663349
false
2.686953
false
false
false
danalexandru/Algo
FII-year3sem1-SI/hw1/exe3/nodeA.py
2
3021
#!/usr/bin/python2.7 from Crypto.Cipher import AES from Crypto import Random k3 = "*known key this-" def utils_encrypt(k, mode): global k3 key = k3 plain_text = k #if ECB, use PCKS#7 # append bytes to reach mod 16 boundary. # All padding bytes have the same value: the number of bytes that you are adding: l...
gpl-2.0
-4,643,357,777,015,173,000
24.175
97
0.665012
false
2.882634
false
false
false
darknightghost/AntiPkgLoss
cfg/cfg.py
1
10696
#! /usr/bin/env python2 # -*- coding: utf-8 -*- ''' Copyright 2016,暗夜幽灵 <darknightghost.cn@gmail.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 3 of the License, or (at ...
gpl-3.0
6,192,078,218,133,633,000
28.362637
93
0.650356
false
2.942731
false
false
false
rcbops/opencenter
tools/ast-env.py
1
3338
#!/usr/bin/env python # OpenCenter(TM) is Copyright 2013 by Rackspace US, Inc. ############################################################################## # # OpenCenter is licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
apache-2.0
-503,187,335,170,293,800
34.136842
79
0.624026
false
4.20403
false
false
false
feinheit/django-cleverreach
cleverreach/utils.py
1
2677
# coding: utf-8 """ Helper functions for Django. """ __all__ = ['insert_new_user',] import datetime, time from api.v5_1 import Client class User(object): """ Bunch class for converting a dict into an object. """ def __init__(self, **kwargs): for k, v in kwargs.items(): if k not in self._...
bsd-2-clause
1,238,691,099,757,634,000
34.223684
95
0.61412
false
4.001495
false
false
false
eironman/reservarpista
authentication/views.py
1
1229
from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import AuthenticationForm from django.shortcuts import render, HttpResponseRedirect from django.urls import reverse # Login user def login_action(request): if 'usern...
gpl-2.0
-8,883,785,781,134,234,000
34.114286
83
0.661513
false
4.763566
false
false
false
uclouvain/OSIS-Louvain
webservices/api/serializers/general_information.py
1
6499
############################################################################## # # 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
3,907,763,354,236,152,000
44.440559
117
0.668359
false
4.066333
false
false
false
w7cook/batch-javac
test/tools/javac/batch/sql/dagstuhl/data/buildworks.py
1
6466
#!/usr/bin/env python DATA_DIR = 'oss-textdb' import csv, os, re, sys DATA_RE = re.compile(r'(~[\w\s]+~|\d+),') def extractColumns(data, columnCount): valueStart = valueEnd = 0 currentValue = None results = [] size = len(data) while valueEnd < size: if data[valueEnd] == '~': ...
gpl-2.0
-42,044,642,015,082,590
38.193939
164
0.587844
false
3.779077
false
false
false
bookbrainz/bookbrainz-schema
utils/v1_migration.py
1
32081
#!/usr/bin/env python # -*- coding: utf8 -*- # Copyright (C) 2015 Ben Ockmore # 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-2.0
2,325,289,391,266,262,000
35.832377
96
0.509616
false
4.47871
false
false
false
hsuchie4/TACTIC
src/tactic/ui/panel/sql_panel_wdg.py
6
5123
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
-2,162,987,317,276,088,300
25.005076
113
0.616045
false
3.454484
false
false
false
apruden/opal
opal-python-client/src/main/python/opal/import_spss.py
1
2617
""" Opal SPSS data import. """ import sys import re import opal.core import opal.io def add_arguments(parser): """ Add data command specific options """ parser.add_argument('--path', '-pa', required=True, help='SPSS file to import on the Opal filesystem ' ...
gpl-3.0
-626,265,647,135,164,800
32.139241
123
0.605655
false
4.248377
false
false
false
SchrodingersGat/kicad-footprint-generator
KicadModTree/nodes/base/Model.py
2
2263
# KicadModTree 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. # # KicadModTree is distributed in the hope that it will be useful, # bu...
gpl-3.0
-8,326,156,246,843,749,000
36.716667
99
0.601856
false
3.465544
false
false
false
nbari/zunzuncito
app.py
1
1993
""" To clean: find . -iname "*.pyc" -exec rm -f {} \; To run: uwsgi --http :8080 --wsgi-file app.py --callable app --master uwsgi --http :8080 --wsgi-file app.py --callable app --master --processes 2 --threads 2 --stats 127.0.0.1:8181 --harakiri 30 gunicorn -b :8080 -w4 app:app """ import zunzuncito """Root Name o...
bsd-3-clause
-6,924,212,454,471,312,000
23.9125
124
0.582037
false
2.956973
false
false
false
thecodershub/algorithms
python/binary_tree.py
1
5827
""" Binary Tree and basic properties 1. In-Order Traversal 2. Pre-Order Traversal 3. Post-Order Traversal 4. Level-Order Traversal """ from collections import deque class BinaryTree(object): """ Representation of a general binary tree data: value of element left: Left subtree right: Right subtree ...
gpl-3.0
8,013,791,562,730,245,000
32.682081
120
0.565471
false
4.351755
false
false
false
ScienceStacks/JViz
mysite/heatmap/helpers/helpers_views.py
2
2918
'''The file handles the logic of the views''' from django import forms from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.template.loader import get_template from django.template import Context from mysite import settings from mysite.helpers import file_access as...
apache-2.0
-6,099,211,998,833,019,000
29.395833
72
0.64976
false
3.593596
false
false
false
tksn/phoneauto
phoneauto/scriptgenerator/screenrecord.py
1
4021
# -*- coding: utf-8 -*- """screenrecord thread :copyright: (c) 2016 by tksn :license: MIT """ from distutils.spawn import find_executable import io import logging from queue import Queue import subprocess from subprocess import Popen, PIPE from threading import Thread import time from PIL import Image def check_pre...
mit
6,485,692,464,405,174,000
25.986577
74
0.526237
false
3.919103
false
false
false
timabbott/zulip
zerver/migrations/0211_add_users_field_to_scheduled_email.py
7
1127
# Generated by Django 1.11.20 on 2019-03-14 01:11 from django.conf import settings from django.db import migrations, models from django.db.backends.postgresql.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps def set_users_for_existing_scheduledemails( apps: StateApps, schem...
apache-2.0
6,752,215,458,130,309,000
31.2
124
0.669033
false
3.940559
false
false
false
lavizhao/keyword
preprocess/counting.py
1
2097
#coding: utf-8 import sys import csv def count(kf,vf,tc,tf): """ Arguments: - `kf`: - `vf`: - `tc`: """ kf = open(kf) vf = open(vf) kw = kf.readlines() print "关键词索引大小:",len(kw) vb = vf.readlines() print "词表索引大小:",len(vb) keyword,vocab = {},{} for line i...
apache-2.0
5,336,906,555,984,872,000
19.193878
119
0.447196
false
2.8557
false
false
false
kidmaple/CoolWall
user/python/Lib/encodings/cp869.py
4
6618
""" Python Character Mapping Codec generated from 'CP869.TXT'. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(in...
gpl-2.0
-586,084,611,143,608,600
37.034483
70
0.745694
false
2.458395
false
false
false
Hernanarce/pelisalacarta
python/main-classic/servers/zippyshare.py
2
2529
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para zippyshare # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re from core import httptools from core import lo...
gpl-3.0
7,737,169,893,881,477,000
31
97
0.579905
false
3.425474
false
false
false
aaronchall/HTML5.py
setup.py
1
2578
from setuptools import setup, find_packages import os.path as _op NAME = 'html5.py' # can be rst: maybe should use same text as README.rst? with open(_op.join(_op.abspath(_op.dirname(__file__)), 'README.rst')) as f: LONGDESCRIPTION = f.read() # below gleaned from https://pypi.python.org/pypi?%3Aaction=list_clas...
mit
-4,250,361,075,144,110,600
32.480519
87
0.722653
false
3.990712
false
true
false
laffra/pava
pava/implementation/natives/sun/security/x509/X509CertImpl.py
1
1233
def add_native_methods(clazz): def getIssuerAlternativeNameExtension____(a0): raise NotImplementedError() def getSubjectAlternativeNameExtension____(a0): raise NotImplementedError() def getSubjectAlternativeNames____(a0): raise NotImplementedError() def getSubjectAlternativeNa...
mit
6,554,962,908,571,664,000
46.423077
155
0.766423
false
4.179661
false
false
false
NumCosmo/NumCosmo
examples/py_hiprim_example.py
1
2356
#!/usr/bin/env python try: import gi gi.require_version('NumCosmo', '1.0') gi.require_version('NumCosmoMath', '1.0') except: pass import math from gi.repository import GObject from gi.repository import NumCosmo as Nc from gi.repository import NumCosmoMath as Ncm # # Initializing the library objects, this mu...
gpl-3.0
-2,236,430,931,608,258,800
24.89011
90
0.682937
false
2.653153
false
false
false
seryl/Nodetraq
nodetraq/controllers/menus.py
1
1526
import logging from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from pylons.decorators import rest from nodetraq.lib.base import BaseController, render from nodetraq.lib.F5 import LoadBalancer from nodetraq.model.meta import Session, now from no...
mit
-6,268,026,373,779,305,000
28.921569
69
0.652687
false
3.548837
false
false
false
azatoth/scons
test/Repository/Program.py
5
7413
#!/usr/bin/env python # # __COPYRIGHT__ # # 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
-5,902,302,225,335,988,000
19.144022
73
0.635505
false
2.851154
true
false
false
chdecultot/erpnext
erpnext/hr/doctype/staffing_plan/test_staffing_plan.py
5
3247
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest from erpnext.hr.doctype.staffing_plan.staffing_plan import SubsidiaryCompanyError from erpnext.hr.doctype.staffing_plan.staffing_plan impo...
gpl-3.0
-1,871,302,296,903,613,400
32.822917
81
0.71389
false
2.949137
true
false
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.1/Lib/distutils/command/install_data.py
1
2552
"""distutils.command.install_data Implements the Distutils 'install_data' command, for installing platform-independent data files.""" # contributed by Bastian Kleineidam __revision__ = "$Id: install_data.py,v 1.18 2001/02/05 17:43:11 akuchling Exp $" import os from types import StringType from distutils.core import...
mit
-5,664,078,461,352,989,000
33.026667
80
0.519984
false
4.303541
false
false
false
worldbank-climate-group/resilience-indicator-tool
preprocess/world/res_ind_lib.py
3
14905
import numpy as np import pandas as pd from scipy.special import erf from scipy.interpolate import interp1d def compute_resiliences(df_in,kind="exante",fa_ratios=None, is_relative_to_local=True,verbose_output=True): """Main function. Computes all outputs (dK, resilience, dC, etc,.) from inputs""" #keeps trac...
gpl-3.0
-5,876,326,902,311,837,000
30.848291
166
0.598524
false
2.865244
false
false
false
andysan/gem5utils
query.py
1
3380
#!/usr/bin/env python # # Copyright (c) 2013 Andreas Sandberg # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list o...
bsd-3-clause
6,166,375,114,101,177,000
38.764706
87
0.662722
false
4.240903
false
false
false
boto/botoflow
botoflow/decisions/decisions.py
1
12948
# Copyright 2013 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://aws.amazon.com/apache2.0 # # or in the "license" file accompa...
apache-2.0
-5,759,484,112,833,232,000
42.891525
94
0.644038
false
4.620985
false
false
false
sanguinariojoe/FreeCAD
src/Tools/embedded/PySide/ui_mainwindow.py
38
2378
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created: Fri Nov 20 18:03:04 2015 # by: pyside-uic 0.2.13 running on PySide 1.1.0 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_MainWindow(object): def setupU...
lgpl-2.1
3,265,207,217,872,403,000
48.541667
129
0.726241
false
4.05802
false
false
false
garibaldu/multicauseRBM
Max/rbmpy/trainer.py
1
7970
import numpy as np import rbmpy.rbm as rbm import logging, math from rbmpy.sampler import VanillaSampler from rbmpy.progress import Progress from scipy.special import expit class VanillaTrainier(object): """Trainer that can knows how to update an RBM weights and hidden/visible states, requires a `Sampler`. ...
mit
29,646,066,308,941,908
39.456853
153
0.603011
false
3.242474
false
false
false
ACLARKNET/aclarknet-database
aclarknet/database/admin.py
1
10275
from adminsortable2.admin import SortableAdminMixin from decimal import Decimal from django.contrib import admin from django.contrib.gis import admin as geo_admin from import_export import fields from import_export import widgets from import_export.admin import ImportExportModelAdmin from import_export.resources import...
mit
-3,694,583,282,974,806,500
23.007009
78
0.640389
false
4.219713
false
false
false
danionescu0/robot-camera-platform
navigation/FaceRecognition.py
1
1198
class FaceRecognition: def __init__(self, file_path): self.__file_path = file_path self.__known_face_encodings = None def configure(self): import face_recognition image = face_recognition.load_image_file(self.__file_path) self.__known_face_encodings = [face_recognition.f...
gpl-3.0
2,697,523,508,126,238,700
46.96
96
0.63606
false
4.061017
false
false
false
pyq881120/amoco
amoco/system/elf.py
6
43062
# -*- coding: utf-8 -*- # This code is part of Amoco # Copyright (C) 2006 Axel Tillequin (bdcht3@gmail.com) # published under GPLv2 license import struct from amoco.logger import * logger = Log(__name__) def Elf(filename): try: return Elf32(filename) except ElfError: return Elf64(filename) ...
gpl-2.0
2,210,762,493,043,987,500
27.881288
92
0.52782
false
3.097763
false
false
false
fyabc/MiniGames
HearthStone2/MyHearthStone/ui/ui_cocos/collection_scene.py
1
26570
#! /usr/bin/python # -*- coding: utf-8 -*- import bisect from collections import Counter from cocos import scene, layer, draw, rect from pyglet.window import mouse from .card_sprite import HandSprite from .collection_sprites import StaticCardSprite, CardItem, CostFilterSprite from .utils.active import ActiveLayer, A...
mit
-8,227,449,244,546,500,000
36.180926
117
0.558808
false
3.50337
false
false
false
classroomtechtools/moodle_daily_notices
sql/MoodleReadIn.py
1
8832
from sql import MoodleDBSession from collections import defaultdict import re import time class MoodleImport(MoodleDBSession): """ Class used to import information about students """ def __init__(self, school, unique): self.school = school self.unique = unique super().__ini...
mit
-2,270,629,224,959,484,400
38.963801
169
0.540082
false
4.533881
false
false
false
pytorch/fairseq
fairseq/data/data_utils.py
1
21298
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. try: from collections.abc import Iterable except ImportError: from collections import Iterable import contextlib import itertools impo...
mit
-8,030,325,190,731,118,000
34.794958
120
0.584703
false
3.851356
false
false
false
frappe/frappe
frappe/social/doctype/energy_point_log/energy_point_log.py
1
10707
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt import frappe from frappe import _ import json from frappe.model.document import Document from frappe.desk.doctype.notification_log.notification_log import enqueue_create_notification,\ ...
mit
-694,706,051,408,184,300
30.125
102
0.690016
false
3.017756
false
false
false
mnorbury/pyblink
test/test_datasource.py
1
4270
""" Test cases for the datasource classes. :author: Martin Norbury (mnorbury@lcogt.net) """ import json import itertools import mock from nose.tools import eq_ from mock import patch import datasource @patch('datasource.urlopen') class TestDataSource(object): def __init__(self): self._mock_pattern_fac...
mit
-337,020,533,868,662,300
31.853846
94
0.586183
false
3.555371
true
false
false