repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | 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 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fabrickit/fabkit | core/agent/fabcontext.py | 1 | 1417 | # coding: utf-8
from oslo_context import context
from oslo_db.sqlalchemy import enginefacade
@enginefacade.transaction_context_provider
class RequestContext(context.RequestContext):
"""Security context and request information.
Represents the user taking a given action within the system.
"""
def __in... | mit | 3,343,320,712,878,745,000 | 39.485714 | 69 | 0.609033 | false | 4.107246 | false | false | false |
Ervii/garage-time | garage/src/python/pants/java/nailgun_executor.py | 1 | 12377 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
import hashlib
impor... | apache-2.0 | -3,231,127,891,432,210,000 | 36.966258 | 99 | 0.652501 | false | 3.842595 | false | false | false |
wateraccounting/wa | Collect/CFSR/DataAccess_CFSR.py | 1 | 8868 | # -*- coding: utf-8 -*-
"""
Authors: Tim Hessels
UNESCO-IHE 2016
Contact: t.hessels@unesco-ihe.org
Repository: https://github.com/wateraccounting/wa
Module: Collect/CFSR
"""
# General modules
import pandas as pd
import os
import numpy as np
from netCDF4 import Dataset
import re
from joblib import Parallel, del... | apache-2.0 | -7,292,135,201,422,878,000 | 41.430622 | 152 | 0.568336 | false | 3.284444 | false | false | false |
vnsofthe/odoo-dev | addons/vnsoft020/vnsoft_sale.py | 1 | 5299 | # -*- coding: utf-8 -*-
from openerp import SUPERUSER_ID
from openerp.osv import fields, osv
from openerp.tools.translate import _
import openerp.addons.decimal_precision as dp
from openerp import tools, api
import datetime
import logging
_logger = logging.getLogger(__name__)
class vnsoft_sale_order(osv.osv):
_in... | agpl-3.0 | -7,862,131,384,520,021,000 | 42.823529 | 265 | 0.578523 | false | 3.201351 | false | false | false |
vganapath/rally | rally/plugins/openstack/scenarios/neutron/utils.py | 1 | 27676 | # Copyright 2014: Intel 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 a... | apache-2.0 | -1,047,974,654,636,210,200 | 39.40292 | 96 | 0.602544 | false | 4.237636 | false | false | false |
maxikov/attfocus | 2dbluetooths/reg_bayes/test.py | 1 | 1183 | #!/usr/bin/env python
import featurebuilder
import pickle
import numpy
def load_data(filename):
src = open(filename, "r")
X, Y = eval(src.readline())
src.close()
return X, Y
def main():
print "Loading data..."
X, Y = load_data("test_set.py")
f = open("rnode.p", "rb")
rnode = pickle.load(f)
f.close()
rno... | gpl-3.0 | 2,117,757,079,533,806,000 | 24.170213 | 120 | 0.600169 | false | 2.342574 | false | false | false |
metpy/SHARPpy | sharppy/sharptab/winds.py | 1 | 12346 | ''' Wind Manipulation Routines '''
import math
from sharppy.sharptab import interp, vector
from sharppy.sharptab.constants import *
__all__ = ['mean_wind', 'mean_wind_npw', 'sr_wind', 'sr_wind_npw',
'wind_shear', 'helicity', 'max_wind', 'corfidi_mcs_motion',
'non_parcel_bunkers_motion', 'mbe_vect... | bsd-3-clause | -5,168,220,684,207,194,000 | 31.837766 | 78 | 0.542686 | false | 3.207586 | false | false | false |
jchodera/assaytools | AssayTools/pymcmodels.py | 1 | 27554 | #!/usr/bin/env python
"""
A test of pymc for ITC.
"""
#=============================================================================================
# IMPORTS
#=============================================================================================
import numpy as np
import pymc
import pint
#=================... | lgpl-2.1 | 6,993,638,575,012,122,000 | 52.921722 | 247 | 0.610329 | false | 3.307009 | false | false | false |
awainer/7539 | aplicaciones_informaticas/aplicaciones_informaticas/settings.py | 1 | 3741 | """
Django settings for aplicaciones_informaticas 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/settin... | unlicense | -2,694,471,807,426,757,600 | 26.108696 | 91 | 0.687784 | false | 3.454294 | false | false | false |
kevinpt/ripyl | ripyl/util/bitops.py | 1 | 1559 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''Bit-wise operations
'''
# Copyright © 2013 Kevin Thibedeau
# This file is part of Ripyl.
# Ripyl 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 Foundati... | lgpl-3.0 | 2,326,479,104,467,446,300 | 26.327273 | 73 | 0.633504 | false | 3.763285 | false | false | false |
onshape-public/onshape-clients | python/onshape_client/oas/models/bt_bill_of_materials_table1073_all_of.py | 1 | 5229 | # 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 | 9,176,653,983,238,201,000 | 33.401316 | 110 | 0.581373 | false | 4.339419 | true | false | false |
ndtran/l10n-switzerland | l10n_ch_account_statement_base_import/parser/base_parser.py | 1 | 4932 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# publi... | agpl-3.0 | 767,059,732,417,065,700 | 34.73913 | 79 | 0.581509 | false | 4.609346 | false | false | false |
furrykef/lltvg | sf64-audio/sf64dec.py | 1 | 7342 | #!/usr/bin/env python
# By hcs with tweaks by Kef Schecter
# Requires Python 2.7 or greater
from __future__ import division
from contextlib import contextmanager
from struct import unpack, pack
import argparse
import sys
import wave
EN_SAMPLE_RATES = (
12000, # File 0
15000, # File 1
7000, # File 2
)
... | mit | 6,820,304,517,004,862,000 | 30.110169 | 130 | 0.572732 | false | 3.548574 | false | false | false |
jocelynj/weboob | weboob/backends/aum/optim/queries_queue.py | 1 | 3223 | # -*- coding: utf-8 -*-
# Copyright(C) 2010 Romain Bignon
#
# 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, version 3 of the License.
#
# This program is distributed in the hope that it will b... | gpl-3.0 | -6,295,994,476,438,822,000 | 30.910891 | 81 | 0.576171 | false | 4.403005 | false | false | false |
lydiadwyer/sheparddb | data/website/modules/Excavations/controller.py | 1 | 6315 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""The Controller class for Excavations."""
import re
from flask import Blueprint, render_template, redirect, url_for, current_app, \
request, abort
from modules.Shared.database import db
from modules.Countries.model import Country
from modules.Regions.model import Region
... | apache-2.0 | -7,819,131,023,306,929,000 | 35.293103 | 112 | 0.603325 | false | 3.799639 | false | false | false |
kdart/pycopia | process/pycopia/netcat.py | 1 | 2424 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# 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
... | apache-2.0 | -2,170,018,751,590,166,000 | 30.894737 | 91 | 0.690182 | false | 3.482759 | false | false | false |
gdw2/zim | zim/plugins/scoreeditor.py | 1 | 4552 | # -*- coding: utf-8 -*-
#
# scoreeditor.py
#
# This is a plugin for Zim, which allows to insert music score in zim using
# GNU Lilypond.
#
#
# Author: Shoban Preeth <shoban.preeth@gmail.com>
# Date: 2012-07-05
# Copyright (c) 2012, released under the GNU GPL v2 or higher
#
#
import glob
from zim.plugins.base.imagegen... | gpl-2.0 | 8,523,769,673,876,917,000 | 28.751634 | 128 | 0.690026 | false | 3.137147 | false | false | false |
tommybobbins/Raspi_433 | Python/quick_433.py | 1 | 2225 | #!/usr/bin/python
import time
# Written tng@chegwin.org 3-Jul-2014
# Python runs slower than C, so 18.9 factor below becomes 16.9 (microseconds)
sample_length=15.6/1000000.0
# Setup Pin 18 as output (Pin 12 in Pi numbering)
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)
#Calculate our on/offs ... | gpl-2.0 | 6,544,374,671,845,782,000 | 27.164557 | 77 | 0.636404 | false | 3.407351 | false | false | false |
Murdius/GW2Snapshot | app/views.py | 1 | 1917 | import urllib
from flask import render_template, request, session
from flask_restful import Resource
from app import app, api
from bank import get_bank
from inventory import *
from material import *
from sharedInventory import get_shared_inventory
from wallet import *
@app.route('/')
@app.route('/index')
def index(... | gpl-3.0 | -8,054,037,269,258,757,000 | 32.051724 | 116 | 0.643192 | false | 4.01046 | false | false | false |
lefnire/tensorforce | tensorforce/models/dpg_target_model.py | 1 | 14627 | # Copyright 2017 reinforce.io. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -3,073,976,565,068,862,000 | 38.005333 | 134 | 0.636699 | false | 4.097199 | false | false | false |
hetica/webeni | main/views.py | 1 | 2128 | # -*- coding: utf-8 -*-
from django.shortcuts import render
from django.utils.encoding import smart_unicode
import sys, os, locale
from datetime import datetime, timedelta
from main.forms import StagiaireForms
# Create your views here.
def home(request):
# CISCO
# Ajouter au path
_path = os.path.dirname(os.path... | lgpl-3.0 | 605,315,141,658,940,400 | 29.242857 | 77 | 0.698158 | false | 2.659548 | false | false | false |
andela-mfalade/python-pandas-csv-records-analysis | scripts/processor.py | 1 | 5798 | """Initiate file analysis.
This module is used to find the discrepancies between two given files
"""
import argparse
import csv
import logging
import pandas as pd
logger = logging.getLogger(__file__)
logging.basicConfig(level=logging.DEBUG)
mathching_records_path = 'matching_records.csv'
non_mathching_records_path... | mit | 7,077,057,940,891,033,000 | 33.307692 | 79 | 0.64505 | false | 3.769831 | false | false | false |
kadircet/CENG | 783/HW3/cs231n/classifiers/rnn.py | 1 | 14153 | import numpy as np
from cs231n.layers import *
from cs231n.rnn_layers import *
class CaptioningRNN(object):
"""
A CaptioningRNN produces captions from image features using a recurrent
neural network.
The RNN receives input vectors of size D, has a vocab size of V, works on
sequences of length T, has an RN... | gpl-3.0 | 8,735,421,741,760,482,000 | 44.073248 | 94 | 0.578817 | false | 3.662785 | false | false | false |
sendwithus/sendwithus_python | setup.py | 1 | 1233 | from distutils.core import setup
from setuptools import find_packages
from io import open
with open('README.md', encoding="utf-8") as fp:
long_description = fp.read()
setup(
name='sendwithus',
version='5.2.2',
author='sendwithus',
author_email='us@sendwithus.com',
packages=find_packages(),
... | apache-2.0 | -5,195,938,863,591,986,000 | 28.357143 | 61 | 0.595296 | false | 3.829193 | false | false | false |
google-research/realworldrl_suite | examples/run_ppo.py | 1 | 3367 | # coding=utf-8
# Copyright 2020 The Real-World RL Suite 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 appl... | apache-2.0 | 3,891,268,748,940,706,000 | 32.67 | 78 | 0.70597 | false | 3.380522 | false | false | false |
CSD-Public/stonix | src/tests/rules/unit_tests/zzzTestRuleDisableInteractiveStartup.py | 1 | 4581 | #!/usr/bin/env python3
###############################################################################
# #
# Copyright 2019. Triad National Security, LLC. All rights reserved. #
# This program was produced under U.S. Government contrac... | gpl-2.0 | 656,587,483,772,864,600 | 38.834783 | 90 | 0.577385 | false | 4.594784 | true | false | false |
codefisher/web_games | million/views.py | 1 | 5027 | import random
from django.shortcuts import render, get_object_or_404, redirect
from django.urls import reverse
from .models import Game, Question
# Create your views here.
def index(request):
games = Game.objects.all()
return render(request, "million/index.html", {
"games": games,
})
def game(requ... | mit | -4,417,307,272,275,409,400 | 42.344828 | 155 | 0.587229 | false | 3.96764 | false | false | false |
txenoo/django-radio | tasks/utils.py | 1 | 2468 | import tempfile
from contextlib import contextmanager
from invoke import UnexpectedExit
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
HOME_DIR = os.path.expanduser('~')
def run_ignoring_failure(method, command):
try:
method(command)
except UnexpectedExit:
... | gpl-3.0 | 752,847,435,054,799,200 | 26.741573 | 112 | 0.638574 | false | 3.618768 | false | false | false |
slabanja/ase | ase/cluster/factory.py | 1 | 6685 | import numpy as np
from ase import Atoms
from ase.data import atomic_numbers
from ase.lattice.spacegroup import Spacegroup
from ase.cluster.base import ClusterBase
from ase.cluster.cluster import Cluster
class ClusterFactory(ClusterBase):
directions = [[1, 0, 0],
[0, 1, 0],
[0,... | gpl-2.0 | -6,473,529,649,598,540,000 | 33.458763 | 86 | 0.532835 | false | 3.505506 | false | false | false |
pllim/ginga | ginga/rv/plugins/Preferences.py | 1 | 63607 | # This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
"""
Make changes to channel settings graphically in the UI.
**Plugin Type: Local**
``Preferences`` is a local plugin, which means it is associated with a
channel. An instance can be opened for each channel.
*... | bsd-3-clause | -5,765,819,112,308,043,000 | 37.998774 | 108 | 0.615876 | false | 3.58208 | false | false | false |
qedi-r/home-assistant | homeassistant/components/opentherm_gw/sensor.py | 1 | 2793 | """Support for OpenTherm Gateway sensors."""
import logging
from homeassistant.components.sensor import ENTITY_ID_FORMAT
from homeassistant.const import CONF_ID
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import Entity,... | apache-2.0 | -911,933,210,000,291,800 | 30.033333 | 88 | 0.621554 | false | 4.095308 | false | false | false |
ethereum/pyrlp | tests/test_benchmark.py | 1 | 2832 | from itertools import repeat, chain
import sys
import pytest
import rlp
from rlp.sedes import binary, CountableList
from rlp.exceptions import DecodingError, DeserializationError
try:
import pytest_benchmark # noqa: F401
except ImportError:
do_benchmark = False
else:
do_benchmark = True
# speed up setu... | mit | 7,233,898,538,945,098,000 | 27.039604 | 96 | 0.607698 | false | 3.557789 | true | false | false |
sqall01/lightweight-push | lightweight_push.py | 1 | 11821 | #!/usr/bin/python
# written by sqall
# twitter: https://twitter.com/sqall01
# blog: https://h4des.org
# github: https://github.com/sqall01
#
# Licensed under the MIT License.
import time
import logging
import optparse
import sys
from lightweightpush import LightweightPush, ErrorCodes
################ GLOBAL CONFIGUR... | mit | -2,377,226,884,374,902,000 | 32.585227 | 79 | 0.565096 | false | 4.233883 | true | false | false |
krahman/BuildingMachineLearningSystemsWithPython | ch02/seeds_knn.py | 1 | 1114 | # This code is supporting material for the book
# Building Machine Learning Systems with Python
# by Willi Richert and Luis Pedro Coelho
# published by PACKT Publishing
#
# It is made available under the MIT License
from load import load_dataset
import numpy as np
from knn import learn_model, apply_model, accuracy
fe... | mit | -4,197,973,750,697,204,000 | 29.944444 | 80 | 0.701077 | false | 3.664474 | false | false | false |
minsis/hashgen | libs/hashinglib.py | 1 | 1157 | import hashlib
def read_file(file_path, hashed_file):
with open(file_path, "rb") as open_file:
read_byte = open_file.read(1048576)
while read_byte:
hashed_file.update(read_byte)
read_byte = open_file.read(1048576)
return hashed_file.hexdigest()
def run_hash(file_path, ... | gpl-3.0 | 4,963,185,690,612,316,000 | 25.906977 | 54 | 0.638721 | false | 3.353623 | false | false | false |
rahlk/CSC579__Computer_Performance_Modeling | simulation/proj2/Utils/SimUtil.py | 1 | 5781 | from __future__ import print_function
from __future__ import division
from RndUtil import Random
from pdb import set_trace
from MscUtil import Params, Customer
rand = Random()
rand.set_seed(seed_val=1729)
"""
Why 1729?
Well, it is a very interesting number.
It is the smallest number expressible as the sum of two posi... | mit | -1,030,139,186,165,231,200 | 29.75 | 74 | 0.53278 | false | 3.698656 | false | false | false |
pybquillast/xkAddonIDE | toRecycle/CodigoEncodedURL.py | 1 | 16126 | '''
Created on 13/07/2014
@author: Alex Montes Barrios
'''
import math
class gledajfilmDecrypter:
def __init__(self, param1, param2):
_loc3_ = False;
_loc4_ = True;
self.Rcon = [1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145];
... | gpl-3.0 | 5,913,846,231,245,662,000 | 35.401806 | 943 | 0.481024 | false | 2.692603 | false | false | false |
envoyproxy/envoy | tools/code_format/header_order.py | 1 | 4254 | #!/usr/bin/env python3
# Enforce header order in a given file. This will only reorder in the first sequence of contiguous
# #include statements, so it will not play well with #ifdef.
#
# This attempts to enforce the guidelines at
# https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes
# with so... | apache-2.0 | 2,439,975,568,415,147,500 | 33.868852 | 100 | 0.62976 | false | 3.986879 | false | false | false |
CityPulse/CP_Resourcemanagement | wrapper_dev/deploy_mgt.py | 1 | 4726 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
import os, curses, curses.ascii, subprocess
import glob
from time import sleep
class Wrapper(object):
deploy_dir = os.path.join("..", "virtualisation", "autodeploy")
def __init__(self, deploy_json):
self.dir = os.path.dirname(deploy_json)
self.... | mit | -4,204,159,071,210,391,000 | 28.911392 | 110 | 0.569615 | false | 3.404899 | false | false | false |
mitodl/open-discussions | course_catalog/etl/mitpe.py | 1 | 6740 | """MIT Professional course catalog ETL"""
import logging
import re
from datetime import datetime
from decimal import Decimal
from urllib.parse import urljoin
import requests
from bs4 import BeautifulSoup as bs
from django.conf import settings
from course_catalog.constants import OfferedBy, PlatformType, mitpe_edx_map... | bsd-3-clause | 2,551,223,076,734,716,400 | 28.69163 | 87 | 0.593472 | false | 4.009518 | false | false | false |
lotan/rhythmbox-ampache | AmpacheConfigDialog.py | 1 | 2578 | # vim: expandtab shiftwidth=8 softtabstop=8 tabstop=8
#
# (c) 2010
# envyseapets@gmail.com
# grindlay@gmail.com
# langdalepl@gmail.com
# massimo.mund@googlemail.com
# bethebunny@gmail.com,
# 2012-2015 lotan_rm@gmx.de
#
# This file is part of the Rhythmbox Ampache plugin.
#
# The Rhythmbox ... | gpl-2.0 | -6,233,782,445,711,724,000 | 39.28125 | 84 | 0.65322 | false | 3.688126 | true | false | false |
mvj3/leetcode | 206-reverse-linked-list.py | 1 | 1626 | """
Question:
Reverse Linked List
Reverse a singly linked list.
click to show more hints.
Hint:
A linked list can be reversed either iteratively or recursively. Could you implement both?
Performance:
1. Total Accepted: 48424 Total Submissions: 141893 Difficulty: Easy
2. Your runtime beat... | mit | -8,271,683,383,833,628,000 | 21.273973 | 94 | 0.630381 | false | 3.394572 | false | false | false |
JConwayAWT/PGSS14CC | lib/python/multimetallics/ase/io/castep.py | 3 | 23945 | # -*- coding: utf-8 -*-
"""This module defines I/O routines with CASTEP files.
The key idea is that all function accept or return atoms objects.
CASTEP specific parameters will be returned through the <atoms>.calc
attribute.
"""
from numpy import sqrt, radians, sin, cos, matrix, array, cross, float32, dot
import ase
... | gpl-2.0 | 6,714,702,585,008,503,000 | 39.108878 | 79 | 0.515181 | false | 4.08827 | false | false | false |
ijon/elliptics | bindings/python/routes.py | 1 | 2414 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# =============================================================================
# 2013+ Copyright (c) Kirill Smorodinnikov <shaitkir@gmail.com>
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Gener... | lgpl-3.0 | 527,302,113,074,154,000 | 37.31746 | 130 | 0.634217 | false | 3.93801 | false | false | false |
aonotas/chainer | chainer/functions/util/forget.py | 1 | 4646 | from chainer.backends import cuda
from chainer import function
from chainer import variable
class _DummyFunction(function.Function):
def __init__(self, grads):
self.grads = grads
def forward(self, inputs):
xp = cuda.get_array_module(*inputs)
return xp.array(0),
def backward(self... | mit | -4,284,658,726,408,715,300 | 34.465649 | 79 | 0.611709 | false | 4.266299 | false | false | false |
MrReN/django-oscar | oscar/apps/dashboard/vouchers/forms.py | 1 | 2964 | from django import forms
from oscar.core.loading import get_model
from django.utils.translation import ugettext_lazy as _
Voucher = get_model('voucher', 'Voucher')
Benefit = get_model('offer', 'Benefit')
Range = get_model('offer', 'Range')
class VoucherForm(forms.Form):
"""
A specialised form for creating a ... | bsd-3-clause | 6,354,596,630,148,334,000 | 34.710843 | 78 | 0.586032 | false | 4.145455 | false | false | false |
arnavd96/Cinemiezer | myvenv/lib/python3.4/site-packages/music21/alpha/trecento/findTrecentoFragments.py | 1 | 11333 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''Runs a series of tests against the database to see if any of the following unidentified fragments are in there...'''
from music21 import metadata
from music21 import interval
from music21 import note
from music21 import stream
from music21.alpha.trecento import cadencebo... | mit | 7,958,343,941,442,294,000 | 41.445693 | 140 | 0.598518 | false | 3.327363 | true | false | false |
ksmit799/Toontown-Source | toontown/coghq/DistributedInGameEditor.py | 1 | 29740 | from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from direct.showbase.PythonUtil import lineInfo, Functor
from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedObject
from otp.level import Level
from otp.level import LevelConstants
from otp.level impo... | mit | -6,602,040,067,348,941,000 | 37.374194 | 341 | 0.618258 | false | 3.983391 | false | false | false |
larsks/cloud-init-patches | cloudinit/config/cc_rh_subscription.py | 1 | 15746 | # vi: ts=4 expandtab
#
# Copyright (C) 2015 Red Hat, Inc.
#
# Author: Brent Baude <bbaude@redhat.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3, as
# published by the Free Software Foundation.
#
# This prog... | gpl-3.0 | 259,758,934,035,097,340 | 37.311436 | 79 | 0.535247 | false | 4.324636 | false | false | false |
gatkin/declxml | tests/test_text_encoding.py | 1 | 2177 | # -*- coding: utf-8 -*-
"""Tests handling of text encoding"""
import os
import pytest
import declxml as xml
_PROCESSOR = xml.dictionary('root', [
xml.string('value')
])
_VALUE = {
'value': u'Hello, 世界!',
}
_XML_STRING = u"""<root><value>Hello, 世界!</value></root>"""
_XML_STRING_INDENTED = u"""<?xml v... | mit | -40,513,747,953,449,440 | 22.791209 | 94 | 0.655889 | false | 3.146802 | true | false | false |
SneakersInc/sniffmypacketsv2 | src/sniffmypacketsv2/transforms/pcap-dns-domain.py | 1 | 3064 | #!/usr/bin/env python
import datetime
from common.dbconnect import mongo_connect, find_session
from common.hashmethods import *
import tldextract
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
from collections import OrderedDict
from common.entities import pcapFile
fr... | apache-2.0 | -8,672,177,850,255,200,000 | 30.916667 | 125 | 0.548956 | false | 3.844417 | false | false | false |
warszawajug/warsjawa2014 | app/buildsite.py | 1 | 1997 | # -*- coding: utf-8 -*-
import jinja2
import sys
import os
import shutil
import contents
import json
absolute_path = os.path.dirname(os.path.abspath(__file__))
reload(sys)
sys.setdefaultencoding("utf-8")
absolute_template_path = absolute_path + '/templates'
absolute_output_path = absolute_path + '/output'
print('... | mit | 6,303,169,827,133,049,000 | 32.847458 | 132 | 0.671007 | false | 3.350671 | false | false | false |
ittailup/scrape4jobs | scrape4jobs/spiders/resumator_spider.py | 1 | 1539 | from scrapy.spider import Spider
from scrapy import signals
from scrapy.selector import Selector
import logging
import csv
from careerpagescrapers.items import Startup, StartupJob
from scrapy.log import ScrapyFileLogObserver
from scrapy.xlib.pydispatch import dispatcher
from scrapy import log
logfile = open('testlog.l... | mit | -3,061,203,833,420,952,000 | 34 | 111 | 0.625081 | false | 3.857143 | false | false | false |
mitodl/bootcamp-ecommerce | main/urls.py | 1 | 3638 | """
URLs for bootcamp
"""
from django.conf import settings
from django.conf.urls import url
from django.conf.urls.static import static
from django.urls import re_path, include, path
from django.contrib import admin
from django.contrib.auth import views as auth_views
from wagtail.admin import urls as wagtailadmin_urls
... | bsd-3-clause | 4,073,633,794,591,131,000 | 39.876404 | 121 | 0.598406 | false | 3.667339 | false | false | false |
foobarbazblarg/stayclean | stayclean-2016-april/display-final-after-month-is-over.py | 1 | 2952 | #!/usr/bin/python
from participantCollection import ParticipantCollection
import re
import datetime
import pyperclip
# Edit Me!
# This script gets run on the first day of the following month, and that month's URL is
# what goes here. E.g. If this directory is the directory for February, this script gets
# run on Marc... | mit | -6,114,059,128,548,899,000 | 43.727273 | 199 | 0.680556 | false | 3.393103 | false | false | false |
mbinette91/ConstructionLCA | webapp.py | 1 | 7974 | import os
import threading
import urlparse
import time
from SimpleHTTPServer import SimpleHTTPRequestHandler
from ModelBuilder import ModelBuilder
import pickle
import sqlite3
import json
db = None;
def GetUniqueProjectId():
global db
filename = "../temp.db"
if not db:
db = {'last_project_id': 0}
if os.path.is... | gpl-2.0 | 1,653,101,591,102,240,800 | 27.180212 | 186 | 0.656132 | false | 2.976484 | false | false | false |
maxhutch/mapcombine | examples/word_count/word_count.py | 1 | 1274 | #!/usr/bin/env python3
from argparse import ArgumentParser
from mapcombine import outer_process
parser = ArgumentParser(description='MapCombine example')
parser.add_argument('--mapreduce', default='MapReduce',
help="Module that implements map_ and reduce_")
parser.add_argument('--MR_init', default=... | mit | -5,723,069,289,503,960,000 | 40.096774 | 74 | 0.620094 | false | 4.018927 | false | false | false |
RobinQuetin/CAIRIS-web | cairis/cairis/InternalDocumentDialog.py | 1 | 3183 | # 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... | apache-2.0 | 5,694,523,722,869,602,000 | 36.892857 | 163 | 0.727301 | false | 3.67128 | false | false | false |
stackmagic/repod | repod.py | 1 | 4681 | #!/usr/bin/env python
# -*- coding: utf_8 -*-
import eyed3
import os
import sqlite3 as sl
import shutil
eyed3.require("0.7")
pod = '/media/ipod-backup'
dst = '/media/ipod-music-export'
dbf = '%s/iTunes_Control/iTunes/MediaLibrary.sqlitedb' % pod
print '>>> using database file %s' % dbf
con = sl.connect(dbf)
cur = ... | apache-2.0 | -4,830,636,996,931,379,000 | 25.150838 | 151 | 0.618244 | false | 2.735827 | false | false | false |
elthariel/dff | testsuite/dffunittest.py | 1 | 6113 | #!/usr/bin/python
# DFF -- An Open Source Digital Forensics Framework
# Copyright (C) 2009-2010 ArxSys
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2. See the LICENSE file
# at the top of the source tree.
#
# See http://www.digital-forensic.org for more inf... | gpl-2.0 | 3,109,872,528,209,225,700 | 30.838542 | 101 | 0.560281 | false | 3.936252 | true | false | false |
picrust/picrust | scripts/start_parallel_picrust_jobs_sge.py | 1 | 3682 | #!/usr/bin/env python
"""A simple qsub based cluster submission script for SGE."""
__author__ = "Jens Reeder"
__copyright__ = "Copyright 2011-2013, The PICRUSt Project"
__credits__ = ["Jens Reeder",
"Rob Knight",
"Greg Caporaso",
"Morgan Langille"]
__license__ = "GPL"
__... | gpl-3.0 | -1,057,737,128,476,216,400 | 37.354167 | 156 | 0.614883 | false | 3.670987 | false | false | false |
mattcieslak/DSI2 | dsi2/ui/ltpa_result.py | 1 | 9331 | #!/usr/bin/env python
from traits.api import HasTraits, Instance, Array, Bool, Dict, \
on_trait_change, Delegate, List, Color, Any, Instance, Int, File, \
Button, Enum, Str, DelegatesTo, Property, CFloat,Range
from traitsui.api import View, Item, HGroup, VGroup, \
Group, Handler, HSplit, VSplit, RangeEd... | gpl-3.0 | 3,758,971,186,263,892,500 | 32.444444 | 102 | 0.609152 | false | 3.723464 | false | false | false |
JMJAC/Rango | tango_project/rango/models.py | 1 | 1073 | from django.db import models
from django.template.defaultfilters import slugify
from django.contrib.auth.models import User
class Category(models.Model):
name = models.CharField(max_length=128, unique=True)
likes = models.IntegerField(default=0)
views = models.IntegerField(default=0)
slug = models.Slu... | apache-2.0 | 1,648,244,947,292,942,800 | 26.512821 | 71 | 0.684063 | false | 3.832143 | false | false | false |
jazzband/site | migrations/versions/17164a7d1c2e_.py | 1 | 3712 | """
Revision ID: 17164a7d1c2e
Revises: cc0e3906ecfb
Create Date: 2017-09-28 19:53:27.500788
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "17164a7d1c2e"
down_revision = "cc0e3906ecfb"
def upgrade():
op.create_tab... | mit | -6,045,601,515,669,761,000 | 38.489362 | 88 | 0.626886 | false | 3.386861 | false | false | false |
mattsmart/biomodels | oncogenesis_dynamics/firstpassage.py | 1 | 15435 | import matplotlib.pyplot as plt
import numpy as np
import time
from os import sep
from multiprocessing import Pool, cpu_count
from constants import OUTPUT_DIR, PARAMS_ID, PARAMS_ID_INV, COLOURS_DARK_BLUE
from data_io import read_varying_mean_sd_fpt_and_params, collect_fpt_mean_stats_and_params, read_fpt_and_params,\
... | mit | -5,525,200,517,402,506,000 | 43.226361 | 156 | 0.626239 | false | 2.971698 | false | false | false |
datacommonsorg/website | server/routes/api/browser.py | 1 | 6125 | # 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 agreed to in writing, ... | apache-2.0 | 7,515,950,195,523,418,000 | 36.127273 | 81 | 0.655184 | false | 3.658901 | false | false | false |
simgunz/anki | pylib/anki/importing/anki2.py | 1 | 17394 | # Copyright: Ankitects Pty Ltd and contributors
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import os
import unicodedata
from typing import Any, Dict, List, Optional, Tuple
from anki.collection import Collection
from anki.consts import *
from anki.decks import DeckManager
from anki.... | agpl-3.0 | 5,463,884,255,709,971,000 | 35.851695 | 88 | 0.504772 | false | 4.018018 | false | false | false |
kurli/blink-crosswalk | Tools/Scripts/webkitpy/layout_tests/port/mac.py | 1 | 4978 | # Copyright (C) 2010 Google 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause | 7,432,131,316,079,868,000 | 40.831933 | 135 | 0.688027 | false | 3.870918 | true | false | false |
conejoninja/xbmc-seriesly | servers/ovfile.py | 1 | 3968 | # -*- coding: iso-8859-1 -*-
#------------------------------------------------------------
# seriesly - XBMC Plugin
# Conector para ovfile
# http://blog.tvalacarta.info/plugin-xbmc/seriesly/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
from core import scra... | gpl-3.0 | 6,179,388,091,801,861,000 | 31.268293 | 91 | 0.579889 | false | 3.239184 | false | false | false |
nesl/mercury | Services/Elevation/ElevationService.py | 1 | 9994 |
# --- IMPORTS ---
import simplejson
import numpy as np
import os
import sys
import traceback
import time
try:
import urllib.parse as urllibParse
except ImportError:
import urllib as urllibParse
try:
import urllib.request as urllibRequest
except ImportError:
import urllib as urllibRequest
# Before using th... | gpl-2.0 | -7,728,116,637,641,564,000 | 36.856061 | 138 | 0.641585 | false | 3.430827 | false | false | false |
OpenNFT/OpenNFT | opennft/config.py | 1 | 3927 | # -*- coding: utf-8 -*-
"""
__________________________________________________________________________
Copyright (C) 2016-2021 OpenNFT.org
"""
import os
import pyqtgraph as pg
LOG_LEVEL = 'DEBUG'
ROOT_PATH = os.path.abspath(os.path.dirname(__file__))
UI_PATH = os.path.join(ROOT_PATH, 'ui')
PLUGIN_PATH = os.path.... | gpl-3.0 | 4,657,368,545,170,993,000 | 25.533784 | 81 | 0.644512 | false | 2.621495 | false | false | false |
soylentdeen/Graffity | src/Vibrations/VibrationExplorer.py | 1 | 5531 | import sys
sys.path.append('../')
import numpy
import Graffity
import CIAO_DatabaseTools
import astropy.time as aptime
from matplotlib import pyplot
import colorsys
def getFreqs():
while True:
retval = []
enteredText = raw_input("Enter a comma separated list of frequencies: ")
try:
... | mit | -2,884,065,082,758,088,000 | 32.72561 | 111 | 0.578557 | false | 2.855447 | false | false | false |
rbreitenmoser/snapcraft | snapcraft/plugins/catkin.py | 1 | 19520 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright © 2015 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hop... | gpl-3.0 | -2,229,454,867,091,539,000 | 39.412008 | 79 | 0.587223 | false | 4.19583 | false | false | false |
kgblll/libresoft-gymkhana | social/layers/InternalLayer.py | 2 | 7302 | #!/usr/bin/env python
# Copyright (C) 2009-2010 GSyC/LibreSoft, Universidad Rey Juan Carlos
#
# 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... | gpl-2.0 | -6,436,497,854,317,555,000 | 28.808163 | 132 | 0.667351 | false | 3.343407 | false | false | false |
BayanGroup/sentry | tests/sentry/api/endpoints/test_team_details.py | 1 | 3125 | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from mock import patch
from sentry.models import (
OrganizationMemberType, Team, TeamStatus
)
from sentry.testutils import APITestCase
class TeamDetailsTest(APITestCase):
def test_simple(self):
team = self.team # fo... | bsd-3-clause | 692,691,084,294,545,800 | 29.637255 | 76 | 0.60032 | false | 3.886816 | true | false | false |
irfancharania/plugin.video.paktvforum | resources/lib/sites/desironak.py | 1 | 4266 | from resources.lib.abc_base import BaseForum
from BeautifulSoup import BeautifulSoup
import resources.lib.util as util
import HTMLParser
import resources.lib.structure as s
import resources.lib.hosts as hosts
class DesiRonakApi(BaseForum):
short_name = 'desironak'
long_name = 'Desi Ronak Forum'
local_thum... | mit | 3,961,953,202,654,678,000 | 34.256198 | 79 | 0.537271 | false | 3.383029 | false | false | false |
liosha2007/temporary-groupdocs-python-sdk | examples/api-samples/inc_samples/sample11.py | 1 | 5359 | ### This sample will show how programmatically create and post an annotation into document. How to delete the annotation
# Import of classes from libraries
from pyramid.renderers import render_to_response
from groupdocs.ApiClient import ApiClient
from groupdocs.AntApi import AntApi
from groupdocs.GroupDocsRequestSign... | apache-2.0 | 6,570,965,989,482,067,000 | 37.561151 | 183 | 0.564284 | false | 4.062926 | false | false | false |
Krozark/Kraggne | Kraggne/forms.py | 1 | 4491 | from django import forms
from django.forms import ValidationError
from django.core.validators import URLValidator
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext_lazy as _
import re
from Kraggne.utils import MakePattern, clean_url
from Kraggne.models import MenuItem, F... | bsd-2-clause | -4,365,600,810,974,340,000 | 30.851064 | 113 | 0.513471 | false | 4.082727 | false | false | false |
D4wN/brickv | src/brickv/plugin_system/plugins/red/program_page_files.py | 1 | 6157 | # -*- coding: utf-8 -*-
"""
RED Plugin
Copyright (C) 2014-2015 Matthias Bolte <matthias@tinkerforge.com>
program_page_files.py: Program Wizard Files Page
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 Foundati... | gpl-2.0 | 6,638,070,216,197,529,000 | 33.205556 | 110 | 0.655189 | false | 3.974822 | false | false | false |
agx/git-buildpackage | gbp/rpm/policy.py | 1 | 8077 | # vim: set fileencoding=utf-8 :
#
# (C) 2012 Intel Corporation <markus.lehtonen@linux.intel.com>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# ... | gpl-2.0 | 2,347,570,612,950,948,400 | 39.37 | 101 | 0.544216 | false | 3.936616 | false | false | false |
bootchk/pensool | source/gui/manager/drop.py | 1 | 3475 | '''
Coordinates drag and drop, which crosses controls.
!!! Note that all event coords are in the device coord system.
TODO not a class, just a singleton module
'''
'''
Copyright 2010, 2011 Lloyd Konneker
This file is part of Pensool.
Pensool is free software: you can redistribute it and/or modify
it under the terms... | gpl-3.0 | -2,821,194,204,128,033,300 | 25.730769 | 81 | 0.675396 | false | 3.878348 | false | false | false |
jeremiahyan/odoo | odoo/addons/base/models/res_partner.py | 1 | 50395 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import collections
import datetime
import hashlib
import pytz
import threading
import re
import requests
from lxml import etree
from random import randint
from werkzeug import urls
from odoo import api, f... | gpl-3.0 | 7,864,971,327,338,684,000 | 47.13085 | 221 | 0.600857 | false | 4.035314 | false | false | false |
jquacinella/IS607_Project | PyDTA/StataTools.py | 2 | 6749 | from struct import unpack, calcsize
from StataTypes import MissingValue, Variable
class Reader(object):
""".dta file reader"""
_header = {}
_data_location = 0
_col_sizes = ()
_has_string_data = False
_missing_values = False
TYPE_MAP = range(251)+list('bhlfd')
MISSING_VALUES = { 'b': (... | gpl-2.0 | 2,711,416,267,411,400,700 | 38.467836 | 158 | 0.56275 | false | 3.698082 | false | false | false |
EducationalTestingService/discourse-parsing | tests/test_discourseparsing.py | 1 | 3613 | import json
from pathlib import Path
from nltk.tree import ParentedTree
from nose import SkipTest
from nose.tools import eq_
from rstfinder.discourse_parsing import Parser
from rstfinder.extract_actions_from_trees import extract_parse_actions
MY_DIR = Path(__file__).parent
def test_extract_parse_actions():
"""C... | mit | 8,537,003,433,347,433,000 | 39.144444 | 83 | 0.56961 | false | 4.186559 | true | false | false |
google/eclipse2017 | scripts/update_user_role.py | 1 | 2497 | #
# Copyright 2016 Google 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 writing... | apache-2.0 | -4,154,341,491,981,669,400 | 34.169014 | 99 | 0.603925 | false | 3.982456 | false | false | false |
eoinmurray/icarus | Experiments/power_dep.py | 1 | 1341 |
import os,sys
parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0,parentdir)
import numpy as np
import matplotlib.pyplot as plt
from constants import Constants
import Icarus.Experiment as Experiment
if __name__ == "__main__":
"""
Runs power dependance.
"""
constants = ... | mit | -3,434,278,483,010,190,000 | 26.387755 | 100 | 0.682327 | false | 2.573896 | false | false | false |
masterkeywikz/seq2graph | src/theanets-0.6.1/theanets/recurrent.py | 1 | 21139 | # -*- coding: utf-8 -*-
'''This module contains recurrent network structures.'''
import collections
import numpy as np
import re
import sys
import theano.tensor as TT
import theano
import pdb
from . import feedforward
def batches(samples, labels=None, steps=100, batch_size=64, rng=None):
'''Return a callable t... | mit | -8,494,256,225,794,350,000 | 38.364991 | 146 | 0.587492 | false | 4.191751 | false | false | false |
bremoran/repo_reorg | repo_reorg.py | 1 | 14503 | #!/usr/bin/python
# PackageLicenseDeclared: Apache-2.0
# Copyright 2015 ARM Holdings PLC
import argparse as ap
import sys
import os.path
import subprocess
import shutil
import stat
import re
#Inputs:
#Source remote
#Destination remote
#Repo name
#List of paths in form: source-path:destination-path
moduleJsonTemplate =... | apache-2.0 | -68,900,385,916,421,530 | 35.531486 | 160 | 0.596015 | false | 3.452273 | false | false | false |
plone/plone.server | src/plone.server/plone/server/exceptions.py | 1 | 1405 |
class NoPermissionToAdd(Exception):
def __init__(self, container, content_type):
self.container = container
self.content_type = content_type
def __repr__(self):
return "Not permission to add {content_type} on {path}".format(
content_type=self.content_type,
path... | bsd-2-clause | 1,564,123,247,242,981,400 | 26.038462 | 75 | 0.629893 | false | 4.323077 | false | false | false |
interrogator/topic-grammar | bus.py | 1 | 18839 | #!/usr/bin/python
def nextbus(where = 'guess', nbus = 5, walking_time = 3):
"""
tells you when the next bus is from home or to uni
where: 'h'/'u'/'guess': home, uni, or try to guess based on wifi connection name
walking_time: don't show buses less than n mins from now
nbus: show next n buses
... | mit | 1,010,715,270,895,609,900 | 38.494759 | 137 | 0.373374 | false | 2.501195 | false | false | false |
ccxt/ccxt | python/ccxt/async_support/coinfalcon.py | 1 | 15969 | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import A... | mit | 6,839,061,574,668,875,000 | 37.203349 | 126 | 0.49953 | false | 4.107253 | false | false | false |
openai/baselines | baselines/results_plotter.py | 1 | 3455 | import numpy as np
import matplotlib
matplotlib.use('TkAgg') # Can change to 'Agg' for non-interactive mode
import matplotlib.pyplot as plt
plt.rcParams['svg.fonttype'] = 'none'
from baselines.common import plot_util
X_TIMESTEPS = 'timesteps'
X_EPISODES = 'episodes'
X_WALLTIME = 'walltime_hrs'
Y_REWARD = 'reward'
Y_... | mit | -5,790,897,076,308,182,000 | 35.755319 | 144 | 0.649204 | false | 2.983592 | false | false | false |
cpsaltis/pythogram-core | src/gramcore/features/descriptors.py | 1 | 3013 | """Feature descriptors usefull in bag of features approaches.
These are applied to numpy.arrays representing images.
"""
import numpy
from skimage import feature
def hog(parameters):
"""Extracts histograms of oriented gradients.
It wraps `skimage.feature.hog`. The `visualise` and `normalise` options
ar... | mit | 1,468,025,092,347,783,700 | 38.12987 | 78 | 0.659476 | false | 4.028075 | false | false | false |
dpressel/baseline | api-examples/transformer_seq2seq_response.py | 1 | 6773 | import numpy as np
import torch
import logging
from eight_mile.utils import listify
import os
import glob
from argparse import ArgumentParser
import baseline
from transformer_utils import TiedEmbeddingsSeq2SeqModel, find_latest_checkpoint
from eight_mile.pytorch.serialize import load_transformer_seq2seq_npz
from eight_... | apache-2.0 | -3,984,396,563,534,891,500 | 45.390411 | 138 | 0.636498 | false | 3.557248 | false | false | false |
psiegl/seismic-rtm | tools/bench.py | 1 | 1887 | # Copyright 2017 - , Dr.-Ing. Patrick Siegl
# SPDX-License-Identifier: BSD-2-Clause
#!/usr/bin/python
import subprocess
import sys
import operator
import multiprocessing
import re
kernel = "seismic-rtm.elf"
def bench( kernel, iterations, variants ):
res = {}
g_cmd = "./%s --timesteps=4000 --width=2000 --height=... | bsd-2-clause | -7,103,263,442,894,822,000 | 25.957143 | 137 | 0.591415 | false | 3.033762 | false | false | false |
sparbz/nba-stats | nba_stats/nba_stats/settings/base.py | 1 | 2016 | """
Django settings for nba_stats project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
from unipath import Path
import dj_database_url
PROJECT_DIR = Path(__fi... | mit | 3,593,085,295,024,866,000 | 23 | 98 | 0.724702 | false | 3.194929 | false | false | false |
abhaystoic/barati | barati/customers/views_cluster/save_card_preferences.py | 1 | 3997 | from django.shortcuts import render
from django.template import RequestContext
from django.views.generic import View
from django.http import HttpResponse
from customers import models as m
import sys, json
from datetime import datetime,timedelta
class Save_Card_Preferences(View):
try:
def __init__(self):
... | apache-2.0 | 6,663,730,055,890,609,000 | 49.594937 | 112 | 0.590693 | false | 3.236437 | false | false | false |
Burus/fats | fats/test/test_service.py | 1 | 1710 | # Copyright (c) 2006-2008 Alexander Burtsev
# See LICENSE for details
"""FATS service tests.
@author: U{Alexander Burtsev<mailto:eburus@gmail.com>}
$Id: test_service.py 24 2008-02-18 12:22:42Z burus $
"""
#from twisted.fats.errors import AGICommandFailure, UndefinedTimeFormat, \
# AGICommandTimeout, FailureOnOp... | mit | -3,783,386,168,755,750,400 | 27.032787 | 74 | 0.71345 | false | 3.511294 | true | false | false |
thecocce/crypto-un-locker | CryptoUnLocker.py | 2 | 10737 | #!/usr/bin/env python
import struct
import os
import argparse
import shutil
import sys
from collections import namedtuple
from datetime import datetime
import csv
import re
from Crypto.Cipher import AES
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5
from Crypto.Hash import SHA
from Crypto.Util.... | mit | -2,201,770,648,502,426,400 | 35.151515 | 151 | 0.606501 | false | 3.735908 | false | false | false |
google-research/dads | lib/py_uniform_replay_buffer.py | 1 | 8796 | # Copyright 2019 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 agreed to in writing, ... | apache-2.0 | 2,854,155,421,442,714,000 | 35.65 | 79 | 0.632106 | false | 3.760581 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.