repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
nicholas-moreles/blaspy
blaspy/level_3/syr2k.py
1
5321
""" Copyright (c) 2014-2015-2015, The University of Texas at Austin. All rights reserved. This file is part of BLASpy and is available under the 3-Clause BSD License, which can be found in the LICENSE file at the top-level directory or at http://opensource.org/licenses/BSD-3-Clause """ from ..he...
bsd-3-clause
-4,301,542,516,958,458,000
42.268293
100
0.59782
false
leapcode/soledad
tests/sync/test_sync_target.py
1
37214
# -*- coding: utf-8 -*- # test_sync_target.py # Copyright (C) 2013, 2014 LEAP # # 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 v...
gpl-3.0
-8,494,694,809,284,395,000
37.444215
79
0.576584
false
Edgar-Bruno/Estudos_iniciais_Python
GTK/sudoku/exemplos/telaexemplo.py
1
1908
#!/usr/bin/env python # -*- coding: utf-8 -*- #Exemplo de tela para montar o jogo SUDOKU import pygtk pygtk.require('2.0') import gtk class Aplicacao: def __init__(self): self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.set_title("Sudoku") self.window.connect('destroy', lambda w: gtk.main_quit()) ...
gpl-3.0
7,216,871,628,185,183,000
18.670103
71
0.527254
false
elterminad0r/cipher_tools
src/scripts/advent.py
1
1360
""" merry christmas """ import datetime import argparse def get_args(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("nothing", type=str) parser.add_argument("--infinity", action="store_true") return parser.parse_args() xm_form = "{days:02} days, {hours:02} hours, {minute...
gpl-3.0
1,804,011,296,876,668,400
36.777778
119
0.621324
false
google/tf-quant-finance
tf_quant_finance/experimental/pricing_platform/framework/equity_instruments/american_option/american_option_impl_test.py
1
9151
# Lint as: python3 # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
apache-2.0
3,343,212,357,624,475,000
38.786957
95
0.618621
false
mborho/baas
baas/plugins/maemo.py
1
4277
# -*- coding: utf-8 -*- # Copyright 2009 Martin Borho <martin@borho.net> # GPL - see License.txt for details from urllib import urlencode, quote_plus from baas.core.plugins import Plugin from baas.core.helpers import strip_tags, xmlify, htmlentities_decode, load_url try: # appengine from django.utils import si...
gpl-3.0
-6,609,921,343,890,420,000
31.157895
96
0.498246
false
loghaan/warmice
lib/python/warmice/docengine/rst/writers.py
1
1653
from docutils import utils from docutils.writers import html4css1 from warmice import config class HTMLWriter(html4css1.Writer): def __init__(self): html4css1.Writer.__init__(self) self.translator_class = HTMLTranslator def translate(self): html4css1.Writer.translate(self) se...
gpl-3.0
-21,095,475,573,128,116
30.188679
118
0.61827
false
pycollada/meshtool
meshtool/filters/panda_filters/pdae_utils/__init__.py
1
2500
try: from pdae_cython import * except ImportError: from pdae_python import * import unittest import time import os try: import cStringIO as StringIO except ImportError: import StringIO CURDIR = os.path.abspath(os.path.dirname(__file__)) class PM_OP: INDEX_UPDATE = 1 TRIANGLE_ADDITION = 2 ...
bsd-3-clause
1,694,289,745,187,187,500
33.722222
144
0.4664
false
will-cromar/needy
recent_trend.py
1
3087
from sklearn import linear_model from matplotlib import pyplot from price_parsing import * from xkcd import xkcdify from datetime import datetime DEFAULT_SAMPLES = 50 DEFUALT_LOOKBACK = 200 def extendGraphByN(X, n): """ Extend the domain of X by n :param X: The current domain in sklearn format :param...
mit
-4,323,322,907,432,731,000
32.565217
107
0.694525
false
vollov/nosql-testable
tests/unit/api/test_auth.py
1
1685
import logging, unittest logger=logging.getLogger('app') from utils.testcases import TestCase import server_8000, json from api.auth import Authen class TestAuthen(unittest.TestCase): ''' Test Authen class ''' def test_generate_auth_token(self): uid = '56840a2db37b6c16a0ef1b6a' s...
mit
3,698,679,787,479,208,400
38.186047
127
0.645697
false
openstack/swift
test/unit/account/test_server.py
1
135834
# Copyright (c) 2010-2012 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 agree...
apache-2.0
-5,754,865,502,125,872,000
46.744815
79
0.519612
false
bmcfee/pumpp
pumpp/sampler.py
1
9158
#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' Data subsampling ================ .. autosummary:: :toctree: generated/ Sampler SequentialSampler VariableLengthSampler ''' from itertools import count import numpy as np from .base import Slicer from .exceptions import ParameterError, DataError _...
isc
490,653,026,509,169,000
27.61875
83
0.56366
false
MacHu-GWU/single_file_module-project
sfm/winzip.py
1
4194
# -*- coding: utf-8 -*- """ A file compress utility module. You can easily programmatically add files and directorys to zip archives. And compress arbitrary binary content. - :func:`zip_a_folder`: add folder to archive. - :func:`zip_everything_in_a_folder`: add everything in a folder to archive. - :func:`zip_many_fil...
mit
-8,784,013,377,599,383,000
22.86755
80
0.586293
false
DarkPhoenix6/My_Libraries
Python/AES/matrix.py
1
5923
import sys import hashlib import binascii import os import struct import copy from cryptography.hazmat.primitives import padding, hashes from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.backends import default_backend from Utils import methoddispatch, singledispatch,...
gpl-3.0
8,222,050,417,249,060,000
28.467662
110
0.539423
false
jeroanan/zoetrope
lib/boincindicator/resulttypes/AvailableProject.py
1
1623
# Copyright (c) David Wilson 2015, 2016, 2021 # # Licensed under the GPL version 3 import lib.boincindicator.basetypes.Struct as struct import lib.boincindicator.util.xmlutil as xmlutil from xml.etree import ElementTree class AvailableProject(struct.Struct): def __init__(self): self.fields = [ ...
gpl-3.0
2,428,483,349,158,260,700
23.223881
67
0.518792
false
bigartm/visartm
algo/assessment/close_topics.py
1
4493
from models.models import ArtmModel, Topic import json import numpy as np # Number of assessment for each topic. ASSESS_RATIO = 5 def initialize_problem(problem): if problem.model: topics = dict() for topic in problem.model.get_topics(layer=problem.layer): topics[str(topic.index_id)] ...
bsd-3-clause
-7,461,193,080,389,600,000
28.366013
79
0.600045
false
hillscottc/quiz2
quiz2/apps/quiz/urls.py
1
1090
"""Quiz urls.""" from django.conf.urls import patterns, url, include from quiz2.apps.quiz import views from quiz2.apps.quiz.admin import quiz_admin_site from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', url(r'^$', views.home, name='quizapp_home'), url(r'^quiz/index/$', vi...
agpl-3.0
1,663,108,797,148,299,500
36.586207
89
0.63578
false
ngautam0/keras-pro-bar
setup.py
1
1143
from setuptools import setup, find_packages long_description = open('README.rst').read() setup(name='keras_tqdm', version='1.0.7', install_requires=['Keras', 'tqdm'], author="Ben Striner", author_email="bstriner@gmail.com", url="https://github.com/bstriner/keras-tqdm", download_url...
mit
-1,914,136,824,836,437,000
41.333333
82
0.63692
false
luigivieira/fsdk
fsdk/analysis/blink/compare.py
1
4238
#!/usr/bin/env python # # This file is part of the Fun SDK (fsdk) project. The complete source code is # available at https://github.com/luigivieira/fsdk. # # Copyright (c) 2016-2017, Luiz Carlos Vieira (http://www.luiz.vieira.nom.br) # # MIT License # # Permission is hereby granted, free of charge, to any person obtai...
mit
-2,815,348,760,164,422,000
31.860465
80
0.595328
false
jdepoix/goto_cloud
goto_cloud/migration_commander/device_modification.py
1
3114
from command.public import SourceCommand from remote_execution.public import RemoteHostExecutor class DeviceModifyingCommand(SourceCommand): """ a command supplying utility methods for command which iterate over the devices of the source and target """ def _execute_on_every_device(self, executable_fo...
mit
591,644,863,359,631,000
48.428571
119
0.594733
false
stikonas/calamares
src/modules/plymouthcfg/main.py
1
2339
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # === This file is part of Calamares - <https://github.com/calamares> === # # Copyright 2016, Artoo <artoo@manjaro.org> # Copyright 2017, Alf Gaida <agaida@siduction.org> # Copyright 2018, Gabriel Craciunescu <crazy@frugalware.org> # Copyright 2019, Adriaan de Gr...
gpl-3.0
-5,162,571,362,015,826,000
32.414286
79
0.643865
false
leandroreox/gnocchi
gnocchi/incoming/file.py
1
7168
# -*- encoding: 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, so...
apache-2.0
-9,196,363,424,417,275,000
37.956522
78
0.578404
false
mmagnus/rna-pdb-tools
setup.py
1
6393
from setuptools import setup, find_packages import versioneer # read the contents of your README file with open('README.md') as f: long_description = f.read() setup( name='rna_tools', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), packages=find_packages(), test_suite...
gpl-3.0
9,207,147,132,306,415,000
48.176923
96
0.618333
false
MontpellierRessourcesImagerie/openmicroscopy
components/tools/OmeroWeb/omeroweb/webgateway/views.py
1
105421
#!/usr/bin/env python # -*- coding: utf-8 -*- # # webgateway/views.py - django application view handling functions # # Copyright (c) 2007-2015 Glencoe Software, Inc. All rights reserved. # # This software is distributed under the terms described by the LICENCE file # you can find at the root of the distribution bundle,...
gpl-2.0
-5,965,343,648,575,260,000
35.02905
79
0.562231
false
bigoldboy/repository.bigoldboy
plugin.video.VADER/plugintools.py
1
18797
# -*- coding: utf-8 -*- #--------------------------------------------------------------------------- # Plugin Tools v1.0.8 #--------------------------------------------------------------------------- # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Based on code from youtube, parsedom and pelisalacarta addon...
gpl-3.0
1,719,842,315,153,659,100
55.942424
260
0.657708
false
esparta/escrapper
escrapper/websvn.py
1
3417
""" Scrapper thinking on produce an "API" fot the WebSVN portal. """ from __future__ import absolute_import from __future__ import unicode_literals from .exceptions import InvalidWebSVN from .escrapper import _BaseScrapper class WebSVN(_BaseScrapper): """"WebSVN class, a way to produce an interface to WebSVN port...
bsd-3-clause
1,679,482,211,295,812,600
37.829545
77
0.533802
false
a-iv/django-oscar-robokassa
robokassa/forms.py
1
6721
#coding: utf-8 from hashlib import md5 from urllib import urlencode from django import forms from robokassa.conf import LOGIN, PASSWORD1, PASSWORD2 from robokassa.conf import STRICT_CHECK, FORM_TARGET, EXTRA_PARAMS from robokassa.models import SuccessNotification class BaseRobokassaForm(forms.Form): def __init_...
mit
-2,538,329,252,046,368,000
34.569697
103
0.652241
false
danny200309/anaconda
anaconda_lib/jedi/evaluate/imports.py
1
22065
""" :mod:`jedi.evaluate.imports` is here to resolve import statements and return the modules/classes/functions/whatever, which they stand for. However there's not any actual importing done. This module is about finding modules in the filesystem. This can be quite tricky sometimes, because Python imports are not always ...
gpl-3.0
-7,104,660,979,470,788,000
39.118182
94
0.550782
false
jasonleaster/MIT_6.034_2015
lab6/neural_net_api.py
1
7441
from copy import deepcopy from random import shuffle def distinct(seq): seen = set() seen_add = seen.add return [x for x in seq if not (x in seen or seen_add(x))] def approx_equal(a, b, epsilon): return abs(a-b) <= epsilon class Wire: """A Wire is a directed edge that can be used in a neural net ...
gpl-2.0
-8,235,425,918,135,237,000
41.039548
80
0.60852
false
cassiopagnoncelli/hacker-rank-solutions
no-prefix-set.py
1
1036
class Trie: def __init__(self, final): self.final = final self.children = {} def insert(self, word): head = word[0] tail = word[1:] # Check string in trie prefixes `word' if self.final: return False # Check `word' prefixes string in trie if len(tail) == 0 and head in self.child...
mit
6,676,781,716,807,010,000
23.666667
48
0.574324
false
swones/swa
swa/swa/settings.py
1
2669
""" Django settings for swa project. Generated by 'django-admin startproject' using Django 1.8. 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 insi...
mit
7,360,998,102,711,921,000
24.663462
71
0.688647
false
astrorafael/twisted-mqtt
mqtt/client/interfaces.py
1
10411
# ---------------------------------------------------------------------- # Copyright (C) 2015 by Rafael Gonzalez # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, includi...
mit
-6,608,508,601,109,586,000
34.411565
130
0.587648
false
bokeh/bokeh
bokeh/command/subcommands/serve.py
1
34929
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
bsd-3-clause
5,120,128,224,446,226,000
36.317308
114
0.587363
false
tietokilta-saato/tikplay
tikplay/provider/retrievers/generic_url.py
1
2929
#!/usr/bin/env python # Part of tikplay import json import os.path import re import requests from provider.retriever import Retriever from utils import is_url from utils.shell import call_subprocess class GenericURLRetriever(Retriever): """ A generic URL retriever that tries to guess whether or not the given...
mit
2,858,346,626,176,938,500
36.564103
119
0.619324
false
kishorvpatil/incubator-storm
storm-client/test/py/test_storm_cli.py
4
25396
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
apache-2.0
1,545,598,754,115,082,000
54.573304
382
0.535163
false
betoesquivel/onforums-application
scraper/guardianukscraper/spiders/guardian_spider.py
1
3388
import scrapy from ..items import Article, Comment class GuardianSpider(scrapy.Spider): name = "guardian" allowed_domains = ["theguardian.com"] start_urls = [ "http://www.theguardian.com/world/2016/feb/09/draft-snoopers-charter-fails-on-spying-powers-and-privacy-protections" ] def __init_...
mit
-9,153,423,322,902,463,000
46.71831
132
0.58294
false
NeCTAR-RC/reporting-api
reporting_api/common/apiversion.py
1
1421
"""Abstract base class representing a particular version of an API spoken by a WSGI application. """ import abc from reporting_api.common.authapp import KeystoneApplication import six @six.add_metaclass(abc.ABCMeta) class APIVersion(KeystoneApplication): """Abstract base class representing a particular version o...
apache-2.0
3,773,508,065,367,772,000
28
81
0.640394
false
Tasignotas/topographica_mirror
topo/__init__.py
1
9052
""" Topographica cortical map simulator package. Topographica is designed as a collection of packages from which elements can be selected to model specific systems. For more information, see the individual subpackages:: base - Core Topographica functions and classes plotting - Visualization funct...
bsd-3-clause
1,925,826,865,890,619,600
34.085271
107
0.717963
false
mfalcon/edujango
students/forms.py
1
3399
# -*- encoding: utf-8 -*- from django import forms from django.forms import ModelForm, DateInput from django.contrib.admin import widgets from django.utils.translation import ugettext as _ from django.contrib.auth.forms import UserCreationForm, UserChangeForm from django.forms.models import inlineformset_factory from...
apache-2.0
-153,046,324,614,179,500
25.554688
101
0.588114
false
pombredanne/invenio
modules/bibrank/lib/bibrank_citation_indexer.py
1
45915
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 CERN. ## ## Invenio 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 ve...
gpl-2.0
2,849,965,339,248,839,000
41.79124
138
0.570511
false
danking/hail
benchmark/python/benchmark_hail/compare/compare.py
1
4108
import json import os import sys import math from scipy.stats.mstats import gmean, hmean import numpy as np def load_file(path): if path.endswith('.json'): with open(path, 'r') as f: js_data = json.load(f) elif path.endswith('.tsv'): import pandas as pd js_data = pd.read_t...
mit
-4,945,264,358,493,164,000
31.346457
119
0.562074
false
lorensen/VTKExamples
src/Python/PolyData/IterateOverLines.py
1
1442
#!/usr/bin/env python # -*- coding: utf-8 -*- import vtk def main(): origin = [0.0, 0.0, 0.0] p0 = [1.0, 0.0, 0.0] p1 = [0.0, 1.0, 0.0] p2 = [0.0, 1.0, 2.0] p3 = [1.0, 2.0, 3.0] # Create a vtkPoints object and store the points in it. points = vtk.vtkPoints() points.InsertNextPoint(ori...
apache-2.0
-6,862,633,042,450,291,000
27.84
85
0.626214
false
ubiar/odoo
openerp/models.py
1
283476
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
7,229,094,870,013,787,000
45.624013
247
0.5518
false
BinaryDragonStudios/ArenaGame
parse-cards.py
1
1335
#!/usr/bin/env python # Use the built in json and sqlite library import json import sqlite3 def main(): # Running card counter card_count = 0 # Load all json data into a collection card_data = json.load(open('cards.collectible.json')) # Connect to our database and creat table if it doesn't e...
mit
1,264,251,716,106,469,400
31.560976
135
0.563296
false
tridesclous/tridesclous
tridesclous/tests/test_peakdetector.py
1
14308
from tridesclous import get_dataset from tridesclous.peakdetector import get_peak_detector_class import time import itertools import scipy.signal import numpy as np import sklearn.metrics.pairwise from matplotlib import pyplot from tridesclous.tests.test_signalpreprocessor import offline_signal_preprocessor from t...
mit
2,890,141,176,802,739,000
32.668235
134
0.581563
false
thusoy/porridge
tests/test_utils.py
1
1152
# coding: utf-8 from __future__ import unicode_literals import pytest from porridge.utils import ensure_bytes, b64_decode_raw, b64_encode_raw raw_b64_string = pytest.mark.parametrize('raw_b64_string', [ ('YQ', b'a'), ('YWE', b'aa'), ('YWFh', b'aaa'), ('', b''), ('AA==', b'\x00'), ('AA', b'\x...
mit
-4,669,228,385,685,359,000
20.259259
71
0.592334
false
Paul-Ezell/cinder-1
cinder/volume/drivers/huawei/huawei_driver.py
1
49899
# Copyright (c) 2015 Huawei Technologies Co., Ltd. # 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
2,286,386,708,563,684,400
40.617181
79
0.534319
false
3dfxsoftware/cbss-addons
mrp_product_capacity/__openerp__.py
1
1758
#!/usr/bin/python # -*- encoding: utf-8 -*- ############################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). # All Rights Reserved ############# Credits ######################...
gpl-2.0
4,289,824,770,116,090,000
39.883721
79
0.539818
false
eamonnmag/hepdata3
tests/migration_test.py
1
4243
# # This file is part of HEPData. # Copyright (C) 2015 CERN. # # HEPData is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # HEPData is...
gpl-2.0
9,050,371,435,572,144,000
35.264957
114
0.669102
false
ic-hep/DIRAC
docs/source/fakeEnvironment.py
1
4176
''' fakeEnvironment this module allows to create the documentation without having to do any kind of special installation. The list of mocked modules is: GSI ''' import mock import sys #............................................................................... # mocks... class MyMock(mock...
gpl-3.0
1,321,243,197,060,662,300
43.913978
82
0.50455
false
dmacias72/unRAID-plugins
source/qnotify/usr/local/emhttp/plugins/qnotify/PyQuassel/quassel.py
1
1670
from enum import IntEnum class Message(dict): class Type(IntEnum): Plain = 0x00001 Notice = 0x00002 Action = 0x00004 Nick = 0x00008 Mode = 0x00010 Join = 0x00020 Part = 0x00040 Quit = 0x00080 Kick = 0x00...
gpl-2.0
7,600,243,104,377,693,000
22.521127
162
0.57006
false
larsks/cloud-init
tests/unittests/test_datasource/test_maas.py
1
7693
# This file is part of cloud-init. See LICENSE file for license information. from copy import copy import mock import os import shutil import tempfile import yaml from cloudinit.sources import DataSourceMAAS from cloudinit import url_helper from cloudinit.tests.helpers import CiTestCase, populate_dir class TestMAAS...
gpl-3.0
175,731,028,989,221,120
37.273632
79
0.602886
false
babyliynfg/cross
tools/project-creator/Python2.6.6/Lib/ctypes/test/test_pickling.py
1
2263
import unittest import pickle from ctypes import * import _ctypes_test dll = CDLL(_ctypes_test.__file__) class X(Structure): _fields_ = [("a", c_int), ("b", c_double)] init_called = 0 def __init__(self, *args, **kw): X.init_called += 1 self.x = 42 class Y(X): _fields_ = [...
mit
6,449,797,813,562,283,000
25.26506
67
0.515687
false
Elico-Corp/odoo_OCB
addons/l10n_br/account.py
4
1811
# -*- encoding: utf-8 -*- import openerp from openerp.osv import fields, osv TAX_DEFAULTS = { 'base_reduction': 0, 'amount_mva': 0, 'amount_type': 'percent', } class account_tax_template(osv.osv): """ Add fields used to define some brazilian taxes ...
agpl-3.0
5,387,798,143,675,682,000
41.116279
92
0.440641
false
liucode/liucode.github.io
resume_tool/degree_extractor.py
1
1417
# encoding:utf-8 import re degree_str1 = u"(初中|高中|职高|中专|技校|大专|本科|硕士研究生|在职研究生|工程硕士|专业硕士|博士研究生|博士在读|MBA硕士|MBA|EMBA|工商管理硕士|工学学士|访问学者|博士后|研究生|硕士|博士|学士)" degree_pattern1 = re.compile(degree_str1) # 抽取学位信息,并将日期按照顺序排列存入list def degree_extract(str): result_list = [] school_list = degree_pattern1.findall(str) for ...
mit
761,579,270,386,665,600
25.2
121
0.599661
false
whitewhim2718/python-qinfer
src/qinfer/tests/test_region_estimates.py
1
7960
#!/usr/bin/python # -*- coding: utf-8 -*- ## # test_region_estimates.py: Checks that computed credible regions are working. ## # © 2014 Chris Ferrie (csferrie@gmail.com) and # Christopher E. Granade (cgranade@gmail.com) # # This file is a part of the Qinfer project. # Licensed under the AGPL version 3. ## # This...
agpl-3.0
-6,328,930,887,875,141,000
39
117
0.603342
false
MaximeBiset/care4care
branch/migrations/0002_auto_20141127_0251.py
1
1082
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import multiselectfield.db.fields class Migration(migrations.Migration): dependencies = [ ('branch', '0001_initial'), ] operations = [ migrations.AddField( model_name='jo...
agpl-3.0
-5,120,916,554,649,062,000
38.740741
477
0.591799
false
MJJoyce/climate
examples/configuration_file_examples/run_RCMES.py
1
11491
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may ...
apache-2.0
2,026,183,709,493,868,500
45.879167
138
0.651118
false
Amarite1/redlite
desktop.py
1
1703
''' ' This file is part of redlite. ' ' redlite 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. ' ' redlite is distributed in t...
gpl-3.0
-7,214,781,612,312,186,000
19.047059
71
0.701116
false
thehub/hubspace
hubspace/file_store.py
1
2693
from model import LocationFiles, MetaWrapper from hubspace.utilities.image_preview import create_image_preview import os import StringIO from sqlobject import AND import logging applogger = logging.getLogger("hubspace") def save_file(location, fd, height=None, width=None, upload_dir=''): """here we will need to ge...
gpl-2.0
7,480,806,417,860,378,000
35.890411
117
0.62384
false
vossman/ctfeval
appionlib/apSpider/operations.py
1
5633
## python import os import re import time ## appion from appionlib import apDisplay from appionlib import apFile from appionlib import spyder """ A large collection of SPIDER functions for that are common to other SPIDER functions I try to keep the trend image file: *****img.spi image stack file: *****stack.spi do...
apache-2.0
-5,093,390,546,841,311,000
27.306533
94
0.6327
false
TissueMAPS/TmServer
tmserver/error.py
1
4696
# TmServer - TissueMAPS server application. # Copyright (C) 2016 Markus D. Herrmann, University of Zurich and Robin Hafen # # 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...
agpl-3.0
-3,627,920,703,996,297,700
30.516779
80
0.629685
false
owais/django-allauth-slack
allauth_provider_slack/views.py
1
1727
import requests from allauth.socialaccount.providers.oauth2.client import OAuth2Error from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) from ....
mit
-7,026,433,891,981,775,000
31.584906
77
0.570932
false
stklik/tpg.now
tpgnow/server.py
1
2562
import os from .arguments import Arguments from .uiwriter import UiWriter, HtmlWriter, CLIFormatter, HtmlFormatter from .tpg import Tpg from config import Config from datetime import datetime from flask import render_template from jinja2 import Environment, FileSystemLoader, DebugUndefined, Template env = Environment...
mit
7,447,804,413,094,546,000
35.084507
129
0.664715
false
uclouvain/osis_louvain
assessments/business/score_encoding_progress.py
1
8093
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
-5,714,260,804,187,828,000
49.575
129
0.650395
false
hiker/stan
AOR/Test/ProgUnitTest.py
1
2186
#!/usr/bin/env python from Tools.Test import TestCase, TestSuite from AOR.ProgUnit import ProgUnit from AOR.Statements import Call from AOR.If import If, IfOnly from Grammar.Parser import ParserClass class ProgUnitTest(TestCase): def __init__(self): TestCase.__init__(self, 'ProgUnit Test') ...
gpl-3.0
4,451,205,267,849,166,000
35.433333
80
0.502287
false
Zchander/RPi-PowerFunctions
XMLRPC Server/xmlrpcServer/i2cBoard.py
1
2384
""" LEGO PowerFunctions I2C Server File: main.py Author: Xander Maas <xander@xjmaas.nl> Date: 10 oct 2014 LICENSE INFO: AS FOR NOW THIS SOFTWARE IS NOT TO BE PUBLISHED WITHOUT MY EXPLICIT WRITTEN PERMISSION ONLY. Copyright (c) Xander Maas, 2014 This programm will create a tcp b...
gpl-2.0
7,652,262,946,433,646,000
29.564103
93
0.701342
false
igryski/Indices_icclim_ClipC
src/calc_indices_icclim_RCM_TMAX_EUR_44.py
1
20842
# Make python script executable #!/usr/bin/python # Script name: calc_indices_icclim_RCM_PRECIP_EUR_44.py # ================================================== # Script to calculate indices from ensemble of RCMs (EURO-CORDEX) # on resolutions 0.44deg (50km) for CLIPC # This script does only TMAX indices # ===========...
gpl-3.0
-2,006,894,711,394,165,000
41.190283
106
0.517177
false
sseemayer/qstat-pretty
qstatpretty/ttyutil/table.py
1
3037
# -*- coding: utf8 -*- from qstatpretty.ttyutil.unicode import unicode, ulen DELIMITERS_FULL = { 'header_tl': u"┌", 'header_t': u"─", 'header_tr': u"┐", 'header_b': u"─", 'header_bl': u"├", 'header_l': u"│", 'header_r': u"│", 'header_br': u"┤", ...
gpl-2.0
-7,396,934,525,866,160,000
24.784483
127
0.457372
false
neutrinoceros/el4
diffgal/main.py
1
1098
#-*-coding:utf-8-*- from classes import * from functions import * from time import time import numpy as np import pylab as pl #------------------------- # script #------------------------- pl.ion() fig=pl.figure() print "sourcing %.1e particles..." % (SAMPLESIZE) t1=time() bench = CRSet(int(SAMPLESIZE)) print "too...
gpl-2.0
-7,135,156,615,798,624,000
18.963636
57
0.578324
false
jelly/calibre
src/calibre/gui2/dialogs/choose_library.py
1
7562
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import print_function __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os, errno from threading import Thread, Event from PyQt5.Qt import QDialog, ...
gpl-3.0
5,655,586,295,917,245,000
39.010582
128
0.562946
false
bbglab/adventofcode
2017/iker/day10.py
1
8740
""" --- Day 10: Knot Hash --- You come across some programs that are trying to implement a software emulation of a hash based on knot-tying. The hash these programs are implementing isn't very strong, but you decide to help them anyway. You make a mental note to remind the Elves later not to invent their own cryptogra...
mit
-1,022,563,351,272,090,000
63.740741
607
0.705835
false
calvingiles/cosine_transform
cosine_transform/__init__.py
1
1584
from __future__ import print_function, absolute_import, unicode_literals import numpy from numpy import sin, cos, arccos, dot, isclose, count_nonzero from scipy.spatial.distance import cosine, norm __author__ = 'calvin' def transform_to_similarity(v, s): if v.shape[0] < 2: raise ValueError('Cosine simila...
mit
9,018,148,642,783,472,000
21.971014
92
0.527778
false
tiagofrepereira2012/bob.learn.linear
bob/learn/linear/test.py
1
28647
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Andre Anjos <andre.anjos@idiap.ch> # Tue May 31 16:55:10 2011 +0200 # # Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland """Tests on the machine infrastructure. """ import os, sys import nose.tools import math import numpy from . import M...
bsd-3-clause
-8,985,137,233,965,356,000
28.441932
113
0.6312
false
sunlightlabs/tcamp
tcamp/twit/migrations/0003_auto__del_field_sessionblocktweet_next__add_field_sessionblocktweet_pr.py
1
6729
# -*- 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): # Deleting field 'SessionBlockTweet.next' db.delete_column(u'twit_sessionblocktweet', 'next_id') # ...
bsd-3-clause
-4,248,672,245,849,296,000
69.842105
197
0.565166
false
Movile/hecuba
setup.py
1
2266
#!/usr/bin/env python # -*- coding: utf-8 -*- """ hecuba setup script ~~~~~~~~~~~~~~~~~~~ Setup script for packaging hecuba :copyright: (c) 2016 by Hugo Cisneiros. :license: GPLv2, see LICENSE for more details. """ import io from hecuba import __version__ from os.path import abspath, dirname, join...
gpl-2.0
2,136,347,917,363,449,000
28.428571
75
0.575463
false
kracekumar/pythonbyexamplestutorial
apr-workshop/solutions/06-for-loop.py
1
2377
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Write a program to display the peom The Road Not Taken by Robert Frost. Two roads diverged in a yellow wood, And sorry I could not travel both And be one traveler, long I stood And looked down one as far as I could To where it bent in the undergrowth; Then took the ...
cc0-1.0
-3,627,289,049,480,599,600
26.275862
71
0.697851
false
cimat/data-visualization-patterns
display-patterns/Hierarchies/Pruebas/librerias.py
1
1712
import os import re class pruebas: nombre="" lib=0 loc=0 def __init__(self, nombre, lib): self.nombre=nombre self.lib=lib self.loc=0 def SetLoc(self,loc): self.loc=loc if __name__ == '__main__': path = '/home/juannis/data-visualization-patterns/display-patterns/Hierarchies/Pruebas' lstDir = os.wa...
cc0-1.0
6,862,899,713,100,299,000
24.191176
112
0.586449
false
maxivanoff/fftoolbox
run-examples/run-series-lebedev.py
1
1197
import fftoolbox as fftb import logging, sys #logger = logging.getLogger(__name__) #lf = '%(levelname)s: %(funcName)s at %(filename)s +%(lineno)s\n%(message)s\n' #logging.basicConfig(level=logging.DEBUG, format=lf) #logging.basicConfig(filename='./log', filemode='w', level=logging.DEBUG, format=lf) molecule_name = s...
gpl-2.0
-1,236,776,701,782,292,700
29.692308
160
0.627402
false
ysenko/python-from-zero-to-hero
twitter_explorer/twitter_backend/auth.py
1
1799
"""Twitter authentication related utilities.""" import logging import tweepy log = logging.getLogger(__name__) def get_authorized_api(access_token_key, access_token_secret, consumer_key, consumer_secret): """Return an API object initialized with the given token and secret. :Parameters: - `access_t...
mit
-5,645,576,772,357,424,000
34.98
115
0.678155
false
unlimitedlabs/orchestra
orchestra/models/core/models.py
1
33204
from django.conf import settings from django.db import models from django.utils import timezone from djmoney.models.fields import MoneyField from jsonfield import JSONField from phonenumber_field.modelfields import PhoneNumberField from orchestra.models.core.mixins import CertificationMixin from orchestra.models.core.m...
apache-2.0
-4,198,072,921,720,905,000
38.48157
79
0.65209
false
alexandrovteam/curatr
mcf_standard_browser/mcf_standard_browser/urls.py
1
1109
"""mcf_standard_browser URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='hom...
apache-2.0
2,292,887,632,025,387,800
40.074074
79
0.714157
false
anselmobd/fo2
src/cd/views/mapa.py
1
2526
from pprint import pprint from django.shortcuts import render from django.views import View class Mapa(View): def __init__(self): self.template_name = 'cd/mapa.html' self.title_name = 'Mapa' def mount_context(self): enderecos = {} letras = [ {'letra': 'A', 'int_i...
mit
-7,363,763,833,218,696,000
33.315068
75
0.381637
false
ict-felix/stack
vt_manager_kvm/src/python/vt_manager_kvm/communication/sfa/rspecs/elements/versions/nitosv1Sliver.py
1
2191
from vt_manager_kvm.communication.sfa.util.xrn import Xrn from vt_manager_kvm.communication.sfa.util.xml import XmlElement from vt_manager_kvm.communication.sfa.rspecs.elements.element import Element from vt_manager_kvm.communication.sfa.rspecs.elements.sliver import Sliver from vt_manager_kvm.communication.sfa.rspecs...
apache-2.0
244,637,343,191,726,300
37.438596
97
0.602008
false
TribeMedia/synapse
tests/storage/test_client_ips.py
2
2133
# -*- coding: utf-8 -*- # Copyright 2016 OpenMarket Ltd # # 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 la...
apache-2.0
7,188,592,536,661,298,000
33.403226
75
0.630098
false
jrialland/python-brain
3to2-1.0/lib3to2/tests/test_numliterals.py
1
1256
from test_all_fixers import lib3to2FixerTestCase class Test_numliterals(lib3to2FixerTestCase): fixer = u"numliterals" def test_octal_1(self): b = u"""0o755""" a = u"""0755""" self.check(b, a) def test_octal_2(self): b = u"""0o777""" a = u"""0777""" self.ch...
apache-2.0
5,342,182,511,372,582,000
21.428571
62
0.476115
false
reinout/django
django/db/backends/sqlite3/base.py
1
18616
""" SQLite3 backend for the sqlite3 module in the standard library. """ import decimal import math import re import warnings from sqlite3 import dbapi2 as Database import pytz from django.core.exceptions import ImproperlyConfigured from django.db import utils from django.db.backends import utils as backend_utils from...
bsd-3-clause
-96,864,150,476,498,350
37.783333
105
0.605125
false
RealTimeWeb/wikisite
MoinMoin/parser/text_docbook.py
1
6883
# -*- coding: iso-8859-1 -*- """ MoinMoin - DocBook-XML Parser This code was tested with 4Suite 1.0a4 and 1.0b1 @copyright: 2005 Henry Ho <henryho167 AT hotmail DOT com>, 2005 MoinMoin:AlexanderSchremmer @license: GNU GPL, see COPYING for details. DOCBOOK Parser: Features: ...
apache-2.0
312,725,940,336,476,350
34.117347
107
0.61049
false
ArcherSys/ArcherSys
Lib/site-packages/github/tests/ConditionalRequestUpdate.py
1
7268
<<<<<<< HEAD <<<<<<< HEAD # -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2013 AKFish <akfish@gmail.com> # # Copyright 2013 Vincent J...
mit
-2,833,190,042,739,354,000
51.666667
106
0.46863
false
googleapis/googleapis-gen
google/devtools/cloudtrace/v2/devtools-cloudtrace-v2-py/google/cloud/trace_v2/services/trace_service/client.py
1
21609
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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
-3,905,905,250,935,435,000
41.621302
113
0.612846
false
oser-cs/oser-website
projects/signals.py
1
2877
"""Projects app signals.""" import logging from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver, Signal from . import notifications from .models import Participation logger = logging.getLogger('web.projects.signals') pending = Signal(providing_args=('instance',)) valid =...
gpl-3.0
-287,935,269,574,448,700
30.271739
77
0.72228
false
aldebaran/qibuild
python/qitoolchain/test/test_qitoolchain_add_package.py
1
3118
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license (see the COPYING file). """ Test Toolchain Add Package """ from __future__ import absolute_import from __future__ import unicode_literals from __fu...
bsd-3-clause
-4,279,755,346,904,189,000
40.026316
111
0.677037
false
vincentbernat/feedhq
feedhq/profiles/urls.py
1
1156
from django.conf.urls import url, patterns, include from . import views urlpatterns = patterns( '', url(r'^stats/$', views.stats, name='stats'), url(r'^profile/$', views.profile, name='profile'), url(r'^sharing/$', views.sharing, name='sharing'), url(r'^bookmarklet/$', views.bookmarklet, name='boo...
bsd-3-clause
14,301,587,856,305,930
45.24
75
0.643599
false
mousetail/WOAIII-mousetail
enemy.py
2
5122
import random, math import pygame import basic_shape import coin class Enemy(basic_shape.Shape): def explode(self, bullet): coins = [] for i in range(self.numcoins): angle = random.randint(0, 360) coins.append( coin.Coin(self.position, self.GUI.coin_img, ang...
mit
261,686,933,896,914,530
30.423313
120
0.540609
false
quantmind/pulsar
pulsar/apps/http/stream.py
1
1645
import asyncio class StreamConsumedError(Exception): """Same name as request error""" pass class HttpStream: """An asynchronous streaming body for an HTTP response """ def __init__(self, response): self._response = response self._streamed = False self._queue = asyncio.Que...
bsd-3-clause
-458,601,757,087,649,540
21.847222
59
0.538602
false
jgraef/pyNXT
anxt/NXT.py
1
10914
# anxt/NXT.py # pyNXT - Python wrappers for aNXT # Copyright (C) 2011 Janosch Gräf <janosch.graef@gmx.net> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the ...
lgpl-3.0
-571,397,953,144,734,000
33.644444
143
0.536974
false
x007007007/myblog
myblog/ajaxWtforms/views.py
1
1657
from __future__ import unicode_literals from flask import Blueprint, request, url_for from flask import render_template from wtforms.fields import Field import pprint import json ajax_wtforms_bp = Blueprint('ajax_wtforms', __name__, template_folder="templates", static_folder='static', static_url_path='/static/ajaxform...
mit
4,205,927,895,975,046,700
31.490196
143
0.592637
false
A92hm/multi-armed-bandit
demo.py
1
1550
""" Author: Ali Hajimirza (ali@alihm.net) Copyright Ali Hajimirza, free for use under MIT license. """ import numpy as np from algorithm.softmax import softmax from algorithm.epsilon_greedy import epsilon_greedy import matplotlib.pyplot as plt def simulator(algorithm, arg, mean_arms, std=1, num_sim=2000, num_steps=10...
mit
-2,214,319,224,120,123,000
32.695652
184
0.704516
false
mcolom/ipolDevel
ipol_demo/modules/demoinfo/model.py
1
27990
# -*- coding:utf-8 -*- """ DATA MODEL This module will encapsulate all the DB operations It has the creation scrript, DAOs to encapsulte sql and , a few helper clases that represent the objects modeld in the DB that will be used by the webservices, """ import datetime import sqlite3 as lite ##################### ...
agpl-3.0
3,443,441,717,809,015,000
28.808307
116
0.512862
false
mrooney/wxbanker
wxbanker/tests/testbase.py
1
5304
#!/usr/bin/env python # -*- coding: utf-8 -*- # https://launchpad.net/wxbanker # testbase.py: Copyright 2007-2010 Mike Rooney <mrooney@ubuntu.com> # # This file is part of wxBanker. # # wxBanker is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License...
gpl-3.0
-2,666,637,726,790,700,000
35.328767
119
0.683635
false