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
johnmgregoire/NanoCalorimetry
accalinitcode_Sn1.py
1
2899
import numpy, h5py, pylab from PnSC_h5io import * from matplotlib.ticker import FuncFormatter def myexpformat(x, pos): for ndigs in range(5): lab=(('%.'+'%d' %ndigs+'e') %x).replace('e+0','e').replace('e+','e').replace('e0','').replace('e-0','e-') if eval(lab)==x: return lab return...
bsd-3-clause
-1,861,564,002,955,912,200
34.353659
259
0.673681
false
hmln/pds
parte4/q2.py
1
1384
import matplotlib.pyplot as plt import numpy as np from scipy import fftpack from scipy.signal import kaiserord, firwin, lfilter import scipy.io.wavfile as wavfile FREQ = 466.16 fs, data = wavfile.read('teste_de_som.wav') print("Taxa de amostragem: {} Hz".format(fs)) t = np.arange(0, len(data) / fs, 1 / fs) new = 30...
mit
8,085,503,915,704,743,000
19.969697
77
0.65896
false
nicko7i/vcnc
api-python/velstor/vclc/__main__.py
1
3489
#!python3.5 # For command aliases prior to 3.2 - https://bugs.python.org/issue25299 # # https://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/ from __future__ import print_function import sys import re import json import requests import errno from velstor.restapi import Session from functools im...
apache-2.0
-6,190,060,355,032,620,000
33.205882
78
0.524792
false
FernanOrtega/DAT210x
Module6/assignment1.py
1
5367
import matplotlib as mpl import matplotlib.pyplot as plt import pandas as pd import numpy as np import time # # INFO: Your Parameters. # You can adjust them after completing the lab C = 1 kernel = 'linear' gamma = 'auto' iterations = 5000 # TODO: Change to 200000 once you get to Question#2 # # INFO: You can set...
mit
-277,696,860,954,413,630
26.106061
119
0.646916
false
juliancantillo/royal-films
royalfilms/cinemas/migrations/0003_auto_20160305_0344.py
1
1291
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-05 03:44 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('cinemas', '0002_auto_20160303_0631'), ] ...
mit
6,041,118,326,002,203,000
32.102564
114
0.565453
false
christophercrouzet/hienoi
demos/orbit.py
1
3478
#!/usr/bin/env python """Particles orbiting around the origin. Features: - user attributes: particles are initialized within a radius from the origin and are, at each simulation step, updated to orbit around the origin. - NumPy: operations are done directly on the particle data for increased performances. """ i...
mit
-1,000,051,599,808,256,300
28.726496
78
0.625359
false
Ratfink/asciiplayback
src/asciiplaybackgtk.py
1
2940
#!/usr/bin/env python import os.path import sys from gi.repository import Gtk, Gio, Gdk, GObject from asciiplayback import * from asciimation import * from gtkasciiplayer import * class ASCIIPlaybackGtk(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="ASCIIPlayback") self.set_def...
mit
-1,430,004,682,715,594,200
30.956522
82
0.608163
false
iworm/taobao-image-splitter
taobao-image-splitter.py
1
7554
#!/usr/bin/python3 # coding=utf-8 """ The MIT License (MIT) Copyright (c) 2015 iworm roger@iworm.net Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including with...
mit
-2,058,913,852,656,968,000
29.344398
89
0.595181
false
truthcoin/truthcoin-cpp
qa/rpc-tests/util.py
1
12390
# Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Helpful routines for regression testing # # Add python-truthcoinrpc to module search path: import os import sys sys.path.append(o...
mit
4,969,878,162,674,825,000
35.122449
111
0.631961
false
nemesiscodex/JukyOS-sugar
extensions/cpsection/power/view.py
1
4563
# Copyright (C) 2008, OLPC # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope...
gpl-2.0
4,088,517,647,482,016,300
36.401639
78
0.636862
false
Ichimonji10/robottelo
tests/foreman/ui/test_adusergroup.py
1
21965
"""Test class for Active Directory Feature @Requirement: Adusergroup @CaseAutomation: Automated @CaseLevel: Acceptance @CaseComponent: UI @TestType: Functional @CaseImportance: High @Upstream: No """ from fauxfactory import gen_string from nailgun import entities from robottelo.config import settings from robott...
gpl-3.0
-5,938,062,585,294,894,000
34.949264
79
0.580833
false
ESOedX/edx-platform
lms/djangoapps/discussion/django_comment_client/base/tests.py
1
90626
# pylint: skip-file # -*- coding: utf-8 -*- """Tests for django comment client views.""" from __future__ import absolute_import import json import logging from contextlib import contextmanager import ddt import mock import six from django.contrib.auth.models import User from django.core.management import call_command...
agpl-3.0
6,711,102,984,654,132,000
38.870216
148
0.599713
false
agdsn/pycroft
pycroft/model/address.py
1
3378
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from typing import List from sqlalchemy import Column, String, UniqueConstraint from p...
apache-2.0
-3,732,029,067,401,948,700
41.759494
106
0.68206
false
Kruehlio/MUSEspec
utils/starlight.py
1
15375
# -*- coding: utf-8 -*- """ Spectrum class for running starlight on spectra. Particularly for MUSE cubes """ import matplotlib matplotlib.use('Agg') import os import numpy as np import scipy as sp import shutil import time import platform import matplotlib.pyplot as plt import logging from ..MUSEio.museio impor...
mit
2,258,833,824,051,038,000
36.317961
101
0.499382
false
Alecto3-D/testable-greeter
nameko/test/web/test_server.py
1
5499
import socket import pytest from eventlet import wsgi from mock import patch from werkzeug.contrib.fixers import ProxyFix from nameko.exceptions import ConfigurationError from nameko.web.handlers import HttpRequestHandler, http from nameko.web.server import ( BaseHTTPServer, HttpOnlyProtocol, WebServer, parse_add...
mit
2,576,094,329,098,093,000
28.406417
78
0.646299
false
asm-products/sim
sim/settings.py
1
3046
""" Django settings for sim 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, ...) import...
bsd-2-clause
1,686,597,243,547,752,400
25.034188
73
0.69107
false
dan-stone/canal
canal/tests/test_from_json.py
1
3665
import numpy as np import canal as canal from .util import NumpyTestCase class FromJSONTestCase(NumpyTestCase): class Measurement(canal.Measurement): int_field = canal.IntegerField() alternate_db_name = canal.IntegerField(db_name="something_else") float_field = canal.FloatField() ...
mit
4,122,715,446,854,051,300
27.192308
72
0.411187
false
vaal-/il2_stats
src/stats/online.py
1
2169
from copy import deepcopy import logging from mission_report import parse_mission_log_line from mission_report.constants import COUNTRIES_COALITION_DEFAULT, COALITION_ALIAS from stats.models import PlayerOnline, Profile logger = logging.getLogger('online') _countries = deepcopy(COUNTRIES_COALITION_DEFAU...
mit
-3,861,800,965,770,720,000
38.45283
97
0.506996
false
Samsung/ADBI
idk/cachereader/debuginfo.py
1
7463
import sqlite3 import os.path from .cfa import CallFrameAddress from .files import Files from .framepointers import Framepointers from .function import Functions from .insnset import InsnSet from .lines import Lines from .location import Locations from .types import Types from .variables import Variables from .symbols...
apache-2.0
-4,911,396,537,872,181,000
32.022124
147
0.554201
false
knowledgecommonsdc/kcdc3
kcdc3/apps/pinata/migrations/0008_auto__add_field_page_template__chg_field_page_status.py
1
5497
# -*- 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 'Page.template' db.add_column('pinata_page', 'template', self.gf('djang...
mit
2,237,524,497,699,989,200
62.930233
136
0.541022
false
ni/nifpga-python
nifpga/status.py
1
14615
""" An set of status exception classes to be used when an NiFpga function returns either a warning or error status. Use check_status() to raise an appropriate exception if necessary. Error and Warning exception class names are auto-generated from the strings in 'codeToString' in this file. For example, handle a fatal...
mit
8,977,066,302,177,029,000
36.474359
94
0.584536
false
chienlieu2017/it_management
odoo/addons/l10n_multilang/models/account.py
1
1875
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models #in this file, we mostly add the tag translate=True on existing fields that we now want to be translated class AccountAccountTag(models.Model): _inherit = 'account.account.tag' ...
gpl-3.0
3,139,817,623,212,854,300
26.173913
327
0.7344
false
google-research/google-research
goemotions/inspect_output_layer_weights.py
1
2106
# 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
-7,049,970,231,258,936,000
31.4
74
0.740266
false
dpetker/adventofcode
2018/test/test_day8.py
1
1343
import unittest import os from src.day8 import create_node_tree SAMPLE_DATA = "2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2" class TestMemoryManeuver(unittest.TestCase): def test_sample_input_part_one(self): tree = create_node_tree(SAMPLE_DATA) self.assertEqual(str(tree), SAMPLE_DATA) self.assertEqual(tree.metad...
mit
-2,462,994,842,280,944,600
35.297297
88
0.653016
false
slint/zenodo
zenodo/modules/sitemap/ext.py
2
2576
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2018 CERN. # # Zenodo 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 v...
gpl-2.0
-950,144,029,099,850,400
31.607595
76
0.660326
false
djhshih/genomic
utils/genompy/genompy/randomize.py
1
1657
#!/usr/bin/env python3 import random from . import cn from . import gp def overlap_genes_in_regions(regions, geneDb, geneSets, overlaps, genes=None): '''Track overlap of genes in regions with genes in each gene set, in place''' # genes and overlaps will be modified in place # store all genes from all regions if...
gpl-3.0
-5,363,245,007,392,990,000
25.301587
78
0.715751
false
Itxaka/st2
st2common/tests/unit/test_rbac_loader.py
1
8480
# Licensed to the StackStorm, Inc ('StackStorm') 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 not use th...
apache-2.0
-8,715,461,840,394,912,000
45.593407
100
0.684788
false
arshbot/Slack-Analytics
scripts/help.py
1
1231
#!/usr/bin/env python # -*- coding: utf-8 -*- # help script that details the list of commands def help(response): text = "PantherBot works by prefacing commands with \"!\"\n" text += "Commands:\n" text += "```!help\n" text += "!coin\n" text += "!helloworld\n" text += "!version\n" text += "...
mpl-2.0
8,409,772,346,828,189,000
40.033333
176
0.594639
false
Ameriks/velo.lv
velo/team/views.py
1
20504
from django.contrib import messages from django.http import Http404, HttpResponseRedirect from django.utils import timezone from django.views.generic import ListView, DetailView from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from difflib import get_close_matches fr...
gpl-3.0
-7,865,938,040,519,920,000
43.573913
185
0.615587
false
zerothi/sisl
sisl/viz/plotly/input_fields/queries.py
1
17709
# 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 https://mozilla.org/MPL/2.0/. from collections import defaultdict import itertools import numpy as np from .._input_field import InputField from .dro...
lgpl-3.0
3,700,784,672,871,433,000
37.24838
143
0.577108
false
scikit-optimize/scikit-optimize
skopt/tests/test_parallel_cl.py
1
5399
"""This script contains set of functions that test parallel optimization with skopt, where constant liar parallelization strategy is used. """ from numpy.testing import assert_equal from numpy.testing import assert_raises from skopt.space import Real from skopt import Optimizer from skopt.benchmarks import branin im...
bsd-3-clause
-7,413,750,497,891,699,000
31.920732
79
0.665308
false
academicsystems/Qengine
pkg/routes/__init__.py
1
1447
# public imports import flask from flask import Flask from flask import request # private imports from ..config.qconfig import Config config = Config() if not config.initialized: config.init(None) app = Flask(__name__) # route hooks @app.before_request def log_request(): if config.QENGINE_LOG_REQUESTS: with ope...
apache-2.0
8,081,228,743,135,665,000
28.55102
112
0.769178
false
cmallwitz/Sunflower
application/plugins/file_list/trash_list.py
1
1931
from gi.repository import Gtk from file_list import FileList from gio_provider import TrashProvider from operation import DeleteOperation class TrashList(FileList): """Trash file list plugin Generic operations related to trash management are provided with this class. By extending FileList standard features such ...
gpl-3.0
-785,780,227,369,612,700
26.985507
84
0.68928
false
underyx/bkkcsirip
setup.py
1
1096
import io from setuptools import setup with io.open('README.md', encoding='utf-8') as f: README = f.read() setup( name='bkkcsirip', version='1.1.0', url='https://github.com/underyx/bkkcsirip', author='Bence Nagy', author_email='bence@underyx@me', maintainer='Bence Nagy', maintainer_ema...
mit
5,421,074,572,178,243,000
28.621622
65
0.589416
false
avelino/bottle-auth
bottle_auth/core/auth.py
1
54118
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
mit
-3,886,845,082,925,986,300
39.751506
109
0.595717
false
renebentes/JoomlaPack
lib/extensions/plugin.py
1
2214
# coding: utf-8 import sublime import os import re st_version = int(sublime.version()) if st_version > 3000: from JoomlaPack.lib import * from JoomlaPack.lib.extensions.base import Base from JoomlaPack.lib.inflector import * else: from lib import * from lib.extensions.base import Base from lib....
mit
-5,881,219,763,017,948,000
33.061538
79
0.484192
false
HenriquePaulo/projeto
backend/test/editar_produto_tests/editar_produto_new_tests.py
1
1576
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from base import GAETestCase from datetime import datetime, date from decimal import Decimal from editar_produto_app.editar_produto_model import Editar_produto from routes.editar_produtos.new import index, save from tekton.gae.middleware.r...
mit
3,332,256,648,107,032,600
45.352941
152
0.719543
false
taohungyang/cloud-custodian
c7n/resources/asg.py
1
60737
# Copyright 2015-2017 Capital One Services, 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 agreed ...
apache-2.0
2,157,153,835,286,534,400
32.988248
94
0.553369
false
freeman-lab/dask
dask/array/random.py
1
11940
from __future__ import absolute_import, division, print_function import numpy as np from itertools import product from .core import normalize_chunks, Array, names def doc_wraps(func): """ Copy docstring from one function to another """ def _(func2): func2.__doc__ = func.__doc__.replace('>>>', '>>').re...
bsd-3-clause
7,957,553,145,970,565,000
37.146965
79
0.63258
false
nlgcoin/guldencoin-official
test/functional/mempool_spend_coinbase.py
2
2317
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test spending coinbase transactions. The coinbase transaction in block N can appear in block N+100... ...
mit
-8,024,148,556,039,803,000
40.375
124
0.694001
false
Tomasuh/Tomasuh.github.io
files/cyclic/dbcommands.py
1
1472
import sqlite3 import os.path import datetime class the_db: def __init__(self): exists = os.path.exists('./cyclic.db') self.conn = sqlite3.connect('cyclic.db') self.c = self.conn.cursor() if exists: return # If it's a new instance of the db we need to generate the layout sql = '''CREATE TABLE posts...
mit
-3,592,289,148,472,909,300
18.626667
95
0.605978
false
cloudmesh/book
cloud-clusters/bin/todo.py
1
1641
#!/usr/bin/env python from __future__ import print_function import sys import os import fnmatch import glob from pprint import pprint def recursive_glob(rootdir='.', pattern='*.md'): """Search recursively for files matching a specified pattern. Adapted from http://stackoverflow.com/questions/2186525/use-a-glob-to-...
apache-2.0
-738,105,093,781,443,800
24.246154
138
0.582572
false
mlcommons/training
object_detection/pytorch/maskrcnn_benchmark/utils/registry.py
1
1994
# Copyright (c) 2021, NVIDIA CORPORATION. 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 applic...
apache-2.0
-7,268,464,664,019,282,000
33.37931
76
0.662487
false
raiden-network/raiden
tools/pip-compile-wrapper.py
1
13013
#!/usr/bin/env python """ Helper utility to compile / upgrade requirements files from templates. This only manages dependencies between requirements sources. The actual compiling is delegated to ``pip-compile`` from the ``pip-tools` package. NOTE: This utility *must only* use stdlib imports in order to be runnable ev...
mit
8,479,760,281,170,723,000
35.656338
99
0.621763
false
jfterpstra/bluebottle
bluebottle/bb_donations/tests/test_api.py
1
29699
import json from mock import patch from bluebottle.donations.models import Donation from bluebottle.orders.models import Order from bluebottle.test.utils import BluebottleTestCase, SessionTestMixin from django.conf import settings from bluebottle.bb_orders.views import ManageOrderDetail from django.core.urlresolvers ...
bsd-3-clause
-1,832,299,947,430,814,500
42.229985
116
0.603152
false
Netflix-Skunkworks/swag-client
swag_client/cli.py
1
11229
import logging import os import time import simplejson as json import boto3 import click import click_log from tabulate import tabulate from swag_client.backend import SWAGManager from swag_client.__about__ import __version__ from swag_client.migrations import run_migration from swag_client.util import parse_swag_con...
apache-2.0
-4,546,113,567,798,324,700
29.680328
139
0.596669
false
carolFrohlich/nipype
nipype/interfaces/tests/test_base.py
2
27078
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: from __future__ import print_function, unicode_literals from future import standard_library standard_library.install_aliases() from builtins import open, str, bytes import os import...
bsd-3-clause
3,826,922,991,494,386,700
33.89433
91
0.642699
false
Atothendrew/SpartanTokenService
SpartanTokenService.py
1
3313
#!/usr/bin/python import re import json import random import urllib import requests from requests import Request, Session from requests.cookies import RequestsCookieJar MS_LOGIN = "https://logSpartanTokenService.pyin.live.com/login.srf?id=2" WAYPOINT_GATEWAY = "https://www.halowaypoint.com/oauth/signin?returnUrl=htt...
mit
1,194,989,679,917,223,700
53.327869
294
0.735587
false
sacharya/nova
nova/tests/api/openstack/compute/plugins/v3/test_user_data.py
1
9909
# Copyright 2012 OpenStack Foundation # Copyright 2013 IBM Corp. # 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/LIC...
apache-2.0
-7,509,084,529,474,616,000
36.392453
78
0.58795
false
mvanveen/catcher
catcher.py
1
1373
import traceback TRACE_STACK = [] class Trace(object): def __init__(self, exception, stack=None): if not isinstance(exception, Exception): raise ValueError("Expected an Exception object as first argument") if not stack: stack = traceback.extract_stack() # pop off current frame and initia...
mit
-2,296,891,424,965,171,500
21.508197
71
0.576839
false
horacioMartinez/dakara-client
tools/protocol_generator/generator/gendefs_js.py
1
7898
class Packet: def __init__(self, name, args): self.name = name self.args = args def get_header_fmt(self): return """ function {name} (buffer) {{ this.id = {base_name}ID.{name} /* {packet_id} */; if (buffer){{ buffer.ReadByte(); /* PacketID */ {ctor_fields_...
mit
-5,359,951,213,729,725,000
24.726384
144
0.530767
false
Jeff-Tian/mybnb
Python27/Lib/test/test_hmac.py
2
17810
# coding: utf-8 import hmac import hashlib import unittest import warnings from test import test_support class TestVectorsTestCase(unittest.TestCase): def test_md5_vectors(self): # Test the HMAC module against test vectors from the RFC. def md5test(key, data, digest): h...
apache-2.0
178,129,449,049,034,270
39.607477
79
0.537287
false
DummyDivision/Tsune
cardimporter/importer.py
1
2077
from django.db import transaction from guardian.shortcuts import assign_perm from sourcereader import AnkiCardSourceReader from ankiconverter import ankiTupeToTsuneDict from cardbox.card_model import Card, Deck class AnkiImporter(): @transaction.commit_on_success def importCollection(self,pathToApkg,user): ...
mit
-4,638,345,130,590,870,000
36.763636
94
0.676938
false
philanthropy-u/edx-platform
openedx/features/job_board/migrations/0001_initial.py
1
2109
# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2020-03-31 10:03 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone import django_countries.fields import model_utils.fields class Migration(migrations.Migration): initial = True dependencies...
agpl-3.0
-7,991,687,555,766,982,000
48.046512
159
0.599336
false
makinacorpus/geonode
src/GeoNodePy/geonode/settings.py
1
8876
# -*- coding: utf-8 -*- # Django settings for GeoNode project. from urllib import urlencode import os _ = lambda x: x DEBUG = True SITENAME = "GeoNode" SITEURL = "http://localhost:8000/" TEMPLATE_DEBUG = DEBUG PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) ADMINS = ( # ('Your Name', 'your_email@domai...
gpl-3.0
-9,179,246,854,442,891,000
28.778523
119
0.654046
false
simonmonk/prog_pi_ed2
07_05_kitchen_sink.py
1
1654
#07_05_kitchen_sink.py from tkinter import * class App: def __init__(self, master): frame = Frame(master) frame.pack() Label(frame, text='Label').grid(row=0, column=0) Entry(frame, text='Entry').grid(row=0, column=1) Button(frame, text='Button').grid(row=0, column=2) ...
mit
872,859,228,343,858,000
34.956522
101
0.577993
false
matheuskiser/pdx_code_guild
django/pointme/points/views.py
1
4113
from django.shortcuts import render, redirect, render_to_response from django.contrib.auth.decorators import login_required from django.template import RequestContext from django.http import HttpResponse from django.db.models import Q import json from points.models import Place from points.forms import PlaceForm from ...
mit
-8,677,430,849,673,660,000
31.912
112
0.605398
false
amonmoce/corba_examples
omniORBpy-4.2.1/build/python/COS/CosNotifyComm_idl.py
1
37450
# Python stubs generated by omniidl from /usr/local/share/idl/omniORB/COS/CosNotifyComm.idl # DO NOT EDIT THIS FILE! import omniORB, _omnipy from omniORB import CORBA, PortableServer _0_CORBA = CORBA _omnipy.checkVersion(4,2, __file__, 1) try: property except NameError: def property(*args): return N...
mit
-5,131,353,625,835,709,000
48.933333
326
0.786195
false
Invoiced/invoiced-python
invoiced/test/objects/test_payment_source.py
1
3880
import unittest import invoiced import responses class TestPaymentSource(unittest.TestCase): def setUp(self): self.client = invoiced.Client('api_key') @responses.activate def test_endpoint_and_create_bank_account(self): responses.add('POST', 'https://api.invoiced.co...
mit
4,387,637,778,830,354,400
39.416667
261
0.574742
false
cipri-tom/Swiss-on-Amazon
spark/brand_search.py
1
1692
#! /bin/python from pyspark import SparkContext, SparkConf import json from pprint import pprint import pickle import re #config path brands_path = "../data/wiki_brands.txt" brands_path2 = "../data/all_swiss_brands.pickle" metadata_path = "hdfs:///datasets/amazon-reviews/metadata.json" # load the list of brands bra...
gpl-3.0
-4,317,103,139,602,162,700
22.191781
70
0.670804
false
bitmingw/FindYourSister
tools/gen_misc.py
1
3382
#!/usr/bin/env python """ Copyright (c) 2015, Ming Wen This program saves size of images into a json file. Usage: ./gen_misc.py (IMAGE_FILE | IMAGE_DIR) [train|validate|test] [JSON_FILE] The program reads one image file "IMAGE_FILE", or reads some image files from "IMAGE_DIR". Then it generates a json format str...
bsd-2-clause
-2,822,098,611,643,585,000
26.721311
69
0.592253
false
tskisner/pytoast
src/python/tests/dist.py
1
5208
# Copyright (c) 2015-2018 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. from ..mpi import MPI from .mpi import MPITestCase from ..dist import * import numpy as np import sys import os from ._hel...
bsd-2-clause
3,222,813,290,255,280,000
27.773481
88
0.49424
false
MrSnede/BalancingWheelRobot
mainWindow.py
1
19684
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/mainWindow.ui' # # Created: Sat Nov 29 18:47:56 2014 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except ...
gpl-2.0
4,252,222,543,709,044,000
61.888179
139
0.723024
false
chaddcw/Python-CI-Testing
test_list.py
1
1273
#!/usr/bin/python3 ################################ # File Name: test_list.py # Author: Chadd Williams # Date: 11/7/2014 # Class: CS 360 # Assignment: Lecture Examples # Purpose: build some tests that will be run by nosetests ##############################...
gpl-2.0
2,139,923,379,134,889,200
20.576271
72
0.635507
false
niboshi/chainer
chainer/testing/parameterized.py
1
6917
import functools import itertools import types import typing as tp # NOQA import unittest import numpy import six from chainer.testing import _bundle from chainer import utils def _param_to_str(obj): if isinstance(obj, type): return obj.__name__ return repr(obj) def _shorten(s, maxlen): # Sho...
mit
8,060,633,874,050,926,000
31.172093
115
0.597947
false
culturagovbr/sistema-nacional-cultura
planotrabalho/tests/test_views.py
1
22743
import pytest import datetime from django.shortcuts import reverse from django.core.files.uploadedfile import SimpleUploadedFile from adesao.models import SistemaCultura from planotrabalho.models import Componente from planotrabalho.models import FundoDeCultura from planotrabalho.models import Conselheiro from planot...
agpl-3.0
2,829,405,920,098,751,500
42.32
132
0.63514
false
Krissbro/LondonGaymers
serverquotes/serverquotes.py
1
7819
import discord from discord.ext import commands from cogs.utils.dataIO import dataIO from .utils import checks from .utils.chat_formatting import escape_mass_mentions, pagify import os from random import choice as randchoice try: from tabulate import tabulate except Exception as e: raise RuntimeError("You mus...
gpl-3.0
7,994,293,379,458,089,000
35.490654
101
0.577667
false
stormi/tsunami
src/secondaires/crafting/rang.py
1
5518
# -*-coding:Utf-8 -* # Copyright (c) 2015 LE GOFF Vincent # 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 # lis...
bsd-3-clause
-3,393,670,967,765,601,300
33.71519
79
0.643209
false
hastexo/edx-platform
openedx/core/djangoapps/content/course_overviews/models.py
1
35401
""" Declaration of CourseOverview model """ import json import logging from urlparse import urlparse, urlunparse from django.conf import settings from django.db import models, transaction from django.db.models.fields import BooleanField, DateTimeField, DecimalField, TextField, FloatField, IntegerField from django.db.u...
agpl-3.0
2,396,641,003,756,264,000
40.211874
114
0.651225
false
Oire/TWBlue
src/twitter/twitter.py
1
3261
# -*- coding: utf-8 -*- import BaseHTTPServer import webbrowser from urlparse import urlparse, parse_qs from twython import Twython, TwythonError import config import application import output import sound import time logged = False verifier = None class handler(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET...
gpl-2.0
5,429,948,604,041,343,000
36.930233
145
0.687213
false
PokeAPI/pokeapi
pokemon_v2/migrations/0009_pokemontypepast.py
1
1924
# Generated by Django 2.1.11 on 2021-02-06 22:03 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("pokemon_v2", "0008_auto_20201123_2045"), ] operations = [ migrations.CreateModel( name="Pokemo...
bsd-3-clause
8,417,753,935,987,722,000
30.032258
68
0.366424
false
oferb/OpenTrains
webserver/opentrain/algorithm/utils.py
1
1361
import os import gtfs.models import analysis.models import numpy as np from scipy import spatial import shelve try: import matplotlib.pyplot as plt except ImportError: pass import simplekml import config import itertools import datetime def enum(**enums): return type('Enum', (), enums) def get_XY_pos(rela...
bsd-3-clause
4,164,793,536,097,898,500
29.266667
120
0.703894
false
robotpy/pyfrc
pyfrc/physics/motor_cfgs.py
1
3366
from collections import namedtuple MotorModelConfig = namedtuple( "MotorModelConfig", [ "name", "nominalVoltage", "freeSpeed", "freeCurrent", "stallTorque", "stallCurrent", ], ) MotorModelConfig.__doc__ = """ Configuration parameters useful for simulating...
mit
3,968,190,741,376,040,400
23.042857
81
0.643494
false
shrinidhi666/rbhus
etc/startupScripts/blend/beforeFile.py
1
1070
import bpy import addon_utils import sys bpy.context.user_preferences.filepaths.use_relative_paths= False if(str(bpy.app.version).find("(2, 78") < 0 ): bpy.context.user_preferences.filepaths.use_load_ui = False bpy.context.user_preferences.filepaths.save_version=0 bpy.context.user_preferences.system.use_scripts_auto_...
gpl-3.0
4,371,447,006,588,869,000
21.765957
67
0.705607
false
MERegistro/meregistro
meregistro/apps/titulos/models/NormativaNacional.py
1
1738
# -*- coding: utf-8 -*- from django.db import models from apps.titulos.models.EstadoNormativaNacional import EstadoNormativaNacional import datetime class NormativaNacional(models.Model): numero = models.CharField(max_length=50, unique=True) descripcion = models.CharField(max_length=255) observaciones = models.Char...
bsd-3-clause
6,765,823,261,245,573,000
33
112
0.767589
false
mahajrod/MACE
scripts/old/FS_distribution.py
1
1645
#!/usr/bin/env python __author__ = 'Sergei F. Kliver' import os, sys import argparse import numpy as np from MACE.General.File import split_filename, make_list_of_path_to_files from MACE.Parsers.VCF import CollectionVCF def vcf_filter(filename): return True if filename[-4:] == ".vcf" else False def is_homozyg...
apache-2.0
6,022,405,341,987,015,000
32.571429
113
0.657143
false
PeachyPrinter/peachyinstaller
windows/src/application.py
1
3502
import json class Application(object): def __init__(self, id, name, available_version=None, download_location=None, relitive_install_path=None, executable_path=None, installed_path=None, ...
apache-2.0
-4,559,871,324,107,743,000
37.911111
160
0.566248
false
foursquare/pants
tests/python/pants_test/backend/codegen/wire/java/test_java_wire_library.py
1
2124
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals from pants.backend.codegen.wire.java.java_wire_library import JavaWireLibrary from pants....
apache-2.0
8,379,027,613,503,642,000
50.804878
95
0.659605
false
xbmcmegapack/plugin.video.megapack.dev
resources/lib/menus/home_tvshows_fashion.py
1
1092
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@gmail.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Softwar...
gpl-3.0
-1,902,513,686,243,087,000
36.62069
76
0.695413
false
andrucuna/python
interactivepython-coursera/interactivepython/week0/Variables.py
1
1333
__author__ = 'andrucuna' # variables - placeholders for important values # used to avoid recomputing values and to # give values names that help reader understand code # valid variable names - consists of letters, numbers, underscore (_) # starts with letter or underscore # case sensitive (capitalization matters) #...
gpl-2.0
-2,776,057,309,682,962,400
16.773333
69
0.705926
false
cprogrammer1994/ModernGL
tests/test_buffer_read_errors.py
1
1292
import unittest from common import get_context class TestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.ctx = get_context() def test_1(self): buf = self.ctx.buffer(b'abc') with self.assertRaises(Exception): buf.read(4) with self.assertRaises...
mit
8,729,349,598,844,909,000
22.071429
43
0.565015
false
vivek8943/soft-boiled
src/algorithms/slp.py
1
13262
import numpy as np import itertools from collections import namedtuple, defaultdict import math from math import floor, ceil, radians, sin, cos, asin, sqrt, pi import pandas as pd from src.utils.geo import bb_center, GeoCoord, haversine LocEstimate = namedtuple('LocEstimate', ['geo_coord', 'dispersion', 'dispersion_st...
apache-2.0
4,146,304,402,109,052,000
43.804054
133
0.653748
false
thammegowda/incubator-joshua
scripts/support/query_http.py
3
2476
#!/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 "License...
apache-2.0
-7,411,478,688,813,369,000
37.6875
114
0.712439
false
wanderer2/pymc3
pymc3/examples/arma_example.py
1
2135
from pymc3 import Normal, sample, Model, plots, Potential, variational, HalfCauchy from theano import scan, shared import numpy as np """ ARMA example It is interesting to note just how much more compact this is that the original STAN example The original implementation is in the STAN documentation by Gelman et al an...
apache-2.0
4,759,934,765,427,243,000
23.261364
96
0.578923
false
fccoelho/Curso_Blockchain
assignments/Solutions/MerkleTree_Breno.py
1
2790
""" Solution to HW 2 by Breno Gomes """ import hashlib def join_and_hash(str1, str2): return hashlib.sha256(str1.encode("utf-8") + str2.encode("utf-8")).hexdigest() class MerkleTree: def __init__(self, content): # SORTING SO SAME SUBSETS GENERATE SAME MERKEL TREE self.content = sorted(conte...
lgpl-3.0
3,745,561,583,888,974,000
28.989247
110
0.602366
false
mheap/ansible
lib/ansible/plugins/connection/winrm.py
1
30176
# (c) 2014, Chris Church <chris@ninemoreminutes.com> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ author: Ansible Core Te...
gpl-3.0
3,836,380,334,355,508,000
42.733333
156
0.57728
false
apache/allura
Allura/allura/tests/scripts/test_misc_scripts.py
2
1912
# 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 (t...
apache-2.0
-2,569,682,538,316,318,000
39.680851
103
0.682531
false
Snesha/azure-linux-extensions
SteppingStone/web_console/distro/redhat_installer.py
1
1272
#!/usr/bin/python # # Copyright 2014 Microsoft 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 # # Unless required by applicable...
apache-2.0
1,452,466,597,780,487,700
29.285714
74
0.709906
false
Aloomaio/googleads-python-lib
examples/ad_manager/v201808/user_service/get_all_users.py
1
1759
#!/usr/bin/env python # # Copyright 2016 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 requir...
apache-2.0
8,587,936,234,622,361,000
34.897959
78
0.693576
false
OpenDrift/opendrift
opendrift/models/seaicedrift.py
1
1535
# This file is part of OpenDrift. # # OpenDrift is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 2 # # OpenDrift is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without ev...
gpl-2.0
-887,467,786,537,552,400
32.369565
76
0.701629
false
dailab/roomba-python
demo.py
1
3196
import create import time import io import os import sys import argparse # define silence r = 30 # map note names in the lilypad notation to irobot commands c4 = 60 cis4 = des4 = 61 d4 = 62 dis4 = ees4 = 63 e4 = 64 f4 = 65 fis4 = ges4 = 66 g4 = 67 gis4 = aes4 = 68 a4 = 69 ais4 = bes4 = 70 b4 = 71 c5 = 72 cis5 = des5 ...
artistic-2.0
8,155,639,683,856,493,000
23.030075
95
0.556008
false
sedruk/Red-DiscordBot
cogs/russianroulette.py
1
14234
# Roulette.py was created by Redjumpman for Redbot # This will create a rrgame.JSON file and a data folder import os import random import asyncio from time import gmtime, strftime from discord.ext import commands from .utils.dataIO import dataIO from .utils import checks from __main__ import send_cmd_help ...
gpl-3.0
-5,136,934,830,560,906,000
47.252595
100
0.523535
false
dirk-thomas/vcstool
vcstool/commands/import_.py
1
8799
import argparse import os from shutil import which import sys import urllib.request as request from vcstool import __version__ as vcstool_version from vcstool.clients import vcstool_clients from vcstool.clients.vcs_base import run_command from vcstool.executor import ansi from vcstool.executor import execute_jobs from...
apache-2.0
6,492,176,253,853,990,000
32.712644
79
0.575406
false
danielballan/docs
source/_cookbook/csv_writer.py
1
3011
# -*- coding: utf-8 -*- """ ======================================== A Minimal CSV writer for data collection ======================================== Problem ------- Write (a subset of) the data to a CSV file during data collection. Approach -------- Write a callback function that integrates Python's built-in csv ...
bsd-2-clause
6,292,943,657,254,038,000
24.091667
79
0.524078
false
frinat/fribourg-natation.ch
fabtasks/webfaction.py
1
11702
import os from fabric.api import env, task, local, hide, put, run, get from fabric.contrib.project import rsync_project import pipes import xmlrpclib import functools APACHE_START_SCRIPT = r""" #!/bin/bash /home/frinat/bin/envdir /home/frinat/webapps/{appname}/conf \\ /home/frinat/webapps/{appname}/apache2/b...
mit
7,476,490,094,085,385,000
30.972678
110
0.587934
false
ajaniv/django-core-models
django_core_models/locations/tests/test_validation.py
1
5553
""" .. module:: django_core_models.location.tests.test_validation :synopsis: location application validation unit test module. *location* application validation unit test module. """ from __future__ import print_function from django.core.exceptions import ValidationError from django_core_utils.tests.test_utils i...
mit
-865,493,100,001,814,000
36.02
77
0.660004
false
nitely/Spirit
spirit/core/utils/decorators.py
1
1458
# -*- coding: utf-8 -*- from functools import wraps from django.core.exceptions import PermissionDenied from django.contrib.auth.views import redirect_to_login from django.shortcuts import redirect from spirit.core.conf import settings def moderator_required(view_func): @wraps(view_func) def wrapper(reques...
mit
2,144,196,783,148,449,000
25.509091
88
0.631001
false
roryyorke/python-control
control/margins.py
1
13996
"""margins.py Functions for computing stability margins and related functions. Routines in this module: margins.stability_margins margins.phase_crossover_frequencies margins.margin """ # Python 3 compatibility (needs to go here) from __future__ import print_function """Copyright (c) 2011 by California Institute of...
bsd-3-clause
1,176,016,653,817,876,700
37.032609
80
0.61539
false
wrenoud/blueberry-bush
RepositoryState.py
1
1808
import os from FileState import FileStateLocal class Remote(object): def __init__(self): pass def create(self): pass def update(self): pass def modified(self): pass def delete(self): pass class RepositoryState(object): """Manages the sync information, this includes the local root, ingnor...
gpl-2.0
-8,155,816,514,990,178,000
30.719298
101
0.601217
false
texnokrates/electroballz
electroballz/single_coeff.py
1
1461
from scipy import * from scipy.special import sph_jn, sph_yn # The following is an entirely computationally inefficient draft, intended for basic orientation. def jl(l,z): """Wrapper for sph_jn (discards the unnecessary data)""" return sph_jn(n, z)[0][l] def yl(l,z): """Wrapper for sph_yn (discards the u...
gpl-3.0
-3,926,437,970,418,607,000
30.76087
97
0.577002
false