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
mulkieran/storage_alerts
tests/sources/generic/by_line/states_test.py
1
1346
# Copyright (C) 2015 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be u...
gpl-2.0
-5,833,774,020,541,816,000
45.413793
77
0.751114
false
annapowellsmith/openpresc
openprescribing/frontend/management/commands/import_practices.py
1
3793
import csv import glob from django.core.management.base import BaseCommand from frontend.models import Practice, PCT class Command(BaseCommand): args = '' help = 'Imports practice data either from epraccur.csv, or from HSCIC ' help += 'address files, depending on options. ' def add_arguments(self, pa...
mit
-25,044,826,727,730,020
32.566372
76
0.509359
false
AlexBryner/SalesforceTools
SalesforceScripts.py
1
12737
# coding: utf-8 import numpy as np import pandas as pd import time from datetime import datetime, timedelta, date from time import sleep, gmtime, strftime from pandas import DataFrame, Series, read_csv from salesforce_bulk_api import SalesforceBulkJob from SalesforceBulkQuery import * from simple_salesforce import * ...
mit
1,804,623,741,723,414,500
41.315615
415
0.560493
false
milkpku/BetaElephant
policy_experiment/policy.orign/dataset.py
1
7607
#!/usr/bin/python3 #-*-coding:utf-8-*- #$File: dataset.py #$Date: Sat May 7 10:59:24 2016 #$Author: Like Ma <milkpku[at]gmail[dot]com> import copy import random import numpy as np OUT_TYPE = np.float32 class Dataset(object): def __init__(self, path, _type): if _type == 'train': self.__file...
mit
-7,321,292,994,670,105,000
35.859223
120
0.516133
false
neurobin/acme-tiny
acme_tiny.py
1
10110
#!/usr/bin/env python import argparse, subprocess, json, os, sys, base64, binascii, time, hashlib, re, copy, textwrap, logging try: from urllib.request import urlopen # Python 3 except ImportError: from urllib2 import urlopen # Python 2 #DEFAULT_CA = "https://acme-staging.api.letsencrypt.org" DEFAULT_CA = "htt...
mit
-540,957,731,992,042,600
46.023256
152
0.602176
false
ardeaf/Reddit-Image-Scraper
redditimagescraper/modules/accessreddit.py
1
2567
import time from datetime import datetime import praw import prawcore.exceptions from . import config # Returns a list of urls posted to the subreddit_name between start_date and end_date. # The list is in the form: [url, date_string], [url, date_string], [url, date_string], ... ] def subs_to_download(subreddit_name...
gpl-3.0
50,929,416,389,398,730
37.313433
119
0.593689
false
rg3915/spark
spark/selenium/selenium_event.py
1
1303
import time from random import choice, randint from decouple import config from selenium import webdriver from gen_address import address from gen_random_values import gen_string, gen_date, convert_date HOME = config('HOME') # page = webdriver.Firefox() page = webdriver.Chrome(executable_path=HOME + '/chromedriver/ch...
mit
-9,188,802,131,510,466,000
24.54902
76
0.685342
false
PableraShow/Learn-to-program-with-Python-guide
02 - Functions, logic and conditionals/more_operations-numbers_and_strings.py
1
2156
# More Operations # Numbers and Strings # You can convert a string to a number (float or int) and # vice versa using a few simple functions. print "Ex. 1:", int("3") print "Ex. 2:", float("3.4") print "Ex. 3:", str(34) print "Ex. 4:", str(3.4) print # Since the above outputs look exactly the same as...
mit
-7,451,375,012,025,516,000
26.368421
61
0.6359
false
saurabh6790/frappe
frappe/website/context.py
1
9236
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, os, json from frappe.website.doctype.website_settings.website_settings import get_website_settings from frappe.website.router import get_page_context from frappe.m...
mit
5,473,907,450,777,435,000
30.097643
98
0.712971
false
odoo-brazil/odoo-brazil-addons
l10n_br_search_zip/models/l10n_br_zip.py
1
5338
# -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2015 TrustCode - www.trustcode.com.br # # Danimar Ribeiro <danimaribeiro@gmail.co...
agpl-3.0
6,183,450,382,975,461,000
43.115702
79
0.445111
false
hbiyik/tribler
src/tribler-core/tribler_core/modules/metadata_store/tests/test_tracker_state.py
1
1420
from ipv8.keyvault.crypto import default_eccrypto from pony.orm import db_session from tribler_core.modules.metadata_store.store import MetadataStore from tribler_core.tests.tools.base_test import TriblerCoreTest from tribler_core.utilities.tracker_utils import MalformedTrackerURLException class TestTrackerState(Tr...
lgpl-3.0
6,903,275,403,575,010,000
36.368421
106
0.711268
false
deepmind/grid-cells
utils.py
1
5720
# Copyright 2018 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 agreed to in writing, ...
apache-2.0
-1,189,271,993,842,168,300
29.588235
80
0.617483
false
Orange-OpenSource/tinypyki
setup.py
1
1758
# Copyright (C) 2014 Orange # This software is distributed under the terms and conditions of the 'BSD # 3-Clause' license which can be found in the 'LICENSE.txt' file in this package # distribution or at 'http://opensource.org/licenses/BSD-3-Clause'. #!/usr/bin/env python """Setup script for tinypyki.""" from distu...
bsd-3-clause
1,058,190,365,742,090,100
41.878049
80
0.556314
false
devilry/devilry-django
devilry/devilry_admin/views/assignment/students/overview.py
1
3478
# -*- coding: utf-8 -*- from django.utils.translation import gettext_lazy from cradmin_legacy import crapp from cradmin_legacy.crinstance import reverse_cradmin_url from cradmin_legacy.viewhelpers.listbuilder.itemframe import DefaultSpacingItemFrame from cradmin_legacy.viewhelpers.listbuilder.lists import RowList fr...
bsd-3-clause
-3,169,107,164,609,173,000
33.435644
97
0.675101
false
diegocortassa/TACTIC
src/tactic/ui/widget/swap_display_wdg.py
1
7595
########################################################### # # Copyright (c) 2009, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
-1,737,304,815,002,849,300
26.518116
93
0.503884
false
llvtt/mongo-python-driver
test/test_common.py
1
8501
# Copyright 2011-2014 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
7,601,771,617,396,056,000
37.292793
79
0.560287
false
lmtierney/watir-snake
tests/browser/elements/hn_tests.py
1
2878
from re import compile import pytest from nerodia.exception import UnknownObjectException pytestmark = pytest.mark.page('non_control_elements.html') class TestHnExist(object): def test_returns_true_if_the_element_exists(self, browser): assert browser.h1(id='header1').exists is True assert brows...
mit
4,093,528,761,205,421,600
40.710145
94
0.681723
false
google/material-design-icons
update/venv/lib/python3.9/site-packages/pip/_internal/cli/main.py
2
2483
"""Primary application entrypoint. """ import locale import logging import os import sys from typing import List, Optional from pip._internal.cli.autocompletion import autocomplete from pip._internal.cli.main_parser import parse_command from pip._internal.commands import create_command from pip._internal.exceptions im...
apache-2.0
4,474,457,632,013,949,400
33.971831
75
0.726138
false
Rickyfox/SPR
SPR_Crawl/label.py
1
4142
__author__ = 'nick' from pymongo import MongoClient class DocLabeler: """ Class to manually label the instances in the database """ def __init__(self): """ Sole constructor. Creates database connection and auto executes the labeling process :return: """ self....
apache-2.0
6,700,020,532,242,260,000
36.324324
145
0.474167
false
ThiefMaster/sqlalchemy
lib/sqlalchemy/orm/persistence.py
1
51586
# orm/persistence.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """private module containing functions used to emit INSERT, UPDATE and DELETE sta...
mit
-1,907,588,162,479,042,600
35.379408
80
0.553852
false
openstack/rally
tests/unit/test_ddt.py
1
4367
# 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, software # d...
apache-2.0
2,773,687,217,174,857,000
36.646552
78
0.550492
false
Mahdisadjadi/arxivscraper
arxivscraper/arxivscraper.py
1
9520
""" A python program to retreive recrods from ArXiv.org in given categories and specific date range. Author: Mahdi Sadjadi (sadjadi.seyedmahdi[AT]gmail[DOT]com). """ from __future__ import print_function import xml.etree.ElementTree as ET import datetime import time import sys PYTHON3 = sys.version_info[0] == 3 if PYT...
mit
-7,328,700,909,032,694,000
37.08
107
0.545798
false
richlanc/KaraKara
website/karakara/auth/__init__.py
1
1672
from externals.lib.social._login import IUserStore from sqlalchemy.orm.exc import NoResultFound from ..model import DBSession, commit from ..model.model_comunity import ComunityUser, SocialToken from ..templates import helpers as h class ComunityUserStore(IUserStore): def get_user_from_token(self, provider_to...
gpl-3.0
-164,246,803,203,293,600
28.333333
78
0.599282
false
glomex/gcdt
tests/resources/simple_cloudformation_stack_with_ec2/cloudformation.py
1
3689
#!/usr/bin/env python # Converted from RDS template located at: # https://github.com/cloudtools/troposphere/blob/master/examples/RDS_with_DBParameterGroup.py import os import troposphere from troposphere import Base64, Join, Parameter, Output, Ref, Template, Tags from troposphere.rds import DBInstance, DBParameterGrou...
mit
1,565,926,246,439,095,600
30
134
0.676064
false
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/python/Lib/comtypes/test/test_msscript.py
1
2790
import unittest from ctypes import POINTER from comtypes.automation import IDispatch from comtypes.client import CreateObject from comtypes import GUID ##from test import test_support ##from comtypes.unittests import support try: GUID.from_progid("MSScriptControl.ScriptControl") except WindowsError: # doesn't...
agpl-3.0
2,068,002,541,177,216,300
37.219178
103
0.579211
false
anjakisek/Mlin
racunalnik_igralec.py
1
1948
import threading from igra import * from minimax import * import time class Racunalnik(): def __init__(self, gui, algoritem): self.gui = gui self.algoritem = algoritem #izbran algoritem, minimax ali alphabeta self.mislec = None #vlakno za razmisljanje self.je_treba_prekiniti = False...
gpl-3.0
-1,400,040,275,411,350,500
33.175439
80
0.609856
false
zauonlok/server
server/server/server.py
1
5551
import logging import socket import sys from ..common import Message, monitor from .connection import Connection, ConnectionBroken, ConnectionClosed from .multiplexer import EpollMultiplexer, SelectMultiplexer class Server: def __init__(self, host='', port=0, backlog=socket.SOMAXCONN): if sys.platform.s...
mit
8,462,380,764,776,698,000
41.05303
80
0.537921
false
uzh/vm-mad
vmmad/test/test_util.py
1
1527
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Run tests for the `vmmad.util` module. """ # Copyright (C) 2011, 2012 ETH Zurich and University of Zurich. All rights reserved. # # Authors: # Riccardo Murri <riccardo.murri@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not ...
apache-2.0
-1,287,563,009,472,647,700
27.277778
84
0.692862
false
looooo/paraBEM
examples/plots/lifting_line.py
1
1404
from __future__ import division import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import paraBEM from paraBEM.liftingline import LiftingLine from paraBEM.utils import check_path # WingGeometry spw = 2 numpos = 50 z_fac_1 = -0.3 z_fac_2 = -0.7 y = np.sin(np.linspace(0, np.pi/2...
gpl-3.0
-6,012,824,955,244,377,000
25
70
0.648148
false
glebb/mopidy-appletv
mopidy_appletv/frontend.py
1
6287
# -*- coding: utf-8 -*- import pykka import socket import select import sys import pybonjour import time from mopidy import core, utils from threading import Thread import netifaces import logging import traceback logger = logging.getLogger(__name__) class AppleTvFrontend(pykka.ThreadingActor, core.CoreListene...
apache-2.0
1,817,403,628,692,839,700
33.933333
117
0.531891
false
nclsHart/glances
glances/core/glances_client.py
1
8024
# -*- coding: utf-8 -*- # # This file is part of Glances. # # Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com> # # Glances 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 Lic...
lgpl-3.0
-640,151,544,294,876,800
31.885246
138
0.574277
false
szlin/gitsome
gitsome/compat.py
1
1032
# -*- coding: utf-8 -*- # Copyright 2015 Donne Martin. 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. A copy of # the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "lice...
gpl-3.0
-3,121,134,046,922,476,500
30.272727
72
0.739341
false
sanjaymeena/ProgrammingProblems
python/CZITest/CZI_Test_Problem1.py
1
2325
# coding: utf-8 # `` # Task 1: Identifying common words between documents # For this task, you need to generate a matrix, where each entry contains the number of unique # common tokens (words) between each pair of documents. The output should include no headers for # rows or columns. The matrix should be symmetric, a...
apache-2.0
-832,424,390,543,315,700
22.25
102
0.673548
false
google/trax
trax/tf_numpy/public_symbol_test.py
1
1130
# coding=utf-8 # Copyright 2021 The Trax 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 applicable law or a...
apache-2.0
-1,881,075,086,277,361,400
28.736842
78
0.727434
false
ondrokrc/gramps
gramps/gui/views/treemodels/familymodel.py
1
6542
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2010 Nick Hall # # 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 v...
gpl-2.0
-554,885,614,302,928,200
31.547264
79
0.536839
false
JulyKikuAkita/PythonPrac
cs15211/MaximumSizeSubarraySumEqualsk.py
1
4810
__source__ = 'https://leetcode.com/problems/maximum-size-subarray-sum-equals-k/' # https://github.com/kamyu104/LeetCode/blob/master/Python/maximum-size-subarray-sum-equals-k.py # Time: O(n) # Space: O(n) # # Description: Leetcode # 325. Maximum Size Subarray Sum Equals k # # Given an array nums and a target value k, f...
apache-2.0
4,255,396,108,690,003,000
27.802395
97
0.493555
false
dbestm/mbed
workspace_tools/tests.py
1
47117
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
apache-2.0
-2,449,791,820,910,174,700
39.23655
209
0.544772
false
assuming/infiltrator
infiltrator/spiders/auto_base.py
1
1356
__author__ = 'ohmyxm' # coding: utf-8 import json import codecs def design_sites(filepath='infiltrator/sitesbase/design_sites.json'): fd = codecs.open(filepath, 'r', encoding='utf-8') result = json.loads(fd.read()) fd.close() return result['ui'], result['view'] UI_DESIGN_SITES, VIEW_DESIGN_SITES = ...
gpl-2.0
-1,572,175,403,518,355,500
23.654545
72
0.573009
false
02agarwalt/FNGS_website
fngs/fngs/settings.py
1
3882
""" Django settings for fngs project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os #...
apache-2.0
8,036,404,394,141,213,000
26.338028
91
0.691139
false
genome-vendor/cython
setup.py
1
12652
from distutils.core import setup, Extension from distutils.sysconfig import get_python_lib import os, os.path import sys try: import platform is_cpython = not hasattr(platform, 'python_implementation') or platform.python_implementation() == 'CPython' except (ImportError, NameError): is_cpython = True # CPy...
apache-2.0
-3,059,837,864,532,475,000
36.993994
119
0.582042
false
idosekely/python-lessons
lesson_1/python_types.py
1
1595
__author__ = 'sekely' # this is a comment. we use it for code documentation. ''' this is comment block. everything between those markers, is considered as a string, or block ''' 1 + 1 # these are pure integers, complete numbers. the result is '2' 3 / 1 # division ot integers will produce an integer. in that case,...
mit
-4,671,425,676,567,807,000
22.80597
101
0.6
false
IUNO-TDM/CouponGenerator
python-printer/Adafruit_Thermal.py
1
16561
#************************************************************************* # This is a Python library for the Adafruit Thermal Printer. # Pick one up at --> http://www.adafruit.com/products/597 # These printers use TTL serial to communicate, 2 pins are required. # IMPORTANT: On 3.3V systems (e.g. Raspberry Pi), use a 1...
gpl-3.0
-1,079,888,237,636,584,600
27.902269
74
0.671095
false
sloshedpuppie/LetsGoRetro
addons/plugin.video.emby-master/resources/lib/userclient.py
1
15585
# -*- coding: utf-8 -*- ################################################################################################## import hashlib import threading import xbmc import xbmcgui import xbmcaddon import xbmcvfs import artwork import utils import clientinfo import downloadutils #################...
gpl-2.0
8,451,069,600,961,892,000
31.305556
153
0.528585
false
pytorch/fairseq
fairseq/modules/transformer_sentence_encoder_layer.py
1
4326
# 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. from typing import Callable, Optional import torch import torch.nn as nn from fairseq import utils from fairseq.modules import LayerNorm, Mul...
mit
776,600,997,974,279,800
30.122302
84
0.585298
false
TheSimoms/Felleshoelet
spotifyconnector/venv/lib/python3.6/site-packages/pydub/playback.py
1
1790
""" Support for playing AudioSegments. Pyaudio will be used if it's installed, otherwise will fallback to ffplay. Pyaudio is a *much* nicer solution, but is tricky to install. See my notes on installing pyaudio in a virtualenv (on OSX 10.10): https://gist.github.com/jiaaro/9767512210a1d80a8a0d """ import subprocess fr...
gpl-2.0
6,127,885,894,892,512,000
24.211268
81
0.634637
false
rlindner81/pyload
module/plugins/accounts/MyfastfileCom.py
1
1806
# -*- coding: utf-8 -*- import time from module.plugins.internal.misc import json from module.plugins.internal.MultiAccount import MultiAccount class MyfastfileCom(MultiAccount): __name__ = "MyfastfileCom" __type__ = "account" __version__ = "0.10" __status__ = "testing" __config__ = [("mh_mode"...
gpl-3.0
5,270,015,722,444,122,000
34.411765
89
0.555371
false
chrisjdavie/Cookit
5-a-day-thing/data_out/save_all_as_xls.py
1
1065
''' Extracts the 5-a-day data from the different excel spreadsheets, and saves it all in one big spreadsheet. Created on 14 Nov 2014 @author: chris ''' def main(): base_dir = '/home/chris/Projects/Cookit/family-food-datasets/' import xlwt workbook = xlwt.Workbook() from pickle_this imp...
mit
1,771,758,831,391,238,100
31.30303
180
0.585915
false
jiadaizhao/LeetCode
0401-0500/0407-Trapping Rain Water II/0407-Trapping Rain Water II.py
1
1241
import heapq class Solution: def trapRainWater(self, heightMap: List[List[int]]) -> int: m = len(heightMap) if m == 0: return 0 n = len(heightMap[0]) if n == 0: return 0 visited = [[False]*n for _ in range(m)] pq = [] for i in range(m):...
mit
-7,279,575,406,421,195,000
36.606061
81
0.423852
false
Kozea/Radicale
radicale/tests/custom/auth.py
1
1080
# This file is part of Radicale Server - Calendar Server # Copyright © 2008 Nicolas Kandel # Copyright © 2008 Pascal Halter # Copyright © 2008-2017 Guillaume Ayoub # Copyright © 2017-2018 Unrud <unrud@outlook.com> # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
gpl-3.0
6,017,226,577,821,666,000
30.647059
70
0.732342
false
IceCubeDev/SpaceOrNot
psycopg2/setup.py
1
22843
# setup.py - distutils packaging # # Copyright (C) 2003-2010 Federico Di Gregorio <fog@debian.org> # # psycopg2 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 License, or # (at...
apache-2.0
6,777,831,471,928,350,000
36.143089
81
0.618439
false
drajen/resthome
app/smartthings.py
1
5032
# # smartthings.py # # David Janes # IOTDB.org # 2014-01-31 # # Demonstrate how to use the SmartThings API from Python. # # See also: # Example App explanation: # http://build.smartthings.com/blog/tutorial-creating-a-custom-rest-smartapp-endpoint/ # # Example PHP code: # https://www.dropbox.com/s/7m...
bsd-3-clause
-4,383,694,669,888,439,000
25.208333
104
0.562003
false
USGSDenverPychron/pychron
pychron/processing/analyses/view/main_view.py
1
16975
# =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
apache-2.0
-8,547,102,248,031,160,000
37.231982
115
0.474934
false
nicupavel/opp
src/opp.py
1
9757
#!/usr/bin/python import openpanzer as op from oppSql import * from oppRdf import * import util from dbpedia import DbpediaQuery from websearch import GoogleQuery, BingQuery from urllib import quote, unquote from pprint import pprint import time,os, sys, errno reload(sys) sys.setdefaultencoding("utf-8") OFFLINE_JSON...
gpl-2.0
-3,290,526,785,492,938,000
30.172524
159
0.631649
false
DTUWindEnergy/Python4WindEnergy
lesson 3/results/ebra.py
1
8402
# -*- coding: utf-8 -*- <nbformat>3.0</nbformat> # <headingcell level=1> # Plotting with Matplotlib # <headingcell level=2> # Prepare for action # <codecell> import numpy as np import scipy as sp import sympy # Pylab combines the pyplot functionality (for plotting) with the numpy # functionality (for mathematics...
apache-2.0
2,918,764,297,881,229,000
24.681957
259
0.701477
false
jmlopez-rod/promus
promus/core/__init__.py
1
5429
""" Promus core This package contains the object that executes commands on your behave as well as other utility functions. """ import re import os import sys import socket from promus.command import exec_cmd, date from promus.core.ssh import ( make_key, get_keys, get_public_key, read_config, writ...
bsd-3-clause
-4,131,520,239,543,026,700
29.5
74
0.585375
false
dimagi/django-digest
django_digest/__init__.py
1
6603
from __future__ import absolute_import from __future__ import unicode_literals import logging import random import time from django.http import HttpResponse from django.contrib.auth.signals import user_login_failed import python_digest from django_digest.utils import get_backend, get_setting, DEFAULT_REALM import si...
bsd-3-clause
-4,542,620,577,446,454,300
40.26875
95
0.618204
false
brocade/pysdn
samples/sampleopenflow/demos/demo19.py
1
7388
#!/usr/bin/python # Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, INC # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright n...
bsd-3-clause
323,430,763,542,171,140
35.039024
78
0.577829
false
ljchang/neurolearn
docs/conf.py
1
11594
# -*- coding: utf-8 -*- # # nltools documentation build configuration file, created by # sphinx-quickstart on Thu Jun 4 07:22:28 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
mit
-1,366,653,105,938,993,400
31.751412
126
0.699413
false
ieguiguren/menu
conf/menuconf.py
1
2865
#!/usr/bin/env python # -*- encoding: utf-8 -*- import time, os, calendar , datetime, recordatorio #Generico hostname = os.uname()[1] if hostname == "server1": prepath = "/opt" elif hostname == "octopussy": prepath = "/home/xir/dev" path = prepath + "/menu/" tpath = path + "tmp/" datapath = path + "data/" db...
gpl-3.0
-5,426,664,132,534,398,000
35.717949
325
0.713687
false
YKonovalov/guesti
guesti/cloud/common.py
1
1089
# This file is part of GuestI. # # GuestI 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. # # SSP is distributed in the hope that it wi...
gpl-3.0
-3,832,762,964,333,289,000
26.923077
76
0.696051
false
JCash/voronoi
test/makereport.py
1
8207
#!/usr/bin/python import os import sys import time import subprocess import argparse from collections import OrderedDict def find_time_unit(t): if t < 0.000001: return 'ns' if t < 0.001: return '\xc2\xb5s' if t < 0.1: return 'ms' return 's' def convert_time(t, unit): if un...
mit
-4,938,259,878,375,191,000
33.338912
124
0.500548
false
hyphyphyph/lascaux
instlatte/subsystem.py
1
1214
# -*- coding: utf-8 -*- import weakref from instlatte.logger import logger logger = logger(__name__) class Subsystem(object): manager = None package_dir = None module_name = None name = None config = dict() plugins = list() def __init__(self, manager=None, package_dir=None, modul...
mit
-4,722,398,141,859,267,000
26.590909
89
0.589786
false
itsjustshana/project2
main.py
1
1149
"""`main` is the top level module for your Flask application.""" # Import the Flask Framework from flask import Flask from flask import render_template app = Flask(__name__) # Note: We don't need to call run() since our application is embedded within # the App Engine WSGI application server. @app.route('/') def game...
apache-2.0
6,431,372,148,908,431,000
25.113636
76
0.688425
false
Gamebasis/3DGamebasisServer
GameData/blender-2.71-windows64/2.71/scripts/modules/rna_info.py
1
22979
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
gpl-3.0
-4,796,570,875,278,886,000
30.959666
179
0.556378
false
markgw/pimlico
src/python/pimlico/old_datatypes/modules/features/term_feature_matrix_builder/execute.py
1
1433
# 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 import numpy from scipy.sparse.dok import dok_matrix from pimlico.core.modules.base import BaseModuleExecutor from pimlico.old_datatypes.arrays import ScipySpars...
gpl-3.0
8,663,936,854,158,894,000
45.225806
117
0.697139
false
pythonbyexample/PBE
dbe/businesstest/migrations/0008_auto__add_field_message_to_factory.py
1
7041
# encoding: 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 'Message.to_factory' db.add_column('businesstest_message', 'to_factory', self.gf('django.db...
bsd-3-clause
2,707,099,846,749,081,000
70.121212
182
0.550348
false
rartino/ENVISIoN
demo/molecular_dynamics.py
1
2653
## ENVISIoN ## ## Copyright (c) 2021 Gabriel Anderberg, Didrik Axén, Adam Engman, ## Kristoffer Gubberud Maras, Joakim Stenborg ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are met: ## ## 1....
bsd-2-clause
1,677,479,425,379,267,600
44.724138
98
0.729261
false
dangerdak/apuniverse
apuniverse/blog/migrations/0001_initial.py
1
2045
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Post' db.create_table('blog_post', ( ('id', s...
mit
-7,250,862,758,674,891,000
45.5
111
0.581418
false
ucbvislab/radiotool
radiotool/composer/timestretchsegment.py
1
1360
from segment import Segment from scipy.signal import resample class TimeStretchSegment(Segment): """Like a :py:class:`radiotool.composer.Segment`, but stretches time to fit a specified duration. """ def __init__(self, track, comp_location, start, orig_duration, new_duration): """Create a time-...
isc
6,768,006,454,232,796,000
42.903226
93
0.679412
false
chase-kernan/lsc-seis-gcm
gcm/io/triggers.py
1
3825
from gcm.data import triggers as tr from gcm import utils import numpy as np from os.path import join _ROOT_ATTR_MAP = dict(time='time', time_min='tstart', time_max='tend', freq='frequency', freq_min='fstart', freq_max='fend', amp...
gpl-2.0
5,010,494,714,490,605,000
32.849558
76
0.571242
false
markreidvfx/pyaaf
tests/test_diagnostic_output.py
1
2446
from __future__ import print_function import aaf import aaf.mob import aaf.define import aaf.iterator import aaf.dictionary import aaf.storage import aaf.component import aaf.util import traceback import unittest import os from aaf.util import AUID, MobID cur_dir = os.path.dirname(os.path.abspath(__file__)) sandbox...
mit
8,942,340,403,513,960,000
24.479167
111
0.615699
false
dbadb/2016-Stronghold
src/python/robot/commands/portcullisCmds.py
1
5529
from wpilib.command import CommandGroup from wpilib.command import Command # portcullis groups ------------------------------------------------- # A command group requires all of the subsystems that each member requires. k_timeOut = 2 class MoveUp(CommandGroup): def __init__(self, robot, name=None): supe...
mit
-6,429,023,693,558,455,000
29.546961
75
0.643335
false
davidlmorton/spikepy
spikepy/common/errors.py
1
2270
# Copyright (C) 2012 David Morton # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distribut...
gpl-3.0
8,032,593,184,611,113,000
20.415094
72
0.770044
false
theopak/glassface
server/glassface/urls.py
1
1575
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'glassface.views.splash', name='home'), url(r'^twitteradd/([a-zA-Z0-9]+)$', 'glassface.views.twitt...
mit
-482,477,365,975,125,000
46.727273
106
0.653333
false
DPaaS-Raksha/raksha
raksha/openstack/common/lockutils.py
1
10139
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # 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.apac...
apache-2.0
-4,326,607,360,334,361,000
35.471223
79
0.555775
false
RayRuizhiLiao/ITK_4D
Modules/ThirdParty/pygccxml/src/pygccxml/declarations/class_declaration.py
1
26207
# Copyright 2014-2016 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt """ defines classes, that describes C++ classes This modules contains definition for next C++ declarations: - c...
apache-2.0
-3,673,771,788,238,061,000
32.665344
79
0.577212
false
Saethlin/astrotools
viewfits.py
1
30427
#!/usr/bin/env python """ A lightweight python-based FITS viewer. The controls should be self-explatory. If they are not, press ctrl+h for a stop-gap and submit an issue. Controls ought to be obvious, help me make them. This is a program for looking at images, not for doing analysis. TODO: Doesn't quite display corr...
mit
-4,624,532,612,112,996,000
34.670574
132
0.562658
false
montoyjh/pymatgen
pymatgen/io/feff/inputs.py
1
32751
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import re import warnings from operator import itemgetter from tabulate import tabulate import numpy as np from monty.io import zopen from monty.json import MSONable from pymatgen import Structure, Lattice...
mit
-3,235,196,625,060,623,000
33.804463
101
0.511618
false
JPaulMora/Pyrit
cpyrit/config.py
1
2322
# -*- coding: UTF-8 -*- # # Copyright 2015, John Mora, johmora12@engineer.com # Original Work by Lukas Lueg (c) 2008-2011. # # This file is part of Pyrit. # # Pyrit 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...
gpl-3.0
-1,824,363,513,786,633,700
32.171429
77
0.60422
false
zzzaaa12/PTT_Notify
ptt_notify.py
1
6855
#!/usr/bin/python # -*- coding: utf-8 -*- import os import sys import time import feedparser import requests import json from datetime import datetime from datetime import timedelta from send_notify import send_notify_mail # files in this project from setting import AUTO_UPDATE_SECS from setting import SEND_EMAIL from...
mit
-7,109,097,292,116,499,000
37.683616
131
0.481087
false
onshape-public/onshape-clients
python/onshape_client/oas/models/bt_image_filter853_all_of.py
1
4736
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
mit
-4,782,055,604,774,076,000
31.438356
87
0.572635
false
gvallarelli/inasafe
safe_qgis/impact_calculator_thread.py
1
6203
""" InaSAFE Disaster risk assessment tool developed by AusAid - **ISImpactCalculatorThread.** The module provides a high level interface for running SAFE scenarios. Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU...
gpl-3.0
1,544,441,452,268,091,600
34.445714
79
0.632113
false
unaguil/hyperion-ns2
experiments/measures/generic/BroadcastTime.py
1
1941
from GenericMeasure import GenericMeasure from GenericAvgMeasure import GenericAvgMeasure import Units class ReceivedMessages(GenericMeasure): def __init__(self, period, simulationTime, broadcastTable): GenericMeasure.__init__(self, r"DEBUG .*? - Peer .*? received packet .*?(\(.*?\)) .*?([0-9]+\,[0-9]+).*?", peri...
apache-2.0
2,790,905,567,240,034,000
35.622642
149
0.702215
false
dmnfarrell/peat
Ghost/calc_dCS.py
1
4214
#!/usr/bin/env python # # This file is part of the pKaTool package # Copyright (C) Jens Erik Nielsen 2008 # All rights reserved # #comment def Nonefix(value): if value: return '%6.3f' %(value) else: return 'NA' def main(options,args): """Calculate the change in chemical shift due to a full ...
mit
-7,281,369,032,164,804,000
42
168
0.56336
false
kezabelle/django-testguess
autoguessed/tests/test_urls/returns_templateresponse/test_101110011100.py
1
2776
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.test import TestCase class GuessedTestCase(TestCase): """ Generated: 2015-10-18T13:44:15.980585 is_html5: True is_ajax: False is_authenticated: True has_context_data: True has_template_name: True has_get_params:...
bsd-2-clause
-7,960,611,862,642,440,000
32.445783
78
0.618876
false
maljac/odoo-addons
account_invoice_tax_wizard/__openerp__.py
1
1453
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # 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
396,771,307,902,526,460
36.25641
78
0.573297
false
matthew-brett/bibstuff
bibstuff/bibname.py
1
10649
#! /usr/bin/env python #File: bibname.py """ :mod:`bibstuff.bibname` --- Name Parser and Formatter ===================================================== Parses bibtex-formatted author/editor raw names and provides formatting functions (e.g., via bibstyles/shared.NamesFormatter). :author: Dylan W. Schwilk :contact: ht...
mit
-7,127,011,993,193,930,000
36.762411
111
0.610855
false
MSU-CS-Software-Engineering/habitgame
landing_page.py
1
16402
import os.path from datetime import date, timedelta #For Timestamps from tkinter import * from tkinter.ttk import * from tkinter import messagebox #Must be explicitly imported. Used for placeholders. class Hack_Frame(Frame): def __init__(self, parent, ID, hack_type, empty=0): Frame.__init__(self, paren...
mit
-8,813,670,094,191,907,000
38.81068
110
0.460066
false
iminrhythm/iirmerl
p2btstmp.py
1
2871
# From http://gbeced.github.io/pyalgotrade/docs/v0.17/html/bitstamp_example.html # Accessed 06/25/16 @ 1046Z from pyalgotrade.bitstamp import barfeed from pyalgotrade.bitstamp import broker from pyalgotrade import strategy from pyalgotrade.technical import ma from pyalgotrade.technical import cross class Strategy(st...
mit
-4,787,254,423,444,769,000
36.285714
106
0.623476
false
PlutoniumHeart/ITK
Modules/ThirdParty/pygccxml/src/pygccxml/declarations/cpptypes.py
1
25524
# Copyright 2014-2016 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt """ defines classes, that describe C++ types """ from . import algorithms_cache class type_t(object): """base class f...
apache-2.0
1,586,996,218,688,973,800
25.395036
79
0.594852
false
brainstorm-ai/DIGITS
digits/model/images/classification/test_views.py
1
39432
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import import itertools import json import os import re import shutil import tempfile import time import unittest import urllib # Find the best implementation available try: from cStringIO import StringIO except I...
bsd-3-clause
988,165,630,064,702,100
33.559159
121
0.58242
false
bright-tools/varints
varints/setup.py
1
2012
#!/usr/bin/python # Copyright 2017 John Bailey # # 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 applicabl...
apache-2.0
-2,491,433,770,968,626,000
39.24
100
0.656561
false
Scille/parsec-cloud
parsec/api/data/invite.py
1
6077
# Parsec Cloud (https://parsec.cloud) Copyright (c) AGPLv3 2016-2021 Scille SAS import re from typing import Optional, Tuple, List, Dict, Any from random import randint, shuffle from parsec.crypto import VerifyKey, PublicKey, PrivateKey, SecretKey from parsec.serde import fields, post_load from parsec.api.protocol im...
agpl-3.0
1,034,070,549,819,778,800
37.707006
99
0.677308
false
ahye/FYS2140-Resources
examples/animation/func_animate_sin.py
1
1284
#!/usr/bin/env python """ Created on Mon 2 Dec 2013 Eksempelscript som viser hvordan en sinusboelge kan animeres med funksjonsanimasjon. @author Benedicte Emilie Braekken """ from numpy import * from matplotlib.pyplot import * from matplotlib import animation def wave( x, t ): ''' Funksjonen beskriver en sin...
mit
-2,908,362,900,077,196,000
19.709677
70
0.625389
false
guyskk/validater
tests/validators/test_union.py
2
4635
import pytest from validr import T, SchemaError, Invalid from . import case, compiler @case({ T.union([T.int, T.list(T.int)]): [ (111, 111), ([111, 222], [111, 222]), ([], []), [None, '', 'xxx'], ], T.union([T.str, T.list(T.str)]).optional: [ ([], []), (None...
mit
-4,217,504,772,218,959,400
27.262195
83
0.559655
false
bioinformatist/Gao-s-SB
src/gaosb/core/app.py
1
17034
import os import re import subprocess import sys from collections import defaultdict from Bio import Entrez from Bio import SeqIO from PyQt5 import QtWidgets, QtCore from PyQt5.QtCore import Qt from PyQt5.QtGui import QDesktopServices from PyQt5.QtWidgets import QMessageBox from gaosb.gui.mainwindow import Ui_MainWin...
mit
3,340,780,258,272,860,700
43.826316
119
0.584361
false
maziara/deluge-feed-inoreader
delugeapi.py
1
3737
import config from deluge_client import DelugeRPCClient import werkzeug as wz import base64 ######################################################## ########### Deluge Methods ################ ######################################################## def connect_to_deluge(): client = DelugeRPCClient(c...
mit
-3,209,542,021,153,756,000
38.336842
100
0.595397
false
mcgill-robotics/Firmware
src/lib/parameters/px4params/markdownout.py
1
5359
from xml.sax.saxutils import escape import codecs class MarkdownTablesOutput(): def __init__(self, groups): result = ("# Parameter Reference\n" "> **Note** **This list is auto-generated from the source code** and contains the most recent parameter documentation.\n" "\n")...
bsd-3-clause
-3,405,098,370,564,607,000
50.038095
397
0.500653
false
rcbops/keystone-buildpackage
keystone/middleware/auth_token.py
1
16245
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2010-2011 OpenStack, 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/lice...
apache-2.0
-5,634,659,186,557,328,000
39.919395
79
0.565528
false
Zosoled/Cumulus
robot/Cumulus/resources/locators_45.py
1
15089
"""Locators for Spring '19""" npsp_lex_locators={ 'breadcrumb': "//li[contains(@class, 'slds-breadcrumb__item')]/span[text()='{}']", 'breadcrumb-link':"//a[@title='{}' and contains(@class,'BreadCrumbItem')]", 'placeholder': "//*[contains(@placeholder,'{}')]", 'app_launcher':{ 'select-option':'/...
bsd-3-clause
5,331,987,870,339,931,000
79.265957
295
0.577441
false