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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tckerr/Pilot | pilot/node.py | 1 | 9520 | from exception import InvalidClassConversion
from definitions import (
RelationshipType,
ContainerType,)
class bool_extended(object):
def __init__(self, v):
self.val = v
def __bool__(self):
return self.v
def __str__(self):
return str(self.val)
class NoneType_extended(ob... | gpl-3.0 | 2,876,529,818,208,653,300 | 34.259259 | 118 | 0.543592 | false | 4.370983 | false | false | false |
KnechtRootrechtCH/Mimir | content/Mods/XVM/XVM_Base/res_mods_content/configs/xvm/py_macro/tooltips_shell.py | 1 | 3393 | import ResMgr
import nations
from items import _xml
from helpers import dependency
from helpers.i18n import makeString
from constants import ITEM_DEFS_PATH
from skeletons.gui.shared import IItemsCache
import gui.shared.tooltips.shell as tooltips_shell
from gui.shared.tooltips import formatters
from gui.shared.formatter... | mit | 8,539,171,362,290,958,000 | 35.880435 | 169 | 0.698497 | false | 3.25 | false | false | false |
jarussi/riotpy | riotpy/util.py | 1 | 1262 | # coding: utf-8
import re
import unicodedata
from urllib import quote_plus
class NestedDict(dict):
def __getitem__(self, key):
if key in self:
return self.get(key)
return self.setdefault(key, NestedDict())
def convert_to_underscore(name):
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2',... | bsd-3-clause | -2,692,113,059,544,240,600 | 26.434783 | 112 | 0.583201 | false | 3.093137 | false | false | false |
ChopChopKodi/pelisalacarta | python/main-classic/core/item.py | 1 | 15274 | # -*- coding: utf-8 -*-
# ------------------------------------------------------------
# pelisalacarta 4
# Copyright 2015 tvalacarta@gmail.com
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#
# Distributed under the terms of GNU General Public License v3 (GPLv3)
# http://www.gnu.org/licenses/gpl-3.0.html
# -... | gpl-3.0 | 4,013,775,081,593,200,600 | 37.852417 | 128 | 0.542144 | false | 4.058745 | false | false | false |
xemul/p.haul | phaul/fs_haul_ploop.py | 1 | 5487 | #
# ploop disk hauler
#
import logging
import os
import shutil
import threading
import libploop
import iters
import mstats
DDXML_FILENAME = "DiskDescriptor.xml"
def get_ddxml_path(path):
"""Get path to disk descriptor file by path to disk delta or directory"""
p = path if os.path.isdir(path) else os.path.dirna... | lgpl-2.1 | 6,195,651,268,991,448,000 | 26.029557 | 74 | 0.698196 | false | 3.02314 | false | false | false |
oVirt/ovirt-engine-sdk-tests | src/resource/resourcemanager.py | 1 | 2593 | #
# Copyright (c) 2013 Red Hat, 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 t... | apache-2.0 | 4,294,571,864,683,652,600 | 30.621951 | 80 | 0.568454 | false | 5.034951 | true | false | false |
klmitch/policies | policies/parser.py | 1 | 14118 | # Copyright (C) 2013 by Kevin L. Mitchell <klmitch@mit.edu>
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This p... | gpl-3.0 | 5,735,796,282,770,975,000 | 34.206983 | 79 | 0.68317 | false | 3.41923 | false | false | false |
tobetter/linaro-image-tools | linaro_image_tools/hwpack/builder.py | 1 | 17363 | # Copyright (C) 2010, 2011 Linaro
#
# Author: James Westby <james.westby@linaro.org>
#
# This file is part of Linaro Image Tools.
#
# Linaro Image Tools 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 v... | gpl-3.0 | -1,858,874,209,732,566,800 | 41.977723 | 79 | 0.573576 | false | 4.310576 | true | false | false |
elimence/edx-platform | lms/djangoapps/simplewiki/views.py | 1 | 21289 | # -*- 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... | agpl-3.0 | -166,728,548,993,777,180 | 37.567029 | 160 | 0.638452 | false | 3.995683 | false | false | false |
RobinCPC/CE264-Computer_Vision | tutorial_file/core_arith.py | 1 | 1439 | """
OpenCV tutorials Core Operations: Arithmetic Operation on Images
"""
import cv2
import numpy as np
def nothing(x):
pass
# excersice: create track bar to smooth transition
cv2.namedWindow('dst')
cv2.createTrackbar('Alpha', 'dst', 0, 10, nothing)
img1 = cv2.imread('chicky_512.png')
img2 = cv2.imread('baboon.... | mit | -6,957,162,951,842,853,000 | 21.484375 | 65 | 0.681723 | false | 2.616364 | false | false | false |
PrehistoricTeam/pycrypt | pycrypt/keygenerators/permutationkeygenerator.py | 1 | 1174 | from substitutionkeygenerator import *
from .. import utils
import random
class PermutationKeyGenerator(SubstitutionKeyGenerator):
def __init__(self, sequence=utils.alphabet, rand_func=lambda x: x ** 5, **kwargs):
"""Similar to SubstitutionTranslator, but returns just lists"""
SubstitutionKeyGenerator.__init__(se... | bsd-2-clause | 9,016,888,335,423,977,000 | 39.482759 | 116 | 0.755537 | false | 3.66875 | false | false | false |
rosscdh/twimer | wastingtimer/settings.py | 1 | 7951 | # -*- coding: UTF-8 -*-
import os
from logging.handlers import SysLogHandler
SITE_ROOT = os.path.dirname(os.path.realpath(__file__+ '/../'))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db... | gpl-3.0 | 7,221,648,016,783,025,000 | 29.702703 | 127 | 0.65149 | false | 3.482698 | false | false | false |
adamgonzalez/analysis | F_Var_calculator.py | 1 | 11232 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 20 11:43:39 2017
@author: agonzalez
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib
import os
matplotlib.rcParams.update({'font.size': 18})
matplotlib.rcParams['axes.linewidth'] = 1 #set the value globally
plt.rc('font',fa... | mit | 1,393,613,901,407,767,300 | 45.032787 | 188 | 0.56437 | false | 2.48881 | false | false | false |
vasi/kdelibs | khtml/misc/gennames.py | 1 | 9165 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# List of namespaces.The 2nd part in the array states whether the attributes
# should be in the namespace
namespaces = {
"xhtml": ['"http://www.w3.org/1999/xhtml"', False, 0 ],
"empty": [ "DOMString()", False, 1 ],
"svg": ['"http://www.w3.org/2000/svg"', False, 2... | gpl-2.0 | -397,835,607,599,134,700 | 30.712803 | 150 | 0.626841 | false | 3.036779 | false | false | false |
couchbaselabs/cbtop | metadata/visit.py | 1 | 13515 | #!/usr/bin/env python
import json
import logging
import os
import re
import sys
"""Helper functions which can recursively traverse or visit couchbase
REST / management data, driven by metadata. Users can change
behavior by passing in different visitor callback functions."""
def visit_dict(root, parents, data... | apache-2.0 | 914,259,079,411,783,700 | 37.724928 | 90 | 0.558935 | false | 3.741694 | false | false | false |
ioam/svn-history | topo/tests/test_map_measurement.py | 1 | 6588 | """
Functions to test that map measurements haven't changed.
Use generate() to save data, and test() to check that the data is
unchanged in a later version. Results from generate() are already
checked into svn, so intentional changes to map measurement mean new
data must be generated and committed. E.g.
# ...delibera... | bsd-3-clause | 6,320,646,460,067,178,000 | 35.197802 | 120 | 0.593503 | false | 4.01218 | true | false | false |
CanalTP/navitia | source/jormungandr/jormungandr/street_network/valhalla.py | 1 | 15950 | # Copyright (c) 2001-2016, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public t... | agpl-3.0 | 4,108,737,756,897,651,700 | 42.818681 | 116 | 0.616301 | false | 3.892143 | false | false | false |
materials-commons/mcstore | scripts/create_testdb.py | 1 | 7229 | #!/usr/bin/env python
import rethinkdb as r
class DatabaseError(Exception):
pass
class DataFile(object):
def __init__(self, name, owner, checksum, mediatype, size):
self.name = name
self.owner = owner
self._type = "datafile"
self.atime = r.now()
self.birthtime = self... | mit | -1,242,869,704,962,817,000 | 27.46063 | 71 | 0.582377 | false | 3.384363 | true | false | false |
pbattaglia/distributed | docs/conf.py | 1 | 8130 | # -*- coding: utf-8 -*-
#
# distributed documentation build configuration file, created by
# sphinx-quickstart on Wed Nov 27 17:56:03 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
#... | mit | 4,942,532,091,737,359,000 | 31.91498 | 192 | 0.707011 | false | 3.776126 | true | false | false |
haldean/chess | chess/board.py | 1 | 6638 | import copy
import itertools
import json
from chess.const import *
class Piece(object):
def __init__(self, color, piece):
if color not in colors:
raise ValueError("Invalid color '%s'" % color)
if piece not in pieces:
raise ValueError("Invalid piece '%s'" % piece)
se... | mit | -4,116,257,375,480,700,000 | 33.041026 | 94 | 0.497439 | false | 3.669431 | false | false | false |
hfp/libxsmm | samples/deeplearning/sparse_training/fairseq/fairseq/bleu.py | 1 | 3955 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import ctypes
import math
import torch
try:
from fairseq import libbleu
except ImportError as e:
import sys
sys.stderr.write('ERR... | bsd-3-clause | 3,756,851,650,195,476,000 | 29.658915 | 83 | 0.549937 | false | 3.368825 | false | false | false |
lqe/EconomyCompensation | wiki/view.py | 1 | 6221 | # -*- coding:utf-8 -*-
'''Created on 2014-8-7 @author: Administrator '''
import web
import Model
import json
from Urls import wiki_Urls
from common.common import (response,logged,upload)
def islogged(func):
def _call(*args,**kwargs):
try:
if logged():
result = func(... | gpl-3.0 | 6,801,756,637,377,177,000 | 30.589888 | 148 | 0.544059 | false | 3.055321 | false | false | false |
recombinators/snapsat | app/app/views.py | 1 | 16925 | import os
import operator
import itertools
from datetime import datetime, timedelta
from models import Paths, PathRow, UserJob, RenderCache
from pyramid.view import view_config, notfound_view_config
from pyramid.httpexceptions import HTTPFound, HTTPNotFound
from sqs import make_SQS_connection, get_queue, build_job_mess... | mit | 5,255,027,284,839,856,000 | 35.954148 | 80 | 0.600059 | false | 4.142193 | true | false | false |
Mozu/mozu-python-sdk | mozurestsdk/commerce/catalog/admin/attributedefinition/producttypes/producttypeextra.py | 1 | 5387 |
"""
This code was generated by Codezu.
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
"""
from mozurestsdk.mozuclient import default as default_client
from mozurestsdk.mozuurl import MozuUrl;
from mozurestsdk.urllocation import UrlLocation
from mozure... | apache-2.0 | 8,391,917,850,343,014,000 | 36.906475 | 244 | 0.738259 | false | 3.923525 | false | false | false |
codesmart-co/bit | bit/migrations/versions/9e8429737ba0_.py | 1 | 3199 | """empty message
Revision ID: 9e8429737ba0
Revises: ecbe7bbcbd6c
Create Date: 2017-08-12 19:53:27.652000
"""
# revision identifiers, used by Alembic.
revision = '9e8429737ba0'
down_revision = 'ecbe7bbcbd6c'
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
def upgrade():
# ### commands au... | apache-2.0 | 4,074,025,395,105,150,500 | 51.442623 | 120 | 0.687402 | false | 3.029356 | false | false | false |
ahhda/sympy | sympy/core/function.py | 1 | 84621 | """
There are three types of functions implemented in SymPy:
1) defined functions (in the sense that they can be evaluated) like
exp or sin; they have a name and a body:
f = exp
2) undefined function which have a name but no body. Undefined
functions can be defined using a Function cla... | bsd-3-clause | -679,788,643,540,458,600 | 33.066425 | 117 | 0.55348 | false | 3.804388 | false | false | false |
tyll/bodhi | bodhi/server/captcha.py | 1 | 6311 | # 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... | gpl-2.0 | 6,964,870,768,298,082,000 | 30.873737 | 76 | 0.633497 | false | 3.585795 | false | false | false |
chzhang/DataSpiderPy | sign_spider.py | 1 | 1299 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author : Cheng.Zhang
# Email : zccode@gmail.com
#
import requests
import json
from tqdm import tqdm
from mylog import get_logger
import csv
logger = get_logger('taobao_mm_spider.txt')
URL = 'https://sp0.baidu.com/9_Q4sjW91Qh3otqbppnN2DJv/pae/channel/data/asyncqu... | mit | 6,180,238,375,084,657,000 | 23.903846 | 284 | 0.600772 | false | 2.692308 | false | false | false |
Devbit/DevbitSpider | DevbitSpider/spiders/itbanen.py | 1 | 2607 | import urllib
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.http import Request
from scrapy.selector import HtmlXPathSelector
from scrapy import log
from w3lib.url import url_query_cleaner
from bs4 import UnicodeDammit
from os import path
from DevbitSpider.parsers.ITBanenParser import ITBanenParser
i... | mit | 3,963,366,195,069,870,600 | 36.797101 | 135 | 0.616801 | false | 3.625869 | false | false | false |
fedora-infra/fedora-openhw2012 | fedorasummerofhardware/models.py | 1 | 1521 | # Copyright (C) 2012 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distribu... | agpl-3.0 | -3,241,625,100,935,643,600 | 37.025 | 74 | 0.729783 | false | 4.045213 | false | false | false |
aganzha/django-chargify | chargify/models.py | 1 | 32882 | from chargify_settings import CHARGIFY, CHARGIFY_CC_TYPES
from datetime import datetime
from decimal import Decimal
from django.contrib.auth.models import User
from django.db import models
from django.utils.datetime_safe import new_datetime
from pychargify.api import ChargifyNotFound
import logging
import time
import t... | gpl-2.0 | -6,285,202,081,105,407,000 | 35.739665 | 145 | 0.601819 | false | 3.829723 | false | false | false |
rohitguptacs/ReVal | scripts/preprocess-training-data.py | 1 | 6471 | '''
/**************************************************************************
ReVal - A Simple and Effective Machine Translation Evaluation Metric Based on Recurrent Neural Networks.
Copyright (C) 2014 Rohit Gupta, University of Wolverhampton
This file is part of ReVal and is a modified version of the code distr... | gpl-2.0 | -4,399,925,879,265,228,300 | 38.457317 | 153 | 0.625097 | false | 3.393288 | false | false | false |
sunyihuan326/DeltaLab | Andrew_NG_learning/class_four/week_four/NST/Dxq_2.py | 1 | 3110 | # coding:utf-8
'''
Created on 2017/12/1.
@author: chk01
'''
from class_four.week_four.NST.nst_utils import *
import tensorflow as tf
import scipy
STYLE_LAYERS = [
('conv1_1', 0.0),
('conv2_1', 0.1),
('conv3_1', 0.1),
('conv4_1', 0.3),
('conv5_1', 0.5)]
def gram_matrix(A):
return tf.matmul(A,... | mit | 2,239,775,139,169,768,000 | 25.810345 | 111 | 0.623151 | false | 2.704348 | false | false | false |
pytorch/vision | torchvision/ops/ps_roi_pool.py | 1 | 2634 | import torch
from torch import nn, Tensor
from torch.nn.modules.utils import _pair
from torchvision.extension import _assert_has_ops
from ._utils import convert_boxes_to_roi_format, check_roi_boxes_shape
def ps_roi_pool(
input: Tensor,
boxes: Tensor,
output_size: int,
spatial_scale: float = 1.0,
) -... | bsd-3-clause | -7,682,940,494,706,362,000 | 38.313433 | 106 | 0.597191 | false | 3.69425 | false | false | false |
adamk33n3r/powerline-gitstatus | powerline_gitstatus/segments.py | 1 | 6654 | # vim:fileencoding=utf-8:noet
from powerline.segments import Segment, with_docstring
from powerline.theme import requires_segment_info
from subprocess import PIPE, Popen
import os, re, string
@requires_segment_info
class GitStatusSegment(Segment):
def execute(self, pl, command):
pl.debug('Executing comm... | mit | -7,563,015,586,799,896,000 | 40.761006 | 306 | 0.587801 | false | 3.522546 | false | false | false |
jeonghoonkang/BerePi | apps/sdb/lib/co2led.py | 1 | 2899 |
## This code for LEDs on T110 BereCO2
thispath='...BerePi/apps/BereCO2/lib/'
import time
import sys
import RPi.GPIO as GPIO
debug_print = 0
# if LED PCB has GND pcb_GND = 1, otherwise 0
# hsetting : it is HW setting, you should check it
pcb_GND = 1
# important, sensorname shuould be pre-defined, unique sensorname
... | bsd-2-clause | -9,140,947,285,895,037,000 | 19.560284 | 78 | 0.58227 | false | 2.763584 | false | false | false |
amorton/cassback | cassback/subcommands/restore_subcommand.py | 1 | 18544 | #!/usr/bin/env python
# encoding: utf-8
# Copyright 2012 Aaron Morton
#
# 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 ... | bsd-3-clause | -8,068,879,423,684,688,000 | 36.088 | 80 | 0.549072 | false | 4.222222 | false | false | false |
jomivega/ASE4156 | BuyBitcoin/urls.py | 1 | 1770 | """BuyBitcoin URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | apache-2.0 | -8,497,170,936,619,223,000 | 40.162791 | 79 | 0.712429 | false | 3.450292 | false | false | false |
dbmi-pitt/dbmi-annotator | translation/mp-evidence-base-ETL/postgres/mpEvidenceQry.py | 1 | 17539 | # Copyright 2016-2017 University of Pittsburgh
# 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 agr... | apache-2.0 | -595,909,128,139,666,400 | 38.770975 | 505 | 0.716746 | false | 3.075938 | false | false | false |
smartsheet-platform/smartsheet-python-sdk | smartsheet/models/enums/operator.py | 1 | 1605 | # pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
# Smartsheet Python SDK.
#
# Copyright 2018 Smartsheet.com, 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-2.0 | -8,054,478,328,653,407,000 | 24.903226 | 75 | 0.646106 | false | 3.1409 | false | false | false |
noox-/stbgui-1 | lib/python/Components/PluginList.py | 1 | 1927 | from MenuList import MenuList
from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE
from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest
from enigma import eListboxPythonMultiContent, gFont
from Tools.LoadPixmap import LoadPixmap
def PluginEntryComponent(plugin, width... | gpl-2.0 | -2,150,664,942,272,326,100 | 34.685185 | 94 | 0.723404 | false | 3.068471 | false | false | false |
Re4son/Kali-Pi | Menus/menu-3.py | 1 | 10765 | #!/usr/bin/env python
import kalipi
from kalipi import *
#############################
## Kismet version ##
if "KISMETVER" in os.environ and os.environ["KISMETVER"] == "2":
kismetver = 2
else:
kismetver = 1
#############################
## Local Functions ##
# Toggle Kismet
def toggle_kism... | gpl-3.0 | 7,612,786,025,829,644,000 | 27.180628 | 201 | 0.529401 | false | 3.714631 | false | false | false |
googleapis/googleapis-gen | google/cloud/notebooks/v1beta1/notebooks-v1beta1-py/docs/conf.py | 1 | 12491 | # -*- 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 | 819,251,889,735,516,300 | 32.220745 | 87 | 0.69426 | false | 3.657687 | true | false | false |
ccxt/ccxt | examples/py/async-tickers-from-many-exchanges-at-once.py | 1 | 1216 | # -*- coding: utf-8 -*-
import asyncio
import ccxt
import ccxt.async_support as ccxta # noqa: E402
import time
import os
import sys
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(root + '/python')
def sync_client(exchange):
client = getattr(ccxt, exchange)()... | mit | -1,757,948,573,927,738,000 | 25.434783 | 83 | 0.679276 | false | 3.322404 | false | false | false |
apache/allura | ForgeSVN/setup.py | 2 | 2155 | # 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 (t... | apache-2.0 | -4,623,698,433,821,768,000 | 33.758065 | 79 | 0.657541 | false | 4.112595 | false | false | false |
lanthaler/schemaorg | sdoapp.py | 1 | 99524 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import os
import re
import webapp2
import jinja2
import logging
import StringIO
import json
from apirdflib import load_graph, getNss, getRevNss
from markupsafe import Markup, escape # https://pypi.python.org/pypi/MarkupSafe
import parsers
import threading
import itertool... | apache-2.0 | 8,011,422,841,482,227,000 | 39.033387 | 289 | 0.549883 | false | 3.791497 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v8/resources/types/customer_asset.py | 1 | 2114 | # -*- 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 | 622,924,941,046,081,400 | 33.655738 | 91 | 0.68543 | false | 3.936685 | false | false | false |
MooMan272/selenium_the_internet | page_objects/base.py | 1 | 3244 | '''
"Base-level" objects which represent Pages and Elements.
None of these are intended to be instantiated directly.
'''
import logging
import time
from utils.exceptions import Timeout
# This variable is for the WebDriver object. It must be set before any Page
# Objects can be instantiated. It will effectively be... | mit | 1,667,753,959,516,219,000 | 29.895238 | 149 | 0.647965 | false | 4.511822 | false | false | false |
Tancata/phylo | ALE/compare_events_to_species_tree_branchlengths.py | 1 | 3966 | #compare branch lengths on species tree to inferred events (per gene copy) --- read a species tree with branch lengths and a set of uml_rec files
import os, re, sys, glob
from collections import defaultdict
import numpy as np
import scipy
import matplotlib
matplotlib.use('Agg')
import seaborn as sns
import pandas as ... | mit | -6,514,832,906,934,355,000 | 35.385321 | 145 | 0.697932 | false | 2.931264 | false | false | false |
dusty141/TheSecretTower | server.py | 1 | 25573 | #!/usr/bin/python
#-*-coding:Utf-8 -*
# TheSecretTower
# Copyright (C) 2011 Pierre SURPLY
#
# This file is part of TheSecretTower.
#
# TheSecretTower 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 Foun... | gpl-3.0 | 4,650,359,237,143,436,000 | 41.264463 | 273 | 0.440086 | false | 3.930822 | false | false | false |
NJ-zero/Android | Appium/Testcase/visit/visit_temp.py | 1 | 3936 | #coding=utf-8
#author='Shichao-Dong'
import sys,os
reload(sys)
sys.path.append('D:\Ptest\Appium\Testcase')
from appium import webdriver
import unittest
import time
from public import public
from logs.log import log
class visit_temp(unittest.TestCase):
log = log()
u'临时拜访--通用流程'
@classmethod
def setUpC... | mit | -8,042,642,216,545,904,000 | 28.85 | 115 | 0.577889 | false | 2.69121 | true | false | false |
andreasveit/conditional-similarity-networks | csn.py | 1 | 2563 | import torch
import torch.nn as nn
import numpy as np
class ConditionalSimNet(nn.Module):
def __init__(self, embeddingnet, n_conditions, embedding_size, learnedmask=True, prein=False):
""" embeddingnet: The network that projects the inputs into an embedding of embedding_size
n_conditions: Integ... | bsd-3-clause | 1,991,218,582,521,096,700 | 50.28 | 100 | 0.607101 | false | 4.215461 | false | false | false |
spiffcode/hostile-takeover | utilities/pack.py | 1 | 3017 | import struct
# Reads packed pdb files
#
class Pack:
def __init__(self, bytes):
self.bytes = bytes
self.directory = self.BuildDirectory()
def BuildDirectory(self):
bytes = self.GetRecord(0)
directory = []
for index in xrange(len(bytes) / 32):
entrybytes = b... | bsd-2-clause | -1,037,224,354,179,631,000 | 31.44086 | 76 | 0.494531 | false | 4.149931 | false | false | false |
vizydrop/apps | trello/cards.py | 1 | 6304 | import json
import sys
from tornado import gen
from tornado.httpclient import AsyncHTTPClient, HTTPError
from tornado.log import app_log
from vizydrop.sdk.source import DataSource, SourceSchema, SourceFilter
from vizydrop.fields import *
RESPONSE_SIZE_LIMIT = 10 # MB
class TrelloCardSourceFilters(SourceFilter):
... | mit | 6,113,621,792,367,971,000 | 39.935065 | 119 | 0.567576 | false | 4.166557 | false | false | false |
PyPlanet/PyPlanet | pyplanet/apps/contrib/transactions/view.py | 1 | 1338 | """
Donation Toolbar View.
"""
from pyplanet.views.generics.widget import WidgetView
class DonationToolbarWidget(WidgetView):
template_name = 'transactions/donation_toolbar.xml'
widget_x = -109.5
widget_y = 61
z_index = 30
game = None
def __init__(self, app):
"""
Initiate the toolbar view.
:param app:... | gpl-3.0 | 3,060,569,635,054,722,600 | 25.76 | 95 | 0.702541 | false | 2.973333 | false | false | false |
JohnKendrick/PDielec | PDielec/GulpOutputReader.py | 1 | 15555 | #!/usr/bin/python
#
# Copyright 2015 John Kendrick
#
# This file is part of PDielec
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied wa... | mit | -2,015,339,052,376,630,800 | 43.065156 | 129 | 0.570042 | false | 3.815305 | false | false | false |
tu-rbo/differentiable-particle-filters | methods/rnn.py | 1 | 11383 | import tensorflow as tf
import sonnet as snt
from utils.data_utils import *
from utils.method_utils import compute_sq_distance
class RNN():
def __init__(self, init_with_true_state=False, model='2lstm', **unused_kwargs):
self.placeholders = {'o': tf.placeholder('float32', [None, None, 24, 24, 3], 'observa... | mit | 2,288,420,109,362,520,600 | 47.438298 | 185 | 0.52104 | false | 3.485303 | false | false | false |
shypiguy/maze_image | maze_image.py | 1 | 13906 | #!/usr/bin/env python
#The MIT License (MIT)
#Copyright (c) 2016 Bill Jones
#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 us... | mit | 4,860,215,240,021,413,000 | 29.495614 | 183 | 0.558608 | false | 3.333174 | false | false | false |
siliconsmiley/QGIS | python/plugins/processing/algs/lidar/lastools/lasinfo.py | 1 | 4953 | # -*- coding: utf-8 -*-
"""
***************************************************************************
lasinfo.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
---------------------
D... | gpl-2.0 | 547,964,588,866,981,950 | 44.440367 | 139 | 0.593983 | false | 3.96875 | false | false | false |
NeilT-UK/python-utilities | time_funcs.py | 1 | 1025 | import time
import math
version = '1.0.1 2016 Dec 31'
""" utility functions for working with python time """
def seconds_to_round_time(start_time=None, secs=1):
""" return the number of seconds to wait to get to the next
even time, rounded up from the start
secs = 10 for 10 seconds boundaries, = 7200 for... | bsd-2-clause | 8,254,389,165,729,159,000 | 26.702703 | 69 | 0.619512 | false | 3.510274 | false | false | false |
erussell/jsoncompare | jsoncompare/test/test_jsoncompare.py | 1 | 13667 | #!/usr/bin/env python
import unittest
import sys, os
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
if not path in sys.path:
sys.path.insert(1, path)
import jsoncompare
class TestJSONCompare(unittest.TestCase):
def setUp(self):
pass
def test_list_of_hashes(self):
... | mit | -6,763,892,240,951,714,000 | 28.078723 | 103 | 0.418892 | false | 3.967199 | true | false | false |
drewp/tahoe-lafs | src/allmydata/web/storage.py | 1 | 10631 |
import time, simplejson
from nevow import rend, tags as T, inevow
from allmydata.web.common import getxmlfile, abbreviate_time, get_arg
from allmydata.util.abbreviate import abbreviate_space
from allmydata.util import time_format
def remove_prefix(s, prefix):
if not s.startswith(prefix):
return None
r... | gpl-2.0 | -6,166,995,373,296,628,000 | 39.422053 | 85 | 0.555545 | false | 3.879927 | false | false | false |
hydratk/hydratk-lib-network | src/hydratk/lib/network/dbi/nosql/redis_client.py | 1 | 6082 | # -*- coding: utf-8 -*-
"""Redis client
.. module:: network.dbi.nosql.redis_client
:platform: Unix
:synopsis: Redis client
.. moduleauthor:: Petr Rašek <bowman@hydratk.org>
"""
"""
Events:
-------
dbi_before_connect
dbi_after_connect
dbi_before_exec_command
dbi_after_exec_command
"""
from hydratk.core.master... | bsd-3-clause | -4,516,596,915,017,466,000 | 23.130952 | 111 | 0.50074 | false | 4.021825 | false | false | false |
chiang831/LeHavre | src/game/game_flow.py | 1 | 7146 | """This module handles the game flow."""
from game import enter_building_handler
from game import feeder
from game import feeding_handler
from game import take_resource_action
from game import resource
from game import resource_picker
from game.buildings import building_factory
class GameState(object):
PENDING_ADD_... | gpl-2.0 | 9,103,277,080,622,021,000 | 31.334842 | 80 | 0.719843 | false | 3.620061 | false | false | false |
pygeo/pycmbs | docs/source/mean_analysis.py | 1 | 1843 | """
This file is part of pyCMBS.
(c) 2012- Alexander Loew
For COPYING and LICENSE details, please refer to the LICENSE file
"""
from pycmbs.data import Data
from pycmbs.examples import download
import matplotlib.pyplot as plt
plt.close('all')
# load some sample data
# filename = '<THEINPUTFILE>'
filename = download... | mit | 8,554,439,017,477,775,000 | 23.573333 | 101 | 0.699946 | false | 2.977383 | false | false | false |
sunbingfengPI/OpenSFM_Test | opensfm/commands/match_features.py | 1 | 9080 | import logging
from itertools import combinations
from timeit import default_timer as timer
import numpy as np
import scipy.spatial as spatial
from opensfm import dataset
from opensfm import geo
from opensfm import io
from opensfm import log
from opensfm import matching
from opensfm.context import parallel_map
logg... | bsd-2-clause | 8,142,427,845,005,928,000 | 31.898551 | 88 | 0.576982 | false | 3.61753 | true | false | false |
Gaia3D/QGIS | python/plugins/db_manager/db_tree.py | 1 | 6041 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
Name : DB Manager
Description : Database manager plugin for QGIS
Date : May 23, 2011
copyright : (C) 2011 by Giuseppe Sucameli
email : brush.tyler@... | gpl-2.0 | 2,198,183,511,114,070,000 | 35.835366 | 151 | 0.564973 | false | 4.49145 | false | false | false |
qsnake/gpaw | tools/sphinx.py | 1 | 3150 | #!/usr/bin/python
import os
import sys
import time
import glob
import trace
import tempfile
tmpdir = tempfile.mkdtemp(prefix='gpaw-sphinx-')
os.chdir(tmpdir)
def build():
if os.system('svn export ' +
'https://svn.fysik.dtu.dk/projects/ase/trunk ase') != 0:
raise RuntimeError('Checkout of ... | gpl-3.0 | 1,007,059,240,243,068,800 | 31.8125 | 78 | 0.571746 | false | 3.220859 | false | false | false |
cpsimpson/pollcat | pollcat/local_settings.production.py | 1 | 1161 | import os.path
import os
PATH = os.path.abspath(os.path.dirname(__file__))
def relative(path):
return os.path.abspath(os.path.join(PATH, path))
BUCKET_NAME = "pollcat"
DEBUG = True
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N ... | mit | -8,226,140,943,181,741,000 | 20.127273 | 73 | 0.726098 | false | 3.087766 | false | false | false |
iEngage/python-sdk | iengage_client/models/verve_response_question_list.py | 1 | 5467 | # coding: utf-8
"""
Stakeholder engagement API
This API enables Intelligent Engagement for your Business. iEngage is a platform that combines process, augmented intelligence and rewards to help you intelligently engage customers.
OpenAPI spec version: 1.0
Generated by: https://github.com/swagger... | apache-2.0 | 1,057,024,620,867,088,500 | 25.283654 | 186 | 0.551491 | false | 4.495888 | false | false | false |
agoragames/kairos | kairos/redis_backend.py | 1 | 10113 | '''
Copyright (c) 2012-2017, Agora Games, LLC All rights reserved.
https://github.com/agoragames/kairos/blob/master/LICENSE.txt
'''
from .exceptions import *
from .timeseries import *
import operator
import sys
import time
import re
from urlparse import *
from redis import Redis
class RedisBackend(Timeseries):
'''... | bsd-3-clause | -3,131,842,435,592,910,000 | 30.021472 | 92 | 0.616533 | false | 3.627331 | true | false | false |
za-creature/moarcofy | moarcofy/views/photo.py | 1 | 3894 | # coding=utf-8
from __future__ import absolute_import, unicode_literals, division
from moarcofy.models import Photo, Album, User
from moarcofy.forms import PhotoForm, UploadPhotoForm
from moarcofy import app, config
from urllib import unquote_plus
from flask import session, request, url_for, abort, redirect, flash
"... | mit | 5,506,192,574,679,487,000 | 28.725191 | 75 | 0.633025 | false | 3.572477 | false | false | false |
mcalmer/spacewalk | client/rhel/rhn-client-tools/src/up2date_client/tui.py | 1 | 44751 | #
# TUI for RHN Registration
# Copyright (c) 2000--2016 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. Y... | gpl-2.0 | -1,797,399,567,700,286,000 | 32.124352 | 156 | 0.52667 | false | 3.832734 | false | false | false |
VcamX/grpc | src/python/grpcio/grpc/framework/foundation/relay.py | 1 | 5626 | # Copyright 2015-2016, 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 ... | bsd-3-clause | -5,681,146,096,468,184,000 | 31.333333 | 80 | 0.701386 | false | 4.14591 | false | false | false |
i32ropie/lol | plugins/update_rotation.py | 1 | 1637 | # -*- coding: utf-8 -*-
from config import *
from lxml import html
print(Color(
'{autored}[{/red}{autoyellow}+{/yellow}{autored}]{/red} {autocyan} update_rotation.py importado.{/cyan}'))
backward = {
'Chogath': 'ChoGath',
'FiddleSticks': 'Fiddlesticks',
'Leblanc': 'LeBlanc',
'Khazix': 'KhaZix',... | gpl-2.0 | 5,092,386,962,017,907,000 | 36.204545 | 143 | 0.584606 | false | 3.094518 | false | false | false |
4905ab/Keystroke_Dynamics_Accidentally_Kangaroo | API stuff/keyboard/Docs.py | 1 | 30800 | # -*- coding: utf-8 -*-
"""
keyboard
========
Take full control of your keyboard with this small Python library. Hook global events, register hotkeys, simulate key presses and much more.
## Features
- Global event hook on all keyboards (captures keys regardless of focus).
- **Listen** and **sends** keyboard events.
... | gpl-3.0 | 1,307,464,559,947,214,600 | 33.874292 | 140 | 0.640957 | false | 3.903283 | false | false | false |
rustychris/stompy | stompy/grid/paver_opt_mixin.py | 1 | 15083 | from __future__ import print_function
# Explore some possibilities for optimizing the grid.
import sys
import numpy as np
from scipy.linalg import norm
from ..spatial import field
class OptimizeGridMixin(object):
""" Meant to be mixed in with paver.Paving, to add some methods for optimizing a
grid.
"""... | mit | -8,018,216,923,040,349,000 | 36.150246 | 104 | 0.555659 | false | 3.833037 | false | false | false |
xiaojunwu/crosswalk-test-suite | wrt/wrt-sharemode-android-tests/inst.apk.py | 2 | 6335 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PKG_NAME = os.path.basename(SCRIPT_DIR)
TEST_PREFIX = os.environ['HOME']
PARAMETERS = None
ADB_CMD = "adb"
def do... | bsd-3-clause | 2,794,033,646,708,759,000 | 34.194444 | 163 | 0.563062 | false | 3.476948 | true | false | false |
zachdj/ultimate-tic-tac-toe | models/game/GlobalBoard.py | 1 | 6742 | from .Board import Board
from .LocalBoard import LocalBoard
from .Move import Move
class GlobalBoard(Board):
""" Represents the meta-board composed of a 3x3 grid of smaller tic-tac-toe boards
the optional 'board' parameter is used internally clone GlobalBoard objects
"""
def __init__(self, board=None... | mit | -4,064,359,935,952,108,500 | 37.525714 | 141 | 0.539158 | false | 3.908406 | false | false | false |
phenoxim/nova | nova/quota.py | 1 | 64345 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | apache-2.0 | 5,912,220,016,336,453,000 | 44.441384 | 79 | 0.583915 | false | 4.703238 | false | false | false |
dkamotsky/program-y | src/programy/parser/template/nodes/base.py | 1 | 3037 | """
Copyright (c) 2016 Keith Sterling
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, modify, merge, publish, distribute,... | mit | 4,482,648,955,121,281,500 | 37.443038 | 126 | 0.631544 | false | 4.183196 | false | false | false |
iamahuman/angr | angr/procedures/java_jni/__init__.py | 1 | 21400 |
import collections
import itertools
import logging
from archinfo import ArchSoot
from claripy import BVV, StrSubstr
from ...calling_conventions import DefaultCC
from ...sim_procedure import SimProcedure
from ...sim_type import SimTypeFunction
from ...state_plugins.sim_action_object import SimActionObject
l = loggin... | bsd-2-clause | 1,621,310,908,980,587,500 | 44.531915 | 107 | 0.727617 | false | 3.689019 | false | false | false |
tradej/pykickstart-old | tests/commands/raid.py | 1 | 11978 | #
# James Laska <jlaska@redhat.com>
#
# Copyright 2009 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2. This program is distributed in the hope that it
# will be useful... | gpl-2.0 | 8,975,237,336,816,349,000 | 50.407725 | 159 | 0.600184 | false | 3.249593 | true | false | false |
yarikoptic/NiPy-OLD | nipy/modalities/fmri/fmristat/tests/test_iterables.py | 1 | 2787 | import warnings
import numpy as np
from numpy.random import standard_normal as noise
from nipy.testing import *
from nipy.io.api import load_image
from nipy.modalities.fmri.api import FmriImageList, fmri_generator
from nipy.core.image.generators import *
from nipy.fixes.scipy.stats.models.regression import OLSModel as... | bsd-3-clause | 5,455,199,453,220,001,000 | 31.406977 | 74 | 0.659132 | false | 3.40293 | false | false | false |
pombredanne/viewflow | viewflow/flow/task_view.py | 1 | 9694 | """
Task performed by user in django view
"""
import functools
from django.core.urlresolvers import reverse
from django.conf.urls import url
from django.shortcuts import get_object_or_404
from ..activation import Activation, ViewActivation, STATUS
from ..exceptions import FlowRuntimeError
from . import base
def flo... | agpl-3.0 | 8,198,782,151,793,666,000 | 32.777003 | 110 | 0.582422 | false | 4.246167 | false | false | false |
mganeva/mantid | scripts/test/SANS/algorithm_detail/q_resolution_calculator_test.py | 1 | 8691 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | gpl-3.0 | 8,013,796,383,259,512,000 | 45.725806 | 121 | 0.624554 | false | 3.604728 | true | false | false |
Telefonica/toolium | toolium/test/test_visual_test.py | 1 | 27278 | # -*- coding: utf-8 -*-
u"""
Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
This file is part of Toolium.
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/lic... | apache-2.0 | 3,027,372,702,212,417,500 | 39.111765 | 130 | 0.702962 | false | 3.520847 | true | false | false |
microresearch/diana | poetry.py | 1 | 4669 | from __future__ import division
import re
import urllib2
from curses.ascii import isdigit
from nltk.corpus import cmudict
d = cmudict.dict()
from nltk.corpus.util import LazyCorpusLoader
from nltk.corpus.reader import *
suffdict = LazyCorpusLoader(
'cmusuffdict', CMUDictCorpusReader, ['cmusuffdict'])
suffdict = suf... | gpl-2.0 | 6,842,260,688,785,174,000 | 32.113475 | 122 | 0.599272 | false | 3.141992 | false | false | false |
luwei0917/awsemmd_script | small_script/old_CalcQValueFrom2Pdb.py | 1 | 5410 | #!/usr/bin/python
# ----------------------------------------------------------------------
# Copyright (2010) Aram Davtyan and Garegin Papoian
# Papoian's Group, University of Maryland at Collage Park
# http://papoian.chem.umd.edu/
# Last Update: 03/04/2011
# ---------------------------------------------------------... | mit | 8,921,692,502,833,676,000 | 25.262136 | 102 | 0.480407 | false | 2.7448 | false | false | false |
uliss/pddoc | pddoc/pd/xletcalcdatabase.py | 1 | 2106 | #!/usr/bin/env python
# coding=utf-8
# Copyright (C) 2015 by Serge Poltavski #
# serge.poltavski@gmail.com #
# #
# This program is free software; you can redistribut... | gpl-3.0 | -8,327,699,568,455,090,000 | 37.290909 | 97 | 0.528965 | false | 4.315574 | false | false | false |
jonasjberg/autonameow | autonameow/util/dateandtime.py | 1 | 10771 | # -*- coding: utf-8 -*-
# Copyright(c) 2016-2020 Jonas Sjöberg <autonameow@jonasjberg.com>
# Source repository: https://github.com/jonasjberg/autonameow
#
# This file is part of autonameow.
#
# autonameow is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public L... | gpl-2.0 | -3,044,839,683,369,256,400 | 30.491228 | 89 | 0.633798 | false | 3.856069 | false | false | false |
jpallas/beakerx | beakerx/beakerx/plot/chart.py | 1 | 19186 | # Copyright 2014 TWO SIGMA OPEN SOURCE, 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 agre... | apache-2.0 | -3,219,697,429,574,560,000 | 35.967245 | 87 | 0.570677 | false | 3.917109 | false | false | false |
ewan-klein/carneades | src/carneades/caes.py | 1 | 27993 | # Carneades Argument Evaluation Structure
#
# Copyright (C) 2014 Ewan Klein
# Author: Ewan Klein <ewan@inf.ed.ac.uk>
# Based on: https://hackage.haskell.org/package/CarneadesDSL
#
# For license information, see LICENSE
"""
==========
Overview
==========
Propositions
============
First, let's create some proposition... | apache-2.0 | -2,221,685,101,399,882,500 | 32.524551 | 94 | 0.617404 | false | 3.929945 | false | false | false |
interactiveinstitute/watthappened | python_modules/http_parser/reader.py | 1 | 3004 | # -*- coding: utf-8 -
#
# This file is part of http-parser released under the MIT license.
# See the NOTICE for more information.
from io import DEFAULT_BUFFER_SIZE, RawIOBase
from http_parser.util import StringIO
class HttpBodyReader(RawIOBase):
""" Raw implementation to stream http body """
def __init__... | mit | 946,257,316,416,803,600 | 26.559633 | 75 | 0.567577 | false | 4.103825 | false | false | false |
PlushBeaver/FanFicFare | fanficfare/adapters/adapter_imagineeficcom.py | 1 | 11578 | # -*- coding: utf-8 -*-
# Copyright 2013 Fanficdownloader team, 2015 FanFicFare 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
#
# Un... | gpl-3.0 | 6,329,455,654,924,543,000 | 39.062284 | 157 | 0.574192 | false | 4.118819 | true | false | false |
ODM2/ODMToolsPython | odmtools/odmdata/variable.py | 1 | 1440 | from sqlalchemy import Column, Integer, String, ForeignKey, Boolean, Float
from sqlalchemy.orm import relationship
from base import Base
from unit import Unit
class Variable(Base):
__tablename__ = 'Variables'
id = Column('VariableID', Integer, primary_key=True)
code = Column('VariableCode', String, nul... | bsd-3-clause | -8,544,946,171,026,487,000 | 50.464286 | 145 | 0.718056 | false | 3.412322 | false | false | false |
sniemi/SamPy | sandbox/src1/TCSE3-3rd-examples/src/py/regex/swap3.py | 1 | 1352 | #!/usr/bin/env python
import re, glob, string
# as swap1.py except that we here use a regex with comments and compile it:
arg = r'[^,]+'
call = re.compile(r"""
(?P<start> # preserve start of function string
superLibFunc # name of function to match
\s* # optional whitespace
... | bsd-2-clause | 4,982,227,112,619,208,000 | 41.25 | 75 | 0.527367 | false | 3.714286 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/connection_monitor_py3.py | 1 | 2460 | # 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 | -2,190,643,743,387,336,000 | 40.694915 | 159 | 0.634553 | false | 4.377224 | false | false | false |
uktrade/directory-ui-supplier | find_a_supplier/helpers.py | 1 | 2102 | from urllib.parse import urlencode
from django.http import Http404
from django.core.urlresolvers import reverse
from directory_api_client.client import api_client
from directory_constants import choices
from core.helpers import CompanyParser
INDUSTRY_CHOICES = dict(choices.INDUSTRIES)
def pair_sector_values_with_... | mit | -7,699,569,389,846,623,000 | 27.794521 | 78 | 0.671741 | false | 3.526846 | false | false | false |
heschlie/Zachariah | platform.py | 1 | 2913 | import pygame, sys
from pygame.locals import *
class Platform(pygame.sprite.Sprite):
def __init__(self, loc, *groups):
super(Platform, self).__init__(*groups)
self.start = loc
self.image = pygame.image.load('images/platform.png').convert_alpha()
self.rect = self.image.get_rect()
... | gpl-2.0 | 5,423,952,793,749,526,000 | 36.358974 | 112 | 0.534844 | false | 3.22949 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.