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
KSG-IT/ksg-nett
api/serializers.py
1
4959
from django.conf import settings from rest_framework import serializers from rest_framework_simplejwt.serializers import TokenObtainSlidingSerializer from api.exceptions import InsufficientFundsException, NoSociSessionError from economy.models import SociProduct, ProductOrder, SociSession, SociBankAccount class Cust...
gpl-3.0
6,613,007,558,135,177,000
36.545455
119
0.650525
false
4.460846
false
false
false
fordcars/SDL3D
tools/Frameworkify/frameworkify.py
1
3860
#!/usr/bin/env python -S # -*- coding: utf-8 -*- r""" frameworkify ~~~~~~~~~~~~ A small command line tool that can rewrite the paths to dynamic loaded libraries in .dylib files so that they reference other paths. By default it will rewrite the path so that it points to the bundle's Frameworks ...
gpl-3.0
-5,696,709,541,733,503,000
31.720339
78
0.644041
false
3.780607
false
false
false
acbilson/forbidden-island
tests/test_print.py
1
1905
import sys sys.path.append('../src') from tiles import * from tile import * class Test(object): def __init__(self): self.board = "" def gen_board(self, tiles): segments = [] rows = [[0,1], [2,3,4,5], [6,7,8,9,10,11], [12,13,14,15,16...
gpl-3.0
8,462,663,968,441,839,000
23.74026
104
0.467192
false
3.764822
false
false
false
Inboxen/website
views/inbox/delete.py
1
2017
## # Copyright (C) 2013 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, o...
agpl-3.0
-7,981,159,622,210,445,000
36.351852
118
0.706495
false
3.80566
false
false
false
juan-cb/django-cookie-law
setup.py
1
1609
#!/usr/bin/env python import os from setuptools import setup, find_packages from itertools import chain from glob import glob import cookielaw CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', ...
bsd-2-clause
-8,123,308,249,982,098,000
27.22807
88
0.649472
false
3.408898
false
false
false
sonali0901/zulip
analytics/views.py
1
37020
from __future__ import absolute_import, division from django.conf import settings from django.core import urlresolvers from django.db import connection from django.db.models import Sum from django.db.models.query import QuerySet from django.http import HttpResponseNotFound, HttpRequest, HttpResponse from django.templa...
apache-2.0
1,357,763,504,589,575,200
32.502262
123
0.557969
false
3.885798
false
false
false
luboslenco/cyclesgame
blender/arm/utils.py
1
24354
import bpy import json import os import glob import platform import zipfile import re import subprocess import webbrowser import numpy as np import arm.lib.armpack import arm.make_state as state import arm.log as log class NumpyEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, np.ndarra...
lgpl-3.0
2,749,772,502,997,039,600
35.08
127
0.581137
false
3.396179
false
false
false
ozamiatin/glance
glance/common/utils.py
1
26028
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2014 SoftLayer Technologies, Inc. # Copyright 2015 Mirantis, Inc # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
29,378,260,714,325,270
34.078167
79
0.552059
false
4.281625
false
false
false
keitaroyam/yamtbx
cctbx_progs/dano_vs_d.py
1
1364
""" Usage: phenix.python dano_vs_d.py your.sca 20 """ import iotbx.file_reader from cctbx.array_family import flex def run(hklin, n_bins): for array in iotbx.file_reader.any_file(hklin).file_server.miller_arrays: # skip if not anomalous intensity data if not (array.is_xray_intensity_array() and a...
bsd-3-clause
3,833,057,630,944,875,500
31.47619
88
0.60044
false
3.135632
false
false
false
jamespcole/home-assistant
homeassistant/components/eight_sleep/binary_sensor.py
1
1832
"""Support for Eight Sleep binary sensors.""" import logging from homeassistant.components.binary_sensor import BinarySensorDevice from . import CONF_BINARY_SENSORS, DATA_EIGHT, NAME_MAP, EightSleepHeatEntity _LOGGER = logging.getLogger(__name__) DEPENDENCIES = ['eight_sleep'] async def async_setup_platform(hass,...
apache-2.0
-4,521,372,871,055,284,700
28.548387
77
0.622817
false
3.832636
false
false
false
iw3hxn/LibrERP
purchase_order_version/models/inherit_purchase_order_line.py
1
2019
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2014 Didotech srl (<http://www.didotech.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publish...
agpl-3.0
2,852,159,605,738,768,400
43.866667
120
0.616642
false
3.966601
false
false
false
Tealium/nagios
files/default/plugins/check_mongodb_backup.py
1
6143
#!/usr/bin/env python desc = """ Checks the status of the most recent MongoDB backup or, with the --snap option, checks that the snapshots for the most recent backup were completed. """ import kazoo from kazoo.client import KazooClient from kazoo.client import KazooState import yaml import argparse import time from d...
apache-2.0
3,951,950,523,133,966,300
27.178899
110
0.608335
false
3.480453
false
false
false
fkie/rosrepo
src/rosrepo/util.py
1
6206
# coding=utf-8 # # ROSREPO # Manage ROS workspaces with multiple Gitlab repositories # # Author: Timo Röhling # # Copyright 2016 Fraunhofer FKIE # # 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 a...
apache-2.0
8,527,631,097,278,525,000
28.131455
155
0.652538
false
3.645711
false
false
false
Hearen/OnceServer
pool_management/bn-xend-core/xend/BNVMAPI.py
1
374814
import traceback import inspect import os import Queue import string import sys import threading import time import xmlrpclib import socket import struct import copy import re import XendDomain, XendDomainInfo, XendNode, XendDmesg, XendConfig import XendLogging, XendTaskManager, XendAPIStore, XendIOCont...
mit
-6,386,652,897,247,954,000
40.294742
164
0.508084
false
3.707909
true
false
false
KyleKing/PiAlarm
.archive-python/modules/tm1637.py
1
6795
"""Manipulate a TM1637 7-segment display.""" import math import threading from time import localtime, sleep from . import config as cg from .context import IO IO.setwarnings(False) IO.setmode(IO.BCM) HexDigits = [0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x77, 0x7c, 0x39, 0x5e, 0x79, ...
mit
-4,063,615,821,204,735,500
28.16309
98
0.547903
false
3.347291
false
false
false
fresskarma/tinyos-1.x
tools/python/pytos/util/MessageSnooper.py
1
4759
#!/usr/bin/python #$Id: MessageSnooper.py,v 1.2 2005/10/27 02:23:37 kaminw Exp $ # "Copyright (c) 2000-2003 The Regents of the University of California. # All rights reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose, without fee, and without written a...
bsd-3-clause
8,937,040,000,648,870,000
37.691057
98
0.709603
false
3.616261
false
false
false
dmnfarrell/peat
pKaTool/pKa_system.py
1
55804
#!/usr/bin/env python # -*- coding: iso-8859-15 -*- # # 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...
mit
2,878,138,869,651,541,500
35.954967
667
0.510268
false
3.820223
false
false
false
dudanogueira/microerp
microerp/producao/management/commands/nfe.py
1
6041
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand from django.contrib.sites.models import Site from cadastro.models import Cidade, Bairro from rh.models import Funcionario, PeriodoTrabalhado, Cargo, Departamento from account.models import User from optparse import make_option import os, cs...
lgpl-3.0
3,257,614,420,050,963,000
45.438462
323
0.549114
false
3.770768
false
false
false
shinho/SC2
bin/add-opt-in.py
1
7666
#!/usr/bin/env python # Copyright (c) 2012, Adobe Systems Incorporated # 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 not...
gpl-3.0
1,561,226,999,871,632,100
30.941667
132
0.594834
false
3.949511
false
false
false
aguirrea/lucy
tests/testBalieroWalk.py
1
2371
#! /usr/bin/env python # -*- coding: utf-8 -*- # Andrés Aguirre Dorelo # MINA/INCO/UDELAR # # Execution of individuals resulted from the Baliero and Pias work # # 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 Softwa...
gpl-3.0
1,704,087,821,725,901,800
36.03125
144
0.745992
false
3.910891
false
false
false
nikolaichik/SigmoID
Python/RepeatGen.py
1
23652
import sys import argparse from time import process_time import Bio from Bio.SeqFeature import FeatureLocation from Bio.SeqFeature import SeqFeature from decimal import * class MySeqFeature(SeqFeature): def __str__(self): out = "type: %s\n" % self.type if self.strand == 1: out += "loca...
gpl-3.0
-6,934,267,850,099,133,000
41.085409
109
0.50723
false
4.087798
false
false
false
lorensen/VTKExamples
src/Python/VisualizationAlgorithms/Cutter.py
1
1710
#!/usr/bin/env python # A simple script to demonstrate the vtkCutter function import vtk def main(): colors = vtk.vtkNamedColors() # Create a cube cube = vtk.vtkCubeSource() cube.SetXLength(40) cube.SetYLength(30) cube.SetZLength(20) cubeMapper = vtk.vtkPolyDataMapper() cubeMapper.S...
apache-2.0
636,900,238,253,238,100
26.580645
103
0.693567
false
3.392857
false
false
false
ngsxfem/ngsxfem
demos/fictdom_mlset.py
1
4537
""" In this example we solve an unfitted Poisson problem similar to the one in `fictdom.py`, however this time with the unfitted geometry being the unit square. This example shall illustrate the functionality of ngsxfem to solve PDE problems on geometries described via multiple level set functions. PDE problem + Discr...
lgpl-3.0
2,544,864,473,202,585,000
29.655405
79
0.648446
false
2.857053
false
false
false
selassid/canopener
canopener/s3file.py
1
1324
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse import tempfile from boto.s3.connection import S3Connection def make_s3_connection(aws_access_key_id=None, aws_secr...
bsd-2-clause
-4,765,795,732,312,073,000
26.583333
75
0.616314
false
3.568733
false
false
false
hankshz/dockers
memcached/script/test-memcached.py
1
1304
#!/usr/bin/env python3 import time from pymemcache.client.base import Client master = Client(('memcached-master', 11211)) slave1 = Client(('memcached-slave1', 11211)) slave2 = Client(('memcached-slave2', 11211)) slave3 = Client(('memcached-slave3', 11211)) # Invalidate all # mcrouter seems not work properly with pym...
apache-2.0
-5,473,104,553,618,401,000
27.347826
60
0.663344
false
2.728033
false
true
false
DarthMaulware/EquationGroupLeaks
Leak #4 - Don't Forget Your Base/EQGRP-Auction-File/Linux/bin/pyside/sidetrack.py
1
72163
import base import crypto import echocmd import string import struct import time import re import os import sys from socket import * import rawtcp import types class SIDECMD(echocmd.ECHOCMD): def __init__(self): echocmd.ECHOCMD.__init__(self) def TypeConvert(self, stype): #print "In Ty...
unlicense
5,147,977,936,728,221,000
35.501265
289
0.462023
false
3.780741
false
false
false
simondolle/hls-autocomplete
hls_autocomplete/parse.py
1
5470
#!/usr/bin/env python # -*- coding: UTF-8 -*- import datetime from time import strptime import re import os import json class FileStatus(object): def __init__(self, path, rights, nbFiles, owner, group, size, date, relpath = None): self.path = path self.rights = rights self.nbFiles = nbFil...
mit
8,956,800,245,281,798,000
33.821656
134
0.539601
false
3.488832
false
false
false
lipro-yocto/git-repo
subcmds/prune.py
1
1907
# Copyright (C) 2008 The Android Open Source Project # # 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
-1,370,391,103,459,699,500
28.796875
74
0.633456
false
3.940083
false
false
false
atvcaptain/enigma2
lib/python/Plugins/Extensions/DVDBurn/Title.py
1
6455
from __future__ import absolute_import from Components.config import ConfigSubsection, ConfigSubList, ConfigInteger, ConfigText, ConfigSelection from . import TitleCutter class ConfigFixedText(ConfigText): def __init__(self, text, visible_width=60): ConfigText.__init__(self, default = text, fixed_size = True, visib...
gpl-2.0
1,176,808,851,013,645,800
36.52907
127
0.696514
false
3.119865
true
false
false
vponomaryov/manila
manila/share/drivers/dell_emc/plugins/vmax/constants.py
1
1753
# Copyright (c) 2016 Dell Inc. or its subsidiaries. # 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 # # ...
apache-2.0
1,427,866,968,296,748,000
30.872727
78
0.731888
false
2.976231
false
false
false
avagin/p.haul
p_haul_ovz.py
1
4646
# # OpenVZ containers hauler module # import os import shutil import p_haul_cgroup import p_haul_netifapi as netif import p_haul_fsapi as fsapi import p_haul_netapi as netapi import fs_haul_shared import fs_haul_subtree name = "ovz" vzpid_dir = "/var/lib/vzctl/vepid/" vz_dir = "/vz" vzpriv_dir = "%s/private" % vz_dir...
lgpl-2.1
7,124,431,274,139,254,000
23.197917
67
0.63022
false
2.556962
true
false
false
jima80525/pyres
pyres/filemanager.py
1
4287
""" manages the files on the mp3 player """ import os import re import logging import shutil import pyres.utils as utils def _double_digit_name(name): """ Makes all numbers two digit numbers by adding a leading 0 where necessary. Three digit or longer numbers are unaffected. """ # do a little clean up to...
mit
-3,073,739,497,052,079,000
40.621359
79
0.586191
false
3.767135
false
false
false
bmars/sisko
sisko/app.py
1
4908
# Copyright (C) 2014 Brian Marshall # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in...
gpl-3.0
5,710,978,842,891,577,000
36.753846
78
0.556031
false
3.987002
false
false
false
loehnertj/bsbgateway
bsbgateway/util/jos_parser.py
1
15340
############################################################################## # # Copyright (C) Johannes Loehnert, 2013-2015 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Fou...
gpl-3.0
-6,327,910,968,418,215,000
36.93401
127
0.574185
false
4.427128
false
false
false
beiko-lab/gengis
bin/Lib/site-packages/scipy/sparse/csgraph/_validation.py
1
2475
from __future__ import division, print_function, absolute_import import numpy as np from scipy.sparse import csr_matrix, isspmatrix, isspmatrix_csc, isspmatrix_csr from ._tools import csgraph_to_dense, csgraph_from_dense,\ csgraph_masked_from_dense, csgraph_from_masked DTYPE = np.float64 def validate_...
gpl-3.0
2,765,522,862,928,460,300
40.672414
79
0.560404
false
4.004854
false
false
false
MobSF/Mobile-Security-Framework-MobSF
mobsf/StaticAnalyzer/views/ios/db_interaction.py
1
7363
"""Module holding the functions for the db.""" import logging from django.conf import settings from mobsf.MobSF.utils import python_dict, python_list from mobsf.StaticAnalyzer.models import StaticAnalyzerIOS from mobsf.StaticAnalyzer.models import RecentScansDB logger = logging.getLogger(__name__) def get_context_...
gpl-3.0
-1,673,612,552,239,371,300
41.316092
77
0.528317
false
3.674152
false
false
false
Shatki/PyIMU
test/magnetosphere.py
1
1580
from mpl_toolkits.mplot3d import axes3d import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation from socket import * import time # Объявляем все глобальные переменные HOST = '192.168.0.76' PORT = 21566 BUFSIZ = 512 ADDR = (HOST, PORT) bad_packet = 0 good_packet = 0 # fig, ax...
gpl-3.0
-736,870,472,682,010,900
21.328358
60
0.574866
false
2.888031
false
false
false
embray/astropy_helpers
setup.py
1
2069
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst import ah_bootstrap import pkg_resources from setuptools import setup from astropy_helpers.setup_helpers import register_commands, get_package_info from astropy_helpers.version_helpers import generate_version_py NAME = 'astropy_help...
bsd-3-clause
1,800,023,496,086,649,600
38.037736
78
0.672789
false
4.129741
false
false
false
lainegates/DDA
loadDataTools.py
1
41566
# coding=gbk #*************************************************************************** #* * #* Copyright (c) 2009, 2010 * #* Xiaolong Cheng <lainegates@163.com> ...
lgpl-2.1
-3,771,634,351,096,124,000
36.414041
156
0.529423
false
3.983707
false
false
false
TheDSCPL/SSRE_2017-2018_group8
Projeto/Python/cryptopy/crypto/cipher/rijndael.py
1
14718
# -*- coding: utf-8 -*- """ crypto.cipher.rijndael Rijndael encryption algorithm This byte oriented implementation is intended to closely match FIPS specification for readability. It is not implemented for performance. Copyright © (c) 2002 by Paul A. Lambert Read LICENSE.txt for license info...
mit
4,782,612,339,069,262,000
49.927336
115
0.547901
false
2.290383
false
false
false
Ninad998/FinalYearProject
deep_stylo/migrations/0001_initial.py
1
1563
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-24 16:30 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depe...
mit
-7,605,435,888,718,739,000
42.416667
118
0.627639
false
4.070313
false
false
false
Ayrx/cryptography
src/_cffi_src/openssl/crypto.py
1
3371
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function INCLUDES = """ #include <openssl/crypto.h> """ TYPES = """ static const ...
bsd-3-clause
7,430,546,441,362,209,000
33.397959
79
0.723821
false
3.092661
false
false
false
mfsteen/CIQTranslate-Kristian
openpyxl/styles/fills.py
1
5258
from __future__ import absolute_import # Copyright (c) 2010-2016 openpyxl from openpyxl.descriptors import Float, Set, Alias, NoneSet from openpyxl.descriptors.sequence import ValueSequence from openpyxl.compat import safe_string from .colors import ColorDescriptor, Color from .hashable import HashableObject from op...
gpl-3.0
-6,165,026,717,945,432,000
29.218391
86
0.63294
false
3.500666
false
false
false
sserrot/champion_relationships
venv/Lib/site-packages/IPython/core/inputsplitter.py
1
28155
"""DEPRECATED: Input handling and transformation machinery. This module was deprecated in IPython 7.0, in favour of inputtransformer2. The first class in this module, :class:`InputSplitter`, is designed to tell when input from a line-oriented frontend is complete and should be executed, and when the user should be pr...
mit
8,784,860,315,369,942,000
35.470207
109
0.58764
false
4.60049
false
false
false
Ajapaik/ajapaik-web
ajapaik/ajapaik_face_recognition/management/commands/run_face_encoding_on_unencoded_rectangles.py
1
1387
import multiprocessing from json import loads, dumps import face_recognition from django.core.management.base import BaseCommand from ajapaik.ajapaik_face_recognition.models import FaceRecognitionRectangle def encode_single_rectangle(rectangle: FaceRecognitionRectangle) -> None: print('Processing rectangle %s' ...
gpl-3.0
-8,899,417,717,405,903,000
34.564103
111
0.681327
false
4.031977
false
false
false
Tejal011089/trufil-erpnext
erpnext/stock/doctype/item/test_item.py
1
2870
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe from frappe.test_runner import make_test_records from erpnext.stock.doctype.item.item import WarehouseNotSet, ItemTemplat...
agpl-3.0
-5,232,201,362,335,797,000
27.137255
88
0.674913
false
2.937564
true
false
false
petterreinholdtsen/frikanalen
fkbeta/fk/admin.py
1
2538
# Copyright (c) 2012-2013 Benjamin Bruheim <grolgh@gmail.com> # This file is covered by the LGPLv3 or later, read COPYING for details. from django.contrib import admin from django.contrib.auth.models import User from django.contrib.auth.admin import UserAdmin from fk.models import FileFormat from fk.models import Orga...
lgpl-3.0
-431,953,171,379,978,940
31.126582
95
0.684791
false
3.85129
false
false
false
janusnic/ecommerce
ecommerce/settings/local.py
1
4047
"""Development settings and globals.""" from __future__ import absolute_import import os from os.path import join, normpath from ecommerce.settings.base import * from ecommerce.settings.logger import get_logger_config # DEBUG CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = Tru...
agpl-3.0
-3,845,165,324,190,291,000
27.907143
121
0.677045
false
3.227273
true
false
false
mmasaki/trove
trove/tests/tempest/tests/api/versions/test_versions.py
1
1650
# Copyright 2014 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-8,393,112,534,774,205,000
39.243902
78
0.704242
false
4.084158
true
false
false
felipenaselva/repo.felipe
plugin.video.velocity/scrapers/putlocker_both.py
1
15716
import urllib2,urllib,re,os import random import urlparse import sys import xbmcplugin,xbmcgui,xbmc, xbmcaddon, downloader, extract, time import tools from libs import kodi from tm_libs import dom_parser from libs import log_utils import tools from libs import cloudflare from libs import log_utils from tm_libs import d...
gpl-2.0
3,591,408,890,174,926,000
40.033943
197
0.563311
false
3.40026
false
false
false
melodous/designate
designate/sqlalchemy/models.py
1
1881
# Copyright 2012 Hewlett-Packard Development Company, L.P. # # Author: Patrick Galbraith <patg@hp.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/...
apache-2.0
-4,693,961,072,000,867,000
32
79
0.694312
false
4.036481
false
false
false
biocore/verman
verman/__init__.py
1
9290
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013, The BiPy Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #--------------------------...
bsd-3-clause
-6,532,921,692,975,337,000
33.535316
93
0.583423
false
4.117908
false
false
false
CCSS-CZ/layman
server/tests/layedtest.py
1
3969
import os,sys import unittest import ConfigParser TEST_DIR = os.path.dirname(os.path.abspath(__file__)) INSTALL_DIR = os.path.abspath(os.path.join(TEST_DIR,"..")) sys.path.append(os.path.join(INSTALL_DIR)) import json from layman.layed import LayEd from layman.layed import GsRest class LayEdTestCase(unittest.TestCas...
gpl-3.0
-507,578,213,640,657,300
35.75
123
0.615772
false
3.595109
true
false
false
bugsnag/bugsnag-python
bugsnag/sessiontracker.py
1
4934
from copy import deepcopy from uuid import uuid4 from time import strftime, gmtime from threading import Lock, Timer from typing import List, Dict, Callable import atexit try: from contextvars import ContextVar _session_info = ContextVar('bugsnag-session', default={}) # type: ignore except ImportError: fr...
mit
8,336,604,068,259,510,000
30.031447
83
0.551074
false
4.397504
true
false
false
BirchJD/RPiTimer
PiTimer_Step-4/Schedule.py
1
5941
# PiTimer - Python Hardware Programming Education Project For Raspberry Pi # Copyright (C) 2015 Jason Birch # # 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 ...
gpl-3.0
-9,058,749,069,529,155,000
40.838028
117
0.497391
false
4.837948
false
false
false
dweisz/pydolphot
make_fakerun.py
1
2967
import numpy as np import sys import subprocess import os ''' def makephotfiles(base, nstart, nruns, nimages): for i in range(nstart,nstart+nruns): for j in range(1, nimages+1): subprocess.call("ln -s "+base+"."+np.str(j)+".res.fits " + base+"_"+np.str(i)+"."+np.str(j)+".res.fits", shell=True) subprocess.c...
mit
4,988,895,559,438,587,000
31.25
256
0.624874
false
2.345455
false
false
false
collab-project/luma.cryptocurrency
luma/cryptocurrency/endpoint/coinmarketcap.py
1
1134
# -*- coding: utf-8 -*- # Copyright (c) 2017 Thijs Triemstra and contributors # See LICENSE.rst for details. """ Endpoint for coinmarketcap.com :see: https://coinmarketcap.com/api/ """ from datetime import datetime from dateutil.tz.tz import tzutc from . import Endpoint, EndpointResponse class CoinmarketcapRespo...
mit
1,155,416,785,745,923,300
22.625
75
0.640212
false
3.623003
false
false
false
rohitwaghchaure/New_Theme_Erp
erpnext/stock/doctype/stock_entry/stock_entry.py
1
34617
# 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 import frappe.defaults from frappe.utils import cstr, cint, flt, comma_or, nowdate from frappe import _ from erpnext.stock.utils impo...
agpl-3.0
3,160,072,189,511,768,600
35.210251
143
0.676546
false
3.015681
false
false
false
thp44/delphin_6_automation
data_process/2d_1d/archieve/moisture_content_comparison.py
1
18274
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import pandas as pd import matplotlib.pyplot as plt # RiBuild Modules # -----------------------------------------------...
mit
-2,501,209,804,834,219,500
55.575851
120
0.600088
false
3.176982
false
false
false
MaT1g3R/YasenBaka
cogs/moderation.py
1
3215
from discord import DiscordException, Forbidden, HTTPException from discord.ext import commands from discord.ext.commands import Context from bot import Yasen from scripts.checks import has_manage_message, is_admin, no_pm from scripts.discord_utils import leading_members from scripts.helpers import parse_number clas...
apache-2.0
-242,369,800,436,003,700
35.534091
78
0.565474
false
4.197128
false
false
false
ceroytres/cat_nets
cat_nets/datasets/read_pets.py
1
1970
from __future__ import print_function from __future__ import division from __future__ import absolute_import import tensorflow as tf import csv def catClassification_loader(path): cat_names = ['Abyssinian','Bengal','Birman','Bombay','British_Shorthair', 'Egyptian_Mau','Maine_Coon','P...
mit
-7,524,138,306,632,480,000
32.561404
91
0.540102
false
3.594891
false
false
false
rwgdrummer/maskgen
setuptools-version/setuptools_maskgen_version.py
1
1613
from pkg_resources import get_distribution from subprocess import check_output import requests import json repos = 'rwgdrummer/maskgen' giturl = 'https://api.github.com/repos' def get_commit(): url = giturl + '/' + repos + '/pulls?state=closed' resp = requests.get(url) if resp.status_code == requests.code...
bsd-3-clause
-12,361,799,161,684,228
27.298246
66
0.651581
false
3.708046
false
false
false
Solomoriah/gdmodule
demo/gddemo.py
1
1024
#!/usr/bin/env python import gd, os, cStringIO, urllib2 os.environ["GDFONTPATH"] = "." FONT = "Pacifico" def simple(): im = gd.image((200, 200)) white = im.colorAllocate((255, 255, 255)) black = im.colorAllocate((0, 0, 0)) red = im.colorAllocate((255, 0, 0)) blue = im.colorAllocate((0, 0, 255))...
bsd-3-clause
8,312,121,099,719,976,000
20.787234
74
0.583008
false
2.708995
false
false
false
quentinl-c/network_testing-client
app/editor.py
1
2631
from collaborator import Collaborator import os import random import logging import time logging.basicConfig(filename=__name__ + '.log', level=logging.DEBUG) logger = logging.getLogger(__name__) HOME_DIR = os.getenv('HOME_DIR', '/home/') WRITER_SELECTOR = 'ace_text-input' READER_SELECTOR = 'ace_content' FILTER = '[T...
gpl-3.0
31,586,578,786,040,000
30.698795
78
0.54618
false
3.852123
false
false
false
google/trax
trax/models/rnn.py
1
9301
# coding=utf-8 # Copyright 2021 The Trax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-1,051,844,559,480,561,700
39.973568
80
0.669498
false
3.956189
false
false
false
textcad/pyMagpie
magpie/motor.py
1
2154
#!/usr/bin/env python from textcad import * import magpie.utility import magpie.hardware class Stepper(component.Element): def __init__(self, size="GenericNEMA17", negative=False, negativeLength=10): component.Element.__init__(self, name="stepper") ...
mit
-7,378,518,400,631,267,000
38.888889
79
0.551532
false
3.930657
false
false
false
restless/django-guardian
guardian/utils.py
1
4832
""" django-guardian helper functions. Functions defined within this module should be considered as django-guardian's internal functionality. They are **not** guaranteed to be stable - which means they actual input parameters/output type may change in future releases. """ import os import logging from itertools import ...
bsd-2-clause
8,977,540,974,672,123,000
32.324138
81
0.666598
false
4.368897
false
false
false
hamole/pbl8
pbl8_project/pbl/migrations/0003_auto.py
1
3700
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding M2M table for field studies_for on 'Treatment' m2m_table_name = db.shorten_name(u'pbl_treatment_stu...
mit
-9,074,300,691,962,626,000
51.126761
195
0.592703
false
3.285968
false
false
false
blurstudio/cross3d
cross3d/softimage/external.py
1
4267
## # \namespace cross3d.softimage.external # # \remarks This class can be used even outside of softimage. It gives you info on where # softimage is installed, and allows you to run scripts in softimage. # To Access this class use: cross3d.external('softimage') # # \author dougl # \author Blur Studio ...
mit
-2,558,668,745,692,272,000
36.790909
121
0.669088
false
3.591751
false
false
false
Geof23/SESABench_II
parboil/driver/benchmark.py
1
19162
# (c) 2007 The Board of Trustees of the University of Illinois. import sys import os from os import path import re from itertools import imap, repeat, chain import globals import process import parboilfile as pbf from futures import Future from error import ErrorType class Benchmark(object): """A benchmark. ...
mit
-8,829,396,101,898,536,000
35.921002
154
0.608235
false
4.42132
false
false
false
theo-l/django
tests/admin_inlines/models.py
10
7855
""" Testing of admin inline formsets. """ import random from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models class Parent(models.Model): name = models.CharField(max_length=50) def __str__(self): retur...
bsd-3-clause
4,038,649,694,587,854,300
24.669935
103
0.708466
false
3.554299
false
false
false
bchareyre/ratchet
gui/qt4/SerializableEditor.py
1
34633
# encoding: utf-8 from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4 import QtGui import re,itertools import logging logging.trace=logging.debug logging.basicConfig(level=logging.INFO) from yade import * import yade.qt try: from minieigen import * except ImportError: from miniEigen import * seqSeri...
gpl-2.0
-7,651,492,641,948,851,000
44.41601
360
0.727223
false
2.92437
false
false
false
donaldharvey/snappy
snappy/utils.py
1
2623
import urllib2 import urllib import os from mimetools import choose_boundary from mimetypes import guess_type import stat class Singleton(type): def __init__(self, name, bases, dict): super(Singleton, self).__init__(name, bases, dict) self.instance = None def __call__(self, *args, **kw): if self.instance is No...
gpl-3.0
9,019,982,423,787,834,000
32.202532
107
0.676706
false
3.156438
false
false
false
intel-hadoop/Big-Data-Benchmark-for-Big-Bench
engines/hive/queries/q08/q08_filter_sales_with_reviews_viewed_before.py
1
3144
#"INTEL CONFIDENTIAL" #Copyright 2016 Intel Corporation All Rights Reserved. # #The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers and...
apache-2.0
-7,692,260,263,573,723,000
51.4
663
0.735687
false
3.409978
false
false
false
viswimmer1/PythonGenerator
data/python_files/34574373/cmss.py
1
2623
import win32pipe import win32console import win32process import time import win32con import codecs import ctypes user32 = ctypes.windll.user32 CONQUE_WINDOWS_VK = { '3' : win32con.VK_CANCEL, '8' : win32con.VK_BACK, '9' : win32con.VK_TAB, '12' : win32con.VK_CLEAR, '13' : win32con.V...
gpl-2.0
1,044,929,001,205,104,300
26.846154
109
0.643157
false
2.766878
false
false
false
airanmehr/bio
Scripts/TimeSeriesPaper/Plot/topSNPs.py
1
1589
''' Copyleft Oct 14, 2016 Arya Iranmehr, PhD Student, Bafna Lab, UC San Diego, Email: airanmehr@gmail.com ''' import numpy as np; np.set_printoptions(linewidth=200, precision=5, suppress=True) import pandas as pd; pd.options.display.max_rows = 20; pd.options.display.expand_frame_repr = False import seaborn as sns im...
mit
2,218,888,666,753,329,700
32.104167
102
0.680302
false
2.486698
false
true
false
edx/edx-load-tests
util/generate_summary.py
1
3450
# -*- coding: utf-8 -*- """ Generate a summary of a previous loadtest run in this environment. See for usage example in a jenkins job dsl: https://github.com/edx/jenkins-job-dsl/blob/master/testeng/jobs/loadtestDriver.groovy Prerequisites: A logfile produced by util/run-loadtest.sh should be present in its s...
apache-2.0
-6,008,860,902,320,476,000
30.345455
85
0.606729
false
3.913734
true
false
false
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/prompt_toolkit/eventloop/coroutine.py
1
3783
from __future__ import unicode_literals import types from prompt_toolkit.eventloop.defaults import get_event_loop from prompt_toolkit.eventloop.future import Future __all__ = [ 'From', 'Return', 'ensure_future', ] def ensure_future(future_or_coroutine): """ Take a coroutine (generator) or a `Futu...
mit
911,875,866,142,147,300
29.02381
81
0.591594
false
4.116431
false
false
false
bhdouglass/remindor-common
tests/test_time_validation.py
1
1362
import remindor_common.datetimeutil as d valid_singular = [ "now", "1:00pm", "1:00 pm", "13:00", "13", "1300", "1pm" ] valid_repeating = [ "every hour", "every hour from 1 to 1:00pm", "every minute", "every minute from 2:00pm to 1500", "every 3 minutes", "every ...
gpl-3.0
4,687,957,397,284,547,000
18.73913
45
0.550661
false
3.274038
false
false
false
jokajak/itweb
data/env/lib/python2.6/site-packages/repoze.what-1.0.9-py2.6.egg/repoze/what/release.py
1
1208
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008-2009, Gustavo Narea <me@gustavonarea.net> # All Rights Reserved. # # This software is subject to the provisions of the BSD-like license at # http://www.repoze.org/LICENSE.txt. A copy of the lic...
gpl-3.0
-1,875,028,804,024,402,000
35.606061
78
0.639901
false
3.947712
false
false
false
picleslivre/schemaprobe
schemaprobe.py
1
2343
from __future__ import unicode_literals import sys import functools import json try: import jsonschema except ImportError: jsonschema = None try: import requests except ImportError: requests = None __version__ = '1.0.0.dev1' __all__ = ['ensure', 'JsonProbe'] # -------------- # Py2 compat # -------...
bsd-2-clause
1,664,159,037,023,619,000
23.154639
88
0.593683
false
4.314917
false
false
false
sighingnow/sighingnow.github.io
resource/k_nearest_neighbors/dating.py
1
3622
#! /usr/bin/env python # -*- coding: utf-8 ''' Name: dating.py(KNN algorithm) Training and test dataset: dating.txt Created on Feb 8, 2015 @author: Tao He ''' __author__ = 'Tao He' from numpy import array as nmarray from matplotlib import pyplot as plt LABEL_MAP = { 'didntLike': 1, 'sma...
mit
8,461,827,833,393,829,000
27.933884
97
0.543622
false
3.301732
false
false
false
AYJAYY/KenoDB
keno.py
1
4245
# Keno Data Logging - QuickKeno # KDL v1.5.2 - Python 3 Conversion # Last Edit Date: 1/9/2021 from urllib.request import urlopen import json import time def write_file(file_name, write_mode, file_text): text_file = open(file_name, write_mode) text_file.write(file_text) text_file.close() #get the keno j...
gpl-3.0
8,259,616,565,052,512,000
47.793103
313
0.643816
false
3.151448
false
false
false
nephila/djangocms-blog
djangocms_blog/liveblog/migrations/0001_initial.py
1
2058
import django.db.models.deletion import filer.fields.image from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("cms", "0013_urlconfrevision"), ("filer", "0003_thumbnailoption"), ] operations = [ migrations.CreateModel( nam...
bsd-3-clause
3,167,827,842,490,844,700
33.881356
103
0.420797
false
5.415789
false
false
false
Mirantis/swift-encrypt
swift/common/ring/utils.py
1
2880
from collections import defaultdict def tiers_for_dev(dev): """ Returns a tuple of tiers for a given device in ascending order by length. :returns: tuple of tiers """ t1 = dev['zone'] t2 = "{ip}:{port}".format(ip=dev.get('ip'), port=dev.get('port')) t3 = dev['id'] return ((t1,), ...
apache-2.0
-1,470,004,698,661,708,500
31.359551
71
0.365625
false
3.794466
false
false
false
murdej/h2pws
h2pws.py
1
2618
import time import BaseHTTPServer from urlparse import urlparse, parse_qs import subprocess import base64 import qrcode import qrcode.image.svg import cStringIO #1630-1800 HOST_NAME = 'localhost' # !!!REMEMBER TO CHANGE THIS!!! PORT_NUMBER = 8000 # Maybe set this to 9000. class MyHandler(BaseHTTPServer.BaseHTTPReq...
gpl-2.0
4,676,818,734,918,425,000
26
104
0.637128
false
2.8
false
false
false
texib/bitcoin-zoo
member/views.py
1
3349
from django.shortcuts import render from django.contrib.auth.models import User, Group from django.contrib.auth import login from django.contrib.auth import logout from django.contrib.auth import authenticate from django.http import HttpResponseRedirect from rest_framework import viewsets from rest_framework.authentic...
mit
-4,012,741,038,384,615,400
30.299065
84
0.693341
false
4.550272
false
false
false
dnowatsc/Varial
varial/operations.py
1
23334
""" Operations on wrappers """ import array import __builtin__ import ctypes import collections import functools from ROOT import THStack, TGraphAsymmErrors import history import wrappers class OperationError(Exception): pass class TooFewWrpsError(OperationError): pass class TooManyWrpsError(OperationError): pass c...
gpl-3.0
8,743,581,249,339,879,000
25.882488
93
0.552413
false
3.053389
false
false
false
KhronosGroup/COLLADA-CTS
StandardDataSets/1_5/collada/asset/coverage/geographic_location/absolute/absolute.py
1
4333
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publ...
mit
4,687,221,361,627,715,000
52.225
466
0.708054
false
4.182432
false
false
false
ministryofjustice/manchester_traffic_offences_pleas
apps/plea/tests/test_accessibility_switcher.py
1
2202
from django.test import TestCase from django.test.client import Client from django.conf import settings from importlib import import_module from waffle.models import Switch class TestAccessibilitySwitcher(TestCase): def setUp(self): self.client = Client() # http://code.djangoproject.com/ticket/1...
mit
-3,648,315,149,922,748,000
36.965517
85
0.690736
false
3.580488
true
false
false
opennode/nodeconductor-assembly-waldur
src/waldur_mastermind/packages/executors.py
1
4271
from waldur_core.core import executors as core_executors from waldur_core.core import tasks as core_tasks from waldur_core.core import utils as core_utils from waldur_core.structure import executors as structure_executors from waldur_mastermind.packages.serializers import _get_template_quotas from waldur_openstack.open...
mit
-6,142,464,563,913,863,000
34.008197
103
0.656989
false
4.53397
false
false
false
iEngage/python-sdk
iengage_client/models/tag.py
1
3896
# coding: utf-8 """ Stakeholder engagement API This API enables Intelligent Engagement for your Business. iEngage is a platform that combines process, augmented intelligence and rewards to help you intelligently engage customers. OpenAPI spec version: 1.0 Generated by: https://github.com/swagger...
apache-2.0
-7,756,863,969,602,901,000
23.35
186
0.500257
false
4.189247
false
false
false
EmreAtes/spack
var/spack/repos/builtin/packages/texlive/package.py
1
3446
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
428,417,736,615,517,630
42.620253
90
0.653511
false
3.889391
false
false
false
junzis/py-adsb-decoder
pyModeS/extra/aero.py
1
5201
""" Functions for aeronautics in this module - physical quantities always in SI units - lat,lon,course and heading in degrees International Standard Atmosphere :: p,rho,T = atmos(H) # atmos as function of geopotential altitude H [m] a = vsound(H) # speed of sound [m/s] as function of H[m] p = ...
mit
6,628,668,726,650,856,000
27.266304
93
0.584503
false
2.725891
false
false
false
saltastro/saltefficiency
dataquality/upload_throughput.py
1
4898
import os import argparse import glob import traceback import mysql import dataquality as dq def upload_throughput(sdb, infile, force=False): """Upload throughput measurements to the Science Database Parameters ---------- sdb: ~mysql.sdb Connection to the Science Database infile: str ...
bsd-3-clause
3,220,284,524,995,481,600
37.265625
117
0.57942
false
3.518678
false
false
false
yashchandak/GNN
Sample_Run/Seq_Dynamic/blogDWdata.py
1
6976
from __future__ import generators, print_function import numpy as np from copy import deepcopy from random import shuffle from scipy.io import loadmat class DataSet(object): def __init__(self, cfg): """Construct a DataSet. """ self.cfg = cfg self.all_walks, self.node_seq = self.get...
mit
-3,829,700,722,819,435,500
38.862857
120
0.578842
false
3.559184
false
false
false
DOV-Vlaanderen/pydov
setup.py
1
2043
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import find_packages, setup with open('README.md') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() with open('requirements.txt') as f: requirements =...
mit
6,766,960,254,937,599,000
31.951613
78
0.619677
false
3.847458
false
true
false
ales-erjavec/orange-canvas
orangecanvas/scheme/tests/__init__.py
1
2700
""" Scheme tests """ from AnyQt.QtCore import QObject, QEventLoop, QTimer, QCoreApplication, QEvent from typing import List class EventSpy(QObject): """ A testing utility class (similar to QSignalSpy) to record events delivered to a QObject instance. Note ---- Only event types can be recorded...
gpl-3.0
5,709,660,334,887,075,000
26.835052
80
0.554815
false
4.292528
false
false
false
AlexMathew/csipy-exercises
solution/words.py
1
1277
import sys def setup(words): new_words = [] for word in words: new_words.append(word.lower()) words = new_words # This could have been done easier with list comprehensions. # words = [word.lower() for word in words] wordset = set() wordcount = dict() for word in words: prev_size = len(wordset) wordset.ad...
mit
7,769,703,426,424,290,000
26.782609
73
0.651527
false
2.831486
false
false
false
inf0-warri0r/music_cat
classifier/classifier.py
1
4355
#!/usr/bin/env python """ Author : tharindra galahena (inf0_warri0r) Project: classifing music using neural network Blog : http://www.inf0warri0r.blogspot.com Date : 23/05/2013 License: Copyright 2013 Tharindra Galahena This is free software: you can redistribute it and/or modify it under the terms of the G...
agpl-3.0
809,784,179,446,759,300
27.279221
78
0.595867
false
3.500804
false
false
false