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
nke001/attention-lvcsr
libs/Theano/theano/gof/cc.py
1
71042
""" Defines Linkers that deal with C implementations. """ from __future__ import print_function # Python imports from copy import copy import os import sys import logging import numpy import theano from theano import config from theano.compat import PY3 from theano.compat import izip from six import string_types, r...
mit
-3,159,184,381,697,750,500
38.380266
168
0.556333
false
4.167908
false
false
false
southampton/unimatrix
deskctl/lib/errors.py
1
3040
#!/usr/bin/python # -*- coding: utf-8 -*- from deskctl import app from flask import g, render_template, make_response, session, request import traceback ################################################################################ ## standard error (uses render_template and thus standard page layout) def stderr(t...
gpl-3.0
6,697,952,601,230,375,000
23.699187
162
0.602041
false
3.356906
false
false
false
lynchnf/maneki-neko-web
socialmedia/models.py
1
1095
from cms.models.pluginmodel import CMSPlugin from django.utils.translation import ugettext_lazy as _ from django.db import models ICON_CHOICES = ( ("fa-delicious", _("Delicious")), ("fa-digg", _("Digg")), ("fa-facebook", _("Facebook")), ("fa-flickr", _("Flickr")), ("fa-google-p...
mit
-454,674,423,884,372,100
33.25
87
0.552511
false
3.46519
false
false
false
HUGG/NGWM2016-modelling-course
Lessons/06-Rheology-of-the-lithosphere/scripts/solutions/strength-envelope-uniform-crust.py
1
7747
''' strength-envelope-uniform-crust.py This script can be used for plotting strength envelopes for a lithosphere with a uniform crust. The script includes a function sstemp() that can be used for calculating the lithospheric temperature as a function of the input material properties dwhipp 01.16 (modified from code w...
mit
-5,469,655,399,814,648,000
36.97549
141
0.47954
false
3.452317
false
false
false
sony/nnabla
python/src/nnabla/backward_function/log_softmax.py
1
1273
# Copyright 2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # 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 # # Un...
apache-2.0
1,820,603,704,380,515,000
34.361111
86
0.716418
false
3.755162
false
false
false
thonkify/thonkify
src/lib/future/backports/email/iterators.py
1
2346
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Various types of useful iterators and generators.""" from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import __all...
mit
-7,011,586,712,797,445,000
30.702703
75
0.650469
false
3.858553
false
false
false
eladnoor/equilibrator
gibbs/forms.py
1
5821
from django import forms from util import constants import haystack.forms class ListFormField(forms.MultipleChoiceField): """ A form field for a list of values that are unchecked. The Django MultipleChoiceField does *almost* what we want, except it validates that each choice is in a suppl...
mit
2,429,056,739,897,362,400
37.549669
79
0.655214
false
4.215062
false
false
false
USGSDenverPychron/pychron
pychron/spectrometer/local_mftable_history_view.py
1
3951
# =============================================================================== # Copyright 2014 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
apache-2.0
8,448,448,464,310,305,000
33.060345
94
0.539863
false
4.081612
false
false
false
dariost/utility
pi.py
1
1131
#!/usr/bin/env python3 ##################################################### # # # License: Apache License 2.0 # # Author: Dario Ostuni <another.code.996@gmail.com> # # # ##########################...
apache-2.0
1,180,066,181,916,586,800
20.75
53
0.402299
false
3.040323
false
false
false
zenn1989/scoria-interlude
L2Jscoria-Game/data/scripts/custom/8009_HotSpringsBuffs/__init__.py
1
2538
import sys from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest from com.l2scoria.gameserver.datatables import SkillTable from com.l2scoria.util.random import Rnd qn = "8009_HotSprin...
gpl-3.0
-930,510,215,556,508,700
36.338235
78
0.611505
false
2.971897
false
false
false
simleo/pydoop-features
pyfeatures/app/summarize.py
1
2371
# BEGIN_COPYRIGHT # # Copyright (C) 2017 Open Microscopy Environment: # - University of Dundee # - CRS4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at # # http://www.apache.org/licenses/...
apache-2.0
5,210,433,854,678,834,000
33.362319
77
0.601012
false
3.261348
false
false
false
WBradbeer/port-routing
lp_helpers.py
1
2253
import itertools import numpy as np def flatten_2(data): vector = [] for i in data: for j in i: vector.append(j) return vector def flatten_3(data): return flatten_2(flatten_2(data)) def reshape_2D(vector, rows, cols): data = [] for i in range(0, rows): data.appe...
mit
-9,073,479,037,994,305,000
23.758242
81
0.537949
false
3.032301
false
false
false
lixingcong/shadowsocks_analysis
shadowsocks/server.py
1
5564
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' 服务端 ps:我是先看完local.py再看server.py; 发现:除了多用户的思路判断,别的代码思路是一致的,部分没有注释,可以回去翻翻local.py ''' from __future__ import absolute_import, division, print_function, \ with_statement import sys import os import logging import signal sys.path.insert(0, os.path.join(os.path.dirnam...
mit
9,211,529,882,349,999,000
33.353741
111
0.543762
false
3.328939
true
false
false
lexdene/hbml
tests/template_test.py
1
1579
import os import unittest import hbml def _file_content(path): with open(path, 'r') as f: content = f.read() return content DIRPATH = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'templates' ) class TemplateTestCase(unittest.TestCase): def _test_file(self, filename): ...
gpl-3.0
8,569,644,330,344,459,000
23.671875
58
0.419886
false
4.671598
true
false
false
digitalvectorz/syn
Syn/Unlink.py
1
1819
""" Simple unlink routines @license: GPL-3+ @author: Paul Tagliamonte <paultag@gmail.com> @date: August 8th, 2011, 00:10 -0000 Unlink a package into the filesystem """ import os.path import Syn.Exceptions import Syn.Policy.Db as D import Syn.Policy.BinaryPackage as B import Syn.Policy.Chroot as C import Syn...
gpl-3.0
8,327,458,023,312,325,000
23.581081
91
0.692688
false
2.751891
false
false
false
amd77/parker
matriculas/views.py
1
1489
# Create your views here. from django.utils import timezone # from django.views.generic import View, TemplateView, UpdateView from django.views.generic import ListView, RedirectView from models import Registro from django.core.urlresolvers import reverse class RedirectDia(RedirectView): permanent = False def...
gpl-2.0
-4,901,623,654,913,660,000
32.088889
82
0.67495
false
3.3918
false
false
false
hylje/sankarit
sankarit/models/adventure.py
1
5383
# -*- encoding: utf-8 -*- import itertools import random import datetime from collections import defaultdict from flask import g from sankarit import itemclasses, adventureclasses from sankarit.models.item import Item class Adventure(object): @classmethod def create(cls, adventureclass, heroes): c =...
bsd-3-clause
-7,869,746,268,539,831,000
30.461988
113
0.563755
false
3.453145
false
false
false
snakeleon/YouCompleteMe-x86
third_party/ycmd/ycmd/handlers.py
1
10839
# Copyright (C) 2013 Google Inc. # 2017 ycmd contributors # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
gpl-3.0
-3,310,765,388,054,272,000
29.880342
80
0.696374
false
3.8341
false
false
false
tweemeterjop/thug
thug/DOM/W3C/Attr.py
1
2167
#!/usr/bin/env python import bs4 as BeautifulSoup from .Node import Node class Attr(Node): _value = "" def __init__(self, doc, parent, attr): self.doc = doc self.parent = parent self.attr = attr self.tag = BeautifulSoup.Tag(parser = self.doc, name = 'attr') N...
gpl-2.0
-8,961,520,917,064,182,000
22.301075
121
0.580988
false
4.080979
false
false
false
foxdog-studios/pyddp
ddp/messages/client/sub_message.py
1
1695
# -*- coding: utf-8 -*- # Copyright 2014 Foxdog Studios # # 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 l...
apache-2.0
7,933,461,572,024,796,000
26.786885
74
0.630088
false
4.035714
false
false
false
KDNT/p2pool-worldcoin-old
p2pool/web.py
1
25333
from __future__ import division import errno import json import os import sys import time import traceback from twisted.internet import defer from twisted.python import log from twisted.web import resource, static import p2pool from bitcoin import data as bitcoin_data from . import data as p2pool_data, p2p from util...
gpl-3.0
3,808,312,413,652,431,000
54.922737
260
0.6306
false
3.469799
false
false
false
d1m0/pyelf
__init__.py
1
13904
from pylibelf import * from pylibelf.types import * from pylibelf.iterators import * from pylibelf.constants import * from pylibelf.util import * from pylibelf.util.syms import * from pylibelf.macros import * from bisect import bisect_left import pylibelf.util import pylibelf import types import os def _inrange(x, a,b...
mit
-9,088,902,695,502,797,000
29.095238
111
0.583357
false
2.980493
false
false
false
bburan/psiexperiment
psi/data/plots.py
1
35393
import logging log = logging.getLogger(__name__) import itertools import importlib from functools import partial from collections import defaultdict import numpy as np import pandas as pd import pyqtgraph as pg from atom.api import (Unicode, Float, Tuple, Int, Typed, Property, Atom, Bool, Enum...
mit
3,576,317,524,640,551,400
30.685765
84
0.559376
false
3.785348
false
false
false
sdemircan/editobj2
field_qtopia.py
1
9247
# -*- coding: utf-8 -*- # field_gtk.py # Copyright (C) 2007-2008 Jean-Baptiste LAMY -- jiba@tuxfamily.org # # 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 #...
gpl-2.0
1,841,811,769,113,129,200
34.980545
141
0.667676
false
3.168951
false
false
false
codeforfrankfurt/PolBotCheck
polbotcheck/word_cluster.py
1
3812
import json from sklearn.feature_extraction.text import TfidfVectorizer import nltk from nltk.corpus import stopwords from wordcloud import WordCloud import matplotlib.pyplot as plt import db import os DATASET_PATH = os.environ['HOME'] + '/nltk_data/corpora/twitter_samples/tweets.20150430-223406.json' def calc_frequen...
mit
-4,804,049,777,207,499,000
37.505051
122
0.651626
false
3.230508
false
false
false
trentspi/PX8
examples/plasma/plasma.py
1
17516
px8 / python cartridge version 1 __python__ # Original code from rez # https://www.lexaloffle.com/bbs/?tid=29529 SIZE = 128 A = None cr = None cg = None cb = None cw = None def _init(): global SIZE, A, cr, cg, cb, cw mode(SIZE, SIZE, 1) cls() A = SIZE - 1 cr = [0] * SIZE cg = [0] * SIZE ...
mit
-8,687,394,390,623,362,000
94.715847
128
0.96232
false
13.557276
false
false
false
memsharded/conan
conans/client/graph/graph_builder.py
1
18724
import time from collections import OrderedDict from conans.client.graph.graph import DepsGraph, Node, RECIPE_EDITABLE from conans.errors import (ConanException, ConanExceptionInUserConanfileMethod, conanfile_exception_formatter) from conans.model.conan_file import get_env_context_manager fr...
mit
1,260,864,511,600,322,000
52.497143
101
0.605319
false
4.49988
true
false
false
ianrenton/TelegraphFantasyFootballTeamPicker
telegraphpicker.py
1
19193
#!/usr/bin/python # -*- coding: cp1252 -*- # Telegraph Fantasy Football Team Picker # version 1.2.1 (11 March 2011) # by Ian Renton and Mark Harris # For details, see http://www.onlydreaming.net/software/telegraph-fantasy-football-team-picker # This code is released under the GPLv3 licence (http://www.gnu.org/licenses...
bsd-2-clause
-450,705,566,761,338,500
48.981771
238
0.602355
false
3.808135
false
false
false
H-Software/Zabbix-II
zabbix-templates/ibm-storwize-perf/scripts/svc_perf_discovery_sender_zabbix.py
1
4012
#!/usr/bin/python # -*- coding: utf-8 -*- # coding: utf-8 # # IBM Storwize V7000 autodiscovery script for Zabbix # # 2013 Matvey Marinin # # Sends volume/mdisk/pool LLD JSON data to LLD trapper items "svc.discovery.<volume-mdisk|volume|mdisk|pool>" # Use with "_Special_Storwize_Perf" Zabbix template # # See also http:/...
gpl-2.0
5,975,721,742,574,174,000
31.617886
176
0.639083
false
3.207034
false
false
false
rven/odoo
odoo/fields.py
1
165522
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ High-level objects for fields. """ from collections import defaultdict from datetime import date, datetime, time from operator import attrgetter from xmlrpc.client import MAXINT import itertools import logging impor...
agpl-3.0
7,060,470,593,801,443,000
41.981563
132
0.57512
false
4.373913
false
false
false
kansanmuisti/kamu
parliament/models/funding.py
1
1287
from django.db import models from django.db.models import Q from django.utils.translation import ugettext_lazy as _ from parliament.models.member import Member from parliament.models.session import Term class FundingSource(models.Model): TYPES = ( ('co', _('Corporation')), ('ind', _('Individual')...
agpl-3.0
-1,693,515,536,714,444,500
31.175
94
0.608392
false
3.677143
false
false
false
dc3-plaso/dfvfs
dfvfs/path/fvde_path_spec.py
1
2024
# -*- coding: utf-8 -*- """The FileVault Drive Encryption (FVDE) path specification implementation.""" from dfvfs.lib import definitions from dfvfs.path import factory from dfvfs.path import path_spec class FVDEPathSpec(path_spec.PathSpec): """Class that implements the FVDE path specification. Attributes: e...
apache-2.0
3,737,688,749,816,931,300
31.126984
78
0.700593
false
3.907336
false
false
false
emilydolson/avida-spatial-tools
avidaspatial/utils.py
1
11662
# This file contains functions that are used throuhgout avida-spatial-tools from math import sqrt, log, floor, ceil from copy import deepcopy import pysal import numpy as np from .environment_file import * import seaborn as sns def get_kwargs(grid, kwargs, phenotypes=False): """ Helper function to figure out...
mit
-5,382,053,387,468,629,000
28.6743
79
0.621763
false
3.727069
false
false
false
squaresLab/Houston
experiments/filter_truth.py
1
2853
from typing import Iterator, Tuple, Set, List, Dict, Any, Optional, Type import argparse import logging import sys import os import concurrent.futures from ruamel.yaml import YAML import yaml from houston.mission import Mission from compare_traces import load_file as load_traces_file from compare_traces import is_tru...
mit
-7,573,749,851,091,781,000
31.793103
81
0.661059
false
3.753947
false
false
false
FluVigilanciaBR/seasonality
methods/mem/sinan_mem_inset_thresholds.py
1
45032
# coding:utf8 __author__ = 'Marcelo Ferreira da Costa Gomes' import rpy2.robjects as ro from numpy import * from pandas import * from rpy2.robjects import pandas2ri from rpy2.robjects.packages import importr pandas2ri.activate() import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as ...
gpl-3.0
-6,955,606,979,555,097,000
51.231039
129
0.583441
false
3.04462
false
false
false
Kuniwak/vint
vint/bootstrap.py
1
1382
import importlib import pkgutil from pathlib import Path from vint.linting.cli import start_cli import logging LOG_FORMAT = 'vint %(levelname)s: %(message)s' def init_logger(): logging.basicConfig(format=LOG_FORMAT) def init_linter(): import_all_policies() def init_cli(): start_cli() def import_a...
mit
1,752,616,255,235,649,500
26.64
86
0.675109
false
3.580311
false
false
false
AdamRTomkins/libSpineML
libSpineML/smlBundle.py
1
7712
#! /usr/bin/env python # -*- coding: utf-8 -*- """SpineML Bundle Module This modual will form a convience class to bundle together related SpineML objects into a single standard object which can be easily passed between programs. The bundle will be able to interact with premade spineML objects through the other suppor...
gpl-3.0
-8,174,739,726,877,663,000
37.56
91
0.566131
false
4.53114
false
false
false
hbp-brain-charting/public_protocols
mtt/paradigm_descriptors/paradigm_descriptor_mtt.py
1
8624
# -*- coding: utf-8 -*- """ Script for paradigm descriptors' extraction on the Mental-Time-Travel protocol for both models author: Ana Luisa Pinho e-mail: ana.pinho@inria.fr Last update: November 2019 Compatibility: Python 3.5 """ import os import glob import csv import numpy as np # %% # =========================...
bsd-3-clause
-978,880,912,529,410,800
32.297297
79
0.50487
false
3.638819
false
false
false
GabrielCasarin/Allegri
Meta_Compilador/minimizador.py
1
8819
# Copyright (c) 2016 Gabriel Casarin da Silva, All Rights Reserved. from comum.automatos import AutomatoFinito from comum.automatos.estado import Estado, EstadoNaoDeterministico def eliminar_transicoes_em_vazio(automato): def epsilon_closure(estado): fecho = [estado] pilha = list(fecho) ...
gpl-3.0
-5,765,172,779,519,239,000
34.504032
121
0.535718
false
3.355564
false
false
false
3324fr/spinalcordtoolbox
scripts/isct_test_function.py
1
17025
#!/usr/bin/env python ######################################################################################### # # This function allows to run a function on a large dataset with a set of parameters. # Results are extracted and saved in a way that they can easily be compared with another set. # # Data should be organiz...
mit
3,687,924,555,566,886,400
38.228111
169
0.589662
false
3.920101
true
false
false
SerpentCS/purchase-workflow
purchase_request/models/purchase_request.py
1
10281
# -*- coding: utf-8 -*- # Copyright 2016 Eficent Business and IT Consulting Services S.L. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0). from openerp import api, fields, models import openerp.addons.decimal_precision as dp _STATES = [ ('draft', 'Draft'), ('to_approve', 'To be approved'), ...
agpl-3.0
-740,625,282,075,647,100
40.289157
79
0.508803
false
4.616524
false
false
false
elzaggo/pydoop
pydoop/__init__.py
1
5094
# BEGIN_COPYRIGHT # # Copyright 2009-2018 CRS4. # # 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 agree...
apache-2.0
339,911,344,888,792,400
24.59799
77
0.665096
false
3.398266
false
false
false
mckinseyacademy/xblock-diagnosticfeedback
diagnostic_feedback/mixins.py
1
3760
from __future__ import absolute_import import pkg_resources from django import utils from xblockutils.resources import ResourceLoader from .config import student_assets, studio_assets loader = ResourceLoader(__name__) class XBlockWithTranslationServiceMixin(object): """ Mixin providing access to i18n servi...
agpl-3.0
-4,865,101,097,367,604,000
37.367347
114
0.5625
false
4.413146
false
false
false
CStaich/Repository01
RPG.py
1
11997
import random from math import ceil import simpy #for simulating battle #Program written by Charlie Staich # staichcs@mail.uc.edu # in fulfillment of Katas excercise for Roto # To use, simply run in a console. You will be prompted with an easy menu. #Purpose: an RPG item generator and battle simulator # Bat...
mit
-8,551,126,958,085,172,000
41.154676
163
0.541385
false
3.492576
false
false
false
macosforge/ccs-calendarserver
txdav/common/datastore/podding/test/test_resource.py
1
7770
## # Copyright (c) 2005-2017 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 # # Unless required by applicable l...
apache-2.0
5,385,579,506,552,117,000
28.884615
106
0.566924
false
4.132979
true
false
false
cbode/ssr
ssr_algore.py
1
8571
#!/usr/bin/env python ############################################################################ # # MODULE: ssr_algore.py # AUTHOR: Collin Bode, UC Berkeley # # PURPOSE: # Al Gore Rhythm combines r.sun model with Light Penetration Index (LPI). # Merges all the r.sun solar radiation runs into a single ...
gpl-2.0
-8,142,489,074,652,205,000
46.882682
166
0.575779
false
3.088649
false
false
false
joelfrederico/Blowout
blowout/support.py
1
4201
import h5py as _h5 import numpy as _np import logging as _logging import time as _time _logger = _logging.getLogger(__name__) import ipdb as pdb import re as _re def _timestamp2filename(cls, ftype, filename=None): # ====================================== # Get filename from timestamp # ==================...
mit
3,573,787,336,411,098,000
30.586466
118
0.502261
false
4.110568
false
false
false
Saevon/spacebattle
menu/controllers.py
1
4003
from abstract.event_manager import EventManager, Mods from pygame import locals as const from ship import Ship # Missing Mouse button constants const.MOUSEKEY_LEFT = 1 const.MOUSEKEY_MIDDLE = 2 const.MOUSEKEY_RIGHT = 3 const.MOUSEKEY_SCROLLUP = 4 const.MOUSEKEY_SCROLLDOWN = 5 # Start up our pause_handler pause_hand...
mit
7,717,589,673,143,250,000
32.638655
81
0.681989
false
2.945548
false
false
false
suutari-ai/shoop
shuup/campaigns/models/campaigns.py
2
18214
# This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import random import string from django.conf import settings from django.core.exceptions ...
agpl-3.0
2,415,510,597,969,143,000
40.022523
118
0.65521
false
3.994298
false
false
false
pade/sprinkler
src/channel.py
1
3188
# -*- coding: UTF-8 -*- ''' Created on 29 août 2016 @author: dassierp ''' import logging from progdays import Progdays class Channel(): ''' Control a water channel ''' def __init__(self, pName, pChNumber, pHwInterface): ''' Constructor @param pName: channel name @para...
gpl-3.0
-1,962,895,549,548,024,300
27.711712
77
0.531534
false
3.929716
false
false
false
Letractively/rdflib
rdflib/plugins/parsers/notation3.py
1
78910
#!/usr/bin/env python u""" notation3.py - Standalone Notation3 Parser Derived from CWM, the Closed World Machine Authors of the original suite: * Dan Connolly <@@> * Tim Berners-Lee <@@> * Yosi Scharf <@@> * Joseph M. Reagle Jr. <reagle@w3.org> * Rich Salz <rsalz@zolera.com> http://www.w3.org/2000/10/swap/notation3....
bsd-3-clause
-6,180,058,760,584,588,000
31.715589
290
0.48554
false
3.804175
false
false
false
ieugen/Teachingbox
usercontrib/crawler3D/python/pyui/grid.py
1
8378
# PyUI # Copyright (C) 2001-2002 Sean C. Riley # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope that it will be useful...
gpl-3.0
-7,408,309,931,645,807,000
34.907489
100
0.584149
false
3.611207
false
false
false
mridang/django-eggnog
eggnog/management/commands/checkupdates.py
1
2002
from threading import Thread from pkg_resources import * from django.core.management.base import BaseCommand, CommandError from yolk.setuptools_support import get_pkglist from yolk.yolklib import get_highest_version, Distributions from yolk.pypi import CheeseShop from eggnog.models import Update class Command(BaseC...
bsd-3-clause
-1,709,283,128,330,770,400
32.366667
123
0.608891
false
4.259574
false
false
false
IdahoDataEngineers/vcardz
vcardz/data.py
1
2577
# # Kontexa vCard data structure and processing # from email.utils import parseaddr import re from six.moves.urllib.parse import urlparse from .atom import Atom from .bag import Bag from .utils import new_id REX_BEGIN = "^BEGIN:VCARD" REX_END = "END:VCARD$" REX_PHONE_NUMBERS = "\+?1? *\(?([0-9]{3})\)?[-. ]?([0-9]{3}...
gpl-2.0
9,038,364,064,295,289,000
17.810219
155
0.503686
false
3.093637
false
false
false
aerkalov/Booktype
lib/booki/editor/management/commands/bookrename.py
1
3217
# This file is part of Booktype. # Copyright (c) 2012 Aleksandar Erkalovic <aleksandar.erkalovic@sourcefabric.org> # # Booktype 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 Li...
agpl-3.0
7,888,365,485,220,761,000
34.744444
138
0.588126
false
4.272244
false
false
false
idegtiarov/gnocchi-rep
gnocchi/ceilometer/utils.py
1
1259
# # Copyright 2015 eNovance # # 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
-8,211,332,044,180,262,000
39.612903
75
0.746624
false
3.735905
false
false
false
mshunshin/SegNetCMR
pydicom/charset.py
1
5681
# charset.py """Handle alternate character sets for character strings.""" # # Copyright (c) 2008-2012 Darcy Mason # This file is part of pydicom, released under a modified MIT license. # See the file license.txt included with this distribution, also # available at https://github.com/darcymason/pydicom # from pyd...
mit
4,459,642,833,566,833,000
36.375
101
0.607816
false
3.487416
false
false
false
Krigu/python_fun
Heidi/FileParser.py
1
1629
TORCH_START_VALUE = 15 THING_START_VALUE = 20 INVISIBLE_START_VALUE = 21 FANTASTIC_START_VALUE = 3 class Story: heros = ["Heidi", "Fantastic", "Tourch", "Thing", "Invisible"] heidi = 0 fantastic = FANTASTIC_START_VALUE torch = TORCH_START_VALUE thing = THING_START_VALUE invisible = INVISIBLE_...
gpl-3.0
7,884,140,570,094,559,000
23.313433
66
0.54205
false
3.351852
false
false
false
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/utility/techsupport_args.py
1
1326
# # Copyright (c) 2008-2015 Citrix 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
4,549,954,713,833,272,300
28.466667
142
0.706637
false
3.574124
false
false
false
cheapjack/MemoryCraft
MemoryCloud1.py
1
1993
#!/usr/bin/python #Install the modules we need #from pyfirmata import Arduino, util, INPUT from mcpi import minecraft from mcpi import minecraftstuff from time import sleep import server import serial # Set up a connection to the Arduino/Shrimp if we need it #PORT = "/dev/tty.SLAB_USBtoUART" #ser = serial.Serial(PORT...
mit
4,954,500,081,771,976,000
35.907407
197
0.707978
false
2.733882
false
false
false
Bobox214/ZemkaBot
tools/kbHit.py
1
1619
import sys import termios import atexit from select import select class KBHit(object): def __init__(self): '''Creates a KBHit object that you can call to do various keyboard things. ''' # Save the terminal settings self.fd = sys.stdin.fileno() self.new_term = termios.tcgetattr(self.fd) self.old_term = te...
mit
9,086,489,840,359,184,000
22.128571
76
0.650401
false
2.922383
false
false
false
axce1/PyProjects
Graphics/watermark.py
1
1104
import Image, ImageEnhance def add_watermark(image, watermark, opacity=1, wm_interval=None): assert opacity >= 0 and opacity <= 1 if opacity < 1: if watermark.mode != 'RGBA': watermark = watermark.convert('RGBA') else: watermark = watermark.copy() alpha = waterm...
gpl-2.0
2,413,271,779,597,631,000
33.5
76
0.601449
false
3.266272
false
false
false
codingenesis/ansible_mysql_rds_playbook
hack/rds.py
1
44216
#!/usr/bin/python # This file is part of Ansible # # Ansible 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. # # Ansible is distributed...
gpl-3.0
3,260,466,123,463,195,600
39.087035
322
0.635811
false
4.014891
false
false
false
jnimmo/pyenvisalink
pyenvisalink/honeywell_client.py
1
10341
import logging import json import re import asyncio from pyenvisalink import EnvisalinkClient from pyenvisalink.honeywell_envisalinkdefs import * _LOGGER = logging.getLogger(__name__) class HoneywellClient(EnvisalinkClient): """Represents a honeywell alarm client.""" @asyncio.coroutine def keep_a...
mit
-3,805,397,457,246,989,300
50.447761
198
0.582922
false
4.087352
false
false
false
caladrel/trueskill_kicker
league/migrations/0001_initial.py
1
3950
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Match', fields=[ ...
apache-2.0
6,388,180,689,287,207,000
43.382022
225
0.533418
false
4.084798
false
false
false
zcbenz/cefode-chromium
tools/telemetry/telemetry/core/chrome/browser_backend.py
1
7145
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import urllib2 import httplib import socket import json import re import sys from telemetry.core import util from telemetry.core import exceptions from ...
bsd-3-clause
-2,395,234,556,662,840,000
32.70283
80
0.684955
false
3.965039
false
false
false
KazDragon/munin
conanfile.py
1
2093
from conans import ConanFile, CMake, tools class MuninConan(ConanFile): name = "munin" license = "MIT" author = "KazDragon" url = "https://github.com/KazDragon/munin" description = "A text-based gui component library build on Terminal++" topics = ("ansi-escape-codes", "text-ui") settings =...
mit
1,457,283,711,952,135,400
39.25
99
0.584329
false
3.425532
false
false
false
Zanzibar82/streamondemand.test
channels/cinestreaming01.py
1
4463
# -*- coding: utf-8 -*- #------------------------------------------------------------ # streamondemand.- XBMC Plugin # Canal para cinestreaming01.com # http://blog.tvalacarta.info/plugin-xbmc/streamondemand. #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os, sys ...
gpl-3.0
-8,911,400,560,965,957,000
43.62
299
0.6645
false
3.235678
false
false
false
serge-sans-paille/pythran
pythran/tests/cases/stone.py
1
5387
#pythran export whetstone(int) #runas whetstone(2*10**2) #bench whetstone(1500) """ /* * C Converted Whetstone Double Precision Benchmark * Version 1.2 22 March 1998 * * (c) Copyright 1998 Painter Engineering, Inc. * All Rights Reserved. * * Permission is granted to use, duplicate, and...
bsd-3-clause
8,200,889,701,506,693,000
24.899038
97
0.484685
false
2.75409
false
false
false
Socialsquare/RunningCause
challenges/tasks.py
1
1414
# coding: utf8 from __future__ import absolute_import import datetime from celery import shared_task from celery.utils.log import get_task_logger from django.utils.translation import ugettext as _ from django.core.mail import send_mail from django.contrib.auth import get_user_model from django.conf import settings f...
mit
-5,044,719,315,472,939,000
25.679245
66
0.683876
false
3.750663
false
false
false
JTarball/tetherbox
docker/app/app/backend/apps/services/migrations/0001_initial.py
1
3463
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0002_auto_20150616_2121'), migrations.swappable_dependency(settings...
isc
-504,606,766,729,863,940
42.2875
182
0.556743
false
4.405852
false
false
false
david-martin/atomic-reactor
tests/test_inner.py
1
20378
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals import json import os from atomic_reactor.build import InsideBuilder from atomic_reactor.util impor...
bsd-3-clause
-4,677,298,146,013,047,000
30.159021
97
0.48464
false
4.598962
true
false
false
migasfree/migasfree-backend
migasfree/client/models/error.py
1
4593
# -*- coding: utf-8 -*- # Copyright (c) 2015-2021 Jose Antonio Chavarría <jachavar@gmail.com> # Copyright (c) 2015-2021 Alberto Gacías <alberto@migasfree.org> # # 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 Softw...
gpl-3.0
349,263,582,367,790,340
27.515528
101
0.597691
false
4.110116
false
false
false
stscieisenhamer/glue
glue/utils/tests/test_matplotlib.py
2
5186
from __future__ import absolute_import, division, print_function import pytest import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Circle from matplotlib.artist import Artist from numpy.testing import assert_allclose from matplotlib.backends.backend_agg import FigureCanvasAgg from glue...
bsd-3-clause
2,965,087,516,347,311,000
28.299435
103
0.604126
false
3.047004
true
false
false
wooey/Wooey
wooey/migrations/0018_userfile.py
1
1037
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import wooey.models.mixins class Migration(migrations.Migration): dependencies = [ ('wooey', '0017_wooeyfile_generate_checksums'), ] operations = [ migrations.CreateModel( ...
bsd-3-clause
1,396,863,322,107,834,600
33.566667
127
0.594986
false
3.942966
false
false
false
jfalkner/report_data
report_data/check.py
1
3654
from datetime import datetime from datetime import timedelta from datetime import date class SanityChecker: """Validate input from URL arguments. This helps keep code that needs to check input succinct and consistent across the various reports. The main purpose for encapsulating these methods is so t...
mit
3,428,162,843,007,612,000
40.05618
78
0.574165
false
4.344828
false
false
false
CMacKinnon101/pokemon-python-api-adapter
get_cards_from_sets.py
1
3637
#Modules import configparser from pokemontcgsdk import Set from pokemontcgsdk import Card from pymongo import MongoClient #Config Config = configparser.ConfigParser() Config.read("settings.ini") host = Config.get("db", "host") port = Config.get("db", "port") user = Config.get("db", "user") password = Config.get("db", ...
mit
3,130,499,382,758,920,000
35.38
110
0.606819
false
3.405431
true
false
false
michaldz44/pyG-Attract
golem.py
1
3778
import math import pdb class Golem(object): def __init__(self, x, y, args, attractors,golem_number): self.attractors=attractors self.args=args self.position=complex(x,y) self.velocity=complex(0,0) #self.acceleration_previous=self.attractors.get_force(self.position,self.veloc...
gpl-2.0
6,252,138,201,953,294,000
35.679612
153
0.618052
false
3.409747
false
false
false
KnowledgeLinks/rdfframework
rdfframework/utilities/valuecalculator.py
1
1389
import datetime import pytz # try: # from rdfframework.utilities import iri, uri # except ImportError: # # Try Local Import # from . import iri, uri # def calculate_default_value(field): # '''calculates the default value based on the field default input''' # _calculation_string = field.get("kds_de...
mit
-6,869,284,743,283,799,000
39.852941
91
0.572354
false
3.481203
false
false
false
aliunsal/blog
Blogs/models.py
1
1247
from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.generic import GenericForeignKey, GenericRelation class Comment(models.Model): content = models.TextField(null=False) date = models.DateTimeField...
gpl-2.0
1,953,466,976,391,067,100
31.842105
82
0.705694
false
4.212838
false
false
false
botswana-harvard/edc-visit-tracking
edc_visit_tracking/form_validators/visit_form_validator.py
1
4772
from django import forms from edc_constants.constants import OTHER, ALIVE, DEAD, YES, UNKNOWN from edc_constants.constants import PARTICIPANT, NO from edc_form_validators import FormValidator from edc_form_validators.base_form_validator import REQUIRED_ERROR,\ INVALID_ERROR from ..constants import MISSED_VISIT, LO...
gpl-2.0
4,630,544,670,171,520,000
38.438017
81
0.582775
false
4.455649
false
false
false
pyload/pyload
src/pyload/plugins/downloaders/ZDF.py
1
2269
# -*- coding: utf-8 -*- import re import json import os from pyload.core.network.request_factory import get_url import xml.etree.ElementTree as etree import pycurl from ..base.downloader import BaseDownloader # Based on zdfm by Roland Beermann (http://github.com/enkore/zdfm/) class ZDF(BaseDownloader): __name__...
agpl-3.0
-6,561,568,899,936,143,000
32.865672
88
0.527545
false
3.59588
false
false
false
seleniumbase/SeleniumBase
seleniumbase/core/download_helper.py
1
2057
import os import shutil import time from seleniumbase.config import settings from seleniumbase.fixtures import constants # The "downloads_folder" is a folder for saving downloaded files. # Works for downloads initiated by Chromium and Firefox WebDriver clicks. # Browser type doesn't matter if using self.download_file(...
mit
-4,152,373,432,248,076,000
36.4
79
0.674283
false
3.933078
false
false
false
CountZer0/PipelineConstructionSet
python/maya/site-packages/pymel-1.0.5/pymel/core/nodetypes.py
1
123778
""" Contains classes corresponding to the Maya type hierarchy, including `DependNode`, `Transform`, `Mesh`, and `Camera`. """ import sys, os, re import inspect, itertools, math import pymel.util as _util import pymel.internal.pmcmds as cmds #@UnresolvedImport import pymel.internal.factories as _factories import pymel....
bsd-3-clause
638,128,032,992,870,800
36.748704
531
0.560318
false
3.778097
false
false
false
google-research/google-research
optimizing_interpretability/imagenet/utils.py
1
6411
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
4,932,138,354,840,355,000
33.842391
80
0.676182
false
3.740373
false
false
false
lorddex/linux_tools
virtual_testbeds/add_hosts.py
1
2360
#!/usr/bin/python # script that adds a VM who requests an IP address using the dhcpd to local hosts file import sys import subprocess import string import time debug_file="/var/log/add_hosts.log" def debug(message): message = time.strftime("%d %b %Y %H:%M:%S") + " " + message print message fd = open(debug_file, "...
mit
8,233,084,119,662,574,000
20.454545
86
0.642373
false
2.610619
false
false
false
jromang/retina
gui/workspace.py
1
1423
# Copyright (C) 2013-2016 Jean-Francois Romang (jromang@posteo.de) # # 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. # #...
gpl-3.0
-2,353,139,725,358,365,700
33.707317
71
0.735067
false
3.774536
false
false
false
Hao-Liu/avocado
selftests/unit/test_xunit.py
1
1945
import argparse import unittest import os import sys from xml.dom import minidom import tempfile import shutil from avocado import Test from avocado.core.plugins import xunit from avocado.core import job class ParseXMLError(Exception): pass class _Stream(object): def start_file_logging(self, param1, param...
gpl-2.0
-2,193,562,886,374,426,000
23.3125
95
0.62108
false
3.690702
true
false
false
frac/celery
celery/signals.py
1
6128
""" ============== celery.signals ============== Signals allows decoupled applications to receive notifications when certain actions occur elsewhere in the application. :copyright: (c) 2009 - 2011 by Ask Solem. :license: BSD, see LICENSE for more details. .. contents:: :local: .. _signal-basics: Basics ====== ...
bsd-3-clause
-1,422,268,699,349,315,800
19.426667
75
0.6578
false
3.771077
false
false
false
fullmetalfelix/ML-CSC-tutorial
data/descriptor_codes/charge.mbtr.py
1
2490
from __future__ import print_function from describe.descriptors import LMBTR from describe.core import System from describe.data.element_data import numbers_to_symbols import numpy as np from scipy.sparse import lil_matrix, save_npz from read_binary import * data = read_b('../binary/database-mulliken-ccsd-spd.bin') d...
gpl-3.0
3,026,851,773,269,828,600
29.740741
107
0.538554
false
3.180077
false
false
false
arnau-prat/My-Raspersonal-assistant
assets/brain.py
1
1572
#!/usr/bin/python # -*- coding: utf-8 -*- import cv2 import threading import time import subprocess import os import signal from datetime import datetime from modules import tracker, calendar, alarm, wolfram, music class Brain: def __init__(self): self.tracker = tracker.Tracker() self.alarm = alarm....
mit
-7,316,954,540,866,034,000
25.2
62
0.583333
false
3.454945
false
false
false
tomadasocial/tomada-social
tomadasocial/settings.py
1
3965
""" Django settings for tomadasocial project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, .....
gpl-2.0
-515,293,318,295,498,900
28.819549
123
0.735183
false
3.25
false
false
false
tmaiwald/OSIM
OSIM/Optimizations/OptimizationComponents/Optimizable.py
1
1217
class Optimizable(object): def __init__(self,comp_names_list,paramname,valfrom,valto,**kwargs): self.names = comp_names_list self.paramname = paramname self.minStep = 2 #default self.vFrom = valfrom self.vTo = valto self.val = 0 for name, value in kwargs.it...
bsd-2-clause
6,869,095,868,445,226,000
22.862745
72
0.557108
false
3.888179
false
false
false
pymedusa/SickRage
medusa/init/logconfig.py
1
2929
# coding=utf-8 """Monkey-patch logger functions to accept enhanced format styles.""" from __future__ import unicode_literals import logging from builtins import object try: from inspect import getfullargspec except ImportError: from inspect import getargspec as getfullargspec from six import text_type clas...
gpl-3.0
4,170,883,745,947,611,000
26.632075
120
0.613861
false
4.251089
false
false
false
zagl/led-tool
ui_main.py
1
27811
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui_main.ui' # # Created: Sun Apr 3 16:50:44 2016 # by: PyQt4 UI code generator 4.11.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attrib...
gpl-3.0
8,376,805,521,591,974,000
64.893365
190
0.706405
false
3.624951
false
false
false
ukch/refugeedata
refugeedata/distribution/decorators.py
1
2228
import datetime import functools from pyratemp import TemplateSyntaxError, TemplateRenderError from django.contrib.auth import PermissionDenied from django.shortcuts import get_object_or_404, redirect, render from refugeedata.models import Distribution, Template from .forms import DistributionHashForm def standar...
mit
-3,910,878,151,373,112,300
35.52459
79
0.584829
false
4.740426
false
false
false
Distrotech/reportlab
src/reportlab/platypus/flowables.py
1
72939
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/flowables.py __version__=''' $Id$ ''' __doc__=""" A flowable is a "floating element" in a document whose exact position is determined by the o...
bsd-3-clause
4,462,128,863,631,193,600
35.542585
152
0.5512
false
3.803066
false
false
false
blendit/crowd
GUI_crowd_MapPanel.py
1
6603
import bpy from bpy.types import Menu, Panel from bpy.props import * import os import sys import subprocess import ast script_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(script_dir) # Get system's python path proc = subprocess.Popen('python3 -c "import sys; prin...
gpl-3.0
137,303,051,667,729,950
25.625
103
0.593518
false
3.394859
false
false
false
stefantkeller/VECSELsetup
exp/eval/light_light.py
1
8684
#! /usr/bin/python2.7 # -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt import errorvalues as ev # github.com/stefantkeller/errorvalues from VECSELsetup.eval.varycolor import varycolor from VECSELsetup.eval.gen_functions import load, extract, plotinstructions_write, plotinstructions_read, lu...
mit
7,744,530,179,776,189,000
37.767857
206
0.551474
false
3.202065
false
false
false
jenisys/behave
examples/async_step/features/environment.py
2
1530
# -*- coding: UTF-8 -*- from behave.tag_matcher import ActiveTagMatcher, setup_active_tag_values from behave.api.runtime_constraint import require_min_python_version from behave import python_feature # ----------------------------------------------------------------------------- # REQUIRE: python >= 3.4 # ----------...
bsd-2-clause
-7,307,714,831,485,707,000
38.230769
79
0.515033
false
4.608434
false
false
false