repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | 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 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
oskar456/turrisclock | fakegpio.py | 1 | 1282 | #!/usr/bin/env python
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class,with
from __future__ import print_function
class GPIO:
""" Class representing one fake GPIO signal for debugging purposes """
def __init__(self, name, directio... | mit | -854,122,664,214,825,900 | 29.52381 | 131 | 0.592824 | false |
airbnb/streamalert | tests/unit/streamalert/shared/test_utils.py | 1 | 4360 | """Tests for streamalert/shared/utils.py"""
import json
from nose.tools import assert_equal, assert_false
from streamalert.shared import utils
from streamalert.shared.normalize import Normalizer
MOCK_RECORD_ID = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'
def test_valid_ip():
"""Utils - Valid IP"""
test_ip_valid... | apache-2.0 | 8,547,904,847,051,907,000 | 26.948718 | 88 | 0.499771 | false |
nclsHart/glances | glances/plugins/glances_monitor.py | 1 | 4261 | # -*- coding: utf-8 -*-
#
# This file is part of Glances.
#
# Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com>
#
# Glances is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | lgpl-3.0 | -6,686,539,748,320,270,000 | 34.508333 | 89 | 0.58836 | false |
dims/glance | glance/tests/unit/test_glare_plugin_loader.py | 1 | 7402 | # Copyright (c) 2015 Mirantis, 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 writin... | apache-2.0 | 2,271,119,883,118,465,500 | 45.553459 | 79 | 0.592002 | false |
thomasquintana/jobber | jobber/core/actor/mailbox.py | 1 | 1271 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 6,478,591,684,151,168,000 | 28.55814 | 62 | 0.697876 | false |
huggingface/pytorch-transformers | src/transformers/modeling_flax_pytorch_utils.py | 1 | 9873 | # coding=utf-8
# Copyright 2021 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | -9,171,087,745,011,735,000 | 42.685841 | 179 | 0.63861 | false |
timm/sandbox | py/cocomo/poly.py | 1 | 3693 | import random
def tunings(_ = None):
Within(txt="loc", lo=2, hi=2000)
prep([
# vlow low nom high vhigh xhigh
# scale factors:
'Flex', 5.07, 4.05, 3.04, 2.03, 1.01, _],[
'Pmat', 7.80, 6.24, 4.68, 3.12, 1.56, _],[
'Prec', 6.20, 4.96, 3.72, 2.48, 1.24, _],[
'Resl', 7.07, 5.65, 4.24... | bsd-3-clause | 9,033,717,283,063,394,000 | 34.171429 | 68 | 0.461143 | false |
ufieeehw/IEEE2017 | ieee2017_tf_broadcaster/nodes/tf_broadcaster.py | 1 | 3127 | #!/usr/bin/env python
'''
TF Broadcaster: Keeps track of the various coordinate frames on the vehicle in
relation to the map and each other.
'''
from __future__ import division
import rospy
import tf
from nav_msgs.msg import Odometry
from std_msgs.msg import Float64
__author__ = "Anthony Olive"
__maintainer__ = "... | mit | 7,645,632,687,140,517,000 | 35.360465 | 96 | 0.707387 | false |
juanshishido/okcupid | utils/permutation.py | 1 | 2439 | import numpy as np
from scipy.stats import ttest_ind
from sklearn.metrics import accuracy_score
def _diff_means(m, arr):
"""Calculate the difference-in-means statistic.
This is based on an input array, `arr`, where the first
`m` observations correspond to a particular class.
Parameters
----------... | mit | 4,915,322,422,834,123,000 | 25.802198 | 76 | 0.595326 | false |
rikiji/gnome-wsname-applet | wsname.py | 1 | 6204 | #!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk
import gnomeapplet
import gobject
import wnck
import sys
import codecs
import random
# debugging
# import os
# new_stdout = open ("/tmp/debug.stdout", "w")
# new_stderr = open ("/tmp/debug.stderr", "w")
# os.dup2(new_stdout.fileno(), sys.stdout.filen... | gpl-2.0 | 1,066,744,528,332,039,600 | 30.979381 | 110 | 0.644262 | false |
robin900/sqlalchemy | test/ext/test_indexable.py | 2 | 10585 | from sqlalchemy.testing import assert_raises
import sqlalchemy as sa
from sqlalchemy import testing
from sqlalchemy import Integer, Text
from sqlalchemy.sql.sqltypes import ARRAY, JSON
from sqlalchemy.testing.schema import Column
from sqlalchemy.orm import Session
from sqlalchemy.testing import fixtures
from sqlalchemy... | mit | 6,000,683,169,161,101,000 | 27.302139 | 81 | 0.525083 | false |
python-ning/blog | blogchen/blog/migrations/0006_auto_20150831_2257.py | 1 | 1727 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('blog', '0005_auto_20150830_2306'),
]
operations = [
migrations.AddField(
model_... | mpl-2.0 | 593,842,880,430,225,500 | 37.377778 | 163 | 0.593515 | false |
tobes/raspberry-DMX | dmx2.py | 1 | 2777 | # -*- coding: utf-8 -*-
# http://www.jonshouse.co.uk/rpidmx512.cgi
from twisted.internet import protocol, reactor, endpoints
from pigpio import pi, pulse as pig_pulse, OUTPUT
PORT = 50007
# pins
PIN_DI = 18 # Driver Input
PIN_DE = 23 # Driver output enable (high to enable)
PIN_RE = 24 # Receive output enable (... | gpl-2.0 | -6,033,140,081,946,384,000 | 20.030303 | 77 | 0.602305 | false |
paulfurley/festival-weather | festivalweather/parser.py | 1 | 3354 | from __future__ import unicode_literals
import datetime
import pytz
import lxml.etree
from .two_hourly_forecast import TwoHourlyForecast
"""
The Norwegian weather service API 1.9 returns a pretty cool data format, albeit
encoded in XML. It contains two types of forecasts:
1. point-in-time (from="2014-08-03T19... | mit | -4,074,040,419,337,598,000 | 32.54 | 79 | 0.651163 | false |
dask-image/dask-ndfourier | dask_ndfourier/_compat.py | 1 | 1574 | # -*- coding: utf-8 -*-
"""
Content here is borrowed from our contributions to Dask.
"""
import numpy
import dask.array
def _fftfreq_block(i, n, d):
r = i.copy()
r[i >= (n + 1) // 2] -= n
r /= n * d
return r
def _fftfreq(n, d=1.0, chunks=None):
"""
Return the Discrete Fourier Transform s... | bsd-3-clause | 138,433,240,379,861,860 | 22.848485 | 79 | 0.550191 | false |
SublimeLinter/SublimeLinter3 | tests/test_loose_lintmatch.py | 1 | 5173 | from unittesting import DeferrableTestCase
from SublimeLinter.lint.linter import LintMatch
class TestLooseLintMatch(DeferrableTestCase):
def test_attribute_access(self):
m = object()
match = {
"match": m,
"line": 1,
"col": 2,
"error": "error_txt",
... | mit | 7,175,853,234,380,279,000 | 28.901734 | 81 | 0.520974 | false |
williamsjj/twisted_cql | examples/session_client_example.py | 1 | 1142 | # -*- coding: utf-8-*-
# ###################################################################
# FILENAME: examples/session_client_example.py
# PROJECT:
# DESCRIPTION: Cassandra session wrappers.
#
# ###################################################################
# (C)2015 DigiTar, All Rights Reserved
# ############... | bsd-2-clause | -7,293,982,450,228,258,000 | 34.71875 | 78 | 0.465849 | false |
abhijitbangera/ecommerce | src/products/models.py | 1 | 4589 | from django.db import models
from django.core.urlresolvers import reverse
from django.db.models.signals import post_save
from django.utils.text import slugify
from django.utils.safestring import mark_safe
# Create your models here.
class ProductQuerySet(models.query.QuerySet):
def active(self):
return self.filter(a... | mit | -8,218,578,092,329,610,000 | 31.323944 | 112 | 0.755066 | false |
bradleyhd/netsim | nodes_vs_routing_speed.py | 1 | 2878 | import matplotlib.pyplot as plt
import numpy as np
import math
from scipy.optimize import curve_fit
def linear(x, a, b):
return a * x + b
def quadratic(x, a, b, c):
return a * x**2 + b * x + c
def exponential(x, a, b, c):
return a * x**b + c
fig = plt.figure(num=None, figsize=(12, 8), dpi=300, facecolor='k', ... | gpl-3.0 | -1,239,813,979,495,446,500 | 34.9875 | 649 | 0.69458 | false |
nnikhilsingh/terrence | tao/caching.py | 1 | 20893 | # -*- coding: utf-8 -*-
import os
import time
import hashlib
import gzip
import bz2
import re
from sqlalchemy.orm.exc import NoResultFound
from tao.database import SearchEngineResultsPage
from tao.parsing import parse_serp
from tao.outputconverter import store_serp_result
import logging
"""
GoogleScrap... | gpl-3.0 | -1,120,138,494,133,419,000 | 36.90689 | 138 | 0.571866 | false |
waynesun09/virt-test | virttest/remote.py | 1 | 44950 | """
Functions and classes used for logging into guests and transferring files.
"""
import logging
import time
import re
import os
import shutil
import tempfile
import aexpect
import utils_misc
import rss_client
import base64
from remote_commander import remote_master
from remote_commander import messenger
from autote... | gpl-2.0 | -2,009,604,876,020,462,600 | 38.778761 | 105 | 0.573593 | false |
GoogleCloudPlatform/dataflow-sample-applications | timeseries-streaming/timeseries-python-applications/ml_pipeline/timeseries/encoder_decoder/transforms/process_encdec_inf_rtn.py | 1 | 9368 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | -1,420,123,897,106,601,000 | 41.776256 | 120 | 0.596392 | false |
jonyachen/hearboi | record_2.py | 1 | 1234 | """
PyAudio exmple: Record a few seconds of audio and save to a WAVE
file.
"""
import pyaudio
import wave
import sys
from dejavu import Dejavu
CHUNK = 8192
FORMAT = pyaudio.paInt16
CHANNELS = 1L
RATE = 48000
RECORD_SECONDS = 5
WAVE_OUTPUT_FILENAME = "/sounds/output.wav"
if sys.platform == 'darwin':
CHANNELS = 1
... | mit | 899,650,144,295,158,300 | 18.587302 | 64 | 0.62966 | false |
benoitc/dj-revproxy | revproxy/store.py | 1 | 4409 | # -*- coding: utf-8 -
#
# This file is part of dj-revproxy released under the MIT license.
# See the NOTICE for more information.
import os
import types
import uuid
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.conf import settings
from restkit.tee import Te... | mit | 2,846,753,884,410,019,300 | 27.62987 | 67 | 0.57927 | false |
t3dev/odoo | addons/website_sale_digital/controllers/main.py | 5 | 4569 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import io
from werkzeug.utils import redirect
from odoo import http
from odoo.http import request
from odoo.addons.sale.controllers.portal import CustomerPortal
from odoo.addons.website_sale.controllers.ma... | gpl-3.0 | 5,739,313,354,150,287,000 | 40.536364 | 206 | 0.612607 | false |
chilleo/ALPHA | module/CalculateGeneralizedDStatisticClass.py | 1 | 11045 | from PyQt4 import QtCore
from sys import *
import os
import subprocess
# if platform == 'win32':
# path.insert(0, "../CommandLineFiles")
# elif platform == 'darwin':
# path.insert(0, "..\\CommandLineFiles")
# import CalculateGeneralizedDStatistic
import sys
from CommandLineFiles.RunDGEN import run_saved_dge... | mit | 8,902,405,438,152,815,000 | 48.308036 | 252 | 0.612404 | false |
wolverineav/neutron | neutron/tests/fullstack/base.py | 1 | 3133 | # Copyright 2015 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 agre... | apache-2.0 | 3,411,676,441,427,793,000 | 40.773333 | 79 | 0.662624 | false |
foursquare/pants | tests/python/pants_test/engine/legacy/test_graph_integration.py | 1 | 5480 | # coding=utf-8
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import unittest
from pants.build_graph.address_lookup_error import AddressLookupError
fr... | apache-2.0 | -5,469,494,609,122,167,000 | 39 | 236 | 0.657117 | false |
kevinrigney/PlaylistDatabase | ReplaceVideoUrl.py | 1 | 4628 | #!/usr/bin/env python3
# Find videos with duplicates: SELECT Track.track_name, Artist.artist_name,Track.youtube_link FROM Track JOIN Artist WHERE Track.artist_id = Artist.id GROUP BY Track.youtube_link HAVING count(*) >=2
from PlaylistDatabase import PlaylistDatabase
db = PlaylistDatabase(config_file='PlaylistData... | mit | 2,339,863,320,914,901,000 | 37.566667 | 276 | 0.624028 | false |
zhengwsh/InplusTrader_Linux | InplusTrader/backtestEngine/api/ext.py | 1 | 1329 | # -*- coding: utf-8 -*-
#
# Copyright 2017 Ricequant, 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 ... | mit | 7,158,395,297,280,410,000 | 29.906977 | 80 | 0.708804 | false |
matt-jordan/mjmud | tests/game/commands/standard/test_standard_set.py | 1 | 2831 | #
# mjmud - The neverending MUD project
#
# Copyright (c) 2014, Matt Jordan
#
# See https://github.com/matt-jordan/mjmud for more information about the
# project. Please do not contact the maintainers of the project for information
# or assistance. The project uses Github for these purposes.
#
# This program is free so... | mit | -2,227,105,213,451,781,400 | 34.835443 | 79 | 0.658778 | false |
fheeger/gost | PyQtTachyEmulator.py | 1 | 14872 | import sys, random, time
from glob import glob
import numpy
from PyQt5.QtCore import QObject, QTimer, QIODevice
from PyQt5.QtWidgets import *
from PyQt5 import QtSerialPort
class TachyConnection(QObject):
def __init__(self, dev=None, baut=4800, lineend="\r\n", timeout=3, log=sys.stderr):
sup... | gpl-3.0 | 5,545,082,395,666,538,000 | 37.978495 | 221 | 0.545724 | false |
edgedb/edgedb | edb/testbase/serutils.py | 1 | 2605 | # mypy: ignore-errors
#
# This source file is part of the EdgeDB open source project.
#
# Copyright 2019-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | apache-2.0 | -1,057,744,096,127,017,600 | 20.178862 | 74 | 0.693282 | false |
vicky2135/lucious | tests/integration/offer/test_availability.py | 2 | 4516 | import datetime
from decimal import Decimal as D
from django.test import TestCase
from oscar.apps.offer import models
from oscar.core.compat import get_user_model
from oscar.test.factories import (
OrderDiscountFactory, UserFactory, create_order)
User = get_user_model()
class TestAPerUserConditionalOffer(TestC... | bsd-3-clause | 4,380,588,448,540,294,000 | 35.128 | 95 | 0.694641 | false |
GoeGaming/lutris | lutris/runners/steam.py | 1 | 6910 | import os
import time
import subprocess
from lutris.runners.runner import Runner
from lutris.gui.dialogs import NoticeDialog
from lutris.thread import LutrisThread
from lutris.util.log import logger
from lutris.util import system
from lutris.util.steam import (get_path_from_appmanifest, read_config,
... | gpl-3.0 | 3,351,904,523,360,422,400 | 32.062201 | 80 | 0.554414 | false |
VisionInternet/visionLiveSDK-Python | setup.py | 1 | 1303 | # -*- coding: utf-8 -*-
##############################################################################
#
# Python visionLive API
# Copyright 2017 Vision Internet (http://www.visioninternet.com)
#
##############################################################################
from setuptools import setup, find_pac... | gpl-3.0 | 2,381,504,976,160,644,000 | 33.315789 | 93 | 0.561013 | false |
zjutjsj1004/third | boost/tools/build/src/tools/rc.py | 1 | 7483 | # Status: being ported by Steven Watanabe
# Base revision: 47077
#
# Copyright (C) Andre Hentz 2003. Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice appears in
# all copies. This software is provided "as is" without express or implied
# warranty, ... | mit | -4,228,239,602,701,784,600 | 36.178571 | 109 | 0.616865 | false |
dscho/hg | hgext/zeroconf/Zeroconf.py | 1 | 58442 | from __future__ import absolute_import, print_function
""" Multicast DNS Service Discovery for Python, v0.12
Copyright (C) 2003, Paul Scott-Murphy
This module provides a framework for the use of DNS Service Discovery
using IP multicast. It has been tested against the JRendezvous
implementation from <... | gpl-2.0 | 4,077,122,527,367,247,400 | 33.786905 | 80 | 0.53465 | false |
aganezov/bg | bg/distances.py | 1 | 1464 | # -*- coding: utf-8 -*-
import networkx as nx
def get_all_cycles(breakpoint_graph):
visited = set()
cycles = []
for vertex in breakpoint_graph.nodes():
if vertex in visited:
continue
try:
cycle = nx.find_cycle(breakpoint_graph.bg, vertex)
new = False
... | mit | 3,728,780,150,982,258,000 | 31.533333 | 129 | 0.612022 | false |
psf/black | src/black/numerics.py | 1 | 1843 | """
Formatting numeric literals.
"""
from blib2to3.pytree import Leaf
def format_hex(text: str) -> str:
"""
Formats a hexadecimal string like "0x12B3"
"""
before, after = text[:2], text[2:]
return f"{before}{after.upper()}"
def format_scientific_notation(text: str) -> str:
"""Formats a numer... | mit | -7,455,265,180,297,510,000 | 27.353846 | 78 | 0.607705 | false |
ebmdatalab/openprescribing | openprescribing/dmd/forms.py | 1 | 2175 | from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Field, ButtonHolder, Submit
from crispy_forms.bootstrap import InlineCheckboxes
obj_types_choices = [
("vtm", "VTMs"),
("vmp", "VMPs"),
("amp", "AMPs"),
("vmpp", "VMPPs"),
("ampp", "AMPPs")... | mit | -4,931,881,564,602,365,000 | 30.071429 | 104 | 0.622069 | false |
maas/maas | src/maasserver/fields.py | 1 | 29287 | # Copyright 2012-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Custom model and form fields."""
__all__ = [
"CIDRField",
"EditableBinaryField",
"Field",
"HostListFormField",
"IPListFormField",
"IPv4CIDRField",
... | agpl-3.0 | -6,963,579,217,191,655,000 | 31.83296 | 79 | 0.599515 | false |
davidgardenier/frbpoppy | tests/lognlogs/local.py | 1 | 1611 | """Check the log N log F slope of a local population."""
import numpy as np
import matplotlib.pyplot as plt
from frbpoppy import CosmicPopulation, Survey, SurveyPopulation
from frbpoppy.population import unpickle
from tests.convenience import plot_aa_style, rel_path
MAKE = True
if MAKE:
population = CosmicPopu... | mit | 1,427,555,761,050,062,300 | 26.305085 | 74 | 0.628181 | false |
ocefpaf/cartopy | lib/cartopy/tests/crs/test_transverse_mercator.py | 1 | 4985 | # (C) British Crown Copyright 2013 - 2019, Met Office
#
# This file is part of cartopy.
#
# cartopy is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option)... | lgpl-3.0 | 7,757,167,979,698,951,000 | 41.606838 | 78 | 0.583952 | false |
lorin/umdinst | umdinst/setup/verifyperms.py | 1 | 3064 | #!/usr/bin/env python
import os
from stat import *
def parent(path):
"""Return the parent of the specified directory"""
# Remove the trailing slash, if any
if path.endswith('/'):
return os.path.dirname(path[:-1])
else:
return os.path.dirname(path)
def create_and_set_permissions(di... | bsd-3-clause | -636,487,300,372,576,000 | 38.282051 | 141 | 0.679178 | false |
hydraplatform/hydra-base | unittests/test_templates.py | 1 | 37663 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) Copyright 2013 to 2017 University of Manchester
#
# HydraPlatform is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or... | lgpl-3.0 | -6,679,174,244,577,723,000 | 35.31919 | 125 | 0.598757 | false |
davemehringer/keplerpp | apps/plotter_mayavi.py | 1 | 10321 | # plotter_mayavi.py
# Copyright (C) 2016 David Mehringer
#
# 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 versi... | gpl-3.0 | 2,115,478,447,945,871,400 | 26.670241 | 88 | 0.556148 | false |
linsalrob/EdwardsLab | mongodb/load_models.py | 1 | 1140 | """
Create a mongo database if it doesn't exist and load a bunch of data into it.
We need a directory with one or more JSON files in it. We look for JSON on the end of the filename.
e.g. python load_models.py -d /data/Genotype-Phenotype-Modeling/models/Citrobacter/Citrobacter/models/ -n fba_models -c citrobacter
"""
... | mit | -2,236,823,401,457,467,000 | 32.529412 | 131 | 0.658772 | false |
neuhofmo/RecBlast | RecBlastUtils.py | 1 | 10025 | #! /usr/bin/env python2
# A set of tools, functions, aliases and more used in RecBlast.
import os
import tarfile
import zipfile
from time import strftime, sleep
import re
import subprocess
from Bio import Entrez
import shutil
Entrez.email = "recblast@gmail.com"
Entrez.tool = "RecBlast"
TEMP_FILES_PATH = os.getcwd()
... | mit | -6,327,078,877,724,079,000 | 35.587591 | 118 | 0.6399 | false |
seanfisk/lsf-ibutils | docs/source/conf.py | 1 | 8703 | # -*- coding: utf-8 -*-
#
# This file is based upon the file generated by sphinx-quickstart. However,
# where sphinx-quickstart hardcodes values in this file that you input, this
# file has been changed to pull from your module's metadata module.
#
# This file is execfile()d with the current directory set to its contai... | mit | -767,821,976,746,909,600 | 31.473881 | 79 | 0.708376 | false |
tobyclemson/terraform-aws-vpc-auto-peering | lambdas/auto_peering/auto_peering/vpc_peering_routes.py | 1 | 4260 | from botocore.exceptions import ClientError
class VPCPeeringRoutes(object):
def __init__(self, vpc1, vpc2,
vpc_peering_relationship,
ec2_gateways, logger):
self.vpc1 = vpc1
self.vpc2 = vpc2
self.vpc_peering_relationship = vpc_peering_relationship
s... | mit | 4,196,186,921,195,466,000 | 37.727273 | 80 | 0.56385 | false |
dhoffman34/django | django/template/defaulttags.py | 1 | 52686 | """Default tags used by the template system, available to all templates."""
from __future__ import unicode_literals
import os
import sys
import re
from datetime import datetime
from itertools import groupby, cycle as itertools_cycle
import warnings
from django.conf import settings
from django.template.base import (No... | bsd-3-clause | -833,096,168,356,587,800 | 33.593565 | 171 | 0.575675 | false |
mattcongy/itshop | docker-images/taigav2/taiga-back/taiga/events/events.py | 1 | 3483 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# This program is free software: you can r... | mit | 4,587,529,563,126,168,600 | 31.53271 | 94 | 0.644642 | false |
kivymd/KivyMD | kivymd/uix/banner.py | 1 | 11889 | """
Components/Banner
=================
.. seealso::
`Material Design spec, Banner <https://material.io/components/banners>`_
.. rubric:: A banner displays a prominent message and related optional actions.
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/banner.png
:align: c... | mit | -5,465,859,003,321,030,000 | 25.12967 | 164 | 0.61948 | false |
chfoo/wpull | wpull/application/plugin_test.py | 1 | 1250 | import unittest
from wpull.application.plugin import WpullPlugin, hook, event, InterfaceRegistry, \
event_interface, PluginClientFunctionInfo, PluginFunctionCategory
class MockPlugin(WpullPlugin):
@hook('hook_thing')
def my_hook_callback(self):
pass
@event('event_thing')
def my_event_cal... | gpl-3.0 | 2,281,421,998,519,639,300 | 26.777778 | 83 | 0.6264 | false |
facebookresearch/fastText | python/doc/examples/bin_to_vec.py | 1 | 1120 | #!/usr/bin/env python
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_fu... | mit | -808,605,955,784,245,900 | 26.317073 | 73 | 0.611607 | false |
whausen/part | src/adhocracy/lib/text/mdx_showmore.py | 1 | 2762 | """Showmore extension for Markdown.
To hide something with [more...], surround the corresponding text with triple
parentheses, e.g. (((text_to_be_hidden))).
In order to show the text, you have to include the following Javascript in your
code, which depends on the availability of jquery.
$('.showmore').each(funct... | agpl-3.0 | -2,644,980,990,746,216,000 | 28.698925 | 79 | 0.543085 | false |
jszymon/pacal | pacal/__init__.py | 1 | 3420 | """PaCal, the probabilistic calculator."""
from __future__ import print_function
from . import params
import numpy as _np
from pylab import show
_np.seterr(all="ignore")
from .utils import Inf
from .distr import DiscreteDistr
from .distr import exp, log, atan, min, max, sqrt, sign, sin, cos, tan, tanh, sigmoid
f... | gpl-3.0 | 3,216,944,426,521,795,600 | 32.203883 | 93 | 0.738304 | false |
xtiankisutsa/MARA_Framework | tools/androwarn/androwarn/core/core.py | 1 | 16646 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of Androwarn.
#
# Copyright (C) 2012, Thomas Debize <tdebize at mail.com>
# All rights reserved.
#
# Androwarn is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Fr... | lgpl-3.0 | -755,324,748,976,787,000 | 34.568376 | 168 | 0.70191 | false |
florentchandelier/zipline | tests/data/bundles/test_csvdir.py | 1 | 5092 | from __future__ import division
import numpy as np
import pandas as pd
from zipline.utils.calendars import get_calendar
from zipline.data.bundles import ingest, load, bundles
from zipline.testing import test_resource_path
from zipline.testing.fixtures import ZiplineTestCase
from zipline.testing.predicates import asse... | apache-2.0 | 5,854,577,835,975,664,000 | 37.870229 | 74 | 0.503928 | false |
milankl/swm | calc/misc/c_diss_plot.py | 1 | 3966 | from __future__ import print_function
path = '/home/mkloewer/python/swm/'
import os; os.chdir(path) # change working directory
import numpy as np
from scipy import sparse
import time as tictoc
from netCDF4 import Dataset
import glob
import matplotlib.pyplot as plt
# OPTIONS
runfolder = [2,3]
## read data
for r,i in z... | gpl-3.0 | 1,328,140,129,446,161,700 | 27.73913 | 112 | 0.61296 | false |
h-matsuo/memTracker | lib/track.py | 1 | 8958 | #!/usr/bin/python
# coding: UTF-8
"""
Implementation of command: track
"""
__author__ = "Hiroyuki Matsuo <h-matsuo@ist.osaka-u.ac.jp>"
# ===== Configuration ==========================================================
# ----- Disk I/O tracking ------------------------------------------------------
#DEVICE_NAME = "mm... | mit | 3,676,295,319,247,016,400 | 28.275748 | 122 | 0.53813 | false |
bruecksen/isimip | isi_mip/climatemodels/migrations/0088_attachment.py | 1 | 1304 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-11-26 14:51
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import isi_mip.climatemodels.models
class Migration(migrations.Migration):
dependencies = [
('climatemodels', '0087_... | mit | -4,246,487,658,960,444,000 | 43.965517 | 132 | 0.661043 | false |
HackerBaloo/SublimeOpenInTotalCommander | Open in Total Commander.py | 1 | 2176 | import os
import os.path
import subprocess
import sublime
import sublime_plugin
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
def which(program):
fpath, fname = os.path.split(program)
if fpath:
if is_exe(program):
return program
e... | mit | -5,479,836,569,828,957,000 | 30.477612 | 113 | 0.555147 | false |
XENON1T/pax | pax/trigger_plugins/FindSignals.py | 1 | 10320 | import numpy as np
import numba
from pax.trigger import TriggerPlugin
from pax.datastructure import TriggerSignal
from pax.dsputils import adc_to_pe
# Interrupts thrown by the signal finder
# Negative, since positive numbers indicate number of signals found during normal operation
SIGNAL_BUFFER_FULL = -1
SAVE_DARK_MON... | bsd-3-clause | -201,491,835,851,179,170 | 46.123288 | 120 | 0.590601 | false |
oblique-labs/pyVM | rpython/rtyper/normalizecalls.py | 1 | 16966 | from rpython.annotator import model as annmodel, description
from rpython.flowspace.argument import Signature
from rpython.flowspace.model import (Variable, Constant, Block, Link,
checkgraph, FunctionGraph, SpaceOperation)
from rpython.rlib.objectmodel import ComputedIntSymbolic
from rpython.rtyper.error import Typ... | mit | -9,057,449,203,302,139,000 | 40.279805 | 101 | 0.590357 | false |
betatim/osf-cli | osfclient/__main__.py | 1 | 4648 | from __future__ import print_function
import sys
import six
import argparse
from textwrap import dedent
from .cli import clone, fetch, list_, remove, upload, init
from . import __version__
def main():
description = dedent("""
osf is a command-line program to up and download
files from osf.io.
These ... | bsd-3-clause | 9,018,315,386,468,274,000 | 37.733333 | 77 | 0.598322 | false |
culot/homebooking | storage.py | 1 | 15856 | import logging as log
import sqlite3
class Database():
"Class to manage interactions with database"
def __init__(self):
self.connection = sqlite3.connect('book.db')
self.connection.row_factory = sqlite3.Row
try:
self.sanity_checks()
except Exception:
sel... | bsd-3-clause | 4,993,846,659,523,634,000 | 38.344913 | 187 | 0.550013 | false |
eli261/jumpserver | apps/orgs/mixins/api.py | 1 | 1880 | # -*- coding: utf-8 -*-
#
from django.shortcuts import get_object_or_404
from rest_framework.viewsets import ModelViewSet
from rest_framework_bulk import BulkModelViewSet
from common.mixins import IDInCacheFilterMixin
from ..utils import set_to_root_org
from ..models import Organization
__all__ = [
'RootOrgViewMi... | gpl-2.0 | -5,117,398,041,462,295,000 | 30.864407 | 78 | 0.675 | false |
umangv/LitHub | LitHub/fbconnect/forms.py | 1 | 2017 | # Copyright 2011 Kalamazoo College Computer Science Club
# <kzoo-cs-board@googlegroups.com>
# This file is part of LitHub.
#
# LitHub 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 | 2,665,399,981,494,819,300 | 40.163265 | 75 | 0.672286 | false |
praekelt/ummeli | ummeli/base/migrations/0010_auto__add_field_skill_level.py | 1 | 11741 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Skill.level'
db.add_column('base_skill', 'level', self.gf('django.db.models.fields.Positiv... | bsd-3-clause | 8,490,752,782,844,218,000 | 76.243421 | 202 | 0.547313 | false |
okolisny/integration_tests | cfme/tests/infrastructure/test_host_drift_analysis.py | 1 | 4947 | # -*- coding: utf-8 -*-
import pytest
from cfme import test_requirements
from cfme.configure.tasks import Tasks
from cfme.fixtures import pytest_selenium as sel
from cfme.infrastructure import host as host_obj
from cfme.infrastructure.provider import InfraProvider
from cfme.web_ui import DriftGrid, toolbar as tb
from... | gpl-2.0 | -531,535,463,155,346,700 | 33.354167 | 98 | 0.634526 | false |
gumyns/home-automation | hardware_old/arm/toolchainGenerator.py | 1 | 2209 | #!/usr/bin/python
import os
import sys
import subprocess
devices = ['STM32F030x6']
template = """set(ENV{{PATH}} {gcc_dir})
set(GCC_ARM_DIRECTORY {gcc_dir})
add_definitions(-D{device})
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)
set(C... | apache-2.0 | 2,180,668,552,278,348,300 | 40.679245 | 332 | 0.712992 | false |
mateuszmalinowski/visual_turing_test-tutorial | kraino/utils/print_metrics.py | 1 | 5116 | #!/usr/bin/env python
from __future__ import print_function
"""
Selects and prints metrics.
Author: Mateusz Malinowski
Email: mmalinow@mpi-inf.mpg.de
"""
import os
from uuid import uuid4
from compute_wups import get_metric_score as wups_score
from compute_wups import get_class_metric_score as class_wups_score
fro... | mit | 7,413,126,285,437,841,000 | 38.053435 | 118 | 0.611024 | false |
manish211/coveralls-python | tests/test_cli.py | 1 | 2270 | # coding: utf-8
import os
from mock import patch, call
import pytest
import coveralls
from coveralls.api import CoverallsException
import coveralls.cli
@patch.dict(os.environ, {'TRAVIS': 'True'}, clear=True)
@patch.object(coveralls.cli.log, 'info')
@patch.object(coveralls.Coveralls, 'wear')
def test_debug(mock_wear... | mit | -4,962,825,633,529,102,000 | 32.382353 | 108 | 0.712335 | false |
mostaphaRoudsari/Honeybee | src/Honeybee_Read Annual Result I.py | 1 | 44279 | #
# Honeybee: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari
#
# This file is part of Honeybee.
#
# Copyright (c) 2013-2020, Mostapha Sadeghipour Roudsari <mostapha@ladybug.tools>
# Honeybee is free software; you can redistribute it and/or modify
# it under the terms of the GNU G... | gpl-3.0 | -656,435,313,322,074,200 | 45.269592 | 320 | 0.584973 | false |
risteon/nimble | nimble/sources/datasets.py | 1 | 1222 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
from ..composition import LabeledDataSource
from .images import ImageFileSource
from .labels import TransformMatrixSource
class KittiOdometrySource(LabeledDataSource):
"""Read images and ground truth poses of the Kitti dataset.
http:/... | mit | -552,109,552,399,370,430 | 34.941176 | 112 | 0.660393 | false |
enotx/ebook_librarian | src/classification.py | 1 | 13177 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from PyQt5.QtCore import (QAbstractItemModel, QFile, QIODevice,
QItemSelectionModel, QModelIndex, Qt, QRect, QCoreApplication, QMetaObject)
from PyQt5 import QtWidgets
from PyQt5.uic import loadUi
from config import CLASSIFICATION_FILE_NAME
class TreeItem(object... | gpl-3.0 | -2,900,626,491,082,333,000 | 30.299287 | 96 | 0.595052 | false |
soxfmr/engineshooter | engineshooter/spiders/engine/baidu.py | 1 | 6685 | # -*- coding: utf-8 -*-
import re
import os
import scrapy
import random
import string
import tempfile
import webbrowser
from os.path import join
from urllib import urlencode
from StringIO import StringIO
from engineshooter.items import SearchResultItem
class BaiduEngine:
name = 'baidu'
BASE_URL = 'https://ww... | mit | 4,947,824,558,868,805,000 | 36.768362 | 113 | 0.581301 | false |
mclaughlin6464/pdnn | models/dnn_reg.py | 1 | 11677 | '''
@Author Sean McLaughiln
This is my copy of the dnn module. I'm adding some features so I can use DNN for regression rather than just classification.
'''
import cPickle
import gzip
import os
import sys
import time
import collections
import numpy
import theano
import theano.tensor as T
from theano.tensor.shared_ra... | apache-2.0 | -713,601,744,639,500,700 | 40.703571 | 136 | 0.553139 | false |
jGaboardi/LP_MIP | Gurobi_Dual_Standard.py | 1 | 3689 | '''
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
'''
# Building a Standard Dual Linear Program... | lgpl-3.0 | -634,265,576,286,617,500 | 35.9 | 89 | 0.465709 | false |
OpenMined/PySyft | packages/syft/src/syft/lib/pandas/categorical_dtype.py | 1 | 1173 | # third party
import pandas as pd
# syft relative
from ...generate_wrapper import GenerateWrapper
from ...lib.python.list import List
from ...lib.python.primitive_factory import PrimitiveFactory
from ...proto.lib.pandas.categorical_pb2 import (
PandasCategoricalDtype as PandasCategoricalDtype_PB,
)
def object2pr... | apache-2.0 | -2,055,834,329,634,423,300 | 32.514286 | 84 | 0.768116 | false |
catkin/xylem | xylem/load_url.py | 1 | 2512 | # Copyright 2014 Open Source Robotics Foundation, 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 ... | apache-2.0 | 5,625,816,946,383,272,000 | 34.885714 | 74 | 0.662022 | false |
nuagenetworks/vspk-python | vspk/v5_0/nuvirtualfirewallrule.py | 1 | 40053 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# 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 copyrigh... | bsd-3-clause | -8,485,020,749,954,375,000 | 31.777414 | 292 | 0.587896 | false |
ikoula/cloudstack | test/integration/smoke/test_routers_iptables_default_policy.py | 1 | 24995 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | gpl-2.0 | 5,238,539,919,032,501,000 | 35.865782 | 128 | 0.520424 | false |
motlib/mqtt-ts | src/sensors/sysinfo.py | 1 | 1526 | '''System info related sensor implementations.'''
from sensors.sbase import SensorBase
from datetime import datetime
class NetTraffic(SensorBase):
'''Measures the average rx and tx throughput of a network interface.'''
def __init__(self, scfg):
super().__init__(scfg)
self.device = scfg['de... | gpl-3.0 | 6,934,267,668,239,048,000 | 24.433333 | 76 | 0.532765 | false |
nimbusproject/epumgmt | src/python/epumgmt/sbin/most-recent-log.py | 1 | 1325 | #!/usr/bin/env python
import os
import sys
import time
from epumgmt.sbin import sbin_common
def get_logfiledir(p):
logfiledir = p.get_conf_or_none("logging", "logfiledir")
if not logfiledir:
sys.stderr.write("There is no logfiledir configuration")
return None
return sbin_common.apply_vardi... | apache-2.0 | -2,352,648,267,245,581,000 | 24.480769 | 97 | 0.655094 | false |
Aperturedimigo/Complete | QT/GUI_Privasee_notYourFace.py | 1 | 1271 | import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtGui import QPainter
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
windowSizeX = 440
windowSizeY = 250
fontMajor = "Arial"
fontMinor = "Dotum"
class Form(QWidget):
# __init__ : 생성자
# parent : 부모객체
... | mit | 8,769,573,910,723,589,000 | 21.446429 | 62 | 0.640414 | false |
foursquare/commons-old | src/python/twitter/pants/tasks/markdown_to_html.py | 1 | 9585 | # ==================================================================================================
# Copyright 2012 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | apache-2.0 | -5,126,379,059,360,996,000 | 37.035714 | 100 | 0.597809 | false |
ICGC-TCGA-PanCancer/pancancer-sandbox | pcawg_metadata_parser/generate_all_donors.py | 1 | 24480 | #!/usr/bin/env python
import sys
import os
import re
import glob
import xmltodict
import json
import yaml
import copy
import logging
from argparse import ArgumentParser
from argparse import RawDescriptionHelpFormatter
from elasticsearch import Elasticsearch
from collections import OrderedDict
import datetime
import d... | gpl-2.0 | -5,105,432,271,745,159,000 | 51.758621 | 168 | 0.615891 | false |
tkaitchuck/nupic | build_system/contrib/xcode-setup-install.py | 1 | 1372 | #!/usr/bin/env python
import os
import sys
import string
doClean = ('clean' in sys.argv) or ('uninstall' in sys.argv)
rootDir = os.getcwd()
buildSystemDir = os.path.join(rootDir, 'build_system')
# Generate the configure input files.
setupCmd = 'python ' + os.path.join(buildSystemDir, 'setup.py') + ' --autogen' \
... | gpl-3.0 | 1,300,080,566,949,287,700 | 22.254237 | 81 | 0.691691 | false |
boegel/easybuild-easyblocks | easybuild/easyblocks/d/dolfin.py | 1 | 15555 | ##
# Copyright 2009-2020 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | gpl-2.0 | 6,145,294,167,522,650,000 | 42.328691 | 120 | 0.595821 | false |
mozbhearsum/balrog | auslib/blobs/systemaddons.py | 1 | 4440 | from auslib.AUS import isForbiddenUrl
from auslib.blobs.base import Blob
from auslib.errors import BadDataError
class SystemAddonsBlob(Blob):
jsonschema = "systemaddons.yml"
def __init__(self, **kwargs):
Blob.__init__(self, **kwargs)
if "schema_version" not in self:
self["schema_v... | mpl-2.0 | -1,265,025,930,622,100,000 | 43.848485 | 127 | 0.62973 | false |
HaiFangHui/cf_log_parser | models.py | 1 | 2248 | import gzip
import re
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy import Column, Integer, String, DateTime, Text, func, desc
from config import config
db_spec = config.get('DATABASE', 'DB_SPEC')
en... | mit | 6,871,069,050,997,379,000 | 27.1 | 74 | 0.620107 | false |
rogeriofalcone/treeio | core/migrations/0008_auto__add_field_attachment_filename.py | 1 | 21062 | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
#... | mit | 1,028,083,438,358,553,200 | 85.319672 | 217 | 0.552891 | false |
m7thon/tom | python/tests/sequence_test.py | 1 | 12007 | import unittest
import tom
class PlainPySequence:
"""Simple list of symbols: [o_0, ..., o_{N-1}]."""
def __init__(self, data):
if type(data) is list:
self.data = data
else:
self.data = list(range(data))
def __repr__(self):
return str(self.data)
def len... | mit | -3,419,903,755,819,538,400 | 42.981685 | 169 | 0.513034 | false |
alabarga/SocialLearning | SocialLearning/apps/learningobjects/management/commands/describe.py | 1 | 6166 | #-*- coding: UTF-8 -*-
from learningobjects.utils.search import *
from learningobjects.utils.parsers import *
from django.core.management.base import BaseCommand, CommandError
from learningobjects.models import *
from optparse import make_option
from learningobjects.utils import feedfinder
from learningobjects.manageme... | gpl-3.0 | 3,285,137,839,453,769,700 | 41.496552 | 162 | 0.493833 | false |
OpenTechFund/WebApp | addressfield/fields.py | 1 | 1809 | import json
from os import path
from django import forms
from django.core.exceptions import ValidationError
from .widgets import AddressWidget
basepath = path.dirname(__file__)
filepath = path.abspath(path.join(basepath, "static", "addressfield.min.json"))
with open(filepath, encoding='utf8') as address_data:
c... | gpl-2.0 | 7,997,557,167,834,397,000 | 28.655738 | 110 | 0.632946 | false |
40023256/W17test | wsgi.py | 1 | 27073 | # coding=utf-8
# 上面的程式內容編碼必須在程式的第一或者第二行才會有作用
################# (1) 模組導入區
# 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝
import cherrypy
# 導入 Python 內建的 os 模組, 因為 os 模組為 Python 內建, 所以無需透過 setup.py 安裝
import os
# 導入 random 模組
import random
import math
from cherrypy.lib.static import serve_file
# ... | agpl-3.0 | 8,563,548,445,470,714,000 | 34.536797 | 180 | 0.552605 | false |
RoboAvatar65/ChessRobot | algorithm.py | 1 | 5095 | ############################################################
###algorithm.py Chess Algorithm Engine ###
###Written by Nicholas Maselli ###
### ###
###Purpose: The Algorithm class creates a minimax tree ###
##... | mit | -5,972,521,656,114,823,000 | 26.160221 | 66 | 0.547203 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.