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
Eigenlabs/EigenD
plg_sampler2/sf2.py
1
7476
# # Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com # # This file is part of EigenD. # # EigenD 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) a...
gpl-3.0
9,204,759,465,939,505,000
27.753846
167
0.58534
false
qiyuangong/APA
anatomizer.py
1
3783
import random, heapq import pdb # by Qiyuan Gong # qiyuangong@gmail.com # @INPROCEEDINGS{ # author = {Xiao, Xiaokui and Tao, Yufei}, # title = {Anatomy: simple and effective privacy preservation}, # booktitle = {Proceedings of the 32nd international conference on Very large data # bases}, # year = {2006},...
mit
1,053,349,836,134,681,500
25.089655
84
0.548506
false
xlqian/navitia
source/jormungandr/jormungandr/scenarios/ridesharing/ridesharing_journey.py
1
2827
# Copyright (c) 2001-2018, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
agpl-3.0
-8,374,270,853,840,085,000
30.411111
101
0.651928
false
acca90/django-tests
cello/produto/migrations/0001_initial.py
1
1354
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-11 00:54 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Produt...
mit
7,758,737,332,258,354,000
38.823529
123
0.573855
false
coxmediagroup/dolphin
dolphin/testutils.py
1
4503
import os from sys import stdout, stderr from contextlib import contextmanager from django.db.models import get_apps from django.utils import simplejson as sj from django.core import serializers from django.conf import settings from django.utils.itercompat import product from .middleware import LocalStoreMiddleware ...
mit
5,224,790,747,942,182,000
34.456693
97
0.50433
false
cmollet/macro-chef
yummly.py
1
3288
import requests import time try: import simplejson as json except ImportError: import json from pymongo import Connection from paleo import paleo_ingredients, excludedIngredients app_key = open('app.key').read().strip() app_id = open('app_id.key').read().strip() def mongoconn(name='bespin'): return Connec...
mit
-4,144,650,630,414,836,000
32.896907
231
0.601277
false
shendo/peerz
peerz/examples/visualise.py
1
1704
# Peerz - P2P python library using ZeroMQ sockets and gevent # Copyright (C) 2014-2015 Steve Henderson # # 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...
gpl-3.0
1,749,261,066,399,993,300
33.08
73
0.692488
false
nathanielvarona/airflow
tests/providers/qubole/operators/test_qubole_check.py
1
7409
# # 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...
apache-2.0
7,868,135,222,770,688,000
36.419192
110
0.671751
false
Telestream/telestream-cloud-python-sdk
telestream_cloud_qc_sdk/test/test_kag_size_test.py
1
1406
# coding: utf-8 """ Qc API Qc API # noqa: E501 The version of the OpenAPI document: 3.0.0 Contact: cloudsupport@telestream.net Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import datetime import telestream_cloud_qc from telestream_cl...
mit
-818,138,193,350,723,100
24.563636
86
0.622333
false
AvishaySebban/NTM-Monitoring
ansible/psutil-3.0.1/psutil/__init__.py
1
66350
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """psutil is a cross-platform library for retrieving information on running processes and system utilization...
artistic-2.0
-1,882,063,374,360,191,700
34.048626
79
0.550685
false
Elico-Corp/openerp-7.0
stock_pack_wizard/__openerp__.py
1
1466
# -*- coding: utf-8 -*- # © 2014 Elico Corp (https://www.elico-corp.com) # Licence AGPL-3.0 or later(http://www.gnu.org/licenses/agpl.html) { 'name': 'Stock Pack Wizard', 'version': '7.0.1.0.0', 'author': 'Elico Corp', 'website': 'https://www.elico-corp.com', 'summary': '', 'description' : """ ...
agpl-3.0
3,104,632,123,113,778,700
27.173077
73
0.539249
false
VirusTotal/msticpy
tools/toollib/url_checker_async.py
1
7616
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """Python ...
mit
-6,428,462,102,758,438,000
28.75
88
0.588629
false
vinaykrdahiya/justuploads
main/__init__.py
1
2292
import falcon # from main.settings import DB as db # from main.helpers import QueryParser import json import urlparse from werkzeug.http import parse_options_header from werkzeug.formparser import parse_form_data from cStringIO import StringIO from werkzeug.wsgi import LimitedStream from werkzeug import secure_filename...
unlicense
-2,264,388,575,298,547,000
33.727273
80
0.603403
false
aphelps/platformio
platformio/builder/tools/platformio.py
1
10717
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import atexit import platform import re from os import getenv, listdir, remove, sep, walk from os.path import basename, dirname, isdir, isfile, join, normpath from time import sleep from SCons.Script import Exit, SConscript, SConscriptChdir fro...
mit
-2,971,078,524,403,639,300
30.15407
79
0.528599
false
dlarochelle/extractor_train
tests/test_forms.py
1
2252
# -*- coding: utf-8 -*- import pytest from extractor_train.public.forms import LoginForm from extractor_train.user.forms import RegisterForm from .factories import UserFactory class TestRegisterForm: def test_validate_user_already_registered(self, user): # Enters username that is already registered ...
bsd-3-clause
-4,317,048,631,488,596,000
35.934426
74
0.672735
false
aniversarioperu/django-manolo
scrapers/manolo_scraper/spiders/minem.py
2
3163
# -*- coding: utf-8 -*- import math import scrapy from .spiders import ManoloBaseSpider from ..items import ManoloItem from ..item_loaders import ManoloItemLoader from ..utils import make_hash, get_dni # url: http://intranet.minem.gob.pe/GESTION/visitas_pcm class MinemSpider(ManoloBaseSpider): name = 'minem' ...
bsd-3-clause
4,511,216,025,104,690,000
35.356322
112
0.579829
false
SurfasJones/djcmsrc3
venv/lib/python2.7/site-packages/setuptools/command/test.py
1
6484
from setuptools import Command from distutils.errors import DistutilsOptionError import sys from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, add_activation_listener, require, EntryPoint) from unittest import TestLoader class ScanningLoader(TestLoad...
mit
-4,802,770,465,874,498,000
35.840909
86
0.566009
false
dderichs/piradio
piradio/observer.py
1
5042
# -*- coding: utf-8 -*- """ * Copyright (C) 2009, Michael "Svedrin" Ziegler <diese-addy@funzt-halt.net> * * Omikron 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...
gpl-3.0
-8,911,325,307,187,469,000
29.932515
106
0.576359
false
saskartt/P4UL
pyNetCDF/syncMaskWithNetCdf.py
1
5983
#!/usr/bin/env python from netcdfTools import * from mapTools import * from utilities import writeLog import sys import argparse import numpy as np ''' Description: Author: Mikko Auvinen mikko.auvinen@helsinki.fi University of Helsinki & Finnish Meteorological Institute ''' #============= f...
mit
-1,528,385,973,083,507,700
34.402367
94
0.623767
false
murex/murex-coding-dojo
Paris/2015/2015-05-21-Power4-Python-Randori/power4_test.py
1
1373
import power4 #def test_final(): # assert power4.isOver([ # [0, 1, 2, 1, 2, 1, 1], # [0, 2, 1, 1, 1, 2, 2], # [0, 1, 2, 2, 2, 1, 1], # [1, 2, 1, 1, 1, 2, 2], # [2, 1, 1, 2, 2, 2, 1], # [1, 2, 2, 1, 2, 1, 2], # ]) == True def test_p1_win_one_line(): assert power4.isOve...
mit
4,722,288,057,178,266,000
23.105263
58
0.383831
false
yuma-m/pychord
test/test_progression.py
1
3528
# -*- coding: utf-8 -*- import unittest from pychord import Chord, ChordProgression class TestChordProgressionCreations(unittest.TestCase): def test_none(self): cp = ChordProgression() self.assertEqual(cp.chords, []) def test_one_chord(self): c = Chord("C") cp = ChordProgre...
mit
-6,067,492,040,451,249,000
29.678261
100
0.541667
false
stackforge/python-openstacksdk
openstack/tests/functional/cloud/test_aggregate.py
1
2091
# 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 # distributed under t...
apache-2.0
-1,216,998,120,332,145,000
33.85
75
0.658058
false
geodynamics/pylith
tests/fullscale/linearelasticity/nofaults-2d/sheartraction_gendb.py
1
2474
#!/usr/bin/env nemesis # # ---------------------------------------------------------------------- # # Brad T. Aagaard, U.S. Geological Survey # Charles A. Williams, GNS Science # Matthew G. Knepley, University at Buffalo # # This code was developed as part of the Computational Infrastructure # for Geodynamics (http://g...
mit
6,571,733,550,315,437,000
29.925
75
0.525869
false
davidbgk/udata
udata/core/organization/api_fields.py
1
4922
# -*- coding: utf-8 -*- from __future__ import unicode_literals from udata.api import api, fields, base_reference from udata.core.badges.api import badge_fields from .models import ORG_ROLES, DEFAULT_ROLE, MEMBERSHIP_STATUS, LOGO_SIZES BIGGEST_LOGO_SIZE = LOGO_SIZES[0] org_ref_fields = api.inherit('OrganizationRef...
agpl-3.0
4,873,251,861,033,014,000
42.557522
81
0.677367
false
gsnbng/erpnext
erpnext/hr/utils.py
1
17205
# 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, erpnext from frappe import _ from frappe.utils import formatdate, format_datetime, getdate, get_datetime, nowdate, flt, cstr, add_days, t...
agpl-3.0
-7,992,770,331,410,956,000
36.730263
123
0.706306
false
Bluejudy/blueblockd
lib/components/assets.py
1
14553
import os import logging import decimal import base64 import json from datetime import datetime from lib import config, util, util_worldcoin ASSET_MAX_RETRY = 3 D = decimal.Decimal def parse_issuance(db, message, cur_block_index, cur_block): if message['status'] != 'valid': return def modify_extende...
mit
-3,977,259,987,266,524,000
51.16129
159
0.589226
false
lantianlz/qiexing
www/journey/views.py
1
5036
# -*- coding: utf-8 -*- import json from django.http import HttpResponse, Http404, HttpResponseRedirect from django.template import RequestContext from django.shortcuts import render_to_response from common import utils, page from www.journey import interface from www.misc.decorators import member_required, staff_req...
gpl-2.0
-7,290,553,088,338,072,000
34.485714
125
0.662037
false
MGApcDev/LamasAndGroves
src/wordbranch.py
1
2333
class WordBranch(object): """WordBranch represents a single branch in the tree of all the valid word combinations. Attributes: letter_branch (LetterBranch) The reference to the LetterBranch that represents the word. origin (WordBranch) The reference to the parent WordBranch. ...
mit
8,808,247,715,610,096,000
37.542373
98
0.583369
false
alehander42/bach
bach/bach_macro.py
1
4898
import types import bach_ast import compiler import bach_stl from errors import MacroMatchError def register_macro(mapping, label, macro, count=None): if label not in mapping: mapping[label] = [] if isinstance(macro, types.FunctionType): mapping[label].append((count, macro)) else: m...
mit
1,044,999,443,034,420,000
39.147541
126
0.576766
false
juliusdedekind/FindDuplicateFiles
FindDuplicates.py
1
2897
"""Find duplicate files inside a directory tree.""" from os import walk, remove, stat from os.path import join as joinpath from hashlib import md5 import threading import Queue import time import sys class Scanner(threading.Thread): def __init__(self, path, queue, finished_scan): threading.Thr...
gpl-3.0
-9,085,385,887,322,903,000
38.802817
103
0.563687
false
manewton/BioReactor-Data-Logging
Project/bioreactor_unittests.py
1
3958
import unittest import os import pandas as pd import numpy as np import sys import types from downloader import download_latest from googledriveutils import remove_file, find_reactorfolder from googledriveutils import find_reactorfileid, get_newdata, get_file_list dates = pd.date_range('20130101', periods=6) data = pd...
gpl-3.0
5,540,993,594,522,019,000
34.981818
78
0.669277
false
armanpazouki/chrono
src/demos/python/chrono-tensorflow/PPO/train.py
1
12022
""" PPO: Proximal Policy Optimization serial version """ import sys sys.path.append('../envs') import chtrain as gym import numpy as np from policy import Policy from value_function import NNValueFunction import scipy.signal from utils import Logger, Scaler from datetime import datetime import argparse import signal ...
bsd-3-clause
-2,523,526,546,991,726,000
37.780645
147
0.6182
false
RuudBurger/CouchPotatoServer
couchpotato/core/downloaders/deluge.py
1
16194
from base64 import b64encode, b16encode, b32decode from datetime import timedelta from hashlib import sha1 import os.path import re import traceback from bencode import bencode as benc, bdecode from couchpotato.core._base.downloader.main import DownloaderBase, ReleaseDownloadList from couchpotato.core.helpers.encoding...
gpl-3.0
8,216,095,494,107,268,000
37.374408
512
0.545943
false
jeffdonahue/voc-classification
src/python_layers.py
1
3416
from __future__ import division from __future__ import print_function from caffe_all import * import numpy as np import unittest # Helper class that allows python layers to be added to NetSpec easily. Just use # Py.YourLayer(bottom1, bottom2, ..., parameter1=.., ...) # parameter1 will automatically be passed to You...
bsd-2-clause
-6,313,557,467,080,100,000
30.054545
146
0.636417
false
smira/fmspy
fmspy/application/room.py
1
2208
# FMSPy - Copyright (c) 2009 Andrey Smirnov. # # See COPYRIGHT for details. """ Application rooms. """ class Room(object): """ Room (scope, context) is location inside application where clients meet. Room holds server objects: streams, shared objects, etc. It can be used to iterate over clients in ro...
mit
-1,946,959,390,960,262,100
22.242105
87
0.567482
false
ArchibaldArt/avanan_challenge
config.py
1
1146
''' SOApp config file ''' import os import sys class Config(object): DEBUG = False TESTING = False DEVELOPMENT = False WTF_CSRF_ENABLED = True # Random value needed for OAuth2 process (unsecure value) OAUTH2_STATE_RANDOM = '+HqEsxiec6/inR3EPwM29DCF9IUBNSmQ9giWY2yC1u0=' class DevelopmentConfig...
mit
8,156,346,666,529,675,000
25.045455
89
0.624782
false
chadgates/locmaster
unlocode/csvimport.py
1
10411
from unlocode.models import Country, SubDivision, Locode, LocCountry, LocFunction, LocStatus, LocSubdivision, LocVersion from unlocode.models import LocChangeIndicator import os import csv import logging from django.db import IntegrityError, transaction def saveatomic(object, logger): result = False try: ...
bsd-3-clause
5,067,940,848,887,395,000
31.232198
120
0.600038
false
Birion/python-ffdl
pyffdl/core/app.py
1
4385
import shutil from typing import List, Tuple, Optional import attr import click from furl import furl # type: ignore from pyffdl.__version__ import __version__ from pyffdl.sites import ( AdultFanFictionStory, ArchiveOfOurOwnStory, FanFictionNetStory, HTMLStory, TwistingTheHellmouthStory, TGSt...
mit
876,202,144,005,720,600
27.848684
116
0.601596
false
libvirt/libvirt-python
examples/domstart.py
1
1239
#!/usr/bin/env python3 """ Check that the domain described by DOMAIN.XML is running. If the domain is not running, create it. """ import libvirt import libxml2 from argparse import ArgumentParser from typing import Tuple # Parse the XML description of domU from FNAME # and return a tuple (name, xmldesc) where NAME #...
lgpl-2.1
-1,861,244,689,678,241,000
25.361702
113
0.688458
false
nburn42/tensorflow
tensorflow/python/keras/models_test.py
1
4439
# Copyright 2016 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
-5,862,570,881,873,089,000
33.952756
80
0.644289
false
semente/django-smuggler
tests/test_app/tests/test_auth.py
1
3232
from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse class TestSmugglerViewsRequireAuthentication(TestCase): def test_dump_data(self): url = reverse('dump-data') response = self.client.get(url) self.assertRedirects( respon...
lgpl-3.0
-7,871,784,510,331,345,000
32.319588
69
0.60953
false
liuwill-projects/flask-server-scaffold
main.py
1
1505
#!/usr/bin/python # -*- coding: UTF-8 -*- import os from flask import Flask, jsonify # , request, current_app from flask_cors import CORS, cross_origin from flask_socketio import SocketIO, emit, send from chat.utils.jsonp import jsonp from chat.controllers.mock import Mock import logging from logging.config import file...
mit
7,558,739,674,957,527,000
24.508475
63
0.682392
false
theY4Kman/infusionsoft-client
setup.py
1
1956
import os from setuptools import setup, find_packages def build_install_requires(path): """Support pip-type requirements files""" basedir = os.path.dirname(path) with open(path) as f: reqs = [] for line in f: line = line.strip() if not line: continu...
apache-2.0
1,362,176,675,255,124,500
30.047619
82
0.593047
false
brigittebigi/proceed
proceed/src/term/textprogress.py
1
5853
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- # --------------------------------------------------------------------------- # ___ __ __ __ ___ # / | \ | \ | \ / Automatic # \__ |__/ |__/ |___| \__ Annotation # \ | | | | \ ...
gpl-3.0
-6,311,342,072,019,640,000
27.832512
78
0.411584
false
chenzhengchen200821109/github-python
socketerror.py
1
1117
#!/bin/python # Error handing import socket, sys host = sys.argv[1] textport = sys.argv[2] filename = sys.argv[3] try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) except socket.error, e: print "Strange error creating socket: %s" % e sys.exit(1) try: port = int(textport) except ValueError: ...
mit
3,929,081,061,703,721,000
20.901961
62
0.615936
false
bachiraoun/fullrmc
Examples/explore/createSystem.py
1
1476
import os from pdbparser.pdbparser import pdbparser from pdbparser.Utilities.Collection import get_path from pdbparser.Utilities.Construct import AmorphousSystem from pdbparser.Utilities.Geometry import get_satisfactory_records_indexes, translate, get_geometric_center from pdbparser.Utilities.Modify import delete_recor...
agpl-3.0
-1,953,033,512,038,257,700
38.891892
136
0.797425
false
hasibi/TAGME-Reproducibility
scripts/evaluator_annot.py
1
6793
""" This script computes Topic metrics for the end-to-end performance. Precision and recall are macro-averaged. Matching condition: entities should match and mentions should be equal or contained in each other. @author: Faegheh Hasibi (faegheh.hasibi@idi.ntnu.no) """ from __future__ import division import sys from co...
mit
5,499,083,128,206,597,000
35.718919
117
0.580892
false
conda/kapsel
conda_kapsel/internal/toposort.py
1
2834
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Copyright © 2016, Continuum Analytics, Inc. All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. # -------------------------------------------------------------------...
bsd-3-clause
6,041,369,235,106,766,000
31.563218
104
0.5976
false
demianw/tract_querier
tract_querier/tests/test_query_eval.py
1
10072
from .. import query_processor from nose.tools import assert_true, assert_equal from numpy import random import ast # Ten tracts traversing random labels another_set = True while (another_set): tracts_labels = dict([(i, set(random.randint(100, size=2))) for i in range(100)]) labels_tracts = query_processor.la...
bsd-3-clause
-3,546,840,993,955,329,000
32.131579
113
0.629468
false
morganmeliment/Calculate-Pi
calculatepi.py
1
1034
""" calculatepi.py Author: Morgan Meliment Credit: none Assignment: Write and submit a Python program that computes an approximate value of π by calculating the following sum: (see: https://github.com/HHS-IntroProgramming/Calculate-Pi/blob/master/README.md) This sum approaches the true value of π as n approaches ∞. ...
mit
-4,700,008,651,961,431,000
32.193548
107
0.729835
false
gh4w/some
web/diego/pronostix/scripts/load_database.py
1
1473
# coding: utf8 #! /usr/bin/env python3 import json import re import iso8601 as iso from pronostix.models import Club, Rencontre def get_entity_id(entity): return get_url_id(entity['_links']['self']['href']) def get_url_id(url): regex = re.compile('http://api.football-data.org/v1/[^/]+/(?P<id>\d+)$') m = ...
mit
-5,689,127,188,113,624,000
30.340426
138
0.610998
false
magnusmorton/nest
nest/main.py
1
1314
#!/usr/bin/env python # encoding: utf-8 """ Created by Magnus Morton on 2012-03-14. (c) Copyright 2012 Magnus Morton. This file is part of Nest. Nest 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...
agpl-3.0
6,048,209,914,957,177,000
29.55814
104
0.750381
false
bazz-erp/erpnext
erpnext/accounts/doctype/eventual_purchase_invoice/eventual_purchase_invoice.py
1
3890
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from erpnext.accounts.general_ledger import make_gl_entries from frappe.utils i...
gpl-3.0
-2,652,611,756,018,956,000
31.416667
128
0.569409
false
mtbc/openmicroscopy
components/tools/OmeroWeb/omeroweb/webstart/views.py
1
4134
#!/usr/bin/env python # -*- coding: utf-8 -*- # # # # Copyright (c) 2008-2014 University of Dundee. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # Licens...
gpl-2.0
4,398,770,162,860,684,000
33.739496
110
0.676343
false
MrChoclate/optim
tsp.py
1
3352
import itertools import math import functools import time import random import copy def timer(func): def with_time(*args, **kwargs): t = time.time() res = func(*args, **kwargs) print("{} took {} sec".format(func.__name__, time.time() - t)) return res return with_time def read()...
gpl-3.0
-7,064,214,220,862,310,000
25.1875
97
0.571599
false
nkolban/Espruino
scripts/common.py
1
16586
#!/bin/false # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk> # # 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 ...
mpl-2.0
-2,976,484,380,835,921,000
43.347594
205
0.574882
false
centrofermi/e3pipe
display/E3EventCanvas.py
1
5968
#!/usr/bin/env python # ********************************************************************* # * Copyright (C) 2015 Luca Baldini (luca.baldini@pi.infn.it) * # * * # * For the license terms see the file LICENCE, distributed * # * along ...
gpl-3.0
3,696,403,357,255,309,000
32.909091
78
0.487936
false
nithintech/google-python-exercises
babynames/babynames.py
2
2533
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re import os """Baby Names exercise Define the extract_names() function b...
apache-2.0
3,653,605,300,787,971,600
22.896226
79
0.629293
false
pbs/django-cms
cms/forms/widgets.py
1
9439
# -*- coding: utf-8 -*- from cms.forms.utils import get_site_choices, get_page_choices from cms.models import Page, PageUser, Placeholder from cms.plugin_pool import plugin_pool from cms.utils import get_language_from_request, cms_static_url from django.conf import settings from django.contrib.sites.models import Site ...
bsd-3-clause
-3,840,572,163,296,305,700
38.827004
139
0.580888
false
nvbn/thefuck
tests/rules/test_remove_shell_prompt_literal.py
1
1168
import pytest from thefuck.rules.remove_shell_prompt_literal import match, get_new_command from thefuck.types import Command @pytest.fixture def output(): return "$: command not found" @pytest.mark.parametrize( "script", [ "$ cd newdir", " $ cd newdir", "$ $ cd newdir" " ...
mit
7,313,102,935,219,183,000
23.333333
76
0.578767
false
gihankarunarathne/udp
EXTRACTFLO2DWATERLEVEL.py
1
22923
#!/usr/bin/python3 import csv import getopt import json import os import sys import traceback import copy from datetime import datetime, timedelta from os.path import join as pjoin from curwmysqladapter import MySQLAdapter import Constants from LIBFLO2DWATERLEVELGRID import getWaterLevelOfChannels from Util.LibForec...
apache-2.0
7,930,331,980,908,002,000
41.06055
136
0.551019
false
adalke/rdkit
rdkit/Chem/Subshape/SubshapeBuilder.py
1
4360
# $Id$ # # Copyright (C) 2007 by Greg Landrum # All rights reserved # from __future__ import print_function from rdkit import Chem,Geometry from rdkit.Chem import AllChem from rdkit.Chem.Subshape import SubshapeObjects from rdkit.Chem.Subshape import BuilderUtils from rdkit.six.moves import cPickle import time #----...
bsd-3-clause
-3,022,887,758,401,373,000
34.447154
95
0.68555
false
bbc/ebu-tt-live-toolkit
ebu_tt_live/adapters/base.py
1
3499
import logging import weakref from abc import abstractmethod, abstractproperty from ebu_tt_live.utils import AutoRegisteringABCMeta, AbstractStaticMember, validate_types_only log = logging.getLogger(__name__) # Interfaces # ========== class IDocumentDataAdapter(object, metaclass=AutoRegisteringABCMeta): """ ...
bsd-3-clause
7,567,805,828,722,318,000
31.700935
112
0.606745
false
qtproject/qt-creator
src/libs/3rdparty/syntax-highlighting/data/generators/generate-cmake-syntax.py
1
5026
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Generate Kate syntax file for CMake # # Copyright (c) 2017-2019 Alex Turbov <i.zaufi@gmail.com> # # To install prerequisites: # # $ pip install --user click jinja2 yaml # # To use: # # $ ./generate-cmake-syntax.py cmake.yaml > ../syntax/cmake.xml # import click imp...
gpl-3.0
3,560,213,243,156,102,700
27.885057
105
0.606446
false
annoviko/pyclustering
pyclustering/nnet/examples/hysteresis_examples.py
1
2173
"""! @brief Examples of usage and demonstration of abilities of Hysteresis Oscillatory Network. @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """ from pyclustering.nnet.hysteresis import hysteresis_network, hysteresis_visualizer; from pyclustering.nnet import *;...
gpl-3.0
8,405,484,669,327,025,000
34.25
162
0.650253
false
rbaravalle/imfractal
imfractal/Algorithm/MFS_3D.py
1
11780
""" Copyright (c) 2013 Rodrigo Baravalle 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 notice, this list of conditions and the following...
bsd-3-clause
1,529,415,426,108,300,800
32.276836
111
0.519864
false
karec/oct-browser
octbrowser/browser.py
1
14578
"""This file contain the main class for the octbrowser It represent a simple browser object with all methods """ import re import os import lxml.html as lh import requests from lxml.cssselect import CSSSelector from octbrowser.exceptions import FormNotFoundException, NoUrlOpen, LinkNotFound, NoFormWaiting, HistoryI...
mit
-6,376,803,414,716,263,000
32.131818
121
0.599465
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Ops/PyScripts/lib/ops/pprint.py
1
4263
from __future__ import print_function from __future__ import division import dsz import dsz.ui import ops.data ALIGN_LEFT = '<' ALIGN_CENTER = '_' ALIGN_RIGHT = '>' def pprint(data, header=None, dictorder=None, echocodes=None, align=None, print_handler=print): if ((data is None) or (len(data) == 0)): retu...
unlicense
-8,518,540,465,188,391,000
35.444444
147
0.451325
false
lem9/weblate
weblate/permissions/templatetags/permissions.py
1
5965
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2017 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # 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
-306,578,692,451,510,400
27.390476
79
0.77256
false
lmarent/network_agents_ver2_python
simulation_site/simulation/forms.py
1
4022
from django import forms from django.core.exceptions import ValidationError from django.forms.models import inlineformset_factory import inspect import os import re import sys from simulation.models import ProbabilityDistribution from simulation.models import DiscreteProbabilityDistribution from simulation.models impo...
mit
-7,739,133,508,648,501,000
39.22
94
0.663352
false
USStateDept/geonode
geonode/documents/models.py
1
6056
import logging import os import uuid from django.db import models from django.db.models import signals from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.contrib.contenttypes import generic from django.contrib.staticfiles...
gpl-3.0
-3,836,716,759,410,032,600
31.735135
107
0.63177
false
rodrigozc/mockatron
mockatron_core/utils.py
1
6477
from django.http import HttpResponse from django.template import Context from .models import * from .constants import * from .classes import * from xml.etree import ElementTree import hashlib, json, xmltodict, re, urllib.request, logging logger = logging.getLogger("django") def extract_agent_data_from_request(requ...
apache-2.0
4,762,224,527,407,931,000
48.068182
195
0.64428
false
hradec/gaffer
python/GafferUI/PlugLayout.py
1
28367
########################################################################## # # Copyright (c) 2014, Image Engine Design Inc. All rights reserved. # Copyright (c) 2014, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that ...
bsd-3-clause
-3,389,370,072,250,530,000
35.936198
165
0.706913
false
UCSBarchlab/PyRTL
tests/rtllib/test_barrel.py
1
2448
import unittest import random import pyrtl from pyrtl.rtllib import barrel class TestBarrel(unittest.TestCase): # @classmethod # def setUpClass(cls): # # this is to ensure reproducibility # random.seed(777906374) def setUp(self): pyrtl.reset_working_block() self.inp_val =...
bsd-3-clause
-2,724,166,392,009,105,000
40.491525
99
0.574346
false
leth/nose2
nose2/plugins/loader/discovery.py
1
8390
""" Discovery-based test loader. This plugin implements nose2's automatic test module discovery. It looks for test modules in packages and directories whose names start with 'test', then fires the :func:`loadTestsFromModule` hook for each one to allow other plugins to load the actual tests. It also fires :func:`handl...
bsd-2-clause
-5,359,058,218,203,558,000
36.792793
79
0.590942
false
edm1/error-aware-demultiplexer
extras/install_pypy3-2.4.0.py
1
4815
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (c) 2014 Edward Mountjoy # # 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, includin...
mit
-2,608,913,167,537,939,000
33.640288
87
0.637799
false
Liakoni/pgn2csv
pgn2csv.py
1
8232
#pgn2csv 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. #You should have received a copy of the GNU General Public License #along with p...
gpl-3.0
1,060,888,842,327,421,300
54.248322
151
0.565233
false
L5hunter/TestCoin
qa/rpc-tests/mempool_coinbase_spends.py
1
3854
#!/usr/bin/env python2 # Copyright (c) 2014 The Testcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test re-org scenarios with a mempool that contains transactions # that spend (directly or indirectly) coi...
mit
-2,353,289,480,723,677,000
40
98
0.656201
false
dragly/conan
conans/test/download_test.py
1
4502
import unittest from conans.test.tools import TestClient, TestServer from conans.test.utils.test_files import hello_source_files from conans.client.manager import CONANFILE import os from conans.model.ref import ConanFileReference, PackageReference from conans.paths import CONAN_MANIFEST, CONANINFO from conans.util.fil...
mit
-1,512,268,174,114,705,200
41.074766
97
0.581964
false
hasgeek/boxoffice
boxoffice/mailclient.py
1
6437
from decimal import Decimal from flask import render_template from flask_mail import Message from html2text import html2text from premailer import transform as email_transform from baseframe import __ from . import app, mail, rq from .models import CURRENCY_SYMBOL, LINE_ITEM_STATUS, Assignee, LineItem, Order @rq....
agpl-3.0
-475,470,740,108,540,700
31.675127
88
0.555538
false
jricardo27/holiday_planner
holiday_planner/holiday_place/models/place.py
1
4516
"""Place representing a geographical point on the map.""" from django.db import models from model_utils import Choices class PlaceTypeMixin: """Place type definitions.""" PLACE_TYPES = Choices( ('city', 'City'), ('town', 'Town'), ('beach', 'Beach'), ('cafe', 'Cafe'), (...
bsd-3-clause
3,256,515,929,308,662,000
25.409357
66
0.568423
false
paveu/api_mocker
apimocker/settings/components/logging.py
1
3197
from __future__ import absolute_import import logging from logstash.formatter import LogstashFormatterVersion1 class SuppressDeprecated(logging.Filter): def filter(self, record): WARNINGS_TO_SUPPRESS = [ 'RemovedInDjango110Warning', 'RemovedInDjango20Warning', ] # ...
mit
-1,602,555,381,508,861,700
26.09322
96
0.487645
false
gpersistence/tstop
python/persistence/CrossValidation.py
1
16269
#TSTOP # #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 distributed in the hope that it will be useful, ...
gpl-3.0
1,937,170,279,775,606,000
44.957627
203
0.597209
false
par2/lamana
lamana/output_.py
1
29238
# ----------------------------------------------------------------------------- '''Classes and functions for handling visualizations, plots and exporting data. BETA''' # _distribplot(): independent plots of single and multiple geometries # _multiplot(): aggregates severa; distribplots into a grid of subplots # flake8 ...
bsd-3-clause
8,377,580,359,115,972,000
34.743276
131
0.569157
false
jaeilepp/eggie
mne/viz/topo.py
1
27382
"""Functions to plot M/EEG data on topo (one axes per channel) """ from __future__ import print_function # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eri...
bsd-2-clause
-3,022,529,476,795,081,000
36.768276
79
0.616281
false
jodogne/OrthancMirror
OrthancServer/Resources/Samples/Python/ArchiveStudiesInTimeRange.py
1
3416
#!/usr/bin/python # -*- coding: utf-8 -*- # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics # Department, University Hospital of Liege, Belgium # Copyright (C) 2017-2021 Osimis S.A., Belgium # # This program is free software: you can redistribute it and/or # mo...
gpl-3.0
-516,811,386,712,827,460
35.731183
105
0.650761
false
HugoMMRabson/fonsa
src/test/old/backend/svrtools/net/netwrk/testFirewall.py
1
1579
''' Created on Mar 5, 2018 @author: johnrabsonjr Functions: generate_clearnet_firewall_configuration_file generate_darknet_firewall_configuration_file activate_firewall_configuration_file configure_firewall Classes: _BackendNetworkFirewall ''' import unittest class Test_generate_clearnet_firewa...
gpl-3.0
-8,070,229,525,640,989,000
18.024096
76
0.673211
false
anuragpapineni/Hearthbreaker-evolved-agent
hearthbreaker/agents/trade_agent.py
1
4738
# from hearthbreaker.agents.basic_agents import RandomAgent from hearthbreaker.agents.trade.possible_play import PlayMixin from hearthbreaker.agents.trade.trade import TradeMixin, AttackMixin from hearthbreaker.agents.trade.util import Util import hearthbreaker.cards.battlecries class BattlecryType: @staticmethod...
mit
-1,693,280,705,883,882,800
31.231293
85
0.632967
false
fabiobalzano/LED
maingui.py
1
5125
""" Copyright (c) 2012, fabiodive@gmail.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, self list of conditions and the...
bsd-3-clause
-911,846,867,217,889,300
34.10274
88
0.618341
false
jboomer/python-isobus
setup.py
1
2170
# Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: ...
mit
1,452,935,112,713,547,000
28.324324
94
0.62765
false
acbraith/crossfit_scraper
data_analysis.py
1
23756
from crossfit_api import get_analysis_dataframe import numpy as np import pandas as pd from memoize import persistent_memoize, memoize from functools import partial from sklearn.pipeline import Pipeline from sklearn.feature_selection import SelectFromModel, RFECV from sklearn.linear_model import Lasso, RANSACRegresso...
mit
18,189,834,306,985,480
31.233379
141
0.658655
false
browseinfo/odoo_saas3_nicolas
addons/project_mrp/project_procurement.py
1
5722
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
3,890,371,232,505,141,000
52.981132
163
0.627753
false
jalaziz/django-cms-grappelli-old
cms/middleware/multilingual.py
1
6166
# -*- coding: utf-8 -*- from cms.utils.i18n import get_default_language from django.conf import settings from django.core.urlresolvers import reverse from django.middleware.locale import LocaleMiddleware from django.utils import translation import re import urllib SUPPORTED = dict(settings.CMS_LANGUAGES) HAS_LANG_PRE...
bsd-3-clause
-1,841,472,630,449,027,300
46.430769
123
0.57444
false
olivierdalang/stdm
third_party/reportlab/graphics/renderPDF.py
1
14984
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/renderPDF.py # renderPDF - draws Drawings onto a canvas __version__=''' $Id$ ''' __doc__="""Render Drawing objects within others PDFs o...
gpl-2.0
5,012,156,805,755,201,000
36.51928
118
0.545782
false
nuobit/odoo-addons
connector_sage/models/payroll_sage_payslip.py
1
1319
# Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>) # Eric Antones <eantones@nuobit.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo import api, fields, models, _ from odoo.exceptions import UserError, ValidationError class Payslip(models.Model): _inherit = 'payroll.sage.pa...
agpl-3.0
8,481,821,566,376,713,000
42.966667
115
0.620925
false
rueckstiess/jiratopic
onlineldavb/lookup_topic.py
1
1908
import sys, os, re, random, math, urllib2, time, cPickle import numpy import argparse import onlineldavb from operator import itemgetter topics_30 = [ "NETWORKING / CONNECTIONS", "HARDWARE / RESOURCES", "DRIVERS", "MMS", "?1", "JIRA", "QUERY", "REPLICATION", "REPLICATION", "STORAGE???", "NETWORKING / SETUP / LIMITS",...
apache-2.0
4,325,715,177,712,102,400
26.652174
128
0.649895
false
ericzundel/pants
tests/python/pants_test/backend/jvm/tasks/jvm_compile/base_compile_integration_test.py
1
3488
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from colle...
apache-2.0
-4,696,149,196,501,012,000
34.591837
102
0.624713
false
battlemidget/shipit
shipit/git.py
1
1605
# -*- coding: utf-8 -*- """ shipit.git ~~~~~~~~~~ Operations on git repositories. """ import os import tempfile import subprocess def get_remotes(): """ Get a list of the git remote URLs for this repository. Return a dictionary of remote names mapped to URL strings if remotes were found. Othe...
gpl-3.0
6,923,824,859,608,695,000
24.078125
84
0.611838
false
NoviceLive/unish
py/gh.py
1
2560
#!/usr/bin/env python3 from os.path import basename, splitext from logging import basicConfig, DEBUG import click from plumbum import local, FG __author__ = 'Gu Zhengxiong' __version__ = '0.1.0' PROGRAM_NAME = 'GH' PACKAGE_NAME = PROGRAM_NAME.lower() VERSION_PROMPT = ( '{version}\n\nCopyright 2015-2016 {autho...
gpl-3.0
6,983,805,230,766,400,000
24.346535
64
0.596484
false
tonnrueter/pymca_devel
PyMca/SpsDataSource.py
1
12025
#/*########################################################################## # Copyright (C) 2004-2012 European Synchrotron Radiation Facility # # This file is part of the PyMca X-ray Fluorescence Toolkit developed at # the ESRF by the Software group. # # This toolkit is free software; you can redistribute it and/or m...
gpl-2.0
4,840,702,036,057,973,000
39.762712
103
0.47526
false