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
Tomographer/tomographer
test/py_gen_pickle_data.py
1
4414
# # Generate pickled data for current tomographer version and store to data files (which are # to be included in the git repo). # # These pickle files are loaded by pytest_pickle.py to make sure that data pickled by # earlier versions of Tomographer can be successfully loaded, with full backwards # compatibility. # fr...
mit
-625,831,304,714,543,000
28.039474
117
0.606026
false
claudep/pootle
tests/views/timeline.py
1
9375
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from hashlib import md5 from itertools impor...
gpl-3.0
1,652,952,501,231,101,700
31.77972
83
0.60832
false
Lemma1/MAC-POSTS
doc_builder/sphinx-contrib/matlabdomain/tests/test_mat_types.py
1
4777
#! /usr/bin/env python from sphinxcontrib import mat_documenters as doc from nose.tools import eq_, ok_ import os from pprint import pprint DIRNAME = doc.MatObject.basedir = os.path.abspath(os.path.dirname(__file__)) def test_ellipsis_after_equals(): """ test function with ellipsis after equals ...
mit
-6,209,920,148,156,492,000
30.496599
76
0.613565
false
airbnb/caravel
superset/sql_parse.py
1
7283
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
7,086,601,599,898,364,000
36.735751
77
0.595084
false
KelvinLu/ping-at-me
ping_at_me/pingapp/users.py
1
1481
from django.contrib.auth import authenticate, login, logout from pingapp import models, ping def user_login(request, username, password): user = authenticate(username = username, password = password) if user is not None: login(request, user) return True return False def user_logout(request): logout(request...
agpl-3.0
-167,475,481,804,550,530
19.30137
62
0.740716
false
ChristfriedBalizou/jeamsql
adapters/tabulate/benchmark.py
1
3028
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function from timeit import timeit import tabulate import asciitable import prettytable import texttable import sys import codecs setup_code = r""" from csv import writer try: # Python 2 from StringIO import StringIO excep...
mit
1,157,933,213,217,773,800
24.652542
109
0.618764
false
jbloom/mutpath
src/plot.py
1
10257
"""Module for performing plotting for ``mutpath`` package. This module uses ``pylab`` and ``matplotlib`` to make plots. These plots will fail if ``pylab`` and ``matplotlib`` are not available for importation. Before running any function in this module, you can run the *PylabAvailable* function to determine if ``pylab`...
gpl-3.0
-7,922,455,184,414,203,000
32.087097
125
0.639271
false
usc-isi-i2/lsh-linking
swoosh/evaluate.py
1
1496
from evaluator import evaluator class evaluate: def __init__(self, num, lencora, resultfile, answerfile): self.num = num self.lencora = lencora fp = open('logs/merge_log.txt') self.pairs = [line.strip().split('-') for line in fp] self.marks = [0 for _ in xrange(lencora)] self.clusters = [set() for _ in ...
apache-2.0
383,065,283,958,931,140
23.129032
58
0.601604
false
hellhovnd/django
tests/model_forms/tests.py
2
67705
from __future__ import absolute_import, unicode_literals import datetime import os from decimal import Decimal from django import forms from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import ValidationError from django.db import connection from django.db.models.query import E...
bsd-3-clause
-7,095,391,817,204,352,000
42.456354
220
0.604756
false
Garvys/PingPongSkill
pingpongskill/text2num.py
1
2798
# This library is a simple implementation of a function to convert textual # numbers written in English into their integer representations. # # This code is open source according to the MIT License as follows. # # Copyright (c) 2008 Greg Hewgill # # Permission is hereby granted, free of charge, to any person obtaining ...
mit
7,822,326,639,760,076,000
28.145833
79
0.636883
false
Kevin-Roberts/coinbase_trader
trader.py
1
16564
""" Coinbase Python Client Library AUTHOR Kevin Roberts Github: Kevin-Roberts Started on: 12-11-2013 LICENSE (The MIT License) Copyright (c) 2013 Kevin Roberts "kr0b1486@hotmail.com" Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (t...
mit
5,357,124,662,904,182,000
40.4125
180
0.616216
false
fxb22/BioGUI
Utils/GetMotifs.py
1
5020
import CirclePlotClass as cpc class GetMotifs(): def DefineColLists(self): self.colList = [] r = 0 while r < self.total_length: self.colList.append(-1) r += 1 self.sse = self.cpss.GetSSE() self.secLinks = self.cpss.GetSecLinks() for s in self....
gpl-2.0
7,772,521,076,914,863,000
32.026316
78
0.375498
false
mgoral/subconvert
src/subconvert/cli/syncparse.py
1
5412
#-*- coding: utf-8 -*- """ Copyright (C) 2016 Michal Goral. This file is part of Subconvert Subconvert 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 la...
gpl-3.0
2,888,652,616,658,218,000
28.736264
77
0.601811
false
ederfmartins/spojrec
crawler/util.py
1
1390
# -*- coding: utf-8 -*- import sys from lxml.html import parse from lxml.html import tostring from urllib2 import urlopen from constants import SPOJ_URLS from crawler.dataExtractor.extractor import extract_problem_data, extract_user_data, extract_submissions_data from crawler.dataExtractor.signedlistParser import pars...
apache-2.0
4,539,961,427,479,909,000
28.574468
109
0.735252
false
kriberg/stationspinner
stationspinner/corporation/views.py
1
1853
from django.core.cache import cache from rest_framework import viewsets, views from rest_framework.response import Response from stationspinner.corporation.serializers import CorporationSheetSerializer, \ CorporationSheetListSerializer from stationspinner.corporation.models import CorporationSheet, Asset from stati...
agpl-3.0
6,093,940,278,719,828,000
36.08
93
0.678359
false
shortbloke/home_assistant_config
custom_components/badnest/sensor.py
1
3535
import logging from homeassistant.helpers.entity import Entity from .const import DOMAIN from homeassistant.const import ( ATTR_BATTERY_LEVEL, DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS ) _LOGGER = logging.getLogger(__name__) PROTECT_SENSOR_TYPES = [ "co_status", "smoke_status", "battery_health...
mit
-9,035,979,061,422,722,000
27.28
79
0.612164
false
crateio/crate.web
crate/web/packages/admin.py
1
3016
from django.contrib import admin from crate.web.packages.models import Package, Release, ReleaseFile, TroveClassifier, PackageURI from crate.web.packages.models import ReleaseRequire, ReleaseProvide, ReleaseObsolete, ReleaseURI, ChangeLog from crate.web.packages.models import DownloadDelta, ReadTheDocsPackageSlug cl...
bsd-2-clause
-2,653,288,676,220,985,000
32.142857
150
0.718833
false
Nic30/hwtHls
hwtHls/hls.py
1
9330
from hwt.code import If from hwt.hdl.assignment import Assignment from hwt.hdl.operator import Operator from hwt.hdl.types.defs import BIT from hwt.hdl.types.struct import HStruct from hwt.hdl.value import HValue from hwt.synthesizer.interfaceLevel.unitImplHelpers import getSignalName from hwt.synthesizer.rtlLevel.netl...
mit
-8,524,985,038,770,063,000
29.390879
88
0.601393
false
Pikecillo/genna
external/4Suite-XML-1.0.2/test/Xml/Xslt/Borrowed/dc_20001112.py
1
1722
#David Carlisle <davidc@nag.co.uk> plays nifty tricks with xsl:key from Xml.Xslt import test_harness sheet_1 = """<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" > <xsl:output method="xml" indent="yes"/> <xsl:key name="items-by-itemid" match="i...
gpl-2.0
5,069,500,956,196,828,000
21.96
78
0.546458
false
jrief/django-websocket-redis
ws4redis/wsgi_server.py
2
8452
# -*- coding: utf-8 -*- import sys import logging import six from six.moves import http_client from redis import StrictRedis import django if django.VERSION[:2] >= (1, 7): django.setup() from django.conf import settings from django.contrib.auth import get_user from django.core.handlers.wsgi import WSGIRequest from...
mit
-7,399,043,440,575,994,000
46.217877
125
0.624823
false
Ivoz/pipa
pipa/util.py
1
4565
import os import random import string from configparser import ConfigParser from hashlib import sha256 import cherrypy from cherrypy import Tool from cherrypy._cpcompat import ntob from cherrypy._cpreqbody import Part from cherrypy.lib import httputil defaults = """ [pipa] host = localhost port = 5351 key = server.k...
mit
-336,312,503,505,933,630
27.354037
79
0.560789
false
ScholarTools/crossref_api_python
crossref/utils.py
1
3636
# -*- coding: utf-8 -*- """ #TODO: break out display utils to another module """ def display_class(class_instance,pv,method_pv=None): #TODO: Handle methods return ('%s:\n' % type(class_instance) + property_values_to_string(pv,extra_indentation=4)) def float_or_none_to_string(x): if ...
mit
4,563,937,675,081,014,000
27.865079
91
0.578383
false
tensorflow/probability
tensorflow_probability/python/optimizer/convergence_criteria/convergence_criterion.py
1
6013
# Copyright 2019 The TensorFlow Probability 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 o...
apache-2.0
3,939,581,093,718,065,700
43.540741
80
0.695659
false
night-crawler/rfnumplan
admin.py
1
1304
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Operator, Region, NumberingPlan, NumberingPlanRange class OperatorAdmin(admin.ModelAdmin): list_display = ('id', 'name') search_fields = ('name',) admin.site.register(Operator, OperatorAdmin) class RegionAdmin(admin.ModelAdmin): ...
mit
8,253,701,673,165,946,000
24.568627
110
0.636503
false
mferenca/HMS-ecommerce
ecommerce/extensions/api/v2/tests/views/test_courses.py
1
8632
from __future__ import unicode_literals import json import jwt import mock from django.conf import settings from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from oscar.core.loading import get_model, get_class from ecommerce.core.constants import ISO_8601_FORMAT from ecommer...
agpl-3.0
-5,532,793,631,853,792,000
41.945274
119
0.65373
false
ellipsis14/dolfin-adjoint
timestepping/python/timestepping/fenics_overrides.py
1
8590
#!/usr/bin/env python2 # Copyright (C) 2011-2012 by Imperial College London # Copyright (C) 2013 University of Oxford # Copyright (C) 2014 University of Edinburgh # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the...
lgpl-3.0
-8,315,689,074,679,420,000
29.569395
117
0.687311
false
Huyuwei/tvm
topi/python/topi/testing/__init__.py
1
1285
"""TOPI Testing Util functions. Used to verify the correctness of operators in TOPI . """ from __future__ import absolute_import as _abs from .conv2d_hwcn_python import conv2d_hwcn_python from .conv2d_nchw_python import conv2d_nchw_python from .conv2d_nhwc_python import conv2d_nhwc_python from .conv2d_transpose_nchw_...
apache-2.0
-3,341,326,502,700,198,000
44.892857
95
0.816342
false
Codophile1/exide
exide/beamer_parser.py
1
10947
#!/usr/bin/python #-*- coding: utf-8 -*- import re, os from datatypes.Section import Section from datatypes.Slide import Slide from datatypes.Presentation import Presentation from parser_utils import get_named_entities, get_urls, get_slide_type def parse_beamer(path): """ Transform a beamer tex file into a |...
lgpl-3.0
-4,131,205,162,821,350,400
37.396491
120
0.538061
false
mwilliamson/mayo
mayo/git.py
1
1623
from .util import run class Git(object): name = "git" directory_name = ".git" default_branch = "origin/master" def clone(self, repository_uri, local_path): _git(["clone", repository_uri, local_path]) return GitRepository(local_path) def local_repo(self, working_direct...
bsd-2-clause
113,674,665,099,766,480
29.055556
110
0.579791
false
wek32/strava-club-ytd
extract_group_members.py
1
1936
''' Strava club information is not publicly available. To get the club information the club owner needs to be logged in. This script takes the HTML file of the strava club page and extracts all the users/athletes. ''' from bs4 import BeautifulSoup import argparse def get_group_members_from_html(html_in): ...
mit
-9,072,809,590,587,582,000
36.84
110
0.558368
false
ej2/pixelpuncher
pixelpuncher/game/utils/skills.py
1
1870
from pixelpuncher.game.utils.message import add_game_message from pixelpuncher.game.utils.messages import learned_skill_message from pixelpuncher.player.models import PlayerSkill, Skill def add_starting_skills(player): skills = Skill.objects.filter(level=1) for skill in skills: create_player_skill(pl...
bsd-3-clause
-6,737,431,803,133,636,000
33.62963
87
0.720856
false
RichDijk/eXe
exe/webui/editorpane.py
1
19032
# =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # # 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...
gpl-2.0
3,098,465,449,447,214,600
42.852535
101
0.513661
false
akretion/odoo
addons/mrp/tests/test_stock.py
10
9525
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import common from odoo.exceptions import except_orm class TestWarehouse(common.TestMrpCommon): def setUp(self): super(TestWarehouse, self).setUp() self.stock_location = self.env.ref('stock....
agpl-3.0
-1,969,244,837,367,769,900
43.302326
296
0.603255
false
gstarnberger/paasta
paasta_tools/am_i_mesos_leader.py
1
1039
#!/usr/bin/env python # Copyright 2015-2016 Yelp 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 ...
apache-2.0
-6,211,074,495,328,810,000
27.081081
74
0.704524
false
xcellerator/wifi_harvester
upload.py
1
1335
#!/usr/bin/python2.7 # Part of the WiFi Harvester project. # AUTHOR: Harvey Phillips # Project Home: https://github.com/xcellerator/wifi_harvester # Released under GPL v2 import csv import sys import requests if ( len(sys.argv) != 2 ): print ("Usage: " + str(sys.argv[0]) + " <kismet csv>") exit else: file = str(s...
gpl-2.0
-3,401,414,217,709,408,000
24.673077
127
0.612734
false
couchbaselabs/couchbase-cli
collector.py
1
10474
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import traceback import copy import listservers import buckets import info import util_cli as util import cb_bin_client import stats_buffer class StatsCollector: def __init__(self, log): self.log = log def seg(self, k, v): # Parse ('some_...
apache-2.0
800,728,694,057,473,400
44.341991
115
0.531316
false
jgliss/pyplis
pyplis/test/test_highlevel_examples.py
1
12011
# -*- coding: utf-8 -*- """Pyplis high level test module. This module contains some highlevel tests with the purpose to ensure basic functionality of the most important features for emission-rate analyses. Note ---- The module is based on the dataset "testdata_minimal" which can be found in the GitHub repo in the fol...
gpl-3.0
709,761,650,218,315,400
32.550279
79
0.598868
false
ariloulaleelay/wrflow
wrflow/model/dag.py
1
4111
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, String, DateTime, Integer, Boolean from sqlalchemy import orm from json import loads as json_loads from json import dumps as json_dumps from wrflow.common import hash_dict, hash_list Base = declarative_base() __all__ = [ 'Node...
gpl-2.0
4,163,380,599,301,173,000
29.227941
92
0.584529
false
FernanOrtega/DAT210x
Module3/notes/2Dscatter_example.py
1
1245
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Jul 11 21:14:57 2017 @author: fernando """ import pandas as pd import matplotlib import matplotlib.pyplot as plt plt.style.use('ggplot') df = pd.read_csv('concrete.csv') print df.describe() # Plot 1 df.plot.scatter(x='cement', y='strength') plt.s...
mit
-376,657,142,608,873,150
17.057971
47
0.685944
false
kubeflow/pipelines
components/gcp/container/component_sdk/python/kfp_component/google/dataflow/_launch_template.py
1
3920
# Copyright 2018 The Kubeflow 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 agreed to in...
apache-2.0
-3,260,293,467,452,129,300
41.150538
96
0.650255
false
wimmuskee/mangrove
test/test_interface.py
1
1296
from unittest import TestCase from mangrove_libs import common from mangrove_libs.interface import Interface from storage.mysql import Database import re class InterfaceTestCase(TestCase): @classmethod def setUpClass(self): config = common.getConfig("mangrove-crawler-config.json.test", "default_collection") self...
gpl-3.0
-970,804,777,007,461,800
31.4
121
0.750772
false
saiamrit/dora-s-nos
vpythonex.py
1
4401
""" This is an example for vpython you need to install vpython to run this code. """ from vpython import * # Bruce Sherwood N = 3 # N by N by N array of atoms # Surrounding the N**3 atoms is another layer of invisible fixed-position atoms # that provide stability to the lattice. k = 1 m = 1 spacing = 1 atom_radius = ...
mpl-2.0
2,712,751,095,923,883,000
40.518868
89
0.548512
false
GNOME/orca
test/keystrokes/firefox/math_line_nav_torture_test.py
1
17854
#!/usr/bin/python from macaroon.playback import * import utils sequence = MacroSequence() #sequence.append(WaitForDocLoad()) sequence.append(PauseAction(5000)) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("<Control>Home")) sequence.append(utils.AssertPresentationAction( "1. Top o...
lgpl-2.1
-5,507,226,505,839,438,000
35.869835
181
0.627683
false
mogproject/artifact-cli
src/artifactcli/artifact/fileinfo.py
1
2185
import os import time import socket import getpass from datetime import datetime import dateutil.parser from .baseinfo import BaseInfo from artifactcli.util import * class FileInfo(BaseInfo): keys = ['host', 'user', 'size', 'mtime', 'md5'] def __init__(self, host, user, size, mtime, md5): super(FileI...
apache-2.0
-2,693,232,162,032,509,000
27.75
105
0.516247
false
adviti/melange
app/soc/views/helper/decorators.py
1
1144
#!/usr/bin/env python2.5 # # Copyright 2008 the Melange 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 applic...
apache-2.0
1,283,252,683,080,439,600
28.333333
79
0.736888
false
Azure/azure-sdk-for-python
sdk/tables/azure-data-tables/tests/_shared/asynctestcase.py
1
4937
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ---------------------------------------------------------------------...
mit
1,321,880,752,651,610,600
35.301471
93
0.609682
false
stemchan/smartclip
main/auth.py
1
2328
import os from cStringIO import StringIO from django.conf import settings from django.template.loader import get_template from django.template import Context from wkhtmltopdf.utils import wkhtmltopdf from django.contrib.auth import login from django.contrib.auth.models import User import smartfile from smartclip impor...
gpl-3.0
3,221,612,337,584,908,300
35.952381
77
0.631443
false
Azure/azure-sdk-for-python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/_models_py3.py
1
92077
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
8,378,640,038,500,191,000
39.173211
140
0.638759
false
ksmit799/Toontown-Source
toontown/hood/BRHoodDataAI.py
1
1237
from direct.directnotify import DirectNotifyGlobal import HoodDataAI from toontown.toonbase import ToontownGlobals from toontown.safezone import DistributedTrolleyAI from toontown.safezone import BRTreasurePlannerAI from toontown.classicchars import DistributedPlutoAI from toontown.toon import DistributedNPCFishermanAI...
mit
-8,526,898,338,177,770,000
40.233333
83
0.746968
false
matplo/rootutils
python/2.7/tdraw_cfg.py
1
22331
#!/usr/bin/env python from time import sleep import sys sys.argv.append( '-b' ) import tutils import ROOT as r import IPython import argparse import os import fnmatch from configobj import ConfigObj import eval_string from tqdm import tqdm from tabulate import tabulate from string import atoi from string import at...
mit
644,879,473,376,006,100
29.801379
301
0.621647
false
aerialhedgehog/VyPy
trunk/VyPy/tools/redirect.py
1
8439
## \file redirect.py # \brief python package for file redirection # \author Trent Lukaczyk, Aerospace Design Laboratory (Stanford University) # \version 0.0.0 # # ---------------------------------------------------------------------- # Imports # --------------------------------------------------------------------...
bsd-3-clause
-268,065,046,670,388,400
31.091255
103
0.492238
false
anushbmx/kitsune
kitsune/notifications/models.py
1
2432
from datetime import datetime from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields import GenericForeignKey from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from ac...
bsd-3-clause
-4,455,756,537,852,506,000
33.253521
89
0.738487
false
libyal/winevt-kb
tests/resources.py
1
3379
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the Windows Event Log resources.""" import unittest from winevtrc import resources from tests import test_lib class EventLogProviderTest(test_lib.BaseTestCase): """Tests for the Windows Event Log provider.""" def testSetCategoryMessageFilenames(self):...
apache-2.0
1,280,296,364,475,151,600
31.180952
72
0.71678
false
alfa-jor/addon
plugin.video.alfa/channels/novelashdgratis.py
1
5527
# -*- coding: utf-8 -*- # -*- Channel Novelas HD Gratis -*- # -*- Created for Alfa-addon -*- # -*- By the Alfa Develop Group -*- import re from channelselector import get_thumb from core import httptools from core import scrapertools from core import servertools from core.item import Item from platformcode ...
gpl-3.0
-6,154,079,566,393,447,000
31.70122
112
0.579519
false
bgporter/nanobot
demo/tockbot.py
1
3611
#! /usr/bin/env/python # Copyright (c) 2016 Brett g Porter # # 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 without limitation the rights # to use, copy, mod...
mit
-1,350,801,921,695,101,700
35.11
88
0.649128
false
eamanu/ArgentosCompiler
Analyzer/Analyzer.py
1
13039
# -*- coding: utf-8 -*- """@package Reader Módulo que analiza el código fuente @author Arias Emmanuel @date 24/10/2016 """ from Reader import Reader from enum import Enum import string import numpy as np class campoCaracter: def __init__(self): self.mVariable = np.array([['A', 'B', 'C', 'D', 'E', '...
gpl-3.0
-7,401,008,057,571,823,000
34.579235
139
0.326549
false
cbertinato/pandas
pandas/tests/indexes/test_setops.py
1
2362
''' The tests in this package are to ensure the proper resultant dtypes of set operations. ''' import itertools as it import numpy as np import pytest from pandas.core.dtypes.common import is_dtype_equal import pandas as pd from pandas import Int64Index, RangeIndex from pandas.tests.indexes.conftest import indices_l...
bsd-3-clause
3,659,414,365,248,589,000
30.078947
77
0.688823
false
batra-mlp-lab/DIGITS
digits/model/forms.py
1
11983
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import os import flask from flask.ext.wtf import Form import wtforms from wtforms import validators from digits.config import config_value from digits.device_query import get_device, get_nvml_info from digits import utils from digits.utils import s...
bsd-3-clause
239,109,078,764,989,540
35.757669
140
0.549278
false
ulule/django-linguist
linguist/tests/test_signals.py
1
3254
# -*- coding: utf-8 -*- from __future__ import unicode_literals from exam import around, fixture from django.db.models.signals import pre_save, post_save from ..models import Translation from .base import BaseTestCase from .models import BarModel class PostDeleteSignalTest(BaseTestCase): """ Tests Linguis...
mit
-5,989,883,625,744,319,000
27.54386
101
0.63276
false
schleichdi2/OPENNFR-6.1-CORE
opennfr-openembedded-core/meta/lib/oeqa/core/runner.py
1
2466
# Copyright (C) 2016 Intel Corporation # Released under the MIT license (see COPYING.MIT) import os import time import unittest import logging xmlEnabled = False try: import xmlrunner from xmlrunner.result import _XMLTestResult as _TestResult from xmlrunner.runner import XMLTestRunner as _TestRunner x...
gpl-2.0
4,792,591,864,828,798,000
31.447368
82
0.613139
false
Lunatixz/script.skin.helper.service
resources/lib/musicbrainzngs/caa.py
1
6079
# This file is part of the musicbrainzngs library # Copyright (C) Alastair Porter, Wieland Hoffmann, and others # This file is distributed under a BSD-2-Clause type license. # See the COPYING file for more information. __all__ = [ 'set_caa_hostname', 'get_image_list', 'get_release_group_image_list', 'get_relea...
gpl-2.0
8,144,486,582,947,581,000
33.539773
89
0.661622
false
rdkls/django-audit-mongodb
tests/fixtures/sampledjango/manage.py
1
1321
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010, 2degrees Limited <egoddard@tech.2degreesnetwork.com>. # All Rights Reserved. # # This file is part of djangoaudit <https://launchpad.net/django-audit/>, # which is subject...
bsd-3-clause
-7,070,194,239,611,434,000
49.807692
299
0.651779
false
pvagner/orca
src/orca/scripts/apps/soffice/spellcheck.py
1
3428
# Orca # # Copyright 2015 Igalia, S.L. # # Author: Joanmarie Diggs <jdiggs@igalia.com> # # This library 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 (at your o...
lgpl-2.1
-8,300,544,664,294,238,000
32.940594
89
0.637398
false
3dfxsoftware/cbss-addons
openerp_print/pyPdf/utils.py
1
3722
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2006, Mathieu Fenniak # 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 abov...
gpl-2.0
8,148,486,485,658,930,000
30.365217
77
0.626276
false
scality/manila
manila/tests/network/test_standalone_network_plugin.py
1
18570
# Copyright 2015 Mirantis, 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...
apache-2.0
7,419,899,299,266,303,000
41.494279
79
0.58503
false
foarsitter/decide-exchange-model
decide/model/observers/sqliteobserver.py
1
8383
import datetime from collections import defaultdict from typing import List from decide import results from decide.data import database as db from decide.data.database import connection from decide.model import calculations from decide.model.base import AbstractExchange, Actor, Issue, AbstractExchangeActor from decide...
gpl-3.0
-3,790,700,379,106,159,000
35.606987
130
0.58058
false
ulkaio/ulka
docs/conf.py
1
8316
#!/usr/bin/env python # -*- coding: utf-8 -*- # # ulka documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # 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 # autoge...
mit
410,711,544,015,398,400
29.24
76
0.70202
false
othercriteria/StochasticBlockmodel
test_block.py
1
7829
#!/usr/bin/env python # Test of "new style" network inference, finally with blockmodel # Daniel Klein, 7/8/2012 import numpy as np from Network import Network from Models import StationaryLogistic, NonstationaryLogistic, Blockmodel from Models import alpha_zero, alpha_norm, alpha_unif, alpha_gamma from Experiment im...
mit
2,328,064,613,578,867,000
35.929245
80
0.59088
false
frogbywyplay/genbox_xov
xov/config.py
1
2984
# # Copyright (C) 2006-2014 Wyplay, All Rights Reserved. # This file is part of xov. # # xov 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 ve...
gpl-2.0
8,862,067,401,844,869,000
27.692308
103
0.644102
false
aidiary/keras_examples
imagenet/image_crawler.py
1
2572
import os import time import json import random import imghdr import requests IMAGE_URL_API = 'http://www.image-net.org/api/text/imagenet.synset.geturls?wnid=' OUTPUT_DIR = "images" MAX_NUM_IMAGES_PER_CATEGORY = 100 def download_image(url, filename): try: r = requests.get(url) except Exception: ...
mit
-2,849,737,089,410,245,600
25.449438
93
0.557349
false
basvandenberg/spiceweb
spiceweb/project.py
1
14038
import os import re import zipfile import traceback #import urllib2 import simplejson import cherrypy from cherrypy.lib.static import serve_file import spiceweb from biopy import file_io class Project: SESSION_PROJECT_KEY = 'project_id' EXAMPLE_DIR = 'example_projects' EXAMPLES = [ ('aniger-se...
gpl-3.0
-1,177,908,057,000,454,400
33.576355
267
0.538253
false
sam-m888/gprime
gprime/plug/menu/_enumeratedlist.py
1
5086
# # gPrime - A web-based genealogy program # # Copyright (C) 2007-2008 Brian G. Matherly # Copyright (C) 2008 Gary Burton # # 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 ...
gpl-2.0
-3,775,185,562,927,064,600
34.319444
81
0.561345
false
luotao1/Paddle
python/paddle/fluid/tests/unittests/dygraph_to_static/test_basic_api_transformation.py
1
14296
# Copyright (c) 2020 PaddlePaddle Authors. 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 app...
apache-2.0
4,440,653,004,732,745,700
30.628319
87
0.647524
false
pepitogithub/PythonScripts
varios/finalrl.py
1
2373
#------------------------------------------------- #------------------- Imports ------------------- #------------------------------------------------- import os #------------------------------------------------- # --------- Sacar el enter de un STR ----------- #------------------------------------------------- # c...
gpl-2.0
1,203,628,396,830,619,100
22.969697
57
0.402444
false
jeremykid/FunAlgorithm
python_practice/sort/sort.py
1
2772
def bubble_sort(input_list): input_list_length = len(input_list) for passed in range(input_list_length-1): for index in range(input_list_length-1): if (input_list[index] > input_list[index+1]): input_list[index], input_list[index+1] = input_list[index+1], input_list[index] # print input_lis...
mit
4,553,752,698,822,275,600
30.146067
88
0.62518
false
khalim19/gimp-plugin-export-layers
git_hooks/commit_msg.py
1
4246
#! /usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of Export Layers. # # Copyright (C) 2013-2019 khalim19 <khalim19@gmail.com> # # Export Layers 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...
gpl-3.0
8,250,588,724,925,034,000
28.282759
82
0.686528
false
pychess/pychess
lib/pychess/ic/__init__.py
1
25090
from gi.repository import Gtk from pychess import Variants from pychess.Utils.const import NORMALCHESS, ATOMICCHESS, BUGHOUSECHESS, CRAZYHOUSECHESS, \ LOSERSCHESS, SUICIDECHESS, FISCHERRANDOMCHESS, WILDCASTLESHUFFLECHESS, \ SHUFFLECHESS, RANDOMCHESS, ASYMMETRICRANDOMCHESS, WILDCASTLECHESS, UPSIDEDOWNCHESS, \ ...
gpl-3.0
4,605,888,045,978,333,000
35.468023
91
0.619291
false
VipSaran/Py_Led_Clock
Adafruit_7Segment.py
1
2204
#!/usr/bin/python import time import datetime from Adafruit_LEDBackpack import LEDBackpack # =========================================================================== # 7-Segment Display # =========================================================================== # This class is meant to be used with the four-cha...
apache-2.0
5,680,100,097,644,158,000
30.485714
77
0.622505
false
HelloLily/hellolily
lily/messaging/email/templatetags/email.py
1
8094
from __future__ import absolute_import from bs4 import BeautifulSoup from collections import OrderedDict import urllib from datetime import datetime from dateutil.tz import gettz, tzutc from dateutil.parser import parse from django import template from django.conf import settings from django.urls import reverse from d...
agpl-3.0
-4,721,217,809,216,441,000
35.958904
116
0.567952
false
EDUlib/edx-platform
common/djangoapps/third_party_auth/saml.py
1
23124
""" Slightly customized python-social-auth backend for SAML 2.0 support """ import logging from copy import deepcopy import requests from django.contrib.sites.models import Site from django.http import Http404 from django.utils.functional import cached_property from django_countries import countries from onelogin.sa...
agpl-3.0
-5,072,252,820,591,456,000
40.51526
120
0.61287
false
myfreshcity/mystock
webapp/models/stock.py
1
1472
from webapp.services import db from datetime import datetime import urllib2,re class Stock(db.Model): __tablename__ = 'stock_basic' id = db.Column(db.Integer, primary_key=True) code = db.Column(db.String(255)) name = db.Column(db.String(255)) flag = db.Column(db.String(5)) industry = db.Colum...
mit
8,841,761,880,506,309,000
27.862745
60
0.603261
false
emilybache/KataMedicineClash
SampleVisualization/test_patient.py
1
2779
from datetime import date, timedelta from patient import Patient, Prescription # to run these tests, use py.test (http://pytest.org/) class TestPatient: def test_clash_with_no_prescriptions(self): patient = Patient(prescriptions=[]) assert patient.clash([]) == set() def test_clas...
mit
4,894,406,200,524,778,000
65.190476
135
0.596617
false
kesuki/pysmali
pysmali.py
1
7282
#!/usr/bin/python import os import os.path import xml.dom.minidom var1 = '/home/mak/tmp/apktool/smali' print var1+'/android' manifest = '/home/mak/tmp/apktool/AndroidManifest.xml' ShellHelper = '/home/mak/AndroidStudioProjects/StubShell/app/src/main/java/com/ceprei/stubshell/ShellHelper.java' tranfile = '/home/mak/w...
apache-2.0
-962,484,898,465,406,800
38.150538
124
0.494095
false
milogert/ddnsc
org.py
1
20365
import tkinter as tk import tkinter.font as tkFont import tkinter.ttk as ttk import tkinter.messagebox as tkMessageBox import pymysql.cursors ## Model Class ############################################################### class Model: """ Right now the only options for variables in the url are: {domain} ...
mit
6,451,096,473,597,660,000
28.729927
94
0.597005
false
Blue7Alien/sloopdoorbot
Door System V1/membersdoor.py
1
5976
import RPi.GPIO as GPIO import time from socket import * import thread from threading import Thread import os import datetime import pygame import paramiko MAINDOORIP = '192.168.1.17' #Enter the IP address of the main door DOORBELLPORT = 12346 #Port to send the doorbell command through PORT = 12345 #Send in out info o...
gpl-2.0
-6,914,386,447,396,729,000
31.478261
116
0.530455
false
monnand/myblog
blog/views.py
1
14173
from django.http import HttpResponse, HttpResponseRedirect from django.http import HttpResponseForbidden from django.http import HttpRequest from django.http import Http404 from django.template.loader import render_to_string from django.template import RequestContext from django.shortcuts import render_to_response from...
apache-2.0
-9,131,232,131,672,546,000
33.317191
82
0.568122
false
JeroenZegers/Nabu-MSSS
nabu/postprocessing/reconstructors/reconstructor.py
1
6611
"""@file reconstructor.py contains the Reconstructor class""" from abc import ABCMeta, abstractmethod import os import scipy.io.wavfile as wav import numpy as np class Reconstructor(object): """the general reconstructor class a reconstructor is used to reconstruct the signals from the models output""" __metacla...
mit
8,466,260,221,979,624,000
34.735135
158
0.712449
false
hainm/binder
binder/log.py
1
6573
import logging import Queue import time from threading import Thread, current_thread, Lock import zmq from binder.binderd.client import BinderClient from binder.settings import LogSettings class LoggerClient(Thread): _singleton = None @staticmethod def getInstance(): if not LoggerClient._singl...
apache-2.0
8,806,846,748,603,047,000
30.151659
115
0.566104
false
bboozzoo/mender-backend-cli
mender/client/__init__.py
1
3091
# The MIT License (MIT) # # Copyright (c) 2016 Maciej Borzecki # # 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 without limitation the rights # to use, copy, m...
mit
-5,437,378,758,664,473,000
28.721154
80
0.685215
false
SANBI-SA/tools-sanbi-uwc
tools/build_ctb_explorer/build_ctb_explorer.py
1
4075
#!/usr/bin/env python from __future__ import print_function import argparse import datetime import glob import shutil import os # try: # from urllib.parse import urlparse # except ImportError: # from urlparse import urlparse import logging log = logging.getLogger(__name__) def copy_output_file_to_dataset(...
gpl-3.0
-1,033,532,255,939,862,400
33.243697
107
0.600982
false
szecsi/Gears
GearsPy/Project/Components/Warp/Clamp.py
1
1310
import Gears as gears from .. import * from .Base import * class Clamp(Base) : def applyWithArgs( self, spass, functionName, *, minima : 'Horizontal and vertical minima [(um,um)].' = ('field', 'field'), maxima : 'Horiz...
gpl-2.0
-393,836,095,485,218,240
31.75
91
0.499237
false
rew4332/tensorflow
tensorflow/models/image/mnist/convolutional.py
1
14738
# Copyright 2015 The TensorFlow Authors. 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 applica...
apache-2.0
-2,192,156,125,096,678,700
41.96793
98
0.644389
false
googleapis/python-dataproc
google/cloud/dataproc_v1/services/job_controller/transports/base.py
1
12099
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-5,770,027,655,046,114,000
36.809375
103
0.573023
false
akvo/akvo-rsr
akvo/rsr/migrations/0042_auto_20153011_1450.py
1
1498
# -*- coding: utf-8 -*- from django.db import models, migrations from ..models.project import Project def change_primary_organisations(apps, schema_editor): Project = apps.get_model("rsr", "Project") for project in Project.objects.all(): primary_organisation = None # Pick the reporting org...
agpl-3.0
-2,147,158,279,839,859,200
31.565217
87
0.658211
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/aio/operations/_operations.py
1
4679
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
1,481,069,990,702,141,700
43.990385
133
0.645651
false
futurepr0n/Books-solutions
Python-For-Everyone-Horstmann/Chapter7-Files-and-Exceptions/P7.10.py
1
1769
# Get the data for baby names in prior years from the Social Security Administration. # Paste the table data in files named babynames2010.txt , etc. Modify the babynames.py # program so that it prompts the user for a file name. Can you spot a trend in the # frequencies? ## # This program displays the most common baby...
mit
-9,044,748,663,259,075,000
28.483333
86
0.647824
false
IS-ENES-Data/esgf-pid
esgfpid/rabbit/asynchronous/thread_confirmer.py
1
9200
import logging import copy from esgfpid.utils import loginfo, logdebug, logtrace, logerror, logwarn, log_every_x_times from .exceptions import UnknownServerResponse LOGGER = logging.getLogger(__name__) LOGGER.addHandler(logging.NullHandler()) ''' ========= Confirmer ========= The confirmer is responsible for handlin...
apache-2.0
6,895,465,964,748,471,000
42.396226
209
0.672174
false
NTAWolf/pyExamPrepper
interfaces/base_interface.py
1
3185
# encoding: utf-8 class QuizInterfaceBase(object): """This is the base user interface for an ExamPrepper quiz. Extend and implement it in subclasses, catering to different views. """ def set_media_folder(s, path): s.media_folder = path def select_categories(s, categories): """All...
gpl-2.0
4,718,266,686,539,317,000
41.48
105
0.670644
false
deepmind/dm_control
dm_control/locomotion/walkers/rodent.py
1
12164
# Copyright 2020 The dm_control 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 agreed to i...
apache-2.0
9,125,320,332,586,730,000
35.419162
135
0.655212
false
samedder/azure-cli
src/command_modules/azure-cli-sf/azure/cli/command_modules/sf/tests/test_sf_node.py
2
1601
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
-5,565,737,849,269,521,000
49.03125
94
0.615865
false