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
aleksandar-mitrevski/robot_simulation
fault_injector/fault_injector_node.py
1
6522
#!/usr/bin/env python import sys, tty, termios import rospy from fault_injector.msg import InjectFault class Commands(object): InjectFault = 1 RepairSensor = 2 RepairAllSensors = 3 Quit = 4 Unknown = 5 class FaultTypes(object): Permanent = 1 Transient = 2 Unknown = 3 class FaultInjec...
mit
3,365,828,375,489,635,000
37.140351
157
0.616069
false
4.221359
false
false
false
infobip/infobip-api-python-client
infobip/api/model/omni/logs/OmniLog.py
1
5654
# -*- coding: utf-8 -*- """This is a generated class and is not intended for modification! """ from datetime import datetime from infobip.util.models import DefaultObject, serializable from infobip.api.model.omni.Price import Price from infobip.api.model.omni.Status import Status from infobip.api.model.omni.OmniChann...
apache-2.0
-4,938,123,351,956,362,000
22.5625
66
0.556951
false
3.799731
false
false
false
Amarchuk/2FInstability
core/n1167.py
1
24998
__author__ = 'amarch' # -*- coding: utf-8 -*- import shutil from core.main import * def correctGasData(r_g1, v_g1, dv_g1): '''Функция, куда убраны все операции подгонки с данными по газу.''' r_g = r_g1 v_g = v_g1 dv_g = dv_g1 #Если необходимо выпрямить апроксимацию на краю - можно добавить неск...
gpl-3.0
8,201,307,194,499,260,000
41.394643
124
0.609241
false
2.272083
false
false
false
lahwaacz/wiki-scripts
ws/db/selects/__init__.py
1
8229
#!/usr/bin/env python3 from collections import OrderedDict import sqlalchemy as sa from .namespaces import * from .interwiki import * from .lists.recentchanges import * from .lists.logevents import * from .lists.allpages import * from .lists.protectedtitles import * from .lists.allrevisions import * from .lists.all...
gpl-3.0
-5,223,906,679,752,857,000
35.573333
129
0.645036
false
3.642762
false
false
false
chubbymaggie/angr
angr/storage/memory.py
1
38942
#!/usr/bin/env python import logging l = logging.getLogger("angr.storage.memory") import claripy from ..state_plugins.plugin import SimStatePlugin from ..engines.vex.ccall import _get_flags stn_map = { 'st%d' % n: n for n in xrange(8) } tag_map = { 'tag%d' % n: n for n in xrange(8) } class AddressWrapper(object): ...
bsd-2-clause
6,487,748,199,254,424,000
43.302617
155
0.600637
false
4.173848
false
false
false
TheAlgorithms/Python
project_euler/problem_070/sol1.py
1
3189
""" Project Euler Problem 70: https://projecteuler.net/problem=70 Euler's Totient function, φ(n) [sometimes called the phi function], is used to determine the number of positive numbers less than or equal to n which are relatively prime to n. For example, as 1, 2, 4, 5, 7, and 8, are all less than nine and relatively ...
mit
-6,360,014,420,547,202,000
25.714286
78
0.633847
false
3.270576
false
false
false
ukdtom/WebTools.bundle
Contents/Code/jsonExporterV3.py
1
15236
###################################################################################################################### # json Exporter module for WebTools # # Author: dane22, a Plex Community member # ###################################################################################################################### ...
mpl-2.0
7,612,324,967,193,343,000
40.857143
148
0.454319
false
4.979085
false
false
false
nanjj/softlayer-python
SoftLayer/CLI/file/detail.py
1
5131
"""Display details for a specified volume.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer import utils @click.command() @click.argument('volume_id') @environment.pass_env def cli(env, volume_id)...
mit
-6,818,909,302,590,211,000
39.401575
105
0.592477
false
4.101519
false
false
false
wood-galaxy/FreeCAD
src/Mod/Path/PathCommands.py
3
3451
# -*- coding: utf-8 -*- # *************************************************************************** # * * # * Copyright (c) 2016 sliptonic <shopinthewoods@gmail.com> * # * ...
lgpl-2.1
-4,393,383,547,174,822,400
42.1375
112
0.496957
false
4.570861
false
false
false
disenone/zsync
test/zsync_client.py
1
2617
# -*- coding: utf-8 -*- import zmq import os import time from threading import Thread from zhelpers import socket_set_hwm, zpipe from zsync_server import CHUNK_SIZE, PIPELINE, ports, ip dst_path = 'sync_files_dst' def client_thread(ctx, port): dealer = ctx.socket(zmq.DEALER) socket_set_hwm(dealer, PIPELINE) ...
mit
-1,719,389,939,645,223,000
25.444444
81
0.512419
false
3.787265
false
false
false
peter765/pineapple
plugins/base/Help.py
1
3564
from util import Events class Plugin(object): def __init__(self, pm): self.pm = pm self.name = "Help" @staticmethod def register_events(): return [Events.Command("help", desc="Usage: help [module]|all, shows help text for a plugin, or a list of " ...
mit
2,830,629,725,129,842,000
44.692308
126
0.5578
false
3.89083
false
false
false
georgemarselis/homeworkdb
getDisgenetData.py
1
1991
#!/usr/bin/env python3.4 import sys import urllib.request, urllib.error, urllib.parse import pandas import numpy import csv from clint.textui import colored # c1 (diseaseId, name, hpoName, STY, MESH, diseaseClassName, doName, type, OMIM ), query=""" DEFINE c0='/data/gene_disease_summary', c1='/data/diseases', c2...
gpl-3.0
-370,553,118,357,286,200
24.525641
181
0.663988
false
2.510719
false
false
false
NationalSecurityAgency/ghidra
GhidraBuild/IDAPro/Python/7xx/plugins/xml_exporter.py
1
2785
## ### # IP: GHIDRA # # 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
-2,619,736,467,100,112,000
29.271739
76
0.571275
false
4.053857
false
false
false
elin-moco/metrics
metrics/etl/tools/pd_transform.py
1
1526
# -*- coding: utf-8 -*- import pandas as pd import numpy as np import re from urlparse import urlparse fx_path_pattern = re.compile('(/firefox/)([0-9a-z\.]+)/(whatsnew|firstrun|releasenotes)') blog_path_pattern = re.compile('(/posts/[0-9]+)(/.*)') def actual_path(url): #print url path = urlparse(url).path ...
bsd-3-clause
526,834,806,051,038,400
28.346154
115
0.644168
false
3.120654
false
false
false
SystemRage/py-kms
py-kms/pykms_RpcBind.py
1
7955
#!/usr/bin/env python3 import logging import binascii import uuid import pykms_RpcBase from pykms_Dcerpc import MSRPCHeader, MSRPCBindAck from pykms_Structure import Structure from pykms_Format import justify, byterize, enco, deco, pretty_printer #---------------------------------------------------------------------...
unlicense
2,967,289,741,253,012,000
44.457143
153
0.488121
false
4.005539
false
false
false
vadim-ivlev/STUDY
coding/drawtree.py
1
1325
# VISUALIZATION ---------------------- import networkx as nx from networkx.drawing.nx_agraph import write_dot, graphviz_layout import matplotlib.pyplot as plt def draw_graph(G): plt.rcParams["figure.figsize"] = [10., 5.] pos = graphviz_layout(G, prog='dot') node_labels = nx.get_node_attributes(G, 'name'...
mit
235,742,579,492,465,060
23.537037
102
0.613585
false
2.88671
false
false
false
ojarva/home-info-display
display_control_consumer/run.py
1
1488
from setproctitle import setproctitle import json import os import redis import subprocess import time class DisplayControlConsumer(object): def __init__(self, redis_host, redis_port): self.redis_instance = redis.StrictRedis(host=redis_host, port=redis_port) self.env = {"DISPLAY": ":0"} def ...
bsd-3-clause
4,833,940,609,596,993,000
32.818182
127
0.62164
false
3.78626
false
false
false
3dfxsoftware/cbss-addons
account_aged_partner_balance_vw/wizard/wizard_open_move_line.py
1
4342
# -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # # Copyright (c) 2011 Vauxoo - http://www.vauxoo.com/ # All Rights Reserved. # info Vauxoo (info@vauxoo.com) ####################################...
gpl-2.0
8,739,498,346,271,963,000
45.191489
175
0.546292
false
3.756055
false
false
false
firebase/firebase-admin-python
tests/test_http_client.py
1
5782
# Copyright 2017 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 in writing, ...
apache-2.0
-4,307,229,820,997,090,300
35.36478
86
0.663611
false
3.801446
true
false
false
phobson/statsmodels
statsmodels/regression/recursive_ls.py
1
25492
""" Recursive least squares model Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function from warnings import warn from statsmodels.compat.collections import OrderedDict import numpy as np import pandas as pd from statsmodels.regression.linear_model import OL...
bsd-3-clause
-7,399,047,095,831,074,000
35.573888
79
0.574494
false
4.207989
false
false
false
nuxeh/morph
morphlib/buildcommand.py
1
22770
# Copyright (C) 2011-2015 Codethink Limited # # 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 2 of the License. # # This program is distributed in the hope that it will be useful, # but...
gpl-2.0
7,502,372,622,402,206,000
40.101083
79
0.584629
false
4.301096
false
false
false
ufal/neuralmonkey
neuralmonkey/model/feedable.py
1
2178
from abc import ABCMeta from typing import Any, Dict, List # pylint: disable=unused-import from typing import Optional # pylint: enable=unused-import import tensorflow as tf from neuralmonkey.dataset import Dataset # pylint: disable=invalid-name FeedDict = Dict[tf.Tensor, Any] # pylint: enable=invalid-name class F...
bsd-3-clause
-153,059,823,488,650,460
32
79
0.664371
false
4.117202
false
false
false
shaunster0/object_recognition_service
recognition_server/recognition_server.py
1
8875
# -*- coding: utf-8 -*- """ Created on Sat Aug 12 18:08:52 2017 @author: Shaun Werkhoven @purpose: To create a image classification system for the Image Intelligence TakeHome Assignment Licensed under the Apache License, Version 2.0 (the "License"); Simple image classification with flask-based HTTP API, TensorFlow ...
apache-2.0
-1,915,504,158,426,327,300
28.986486
179
0.61262
false
3.517638
true
false
false
Copper-Head/RoboSanta
clingo_stats.py
1
13466
#!/usr/bin/python import os import sys import clingo import json # # STATS # class Stats: def __init__(self): self.__width = 13 def __ratio(self,x,y): return float(x)/float(y) if float(y)!=0 else 0 def __percent(self,x,y): return 100*self.__ratio(x,y) def __print_key...
mit
4,832,443,471,218,957,000
40.180428
174
0.527551
false
3.254229
true
false
false
FluidityProject/fluidity
tests/mms_tracer_P1dg_cdg_diff_steady_3d_cjc/cdg3d.py
1
1175
import os from fluidity_tools import stat_parser from sympy import * from numpy import array,max,abs meshtemplate=''' Point(1) = {0.0,0.0,0,0.1}; Extrude {1,0,0} { Point{1}; Layers{<layers>}; } Extrude {0,1,0} { Line{1}; Layers{<layers>}; } Extrude {0,0,1} { Surface{5}; Layers{<layers>}; } Physical Surface(28) =...
lgpl-2.1
7,518,357,913,638,427,000
26.325581
77
0.669787
false
3.005115
false
false
false
tamland/trakt-sync
xbmc_library.py
1
4438
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Thomas Amland # # 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 ...
gpl-3.0
6,390,157,565,330,041,000
31.874074
95
0.605228
false
3.934397
false
false
false
dgouldin/invisible-ink
invisible_ink.py
1
2998
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import uuid _INVISIBLE_CHARS = ( '\u200b', '\u200c', '\u200d', '\ufeff', ) _INVISIBLE_MAP = dict(zip( '0123456789abcdef', (''.join((i, j)) for i in _INVISIBLE_CHARS for j in _INVISIBLE_CHARS), )) _INVISIBLE_REVERSE_MAP = ...
mit
6,584,132,110,583,274,000
27.552381
79
0.657772
false
3.552133
false
false
false
samdowd/drumm-farm
drumm_env/lib/python2.7/site-packages/storages/backends/s3boto.py
1
20374
import os import posixpath import mimetypes from datetime import datetime from gzip import GzipFile from tempfile import SpooledTemporaryFile from django.core.files.base import File from django.core.files.storage import Storage from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation from django.ut...
mit
4,176,623,037,583,207,400
38.030651
137
0.605232
false
4.096923
false
false
false
Smetterleen/Neopets-Python-API
neopapi/explore/world/island/TrainingSchool.py
1
6309
from neopapi.explore.world.island.Exceptions import UnknownStatException,\ PetNotFoundException, PetNotOnCourseException, PetAlreadyOnCourseException,\ StatTooHighException from neopapi.core.browse import register_page from neopapi.core.browse.Browser import BROWSER import re from datetime import timedelta """...
gpl-3.0
-1,034,167,616,519,363,800
37.242424
152
0.656839
false
3.343402
false
false
false
vigilo/vigiconf
src/vigilo/vigiconf/lib/server/base.py
1
11398
# -*- coding: utf-8 -*- # Copyright (C) 2007-2020 CS GROUP - France # License: GNU GPL v2 <http://www.gnu.org/licenses/gpl-2.0.html> """ Ce module contient la classe de base pour un serveur Vigilo: L{Server}. """ from __future__ import absolute_import import os import shutil import glob import re from vigilo.common....
gpl-2.0
4,204,519,866,043,522,000
33.550152
79
0.539456
false
4.062545
true
false
false
h4ck3rm1k3/hacker-public-radio-publisher
setup.py
1
1139
""" setup """ from setuptools import setup, find_packages setup( name = "HackerPublicRadioPublisher", version = "0.1", description = "Python Uploader for Hacker Public Radio", long_description=u''' A set of scripts to manage the creation and uploading of shows into HPR ''', platforms = "Deb...
gpl-3.0
755,017,810,238,400,400
24.311111
75
0.545215
false
3.282421
false
false
false
Azure/azure-sdk-for-python
sdk/core/azure-core/azure/core/_match_conditions.py
1
1506
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""), ...
mit
8,286,881,614,508,012,000
42.028571
78
0.679283
false
4.811502
false
false
false
punitvanjani/test1
api/interface.py
1
7869
from errors import invalid_operation, no_records, no_communication from models import Properties from debugger import debug_msg import serial table = ( 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, 0xCC01, 0x0CC0, 0x0D80, 0xCD41,...
mit
-4,152,577,362,719,511,000
44.294118
580
0.634007
false
2.593606
false
false
false
qwergram/data-structures
src/dll.py
1
3676
# -*- coding: utf-8 -*- """Doubl linked List implementation.""" class Node(object): """Creates a node object.""" def __init__(self, value, next, prev): """Initalize Node Object.""" self.value = value self.next = next self.prev = prev class DoublyLinkedList(object): """De...
mit
8,665,013,767,160,872,000
32.724771
87
0.533188
false
4.334906
false
false
false
sam-m888/gprime
gprime/plugins/rel/rel_pl.py
1
32078
# -*- coding: utf-8 -*- # # gPrime - A web-based genealogy program # # Copyright (C) 2003-2005 Donald N. Allingham # Copyright (C) 2008 Brian G. Matherly # # 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 Soft...
gpl-2.0
8,653,816,077,234,441,000
33.513543
92
0.522382
false
3.048421
false
false
false
chrishokamp/maxent-decoder
phrase_table/Phrase_Table.py
1
1704
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from collections import deque,defaultdict class Phrase_Table: # TODO: unit names should actually be objects with sub-fields def __init__(self, lines, unit_names): self.phrase_table = self.build_phrase_table(lines, unit_names) # store the ...
mit
-8,461,846,650,403,378,000
30.555556
100
0.581573
false
4.125908
false
false
false
GoberInfinity/ExampleDjango
modeladmin/migrations/0001_initial.py
1
1439
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-13 08:31 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('crudclassviews', '0001_initial'), ]...
mit
6,050,514,650,440,598,000
32.465116
123
0.539958
false
4.257396
false
false
false
openstack/ceilometer
ceilometer/compute/pollsters/disk.py
1
3344
# # Copyright 2012 eNovance <licensing@enovance.com> # Copyright 2012 Red Hat, Inc # Copyright 2014 Cisco Systems, 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.apac...
apache-2.0
8,738,284,241,909,994,000
30.252336
75
0.733553
false
3.422723
false
false
false
itucsdb1628/itucsdb1628
suggestion.py
1
3003
import psycopg2 as dbapi2 from flask import request from flask_login import current_user, login_required, login_user, logout_user from datetime import date from dsn_conf import get_dsn dsn = get_dsn() def select_suggestions(): with dbapi2.connect(dsn) as connection: try: cursor = connection.c...
gpl-3.0
2,680,382,297,286,805,500
36.08642
102
0.589078
false
4.296137
false
false
false
rechner/Taxidi
signature.py
1
14273
#!/usr/bin/env python #*-* coding:utf-8 *-* # signature.py © 2012 Zac Sturgeon and Nathan Lex # 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 opti...
gpl-3.0
134,584,395,785,613,250
35.974093
80
0.568316
false
3.552016
false
false
false
rdkit/rdkit-orig
Contrib/mmpa/cansmirk.py
2
3001
# Copyright (c) 2012, GlaxoSmithKline Research & Development Ltd. # 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 # ...
bsd-3-clause
-579,565,610,952,190,800
34.305882
107
0.656115
false
3.737235
false
false
false
nmdp-bioinformatics/service-gfe-submission
client-python/setup.py
1
2627
# coding: utf-8 """ Gene Feature Enumeration Service The Gene Feature Enumeration (GFE) Submission service provides an API for converting raw sequence data to GFE. It provides both a RESTful API and a simple user interface for converting raw sequence data to GFE results. Sequences can be submitted one at a ti...
gpl-3.0
1,899,160,545,371,149,600
63.073171
947
0.744956
false
3.191981
false
false
false
superfluidity/RDCL3D
code/lib/nemo/nemo_parser.py
1
1987
import json import pyaml import yaml from lib.util import Util from lib.parser import Parser import logging import traceback import glob import os logging.basicConfig(level=logging.DEBUG) log = logging.getLogger('NemoParser') class NemoParser(Parser): """Parser methods for nemo project type """ def __in...
apache-2.0
8,360,074,849,449,196,000
26.985915
109
0.573729
false
4.148225
false
false
false
rizaon/limbo
limbo/plugins/stock.py
1
1262
"""$<ticker symbol> for a quote on a stock price""" from __future__ import print_function import logging import re try: from urllib import quote except ImportError: from urllib.request import quote from bs4 import BeautifulSoup import requests logger = logging.getLogger(__name__) def stockprice(ticker): ...
mit
8,730,622,750,421,006,000
30.55
102
0.637876
false
3.252577
false
false
false
datastreaming/mflow_nodes
mflow_nodes/test_tools/m_generate_test_stream.py
1
2509
from argparse import ArgumentParser import numpy as np from types import SimpleNamespace from mflow_nodes.stream_tools.mflow_forwarder import MFlowForwarder def generate_frame_data(frame_shape, frame_number): """ Generate a frame that is filled with the frame number value. :param frame_shape: Shape of t...
gpl-3.0
47,031,052,100,983,640
39.467742
115
0.656038
false
3.744776
false
false
false
SublimeGit/SublimeGit
sgit/checkout.py
1
9251
# coding: utf-8 from functools import partial import sublime from sublime_plugin import WindowCommand, TextCommand from .util import noop from .cmd import GitCmd from .helpers import GitStatusHelper, GitBranchHelper, GitErrorHelper, GitLogHelper, GitRemoteHelper from .helpers import GitTagHelper GIT_BRANCH_EXISTS_M...
mit
7,732,864,790,283,200,000
34.856589
136
0.611177
false
3.958494
false
false
false
textclf/data-handler
nlpdatahandlers/base_handler.py
1
6414
import numpy as np import util.misc class DataHandlerException(Exception): pass class BaseDataHandler(object): DATA_ALL = 1 DATA_TRAIN = 2 DATA_VALIDATION = 4 DATA_TEST = 3 def __init__(self, source): self.source = source def get_data(self, type=DATA_ALL): """ Pr...
mit
4,222,095,093,282,551,300
42.04698
141
0.631743
false
3.896719
false
false
false
arunkgupta/gramps
gramps/gen/filters/rules/person/_isdescendantfamilyof.py
1
3903
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # 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 you...
gpl-2.0
-1,071,615,286,370,999,000
34.481818
87
0.540354
false
4.522596
false
false
false
tommyogden/maxwellbloch
maxwellbloch/tests/test_ob_solve.py
1
8224
# -*- coding: utf-8 -*- """ Unit tests for the OBSolve class. Thomas Ogden <t@ogden.eu> """ import os import unittest import numpy as np from maxwellbloch import ob_solve, t_funcs # Absolute path of tests/json directory, so that tests can be called from # different directories. JSON_DIR = os.path.abspath(os.path...
mit
-7,425,014,225,698,490,000
32.567347
79
0.542437
false
2.892719
true
false
false
chenchiyuan/hawaii
hawaii/apps/weixin/models/apps.py
1
2860
# -*- coding: utf-8 -*- # __author__ = chenchiyuan from __future__ import division, unicode_literals, print_function from django.db import models from libs.models.models import SingletonModel from django.conf import settings from libs.uuids import get_uuid import requests import json class App(SingletonModel): ...
bsd-3-clause
1,870,618,801,998,368,800
35.636364
114
0.639362
false
3.389423
false
false
false
leleobhz/phonetica
high_experimental/mvuorine/four1.py
1
1236
#!/usr/bin/python # -*- coding: utf-8 -*- from math import sin # Replaces data[1..2*nn] by its discrete Fourier transform, if isign */ # is input as 1; or replaces data[1..2*nn] by nn times its inverse */ # discrete Fourier transform, if isign is input as -1. data is a */ # complex array of length nn or, equ...
gpl-2.0
-3,151,591,414,976,966,000
22.72
72
0.562298
false
2.251366
false
false
false
concordusapps/django-identity
src/identity/saml/views/provider.py
1
5398
# -*- coding: utf-8 -*- """ \file identity/saml/views/provider.py \brief Implements the SAML endpoints for providers. \author Erich Healy (cactuscommander) ErichRHealy@gmail.com \author Ryan Leckey (mehcode) leckey.ryan@gmail.com \copyright Copyright 2012 © Concordus Applications, Inc. All Rights Reserved....
mit
-1,617,509,357,031,689,700
34.045455
78
0.592181
false
4.558277
false
false
false
CrandellWS/gimp-plugin-helloworld
plug-ins/helloBatchWorldMessages.py
1
2139
#!/usr/bin/env python # # Use with scripts/helloBatchWorldMessages.scm to enable batch mode import gtk from gimpfu import * def helloBatchWorldMessagesFn(messageType) : #dictionary mapping case values to functions see -> https://docs.python.org/faq/design.html#why-isn-t-there-a-switch-or-case-statement-in-python...
mit
8,569,564,768,776,103,000
26.779221
153
0.697055
false
3.4224
false
false
false
toenuff/treadmill
tests/scheduler_perf.py
1
3987
"""Performance test for treadmill.scheduler """ import timeit # Disable W0611: Unused import import tests.treadmill_test_deps # pylint: disable=W0611 # XXX(boysson): Test needs update to new Scheduler API # XXX: from treadmill import scheduler def schedule(sched): """Helper function to run the scheduler.""" ...
apache-2.0
-2,284,858,617,805,041,000
38.475248
79
0.520441
false
3.457936
true
false
false
renalreg/radar
radar/api/views/ins.py
1
1973
from radar.api.serializers.ins import InsClinicalPictureSerializer, InsRelapseSerializer from radar.api.views.common import ( PatientObjectDetailView, PatientObjectListView, StringLookupListView, ) from radar.models.ins import DIPSTICK_TYPES, InsClinicalPicture, InsRelapse, KIDNEY_TYPES, REMISSION_TYPES c...
agpl-3.0
2,375,016,336,109,830,700
34.872727
108
0.767866
false
3.37265
false
false
false
google/graphicsfuzz
gfauto/gfauto/gflogging.py
1
1632
# -*- coding: utf-8 -*- # Copyright 2019 The GraphicsFuzz Project 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
5,014,625,191,469,446,000
27.631579
77
0.672794
false
3.464968
false
false
false
TheMOOCAgency/edx-platform
lms/djangoapps/atp_task/api_helper.py
1
12618
import json import logging import hashlib from django.utils.translation import ugettext as _ from util.db import outer_atomic from celery.result import AsyncResult from celery.states import READY_STATES, SUCCESS, FAILURE, REVOKED from courseware.module_render import get_xqueue_callback_url_prefix from atp_t...
agpl-3.0
-2,607,304,293,360,572,400
44.560886
116
0.669837
false
4.114118
false
false
false
breandan/java-algebra-system
examples/polypower.py
1
1095
# # jython examples for jas. # $Id$ # from java.lang import System from java.lang import Integer from jas import PolyRing, ZZ, QQ, GF, ZM # sparse polynomial powers #r = Ring( "Mod 1152921504606846883 (x,y,z) G" ); #r = Ring( "Rat(x,y,z) G" ); #r = Ring( "C(x,y,z) G" ); #r = Ring( "Z(x,y,z) L" ); r = PolyRing( ZZ()...
gpl-2.0
5,131,868,069,438,154,000
15.102941
64
0.588128
false
2.257732
false
false
false
zhinaonet/sqlmap-z
lib/parse/cmdline.py
1
45290
#!/usr/bin/env python """ Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import os import re import shlex import sys from optparse import OptionError from optparse import OptionGroup from optparse import OptionParser from optparse import SUPPRESS_...
gpl-3.0
8,767,127,037,642,698,000
44.609265
146
0.520203
false
4.882492
true
false
false
Amoki/Amoki-Music
endpoints/tests/test_musics.py
1
1477
from utils.testcase import EndpointTestCase from rest_framework import status from music.models import Music from player.models import Room import sure class TestMusics(EndpointTestCase): def test_get(self): # Create a classic music that should be sent by /musics Music( music_id="a",...
mit
-8,897,600,273,422,250,000
29.142857
113
0.572106
false
3.836364
false
false
false
Tasignotas/topographica_mirror
topo/base/cf.py
1
47216
""" ConnectionField and associated classes. This module defines some basic classes of objects used to create simulations of cortical sheets that take input through connection fields that project from other cortical sheets (or laterally from themselves). ConnectionField: Holds a single connection field within a CFProj...
bsd-3-clause
-7,709,981,377,851,790,000
39.950564
228
0.631862
false
4.057403
false
false
false
compas-dev/compas
src/compas_plotters/core/helpers.py
1
5374
from numpy import asarray from numpy import argmax from numpy import argmin from numpy import zeros from mpl_toolkits.mplot3d.art3d import Poly3DCollection from compas_plotters.core.utilities import assert_axes_dimension __all__ = [ 'Axes2D', 'Axes3D', 'Bounds', 'Box', 'Cloud2D', 'Cloud3D', 'Hull', ] class Ax...
mit
-5,616,462,484,940,110,000
25.736318
115
0.499628
false
3.216038
false
false
false
kgblll/libresoft-gymkhana
GIC/Channels/Items/PlaceItem.py
2
1046
#!/usr/bin/env python # Copyright (C) 2009 GSyC/LibreSoft # # 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. # # This pr...
gpl-2.0
-9,093,844,593,012,902,000
27.27027
76
0.73805
false
3.696113
false
false
false
TzuChieh/Photon-v2
scripts/SDL_Interface/PythonGenerator/PythonGenerator.py
1
5358
from InterfaceGenerator import InterfaceGenerator from SDLInterface import SDLInterface from .PythonClass import PythonClass from .PythonMethod import PythonMethod from . import pysdl_base import copy import inspect from string import capwords import datetime class PythonGenerator(InterfaceGenerator): def __init__...
mit
762,593,232,892,099,800
27.5
90
0.678425
false
3.251214
false
false
false
yacoob/blitzloop
blitzloop/idlescreen.py
1
5014
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2012-2013 Hector Martin "marcan" <hector@marcansoft.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 or vers...
gpl-2.0
-4,848,876,136,024,190,000
32.651007
102
0.602712
false
3.048024
false
false
false
arpho/mmasgis5
mmasgis/Filter.py
1
2830
from filterDb import * #from queriesDb import * class Filter(): """ permette di definire una serie di condizioni che il pv deve soddisfare, il metodo test applicato sul singolo pv verifica che questo le rispetti, in particolare la logica dei filtri prevede che piu' parametri della stessa classe siano in OR ...
mit
-3,728,216,966,661,245,000
32.938272
125
0.694346
false
2.83
false
false
false
ngageoint/scale
scale/job/test/messages/test_unpublish_jobs.py
1
2904
from __future__ import unicode_literals import datetime import django from django.utils.timezone import now from django.test import TestCase from job.messages.unpublish_jobs import UnpublishJobs from job.models import Job from job.test import utils as job_test_utils from product.models import ProductFile from produc...
apache-2.0
-1,915,926,533,011,269,000
36.230769
91
0.661157
false
3.616438
true
false
false
bjodah/symodesys
examples/_UNFINISHED_stability.py
1
1857
#!/usr/bin/env python # -*- coding: utf-8 -*- # External imports import numpy as np from sympy import sin from sympy import exp as e # Package imports from symodesys import SimpleFirstOrderODESystem from symodesys.convenience import numeric_vs_analytic """ Product of early morning flight, not a single one is workin...
bsd-2-clause
7,513,807,921,356,201,000
25.15493
88
0.6042
false
2.843798
false
false
false
linkinwong/adaboost-short-text
text-stress/src/tools/arff_generator.py
1
2521
__author__ = 'linlin' import os import logging import pdb logger = logging.getLogger('main_module') def GetWordsDic(file_path): file = open(file_path, 'r') for line in file: if ";;;;" in line: break dict = {} for line in file: if len(line) != 0: dict[line.stri...
gpl-2.0
-2,856,753,327,025,647,000
28.658824
138
0.596589
false
3.257106
false
false
false
MGHComputationalPathology/highdicom
src/highdicom/coding_schemes.py
1
3782
from typing import Optional, Sequence from pydicom.dataset import Dataset class CodingSchemeResourceItem(Dataset): """Class for items of the Coding Scheme Resource Sequence.""" def __init__(self, url: str, url_type: str) -> None: """ Parameters ---------- url: str ...
mit
-5,905,343,422,687,216,000
37.20202
81
0.582232
false
4.873711
false
false
false
sthalik/git-cola
cola/fsmonitor.py
1
19637
# Copyright (c) 2008 David Aguilar # Copyright (c) 2015 Daniel Harding """Provides an filesystem monitoring for Linux (via inotify) and for Windows (via pywin32 and the ReadDirectoryChanges function)""" from __future__ import division, absolute_import, unicode_literals import errno import os import os.path import sele...
gpl-2.0
2,013,281,631,736,924,400
36.836224
79
0.470795
false
4.600984
false
false
false
gqueiroz/scigws
src/server/apps/wcs/base.py
1
1330
from xml.etree import ElementTree from exception import WCSException from json import loads from psycopg2 import connect import abc class WCSBase(object): __metaclass__ = abc.ABCMeta geo_arrays = None def __init__(self, db_path="config/db.config.json", meta="config/geo_arrays.json"): super(WCSBa...
gpl-3.0
2,134,826,318,577,003,800
29.25
87
0.575188
false
3.663912
false
false
false
michaelaye/planet4
planet4/science/activity.py
1
3436
import os from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pandas as pd from numpy import arccos, cos, sin, pi # from little_helpers.p4_tools import get_final_markings_counts from planet4 import io, markings, region_data meta_data_fn = Path.home() / 'Dropbox/SternchenAndMe/python_st...
isc
-8,606,421,379,204,186,000
33.019802
99
0.627474
false
2.899578
false
false
false
jleivaizq/dotfiles
vim/vim.symlink/bundle/vimoutliner/vimoutliner/scripts/otlreorder.py
2
8303
#!/usr/bin/python # otlreorder.py # Grep and reorder an outline for a regex and return the branch # with all the leaves. # # Copyright 2006 Noel Henson All rights reserved # # $Revision: 1.7 $ # $Date: 2008/09/17 21:34:25 $ # $Author: noel $ # $Source: /home/noel/active/otlreorder/RCS/otlreorder.py,v $ # $L...
mit
-434,278,877,089,062,400
26.145763
88
0.613393
false
3.330525
false
false
false
raphaeldore/analyzr
analyzr/utils/useful.py
1
2195
import sys from io import TextIOWrapper def pprint_table(table: list, header_labels: list, blank_line_after_header: bool = True, out: TextIOWrapper = sys.stdout): """Prints out a table of data, padded for alignment @param table: The table to print. A list of ...
mit
4,396,319,637,541,835,300
33.84127
107
0.637358
false
3.610197
false
false
false
silly-wacky-3-town-toon/SOURCE-COD
toontown/ai/DistributedGreenToonEffectMgr.py
1
1177
from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedObject from direct.interval.IntervalGlobal import * from otp.speedchat import SpeedChatGlobals from toontown.toonbase import TTLocalizer class DistributedGreenToonEffectMgr(DistributedObject.DistributedObject): notify = Di...
apache-2.0
-3,224,361,193,588,967,400
36.967742
89
0.743415
false
4.28
false
false
false
beobal/cassandra-dtest
bootstrap_test.py
1
28305
import os import random import re import shutil import tempfile import threading import time import logging import signal from cassandra import ConsistencyLevel from cassandra.concurrent import execute_concurrent_with_args from ccmlib.node import NodeError import pytest from dtest import Tester, create_ks, create_cf...
apache-2.0
-5,510,982,167,964,210,000
39.148936
184
0.622999
false
3.840049
true
false
false
skosukhin/spack
var/spack/repos/builtin/packages/numactl/package.py
1
1681
############################################################################## # Copyright (c) 2013-2017, 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
8,610,615,474,908,283,000
42.102564
78
0.663891
false
3.864368
false
false
false
JamesMcMahon/mockjson.py
mockjson.py
1
5486
#!/usr/bin/env python """mockjson.py: Library for mocking JSON objects from a template.""" __author__ = "James McMahon" __copyright__ = "Copyright 2012, James McMahon" __license__ = "MIT" try: import simplejson as json except ImportError: import json import random import re import string import sys from dat...
mit
-6,069,231,226,135,371,000
35.573333
77
0.62942
false
3.36152
false
false
false
rgtjf/Semantic-Texual-Similarity-Toolkits
stst/data/data_utils.py
1
3705
# coding: utf8 from __future__ import print_function import codecs import json import os import pyprind from stst import utils from stst.data.sent_pair import SentPair def load_data(train_file): """ Return list of dataset given train_file and gs_file Value: [(sa:str, sb:str, score:float)] """ w...
mit
263,318,713,653,373,730
29.628099
110
0.552497
false
3.528571
false
false
false
akarol/cfme_tests
cfme/tests/cli/test_appliance_console.py
1
17241
import pytest from collections import namedtuple from wait_for import wait_for from cfme.utils import os from cfme.utils.log_validator import LogValidator from cfme.utils.log import logger from cfme.utils.conf import hidden import tempfile import lxml.etree import yaml TimedCommand = namedtuple('TimedCommand', ['comma...
gpl-2.0
-147,145,179,698,815,040
48.973913
100
0.640682
false
3.488669
true
false
false
ThiefMaster/indico-plugins
vc_vidyo/indico_vc_vidyo/plugin.py
1
14601
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2021 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from flask import session from sqlalchemy.orm.attributes import flag_modified...
mit
573,350,418,020,589,600
43.245455
118
0.607561
false
3.998083
false
false
false
nyrocron/eve-skills
skillcheck.py
1
3274
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """skillcheck.py: """ from sys import argv import csv import eveapi_simple as api from evestatic import StaticDB sdb ...
mpl-2.0
-5,300,169,020,836,653,000
33.114583
79
0.577886
false
3.570338
false
false
false
Guts/isogeo-api-py-minsdk
isogeo_pysdk/api/routes_coordinate_systems.py
1
13730
# -*- coding: UTF-8 -*- #! python3 """ Isogeo API v1 - API Routes to retrieve CoordinateSystems See: http://help.isogeo.com/api/complete/index.html """ # ############################################################################# # ########## Libraries ############# # ################################## # ...
gpl-3.0
-391,128,447,559,713,800
34.11509
127
0.572469
false
4.417632
false
false
false
redhat-cip/dci-control-server
dci/api/v1/tests.py
1
5672
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 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 applicab...
apache-2.0
7,328,636,679,937,318,000
30.337017
75
0.661671
false
3.274827
true
false
false
ruibarreira/linuxtrail
usr/lib/python2.7/dist-packages/numpy/core/tests/test_multiarray.py
1
145252
from __future__ import division, absolute_import, print_function import tempfile import sys import os import shutil import warnings import io from decimal import Decimal import numpy as np from nose import SkipTest from numpy.core import * from numpy.compat import asbytes, getexception, strchar, sixu from test_print ...
gpl-3.0
7,132,038,094,073,860,000
37.143908
587
0.502706
false
3.157034
true
false
false
eleonrk/SickRage
sickbeard/traktChecker.py
1
33797
# coding=utf-8 # Author: Frank Fenton # URL: https://sickchill.github.io # # This file is part of SickChill. # # SickChill 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
1,176,025,136,970,934,000
46.668547
300
0.549516
false
4.219351
false
false
false
facoy/facoy
Searcher/_JaccardSearcher.py
1
2617
# from java.io import File, StringReader # from org.apache.lucene.index import IndexReader, Term # from org.apache.lucene.search import IndexSearcher, FuzzyQuery # from org.apache.lucene.store import SimpleFSDirectory # from org.apache.lucene.analysis.core import KeywordAnalyzer # from org.apache.lucene.util import Ver...
apache-2.0
-2,467,094,502,645,306,400
44.912281
515
0.757356
false
3.325286
false
false
false
guyisit/photobooth
photo_booth_ver1.py
1
6531
#By: Guy Fisher, @guyisit #More at https://github.com/guyisit/photobooth ; https://hackaday.io/project/6625-raspberry-pi-photobooth # #Inspired/ helped by: #http://www.instructables.com/id/Raspberry-Pi-photo-booth-controller/?ALLSTEPS #http://code.activestate.com/recipes/362879-watermark-with-pil/ #https://github.com/j...
gpl-2.0
5,499,134,025,995,295,000
31.655
105
0.62456
false
2.997246
false
false
false
haard/quarterapp
quarterapp/settings.py
1
3629
# # Copyright (c) 2013 Markus Eliasson, http://www.quarterapp.com/ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use...
mit
4,340,422,769,168,632,300
38.032258
112
0.669606
false
4.398788
false
false
false
skylifewww/pangolin_new
content/templatetags/content_tags.py
1
4762
from django import template # from django.contrib.admin.util import lookup_field # from django.core.exceptions import ObjectDoesNotExist # from django.core.urlresolvers import NoReverseMatch, reverse # from django.db.models import ForeignKey # from django.template.defaulttags import NowNode # from django.utils.safestri...
mit
1,238,953,157,483,524,400
25.455556
102
0.660227
false
3.33007
false
false
false
joerideturck/gcloud-python-bigtable
scripts/rewrite_imports.py
1
6220
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
6,704,615,396,340,033,000
35.804734
79
0.655949
false
4.005151
false
false
false
AechPro/Machine-Learning
Partners Healthcare/2016 Breast Cancer/dev/ReconNet/util/Working_Batch_Normalization.py
1
3833
from keras.engine import Layer, InputSpec from keras import initializers, regularizers from keras import backend as K class FixedBatchNormalization(Layer): def __init__(self, epsilon=1e-3, axis=-1, weights=None, beta_init='zero', gamma_init='one', gamma_regularizer=None...
apache-2.0
-2,535,344,098,606,507,000
44.180723
111
0.547091
false
4.436343
true
false
false
BaichuanWu/Blog_on_django
blog/views/article.py
1
4770
#!usr/bin/env python # -*-coding:utf-8-*- """ author:wubaichuan """ import json from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect, HttpResponse from blog.forms import ArticleForm from blog.models import Article, ArticleType, User, Reply from blog.tools.json_type im...
mit
5,132,814,077,789,584,000
34.984848
112
0.578526
false
3.852393
false
false
false
JulianSchuette/android-instrumentation
injector/injector/logger.py
1
1218
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2012, The Honeynet Project. All rights reserved. # Author: Kun Yang <kelwya@gmail.com> # # APKIL is free software: you can redistribute it and/or modify it under # the terms of version 3 of the GNU Lesser General Public License as # published by the Free Soft...
apache-2.0
-9,155,691,572,675,177,000
29.45
81
0.690476
false
3.510086
false
false
false
DaveBackus/Data_Bootcamp
Code/Python/bootcamp_mini_basics.py
1
3994
""" For Class #1 of an informal mini-course at NYU Stern, Fall 2014. Topics: calculations, assignments, strings, slicing, lists, data frames, reading csv and xls files Repository of materials (including this file): * https://github.com/DaveBackus/Data_Bootcamp Written by Dave Backus, Sarah Beckett-Hile, and Glenn O...
mit
3,868,143,909,878,868,500
19.587629
93
0.649975
false
2.758287
false
false
false
Christian-B/galaxy_shedtools
multi_merger/merge_files.py
1
13066
import collections import optparse # using optparse as hyrda still python 2.6 import re import sys def report_error(error): """Prints the error, and exits -1""" print error sys.stderr.write(error) sys.stderr.write("\n") sys.stderr.flush() sys.exit(1) def clean_part(part, tab_replace=" "): ...
gpl-2.0
-6,640,525,352,530,222,000
40.878205
147
0.591612
false
3.985967
false
false
false
gagoncal/Selenium
2016/backup/Equal_Experts/pages/LoggedInProductPage.py
1
1708
from BasePage import BasePage from Equal_Experts.Constants import EE_Constants from BasePage import IncorrectPageException from Equal_Experts.UIMap import LoggedInPoductPageMap from NewSnippetPage import NewSnippetPage from UploadPage import UploadPage class Logg...
lgpl-2.1
-8,497,478,021,366,939,000
35.340426
80
0.596604
false
4.125604
false
false
false
smartsheet-platform/smartsheet-python-sdk
smartsheet/models/date_object_value.py
1
1644
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101 # Smartsheet Python SDK. # # Copyright 2018Smartsheet.com, 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.a...
apache-2.0
1,558,399,692,050,538,500
29.444444
75
0.669708
false
4.059259
false
false
false
coberger/DIRAC
Core/Base/DB.py
1
2013
""" DB is a base class for multiple DIRAC databases that are based on MySQL. It uniforms the way the database objects are constructed """ __RCSID__ = "$Id$" from DIRAC import gLogger, gConfig from DIRAC.Core.Utilities.MySQL import MySQL from DIRAC.Configurati...
gpl-3.0
4,559,042,075,579,786,000
39.26
81
0.574267
false
3.978261
false
false
false