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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ksmit799/Toontown-Source | toontown/hood/BRHoodDataAI.py | 1 | 1237 | from direct.directnotify import DirectNotifyGlobal
import HoodDataAI
from toontown.toonbase import ToontownGlobals
from toontown.safezone import DistributedTrolleyAI
from toontown.safezone import BRTreasurePlannerAI
from toontown.classicchars import DistributedPlutoAI
from toontown.toon import DistributedNPCFishermanAI... | mit | -8,526,898,338,177,770,000 | 40.233333 | 83 | 0.746968 | false | 3.398352 | false | false | false |
aerialhedgehog/VyPy | trunk/VyPy/tools/redirect.py | 1 | 8439 | ## \file redirect.py
# \brief python package for file redirection
# \author Trent Lukaczyk, Aerospace Design Laboratory (Stanford University)
# \version 0.0.0
#
# ----------------------------------------------------------------------
# Imports
# --------------------------------------------------------------------... | bsd-3-clause | -268,065,046,670,388,400 | 31.091255 | 103 | 0.492238 | false | 4.472178 | false | false | false |
anushbmx/kitsune | kitsune/notifications/models.py | 1 | 2432 | from datetime import datetime
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericForeignKey
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from ac... | bsd-3-clause | -4,455,756,537,852,506,000 | 33.253521 | 89 | 0.738487 | false | 3.986885 | false | false | false |
alfa-jor/addon | plugin.video.alfa/channels/novelashdgratis.py | 1 | 5527 | # -*- coding: utf-8 -*-
# -*- Channel Novelas HD Gratis -*-
# -*- Created for Alfa-addon -*-
# -*- By the Alfa Develop Group -*-
import re
from channelselector import get_thumb
from core import httptools
from core import scrapertools
from core import servertools
from core.item import Item
from platformcode ... | gpl-3.0 | -6,154,079,566,393,447,000 | 31.70122 | 112 | 0.579519 | false | 3.653007 | false | false | false |
bgporter/nanobot | demo/tockbot.py | 1 | 3611 | #! /usr/bin/env/python
# Copyright (c) 2016 Brett g Porter
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mod... | mit | -1,350,801,921,695,101,700 | 35.11 | 88 | 0.649128 | false | 3.781152 | false | false | false |
eamanu/ArgentosCompiler | Analyzer/Analyzer.py | 1 | 13039 | # -*- coding: utf-8 -*-
"""@package Reader
Módulo que analiza el código fuente
@author Arias Emmanuel
@date 24/10/2016
"""
from Reader import Reader
from enum import Enum
import string
import numpy as np
class campoCaracter:
def __init__(self):
self.mVariable = np.array([['A', 'B', 'C', 'D', 'E', '... | gpl-3.0 | -7,401,008,057,571,823,000 | 34.579235 | 139 | 0.326549 | false | 4.181439 | false | false | false |
batra-mlp-lab/DIGITS | digits/model/forms.py | 1 | 11983 | # Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
import os
import flask
from flask.ext.wtf import Form
import wtforms
from wtforms import validators
from digits.config import config_value
from digits.device_query import get_device, get_nvml_info
from digits import utils
from digits.utils import s... | bsd-3-clause | 239,109,078,764,989,540 | 35.757669 | 140 | 0.549278 | false | 4.671735 | false | false | false |
ulule/django-linguist | linguist/tests/test_signals.py | 1 | 3254 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from exam import around, fixture
from django.db.models.signals import pre_save, post_save
from ..models import Translation
from .base import BaseTestCase
from .models import BarModel
class PostDeleteSignalTest(BaseTestCase):
"""
Tests Linguis... | mit | -5,989,883,625,744,319,000 | 27.54386 | 101 | 0.63276 | false | 4.00246 | true | false | false |
Lunatixz/script.skin.helper.service | resources/lib/musicbrainzngs/caa.py | 1 | 6079 | # This file is part of the musicbrainzngs library
# Copyright (C) Alastair Porter, Wieland Hoffmann, and others
# This file is distributed under a BSD-2-Clause type license.
# See the COPYING file for more information.
__all__ = [
'set_caa_hostname', 'get_image_list', 'get_release_group_image_list',
'get_relea... | gpl-2.0 | 8,144,486,582,947,581,000 | 33.539773 | 89 | 0.661622 | false | 3.682011 | false | false | false |
pvagner/orca | src/orca/scripts/apps/soffice/spellcheck.py | 1 | 3428 | # Orca
#
# Copyright 2015 Igalia, S.L.
#
# Author: Joanmarie Diggs <jdiggs@igalia.com>
#
# This library 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 2.1 of the License, or (at your o... | lgpl-2.1 | -8,300,544,664,294,238,000 | 32.940594 | 89 | 0.637398 | false | 3.787845 | false | false | false |
3dfxsoftware/cbss-addons | openerp_print/pyPdf/utils.py | 1 | 3722 | # vim: sw=4:expandtab:foldmethod=marker
#
# Copyright (c) 2006, Mathieu Fenniak
# 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 abov... | gpl-2.0 | 8,148,486,485,658,930,000 | 30.365217 | 77 | 0.626276 | false | 3.7332 | false | false | false |
foarsitter/decide-exchange-model | decide/model/observers/sqliteobserver.py | 1 | 8383 | import datetime
from collections import defaultdict
from typing import List
from decide import results
from decide.data import database as db
from decide.data.database import connection
from decide.model import calculations
from decide.model.base import AbstractExchange, Actor, Issue, AbstractExchangeActor
from decide... | gpl-3.0 | -3,790,700,379,106,159,000 | 35.606987 | 130 | 0.58058 | false | 4.277041 | false | false | false |
ulkaio/ulka | docs/conf.py | 1 | 8316 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ulka 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
# autoge... | mit | 410,711,544,015,398,400 | 29.24 | 76 | 0.70202 | false | 3.710843 | true | false | false |
othercriteria/StochasticBlockmodel | test_block.py | 1 | 7829 | #!/usr/bin/env python
# Test of "new style" network inference, finally with blockmodel
# Daniel Klein, 7/8/2012
import numpy as np
from Network import Network
from Models import StationaryLogistic, NonstationaryLogistic, Blockmodel
from Models import alpha_zero, alpha_norm, alpha_unif, alpha_gamma
from Experiment im... | mit | 2,328,064,613,578,867,000 | 35.929245 | 80 | 0.59088 | false | 3.176065 | false | false | false |
frogbywyplay/genbox_xov | xov/config.py | 1 | 2984 | #
# Copyright (C) 2006-2014 Wyplay, All Rights Reserved.
# This file is part of xov.
#
# xov 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 ve... | gpl-2.0 | 8,862,067,401,844,869,000 | 27.692308 | 103 | 0.644102 | false | 2.804511 | false | false | false |
aidiary/keras_examples | imagenet/image_crawler.py | 1 | 2572 | import os
import time
import json
import random
import imghdr
import requests
IMAGE_URL_API = 'http://www.image-net.org/api/text/imagenet.synset.geturls?wnid='
OUTPUT_DIR = "images"
MAX_NUM_IMAGES_PER_CATEGORY = 100
def download_image(url, filename):
try:
r = requests.get(url)
except Exception:
... | mit | -2,849,737,089,410,245,600 | 25.449438 | 93 | 0.557349 | false | 2.938826 | false | false | false |
basvandenberg/spiceweb | spiceweb/project.py | 1 | 14038 | import os
import re
import zipfile
import traceback
#import urllib2
import simplejson
import cherrypy
from cherrypy.lib.static import serve_file
import spiceweb
from biopy import file_io
class Project:
SESSION_PROJECT_KEY = 'project_id'
EXAMPLE_DIR = 'example_projects'
EXAMPLES = [
('aniger-se... | gpl-3.0 | -1,177,908,057,000,454,400 | 33.576355 | 267 | 0.538253 | false | 3.848136 | false | false | false |
sam-m888/gprime | gprime/plug/menu/_enumeratedlist.py | 1 | 5086 | #
# gPrime - A web-based genealogy program
#
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008 Gary Burton
#
# 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 ... | gpl-2.0 | -3,775,185,562,927,064,600 | 34.319444 | 81 | 0.561345 | false | 4.674632 | false | false | false |
pepitogithub/PythonScripts | varios/finalrl.py | 1 | 2373 | #-------------------------------------------------
#------------------- Imports -------------------
#-------------------------------------------------
import os
#-------------------------------------------------
# --------- Sacar el enter de un STR -----------
#-------------------------------------------------
# c... | gpl-2.0 | 1,203,628,396,830,619,100 | 22.969697 | 57 | 0.402444 | false | 3.246238 | false | false | false |
jeremykid/FunAlgorithm | python_practice/sort/sort.py | 1 | 2772 | def bubble_sort(input_list):
input_list_length = len(input_list)
for passed in range(input_list_length-1):
for index in range(input_list_length-1):
if (input_list[index] > input_list[index+1]):
input_list[index], input_list[index+1] = input_list[index+1], input_list[index]
# print input_lis... | mit | 4,553,752,698,822,275,600 | 30.146067 | 88 | 0.62518 | false | 3.175258 | false | false | false |
khalim19/gimp-plugin-export-layers | git_hooks/commit_msg.py | 1 | 4246 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of Export Layers.
#
# Copyright (C) 2013-2019 khalim19 <khalim19@gmail.com>
#
# Export Layers 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... | gpl-3.0 | 8,250,588,724,925,034,000 | 28.282759 | 82 | 0.686528 | false | 3.535387 | false | false | false |
pychess/pychess | lib/pychess/ic/__init__.py | 1 | 25090 | from gi.repository import Gtk
from pychess import Variants
from pychess.Utils.const import NORMALCHESS, ATOMICCHESS, BUGHOUSECHESS, CRAZYHOUSECHESS, \
LOSERSCHESS, SUICIDECHESS, FISCHERRANDOMCHESS, WILDCASTLESHUFFLECHESS, \
SHUFFLECHESS, RANDOMCHESS, ASYMMETRICRANDOMCHESS, WILDCASTLECHESS, UPSIDEDOWNCHESS, \
... | gpl-3.0 | 4,605,888,045,978,333,000 | 35.468023 | 91 | 0.619291 | false | 2.778824 | false | false | false |
VipSaran/Py_Led_Clock | Adafruit_7Segment.py | 1 | 2204 | #!/usr/bin/python
import time
import datetime
from Adafruit_LEDBackpack import LEDBackpack
# ===========================================================================
# 7-Segment Display
# ===========================================================================
# This class is meant to be used with the four-cha... | apache-2.0 | 5,680,100,097,644,158,000 | 30.485714 | 77 | 0.622505 | false | 3.549114 | false | false | false |
HelloLily/hellolily | lily/messaging/email/templatetags/email.py | 1 | 8094 | from __future__ import absolute_import
from bs4 import BeautifulSoup
from collections import OrderedDict
import urllib
from datetime import datetime
from dateutil.tz import gettz, tzutc
from dateutil.parser import parse
from django import template
from django.conf import settings
from django.urls import reverse
from d... | agpl-3.0 | -4,721,217,809,216,441,000 | 35.958904 | 116 | 0.567952 | false | 3.952148 | false | false | false |
EDUlib/edx-platform | common/djangoapps/third_party_auth/saml.py | 1 | 23124 | """
Slightly customized python-social-auth backend for SAML 2.0 support
"""
import logging
from copy import deepcopy
import requests
from django.contrib.sites.models import Site
from django.http import Http404
from django.utils.functional import cached_property
from django_countries import countries
from onelogin.sa... | agpl-3.0 | -5,072,252,820,591,456,000 | 40.51526 | 120 | 0.61287 | false | 4.172501 | true | false | false |
myfreshcity/mystock | webapp/models/stock.py | 1 | 1472 | from webapp.services import db
from datetime import datetime
import urllib2,re
class Stock(db.Model):
__tablename__ = 'stock_basic'
id = db.Column(db.Integer, primary_key=True)
code = db.Column(db.String(255))
name = db.Column(db.String(255))
flag = db.Column(db.String(5))
industry = db.Colum... | mit | 8,841,761,880,506,309,000 | 27.862745 | 60 | 0.603261 | false | 3.256637 | false | false | false |
kesuki/pysmali | pysmali.py | 1 | 7282 | #!/usr/bin/python
import os
import os.path
import xml.dom.minidom
var1 = '/home/mak/tmp/apktool/smali'
print var1+'/android'
manifest = '/home/mak/tmp/apktool/AndroidManifest.xml'
ShellHelper = '/home/mak/AndroidStudioProjects/StubShell/app/src/main/java/com/ceprei/stubshell/ShellHelper.java'
tranfile = '/home/mak/w... | apache-2.0 | -962,484,898,465,406,800 | 38.150538 | 124 | 0.494095 | false | 3.751674 | false | false | false |
milogert/ddnsc | org.py | 1 | 20365 | import tkinter as tk
import tkinter.font as tkFont
import tkinter.ttk as ttk
import tkinter.messagebox as tkMessageBox
import pymysql.cursors
## Model Class ###############################################################
class Model:
"""
Right now the only options for variables in the url are:
{domain}
... | mit | 6,451,096,473,597,660,000 | 28.729927 | 94 | 0.597005 | false | 3.480007 | false | false | false |
Blue7Alien/sloopdoorbot | Door System V1/membersdoor.py | 1 | 5976 | import RPi.GPIO as GPIO
import time
from socket import *
import thread
from threading import Thread
import os
import datetime
import pygame
import paramiko
MAINDOORIP = '192.168.1.17' #Enter the IP address of the main door
DOORBELLPORT = 12346 #Port to send the doorbell command through
PORT = 12345 #Send in out info o... | gpl-2.0 | -6,914,386,447,396,729,000 | 31.478261 | 116 | 0.530455 | false | 3.952381 | false | false | false |
JeroenZegers/Nabu-MSSS | nabu/postprocessing/reconstructors/reconstructor.py | 1 | 6611 | """@file reconstructor.py
contains the Reconstructor class"""
from abc import ABCMeta, abstractmethod
import os
import scipy.io.wavfile as wav
import numpy as np
class Reconstructor(object):
"""the general reconstructor class
a reconstructor is used to reconstruct the signals from the models output"""
__metacla... | mit | 8,466,260,221,979,624,000 | 34.735135 | 158 | 0.712449 | false | 3.207666 | false | false | false |
hainm/binder | binder/log.py | 1 | 6573 | import logging
import Queue
import time
from threading import Thread, current_thread, Lock
import zmq
from binder.binderd.client import BinderClient
from binder.settings import LogSettings
class LoggerClient(Thread):
_singleton = None
@staticmethod
def getInstance():
if not LoggerClient._singl... | apache-2.0 | 8,806,846,748,603,047,000 | 30.151659 | 115 | 0.566104 | false | 3.938286 | false | false | false |
bboozzoo/mender-backend-cli | mender/client/__init__.py | 1 | 3091 | # The MIT License (MIT)
#
# Copyright (c) 2016 Maciej Borzecki
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, m... | mit | -5,437,378,758,664,473,000 | 28.721154 | 80 | 0.685215 | false | 3.764921 | false | false | false |
SANBI-SA/tools-sanbi-uwc | tools/build_ctb_explorer/build_ctb_explorer.py | 1 | 4075 | #!/usr/bin/env python
from __future__ import print_function
import argparse
import datetime
import glob
import shutil
import os
# try:
# from urllib.parse import urlparse
# except ImportError:
# from urlparse import urlparse
import logging
log = logging.getLogger(__name__)
def copy_output_file_to_dataset(... | gpl-3.0 | -1,033,532,255,939,862,400 | 33.243697 | 107 | 0.600982 | false | 3.562063 | false | false | false |
szecsi/Gears | GearsPy/Project/Components/Warp/Clamp.py | 1 | 1310 | import Gears as gears
from .. import *
from .Base import *
class Clamp(Base) :
def applyWithArgs(
self,
spass,
functionName,
*,
minima : 'Horizontal and vertical minima [(um,um)].'
= ('field', 'field'),
maxima : 'Horiz... | gpl-2.0 | -393,836,095,485,218,240 | 31.75 | 91 | 0.499237 | false | 3.411458 | false | false | false |
googleapis/python-dataproc | google/cloud/dataproc_v1/services/job_controller/transports/base.py | 1 | 12099 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -5,770,027,655,046,114,000 | 36.809375 | 103 | 0.573023 | false | 4.506145 | false | false | false |
akvo/akvo-rsr | akvo/rsr/migrations/0042_auto_20153011_1450.py | 1 | 1498 | # -*- coding: utf-8 -*-
from django.db import models, migrations
from ..models.project import Project
def change_primary_organisations(apps, schema_editor):
Project = apps.get_model("rsr", "Project")
for project in Project.objects.all():
primary_organisation = None
# Pick the reporting org... | agpl-3.0 | -2,147,158,279,839,859,200 | 31.565217 | 87 | 0.658211 | false | 4.342029 | false | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/aio/operations/_operations.py | 1 | 4679 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 1,481,069,990,702,141,700 | 43.990385 | 133 | 0.645651 | false | 4.632673 | false | false | false |
futurepr0n/Books-solutions | Python-For-Everyone-Horstmann/Chapter7-Files-and-Exceptions/P7.10.py | 1 | 1769 | # Get the data for baby names in prior years from the Social Security Administration.
# Paste the table data in files named babynames2010.txt , etc. Modify the babynames.py
# program so that it prompts the user for a file name. Can you spot a trend in the
# frequencies?
##
# This program displays the most common baby... | mit | -9,044,748,663,259,075,000 | 28.483333 | 86 | 0.647824 | false | 3.482283 | false | false | false |
IS-ENES-Data/esgf-pid | esgfpid/rabbit/asynchronous/thread_confirmer.py | 1 | 9200 | import logging
import copy
from esgfpid.utils import loginfo, logdebug, logtrace, logerror, logwarn, log_every_x_times
from .exceptions import UnknownServerResponse
LOGGER = logging.getLogger(__name__)
LOGGER.addHandler(logging.NullHandler())
'''
=========
Confirmer
=========
The confirmer is responsible for handlin... | apache-2.0 | 6,895,465,964,748,471,000 | 42.396226 | 209 | 0.672174 | false | 3.822185 | false | false | false |
deepmind/dm_control | dm_control/locomotion/walkers/rodent.py | 1 | 12164 | # Copyright 2020 The dm_control 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 applicable law or agreed to i... | apache-2.0 | 9,125,320,332,586,730,000 | 35.419162 | 135 | 0.655212 | false | 3.078714 | false | false | false |
cheertarts/filter-comments | filter-comments.py | 1 | 4693 | #!/usr/bin/env python3
# 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 program is distributed in the hope that... | gpl-3.0 | -5,264,843,161,020,971,000 | 35.664063 | 85 | 0.511187 | false | 3.701104 | false | false | false |
alexgorban/models | official/vision/detection/modeling/architecture/heads.py | 1 | 44483 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -3,039,636,000,313,540,600 | 39.147112 | 82 | 0.618169 | false | 3.754156 | false | false | false |
hajicj/safire | safire/data/composite_corpus.py | 1 | 11234 | """
This module contains classes that ...
"""
import logging
import copy
import gensim
import itertools
import numpy
# import safire.datasets.transformations
import safire.utils.transcorp
from safire.utils import IndexedTransformedCorpus, flatten_composite_item
__author__ = "Jan Hajic jr."
class Zipper(gensim.interf... | gpl-3.0 | 5,723,123,878,436,178,000 | 36.701342 | 146 | 0.562667 | false | 4.015011 | false | false | false |
gwsu2008/automation | python/rotate-iam-keys.py | 1 | 4429 | import json
import boto3
import os
import time
import base64
from datetime import datetime
from botocore.exceptions import ClientError
iam_client = boto3.client('iam')
secret_client = boto3.client('secretsmanager')
kms_client = boto3.client('kms')
sqs_client = boto3.client('sqs')
now = datetime.now()
iam_users = os.ge... | gpl-2.0 | 9,215,993,726,094,099,000 | 48.211111 | 137 | 0.637164 | false | 3.885088 | false | false | false |
kyleconroy/vogeltron | tests/test_sports.py | 1 | 6742 | import mock
from datetime import datetime, timezone
import pytz
from nose.tools import assert_equals, assert_raises
from vogeltron import baseball
from bs4 import BeautifulSoup
YEAR = datetime.today().year
def date_for_month(month, day, hour, minute):
timez = pytz.timezone('US/Pacific')
return timez.localize... | mit | -2,121,539,651,009,590,500 | 31.723301 | 77 | 0.648717 | false | 2.963077 | true | false | false |
mmaelicke/scikit-gstat | skgstat/plotting/stvariogram_plot3d.py | 1 | 3989 | import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
try:
import plotly.graph_objects as go
except ImportError:
pass
def __calculate_plot_data(stvariogram, **kwargs):
xx, yy = stvariogram.meshbins
z = stvariogram.experimental
# x = xx.flatten()
# y = yy.fla... | mit | -4,331,278,263,788,779,000 | 28.116788 | 102 | 0.549762 | false | 3.310373 | false | false | false |
mjvakili/ccppabc | ccppabc/code/test_data.py | 1 | 4243 | '''
Test the data.py module
'''
import numpy as np
import matplotlib.pyplot as plt
import util
import data as Data
# --- Halotools ---
from halotools.empirical_models import PrebuiltHodModelFactory
from ChangTools.plotting import prettyplot
from ChangTools.plotting import prettycolors
def PlotCovariance(obvs, ... | mit | -7,322,337,487,403,997,000 | 28.465278 | 93 | 0.585199 | false | 2.730373 | true | false | false |
michealcarrerweb/LHVent_app | time_log/migrations/0006_auto_20170731_1738.py | 1 | 4838 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-07-31 17:38
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('work_order', '0007_order_tim... | mit | -5,250,976,600,548,491,000 | 48.876289 | 185 | 0.586813 | false | 4.255057 | false | false | false |
Andreea-G/Codds_DarkMatter | src/experiment_HaloIndep_Band.py | 1 | 59260 | """
Copyright (c) 2015 Andreea Georgescu
Created on Wed Mar 4 00:47:37 2015
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.
... | gpl-2.0 | 4,716,607,238,785,068,000 | 46.219124 | 105 | 0.530898 | false | 3.833862 | false | false | false |
cemc/cscircles-wp-content | lesson_files/graders/pendulum-grader.py | 1 | 1075 | # based on real-per-line.py
from _UTILITIES import _code
def f():
for i in range(0, len(ExpectedLines)):
if len(OutputLines)<=i:
return "N"+_("Not enough lines of output: {0} expected, {1} found").format(str(len(ExpectedLines)),
... | gpl-3.0 | -1,208,056,796,763,079,200 | 52.75 | 119 | 0.572093 | false | 3.307692 | false | false | false |
caiostringari/swantools | test.py | 1 | 2740 |
import swantools.io
import swantools.utils
import swantools.plot
import datetime
import matplotlib.pyplot as plt
import numpy as np
def readtable():
R = swantools.io.SwanIO()
P = swantools.plot.SwanPlot()
# Reading TABLE dada with headers:
df = R.read_swantable('data/table.txt')
y = df["Hsig... | gpl-2.0 | -4,464,635,226,785,264,600 | 25.862745 | 83 | 0.644161 | false | 2.952586 | false | false | false |
rcalsaverini/dictUtils | __init__.py | 1 | 1573 |
def keyset(d):
return set(d.keys())
def union(d1, d2):
return keyset(d1).union(keyset(d2))
def zip(d1, d2, std = None):
""" Return a dictionary of tuples by putting together values with the same keys. Ex.:
> zip({'name': "John", 'age': 20, 'favoriteMovie': "Godfather"}, {'name': "Mary", 'age': 26}, ... | mit | -2,049,011,076,156,712,700 | 45.264706 | 115 | 0.579784 | false | 2.712069 | false | false | false |
tpsatish95/OCR-on-Indus-Seals | code/Test/TextROI.py | 1 | 16306 | # -*- coding: utf-8 -*-
import skimage.io
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import selectivesearch
import numpy as np
import skimage.transform
import os
import shutil
import caffe
from PIL import Image
candidates = set()
merged_candidates = set()
refined = set()
final = set()
final_... | apache-2.0 | 198,462,947,760,932,580 | 32.142276 | 197 | 0.483442 | false | 2.635952 | false | false | false |
krishnab-datakind/mining-data-acquisition | data_gather/HandlerAssignEEEngineToRequest.py | 1 | 1833 |
#!/usr/bin/python
"""
Handler to assign Earth Engine Engine to request.
"""
## MIT License
##
## Copyright (c) 2017, krishna bhogaonker
## 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 wi... | mit | -8,021,097,741,961,491,000 | 44.825 | 463 | 0.742499 | false | 3.976139 | false | false | false |
drulang/nnw | nnw.py | 1 | 1854 | import sys
import os
mappings = {
"a": [4, "@"],
"b": ["13"],
"c": ["("],
"d": ["[)"],
"e": [3],
#"f": ["|="],
"g": [6],
#"h": ["|-|"],
"i": [1, '!', "|"],
#"j": [".]"],
"k": ["|<"],
"l": [1],
"m": ['|Y|'],
#"n": ["/\\/"],
"o": [0],
#"p": ["|>"],
"q":... | gpl-2.0 | -6,868,122,522,685,636,000 | 25.112676 | 87 | 0.446063 | false | 3.202073 | false | false | false |
CalvinNeo/PyGeo | countpca_segmentation_2.py | 1 | 7423 | #coding:utf8
import numpy as np, scipy
import pylab as pl
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import math
from matplotlib import cm
from matplotlib import mlab
from matplotlib.ticker import LinearLocator, FormatStrFormatter
from itertools import *
import collections
from multiproces... | apache-2.0 | -7,845,894,919,603,503,000 | 38.068421 | 151 | 0.595177 | false | 3.199569 | true | false | false |
suutari/shoop | shuup/importer/utils/importer.py | 1 | 1117 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
import os
from django.conf import settings
from django.utils.trans... | agpl-3.0 | 7,059,243,395,690,704,000 | 26.925 | 87 | 0.692927 | false | 3.748322 | false | false | false |
khchine5/atelier | atelier/sphinxconf/sigal_image.py | 1 | 8318 | # -*- coding: utf-8 -*-
# Copyright 2014-2018 Rumma & Ko Ltd
# License: BSD, see LICENSE for more details.
"""
Defines the :rst:dir:`sigal_image` directive.
.. rst:directive:: sigal_image
.. _picsel: https://github.com/lsaffre/picsel
.. _Shotwell: https://en.wikipedia.org/wiki/Shotwell_%28software%29
.. _digiKam: ht... | bsd-2-clause | -8,201,730,029,071,351,000 | 32.540323 | 233 | 0.626954 | false | 3.364887 | false | false | false |
amsehili/auditok | tests/test_AudioReader.py | 1 | 30622 | """
@author: Amine Sehili <amine.sehili@gmail.com>
September 2015
"""
import unittest
from functools import partial
import sys
import wave
from genty import genty, genty_dataset
from auditok import (
dataset,
ADSFactory,
AudioDataSource,
AudioReader,
Recorder,
BufferAudioSource,
WaveAudioS... | mit | 6,188,939,193,757,080,000 | 27.379981 | 79 | 0.52668 | false | 3.828229 | true | false | false |
myarjunar/inasafe | safe/definitions/keyword_properties.py | 1 | 9961 | # coding=utf-8
"""Definitions relating to layer keywords."""
from safe.utilities.i18n import tr
__copyright__ = "Copyright 2016, The InaSAFE Project"
__license__ = "GPL version 3"
__email__ = "info@inasafe.org"
__revision__ = '$Format:%H$'
# Base Metadata Property
property_organisation = {
'key': 'property_org... | gpl-3.0 | 8,181,565,282,374,904,000 | 29.934783 | 79 | 0.54864 | false | 3.725131 | false | false | false |
shovalsa/shecodes_website | scsite/forms.py | 1 | 1664 | from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.forms import ModelForm
from .models import Profile
from django.utils.translation import ugettext_lazy as _
class SignUpForm(UserCreationForm):
first_name = forms.CharField(max_len... | apache-2.0 | -661,791,801,613,918,700 | 39.585366 | 126 | 0.670072 | false | 3.739326 | false | false | false |
csm0042/rpihome_v3 | rpihome_v3/helpers/log_support.py | 1 | 2439 | #!/usr/bin/python3
""" logging.py: Log file setup helper functions
"""
# Import Required Libraries (Standard, Third Party, Local) ********************
import logging
import logging.handlers
import os
import sys
# Authorship Info *************************************************************
__author__ = "Christopher ... | gpl-3.0 | 7,730,871,782,910,040,000 | 39.65 | 86 | 0.669537 | false | 3.952998 | false | false | false |
MartinThoma/LaTeX-examples | tikz/gpx-gps-elevation-chart-generator/elevation_chart_gen.py | 1 | 2708 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Generate an elevation chart from a GPX file."""
import gpxpy
import logging
import sys
from math import sin, cos, sqrt, atan2, radians
logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s',
level=logging.DEBUG,
stre... | mit | -8,407,838,470,392,775,000 | 29.772727 | 79 | 0.560192 | false | 3.427848 | false | false | false |
asnorkin/parapapapam | ensemble/_ensemble.py | 1 | 10880 | import numpy as np
from sklearn.model_selection import cross_val_predict, cross_val_score, StratifiedKFold
from sklearn.base import BaseEstimator, ClassifierMixin
from sklearn.svm import SVC
from ..metrics import METRICS
class Blender:
def make_greedy_blend(self, X, y, models, scoring=None, cv=3,
... | mit | -4,196,600,478,405,788,700 | 36.650519 | 99 | 0.562224 | false | 4.25 | false | false | false |
tangentlabs/django-fancypages | tests/unit/blocks/test_two_column_layout_block.py | 1 | 1087 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.test import TestCase
from django.test import RequestFactory
from django.template import RequestContext
from fancypages.models import Container
from fancypages.models.blocks import TwoColumnLayoutBlock
from fancypages.test imp... | bsd-3-clause | 7,542,000,901,538,403,000 | 34.064516 | 74 | 0.726771 | false | 4.330677 | true | false | false |
FrodeSolheim/fs-uae-launcher | amitools/binfmt/hunk/HunkReader.py | 1 | 30202 | """A class for reading Amiga executables and object files in Hunk format"""
import os
import struct
import io
from types import *
from .Hunk import *
class HunkReader:
"""Load Amiga executable Hunk structures"""
def __init__(self):
self.hunks = []
self.error_string = None
self.type = None
self.he... | gpl-2.0 | 5,149,312,244,423,052,000 | 30.136082 | 115 | 0.555427 | false | 3.418449 | false | false | false |
mwcz/phyton | old_files/src/photos/migrations/0004_auto__add_field_photo_image_hash.py | 1 | 3502 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Photo.image_hash'
db.add_column('photos_photo', 'image_hash', self.gf('django.db.models.fi... | agpl-3.0 | 5,957,665,972,324,900,000 | 62.672727 | 176 | 0.556539 | false | 3.55533 | false | false | false |
Black-Cog/Forge | core/ColorScience.py | 1 | 3207 |
import math
class ColorScience():
"""Methodes relative at Color Science"""
@staticmethod
def linearToSrgb(color):
colorOut = []
for i in range(3):
if color[i] <= 0.0031308:
colorTmp = color[i] * 12.92
colorOut.append( round(colorTmp, 6) )
else:
colorTmp = 1.055 * ( pow(color[i], 1 / 2.4) )... | bsd-3-clause | -8,799,307,794,695,436,000 | 17.976331 | 76 | 0.545681 | false | 2.400449 | false | false | false |
BenProjex/ArchProject | Chip.py | 1 | 16126 | from abc import ABCMeta, abstractmethod, abstractproperty
import Wire
###############################################################
# Abstract Chip Class
#AbstractMethod Action: What function the chip performs
#AbstractProperty Name: Debugging tool retrieving the name of the chip
###################... | gpl-3.0 | 5,575,249,376,074,922,000 | 37.033019 | 142 | 0.556617 | false | 3.534078 | true | false | false |
samhutchins/tools | video_production/transcode-for-edit.py | 1 | 1479 | #!/usr/bin/env python3.6
import os, argparse, subprocess
def main():
parser = argparse.ArgumentParser()
parser.add_argument("project")
args = parser.parse_args()
home = os.path.join(os.path.expanduser("~"), "Videos", "Mine", "WIP")
dest_dir = os.path.join(home, args.project, "footage")
if no... | mit | -8,815,710,785,763,945,000 | 31.173913 | 171 | 0.601082 | false | 3.243421 | false | false | false |
hgranlund/py-chess-engine | docs/source/conf.py | 1 | 8705 | # -*- coding: utf-8 -*-
# This file is based upon the file generated by sphinx-quickstart. However,
# where sphinx-quickstart hardcodes values in this file that you input, this
# file has been changed to pull from your module's metadata module.
#
# This file is execfile()d with the current directory set to its contain... | mit | -373,155,612,120,874,100 | 31.481343 | 79 | 0.708558 | false | 3.848364 | false | false | false |
rven/odoo | addons/im_livechat/models/im_livechat_channel.py | 1 | 15553 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import random
import re
from odoo import api, fields, models, modules, _
class ImLivechatChannel(models.Model):
""" Livechat Channel
Define a communication channel, which can be accessed with ... | agpl-3.0 | -6,630,059,679,341,392,000 | 52.816609 | 319 | 0.641034 | false | 4.058716 | false | false | false |
skearnes/color-features | paper/code/analysis.py | 1 | 12160 | """Analyze results.
Use the saved model output to calculate AUC and other metrics.
"""
import collections
import cPickle as pickle
import gflags as flags
import gzip
import logging
import numpy as np
import os
import pandas as pd
from sklearn import metrics
from statsmodels.stats import proportion
import sys
flags.D... | bsd-3-clause | 2,168,121,870,107,321,600 | 34.976331 | 80 | 0.550164 | false | 3.718654 | false | false | false |
nkmk/python-snippets | notebook/numpy_split.py | 1 | 1773 | import numpy as np
a = np.arange(16).reshape(4, 4)
print(a)
# [[ 0 1 2 3]
# [ 4 5 6 7]
# [ 8 9 10 11]
# [12 13 14 15]]
a_split = np.split(a, 2)
print(type(a_split))
# <class 'list'>
print(len(a_split))
# 2
print(a_split[0])
# [[0 1 2 3]
# [4 5 6 7]]
print(a_split[1])
# [[ 8 9 10 11]
# [12 13 14 15]]
... | mit | 8,657,530,011,904,330,000 | 11.664286 | 62 | 0.451777 | false | 1.794534 | false | false | false |
yhat/ggplot | ggplot/scales/scale_fill_funfetti.py | 1 | 1106 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from .scale import scale
from copy import deepcopy
class scale_fill_funfetti(scale):
"""
Make your plots look like funfetti
Parameters
----------
type: string
One of confetti or sp... | bsd-2-clause | 1,532,445,102,904,440,000 | 24.136364 | 80 | 0.455696 | false | 3.736486 | false | false | false |
andymckay/zamboni | mkt/webapps/management/commands/convert_icons.py | 1 | 2020 | import os
from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.files.storage import default_storage as storage
import amo
from amo.decorators import write
from amo.utils import chunked, resize_image
from mkt.site.storage_utils import wa... | bsd-3-clause | 6,888,527,333,116,769,000 | 29.606061 | 72 | 0.591089 | false | 3.899614 | false | false | false |
joelcan/tools-eth-contract-dev | pyethereum/pyethereum/_version.py | 1 | 7911 | """
Version management with versioneer
https://github.com/warner/python-versioneer
Distribution through PyPI
1: git tag 0.6.31
2: python setup.py register sdist upload
Distributiuon through github
(i.e. users use github to generate tarballs with git archive)
1: git tag 0.6.31
2: git push; git push -... | mit | 4,828,640,751,076,528,000 | 36.316038 | 87 | 0.609531 | false | 3.870352 | false | false | false |
root-mirror/root | bindings/pyroot/cppyy/cppyy/test/test_pythonify.py | 20 | 16364 | import py, os, sys
from pytest import raises
from .support import setup_make, pylong
currpath = py.path.local(__file__).dirpath()
test_dct = str(currpath.join("example01Dict"))
def setup_module(mod):
setup_make("example01")
class TestPYTHONIFY:
def setup_class(cls):
cls.test_dct = test_dct
i... | lgpl-2.1 | -357,875,962,530,964,500 | 29.359926 | 111 | 0.548888 | false | 3.385889 | true | false | false |
rschwiebert/galgebra | examples/Old Format/terminal_check.py | 1 | 10489 | #!/usr/bin/python
import sys
import sys
from sympy import Symbol,symbols,sin,cos,Rational,expand,simplify,collect
from printer import enhance_print,Get_Program,Print_Function,Format
from mv import MV,Com,Nga,ONE,ZERO
def basic_multivector_operations():
Print_Function()
(ex,ey,ez) = MV.setup('e*x|y|z')
A ... | bsd-3-clause | 6,306,278,451,293,835,000 | 21.802174 | 97 | 0.499094 | false | 2.287677 | false | false | false |
AI-comp/Orientation2015Problems | rime/plugins/pack_mjudge.py | 1 | 4824 | #!/usr/bin/python
#
# Copyright (c) 2011 Rime Project.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, m... | mit | 236,489,472,618,434,850 | 30.736842 | 79 | 0.66874 | false | 3.727975 | true | false | false |
sduenas/perceval | tests/test_bugzillarest.py | 1 | 22077 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2017 Bitergia
#
# 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 l... | gpl-3.0 | 1,082,878,998,176,053,600 | 34.779579 | 104 | 0.573926 | false | 3.901732 | true | false | false |
Zigazou/PyMinitel | minitel/ui/Conteneur.py | 1 | 8946 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Classe permettant de regrouper des éléments d’interface utilisateur"""
from .UI import UI
from ..Sequence import Sequence
from ..constantes import ENTREE, MAJ_ENTREE
class Conteneur(UI):
"""Classe permettant de regrouper des éléments d’interface utilisateur
Ce... | gpl-3.0 | 6,873,000,162,475,127,000 | 32.690196 | 79 | 0.611105 | false | 3.166605 | false | false | false |
hortonworks/hortonworks-sandbox | desktop/core/ext-py/processing/lib/forking.py | 1 | 12412 | #
# Module for starting a process object using os.fork() or CreateProcess()
#
# processing/forking.py
#
# Copyright (c) 2006-2008, R Oudkerk --- see COPYING.txt
#
import os
import sys
import signal
import processing
__all__ = ['Popen', 'assertSpawning', 'exit']
#
# Check that the current thread is sp... | apache-2.0 | 2,031,393,337,692,641,500 | 31.365591 | 79 | 0.499355 | false | 4.682007 | false | false | false |
JuanCTorres/interview-prep-solutions | codelab/listcycle.py | 1 | 1048 | """
https://codelab.interviewbit.com/problems/listcycle/
"""
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
# @param A ... | mit | -6,394,509,225,141,508,000 | 23.372093 | 84 | 0.503817 | false | 3.984791 | false | false | false |
spencerlyon2/distcan | setup.py | 1 | 1060 | from distutils.core import setup
import os
long_desc = 'Add a fallback short description here'
if os.path.exists('README.txt'):
long_desc = open('README.txt').read()
# Write a versions.py file for class attribute
VERSION = "0.0.1"
def write_version_py(filename=None):
doc = ("\"\"\"\n" +
"This is ... | mit | -7,474,418,050,700,931,000 | 25.5 | 78 | 0.614151 | false | 3.49835 | false | false | false |
biothings/biothings_explorer | biothings_explorer/api_call_dispatcher.py | 1 | 11261 | # -*- coding: utf-8 -*-
"""
Make API calls.
.. moduleauthor:: Jiwen Xin <kevinxin@scripps.edu>
"""
from collections import defaultdict
from copy import deepcopy
from itertools import groupby
from operator import itemgetter
from .registry import Registry
from .apicall import BioThingsCaller
from .api_output_parser im... | apache-2.0 | 2,010,926,067,310,800,000 | 40.09854 | 88 | 0.441879 | false | 4.647544 | false | false | false |
intellimath/pyon | test/test_perfomance.py | 1 | 1913 | import pyon
import pickle
import time
import ast
import json
class C(object):
def __init__(self, count):
self.count = count
#
def __reduce__(self):
_dict = dict(self.__dict__)
count = _dict.pop('count')
return C, (count,), _dict
lst = []
for i in range(10000):
c ... | mit | -5,969,172,803,974,257,000 | 20.529412 | 122 | 0.573445 | false | 2.427665 | false | false | false |
zork9/pygame-pyMM | maproom1.py | 1 | 6299 |
# Copyright (c) 2013 Johan Ceuppens.
# All rights reserved.
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# dis... | gpl-2.0 | -1,237,788,843,528,275,500 | 35.622093 | 103 | 0.691538 | false | 3.122955 | false | false | false |
Andreasdahlberg/sillycat | scripts/rfm69_check.py | 1 | 3685 | #!/usr/bin/env python3
# -*- coding: utf-8 -*
#
# 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 program is dist... | gpl-3.0 | 761,810,704,417,854,500 | 35.85 | 99 | 0.663501 | false | 3.945396 | false | false | false |
gem/oq-hazardlib | openquake/hazardlib/scalerel/gsc_offshore_thrusts.py | 1 | 6407 | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2015-2017 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | agpl-3.0 | -6,282,040,559,553,521,000 | 32.369792 | 79 | 0.659903 | false | 3.431709 | false | false | false |
QuantCrimAtLeeds/PredictCode | open_cp/gui/tk/session_view.py | 1 | 1550 | """
session_view
~~~~~~~~~~~~
"""
import tkinter as tk
import tkinter.ttk as ttk
import open_cp.gui.tk.util as util
_text = {
"none" : "No recent sessions found",
"cancel" : "Cancel",
}
class SessionView(ttk.Frame):
def __init__(self, parent, controller, model):
super().__init__(parent)
... | artistic-2.0 | 960,518,987,231,501,000 | 30 | 103 | 0.584516 | false | 3.467562 | false | false | false |
qateam123/eq | app/validation/date_range_check.py | 1 | 1649 | import logging
from datetime import datetime
from app.validation.abstract_validator import AbstractValidator
from app.validation.validation_result import ValidationResult
logger = logging.getLogger(__name__)
class DateRangeCheck(AbstractValidator):
def validate(self, user_answers):
"""
Validat... | mit | -2,892,354,477,125,786,000 | 35.644444 | 93 | 0.625834 | false | 4.738506 | false | false | false |
stonebig/numba | numba/core/controlflow.py | 1 | 30419 | import collections
import functools
import sys
from numba.core import utils
from numba.core.ir import Loc
from numba.core.errors import UnsupportedError
# List of bytecodes creating a new block in the control flow graph
# (in addition to explicit jump labels).
NEW_BLOCKERS = frozenset(['SETUP_LOOP', 'FOR_ITER', 'SETU... | bsd-2-clause | 3,900,251,514,093,707,000 | 31.121436 | 141 | 0.546895 | false | 3.998291 | false | false | false |
felixmatt/shyft | shyft/tests/api/test_time_axis.py | 1 | 3311 | from builtins import range
from shyft import api
import numpy as np
import unittest
class TimeAxis(unittest.TestCase):
"""Verify and illustrate TimeAxis
defined as n periods non-overlapping ascending
"""
def setUp(self):
self.c = api.Calendar()
self.d = api.deltahours(1)
... | lgpl-3.0 | 4,475,455,489,361,798,700 | 33.489583 | 106 | 0.58804 | false | 3.068582 | true | false | false |
perrygeo/Fiona | fiona/collection.py | 1 | 17081 | # -*- coding: utf-8 -*-
# Collections provide file-like access to feature data
import os
import sys
from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
from fiona.ogrext import Session, WritingSession
from fiona.ogrext import (
calc_gdal_version_num, get_gdal_version_num, get_gdal_release_name)
from fi... | bsd-3-clause | 4,455,827,271,552,812,000 | 35.654506 | 86 | 0.566594 | false | 4.258539 | false | false | false |
sommars/DynamicPrevariety | python_interface.py | 1 | 2548 | """
#Cyclic 4
R.<x1,x2,x3,x4> = QQ[]
polys = [x1+x2+x3+x4,x1*x2+x2*x3+x3*x4+x4*x1,x1*x2*x3+x2*x3*x4+x3*x4*x1+x4*x1*x2]
TropicalPrevariety(polys)
#Should be equivalent (up to homogenization) to:
R.ideal(polys).groebner_fan().tropical_intersection().rays()
#Reduced cyclic 8
R.<y_1,y_2,y_3,y_4,y_5,y_6,y_7> = QQ[]... | gpl-3.0 | -5,907,201,193,266,234,000 | 38.8125 | 123 | 0.576138 | false | 1.744011 | false | false | false |
cartertech/odoo-hr-ng | hr_report_manpower/report/daily_manpower.py | 1 | 22435 | #-*- coding:utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 One Click Software (http://oneclick.solutions)
# and Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>.
#
# This program is free software: you can redistribute it and/or m... | agpl-3.0 | 2,529,204,174,706,806,000 | 45.067762 | 132 | 0.480499 | false | 4.108222 | false | false | false |
sebdelsol/pyload | module/plugins/hoster/CzshareCom.py | 1 | 5871 | # -*- coding: utf-8 -*-
#
# Test links:
# http://czshare.com/5278880/random.bin
import re
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
from module.utils import parseFileSize
class CzshareCom(SimpleHoster):
__name__ = "CzshareCom"
__type__ = "hoster"
__version__ = "... | gpl-3.0 | -6,866,925,458,783,012,000 | 37.546053 | 127 | 0.558969 | false | 3.332765 | false | false | false |
manuelli/director | src/python/director/planplayback.py | 1 | 7857 | import os
import vtkAll as vtk
import math
import time
import re
import numpy as np
from director.timercallback import TimerCallback
from director import objectmodel as om
from director.simpletimer import SimpleTimer
from director.utime import getUtime
from director import robotstate
import copy
import pickle
import ... | bsd-3-clause | -5,824,300,059,029,167,000 | 28.537594 | 99 | 0.61932 | false | 3.851471 | false | false | false |
DedMemez/ODS-August-2017 | battle/DistributedBattleBldg.py | 1 | 8958 | # Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.battle.DistributedBattleBldg
from panda3d.core import Lens, Point3, Vec3
from direct.actor import Actor
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import State
from direct.interval.IntervalGlobal import *
import random
fr... | apache-2.0 | -2,448,110,394,212,382,000 | 39.100917 | 123 | 0.611967 | false | 3.637028 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.