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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
libo/Enigma2 | lib/python/Screens/TimerEdit.py | 1 | 14240 | from Components.ActionMap import ActionMap
from Components.Button import Button
from Components.config import config
from Components.MenuList import MenuList
from Components.TimerList import TimerList
from Components.TimerSanityCheck import TimerSanityCheck
from Components.UsageConfig import preferredTimerPath
from Rec... | gpl-2.0 | 2,415,394,993,166,281,700 | 31.290249 | 179 | 0.692275 | false | 3.236364 | true | false | false |
treww/counters | server/performance_server.py | 1 | 4745 | __author__ = 'treww'
import json
import MySQLdb as mysql
import http.client
import tornado.ioloop
import tornado.web
class _DatabaseRows:
_cursor = None
def __init__(self, cursor):
self._cursor = cursor
def __iter__(self):
return self
def __next__(self):
row = self._cursor... | mit | 6,965,204,526,205,543,000 | 29.22293 | 110 | 0.567545 | false | 3.641596 | false | false | false |
nkmk/python-snippets | notebook/numpy_nan_replace.py | 1 | 1889 | import numpy as np
a = np.genfromtxt('data/src/sample_nan.csv', delimiter=',')
print(a)
# [[11. 12. nan 14.]
# [21. nan nan 24.]
# [31. 32. 33. 34.]]
a_nan = np.array([0, 1, np.nan, float('nan')])
print(a_nan)
# [ 0. 1. nan nan]
print(np.nan == np.nan)
# False
print(np.isnan(np.nan))
# True
print(a_nan == np.na... | mit | 8,838,509,263,677,381,000 | 21.759036 | 82 | 0.51244 | false | 2.211944 | false | true | false |
NotBobTheBuilder/robogrid | robogrid/robot.py | 1 | 2297 | from .grids import Simple_Grid
class Robot(object):
def __init__(self, name, grid=None):
self.name = name
if grid == None:
grid = Simple_Grid(20)
self.grid = grid
start_pos = self.grid.free_position()
if start_pos == None:
raise ValueError("No space... | mit | 6,702,044,922,090,397,000 | 23.178947 | 74 | 0.491946 | false | 3.784185 | false | false | false |
ppyordanov/HCI_4_Future_Cities | Server/src/virtualenv/Lib/encodings/iso8859_16.py | 1 | 12859 | """ Python Character Mapping Codec iso8859_16 generated from 'MAPPINGS/ISO8859/8859-16.TXT' with gencodec.py.
""" # "
import codecs
# ## Codec APIs
class Codec(codecs.Codec):
def encode(self, input, errors='strict'):
return codecs.charmap_encode(input, errors, encoding_table)
def decode(self, inpu... | mit | -2,447,403,365,782,937,600 | 40.347267 | 109 | 0.578505 | false | 2.791187 | false | false | false |
alsoicode/django-maintenancemode-2 | testproject/testproject/urls.py | 1 | 1160 | """testproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class... | apache-2.0 | 1,782,432,068,853,554,000 | 34.151515 | 77 | 0.67931 | false | 3.613707 | false | false | false |
Grumbel/scatterbackup | scatterbackup/format.py | 1 | 7129 | # ScatterBackup - A chaotic backup solution
# Copyright (C) 2016 Ingo Ruhnke <grumbel@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your ... | gpl-3.0 | -175,609,349,884,586,240 | 24.280142 | 92 | 0.534016 | false | 3.578815 | false | false | false |
carefree0910/MachineLearning | _Dist/NeuralNetworks/_Tests/_UnitTests/b_Advanced.py | 1 | 2339 | import os
import sys
root_path = os.path.abspath("../../../../")
if root_path not in sys.path:
sys.path.append(root_path)
import unittest
import numpy as np
from Util.Util import DataUtil
from _Dist.NeuralNetworks.e_AdvancedNN.NN import Advanced
from _Dist.NeuralNetworks._Tests._UnitTests.UnitTestUtil import clea... | mit | -1,695,884,148,561,220,400 | 32.898551 | 108 | 0.637024 | false | 3.331909 | true | false | false |
SasView/sasmodels | sasmodels/models/polymer_micelle.py | 1 | 5987 | r"""
This model provides the form factor, $P(q)$, for a micelle with a spherical
core and Gaussian polymer chains attached to the surface, thus may be applied
to block copolymer micelles. To work well the Gaussian chains must be much
smaller than the core, which is often not the case. Please study the
reference caref... | bsd-3-clause | 991,960,999,830,574,600 | 38.649007 | 113 | 0.632036 | false | 2.809479 | false | false | false |
oldm/OldMan | oldman/resource/manager.py | 1 | 7765 | from oldman.resource.resource import ClientResource
from oldman.store.selector import DataStoreSelector
from oldman.model.manager import ClientModelManager
DEFAULT_MODEL_NAME = "Default_Client"
class ClientResourceManager:
"""
TODO: describe
"""
def __init__(self, data_stores, schema_graph=None, at... | bsd-3-clause | 4,425,027,235,086,407,700 | 55.678832 | 121 | 0.616098 | false | 4.28532 | false | false | false |
decodio/l10n_hr | l10n_hr_vat/wizard/wizard_pdv_knjiga.py | 1 | 11523 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Author:
# mail:
# Copyright:
# Contributions:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 | 8,604,639,130,252,183,000 | 39.566901 | 115 | 0.512369 | false | 3.454573 | false | false | false |
dreadrel/UWF_2014_spring_COP3990C-2507 | notebooks/scripts/book_code/code/getattribute-person.py | 1 | 1434 | class Person: # Portable: 2.X or 3.X
def __init__(self, name): # On [Person()]
self._name = name # Triggers __setattr__!
def __getattribute__(self, attr): # On [obj.any]
print('get: ' + attr)
if attr == 'name'... | apache-2.0 | 6,289,622,435,151,963,000 | 43.8125 | 76 | 0.459554 | false | 4.156522 | false | false | false |
kissgyorgy/Womanager | mainwindow.py | 1 | 47297 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created: Thu Oct 10 19:57:03 2013
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Att... | gpl-2.0 | -7,005,826,944,289,512,000 | 52.624717 | 106 | 0.672495 | false | 3.771691 | false | false | false |
smilebin818/wx-cqwdt | DBDATA/fileServer.py | 1 | 1270 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import SocketServer
import struct
import os
# Format: name_len --- one byte
# name --- name_len bytes
# data --- variable length
# Save data to name into current directory
# Refer to: http://blog.csdn.net/g__gle/article/details/8144... | gpl-3.0 | -6,804,128,155,356,753,000 | 28.534884 | 74 | 0.570866 | false | 3.527778 | false | false | false |
blaze225/zulip | zerver/views/users.py | 1 | 16558 | from __future__ import absolute_import
from typing import Text, Union, Optional, Dict, Any, List, Tuple
import os
import simplejson as json
from django.http import HttpRequest, HttpResponse
from django.utils.translation import ugettext as _
from django.shortcuts import redirect
from django.conf import settings
from ... | apache-2.0 | -2,537,478,890,875,718,000 | 41.239796 | 140 | 0.650803 | false | 3.877752 | false | false | false |
dnbaker/emp | python/master_map.py | 1 | 1618 | #!/usr/bin/env python
import sys
import multiprocessing
import gzip
import os
from subprocess import check_call as cc, CalledProcessError
from download_genomes import is_valid_gzip, xfirstline
argv = sys.argv
def getopts():
import argparse
a = argparse.ArgumentParser()
a.add_argument("paths", nargs="+", h... | gpl-3.0 | 451,841,040,786,476,540 | 27.892857 | 76 | 0.567367 | false | 3.509761 | false | false | false |
kseetharam/genPolaron | xanalysis_groundstate_paper.py | 1 | 26133 | import numpy as np
import pandas as pd
import xarray as xr
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from matplotlib.lines import Line2D
import matplotlib.colors as colors
from matplotlib.animation import writers
import os
import itertools
import pf_dynamic_cart as... | mit | 5,256,427,196,833,747,000 | 44.60733 | 257 | 0.576895 | false | 2.424886 | false | false | false |
adamnovak/hgvm-builder | src/hgvmbuilder/toilvgfacade.py | 1 | 14356 | # hgvm-builder toilvgfacade.py: Provide a function-argument-based toil-vg API
"""
toil-vg curtrently has lots of cases where low-level functions depend on
command-line arguments in the options object. To make toil-vg targets callable
on arbitrary Toil file IDs, we need wrappers.
To use this facade, run add_options() ... | apache-2.0 | -7,453,239,172,026,143,000 | 32.231481 | 80 | 0.654012 | false | 3.827246 | true | false | false |
mmeslab/linux-nctusde | compute_nctuss_related_function_size.py | 1 | 1314 | #!/usr/bin/python
nctuss_symbol_names = ["nctuss_poll_emacps",
"nctuss_xemacps_tx_poll",
"xemacps_tx_hwtstamp",
"nctuss_xemacps_rx",
"nctuss_xemacps_send_skb",
"nctuss_xemacps_start_xmit",
"xemacps_clear_csum",
"nctuss_xemacps_return_skb",
"nctuss_skb_pool_return",
"nctuss_... | gpl-2.0 | -1,664,718,970,826,183,700 | 22.464286 | 52 | 0.616438 | false | 2.622754 | false | false | false |
bxlab/HiFive_Paper | Scripts/hifive-1.1.3/hifive/hic_binning.py | 1 | 92093 | #!/usr/bin/env python
"""
This is a module contains scripts for generating compact, upper-triangle and full matrices of HiC interaction data.
Concepts
--------
These functions rely on the :class:`HiC` class in conjunction with the :class:`Fend` and :class:`HiCData` classes.
Data can either be arranged in compact, c... | bsd-3-clause | 5,788,391,827,346,598,000 | 57.249842 | 696 | 0.601859 | false | 3.805653 | false | false | false |
CroissanceCommune/autonomie | autonomie/alembic/versions/3_0_migrate_task_lines_2192101f133b.py | 1 | 1508 | """3.0 : Migrate task lines
Revision ID: 2192101f133b
Revises: 465776bbb019
Create Date: 2015-06-29 11:57:26.726124
"""
# revision identifiers, used by Alembic.
revision = '2192101f133b'
down_revision = '36b1d9c38c43'
from alembic import op
import sqlalchemy as sa
def upgrade():
from autonomie.models.task imp... | gpl-3.0 | -5,757,862,300,584,383,000 | 21.176471 | 72 | 0.566313 | false | 3.732673 | false | false | false |
niosus/EasyClangComplete | tests/test_makefile.py | 1 | 3170 | """Tests for Makefile flags extraction."""
import imp
import platform
from os import path
from unittest import TestCase
from EasyClangComplete.plugin.utils import flag
from EasyClangComplete.plugin.utils import search_scope
from EasyClangComplete.plugin.flags_sources import makefile
imp.reload(makefile)
imp.reload(fl... | mit | -5,041,730,860,606,384,000 | 34.222222 | 79 | 0.633438 | false | 3.782816 | true | false | false |
jyi/ITSP | prophet-gpl/tools/httpd-build.py | 1 | 3243 | # Copyright (C) 2016 Fan Long, Martin Rianrd and MIT CSAIL
# Prophet
#
# This file is part of Prophet.
#
# Prophet 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 y... | mit | 2,086,195,526,570,263,600 | 31.757576 | 156 | 0.5572 | false | 3.521173 | true | false | false |
praekelt/jmbo-contact | contact/models.py | 1 | 1051 | from django.contrib.auth.models import User
from django.db import models
from preferences.models import Preferences
class ContactPreferences(Preferences):
__module__ = 'preferences.models'
telephone = models.CharField(
max_length=24,
blank=True,
null=True,
)
fax = models.Char... | bsd-3-clause | 1,976,256,016,569,341,200 | 21.361702 | 70 | 0.596575 | false | 4.073643 | false | false | false |
nealtodd/wagtail | wagtail/images/views/serve.py | 3 | 3400 | import base64
import hashlib
import hmac
import imghdr
from wsgiref.util import FileWrapper
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured, PermissionDenied
from django.http import HttpResponse, HttpResponsePermanentRedirect, StreamingHttpResponse
from django.shortcuts import ... | bsd-3-clause | -6,663,978,026,707,857,000 | 34.789474 | 114 | 0.707353 | false | 3.894616 | false | false | false |
toros-astro/ProperImage | properimage/utils.py | 1 | 10039 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# utils.py
#
# Copyright 2016 Bruno S <bruno@oac.unc.edu.ar>
#
# 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 Licens... | bsd-3-clause | 2,111,238,457,958,437,600 | 27.278873 | 77 | 0.591892 | false | 3.363149 | false | false | false |
seung-lab/cloud-volume | cloudvolume/datasource/precomputed/image/rx.py | 1 | 11090 | from functools import partial
import itertools
import math
import os
import threading
import numpy as np
from six.moves import range
from tqdm import tqdm
from cloudfiles import reset_connection_pools, CloudFiles, compression
import fastremap
from ....exceptions import EmptyVolumeException, EmptyFileException
from .... | bsd-3-clause | 5,789,913,100,231,406,000 | 27.656331 | 101 | 0.67358 | false | 3.570509 | false | false | false |
tangentlabs/tangent-deployer | src/tangentdeployer/aws/elb.py | 1 | 4028 | import json
import utils
import boto.ec2.elb
from fabconfig import env
from fabric.api import local
def get_or_create_load_balancer():
utils.status("Getting %s load balancer" % env.environment)
load_balancer = get(load_balancer_name=env.load_balancer_name)
if not load_balancer:
return create_load... | mit | -4,524,741,475,131,346,400 | 31.483871 | 77 | 0.617428 | false | 4.081054 | false | false | false |
Blazemeter/taurus | tests/resources/apiritif/test_codegen.py | 1 | 2578 | # coding=utf-8
import logging
import random
import string
import sys
import unittest
from time import time, sleep
import apiritif
log = logging.getLogger('apiritif.http')
log.addHandler(logging.StreamHandler(sys.stdout))
log.setLevel(logging.DEBUG)
class TestWithExtractors(unittest.TestCase):
def setUp(self):... | apache-2.0 | 2,061,219,892,558,965,800 | 34.315068 | 105 | 0.611715 | false | 3.600559 | false | false | false |
bengosney/romrescue.org | team/migrations/0005_auto_20161029_1857.py | 1 | 1667 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-10-29 18:57
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import image_cropping.fields
class Migration(migrations.Migration):
dependencies = [
('team', '0004_teammember_job'),
... | gpl-3.0 | 2,396,542,858,550,056,400 | 39.658537 | 236 | 0.604079 | false | 4.03632 | false | false | false |
stvstnfrd/edx-platform | common/lib/xmodule/xmodule/modulestore/split_mongo/definition_lazy_loader.py | 1 | 1619 | # lint-amnesty, pylint: disable=missing-module-docstring
import copy
from opaque_keys.edx.locator import DefinitionLocator
class DefinitionLazyLoader(object):
"""
A placeholder to put into an xblock in place of its definition which
when accessed knows how to get its content. Only useful if the containin... | agpl-3.0 | -1,342,814,386,339,033,600 | 45.257143 | 108 | 0.704756 | false | 4.625714 | false | false | false |
Antergos/Cnchi | src/widgets/webcam_widget.py | 1 | 5550 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# webcam_widget.py
#
# Copyright © 2013-2018 Antergos
#
# This file is part of Cnchi.
#
# Cnchi 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 ... | gpl-3.0 | -5,490,614,462,187,439,000 | 30.890805 | 88 | 0.631465 | false | 3.614984 | false | false | false |
NPPC-UK/wireless_sensors | setup_logger/setup_logger.py | 1 | 7621 | #!/usr/bin/env python
# Copyright (C) 2017 Aberystwyth University
# 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 | -9,138,549,356,838,000,000 | 27.436567 | 278 | 0.668023 | false | 3.363195 | false | false | false |
googleads/googleads-python-lib | examples/ad_manager/v202105/custom_field_service/deactivate_all_line_item_custom_fields.py | 1 | 2682 | #!/usr/bin/env python
#
# Copyright 2015 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 requir... | apache-2.0 | 8,414,907,480,595,389,000 | 35.739726 | 80 | 0.709918 | false | 4.119816 | false | false | false |
Rogentos/argent-anaconda | installclasses/awesome.py | 1 | 2687 | #
# awesome.py
#
# Copyright (C) 2010 Fabio Erculiani
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program... | gpl-2.0 | 2,908,679,965,218,311,700 | 28.527473 | 83 | 0.679196 | false | 3.866187 | false | false | false |
Jazende/ProjectEuler | problem_026.py | 1 | 2481 | import math
def go_until_repeat_remainder(nom, den, cur_max=1000):
remainders = []
cycles = 0
while True:
if nom < den:
nom*=10
cycles += 1
if nom == den:
break
if nom > den:
remainder = nom%den
if remainder in remainders:
... | gpl-3.0 | -6,844,096,892,728,083,000 | 26.566667 | 116 | 0.512696 | false | 3.321285 | false | false | false |
leewinder/tslerp | automation/prepare_distribution_package.py | 1 | 2629 | """ Builds up a release package ready to be built or distributed by NPM. The distributable content
is taken from the development folder to make it easier to strip out unneeded package content. """
#!/usr/bin/python
# Imports
import os
import shutil
import fnmatch
import distutils.dir_util
import cli
#
# Finds all fi... | mit | 491,645,362,754,421,000 | 26.103093 | 99 | 0.669836 | false | 3.766476 | false | false | false |
zigazupancic/sat-solver | boolean.py | 1 | 4960 | class Formula:
def __ne__(self, other):
return not (self == other)
def flatten(self):
return self
def getVariable(self, mapping):
if self not in mapping:
mapping[self] = freshVariable()
return mapping[self]
class Variable(Formula):
def __init__(self, x):
... | mit | 3,495,161,264,798,552,000 | 23.554455 | 73 | 0.55 | false | 3.757576 | false | false | false |
mozillazg/lark | lark/lark/settings.py | 1 | 1098 | """
Django settings for lark project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
import os
from .base import *
# Build paths inside the project like this: os... | mit | 7,931,855,443,845,683,000 | 27.153846 | 71 | 0.716758 | false | 3.041551 | false | false | false |
bi4o4ek/yandex-loganalytics | loganalytics.py | 1 | 3271 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This script calculates 95th percentile for request time and shows top 10 requests ID with max send time to customers
#
# Start example:
# ./loganalytics.py /path-to-log/input.txt > /path-to-some-dir/output.txt
# then you can complete analysis by running 2nd script
# ./granaly... | apache-2.0 | -2,882,829,045,544,299,000 | 32.442105 | 118 | 0.678628 | false | 2.971936 | false | false | false |
e-gun/HipparchiaBuilder | builder/parsers/regexsubstitutions.py | 1 | 29163 | # -*- coding: utf-8 -*-
"""
HipparchiaBuilder: compile a database of Greek and Latin texts
Copyright: E Gunderson 2016-21
License: GNU GENERAL PUBLIC LICENSE 3
(see LICENSE in the top level directory of the distribution)
"""
from string import punctuation
from typing import List
import configparser
import re
fro... | gpl-3.0 | 2,887,905,583,091,091,000 | 32.451843 | 264 | 0.656619 | false | 2.613284 | true | false | false |
rspavel/spack | var/spack/repos/builtin/packages/ibm-java/package.py | 1 | 3917 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import platform
import os
class IbmJava(Package):
"""Binary distribution of the IBM Java Softwar... | lgpl-2.1 | -2,857,033,170,495,520,000 | 38.969388 | 100 | 0.66071 | false | 2.985518 | false | false | false |
EmanueleCannizzaro/scons | test/option-b.py | 1 | 1515 | #!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to us... | mit | 2,320,631,516,134,854,700 | 34.232558 | 90 | 0.747855 | false | 3.778055 | true | false | false |
gt-ros-pkg/hrl_autobed_dev | autobed_pose_estimator/src/visualize_pressure_mat_3d.py | 1 | 1438 | import numpy as np
import roslib; roslib.load_manifest('hrl_msgs')
import rospy
import matplotlib.pyplot as plt
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
from hrl_msgs.msg import FloatArrayBare
class Visualize3D():
def __init__(self):
rospy.Subscriber("/fsascan", FloatArrayBare,... | mit | 3,793,219,297,732,556,300 | 30.955556 | 80 | 0.625869 | false | 3.231461 | false | false | false |
jeffmarcom/checkbox | plainbox/plainbox/abc.py | 1 | 6650 | # This file is part of Checkbox.
#
# Copyright 2012 Canonical Ltd.
# Written by:
# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
#
# Checkbox 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 versio... | gpl-3.0 | -5,495,530,179,601,678,000 | 31.281553 | 79 | 0.671278 | false | 4.808388 | false | false | false |
kriberg/stationspinner | stationspinner/accounting/urls.py | 1 | 1078 | from django.conf.urls import url, include
from rest_framework import routers
from stationspinner.accounting.views import APIKeyViewset, LoginView, \
CapsulerViewset, LogoutView, MissingTrainingViewset, RevalidateKeyView, \
ObtainAuthTokenView, CheckAuthTokenView, RefreshAuthTokenView
router = routers.DefaultRo... | agpl-3.0 | -8,888,957,358,530,266,000 | 52.95 | 93 | 0.751391 | false | 3.488673 | false | true | false |
robert-7/gambit | src/python/gambit/tests/test_games/personal_test_games/read_and_solve.py | 1 | 1668 | import gambit, time, os, sys
from utils import compute_time_of
'''
Read GAME_FILE in SAVED_GAMES_DIRECTORY and create a tree from it.
'''
def create_tree(args):
os.chdir(SAVED_GAMES_DIRECTORY)
g = gambit.Game.read_game(GAME_FILE)
os.chdir(PARENT_DIRECTORY)
return g
'''
Solve the game.
'''
def solve_ga... | gpl-2.0 | 2,718,975,047,332,783,600 | 24.272727 | 98 | 0.642086 | false | 3.264188 | false | false | false |
Stargrazer82301/CAAPR | CAAPR/CAAPR_AstroMagic/PTS/pts/core/basics/map.py | 1 | 3291 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | mit | 8,885,819,028,416,556,000 | 35.555556 | 128 | 0.452888 | false | 4.747475 | false | false | false |
legalsylvain/oca-custom | __unported__/oca_freestore/models/github_organization.py | 1 | 5227 | # -*- coding: utf-8 -*-
# Copyright (C) 2016-Today: Odoo Community Association (OCA)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
class GithubOrganization(models.Model):
_name = 'github.or... | agpl-3.0 | 4,811,223,040,879,998,000 | 36.604317 | 78 | 0.62005 | false | 4.178257 | false | false | false |
Edern76/MatchsticksGame | name.py | 1 | 11395 | #!/usr/bin/env python3
# -*- coding: utf8 -*-
import threading, time
from tkinter import *
from tkinter.messagebox import *
status = '' #Variable servant à la fois à indiquer si l'on peut poursuivre l'exécution du programme (càd si l'on a entré un (ou plusieurs, selon la situation) nom valide et cliqué sur OK) et à r... | mit | -1,213,387,413,839,428,000 | 59.473118 | 523 | 0.639459 | false | 3.196078 | false | false | false |
DataONEorg/d1_python | gmn/src/d1_gmn/app/management/commands/diag-restore-sciobj.py | 1 | 8217 | # This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you ma... | apache-2.0 | -1,802,804,323,378,339,300 | 48.203593 | 111 | 0.720579 | false | 4.098254 | false | false | false |
Russell-Jones/django-wiki | wiki/migrations/0001_initial.py | 1 | 18236 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
try:
from django.contrib.auth import get_user_model
except ImportError: # django < 1.5
from django.contrib.auth.models import User
else:
... | gpl-3.0 | -3,276,954,538,703,390,000 | 67.556391 | 209 | 0.592948 | false | 3.736885 | false | false | false |
MrYsLab/razmq | razmq/motors/motors.py | 1 | 5067 | """
Copyright (c) 2016 Alan Yorinks All right reserved.
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 library is distri... | gpl-3.0 | 8,621,895,000,938,363,000 | 31.273885 | 119 | 0.623051 | false | 4.073151 | false | false | false |
kyhau/reko | reko/speechreko.py | 1 | 3825 | """
NOTE: this example requires PyAudio because it uses the Microphone class
"""
import os
import speech_recognition as sr
import time
from playsound import playsound
from reko.polly import Polly
from reko.reko import Reko
class SpeechReko(Reko):
def __init__(self, profile, collection_id, audio_on=False):
... | mit | -4,202,663,694,091,020,300 | 31.692308 | 127 | 0.554248 | false | 4.056204 | false | false | false |
travistang/late_fyt | ntm.py | 1 | 1191 | import tensorflow as tf
import numpy as np
class NTM(object):
def __init__(self,session, mem_size, mem_dim,controller):
self.sess = session
self.memory_dim = mem_dim
self.memory_length = mem_size
# construct memory variables
self.memory = [tf.Variable(np.zeros(self.memory_dim).astype(np.float32)) for _ in ... | mit | -5,308,125,148,231,301,000 | 28.073171 | 100 | 0.690176 | false | 2.862981 | false | false | false |
hp-storage/python-lefthandclient | hpelefthandclient/__init__.py | 2 | 1185 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# (c) Copyright 2013-2016 Hewlett Packard Enterprise Development LP
# 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 ... | apache-2.0 | 7,481,040,198,847,530,000 | 31.916667 | 78 | 0.714768 | false | 3.703125 | false | false | false |
migimigi/bme280-1 | docs/conf.py | 2 | 8446 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# bme280 documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# auto... | bsd-3-clause | 7,603,664,539,946,308,000 | 29.712727 | 76 | 0.705186 | false | 3.709267 | true | false | false |
jeremiedecock/snippets | python/tkinter/python3/geometry_manager_pack_test_with_1_widget.py | 1 | 6263 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including witho... | mit | 4,548,765,682,759,385,600 | 40.190789 | 134 | 0.691902 | false | 3.030494 | false | false | false |
fernandog/Medusa | medusa/providers/torrent/html/zooqle.py | 1 | 5673 | # coding=utf-8
"""Provider code for Zooqle."""
from __future__ import unicode_literals
import logging
from medusa import tv
from medusa.bs4_parser import BS4Parser
from medusa.helper.common import (
convert_size,
try_int,
)
from medusa.logger.adapters.style import BraceAdapter
from medusa.providers.torrent.... | gpl-3.0 | 7,063,182,022,490,597,000 | 32.568047 | 94 | 0.482285 | false | 4.513126 | false | false | false |
ncareol/qmicromap | tool_qmicromap.py | 1 | 1595 | import os
import sys
tools = ['qt5','spatialdb','doxygen','prefixoptions']
env = Environment(tools = ['default'] + tools)
# qt modules
qtModules = Split('QtCore QtGui QtSvg')
env.EnableQtModules(qtModules)
def win_qt_setup(env):
# Windows needs an extra include path for Qt modules.
qt5include = env['QT5DIR']... | bsd-3-clause | -6,514,323,080,600,594,000 | 24.725806 | 109 | 0.685266 | false | 3.235294 | false | false | false |
ermongroup/a-nice-mc | a_nice_mc/objectives/expression/mog2.py | 1 | 1170 | import numpy as np
import tensorflow as tf
from a_nice_mc.objectives.expression import Expression
from a_nice_mc.utils.logger import create_logger
logger = create_logger(__name__)
class MixtureOfGaussians(Expression):
def __init__(self, name='mog2', display=True):
super(MixtureOfGaussians, self).__init__... | mit | 8,517,003,602,130,317,000 | 27.536585 | 76 | 0.54188 | false | 2.805755 | false | false | false |
LynnCo/toolkit | graphVis/interface.py | 1 | 3989 | #Basic
'''
import tkinter as tk
class GUI(tk.Frame):
def __init__(self, master=None):
tk.Frame.__init__(self, master)
self.grid()
self.create()
def create(self):
w = tk.Canvas(self,width=600,height=400)
# w.create_image = (image=vp)
w.pack()
ru... | mit | -7,537,670,444,090,344,000 | 26.142857 | 100 | 0.604161 | false | 3.116406 | false | false | false |
rsms/smisk | admin/old_examples/testbed/process.py | 1 | 3051 | #!/usr/bin/env python
# encoding: utf-8
import sys, os, platform
from smisk import Application, Request, Response, request
class MyRequest(Request):
def accepts_charsets(self):
'''Return a list of charsets which the client can handle, ordered by priority and appearing order.'''
vv = []
if not 'HTTP_ACCEP... | mit | -5,327,384,261,450,466,000 | 28.621359 | 124 | 0.620125 | false | 3.273605 | true | false | false |
eamontoyaa/pyCSS | validations/validation03-comparisonZhao.etal.,2014.py | 1 | 5013 | '''
# Description.
This is a minimal module in order to perform a circular arc slope stability
analysis by the limit equilibrium model by Fellenius and Bishop symplified
methods.
'''
#------------------------------------------------------------------------------
## Add functions directory
import sys
sys.pa... | bsd-2-clause | 6,933,199,822,277,709,000 | 37.777778 | 79 | 0.656425 | false | 3.723626 | false | false | false |
viewportvr/daysinvr | backend/remixvr/database.py | 1 | 1343 | # -*- coding: utf-8 -*-
"""Database module, including the SQLAlchemy database object and DB-related utilities."""
from sqlalchemy.orm import relationship
from .compat import basestring
from .extensions import db
# Alias common SQLAlchemy names
Column = db.Column
relationship = relationship
Model = db.Model
# From Mi... | mit | 9,041,744,562,209,402,000 | 28.195652 | 89 | 0.647059 | false | 3.997024 | false | false | false |
super-goose/orbit | space/planet.py | 1 | 3201 | import pygame
import math
class Planet:
def __init__(self, surface, color, position, radius, center):
self.radius = radius
self.surface = surface
self.color = color
self.setPosition(position)
self.center = center
self.setOrbitOffset(0)
self.setOrbitPeriod(1)
... | mit | -2,533,718,706,393,433,600 | 24.616 | 80 | 0.564199 | false | 3.709154 | false | false | false |
krasnoperov/django-formalizr | formalizr/views.py | 1 | 3769 | import json
from django.contrib import messages
from django.http import HttpResponse
from django.views.generic.edit import CreateView, UpdateView, FormView
from django.core.serializers.json import DjangoJSONEncoder
class AjaxFormMixin(object):
"""
Mixin which adds support of AJAX requests to the form.
Ca... | bsd-3-clause | 5,784,175,414,557,377,000 | 30.14876 | 109 | 0.59273 | false | 4.119126 | false | false | false |
moelius/async-task-processor | async_task_processor/primitives/tarantool_task.py | 1 | 1986 | import asyncio
from async_task_processor.primitives.base_task import BaseTask
class TarantoolTask(BaseTask):
conn_max_retries = None
conn_retries = None
conn_retry_countdown = None
ack = True # Using to prevent tarantool ack task
connection = None
data = None
queue_name = None
_task ... | mit | -3,077,405,517,272,907,000 | 29.553846 | 114 | 0.6143 | false | 3.726079 | false | false | false |
uncled1023/pygments | Pygments/pygments-lib/pygments/lexers/php.py | 1 | 10730 | # -*- coding: utf-8 -*-
"""
pygments.lexers.php
~~~~~~~~~~~~~~~~~~~
Lexers for PHP and related languages.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, default, us... | bsd-2-clause | -9,095,089,548,564,730,000 | 39.187266 | 89 | 0.502703 | false | 3.721818 | false | false | false |
mateor/pants | src/python/pants/engine/engine.py | 1 | 5985 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import logging
from ... | apache-2.0 | -4,252,687,880,089,084,000 | 35.717791 | 98 | 0.705263 | false | 4.139004 | false | false | false |
maas/maas | src/maasserver/websockets/handlers/domain.py | 1 | 8142 | # Copyright 2016-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""The domain handler for the WebSocket connection."""
from django.core.exceptions import ValidationError
from maasserver.forms.dnsdata import DNSDataForm
from maasserver.f... | agpl-3.0 | -6,462,518,231,539,437,000 | 35.348214 | 77 | 0.594203 | false | 4.205579 | false | false | false |
h2oloopan/easymerge | EasyMerge/tests/reddit/r2/r2/controllers/error.py | 1 | 8526 | # The contents of this file are subject to the Common Public Attribution
# License Version 1.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://code.reddit.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, ... | mit | 9,156,844,164,749,541,000 | 35.75 | 94 | 0.604621 | false | 4.050356 | false | false | false |
PnEcrins/GeoNature | backend/geonature/core/gn_permissions/tools.py | 1 | 9278 | import logging, json
from flask import current_app, redirect, Response
from itsdangerous import (TimedJSONWebSignatureSerializer as Serializer,
SignatureExpired, BadSignature)
import sqlalchemy as sa
from sqlalchemy.sql.expression import func
from pypnusershub.db.tools import (
Insuff... | bsd-2-clause | 3,092,783,275,424,942,600 | 32.014235 | 124 | 0.612267 | false | 3.59156 | false | false | false |
allanliebold/data-structures | src/test_linked_list.py | 1 | 2515 | """Tests for singly-linked list."""
import pytest
def test_node_attributes():
"""Test that node object has expected attributes."""
from linked_list import Node
n = Node('test')
assert n.data == 'test' and n.next_node is None
def test_list_push():
"""Test that linked_list has node pushed to it.""... | mit | 2,257,836,508,669,859,300 | 26.944444 | 91 | 0.662028 | false | 3.608321 | true | false | false |
fcbond/OMW | omw/__init__.py | 1 | 28562 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os, sys, sqlite3, datetime, urllib, gzip, requests
from time import sleep
from flask import Flask, render_template, g, request, redirect, url_for, send_from_directory, session, flash, jsonify, make_response, Markup, Response
from flask_login import LoginManager, Us... | mit | -2,032,441,808,575,662,300 | 33.165072 | 150 | 0.51418 | false | 3.507552 | false | false | false |
schef/schef.github.io | source/07/mc-7-4-tp-cde-md.py | 1 | 2572 | #!/usr/bin/python
# Written by Stjepan Horvat
# ( zvanstefan@gmail.com )
# by the exercises from David Lucal Burge - Perfect Pitch Ear Traning Supercourse
# Thanks to Wojciech M. Zabolotny ( wzab@ise.pw.edu.pl ) for snd-virmidi example
# ( wzab@ise.pw.edu.pl )
import random
import time
import sys
import re
fname="/de... | mit | -7,023,858,542,194,064,000 | 24.979798 | 155 | 0.588647 | false | 2.786566 | false | false | false |
fortesg/fortrantestgenerator | config_fortrantestgenerator.py | 1 | 1665 | import os
ftgDir = os.path.dirname(os.path.realpath(__file__))
# Directory where FortranCallGraph is located
# REQUIRED
FCG_DIR = ftgDir + '/../fortrancallgraph'
# Configuration file to be used by FortranCallGraph
# OPTIONAL: When omitted or None, config variables required by FortranCallGraph must be assigned here
#... | gpl-3.0 | -4,443,048,437,855,805,400 | 38.642857 | 111 | 0.763363 | false | 3.708241 | true | false | false |
ethereum/pyethapp | pyethapp/app.py | 1 | 30125 | # -*- coding: utf8 -*-
from __future__ import print_function
from __future__ import absolute_import
from builtins import zip
from builtins import next
from builtins import range
import copy
import json
import os
import signal
import sys
from logging import StreamHandler
from uuid import uuid4
import click
import ether... | mit | 1,139,392,548,384,149,500 | 39.220294 | 180 | 0.645378 | false | 3.923037 | true | false | false |
kirbyfan64/cppexpat | doc/source/conf.py | 1 | 8300 | # -*- coding: utf-8 -*-
#
# CppExpat documentation build configuration file, created by
# sphinx-quickstart on Mon Jul 13 19:00:49 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | mit | -6,357,192,428,893,004,000 | 30.679389 | 79 | 0.707229 | false | 3.661226 | true | false | false |
ehashman/oh-mainline | vendor/packages/django-http-proxy/httpproxy/migrations/0001_initial.py | 1 | 2970 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Request',
fields=[
('id', models.AutoField(verb... | agpl-3.0 | 5,437,310,444,514,051,000 | 43.328358 | 122 | 0.537037 | false | 4.513678 | false | false | false |
Banbury/cartwheel-3d | Python/UI/MainWindow.py | 1 | 5484 | '''
Created on 2009-08-24
This module contains the main OpenGL application window that is used by all SNM applications
@author: beaudoin
'''
import wx
import UI
class MainWindow(wx.Frame):
"""The class for the main window."""
MIN_TOOLPANEL_WIDTH = 200
MIN_CONSOLE_HEIGHT = 100
... | apache-2.0 | -7,808,601,954,536,289,000 | 34.317881 | 117 | 0.585157 | false | 3.925555 | false | false | false |
serkanaltuntas/yavst | yavst/prepare_gpf4.py | 1 | 4894 | #!/usr/bin/env python
#
#
#
# $Header: /opt/cvs/python/packages/share1.5/AutoDockTools/Utilities24/prepare_gpf4.py,v 1.10.4.3 2009/03/23 21:54:28 rhuey Exp $
#
import string
import os.path
import glob
from MolKit import Read
from AutoDockTools.GridParameters import GridParameters, grid_parameter_list4
from AutoDockTo... | mit | -1,222,868,990,191,267,000 | 35.796992 | 129 | 0.592154 | false | 3.28677 | false | false | false |
wy182000/gyp | pylib/gyp/generator/ninja.py | 1 | 80265 | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import copy
import hashlib
import multiprocessing
import os.path
import re
import signal
import subprocess
import sys
import gyp
import gyp.common
import gyp.msvs_... | bsd-3-clause | -8,764,016,464,242,874,000 | 40.203799 | 80 | 0.626624 | false | 3.876974 | true | false | false |
myd7349/DiveIntoPython3Practices | chapter_09_UnitTesting/roman2.py | 1 | 4834 | # -*- coding: utf-8 -*-
# 2014-11-18T22:48+08:00
import unittest
class OutOfRangeError(ValueError): pass
roman_numeral_map = (('M', 1000),
('CM', 900),
('D', 500),
('CD', 400),
('C', 100),
('XC', 90),
... | lgpl-3.0 | 2,665,887,912,295,815,000 | 36.984252 | 95 | 0.439884 | false | 3.980198 | true | false | false |
troup-system/troup | troup/observer.py | 1 | 1190 | # Copyright 2016 Pavle Jonoski
#
# 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... | apache-2.0 | -3,194,647,551,165,012,500 | 33 | 74 | 0.663866 | false | 4.311594 | false | false | false |
MaxTyutyunnikov/lino | obsolete/tests/74.py | 1 | 1459 | ## Copyright 2003-2006 Luc Saffre
## This file is part of the Lino project.
## Lino is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version... | gpl-3.0 | -2,120,210,230,867,551,700 | 30.717391 | 70 | 0.681974 | false | 3.558537 | false | false | false |
gem/oq-engine | openquake/hmtk/seismicity/declusterer/dec_gardner_knopoff.py | 1 | 6271 | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# LICENSE
#
# Copyright (C) 2010-2021 GEM Foundation, G. Weatherill, M. Pagani,
# D. Monelli.
#
# The Hazard Modeller's Toolkit is free software: you can redistribute
# it and/or modify it under the terms of the GNU Affero General Public
# License a... | agpl-3.0 | -5,080,174,637,922,129,000 | 39.173077 | 79 | 0.629807 | false | 3.826007 | true | false | false |
tommyod/KDEpy | KDEpy/tests/test_estimator_vs_estimator.py | 1 | 2239 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Test the implemented estimators against each other on simple data sets.
"""
import numpy as np
from KDEpy.NaiveKDE import NaiveKDE
from KDEpy.TreeKDE import TreeKDE
from KDEpy.FFTKDE import FFTKDE
import itertools
import pytest
N = 2 ** 5
estimators = [NaiveKDE, Tree... | gpl-3.0 | 7,116,459,819,006,918,000 | 28.460526 | 108 | 0.634658 | false | 2.946053 | true | false | false |
BenDoan/unomaha_utils | course_scraper/scraper.py | 1 | 5095 | #!/usr/bin/env python2
"""
Usage:
./scraper.py [options]
Options:
-h, --help Prints this help message
-o FILE, --output FILE Specifies output file
-c COLLEGE, --college COLLEGE Specifies a specific college
-l, --last-term-only Only ouputs the last term
... | mit | -6,599,031,899,051,639,000 | 27.463687 | 193 | 0.559961 | false | 3.776872 | false | false | false |
admk/soap | soap/semantics/schedule/ii.py | 1 | 2125 | import itertools
import math
import numpy
from soap.context import context
neg_inf = -float('inf')
def rec_init_int_check(graph, ii):
"""
Checks if the target II is valid. Runs a modified Floyd-Warshall
algorithm to test the absence of positive cycles.
Input ii must be greater or equal to 1.
... | mit | 3,456,767,238,910,983,000 | 26.24359 | 73 | 0.596706 | false | 3.289474 | false | false | false |
shivamvats/graphSearch | heuristicSearch/planners/island_astar.py | 1 | 2665 | from astar import *
class IslandAstar(Astar):
def __init__(self, env, inflation=10):
super(IslandAstar, self).__init__(env, inflation)
#@profile
def plan(self, startNode, goalNode, viz=None):
self.startNode = startNode
self.goalNode = goalNode
print(goalNode.getNodeId())
... | mit | -3,337,239,640,545,486,300 | 31.901235 | 83 | 0.566604 | false | 4.074924 | false | false | false |
amadeusproject/amadeuslms | reports/forms.py | 1 | 3623 | """
Copyright 2016, 2017 UFPE - Universidade Federal de Pernambuco
Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS
O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como publicada pela ... | gpl-2.0 | -1,449,295,162,794,327,800 | 41.797619 | 231 | 0.705064 | false | 3.169312 | false | false | false |
bernardhu/whlianjia | crawler.py | 1 | 59560 | # -*- coding: utf-8 -*-
import pickle
import math
import os.path
import shutil
import datetime
import time
import random
import json
import re
import chardet
import string
import base64
import requests
from bs4 import BeautifulSoup
from model import TradedHouse, DistricHouse, BidHouse, RentHouse, create_table, cle... | mit | -7,020,224,055,126,833,000 | 47.170492 | 155 | 0.585199 | false | 2.855588 | false | false | false |
andres53016/domotica | software/alarma.py | 1 | 1989 | import zmq,json,time
import pygame
import RPi.GPIO as GPIO
pygame.mixer.init()
GPIO.setmode(GPIO.BCM)
GPIO.setup(25,GPIO.OUT)
GPIO.setup(8,GPIO.OUT)
GPIO.output(25,0)
GPIO.output(8,0)
entradas={"puerta":17,"ventanaCocina":27,"ventanaDormitorio":22}
for entrada in entradas.values():
GPIO.setup(entrada,GPIO.IN,pull_u... | gpl-3.0 | -7,158,794,117,130,000,000 | 29.136364 | 64 | 0.529915 | false | 3.132283 | false | false | false |
2016-Capstone/PythonController | src/Bybop_Commands.py | 1 | 8092 | import os
import sys
import struct
MY_PATH, _ = os.path.split(os.path.realpath(__file__))
ARSDK_PATH=os.path.join(MY_PATH,'..', 'arsdk-xml')
ARCOMMANDS_PATH=os.path.join(ARSDK_PATH, 'xml')
sys.path.append(ARSDK_PATH)
import arsdkparser
_ctx = arsdkparser.ArParserCtx()
arsdkparser.parse_xml(_ctx, os.path.join(ARCOMM... | bsd-3-clause | -1,871,689,588,491,917,000 | 29.885496 | 107 | 0.57699 | false | 3.546012 | false | false | false |
juanchodepisa/sbtk | SBTK_League_Helper/src/security/key_handling.py | 1 | 4752 | from urllib.parse import quote
import json
import os
from src import log_entry
from .obfuscation import transform
from .exceptions import KeysDirectoryNotFound, KeysFileNotFound
user_index = os.path.join(os.path.dirname(__file__), "keys_loc.json")
default_context = "OGS"
obfuscated = "_obfuscated_"
plaintext = "_pla... | mit | -288,971,447,259,933,760 | 32.471831 | 134 | 0.555766 | false | 3.774424 | false | false | false |
xirdneh/oposum | oPOSum/apps/client/models.py | 1 | 3379 | from django.db import models
from oPOSum.libs import utils as pos_utils
from django.utils.translation import ugettext as _
from decimal import Decimal
from django.core.validators import RegexValidator
# Create your models here.
class Client(models.Model):
first_name = models.CharField(_("First Name"), max_length=1... | mit | -6,659,084,490,970,760,000 | 39.22619 | 105 | 0.576798 | false | 3.668838 | false | false | false |
avanzosc/avanzosc6.1 | avanzosc_crm_call_ext/crm_opportunity.py | 1 | 7613 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Avanzosc - Avanced Open Source Consulting
# Copyright (C) 2011 - 2012 Avanzosc <http://www.avanzosc.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 | -5,189,564,213,395,655,000 | 45.408537 | 113 | 0.517935 | false | 4.20265 | false | false | false |
weirdgiraffe/plugin.video.giraffe.seasonvar | resources/site-packages/plugin_video/screen.py | 1 | 7083 | # coding: utf-8
#
# Copyright © 2017 weirdgiraffe <giraffe@cyberzoo.xyz>
#
# Distributed under terms of the MIT license.
#
from kodi import logger, Plugin
import seasonvar
from datetime import datetime, timedelta
def week(plugin):
date = datetime.today()
for date_offset in range(7):
datestr = date.st... | mit | 7,216,715,170,337,933,000 | 31.391705 | 76 | 0.551999 | false | 3.717081 | false | false | false |
bagage/cadastre-conflation | back/batimap/bbox.py | 1 | 1181 | import re
from math import sqrt
class Bbox(object):
def __init__(self, xmin, ymin, xmax, ymax):
self.coords = [xmin, ymin, xmax, ymax]
self.xmin = xmin
self.ymin = ymin
self.xmax = xmax
self.ymax = ymax
def __repr__(self):
return f"{self.xmin},{self.ymin},{self... | mit | -6,715,307,017,670,733,000 | 26.465116 | 84 | 0.485182 | false | 3.611621 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.