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
briney/abtools
abtools/sequence.py
1
10799
#!/usr/bin/env python # filename: sequence.py # # Copyright (c) 2015 Bryan Briney # License: The MIT license (http://opensource.org/licenses/MIT) # # 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 Soft...
mit
-7,339,099,464,822,980,000
33.501597
99
0.582276
false
4.046085
false
false
false
peer23peer/pymech
pymech/fmt/Solver.py
1
1099
import numpy as np from .Geometry import Geometry class Solver: geometry: Geometry V = np.zeros((1,)) M = np.zeros((1,)) T = np.zeros((1,)) def __init__(self, geometry: Geometry): self.geometry = geometry self.V = np.zeros((geometry.axle.size,)) self.M = np.zeros((geometr...
mit
5,400,078,839,795,577,000
23.977273
61
0.487716
false
2.99455
false
false
false
RJT1990/pyflux
pyflux/families/normal.py
1
15629
import numpy as np import scipy.stats as ss import scipy.special as sp from .family import Family from .flat import Flat from .gas_recursions import gas_recursion_normal_orderone, gas_recursion_normal_ordertwo from .gas_recursions import gasx_recursion_normal_orderone, gasx_recursion_normal_ordertwo from .gas_recursi...
bsd-3-clause
8,272,593,312,094,646,000
27.57404
102
0.575469
false
4.907064
false
false
false
N0stack/mike
src/mike/services/hub.py
1
16847
from ryu.lib.packet import packet from ryu.lib.packet import ethernet from ryu.lib.packet import ether_types from django.db import models from mike.controller.openflow import MikeOpenflowController from mike.lib.mike_object import UUIDObject from mike.services.service import Service from mike.lib.objects.port import P...
mit
1,937,368,555,958,668,800
43.265789
110
0.478152
false
4.830844
false
false
false
oczkers/gdown
gdown/modules/rapidgator.py
1
6479
# -*- coding: utf-8 -*- """ gdown.modules.rapidgator ~~~~~~~~~~~~~~~~~~~ This module contains handlers for rapidgator. """ import re import json from time import sleep from datetime import datetime from dateutil import parser from ..module import browser, acc_info_template from ..exceptions import ModuleError de...
gpl-3.0
-6,476,694,716,724,919,000
49.617188
350
0.594845
false
3.199506
false
false
false
martinez-zea/tts
tlslite/integration/pop3_tls.py
1
3417
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. """TLS Lite + poplib.""" import socket from poplib import POP3, POP3_SSL_PORT from tlslite.tlsconnection import TLSConnection from tlslite.integration.clienthelper import ClientHelper class POP3_TLS(POP3, ClientHelper): ...
gpl-3.0
-2,307,561,431,294,044,700
35.752688
82
0.641206
false
4.605121
false
false
false
onitu/onitu
onitu/api/__main__.py
1
10713
import sys import zmq import json import pkg_resources from logbook import Logger from logbook.queues import ZeroMQHandler from bottle import Bottle, run, response, redirect, static_file from circus.client import CircusClient from onitu.escalator.client import Escalator from onitu.utils import get_fid, u, b, PY2, ge...
mit
-4,316,781,601,024,659,500
26.329082
79
0.576496
false
3.625381
false
false
false
papedaniel/oioioi
oioioi/prizes/views.py
1
2389
from collections import namedtuple, OrderedDict from django.conf import settings from django.http import Http404 from django.template.response import TemplateResponse from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from django.shortcuts import get_object_or_404 from ...
gpl-3.0
-4,236,916,074,350,829,000
35.753846
77
0.710758
false
3.355337
true
false
false
Bobstin/AutomatedBrewery
calibrations/FlowCalibration.py
1
4847
import time import RPi.GPIO as GPIO import pickle from PyQt5 import QtCore, QtGui, QtWidgets, uic import sys #loads the UI qtCreatorFile = "../UI/AutomatedBreweryUI/FlowCalibrationDialog.ui" Ui_MainWindow, QtBaseClass = uic.loadUiType(qtCreatorFile) class flowCalibration(QtWidgets.QMainWindow, Ui_MainWindow): def...
mit
2,849,930,769,474,116,600
40.42735
123
0.665979
false
3.751548
false
false
false
VFoteinos/e-science
webapp/backend/models.py
1
24566
#!/usr/bin/env python # -*- coding: utf-8 -*- """ e-Science database model @author: e-science Dev-team """ import logging import datetime import binascii import os from django.db import models from djorm_pgarray.fields import IntegerArrayField, TextArrayField from django.utils import timezone from dj...
agpl-3.0
-137,053,804,024,752,480
49.179167
150
0.553651
false
4.374288
false
false
false
zambonin/UFSC-INE5430
fuzzy/truck_driver.py
1
7083
#!/usr/bin/python3 # -*- coding: utf-8 -*- """truck_driver.py A fuzzy driver for a virtual truck. Run `java -jar fuzzy_truck_contest.jar` and click "Iniciar/Reiniciar" to start the socket. Then, run this program and it will try its best to park the truck. * `skfuzzy.defuzz` is the defuzzification function, ...
gpl-3.0
-7,025,142,380,383,997,000
34.592965
79
0.586192
false
2.924443
false
false
false
nricklin/leafpy
tests/unit/test_api_calls.py
1
1394
import unittest from leafpy import Leaf import vcr, time VIN = 'dummyvin' custom_sessionid = 'dummy_csid' class APICallTests(unittest.TestCase): @vcr.use_cassette('tests/unit/cassettes/test_call_with_no_params.yaml', filter_post_data_parameters=['VIN','custom_sessionid']) def test_call_with_no_param...
mit
-4,142,808,302,611,703,000
37.75
89
0.691535
false
3.502513
true
false
false
ourbest/sns_app
backend/charts.py
1
2159
from datetime import timedelta from dj.utils import api_func_anonymous from django.db import connection from backend import dates, model_manager from backend.api_helper import get_session_app from backend.models import AppDailyStat @api_func_anonymous def api_get_app_month_data(request): app = get_session_app(r...
lgpl-3.0
3,013,832,656,408,738,000
29.842857
115
0.557202
false
3.556837
false
false
false
datawire/ambassador
python/ambassador/config/acpragma.py
1
1640
# Copyright 2018 Datawire. 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 agr...
apache-2.0
7,533,616,267,851,606,000
32.469388
77
0.585976
false
4.593838
false
false
false
netheosgithub/pcs_api
python/pcs_api/oauth/oauth2_params.py
1
2317
# -*- coding: utf-8 -*- # # Copyright (c) 2014 Netheos (http://www.netheos.net) # # 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,741,616,575,432,301,000
38.271186
111
0.6776
false
4.379962
false
false
false
joelfrederico/SciSalt
scisalt/matplotlib/setup_figure.py
1
1040
import os as _os on_rtd = _os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: import matplotlib.pyplot as _plt from matplotlib import gridspec as _gridspec def setup_figure(rows=1, cols=1, **kwargs): """ Sets up a figure with a number of rows (*rows*) and columns (*cols*), *\*\*kwargs* passe...
mit
2,269,133,462,533,259,500
27.108108
139
0.611538
false
3.598616
false
false
false
GoogleCloudPlatform/devrel-services
magic-github-proxy/main.py
1
5818
#!/usr/bin/python # # Copyright 2019 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
-5,398,384,594,176,472,000
38.04698
111
0.699209
false
3.649937
false
false
false
googleinterns/out-of-distribution
src/experiments/resnet_trainer.py
1
9736
import json import os import shutil from typing import Tuple, List, Callable import torch import torchvision from torch import nn, optim from torch.nn import functional as F from torch.utils.data import DataLoader from torch.utils.tensorboard import SummaryWriter from root import from_root from src.experiments.config...
apache-2.0
-5,536,669,571,207,747,000
40.080169
113
0.652629
false
3.773643
false
false
false
juhanikataja/yml2sif
yml2sif/__init__.py
1
5849
#!/usr/bin/python3 import yaml, argparse, sys, os, textwrap, collections __dict_type__=collections.OrderedDict __default_sw__=2 def yml2sif_version(): return '0.2.4b1' class Integer(yaml.YAMLObject): yaml_tag =u'!Integer' def __init__(self, data): if type(data) is list: self.data = [...
mit
-7,132,393,435,677,775,000
28.690355
119
0.549496
false
3.517138
false
false
false
slundberg/shap
shap/utils/_keras.py
1
2576
""" This file contains various utility functions that are useful but not core to SHAP. """ def clone_keras_layers(model, start_layer, stop_layer): """ Clones the keras layers between the start and stop layer as a new model. """ import tensorflow as tf if type(start_layer) is int: ...
mit
1,086,523,239,589,270,500
38.646154
117
0.578028
false
3.90303
false
false
false
bogobog/hierarchy_config_parser
bin/get_setting.py
1
7545
#!/usr/bin/env python import os, sys, config_variable_processor class GetSettingsInvalidTierOption( Exception ): pass DEFAULT_CONFIG_DIR = "%s/.." % os.path.dirname( os.path.abspath( __file__ ) ) def list_tier( tier, config_dir = DEFAULT_CONFIG_DIR ): tier_dir = '%s/variables/%s' % ( config_dir, tier ) ret...
gpl-2.0
1,851,171,637,224,124,200
34.422535
141
0.616037
false
3.632643
true
false
false
pronexo-odoo/odoo-argentina
l10n_ar_wsafip_fex/product_uom.py
1
1325
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Elepe Servicios (http://www.elepeservicios.com.ar) # All Rights Reserved # # Author : Dario Kevin De Giacomo (Elepe Servicios) # # This program is free software: you can redistribute it ...
agpl-3.0
4,638,247,249,567,238,000
35.857143
78
0.611321
false
3.774929
false
false
false
Tempel/bcam
bcam/project.py
1
3224
from __future__ import absolute_import, division, print_function from bcam.path import Path from bcam.state import State from bcam import state from bcam.singleton import Singleton from logging import debug, info, warning, error, critical from bcam.util import dbgfname import os import json from copy import deepcopy...
gpl-3.0
7,672,291,159,482,805,000
27.785714
86
0.57134
false
3.693013
false
false
false
googleapis/googleapis-gen
google/cloud/bigquery/reservation/v1beta1/bigquery-reservation-v1beta1-py/google/cloud/bigquery/reservation_v1beta1/services/reservation_service/transports/grpc.py
1
39966
# -*- 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
1,732,702,948,515,555,000
44.937931
105
0.638243
false
4.910431
false
false
false
cornell-cup/cs-minibot-platform
python-interface/src/MiniBotFramework/Controls/Xbox.py
1
1124
#Reads xbox inputs and returns desired l/r wheel powers from MiniBotFramework.Lib.legopi.lib import xbox_read from threading import Thread class Xbox(object): updated = False left = 0 right = 0 def __init__(self): self.thread_xbox = Thread(target = read_xbox) self.thread_xbox.start()...
apache-2.0
2,261,498,617,767,686,100
30.222222
90
0.587189
false
3.661238
false
false
false
pantheon-systems/etl-framework
etl_framework/utilities/transform_helpers.py
1
1876
#pylint: disable=too-many-arguments def inject_value( input_data, output_data, from_path, to_path, filter_function, from_index=0, to_index=0 ): """ injects parts of output_data into input_data based on from_path and to_path """ if from_index < len(from_path): ne...
mit
7,148,673,454,508,643,000
29.258065
72
0.476546
false
4.234763
false
false
false
franklingu/leetcode-solutions
questions/valid-palindrome-ii/Solution.py
1
1170
""" Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Input: "aba" Output: True Example 2: Input: "abca" Output: True Explanation: You could delete the character 'c'. Note: The string will only contain lowercase characters a-z. The maximum length o...
mit
-9,168,188,781,347,116,000
25
109
0.405983
false
4.193548
false
false
false
felipenaselva/felipe.repository
script.module.urlresolver.xxx/resources/plugins/pornilly.py
1
1306
''' urlresolver XBMC Addon Copyright (C) 2016 Gujal This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is di...
gpl-2.0
4,193,927,024,404,972,000
37.411765
132
0.707504
false
3.74212
false
false
false
s-simpson/cssu_door
Test_programs/email_secure_test.py
1
2208
#https://stackoverflow.com/questions/25944883/how-to-send-an-email-through-gmail-without-enabling-insecure-access #several modificatons to original code, change body line as per comment #change from flow to run_flow #this is working now! Yay the modifications worked #you have to do an email confirmation im...
mit
-5,383,034,287,276,033,000
34.196721
114
0.747283
false
3.460815
false
false
false
sunqm/pyscf
pyscf/gto/test/test_moleintor.py
1
12413
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
apache-2.0
4,745,581,606,419,741,000
38.157729
88
0.52292
false
2.629316
true
false
false
SasaKaranovic/DigiKeyFetch
Fetch.py
1
4749
import os import sys import signal import clipboard import keyboard import argparse from Classes.digikey import digikey from Classes.globalhotkeys import GlobalHotKeys # ____ _ _ __ __ ______ __ __ # / __ \(_)___ _(_) //_/__ __ __ / ____/__ / /______/ /_ # / / / /...
gpl-3.0
1,119,405,432,108,644,400
30.527397
165
0.603495
false
3.281963
false
false
false
bringsvor/bc_website_purchase
wizards/request_relevant_suppliers.py
1
8572
__author__ = 'tbri' from openerp import fields, models, api, _ import logging _logger = logging.getLogger(__name__) class request_relevant_suppliers(models.TransientModel): _name = "requisition_suppliers" _description = "Purchase Requisition Suppliers" def _get_active_id(self): return self.env.co...
agpl-3.0
-2,568,421,946,811,102,700
41.86
123
0.572795
false
3.626058
false
false
false
raymondbutcher/django-cache-middleware
django_cache_middleware/middleware/cookies.py
1
1910
import re from django.conf import settings from django.core.exceptions import MiddlewareNotUsed def get_cookie_patterns(cookie_names): for name in cookie_names: yield r'%s=.+?(?:; |$)\w*' % name def compile_cookie_patterns(cookie_names): patterns = get_cookie_patterns(cookie_names) patterns = (...
mit
3,332,927,510,150,098,000
35.037736
89
0.642408
false
4.331066
false
false
false
forseti-security/resource-policy-evaluation-library
rpe/rpe.py
1
1715
# Copyright 2019 The resource-policy-evaluation-library 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 # # Unl...
apache-2.0
-8,252,220,534,920,028,000
31.980769
85
0.668805
false
4.319899
true
false
false
laffra/pava
pava/implementation/natives/sun/util/locale/provider/HostLocaleProviderAdapterImpl.py
1
5540
def add_native_methods(clazz): def initialize____(a0): raise NotImplementedError() def getDefaultLocale__int__(a0, a1): raise NotImplementedError() def getDateTimePattern__int__int__java_lang_String__(a0, a1, a2, a3): raise NotImplementedError() def getCalendarID__java_lang_St...
mit
-8,446,699,431,407,659,000
53.313725
163
0.710289
false
3.499684
false
false
false
Mariatta/pythondotorg
community/migrations/0001_squashed_0004_auto_20170831_0541.py
1
7664
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2017-08-31 05:44 from __future__ import unicode_literals from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import markupfield.fields ...
apache-2.0
2,114,780,150,644,786,200
57.060606
217
0.590945
false
4.135996
false
false
false
wisechengyi/pants
src/python/pants/backend/jvm/subsystems/junit.py
1
2701
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.backend.jvm.subsystems.jvm_tool_mixin import JvmToolMixin from pants.backend.jvm.subsystems.shader import Shader from pants.backend.jvm.targets.jar_library import JarLibrary fro...
apache-2.0
-5,699,825,366,053,865,000
44.779661
95
0.671973
false
3.761838
false
false
false
typemytype/RoboFontExtensions
glifViewer/GlifViewer.roboFontExt/lib/glifViewer.py
1
3017
from AppKit import * import vanilla from defconAppKit.windows.baseWindow import BaseWindowController from mojo.events import addObserver, removeObserver from robofab.glifLib import writeGlyphToString, readGlyphFromString from defcon.objects.glyph import addRepresentationFactory from lib.scripting.codeEditor import Co...
mit
247,205,629,425,901,760
34.081395
121
0.627444
false
4.297721
false
false
false
acesonl/remotecare
remotecare/apps/api/migrations/0001_initial.py
1
3022
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-07-13 22:59 from __future__ import unicode_literals import core.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('patient', '0001_initi...
gpl-3.0
1,324,822,148,413,525,500
42.171429
150
0.573461
false
4.286525
false
false
false
Preston4tw/elearning
coursera/algo-pt1/week5/dijkstra.py
1
2465
from collections import namedtuple import itertools import sys def compute_shortest_paths(graph, starting_vertex): """ Given a graph (adj list) and starting vertex, compute path lengths to all other verticies and return a hash where each hash key is the ending node and the hash value is the distance of...
mit
6,362,397,029,079,014,000
39.409836
80
0.546856
false
3.88189
false
false
false
awensaunders/flowroute-messenger
setup.py
1
3922
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.absp...
mit
-7,260,886,448,710,096,000
34.654545
94
0.666497
false
3.997961
false
false
false
smtheard/ShowTracker
models/episode.py
1
2468
from datetime import datetime import sqlalchemy as sa import config from models.episode_watch import EpisodeWatch # pylint: disable=unused-import class Episode(config.Base): __tablename__ = 'episode' id = sa.Column(sa.Integer, sa.Sequence('episode_id_seq'), primary_key=True) title = sa.Column(sa.Text) ...
gpl-3.0
-1,681,055,378,387,471,400
30.641026
96
0.519044
false
3.767939
false
false
false
akofke/autoperiod
src/autoperiod/autoperiod.py
1
8441
# coding=utf-8 from __future__ import division, print_function, absolute_import import math import numpy as np import scipy from astropy.stats import LombScargle from scipy.signal import fftconvolve from scipy.stats import linregress from scipy import integrate from six.moves import range class Autoperiod(object): ...
mit
8,079,330,194,644,764,000
36.515556
114
0.590214
false
3.53772
false
false
false
Bismarrck/tensorflow
tensorflow/tools/compatibility/tf_upgrade_v2.py
1
34357
# Copyright 2018 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,406,322,938,660,398,300
35.784797
80
0.546963
false
3.778401
false
false
false
jamesra/nornir-web
nornir_web/volume_server/management/commands/volume_precache.py
1
7292
from optparse import make_option import os from django.core.management.base import BaseCommand, CommandError from nornir_imageregistration import core from nornir_imageregistration.spatial import * import nornir_djangomodel.import_xml as import_xml from nornir_shared.argparse_helpers import NumberList from nornir_we...
gpl-2.0
2,312,819,025,755,192,300
40.668571
152
0.59435
false
4.089736
false
false
false
nicproulx/mne-python
mne/decoding/base.py
2
29299
"""Base class copy from sklearn.base.""" # Authors: Gael Varoquaux <gael.varoquaux@normalesup.org> # Romain Trachel <trachelr@gmail.com> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Jean-Remi King <jeanremi.king@gmail.com> # # License: BSD (3-clause) import numpy as np f...
bsd-3-clause
2,905,965,638,678,295,000
42.470326
79
0.582545
false
4.499923
false
false
false
zachm/tscached
tests/test_shadow.py
1
7921
import datetime import freezegun import mock import pytest import redis import redlock from testing.mock_redis import MockRedis from tscached.kquery import KQuery from tscached.shadow import become_leader from tscached.shadow import release_leader from tscached.shadow import perform_readahead from tscached.shadow imp...
gpl-3.0
159,133,897,781,908,380
35.671296
102
0.698649
false
3.082101
true
false
false
iModels/foyer
foyer/atomtyper.py
1
5459
from warnings import warn import parmed as pmd import parmed.periodic_table as pt from foyer.exceptions import FoyerError from foyer.topology_graph import TopologyGraph from foyer.smarts_graph import SMARTSGraph def find_atomtypes(structure, forcefield, max_iter=10): """Determine atomtypes for all atoms. P...
mit
-155,011,539,626,694,140
34.914474
82
0.585272
false
4.346338
false
false
false
jocelynj/weboob
weboob/backends/youporn/pages/index.py
1
2508
# -*- coding: utf-8 -*- # Copyright(C) 2010 Romain Bignon # # 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, version 3 of the License. # # This program is distributed in the hope that it will b...
gpl-3.0
7,537,300,043,219,767,000
33.356164
97
0.505582
false
4.354167
false
false
false
storiesofsolidarity/story-database
people/migrations/0001_initial.py
1
1429
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
agpl-3.0
-8,160,745,018,574,182,000
33.853659
114
0.546536
false
4.594855
false
false
false
molmod/molmod
molmod/io/crystal.py
1
6362
# -*- coding: utf-8 -*- # MolMod is a collection of molecular modelling tools for python. # Copyright (C) 2007 - 2019 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center # for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights # reserved unless otherwise stated. # # This file is part of MolMod. # #...
gpl-3.0
-3,016,263,983,191,291,000
39.012579
116
0.518076
false
4.445842
false
false
false
openaid-IATI/deprecated-version-OIPA-v2
iati/utils/views.py
1
17296
# Django specific import json from django.db import connection from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from django.utils import simplejson from django.views.generic import FormView from data.models.common import IndicatorData from d...
agpl-3.0
2,688,666,459,399,889,400
32.913725
280
0.599676
false
3.698097
false
false
false
FrodeSolheim/fs-uae-launcher
fsgamesys/session.py
1
2339
import threading import time import traceback from uuid import uuid4 from fsgamesys.input.enumeratehelper import EnumerateHelper from fsgamesys.platforms.platform import PlatformHandler class Instance: STATE_INITIALIZED = "INITIALIZED" STATE_PREPARING = "PREPARING" STATE_READY = "READY" STATE_RUNNING...
gpl-2.0
3,238,025,655,112,961,000
26.197674
77
0.612227
false
3.951014
false
false
false
quantosauros/cppyProject
cppy/test/tesStockChart.py
1
1063
# coding: utf-8 from cybosPlus.cpRqRp import StockChart.StockChart __author__ = 'lhw' if __name__ == '__main__': instance = StockChart() inputTypes = [StockChart.InputType.StockCode, StockChart.InputType.Gubun, StockChart.InputType.Number, ...
mit
-9,013,361,492,528,939,000
32.354839
63
0.567262
false
4.185039
false
false
false
carquois/blobon
blobon/accounts/migrations/0016_auto__add_field_userprofile_entreprise__add_field_userprofile_ent_phon.py
1
14146
# -*- 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 'UserProfile.entreprise' db.add_column('accounts_userprofile', 'entreprise', ...
mit
-7,461,028,104,980,303,000
70.449495
182
0.561996
false
3.702172
false
false
false
mbohlool/client-python
kubernetes/client/models/v1beta1_ingress.py
1
7519
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
apache-2.0
-3,553,297,774,113,459,700
30.592437
281
0.601144
false
4.053369
false
false
false
duguyue100/tcor
tcor/task.py
1
3569
"""Central Task class. Author: Yuhuang Hu Email : duguyue100@gmail.com """ import json class Task(object): """Describe a task object.""" def __init__(self, task_dict=None, task_json=None): """Initialize task. Parameters ---------- task_dict : dict The task dicti...
mit
2,513,031,001,182,316,000
23.114865
67
0.480807
false
4.315599
false
false
false
afenkart/gcompris-devel
src/hydroelectric-activity/hydroelectric.py
1
36509
# gcompris - hydroelectric # # Copyright (C) 2010 Bruno Coudoin # # 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 versio...
gpl-2.0
-2,643,765,373,753,551,400
32.039819
98
0.616779
false
3.416526
false
false
false
ColdrickSotK/storyboard
storyboard/db/migration/alembic_migrations/versions/057_allow_stories_and_tasks_to_be_made_.py
1
2433
# Copyright 2016 Codethink Ltd # # 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 writin...
apache-2.0
1,772,221,301,896,187,600
33.757143
79
0.679408
false
3.725881
false
false
false
loopback1/scripts
code/python/netmiko_switch_config.py
1
1710
#!/usr/bin/env python # lima 6/16/2017 # multiprocessing works better in linux... forking is not supported in windows # ... just run this in linux and move on... # # from __future__ import absolute_import, division, print_function import netmiko from multiprocessing import Pool # import my toolbox.py functions import...
unlicense
2,899,496,633,123,224,000
28.482759
82
0.651462
false
3.454545
false
false
false
DeepRNN/visual_question_answering
utils/vqa/vqa.py
1
12335
__author__ = 'aagrawal' __version__ = '0.9' # Interface for accessing the VQA dataset. # This code is based on the code written by Tsung-Yi Lin for MSCOCO Python API available at the following link: # (https://github.com/pdollar/coco/blob/master/PythonAPI/pycocotools/coco.py). # The following functions are defined: ...
mit
-652,736,456,456,150,000
50.395833
247
0.491285
false
4.515007
false
false
false
eiennohito/gxpc
inst_local.py
1
25877
# Copyright (c) 2009 by Kenjiro Taura. All rights reserved. # Copyright (c) 2008 by Kenjiro Taura. All rights reserved. # Copyright (c) 2007 by Kenjiro Taura. All rights reserved. # Copyright (c) 2006 by Kenjiro Taura. All rights reserved. # Copyright (c) 2005 by Kenjiro Taura. All rights reserved. # # THIS MATERIAL IS...
gpl-2.0
3,983,398,481,482,684,400
37.054412
91
0.53364
false
3.40711
false
false
false
HLP-R/hlpr_kinesthetic_teaching
hlpr_record_demonstration/src/hlpr_record_demonstration/demonstration.py
1
7256
#!/usr/bin/env python # Copyright (c) 2016, Diligent Droids # 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 # ...
bsd-3-clause
-4,184,866,312,055,970,300
35.832487
144
0.674201
false
4.028873
false
false
false
ktakagaki/kt-2015-DSPHandsOn
gitInformation.py
1
4301
# -*- coding: utf-8 -*- """ This package allows you to add information to your Ipython notebook, if you're working in a git repository. It is usefull if you want to verify the notebook version. This package is collecting all information by its own, so you don't need to set any repository path. You also can check the in...
gpl-2.0
2,423,026,259,008,476,700
36.736842
149
0.643571
false
4.076777
false
false
false
prestodb/presto-admin
prestoadmin/workers.py
1
4557
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
-654,026,717,342,378,500
44.118812
78
0.524029
false
4.884244
true
false
false
joferkington/python-geoprobe
geoprobe/swfault.py
1
10374
import six import numpy as np import xml.etree.ElementTree as et import xml.dom.minidom as minidom from . import utilities # Note: matplotlib.delaunay is required for interpolation and triangulation. # If it isn't available class swfault(object): def __init__(self, arg): if isinstance(arg, six.string_types...
mit
6,667,915,911,091,019,000
36.861314
92
0.571911
false
3.83512
false
false
false
jhk753/btce-trading
btceapi/public.py
1
2089
# Copyright (c) 2013 Alan McIntyre import datetime import decimal import common def getDepth(pair, connection = None): '''Retrieve the depth for the given pair. Returns a tuple (asks, bids); each of these is a list of (price, volume) tuples.''' common.validatePair(pair) if connection is No...
mit
-4,574,116,436,084,893,700
29.275362
89
0.584011
false
3.791289
false
false
false
vollmerk/sysadm-tools
ganglia/lib/gmetric.py
1
7815
#!/usr/bin/env python # This is the MIT License # http://www.opensource.org/licenses/mit-license.php # # Copyright (c) 2007,2008 Nick Galbreath # # 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 Softw...
gpl-2.0
-6,260,887,961,061,849,000
37.308824
132
0.614843
false
3.591452
false
false
false
paravoid/peerassist
peermatch/textviews.py
1
3170
from django.template import loader from django_peeringdb.models import NetworkIXLan, IXLan, InternetExchange from peercollect.models import Peering from prettytable import PrettyTable from peermatch.utils import find_peering_poc # FIXME from django.core.management.base import CommandError def peering_matrix(us, them...
apache-2.0
5,196,827,368,520,355,000
31.680412
86
0.526814
false
3.729412
false
false
false
ttreeagency/PootleTypo3Org
pootle/apps/staticpages/forms.py
1
3328
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2013 Zuza Software Foundation # # This file is part of Pootle. # # Pootle 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 Lic...
gpl-2.0
7,605,954,726,321,325,000
39.096386
76
0.608173
false
4.384717
false
false
false
zaqwes8811/matlab_ext
code-miners/projects/asm-code-analyser/asm_call_graph/LabelPurgers.py
1
1311
#!/usr/bin/python #-*- coding: utf-8 -*- ''' file : import LabelPurgers abs. : пакет содержит функции обработки излов графа ''' ''' Набор функция очистки узла ''' ''' удаление комментариев из главных меток - любых и полезных тоже ''' def pureNode( node ): splitList = node.split(';') splitListSplTabSpaces = sp...
apache-2.0
-847,966,400,476,331,900
23.272727
70
0.68135
false
2.017013
false
false
false
calmjs/nunja.serve
src/nunja/serve/flask/__init__.py
1
1329
# -*- coding: utf-8 -*- """ This provide integration with Flask. Requires Flask>=0.9 """ import mimetypes from flask import make_response from nunja.serve import rjs class FlaskMixin(object): """ The base mixin for combining with a provider implementation. """ def serve(self, identifier): ...
gpl-2.0
6,249,453,746,054,124,000
23.163636
71
0.599699
false
4.003012
false
false
false
milankl/swm
calc/misc/Re_hist_calc_bs.py
1
4264
## HISTOGRAM COMPUTATIONS FOR REYNOLDS AND ROSSBY NUMBERS from __future__ import print_function # path import os path = os.path.dirname(os.getcwd()) + '/' # on level above os.chdir(path) # change working directory import numpy as np from scipy import sparse # OPTIONS runfolder = [10] p...
gpl-3.0
-1,571,922,740,270,724,400
27.61745
102
0.572702
false
2.523077
false
false
false
gklyne/annalist
src/annalist_root/annalist/message.py
1
17865
""" Define various message strings generated in the code. As far as possible, user display strings referenced directly by source code are isolated here to facilitate editing and translation. """ from __future__ import unicode_literals from __future__ import absolute_import, division, print_function __author__ =...
mit
2,306,123,118,079,045,600
58.749164
227
0.62754
false
3.464895
false
false
false
davidam/python-examples
gtk/treeview.py
1
4771
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2018 David Arroyo Menéndez # Author: David Arroyo Menéndez <davidam@gnu.org> # Maintainer: David Arroyo Menéndez <davidam@gnu.org> # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
gpl-3.0
-5,462,580,126,098,420,000
42.327273
117
0.652749
false
3.794586
false
false
false
ctogle/modular
src/modular4/qtgui.py
1
30192
import modular4.base as mb import modular4.mpi as mmpi import os,sys,numpy,matplotlib,six matplotlib.rcParams['backend.qt4'] = 'PySide' matplotlib.rcParams['pdf.fonttype'] = 42 #matplotlib.use('Qt4Agg') from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as figure_canvas from matplotlib.backend_bases impo...
mit
958,579,070,111,910,800
36.977358
94
0.550013
false
3.465565
false
false
false
ausbin/sandvich
sandvich/__main__.py
1
3583
# sandvich - simple html document generation # Copyright (C) 2012 Austin Adams # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later...
gpl-2.0
-4,656,815,730,524,633,000
28.130081
112
0.622104
false
4.076223
false
false
false
dongxiexidian/Weibo_Com_Login
WeiboEncode.py
1
1620
# -*- coding: utf-8 -*- import urllib import base64 import rsa import binascii def PostEncode(userName, passWord, serverTime, nonce, pubkey, rsakv): "Used to generate POST data" encodedUserName = GetUserName(userName)#Encode username using base64 encodedPassWord = get_pwd(passWord, serverTime, nonce, pubke...
gpl-3.0
5,782,798,930,277,449,000
33.468085
115
0.634568
false
3.521739
false
false
false
veeloox/ramen
ramen/mimemail/mail.py
1
5966
#coding=utf-8 import smtplib from datetime import datetime from hashlib import md5 import sys, re from .misc import * from .parts import * from collections import OrderedDict as odict class Mimemail(): def __init__(self, **kwargs): self.headers = odict() self.headers['MIME-Version'] = '1.0' ...
apache-2.0
1,201,836,660,947,462,000
36.2875
167
0.521958
false
3.536455
false
false
false
malongge/learn_django_urls
project/mywsgi.py
1
1519
import re from project.urlsconf import url_patterns from project.response import HttpResponseNotFound, HttpResponseServerError from project.exceptions import Http404 def application(environ, start_response): try: response = path_to_response(environ) except Http404: response = HttpResponseNot...
mit
-4,597,191,913,206,539,300
28.784314
89
0.642528
false
3.986877
false
false
false
suoto/hdlcc
hdl_checker/tests/test_verilog_parser.py
1
4944
# This file is part of HDL Checker. # # Copyright (c) 2015 - 2019 suoto (Andre Souto) # # HDL Checker 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 ...
gpl-3.0
-4,861,461,476,052,999,000
33.573427
79
0.561691
false
4.446043
true
false
false
h2suzuki/prosaic-snippets
CentOS6/genlxrconf.py
1
1381
#!/usr/bin/env python # -*- coding:utf-8 -*- import pexpect #import sys # for logfile configure_lxr_responses = { r'single/multiple trees.*>.* ':'m\n', r'Tree designation.*>.* ':'embedded\n', r'--- Host name or IP.*>.* ':'http://192.168.170.64\n', r'Database engine.*>.* ':'sqlite\n', r'--- Direct...
mit
5,232,454,408,163,036,000
34.410256
79
0.521361
false
3.189376
false
false
false
Intel-Corporation/tensorflow
tensorflow/compat_template_v1.__init__.py
1
1524
# Copyright 2015 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
2,727,503,219,088,830,500
41.333333
83
0.715879
false
4.031746
false
false
false
valdergallo/raidmanager
player/migrations/0002_auto_20160403_1645.py
1
2163
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-03 16:45 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('player', '0001_initial'), ] operations = [ ...
mit
-1,655,149,489,774,865,200
32.276923
127
0.564956
false
4.343373
false
false
false
gfyoung/pandas
pandas/tests/io/json/test_pandas.py
1
61704
import datetime from datetime import timedelta from io import StringIO import json import os import sys import numpy as np import pytest from pandas.compat import IS64, PY38, is_platform_windows import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame, DatetimeIndex, Series, Timesta...
bsd-3-clause
8,558,373,308,114,302,000
34.398738
88
0.525381
false
3.513667
true
false
false
genestack/task-library
genestack/bridge.py
1
5899
# -*- coding: utf-8 -*- import json import os import sys import requests from genestack import environment from genestack.genestack_exceptions import GenestackException from genestack.java import decode_object class _Bridge(object): @staticmethod def _send_request(path, data): headers = {'Genestack-T...
mit
540,079,943,582,338,800
35.639752
110
0.580946
false
4.034884
false
false
false
SkyLined/headsup
decode/LZW_compressed_data.py
1
4994
# Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
-5,511,881,611,418,371,000
37.015625
81
0.554866
false
3.789074
false
false
false
kmadathil/sanskrit_parser
sanskrit_parser/generator/pratipadika.py
1
5720
from sanskrit_parser.generator.paninian_object import PaninianObject from sanskrit_parser.base.sanskrit_base import SLP1 class Pratipadika(PaninianObject): """ Sanskrit Object Class: Derived From SanskritString Attributes: """ def __init__(self, thing=None, linga="pum", other_tags=[...
mit
8,473,355,385,141,066,000
42.426357
94
0.626383
false
2.205512
false
false
false
netzimme/mbed-os
tools/export/iar/__init__.py
1
6815
import os from os.path import sep, join, exists from collections import namedtuple from subprocess import Popen, PIPE import shutil import re import sys from tools.targets import TARGET_MAP from tools.export.exporters import Exporter, TargetNotSupportedException import json from tools.export.cmsis import DeviceCMSIS f...
apache-2.0
614,057,677,610,891,400
34.128866
88
0.561702
false
3.894286
false
false
false
seakers/daphne_brain
AT/I_Forest.py
1
3431
import hashlib from django.conf import settings from channels.generic.websocket import JsonWebsocketConsumer import pandas as pd import numpy as np import random # Nodes classes definition # Internal node class InNode: def __init__(self, left, right, att, val): self.left = left self.right = rig...
mit
-4,977,287,572,912,679,000
22.826389
95
0.560478
false
3.410537
false
false
false
aturki/pyATK
pyATK/Filesystem/Encoding.py
1
1630
# -*- coding: utf-8 -*- UTF_8_ENCODING = "utf-8" ISO_8895_1_ENCODING = "iso-8895-1" WINDOWS_1252_ENCODING = "windows-1252" MAC_ROMAN_ENCODING = "macroman" ASCII_ENCODING = "us-ascii" encodings = (UTF_8_ENCODING, ISO_8895_1_ENCODING, WINDOWS_1252_ENCODING, MAC_ROMAN_ENCODING, ASCII_ENCODING) def getEncoding(filename...
mit
4,540,474,185,821,896,000
20.733333
108
0.542331
false
4.034653
false
false
false
EmmaIshta/QUANTAXIS
QUANTAXIS/QAUtil/QABar.py
1
6179
# coding=utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2017 yutiansut/QUANTAXIS # # 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 th...
mit
8,833,151,310,434,681,000
36.291971
166
0.644353
false
2.24967
false
false
false
meltedchocolate/Death87
Groups.py
1
1110
""" Copyright 2015 Ricky LeDew This file is part of Death 87. Death 87 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 versi...
gpl-3.0
2,001,058,740,107,791,400
32.666667
73
0.69009
false
4.236641
false
false
false
rgayon/plaso
tests/formatters/tango_android.py
1
1103
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for Tango on Android databases event formatter.""" from __future__ import unicode_literals import unittest from plaso.formatters import tango_android from tests.formatters import test_lib class TangoAndroidContactFormatterTest(test_lib.EventFormatterTestCase)...
apache-2.0
-7,046,938,472,575,451,000
25.902439
72
0.69447
false
4.17803
true
false
false
redhat-cip/python-dciclient
dciclient/v1/api/jobs_events.py
1
1896
# -*- encoding: utf-8 -*- # # Copyright 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 ...
apache-2.0
-2,027,116,355,919,641,900
29.580645
75
0.647679
false
3.570621
false
false
false
fermenreq/Django-Football-News
mundoDeportivo/src/mundoDeportivo/migrations/0002_auto_20170101_2020.py
1
1201
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2017-01-01 19:20 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('mundoDeportivo', '0001_initial'), ] operations = [...
gpl-3.0
8,774,513,859,990,093,000
31.459459
114
0.565362
false
4.003333
false
false
false
ttfseiko/openerp-trunk
openerp/addons/mail/tests/test_mail_gateway.py
1
39434
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
-1,454,161,671,197,704,400
58.930091
166
0.618197
false
3.555175
true
false
false
whiteclover/Sola
sola/web/cherrye.py
1
1374
import cherrypy from cherrypy import _cprequest from cherrypy.lib import httputil try: from greenlet import getcurrent as get_ident except ImportError: try: from thread import get_ident except ImportError: from _thread import get_ident def patch_cherrypy(): cherrypy.serving = Greenl...
gpl-2.0
-8,399,605,411,483,249,000
21.9
109
0.553857
false
4.113772
false
false
false
cvandeplas/plaso
plaso/parsers/winreg_plugins/officemru_test.py
1
2619
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2012 The Plaso Project Authors. # Please see the AUTHORS file for details on individual authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the L...
apache-2.0
756,770,000,405,309,600
36.414286
79
0.719359
false
3.459709
true
false
false
StealthMicro/OctoPi-Makerbot
env/Lib/site-packages/sockjs/tornado/transports/streamingbase.py
1
1278
from sockjs.tornado.transports import pollingbase class StreamingTransportBase(pollingbase.PollingTransportBase): def initialize(self, server): super(StreamingTransportBase, self).initialize(server) self.amount_limit = self.server.settings['response_limit'] # HTTP 1.0 client might send k...
agpl-3.0
-6,326,799,327,941,132,000
28.045455
88
0.58529
false
4.630435
false
false
false