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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
diplomacy/research | diplomacy_research/models/layers/noisy_networks.py | 1 | 4039 | # ==============================================================================
# Copyright 2019 - Philip Paquette
#
# NOTICE: 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 | 3,073,660,035,282,352,000 | 48.256098 | 122 | 0.615499 | false | 4.428728 | false | false | false |
plang85/rough_surfaces | rough_surfaces/surface.py | 1 | 2746 | import numpy as np
class Surface(np.ndarray):
"""
One- or two-dimensional surface height representation.
The assumption upon which this framework is based is a uniform lattice size in both directions.
This is tightly integrated here. 'Surface' is the fundamental class that most modules build
upon... | mit | 1,258,035,149,484,728,000 | 29.853933 | 102 | 0.639476 | false | 3.547804 | false | false | false |
cleemesser/eeg-hdfstorage | scripts/edf2eeghdf.py | 1 | 51534 | # -*- coding: utf-8 -*-
from __future__ import division, absolute_import, print_function # py2.6 with_statement
import sys
import pprint
import h5py
import numpy as np
import os.path
# date related stuff
import datetime
import dateutil
import dateutil.tz
import dateutil.parser
import arrow
# compatibility
import f... | bsd-3-clause | 4,465,477,519,905,432,000 | 38.825348 | 170 | 0.561707 | false | 3.670513 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/azure_reachability_report_py3.py | 1 | 1995 | # 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 | 6,542,636,260,886,058,000 | 40.5625 | 108 | 0.649624 | false | 4.453125 | false | false | false |
lavish205/olympia | src/olympia/reviewers/tests/test_views.py | 1 | 210461 | # -*- coding: utf-8 -*-
import json
import os
import time
import urlparse
from collections import OrderedDict
from datetime import datetime, timedelta
from django.conf import settings
from django.core import mail
from django.core.cache import cache
from django.core.files import temp
from django.core.files.base import... | bsd-3-clause | -4,432,391,639,027,054,000 | 41.218142 | 79 | 0.612274 | false | 3.840115 | true | false | false |
gitizenme/ImprovWithAlexa | improvwithalexa_function.py | 1 | 6601 | import logging
from flask import Flask, render_template
from flask_ask import Ask, statement, question, session
from chatterbot import ChatBot
app = Flask(__name__)
ask = Ask(app, "/")
logging.getLogger("flask_ask").setLevel(logging.DEBUG)
# Create a new instance of a ChatBot
chatbot = ChatBot(
"Improv",
read... | mit | 8,936,383,049,406,293,000 | 24.098859 | 441 | 0.641115 | false | 3.23896 | false | false | false |
endlessm/chromium-browser | third_party/angle/third_party/VK-GL-CTS/src/scripts/caselist_diff.py | 6 | 15197 | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# drawElements Quality Program utilities
# --------------------------------------
#
# Copyright 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use t... | bsd-3-clause | -6,694,891,574,763,381,000 | 72.415459 | 176 | 0.719813 | false | 2.689259 | false | false | false |
witlox/elasticluster | elasticluster/providers/ec2_boto.py | 1 | 25751 | #
# Copyright (C) 2013, 2018 S3IT, University of Zurich
#
# 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 progr... | gpl-3.0 | 4,051,944,693,585,966,600 | 39.425432 | 115 | 0.568405 | false | 4.45057 | false | false | false |
blekhmanlab/hominid | hominid/sort_results.py | 1 | 6152 | """
Read a rvcf file with stability selection scores for taxa.
Sort the dataframe by rsq_median.
Print results.
usage:
python sort_results.py \
../example/stability_selection_example_output.vcf \
../example/hominid_example_taxon_table_input.txt \
arcsinsqrt \
0.5 \
10
"""
im... | mit | -8,981,641,414,200,290,000 | 41.136986 | 112 | 0.519831 | false | 3.429208 | false | false | false |
tejasnikumbh/Algorithms | ArraysAndSorting/MarkAndToys.py | 1 | 1514 | '''
In place quickSort The quickSort Method
Time Complexity : Best,Avg - O(NlogN) , Worst - O(N^2)
Space Complexity : O(N)
Auxilary Space : O(logN) for the stack frames
'''
def quickSort(a,start,end):
if(start >= end): return a
else:
pivot = a[end]
swapIndex = start
for i in... | bsd-2-clause | 122,863,958,827,943,060 | 28.686275 | 82 | 0.562087 | false | 3.425339 | false | false | false |
openmips/stbgui | lib/python/Components/ServiceScan.py | 1 | 9086 | from enigma import eComponentScan, iDVBFrontend, eTimer
from Components.NimManager import nimmanager as nimmgr
from Tools.Transponder import getChannelNumber
class ServiceScan:
Idle = 1
Running = 2
Done = 3
Error = 4
DonePartially = 5
Errors = {
0: _("error starting scanning"),
1: _("error while scanning")... | gpl-2.0 | 5,148,115,482,864,712,000 | 37.016736 | 152 | 0.619194 | false | 2.752499 | false | false | false |
donbixler/xhtml2pdf | xhtml2pdf/parser.py | 1 | 24988 | # -*- coding: utf-8 -*-
# Copyright 2010 Dirk Holtwick, holtwick.it
#
# 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 ... | apache-2.0 | -1,639,543,538,045,728,800 | 34.494318 | 117 | 0.581279 | false | 3.732338 | false | false | false |
Dioptas/Dioptas | dioptas/model/util/BackgroundExtraction.py | 1 | 2873 | # -*- coding: utf-8 -*-
# Dioptas - GUI program for fast processing of 2D X-ray diffraction data
# Principal author: Clemens Prescher (clemens.prescher@gmail.com)
# Copyright (C) 2014-2019 GSECARS, University of Chicago, USA
# Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany
... | gpl-3.0 | -2,083,473,547,483,108,400 | 42.530303 | 128 | 0.679777 | false | 3.856376 | false | false | false |
quru/wagtail | wagtail/wagtailimages/models.py | 1 | 17958 | from __future__ import absolute_import, unicode_literals
import hashlib
import os.path
from collections import OrderedDict
from contextlib import contextmanager
import django
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.files import File
from django.core.ur... | bsd-3-clause | -9,143,806,606,278,823,000 | 33.402299 | 111 | 0.622452 | false | 4.159833 | false | false | false |
hehongliang/tensorflow | tensorflow/python/keras/optimizer_v2/ftrl_test.py | 1 | 17276 | # 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... | apache-2.0 | 2,758,639,719,121,693,000 | 39.553991 | 80 | 0.620167 | false | 3.507817 | true | false | false |
maxtangli/sonico | language/python/teabreak/final_hint.py | 1 | 1056 | def intelligent_data_source_factory(*data):
import itertools
cy = itertools.cycle(data)
_int = int
return lambda i: _int(i) if isinstance(i, str) else next(cy)
int = intelligent_data_source_factory(1985, 33067, 84)
# int = intelligent_data_source_factory(2012, 9, 30) # invalid
# int = intelligent_d... | mit | 7,963,685,116,978,258,000 | 28.333333 | 71 | 0.571023 | false | 2.735751 | false | false | false |
mory0tiki/pack-llama | views.py | 1 | 1220 | from django.core.files.base import ContentFile
from django.shortcuts import render
from django.http.response import HttpResponse
from django.views.generic import base
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.conf import settings
import ast
imp... | apache-2.0 | 5,642,803,948,910,530,000 | 32.888889 | 78 | 0.62623 | false | 4.341637 | false | false | false |
JackCloudman/Youtube-music | download.py | 1 | 1342 | #Program to download Yotube music
#Author: Jack Cloudman
import pafy,os,shutil
from pydub import AudioSegment as convert
#Create song list
if os.path.exists('songs.txt'):
pass
else:
print("Creating songs.txt....")
document= open('songs.txt','w')
print("Paste yours songs in songs.txt")
d... | gpl-3.0 | -262,824,265,426,975,650 | 26.553191 | 73 | 0.622206 | false | 3.321782 | false | false | false |
jfalkner/Efficient-Django-QuerySet-Use | demo-optimized/example/utils.py | 1 | 3812 | from django.utils.timezone import utc
from django_db_utils import pg_bulk_update
from example.models import Sample, SampleStatus
def now():
from datetime import datetime
return datetime.utcnow().replace(tzinfo=utc)
def make_fake_data(samples_to_make=100000, batch_threshold=100000, delete_existing=True, ma... | mit | 361,137,351,912,115,300 | 39.126316 | 178 | 0.647692 | false | 3.909744 | false | false | false |
cloudbase/coriolis | coriolis/wsman.py | 1 | 6173 | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
import base64
from oslo_log import log as logging
import requests
from winrm import protocol
from winrm import exceptions as winrm_exceptions
from coriolis import exception
from coriolis import utils
AUTH_BASIC = "basic"
AUTH_KERBEROS = "kerberos"
AUTH... | agpl-3.0 | -159,369,638,874,737,570 | 36.640244 | 82 | 0.581403 | false | 3.872647 | false | false | false |
kirienko/gourmet | src/gourmet/importers/plaintext_importer.py | 1 | 4803 | import re
from gourmet import check_encodings
from gourmet.gdebug import debug
from gourmet.i18n import _
from gourmet.importers import importer
class TextImporter (importer.Importer):
ATTR_DICT = {'Recipe By':'source',
'Serving Size':'servings',
'Preparation Time':'preptime',
... | gpl-2.0 | -4,688,046,965,670,273,000 | 36.818898 | 100 | 0.531335 | false | 3.940115 | false | false | false |
mark-me/Pi-Jukebox | venv/Lib/site-packages/pygame/ftfont.py | 1 | 6239 | """pygame module for loading and rendering fonts (freetype alternative)"""
__all__ = ['Font', 'init', 'quit', 'get_default_font', 'get_init', 'SysFont']
from pygame._freetype import init, Font as _Font, get_default_resolution
from pygame._freetype import quit, get_default_font, get_init as _get_init
from pygame._free... | agpl-3.0 | 7,635,080,894,809,608,000 | 32.363636 | 92 | 0.608431 | false | 4.056567 | false | false | false |
google/ffn | ffn/utils/vector_pb2.py | 1 | 15524 | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | apache-2.0 | 395,596,101,208,389,570 | 30.361616 | 969 | 0.690157 | false | 2.99749 | false | false | false |
poppogbr/genropy | packages/hosting/webpages/client.py | 1 | 8379 | #!/usr/bin/env python
# encoding: utf-8
"""
Created by Softwell on 2008-07-10.
Copyright (c) 2008 Softwell. All rights reserved.
"""
# --------------------------- GnrWebPage Standard header ---------------------------
from gnr.core.gnrbag import Bag
class GnrCustomWebPage(object):
maintable = 'hosting.client'
... | lgpl-2.1 | 4,752,140,607,337,308,000 | 47.155172 | 117 | 0.546963 | false | 4.229682 | false | false | false |
hugohmk/Epidemic-Emulator | main.py | 1 | 7208 | from epidemic_emulator import node
from datetime import datetime
import platform
import argparse
import time
import os
import matplotlib.pyplot as plt
import random
def parse_network(f, node_id, topology = "clique"):
neighbors = []
nd = None
t = datetime.now()
t = t-t
net = []
index = -1
... | mit | 6,437,179,172,426,943,000 | 33.161137 | 138 | 0.489734 | false | 4.21028 | false | false | false |
JazzeYoung/VeryDeepAutoEncoder | theano/gpuarray/opt.py | 1 | 39678 | from __future__ import absolute_import, print_function, division
import copy
import numpy
import logging
import pdb
from six.moves import xrange
import theano
from theano import tensor, scalar, gof, config
from theano.compile import optdb
from theano.compile.ops import shape_i
from theano.gof import (local_optimizer, ... | bsd-3-clause | -5,803,320,694,378,629,000 | 34.113274 | 87 | 0.599526 | false | 3.479 | false | false | false |
subins2000/TorrentBro | torrentbro/lib/tpb/constants.py | 1 | 3066 | import sys
if sys.version_info >= (3, 0):
class_type = type
else:
from new import classobj
class_type = classobj
class ConstantType(type):
"""
Tree representation metaclass for class attributes. Metaclass is extended
to all child classes too.
"""
def __new__(cls, clsname, bases, dct):... | gpl-3.0 | -6,296,941,637,029,682,000 | 21.217391 | 80 | 0.483366 | false | 4.093458 | false | false | false |
wikimedia/user_metrics | user_metrics/api/run.py | 1 | 4196 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This module defines the entry point for flask_ web server implementation
of the Wikimedia User Metrics API. This module is consumable
by the Apache web server via WSGI interface via mod_wsgi. An Apache
server can be pointed to api.wsgi such that Apache ma... | bsd-3-clause | 5,606,985,563,411,942,000 | 32.568 | 78 | 0.547188 | false | 3.958491 | false | false | false |
benosteen/mypaint | gui/brushcreationwidget.py | 1 | 9333 | # This file is part of MyPaint.
# Copyright (C) 2009 by Martin Renold <martinxyz@gmx.ch>
#
# 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) ... | gpl-2.0 | 4,452,946,291,741,899,300 | 35.457031 | 100 | 0.605807 | false | 3.571757 | false | false | false |
dietrichc/streamline-ppc-reports | examples/dfp/v201405/label_service/get_labels_by_statement.py | 1 | 1743 | #!/usr/bin/python
#
# Copyright 2014 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 b... | apache-2.0 | -264,873,779,856,759,300 | 30.690909 | 77 | 0.703385 | false | 3.908072 | false | false | false |
ryfeus/lambda-packs | Pandas_numpy/source/numpy/core/_internal.py | 3 | 21639 | """
A place for code to be called from core C-code.
Some things are more easily handled Python.
"""
from __future__ import division, absolute_import, print_function
import re
import sys
from numpy.compat import basestring
from .multiarray import dtype, array, ndarray
try:
import ctypes
except ImportError:
c... | mit | -6,998,548,371,938,173,000 | 27.698939 | 82 | 0.526411 | false | 3.833304 | false | false | false |
Taifxx/xxtrep | context.addtolib/resources/lib/ext/base/tags.py | 1 | 15746 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2014 Martijn Kaijser
#
# 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 ... | gpl-3.0 | -7,829,866,278,117,454,000 | 31.262295 | 261 | 0.560658 | false | 2.624875 | false | false | false |
yingcuhk/LeetCode | Algorithms/#303 Range Sum Query - Immutable/PythonCode.py | 1 | 1082 | """
Given an integer array nums, find the sum of the elements between indices i and j (i ¡Ü j), inclusive.
Example:
Given nums = [-2, 0, 3, -5, 2, -1]
sumRange(0, 2) -> 1
sumRange(2, 5) -> -1
sumRange(0, 5) -> -3
Note:
You may assume that the array does not change.
There are many calls to sumRange function.
"""
cl... | mit | 6,948,932,555,707,017,000 | 22.042553 | 102 | 0.550832 | false | 3.145349 | false | false | false |
vascotenner/holoviews | holoviews/plotting/mpl/annotation.py | 1 | 3913 | import matplotlib
from matplotlib import patches as patches
from ...core.util import match_spec
from ...core.options import abbreviated_exception
from .element import ElementPlot
class AnnotationPlot(ElementPlot):
"""
AnnotationPlot handles the display of all annotation elements.
"""
def __init__(se... | bsd-3-clause | -3,434,174,948,459,445,000 | 34.899083 | 92 | 0.620751 | false | 4.131996 | false | false | false |
Dacelonid/gerrymander | gerrymander/reports.py | 1 | 49794 | #
# Copyright (C) 2014 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 to in wr... | apache-2.0 | 1,719,606,987,100,816,600 | 37.750195 | 116 | 0.540989 | false | 4.298886 | false | false | false |
ebrensi/registry-frontend | ff.py | 1 | 1240 | #! usr/bin/env python
# This script is for testing without having to host the flask app.
import folium
import pandas as pd
import os
from sqlalchemy import create_engine
import geojson
DATABASE_URL = os.environ["DATABASE_URL"]
STATES_GEOJSON_PATH = "static/us-states.json"
engine = create_engine(DATABASE_URL)
with e... | mit | -3,929,384,207,766,329,000 | 25.956522 | 72 | 0.691935 | false | 3.246073 | false | false | false |
cattleio/stampede | docs/do-demo/deploy.py | 1 | 6809 | #!/usr/bin/env python
import cattle
import sys
ZK_NODES = 3
REDIS_NODES = 3
API_SERVER_NODES = 3
PROCESS_SERVER_NODES = 3
AGENT_SERVER_NODES = 3
MYSQL_COMPUTE = 1
# Set if you want to override the cattle.jar in the Docker image with a custom one
URL = ''
TAG = 'latest'
client = cattle.from_env()
def wait(c):
re... | apache-2.0 | -6,914,724,294,481,272,000 | 33.21608 | 107 | 0.500661 | false | 4.13921 | false | false | false |
Aydarkhan/cca | automata.py | 1 | 5250 | """Copyright 2010 Aydarkhanov Ruslan, Kurochkin Ilya, Rusinov Ivan
This file is part of CCA.
CCA 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 ver... | gpl-2.0 | 5,469,230,736,711,367,000 | 30.25 | 68 | 0.60781 | false | 2.924791 | false | false | false |
nonamenix/yandex-vesna-generator | yandex_vesna_generator/vesna.py | 1 | 2537 | # -*- coding: utf-8 -*-
from lxml import etree
from slugify import slugify
class Entry(object):
def __init__(self, title="", paragraphs=[], themes=[], **kwargs):
self.title = title
self.paragraphs = paragraphs
self.themes = themes
self.header_wrapper = kwargs.get("header_wrapper", ... | apache-2.0 | -2,670,042,156,606,405,000 | 33.216216 | 108 | 0.575267 | false | 3.476648 | false | false | false |
razorpay/razorpay-python | tests/test_client_utility.py | 1 | 1858 | import responses
from .helpers import mock_file, ClientTestCase
from razorpay.errors import SignatureVerificationError
class TestClientValidator(ClientTestCase):
def setUp(self):
super(TestClientValidator, self).setUp()
@responses.activate
def test_verify_payment_signature(self):
sig = ... | mit | 4,018,015,657,456,469,500 | 31.596491 | 80 | 0.653929 | false | 3.799591 | true | false | false |
nosuchtim/VizBench | src/PyLoopyCam/testit.py | 1 | 5268 | """
Copyright (c) 2015, Tim Thompson
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the followi... | mit | 7,051,323,283,669,740,000 | 24.205742 | 80 | 0.705201 | false | 3.26192 | false | false | false |
juntalis/aio-pika | docs/source/rabbitmq-tutorial/examples/3-publish-subscribe/receive_logs.py | 1 | 1064 | import asyncio
from aio_pika import connect, IncomingMessage, ExchangeType
loop = asyncio.get_event_loop()
def on_message(message: IncomingMessage):
with message.process():
print("[x] %r" % message.body)
async def main():
# Perform connection
connection = await connect("amqp://guest:guest@local... | apache-2.0 | 1,176,001,167,043,564,000 | 24.95122 | 93 | 0.675752 | false | 3.8 | false | false | false |
griddynamics/bunch | lettuce_bunch/dependencies.py | 1 | 2875 | # -*- coding: utf-8 -*-
# <Bunch - BDD test tool for Lettuce scenarios>
# Copyright (c) 2012 Grid Dynamics Consulting Services, Inc, All Rights Reserved
# http://www.griddynamics.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as ... | gpl-3.0 | 8,455,682,489,359,907,000 | 39.666667 | 109 | 0.712348 | false | 3.869448 | false | false | false |
tonyshardlow/reg_sde | run_pf.py | 1 | 1560 | from __future__ import (absolute_import, division,
print_function, unicode_literals)
exec(open("ground.py").read())
# mine
import hamiltonian
import diffeo
import sde
from utility import *
#
#
# all data defined in utility (exp2,...)
#
def run(dict):
import os.path
if 'fnam... | mit | 5,528,959,925,701,617,000 | 25.857143 | 68 | 0.523077 | false | 3.035019 | false | false | false |
xbed/Mixly_Arduino | mixly_arduino/mpBuild/ESP32_MixGo/lib/mixgo.py | 1 | 5214 | from machine import Pin
from machine import PWM
from machine import ADC
from machine import DAC
from machine import I2C
from machine import Timer
from machine import RTC
from machine import TouchPad
import time
from neopixel import NeoPixel
def get_brightness(pin = 39):
return ADCSensor(pin).read()
def get_soundl... | apache-2.0 | -1,362,624,201,661,192,700 | 25.472081 | 69 | 0.528002 | false | 3.150453 | false | false | false |
tea321000/django-project | musicsite/music/migrations/0002_auto_20170305_2121.py | 1 | 1364 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-03-05 13:21
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('music', '0001_initial'),
]
operations = [
mi... | mit | -5,270,324,763,746,811,000 | 32.268293 | 145 | 0.579179 | false | 3.706522 | false | false | false |
mRokita/DPLib | dplib/server.py | 1 | 47676 | # DPLib - Asynchronous bot framework for Digital Paint: Paintball 2 servers
# Copyright (C) 2017 Michał Rokita
#
# 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 L... | agpl-3.0 | -7,791,786,125,953,492,000 | 33.949413 | 535 | 0.543832 | false | 3.845986 | false | false | false |
mgeorgehansen/FIFE_Technomage | engine/python/fife/extensions/fife_settings.py | 1 | 15915 | # -*- coding: utf-8 -*-
# ####################################################################
# Copyright (C) 2005-2010 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 | 3,252,405,455,924,976,600 | 32.861702 | 169 | 0.711781 | false | 3.47565 | false | false | false |
aenon/OnlineJudge | leetcode/5.BitManipulation/477.TotalHammingDistance.py | 1 | 1100 | # 477. Total Hamming Distance
# The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
# Now your job is to find the total Hamming distance between all pairs of the given numbers.
# Example:
# Input: 4, 14, 2
# Output: 6
# Explanation: In binary represe... | mit | -7,870,830,576,520,058,000 | 31.382353 | 117 | 0.626364 | false | 3.536977 | false | false | false |
f-prettyland/angr | angr/engines/vex/statements/loadg.py | 1 | 2392 | from .... import sim_options as o
from ....state_plugins.sim_action_object import SimActionObject
from ....state_plugins.sim_action import SimActionData
from . import SimIRStmt, SimStatementError
class SimIRStmt_LoadG(SimIRStmt):
def _execute(self):
addr = self._translate_expr(self.stmt.addr)
alt ... | bsd-2-clause | -9,205,185,699,880,460,000 | 49.893617 | 162 | 0.621237 | false | 3.441727 | false | false | false |
moozilla/dvcticker | dvcticker/main.py | 1 | 12328 | #todo: raise exceptions, then catch them to generate error images
import webapp2
from google.appengine.api import urlfetch
import json
from PIL import Image, ImageDraw, ImageFont
from google.appengine.api import memcache
import StringIO
import jinja2
import os
from decimal import * #used fixed point math for better ac... | mit | 2,237,923,900,706,341,600 | 43.666667 | 188 | 0.589066 | false | 3.539477 | false | false | false |
seanjtaylor/out-for-justice | scripts/test_optimize.py | 1 | 1921 |
import random
import pickle
import numpy as np
import networkx as nx
from app.optim import slow_compute_loss, step
def main(input_file, num_police, num_steps, prob_step):
"""
Parameters
----------
num_police : the number of police to use
num_steps : the number of steps to take
prob_step : th... | mit | 3,145,182,075,389,221,000 | 25.680556 | 75 | 0.63925 | false | 3.63138 | false | false | false |
dothiko/mypaint | lib/layer/test.py | 1 | 1433 | # This file is part of MyPaint.
# Copyright (C) 2011-2015 by Andrew Chadwick <a.t.chadwick@gmail.com>
# Copyright (C) 2007-2012 by Martin Renold <martinxyz@gmx.ch>
#
# 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 S... | gpl-2.0 | 8,603,394,478,543,778,000 | 35.74359 | 73 | 0.707606 | false | 3.220225 | false | false | false |
delimitry/ascii_clock | asciicanvas.py | 1 | 6119 | #-*- coding: utf-8 -*-
#-----------------------------------------------------------------------
# Author: delimitry
#-----------------------------------------------------------------------
class AsciiCanvas(object):
"""
ASCII canvas for drawing in console using ASCII chars
"""
def __init__(self, cols... | mit | 5,868,139,019,117,371,000 | 36.771605 | 87 | 0.440758 | false | 3.588856 | false | false | false |
m4nh/roars | scripts/nodes/examples/arp_detector_example.py | 1 | 2688 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from roars.rosutils.rosnode import RosNode
from roars.vision.cameras import CameraRGB
from roars.vision.arucoutils import MarkerDetector
from roars.vision.arp import ARP
import roars.vision.cvutils as cvutils
import cv2
import numpy as np
import os
import json
#⬢⬢⬢⬢⬢➤ N... | gpl-3.0 | 4,086,218,510,693,855,000 | 23.571429 | 73 | 0.625581 | false | 2.724393 | true | false | false |
IFAEControl/pirelay | pirelay/server.py | 1 | 1591 | #!/usr/bin/env python3
import time
from concurrent import futures
import grpc
from .protos import pirelay_pb2
from .protos import pirelay_pb2_grpc
from .relay import RelaysArray
_ONE_DAY_IN_SECONDS = 60 * 60 * 24
PINS = [21]
class PiRelayServer(pirelay_pb2_grpc.PiRelayServicer):
def __init__(self, bcm_pins... | lgpl-3.0 | -4,084,407,837,345,929,700 | 25.966102 | 79 | 0.574481 | false | 3.649083 | false | false | false |
tensorflow/model-optimization | tensorflow_model_optimization/g3doc/tools/build_docs.py | 1 | 3663 | # Copyright 2019 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 | 1,166,959,432,661,376,000 | 33.556604 | 110 | 0.677041 | false | 4.097315 | false | false | false |
owlabs/incubator-airflow | airflow/executors/__init__.py | 1 | 3891 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 | -8,116,916,838,794,192,000 | 36.776699 | 89 | 0.72038 | false | 4.347486 | false | false | false |
suutari/shoop | shuup/notify/template.py | 1 | 3011 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.utils.encoding... | agpl-3.0 | -5,120,846,759,464,826,000 | 32.831461 | 103 | 0.645965 | false | 4.23488 | false | false | false |
danic96/Practica1 | Practica1/Aplicacio/views.py | 1 | 4321 | # from django.shortcuts import render
# Create your views here.
# from django.http import HttpResponse
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.views.generic.edit import CreateView, UpdateView
from django.views.generic import DetailVi... | mit | 6,965,548,810,274,474,000 | 27.058442 | 93 | 0.707938 | false | 3.889289 | false | false | false |
CorundumGames/Invasodado | game/ufo.py | 1 | 3605 | from math import sin
from random import choice, uniform, expovariate
from pygame import Rect
from core import color
from core import config
from core.particles import ParticleEmitter
from game.block import get_block
from game.gameobject import GameObject
from game import gamedata
### Co... | gpl-3.0 | -1,058,903,097,034,391,700 | 32.700935 | 88 | 0.530929 | false | 3.583499 | false | false | false |
parksandwildlife/wastd | occurrence/migrations/0006_auto_20181129_1812.py | 1 | 1084 | # Generated by Django 2.0.8 on 2018-11-29 10:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('occurrence', '0005_auto_20181025_1720'),
]
operations = [
migrations.AlterField(
model_name='areaencounter',
name='s... | mit | -6,071,923,042,693,717,000 | 59.222222 | 738 | 0.671587 | false | 3.519481 | false | false | false |
csdms/dakota | dakotathon/tests/test_plugin_hydrotrend_run.py | 1 | 3466 | #!/usr/bin/env python
#
# Test running the dakota.plugin.hydrotrend module.
#
# Call with:
# $ nosetests -sv
#
# Mark Piper (mark.piper@colorado.edu)
import os
import shutil
# import filecmp
import glob
from nose.tools import with_setup, assert_true
from dakotathon.dakota import Dakota
from dakotathon.plugins.hydro... | mit | -8,400,592,787,912,912,000 | 31.092593 | 81 | 0.617426 | false | 3.16819 | true | false | false |
kysolvik/reservoir-id | reservoir-id/classifier_train.py | 1 | 6974 | #!/usr/bin/env python
"""
Train random forest classifier
Inputs: CSV from build_att_table, small area cutoff
Outputs: Packaged up Random Forest model
@authors: Kylen Solvik
Date Create: 3/17/17
"""
# Load libraries
import pandas as pd
from sklearn import model_selection
from sklearn import preprocessing
from sklearn.... | gpl-3.0 | -8,813,554,001,576,761,000 | 37.10929 | 88 | 0.57571 | false | 3.680211 | true | false | false |
ambitioninc/django-user-guide | user_guide/templatetags/user_guide_tags.py | 1 | 2767 | """
Template tag for displaying user guides.
"""
import re
from django import template
from django.conf import settings
from django.template import loader
from django.template.defaulttags import CsrfTokenNode
from user_guide.models import GuideInfo
register = template.Library()
# The maximum number of guides to sh... | mit | -4,151,106,416,245,228,000 | 31.940476 | 113 | 0.62378 | false | 3.650396 | false | false | false |
praekelt/django-ultracache | bin/cache-purge-consumer.py | 1 | 3973 | """Subscribe to RabbitMQ and listen for purge instructions continuously. Manage
this script through eg. supervisor."""
import json
import traceback
from multiprocessing.pool import ThreadPool
from optparse import OptionParser
from time import sleep
import pika
import requests
import yaml
class Consumer:
channe... | bsd-3-clause | -856,625,678,671,990,400 | 31.300813 | 83 | 0.511956 | false | 4.489266 | true | false | false |
myriasofo/CLRS_exercises | algos/testSuite.py | 1 | 6292 | ''' WHAT: Simple test framework for checking algorithms
TASK:
*Handle output that's an object, eg. bst that gets modified
*option3: optional param - Class (accept input/output as arrays and TURN INTO object)
(option1: optional param - comparison function (instead of simple "!=")
(option2: optional param - Class (autom... | mit | -4,231,904,569,753,463,300 | 30.148515 | 108 | 0.578512 | false | 4.205882 | true | false | false |
tis-intern-apparel/ApparelStrategy | server/dialogue_system/module/database.py | 1 | 5633 | # -*- coding: utf-8 -*-
import os
import codecs
class Personal:
point_id = ''
user_name = ''
user_pronoun = ''
sex = ''
phone = ''
email = ''
address = ''
class Cloth:
cloth_name = ''
color_code = ''
small_type = ''
price = ''
image_url = ''
big_type = ''
cloth... | mit | 3,080,065,227,675,096,000 | 28.005155 | 96 | 0.52568 | false | 3.709295 | false | false | false |
agoose77/hivesystem | tutorial/layers/layer17/layers.py | 1 | 2334 | from __future__ import print_function
# import the main and action components
from maincomponent import maincomponent
from action1 import action1component
from action2 import action2component
from action3 import action3component
#import manager components
from action3components import animationmanager
from action3com... | bsd-2-clause | 2,937,745,632,804,940,000 | 25.522727 | 70 | 0.696658 | false | 4.116402 | false | false | false |
DrSkippy/Gravitational-Three-Body-Symmetric | sim_pendulum.py | 1 | 1975 | #!/usr/bin/env python
import csv
import sys
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
plt.style.use('ggplot')
# arg 1 = w init
# arg 2 = n periods
# arg 3 = n ratio
# time step
dt = np.float64(0.00010)
# constants
L_0 = np.float64(1.0) # unstretched length
g = np.float64(9.81) # grav... | cc0-1.0 | 3,132,915,243,086,640,600 | 20.944444 | 77 | 0.578734 | false | 2.214126 | false | false | false |
metpy/SHARPpy | sharppy/version.py | 1 | 1931 | import os.path
import subprocess
release = False
__version__ = '0.2'
_repository_path = os.path.split(__file__)[0]
_git_file_path = os.path.join(_repository_path, '__git_version__.py')
def _minimal_ext_cmd(cmd):
# construct minimal environment
env = {}
for k in ['SYSTEMROOT', 'PATH']:
v = os.env... | bsd-3-clause | 6,243,977,662,548,874,000 | 23.75641 | 81 | 0.539617 | false | 3.504537 | false | false | false |
brian-o/CS-CourseWork | CS491/Program2/testForks.py | 1 | 2677 | ############################################################
'''
testForks.py
Written by: Brian O'Dell, Spetember 2017
A program to run each program a 500 times per thread count.
Then uses the data collected to make graphs and tables that
are useful to evaluate the programs running time.
'''
######... | gpl-3.0 | 5,887,714,014,429,846,000 | 30.494118 | 82 | 0.623086 | false | 3.851799 | false | false | false |
PennyDreadfulMTG/Penny-Dreadful-Tools | modo_bugs/fetcher.py | 1 | 4118 | import os
import sys
from typing import Dict, List, Optional, Tuple
from bs4 import BeautifulSoup
from bs4.element import Tag
from shared import fetch_tools, lazy
def search_scryfall(query: str) -> Tuple[int, List[str], List[str]]:
"""Returns a tuple. First member is an integer indicating how many cards match t... | gpl-3.0 | -1,526,794,542,128,501,000 | 41.020408 | 140 | 0.629917 | false | 3.278662 | false | false | false |
heldergg/webpymail | webpymail/sabapp/models.py | 1 | 2844 | # -*- coding: utf-8 -*-
# sabapp - Simple Address Book Application
# Copyright (C) 2008 Helder Guerreiro
# This file is part of sabapp.
#
# sabapp 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 versi... | gpl-3.0 | -5,009,104,855,560,248,000 | 31.318182 | 77 | 0.645921 | false | 3.707953 | false | false | false |
silentfuzzle/calibre | src/calibre/devices/kobo/driver.py | 1 | 147621 | #!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import division
__license__ = 'GPL v3'
__copyright__ = '2010-2012, Timothy Legge <timlegge@gmail.com>, Kovid Goyal <kovid@kovidgoyal.net> and David Forrester <davidfor@internode.on.net>'
__docformat__ = 'restructuredtext en'
'... | gpl-3.0 | 6,730,758,367,339,175,000 | 49.074966 | 237 | 0.549732 | false | 4.174212 | false | false | false |
gfyoung/pandas | pandas/tests/io/pytables/test_complex.py | 1 | 6374 | from warnings import catch_warnings
import numpy as np
import pytest
import pandas.util._test_decorators as td
import pandas as pd
from pandas import DataFrame, Series
import pandas._testing as tm
from pandas.tests.io.pytables.common import ensure_clean_path, ensure_clean_store
from pandas.io.pytables import read_h... | bsd-3-clause | -5,007,679,795,284,820,000 | 30.554455 | 84 | 0.562441 | false | 3.067372 | true | false | false |
SelfDrivUTT/selfdrivutt | robot/raspberry/controls.py | 1 | 3292 | import socket
import sys
import os
import curses
from threading import Thread
class RemoteControlServer(object):
"""docstring for Curses_control"""
def __init__(self):
super(RemoteControl, self).__init__()
self.data = ''
self.stopped = False
self.HOST = os.environ.get('COMMAND_... | mit | 2,659,452,182,422,635,000 | 28.132743 | 101 | 0.512151 | false | 4.182973 | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/434fb0f05794_add_ignore_and_dev_note_to_genomics_.py | 1 | 1673 | """add ignore and dev note to genomics models.
Revision ID: 434fb0f05794
Revises: 994dfe6e53ee
Create Date: 2020-09-30 14:39:16.244636
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '434fb0f05794'
down_revision = '994dfe6e53ee'
branch_labels = None
depends_on =... | bsd-3-clause | -7,922,045,653,497,436,000 | 28.875 | 111 | 0.679617 | false | 3.267578 | false | false | false |
dannyroberts/eulxml | eulxml/xmlmap/premis.py | 1 | 5516 | # file eulxml/xmlmap/premis.py
#
# Copyright 2010,2011 Emory University Libraries
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | apache-2.0 | 2,107,150,789,629,381,400 | 36.020134 | 95 | 0.688724 | false | 3.762619 | false | false | false |
mightbejosh/dj-braintree | djbraintree/admin.py | 1 | 6860 | # -*- coding: utf-8 -*-
"""
Note: Django 1.4 support was dropped in #107
https://github.com/pydanny/dj-braintree/pull/107
"""
from django.contrib import admin
from .models import Transaction
from .models import Customer
class CustomerHasCardListFilter(admin.SimpleListFilter):
title = "card presence"
... | bsd-3-clause | 6,652,920,508,881,095,000 | 23.326241 | 79 | 0.525364 | false | 3.418037 | false | false | false |
ericchill/gnofract4d | fract4d/fc.py | 1 | 16906 | #!/usr/bin/env python
# A compiler from UltraFractal or Fractint formula files to C code
# The UltraFractal manual is the best current description of the file
# format. You can download it from http://www.ultrafractal.com/uf3-manual.zip
# The implementation is based on the outline in "Modern Compiler
# Implementatio... | bsd-3-clause | -7,829,546,766,683,979,000 | 31.827184 | 133 | 0.588726 | false | 3.784643 | false | false | false |
sileht/pifpaf | pifpaf/drivers/zookeeper.py | 1 | 2019 | # 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 the... | apache-2.0 | 3,448,701,531,717,726,000 | 30.061538 | 69 | 0.600792 | false | 3.605357 | false | false | false |
patrickhoefler/lwd | lwd.py | 1 | 7546 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Functions for turning the Wikidata dump into Linked Data
import codecs
import glob
import gzip
import json
import math
import os
import sys
import time
import xml.etree.cElementTree as ET
import settings
def process_dump():
# Print some status info
print 'Proces... | mit | -7,322,916,570,662,439,000 | 37.111111 | 199 | 0.551816 | false | 3.811111 | false | false | false |
calebmadrigal/algorithms-in-python | heap.py | 1 | 3668 | """heap.py - implementation of a heap priority queue. """
__author__ = "Caleb Madrigal"
__date__ = "2015-02-17"
import math
from enum import Enum
from autoresizelist import AutoResizeList
class HeapType(Enum):
maxheap = 1
minheap = 2
class Heap:
def __init__(self, initial_data=None, heap_type=HeapType... | mit | -855,685,561,109,325,200 | 27.65625 | 96 | 0.581516 | false | 3.785346 | true | false | false |
unkyulee/elastic-cms | src/web/modules/post/services/config.py | 1 | 2826 | import web.util.tools as tools
import os
from web import app
import lib.es as es
def get(p):
# get host and index from the global config
h = tools.get_conf(p['host'], p['navigation']['id'], 'host', 'http://localhost:9200')
n = tools.get_conf(p['host'], p['navigation']['id'], 'index', '')
return {
... | mit | -7,525,611,961,569,722,000 | 37.189189 | 89 | 0.54954 | false | 3.18602 | true | false | false |
GutenkunstLab/SloppyCell | test/test_FixedPoints.py | 1 | 3610 | import unittest
import scipy
from SloppyCell.ReactionNetworks import *
lorenz = Network('lorenz')
lorenz.add_compartment('basic')
lorenz.add_species('x', 'basic', 0.5)
lorenz.add_species('y', 'basic', 0.5)
lorenz.add_species('z', 'basic', 0.5)
lorenz.add_parameter('sigma', 1.0)
lorenz.add_parameter('r', 2.0)
lorenz.... | bsd-3-clause | -4,611,129,762,351,684,600 | 43.567901 | 80 | 0.565097 | false | 3.088109 | true | false | false |
tcarmelveilleux/IcarusAltimeter | Analysis/altitude_analysis.py | 1 | 1202 | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 14 19:34:31 2015
@author: Tennessee
"""
import numpy as np
import matplotlib.pyplot as plt
def altitude(atm_hpa, sea_level_hpa):
return 44330 * (1.0 - np.power(atm_hpa / sea_level_hpa, 0.1903))
def plot_alt():
default_msl = 101300.0
pressure = np.l... | mit | 4,210,792,572,743,000,600 | 26.953488 | 126 | 0.58985 | false | 2.731818 | false | false | false |
aESeguridad/GERE | venv/lib/python2.7/site-packages/flask_weasyprint/__init__.py | 1 | 7726 | # coding: utf8
"""
flask_weasyprint
~~~~~~~~~~~~~~~~
Flask-WeasyPrint: Make PDF in your Flask app with WeasyPrint.
:copyright: (c) 2012 by Simon Sapin.
:license: BSD, see LICENSE for more details.
"""
import weasyprint
from flask import request, current_app
from werkzeug.test import Client, Clie... | gpl-3.0 | 6,181,784,262,939,823,000 | 35.046729 | 79 | 0.612004 | false | 4.066421 | false | false | false |
ThomasHabets/python-pyhsm | examples/yhsm-monitor-exit.py | 1 | 1480 | #!/usr/bin/env python
#
# Copyright (c) 2011, Yubico AB
# All rights reserved.
#
# Utility to send a MONITOR_EXIT command to a YubiHSM.
#
# MONITOR_EXIT only works if the YubiHSM is in debug mode. It would
# be a security problem to allow remote reconfiguration of a production
# YubiHSM.
#
# If your YubiHSM is not in d... | bsd-2-clause | 5,347,888,154,988,822,000 | 24.084746 | 72 | 0.618243 | false | 2.808349 | false | false | false |
darvin/qtdjango | src/qtdjango/settings.py | 1 | 5503 | # -*- coding: utf-8 -*-
from qtdjango.helpers import test_connection
__author__ = 'darvin'
from qtdjango.connection import *
__author__ = 'darvin'
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class BooleanEdit(QCheckBox):
def text(self):
return QVariant(self.checkState()).toString()
def ... | gpl-2.0 | 3,427,938,179,775,995,000 | 34.326389 | 98 | 0.599568 | false | 3.418683 | true | false | false |
barbarahui/nuxeo-calisphere | s3stash/nxstash_mediajson.py | 1 | 4444 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sys
import os
from s3stash.nxstashref import NuxeoStashRef
from deepharvest.deepharvest_nuxeo import DeepHarvestNuxeo
from deepharvest.mediajson import MediaJson
from dplaingestion.mappers.ucldc_nuxeo_mapper import UCLDCNuxeoM... | bsd-3-clause | -6,770,037,951,671,929,000 | 32.413534 | 77 | 0.602835 | false | 3.788576 | false | false | false |
anjel-ershova/python_training | fixture/fixture_group.py | 1 | 4896 | from model.model_group import Group
import random
class GroupHelper:
def __init__(self, app):
self.app = app
def select_group_by_index(self, index):
wd = self.app.wd
wd.find_elements_by_name("selected[]")[index].click()
def select_group_by_id(self, id):
wd = self.app.wd
... | apache-2.0 | 4,500,193,398,506,461,700 | 33.285714 | 91 | 0.592708 | false | 3.219316 | false | false | false |
bb111189/Arky2 | boilerplate/external/pycountry/__init__.py | 1 | 3459 | # vim:fileencoding=utf-8
# Copyright (c) 2008-2011 gocept gmbh & co. kg
# See also LICENSE.txt
# $Id$
"""pycountry"""
import os.path
import pycountry.db
LOCALES_DIR = os.path.join(os.path.dirname(__file__), 'locales')
DATABASE_DIR = os.path.join(os.path.dirname(__file__), 'databases')
class Countries(pycountry.db... | lgpl-3.0 | 8,592,734,702,324,915,000 | 30.445455 | 78 | 0.601619 | false | 3.51882 | false | false | false |
ecell/libmoleculizer | python-src/bngparser/src/moleculizer/moleculeinterpreter.py | 1 | 6341 | ###############################################################################
# BNGMZRConverter - A utility program for converting bngl input files to mzr
# input files.
# Copyright (C) 2007, 2008, 2009 The Molecular Sciences Institute
#
# Moleculizer is free software; you can redistribute it and/or modify
# it ... | gpl-2.0 | 4,373,819,553,800,396,000 | 37.664634 | 130 | 0.674972 | false | 4.04917 | false | false | false |
mpi-sws-rse/antevents-python | examples/event_library_comparison/event.py | 1 | 8071 | """This version uses a traditional event-driven version,
using continuation passing style. Each method call is passed
a completion callback and an error callback
"""
from statistics import median
import json
import asyncio
import random
import time
import hbmqtt.client
from collections import deque
from antevents.base... | apache-2.0 | 4,810,702,886,399,499,000 | 37.251185 | 100 | 0.563127 | false | 4.031469 | false | false | false |
saikrishnar/vsm_preparer | scripts/quincontext.py | 1 | 1778 | #! /usr/bin/python
import os
def main(folder):
#vectors = []
#f = open('../dictionary/vectors.txt')
#for line in f:
# representation = line.strip('\n')
# vectors.append(representation)
#f.close()
for d, ds, fs in os.walk(folder):
for fname in fs:
if fname[-... | gpl-2.0 | 4,492,283,820,192,578,000 | 34.56 | 151 | 0.45838 | false | 3.493124 | false | false | false |
Eksmo/calibre | src/calibre/gui2/viewer/position.py | 1 | 1815 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import json
c... | gpl-3.0 | -6,051,221,796,672,716,000 | 24.928571 | 75 | 0.534986 | false | 3.659274 | false | false | false |
openego/oeplatform | modelview/migrations/0022_auto_20160303_2233.py | 1 | 1468 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-03-03 21:33
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("modelview", "0021_auto_20160303_2233")]
operations = [
migrations.AlterField(
m... | agpl-3.0 | -647,503,568,038,892,000 | 30.234043 | 80 | 0.419619 | false | 4.781759 | false | false | false |
AjabWorld/ajabsacco | ajabsacco/core/facades/loans/transactions.py | 1 | 8484 | from ajabsacco.core.models import (
LoanTransactionEntry,
LoanProduct,
LoanAccount,
Message as SMSMessage,
)
from decimal import Decimal as D
from django.db.models import Q, Sum, F
from django.utils import timezone
from django.db import transaction as db_transaction
from ajabsacco.core import code... | apache-2.0 | 3,779,830,831,397,354,500 | 45.360656 | 115 | 0.658298 | false | 3.649032 | false | false | false |
ArcherSys/ArcherSys | Lib/test/reperf.py | 1 | 1754 | <<<<<<< HEAD
<<<<<<< HEAD
import re
import time
def main():
s = "\13hello\14 \13world\14 " * 1000
p = re.compile(r"([\13\14])")
timefunc(10, p.sub, "", s)
timefunc(10, p.split, s)
timefunc(10, p.findall, s)
def timefunc(n, func, *args, **kw):
t0 = time.perf_counter()
try:
for i in ... | mit | -53,206,256,789,101,470 | 22.386667 | 61 | 0.513683 | false | 2.819936 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.