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
ameihm0912/MozDef
alerts/auditd_sftp.py
1
1886
#!/usr/bin/env python # 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/. # Copyright (c) 2014 Mozilla Corporation # # Contributors: # Anthony Verez averez@mozilla.com # Je...
mpl-2.0
-5,164,862,941,264,948,000
32.678571
105
0.620361
false
3.727273
false
false
false
krujos/oohimtelling
app.py
1
5031
#!/usr/bin/env python from __future__ import print_function import json import requests import sys import os import time from flask import Flask, request, Response from flask import jsonify from functools import wraps Flask.get = lambda self, path: self.route(path, methods=['get']) ##################################...
apache-2.0
-5,806,166,095,092,227,000
30.44375
90
0.575234
false
3.757282
false
false
false
ttreeagency/PootleTypo3Org
pootle/apps/pootle_store/views.py
1
42408
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010-2013 Zuza Software Foundation # # This file is part of Pootle. # # 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...
gpl-2.0
-624,292,103,243,381,500
35.844483
81
0.601113
false
4.211739
false
false
false
popravich/cantal_tools
cantal_tools/_fork.py
1
3229
import time import cantal from cantal import fork from contextlib import contextmanager class Branch(fork.Branch): __slots__ = fork.Branch.__slots__ + ('_errors',) def __init__(self, suffix, state, parent, **kwargs): super(Branch, self).__init__(suffix, state, parent, **kwargs) self._errors ...
mit
1,769,075,623,500,826,000
30.349515
79
0.554351
false
4.134443
false
false
false
jackrzhang/zulip
zerver/management/commands/query_ldap.py
4
1271
from argparse import ArgumentParser from typing import Any from django.conf import settings from django.contrib.auth import get_backends from django.core.management.base import BaseCommand from django_auth_ldap.backend import LDAPBackend, _LDAPUser # Quick tool to test whether you're correctly authenticating to LDAP...
apache-2.0
-2,874,588,886,342,787,600
41.366667
89
0.638867
false
4.113269
false
false
false
gpotter2/scapy
scapy/autorun.py
1
6498
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ Run commands when the Scapy interpreter starts. """ from __future__ import print_function import code import sys import i...
gpl-2.0
7,569,240,486,834,548,000
29.650943
121
0.576793
false
3.64442
false
false
false
Warboss-rus/wargameengine
WargameEngine/freetype2/src/tools/glnames.py
2
112194
#!/usr/bin/env python # # # FreeType 2 glyph name builder # # Copyright 1996-2017 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, # and distributed under the terms of the FreeType project license, # LICENSE.TXT. By co...
gpl-3.0
-6,469,612,608,725,052,000
18.251625
92
0.750156
false
2.271272
false
false
false
bbfamily/abu
abupy/WidgetBu/ABuWGBase.py
1
8919
# -*- encoding:utf-8 -*- """股票基本信息图形可视化""" from __future__ import print_function from __future__ import absolute_import from __future__ import division import logging import ipywidgets as widgets from abc import ABCMeta, abstractmethod from IPython.display import display from ..CoreBu.ABuFixes import six, partial ...
gpl-3.0
5,627,444,927,889,660,000
33.44
108
0.61324
false
2.701883
false
false
false
michellab/Sire
wrapper/Tools/DCDFile.py
1
10606
import struct, time, array, os from math import pi from Sire.Maths import Vector from Sire.Mol import * from Sire.IO import * # # Adapted from Peter Eastman's code in OpenMM python API to write a DCD file # class DCDFile(object): """DCDFile provides methods for creating DCD files. DCD is a file format for...
gpl-2.0
6,188,089,025,012,289,000
37.427536
136
0.528569
false
3.812365
false
false
false
amit0701/rally
tests/unit/common/objects/test_task.py
1
12985
# Copyright 2013: Mirantis 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 b...
apache-2.0
-7,038,468,983,800,166,000
39.451713
78
0.595302
false
3.681599
true
false
false
lc525/cmake-project
docs/ext/breathe-1.0.0/breathe/renderer/rst/doxygen/compound.py
1
26721
from breathe.renderer.rst.doxygen.base import Renderer class DoxygenTypeSubRenderer(Renderer): def render(self): compound_renderer = self.renderer_factory.create_renderer(self.data_object, self.data_object.compounddef) nodelist = compound_renderer.render() return [self.node_factory.bloc...
bsd-2-clause
-5,708,813,989,462,306,000
31.116587
117
0.587066
false
4.394179
false
false
false
fastcoinproject/fastcoin
contrib/bitrpc/bitrpc.py
1
9669
from jsonrpc import ServiceProxy import sys import string import getpass # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") e...
mit
-1,961,335,208,077,969,200
27.522124
101
0.568104
false
3.954601
false
false
false
insomnia-lab/calibre
src/calibre/ebooks/docx/char_styles.py
1
8194
#!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' from collections import OrderedDict from calibre.ebooks.docx.block_styles imp...
gpl-3.0
1,767,311,756,068,505,300
32.720165
140
0.520625
false
3.633703
false
false
false
nCoda/macOS
.eggs/py2app-0.14-py2.7.egg/py2app/recipes/PIL/prescript.py
1
1297
def _recipes_pil_prescript(plugins): try: import Image have_PIL = False except ImportError: from PIL import Image have_PIL = True import sys def init(): if Image._initialized >= 2: return if have_PIL: try: import ...
gpl-3.0
5,566,119,026,648,664,000
27.822222
72
0.43485
false
5.404167
false
false
false
Caoimhinmg/PmagPy
programs/lowrie.py
1
4077
#!/usr/bin/env python from __future__ import division from __future__ import print_function from builtins import input from builtins import range from past.utils import old_div import sys import matplotlib if matplotlib.get_backend() != "TKAgg": matplotlib.use("TKAgg") import pmagpy.pmag as pmag import pmagpy.pmagpl...
bsd-3-clause
519,150,418,447,072,960
35.72973
127
0.575914
false
3.238284
false
false
false
lsaffre/blog
docs/blog/2017/2.py
1
3105
import sys from PyQt5.QtWidgets import (QApplication, QWidget, QPushButton, QMessageBox, QDesktopWidget, QMainWindow, QAction, qApp, QTextEdit, QHBoxLayout, QVBoxLayout) # from PyQt5.QtCore import QCoreApplication from PyQt5.QtGui im...
gpl-3.0
2,632,101,182,666,969,000
27.75
70
0.544605
false
4.26511
false
false
false
stphivos/django-mock-queries
examples/users/users/settings.py
1
3188
""" Django settings for users project. Generated by 'django-admin startproject' using Django 1.8.6. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths ...
mit
4,385,639,867,455,560,700
26.721739
73
0.686324
false
3.651775
false
false
false
crichardson17/emgtemp
Metals_Sims/Dusty_sims/z_0.5_2.0/z_0.5_2.0_metal_sim_plots.py
1
18682
import matplotlib.pyplot as plt import numpy as np import matplotlib.colors as colors import urllib from mpl_toolkits.axes_grid1.inset_locator import inset_axes import matplotlib.cm as cm Low_Temp_Color = 'k' Mid_Temp_Color = 'g' High_Temp_Color = 'r' #Temp_Color = 0.5 Cloudy_Sim_Color = 'cyan' markersize = 20 SDSS_Fil...
mit
2,493,449,929,102,906,400
49.631436
529
0.640938
false
2.316429
false
false
false
cjaniake/ionicweb
webapp/area/views.py
1
10040
from django.shortcuts import render from django.views.generic.base import TemplateView from area.forms import AreaForm, LocationForm, BuildingForm from area.models import Area, Location, Building from django.http import HttpResponseRedirect import logging # GET /areas class ListAreaView(TemplateView): template_nam...
gpl-2.0
3,064,346,551,269,282,300
40.147541
222
0.609263
false
3.977813
false
false
false
loggerhead/Easy-Karabiner
easy_karabiner/basexml.py
1
3477
# -*- coding: utf-8 -*- from __future__ import print_function import lxml.etree as etree import xml.dom.minidom as minidom import xml.sax.saxutils as saxutils from . import exception from .fucking_string import ensure_utf8 class BaseXML(object): xml_parser = etree.XMLParser(strip_cdata=False) @classmethod ...
mit
7,036,706,235,977,799,000
30.324324
82
0.561979
false
3.871938
false
false
false
jfterpstra/bluebottle
bluebottle/test/factory_models/accounting.py
1
2678
import factory from datetime import date, timedelta from decimal import Decimal from bluebottle.accounting.models import (BankTransaction, BankTransactionCategory, RemoteDocdataPayout, RemoteDocdataPayment) from bluebottle.test.factory_models.payouts import ProjectPayoutFacto...
bsd-3-clause
-7,912,064,976,835,343,000
32.898734
102
0.724048
false
3.831187
false
false
false
automl/SpySMAC
cave/analyzer/parameter_importance/fanova.py
1
5790
import operator import os from collections import OrderedDict from pandas import DataFrame from cave.analyzer.parameter_importance.base_parameter_importance import BaseParameterImportance class Fanova(BaseParameterImportance): """ fANOVA (functional analysis of variance) computes the fraction of the varianc...
bsd-3-clause
8,205,455,852,385,124,000
48.487179
120
0.589465
false
3.979381
false
false
false
rfriedlein/zenoss
ZenPacks/ZenPacks.Coredial.Baytech/ZenPacks/Coredial/Baytech/BaytechPduBank.py
1
3595
########################################################################## # Author: rfriedlein, rfriedlein@coredial.com # Date: February 4th, 2011 # Revised: # # BaytechPduBank object class # # This program can be used under the GNU General Public License version 2 # You can find full in...
gpl-3.0
5,278,256,024,859,762,000
29.991379
91
0.502921
false
4.141705
false
false
false
alexisrolland/data-quality
scripts/init/validity.py
1
3496
"""Manage class and methods for data validity indicators.""" import logging import pandas from indicator import Indicator from session import update_session_status # Load logging configuration log = logging.getLogger(__name__) class Validity(Indicator): """Class used to compute indicators of type validity.""" ...
apache-2.0
4,305,772,009,656,806,400
43.253165
121
0.657609
false
4.459184
false
false
false
lidavidm/mathics-heroku
venv/lib/python2.7/site-packages/sympy/polys/polytools.py
1
163118
"""User-friendly public interface to polynomial functions. """ from sympy.core import ( S, Basic, Expr, I, Integer, Add, Mul, Dummy, Tuple, Rational ) from sympy.core.mul import _keep_coeff from sympy.core.basic import preorder_traversal from sympy.core.sympify import ( sympify, SympifyError, ) from sympy....
gpl-3.0
801,035,838,103,991,400
24.114396
103
0.490173
false
3.482897
false
false
false
Kanabanarama/Skrubba
skrubba/scheduler.py
1
6277
#!/usr/bin/env python """ File scheduler.py Job scheduler for managing configured events by Kana kanabanarama@googlemail.com """ import time import atexit import logging from datetime import datetime from apscheduler.schedulers.background import BackgroundScheduler # pylint: disable=import-error from apscheduler.even...
gpl-2.0
6,901,141,346,179,683,000
35.494186
108
0.507249
false
4.089251
true
false
false
cmattoon/today-i-learned
arduino-ekg/replay.py
1
1929
#!/usr/bin/env python import matplotlib.pyplot as plt import numpy import sys, struct from scipy.fftpack import fft, fftfreq, fftshift def getlines(filename): with open(filename) as fd: return [line.strip() for line in fd.readlines()] def replay_packets(filename): for line in getlines(filename): ...
mit
3,888,901,447,269,513,700
22.814815
58
0.505962
false
3.028257
false
false
false
douglaskastle/AcraNetwork
examples/benchmark_pcap.py
1
4560
# ------------------------------------------------------------------------------- # Name: benchmark_pcap # Purpose: Benchmark the creation and parsing of a biug pcap file # # Author: # # Created: # # Copyright 2014 Diarmuid Collins # # This program is free software; you can redistribute it and/o...
gpl-2.0
-101,800,711,013,690,860
33.905512
149
0.669956
false
3.316364
false
false
false
unitedstack/rock
rock/rules/rule_parser.py
1
10238
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
apache-2.0
-6,026,574,041,103,912,000
35.695341
75
0.504298
false
3.983658
false
false
false
rushiprasad/stwitto
stwitto/twitt.py
1
1227
import tweepy import argparse import ConfigParser config = ConfigParser.ConfigParser() config.read('/etc/stwitto/config.ini') consumer_key = config.get('twitter_auth_config', 'consumer_key') consumer_secret = config.get('twitter_auth_config', 'consumer_secret') access_token = config.get('twitter_auth_config', 'access_...
gpl-2.0
-6,080,710,177,383,759,000
32.162162
88
0.679707
false
3.556522
true
false
false
hyc/HyperDex
test/doc-extract.py
1
2556
# Copyright (c) 2013, Cornell University # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of condi...
bsd-3-clause
4,422,403,885,164,071,400
43.068966
80
0.678013
false
4.057143
false
false
false
unho/translate
translate/convert/test_po2ts.py
1
4424
# -*- coding: utf-8 -*- from io import BytesIO from translate.convert import po2ts, test_convert from translate.storage import po class TestPO2TS: def po2ts(self, posource): """helper that converts po source to ts source without requiring files""" inputfile = BytesIO(posource.encode()) i...
gpl-2.0
-6,105,735,019,182,657,000
30.333333
89
0.62947
false
3.687813
true
false
false
ksons/gltf-blender-importer
addons/io_scene_gltf_ksons/animation/material.py
1
2432
import bpy from . import quote from .curve import Curve def add_material_animation(op, anim_info, material_id): anim_id = anim_info.anim_id data = anim_info.material[material_id] animation = op.gltf['animations'][anim_id] material = op.get('material', material_id) name = '%s@%s (Material)' % ( ...
mit
-374,302,995,571,520,960
36.415385
95
0.598684
false
3.701674
false
false
false
EsqWiggles/SLA-bot
SLA_bot/module/alertfeed.py
1
2516
"""Collect hourly event announcements for PSO2 Take announcement data from a third party source, convert it into a string, and store it for later reads. Update at least once before reading. """ # The current source is already translated into English. In the event that the # flyergo source is discontinued, this module...
mit
-8,873,405,941,662,445,000
37.707692
79
0.667329
false
3.744048
false
false
false
CognitionGuidedSurgery/msml-gui
src/msmlgui/text/mainframe.py
1
5476
__author__ = 'weigl' from path import path from PyQt4.QtGui import * from PyQt4.QtCore import * import msmlgui.rcc from .flycheck import build_overview from .editor_ui import Ui_MainWindow from ..help import * icon = lambda x: QIcon(r':/icons/tango/16x16/%s.png' % x) class MainFrame(Ui_MainWindow, QMainWindow): ...
gpl-3.0
-8,745,189,579,018,515,000
30.291429
116
0.6313
false
3.677636
false
false
false
nkmk/python-snippets
notebook/arithmetic_operator_num.py
1
1336
print(10 + 3) # 13 print(10 - 3) # 7 print(10 * 3) # 30 print(10 / 3) # 3.3333333333333335 print(10 // 3) # 3 print(10 % 3) # 1 print(10 ** 3) # 1000 print(2 ** 0.5) # 1.4142135623730951 print(10 ** -2) # 0.01 print(0 ** 0) # 1 # print(10 / 0) # ZeroDivisionError: integer division or modulo by zero # print(1...
mit
8,110,380,658,963,956,000
10.322034
61
0.528443
false
2.107256
false
false
false
grimoirelab/arthur
arthur/server.py
1
4264
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Bitergia # # 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
-4,247,991,870,050,024,000
27.610738
76
0.588318
false
4.122824
false
false
false
sein-tao/trash-cli
trashcli/trash.py
1
25907
# Copyright (C) 2007-2011 Andrea Francia Trivolzio(PV) Italy from __future__ import absolute_import version='0.12.10.3~' import os import logging from .fstab import Fstab logger=logging.getLogger('trashcli.trash') logger.setLevel(logging.WARNING) logger.addHandler(logging.StreamHandler()) # Error codes (from os on ...
gpl-2.0
731,896,114,119,365,900
38.673813
129
0.59289
false
3.711073
false
false
false
emonty/burrow
burrow/tests/__init__.py
1
1565
# Copyright (C) 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
-4,100,098,598,457,448,400
25.982759
74
0.646645
false
3.648019
false
false
false
CopyChat/Plotting
Downscaling/bias.RSDS.GCMs.py
1
5090
#!/usr/bin/env python ######################################## #Globale Karte fuer tests # from Rabea Amther ######################################## # http://gfesuite.noaa.gov/developer/netCDFPythonInterface.html import math import numpy as np import pylab as pl import Scientific.IO.NetCDF as IO import matplotlib as ...
gpl-3.0
-1,949,927,725,766,545,200
24.323383
109
0.550295
false
2.649662
false
false
false
pumbaEO/undiff1c
setup.py
1
3623
#!/usr/bin/env python # -*- coding: utf-8 -*- """Based on https://github.com/pypa/sampleproject/blob/master/setup.py.""" from __future__ import unicode_literals # To use a consistent encoding import codecs import os from setuptools import setup, find_packages import sys # Shortcut for building/publishing to Pypi if sy...
apache-2.0
4,677,452,139,056,141,000
31.63964
103
0.646426
false
4.079955
false
false
false
matevzmihalic/wlansi-store
wlansi_store/migrations/0003_auto__add_field_product_language.py
1
5905
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Product.language' db.add_column('wlansi_store_product', 'language', se...
agpl-3.0
71,648,788,243,909,860
65.359551
193
0.55597
false
3.695244
false
false
false
andredalton/bcc
2014/MAC0242/miniep5/test.py
1
8640
#! /usr/bin/env python3 import os, random, unittest, subprocess from miniep5 import Calc def gera_var(): """ Funcao que gera um nome de variavel aleatorio com 1 a 10 caracteres. """ p = "" for i in range(random.randint(1,10)): p += random.choice(["a", "e", "i", "o", "u"]) return p def gera_t...
apache-2.0
-2,664,951,957,438,070,300
36.421739
118
0.537881
false
3.065907
true
false
false
graphql-python/graphql-core
src/graphql/validation/rules/unique_operation_names.py
1
1401
from typing import Any, Dict from ...error import GraphQLError from ...language import NameNode, OperationDefinitionNode, VisitorAction, SKIP from . import ASTValidationContext, ASTValidationRule __all__ = ["UniqueOperationNamesRule"] class UniqueOperationNamesRule(ASTValidationRule): """Unique operation names ...
mit
7,453,067,494,000,858,000
34.025
86
0.619557
false
4.654485
false
false
false
goshow-jp/Kraken
Python/kraken_examples/bob_rig.py
1
10457
from kraken.core.maths import Vec3, Quat, Xfo from kraken.core.objects.rig import Rig from kraken_components.generic.mainSrt_component import MainSrtComponentRig from kraken_components.biped.head_component import HeadComponentRig from kraken_components.biped.clavicle_component import ClavicleComponentGuide, ClavicleC...
bsd-3-clause
4,258,437,837,112,419,000
44.663755
182
0.670556
false
3.114056
false
false
false
trevor/calendarserver
txdav/who/idirectory.py
1
5509
# -*- test-case-name: txdav.who.test -*- ## # Copyright (c) 2014 Apple 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...
apache-2.0
-5,969,269,903,024,639,000
29.605556
78
0.721002
false
4.250772
false
false
false
bparzella/secsgem
secsgem/secs/functions/s01f00.py
1
1407
##################################################################### # s01f00.py # # (c) Copyright 2021, Benjamin Parzella. All rights reserved. # # This library 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...
lgpl-2.1
1,722,601,378,394,116,000
26.057692
69
0.61194
false
4.1261
false
false
false
mangpo/cacheall-proxy-server
httpmessage/_headers.py
1
2137
import _setup import inspect import pprint from httpmessage._multidict import MultiDict def header_case(header_key): return "-".join([part.capitalize() for part in header_key.split("-")]) def _key_wrap(func): """creates a function where the value of the 'key' argument, if there is one, has the function ...
bsd-2-clause
-1,192,584,434,577,835,800
26.766234
74
0.504913
false
3.979516
false
false
false
mikoro/pymazing
pymazing/level_loader.py
1
4241
"""Load and generate world mesh data from files.""" # Copyright © 2014 Mikko Ronkainen <firstname@mikkoronkainen.com> # License: MIT, see the LICENSE file. from pymazing import color, mesh # http://en.wikipedia.org/wiki/Truevision_TGA def generate_blocks_from_tga(file_name): """ Generate block data...
mit
-3,347,367,948,999,858,000
28.724638
95
0.504245
false
3.611584
false
false
false
foone/7gen
code/obj.py
1
9542
#!/usr/env python from error import LoadError from bmdl import BRenderModel import pygame from colorsys import rgb_to_hsv,hsv_to_rgb import os COLORWIDTH=8 class WavefrontModel: def __init__(self,filename=None): if filename is not None: self.load(filename) def load(self,filename): fop=open(filename,'r') sel...
gpl-2.0
-6,269,479,059,025,849,000
31.455782
80
0.646301
false
2.571275
false
false
false
jpardobl/naman
naman/core/pypelib/persistence/backends/rawfile/RAWFile.py
1
1316
try: import cPickle as pickle except: import pickle from threading import Lock from naman.core.pypelib.resolver.Resolver import Resolver ''' @author: lbergesio,omoya,cbermudo @organization: i2CAT, OFELIA FP7 RAWFile Implementes persistence engine to a raw file for RuleTables ''' ...
bsd-3-clause
2,492,388,815,307,089,400
22.5
77
0.663374
false
3.357143
false
false
false
bmya/tkobr-addons
tko_l10n_br_point_of_sale/res_company.py
1
1548
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # ThinkOpen Solutions Brasil # Copyright (C) Thinkopen Solutions <http://www.tkobr.com>. # # This...
agpl-3.0
-3,421,115,839,997,290,000
38.692308
78
0.618217
false
4.195122
false
false
false
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractHeyitsmehyupperstranslationsCom.py
1
1096
def extractHeyitsmehyupperstranslationsCom(item): ''' Parser for 'heyitsmehyupperstranslations.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None if item['tags'] == ['Uncategorized']: titlemap = [ ('TIA...
bsd-3-clause
-5,802,952,744,336,902,000
33.28125
105
0.643248
false
3.070028
false
false
false
kgullikson88/General
StellarModel.py
1
48138
__author__ = 'Kevin Gullikson' import os import sys import re from collections import defaultdict import warnings from collections import OrderedDict import itertools import FittingUtilities import logging from astropy import units from scipy.interpolate import InterpolatedUnivariateSpline as spline, LinearNDInterpola...
gpl-3.0
7,087,829,652,987,181,000
42.563801
144
0.544809
false
3.843353
false
false
false
kstilwell/tcex
tcex/threat_intelligence/mappings/victim.py
1
14882
"""ThreatConnect TI Victim""" from .mappings import Mappings # import local modules for dynamic reference module = __import__(__name__) class Victim(Mappings): """Unique API calls for Victim API Endpoints""" def __init__(self, tcex, **kwargs): """Initialize Class properties. Args: ...
apache-2.0
6,182,735,286,011,776,000
28.237721
100
0.556511
false
4.0639
false
false
false
wraithan/rplay
replayswithfriends/profiles/backends/urls.py
1
2568
""" URLconf for registration and activation, using django-registration's default backend. If the default behavior of these views is acceptable to you, simply use a line like this in your root URLconf to set up the default URLs for registration:: (r'^accounts/', include('registration.backends.default.urls')), Thi...
mit
-2,084,832,934,221,354,800
44.857143
99
0.551791
false
5.429175
false
false
false
maximebf/budgettracker
budgettracker/categories.py
1
3249
from collections import namedtuple from .data import filter_transactions_period import re class Category(namedtuple('Category', ['name', 'color', 'keywords', 'warning_threshold'])): @classmethod def from_dict(cls, dct): return cls(name=dct['name'], color=dct.get('color'), keywords=dct.get('keywords', ...
mit
3,897,346,843,493,143,000
40.139241
125
0.63558
false
4.066333
false
false
false
tellapart/taba
src/taba/handlers/totals_counter.py
1
2149
# Copyright 2014 TellApart, 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 writi...
apache-2.0
-6,829,965,901,479,492,000
27.276316
79
0.669614
false
3.91439
false
false
false
jrrpanix/master
examples/python/math/numpyExample.py
1
6283
import numpy as np """ by jrr """ # # output array as csv # def printArray( A ) : if len(A.shape) == 1 : r=A.shape[0] # if python3 # for i in range(0,r) : print( ( '%5.2f' ) % ( A[i] ) ,end=',') # print('') for i in range(0,r) : print( ( '%5.2f,' ) % ( A[i] ) ) , pr...
gpl-3.0
1,206,430,020,656,617,500
20.891986
82
0.614515
false
2.918254
false
false
false
axsemantics/rohrpost
tests/test_ping.py
1
1151
from rohrpost.handlers import handle_ping def test_ping(consumer): handle_ping(consumer=consumer, request={"id": 123}) assert consumer.closed is False assert len(consumer.data) == 1 data = consumer.data[-1] assert data["id"] == 123 assert data["type"] == "pong" assert "data" not in data ...
mit
487,192,422,104,183,300
26.404762
82
0.586447
false
3.630915
false
false
false
project-oak/hafnium-verification
experiments/ownership-inference/infer/infer/lib/python/inferlib/capture/ant.py
1
2742
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging import os from . import util from inferlib import jwlib MODULE_NAME = __name__ MODULE_DESCRIPTION = '''Run analysis of code b...
apache-2.0
8,061,196,830,654,131,000
31.642857
77
0.588257
false
4.038292
false
false
false
us-ignite/us_ignite
us_ignite/testbeds/views.py
1
2088
from django.http import Http404 from django.shortcuts import get_object_or_404 from django.template.response import TemplateResponse from us_ignite.common import pagination from us_ignite.common.response import json_response from us_ignite.maps.utils import get_location_dict from us_ignite.testbeds.models import Testb...
bsd-3-clause
2,731,798,187,636,176,400
31.625
76
0.670019
false
3.527027
true
false
false
team23/django_backend
django_backend/backend/form_tabs.py
1
7071
from .renderable import Renderable class BaseFormElement(Renderable): def __init__(self, template_name=None, position=0): self.position = position super(BaseFormElement, self).__init__(template_name=template_name) def resolve_help_text(self, context): return None @property de...
bsd-3-clause
-1,468,785,885,214,893,300
30.426667
84
0.589733
false
4.087283
false
false
false
edx/credentials
credentials/apps/credentials/models.py
1
12660
""" Models for the credentials service. """ import logging import uuid import bleach from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.cor...
agpl-3.0
5,030,639,838,359,889,000
32.76
120
0.670379
false
4.249748
true
false
false
jmosky12/huxley
scripts/assignment_db.py
1
1357
# Copyright (c) 2011-2014 Berkeley Model United Nations. All rights reserved. # Use of this source code is governed by a BSD License (see LICENSE). import os from os import environ from os.path import abspath, dirname import sys sys.path.append(abspath(dirname(dirname(__file__)))) os.environ['DJANGO_SETTINGS_MODULE']...
bsd-3-clause
3,738,094,941,541,147,600
34.710526
193
0.725866
false
2.982418
false
false
false
Naught0/qtbot
cogs/osrs.py
1
15138
import json from urllib.parse import quote_plus from typing import Union import discord from discord.ext import commands from utils import aiohttp_wrap as aw from utils import dict_manip as dm from utils.user_funcs import PGDB class OSRS(commands.Cog): def __init__(self, bot): self.bot = bot sel...
mit
6,672,994,157,585,110,000
36.93985
111
0.544854
false
3.583807
false
false
false
ndp-systemes/odoo-addons
account_invoice_dunning/models/dunning.py
1
9802
# -*- coding: utf8 -*- # # Copyright (C) 2017 NDP Systèmes (<http://www.ndp-systemes.fr>). # # This program 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 # Licen...
agpl-3.0
-1,621,267,915,577,783,600
40.180672
120
0.584124
false
3.552374
false
false
false
jleivaizq/freesquare
freesquare/geo/feeds/gadm.py
1
4921
# -*- coding: utf-8 -*- import logging import os import zipfile from collections import defaultdict from django.contrib.gis.gdal import DataSource from .utils import download from ..models import Region logger = logging.getLogger(__name__) LEVELS = [r[1] for r in Region.REGION_LEVELS] LOCAL_DICT = { 'Catalu\x...
mit
6,486,755,235,228,144,000
33.412587
99
0.527535
false
4.163283
false
false
false
tensorflow/tfx
tfx/tools/cli/testdata/test_pipeline_local_1.py
1
2688
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
2,677,516,085,262,274,600
37.956522
79
0.725446
false
3.759441
false
false
false
jericksanjuan/lab-student-draft
lab_student_draft/students/models.py
1
3490
from django.conf import settings from django.db import models from django.db.models.signals import pre_save from model_utils.models import TimeStampedModel from model_utils import Choices from labs.models import Lab _PICKVAL = 100 # TODO: Get minimum_groups from settings # TODO: Get maximum groups from settings cl...
bsd-3-clause
-1,875,968,631,157,454,600
28.82906
86
0.659885
false
3.818381
false
false
false
dceoy/fract
fract/model/base.py
1
23500
#!/usr/bin/env python import json import logging import os import signal import time from abc import ABCMeta, abstractmethod from datetime import datetime from math import ceil from pathlib import Path from pprint import pformat import numpy as np import pandas as pd import yaml from oandacli.util.logger import log_r...
gpl-3.0
4,704,809,548,591,564,000
37.02589
79
0.481787
false
3.868313
false
false
false
buwx/logger
Logger.py
1
2078
#!/usr/bin/python # -*- coding: iso-8859-15 -*- ''' Created on 10.03.2015 @author: micha ''' import logging import serial import time import MySQLdb as mdb from util import formatData, description, sensor # the main procedure logging.basicConfig(format='%(asctime)s\t%(levelname)s\t%(message)s', level=logging.INFO...
gpl-3.0
4,441,962,244,224,371,000
25.641026
157
0.532243
false
3.516074
false
false
false
bgr/quadpy
demo/demo.py
1
6825
try: import tkinter except ImportError: import Tkinter as tkinter # hsmpy is Hierarchical State Machine implementation for Python # it's used here to implement GUI logic import quadpy from quadpy.rectangle import Rectangle from hsmpy import HSM, State, T, Initial, Internal, Choice, EventBus, Event # you can e...
mit
7,489,607,430,619,016,000
27.676471
79
0.626081
false
3.279673
false
false
false
colour-science/colour-analysis
colour_analysis/visuals/__init__.py
1
1700
# -*- coding: utf-8 -*- from __future__ import absolute_import from .primitive import Primitive, PrimitiveVisual from .symbol import Symbol from .axis import axis_visual from .box import Box, BoxVisual from .diagrams import (CIE_1931_chromaticity_diagram, CIE_1960_UCS_chromaticity_diagram, ...
bsd-3-clause
7,652,326,354,322,501,000
36.777778
79
0.647647
false
3.262956
false
true
false
jgagneastro/FireHose_OLD
3-XIDL/23-XIDL/idlspec2d/bin/putils.py
2
2033
#!/usr/bin/env python import sys, os, os, subprocess import string, imp, time, shlex import gzip """ putils is a set of miscellaneous python tools. Written by Gary Kushner (LBL). Nov 2009. Latest update April 2010. """ def searchPath(name, paths): """Search a path for a name (file, direcory, link, etc). Return...
gpl-2.0
-3,833,361,437,633,648,600
23.493976
81
0.661584
false
3.099085
false
false
false
tiagocoutinho/bliss
bliss/controllers/motors/carnac.py
1
2689
# -*- coding: utf-8 -*- # # This file is part of the bliss project # # Copyright (c) 2016 Beamline Control Unit, ESRF # Distributed under the GNU LGPLv3. See LICENSE for more info. """ ID31 motion hook for the carnac motors. """ import logging import gevent from bliss.common.hook import MotionHook class CarnacHoo...
lgpl-3.0
-3,396,081,586,227,965,400
31.39759
83
0.554481
false
3.771388
false
false
false
amaurywalbert/twitter
communities_detection/infomap/hashmap_infomap_method_v1.0.py
2
6588
# -*- coding: latin1 -*- ################################################################################################ import snap,datetime, sys, time, json, os, os.path, shutil, time, struct, random import subprocess import networkx as nx import matplotlib.pyplot as plt reload(sys) sys.setdefaultencoding('utf-8')...
gpl-3.0
-3,754,045,302,539,895,300
43.09396
227
0.318569
false
4.626761
false
false
false
shodimaggio/SaivDr
appendix/pytorch/nsoltBlockDct2dLayer.py
1
2466
import torch import torch.nn as nn import torch_dct as dct import math from nsoltUtility import Direction class NsoltBlockDct2dLayer(nn.Module): """ NSOLTBLOCKDCT2DLAYER ベクトル配列をブロック配列を入力: nSamples x nComponents x (Stride(1)xnRows) x (Stride(2)xnCols) コンポーネント別に出力(nComponents):...
bsd-2-clause
-1,141,814,849,013,926,000
33.457143
91
0.59204
false
2.977778
false
false
false
ctag/cpe453
JMRI/jython/xAPadapter.py
1
7516
# Adapter to xAP automation protocol # # Uses xAPlib to listen to the network, creating and # maintaining internal Turnout and Sensor objects that # reflect what is seen. # # The Turnouts' commanded state is updated, not the # known state, so feedback needs to be considered in # any more permanent implementation. N...
gpl-2.0
9,160,168,916,993,520
33.319635
110
0.612826
false
3.484469
false
false
false
cjgrady/pamRandomization
convertBackToCsv.py
1
3520
""" @summary: Converts the random PAMs back into CSVs and add back in headers """ import concurrent.futures import csv import os import numpy as np # ............................................................................. def writeCSVfromNpy(outFn, mtxFn, headerRow, metaCols): """ @summary: Converts a num...
gpl-2.0
6,710,682,274,103,524,000
33.174757
109
0.571591
false
3.26228
false
false
false
annoviko/pyclustering
pyclustering/cluster/examples/birch_examples.py
1
5638
"""! @brief Examples of usage and demonstration of abilities of BIRCH algorithm in cluster analysis. @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """ from pyclustering.cluster import cluster_visualizer from pyclustering.cluster.birch import birch from pyclus...
gpl-3.0
559,214,982,133,781,200
35.337748
240
0.73182
false
3.094402
false
false
false
plantigrade/geni-tools
src/gcf/geni/util/urn_util.py
1
10380
#---------------------------------------------------------------------- # Copyright (c) 2010-2015 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
mit
3,436,441,151,345,414,700
40.854839
138
0.593353
false
3.647224
false
false
false
amfarrell/pickhost
src/pickhost/pickhost/settings.py
1
4605
""" Django settings for pickhost project. Generated by 'django-admin startproject' using Django 1.9.2. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os i...
mit
-8,103,281,417,396,609,000
26.740964
103
0.6519
false
3.408586
false
false
false
hbradleyiii/ww
ww/main.py
1
1722
#!/usr/bin/env python # -*- coding: utf-8 -*- # # name: main.py # author: Harold Bradley III # email: harold@bradleystudio.net # date: 12/11/2015 # # description: A program for managing websites # from __future__ import absolute_import, print_function try: from ex...
mit
5,718,139,895,927,511,000
23.956522
82
0.608595
false
3.5875
false
false
false
ajpina/uffema
uffema/slots/type1.py
1
7525
#!/usr/bin/python # -*- coding: iso-8859-15 -*- # ========================================================================== # Copyright (C) 2016 Dr. Alejandro Pina Ortega # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may ob...
apache-2.0
8,788,168,946,986,012,000
27.612167
142
0.505249
false
3.325232
false
false
false
aptivate/django-registration
registration/models.py
1
10475
import datetime import hashlib import random import re from django.conf import settings from django.db import models from django.db import transaction from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model try: fro...
bsd-3-clause
-6,932,972,600,714,886,000
38.23221
83
0.621289
false
4.978612
false
false
false
umitproject/tease-o-matic
mediagenerator/filters/yuicompressor.py
1
1533
from django.conf import settings from django.utils.encoding import smart_str from mediagenerator.generators.bundles.base import Filter class YUICompressor(Filter): def __init__(self, **kwargs): super(YUICompressor, self).__init__(**kwargs) assert self.filetype in ('css', 'js'), ( 'YUICo...
bsd-3-clause
-8,061,247,068,897,401,000
48.451613
82
0.566862
false
4.430636
false
false
false
manaschaturvedi/oscarbuddy
main.py
1
22607
import os import re import random import hashlib import hmac from string import letters import mimetypes import webapp2 import jinja2 from google.appengine.ext import db import webbrowser from urllib2 import urlopen import requests from bs4 import BeautifulSoup import json import html5lib template_dir = os.path.join(os...
mit
342,617,429,224,100,900
41.41651
154
0.572035
false
3.659275
false
false
false
JarbasAI/JarbasAI
jarbas_skills/skill_wiki/__init__.py
1
3331
# Copyright 2016 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
gpl-3.0
-5,092,535,073,440,309,000
33.340206
77
0.631042
false
3.877765
false
false
false
ha1fpint/PeepingTom-Modified
peepingtom2.py
1
11299
#!/usr/bin/env python import sys import urllib2 import subprocess import re import time import os import hashlib import random import requests import urllib2 #================================================= # MAIN FUNCTION #================================================= def main(): # depenency check if ...
gpl-3.0
-3,573,121,943,859,222,000
38.645614
427
0.570139
false
3.693691
false
false
false
dgarrett622/ObsDist
ObsDist/Population.py
1
5657
# -*- coding: utf-8 -*- """ v1: Created on November 28, 2016 author: dg622@cornell.edu """ import numpy as np import astropy.units as u class Population(object): """This class contains all the planetary parameters necessary for sampling or finding probability distribution functions Args: a_mi...
mit
-879,130,761,740,373,000
31.331429
113
0.505745
false
3.794098
false
false
false
tbphu/fachkurs_2016_project
model.py
1
5801
import modeldata import molecules as mol import translation import replication as rep import transcription class Output: """ class for handling the simulation results of the different species types """ def __init__(self, model): self.meta = {} self.model = model self.timecourse...
mit
-8,622,250,622,444,500,000
34.359756
126
0.594068
false
3.691279
false
false
false
dziobas/ChangesCheckstyle
checkstyle.py
1
3398
#!/usr/bin/python import os import re import sys import getopt def run_checkstyle(file_name, checkstyle, project_dir): output = os.popen("(cd " + project_dir + "; \ java -jar checkstyle.jar \ -c " + checkstyle + " \ " + file_name + ")").read() output = output.split("\n") length =...
apache-2.0
-1,082,372,101,561,743,700
28.051282
99
0.572396
false
3.630342
false
false
false
mattwilliamson/webhookr
webhookr/sockets.py
1
3157
import logging from socketio.namespace import BaseNamespace from socketio.mixins import RoomsMixin, BroadcastMixin class WebhookrChannelMixin(object): room_key = 'rooms' def __init__(self, *args, **kwargs): super(WebhookrChannelMixin, self).__init__(*args, **kwargs) if self.room_key not in s...
mit
-3,892,924,647,368,414,700
36.583333
103
0.638264
false
3.675204
false
false
false
yubbie/googleapps-message-recall
message_recall/frontend_views.py
1
19041
# Copyright 2014 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 ...
apache-2.0
1,862,183,678,027,718,700
36.70495
80
0.686308
false
3.936531
false
false
false
globocom/database-as-a-service
dbaas/maintenance/migrations/0035_auto__add_field_databasemigrate_origin_environment.py
1
51269
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'DatabaseMigrate.origin_environment' db.add_column(u'maint...
bsd-3-clause
6,568,704,805,031,850,000
97.40691
227
0.566034
false
3.586248
true
false
false
RiceMunk/omnifit
omnifit/spectrum/tests/test_spectrumplotting.py
1
1494
# Licensed under a 3-clause BSD style license - see LICENSE.rst from astropy.tests.helper import pytest import numpy as np import os from ..spectrum import * import matplotlib.pyplot as plt from ...tests.helpers import * class TestSpectrumPlotting: def test_plotbasic(self): """ Make sure that basic spectrum ...
bsd-3-clause
-2,019,736,266,411,463,200
27.188679
63
0.659304
false
3.490654
true
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/snapshot_update_py3.py
1
2814
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-6,854,801,527,586,538,000
47.517241
158
0.658138
false
4.037303
false
false
false
sistason/pa3
src/pa3_frontend/pa3_django/pa3/migrations/0017_auto_20180413_0948.py
1
1619
# Generated by Django 2.0.4 on 2018-04-13 07:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pa3', '0016_auto_20180413_0948'), ] operations = [ migrations.AlterField( model_name='newestnumberbatch', name='src'...
gpl-3.0
-1,901,392,672,714,096,400
48.060606
332
0.521309
false
3.131528
false
false
false
semussan/pythfinder
popup_menu.py
1
23014
"""popup_menu.py - A low-fuss, infinitely nested popup menu with simple blocking behavior, and more advanced non-blocking behavior. Classes: PopupMenu -> A blocking menu. NonBlockingPopupMenu -> A non-blocking menu. Menu -> The graphics and geometry for a menu panel. Note: You'll typically ...
gpl-2.0
423,739,067,350,770,560
37.614094
86
0.589424
false
3.978907
false
false
false