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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
vim-scripts/TeX-9 | ftplugin/tex_nine/evince_dbus.py | 1 | 5753 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of the Gedit Synctex plugin.
#
# Copyright (C) 2010 Jose Aliste <jose.aliste@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public Licence as published by the Free Software
# Found... | gpl-3.0 | 6,099,572,603,743,671,000 | 36.357143 | 105 | 0.591344 | false | 3.799868 | false | false | false |
treycucco/pxp | pxp/stdlib/math.py | 1 | 4465 | import math
from decimal import Decimal
from pxp.exception import FunctionError
from pxp.function import FunctionArg, FunctionList, InjectedFunction
from pxp.stdlib.types import number_t, boolean_t
def math_abs(resolver, value):
"""Returns the absolute value of value."""
val = resolver.resolve(value)
return va... | bsd-3-clause | -4,806,091,900,588,177,000 | 33.882813 | 135 | 0.701904 | false | 3.431975 | false | false | false |
Mzero2010/MaxZone | plugin.video.Mzero/channels/tengourl.py | 1 | 1956 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# Mzero - XBMC Plugin
# Canal para ver un vídeo conociendo su URL
# http://blog.tvalacarta.info/plugin-xbmc/Mzero/
#------------------------------------------------------------
from core import config
from core import logger
from cor... | gpl-3.0 | -6,197,162,499,388,738,000 | 35.018519 | 137 | 0.63599 | false | 3.555759 | false | false | false |
noironetworks/horizon | openstack_dashboard/dashboards/project/volume_groups/forms.py | 1 | 7723 | # 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 | 5,956,005,950,523,606,000 | 38.005051 | 79 | 0.533083 | false | 4.966559 | false | false | false |
fifengine/fifengine-demos | shooter/scripts/ships/enemies.py | 1 | 6693 | # -*- coding: utf-8 -*-
# ####################################################################
# Copyright (C) 2005-2013 by the FIFE team
# http://www.fifengine.net
# This file is part of FIFE.
#
# FIFE is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#... | lgpl-2.1 | 8,287,204,922,065,141,000 | 26.097166 | 85 | 0.676827 | false | 3.017583 | false | false | false |
NitinBhaskar/mbed | workspace_tools/tests.py | 1 | 39585 | """
mbed SDK
Copyright (c) 2011-2013 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | apache-2.0 | -1,732,097,689,878,460,400 | 36.34434 | 131 | 0.538285 | false | 2.998864 | true | false | false |
semiautomaticgit/SemiAutomaticClassificationPlugin | semiautomaticclassificationplugin.py | 1 | 86616 | # -*- coding: utf-8 -*-
'''
/**************************************************************************************************************************
SemiAutomaticClassificationPlugin
The Semi-Automatic Classification Plugin for QGIS allows for the supervised classification of remote sensing images,
provid... | gpl-3.0 | 1,716,961,368,861,842,000 | 50.911423 | 266 | 0.759837 | false | 3.157711 | false | false | false |
NicolasLM/spinach | spinach/engine.py | 1 | 10923 | from datetime import datetime, timezone
from logging import getLogger
import threading
from .task import Tasks, Batch, Schedulable
from .utils import run_forever, handle_sigterm
from .job import Job, JobStatus, advance_job_status
from .brokers.base import Broker
from .const import DEFAULT_QUEUE, DEFAULT_NAMESPACE, DEF... | bsd-2-clause | 3,673,688,660,669,416,400 | 37.734043 | 79 | 0.593244 | false | 4.452915 | false | false | false |
vhaasteren/PTMCMCSampler | PTMCMCSampler/PTMCMCSampler.py | 1 | 35363 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import scipy.stats as ss
import os
import sys
import time
from nutsjump import NUTSJump, HMCJump, MALAJump
try:
from mpi4py import MPI
except ImportError:
print 'Do not have mpi4py package.'
import nompi4py a... | mit | 9,100,587,971,638,490,000 | 33.433301 | 100 | 0.55428 | false | 3.948085 | false | false | false |
davidzyx/PythonNotes | Part I/ch04_notes.py | 1 | 2075 | # ch04_notes.py
# Chapter 4 notes taken from Automate the Boring Stuff with Python (2015).pdf
# Created by Davidzz on 7/20/2016
# List data type
primes = [2, 3, 5, 7, 11, 13, 17]
print(primes[0]) # 2
# For negative index number, start counting from the right
print(primes[-1]) # 17
print(primes[0:5]) # [2, 3, 5, 7, 11]... | gpl-3.0 | -4,305,339,258,504,948,000 | 21.074468 | 77 | 0.675181 | false | 2.751989 | false | false | false |
thachhoang/boxmover | main.py | 1 | 2715 | import json
import logging
import logging.config
import sys
import os
import pytumblr
from boxmover import delete_queue, reblog_everything, confirm, like_everything, new_oauth, unlike_everything, \
get_follow_list
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {'simple': {'... | mit | 2,587,896,771,294,788,600 | 27.578947 | 111 | 0.583425 | false | 3.539765 | false | false | false |
kgblll/libresoft-gymkhana | apps/explohyperfiction/rest/petitions.py | 1 | 4387 | # -*- coding: UTF-8 -*-
from django.http import HttpResponse, HttpResponseRedirect
from django.template.loader import get_template
from django.template import Context, RequestContext
from django.shortcuts import render_to_response
from datetime import datetime
from django.contrib.auth import authenticate, login, log... | gpl-2.0 | -5,561,933,755,589,448,000 | 47.744444 | 145 | 0.713928 | false | 3.746371 | false | false | false |
ecederstrand/exchangelib | exchangelib/recurrence.py | 1 | 13352 | import logging
from .fields import IntegerField, EnumField, EnumListField, DateOrDateTimeField, DateTimeField, EWSElementField, \
IdElementField, MONTHS, WEEK_NUMBERS, WEEKDAYS
from .properties import EWSElement, IdChangeKeyMixIn, ItemId, EWSMeta
log = logging.getLogger(__name__)
def _month_to_str(month):
r... | bsd-2-clause | -5,107,342,709,076,370,000 | 37.478386 | 116 | 0.687088 | false | 3.604752 | false | false | false |
ErinMorelli/em-media-handler | mediahandler/types/__init__.py | 1 | 7777 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is a part of EM Media Handler
# Copyright (c) 2014-2021 Erin Morelli
#
# 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 rest... | mit | 7,511,138,175,308,434,000 | 29.61811 | 84 | 0.561656 | false | 4.084559 | false | false | false |
bowen0701/algorithms_data_structures | lc0605_can_place_flowers.py | 1 | 2449 | """Leetcode 605. Can Place Flowers
Easy
URL: https://leetcode.com/problems/can-place-flowers/
Suppose you have a long flowerbed in which some of the plots are planted and some are not.
However, flowers cannot be planted in adjacent plots -
they would compete for water and both would die.
Given a flowerbed (represen... | bsd-2-clause | -3,217,385,267,934,301,700 | 25.619565 | 92 | 0.537362 | false | 3.523741 | false | false | false |
feureau/Small-Scripts | Blender/Blender config/2.91/scripts/addons/bricker_v2-2-1/functions/brick/mesh_generators/standard_brick.py | 1 | 5467 | # Copyright (C) 2020 Christopher Gearhart
# chris@bblanimation.com
# http://bblanimation.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 3 of the License, or
# (at your opt... | gpl-3.0 | -5,588,545,381,719,541,000 | 46.12931 | 205 | 0.60728 | false | 2.966359 | false | false | false |
ivan7farre/PyFreeFOAM | Foam/finiteVolume/cfdTools/compressible/compressibleCourantNo_impl.py | 1 | 2812 | ## pythonFlu - Python wrapping for OpenFOAM C++ API
## Copyright (C) 2010- Alexey Petrov
## Copyright (C) 2009-2010 Pebble Bed Modular Reactor (Pty) Limited (PBMR)
##
## 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 F... | gpl-3.0 | 3,301,216,150,076,530,700 | 34.15 | 120 | 0.599573 | false | 3.52381 | false | false | false |
gamarino/numa_shared_taxes | invoices.py | 1 | 9193 | #-*- coding: utf-8 -*-
##############################################################################
#
# NUMA Extreme Systems (www.numaes.com)
# Copyright (C) 2013
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... | agpl-3.0 | -4,234,420,390,260,595,700 | 54.047904 | 205 | 0.526923 | false | 4.074911 | false | false | false |
ronie/script.playalbum | default.py | 1 | 1774 | import sys
import xbmc, xbmcaddon
import json
ADDON = xbmcaddon.Addon()
ADDONID = ADDON.getAddonInfo('id')
ADDONVERSION = ADDON.getAddonInfo('version')
def log(txt):
if isinstance (txt,str):
txt = txt.decode("utf-8")
message = u'%s: %s' % (ADDONID, txt)
xbmc.log(msg=message.encode("utf... | gpl-2.0 | -1,628,069,564,425,146,400 | 37.565217 | 173 | 0.590192 | false | 3.279113 | false | false | false |
IKARUSSoftwareSecurity/FakeTokenConfigDecrypt | decrypt_bankersecure.py | 1 | 2652 | __author__ = 'bachmann.s & elias.t'
import base64
from Crypto.Cipher import Blowfish
import zipfile
import sys
from os.path import isdir
from os.path import exists
from os.path import join
from os.path import split
from os import listdir
from argparse import ArgumentParser
blfs = 'res/raw/blfs.key'
config = 'res/raw/... | bsd-2-clause | -7,360,807,983,732,962,000 | 31.753086 | 120 | 0.609729 | false | 3.703911 | true | false | false |
superdachs/servercontrol | servercontrol/network/migrations/0001_initial.py | 1 | 1149 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-19 14:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Interfa... | gpl-3.0 | 6,986,743,445,912,005,000 | 37.3 | 114 | 0.592689 | false | 4.319549 | false | false | false |
centrofermi/e3pipe | db/__select2__.py | 1 | 3094 | #!/usr/bin/env python
# *********************************************************************
# * Copyright (C) 2014 Luca Baldini (luca.baldini@pi.infn.it) *
# * *
# * For the license terms see the file LICENSE, distributed *
# * along ... | gpl-3.0 | -7,725,358,799,463,030,000 | 33 | 79 | 0.601487 | false | 4.023407 | false | false | false |
Charlotte-Morgan/inasafe | safe/gis/vector/clean_geometry.py | 1 | 2725 | # coding=utf-8
"""Try to make a layer valid."""
from qgis.core import QgsFeatureRequest
from safe.common.custom_logging import LOGGER
from safe.definitions.processing_steps import clean_geometry_steps
from safe.gis.sanity_check import check_layer
from safe.utilities.profiling import profile
__copyright__ = "Copyrigh... | gpl-3.0 | 244,502,894,381,175,800 | 29.277778 | 76 | 0.645138 | false | 4.231366 | false | false | false |
start-jsk/jsk_apc | jsk_apc2016_common/python/jsk_apc2016_common/rbo_segmentation/evaluate.py | 1 | 7455 | from apc_data import APCDataSet, APCSample
from probabilistic_segmentation import ProbabilisticSegmentationRF, ProbabilisticSegmentationBP
import pickle
import os
import matplotlib.pyplot as plt
import numpy as np
import copy
import rospkg
def _fast_hist(a, b, n):
k = (a >= 0) & (a < n)
hist = np.bincount(n ... | bsd-3-clause | -4,862,534,498,546,936,000 | 34.331754 | 101 | 0.548625 | false | 3.640137 | false | false | false |
proversity-org/edx-platform | openedx/features/course_experience/tests/views/test_course_home.py | 1 | 25042 | # coding=utf-8
"""
Tests for the course home page.
"""
from datetime import datetime, timedelta
import ddt
import mock
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import QueryDict
from django.utils.http import urlquote_plus
from django.utils.timezone import now
from p... | agpl-3.0 | -1,781,964,234,215,230,000 | 44.422868 | 116 | 0.68723 | false | 3.938316 | true | false | false |
mrkiwi-nz/django-helpdesk | helpdesk/migrations/0003_initial_data_import.py | 4 | 1141 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from sys import path
from django.db import models, migrations
from django.core import serializers
fixture_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../fixtures'))
fixture_filename = 'emailtemplate.json'
def deserialize_fi... | bsd-3-clause | -8,847,635,837,566,119,000 | 24.931818 | 86 | 0.695881 | false | 3.867797 | false | false | false |
thesgc/shergar | shergar/calc/migrations/0002_auto__del_field_workflowstep_depth__del_field_workflowstep_path__del_f.py | 1 | 10972 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'WorkFlowStep.depth'
db.delete_column(u'calc_workflowste... | mit | 4,968,346,890,640,987,000 | 70.253247 | 195 | 0.560882 | false | 3.673251 | false | false | false |
futurecolors/django-future-url | setup.py | 1 | 1341 | # -*- coding: utf-8 -*-
import os
import codecs
from setuptools import setup, find_packages
import django_future_url
read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read()
setup(
name="django-future-url",
version=django_future_url.__version__,
author='Vitaly Olevinsky',
author_email='olev... | mit | 1,000,879,088,271,199,900 | 32.525 | 94 | 0.619687 | false | 3.842407 | false | false | false |
kgsn1763/deep-learning-from-scratch | common/functions.py | 1 | 1171 | #!/usr/bin/env python
# coding: utf-8
import numpy as np
def identity_function(x):
return x
def step_function(x):
return np.array(x > 0, dtype=np.int)
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def sigmoid_grad(x):
return (1.0 - sigmoid(x)) * sigmoid(x)
def relu(x):
return np.maximum(0, ... | mit | 8,491,684,971,797,022,000 | 16.507937 | 68 | 0.55485 | false | 2.312369 | false | false | false |
gwillem/magento-malware-scanner | mwscan/ruleset.py | 1 | 7113 | import os
import re
import json
import logging
import hashlib
import requests
import yara
import time
from requests.exceptions import RequestException
from mwscan import settings
# For very old installs, eg CentOS:
# https://github.com/magesec/magesec/issues/60
try:
requests.packages.urllib3.disable_warnings()
exc... | gpl-3.0 | 1,615,909,693,083,476,500 | 29.397436 | 126 | 0.60059 | false | 3.7936 | false | false | false |
lex86/nnet | python/nnet.py | 1 | 5793 | import sys
from ctypes import *
import numpy as np
nnetlib = np.ctypeslib.load_library('libnnet', '../lib/')
class NNet:
def __init__(self, cfg_path):
init = nnetlib.NNet_init
self.nnet = init(cfg_path)
if self.nnet == 0:
sys.exit(-1)
c_size = c_int()
size = nn... | gpl-2.0 | 6,646,499,532,115,967,000 | 32.680233 | 76 | 0.416882 | false | 3.718228 | false | false | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/web/framework/webapp.py | 1 | 39566 | """
"""
import inspect
import os
import hashlib
import random
import socket
import string
import time
from Cookie import CookieError
from galaxy import eggs
eggs.require( "Cheetah" )
from Cheetah.Template import Template
eggs.require( "Mako" )
import mako.runtime
import mako.lookup
# pytz is used by Babel.
eggs.requir... | gpl-3.0 | 6,105,172,054,496,387,000 | 47.666667 | 186 | 0.601274 | false | 4.304395 | true | false | false |
GoogleCloudPlatform/datacatalog-connectors-rdbms | google-datacatalog-oracle-connector/system_tests/cleanup_results_test.py | 1 | 1324 | #!/usr/bin/python
#
# 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 ag... | apache-2.0 | 2,843,499,763,594,922,000 | 29.790698 | 75 | 0.714502 | false | 4.099071 | false | false | false |
hfutsuchao/Python2.6 | fromNet/pinyinDomainScan.py | 1 | 1428 | #coding:utf-8
from yuming import ifRegged
import sys
import time,random
dicType = []
dic = {}
dtFile = open('domainType','r').readlines()
for t in dtFile[1:-1]:
dicType.append(t[:-1])
#print dicType
times = [1,2,3,4]
for t in times:
dic[t] = []
totalDic = []
pinyinFile = open('pinyin','r').readlines()
fo... | gpl-2.0 | -3,893,511,307,367,741,400 | 21.666667 | 65 | 0.516106 | false | 3.104348 | false | false | false |
twdb/sonde | sonde/formats/generic.py | 1 | 6474 | """
sonde.formats.generic
~~~~~~~~~~~~~~~~~
This module implements a generic format.
The files are in .csv format and must conform to the
following guidelines
comments and metadata at top of file in the format:
# name: value
a timezone field: (UTC-?, the data must all be in one UTC of... | bsd-3-clause | -5,914,747,278,133,182,000 | 32.71875 | 83 | 0.538153 | false | 4.115702 | false | false | false |
wilkeraziz/grasp | grasp/mt/pipeline.py | 1 | 27278 | """
:Authors: - Wilker Aziz
"""
import random
import os
import itertools
import numpy as np
import grasp.ptypes as ptypes
import grasp.semiring as semiring
from grasp.loss.fast_bleu import DecodingBLEU
from grasp.mt.segment import SegmentMetaData
import grasp.mt.cdec_format as cdeclib
from grasp.mt.input import mak... | apache-2.0 | -1,688,278,262,305,269,200 | 37.097765 | 118 | 0.5507 | false | 4.148114 | false | false | false |
fernandolins/What2watch | What2Watch/settings.py | 1 | 5815 | # Django settings for What2Watch project.
import os
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
LOGIN_URL = '/'
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = ... | lgpl-3.0 | -936,482,418,237,707,900 | 31.853107 | 136 | 0.687704 | false | 3.629838 | false | false | false |
sintrb/Douban-Group-AD-Killer | datamining/classify/bayes.py | 1 | 2418 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2014-10-15
# @Author : Robin (sintrb@gmail.com)
# @Link : https://github.com/sintrb/Douban-Group-AD-Killer
# @Version : 1.0
from base import BaseClassifier, test_classifer
class BaseProbability():
def __init__(self, cls, prt):
self.cls = cls
self.prt... | gpl-2.0 | 1,136,967,823,608,875,100 | 23.742268 | 61 | 0.65125 | false | 2.580645 | false | false | false |
vmintam/flasky_older | fabfile_youtrack.py | 1 | 8441 | __author__ = 'vmintam'
from cuisine import user_ensure, dir_exists, dir_ensure, mode_sudo, dir_remove
from cuisine import user_remove, user_check, file_write, package_ensure_yum
from cuisine import package_clean_yum, package_update_yum, file_append
from fabric.api import env, hide, sudo, run
from fabric.colors import r... | mit | 8,358,021,976,100,836,000 | 28.010309 | 113 | 0.525767 | false | 3.178087 | false | false | false |
peterbrittain/asciimatics | samples/pacman.py | 1 | 18400 | #!/usr/bin/env python3
from copy import deepcopy
import sys
from asciimatics.exceptions import ResizeScreenError
from asciimatics.paths import Path
from asciimatics.renderers import StaticRenderer, ColourImageFile, FigletText
from asciimatics.scene import Scene
from asciimatics.screen import Screen
from asciimatics.ef... | apache-2.0 | 8,174,484,442,454,301,000 | 33.200743 | 100 | 0.299946 | false | 2.742585 | false | false | false |
oicr-ibc/riser | bin/run_analysis.py | 1 | 3234 | #!/usr/bin/python
import ConfigParser,os,sys
from subprocess import call
from glob import iglob
from shutil import move
from os.path import join
use_message = '''
Usage:
python run_analysis.py
'''
class Usage(Exception):
def __init__(self, msg):
self.msg = msg
def get_version():
return "1.2.0"
... | gpl-3.0 | 6,044,638,009,739,695,000 | 33.404255 | 137 | 0.579159 | false | 3.530568 | true | false | false |
ska-sa/montblanc | montblanc/tests/meqtrees/turbo-sim.py | 1 | 8704 | # -*- coding: utf-8 -*-
#% $Id$
#
#
# Copyright (C) 2002-2007
# The MeqTree Foundation &
# ASTRON (Netherlands Foundation for Research in Astronomy)
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public Lic... | gpl-2.0 | 2,129,762,275,439,893,000 | 35.41841 | 149 | 0.729779 | false | 3.005525 | false | false | false |
vthorsteinsson/tensor2tensor | tensor2tensor/utils/diet.py | 1 | 12143 | # coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | 4,098,083,250,670,264,300 | 32.637119 | 80 | 0.659722 | false | 3.659735 | false | false | false |
philwo/dbbench | selector.py | 1 | 2829 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Performs randomized SELECT queries on a test database in multiple threads.
#
# Copyright 2012 by Philipp Wollermann
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may o... | apache-2.0 | -7,106,444,881,440,432,000 | 30.433333 | 168 | 0.618947 | false | 3.84898 | false | false | false |
GoogleCloudPlatform/appengine-python-standard | src/google/appengine/ext/ndb/model.py | 1 | 130428 | #!/usr/bin/env python
#
# Copyright 2007 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -7,679,272,179,333,130,000 | 30.765222 | 82 | 0.653272 | false | 3.946265 | false | false | false |
geertj/draco2 | draco2/util/test/test_misc.py | 1 | 2420 | # vi: ts=8 sts=4 sw=4 et
#
# test_misc: test suite for draco2.util.misc
#
# This file is part of Draco2. Draco2 is free software and is made available
# under the MIT license. Consult the file "LICENSE" that is distributed
# together with this file for the exact licensing terms.
#
# Draco2 is copyright (c) 1999-2007 by... | mit | -5,645,479,705,840,652,000 | 27.470588 | 76 | 0.570661 | false | 2.847059 | true | false | false |
coopernurse/radiator | radiator/__init__.py | 1 | 19563 |
import logging
import uuid
import struct
import os
import time
import re
import types
import base64
import random
import tempfile
logger = logging.getLogger('radiator')
def start_server(reactor,
dir=None,
fsync_millis=0,
rewrite_interval_secs=300):
broker = Brok... | mit | 2,084,008,065,329,050,600 | 34.961397 | 204 | 0.543322 | false | 3.686263 | false | false | false |
sawdog/OraclePyDoc | oraclepydoc/oracleobjects/oraclecolumn.py | 1 | 1065 | class OracleColumn:
"""! \brief Oracle column represents table column object"""
def __init__(self, name, column_id, data_type, nullable, data_default, comments):
self.column_id = column_id
self.name = name
self.data_type = data_type
self.nullable = nullable
self.data_def... | gpl-2.0 | 8,176,197,300,944,973,000 | 39.961538 | 85 | 0.524883 | false | 4.294355 | false | false | false |
appleseedhq/gaffer | python/GafferUI/NumericPlugValueWidget.py | 1 | 7034 | ##########################################################################
#
# Copyright (c) 2011-2012, John Haddon. All rights reserved.
# Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted prov... | bsd-3-clause | -8,314,075,521,094,012,000 | 35.445596 | 143 | 0.702587 | false | 3.873348 | false | false | false |
ArteliaTelemac/PostTelemac | PostTelemac/PostTelemac.py | 1 | 10296 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
PostTelemac
A QGIS plugin
Post Traitment or Telemac
-------------------
begin : 2015-07-07
git sha : $Form... | gpl-3.0 | -2,736,814,625,547,561,000 | 33.901695 | 115 | 0.587801 | false | 4.230074 | false | false | false |
davy39/eric | Utilities/ClassBrowsers/idlclbr.py | 1 | 12545 | # -*- coding: utf-8 -*-
# Copyright (c) 2005 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Parse a CORBA IDL file and retrieve modules, interfaces, methods and
attributes.
Parse enough of a CORBA IDL file to recognize module, interface and method
definitions and to find out the superclasses of an interfac... | gpl-3.0 | -3,784,231,802,065,473,500 | 31.926509 | 79 | 0.520048 | false | 4.239608 | false | false | false |
smorand/dtol | var/test/essai/models.py | 1 | 1276 | from django.db import models, transaction
'''
create table dt_games (id integer primary key auto_increment, name varchar(100), lasteventid integer);
create table dt_spawns (id integer primary key auto_increment, name varchar(100), game_id integer references game(id), lasteventid integer);
insert into dt_games values (... | gpl-3.0 | 7,205,550,349,692,199,000 | 37.666667 | 140 | 0.732759 | false | 2.854586 | false | false | false |
wujuguang/scrapy | scrapy/core/downloader/webclient.py | 1 | 5796 | from time import time
from six.moves.urllib.parse import urlparse, urlunparse, urldefrag
from twisted.web.client import HTTPClientFactory
from twisted.web.http import HTTPClient
from twisted.internet import defer
from scrapy.http import Headers
from scrapy.utils.httpobj import urlparse_cached
from scrapy.utils.python... | bsd-3-clause | 2,003,167,116,600,618,500 | 35.225 | 92 | 0.658213 | false | 4.107725 | false | false | false |
gmartinvela/Incubator | Incubator/mongo_save.py | 1 | 2777 | from pymongo import MongoClient
import urllib2
import time
import datetime
import json
import sqlite3
import pandas.io.sql as psql
from data_utils import retrieve_DBs, extract_data_from_DB
mongo_client = MongoClient()
mongo_db = mongo_client.incubator
measures_collection = mongo_db.measures
local_path_SHT1xdb = "/ho... | mit | 6,239,591,299,131,140,000 | 29.866667 | 115 | 0.707598 | false | 2.634725 | false | false | false |
tddv/readthedocs.org | readthedocs/doc_builder/environments.py | 1 | 24734 | '''
Documentation Builder Environments
'''
import os
import re
import sys
import logging
import subprocess
import traceback
import socket
from datetime import datetime
from django.utils.text import slugify
from django.utils.translation import ugettext_lazy as _, ugettext_noop
from docker import Client
from docker.uti... | mit | 6,347,718,754,111,018,000 | 37.52648 | 90 | 0.569459 | false | 4.551711 | false | false | false |
JoaquimPatriarca/senpy-for-gis | tmp/Prog_25.py | 1 | 7237 | # Criação de amostras de treino (70%) e amostras de avaliação (30%) consideradas ideais para cada um dos factores condicionanes - por ideal entenda-se: cada classe de cada factor tem 70% dos pontos que a intersectam definidos como ocorrências para treino e tem 30% para validação - GRASS GIS
def cria_objTable(tab, path... | gpl-3.0 | 2,416,969,780,901,124,600 | 40.087209 | 291 | 0.55769 | false | 3.165792 | false | false | false |
ctrl-alt-d/fpuf | fpuf/settings.py | 1 | 7622 | # -*- coding: utf-8 -*-
import os
from django.core.urlresolvers import reverse
# Django settings for aula project.
PROJECT_DIR = os.path.join( os.path.dirname(__file__), '..')
location = lambda x: os.path.join(PROJECT_DIR, x)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com... | gpl-3.0 | -7,926,954,789,157,858,000 | 29.8583 | 127 | 0.691944 | false | 3.517305 | false | false | false |
Szkered/BC_2402 | sydb/stocks/forms.py | 1 | 5392 | from django import forms
from stocks.models import *
from django.forms.models import modelformset_factory, inlineformset_factory, BaseInlineFormSet
from django.forms.formsets import formset_factory, BaseFormSet
import re
import datetime
class DonorForm(forms.ModelForm):
class Meta:
model = Donor
c... | apache-2.0 | 5,637,425,769,789,692,000 | 30.905325 | 95 | 0.648368 | false | 3.976401 | false | false | false |
rtucker/recentpostr | recentpostr.py | 1 | 10922 | #!/usr/bin/python
# Spits out a Javascript embeddable list o' recent RSS stuff.
# Ryan Tucker, August 21 2009, <rtucker@gmail.com>
checkevery = 30*60 # check every ~30 minutes
displaymax = 5
import cgi
import feedparser
import logging
import logging.handlers
import operator
import robotparser
import sqlite3
impo... | mit | 1,412,064,997,997,759,200 | 33.238245 | 142 | 0.557865 | false | 3.909091 | false | false | false |
kklmn/xrt | tests/raycing/info_opencl.py | 1 | 1670 | import pyopencl as cl # Import the OpenCL GPU computing API
print('\n' + '=' * 60 + '\nOpenCL Platforms and Devices')
for platform in cl.get_platforms(): # Print each platform on this computer
print('=' * 60)
print('Platform - Name: ' + platform.name)
print('Platform - Vendor: ' + platform.vendor)
... | mit | 7,744,002,980,101,567,000 | 42.947368 | 75 | 0.601796 | false | 3.422131 | false | false | false |
GoogleCloudPlatform/professional-services | tools/ml-auto-eda/ml_eda/job_config_util/job_config.py | 1 | 7563 | # Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | 5,269,896,557,410,128,000 | 33.852535 | 80 | 0.685707 | false | 4.083693 | true | false | false |
root-mirror/root | bindings/jupyroot/python/JupyROOT/helpers/cppcompleter.py | 19 | 6732 | # -*- coding:utf-8 -*-
#-----------------------------------------------------------------------------
# Author: Danilo Piparo <Danilo.Piparo@cern.ch> CERN
# Author: Enric Tejedor <enric.tejedor.saavedra@cern.ch> CERN
#-----------------------------------------------------------------------------
####################... | lgpl-2.1 | 678,121,358,243,730,700 | 37.25 | 113 | 0.581402 | false | 3.853463 | false | false | false |
PythonProgramming/PyOpenGL-series | VideoPyOpenGL7.py | 1 | 3973 | import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
import random
vertices = (
(1, -1, -1),
(1, 1, -1),
(-1, 1, -1),
(-1, -1, -1),
(1, -1, 1),
(1, 1, 1),
(-1, -1, 1),
(-1, 1, 1)
)
edges = (
(0,1),
(0,3),
(0,4),
(2,1),
(2,... | mit | 5,736,841,369,609,479,000 | 15.834746 | 77 | 0.445507 | false | 2.940785 | false | false | false |
skirpichev/omg | diofant/integrals/deltafunctions.py | 1 | 5793 | from ..core import Mul
from ..core.compatibility import default_sort_key
from ..functions import DiracDelta, Heaviside
def change_mul(node, x):
"""change_mul(node, x)
Rearranges the operands of a product, bringing to front any simple
DiracDelta expression.
If no simple DiracDelta expression was foun... | bsd-3-clause | -5,038,044,230,527,641,000 | 33.278107 | 79 | 0.583463 | false | 3.631975 | false | false | false |
cotonne/arduino | lcd/Adafruit_CharLCD.py | 1 | 20507 | # Copyright (c) 2014 Adafruit Industries
# Author: Tony DiCola
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, m... | lgpl-3.0 | -2,129,930,900,372,531,500 | 42.081933 | 111 | 0.596674 | false | 3.79408 | false | false | false |
proycon/foliatools | foliatools/foliasetdefinition.py | 1 | 4178 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
#---------------------------------------------------------------
# FoLiA Set Definition tool
# by Maarten van Gompel
# Centre for Language Studies
# Radboud University Nijmegen
# proycon AT anaproy DOT nl
#
# Licensed under GPLv3
#----------------------------------... | gpl-3.0 | -3,355,404,610,841,344,000 | 44.413043 | 182 | 0.641216 | false | 3.879294 | false | false | false |
recap/pumpkin | examples/tweeter/filters-cat3/filterhasa.py | 1 | 1595 | __author__ = 'reggie'
###START-CONF
##{
##"object_name": "filterhasa",
##"object_poi": "qpwo-2345",
##"parameters": [
## {
## "name": "tweet",
## "description": "english tweets",
## "required": true,
## "type": "TweetS... | mit | -1,975,949,327,162,892,500 | 21.8 | 116 | 0.37931 | false | 3.393617 | false | false | false |
ValvePython/vpk | setup.py | 1 | 1446 | #!/usr/bin/env python
from setuptools import setup
from codecs import open
from os import path
import vpk
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='vpk',
version=vpk.__version__,
description='L... | mit | -4,161,693,860,461,095,000 | 31.133333 | 71 | 0.60166 | false | 3.897574 | false | false | false |
googleapis/python-apigee-connect | google/cloud/apigeeconnect_v1/types/tether.py | 1 | 7720 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -2,795,002,658,291,813,400 | 31.711864 | 82 | 0.631995 | false | 3.928753 | false | false | false |
AGMMGA/EM_scripts | EM_scripts/junk/e2rawdata_silence_errors.py | 1 | 9718 | #!/Xsoftware64/EM/EMAN2/extlib/bin/python
#
# Author: John Flanagan (jfflanag@bcm.edu)
# Copyright (c) 2000-2011 Baylor College of Medicine
# This software is issued under a joint BSD/GNU license. You may use the
# source code in this file under either license. However, note that the
# complete EMAN2 and SPARX softwa... | gpl-2.0 | -7,468,594,814,304,820,000 | 50.417989 | 307 | 0.71311 | false | 2.902628 | false | false | false |
paktor132/phoenix_pipeline | pipeline.py | 1 | 6171 | from __future__ import print_function
from __future__ import unicode_literals
import sys
import logging
import datetime
import dateutil
import uploader
import utilities
import formatter
import postprocess
import oneaday_filter
import result_formatter
import scraper_connection
import to_mongo
from petrarch import petrar... | mit | -7,422,046,759,884,744,000 | 40.416107 | 140 | 0.609626 | false | 4.195105 | false | false | false |
przybys/poker-planning | poker/models.py | 1 | 9099 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
import json
import datetime
from jinja2.utils import urlize
from google.appengine.ext import db
from poker.firebase import send_firebase_message
__all__ = [
'Game',
'Participant',
'Story',
'Round',
'Estimate',
]
class Game(db.Model):
DECK_CHOICE... | mit | 1,969,652,898,089,457,400 | 29.533557 | 95 | 0.544455 | false | 3.971628 | false | false | false |
chris48s/UK-Polling-Stations | polling_stations/apps/uk_geo_utils/management/commands/import_onspd.py | 1 | 2103 | import os
import glob
from django.db import connection
from django.core.management.base import BaseCommand
from uk_geo_utils.helpers import get_onspd_model
class Command(BaseCommand):
"""
To import ONSPD, grab the latest release:
https://ons.maps.arcgis.com/home/search.html?t=content&q=ONS%20Postcode%20Di... | bsd-3-clause | 7,411,854,068,189,791,000 | 36.553571 | 87 | 0.566809 | false | 3.275701 | false | false | false |
karstenw/nodebox-pyobjc | examples/Extended Application/matplotlib/examples/subplots_axes_and_figures/custom_figure_class.py | 1 | 1517 | """
===================
Custom Figure Class
===================
You can pass a custom Figure constructor to figure if you want to derive from
the default Figure. This simple example creates a figure with a figure title.
"""
import matplotlib.pyplot as plt #import figure, show
from matplotlib.figure import Figure
# n... | mit | 8,111,102,881,483,984,000 | 24.711864 | 82 | 0.58998 | false | 3.447727 | false | false | false |
hanteng/babel | scripts/geoname_cldr.py | 1 | 2479 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#歧視無邊,回頭是岸。鍵起鍵落,情真情幻。
# url_target="https://raw.githubusercontent.com/datasets/country-codes/master/data/country-codes.csv"
import csv
import pandas as pd
import codecs
def export_to_csv(df, ex_filename, sep=','):
if sep==',':
df.to_csv(ex_filename, sep=sep, q... | bsd-3-clause | 7,863,930,118,899,022,000 | 34.347826 | 162 | 0.613366 | false | 3.200787 | false | false | false |
kaushik94/sympy | sympy/benchmarks/bench_symbench.py | 1 | 2832 | #!/usr/bin/env python
from __future__ import print_function, division
from sympy.core.compatibility import range
from random import random
from sympy import factor, I, Integer, pi, simplify, sin, sqrt, Symbol, sympify
from sympy.abc import x, y, z
from timeit import default_timer as clock
def bench_R1():
"real(f... | bsd-3-clause | -4,173,381,737,773,035,500 | 20.618321 | 78 | 0.46822 | false | 2.598165 | false | false | false |
HewlettPackard/oneview-ansible | library/oneview_appliance_device_read_community_facts.py | 1 | 2333 | #!/usr/bin/python
# -*- coding: utf-8 -*-
###
# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
#
# 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/licen... | apache-2.0 | 3,321,506,982,458,706,400 | 29.697368 | 104 | 0.712816 | false | 3.921008 | false | false | false |
gonadarian/kagen | kagen/youtube.py | 1 | 2932 | import os
import csv
import json
import pymongo
from kagen import utils
from kagen.utils import config
from datetime import datetime
logger = utils.get_logger("youtube")
def work():
dtf = "%Y-%m-%dT%H:%M:%S.%fZ"
yt_key = config["keys"]["youtube_key"]
yt_user = config["run"]["youtube_user"]
youtube =... | mit | 4,931,035,741,735,050,000 | 33.093023 | 99 | 0.601978 | false | 3.610837 | false | false | false |
lebrice/SimpleParsing | test/nesting/example_use_cases.py | 1 | 4329 |
from dataclasses import dataclass, field
from typing import *
from . import TestSetup
__all__ = [
"HParams",
"RunConfig",
"TrainConfig",
"TaskHyperParameters",
"HyperParameters",
]
@dataclass
class HParams(TestSetup):
"""
Model Hyper-parameters
"""
# Number of examples per batch
... | mit | -6,797,513,807,726,035,000 | 27.287582 | 100 | 0.644871 | false | 3.789842 | true | false | false |
tombstone/models | research/object_detection/core/freezable_batch_norm.py | 1 | 2992 | # Copyright 2018 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 | 968,853,710,624,408,300 | 43 | 80 | 0.726604 | false | 4.492492 | false | false | false |
racemidev/RegAdminForLinux | python/rregadmin/hive/cell_wrapper.py | 1 | 11246 | # generated by 'xml2py'
# flags '-c -d -v -k defst -lrregadmin -m rregadmin.util.glib_wrapper -m rregadmin.util.icu_wrapper -m rregadmin.util.path_wrapper -m rregadmin.util.icu_wrapper -m rregadmin.util.path_info_wrapper -m rregadmin.util.ustring_wrapper -m rregadmin.util.offset_wrapper -m rregadmin.util.value_wrapper ... | gpl-2.0 | 1,746,740,988,433,074,000 | 39.746377 | 455 | 0.674551 | false | 2.68145 | false | false | false |
votervoice/openstates | openstates/ny/events.py | 1 | 4556 | import re
import datetime as dt
import pytz
from pupa.scrape import Scraper, Event
from openstates.utils import LXMLMixin
url = "http://assembly.state.ny.us/leg/?sh=hear"
class NYEventScraper(Scraper, LXMLMixin):
_tz = pytz.timezone('US/Eastern')
def lower_parse_page(self, url):
page = self.lxmliz... | gpl-3.0 | 7,908,856,798,909,407,000 | 31.084507 | 84 | 0.449737 | false | 4.126812 | false | false | false |
proger/offlineimap | offlineimap/folder/Maildir.py | 1 | 12082 | # Maildir folder support
# Copyright (C) 2002 - 2007 John Goerzen
# <jgoerzen@complete.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; either version 2 of the License, or
# (a... | gpl-2.0 | -8,432,343,763,043,916,000 | 36.874608 | 93 | 0.569442 | false | 4.160468 | true | false | false |
atantet/ergoPack | example/numericalFP/numericalFP_Hopf.py | 1 | 5115 | import numpy as np
import pylibconfig2
from scipy import sparse
from scipy.sparse import linalg
import matplotlib.pyplot as plt
from matplotlib import cm
from ergoNumAna import ChangCooper
readEigVal = False
#readEigVal = True
def hopf(x, mu, omega):
f = np.empty((2,))
f[0] = x[0] * (mu - (x[0]**2 + x[1]**2))... | gpl-3.0 | -2,602,404,210,002,750,500 | 26.5 | 93 | 0.564223 | false | 2.66129 | false | false | false |
xhochy/arrow | python/pyarrow/tests/test_hdfs.py | 1 | 13325 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -1,749,521,619,231,526,100 | 29.284091 | 77 | 0.59227 | false | 3.477296 | true | false | false |
moonlet/fuli | src/fuli_spiders/fuli_spiders/spiders/youdianying.py | 1 | 1705 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from scrapy import Request
from scrapy.selector import Selector
from datetime import datetime
from base import BaseSpider
import db
class YouDianYin(BaseSpider):
name = 'youdianying'
ch_name = u'有点硬'
start_urls = ['https://youdian.in/']
def parse(self, ... | mit | 5,278,915,593,901,573,000 | 43.526316 | 133 | 0.562057 | false | 3.623126 | false | false | false |
copperwire/SIMS | file_handling/file_handler.py | 1 | 5910 | import sys
import os
import numpy as np
class file_handler:
"""
Public methods:
__init__
file_iteration
data_conversion
runtime
Class to get data from the SIMS output files.
The data is collected in groups by the delimiters in the data file, e.g. **** DATA START*** contains all numerical data.
Operatio... | cc0-1.0 | -7,246,006,517,227,118,000 | 30.945946 | 141 | 0.674619 | false | 3.288815 | false | false | false |
ASU-CodeDevils/DemonHacks2017 | gameFiles/Python/helpers.py | 1 | 7120 | from __future__ import print_function
from __future__ import division
import numpy as np
from datetime import datetime
from scipy.stats import norm
from scipy.optimize import minimize
def acq_max(ac, gp, y_max, bounds, random_state):
"""
A function to find the maximum of the acquisition function
It uses ... | mit | 4,082,479,898,961,499,600 | 30.091703 | 81 | 0.505618 | false | 3.761226 | false | false | false |
Tan0/ironic | ironic/tests/api/test_base.py | 1 | 3304 | # Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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... | apache-2.0 | -2,916,717,131,872,390,000 | 34.913043 | 78 | 0.618947 | false | 3.704036 | true | false | false |
stephanpieterse/pyblend-animidi | blenderfunc/blender_funcIncludes.py | 1 | 16560 | # we need this to scale actions and keyframing right
def get_relative_action_scale(obj_s, obj_e, note_s, note_e):
action_frames = obj_e - obj_s # 10 - 5 = 5
note_frames = note_e - note_s # 1050 - 1025 = 25
if action_frames <= 0:
action_frames = 1
relative_scale = note_frames / float(action_frames)... | gpl-3.0 | 3,051,098,367,651,859,000 | 52.941368 | 152 | 0.640519 | false | 3.47097 | true | false | false |
muLAn-project/muLAn | muLAn/instruments.py | 1 | 5376 | # -*-coding:Utf-8 -*
# ====================================================================
# Packages
# ====================================================================
import configparser as cp
import copy
import glob
import muLAn
import muLAn.packages.general_tools as gtools
import muLAn.packages.algebra as alge... | mit | -1,610,295,176,745,053,400 | 31 | 91 | 0.564546 | false | 4.01194 | false | false | false |
FeiSun/BERT4Rec | util.py | 1 | 1031 | from __future__ import print_function
import sys
import copy
import random
import numpy as np
from collections import defaultdict
def data_partition(fname):
usernum = 0
itemnum = 0
User = defaultdict(list)
user_train = {}
user_valid = {}
user_test = {}
# assume user/item index starting fro... | apache-2.0 | 9,132,715,667,523,385,000 | 25.435897 | 64 | 0.543162 | false | 3.494915 | false | false | false |
AutorestCI/azure-sdk-for-python | azure-batch/azure/batch/models/job_get_options.py | 1 | 3278 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 4,880,764,553,219,390,000 | 47.925373 | 217 | 0.687614 | false | 4.181122 | false | false | false |
Williams224/davinci-scripts | lbpketa/DNTupleMaker.py | 1 | 15414 | from Gaudi.Configuration import *
from Configurables import DaVinci
from Configurables import GaudiSequencer
simulation=False
stream='Bhadron'
line='StrippingB2XEtaLb2pKeta3piLine'
from Configurables import DecayTreeTuple
from DecayTreeTuple.Configuration import *
tuple=DecayTreeTuple()
tuple.Decay="[Lambda_b0 -> ^p... | mit | 3,344,568,689,875,149,000 | 42.789773 | 111 | 0.627222 | false | 2.773799 | true | false | false |
torchbox/colourlens | colourlens/views.py | 1 | 5200 | import urllib
from django.db.models import Avg, Sum, Count
from django import forms
from django.forms.widgets import Input
from django.shortcuts import render
from colourlens.models import Artwork, Colour
PROM_ATTRS = {'min': '0', 'max': '100', 'step': '5'}
DIST_ATTRS = {'min': '0', 'max': '50', 'step': '1'}
class R... | mit | 9,175,406,315,224,728,000 | 33.210526 | 97 | 0.641731 | false | 3.798393 | false | false | false |
bovenyan/hsa | hsa-python/net_plumbing/net_plumber.py | 1 | 22912 | '''
Created on Jun 25, 2012
@author: Peyman Kazemian
'''
from headerspace.hs import headerspace
from net_plumbing.net_plumber_nodes import RuleNode, SourceNode, SinkNode,\
ProbeNode,SourceReachabilityProbeNode
from net_plumbing.net_plumber_process import *
from multiprocessing import cpu_count, Event, JoinableQueue as... | gpl-2.0 | 2,319,341,807,518,203,000 | 35.310618 | 93 | 0.573019 | false | 3.469412 | false | false | false |
ThunderGemios10/The-Super-Duper-Script-Editor | script_file.py | 1 | 4412 | ################################################################################
### Copyright © 2012-2013 BlackDragonHunt
###
### This file is part of the Super Duper Script Editor.
###
### The Super Duper Script Editor is free software: you can redistribute it
### and/or modify it under the terms of the GNU Genera... | gpl-3.0 | 2,786,544,307,136,137,000 | 30.956522 | 121 | 0.562259 | false | 3.961366 | false | false | false |
codilime/cloudify-system-tests | cosmo_tester/framework/cfy_helper.py | 1 | 13909 | ########
# Copyright (c) 2014 GigaSpaces Technologies Ltd. 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... | apache-2.0 | -3,246,946,880,898,750,500 | 34.940568 | 79 | 0.543892 | false | 4.578341 | false | false | false |
google/loaner | loaner/web_app/backend/handlers/cron/run_reminder_events.py | 1 | 5071 | # Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -2,524,230,247,139,262,500 | 38.929134 | 78 | 0.667324 | false | 3.853343 | false | false | false |
nvlbg/gepify | gepify/providers/playlists.py | 1 | 6438 | """
gepify.providers.playlists
~~~~~~~~~~~~~~~~~~~~~~~~~~
Provides information about downloaded playlists
as well as functionality to download playlists.
"""
from werkzeug.contrib.cache import RedisCache
from gepify.celery import celery_app
from . import songs, PLAYLISTS_DIRECTORY
from .songs import S... | mit | -8,243,888,045,755,013,000 | 28.668203 | 87 | 0.614011 | false | 4.158915 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.