text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
{ 'name': "Blockchain Waves Synchro", 'version': '1.0', 'depends': ['base', 'sale', 'sales_team', 'delivery', 'barcodes', 'mail', 'report', 'portal_sale', 'website_portal', ...
stanta/darfchain
darfchain/__manifest__.py
Python
gpl-3.0
668
0.004491
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-13 20:45 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('kriegspiel', '0003_auto_20170113_2035'), ] operations ...
Kriegspiel/ks-python-api
kriegspiel_api_server/kriegspiel/migrations/0004_move_created_at.py
Python
mit
507
0
# Copyright (c) 2017-present, Facebook, Inc. # All Rights Reserved. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. from __future__ import absolute_import, division, print_function, unicode_literals import pkgutil # Indicate that hgext3rd is a nams...
facebookexperimental/eden-hg
eden/hg/eden/hgext3rd_init.py
Python
gpl-2.0
497
0.002012
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
AsimmHirani/ISpyPi
tensorflow/contrib/tensorflow-master/tensorflow/contrib/distributions/python/kernel_tests/mixture_test.py
Python
apache-2.0
24,371
0.006729
__author__ = 'Dominic Miglar <dominic.miglar@bitmovin.net>' import unittest import bitcodin from bitcodin.test.bitcodin_test_case import BitcodinTestCase from bitcodin.rest import RestClient class GetStatisticsCurrentMonthTestCase(BitcodinTestCase): def setUp(self): super(GetStatisticsCurrentMonthTestCa...
bitmovin/bitcodin-python
bitcodin/test/statistics/testcase_get_statistics_current.py
Python
unlicense
614
0.001629
"""Base integration test for provider implementations.""" import unittest import json import mock from contextlib import contextmanager from django import test from django.contrib import auth from django.contrib.auth import models as auth_models from django.contrib.messages.storage import fallback from django.contri...
lduarte1991/edx-platform
common/djangoapps/third_party_auth/tests/specs/base.py
Python
agpl-3.0
49,331
0.003324
#!/usr/bin/env #(C) Mugfoundation 2014 #Available under MIT license import click import hashlib c = hashlib.sha512() @click.command() @click.option('--setup', 'setup', help='Setup new project', type=str) @click.option('-x', '--major', 'major', help='major version setter', type=int) @click.option('-y', '--minor', 'min...
MugFoundation/versioneer
cli/versioneer.py
Python
mit
743
0.012113
''' Copyright 2017 Digital Hills, 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...
DigitalHills/Esse
dpeer/nexus.py
Python
apache-2.0
17,520
0.00468
''' Appresponse module contains ApplicationResponse and FileDescriptor classes which are used to parse response. Usage: >>> response = ApplicationResponse(xml_message) >>> response.is_accepted() # Checks was the request accepted ''' import os import base64 import gzip import logging from lxml import etree tr...
luojus/bankws
bankws/appresponse.py
Python
mit
15,773
0.000127
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # *************************************...
joshmoore/zeroc-ice
py/test/Ice/faultTolerance/Client.py
Python
gpl-2.0
1,608
0.006219
input_name = '../examples/linear_elasticity/linear_viscoelastic.py' output_name_trunk = 'test_linear_viscoelastic' from tests_basic import TestInputEvolutionary class Test(TestInputEvolutionary): pass
RexFuzzle/sfepy
tests/test_input_linear_viscoelastic.py
Python
bsd-3-clause
207
0.009662
#!/usr/bin/env python3 """ Item Related Objects. """ #-*- coding: utf-8 -*- import re from datetime import datetime from db_related import DBConnect class Item_Lookup(object): """ Returned Item Lookup Dictionary Structure: item = { upc: text description: text ...
fuspu/RHP-POS
item_utils.py
Python
mit
837
0.009558
# coding: utf-8 import sys from collections import defaultdict sys.path.append('/project/nakamura-lab01/Work/yusuke-o/python') from data.reader import dlmread def addfeature(fs, fid, name, mode): if mode == 'dev' or name in fid: fs.append(fid[name]) def main(): if len(sys.argv) != 6: print('USAGE: python3 mak...
ahclab/greedyseg
makeliblin.py
Python
gpl-2.0
4,282
0.02639
# -*- coding: utf-8 -*- from __future__ import unicode_literals import collections import copy import datetime import decimal import math import uuid import warnings from base64 import b64decode, b64encode from itertools import tee from django.apps import apps from django.db import connection from django.db.models.lo...
andyzsf/django
django/db/models/fields/__init__.py
Python
bsd-3-clause
84,287
0.000641
import numpy as np from numpy.testing import (run_module_suite, assert_, assert_equal, assert_almost_equal, assert_array_equal, assert_array_almost_equal, ass...
StongeEtienne/dipy
dipy/align/tests/test_streamlinear.py
Python
bsd-3-clause
15,316
0
import torch def rmsprop(opfunc, x, config, state=None): """ An implementation of RMSprop ARGS: - 'opfunc' : a function that takes a single input (X), the point of a evaluation, and returns f(X) and df/dX - 'x' : the initial point - 'config` : a table with configuration para...
RPGOne/Skynet
pytorch-master/torch/legacy/optim/rmsprop.py
Python
bsd-3-clause
2,014
0.001986
from .nuimo import ControllerManager, ControllerManagerListener, Controller, ControllerListener, GestureEvent, Gesture, LedMatrix
getsenic/nuimo-linux-python
nuimo/__init__.py
Python
mit
130
0.007692
# -*- coding: utf-8 -*- from django.shortcuts import render from django.http import HttpResponsePermanentRedirect, Http404, HttpResponseRedirect from django.views.decorators.http import require_GET from django.contrib.auth import login, authenticate from django.core.urlresolvers import reverse_lazy from django.contrib...
ricardodani/django-simple-url-shortner
simple_url_shortner/urlshortener/views.py
Python
gpl-2.0
3,074
0.001627
# -*- coding: utf-8 -*- # Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ # # 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 vers...
bioinformatics-ua/catalogue
emif/utils/validate_questionnaire.py
Python
gpl-3.0
1,852
0.00432
# Copyright 2012 NetApp # Copyright 2015 Chuck Fouts # 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 # #...
sniperganso/python-manilaclient
manilaclient/v1/shares.py
Python
apache-2.0
1,210
0.000826
# Generated by Django 1.11.13 on 2018-08-14 17:35 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): replaces = [ ("user", "0001_initial"), ("user", "0002_rename_account_tables"), ("user", "0003...
fiduswriter/fiduswriter
fiduswriter/user/migrations/0001_squashed_0003_auto_20151226_1110.py
Python
agpl-3.0
6,929
0.00101
# -*- coding: utf-8 -*- # © 2012 spirit <hiddenspirit@gmail.com> # © 2013-2014 Steven Myint # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation, either version 3 of the License, # or (at yo...
viraja1/grammar-check
grammar_check/__init__.py
Python
lgpl-3.0
19,319
0.000207
def extractDanielyangNinja(item): ''' Parser for 'danielyang.ninja' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None if "WATTT" in item['tags']: return buildReleaseMessageWithType(item, "WATTT", vol, chp, fr...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractDanielyangNinja.py
Python
bsd-3-clause
362
0.035912
#!/usr/bin/env python # coding=utf-8 """30. Digit fifth powers https://projecteuler.net/problem=30 Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: > 1634 = 14 \+ 64 \+ 34 \+ 44 > 8208 = 84 \+ 24 \+ 04 \+ 84 > 9474 = 94 \+ 44 \+ 74 \+ 44 As 1 = 14 is n...
openqt/algorithms
projecteuler/pe030-digit-fifth-powers.py
Python
gpl-3.0
507
0.021696
import unittest """ Given an unordered array of integers, find the length of longest increasing subsequence. Input: 0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15 Output: 6 (0, 2, 6, 9, 11, 15) """ """ A great explanation of the approach appears here: http://www.geeksforgeeks.org/longest-monotonically-increasing...
prathamtandon/g4gproblems
Arrays/longest_increasing_subsequence_nlogn.py
Python
mit
1,625
0.004308
import math import inspect import numpy as np import numpy.linalg as linalg import scipy as sp import scipy.optimize import scipy.io from itertools import product import trep import _trep from _trep import _System from frame import Frame from finput import Input from config import Config from force import Force from c...
hilario/trep
src/system.py
Python
gpl-3.0
46,931
0.00358
__all__ = ( 'TokenList', ) import collections from .errors import TokenTypeError class TokenList(collections.Sized, collections.Iterable, collections.Container): def __init__(self, init=None, *, token_type=None): if token_type is None: token_type = object self._token_type = token_...
simone-campagna/petra
petra/token_list.py
Python
apache-2.0
2,481
0.003628
from sqlalchemy.testing import eq_, is_ from sqlalchemy.orm import backref, configure_mappers from sqlalchemy import testing from sqlalchemy import desc, select, func, exc from sqlalchemy.orm import mapper, relationship, create_session, Query, \ attributes, exc as orm_exc, Session from sqlalchemy.or...
mitsuhiko/sqlalchemy
test/orm/test_dynamic.py
Python
mit
30,088
0.002526
from django.shortcuts import render from .models import Document, Corpus from django.http import JsonResponse from django.conf import settings import json import os import re import nltk from nltk.corpus import * from nltk.collocations import * import string import logging logger = logging.getLogger('nltksite.nltkapp'...
wtamu-cisresearch/nltksite
nltkapp/views.py
Python
mit
8,449
0.034797
# 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...
RobinQuetin/CAIRIS-web
cairis/cairis/ReferenceContribution.py
Python
apache-2.0
1,176
0.007653
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
Akrog/cinder
cinder/tests/test_coraid.py
Python
apache-2.0
33,873
0
# -*- coding: utf-8 -*- # Copyright (c) 2010-2017 Tuukka Turto # # 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,...
tuturto/pyherc
src/herculeum/ui/gui/mainwindow.py
Python
mit
8,099
0.001235
LANG_TEXT = {'en_EN': {'tr_TR': 'Turkish', 'fr_FR': 'French', 'fi_FI': 'Finnish', 'pt_PT': 'Portuguese', 'fy_x-FY': 'Frisian', 'it_IT': 'Italian', 'et_EE': 'Estonian', 'no_NO': 'Norwegian', 'nl_NL': 'Dutch', 'lv_LV': 'Lat...
kingvuplus/ts-gui-3
lib/python/Components/language_cache.py
Python
gpl-2.0
50,254
0.002846
# -*- coding: utf-8 -*- """WebUI.""" from .websocket import WebsocketProxyHandler def create_webapp(naumanni, **kwargs): """App factory. :param CircleCore core: CircleCore Core :param str base_url: ベースURL :param int ws_port: Websocket Port Number :return: WebUI App :rtype: CCWebApp """ ...
glucoseinc/naumanni-server
naumanni/web/__init__.py
Python
agpl-3.0
422
0
# # Copyright (c) 2014, Jim Bosch # All rights reserved. # # mcpib is distributed under a simple BSD-like license; # see the LICENSE file that should be present in the root # of the source distribution. # import unittest import os import sys buildPythonPath = os.path.join(os.path.split(__file__)[0], "..", "python") i...
TallJimbo/mcpib
tests/builtin_strings_test.py
Python
bsd-2-clause
2,081
0.004325
#!/usr/bin/env python """FEM library Demonstrates some simple finite element definitions, and computes a mass matrix $ python fem.py [ 1/60, 0, -1/360, 0, -1/90, -1/360] [ 0, 4/45, 0, 2/45, 2/45, -1/90] [-1/360, 0, 1/60, -1/90, 0, -1/360] [ 0, 2/45, -1/90, 4/45, 2/45, 0] ...
flacjacket/sympy
examples/advanced/fem.py
Python
bsd-3-clause
5,414
0.035648
# fMBT, free Model Based Testing tool # Copyright (c) 2013-2016, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU Lesser General Public License, # version 2.1, as published by the Free Software Foundation. # # This program is dist...
yoonkiss/fMBT
utils/fmbtx11.py
Python
lgpl-2.1
26,132
0.002334
# -*- coding: utf-8 -*- """ * Partial implementation of standard atmospheric model as described in * GOST 4401-81 useful for processing of data from meteorological balloon * sensors. * * Supported modelling of temperature and pressure over the altitude span from * 0 up to 51km. * * algorithm by Oleg Kocheto...
Shatki/PyIMU
gost4401_81.py
Python
gpl-3.0
4,655
0.002365
"""SCons.Tool.sunf95 Tool-specific initialization for sunf95, the Sun Studio F95 compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 20...
qewerty/moto.old
tools/scons/engine/SCons/Tool/sunf95.py
Python
gpl-2.0
2,167
0.00323
""" Django settings for untitled project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import o...
sistason/kinksorter2
src/kinksorter/settings.py
Python
gpl-3.0
4,818
0.001038
import rdtest import struct import renderdoc as rd class VK_Indirect(rdtest.TestCase): demos_test_name = 'VK_Indirect' def check_overlay(self, eventId: int, out: rd.ReplayOutput, tex: rd.TextureDisplay, save_data: rd.TextureSave): pipe: rd.PipeState = self.controller.GetPipelineState() # Che...
TurtleRockStudios/renderdoc_public
util/test/tests/Vulkan/VK_Indirect.py
Python
mit
14,258
0.004699
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
shimpe/frescobaldi
frescobaldi_app/debuginfo.py
Python
gpl-2.0
2,835
0.003175
from .bhtsne import bh_tsne __all__ = ["_bhtsne", "bh_tsne"]
CurryBoy/ProtoML-Deprecated
protoml/extras/tsne/_bhtsne/__init__.py
Python
bsd-3-clause
62
0
##!/usr/bin/env python from array import * import os import struct stats = os.stat('freqtest.dat') file_size = stats.st_size #print('file size ', +file_size, ' bytes') entries = file_size/4 #print('file has ', +entries, +' entries') freq_array = array('f', []) #create an array to hold the entries for a ...
unclejed613/gnuradio-projects-rtlsdr
scanner/frqedit.py
Python
gpl-2.0
2,267
0.013674
""" ==================================== Probabilistic Tracking on ODF fields ==================================== In this example we perform probabilistic fiber tracking on fields of ODF peaks. This example requires importing example `reconst_csa.py`. """ import numpy as np from reconst_csa import * from dipy.rec...
maurozucchelli/dipy
doc/examples/probabilistic_tracking_odfs.py
Python
bsd-3-clause
2,094
0.001433
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
firebase/firebase-android-sdk
ci/fireci/fireci/commands.py
Python
apache-2.0
946
0.002114
# Creates graph of restaurant reviews for yelp or trip advisor. # writes graph to gml file for use in gephi # # Rob Churchill # # NOTE: I learned to do this in my data science class last semester. If you are looking for plagiarism things, you will almost certainly find similar clustering code. # I did not copy it, I l...
rchurch4/georgetown-data-science-fall-2015
analysis/graph/graph_creation.py
Python
mit
1,784
0.008408
# -*- coding: utf-8 -*- """Django URLconf file for ulm""" from __future__ import unicode_literals from django.conf import settings try: # pylint: disable=E0611 from django.conf.urls import patterns, include, url except (ImportError): # Django 1.3 compatibility from django.conf.urls.defau...
dupuy/ulm
ulm/urls.py
Python
bsd-3-clause
911
0
#!/usr/bin/env python import os from os.path import join as pjoin import sys import subprocess def get_output(cmd): s = subprocess.Popen(cmd, stdout=subprocess.PIPE) out = s.communicate()[0] s.wait() return out.strip() # you could use os.path.walk to calculate this... or you could use du(1). def duha...
sebbASF/infrastructure-puppet
modules/mail_archives/files/scripts/site-sitemap.py
Python
apache-2.0
2,114
0.008515
import os import logging import MySQLdb import time import sys import Queue import threading import json createUserSQL = "INSERT IGNORE INTO users (name) VALUES (%s);" getUserByUsernameSQL = "SELECT * FROM users WHERE name=%s;" getAuthorByNameSQL = "SELECT * FROM authors WHERE name=%s;" createAuthorSQL = "INSERT...
mellanox-senior-design/docker-volume-rdma
benchmarking/book_store/bench.py
Python
apache-2.0
5,515
0.008704
# -*- coding: utf-8 -*- from __future__ import unicode_literals from colour import Color from django.contrib.auth.decorators import user_passes_test from django.urls import reverse from django.db.models import Sum from django.http import HttpResponse, HttpResponseRedirect, StreamingHttpResponse from django.shortcuts ...
artoonie/RedStatesBlueStates
redblue/viewsenators/views.py
Python
gpl-3.0
6,895
0.004206
#!/usr/bin/env python import sys import logging import argparse from gff3 import feature_lambda, feature_test_qual_value from CPT_GFFParser import gffParse, gffWrite from Bio.SeqFeature import FeatureLocation log = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def __get_features(child, interpro...
TAMU-CPT/galaxy-tools
tools/gff3/gff3_rebase.py
Python
gpl-3.0
4,407
0.000908
from __future__ import unicode_literals import binascii from pymacaroons import Caveat from pymacaroons.utils import ( convert_to_bytes, sign_first_party_caveat ) from .base_first_party import ( BaseFirstPartyCaveatDelegate, BaseFirstPartyCaveatVerifierDelegate ) class FirstPartyCaveatDelegate(BaseF...
illicitonion/pymacaroons
pymacaroons/caveat_delegates/first_party.py
Python
mit
1,498
0
#!/usr/bin/env python # -*- coding: utf-8 -*- #HW3 for EECS 598 Motion Planning import time import openravepy import userdefined as us import kdtree import transformationFunction as tf from random import randrange #### YOUR IMPORTS GO HERE #### handles = []; #### END OF YOUR IMPORTS #### if not __openravepy_buil...
willsirius/DualTreeRRTStartMotionPlanning
pythonVision2/HW3_testUpdateFunction.py
Python
mit
3,774
0.023317
import sys import os import struct import binascii from time import sleep from ctypes import (CDLL, get_errno) from ctypes.util import find_library from socket import (socket, AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI, SOL_HCI, HCI_FILTER,) os.system("hciconfig hci0 down") os.system("hciconfig hci0 up") if not os.geteuid()...
jsantoso91/smartlighting
characterizeRSSI.py
Python
mit
1,721
0.012783
""" Copyright 2014 Quentin Kaiser 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 dis...
QKaiser/pynessus
pynessus/models/scanner.py
Python
apache-2.0
2,984
0.001005
# Copyright (c) 2016-present, Facebook, 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...
davinwang/caffe2
caffe2/python/workspace.py
Python
apache-2.0
19,553
0.001074
match: case = 42
smmribeiro/intellij-community
python/testData/psi/PatternMatchingAnnotatedAssignmentLooksLikeIncompleteMatchStatement.py
Python
apache-2.0
17
0
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
CongLi/avocado-vt
setup.py
Python
gpl-2.0
3,742
0
# -*- coding:utf-8 -*- from django.urls import path from article.views.post import PostListApiView, PostCreateApiView, PostDetailApiView urlpatterns = [ # 前缀:/api/v1/article/post/ path('create', PostCreateApiView.as_view(), name="create"), path('list', PostListApiView.as_view(), name="list"), path('<i...
codelieche/codelieche.com
apps/article/urls/api/post.py
Python
mit
382
0.00266
# Copyright (c) 2008 David Aguilar # Copyright (c) 2015 Daniel Harding """Provides an filesystem monitoring for Linux (via inotify) and for Windows (via pywin32 and the ReadDirectoryChanges function)""" from __future__ import division, absolute_import, unicode_literals import errno import os import os.path import sele...
dirtycold/git-cola
cola/fsmonitor.py
Python
gpl-2.0
19,637
0.000662
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
benoitsteiner/tensorflow-xsmm
tensorflow/contrib/rnn/python/kernel_tests/lstm_ops_test.py
Python
apache-2.0
21,832
0.0071
#!/usr/bin/env python # -*- coding: utf-8 -*- from core import FeatureExtractorRegistry from twinkle.connectors.core import ConnectorRegistry class FeatureExtractorPipelineFactory(object): """ Factory object for creating a pipeline from a file """ def __init__(self): """ """ pass def buildInput(self,...
emCOMP/twinkle
twinkle/feature_extraction/pipelines.py
Python
mit
2,688
0.034226
from setuptools import setup setup( # general meta name='elasticity', version='0.7', author='Brian C. Dilley - Flipagram', author_email='brian@flipagram.com', description='Python based command line tool for managing ElasticSearch clusters.', platforms='any', url='https://github.com/Che...
flipagram/elasticity
setup.py
Python
mit
752
0.00133
""" Adds crowdsourced hinting functionality to lon-capa numerical response problems. Currently experimental - not for instructor use, yet. """ import logging import json import random import copy from pkg_resources import resource_string from lxml import etree from xmodule.x_module import XModule, STUDENT_VIEW fro...
ahmadiga/min_edx
common/lib/xmodule/xmodule/crowdsource_hinter.py
Python
agpl-3.0
17,456
0.00338
from __future__ import print_function import argparse import yaml from .bocca import make_project, ProjectExistsError def main(): parser = argparse.ArgumentParser() parser.add_argument('file', type=argparse.FileType('r'), help='Project description file') parser.add_argument('--cl...
csdms/wmt-exe
wmtexe/cmi/make.py
Python
mit
673
0
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from flask import jsonify from flask_restplus import inputs from flexget.api import api, APIResource from flexget.api.app import NotFoundError, BadRequest, etag from flexg...
qk4l/Flexget
flexget/api/plugins/tvmaze_lookup.py
Python
mit
6,102
0.001475
import argparse import sys, os import numpy as np from copy import copy parser = argparse.ArgumentParser() parser.add_argument('qubit', help='qubit name') parser.add_argument('direction', help='direction (X or Y)') parser.add_argument('numPulses', type=int, help='log2(n) of the longest sequence n') parser.add_argument(...
BBN-Q/Qlab
common/@PulseCalibration/PhaseEstimationSequence.py
Python
apache-2.0
1,148
0.004355
import requests import urllib2 import argparse from bs4 import BeautifulSoup def get_best_torrent(query): query = urllib2.quote(query) r = requests.get('http://kat.cr/usearch/{}/'.format(query)) soup = BeautifulSoup(r.content) torrents = soup.find('table', class_='data').find_all(has_class_odd_or_even...
dhamaniasad/magnetor
magnetor.py
Python
unlicense
1,885
0.002122
from xml.dom import minidom from object_classes import * from helpers import timeToSeconds class HindenburgInt(object): def __init__(self, project_file, version="Hindenburg Journalist 1.26.1936", version_num="1.26.1936"): self.projectFile = project_file self.version = version self.version...
joshk105/daw-translator
hindenburg.py
Python
mit
5,531
0.004701
import numpy as np import theano import theano.tensor as T import lasagne as nn import data import load import nn_plankton import dihedral import tmp_dnn import tta features = [ # "hu", # "tutorial", "haralick", # "aaronmoments", # "lbp", # "pftas", # "zernike_moments", # "image_siz...
yejingxin/kaggle-ndsb
configurations/featharalick_sharding_blend_pl_blend4_convroll4_doublescale_fs5_no_dropout_33_66.py
Python
mit
2,560
0.007813
# Copyright 2021 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Web test-specific impl of the unexpected passes' queries module.""" import os import posixpath from blinkpy.web_tests.stale_expectation_removal import co...
nwjs/chromium.src
third_party/blink/tools/blinkpy/web_tests/stale_expectation_removal/queries.py
Python
bsd-3-clause
7,303
0.000685
""" Copyright 2017-present, Airbnb 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, sof...
airbnb/streamalert
streamalert/scheduled_queries/main.py
Python
apache-2.0
760
0
""" Query modules mapping functions to their query strings structured: module_name { query_string: function_for_query } """ from __future__ import absolute_import from __future__ import unicode_literals from __future__ import print_function from __future__ import division # Standard imports from future import standar...
e-mission/e-mission-server
emission/core/wrapper/filter_modules.py
Python
bsd-3-clause
7,166
0.016467
import argparse import datetime import imutils import numpy as np import time import csv import cv2 import os.path #define variable click_frame = False divide_x = 0 divide_y = 0 channel_A = 0 channel_B = 0 area_A = 0 area_B = 0 #division fuction (divide_frame) def divide_frame(event,x,y,flags,param): global click_fr...
fritzfrancisco/flumeview
FlumeView1.2.py
Python
apache-2.0
5,412
0.035292
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individual...
weblabdeusto/weblabdeusto
server/src/experiments/vm/user_manager/manager.py
Python
bsd-2-clause
2,115
0.008511
# rhn-client-tools # # Copyright (c) 2006--2012 Red Hat, Inc. # # 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 2 of the License. # # This program is distributed in the hope t...
davidhrbac/spacewalk
client/rhel/rhn-client-tools/src/up2date_client/rhnserver.py
Python
gpl-2.0
8,608
0.001859
from setuptools import setup setup( name="sgf", version="0.5", description="Python library for reading and writing Smart Game Format", license="MIT", url="http://github.com/jtauber/sgf", author="James Tauber", author_email="jtauber@jtauber.com", py_modules=["sgf"], classifiers=[ ...
jtauber/sgf
setup.py
Python
mit
552
0
#! /usr/bin/python # -*- coding: utf-8 -*- # $Id: vboxshell.py $ """ VirtualBox Python Shell. This program is a simple interactive shell for VirtualBox. You can query information and issue commands from a simple command line. It also provides you with examples on how to use VirtualBox's Python API. This shell is even...
ruibarreira/linuxtrail
usr/lib/virtualbox/vboxshell.py
Python
gpl-3.0
120,819
0.00591
import glob json_files = glob.glob("tests/**/output/**/*.json", recursive=True) html_files = glob.glob("tests/**/output/**/*.html", recursive=True) html_list = "" for f_ in html_files: html_list += '\t<li><a href="{}">{}</li>\n'.format( f_[6:], f_.split(".")[-2], ) json_list = "" for f_ in js...
great-expectations/great_expectations
tests/build_index_page.py
Python
apache-2.0
628
0
from models import Comment from ..user.serializers import UserProfileSerializer from rest_framework import serializers class CommentSerializer(serializers.ModelSerializer): username = serializers.SerializerMethodField() class Meta: model = Comment fields = ("id","user","username", "topic","comment","comment_html"...
shriyanka/daemo-forum
spirit/comment/serializers.py
Python
mit
715
0.051748
import os.path import pkgutil from unittest import TestCase, TestSuite class TestImports(TestCase): def __init__(self, mod_name, import_error): name = f"test_{mod_name.replace('.', '_')}_import" def run(): try: __import__(mod_name) except ImportError as e: ...
blueman-project/blueman
test/main/test_imports.py
Python
gpl-3.0
1,075
0.002791
# coding=utf-8 # # Copyright 2016 F5 Networks 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 a...
F5Networks/f5-common-python
f5/bigiq/cm/device/licensing/__init__.py
Python
apache-2.0
1,033
0
# -*- coding: utf-8 -*- # # Copyright 2018 BhaaL # # This file is part of translate. # # translate is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any lat...
unho/translate
translate/convert/flatxml2po.py
Python
gpl-2.0
3,817
0.000262
# Made by mtrix import sys from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest qn = "345_MethodToRaiseTheDead" ADENA = 57 VICTIMS_ARM_BONE = 4274 VICTIMS_THIGH_BONE = 4275 VICTIMS_...
zenn1989/scoria-interlude
L2Jscoria-Game/data/scripts/quests/345_MethodToRaiseTheDead/__init__.py
Python
gpl-3.0
5,090
0.0389
from django.db import models from django.contrib.auth.models import User from building.models import Building, Unit # Create your models here. class Listing(models.Model): """ An option to lease, rent, or sublease a specific Unit """ CYCLE_CHOICES = ( ('year', 'Year'), ('month', 'Mo...
City-of-Bloomington/green-rental
listing/models.py
Python
agpl-3.0
2,921
0.015063
import numpy as np from scipy.io import netcdf_file import bz2 import os from fnmatch import fnmatch from numba import jit @jit def binsum2D(data, i, j, Nx, Ny): data_binned = np.zeros((Ny,Nx), dtype=data.dtype) N = len(data) for n in range(N): data_binned[j[n],i[n]] += data[n] return data_binn...
rabernat/satdatatools
satdatatools/aggregator.py
Python
mit
1,349
0.005189
# -*- python -*- # Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later versio...
bryanperris/winN64dev
mips64-elf/mips64-elf/lib/el/libstdc++.a-gdb.py
Python
gpl-2.0
2,328
0.006873
def test_upgrade_atac_alignment_enrichment_quality_metric_1_2( upgrader, atac_alignment_enrichment_quality_metric_1 ): value = upgrader.upgrade( 'atac_alignment_enrichment_quality_metric', atac_alignment_enrichment_quality_metric_1, current_version='1', target_version='2', ) ...
ENCODE-DCC/encoded
src/encoded/tests/test_upgrade_atac_alignment_enrichment_quality_metric.py
Python
mit
467
0.002141
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, float_or_none, unified_strdate, ) class PornoVoisinesIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?pornovoisines\.com/videos/show/(?P<id>\d+)/(?P<display_id>[...
epitron/youtube-dl
youtube_dl/extractor/pornovoisines.py
Python
unlicense
4,003
0.002001
# -*- coding: utf-8 -*- # Copyright 2015 AvanzOsc (http://www.avanzosc.es) # Copyright 2015-2016 - Pedro M. Baeza <pedro.baeza@tecnativa.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo import api, models class PurchaseOrder(models.Model): _inherit = 'purchase.order' @api.model ...
Eficent/purchase-workflow
procurement_purchase_no_grouping/models/purchase_order.py
Python
agpl-3.0
1,521
0
from abc import abstractmethod from typing import Callable, TypeVar, Protocol from typing_extensions import runtime_checkable TSource = TypeVar('TSource') TResult = TypeVar('TResult') @runtime_checkable class Applicative(Protocol[TSource, TResult]): """Applicative. Applicative functors are functors with so...
dbrattli/OSlash
oslash/typing/applicative.py
Python
apache-2.0
1,869
0.00214
""" ISO 1996-2:2007 ISO 1996-2:2007 describes how sound pressure levels can be determined by direct measurement, by extrapolation of measurement results by means of calculation, or exclusively by calculation, intended as a basis for assessing environmental noise. """ import numpy as np import pandas as pd from scipy....
python-acoustics/python-acoustics
acoustics/standards/iso_1996_2_2007.py
Python
bsd-3-clause
25,331
0.003948
#========================================================================= # visitors.py #========================================================================= from __future__ import print_function import ast, _ast import re import warnings from ..ast_helpers import get_closure_dict, print_simple_ast fro...
Abhinav117/pymtl
pymtl/tools/translation/visitors.py
Python
bsd-3-clause
29,868
0.028994
""" Test the metropolis hastings algorithm. """ import numpy as np import chronometer as gc import matplotlib.pyplot as plt import corner import emcee def model(par, x): return par[0] + par[1]*x def lnlike(par, x, y, yerr, par_inds): y_mod = model(par, x) return sum(-.5*((y_mod - y)/yerr)**2) def tes...
RuthAngus/chronometer
chronometer/test_MH.py
Python
mit
1,566
0.000639
# -*- coding: utf-8 -*- import pytest from boussole.exceptions import FinderException def test_001(finder): results = finder.get_relative_from_paths("/home/foo/plop", [ "/home/foo", "/home/bar", "/etc", ]) assert results == "plop" def test_002(finder): results = finder.get_...
sveetch/boussole
tests/002_finder/005_relativefrompaths.py
Python
mit
2,097
0
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # 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...
huggingface/transformers
utils/check_repo.py
Python
apache-2.0
30,085
0.002393
from django.http import HttpResponse from django.shortcuts import render def video_calling(request): return render(request,'video_calling.html')
ishandongol/voli-fix-vetnae
videocalling/views.py
Python
mit
150
0.013333
# -*- coding: utf-8 -*- from django.conf import settings as settings from django.contrib.auth.decorators import login_required from django.core.context_processors import csrf from django.core.urlresolvers import reverse from django.db.models import Q from django.http import HttpResponse, HttpResponseRedirect, Http404 f...
elimence/edx-platform
lms/djangoapps/simplewiki/views.py
Python
agpl-3.0
21,289
0.003852
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
odejesush/tensorflow
tensorflow/tools/docs/parser_test.py
Python
apache-2.0
12,002
0.003