repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
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
alexfalcucc/anaconda
anaconda_lib/linting/pep8.py
1
79405
#!/usr/bin/env python # pep8.py - Check Python source code formatting, according to PEP 8 # Copyright (C) 2006-2009 Johann C. Rocholl <johann@rocholl.net> # Copyright (C) 2009-2014 Florent Xicluna <florent.xicluna@gmail.com> # Copyright (C) 2014 Ian Lee <ianlee1521@gmail.com> # # Permission is hereby granted, free of c...
gpl-3.0
-6,555,471,524,927,298,000
37.790914
79
0.56164
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
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
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
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
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
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
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
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
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
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
shendo/taskq
tests/test_queue.py
1
6485
# TaskQ - Priority queue with task categorisation support # Copyright (C) 2014 Steve Henderson # # 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 o...
gpl-3.0
-1,092,346,553,628,017,700
23.657795
83
0.551735
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
longde123/MultiversePlatform
server/src/multiverse/simpleclient/testclientgroups/group12.py
1
1820
# # The Multiverse Platform is made available under the MIT License. # # Copyright (c) 2012 The Multiverse Foundation # # 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 restrict...
mit
2,642,791,384,150,277,000
38.565217
93
0.767033
false
escattone/kuma
kuma/api/v1/tests/test_plus.py
1
4264
import json import pytest from kuma.core.urlresolvers import reverse from kuma.plus.models import LandingPageSurvey @pytest.mark.django_db def test_ping_landing_page_survey_happy_path(client, settings): # This sets the needed session cookie variant_url = reverse("api.v1.plus.landing_page_variant") respo...
mpl-2.0
8,353,484,530,019,229,000
33.387097
80
0.673546
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
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
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
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
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
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
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
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
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
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
0xGiddi/pymbr
pymbr/bootcode.py
1
1582
""" pymbr A python module to manipulate and create MBRs. :copyright: (c) 2017 by Gideon S. (0xGiddi) :license: GPLv3, see LICENSE file for more details. """ __all__ = ['Bootcode'] class Bootcode: """ Common bootcodes used by various OSes """ ZERO = [0x00] ZOIDBERG = [0xB8, 0xC0, 0x07, 0x05,...
gpl-3.0
-8,665,105,640,867,427,000
51.733333
108
0.628951
false
GoodgameStudios/crossbar
crossbar/twisted/endpoint.py
1
12193
##################################################################################### # # Copyright (C) Tavendo GmbH # # Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you # have purchased a commercial license), the license terms below apply. # # Should you enter into a separate licen...
agpl-3.0
7,831,824,093,298,299,000
34.444767
115
0.567129
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
Triv90/Heat
heat/tests/test_parameters.py
1
12606
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
333,710,865,556,699,400
35.53913
79
0.523164
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
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
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
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
MaxTyutyunnikov/lino
lino/lino_site.py
1
69806
# -*- coding: UTF-8 -*- ## Copyright 2002-2013 Luc Saffre ## This file is part of the Lino project. ## Lino is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 3 of the License, or ## (at your op...
gpl-3.0
1,687,644,786,316,544,300
33.001948
128
0.581512
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
HackToday/kolla
tests/test_build.py
1
3763
# 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 # d...
apache-2.0
9,087,697,521,718,533,000
35.182692
78
0.575605
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
bharadwajyarlagadda/bingmaps
tests/test_location_by_address_url_schema.py
1
2911
import pytest from bingmaps.apiservices import LocationByAddress from bingmaps.urls import LocationByAddressSchema from .fixtures import parametrize, BING_MAPS_KEY http_protocol = 'http' https_protocol = 'https' DATA = [{'adminDistrict': 'WA'}, {'key': 'vds'}, {'adminDistrict': 'WA', 'locali...
mit
-7,775,224,365,271,636,000
27.821782
76
0.643765
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
dcrozier/PyTest
IT Management/ssfusd_speaker_finder.py
1
3343
import yaml import os import sys import re import library import csv from collections import defaultdict import netaddr from multiprocessing.pool import ThreadPool print("Post Deployment - South San Francisco") # Checks for site yaml file if not os.path.isfile('yamls\\SSFUSD.yml'): sys.exit('Site not setup, run ...
apache-2.0
5,158,755,310,741,284,000
34.946237
134
0.638947
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
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
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
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
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
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
marble/Toolchain_RenderDocumentation
12-Get-ready-for-the-project/run_35-Define-general-values.py
1
8699
#!/usr/bin/env python # coding: utf-8 from __future__ import print_function from __future__ import absolute_import import os import sys import tct from tct import deepget ospj = os.path.join params = tct.readjson(sys.argv[1]) facts = tct.readjson(params['factsfile']) milestones = tct.readjson(params['milestonesfil...
mit
4,967,890,019,327,124,000
29.208333
135
0.62237
false
trnewman/VT-USRP-daughterboard-drivers_python
gr-usrp/src/qa_usrp.py
1
1235
#!/usr/bin/env python # # Copyright 2005 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) ...
gpl-3.0
-927,789,237,548,357,000
29.875
78
0.692308
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
NuttamonW/Archaeological
ElectricalConductivity/test/test_electrical_conductivity_dialog.py
1
1580
# coding=utf-8 """Dialog test. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __author__ = 'p.p...
gpl-3.0
3,035,364,062,915,412,000
27.727273
78
0.677848
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
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
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
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
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
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
bloff/ZeroNet
src/Config.py
1
11857
import argparse import sys import os import ConfigParser class Config(object): def __init__(self, argv): self.version = "0.3.1" self.rev = 307 self.argv = argv self.action = None self.createParser() self.createArguments() def createParser(self): # Crea...
gpl-2.0
6,955,166,451,912,471,000
44.779923
126
0.609007
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
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
tejal29/pants
src/python/pants/backend/jvm/tasks/specs_run.py
1
3288
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from twitter.common....
apache-2.0
4,884,048,821,790,029,000
38.142857
96
0.673054
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
rishig/zulip
zproject/urls.py
1
36270
from django.conf import settings from django.conf.urls import url, include from django.conf.urls.i18n import i18n_patterns from django.http import HttpResponseBadRequest, HttpRequest, HttpResponse from django.views.generic import TemplateView, RedirectView from django.utils.module_loading import import_string import os...
apache-2.0
-2,487,553,262,072,114,000
47.75
103
0.668238
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
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
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
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
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
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
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
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
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
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
chenbojian/SU2
SU2_PY/parallel_computation.py
1
3981
#!/usr/bin/env python ## \file parallel_computation.py # \brief Python script for doing the continuous adjoint computation using the SU2 suite. # \author T. Economon, T. Lukaczyk, F. Palacios # \version 3.2.9 "eagle" # # SU2 Lead Developers: Dr. Francisco Palacios (Francisco.D.Palacios@boeing.com). # ...
lgpl-2.1
-5,888,083,821,132,230,000
34.864865
93
0.567445
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
chippey/gaffer
python/GafferTest/UndoTest.py
1
5828
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
bsd-3-clause
4,500,557,016,804,750,300
30.502703
77
0.644132
false
bjmorgan/vasppy
docs/source/conf.py
1
5544
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # vasppy documentation build configuration file, created by # sphinx-quickstart on Tue Mar 6 13:36:30 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # aut...
mit
-909,140,408,415,588,900
28.647059
79
0.675866
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
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
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
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
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
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
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
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
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
chexov/rexpython
rexpython/test_observable.py
1
4158
import logging import multiprocessing import sys import time from unittest import TestCase import rexpython as rx logging.basicConfig(format="%(asctime)-15s %(name)-25s %(levelname)s %(process)d %(message)s") log = logging.getLogger(__name__) log.setLevel(logging.DEBUG) class TestOnError(TestCase): def test_on...
mit
3,438,136,467,915,082,000
33.65
97
0.481241
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
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
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
mwillmott/techbikers
server/wsgi.py
1
1435
""" WSGI config for techbikers project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
mit
2,688,136,823,440,740,400
43.84375
79
0.794425
false
geomagpy/magpy
magpy/lib/format_lemi.py
1
19241
''' Path: magpy.lib.format_lemi Part of package: stream (read/write) Type: Input filter, part of read library PURPOSE: Auxiliary input filter for Lemi data. CONTAINS: isLEMIBIN: (Func) Checks if file is LEMI format binary file. readLEMIBIN: (F...
bsd-3-clause
-1,418,573,490,651,415,800
35.235405
177
0.54467
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
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
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
flavour/ifrc_qa
modules/tests/org/create_facility.py
1
2200
""" Sahana Eden Automated Test - INV023 Create Facilty @copyright: 2011-2016 (c) Sahana Software Foundation @license: 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 Software witho...
mit
-289,334,977,569,305,600
40.509434
110
0.637727
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
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
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
synapse-wireless/bulk-reprogramming
snappyImages/synapse/hexFunctions.py
1
1980
# Copyright (C) 2013 Synapse Wireless, Inc. # Subject to your agreement of the disclaimer set forth below, permission is given by # Synapse Wireless, Inc. ("Synapse") to you to freely modify, redistribute or include # this SNAPpy code in any program. The purpose of this code is to help you understand # and learn about ...
apache-2.0
-5,973,411,298,524,838,000
57.235294
85
0.759091
false