hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d4feb8d470f501585c9fc84e62579e9e3fcf7489 | 349 | py | Python | oct_19_2019/Desktop.py | SoundBoySelecta/BDT_1160_homework | eaf4a259c2de04c7c11bc7f477171d98367becac | [
"MIT"
] | null | null | null | oct_19_2019/Desktop.py | SoundBoySelecta/BDT_1160_homework | eaf4a259c2de04c7c11bc7f477171d98367becac | [
"MIT"
] | null | null | null | oct_19_2019/Desktop.py | SoundBoySelecta/BDT_1160_homework | eaf4a259c2de04c7c11bc7f477171d98367becac | [
"MIT"
] | null | null | null | import os
data_dir = '/users/vasanth/desktop'
desktop_obj_list = os.listdir(data_dir)
for each_obj in desktop_obj_list:
complete_file_name = os.path.join(data_dir, each_obj)
if os.path.isfile(complete_file_name):
print(f'{each_obj} is a file')
elif os.path.isdir(complete_file_name):
print(f... | 31.727273 | 57 | 0.724928 |
99182e621422551da2da89ce54cc09f3a5afcbe8 | 591 | py | Python | user/migrations/0005_auto_20181014_0851.py | vrongmeal/soteria | 0b8773cb9a402d0b198c039767954ffe36496485 | [
"MIT"
] | null | null | null | user/migrations/0005_auto_20181014_0851.py | vrongmeal/soteria | 0b8773cb9a402d0b198c039767954ffe36496485 | [
"MIT"
] | 2 | 2020-06-05T19:40:46.000Z | 2021-05-30T11:22:11.000Z | user/migrations/0005_auto_20181014_0851.py | vrongmeal/soteria | 0b8773cb9a402d0b198c039767954ffe36496485 | [
"MIT"
] | 1 | 2018-12-23T20:41:35.000Z | 2018-12-23T20:41:35.000Z | # Generated by Django 2.1.2 on 2018-10-14 08:51
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('user', '0004_auto_20181014_0846'),
]
operations = [
migrations.AlterField(
model_name='user',
... | 29.55 | 224 | 0.681895 |
1be622776016f823de1ece337ca93ad9d469c2d0 | 490 | py | Python | Desafios/Ex-066.py | LuckyCards/Curso-Python3 | b39c7b2645220c71c35012f16c102428053fee25 | [
"MIT"
] | 1 | 2021-04-06T16:14:43.000Z | 2021-04-06T16:14:43.000Z | Desafios/Ex-066.py | LuckyCards/Curso-Python3 | b39c7b2645220c71c35012f16c102428053fee25 | [
"MIT"
] | null | null | null | Desafios/Ex-066.py | LuckyCards/Curso-Python3 | b39c7b2645220c71c35012f16c102428053fee25 | [
"MIT"
] | null | null | null | print(f'\033[33m{"—"*30:^30}\033[m')
print(f'\033[36m{"EXERCÍCIO Nº 66":^30}\033[m')
print(f'\033[33m{"—"*30:^30}\033[m')
num = cont = soma = 0
while True:
num = int(input('Digite um número: '))
if num == 999:
print('\033[31mVocê ativou o break\033[m')
break
cont += 1
soma += num
if ... | 25.789474 | 50 | 0.563265 |
8546fbf81ea36bffc96e6fe16228e492c5dea7cb | 402 | py | Python | aux/internals/actor.py | bischjer/auxiliary | e42d8a4af43c9bd4d816c03edc2465640635b46b | [
"BSD-3-Clause"
] | null | null | null | aux/internals/actor.py | bischjer/auxiliary | e42d8a4af43c9bd4d816c03edc2465640635b46b | [
"BSD-3-Clause"
] | null | null | null | aux/internals/actor.py | bischjer/auxiliary | e42d8a4af43c9bd4d816c03edc2465640635b46b | [
"BSD-3-Clause"
] | null | null | null |
class Promise(object):
def __init__(self):
self.callbacks = list()
def addCallbacks(self, callback):
self.callbacks.append(callback)
class Actor(object):
pass
class Reactor(Actor):
pass
class Proactor(Actor):
pass
class Coactor(Actor):
"""
A Coactor has a realt... | 16.08 | 54 | 0.631841 |
7956c594f3267a7ff5d977866703f7a90d668ede | 2,343 | py | Python | python/thumbContextMenu.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 3 | 2016-01-19T10:36:09.000Z | 2021-01-29T01:14:45.000Z | python/thumbContextMenu.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 2 | 2016-02-20T13:09:38.000Z | 2016-03-08T06:47:47.000Z | python/thumbContextMenu.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 3 | 2016-02-19T16:52:57.000Z | 2017-05-16T03:06:43.000Z | from PyQt4 import QtGui, QtCore
import settings
import os
import subprocess
class ThumbContextMenu(QtGui.QMenu):
def __init__(self):
super(ThumbContextMenu, self).__init__()
# disabled, since it has been broken in the old ElementsBrowser for a few months and no one complained
# self.addAct... | 38.409836 | 110 | 0.665813 |
7b43d49a29f7ca30ab121faece9c19a0d8cbe422 | 4,541 | py | Python | texrel/create_collection_submit.py | asappresearch/texrel | dff447a99d56f2f92284df866fa01e7762dc6eac | [
"MIT"
] | null | null | null | texrel/create_collection_submit.py | asappresearch/texrel | dff447a99d56f2f92284df866fa01e7762dc6eac | [
"MIT"
] | null | null | null | texrel/create_collection_submit.py | asappresearch/texrel | dff447a99d56f2f92284df866fa01e7762dc6eac | [
"MIT"
] | null | null | null | """
create all data for specific collection
this will use ulfs_submit.py, use single job
per dataset
"""
import argparse
import time
import subprocess
import os
from texrel import create_collection
def run(args):
sub_refs = []
for hypothesis_generator in args.hypothesis_generators:
for dist in args.... | 44.960396 | 110 | 0.62277 |
513fca9883cdfa59182db51db739041124ae093a | 4,127 | py | Python | ops.py | lifthoofd/tensorflow-WGAN-GP | f4ae94d12b60ff6a09390e5042c9b541bd5dff8d | [
"MIT"
] | 23 | 2019-08-23T21:08:46.000Z | 2021-09-10T04:02:39.000Z | ops.py | lifthoofd/tensorflow-WGAN-GP | f4ae94d12b60ff6a09390e5042c9b541bd5dff8d | [
"MIT"
] | null | null | null | ops.py | lifthoofd/tensorflow-WGAN-GP | f4ae94d12b60ff6a09390e5042c9b541bd5dff8d | [
"MIT"
] | 8 | 2019-10-11T02:02:55.000Z | 2021-12-01T21:54:51.000Z | # MIT License
#
# Copyright (c) 2019 Drew Szurko
#
# 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, merge, ... | 37.18018 | 84 | 0.617882 |
fa6a0053c2258a7688f157bfdfaaa27fde540b65 | 4,694 | py | Python | dkmeans/local_computations.py | trendscenter/dkmeans | c71198991d29d5aa60d1f7ff949b11e250f12d11 | [
"MIT"
] | 2 | 2021-05-09T05:49:00.000Z | 2021-07-22T21:11:49.000Z | dkmeans/local_computations.py | trendscenter/dkmeans | c71198991d29d5aa60d1f7ff949b11e250f12d11 | [
"MIT"
] | 19 | 2017-11-17T20:21:45.000Z | 2018-06-05T06:40:12.000Z | dkmeans/local_computations.py | MRN-Code/dkmeans | c71198991d29d5aa60d1f7ff949b11e250f12d11 | [
"MIT"
] | 2 | 2018-03-13T20:36:47.000Z | 2018-04-23T04:09:18.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Common functions for local node operations
Common Input Specifications:
local_X - local data at site, list of N many m x n numpy arrays
local_cluster_labels - local data cluster assignments,
list of N many integers in range(k)
local_centroi... | 34.514706 | 102 | 0.657009 |
17d0c2a5f8fe4a88894278f372a93b351c4dc409 | 411 | py | Python | laute/_eliminate_umlaut.py | danieldanciu/schoggi | 0e18f0cca58cf2318525d57691c2e674b131206d | [
"Apache-2.0"
] | null | null | null | laute/_eliminate_umlaut.py | danieldanciu/schoggi | 0e18f0cca58cf2318525d57691c2e674b131206d | [
"Apache-2.0"
] | null | null | null | laute/_eliminate_umlaut.py | danieldanciu/schoggi | 0e18f0cca58cf2318525d57691c2e674b131206d | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
import os
import glob
import shutil
import sys
reload(sys)
sys.setdefaultencoding('iso-8859-1')
names = os.listdir(".")
print sys.getdefaultencoding()
for filename in names:
print "Renaming: %s" % filename
shutil.move(filename,filename.decode('iso-8859-1').replace(u... | 29.357143 | 152 | 0.676399 |
af4e0c75ea0220dc6ede1e33c48f44bd7dd9cb51 | 4,306 | py | Python | test/test_fetch_html_encoded_roles.py | mattmauriello/aws-adfs | f9a94e9182e56ab35a5bcb2e2f05337ea4620a84 | [
"MIT"
] | 261 | 2016-07-06T08:28:16.000Z | 2022-03-03T14:50:48.000Z | test/test_fetch_html_encoded_roles.py | mattmauriello/aws-adfs | f9a94e9182e56ab35a5bcb2e2f05337ea4620a84 | [
"MIT"
] | 188 | 2016-07-06T10:09:21.000Z | 2022-03-03T19:35:46.000Z | test/test_fetch_html_encoded_roles.py | mattmauriello/aws-adfs | f9a94e9182e56ab35a5bcb2e2f05337ea4620a84 | [
"MIT"
] | 116 | 2016-07-07T23:01:05.000Z | 2022-03-17T18:03:44.000Z | from unittest import mock
from aws_adfs import html_roles_fetcher
class TestFetchHtmlEncodedRoles:
def test_missing_cookie_and_credentials_results_with_empty(self):
# given adfs host which doesn't care that ssl is enabled or not
adfs_host = 'adfs.awsome.com'
ssl_verification_is_irrelevan... | 38.446429 | 90 | 0.683465 |
168d91ead3b86a731a661f7badf1fc41e04b2edd | 2,096 | py | Python | profiles_api/models.py | fantasyah12/profiles_rest_api | 11aa88d4d53bb8ac78b2579178d72c0278a053b3 | [
"MIT"
] | null | null | null | profiles_api/models.py | fantasyah12/profiles_rest_api | 11aa88d4d53bb8ac78b2579178d72c0278a053b3 | [
"MIT"
] | null | null | null | profiles_api/models.py | fantasyah12/profiles_rest_api | 11aa88d4d53bb8ac78b2579178d72c0278a053b3 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager
from django.conf import settings
# Create your models here.
class UserProfileManager(BaseUserManager):
""" Manager for ... | 30.823529 | 65 | 0.680344 |
03836bfd6439acbde448fa147608e98e4fa603f2 | 1,405 | py | Python | fluentday/users/tests/test_views.py | junngo/fluentday | b906b109a406ad1e03da3158ebbf58b45d9e88f4 | [
"MIT"
] | null | null | null | fluentday/users/tests/test_views.py | junngo/fluentday | b906b109a406ad1e03da3158ebbf58b45d9e88f4 | [
"MIT"
] | 4 | 2021-03-10T11:15:23.000Z | 2022-02-27T01:16:48.000Z | fluentday/users/tests/test_views.py | junngo/fluentday | b906b109a406ad1e03da3158ebbf58b45d9e88f4 | [
"MIT"
] | null | null | null | import pytest
from django.test import RequestFactory
from fluentday.users.models import User
from fluentday.users.views import UserRedirectView, UserUpdateView
pytestmark = pytest.mark.django_db
class TestUserUpdateView:
"""
TODO:
extracting view initialization code as class-scoped fixture
w... | 29.893617 | 81 | 0.684698 |
610307aaea26a1f12a64998d29c7ff746fe42bcc | 2,970 | py | Python | guessing_random_numbers/main.py | aeakoski/fun_with_numbers | 26329447aa55a762f2529c5029cfb0905c80afc1 | [
"MIT"
] | null | null | null | guessing_random_numbers/main.py | aeakoski/fun_with_numbers | 26329447aa55a762f2529c5029cfb0905c80afc1 | [
"MIT"
] | 5 | 2019-09-30T18:57:51.000Z | 2020-03-15T21:56:05.000Z | guessing_random_numbers/main.py | aeakoski/fun_with_numbers | 26329447aa55a762f2529c5029cfb0905c80afc1 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import random
import tqdm
import numpy as np
import matplotlib.pyplot as plt
from permut import *
class Experiment():
def __init__(self, b):
self.bit_length = b
self.key = random.randint(0,2**self.bit_length +1)
def incremental(self):
return self.key
d... | 31.595745 | 97 | 0.605387 |
060b75377e6129cfb92494105419282042c8b119 | 1,224 | py | Python | test/step_test.py | kbaseapps/jgi_mg_assembly | c834d2a0ad16817f9e859c08353274a93f8db568 | [
"MIT"
] | 1 | 2019-03-15T19:03:10.000Z | 2019-03-15T19:03:10.000Z | test/step_test.py | kbaseapps/jgi_mg_assembly | c834d2a0ad16817f9e859c08353274a93f8db568 | [
"MIT"
] | 6 | 2018-08-16T04:40:50.000Z | 2019-09-26T16:27:35.000Z | test/step_test.py | kbaseapps/jgi_mg_assembly | c834d2a0ad16817f9e859c08353274a93f8db568 | [
"MIT"
] | 2 | 2019-04-01T20:53:09.000Z | 2019-08-19T21:24:21.000Z | import unittest
from jgi_mg_assembly.pipeline_steps.step import Step
import util
class StepTest(unittest.TestCase):
"""
Tests the pipeline step base class.
"""
def test_step_bad_fn(self):
name = "Foo"
version_name = "Bar"
base_command = "foo"
output_dir = "output_dir"
... | 36 | 104 | 0.625 |
86894ae477f5c2cfbb2adb54bc0163b59e3c6ee3 | 305 | py | Python | 2017/12/prri-approval-20171204/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2017/12/prri-approval-20171204/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2017/12/prri-approval-20171204/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
import base_filters
COPY_GOOGLE_DOC_KEY = '106YvsssN8ZMUNpcgAbUqod6bC9irMrMeKTzUlLDIcKU'
USE_ASSETS = False
# Use these variables to override the default cache timeouts for this graphic
# DEFAULT_MAX_AGE = 20
# ASSETS_MAX_AGE = 300
JINJA_FILTER_FUNCTIONS = base_filters.FILTERS
| 21.785714 | 77 | 0.819672 |
e27b7adeaec6c75f81e5a1c2371f850bcce92b75 | 100 | py | Python | python3/libs/__init__.py | Jgoodz/python_koans | 5669fb398f18a7e645938c51c03f03147695da83 | [
"MIT"
] | null | null | null | python3/libs/__init__.py | Jgoodz/python_koans | 5669fb398f18a7e645938c51c03f03147695da83 | [
"MIT"
] | null | null | null | python3/libs/__init__.py | Jgoodz/python_koans | 5669fb398f18a7e645938c51c03f03147695da83 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Dummy file to support python package hierarchy
| 20 | 49 | 0.65 |
8a9c8af0b708e555111e6256adbd2491e0e198d4 | 924 | py | Python | hazelcast/security.py | esra-sengul/hazelcast-python-client | bdfd945aba9335cc583fd0c70e4812093f247d66 | [
"Apache-2.0"
] | null | null | null | hazelcast/security.py | esra-sengul/hazelcast-python-client | bdfd945aba9335cc583fd0c70e4812093f247d66 | [
"Apache-2.0"
] | null | null | null | hazelcast/security.py | esra-sengul/hazelcast-python-client | bdfd945aba9335cc583fd0c70e4812093f247d66 | [
"Apache-2.0"
] | null | null | null | import typing
from hazelcast.core import Address
class TokenProvider:
"""TokenProvider is a base class for token providers."""
def token(self, address: Address = None) -> bytes:
"""Returns a token to be used for token-based authentication.
Args:
address: Connected address for th... | 27.176471 | 82 | 0.626623 |
b30f15437a4e8e21ffe93819e493443218967458 | 1,728 | py | Python | h/views/api/index.py | pombredanne/h | 9c4c2dc0d53ed5bed5183936c24b4c27b23070b4 | [
"BSD-2-Clause"
] | 2,103 | 2015-01-07T12:47:49.000Z | 2022-03-29T02:38:25.000Z | h/views/api/index.py | pombredanne/h | 9c4c2dc0d53ed5bed5183936c24b4c27b23070b4 | [
"BSD-2-Clause"
] | 4,322 | 2015-01-04T17:18:01.000Z | 2022-03-31T17:06:02.000Z | h/views/api/index.py | pombredanne/h | 9c4c2dc0d53ed5bed5183936c24b4c27b23070b4 | [
"BSD-2-Clause"
] | 389 | 2015-01-24T04:10:02.000Z | 2022-03-28T08:00:16.000Z | from h.views.api.config import api_config
from h.views.api.helpers import links as link_helpers
from h.views.api.helpers.angular import AngularRouteTemplater
@api_config(
versions=["v1"],
route_name="api.index",
# nb. We assume that the API index document is the same for all users,
# regardless of aut... | 31.418182 | 79 | 0.688079 |
b5390cfed2699817ec1f57fb581ca32fa1250729 | 399 | py | Python | app/email.py | ephraim-kamau54/Pitch-Master | c57168baa79841b03a1e792f9620f25c8a8369e8 | [
"MIT"
] | null | null | null | app/email.py | ephraim-kamau54/Pitch-Master | c57168baa79841b03a1e792f9620f25c8a8369e8 | [
"MIT"
] | null | null | null | app/email.py | ephraim-kamau54/Pitch-Master | c57168baa79841b03a1e792f9620f25c8a8369e8 | [
"MIT"
] | null | null | null | from flask_mail import Message
from flask import render_template
from . import mail, MAIL_USERNAME
def mail_message(subject, template, to, **kwargs):
sender_email = MAIL_USERNAME
email = Message(subject, sender=sender_email, recipients=[to])
email.body = render_template(template + ".txt", **kwargs)
e... | 30.692308 | 66 | 0.73183 |
2123e3895ac45a88b3bdf77ada7ca8281196fede | 389 | py | Python | linksight/common/utils.py | thinkingmachines/linksight-api-client | 239b8f98977c2c6a5a2f55af9ac94614ecc31886 | [
"MIT"
] | 2 | 2018-11-22T04:56:31.000Z | 2021-04-20T08:25:00.000Z | linksight/common/utils.py | thinkingmachines/linksight-api-client | 239b8f98977c2c6a5a2f55af9ac94614ecc31886 | [
"MIT"
] | 19 | 2018-11-29T08:17:05.000Z | 2019-02-04T03:51:18.000Z | linksight/common/utils.py | thinkingmachines/linksight-api-client | 239b8f98977c2c6a5a2f55af9ac94614ecc31886 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Utility methods common to the package"""
def urljoin(*args):
"""Join a set of strs for URL creation
This method is commonly used by appending a URL to the `ENDPOINT`
Parameters
----------
str
URL names to join
Returns
-------
str
The joine... | 17.681818 | 69 | 0.552699 |
7be5b8163616078709d2f07ddd596ea0a64d189f | 852 | py | Python | test/test_heartrate_stream.py | rezabekf/strada-gear | 8d189a209df7938337634968be592c821be88955 | [
"Apache-2.0"
] | null | null | null | test/test_heartrate_stream.py | rezabekf/strada-gear | 8d189a209df7938337634968be592c821be88955 | [
"Apache-2.0"
] | null | null | null | test/test_heartrate_stream.py | rezabekf/strada-gear | 8d189a209df7938337634968be592c821be88955 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Strava API v3
Strava API # noqa: E501
OpenAPI spec version: 3.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
from swagger_client.models.heartrate_stream import Heartrat... | 20.780488 | 88 | 0.698357 |
7a7e3e9902f1a470d6545478f88c5981d7ecc754 | 660 | py | Python | tests/test_runlen.py | acpaquette/deepstate | 6acf07ad5dd95c9e8b970ca516ab93aa2620ea6e | [
"Apache-2.0"
] | 684 | 2018-02-18T18:04:23.000Z | 2022-03-26T06:18:39.000Z | tests/test_runlen.py | acpaquette/deepstate | 6acf07ad5dd95c9e8b970ca516ab93aa2620ea6e | [
"Apache-2.0"
] | 273 | 2018-02-18T04:01:36.000Z | 2022-02-09T16:07:38.000Z | tests/test_runlen.py | acpaquette/deepstate | 6acf07ad5dd95c9e8b970ca516ab93aa2620ea6e | [
"Apache-2.0"
] | 77 | 2018-02-19T00:18:33.000Z | 2022-03-16T04:12:09.000Z | from __future__ import print_function
import deepstate_base
import logrun
class RunlenTest(deepstate_base.DeepStateTestCase):
def run_deepstate(self, deepstate):
if deepstate == "deepstate-manticore":
return # Just skip for now, we know it's too slow
(r, output) = logrun.logrun([deepstate, "build... | 31.428571 | 69 | 0.686364 |
b016337ab0625c835633548ea6ff8ad3a551248e | 49,039 | py | Python | tests/test_packages/test_connections/test_oef/test_communication.py | ejfitzgerald/agents-aea | 6411fcba8af2cdf55a3005939ae8129df92e8c3e | [
"Apache-2.0"
] | null | null | null | tests/test_packages/test_connections/test_oef/test_communication.py | ejfitzgerald/agents-aea | 6411fcba8af2cdf55a3005939ae8129df92e8c3e | [
"Apache-2.0"
] | null | null | null | tests/test_packages/test_connections/test_oef/test_communication.py | ejfitzgerald/agents-aea | 6411fcba8af2cdf55a3005939ae8129df92e8c3e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# 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 ... | 40.831807 | 118 | 0.63058 |
9c0e31a47604e47fdae07edca8f43fb3710a85b5 | 18,569 | py | Python | airflow/models/dagbag.py | lukeplus/docker-airflow | dbdba3ec537913601541f99d9ed6b13dfe5f3619 | [
"Apache-2.0"
] | null | null | null | airflow/models/dagbag.py | lukeplus/docker-airflow | dbdba3ec537913601541f99d9ed6b13dfe5f3619 | [
"Apache-2.0"
] | 22 | 2019-12-09T23:22:07.000Z | 2021-05-12T23:15:40.000Z | airflow/models/dagbag.py | lukeplus/docker-airflow | dbdba3ec537913601541f99d9ed6b13dfe5f3619 | [
"Apache-2.0"
] | 5 | 2019-11-18T13:19:29.000Z | 2020-03-25T13:20:29.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 42.011312 | 98 | 0.577091 |
fe6400f9cd831976431074b08fb533b28069bd45 | 971 | py | Python | AI-and-Analytics/Getting-Started-Samples/Intel_Extension_For_SKLearn_GettingStarted/ci_test.py | tiwaria1/oneAPI-samples | 18310adf63c7780715f24034acfb0bf01d15521f | [
"MIT"
] | 310 | 2020-07-09T01:00:11.000Z | 2022-03-31T17:52:14.000Z | AI-and-Analytics/Getting-Started-Samples/Intel_Extension_For_SKLearn_GettingStarted/ci_test.py | tiwaria1/oneAPI-samples | 18310adf63c7780715f24034acfb0bf01d15521f | [
"MIT"
] | 438 | 2020-06-30T23:25:19.000Z | 2022-03-31T00:37:13.000Z | AI-and-Analytics/Getting-Started-Samples/Intel_Extension_For_SKLearn_GettingStarted/ci_test.py | junxnone/oneAPI-samples | f414747b5676688d690655c6043b71577027fc19 | [
"MIT"
] | 375 | 2020-06-04T22:58:24.000Z | 2022-03-30T11:04:18.000Z | def runJupyterNotebook(input_notebook_filename, output_notebook_filename, fdpath='./'):
import nbformat
import os
from nbconvert.preprocessors import ExecutePreprocessor
from nbconvert.preprocessors import CellExecutionError
if os.path.isfile(input_notebook_filename) is False:
print("N... | 46.238095 | 130 | 0.68898 |
14cff82713310cd3fd7ee5bf091df419f4f0663b | 6,767 | py | Python | openstack/tests/unit/image/v2/test_proxy.py | afontscd/openstacksdk | cb66a98f286dddabd1f593b45049c73192227186 | [
"Apache-2.0"
] | null | null | null | openstack/tests/unit/image/v2/test_proxy.py | afontscd/openstacksdk | cb66a98f286dddabd1f593b45049c73192227186 | [
"Apache-2.0"
] | null | null | null | openstack/tests/unit/image/v2/test_proxy.py | afontscd/openstacksdk | cb66a98f286dddabd1f593b45049c73192227186 | [
"Apache-2.0"
] | 1 | 2021-03-12T14:28:28.000Z | 2021-03-12T14:28:28.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 43.101911 | 77 | 0.580021 |
c1bf66420a684dde9750313a89d2971a81f7c762 | 2,747 | py | Python | app/core/tests/test_model.py | dtmcdona/DM_Recipes | 194372ea3a1c1ada097583dec155773521ed6c1e | [
"CC0-1.0"
] | null | null | null | app/core/tests/test_model.py | dtmcdona/DM_Recipes | 194372ea3a1c1ada097583dec155773521ed6c1e | [
"CC0-1.0"
] | null | null | null | app/core/tests/test_model.py | dtmcdona/DM_Recipes | 194372ea3a1c1ada097583dec155773521ed6c1e | [
"CC0-1.0"
] | null | null | null | from unittest.mock import patch
from django.test import TestCase
from django.contrib.auth import get_user_model
from core import models
def sample_user(email='testing@testemail.com', password='testpassword'):
"""Create sample user"""
return get_user_model().objects.create_user(email, password)
class Model... | 31.574713 | 72 | 0.643247 |
36994a657de9c513ae5415585f448af736bc08c1 | 669 | py | Python | scripts/rename_images.py | brohrer/cottonwood_martian_images | bea8377143fa1fb9d287db65963461edbf646077 | [
"MIT"
] | 11 | 2019-11-03T01:25:11.000Z | 2021-09-12T06:13:45.000Z | scripts/rename_images.py | brohrer/cottonwood_martian_images | bea8377143fa1fb9d287db65963461edbf646077 | [
"MIT"
] | null | null | null | scripts/rename_images.py | brohrer/cottonwood_martian_images | bea8377143fa1fb9d287db65963461edbf646077 | [
"MIT"
] | 3 | 2019-12-08T07:03:23.000Z | 2022-02-07T02:50:49.000Z | import os
image_dirs = ["training", "tuning", "evaluation"]
for image_dir in image_dirs:
filenames = os.listdir(image_dir)
for filename in filenames:
if filename[:8] == "download":
i_left = filename.find("(")
i_right = filename.find(")")
if i_left > 0:
... | 30.409091 | 60 | 0.527653 |
87a49666ad0d2566cdc5e307067703a8c2b72e95 | 815 | py | Python | Python scripts/Rookie/zigzag.py | shartrooper/My-python-scripts | 5c3a8db4ed9a75bd9ab4b29153a788d9e6c5d28c | [
"MIT"
] | null | null | null | Python scripts/Rookie/zigzag.py | shartrooper/My-python-scripts | 5c3a8db4ed9a75bd9ab4b29153a788d9e6c5d28c | [
"MIT"
] | null | null | null | Python scripts/Rookie/zigzag.py | shartrooper/My-python-scripts | 5c3a8db4ed9a75bd9ab4b29153a788d9e6c5d28c | [
"MIT"
] | null | null | null | import time, sys
indent = 0 # How many spaces to indent.
indentIncreasing = True # Whether the indentation is increasing or not.
print('Press ctrl+C to interrupt the animation')
try:
while True: # The main program loop.
print(' ' * indent, end='')
print('********')
time.sleep(0.1) # ... | 31.346154 | 72 | 0.533742 |
07b6947997f0c38fcacc615bafe21dbc1bea71af | 3,039 | py | Python | upgrade/1.4.5/aquilon/aqdb/model/__init__.py | ned21/aquilon | 6562ea0f224cda33b72a6f7664f48d65f96bd41a | [
"Apache-2.0"
] | 7 | 2015-07-31T05:57:30.000Z | 2021-09-07T15:18:56.000Z | upgrade/1.4.5/aquilon/aqdb/model/__init__.py | ned21/aquilon | 6562ea0f224cda33b72a6f7664f48d65f96bd41a | [
"Apache-2.0"
] | 115 | 2015-03-03T13:11:46.000Z | 2021-09-20T12:42:24.000Z | upgrade/1.4.5/aquilon/aqdb/model/__init__.py | ned21/aquilon | 6562ea0f224cda33b72a6f7664f48d65f96bd41a | [
"Apache-2.0"
] | 13 | 2015-03-03T11:17:59.000Z | 2021-09-09T09:16:41.000Z | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2009,2013 Contributor
#
# 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
#... | 30.39 | 74 | 0.794998 |
212662b432f706f5573739fb808b8eba093432df | 2,656 | py | Python | aiida/cmdline/common.py | astamminger/aiida_core | b01ad8236f21804f273c9d2a0365ecee62255cbb | [
"BSD-2-Clause"
] | null | null | null | aiida/cmdline/common.py | astamminger/aiida_core | b01ad8236f21804f273c9d2a0365ecee62255cbb | [
"BSD-2-Clause"
] | null | null | null | aiida/cmdline/common.py | astamminger/aiida_core | b01ad8236f21804f273c9d2a0365ecee62255cbb | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 36.888889 | 90 | 0.550075 |
87813943901789c98b026f56c7728268dc3b01e1 | 4,370 | py | Python | cmsplugin_cascade/bootstrap4/icon.py | teklager/djangocms-cascade | adc461f7054c6c0f88bc732aefd03b157df2f514 | [
"MIT"
] | 139 | 2015-01-08T22:27:06.000Z | 2021-08-19T03:36:58.000Z | cmsplugin_cascade/bootstrap4/icon.py | teklager/djangocms-cascade | adc461f7054c6c0f88bc732aefd03b157df2f514 | [
"MIT"
] | 286 | 2015-01-02T14:15:14.000Z | 2022-03-22T11:00:12.000Z | cmsplugin_cascade/bootstrap4/icon.py | teklager/djangocms-cascade | adc461f7054c6c0f88bc732aefd03b157df2f514 | [
"MIT"
] | 91 | 2015-01-16T15:06:23.000Z | 2022-03-23T23:36:54.000Z | from django.forms import ChoiceField
from django.utils.html import format_html, format_html_join
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _
from cms.plugin_pool import plugin_pool
from cmsplugin_cascade.fields import SizeField, ColorField, BorderChoiceField
from... | 36.722689 | 118 | 0.64714 |
ae24b0bc80e77887f1dd90ee86abbce94ccdbad8 | 1,977 | py | Python | qiskit/qasm/_node/_binaryop.py | ishandutta2007/qiskit-sdk-py | 69ae9c3cb276e5aa097a5cc4ee4eabe31c4f04ca | [
"Apache-2.0"
] | 1 | 2020-04-30T15:09:16.000Z | 2020-04-30T15:09:16.000Z | qiskit/qasm/_node/_binaryop.py | ishandutta2007/qiskit-sdk-py | 69ae9c3cb276e5aa097a5cc4ee4eabe31c4f04ca | [
"Apache-2.0"
] | null | null | null | qiskit/qasm/_node/_binaryop.py | ishandutta2007/qiskit-sdk-py | 69ae9c3cb276e5aa097a5cc4ee4eabe31c4f04ca | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. 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
#
# U... | 36.611111 | 80 | 0.623166 |
57dfe17887210eb8f9b7f25126a05320da74975e | 1,010 | py | Python | currency_providers/driver.py | avara1986/currency-api | 3e21b544a3b2184c61aa654e9d8ecec2ca9c95fe | [
"Apache-2.0"
] | null | null | null | currency_providers/driver.py | avara1986/currency-api | 3e21b544a3b2184c61aa654e9d8ecec2ca9c95fe | [
"Apache-2.0"
] | null | null | null | currency_providers/driver.py | avara1986/currency-api | 3e21b544a3b2184c61aa654e9d8ecec2ca9c95fe | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
from abc import abstractmethod, ABCMeta
from datetime import datetime
from typing import Text, Tuple
from currency_providers.requests import Request
logger = logging.getLogger(__name__)
class BaseProviderDriver(object, metaclass=ABCMeta):
base_url = ""
prefix_url = ""... | 28.055556 | 102 | 0.675248 |
b0786e8af745e5886628dc0853cc3ea4455fe0be | 8,530 | py | Python | sdcard.py | lemariva/uPySensors | d4c828650b2ed63a7fba952e7f069bc90085dfcc | [
"Apache-2.0"
] | 44 | 2018-09-21T13:20:49.000Z | 2022-03-19T06:21:58.000Z | sdcard.py | lemariva/uPySensors | d4c828650b2ed63a7fba952e7f069bc90085dfcc | [
"Apache-2.0"
] | 1 | 2021-12-22T00:05:22.000Z | 2021-12-22T00:05:22.000Z | sdcard.py | lemariva/uPySensors | d4c828650b2ed63a7fba952e7f069bc90085dfcc | [
"Apache-2.0"
] | 14 | 2019-01-13T14:31:28.000Z | 2022-03-25T10:36:48.000Z | """
MicroPython driver for SD cards using SPI bus.
Requires an SPI bus and a CS pin. Provides readblocks and writeblocks
methods so the device can be mounted as a filesystem.
Example usage on pyboard:
import pyb, sdcard, os
sd = sdcard.SDCard(pyb.SPI(1), pyb.Pin.board.X5)
pyb.mount(sd, '/sd2')
os.li... | 30.464286 | 77 | 0.526846 |
fa8945f5b270ff856b6f5c1392eca0588b6a2c69 | 771 | py | Python | setup.py | sfneal/differentiate | 4e2c5cd152aa1ad96a9c4bfe4126fcd797f9a69a | [
"MIT"
] | null | null | null | setup.py | sfneal/differentiate | 4e2c5cd152aa1ad96a9c4bfe4126fcd797f9a69a | [
"MIT"
] | 1 | 2018-10-05T14:53:30.000Z | 2018-10-24T19:47:40.000Z | setup.py | sfneal/differentiate | 4e2c5cd152aa1ad96a9c4bfe4126fcd797f9a69a | [
"MIT"
] | null | null | null | import os
from setuptools import setup, find_packages
name = 'differentiate'
def get_version(package_name, version_file='_version.py'):
"""Retrieve the package version from a version file in the package root."""
filename = os.path.join(os.path.dirname(__file__), package_name, version_file)
with open(file... | 30.84 | 82 | 0.700389 |
a2b1fbc93e35ca53f0edcce45c155c621983e6f6 | 4,116 | py | Python | senlin-7.0.0/senlin/tests/unit/objects/requests/test_webhooks.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 45 | 2015-10-18T02:56:50.000Z | 2022-03-01T15:28:02.000Z | senlin-7.0.0/senlin/tests/unit/objects/requests/test_webhooks.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | senlin-7.0.0/senlin/tests/unit/objects/requests/test_webhooks.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 45 | 2015-10-19T02:35:57.000Z | 2021-09-28T09:01:42.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed unde... | 44.73913 | 77 | 0.696307 |
437593025f5ccf589f3609b1dcef1f633cbe0b66 | 11,848 | py | Python | scripts/data/chemprot/02_chemprot_standard_to_input.py | zmmzGitHub/SpanMB_BERT | 133c93e2876e27379f249df3922e531e2be66f04 | [
"MIT"
] | null | null | null | scripts/data/chemprot/02_chemprot_standard_to_input.py | zmmzGitHub/SpanMB_BERT | 133c93e2876e27379f249df3922e531e2be66f04 | [
"MIT"
] | null | null | null | scripts/data/chemprot/02_chemprot_standard_to_input.py | zmmzGitHub/SpanMB_BERT | 133c93e2876e27379f249df3922e531e2be66f04 | [
"MIT"
] | null | null | null | import spacy
import pandas as pd
from collections import Counter
from tqdm import tqdm
import json
import re, os
from itertools import accumulate
class NToken:
def __init__(self, idx, i, text):
self.idx = idx
self.i = i
self.text = text
def __len__(self):
return len(self.text)
... | 35.90303 | 117 | 0.60525 |
f1ca95b076f710ef81427f086016f653196471c7 | 391 | py | Python | FirePay/asgi.py | ReaperZ0v/FirePay-ewallet | a98996f7b123cdc54c89b9d162b487f80ff04ad7 | [
"MIT"
] | 3 | 2021-07-28T10:33:01.000Z | 2022-03-11T07:43:56.000Z | FirePay/asgi.py | ReaperZ0v/FirePay-ewallet | a98996f7b123cdc54c89b9d162b487f80ff04ad7 | [
"MIT"
] | null | null | null | FirePay/asgi.py | ReaperZ0v/FirePay-ewallet | a98996f7b123cdc54c89b9d162b487f80ff04ad7 | [
"MIT"
] | 1 | 2021-12-22T10:56:11.000Z | 2021-12-22T10:56:11.000Z | """
ASGI config for FirePay project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTI... | 23 | 78 | 0.785166 |
9b908b316cece7bfc6f01aac947b1784aef4bb89 | 1,924 | py | Python | MyPlactice/TestLayer.py | Roy1715/LearningDL | 811eb43bee31a7c900c3c2a5463277341ca1331c | [
"MIT"
] | null | null | null | MyPlactice/TestLayer.py | Roy1715/LearningDL | 811eb43bee31a7c900c3c2a5463277341ca1331c | [
"MIT"
] | null | null | null | MyPlactice/TestLayer.py | Roy1715/LearningDL | 811eb43bee31a7c900c3c2a5463277341ca1331c | [
"MIT"
] | null | null | null | from Layer.MulLayer import MullLayer
from Layer.AddLayer import AddLayer
# Buy Apple Pattern
apple = 100
applefigure = 2
appleLayer = MullLayer()
taxLayer = MullLayer()
tax = 1.1
# forward
print("\n---forward---")
applePrice = appleLayer.forward(apple, applefigure)
print("applePrice:" + str(applePrice))
allprice = ... | 25.653333 | 81 | 0.694906 |
ea7088c89bb60c9b2acee650d5c9e95bb032af97 | 154 | py | Python | Scripts/django-admin.py | angel318/DacodesJobs | 3a8bb0248ab8addf462b175e039ae935a5e34197 | [
"bzip2-1.0.6"
] | null | null | null | Scripts/django-admin.py | angel318/DacodesJobs | 3a8bb0248ab8addf462b175e039ae935a5e34197 | [
"bzip2-1.0.6"
] | null | null | null | Scripts/django-admin.py | angel318/DacodesJobs | 3a8bb0248ab8addf462b175e039ae935a5e34197 | [
"bzip2-1.0.6"
] | null | null | null | #!c:\users\angel\dacodesjobs\scripts\python.exe
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 25.666667 | 47 | 0.785714 |
af23f0a86412295b015ebfbae12e3a5e83c9b048 | 742 | py | Python | tests/test_links.py | d97hah/pyglottolog | fe4c2a52d54cdcf0804b4f889598dbb9b8698dbd | [
"Apache-2.0"
] | 1 | 2021-06-03T20:16:11.000Z | 2021-06-03T20:16:11.000Z | tests/test_links.py | d97hah/pyglottolog | fe4c2a52d54cdcf0804b4f889598dbb9b8698dbd | [
"Apache-2.0"
] | null | null | null | tests/test_links.py | d97hah/pyglottolog | fe4c2a52d54cdcf0804b4f889598dbb9b8698dbd | [
"Apache-2.0"
] | null | null | null | from pyglottolog.links import endangeredlanguages, wikidata
def test_el(elcat):
res = endangeredlanguages.read()
assert len(res) == 1
assert len(res[0].coordinates) == 1
assert res[0].url.endswith('1')
def test_wikidata(mocker, api_copy):
class wd(object):
def post(self, *args, **kw):
... | 35.333333 | 97 | 0.687332 |
7c4191ce33a84752dbdb27a13ed2b9655f03b8f0 | 31,479 | py | Python | google/cloud/dialogflow/cx/v3beta1/dialogflow-cx-v3beta1-py/google/cloud/dialogflowcx_v3beta1/services/experiments/async_client.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/dialogflow/cx/v3beta1/dialogflow-cx-v3beta1-py/google/cloud/dialogflowcx_v3beta1/services/experiments/async_client.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/dialogflow/cx/v3beta1/dialogflow-cx-v3beta1-py/google/cloud/dialogflowcx_v3beta1/services/experiments/async_client.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- 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... | 42.367429 | 142 | 0.625878 |
aa96669518eda037ade2251ace70e7156ce33187 | 1,506 | py | Python | assist.py | brayton-anderson/virtualassistant_andie | 195e147bd2b1635550b04c7aba6e4af3fc098a9c | [
"MIT"
] | null | null | null | assist.py | brayton-anderson/virtualassistant_andie | 195e147bd2b1635550b04c7aba6e4af3fc098a9c | [
"MIT"
] | null | null | null | assist.py | brayton-anderson/virtualassistant_andie | 195e147bd2b1635550b04c7aba6e4af3fc098a9c | [
"MIT"
] | null | null | null | import speech_recognition as sr
import pyttsx3
import pywhatkit
import datetime
import wikipedia
import pyjokes
listener = sr.Recognizer()
engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[1].id)
def talk(text):
engine.say(text)
engine.runAndWait()
def take_co... | 24.688525 | 59 | 0.600266 |
1dd8e7efbebeeacacdf610af4717e1604f4a57b3 | 699 | py | Python | manage.py | markpmiles/juniorachievement | 737e43609fbe2db5c7f7da239dd62684c9a55c35 | [
"MIT"
] | null | null | null | manage.py | markpmiles/juniorachievement | 737e43609fbe2db5c7f7da239dd62684c9a55c35 | [
"MIT"
] | null | null | null | manage.py | markpmiles/juniorachievement | 737e43609fbe2db5c7f7da239dd62684c9a55c35 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
if os.environ.get('DJANGO_ENV') == 'production':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_hello.production')
else:
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_hello.settings')
try:
... | 34.95 | 82 | 0.680973 |
af0b812f9a6613aee35fa9461546a31dc1573599 | 3,392 | py | Python | AnalysisServer/AnalysisServer/settings.py | mwpark92/super_rich | 24aa4b3512e08b44fa43d4343f785889fd789d25 | [
"MIT"
] | null | null | null | AnalysisServer/AnalysisServer/settings.py | mwpark92/super_rich | 24aa4b3512e08b44fa43d4343f785889fd789d25 | [
"MIT"
] | null | null | null | AnalysisServer/AnalysisServer/settings.py | mwpark92/super_rich | 24aa4b3512e08b44fa43d4343f785889fd789d25 | [
"MIT"
] | null | null | null | """
Django settings for AnalysisServer project.
Generated by 'django-admin startproject' using Django 2.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
impor... | 25.503759 | 91 | 0.679835 |
c87806fc92901709b50e52837803c2245dc1b01e | 40,078 | py | Python | tests/card_tests/hunter_tests.py | souserge/hearthbreaker | 481dcaa3ae13c7dc16c0e6b7f59f11c36fdb29a7 | [
"MIT"
] | 429 | 2015-01-01T16:07:20.000Z | 2022-03-16T22:30:50.000Z | tests/card_tests/hunter_tests.py | souserge/hearthbreaker | 481dcaa3ae13c7dc16c0e6b7f59f11c36fdb29a7 | [
"MIT"
] | 47 | 2015-01-01T17:07:57.000Z | 2018-05-07T10:49:37.000Z | tests/card_tests/hunter_tests.py | souserge/hearthbreaker | 481dcaa3ae13c7dc16c0e6b7f59f11c36fdb29a7 | [
"MIT"
] | 135 | 2015-01-12T21:52:17.000Z | 2022-02-25T21:18:08.000Z | import random
import unittest
from hearthbreaker.agents.basic_agents import DoNothingAgent, PredictableAgent
from hearthbreaker.constants import MINION_TYPE
from tests.agents.testing_agents import CardTestingAgent, OneCardPlayingAgent, WeaponTestingAgent, \
PlayAndAttackAgent, SelfSpellTestingAgent
from tests.test... | 43.1875 | 117 | 0.669594 |
fe3ad50a0eb2b957532c5f972606d31e18a19e80 | 5,054 | py | Python | frame.py | BabouZ17/MacGyver | d5b6e5f3a73867e00ae2632b4d863d31d8a5c829 | [
"MIT"
] | null | null | null | frame.py | BabouZ17/MacGyver | d5b6e5f3a73867e00ae2632b4d863d31d8a5c829 | [
"MIT"
] | null | null | null | frame.py | BabouZ17/MacGyver | d5b6e5f3a73867e00ae2632b4d863d31d8a5c829 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# This class represents the game frame and provides methods
# in order to manage the events in the game such as a move
# from the character, checking if the game is over or
# preparing the map.
"""
This class represents the game frame and deals
with all the logic which o... | 34.855172 | 80 | 0.58053 |
52ccc105c50c8914fbb317815b4604cf91f1f8e9 | 2,254 | py | Python | buyAllFromScreener.py | mainstringargs/finviz | 54572ad7a2394f2f22dbb0114505a539fd63bb21 | [
"MIT"
] | null | null | null | buyAllFromScreener.py | mainstringargs/finviz | 54572ad7a2394f2f22dbb0114505a539fd63bb21 | [
"MIT"
] | null | null | null | buyAllFromScreener.py | mainstringargs/finviz | 54572ad7a2394f2f22dbb0114505a539fd63bb21 | [
"MIT"
] | null | null | null | import os
import sys
import pandas as pd
from yahoo_fin import stock_info as si
import csv
from datetime import datetime, date, time, timedelta, timezone
import alpaca_trade_api as tradeapi
import pytz;
from yahoo_fin import stock_info as si
import time;
api = tradeapi.REST('XyZ','XYZ')
print ('Number ... | 27.156627 | 150 | 0.606921 |
740cd762d6f47daf3473656f8838b0fca5c8c499 | 1,214 | py | Python | koans/triangle.py | laurenkch/python_koans | 7edf8c8229886a442c27f2ed746923a8a9dd3cf2 | [
"MIT"
] | null | null | null | koans/triangle.py | laurenkch/python_koans | 7edf8c8229886a442c27f2ed746923a8a9dd3cf2 | [
"MIT"
] | null | null | null | koans/triangle.py | laurenkch/python_koans | 7edf8c8229886a442c27f2ed746923a8a9dd3cf2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Triangle Project Code.
# Triangle analyzes the lengths of the sides of a triangle
# (represented by a, b and c) and returns the type of triangle.
#
# It returns:
# 'equilateral' if all sides are equal
# 'isosceles' if exactly 2 sides are equal
# 'scalene' ... | 23.803922 | 63 | 0.588138 |
4f96169f97943cfdd5660e435b3232e4ec55b454 | 333 | py | Python | emokit/__init__.py | mahdanahmad/medik-emokit-wheelchair | 4e258bdfd6be8203a8e36155385405e7e2e0d9de | [
"MIT"
] | null | null | null | emokit/__init__.py | mahdanahmad/medik-emokit-wheelchair | 4e258bdfd6be8203a8e36155385405e7e2e0d9de | [
"MIT"
] | null | null | null | emokit/__init__.py | mahdanahmad/medik-emokit-wheelchair | 4e258bdfd6be8203a8e36155385405e7e2e0d9de | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
emokit - emotiv epoc reverse engineering
~~~~~~~~~~~~~~~
:copyright: (c) 2013 by ???
:license: ???
"""
__title__ = "emokit"
__version__ = "0.0.1"
__build__ = 0x000001
__author__ = "Bryan Bishop <kanzure@gmail.com>"
__license__ = "???"
__copyright__ = "Copyright 2013 Bryan Bishop"
from . i... | 18.5 | 47 | 0.63964 |
0ac065b7bf6ba216a260e796673c48c4e55abfd0 | 3,424 | py | Python | datastore/adapter/_support.py | alexander255/py-datastore | 90b4b587140c59f7b0157602ad39299a6ff82c26 | [
"MIT"
] | 6 | 2019-08-04T04:11:36.000Z | 2020-02-20T17:10:26.000Z | datastore/adapter/_support.py | ipfs/py-datastore | b80933d52ca60c52ba2210db74300899d604d7ef | [
"MIT"
] | 23 | 2019-09-17T11:35:06.000Z | 2020-04-07T16:18:15.000Z | datastore/adapter/_support.py | ipfs/py-datastore | b80933d52ca60c52ba2210db74300899d604d7ef | [
"MIT"
] | 6 | 2019-08-04T02:02:25.000Z | 2020-03-01T15:43:41.000Z | import typing
import trio
import datastore
T_co = typing.TypeVar("T_co", covariant=True)
#XXX: Maybe retry describing this cooperative multiple inheritance scheme if these are ever added:
#
# * https://github.com/python/mypy/issues/7790 (Associated types)
# * https://github.com/python/mypy/issues/7791 (Types of g... | 30.300885 | 98 | 0.693341 |
0d75603f8d5e708c59c0f739cd766bb5dd1463fb | 1,223 | py | Python | rx/linq/observable/tofuture.py | AlexMost/RxPY | 05cb14c72806dc41e243789c05f498dede11cebd | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | rx/linq/observable/tofuture.py | AlexMost/RxPY | 05cb14c72806dc41e243789c05f498dede11cebd | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | rx/linq/observable/tofuture.py | AlexMost/RxPY | 05cb14c72806dc41e243789c05f498dede11cebd | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-11-04T11:13:49.000Z | 2021-11-04T11:13:49.000Z | import rx
from rx.observable import Observable
from rx.internal import extensionmethod
@extensionmethod(Observable)
def to_future(self, future_ctor=None):
"""Converts an existing observable sequence to a Future
Example:
future = rx.Observable.return_value(42).to_future(trollius.Future);
With config:... | 24.46 | 75 | 0.676206 |
a309cf28f9460e2fa3dd650ebd5a19ffe7d40567 | 788 | py | Python | src/tt_bank/tt_bank/migrations/0004_auto_20180119_1955.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 85 | 2017-11-21T12:22:02.000Z | 2022-03-27T23:07:17.000Z | src/tt_bank/tt_bank/migrations/0004_auto_20180119_1955.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 545 | 2017-11-04T14:15:04.000Z | 2022-03-27T14:19:27.000Z | src/tt_bank/tt_bank/migrations/0004_auto_20180119_1955.py | al-arz/the-tale | 542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5 | [
"BSD-3-Clause"
] | 45 | 2017-11-11T12:36:30.000Z | 2022-02-25T06:10:44.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2018-01-19 19:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tt_bank', '0003_auto_20171214_1958'),
]
operations = [
migrations.AlterFiel... | 25.419355 | 56 | 0.590102 |
74ea2bcb98385b801e1efa0774969f5b29924069 | 2,846 | py | Python | python/ray/tune/result.py | songqing/ray | 166000b089ee15d44635ebca00f12320f51ce587 | [
"Apache-2.0"
] | 1 | 2018-06-25T08:00:51.000Z | 2018-06-25T08:00:51.000Z | python/ray/tune/result.py | songqing/ray | 166000b089ee15d44635ebca00f12320f51ce587 | [
"Apache-2.0"
] | 1 | 2018-01-26T05:11:04.000Z | 2018-01-26T05:11:04.000Z | python/ray/tune/result.py | songqing/ray | 166000b089ee15d44635ebca00f12320f51ce587 | [
"Apache-2.0"
] | 1 | 2020-10-16T08:42:32.000Z | 2020-10-16T08:42:32.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from collections import namedtuple
import os
"""
When using ray.tune with custom training scripts, you must periodically report
training status back to Ray by calling reporter(result).
Most of the fields are o... | 30.276596 | 79 | 0.659522 |
9a85fffbc1d77c59220ec6d1262280279ab37f1a | 11,445 | py | Python | qa/rpc-tests/test_framework/bunode.py | lycion/lkcoinse | 9cf9ed5730217566b44466c22dc255f0134ad1bb | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/bunode.py | lycion/lkcoinse | 9cf9ed5730217566b44466c22dc255f0134ad1bb | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/bunode.py | lycion/lkcoinse | 9cf9ed5730217566b44466c22dc255f0134ad1bb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Lkcoinse Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import LkcoinseTestFramework
fr... | 34.472892 | 102 | 0.608825 |
ec057e0dcce25505bcad93766626efdd8f936ef8 | 10,613 | py | Python | evaluate.py | cclauss/CCNet | 3c8c5a53a9a36fa2b2a17944ad5078a010aec6c9 | [
"MIT"
] | 1 | 2019-01-06T02:33:24.000Z | 2019-01-06T02:33:24.000Z | evaluate.py | cclauss/CCNet | 3c8c5a53a9a36fa2b2a17944ad5078a010aec6c9 | [
"MIT"
] | null | null | null | evaluate.py | cclauss/CCNet | 3c8c5a53a9a36fa2b2a17944ad5078a010aec6c9 | [
"MIT"
] | null | null | null | import argparse
import scipy
from scipy import ndimage
import cv2
import numpy as np
import sys
import json
import torch
from torch.autograd import Variable
import torchvision.models as models
import torch.nn.functional as F
from torch.utils import data
from networks.ccnet import Res_Deeplab
from dataset... | 41.783465 | 146 | 0.620748 |
9f94bc95bd2a18478df685f22cad17f33d0a0e58 | 2,154 | py | Python | tensorflow_datasets/core/features/audio_feature_test.py | rodrigob/datasets | 82447d1ad59ceabe2614d803df75030fc51c9981 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/core/features/audio_feature_test.py | rodrigob/datasets | 82447d1ad59ceabe2614d803df75030fc51c9981 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/core/features/audio_feature_test.py | rodrigob/datasets | 82447d1ad59ceabe2614d803df75030fc51c9981 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The TensorFlow Datasets 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 appl... | 27.615385 | 95 | 0.691272 |
64a9e97534c3b71928ab2844defc5031678d960e | 3,286 | py | Python | tools/testing/cross_language/util/cli_tinkey.py | thecodeboy/tink | e1a63feca24ef37c9e36e89384668e0786b86aa6 | [
"Apache-2.0"
] | null | null | null | tools/testing/cross_language/util/cli_tinkey.py | thecodeboy/tink | e1a63feca24ef37c9e36e89384668e0786b86aa6 | [
"Apache-2.0"
] | null | null | null | tools/testing/cross_language/util/cli_tinkey.py | thecodeboy/tink | e1a63feca24ef37c9e36e89384668e0786b86aa6 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 37.340909 | 75 | 0.727328 |
9112e056bbef6710ad3620c63259977478baabba | 3,536 | py | Python | cloudnetpy/products/product_tools.py | griesche/cloudnetpy-1 | 0675677d1cb8dc4b09dfe5d76129df4483725fce | [
"MIT"
] | null | null | null | cloudnetpy/products/product_tools.py | griesche/cloudnetpy-1 | 0675677d1cb8dc4b09dfe5d76129df4483725fce | [
"MIT"
] | null | null | null | cloudnetpy/products/product_tools.py | griesche/cloudnetpy-1 | 0675677d1cb8dc4b09dfe5d76129df4483725fce | [
"MIT"
] | null | null | null | """General helper classes and functions for all products."""
from typing import Dict, Union
import netCDF4
import numpy as np
from numpy import ma
from cloudnetpy import utils
class CategorizeBits:
"""Class holding information about category and quality bits.
Args:
categorize_file (str): Categorize... | 32.145455 | 100 | 0.656957 |
9c9de8fc7aed6ba009fbfe9ad9c231354f93a7b2 | 4,618 | py | Python | tests/app/api_v0/test_revision.py | xwu64/server | d358db21db4a8faf33a3681fc499aeea07e9784b | [
"BSD-3-Clause"
] | null | null | null | tests/app/api_v0/test_revision.py | xwu64/server | d358db21db4a8faf33a3681fc499aeea07e9784b | [
"BSD-3-Clause"
] | null | null | null | tests/app/api_v0/test_revision.py | xwu64/server | d358db21db4a8faf33a3681fc499aeea07e9784b | [
"BSD-3-Clause"
] | null | null | null | # TODO: split E2E test to unit test
import pytest
from starlette.testclient import TestClient
from tests.fixtures.mock_service import MockUserService
__all__ = ["test_person_revision_basic",
"test_person_revision_not_found",
"test_character_revision_basic",
"test_character_revision_n... | 26.693642 | 87 | 0.643352 |
8567631fcdedf060c93c04aef0f8fa6c1d5b73a4 | 29,164 | py | Python | src/full_node/full_node_store.py | Quexington/chia-blockchain | d3ea1f119004749d8a65d292214e7856de1539c3 | [
"Apache-2.0"
] | null | null | null | src/full_node/full_node_store.py | Quexington/chia-blockchain | d3ea1f119004749d8a65d292214e7856de1539c3 | [
"Apache-2.0"
] | null | null | null | src/full_node/full_node_store.py | Quexington/chia-blockchain | d3ea1f119004749d8a65d292214e7856de1539c3 | [
"Apache-2.0"
] | null | null | null | import dataclasses
import logging
from typing import Dict, List, Optional, Tuple, Set
from src.consensus.blockchain_interface import BlockchainInterface
from src.consensus.constants import ConsensusConstants
from src.consensus.multiprocess_validation import PreValidationResult
from src.full_node.signage_point import S... | 43.987934 | 120 | 0.619565 |
f89486f9d33967a8d89be99a2cd010bf36c8cb04 | 1,766 | py | Python | queryfuzz/utils/randomness.py | Practical-Formal-Methods/queryFuzz | 330be12fb9567e4b94968ac17be030a390d02e9f | [
"Apache-2.0"
] | 22 | 2021-06-07T14:18:13.000Z | 2022-03-04T11:46:15.000Z | queryfuzz/utils/randomness.py | Practical-Formal-Methods/queryFuzz | 330be12fb9567e4b94968ac17be030a390d02e9f | [
"Apache-2.0"
] | null | null | null | queryfuzz/utils/randomness.py | Practical-Formal-Methods/queryFuzz | 330be12fb9567e4b94968ac17be030a390d02e9f | [
"Apache-2.0"
] | 5 | 2021-06-07T15:59:14.000Z | 2021-08-17T08:51:36.000Z | """
Copyright 2021 MPI-SWS
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
distribut... | 34.627451 | 98 | 0.716308 |
540bfa4b0728dfbf29b22c8d0519cd07fcd09c9c | 4,977 | py | Python | plotter.py | iamgroot42/data-poisoning-release | fef371060878b7524af9b31225d3144d268b98b3 | [
"MIT"
] | 34 | 2017-12-27T21:42:58.000Z | 2022-02-24T02:06:34.000Z | plotter.py | iamgroot42/data-poisoning-release | fef371060878b7524af9b31225d3144d268b98b3 | [
"MIT"
] | null | null | null | plotter.py | iamgroot42/data-poisoning-release | fef371060878b7524af9b31225d3144d268b98b3 | [
"MIT"
] | 18 | 2018-01-27T00:34:20.000Z | 2022-02-11T16:20:58.000Z | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import scipy.linalg as slin
import scipy.sparse.linalg as sparselin
import scipy.sparse as sparse
class Plotter(object):
def __init__(self, X, axes=None, figsize=None, padding=1, axis_equal=False, fig=None, ax=None):
... | 37.992366 | 133 | 0.560177 |
763538fe5404a659a6678cfa0339c1a2baa6635c | 2,140 | py | Python | 2021-week-24.py | wjsutton/preppin-data | 4d554b11d19c9e9798cfd8641bfdf3d259dff8e5 | [
"MIT"
] | 6 | 2021-02-05T20:53:17.000Z | 2022-03-08T01:03:01.000Z | 2021-week-24.py | wjsutton/preppin-data | 4d554b11d19c9e9798cfd8641bfdf3d259dff8e5 | [
"MIT"
] | null | null | null | 2021-week-24.py | wjsutton/preppin-data | 4d554b11d19c9e9798cfd8641bfdf3d259dff8e5 | [
"MIT"
] | 1 | 2021-07-04T13:06:18.000Z | 2021-07-04T13:06:18.000Z | # Preppin' Data 2021 Week 24
import pandas as pd
import numpy as np
from datetime import date, timedelta
# Load data
reasons = pd.read_excel('unprepped_data\\PD 2021 Wk 24 Input - Absenteeism Scaffold.xlsx', sheet_name='Reasons')
scaffold = pd.read_excel('unprepped_data\\PD 2021 Wk 24 Input - Absenteeism Scaffold.xlsx... | 35.666667 | 123 | 0.717757 |
82c3b853b2f84aad617c574e582562d613e6e24e | 2,018 | py | Python | tests/ase_otf/flare_setup.py | smheidrich/flare | 5a18c1042a5767ebb8dc20ac59a17df6f1bcad77 | [
"MIT"
] | null | null | null | tests/ase_otf/flare_setup.py | smheidrich/flare | 5a18c1042a5767ebb8dc20ac59a17df6f1bcad77 | [
"MIT"
] | null | null | null | tests/ase_otf/flare_setup.py | smheidrich/flare | 5a18c1042a5767ebb8dc20ac59a17df6f1bcad77 | [
"MIT"
] | null | null | null | import numpy as np
from flare import otf, kernels
from flare.gp import GaussianProcess
from flare.mgp.mgp import MappedGaussianProcess
from flare.ase.calculator import FLARE_Calculator
import flare.mc_simple as mc_simple
# ---------- create gaussian process model -------------------
kernel = mc_simple.two_plus_three_... | 37.37037 | 78 | 0.613974 |
6c44ce8abc8da9b0b0f5d812f4bc71a653b9788a | 3,710 | py | Python | azure_usage/tests/test_totals.py | alan-turing-institute/azure_usage_v1 | ca8a32ec822396aac041f988ab8da6a65b794f0a | [
"MIT"
] | 5 | 2020-02-12T14:58:01.000Z | 2021-12-17T10:50:58.000Z | azure_usage/tests/test_totals.py | alan-turing-institute/azure_usage_v1 | ca8a32ec822396aac041f988ab8da6a65b794f0a | [
"MIT"
] | 8 | 2020-02-25T11:38:54.000Z | 2022-03-12T00:14:51.000Z | azure_usage/tests/test_totals.py | alan-turing-institute/azure_usage_v1 | ca8a32ec822396aac041f988ab8da6a65b794f0a | [
"MIT"
] | null | null | null | """
test totals
Author: Tomas Lazauskas
"""
import os
import pandas as pd
from ..src_webapp.totals import (
group_day,
group_year_month,
group_sub_year_month,
)
from ..src_webapp.data_loader import create_dataframe
from ..src_webapp.constants import (
CONST_COL_NAME_COST,
CONST_COL_NAME_DATE,
... | 25.238095 | 74 | 0.583558 |
7f7fd447007861f3fa20e700a3618d6f3a7ad3f1 | 20 | py | Python | interpreter/__builtins__/__init__.py | skantar-modoolar/githubrepo | 7a5954dc6383a3c3219bc75c009dde1b2422ec29 | [
"MIT"
] | 31 | 2018-02-23T20:14:40.000Z | 2022-02-13T09:39:41.000Z | interpreter/__builtins__/__init__.py | skantar-modoolar/githubrepo | 7a5954dc6383a3c3219bc75c009dde1b2422ec29 | [
"MIT"
] | null | null | null | interpreter/__builtins__/__init__.py | skantar-modoolar/githubrepo | 7a5954dc6383a3c3219bc75c009dde1b2422ec29 | [
"MIT"
] | 12 | 2017-12-24T22:31:16.000Z | 2022-01-27T13:49:43.000Z | from . import stdio
| 10 | 19 | 0.75 |
ce6887f3257183ff8a7e847f8791a1346cd272ff | 669 | py | Python | src/labster/auth.py | jean3108/labandco | 4317e7d3875f10d76076ad5fc68c1ba3c12badba | [
"Apache-2.0"
] | null | null | null | src/labster/auth.py | jean3108/labandco | 4317e7d3875f10d76076ad5fc68c1ba3c12badba | [
"Apache-2.0"
] | null | null | null | src/labster/auth.py | jean3108/labandco | 4317e7d3875f10d76076ad5fc68c1ba3c12badba | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from typing import TYPE_CHECKING, Optional
from flask import g
from labster.domain2.model.profile import Profile as NewProfile
if TYPE_CHECKING:
from labster.security import User
class AuthContext:
@property
def current_user(self) -> User:
try:
re... | 23.068966 | 63 | 0.681614 |
f312a1f36f0ebbf8a13e5b5a7d3e2672d4c545d0 | 672 | py | Python | trade/migrations/0002_auto_20180731_1736.py | okboy32/beenquick-django | 17b35bf07a995df0478f54068759cce7fe30fdb3 | [
"MIT"
] | 3 | 2018-08-03T08:11:58.000Z | 2020-02-20T15:26:40.000Z | trade/migrations/0002_auto_20180731_1736.py | okboy32/beenquick-django | 17b35bf07a995df0478f54068759cce7fe30fdb3 | [
"MIT"
] | null | null | null | trade/migrations/0002_auto_20180731_1736.py | okboy32/beenquick-django | 17b35bf07a995df0478f54068759cce7fe30fdb3 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.5 on 2018-07-31 17:36
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('trade', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='ordergoods',
... | 26.88 | 124 | 0.613095 |
7f0a647a548f8674d3711c7eb2058b63f447fb7c | 988 | py | Python | src/zope/testrunner/layer.py | jamesjer/zope.testrunner | af8bfec49d90613633b76e914a6f54884463ba94 | [
"ZPL-2.1"
] | 1 | 2021-03-05T17:27:37.000Z | 2021-03-05T17:27:37.000Z | src/zope/testrunner/layer.py | jamesjer/zope.testrunner | af8bfec49d90613633b76e914a6f54884463ba94 | [
"ZPL-2.1"
] | 91 | 2015-01-12T05:27:27.000Z | 2022-03-07T07:03:09.000Z | src/zope/testrunner/layer.py | jamesjer/zope.testrunner | af8bfec49d90613633b76e914a6f54884463ba94 | [
"ZPL-2.1"
] | 14 | 2015-04-03T09:53:36.000Z | 2021-05-10T15:51:53.000Z | ##############################################################################
#
# Copyright (c) 2004-2008 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THI... | 29.058824 | 78 | 0.607287 |
1a39b544a6206765366db108e1f005b90a3bb339 | 7,130 | py | Python | parlai/crowdsourcing/tasks/acute_eval/util.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 552 | 2020-09-24T18:16:09.000Z | 2022-03-25T06:21:55.000Z | parlai/crowdsourcing/tasks/acute_eval/util.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 722 | 2020-09-24T19:48:44.000Z | 2022-03-31T17:42:41.000Z | parlai/crowdsourcing/tasks/acute_eval/util.py | zl930216/ParlAI | abf0ad6d1779af0f8ce0b5aed00d2bab71416684 | [
"MIT"
] | 442 | 2020-09-24T14:24:21.000Z | 2022-03-25T10:40:16.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import hashlib
import os
from typing import Iterable, List, Tuple, Union
import pandas as pd
from pytest_regressions.da... | 35.123153 | 101 | 0.665638 |
90ab85d3c57734b11af95d599ded8f3b31bbfb12 | 2,168 | py | Python | supervisely/filter_data_test.py | Lascarfo/kaggle-landmark-recognition-2020-1st-place | f9007d81e59ecd1311bdea5586a426b8973a2eb8 | [
"MIT"
] | null | null | null | supervisely/filter_data_test.py | Lascarfo/kaggle-landmark-recognition-2020-1st-place | f9007d81e59ecd1311bdea5586a426b8973a2eb8 | [
"MIT"
] | null | null | null | supervisely/filter_data_test.py | Lascarfo/kaggle-landmark-recognition-2020-1st-place | f9007d81e59ecd1311bdea5586a426b8973a2eb8 | [
"MIT"
] | null | null | null | import os
from tqdm import tqdm
def get_existed_files_names(src_dir, extensions):
files_names = []
for root, dirs, files in os.walk(src_dir):
for extension in extensions:
for file in files:
if file.endswith(extension):
file_name = file.split('.')[0]
... | 27.443038 | 101 | 0.65452 |
3416d9dcadc040461709cc9f07d5f449a13b728a | 4,191 | py | Python | backend/tests/conftest.py | cjc7373/hackergame | 86971b4cf8a2761044d417b4c8bd934c3309d6fd | [
"MIT"
] | 2 | 2020-07-12T13:11:43.000Z | 2020-07-14T08:12:17.000Z | backend/tests/conftest.py | cjc7373/hackergame | 86971b4cf8a2761044d417b4c8bd934c3309d6fd | [
"MIT"
] | 1 | 2020-08-13T13:56:18.000Z | 2020-09-29T12:39:08.000Z | backend/tests/conftest.py | cjc7373/hackergame | 86971b4cf8a2761044d417b4c8bd934c3309d6fd | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
import pytz
import pytest
from rest_framework.test import APIClient
from user.models import User, Term
from group.models import Group, Application
from contest.models import Stage
from challenge.models import Challenge, SubChallenge, ExprFlag
from submission.models import Subm... | 25.554878 | 100 | 0.694345 |
98b6f735017c2e7a4e3028ace4c11c4ce72e7f4b | 131 | py | Python | lib/pyfrc/sim/__init__.py | VikingRobotics/pyfrc | 8db0f778586684cc6477a4c0b9600621a1a6a78f | [
"MIT"
] | 1 | 2015-12-23T04:25:19.000Z | 2015-12-23T04:25:19.000Z | lib/pyfrc/sim/__init__.py | VikingRobotics/pyfrc | 8db0f778586684cc6477a4c0b9600621a1a6a78f | [
"MIT"
] | null | null | null | lib/pyfrc/sim/__init__.py | VikingRobotics/pyfrc | 8db0f778586684cc6477a4c0b9600621a1a6a78f | [
"MIT"
] | null | null | null |
from . import sim_wpilib
from .sim_manager import SimManager
from .robot_controller import RobotController
from .ui import SimUI
| 18.714286 | 45 | 0.832061 |
2f106de620c336346fd8694af5b2245b9f252f75 | 14,776 | py | Python | dumbbell_CIFAR.py | epfml/byzantine-robust-decentralized-optimizer | 5387d600354a0fbf137c3e4346c4441b2f427407 | [
"MIT"
] | 2 | 2022-02-04T16:17:13.000Z | 2022-02-18T03:47:44.000Z | dumbbell_CIFAR.py | epfml/byzantine-robust-decentralized-optimizer | 5387d600354a0fbf137c3e4346c4441b2f427407 | [
"MIT"
] | null | null | null | dumbbell_CIFAR.py | epfml/byzantine-robust-decentralized-optimizer | 5387d600354a0fbf137c3e4346c4441b2f427407 | [
"MIT"
] | null | null | null | import os
import sys
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import torch
import numpy as np
import codes.graph_utils as gu
from codes.simulator import ByzantineWorker, DummyDecentralizedTrainer
from codes.utils import filter_entries_from_json
from codes.attacks import get_attackers
f... | 34.849057 | 113 | 0.495466 |
b9e1a25750f4ab76d0adcf597038501dd7a91862 | 639 | py | Python | bkrv/main/modelsAI/SVM.py | vuduc153/Restaurants-Review-Django | 08caf2fde8f169436de916ad73a037b891e6735d | [
"MIT"
] | null | null | null | bkrv/main/modelsAI/SVM.py | vuduc153/Restaurants-Review-Django | 08caf2fde8f169436de916ad73a037b891e6735d | [
"MIT"
] | 8 | 2019-06-22T09:20:38.000Z | 2022-02-10T11:35:45.000Z | bkrv/main/modelsAI/SVM.py | vuduc153/Restaurants-Review-Django | 08caf2fde8f169436de916ad73a037b891e6735d | [
"MIT"
] | null | null | null | import pandas as pd
from sklearn import svm
from .TfidfProcess import TfidfProcess
from .ModelController import ModelController
def create_model():
data = pd.read_csv('main/data/spam_or_not_spam.csv')
# remove empty line
data.dropna(inplace=True, how='any')
# learn the vocabulary from data and s... | 29.045455 | 59 | 0.735524 |
f7925f2cabf28b29bae4935920db3014bb1f8138 | 1,975 | py | Python | fastestimator/op/numpyop/univariate/expand_dims.py | gaurav272333/fastestimator | d49e48d7375e19416ef337b3517dcfe42bb56589 | [
"Apache-2.0"
] | null | null | null | fastestimator/op/numpyop/univariate/expand_dims.py | gaurav272333/fastestimator | d49e48d7375e19416ef337b3517dcfe42bb56589 | [
"Apache-2.0"
] | null | null | null | fastestimator/op/numpyop/univariate/expand_dims.py | gaurav272333/fastestimator | d49e48d7375e19416ef337b3517dcfe42bb56589 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The FastEstimator 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 appl... | 42.934783 | 120 | 0.653671 |
ae918ec657c73b87e402df1e1354959b7a4e0def | 88 | py | Python | scripts/train-db-dbfs.py | Azure/AMLPipelines | 405f9405049d86638f8eb7fdcb32dd9704bb117e | [
"MIT"
] | 3 | 2020-05-20T12:42:11.000Z | 2020-12-17T20:36:12.000Z | scripts/train-db-dbfs.py | Azure/AMLPipelines | 405f9405049d86638f8eb7fdcb32dd9704bb117e | [
"MIT"
] | null | null | null | scripts/train-db-dbfs.py | Azure/AMLPipelines | 405f9405049d86638f8eb7fdcb32dd9704bb117e | [
"MIT"
] | 6 | 2019-02-19T21:58:35.000Z | 2021-02-20T08:43:57.000Z | print("In train.py")
print("As a data scientist, this is where I use my training code.") | 44 | 67 | 0.727273 |
1db69df90ed4003c87774ded048435f8f753dc39 | 4,702 | py | Python | all/agents/vpg.py | ezelikman/autonomous-learning-library | b32d059ca8b191afe0b310102d0754796f391aff | [
"MIT"
] | 1 | 2021-01-08T01:41:34.000Z | 2021-01-08T01:41:34.000Z | all/agents/vpg.py | sadiakhaf/autonomous-learning-library | 9c44d41826aec49f9ecba43093551219f9f39408 | [
"MIT"
] | null | null | null | all/agents/vpg.py | sadiakhaf/autonomous-learning-library | 9c44d41826aec49f9ecba43093551219f9f39408 | [
"MIT"
] | null | null | null | import torch
from torch.nn.functional import mse_loss
from all.core import State
from ._agent import Agent
class VPG(Agent):
'''
Vanilla Policy Gradient (VPG/REINFORCE).
VPG (also known as REINFORCE) is the least biased implementation of the policy gradient theorem.
It uses complete episode rollouts as... | 35.89313 | 101 | 0.640153 |
0ceadd4c6b0c181851e170336864f2e1ba0b584b | 678 | py | Python | deploy code Django/Liver dis prediction/liverdiseaseprediction/manage.py | Saiful1721648/Liver-Disease-Prediction | 648086835042b0b2b64b1c095351155b46ca9ccb | [
"Apache-2.0"
] | null | null | null | deploy code Django/Liver dis prediction/liverdiseaseprediction/manage.py | Saiful1721648/Liver-Disease-Prediction | 648086835042b0b2b64b1c095351155b46ca9ccb | [
"Apache-2.0"
] | null | null | null | deploy code Django/Liver dis prediction/liverdiseaseprediction/manage.py | Saiful1721648/Liver-Disease-Prediction | 648086835042b0b2b64b1c095351155b46ca9ccb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'liverdiseaseprediction.settings')
try:
from django.core.management import execute_from_command_line
... | 29.478261 | 86 | 0.685841 |
8bff510e3f3eea1d6728d978c6fd0fc0aaa9126c | 2,691 | py | Python | scripts/experimental/testing.py | bhillmann/hexalys | c6c102b90e2684f1c85992eaae6325b8be0c8aa6 | [
"MIT"
] | null | null | null | scripts/experimental/testing.py | bhillmann/hexalys | c6c102b90e2684f1c85992eaae6325b8be0c8aa6 | [
"MIT"
] | null | null | null | scripts/experimental/testing.py | bhillmann/hexalys | c6c102b90e2684f1c85992eaae6325b8be0c8aa6 | [
"MIT"
] | null | null | null | # By Nick Erickson
# Visualizing Data Testing
import numpy as np
from param_const import hex_base_a3c
from agents import models
from agents.a3c.agent_a3c import Agent as Agent_a3c
from utils.data_utils import load_memory_v2
def zca_whitening_matrix(X):
"""
Function to compute ZCA whitening matrix (aka Mahal... | 25.628571 | 83 | 0.658863 |
65d0a322643566ce2abaff12638f7a65556592f6 | 11,393 | py | Python | fanuc/fanuc_pcdk_client.py | uoguelph-ri/undergrad-labs | e510d945fc615b69552bef3a184a5c3bdb059395 | [
"Apache-2.0"
] | 3 | 2018-09-17T16:37:27.000Z | 2019-04-15T14:42:27.000Z | fanuc/fanuc_pcdk_client.py | uoguelph-ri/undergrad-labs | e510d945fc615b69552bef3a184a5c3bdb059395 | [
"Apache-2.0"
] | null | null | null | fanuc/fanuc_pcdk_client.py | uoguelph-ri/undergrad-labs | e510d945fc615b69552bef3a184a5c3bdb059395 | [
"Apache-2.0"
] | 6 | 2018-10-25T15:10:28.000Z | 2021-10-03T19:34:00.000Z | import socket
from time import sleep
from colorama import Fore, Style # Adds colour to console output
from robot_loc_world import RobotLocWorld
from robot_loc_joint import RobotLocJoint
SERVER_IP = "192.168.1.1"
ROBOT_IP = "192.168.1.100"
TCP_PORT = 64555
ROBOT_MOTION_DELAY = 0.1
class FanucPCDKClient:
"""Establi... | 41.886029 | 149 | 0.602914 |
649c57331d27db4859c97c4a704b4c100f82ecd5 | 505 | py | Python | source/code/programs/example_tests/py_network/block_network_test.py | luxe/CodeLang-compiler | 78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a | [
"MIT"
] | 1 | 2019-01-06T08:45:46.000Z | 2019-01-06T08:45:46.000Z | source/code/programs/example_tests/py_network/block_network_test.py | luxe/CodeLang-compiler | 78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a | [
"MIT"
] | 264 | 2015-11-30T08:34:00.000Z | 2018-06-26T02:28:41.000Z | source/code/programs/example_tests/py_network/block_network_test.py | UniLang/compiler | c338ee92994600af801033a37dfb2f1a0c9ca897 | [
"MIT"
] | null | null | null | import socket
import unittest
class IsolatedNetworkTest(unittest.TestCase):
def test_listen(self):
# Use a fixed port
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
serversocket.bind((socket.gethostname(), 9999))
# Wait for 5 seconds with the port open
ser... | 28.055556 | 72 | 0.675248 |
3b9faf565558a1df6837f883c4af01c1961579e5 | 4,806 | py | Python | centersnap/utils.py | ibaiGorordo/ONNX-CenterSnap-6D-Pose-and-Shape-Estimation | f8f98b08cce5259348616db4150064d713f17445 | [
"MIT"
] | 13 | 2022-03-19T14:42:50.000Z | 2022-03-31T14:04:31.000Z | centersnap/utils.py | ibaiGorordo/ONNX-CenterSnap-6D-Pose-and-Shape-Estimation | f8f98b08cce5259348616db4150064d713f17445 | [
"MIT"
] | null | null | null | centersnap/utils.py | ibaiGorordo/ONNX-CenterSnap-6D-Pose-and-Shape-Estimation | f8f98b08cce5259348616db4150064d713f17445 | [
"MIT"
] | 1 | 2022-03-24T12:56:25.000Z | 2022-03-24T12:56:25.000Z | import numpy as np
import cv2
import open3d as o3d
from .original_repo_utils import *
np.random.seed(3)
MAX_CLASS_NUM = 100 # In the original model there are only 7 classes
segmenation_colors = np.random.randint(0, 255, (MAX_CLASS_NUM, 3)).astype("uint8")
def util_draw_seg(seg_map, image, alpha = 0.5):
# Convert... | 28.105263 | 97 | 0.740117 |
93ac73a03917200bbf963e0ef531eb6d690da0ba | 11,360 | py | Python | WDL/Walker.py | kinow/miniwdl | 0463f5a418974691562085f2ff1bfe4b4a411aa0 | [
"MIT"
] | 2 | 2020-04-29T22:16:04.000Z | 2020-11-16T16:55:11.000Z | WDL/Walker.py | kinow/miniwdl | 0463f5a418974691562085f2ff1bfe4b4a411aa0 | [
"MIT"
] | 1 | 2020-04-27T07:24:42.000Z | 2020-04-27T07:24:42.000Z | WDL/Walker.py | kinow/miniwdl | 0463f5a418974691562085f2ff1bfe4b4a411aa0 | [
"MIT"
] | 4 | 2020-03-30T12:37:19.000Z | 2021-09-09T15:16:06.000Z | # pylint: disable=assignment-from-no-return
from typing import Any, List, Optional
from . import Error, Expr, Tree, Type
class Base:
"""
Helper base class for traversing the WDL abstract syntax tree. When called
on a node, invokes the appropriate method (document, workflow, call,
scatter, conditional,... | 32.927536 | 101 | 0.60669 |
07a1c3e5f81f0a1cb725d78fe4a263565fb9499d | 2,239 | py | Python | tests/models/programdb/mission/conftest.py | weibullguy/ramstk | 3ec41d7e2933045a7a8028aed6c6b04365495095 | [
"BSD-3-Clause"
] | 4 | 2018-08-26T09:11:36.000Z | 2019-05-24T12:01:02.000Z | tests/models/programdb/mission/conftest.py | weibullguy/ramstk | 3ec41d7e2933045a7a8028aed6c6b04365495095 | [
"BSD-3-Clause"
] | 52 | 2018-08-24T12:51:22.000Z | 2020-12-28T04:59:42.000Z | tests/models/programdb/mission/conftest.py | weibullguy/ramstk | 3ec41d7e2933045a7a8028aed6c6b04365495095 | [
"BSD-3-Clause"
] | 1 | 2018-10-11T07:57:55.000Z | 2018-10-11T07:57:55.000Z | # -*- coding: utf-8 -*-
#
# tests.models.programdb.mission.conftest.py is part of The RAMSTK Project
#
# All rights reserved.
# Copyright since 2007 Doyle "weibullguy" Rowland doyle.rowland <AT> reliaqual <DOT> com
"""The RAMSTK Mission module test fixtures."""
# Third Party Imports
import pytest
from pubsub imp... | 29.077922 | 88 | 0.711478 |
2d4834e34ac0ec1cc558d678a7f97d4b6ff79661 | 9,944 | py | Python | app/recipe/tests/test_recipe_api.py | ProgramSKAN/Django-Recipe-RESTAPI | d19618424575c2db2a46d7771eabac4d9fb3d5c5 | [
"MIT"
] | null | null | null | app/recipe/tests/test_recipe_api.py | ProgramSKAN/Django-Recipe-RESTAPI | d19618424575c2db2a46d7771eabac4d9fb3d5c5 | [
"MIT"
] | null | null | null | app/recipe/tests/test_recipe_api.py | ProgramSKAN/Django-Recipe-RESTAPI | d19618424575c2db2a46d7771eabac4d9fb3d5c5 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Recipe, Tag, Ingredient
from recipe.serializers import RecipeSerializer, RecipeDetailSerializer
import t... | 35.014085 | 85 | 0.643906 |
fcc58e4492944852cfd90fbcf8fa55a2aaff2867 | 545 | py | Python | mlp/mlp_model.py | sudarshan85/imminent-adm-mimic | e92912cfa3f4ceb5dc3d1abca7828c3925824c75 | [
"Apache-2.0"
] | 2 | 2019-09-14T20:14:34.000Z | 2019-12-07T12:24:24.000Z | mlp/mlp_model.py | sudarshan85/imminent-adm-mimic | e92912cfa3f4ceb5dc3d1abca7828c3925824c75 | [
"Apache-2.0"
] | null | null | null | mlp/mlp_model.py | sudarshan85/imminent-adm-mimic | e92912cfa3f4ceb5dc3d1abca7828c3925824c75 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import torch
from torch import nn
class MLPModel(nn.Module):
def __init__(self, vocab_sz, hidden_dim, dropout_p):
super(MLPModel, self).__init__()
self.fc1 = nn.Linear(in_features=vocab_sz, out_features=hidden_dim)
self.relu = nn.ReLU()
self.dropout = nn.Dropout(dropout_p)... | 25.952381 | 71 | 0.693578 |
39e2d525ed061ba15f6cf7bf2f3436a8ea99c7f3 | 30 | py | Python | django_loggable_util/__init__.py | Ruhshan/django-loggable-util | d9428c863f53ab31833d32bb8e20e37a31911af4 | [
"MIT"
] | 1 | 2020-08-17T13:12:09.000Z | 2020-08-17T13:12:09.000Z | django_loggable_util/__init__.py | Ruhshan/django-loggable-util | d9428c863f53ab31833d32bb8e20e37a31911af4 | [
"MIT"
] | null | null | null | django_loggable_util/__init__.py | Ruhshan/django-loggable-util | d9428c863f53ab31833d32bb8e20e37a31911af4 | [
"MIT"
] | null | null | null | from .loggable import Loggable | 30 | 30 | 0.866667 |
424f0235d5231e41dbd1af18085cce6dba1c829b | 332 | py | Python | test/example_stochastic.py | alanmatzumiya/Maestria | c5e2a019312fb8f9bc193b04b07b7815e6ed4032 | [
"MIT"
] | 5 | 2020-12-29T10:44:02.000Z | 2022-03-12T11:18:45.000Z | test/example_stochastic.py | alanmatzumiya/spectral-methods | c5e2a019312fb8f9bc193b04b07b7815e6ed4032 | [
"MIT"
] | null | null | null | test/example_stochastic.py | alanmatzumiya/spectral-methods | c5e2a019312fb8f9bc193b04b07b7815e6ed4032 | [
"MIT"
] | 1 | 2022-03-04T13:29:56.000Z | 2022-03-04T13:29:56.000Z | from pySpectralPDE import spectralSPDE
import numpy as np
def u0(x):
return np.sin(np.pi * x)
t = np.linspace(0, 10, 512)
x = np.linspace(0, 1, 256)
params = {"nu": 0.1, "N": int(5), "M": int(11), "x": x, "t": t}
sol = spectralSPDE.setup_solver(u0=u0, params=params)
sol.get_data
sol.plot
sol.u0_approx
so... | 20.75 | 63 | 0.64759 |
0f5f321f5bfca97a1c529c4bb59a13bb3b8dd144 | 6,986 | py | Python | src/digitalio.py | timonsku/Adafruit_Blinka | f118a92cca62ce29f669d170648e03839f82e401 | [
"MIT"
] | null | null | null | src/digitalio.py | timonsku/Adafruit_Blinka | f118a92cca62ce29f669d170648e03839f82e401 | [
"MIT"
] | null | null | null | src/digitalio.py | timonsku/Adafruit_Blinka | f118a92cca62ce29f669d170648e03839f82e401 | [
"MIT"
] | null | null | null | """
`digitalio` - Digital input and output control (GPIO)
=====================================================
See `CircuitPython:digitalio` in CircuitPython for more details.
* Author(s): cefn
"""
from adafruit_blinka.agnostic import board_id, detector
# pylint: disable=ungrouped-imports,wrong-import-position
if... | 32.493023 | 76 | 0.697824 |
0f7d3033750ecfe94ddc09e87e903684c7c3b90d | 540 | py | Python | src/moz_books/rakuten/rakuten_service.py | yukkun007/mmbooks | 4a05951ee30e33295b1b4c0b578f02ad6a4a20a5 | [
"MIT"
] | null | null | null | src/moz_books/rakuten/rakuten_service.py | yukkun007/mmbooks | 4a05951ee30e33295b1b4c0b578f02ad6a4a20a5 | [
"MIT"
] | 41 | 2021-10-08T05:55:21.000Z | 2022-03-28T23:14:22.000Z | src/moz_books/rakuten/rakuten_service.py | mozkzki/moz-books | 75fd44041ea8cb4cfe283fa5452443dbaaa4d732 | [
"MIT"
] | null | null | null | from moz_books.rakuten.rakuten_book_factory import RakutenBookFactory
from moz_books.rakuten.rakuten_request_params_factory import RakutenRequestParamsFactory
from moz_books.service import Service
class RakutenService(Service):
RAKUTEN_BASE_URL = "https://app.rakuten.co.jp/services/api/BooksBook/Search/20170404"
... | 33.75 | 89 | 0.738889 |
afbfd62c9dbd293901afe4168d50ede88f0f2d0c | 11,729 | py | Python | lib/kubernetes/client/models/extensions_v1beta1_deployment_status.py | splunkenizer/splunk_as_a_service_app | 97c4aaf927d2171bf131126cf9b70489ac75bc5a | [
"Apache-2.0"
] | 7 | 2019-12-21T00:14:14.000Z | 2021-03-11T14:51:37.000Z | lib/kubernetes/client/models/extensions_v1beta1_deployment_status.py | splunkenizer/splunk_as_a_service_app | 97c4aaf927d2171bf131126cf9b70489ac75bc5a | [
"Apache-2.0"
] | 29 | 2019-10-09T11:16:21.000Z | 2020-06-23T09:32:09.000Z | lib/kubernetes/client/models/extensions_v1beta1_deployment_status.py | splunkenizer/splunk_as_a_service_app | 97c4aaf927d2171bf131126cf9b70489ac75bc5a | [
"Apache-2.0"
] | 1 | 2021-05-07T10:13:31.000Z | 2021-05-07T10:13:31.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteri... | 36.312693 | 284 | 0.648819 |
578d6f5c0610e6cdb60a946c67a679c73c27ba44 | 102 | py | Python | ommle/__init__.py | maminus/ommle | aca678b17067e8867c169b0916631a918682f911 | [
"Apache-2.0"
] | null | null | null | ommle/__init__.py | maminus/ommle | aca678b17067e8867c169b0916631a918682f911 | [
"Apache-2.0"
] | null | null | null | ommle/__init__.py | maminus/ommle | aca678b17067e8867c169b0916631a918682f911 | [
"Apache-2.0"
] | null | null | null | from ommle.extractor import add_middle_outputs
__version__ = '1.0.0'
__all__ = [add_middle_outputs]
| 17 | 46 | 0.794118 |
217de04e91cb24e694c3f2ca03bb22b5a07fa284 | 1,012 | py | Python | lhotse/bin/modes/recipes/cslu_kids.py | pzelasko/lhotse | 41984467d2ead1dc69f418638b969e46f63308c7 | [
"Apache-2.0"
] | 64 | 2020-04-27T14:55:15.000Z | 2020-10-25T06:57:56.000Z | lhotse/bin/modes/recipes/cslu_kids.py | pzelasko/lhotse | 41984467d2ead1dc69f418638b969e46f63308c7 | [
"Apache-2.0"
] | 85 | 2020-04-26T06:29:47.000Z | 2020-10-19T20:28:52.000Z | lhotse/bin/modes/recipes/cslu_kids.py | pzelasko/lhotse | 41984467d2ead1dc69f418638b969e46f63308c7 | [
"Apache-2.0"
] | 17 | 2020-06-19T06:26:33.000Z | 2020-10-12T15:19:15.000Z | from typing import Optional
import click
from lhotse.bin.modes import prepare
from lhotse.recipes.cslu_kids import prepare_cslu_kids
from lhotse.utils import Pathlike
__all__ = ["cslu_kids"]
@prepare.command(context_settings=dict(show_default=True))
@click.argument("corpus_dir", type=click.Path(exists=True, dir_ok... | 25.3 | 78 | 0.710474 |
1ce3a8944ce747b7a287f121cb8c67acbf03b7b7 | 2,548 | py | Python | tests/test_folders.py | mkalioby/imap_tools | 00f585e99e62f16dbe47f41f6293cb80ee360706 | [
"Apache-2.0"
] | null | null | null | tests/test_folders.py | mkalioby/imap_tools | 00f585e99e62f16dbe47f41f6293cb80ee360706 | [
"Apache-2.0"
] | null | null | null | tests/test_folders.py | mkalioby/imap_tools | 00f585e99e62f16dbe47f41f6293cb80ee360706 | [
"Apache-2.0"
] | null | null | null | import unittest
from tests.utils import MailboxTestCase, test_mailbox_name_set, get_test_mailbox
class FoldersTest(MailboxTestCase):
@classmethod
def setUpClass(cls):
# delete temp new folders
for test_mailbox_name in test_mailbox_name_set:
mailbox = get_test_mailbox(test_mailbox_... | 45.5 | 98 | 0.64168 |
bea005b78c3cbef0d640b35d3da8a4dadb80ac54 | 3,256 | py | Python | tests/conftest.py | mstute/py-setproctitle | 6929a0544edc33eee9662bc03ec7d7473ddeffde | [
"BSD-3-Clause"
] | 365 | 2015-01-17T19:23:51.000Z | 2022-03-29T07:38:41.000Z | tests/conftest.py | mstute/py-setproctitle | 6929a0544edc33eee9662bc03ec7d7473ddeffde | [
"BSD-3-Clause"
] | 63 | 2015-03-13T11:38:53.000Z | 2022-03-16T19:04:05.000Z | tests/conftest.py | mstute/py-setproctitle | 6929a0544edc33eee9662bc03ec7d7473ddeffde | [
"BSD-3-Clause"
] | 57 | 2015-06-24T22:16:33.000Z | 2022-02-12T04:46:36.000Z | import os
import sys
import subprocess as sp
import pytest
def pytest_configure(config):
config.addinivalue_line(
"markers", "embedded: the test create an embedded executable"
)
@pytest.fixture(scope="session")
def pyrun(pyconfig):
"""
Build the pyrun executable and return its path
"""
... | 25.046154 | 76 | 0.614251 |
7e97824ee5b1f5c81167fbaa36b5f185da7611bb | 6,113 | py | Python | CTFd/plugins/__init__.py | mbraha/CTFd | b3987f7eadc182b1112507f7a995ce7fefb61cb4 | [
"Apache-2.0"
] | 2 | 2020-05-10T15:46:49.000Z | 2020-06-02T20:36:04.000Z | CTFd/plugins/__init__.py | mbraha/CTFd | b3987f7eadc182b1112507f7a995ce7fefb61cb4 | [
"Apache-2.0"
] | 3 | 2021-03-11T00:50:06.000Z | 2022-02-10T23:13:17.000Z | CTFd/plugins/__init__.py | erseco/CTFd | a6a4906ab058b79bca7af48038fa7badc1744340 | [
"Apache-2.0"
] | 1 | 2020-12-08T11:09:52.000Z | 2020-12-08T11:09:52.000Z | import glob
import importlib
import os
from collections import namedtuple
from flask import current_app as app
from flask import send_file, send_from_directory
from CTFd.utils.config.pages import get_pages
from CTFd.utils.decorators import admins_only as admins_only_wrapper
from CTFd.utils.plugins import override_tem... | 31.510309 | 120 | 0.708654 |
7354616253ee6cc0169f7d1379fcb8dfa452550d | 7,028 | py | Python | reviewboard/webapi/resources/review_reply_screenshot_comment.py | davidt/reviewboard | 66b08d06aec9be921e737b99c5ab78acc8b7a6fe | [
"MIT"
] | 1 | 2017-01-16T09:39:15.000Z | 2017-01-16T09:39:15.000Z | reviewboard/webapi/resources/review_reply_screenshot_comment.py | davidt/reviewboard | 66b08d06aec9be921e737b99c5ab78acc8b7a6fe | [
"MIT"
] | 1 | 2019-08-20T03:39:45.000Z | 2019-08-20T03:39:45.000Z | reviewboard/webapi/resources/review_reply_screenshot_comment.py | davidt/reviewboard | 66b08d06aec9be921e737b99c5ab78acc8b7a6fe | [
"MIT"
] | 1 | 2018-01-15T19:13:49.000Z | 2018-01-15T19:13:49.000Z | from __future__ import unicode_literals
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Q
from djblets.util.decorators import augment_method_from
from djblets.webapi.decorators import (webapi_login_required,
webapi_response_errors,
... | 38.195652 | 79 | 0.641434 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.