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
qPCR4vir/orange3
Orange/tests/test_ada_boost.py
1
3357
# Test methods with long descriptive names can omit docstrings # pylint: disable=missing-docstring import unittest import numpy as np from Orange.data import Table from Orange.classification import TreeLearner from Orange.regression import TreeRegressionLearner from Orange.ensembles import SklAdaBoostLearner, SklAdaBo...
bsd-2-clause
61,752,926,166,089,920
33.96875
77
0.657432
false
kernsuite-debian/obit
python/OTWindow.py
1
7357
""" OTWindow allows running wxPython widgets Widgets using wxPython must all be created and run in the same thread. This class creates a wxPython App in a separate thread and allows starting new widgets in this same thread. New widgets can be created using the functions newMsgWin(tw) create message windiow and e...
gpl-2.0
7,236,081,742,020,023,000
31.991031
74
0.537447
false
guh/guh-cli
nymea/logs.py
1
20827
# -*- coding: UTF-8 -*- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Copyright (C) 2015 - 2018 Simon Stuerz <simon.stuerz@guh.io> # # ...
gpl-2.0
4,584,651,468,606,077,000
31.798425
257
0.561867
false
pgjones/nusoft
nusoft/credentials.py
1
1609
#!/usr/bin/env python # # Credentials # # Collates and stores in memory user credentials needed for downloads # # Author P G Jones - 2014-03-23 <p.g.jones@qmul.ac.uk> : New file. #################################################################################################### import getpass import logging logger = l...
mit
-1,743,196,074,267,851,000
33.234043
100
0.567433
false
irvined1982/lavaflow
setup.py
1
1269
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README')).read() setup( zip_safe=False, name='django-lavaflow', version='1.1', packages=['lavaFlow'], include_package_data=True, license="GPL 3", description="LavaFlow creates useful reports on the usage of hi...
gpl-3.0
8,221,223,443,358,147,000
38.65625
299
0.713948
false
pytorch/fairseq
tests/test_dataset.py
1
2916
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging import unittest from typing import Sequence from fairseq.data import LanguagePairDataset, ListDataset, RoundRobinZipDatasets f...
mit
1,653,650,448,822,139,000
43.181818
84
0.632373
false
IuryAlves/code-challenge
app/load_data.py
1
1329
#!/usr/bin/env python # coding: utf-8 from __future__ import ( print_function, unicode_literals, absolute_import ) import argparse import json import os def get_path(): return unicode(os.path.abspath('.')) def parse_args(): _parser = argparse.ArgumentParser() _parser.add_argument('--fixtur...
mit
-2,716,428,965,792,732,700
25.6
103
0.576373
false
LMSlay/wiper
modules/radare.py
1
2920
# -*- coding: utf-8 -*- # This file is part of Viper - https://github.com/botherder/viper # See the file 'LICENSE' for copying permission. import os import sys import getopt from viper.common.out import * from viper.common.abstracts import Module from viper.core.session import __sessions__ ext = ".bin" run_radare =...
bsd-3-clause
5,533,463,339,960,898,000
28.795918
91
0.510616
false
ghetzel/webfriend
webfriend/rpc/base.py
1
2491
""" Implementation of the Chrome Remote DevTools debugging protocol. See: https://chromedevtools.github.io/devtools-protocol """ from __future__ import absolute_import from webfriend.rpc.event import Event from uuid import uuid4 from collections import OrderedDict import logging class Base(object): supports_even...
bsd-2-clause
-6,752,092,870,117,730,000
27.306818
96
0.579285
false
lgarren/spack
lib/spack/spack/test/spec_syntax.py
1
20244
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-8,615,010,693,867,667,000
35.475676
79
0.528453
false
kennydo/rename-archive-extension
Nautilus/rename_archive.py
1
8817
from gi.repository import Nautilus, GObject, Gtk import functools import os import os.path import urllib import urlparse import zipfile try: import rarfile except ImportError: rarfile = None if rarfile: # The default separator is '\\', which is different from what zipfile uses rarfile.PATH_SEP = '/' ...
mit
-8,911,151,886,611,844,000
32.524715
101
0.58047
false
chrys87/orca-beep
test/keystrokes/firefox/aria_button.py
1
1801
#!/usr/bin/python """Test of ARIA button presentation.""" from macaroon.playback import * import utils sequence = MacroSequence() #sequence.append(WaitForDocLoad()) sequence.append(PauseAction(5000)) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Tab")) sequence.append(utils.AssertPr...
lgpl-2.1
-427,095,397,982,902,140
36.520833
93
0.681843
false
YangWanjun/areaparking
utils/constants.py
1
11566
# -*- coding: utf-8 -*- from __future__ import unicode_literals SYSTEM_NAME = "エリアパーキング" END_DATE = '9999-12-31' DATABASE_DEFAULT = "default" DATABASE_REVOLUTION = "fk5dtsql" MIME_TYPE_EXCEL = 'application/excel' MIME_TYPE_PDF = 'application/pdf' MIME_TYPE_ZIP = 'application/zip' MIME_TYPE_HTML = 'text/html' CONFI...
apache-2.0
438,389,379,480,348,300
24.060519
97
0.542778
false
lig/picket_classic
apps/picket/__init__.py
1
1783
""" Copyright 2008 Serge Matveenko This file is part of Picket. Picket 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. Picket is distribut...
gpl-3.0
-7,424,519,642,878,921,000
28.716667
68
0.748738
false
bchareyre/trial
examples/test/periodic-triax.py
1
1557
# coding: utf-8 # 2009 © Václav Šmilauer <eudoxos@arcig.cz> "Test and demonstrate use of PeriTriaxController." from yade import * from yade import pack,qt O.periodic=True O.cell.hSize=Matrix3(0.1, 0, 0, 0 ,0.1, 0, 0, 0, 0.1) sp=pack.SpherePack() radius=5e-3 num=sp.makeCloud(Vector3().Zero,O.cell.re...
gpl-2.0
248,881,559,573,020,220
30.653061
188
0.710509
false
KangHsi/youtube-8m
model_utils.py
1
4302
# 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 required by applicable law or ...
apache-2.0
4,521,161,258,369,963,000
34.85
80
0.682938
false
andhit-r/opnsynid-accounting-report
opnsynid_asset_account/models/res_company.py
1
1348
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2015 Andhitia Rama. All rights reserved. # @author Andhitia Rama # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
agpl-3.0
5,641,121,555,060,802,000
36.444444
78
0.602374
false
Azure/azure-sdk-for-python
sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_client.py
1
13664
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import functools from dateutil import parser as date_parse import time import logging import json from azure.core.exceptions import ResourceExistsError, ResourceNotFoun...
mit
-892,249,785,946,571,100
38.836735
120
0.629172
false
peterwilletts24/Python-Scripts
plot_scripts/Rain/Diurnal/sea_diurnal_rain_plot_domain_constrain_bit_above western_ghats.py
1
10333
""" Load npy xy, plot and save """ import os, sys import matplotlib matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! import matplotlib.pyplot as plt import matplotlib.cm as mpl_cm from matplotlib import rc from matplotlib.font_manager import FontProperties from matplotlib import rcPa...
mit
4,530,510,237,832,121,300
30.123494
195
0.594987
false
dcalacci/Interactive_estimation
game/round/models.py
1
2767
from decimal import Decimal from django.db import models from django.conf import settings from django.utils import timezone # Create your models here. from game.contrib.calculate import calculate_score from game.control.models import Control class Plot(models.Model): plot = models.URLField() answer = models...
mit
-4,080,133,973,543,304,000
36.391892
108
0.644742
false
pdl30/pychiptools
pychiptools/utilities/alignment.py
1
3065
#!/usr/bin/python ######################################################################## # 20 Oct 2014 # Patrick Lombard, Centre for Stem Stem Research # Core Bioinformatics Group # University of Cambridge # All right reserved. ######################################################################## import argparse...
gpl-2.0
3,248,898,922,289,293,000
34.639535
185
0.596411
false
shawncaojob/LC
PY/140_word_break_ii.py
1
4564
# 140. Word Break II QuestionEditorial Solution My Submissions # Total Accepted: 68516 # Total Submissions: 321390 # Difficulty: Hard # Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. # # Return all such possible sentences. # # For...
gpl-3.0
5,375,061,984,906,493,000
29.837838
163
0.510517
false
abhigd/bigboy
app/views/link.py
1
17235
import time, uuid, json, calendar from app import app from app.lib import upload, auth, files from app.lib import distribution, link from app.lib import geo from app.forms import * from flask import request, redirect from flask import session, render_template from flask import make_response, abort from flask import ...
apache-2.0
907,547,245,753,685,200
34.68323
92
0.59942
false
david-mateo/marabunta
marabunta/models/PerimeterDefenseRobot.py
1
7197
from marabunta import BaseRobot from math import * class PerimeterDefenseRobot(BaseRobot): """Robot model for perimeter defense. By iteratively calling the update() method, this robot will communicate with the rest of the swarm and move away from the others as far as possible. Takes a *threshold* ...
gpl-3.0
-524,198,928,009,362,900
35.348485
94
0.539669
false
demisto/content
Packs/PANOSPolicyOptimizer/Integrations/PANOSPolicyOptimizer/PANOSPolicyOptimizer.py
1
18763
import hashlib from CommonServerPython import * class Client: """ Client to use in the APN-OS Policy Optimizer integration. """ def __init__(self, url: str, username: str, password: str, vsys: str, device_group: str, verify: bool, tid: int): # The TID is used to track individual commands sen...
mit
-3,208,916,145,890,129,000
41.450226
122
0.557054
false
Hernanarce/pelisalacarta
python/main-classic/platformcode/platformtools.py
1
48873
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta 4 # Copyright 2015 tvalacarta@gmail.com # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # # Distributed under the terms of GNU General Public License v3 (GPLv3) # http://www.gnu.org/licenses/gpl-3.0.html # --...
gpl-3.0
2,443,567,850,198,299,000
42.925293
122
0.578759
false
CLVsol/odoo_addons
clv_person_mng/history/__init__.py
1
1434
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
agpl-3.0
-1,074,229,779,788,836,500
70.7
80
0.410042
false
PyBossa/pybossa
test/factories/taskrun_factory.py
1
1933
# -*- coding: utf8 -*- # This file is part of PYBOSSA. # # Copyright (C) 2015 Scifabric LTD. # # PYBOSSA 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 License, or # (at your op...
agpl-3.0
9,141,680,664,959,028,000
32.327586
77
0.713399
false
oldstylejoe/pychess-timed
lib/pychess/compat.py
1
1109
""" Some Python2/Python3 compatibility support helpers """ import sys PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 if PY3: basestring = str cmp = lambda x, y: (x > y) - (x < y) memoryview = memoryview open = open unichr = chr unicode = lambda x: x raw_input = input i...
gpl-3.0
4,246,670,998,720,175,600
24.790698
69
0.696123
false
SurveyMan/SMPy
example_survey.py
1
1248
from survey.objects import * import json """ This module provides an example of how to construct a questionnaire in Python. Questionnaires can be saved by calling jsonize and dumping their contents. Jsonized surveys can be reused, manipulated, and sent via RPC to another service. """ q1 = Question("What is your age?"...
apache-2.0
-5,831,616,676,094,554,000
30.2
90
0.591346
false
chfritz/atom-sane-indentation
spec/fixtures/sample.py
1
4084
x = { "a": 1, 'b': 2 } x = [ 3, 4 ] x = [ (sname, pname) for (sno, sname) in suppliers for (pno, pname) in parts for (sp_sno, sp_pno) in suppart if sno == sp_sno and pno == sp_pno ] def testing_indentation_in_199(some_var): first_line = "auto complete enabled by default?" ...
mit
-4,141,579,375,323,475,000
21.31694
143
0.600392
false
FEniCS/ufl
ufl/finiteelement/mixedelement.py
1
19622
# -*- coding: utf-8 -*- "This module defines the UFL finite element classes." # Copyright (C) 2008-2016 Martin Sandve Alnæs # # This file is part of UFL (https://www.fenicsproject.org) # # SPDX-License-Identifier: LGPL-3.0-or-later # # Modified by Kristian B. Oelgaard # Modified by Marie E. Rognes 2010, 2012 # Modi...
lgpl-3.0
-8,729,777,980,419,253,000
39.539256
103
0.588859
false
oudalab/phyllo
phyllo/extractors/johannesDB.py
1
2507
import sqlite3 import urllib import re from urllib.request import urlopen from bs4 import BeautifulSoup, NavigableString import nltk nltk.download('punkt') from nltk import sent_tokenize def parseRes2(soup, title, url, cur, author, date, collectiontitle): chapter = 0 sen = "" num = 1 [e.extract() fo...
apache-2.0
-3,149,571,058,116,537,300
31.986842
103
0.55724
false
mike-perdide/gfbi_core
tests/test1.py
1
7715
from subprocess import Popen, PIPE from gfbi_core.git_model import GitModel from gfbi_core.editable_git_model import EditableGitModel from gfbi_core.util import Index, Timezone from git.objects.util import altz_to_utctz_str from datetime import datetime import os import time REPOSITORY_NAME = "/tmp/tests_git" AVAILAB...
gpl-3.0
-2,993,049,151,893,016,600
32.689956
78
0.572391
false
sketchyfish/ypp-price-calculator
strip_automation.py
1
5368
#!/usr/bin/python """ This code uses .strip formatting once to remove the \n and another time to remove the \t from the below lists. For readability, the script uses a print("\n") to add a new line between the two lists """ island_list = ['Armstrong Island', 'Atchafalaya Island', 'Immokalee Island', 'Moultrie Island'...
gpl-2.0
-3,883,570,465,021,505,500
91.551724
162
0.607116
false
markgw/pimlico
src/python/pimlico/cli/testemail.py
1
1311
# This file is part of Pimlico # Copyright (C) 2020 Mark Granroth-Wilding # Licensed under the GNU LGPL v3.0 - https://www.gnu.org/licenses/lgpl-3.0.en.html from __future__ import print_function from pimlico.cli.subcommands import PimlicoCLISubcommand from pimlico.utils.email import send_pimlico_email class EmailCm...
gpl-3.0
2,851,914,663,193,059,300
39.96875
106
0.710145
false
ellmetha/django-machina
tests/unit/apps/forum_conversation/test_forms.py
1
16391
import pytest from django import forms from django.contrib.auth.models import AnonymousUser from faker import Faker from machina.apps.forum_conversation.forms import PostForm, TopicForm from machina.conf import settings as machina_settings from machina.core.db.models import get_model from machina.core.loading import g...
bsd-3-clause
4,596,627,068,081,951,000
33.507368
99
0.558233
false
aangert/PiParty
color_tests/color_combo_test.py
2
1075
from enum import Enum class Colors(Enum): Pink = (255,96,96) Magenta = (255,0,192) Orange = (255,64,0) Yellow = (255,255,0) Green = (0,255,0) Turquoise = (0,255,255) Blue = (0,0,255) Purple = (96,0,255) color_list = [x for x in Colors] quad_teams_banned = { Colors.Pink : [Colors.M...
mit
-6,680,612,122,141,936,000
28.054054
111
0.606512
false
DrYerzinia/Cat-Finder
src/KittyTracker/kittyTracker.py
1
1581
from netaddr import * from datetime import datetime import blescan import time import sys import bluetooth._bluetooth as bluez from Kitty import Kitty from CheckKittys import CheckKittys from BLESerialScanner import BLESerialScanner import SendMail import config def process(mac, rssi): found = False for k in confi...
unlicense
-1,341,239,824,988,486,700
19.532468
96
0.688805
false
alaski/nova
nova/tests/unit/virt/libvirt/test_driver.py
1
828402
# Copyright 2010 OpenStack Foundation # Copyright 2012 University Of Minho # # 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....
apache-2.0
6,406,292,573,906,182,000
44.142063
97
0.549332
false
kaidebrick/piface_thingsboard
piface_thingsboard.py
1
1271
#!/usr/bin/env python3 import paho.mqtt.client as mqtt import configparser import pifacedigitalio as PFIO APPNAME = os.path.splitext(os.path.basename(__file__))[0] INIFILE = os.getenv('INIFILE', APPNAME + '.ini') config = configparser.ConfigParser() config.read(INIFILE) MODULE = 'PFIO' MQTT_HOST = config.get("gl...
gpl-3.0
-1,371,690,723,719,318,300
31.589744
70
0.698662
false
anaran/olympia
apps/bandwagon/tasks.py
1
4144
import logging import math from django.core.files.storage import default_storage as storage from django.db.models import Count import elasticutils.contrib.django as elasticutils from celeryutils import task import amo from amo.decorators import set_modified_on from amo.helpers import user_media_path from amo.utils i...
bsd-3-clause
8,352,693,703,532,291,000
33.247934
79
0.625
false
FATSLiM/fatslim
docs/sphinx-src/documentation/tutorials/show_apl_map.py
1
1525
#!/usr/bin/env python # -*- coding: utf8 -*- import numpy as np import matplotlib.pyplot as plt from scipy.interpolate import griddata CSV_FILENAME = "bilayer_prot_apl_frame_00000.csv" GRO_FILENAME = "bilayer_prot.gro" PNG_FILENAME = "bilayer_prot_apl_frame_00000.png" # Get Box vectors last_line = "" with open(GRO_F...
gpl-3.0
6,198,686,079,688,072,000
22.828125
72
0.61377
false
andree182/podx3
getrawaudio.py
1
1079
#!/usr/bin/env python """ Reads audio data from the device through isochronous transfer. NOTE: Due to alignment or whatever, the data is not correct. Data size of the input endpoint is 170B, but the the actual data size is 6 * (3*2*4), the rest bytes are filled with zero. """ import usb.util import time ID_VENDOR = ...
gpl-2.0
-2,545,959,085,404,143,600
20.58
88
0.624652
false
CPedrini/TateTRES
erapi.py
1
11009
#-*- encoding: utf-8 -*- import csv, math, time, re, threading, sys try: from urllib.request import urlopen except ImportError: from urllib import urlopen class ErAPI(): # Metodo constructor, seteos basicos necesarios de configuracion, instancia objetos utiles def __init__(self): self.data = ...
apache-2.0
-1,751,381,920,954,348,000
36.962069
195
0.511446
false
vivaxy/algorithms
python/problems/sum_of_even_numbers_after_queries.py
1
1068
""" https://leetcode.com/problems/sum-of-even-numbers-after-queries/ https://leetcode.com/submissions/detail/215582833/ """ from typing import List class Solution: def sumEvenAfterQueries(self, A: List[int], queries: List[List[int]]) -> List[int]: ANS = [] ans = 0 for a in A: ...
mit
-5,519,847,744,780,625,000
23.272727
87
0.468165
false
heromod/migrid
mig/reST/html_writer.py
1
1966
#!/usr/bin/python # -*- coding: utf-8 -*- # # --- BEGIN_HEADER --- # # html_writer - [insert a few words of module description on this line] # Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter # # This file is part of MiG. # # MiG is free software: you can redistribute it and/or modify # it under the terms ...
gpl-2.0
4,386,083,187,276,027,400
23.575
101
0.677009
false
davhenriksen/bringhomethebacon
web/web.py
1
27835
#!/usr/bin/env python # web.py # bring home the bacon Copyright (C) 2012 David Ormbakken Henriksen (davidohenriksen@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 Software Foundation, eit...
gpl-3.0
-5,249,010,472,040,336,000
36.870748
188
0.496102
false
elidaian/sudoku
src/server/users.py
1
3651
""" users.py Created on: Aug 17 2013 Author: eli """ class UserPermission(object): """ Describes a permission for an operation for an user. """ PERMISSIONS = [] _curr_permission_bit = 1 def __init__(self, name, description, is_default): """ Construct a permissio...
gpl-3.0
2,345,246,301,992,049,000
27.748031
83
0.576828
false
tedlaz/pyted
misthodosia/m13/f_fmy_old.py
1
1057
# -*- coding: utf-8 -*- ''' Created on 18 Νοε 2012 @author: tedlaz ''' from PyQt4 import QtGui, QtCore from gui import ui_fmy from utils.fmy_etoys import makeFMYFile class dlg(QtGui.QDialog): def __init__(self, args=None, parent=None): super(dlg, self).__init__(parent) sel...
gpl-3.0
1,785,956,018,139,974,700
24.769231
92
0.56334
false
schoolie/bokeh
bokeh/models/plots.py
1
20026
''' Models for representing top-level plot objects. ''' from __future__ import absolute_import from six import string_types from ..core.enums import Location from ..core.properties import Auto, Bool, Dict, Either, Enum, Include, Instance, Int, List, Override, String from ..core.property_mixins import LineProps, Fill...
bsd-3-clause
-4,859,454,633,804,849,000
31.0416
109
0.624688
false
expertanalytics/fagkveld
worldmap/src/worldmap/model/location.py
1
1192
from typing import Dict, List, Tuple, Set, Optional from abc import abstractmethod import numpy class Location: name: str = "" long_name: str = "" border_x: List[numpy.ndarray] border_hull_x: List[numpy.ndarray] border_y: List[numpy.ndarray] = [] border_hull_y: List[numpy.ndarray] = [] ...
bsd-2-clause
-622,663,362,204,864,100
21.923077
57
0.557886
false
dhp-denero/LibrERP
dt_product_brand/product_brand.py
1
3987
# -*- encoding: utf-8 -*- ################################################################################# # # # product_brand for OpenERP # # Copyright (C) 2009 NetAndCo (<http://www.ne...
agpl-3.0
8,626,166,335,862,885,000
47.609756
136
0.493979
false
jithinbp/pslab-desktop-apps
psl_res/GUI/D_PHYSICS/B_physics/B_SpeedOfSound.py
1
3745
#!/usr/bin/python """ :: This experiment is used to study non-inverting amplifiers """ from __future__ import print_function from PSL_Apps.utilitiesClass import utilitiesClass from PSL_Apps.templates import ui_template_graph_nofft import numpy as np from PyQt4 import QtGui,QtCore import pyqtgraph as pg impor...
gpl-3.0
8,507,347,280,602,509,000
26.335766
123
0.695861
false
massimovassalli/SingleCellForceSpectroscopy
sifork/qt/qtView.py
1
7581
from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s import os as os import sys import pyqtgraph as pg import numpy as np import Ui_qtView as qtView_face from sifork import experiment pg.setConfigOption('background', 'w') pg.setConfigOption(...
mit
3,310,249,543,625,385,500
38.284974
471
0.611661
false
vacancy/TensorArtist
examples/generative-model/desc_vae_mnist_mlp_bernoulli_adam.py
1
4242
# -*- coding:utf8 -*- # File : desc_vae_mnist_mlp_bernoulli_adam.py # Author : Jiayuan Mao # Email : maojiayuan@gmail.com # Date : 3/17/17 # # This file is part of TensorArtist. from tartist.core import get_env, get_logger from tartist.core.utils.naming import get_dump_directory, get_data_directory from tartist....
mit
2,794,771,510,245,185,000
33.487805
114
0.537247
false
CLVsol/clvsol_odoo_addons
clv_person_aux/models/address_aux.py
1
3795
# -*- coding: utf-8 -*- # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import logging from odoo import api, fields, models _logger = logging.getLogger(__name__) class AddressAux(models.Model): _inherit = 'clv.address_aux' perso...
agpl-3.0
-649,032,661,184,708,100
34.138889
117
0.594203
false
mzdu/2048gae
src/main.py
1
1335
import webapp2 import jinja2 import os import logging jinja_environment = jinja2.Environment(loader = jinja2.FileSystemLoader(os.path.dirname(__file__) + '/templates')) def doRender(handler, tname = 'index.html', values = {}): temp = jinja_environment.get_template(tname) handler.response.out.wr...
mit
6,896,633,148,561,898,000
35.083333
114
0.495131
false
tylerlaberge/Jasper
jasper/steps.py
1
1413
""" The steps module. """ from functools import wraps import asyncio class Step(object): """ The Step class is used as a wrapper around functions for testing behaviours. """ def __init__(self, function, **kwargs): """ Initialize a new Step object. :param function: The functio...
mit
7,253,816,304,372,000,000
24.232143
86
0.587403
false
xbmcmegapack/plugin.video.megapack.dev
resources/lib/menus/home_countries_american_samoa.py
1
1125
#!/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
-8,099,804,973,255,031,000
37.758621
76
0.69724
false
BurtBiel/azure-cli
src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_route_table/lib/models/__init__.py
1
1448
#--------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. #---------------------------------------------------------------------...
mit
-4,311,053,074,764,071,400
37.105263
94
0.593923
false
Lana-Pa/Mantis-training
conftest.py
1
2674
import pytest import json import os.path from fixture.application import Application import ftputil fixture = None target = None def load_config(file): global target if target is None: config_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), file) with open(config_file) as f: ...
apache-2.0
-8,926,993,292,282,782,000
36.971014
122
0.691603
false
tsl143/addons-server
src/olympia/users/cron.py
1
1443
from django.db import connections import multidb from celery import group import olympia.core.logger from olympia.amo import VALID_ADDON_STATUSES from olympia.amo.utils import chunked from .tasks import update_user_ratings_task task_log = olympia.core.logger.getLogger('z.task') def update_user_ratings(): """...
bsd-3-clause
5,285,070,275,735,279,000
30.369565
79
0.615385
false
IncidentNormal/TestApps
ALE/Platform_nodes_Draft3b.py
1
7673
from SimPy.Simulation import * import visual as v import math from random import seed, uniform, randint class Global(): NUMNODES = 4 NUMCHANNELS = 1 Node_L_List = [] Node_A_List = [] Node_S_List = [] ChannelList = [] #stores NodeSendQueueList = [] #stores maxTime = 10 class Mon(): ...
gpl-2.0
-7,459,447,548,906,195,000
47.563291
176
0.524567
false
thinkingmachines/deeplearningworkshop
codelab_5_simple_cnn.py
1
1964
# SIMPLE MNIST CNN # Source: https://www.tensorflow.org/tutorials/layers def cnn_model_fn(features, labels, mode): """Model function for CNN.""" # Input Layer input_layer = tf.reshape(features, [-1, 28, 28, 1]) # Convolutional Layer #1 conv1 = tf.layers.conv2d( inputs=input_layer, filters=32, ...
mit
78,197,066,181,890,620
29.215385
79
0.653768
false
Penaz91/Glitch_Heaven
Game/loadSaves.py
1
2299
# Load Game Menu Component # Part of the Glitch_Heaven project # Copyright 2015-2016 Penaz <penazarea@altervista.org> from components.UI.loadmenu import loadMenu from os import listdir from os.path import join as pjoin from os import remove from game import Game from components.UI.textMenuItem import textMenuItem from ...
mit
7,232,331,274,901,255,000
37.983051
97
0.545455
false
fedora-modularity/pdc-updater
pdcupdater/handlers/__init__.py
1
1784
import abc import fedmsg.utils def load_handlers(config): """ Import and instantiate all handlers listed in the given config. """ for import_path in config['pdcupdater.handlers']: cls = fedmsg.utils.load_class(import_path) handler = cls(config) yield handler class BaseHandler(object...
lgpl-2.1
4,880,716,642,753,441,000
29.758621
79
0.638453
false
ww9rivers/splunk-sdk-python
tests/test_kvstore_batch.py
1
2815
#!/usr/bin/env python # # Copyright 2011-2014 Splunk, 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...
apache-2.0
9,140,246,485,119,778,000
32.915663
94
0.608171
false
QuLogic/meson
mesonbuild/mintro.py
1
24506
# Copyright 2014-2016 The Meson development team # 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
-1,309,064,487,587,284,500
44.297597
172
0.615278
false
djrrb/OldGlory
oldGlory.py
1
7067
""" OLD GLORY By David Jonathan Ross <http://www.djr.com> This drawbot script will draw the American Flag. It's also responsive! I made this to experiment with Drawbot Variables. For the most part, it follows the rules here: http://en.wikipedia.org/wiki/Flag_of_the_United_States#Specifications It does...
mit
6,339,230,936,733,769,000
27.963115
113
0.600538
false
kalliope-project/kalliope
kalliope/__init__.py
1
8965
#!/usr/bin/env python # coding: utf8 import argparse import logging import time from kalliope.core import Utils from kalliope.core.ConfigurationManager import SettingLoader from kalliope.core.ConfigurationManager.BrainLoader import BrainLoader from kalliope.core.SignalLauncher import SignalLauncher from flask import ...
gpl-3.0
-1,805,813,272,564,953,000
33.217557
106
0.608254
false
SU-ECE-17-7/hotspotter
hscom/fileio.py
1
12148
from __future__ import division, print_function import __common__ (print, print_, print_on, print_off, rrr, profile) = __common__.init(__name__, '[io]') # Python import os import fnmatch import pickle import cPickle from os.path import normpath, exists, realpath, join, expanduser, dirname import datetime import time #...
apache-2.0
-9,184,094,975,685,221,000
26.862385
88
0.583388
false
Ghost-script/TaskMan
wsgi/taskman/taskman/views.py
1
4067
from django.shortcuts import render, HttpResponse, redirect from forms import LoginForm, RegistrationForm from django.contrib.auth import login, logout, authenticate from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from taskManager.forms import TaskCreate,MultipleSel...
gpl-2.0
6,536,155,798,609,383,000
34.365217
78
0.522252
false
erikrose/sphinx-js
sphinx_js/typedoc.py
1
13554
"""Converter from typedoc output to jsdoc doclet format""" import os import sys import json from six import iteritems # JSDoc entries used in sphinx-js: # - optional access of [ public, private, protected ] # - optional classdesc # - optional comment (controls doclet inclusion) # - optional description # - optional ...
mit
7,926,526,332,986,313,000
36.545706
86
0.539324
false
openstack/networking-bgpvpn
bgpvpn_dashboard/test/admin/test_views.py
1
3209
# Copyright (c) 2017 Orange. # # 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, soft...
apache-2.0
7,976,155,279,535,758,000
38.617284
77
0.648177
false
lpfann/fri
fri/model/lupi_ordinal_regression.py
1
12804
from itertools import product import cvxpy as cvx import numpy as np from sklearn.metrics import make_scorer from sklearn.utils import check_X_y from fri.model.base_lupi import ( LUPI_Relevance_CVXProblem, split_dataset, is_lupi_feature, ) from fri.model.ordinal_regression import ( OrdinalRegression_R...
mit
1,933,810,736,430,988,500
32.257143
130
0.559513
false
bapakode/OmMongo
examples/advanced_modeling.py
1
1048
''' This page is going to go through some more advanced modeling techniques using forward and self-references ''' from ommongo.document import Document from ommongo.fields import * from datetime import datetime from pprint import pprint class Event(Document): name = StringField() children = ListField(Docume...
mit
491,704,710,223,334,700
25.2
72
0.611641
false
mrachinskiy/jewelcraft
ops_gem/gem_select_ops.py
1
6067
# ##### BEGIN GPL LICENSE BLOCK ##### # # JewelCraft jewelry design toolkit for Blender. # Copyright (C) 2015-2021 Mikhail Rachinskiy # # 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, eith...
gpl-3.0
5,417,416,596,498,840,000
31.100529
100
0.577056
false
norus/procstat-json
tornado/test/httputil_test.py
1
7432
#!/usr/bin/env python from __future__ import absolute_import, division, with_statement from tornado.httputil import url_concat, parse_multipart_form_data, HTTPHeaders from tornado.escape import utf8 from tornado.log import gen_log from tornado.testing import ExpectLog from tornado.test.util import unittest from torna...
gpl-3.0
8,831,329,724,078,077,000
31.740088
81
0.541039
false
vprime/puuuu
env/lib/python2.7/site-packages/paramiko/client.py
1
21100
# Copyright (C) 2006-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 2.1 of the License, or (a...
mit
-2,178,805,618,934,213,600
39.655106
139
0.603839
false
BlackHole/enigma2-obh10
lib/python/Screens/EpgSelection.py
2
4137
from __future__ import print_function from Screens.InfoBar import InfoBar from enigma import eServiceReference from Components.ActionMap import HelpableActionMap from Screens.EpgSelectionChannel import EPGSelectionChannel from Screens.EpgSelectionBase import EPGServiceZap from Screens.TimerEntry import addTimerFromEven...
gpl-2.0
-7,913,178,780,223,782,000
31.320313
183
0.751511
false
cpatrickalves/simprev
util/carrega_parametros.py
1
1280
# -*- coding: utf-8 -*- """ @author: Patrick Alves """ # Arquivo com os parâmetros de projeção arquivo_parametros = "parametros.txt" def obter_parametros(): # Dicionário que armazena os parâmetros parametros = {} with open(arquivo_parametros, 'r' ,encoding='utf-8') as arquivo: for linha in ar...
gpl-3.0
8,191,328,923,808,139,000
34.166667
84
0.528063
false
ryepdx/sale_negotiated_shipping
__init__.py
1
1238
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2015 RyePDX LLC # Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>) # Copyright (C) 2004-2010 OpenERP SA (<http://www.ope...
agpl-3.0
2,449,599,019,303,715,000
40.3
78
0.636511
false
Ginkgo-Biloba/Misc-Python
numpy/FractalAndChaos.py
1
10149
# coding=utf-8 """ 分形与混沌绘图 """ import numpy as np import pylab as pl import time from matplotlib import cm, collections from math import log2, sin, cos """ Mandelbrot 集合 f_c(z) = z^2 + c, c \in \doubleZ Mandelbrot 集合就是使以上序列不发散的所有c点的集合。 用程序绘制 Mandelbrot 集合时不能进行无限次迭代,最简单的方法是使用逃逸时间 (迭代次数) 进行绘制,具体算法如下: 判断每次调用函数 f_ c(z) ...
gpl-3.0
4,156,537,185,942,738,400
22.5
120
0.579037
false
mothsART/linkmanager
linkmanager/tests/interface.py
1
20597
import json from io import StringIO from unittest.mock import (patch, mock_open, MagicMock) import asyncio from linkmanager.translation import gettext as _ class CP(object): result = '' def cpvar(self, r): self.result = r cp = CP() addlink = iter([ ### input on: test_cmd_flush _('Y'), ...
bsd-2-clause
5,549,153,208,129,339,000
27.43232
85
0.52548
false
pytlakp/intranetref
src/intranet3/views/scrum/sprint.py
1
11968
import json import datetime import markdown from pyramid.view import view_config from pyramid.httpexceptions import HTTPFound, HTTPForbidden, HTTPNotFound from pyramid.response import Response from intranet3.utils.views import BaseView from intranet3.forms.scrum import SprintForm from intranet3.forms.common import De...
mit
3,481,813,588,570,232,000
34.725373
95
0.601939
false
viktorTarasov/PyKMIP
kmip/tests/unit/core/messages/contents/test_protocol_version.py
1
9321
# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory # 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/LICEN...
apache-2.0
-7,470,747,633,934,984,000
33.522222
79
0.62622
false
google/dotty
efilter_tests/unit/protocols/repeated.py
1
3524
# EFILTER Forensic Query Language # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
apache-2.0
-5,256,765,739,999,268,000
33.54902
77
0.637911
false
ikumen/project-euler
solutions/016.py
1
1723
#!/usr/bin/env python ''' 016.py: https://projecteuler.net/problem=16 Power digit sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^1000? ''' import os import pytest import time import math def power_digit_sum(N, P): """ Calculates the sum of dig...
mit
8,554,294,037,166,094,000
21.671053
74
0.631457
false
cjaymes/pyscap
src/scap/model/oval_5/defs/independent/VariableStateElement.py
1
1216
# Copyright 2016 Casey Jaymes # This file is part of PySCAP. # # PySCAP 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. # # PySCAP is ...
gpl-3.0
-5,975,244,660,325,065,000
39.533333
173
0.683388
false
Kotaimen/stonemason
tests/formatbundle/test_tileformat.py
1
1177
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '2/19/15' import unittest from stonemason.formatbundle import TileFormat, InvalidTileFormat class TestTileFormat(unittest.TestCase): def test_init(self): fmt = TileFormat(format='JPEG') self.assertEqual(fmt.format, 'JPEG') sel...
mit
-7,065,150,623,025,478,000
30.810811
80
0.610025
false
bhupennewalkar1337/erpnext
erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
1
26311
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, formatdate, flt, getdate from frappe import _, throw from erpnext.setup.utils import get_company_currency i...
gpl-3.0
-4,062,770,884,894,112,000
37.749632
184
0.689559
false
npilon/planterbox
planterbox/decorators.py
1
2059
"""Decorators used when building a package of planterbox features to define steps and hooks Also some private functions used by those decorators. """ from functools import partial import logging import re from six import ( string_types, ) log = logging.getLogger('planterbox') EXAMPLE_TO_FORMAT = re.compile(r'...
mit
-6,669,727,340,165,458,000
29.731343
78
0.668771
false
rahimnathwani/measure-anything
project/auth/models.py
1
6772
from datetime import datetime import hashlib from werkzeug.security import generate_password_hash, check_password_hash from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from flask import current_app from flask.ext.login import UserMixin, AnonymousUserMixin from .. import db, login_manager class P...
mit
-7,012,245,458,600,389,000
31.557692
73
0.603219
false
eubr-bigsea/tahiti
migrations/versions/1d7c21b6c7d2_add_keras_core_layer_operation_reshape.py
1
10248
# -*- coding: utf-8 -*- """Add Keras Core Layer Operation Reshape Revision ID: 1d7c21b6c7d2 Revises: 4a4b7df125b7 Create Date: 2018-11-01 10:26:22.659859 """ from alembic import op import sqlalchemy as sa from alembic import context from alembic import op from sqlalchemy import String, Integer, Text from sqlalchemy.o...
apache-2.0
7,580,760,651,073,423,000
28.268571
113
0.577314
false
gdestuynder/MozDef
cron/google2mozdef.py
1
8901
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation import sys import logging import requests import json fr...
mpl-2.0
-2,776,831,902,477,656,600
40.593458
125
0.569037
false
bubbleboy14/cantools
cantools/web/dez_server/daemons.py
1
2550
import sys, json, gc, os try: import psutil except ImportError as e: pass # google crap engine (get it if you need it!) from dez.memcache import get_memcache from dez.http.application import HTTPApplication from .routes import static, cb from cantools import config sys.path.insert(0, ".") # for dynamically load...
mit
6,818,281,954,024,664,000
41.5
109
0.59098
false
phtj/eddex
houdini/python_libs/houdini_ea/wrappers.py
1
4084
""" Executor classes used for executing tasks. """ import sys, os import hou from bson.binary import Binary #Current working directory HOU_FOLDER_PATH = os.getcwd() #Helper functions def _load_hip_file(hip_file_name): """Attempt to load a hip file in Houdini """ #Replacing "\\" with "/" is required to avoid ...
gpl-3.0
4,568,971,612,252,445,000
33.033333
87
0.63859
false
fugitifduck/exabgp
lib/exabgp/protocol/family.py
1
5287
# encoding: utf-8 """ address.py Created by Thomas Mangin on 2010-01-19. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ from struct import pack from struct import unpack # =================================================================== AFI # http://www.iana.org/assignments/address-family-number...
bsd-3-clause
2,321,827,960,558,510,000
22.923077
142
0.566106
false
DeV1doR/ethereumd-proxy
ethereumd/proxy.py
1
36272
import operator import asyncio import re import logging from enum import IntEnum from aioethereum import create_ethereum_client from aioethereum.errors import BadResponseError from .utils import hex_to_dec, wei_to_ether, ether_to_gwei, ether_to_wei GAS_AMOUNT = 21000 GAS_PRICE = 20 # Gwei DEFAUT_FEE = wei_to_ether...
mit
1,286,945,215,647,437,800
42.335723
236
0.611381
false