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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lcpt/xc | python_modules/postprocess/reports/export_internal_forces.py | 1 | 4395 | # -*- coding: utf-8 -*-
__author__= "Luis C. Pérez Tato (LCPT)"
__copyright__= "Copyright 2016,LCPT"
__license__= "GPL"
__version__= "3.0"
__email__= "l.pereztato@gmail.com"
import math
from materials.sections import internal_forces
from miscUtils import LogMessages as lmsg
def exportInternalForces(nmbComb, elems, f... | gpl-3.0 | 3,656,172,381,876,400,000 | 49.505747 | 161 | 0.703687 | false | 2.985054 | false | false | false |
FannyCheung/python_Machine-Learning | MapReduce处理日志文件/FileSplit.py | 1 | 1029 | # coding:utf-8
#file:FileSplit.py
import os,os.path,time
def FileSplit(sourceFile,targetFolder):
sFile = open(sourceFile,'r')
number = 100000 #每个小文件中保存100000条数据
dataLine = sFile.readline()
tempData = [] #缓存列表
fileNum = 1
if not os.path.isdir(targetFolder): #如果目标目录不存在,则创建
os.mkdir(targetFolder)
... | gpl-2.0 | -5,881,135,195,889,917,000 | 27.129032 | 93 | 0.660161 | false | 2.17207 | false | false | false |
lexelby/apiary | historical/sqllog_lengths.py | 1 | 2216 | #
# $LicenseInfo:firstyear=2010&license=mit$
#
# Copyright (c) 2010, Linden Research, Inc.
#
# 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 limitatio... | mit | -5,608,589,848,218,999,000 | 35.327869 | 81 | 0.680957 | false | 3.82069 | false | false | false |
JohannesBuchner/PLUTO | Tools/pyPLUTO/build/lib/pyPLUTO/part_read.py | 1 | 9047 | import sys
import os
import numpy as np
import array
class ploadparticles(object):
def __init__(self, ns, wdir=None, datatype=None):
self.ns = ns
if wdir == None:
self.wdir = os.getcwd()+'/'
else:
self.wdir = wdir
if datatype == None:
dat... | gpl-2.0 | -4,227,669,054,109,843,500 | 35.043825 | 89 | 0.416934 | false | 3.384587 | false | false | false |
roverdotcom/gargoyle | setup.py | 1 | 2408 | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function
import codecs
import os
import re
from setuptools import find_packages, setup
def get_version(filename):
with codecs.open(filename, 'r', 'utf-8') as fp:
contents = fp.read()
return re.search(r"__version__ = ['\"](... | apache-2.0 | 6,527,114,406,905,924,000 | 31.986301 | 117 | 0.598422 | false | 3.704615 | false | false | false |
cmaguranis/pycli-covlet-gen | pycli-covlet-gen.py | 1 | 2523 | # initial helloworld attempt!
import argparse
# main
def main():
parser = argparse.ArgumentParser()
parser.add_argument('filearg', help='XML file')
parser.add_argument('-macro', '-m', nargs='+', dest='macarg', help='macro string arg')
args = parser.parse_args()
print(args)
#args_init()
''' De... | gpl-2.0 | 467,371,314,058,214,500 | 29.780488 | 90 | 0.554895 | false | 4.075929 | false | false | false |
argv-minus-one/obnam | obnamlib/plugins/sftp_plugin.py | 1 | 23561 | # Copyright (C) 2009 Lars Wirzenius <liw@liw.fi>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is ... | gpl-3.0 | -4,068,550,024,763,802,600 | 32.949568 | 81 | 0.557616 | false | 4.167138 | false | false | false |
teoliphant/scipy | scipy/sparse/compressed.py | 2 | 24365 | """Base class for sparse matrix formats using compressed storage
"""
__all__ = []
from warnings import warn
import numpy as np
from base import spmatrix, isspmatrix, SparseEfficiencyWarning
from data import _data_matrix
import sparsetools
from sputils import upcast, upcast_char, to_native, isdense, isshape, \
... | bsd-3-clause | -3,646,431,714,401,294,000 | 34.260492 | 108 | 0.52284 | false | 4.186426 | false | false | false |
MFry/pyAlgoDataStructures | hacker_rank/Cracking the coding interview challenge/tree_check_if_BST.py | 1 | 1108 | import unittest
""" Node is defined as
class node:
def __init__(self, data):
self.data = data
self.left = None
self.right = None
"""
def check_binary_search_tree_(root):
if not root:
return True
lower, upper = float('-inf'), float('inf')
return (check_node(root, lower, ... | mit | 4,015,177,449,094,560,000 | 26.04878 | 95 | 0.592058 | false | 3.574194 | false | false | false |
commaai/openpilot | selfdrive/debug/check_freq.py | 1 | 1275 | #!/usr/bin/env python3
# type: ignore
import argparse
import numpy as np
from collections import defaultdict, deque
from common.realtime import sec_since_boot
import cereal.messaging as messaging
if __name__ == "__main__":
context = messaging.Context()
poller = messaging.Poller()
parser = argparse.ArgumentPar... | mit | -3,022,331,044,232,487,400 | 26.12766 | 157 | 0.638431 | false | 3.26087 | false | false | false |
jsayles/wedding | short_url.py | 1 | 4276 | '''
Short URL Generator
===================
Python implementation for generating Tiny URL- and bit.ly-like URLs.
A bit-shuffling approach is used to avoid generating consecutive, predictable
URLs. However, the algorithm is deterministic and will guarantee that no
collisions will occur.
The URL alphabet is fully c... | mit | 8,046,384,760,454,344,000 | 32.147287 | 81 | 0.646866 | false | 3.426282 | false | false | false |
arnaudbore/declarativeTask | src/config.py | 1 | 6122 | import glob
import os
from math import ceil
rawFolder = os.getcwd() + os.path.sep
picturesFolder = rawFolder + 'stimulis' + os.path.sep
picturesExamplesFolder = rawFolder + 'stimulisExample' + os.path.sep
dataFolder = rawFolder + 'data' + os.path.sep
mouseButton = 1
windowMode = True # if False use FullScreen
wind... | mit | 6,783,756,573,278,659,000 | 41.513889 | 93 | 0.27246 | false | 4.596096 | false | false | false |
tomjaspers/uniresto-scraper | uniscrapers/scrapers/vub.py | 1 | 3739 | import requests
import datetime
import lxml.html
from lxml.cssselect import CSSSelector
from . import UniScraper, DATE_FORMAT
# Months in Dutch, to allow the parsing of the (Dutch) site
MONTHS = ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli',
'augustus', 'september', 'oktober', 'november',... | gpl-2.0 | 8,680,757,579,391,135,000 | 34.951923 | 79 | 0.552554 | false | 3.591739 | false | false | false |
helight/helight_code | builder/xbuild.py | 1 | 1629 | #!/usr/bin/env python
# Authors: HelightXu <helight@zhwen.org>
import os, sys, time, subprocess
def error_exit(msg, code = 1):
msg = "build error: " + msg
print >> sys.stderr, msg
sys.exit(code)
def get_pwd():
return subprocess.Popen(['pwd'],
stdout = subprocess.PIPE,
shell = True).communicate()[0].strip()... | apache-2.0 | -4,399,879,333,902,231,000 | 25.704918 | 109 | 0.630448 | false | 2.614767 | false | false | false |
DayGitH/Python-Challenges | DailyProgrammer/DP20120709A.py | 1 | 2709 | """
The Fibonacci numbers, which we are all familiar with, start like this:
0,1,1,2,3,5,8,13,21,34,...
Where each new number in the sequence is the sum of the previous two.
It turns out that by summing different Fibonacci numbers with each other, you can create every single positive integer.
In fact, a much stronger... | mit | -401,763,725,676,713,540 | 38.26087 | 120 | 0.715024 | false | 3.356877 | false | false | false |
mwclient/mwclient | mwclient/client.py | 1 | 45290 | # encoding=utf-8
import warnings
import logging
from six import text_type
import six
from collections import OrderedDict
import json
import requests
from requests.auth import HTTPBasicAuth, AuthBase
from requests_oauthlib import OAuth1
import mwclient.errors as errors
import mwclient.listing as listing
from mwclient... | mit | -1,258,560,439,480,220,700 | 38.970874 | 90 | 0.535695 | false | 4.448188 | false | false | false |
jaypipes/enamel | docs/source/conf.py | 1 | 1418 | # -*- coding: utf-8 -*-
#
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.view... | apache-2.0 | -2,008,821,273,431,502,600 | 29.170213 | 79 | 0.623413 | false | 4.134111 | false | false | false |
JoelCapitao/NetScriptGen | src/main/python/equipment/feature/Interface.py | 1 | 2883 | from process.ArrayParsing import ArrayParsing
FUNCTION = 'Function'
EQUIPMENT = 'Equipment'
TYPE_OF_INTERFACE = 'TypeOfInterface'
SLOT = 'Slot'
SUBLSLOT = 'Subslot'
INTERFACES = 'Interfaces'
class Interface(ArrayParsing):
""" This class provides methods to deal with interfaces of an equipemnt.
""... | gpl-2.0 | -1,564,233,507,621,991,200 | 36.44 | 121 | 0.611863 | false | 3.890688 | false | false | false |
wittrup/crap | P8702N/console.py | 1 | 1375 | #!/usr/bin/env python
import socket
import threading
import sbs
TCP_IP = '10.0.0.184'
TCP_PORT = 10001
BUFFER_SIZE = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
pipeaway = {'kern.alert': None, 'daemon.warn': None, 'CMS MDM': None}
for key in pipeaway:
pipeaway[key] ... | mit | 8,642,451,571,220,612,000 | 21.933333 | 80 | 0.541091 | false | 3.321256 | false | false | false |
tedlaz/pyted | ted17/ted17/f_find.py | 1 | 4774 | # -*- coding: utf-8 -*-
import PyQt5.QtWidgets as Qw
import PyQt5.QtCore as Qc
from . import dec
from . import db
from decimal import Decimal as tdec
class sortWidgetItem(Qw.QTableWidgetItem):
"""
"""
def __init__(self, text, sortKey):
super().__init__(text, Qw.QTableWidgetItem.UserType)
... | gpl-3.0 | -3,289,862,206,161,291,300 | 31.486301 | 78 | 0.57685 | false | 3.4 | false | false | false |
msherry/PyXB-1.1.4 | pyxb_114/binding/facets.py | 1 | 31783 | # Copyright 2009, Peter A. Bigot
#
# 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 ... | apache-2.0 | -1,897,010,646,341,199,400 | 37.246691 | 130 | 0.648365 | false | 4.055506 | false | false | false |
GreenJoey/My-Simple-Programs | Examples And Tutorials/asyncIO: We Did It Wrong/part-1/mayhem_3.py | 1 | 2104 | import asyncio
import logging
import random
import string
import uuid
import attr
@attr.s
class PubSubMessage:
instance_name = attr.ib()
message_id = attr.ib(repr=False)
hostname = attr.ib(repr=False, init=False)
def __attrs_post_init__(self):
self.hostname = f"{self.instance_name}.debian.loc... | gpl-2.0 | 5,670,526,016,278,863,000 | 28.222222 | 147 | 0.635456 | false | 3.832423 | false | false | false |
conqp/MiSMaP | mismap/eventhandlers/backup.py | 1 | 2834 | """Event handler to backup the server.
This file is part of MiSMaP.
MiSMaP 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.
MiSMaP is distr... | gpl-3.0 | 752,529,630,856,760,300 | 33.560976 | 79 | 0.665138 | false | 4.255255 | false | false | false |
optimizely/gcloud-python | gcloud/connection.py | 1 | 2347 | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 2,079,144,573,963,119,400 | 33.014493 | 79 | 0.665957 | false | 4.539652 | false | false | false |
AntycSolutions/django-knockout | examples/without-django-rest-framework/app/migrations/0001_initial.py | 1 | 2080 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Day',
fields=[
('id', models.AutoField(verbose_... | mit | -1,724,616,159,532,095,000 | 36.142857 | 114 | 0.533173 | false | 4.434968 | false | false | false |
davidovitch/maple-to-python | mw2txt.py | 1 | 8131 | #!/usr/bin/env python
#
# Copyright (C) 2011-2013 W. Trevor King <wking@tremily.us>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your optio... | gpl-3.0 | 3,885,040,231,363,610,000 | 31.265873 | 79 | 0.601279 | false | 3.60257 | false | false | false |
hsorby/mapclient | src/mapclient/view/managers/plugins/advanceddialog.py | 1 | 25499 | """
MAP Client, a program to generate detailed musculoskeletal models for OpenSim.
Copyright (C) 2012 University of Auckland
This file is part of MAP Client. (http://launchpad.net/mapclient)
MAP Client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Li... | gpl-3.0 | -1,648,581,526,536,617,000 | 51.792961 | 207 | 0.677909 | false | 4.256218 | false | false | false |
sa2ajj/DistroTracker | pts/vendor/debian/sso_auth.py | 1 | 4449 | # Copyright 2013 The Distro Tracker Developers
# See the COPYRIGHT file at the top-level directory of this distribution and
# at http://deb.li/DTAuthors
#
# This file is part of Distro Tracker. It is subject to the license terms
# in the LICENSE file found in the top-level directory of this
# distribution and at http:/... | gpl-2.0 | 4,850,363,798,831,976,000 | 33.223077 | 82 | 0.62396 | false | 4.119444 | false | false | false |
BukkitRepo/bukkit_repo | bukkitrepo/email.py | 1 | 1162 | from bukkitrepo import CONFIG
import json
import requests
class Message(object):
def __init__(self, subject, content, from_email, from_name, to_email, to_name):
self.mandrill_send_endpoint = 'http://mandrillapp.com/api/1.0/messages/send.json'
self.mandrill_key = CONFIG['mandrill_api_key']
... | agpl-3.0 | 9,207,960,708,641,420,000 | 28.794872 | 93 | 0.504303 | false | 3.912458 | false | false | false |
mice-software/maus | src/input/InputPyJSON/test_InputPyJson.py | 1 | 5036 | # This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus
#
# MAUS 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.
#
# MAUS... | gpl-3.0 | 1,305,868,938,885,054,700 | 29.707317 | 77 | 0.566918 | false | 3.651922 | true | false | false |
maxivanoff/fftoolbox | lebedev_write.py | 1 | 8069 | #!/usr/bin/env python
"""\
C version: Dmitri Laikov
F77 version: Christoph van Wuellen, http://www.ccl.net
Python version: Richard P. Muller, 2002.
This subroutine is part of a set of subroutines that generate
Lebedev grids [1-6] for integration on a sphere. The original
C-code [1] was kindly provided by Dr. Dm... | gpl-2.0 | 6,837,529,680,284,396,000 | 36.184332 | 75 | 0.548271 | false | 2.120074 | false | false | false |
registerbyu/registerbyu | src/main/python/ratemyprofessor.py | 1 | 1706 | ###### Expect this script to take 1-2 minutes to fully run. It has to download 170 URLS.
###### Run as "python ratemyprof.py" in the terminal. The output will be printed to "ratemyprof.json" in the same directory.
###### It overwrites the json file each time with the new data.
###### Author: Lexi Christiansen
###### F... | mit | -5,103,442,537,395,812,000 | 26.967213 | 124 | 0.688159 | false | 2.921233 | false | false | false |
Hydrospheredata/mist | mist-lib/src/main/python/mistpy/metadata_extractor.py | 1 | 2618 | # coding=utf-8
import argparse
import traceback
from py4j.java_gateway import java_import, JavaGateway, GatewayClient
from mistpy.decorators import __complex_type
from mistpy.executable_entry import load_entry
def to_scala_arg_type(type_hint, gateway):
if type_hint is None:
return gateway.jvm.PythonUti... | apache-2.0 | 7,362,932,982,022,565,000 | 35.873239 | 99 | 0.678762 | false | 3.490667 | false | false | false |
mmacgilvray18/Phospho_Network | phospho_subnet/scripts/get_loops_to_depth.py | 1 | 3885 | """
Given a sif file, enumerates loops (cyclic paths) up to a given depth.
Optionally the user can provide a list of start nodes. Otherwise, we will
search starting from all nodes.
NOTE:
This code will stop searching once a start node is reached, so if we
have a loop like this:
YDR293C -> NPR74 -> YDR293C
We will not... | gpl-3.0 | 8,102,243,514,283,772,000 | 23.433962 | 99 | 0.688546 | false | 2.979294 | false | false | false |
killbill/killbill-client-python | killbill/models/payment_method.py | 1 | 8263 | # coding: utf-8
#
# Copyright 2010-2014 Ning, Inc.
# Copyright 2014-2020 Groupon, Inc
# Copyright 2020-2021 Equinix, Inc
# Copyright 2014-2021 The Billing Project, LLC
#
# The Billing Project, LLC licenses this file to you under the Apache License, version 2.0
# (the "License"); you may not use this file except in com... | apache-2.0 | 4,388,882,850,090,289,700 | 27.010169 | 167 | 0.58889 | false | 3.972596 | false | false | false |
lcpt/xc | verif/tests/materials/uniaxial/test_steel02.py | 1 | 5465 | # -*- coding: utf-8 -*-
# home made test
__author__= "Luis C. Pérez Tato (LCPT) and Ana Ortega (AOO)"
__copyright__= "Copyright 2015, LCPT and AOO"
__license__= "GPL"
__version__= "3.0"
__email__= "l.pereztato@gmail.com"
fy= 2600 # Yield stress of the steel.
E= 2.1e6 # Young modulus of the steel.
l= 1 # Distance betw... | gpl-3.0 | 1,309,079,697,021,682,000 | 31.331361 | 572 | 0.748353 | false | 2.732 | true | false | false |
googleads/google-ads-python | google/ads/googleads/v6/enums/types/ad_type.py | 1 | 1854 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | -7,512,830,097,043,230,000 | 28.428571 | 74 | 0.631607 | false | 3.364791 | false | false | false |
cnu/chronos | chronos/test_chronos.py | 1 | 25159 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Text the basic chronos module"""
import unittest
import datetime
from .api import parse
class EmptyTestCase(unittest.TestCase):
"""Test for empty values passed - should return a empty list."""
def test_empty_string(self):
"""Tests for a empty string.... | mit | 6,210,383,821,070,408,000 | 51.855042 | 115 | 0.616996 | false | 3.872999 | true | false | false |
theislab/scanpy | scanpy/tests/external/test_scrublet.py | 1 | 3026 | import pytest
import scanpy as sc
import scanpy.external as sce
from anndata.tests.helpers import assert_equal
def test_scrublet():
"""
Test that Scrublet run works.
Check that scrublet runs and detects some doublets.
"""
pytest.importorskip("scrublet")
adata = sc.datasets.pbmc3k()
sce.... | bsd-3-clause | -2,190,207,715,621,443,300 | 27.54717 | 88 | 0.658295 | false | 3.407658 | true | false | false |
endlessm/chromium-browser | third_party/catapult/telemetry/telemetry/timeline/slice.py | 1 | 2495 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import telemetry.timeline.event as timeline_event
class Slice(timeline_event.TimelineEvent):
"""A Slice represents an interval of time plus parameters as... | bsd-3-clause | -9,126,412,495,658,905,000 | 30.987179 | 80 | 0.686974 | false | 3.922956 | false | false | false |
mervick/material-design-icons | scripts/download_fonts.py | 1 | 4860 | #!/usr/bin/env python3
#
# Copyright 2021 Andrey Izman <izmanw@gmail.com>
#
# 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... | mit | -5,099,932,265,883,136,000 | 48.591837 | 168 | 0.683951 | false | 2.77081 | false | false | false |
m-mix/djangocms-bootstrap3-grid | djangocms_bootstrap3/forms.py | 1 | 2012 | # -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext_lazy as _
from .models import( Column,
DJANGOCMS_GRID_LG_CHOICES,
DJANGOCMS_GRID_MD_CHOICES,
DJANGOCMS_GRID_SM_CHOICES,
DJANGOCMS_GRID_XS_CHO... | bsd-2-clause | 4,862,940,500,061,718,000 | 48.073171 | 112 | 0.57008 | false | 3.976285 | false | false | false |
SylvainDe/DidYouMean-Python | didyoumean/didyoumean_internal.py | 1 | 38565 | # -*- coding: utf-8
"""Logic to add suggestions to exceptions."""
import keyword
import difflib
import didyoumean_re as re
import itertools
import inspect
import errno
import os
import sys
from collections import namedtuple
#: Standard modules we'll consider while searching for symbols, for instance:
# - NameError a... | mit | 5,478,245,891,963,958,000 | 36.55112 | 90 | 0.645871 | false | 3.717108 | false | false | false |
unioslo/cerebrum | contrib/no/hiof/import_filegroups.py | 1 | 7020 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2003 University of Oslo, Norway
#
# This file is part of Cerebrum.
#
# Cerebrum 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 th... | gpl-2.0 | 8,155,199,426,623,814,000 | 32.75 | 77 | 0.577635 | false | 3.975085 | false | false | false |
mthnzbk/domestic | domestic/dialogs/downloaddialog.py | 1 | 4537 | from PyQt5.QtWidgets import QDialog, QVBoxLayout, QLabel, QHBoxLayout, QListWidget, QProgressBar, QListWidgetItem, QWidget
from PyQt5.QtNetwork import QNetworkRequest, QNetworkAccessManager
from PyQt5.QtGui import QPixmap, QIcon
from PyQt5.QtCore import QUrl, Qt, QFile, QIODevice, QFileInfo, QDir
from domestic.core.set... | gpl-3.0 | -2,430,747,524,096,305,000 | 34.732283 | 122 | 0.658144 | false | 3.72802 | false | false | false |
UITools/saleor | saleor/dashboard/order/views.py | 1 | 29967 | from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import permission_required
from django.db import transaction
from django.db.models import F, Q
from django.forms import modelformset_factory
from django.http import HttpResponse, JsonResponse
from django.shortcuts i... | bsd-3-clause | 6,461,165,082,829,954,000 | 40.050685 | 79 | 0.652685 | false | 3.839954 | false | false | false |
Exgibichi/statusquo | test/functional/wallet-accounts.py | 1 | 5071 | #!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test account RPCs.
RPCs tested are:
- getaccountaddress
- getaddressesbyaccount
- listaddressgr... | mit | 5,556,896,553,853,679,000 | 36.562963 | 78 | 0.606192 | false | 4.187448 | true | false | false |
stonewell/pymterm | pymterm/term_pylibui/view_base.py | 1 | 15959 | #coding=utf-8
import logging
import string
import threading
from GUI import Task
from GUI import application
from GUI.Colors import rgb
from functools32 import lru_cache
import cap.cap_manager
from session import create_session
from term import TextAttribute, TextMode, reserve
import term.term_keyboard
from term.term... | mit | 4,433,559,283,399,629,300 | 32.387029 | 193 | 0.518078 | false | 3.706224 | false | false | false |
thesealion/django-social-auth | social_auth/utils.py | 1 | 2412 | import urlparse
from collections import defaultdict
def sanitize_log_data(secret, data=None, leave_characters=4):
"""
Clean private/secret data from log statements and other data.
Assumes data and secret are strings. Replaces all but the first
`leave_characters` of `secret`, as found in `data`, with ... | bsd-3-clause | 749,478,383,130,070,900 | 28.060241 | 91 | 0.644279 | false | 4.006645 | false | false | false |
thekerrlab/netpyne | netpyne/analysis/network.py | 1 | 51620 | """
analysis/network.py
Functions to plot and analyze connectivity-related results
Contributors: salvadordura@gmail.com
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
from __future__ import absolute_import
from builtins import open
from builtins impo... | mit | 6,141,905,343,712,070,000 | 46.796296 | 359 | 0.585955 | false | 3.782239 | false | false | false |
FreeScienceCommunity/PLPlot | examples/python/xw03.py | 1 | 2053 | # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Alan W. Irwin
# Polar plot demo.
#
# This file is part of PLplot.
#
# PLplot is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as published
# by the Free Software Foundation; either... | lgpl-2.1 | 577,524,809,478,492,000 | 24.036585 | 79 | 0.624939 | false | 2.903819 | false | false | false |
jefflund/ankura | ankura/topic.py | 1 | 2569 | """Functions for displaying topics or using them in downstream tasks"""
import sys
import numpy as np
from scipy import spatial, sparse
import sklearn.naive_bayes
from . import util
def topic_summary(topics, corpus=None, n=10, stopwords=None):
"""Gets the top n tokens per topic.
If a vocabulary is provide... | gpl-3.0 | -3,620,579,121,089,738,000 | 29.583333 | 86 | 0.621643 | false | 3.524005 | false | false | false |
tilde-lab/DFTXMLParser | setup.py | 1 | 2067 | # Copyright 2017 Andrey Sobolev, Tilde Materials Informatics (Berlin)
# This file is a part of quantum_esperanto project. The project is licensed under the MIT license.
# See the LICENSE file in the project root for license terms.
from setuptools import setup, Extension
from quantum_esperanto import __version__
# ch... | mit | 2,287,851,763,789,006,600 | 30.318182 | 98 | 0.642477 | false | 3.632689 | false | false | false |
amanharitsh123/zulip | zerver/management/commands/realm_filters.py | 1 | 2651 |
from typing import Any
from argparse import ArgumentParser
from zerver.models import all_realm_filters
from zerver.lib.actions import do_add_realm_filter, do_remove_realm_filter
from zerver.lib.management import ZulipBaseCommand
import sys
class Command(ZulipBaseCommand):
help = """Create a link filter rule for... | apache-2.0 | -3,475,420,446,680,985,600 | 41.079365 | 121 | 0.591852 | false | 4.01059 | false | false | false |
matnel/hs-comments-visu | app/collect_hs.py | 1 | 2575 | import requests
import bs4
import json
import re
def _comment( story , index = 0):
path = "http://www.hs.fi/ajax/keskustelut/" + story + "?startIndex=" + str(index) + "&order=a"
r = requests.get( path )
text = r.text.strip()
## no more comments left
if text == '':
return False
html ... | mit | 6,271,204,341,105,394,000 | 24 | 98 | 0.577864 | false | 3.366013 | false | false | false |
miaecle/deepchem | deepchem/utils/geometry_utils.py | 1 | 6904 | """
Geometric utility functions for 3D geometry.
"""
import numpy as np
from scipy.spatial.distance import cdist
def unit_vector(vector: np.ndarray) -> np.ndarray:
""" Returns the unit vector of the vector.
Parameters
----------
vector: np.ndarray
A numpy array of shape `(3,)`, where `3` is (x,y,z).
... | mit | 7,111,331,602,584,914,000 | 28.630901 | 98 | 0.639484 | false | 3.433118 | false | false | false |
probml/pyprobml | scripts/vae_mlp_fashion_tf.py | 1 | 4518 | # VAE MLP for Fashion MNIST
# Code based on
# https://github.com/ageron/handson-ml2/blob/master/17_autoencoders_and_gans.ipynb
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import os
figdir = "../figures"
def save_fig(fname):
plt.tight_layout()
plt.savefig(os.path.join(figdir, ... | mit | 3,335,990,568,346,929,000 | 33.753846 | 99 | 0.691235 | false | 2.960682 | false | false | false |
Galarzaa90/NabBot | cogs/utils/checks.py | 1 | 7474 | # Copyright 2019 Allan Galarza
#
# 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 writi... | apache-2.0 | 7,994,276,253,686,247,000 | 35.637255 | 104 | 0.672197 | false | 4.265982 | false | false | false |
jnayak1/cs3240-s16-team16 | reports/models.py | 1 | 1492 | from django.db import models
from django.contrib.auth.models import User, Group
# Create your models here.
class File(models.Model):
title = models.CharField(max_length=50)
publisher = models.ForeignKey(User)
timeStamp = models.DateTimeField(auto_now=True)
content = models.BinaryField()
encrypted = models.Boole... | mit | -1,508,638,909,507,262,200 | 32.909091 | 66 | 0.758713 | false | 3.469767 | false | false | false |
Eigenlabs/EigenD | lib_alpha2/ezload.py | 1 | 2814 |
#
# Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com
#
# This file is part of EigenD.
#
# EigenD 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) a... | gpl-3.0 | 425,920,107,812,337,800 | 24.351351 | 84 | 0.671286 | false | 3.029064 | false | false | false |
DocMarty84/oomusic | controllers/subsonic/media_annotation.py | 1 | 4822 | # -*- coding: utf-8 -*-
from lxml import etree
from odoo import http
from odoo.http import request
from .common import SubsonicREST
class MusicSubsonicMediaAnnotation(http.Controller):
@http.route(
["/rest/star.view", "/rest/star"],
type="http",
auth="public",
csrf=False,
... | mit | -6,708,362,126,879,703,000 | 31.146667 | 99 | 0.530278 | false | 4.149742 | false | false | false |
levilucio/SyVOLT | path_condition_generator_worker.py | 1 | 33231 |
from t_core.messages import Packet
from t_core.iterator import Iterator
import time
from multiprocessing import Process
from core.himesis_utils import expand_graph, shrink_graph, delete_graph, disjoint_model_union, print_graph, graph_to_dot, get_preds_and_succs
from copy import deepcopy
import numpy.random as npr... | mit | -1,233,990,769,585,172,000 | 45.936441 | 154 | 0.454275 | false | 5.36763 | false | false | false |
distributed-system-analysis/pbench | lib/pbench/server/database/models/active_tokens.py | 1 | 1547 | import datetime
from sqlalchemy import Column, Integer, String, DateTime, ForeignKey
from pbench.server.database.database import Database
class ActiveTokens(Database.Base):
"""Token model for storing the active auth tokens at any given time"""
__tablename__ = "active_tokens"
id = Column(Integer, primary_... | gpl-3.0 | -926,273,257,807,423,100 | 30.571429 | 88 | 0.634777 | false | 4.370056 | false | false | false |
mathwuyue/finsns | news_sina_crawler.py | 1 | 4804 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import unicodecsv as csv
import json
from bs4 import BeautifulSoup
import cchardet as chardet
import grequests
# URL = 'http://search.sina.com.cn/?c=news&q=%s&range=all&time=custom&stime=2013-12-01&etime=2017-08-17&num=20&col=1_7&page=%d'
# URL = 'http://... | mit | 1,924,749,448,171,516,200 | 26.930233 | 127 | 0.524355 | false | 3.364146 | false | false | false |
zhuxiang/LeetCode-Python | src/18-4Sum.py | 1 | 2671 | class Solution(object):
def fourSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[List[int]]
"""
if not nums:
return []
numsSorted = sorted(nums)
result = []
if numsSorted[0] * 4 > t... | apache-2.0 | -2,044,549,421,724,520,000 | 29.712644 | 71 | 0.385623 | false | 4.141085 | false | false | false |
FAForever/client | src/client/playercolors.py | 1 | 2954 | import json
import random
from enum import Enum
from PyQt5.QtCore import QObject, pyqtSignal
class PlayerAffiliation(Enum):
SELF = "self"
FRIEND = "friend"
FOE = "foe"
CLANNIE = "clan"
OTHER = "default"
class PlayerColors(QObject):
changed = pyqtSignal()
def __init__(self, me, user_rela... | gpl-3.0 | -5,577,152,175,745,604,000 | 30.425532 | 74 | 0.600542 | false | 3.559036 | false | false | false |
ozkriff/misery | misery/generator.py | 1 | 15684 | # -*- coding: utf-8 -*-
# See LICENSE file for copyright and license details
import textwrap
from misery import (
ast,
datatype,
)
def func_signature_to_mangled_name(func_name, func_signature):
out = ''
out += func_name
for param in func_signature.param_list:
out += '_'
out += pa... | mit | -5,849,827,737,699,285,000 | 29.573099 | 72 | 0.475453 | false | 3.96762 | false | false | false |
a-tal/fallingsky | fallingsky/block.py | 1 | 8631 | """Block logic.
Shapes are composed of many blocks while they are falling.
Once they have finished falling, they become independant.
"""
from __future__ import division
import pygame
import struct
from collections import namedtuple
from fallingsky.util import Coord
class Blocks(object):
rgba_codes = { # nam... | gpl-2.0 | -7,491,720,798,141,692,000 | 36.689956 | 79 | 0.53864 | false | 3.669643 | false | false | false |
warpfel/PyLie | 4D3D.py | 1 | 8452 | from liealgebra import *
#L0
L0Struct = LieStructureConstantTable(4)
L0Struct.AutoComplete()
L0 = LieAlgebra(4, "L0")
L0.LieAlgebraByStructureConstants(L0Struct)
#L1
L1Struct = LieStructureConstantTable(4)
L1Struct.SetEntry(0,1, [0,0,1,0])
L1Struct.AutoComplete()
L1 = LieAlgebra(4,"L1")
L1.LieAlgebraByStructureCon... | bsd-3-clause | 1,168,906,507,485,729,500 | 29.623188 | 205 | 0.727165 | false | 2.045004 | false | true | false |
bbalasub1/glmnet_python | test/example_gaussian.py | 1 | 3453 | # Import relevant modules and setup for calling glmnet
import sys
sys.path.append('../test')
sys.path.append('../lib')
import scipy
import importlib
import matplotlib.pyplot as plt
import glmnet
import glmnetPlot
import glmnetPrint
import glmnetCoef
import glmnetPredict
import cvglmnet
import cvglmnetCoef
import c... | gpl-2.0 | 1,477,447,583,685,345,000 | 26.624 | 91 | 0.666667 | false | 2.423158 | false | false | false |
VHAINNOVATIONS/GE-Pressure-Ulcer | python_gui_decision_support_webportal/python/wound_assessment_controller.py | 1 | 2308 | from olv_dialog_controller import OlvDialogController
from wound_assessment import WoundAssessment
from patient_identification import PatientIdentification
from skeleton_model import SkeletonModel
from sqlalchemy.sql import func
class WoundAssessmentController(OlvDialogController):
"""
Controller class for Wo... | apache-2.0 | 2,402,192,203,501,839,400 | 53.952381 | 425 | 0.740901 | false | 3.802306 | false | false | false |
dsorokin/aivika-modeler | simulation/aivika/modeler/expr.py | 1 | 7211 | # Copyright (c) 2017 David Sorokin <david.sorokin@gmail.com>
#
# Licensed under BSD3. See the LICENSE.txt file in the root of this distribution.
class InvalidExprException(Exception):
"""Raised when the expression is invalid."""
def __init__(self, message):
"""Initializes a new instance."""
se... | bsd-3-clause | -409,507,689,661,320,770 | 31.926941 | 145 | 0.576342 | false | 3.684722 | false | false | false |
MartinThoma/algorithms | Python/interview-questions/lis.py | 1 | 1049 | from typing import List
def longest_increasing_subsequence(numbers: List[int]) -> int:
"""
>>> longest_increasing_subsequence([])
0
>>> longest_increasing_subsequence([4321])
1
>>> longest_increasing_subsequence([1,2,3,4,5])
5
>>> longest_increasing_subsequence([1,2,3,4,5,5])
5
... | mit | -4,422,626,580,159,067,600 | 26.605263 | 82 | 0.590086 | false | 3.267913 | false | false | false |
charanpald/APGL | apgl/io/test/CsvGraphReaderTest.py | 1 | 2984 | import logging
import sys
import unittest
from apgl.io.CsvGraphReader import CsvGraphReader
from apgl.util.PathDefaults import PathDefaults
import numpy
class CsvGraphReaderTest(unittest.TestCase):
def setUp(self):
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
def testReadFromFile(self)... | bsd-3-clause | -4,325,445,521,725,664,000 | 35.851852 | 101 | 0.625335 | false | 3.429885 | true | false | false |
aestrivex/ielu | ielu/color_utils.py | 1 | 5789 |
import numpy as np
from matplotlib.colors import LinearSegmentedColormap
def map_to_table(cmap,nvals=256):
'''
Takes a LinearSegmentedColormap, and returns a table of RGBA values
spanning that colormap.
arguments:
cmap - the LinearSegmentedColormap instance
nvals- the number of values to span... | gpl-3.0 | 6,341,148,073,480,199,000 | 32.656977 | 77 | 0.663154 | false | 3.47479 | false | false | false |
treasure-data/pandas-td | setup.py | 1 | 1186 | #!/usr/bin/env python
import re
from setuptools import setup, find_packages
def read_version():
with open("pandas_td/version.py") as f:
m = re.match(r'__version__ = "([^\"]*)"', f.read())
return m.group(1)
requires = [
"certifi",
"pytz",
"tzlocal",
"pandas>=0.16.0",
"requests>... | apache-2.0 | 988,620,752,979,182,800 | 25.954545 | 61 | 0.584317 | false | 3.550898 | false | false | false |
Aladom/django-mailing | mailing/forms.py | 1 | 2784 | # -*- coding: utf-8 -*-
# Copyright (c) 2016 Aladom SAS & Hosting Dvpt SAS
from django import forms
from django.utils.translation import ugettext_lazy as _
from .models import (
CampaignMailHeader, MailHeader, Subscription, SubscriptionType,
CampaignStaticAttachment, MailStaticAttachment,
)
__all__ = [
'C... | mit | 593,403,822,838,675,000 | 29.593407 | 78 | 0.583333 | false | 4.343214 | false | false | false |
stencila/hub | manager/accounts/admin.py | 1 | 2811 | from django.contrib import admin
from django.http import HttpResponseRedirect
from django.shortcuts import render
from accounts.models import Account, AccountTeam, AccountTier, AccountUser
from accounts.tasks import set_image_from_socialaccounts
@admin.register(Account)
class AccountAdmin(admin.ModelAdmin):
"""A... | apache-2.0 | 4,838,532,610,336,379,000 | 29.89011 | 84 | 0.633582 | false | 4.152142 | false | false | false |
brad-reid/hs-deck-analyzer | hero.py | 1 | 20711 | from tabulate import tabulate
from pprint import pprint
FLOAT_FORMAT = '.1f'
class Hero(object):
"""Analyze how a specific hero performs.
Output is preformatted for reddit.
For reddit formatting tips see: https://www.reddit.com/r/reddit.com/comments/6ewgt/reddit_markdown_primer_or_how_do_you_do_al... | mit | -7,705,263,850,643,958,000 | 46.94213 | 166 | 0.579933 | false | 3.986718 | false | false | false |
cjfernanders1986/A-Student-Phonebook | finalproject.py | 1 | 1538 | #!usr/bin/env python
# -*- coding: utf-8 -*-
"""Final Project"""
def print_menu():
"""Welcome To Your Phonebook
Args: None
Returns: None
Examples:
>>> Enter your choice (1-4) here: 1
>>> Enter new contact name: chris
>>> Enter contact phone number: 347192456
...You entered your fir... | mpl-2.0 | -1,961,532,589,572,550,700 | 26.464286 | 56 | 0.540962 | false | 3.854637 | false | false | false |
google-research/google-research | robust_loss_jax/general.py | 1 | 3541 | # coding=utf-8
# Copyright 2021 The Google Research 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 License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | -4,328,546,729,884,247,600 | 40.658824 | 79 | 0.680599 | false | 3.451267 | false | false | false |
autopkg/dataJAR-recipes | Adobe CC 2019/AdobeCC2019Importer.py | 1 | 5463 | #!/usr/bin/python
'''
Copyright (c) 2020, dataJAR Ltd. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
... | apache-2.0 | -5,056,833,478,785,709,000 | 35.66443 | 99 | 0.615962 | false | 3.990504 | false | false | false |
ojii/githug | models.py | 1 | 5332 | # -*- coding: utf-8 -*-
import datetime
import time
from flask import url_for
from flaskext.mail.message import Message
from mongoengine import fields, Document
from mongoengine.queryset import QuerySet
def get_week_number(when=None):
if not when:
when = datetime.date.today()
return when.isocalendar()... | bsd-3-clause | -1,529,190,339,177,992,200 | 30.364706 | 126 | 0.615154 | false | 3.489529 | false | false | false |
sabel83/metashell | 3rd/templight/llvm/tools/clang/bindings/python/tests/cindex/test_code_completion.py | 5 | 3024 | from clang.cindex import TranslationUnit
import unittest
class TestCodeCompletion(unittest.TestCase):
def check_completion_results(self, cr, expected):
self.assertIsNotNone(cr)
self.assertEqual(len(cr.diagnostics), 0)
completions = [str(c) for c in cr.results]
for c in expected:... | gpl-3.0 | -6,028,183,997,661,963,000 | 37.278481 | 195 | 0.595899 | false | 3.475862 | true | false | false |
mattilyra/gensim | gensim/sklearn_api/tfidf.py | 1 | 6069 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""Scikit learn interface for :class:`~gensim.models.tfidfmodel.TfidfModel`.
Follows scikit-learn API conventions to facilitate using g... | lgpl-2.1 | 7,175,160,725,556,963,000 | 40.855172 | 119 | 0.630746 | false | 4.145492 | false | false | false |
shimpe/frescobaldi | frescobaldi_app/musicpreview.py | 1 | 7119 | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
... | gpl-2.0 | -1,529,936,991,349,584,600 | 32.422535 | 90 | 0.626914 | false | 3.994949 | false | false | false |
openstack/python-openstackclient | openstackclient/network/v2/port.py | 1 | 39767 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distrib... | apache-2.0 | -8,129,457,582,402,823,000 | 37.274302 | 79 | 0.56396 | false | 4.271887 | false | false | false |
alexis-jacq/signals | tools/elitist.py | 1 | 9506 | from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import torch.optim as optim
import numpy as np
import random
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
class Generator(nn.Module):
def __init__(... | isc | 7,801,819,002,526,349,000 | 39.798283 | 113 | 0.601199 | false | 3.251026 | false | false | false |
anchore/anchore | anchore/anchore-modules/queries/list-content-search-matches.py | 1 | 1689 | #!/usr/bin/env python
import sys
import os
import re
import json
import traceback
import anchore.anchore_utils
# main routine
try:
config = anchore.anchore_utils.init_query_cmdline(sys.argv, "params: <filename> <filename> ...\nhelp: use 'all' to show all content search match filenames")
except Exception as err:... | apache-2.0 | -3,351,308,708,310,889,500 | 28.12069 | 160 | 0.68206 | false | 3.273256 | true | false | false |
hgsoft/hgsoft-addons | publishing_company_fields/report/royalties_report.py | 1 | 5318 | # -*- coding: utf-8 -*-
#Documentation
#This 'model' adds new fields to 'product.template'.
#'product.template' is the main Product model.
from odoo import tools
from odoo import models, fields, api
class RoyaltiesReport(models.Model):
#_inherit = ['sale.report', 'sale.order']
_inherit = 's... | gpl-3.0 | -2,051,258,860,942,560,500 | 42.950413 | 143 | 0.49906 | false | 3.853623 | false | false | false |
heitorlessa/serverless-encryption-workshop | lab3/deploy/deploy_service.py | 1 | 2391 | #-------------------------------------------------------------------------
# Name: Deploy service for Lambda
# Purpose: Demonstrate use of S3 Event Notifications, S3 Object Metadata to deploy lambda functions: (S3->Lambda->Lambda deploy function->Update target Lambda function)
# Author: Heitor Lessa
#--... | apache-2.0 | 7,709,111,605,206,902,000 | 28.518519 | 172 | 0.56629 | false | 4.387156 | false | false | false |
Eric89GXL/scipy | scipy/ndimage/tests/test_ndimage.py | 2 | 206128 | # Copyright (C) 2003-2005 Peter J. Verveer
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following d... | bsd-3-clause | 2,512,643,883,814,819,300 | 43.044444 | 113 | 0.392931 | false | 3.3439 | true | false | false |
epidataio/epidata-community | ipython/test/test_streaming_sensor_measurement.py | 1 | 40948 | #
# Copyright (c) 2015-2017 EpiData, Inc.
#
from datetime import datetime, timedelta
from epidata.context import ec
from epidata.sensor_measurement import SensorMeasurement
from epidata.utils import ConvertUtils
from epidata.analytics import *
import numpy
from pyspark.sql import Row
from pyspark.sql import Column
fro... | apache-2.0 | -8,760,797,813,841,190,000 | 59.843982 | 382 | 0.54071 | false | 3.172051 | true | false | false |
vdrhtc/Measurement-automation | lib3/core/drivers/mw_sources/__init__.py | 1 | 6717 | # Standard library imports
from typing import List
from enum import Enum
# Third party imports
import numpy as np
# Local application imports
# --------------------
class MW_SRC_MODE(str, Enum):
"""
Operating mode for the microwave source.
SINGLE - outputs at fixed frequency with fixed power
SWEEP - ... | gpl-3.0 | 7,412,382,066,673,519,000 | 28.986607 | 79 | 0.577043 | false | 4.138632 | false | false | false |
40323230/Pyslvs-PyQt5 | pyslvs_ui/synthesis/structure_synthesis/thread.py | 1 | 2933 | # -*- coding: utf-8 -*-
"""Thread of structural synthesis."""
__author__ = "Yuan Chang"
__copyright__ = "Copyright (C) 2016-2021"
__license__ = "AGPL"
__email__ = "pyslvs@gmail.com"
from typing import Sequence, Dict, List
from qtpy.QtCore import Signal
from qtpy.QtWidgets import QWidget, QTreeWidgetItem
from pyslvs.... | agpl-3.0 | -3,497,010,038,686,570,500 | 28.626263 | 90 | 0.583703 | false | 3.66625 | false | false | false |
demonshreder/pirate | user/migrations/0008_auto_20160410_1202.py | 1 | 1051 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-10 06:32
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('user', '0007_auto_20160410_1130'),
]
operations = [... | apache-2.0 | 754,595,292,295,758,100 | 29.911765 | 140 | 0.598478 | false | 4.057915 | false | false | false |
Pinafore/ds-hw | wrangling/tests.py | 1 | 2310 | import unittest
import pickle
from csv import DictReader
from collections import Counter
from districts import district_margins, all_states, all_state_rows
kALASKA = """LINE,STATE ABBREVIATION,STATE,D,FEC ID#,(I),CANDIDATE NAME (First),CANDIDATE NAME (Last),CANDIDATE NAME,TOTAL VOTES,PARTY,PRIMARY VOTES,PRIMARY %,RUN... | mit | -1,401,746,497,791,918,600 | 52.72093 | 357 | 0.612554 | false | 2.431579 | true | false | false |
iral/thermos-Flask | thermos/views.py | 1 | 4123 | import json
from flask import render_template, flash, redirect, url_for, request, abort
from flask_login import login_required, login_user, logout_user, current_user
from thermos import app, db, login_manager
from forms import BookmarkForm, LoginForm, SignupForm
from models import User, Bookmark, Tag
@login_manager... | gpl-2.0 | -5,590,221,476,209,355,000 | 30 | 85 | 0.655106 | false | 3.600873 | false | false | false |
dialounke/pylayers | pylayers/simul/tests/test_espoo_MeasvsRT.py | 1 | 9587 | from pylayers.simul.link import *
from pylayers.antprop.channel import *
from pylayers.antprop.antenna import *
from pylayers.util.geomutil import *
plt.close('all')
# parameters settings RT
fmin = 31.8 # GHz
fmax = 33.4 # GHz
BGHz = fmax - fmin # bandwidth in GHz
Nf = 10001 ... | mit | -2,884,728,398,045,934,600 | 34.776119 | 172 | 0.623761 | false | 2.323558 | false | false | false |
sebastien-bugzilla/BatiOsm | BatiOsm.py | 1 | 44127 | # -*- coding:Utf-8 -*-
#!/usr/bin/env python
import sys
import os
from math import sqrt
import lxml.etree
from io import StringIO
from math import pi
import time
from operator import attrgetter
BORNE_INF_MODIF = 1.
BORNE_SUP_MODIF = 10.
NB_ZONE_USER = 500
class Point:
"""Définition d'un point.
Attributs ... | gpl-3.0 | -9,006,128,564,310,807,000 | 43.996929 | 143 | 0.538874 | false | 2.929628 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.