hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a701782f758cc85d5f94ec6b1588d1c1ecf951b | 783 | py | Python | get_current_script_dir.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 117 | 2015-12-18T07:18:27.000Z | 2022-03-28T00:25:54.000Z | get_current_script_dir.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 8 | 2018-10-03T09:38:46.000Z | 2021-12-13T19:51:09.000Z | get_current_script_dir.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 28 | 2016-08-02T17:43:47.000Z | 2022-03-21T08:31:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# SOURCE: https://stackoverflow.com/a/22881871/5909792
import inspect
import os
import sys
def get_current_script_dir(follow_symlinks=True, normcase=False) -> str:
# py2exe, PyInstaller, cx_Freeze
if getattr(sys, 'frozen', False):
path = os.path.abspa... | 23.029412 | 72 | 0.683269 |
f690df4c5f8cc0ba9491256bfc6c193fa680857b | 979 | py | Python | tools/leetcode.138.Copy List with Random Pointer/leetcode.138.Copy List with Random Pointer.submission0.py | tedye/leetcode | 975d7e3b8cb9b6be9e80e07febf4bcf6414acd46 | [
"MIT"
] | 4 | 2015-10-10T00:30:55.000Z | 2020-07-27T19:45:54.000Z | tools/leetcode.138.Copy List with Random Pointer/leetcode.138.Copy List with Random Pointer.submission0.py | tedye/leetcode | 975d7e3b8cb9b6be9e80e07febf4bcf6414acd46 | [
"MIT"
] | null | null | null | tools/leetcode.138.Copy List with Random Pointer/leetcode.138.Copy List with Random Pointer.submission0.py | tedye/leetcode | 975d7e3b8cb9b6be9e80e07febf4bcf6414acd46 | [
"MIT"
] | null | null | null | # Definition for singly-linked list with a random pointer.
# class RandomListNode(object):
# def __init__(self, x):
# self.label = x
# self.next = None
# self.random = None
class Solution(object):
def copyRandomList(self, head):
"""
:type head: RandomListNode
:rt... | 979 | 979 | 0.501532 |
427aaf28a4727ba9cfe8c464226c3cef834da303 | 35,458 | py | Python | brick/brick/initiator/connector.py | vmthunder/packages | e530e243007a0f403cad1b67a490ffb9687969c3 | [
"Apache-2.0"
] | 2 | 2015-03-15T11:12:53.000Z | 2018-10-12T03:05:52.000Z | brick/brick/initiator/connector.py | vmthunder/packages | e530e243007a0f403cad1b67a490ffb9687969c3 | [
"Apache-2.0"
] | null | null | null | brick/brick/initiator/connector.py | vmthunder/packages | e530e243007a0f403cad1b67a490ffb9687969c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 OpenStack Foundation.
# 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... | 43.938042 | 80 | 0.542332 |
a10b25d555f12f4fde17193e93965077228945b2 | 136 | py | Python | ARC012/ARC012d.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | ARC012/ARC012d.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | ARC012/ARC012d.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | #ARC012d
def main():
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**6)
if __name__ == '__main__':
main() | 17 | 32 | 0.654412 |
c65c7eeabb3f2c952c48a5d2b876e3416fc808cb | 899 | py | Python | database/ipeds_demographic_dimension.py | jasonpcasey/public_comparative_data | 38ac9fdd42d89a9c742eee0c092484b7aad42837 | [
"MIT"
] | null | null | null | database/ipeds_demographic_dimension.py | jasonpcasey/public_comparative_data | 38ac9fdd42d89a9c742eee0c092484b7aad42837 | [
"MIT"
] | 56 | 2019-11-17T17:00:51.000Z | 2020-05-28T18:48:11.000Z | database/ipeds_demographic_dimension.py | jasonpcasey/public_comparative_data | 38ac9fdd42d89a9c742eee0c092484b7aad42837 | [
"MIT"
] | null | null | null | # coding=utf-8
from sqlalchemy import Column, String
from .base import Base
class IpedsDemographicDimension(Base):
""" map to a table name in db """
__tablename__ = "ipeds_demographic_dimension"
""" create columns """
demographic_key = Column(String(5), primary_key = True)
sex = Column(String(7)... | 29.966667 | 61 | 0.63515 |
3ba9c29634633dd166b5c256746a15be225b03f0 | 5,680 | py | Python | security_monkey/views/__init__.py | boladmin/security_monkey | c28592ffd518fa399527d26262683fc860c30eef | [
"Apache-2.0"
] | 4,258 | 2015-01-04T22:06:10.000Z | 2022-03-31T23:40:27.000Z | security_monkey/views/__init__.py | boladmin/security_monkey | c28592ffd518fa399527d26262683fc860c30eef | [
"Apache-2.0"
] | 1,013 | 2015-01-12T02:31:03.000Z | 2021-09-16T19:09:03.000Z | security_monkey/views/__init__.py | boladmin/security_monkey | c28592ffd518fa399527d26262683fc860c30eef | [
"Apache-2.0"
] | 965 | 2015-01-11T21:06:07.000Z | 2022-03-17T16:53:57.000Z | # Copyright 2014 Netflix, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 27.843137 | 110 | 0.648415 |
7853968a227ff42ec150ca7021fca2d76db928b9 | 3,600 | py | Python | server/src/test/unit/experiments/ud_logic/test_server.py | zstars/weblabdeusto | 09bd9d93d483671bca67ee5c70a9c412eb5d352f | [
"BSD-2-Clause"
] | null | null | null | server/src/test/unit/experiments/ud_logic/test_server.py | zstars/weblabdeusto | 09bd9d93d483671bca67ee5c70a9c412eb5d352f | [
"BSD-2-Clause"
] | null | null | null | server/src/test/unit/experiments/ud_logic/test_server.py | zstars/weblabdeusto | 09bd9d93d483671bca67ee5c70a9c412eb5d352f | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005 onwards University of Deusto
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
# This software consists of contributions made by many individuals,
# list... | 33.027523 | 90 | 0.674444 |
77500df6b40ef60f31309685353c2c6f35274f3b | 1,263 | py | Python | examples/experiments-output/echatzikyriakidis-2020-07-23T22-39-14-example-money-laundering-custom-folds-grid-search-cross-validation/example_money_laundering_custom_folds_grid_search_cross_validation.py | michav1510/skrobot | 08e686108ea75aeb6de4c8fd4c0c28c4f7986446 | [
"MIT"
] | null | null | null | examples/experiments-output/echatzikyriakidis-2020-07-23T22-39-14-example-money-laundering-custom-folds-grid-search-cross-validation/example_money_laundering_custom_folds_grid_search_cross_validation.py | michav1510/skrobot | 08e686108ea75aeb6de4c8fd4c0c28c4f7986446 | [
"MIT"
] | null | null | null | examples/experiments-output/echatzikyriakidis-2020-07-23T22-39-14-example-money-laundering-custom-folds-grid-search-cross-validation/example_money_laundering_custom_folds_grid_search_cross_validation.py | michav1510/skrobot | 08e686108ea75aeb6de4c8fd4c0c28c4f7986446 | [
"MIT"
] | null | null | null | from os import path
from sklearn.linear_model import LogisticRegression
from skrobot.core import Experiment
from skrobot.tasks import HyperParametersSearchCrossValidationTask
######### Initialization Code
random_seed = 42
lr_estimator = LogisticRegression(solver='liblinear', random_state=random_seed)
######### sk... | 40.741935 | 183 | 0.660333 |
cb63c7578ea33665f247a5347d7b419b1a524607 | 680 | py | Python | app/core/migrations/0002_tag.py | zenbo7/recipe-app-api | 21f1442704f8a15dc57bd150c5f970dde5b4b672 | [
"MIT"
] | null | null | null | app/core/migrations/0002_tag.py | zenbo7/recipe-app-api | 21f1442704f8a15dc57bd150c5f970dde5b4b672 | [
"MIT"
] | null | null | null | app/core/migrations/0002_tag.py | zenbo7/recipe-app-api | 21f1442704f8a15dc57bd150c5f970dde5b4b672 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2020-05-25 12:03
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 28.333333 | 118 | 0.616176 |
9db37a22c5060a7a13bc289d1912ea7c581bc79b | 812 | py | Python | discussion_board/discussion_board/urls.py | tmatsuzawa2/badger-buddy | a92adc51f32a8e65de109d32e59d6db5eea0055e | [
"MIT"
] | 1 | 2021-08-23T15:32:49.000Z | 2021-08-23T15:32:49.000Z | discussion_board/discussion_board/urls.py | Archana90663/badger-buddy | ceba081bb81467b0e5fa5ac1ea292be8d1724de6 | [
"MIT"
] | null | null | null | discussion_board/discussion_board/urls.py | Archana90663/badger-buddy | ceba081bb81467b0e5fa5ac1ea292be8d1724de6 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
# app_name = 'discussion_board'
urlpatterns = [
path('', views.index, name='board_index'),
path('create-post', views.create_post, name='create-post'),
path('create-reply/<int:post_id>', views.create_reply, name='create-reply'),
path('view-post/<int:post_... | 47.764706 | 81 | 0.683498 |
bc9262be8220a3181609eaf4cb858737b34046ad | 14,173 | py | Python | packages/syft/src/syft/core/node/common/action/smpc_action_functions.py | vishalbelsare/PySyft | fb04404fcfbef82fad1fb47407b35a24e9afb599 | [
"Apache-1.1"
] | 8,428 | 2017-08-10T09:17:49.000Z | 2022-03-31T08:20:14.000Z | packages/syft/src/syft/core/node/common/action/smpc_action_functions.py | vishalbelsare/PySyft | fb04404fcfbef82fad1fb47407b35a24e9afb599 | [
"Apache-1.1"
] | 4,779 | 2017-08-09T23:19:00.000Z | 2022-03-29T11:49:36.000Z | packages/syft/src/syft/core/node/common/action/smpc_action_functions.py | vishalbelsare/PySyft | fb04404fcfbef82fad1fb47407b35a24e9afb599 | [
"Apache-1.1"
] | 2,307 | 2017-08-10T08:52:12.000Z | 2022-03-30T05:36:07.000Z | # stdlib
from copy import deepcopy
import functools
import operator
from typing import Any
from typing import Callable
from typing import Dict
from typing import List
from typing import Optional
from uuid import UUID
# third party
import numpy as np
# relative
from ....common.uid import UID
from ....store.storeable_o... | 29.900844 | 116 | 0.603542 |
067b3c5eaf26d9676866e33024247a9604aa8c36 | 7,030 | py | Python | src/django-nonrel/tests/regressiontests/admin_inlines/tests.py | adamjmcgrath/glancydesign | 826ede7c639879d5b79ee730eb5e91422768cb02 | [
"BSD-3-Clause"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | tests/regressiontests/admin_inlines/tests.py | mradziej/django | 5d38965743a369981c9a738a298f467f854a2919 | [
"BSD-3-Clause"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | tests/regressiontests/admin_inlines/tests.py | mradziej/django | 5d38965743a369981c9a738a298f467f854a2919 | [
"BSD-3-Clause"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | from django.contrib.admin.helpers import InlineAdminForm
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
# local test models
from models import (Holder, Inner, InnerInline, Holder2, Inner2, Holder3,
Inner3, Person, OutfitItem, Fashionista, Teacher, Parent, Child)
class... | 44.493671 | 138 | 0.666714 |
ca31258fc2fe5c948ed5e59ce76123b41887a150 | 56,666 | py | Python | nova/tests/unit/virt/libvirt/test_blockinfo.py | gyliu513/nova | 14e974a5f77c72a9bb44c6801746abb2eda8e91d | [
"Apache-2.0"
] | 1 | 2016-07-18T22:05:01.000Z | 2016-07-18T22:05:01.000Z | nova/tests/unit/virt/libvirt/test_blockinfo.py | gyliu513/nova | 14e974a5f77c72a9bb44c6801746abb2eda8e91d | [
"Apache-2.0"
] | 1 | 2020-11-05T17:42:24.000Z | 2020-11-05T17:42:24.000Z | nova/tests/unit/virt/libvirt/test_blockinfo.py | Mattlk13/nova | 5b13eb59540aaf535a53920e783964d106de2620 | [
"Apache-2.0"
] | 1 | 2021-11-12T03:55:41.000Z | 2021-11-12T03:55:41.000Z | # Copyright 2010 OpenStack Foundation
# Copyright 2012 University Of Minho
#
# 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.... | 44.901743 | 79 | 0.501694 |
8d2d51c2fd960142e223101ba19d7118540e1389 | 7,157 | py | Python | src/reinforcement/agent.py | helenapoleri/reinforcement-filesystem | 3fb839c07563384adba4abdd0fec61ebf76a2530 | [
"BSD-2-Clause"
] | null | null | null | src/reinforcement/agent.py | helenapoleri/reinforcement-filesystem | 3fb839c07563384adba4abdd0fec61ebf76a2530 | [
"BSD-2-Clause"
] | null | null | null | src/reinforcement/agent.py | helenapoleri/reinforcement-filesystem | 3fb839c07563384adba4abdd0fec61ebf76a2530 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import tensorflow as tf
from config import *
from src.reinforcement.config import get_config
def variable_summaries(name, var, with_max_min=False):
"""Tensor summaries for TensorBoard visualization"""
with tf.name_scope(name):
mean = tf.reduce_mean(var)
... | 40.664773 | 162 | 0.668297 |
ec3aaff1c436ae6189e069a5faf8c12c849f85e6 | 5,370 | py | Python | bzt/modules/python/jmeter_functions.py | dreading/taurus | 9da510b783721fa8f66ba1032d1fdde10d9ae543 | [
"Apache-2.0"
] | 1 | 2019-01-15T17:23:58.000Z | 2019-01-15T17:23:58.000Z | bzt/modules/python/jmeter_functions.py | dreading/taurus | 9da510b783721fa8f66ba1032d1fdde10d9ae543 | [
"Apache-2.0"
] | null | null | null | bzt/modules/python/jmeter_functions.py | dreading/taurus | 9da510b783721fa8f66ba1032d1fdde10d9ae543 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2018 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | 28.716578 | 102 | 0.558287 |
e456e6559bc15559457638fd78feba71e0ce3b5f | 325 | py | Python | tradgram/users/migrations/0010_remove_user_push_token.py | didils/tradgram | 4868ca082ab78a1b5b96f25ee9f958567bd1bb1e | [
"MIT"
] | null | null | null | tradgram/users/migrations/0010_remove_user_push_token.py | didils/tradgram | 4868ca082ab78a1b5b96f25ee9f958567bd1bb1e | [
"MIT"
] | 4 | 2020-06-05T20:21:46.000Z | 2021-09-08T00:57:42.000Z | tradgram/users/migrations/0010_remove_user_push_token.py | didils/tradgram | 4868ca082ab78a1b5b96f25ee9f958567bd1bb1e | [
"MIT"
] | null | null | null | # Generated by Django 2.0.8 on 2019-03-31 09:06
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('users', '0009_user_push_token'),
]
operations = [
migrations.RemoveField(
model_name='user',
name='push_token',
),
... | 18.055556 | 47 | 0.587692 |
01ea93adf88e9ffa6fc03a5704c25387b208f983 | 22,673 | py | Python | zerver/lib/validator.py | BearerPipelineTest/zulip | 7e94e3b370e0889d3264e701ff1e15d2e351996f | [
"Apache-2.0"
] | 3 | 2021-09-12T05:05:28.000Z | 2021-12-30T09:45:20.000Z | zerver/lib/validator.py | BearerPipelineTest/zulip | 7e94e3b370e0889d3264e701ff1e15d2e351996f | [
"Apache-2.0"
] | null | null | null | zerver/lib/validator.py | BearerPipelineTest/zulip | 7e94e3b370e0889d3264e701ff1e15d2e351996f | [
"Apache-2.0"
] | null | null | null | """
This module sets up a scheme for validating that arbitrary Python
objects are correctly typed. It is totally decoupled from Django,
composable, easily wrapped, and easily extended.
A validator takes two parameters--var_name and val--and raises an
error if val is not the correct type. The var_name parameter is us... | 31.359613 | 107 | 0.623649 |
b5779a999effca5455900b714d337db91c7a9af3 | 2,451 | py | Python | peering_manager/urls.py | maznu/peering-manager | d249fcf530f4cc48b39429badb79bc203e0148ba | [
"Apache-2.0"
] | 127 | 2017-10-12T00:27:45.000Z | 2020-08-07T11:13:55.000Z | peering_manager/urls.py | maznu/peering-manager | d249fcf530f4cc48b39429badb79bc203e0148ba | [
"Apache-2.0"
] | 247 | 2017-12-26T12:55:34.000Z | 2020-08-08T11:57:35.000Z | peering_manager/urls.py | maznu/peering-manager | d249fcf530f4cc48b39429badb79bc203e0148ba | [
"Apache-2.0"
] | 63 | 2017-10-13T06:46:05.000Z | 2020-08-08T00:41:57.000Z | from django.conf import settings
from django.urls import include, path
from peering_manager.admin import admin_site
from peering_manager.api.views import (
APIRootView,
SpectacularAPIView,
SpectacularRedocView,
SpectacularSwaggerView,
StatusView,
)
from peering_manager.views import Home, SearchView... | 34.041667 | 86 | 0.656467 |
04a29870add385d10626d4ad4d6ee3ff6543d174 | 468 | py | Python | setupdocker.py | burgreen/proteus | 033bbd3fd0ff11d53d8e85b2da1af49e10af9c5d | [
"MIT"
] | null | null | null | setupdocker.py | burgreen/proteus | 033bbd3fd0ff11d53d8e85b2da1af49e10af9c5d | [
"MIT"
] | null | null | null | setupdocker.py | burgreen/proteus | 033bbd3fd0ff11d53d8e85b2da1af49e10af9c5d | [
"MIT"
] | null | null | null |
from subprocess import call
import os.path
source_dir = "/opt/proteus/"
target_dir = "/usr/local/work/"
if (not os.path.islink(target_dir + "stack")):
call(["ln", "-s", source_dir + "stack", target_dir + "stack"])
if (not os.path.islink(target_dir + "hashdist")):
call(["ln", "-s", source_dir + "hashdist",... | 26 | 73 | 0.634615 |
507e2ee7e59fffe07d0ccf91974d77d447b03f21 | 17,505 | py | Python | charge/repository.py | enitram/charge_assign | 8925855b1ce854c012930e141bb3c16537d6996d | [
"Apache-2.0"
] | 1 | 2021-10-30T05:02:46.000Z | 2021-10-30T05:02:46.000Z | charge/repository.py | enitram/charge_assign | 8925855b1ce854c012930e141bb3c16537d6996d | [
"Apache-2.0"
] | 5 | 2019-08-19T15:11:10.000Z | 2021-06-11T22:20:27.000Z | charge/repository.py | enitram/charge_assign | 8925855b1ce854c012930e141bb3c16537d6996d | [
"Apache-2.0"
] | 2 | 2019-04-15T08:36:17.000Z | 2019-06-23T10:19:45.000Z | import os
from collections import defaultdict
from io import IOBase
from itertools import groupby
from typing import Dict, List, Tuple, Union, Optional, AnyStr
from uuid import uuid4
from zipfile import ZipFile
import msgpack
import networkx as nx
from typing.io import IO
from charge.babel import convert_from, IOType... | 38.304158 | 122 | 0.595944 |
6772f5b3d55b39abade7dac63e7c27b8466b28ee | 657 | py | Python | main.py | jjoaovitor7/lfa_trabalhopratico2_20212 | 590acb2b1be509f2a3341658549a17ef34b15500 | [
"MIT"
] | null | null | null | main.py | jjoaovitor7/lfa_trabalhopratico2_20212 | 590acb2b1be509f2a3341658549a17ef34b15500 | [
"MIT"
] | null | null | null | main.py | jjoaovitor7/lfa_trabalhopratico2_20212 | 590acb2b1be509f2a3341658549a17ef34b15500 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
from src.File import File
from src.Grammar import Grammar
from src.Expression import Expression
from src.CYK import CYK
def main():
# LEITURA DO ARQUIVO
path__current = os.getcwd()
file = File(f"{path__current}{os.sep}files{os.sep}1.cyk")
file... | 18.771429 | 61 | 0.642314 |
0e97a9ebf88b13dafe856ad0ddf66c60a07d89bc | 68,895 | py | Python | src/datasets/builder.py | rpatil524/datasets | 6382607ee210d7cc3075e3006cbba1ad437858f0 | [
"Apache-2.0"
] | null | null | null | src/datasets/builder.py | rpatil524/datasets | 6382607ee210d7cc3075e3006cbba1ad437858f0 | [
"Apache-2.0"
] | null | null | null | src/datasets/builder.py | rpatil524/datasets | 6382607ee210d7cc3075e3006cbba1ad437858f0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The HuggingFace Datasets Authors and 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
#
# U... | 48.827073 | 1,838 | 0.647347 |
bf3d8a9958add5ba17512fc25ae93e9ea05fa1d8 | 22,670 | py | Python | ironic/drivers/modules/ilo/common.py | redhat-openstack/ironic | f27daf3372b56622e74362b88a9defbf089db37e | [
"Apache-2.0"
] | 1 | 2021-03-29T15:39:15.000Z | 2021-03-29T15:39:15.000Z | ironic/drivers/modules/ilo/common.py | redhat-openstack/ironic | f27daf3372b56622e74362b88a9defbf089db37e | [
"Apache-2.0"
] | null | null | null | ironic/drivers/modules/ilo/common.py | redhat-openstack/ironic | f27daf3372b56622e74362b88a9defbf089db37e | [
"Apache-2.0"
] | 1 | 2015-01-15T18:39:26.000Z | 2015-01-15T18:39:26.000Z | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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 applicabl... | 38.554422 | 79 | 0.664182 |
ed50a16020bcb3fda6d116db27b69b4c138b00af | 2,417 | py | Python | 1._metis_models_and_data_2019-12-16b/METIS source code/Indicators/kpis/Loss of load cost.py | tamas-borbath/METIS | cf3dc0f0f96ccb6ad72ddf15ba7e31ddc6339036 | [
"CC-BY-4.0"
] | 1 | 2021-12-07T09:05:48.000Z | 2021-12-07T09:05:48.000Z | 1._metis_models_and_data_2019-12-16b/METIS source code/Indicators/kpis/Loss of load cost.py | tamas-borbath/METIS_data_and_scripts | cf3dc0f0f96ccb6ad72ddf15ba7e31ddc6339036 | [
"CC-BY-4.0"
] | null | null | null | 1._metis_models_and_data_2019-12-16b/METIS source code/Indicators/kpis/Loss of load cost.py | tamas-borbath/METIS_data_and_scripts | cf3dc0f0f96ccb6ad72ddf15ba7e31ddc6339036 | [
"CC-BY-4.0"
] | null | null | null | ########################################################
# Copyright (c) 2015-2017 by European Commission. #
# All Rights Reserved. #
########################################################
extends("BaseKPI.py")
"""
Loss of load cost (euro)
-------------------------
Indexed by
... | 39.622951 | 200 | 0.72983 |
5989eed4bd4b494331b70b84e6fe45fcfdb45847 | 1,947 | py | Python | tests.py | samueldg/err-rando | 86d9267cf8bece42c22256e24b0a752c213d336d | [
"MIT"
] | 4 | 2017-08-04T21:04:55.000Z | 2022-03-07T20:54:11.000Z | tests.py | samueldg/err-rando | 86d9267cf8bece42c22256e24b0a752c213d336d | [
"MIT"
] | 1 | 2019-04-03T02:01:28.000Z | 2019-04-03T02:01:28.000Z | tests.py | samueldg/err-rando | 86d9267cf8bece42c22256e24b0a752c213d336d | [
"MIT"
] | 1 | 2018-10-12T22:48:40.000Z | 2018-10-12T22:48:40.000Z | """Basic output validation tests"""
import re
import rando
from rando import CARD_SUITS
from rando import CARD_SUITS_SYMBOLS
from rando import CARD_VALUES
from rando import CARD_VALUES_NUM
from rando import EIGHTBALL_ANSWERS
# pytest
extra_plugin_dir = '.'
pytest_plugins = ['errbot.backends.test']
def choice_patt... | 27.814286 | 73 | 0.672316 |
00b931f422f0cfd9e8d204a6da67ca2a432fc02c | 670 | py | Python | accountant/urls.py | opairdrop/Accountant | c902d09a71d9a1b56dbe07811f7bb53522774421 | [
"MIT"
] | 64 | 2017-12-08T04:31:53.000Z | 2022-01-28T14:34:19.000Z | accountant/urls.py | jadijadi/Accountant | b758fcd9d7927c98e434034675b21193106487f1 | [
"MIT"
] | 6 | 2018-03-13T17:29:18.000Z | 2022-03-31T19:02:18.000Z | accountant/urls.py | jadijadi/Accountant | b758fcd9d7927c98e434034675b21193106487f1 | [
"MIT"
] | 40 | 2018-01-26T19:38:21.000Z | 2021-12-03T16:58:25.000Z | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from stronghold.decorators import public
urlpatterns = patterns('',
url(r'^', include('apps.pa... | 29.130435 | 60 | 0.7 |
74b4b3b9b4f5cf6bbb19e5bd17d731155afb3931 | 22,619 | py | Python | src/sage/schemes/elliptic_curves/ell_tate_curve.py | Blues1998/sage | b5c9cf037cbce672101725f269470135b9b2c5c4 | [
"BSL-1.0"
] | null | null | null | src/sage/schemes/elliptic_curves/ell_tate_curve.py | Blues1998/sage | b5c9cf037cbce672101725f269470135b9b2c5c4 | [
"BSL-1.0"
] | null | null | null | src/sage/schemes/elliptic_curves/ell_tate_curve.py | Blues1998/sage | b5c9cf037cbce672101725f269470135b9b2c5c4 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Tate's parametrisation of `p`-adic curves with multiplicative reduction
Let `E` be an elliptic curve defined over the `p`-adic numbers `\QQ_p`.
Suppose that `E` has multiplicative reduction, i.e. that the `j`-invariant
of `E` has negative valuation, say `n`. Then there exists a parameter
`... | 34.532824 | 240 | 0.518414 |
41d33129d92c360e1d25e7f562643e5825572a4d | 7,352 | py | Python | tests/test_syntax/blocks/test_paragraphs.py | hatzel/markdown-spoilers | 1964f298f0e8b99f1202d36ccc7d8cf7d613ad26 | [
"BSD-3-Clause"
] | 2 | 2020-06-21T12:02:58.000Z | 2020-09-02T15:21:19.000Z | tests/test_syntax/blocks/test_paragraphs.py | hatzel/markdown-spoilers | 1964f298f0e8b99f1202d36ccc7d8cf7d613ad26 | [
"BSD-3-Clause"
] | null | null | null | tests/test_syntax/blocks/test_paragraphs.py | hatzel/markdown-spoilers | 1964f298f0e8b99f1202d36ccc7d8cf7d613ad26 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Python Markdown
A Python implementation of John Gruber's Markdown.
Documentation: https://python-markdown.github.io/
GitHub: https://github.com/Python-Markdown/markdown/
PyPI: https://pypi.org/project/Markdown/
Started by Manfred Stienstra (http://www.dwerg.net/).
Maintained for a few yea... | 31.82684 | 116 | 0.530332 |
679841fb13e9e1b6f465dd6a052897627ff56964 | 40,992 | py | Python | datalabeling/google/cloud/datalabeling_v1beta1/proto/data_labeling_service_pb2_grpc.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 2 | 2021-11-26T07:08:43.000Z | 2022-03-07T20:20:04.000Z | datalabeling/google/cloud/datalabeling_v1beta1/proto/data_labeling_service_pb2_grpc.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 6 | 2019-05-27T22:05:58.000Z | 2019-08-05T16:46:16.000Z | datalabeling/google/cloud/datalabeling_v1beta1/proto/data_labeling_service_pb2_grpc.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 1 | 2019-03-29T18:26:16.000Z | 2019-03-29T18:26:16.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from google.cloud.datalabeling_v1beta1.proto import (
annotation_spec_set_pb2 as google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_annotation__spec__set__pb2,
)
from google.cloud.datalabeling_v1beta1.proto import (
data_la... | 63.553488 | 169 | 0.782616 |
a9a2a5234d33b3331996c2da0abe8c6a306fe413 | 1,387 | py | Python | python/v1.6/cleanup.py | Jean13/CVE_Compare | 5c302dd501556d806b15a716b28c1cb78e13510d | [
"Apache-2.0"
] | 10 | 2018-02-09T02:54:23.000Z | 2022-03-18T12:17:06.000Z | python/v1.6/cleanup.py | Jean13/CVE_Compare | 5c302dd501556d806b15a716b28c1cb78e13510d | [
"Apache-2.0"
] | 2 | 2021-12-21T10:01:51.000Z | 2022-03-10T17:35:06.000Z | python/v1.6/cleanup.py | Jean13/CVE_Compare | 5c302dd501556d806b15a716b28c1cb78e13510d | [
"Apache-2.0"
] | 8 | 2018-02-26T07:54:53.000Z | 2021-09-09T13:25:00.000Z | import datetime
import csv
c = datetime.datetime.now()
cy = str(c.year)
destination_file = cy + "_installed_linux.csv"
# Destination file
with open(destination_file, 'a+') as df:
writer = csv.writer(df)
# Write headers
writer.writerow(["Product Name", "Software", "Software Version", "Software Publisher",... | 23.508475 | 107 | 0.501081 |
139e51c674f6bdbe0d2068dfffe4697d071bd8bb | 2,643 | py | Python | generalizedtrees/vis/models.py | sverchkov/generalized_tree_models | 323176434383c1605ef37250b9611e2939c44756 | [
"BSD-3-Clause"
] | 3 | 2019-04-17T19:55:14.000Z | 2020-10-21T10:33:23.000Z | generalizedtrees/vis/models.py | sverchkov/generalized_tree_models | 323176434383c1605ef37250b9611e2939c44756 | [
"BSD-3-Clause"
] | 132 | 2019-10-01T11:58:18.000Z | 2022-03-18T03:16:10.000Z | generalizedtrees/vis/models.py | sverchkov/generalized_tree_models | 323176434383c1605ef37250b9611e2939c44756 | [
"BSD-3-Clause"
] | 1 | 2019-09-24T20:28:33.000Z | 2019-09-24T20:28:33.000Z | # Visualization functions for models in trees
#
# Licensed under the BSD 3-Clause License
# Copyright (c) 2020, Yuriy Sverchkov
from typing import Union
from numpy import concatenate, array
from logging import getLogger
from generalizedtrees.leaves import ConstantEstimator, SKProbaClassifier
from generalizedtrees.vi... | 33.0375 | 90 | 0.645479 |
b7dbf758c1c9d3fa6fe8ac390d71c05a7a9b1889 | 1,867 | py | Python | src/info/views.py | vitchor/stellar-anchor-server | 941eb4e2a265b2eacaa07b2eeaf088b6d72c8da7 | [
"Apache-2.0"
] | null | null | null | src/info/views.py | vitchor/stellar-anchor-server | 941eb4e2a265b2eacaa07b2eeaf088b6d72c8da7 | [
"Apache-2.0"
] | null | null | null | src/info/views.py | vitchor/stellar-anchor-server | 941eb4e2a265b2eacaa07b2eeaf088b6d72c8da7 | [
"Apache-2.0"
] | 1 | 2021-09-15T01:55:46.000Z | 2021-09-15T01:55:46.000Z | """This module defines the logic for the `/info` endpoint."""
import json
from rest_framework.decorators import api_view
from rest_framework.response import Response
from .models import Asset
def _get_asset_deposit_info(asset: Asset):
if asset.deposit_enabled:
return {
"enabled": True,
... | 30.606557 | 91 | 0.643814 |
91a3fff5bc2b5df6537709927d01b941b5561e83 | 6,466 | py | Python | lib/test.py | DefTruth/PIPNet | a1fb1e229319dac0069e37eb8fb4278d454edbb0 | [
"MIT"
] | null | null | null | lib/test.py | DefTruth/PIPNet | a1fb1e229319dac0069e37eb8fb4278d454edbb0 | [
"MIT"
] | null | null | null | lib/test.py | DefTruth/PIPNet | a1fb1e229319dac0069e37eb8fb4278d454edbb0 | [
"MIT"
] | null | null | null | import cv2, os
import sys
sys.path.insert(0, '..')
import numpy as np
from PIL import Image
import logging
import pickle
import importlib
from math import floor
import time
import torch
import torch.nn as nn
import torch.optim as optim
import torch.utils.data
import torch.nn.functional as F
import torchvision.transfor... | 38.035294 | 171 | 0.693164 |
55e028eee5957902bd5d894f9c2a74d441591218 | 41,519 | py | Python | realm_gui/main.py | realm-ai-project/Python-GUI | a004c2bc930b6630e1bff42350faac277326910b | [
"MIT"
] | null | null | null | realm_gui/main.py | realm-ai-project/Python-GUI | a004c2bc930b6630e1bff42350faac277326910b | [
"MIT"
] | null | null | null | realm_gui/main.py | realm-ai-project/Python-GUI | a004c2bc930b6630e1bff42350faac277326910b | [
"MIT"
] | null | null | null | import argparse
from asyncio.subprocess import PIPE, STDOUT
from contextlib import redirect_stderr, redirect_stdout
import copy
import os
import time
import io
from signal import CTRL_BREAK_EVENT
import webbrowser
import subprocess
import threading
from datetime import datetime
from importlib.resources import path
impo... | 53.850843 | 367 | 0.712927 |
145ab4533592990110720a794275183014d6c0a5 | 1,148 | py | Python | tests/test_argparse.py | dstarner/pacyam | 2aee72baed5b4413074175054118b0761ce608a3 | [
"MIT"
] | 3 | 2018-10-02T13:04:41.000Z | 2020-07-20T11:28:03.000Z | tests/test_argparse.py | dstarner/pacyam | 2aee72baed5b4413074175054118b0761ce608a3 | [
"MIT"
] | 3 | 2018-10-11T19:11:11.000Z | 2018-11-09T17:03:01.000Z | tests/test_argparse.py | dstarner/pacyam | 2aee72baed5b4413074175054118b0761ce608a3 | [
"MIT"
] | null | null | null | import os
import unittest
from pacyam.pacyam import parse_arguments
REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def parse_arg_helper(cli_string):
argv = cli_string.split(' ')
return parse_arguments(argv)
class CLITestCase(unittest.TestCase):
project_root = os.path.join(REPO... | 29.435897 | 71 | 0.686411 |
3d86547fc9f0a7e31cba985d675214a08c91f460 | 3,642 | py | Python | code_examples/tensorflow/pipelining/test_pipelining.py | Alwaysproblem/examples-1 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | [
"MIT"
] | null | null | null | code_examples/tensorflow/pipelining/test_pipelining.py | Alwaysproblem/examples-1 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | [
"MIT"
] | null | null | null | code_examples/tensorflow/pipelining/test_pipelining.py | Alwaysproblem/examples-1 | 9754fa63ed1931489a21ac1f5b299f945e369a5c | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Graphcore Ltd. All rights reserved.
import inspect
import json
import os
import pytest
import subprocess
import unittest
from tempfile import TemporaryDirectory
import examples_tests.test_util as test_util
def run_pipelining_example(py_args):
"""Helper function to run the pipelining example... | 39.16129 | 78 | 0.560406 |
c768dcfb0b0b16d4b3ca90cb0ae3925b42de0c75 | 15,023 | py | Python | fairseq/data/audio/speech_to_speech_dataset.py | Applied-innovation-center-MCIT/fairseq-pt | 6d1f48cec47bf805b63af3f29936f4b14f1544ab | [
"MIT"
] | 1 | 2021-11-10T06:17:44.000Z | 2021-11-10T06:17:44.000Z | fairseq/data/audio/speech_to_speech_dataset.py | Applied-innovation-center-MCIT/fairseq-pt | 6d1f48cec47bf805b63af3f29936f4b14f1544ab | [
"MIT"
] | 2 | 2022-02-22T08:28:06.000Z | 2022-02-22T09:26:26.000Z | fairseq/data/audio/speech_to_speech_dataset.py | lesimor/fairseq | 06c65c8297396959c025bf61aaeaa6f4ace9940e | [
"MIT"
] | null | null | null | # 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 logging
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, List, Optional, Tuple
import torch
from f... | 35.018648 | 99 | 0.589762 |
6f34d762bf2df759322da8ae5ef663166e8c0496 | 72 | py | Python | testsuite/nodebuilder-tree/src/bytecode_package/__init__.py | xoviat/modulegraph2 | 766d00bdb40e5b2fe206b53a87b1bce3f9dc9c2a | [
"MIT"
] | 9 | 2020-03-22T14:48:01.000Z | 2021-05-30T12:18:12.000Z | testsuite/nodebuilder-tree/src/bytecode_package/__init__.py | xoviat/modulegraph2 | 766d00bdb40e5b2fe206b53a87b1bce3f9dc9c2a | [
"MIT"
] | 15 | 2020-01-06T10:02:32.000Z | 2021-05-28T12:22:44.000Z | testsuite/nodebuilder-tree/src/bytecode_package/__init__.py | ronaldoussoren/modulegraph2 | b6ab1766b0098651b51083235ff8a18a5639128b | [
"MIT"
] | 4 | 2020-05-10T18:51:41.000Z | 2021-04-07T14:03:12.000Z | """ Init for bytecode package """
import os.path as path
import pathlib
| 18 | 33 | 0.736111 |
87e2735401b1dacc61c5ae421d53ccd04255d677 | 14,547 | py | Python | blendernc/python_functions.py | blendernc/blendernc | 11a545270720e5489174b39693d317a797eea273 | [
"MIT"
] | 39 | 2020-06-15T15:58:43.000Z | 2022-02-02T01:11:57.000Z | blendernc/python_functions.py | netgodz/blendernc | 09ed7c7791da46abb2c5fd3ee83286ef0bf82302 | [
"MIT"
] | 137 | 2020-06-19T15:29:06.000Z | 2022-03-30T11:18:55.000Z | blendernc/python_functions.py | netgodz/blendernc | 09ed7c7791da46abb2c5fd3ee83286ef0bf82302 | [
"MIT"
] | 8 | 2020-06-17T09:33:12.000Z | 2022-01-21T00:26:19.000Z | #!/usr/bin/env python3
# This file contains pure python functions
#
# Probably for this reason I should avoid importing bpy here...
# import gc
import glob
import os
# TODO: If datacube file has been selected already create a copy of the TreeNode
import bpy
# Other imports
import numpy as np
import xarray
import b... | 32.763514 | 101 | 0.642126 |
546b5fd891cdabd961fe7a650eb0d80e773cc4d7 | 5,065 | py | Python | paddlenlp/ops/faster_transformer/sample/plato_export_model_sample.py | w5688414/PaddleNLP | a267cc1d5364e8f1658c9bd538d7e334cf315e95 | [
"Apache-2.0"
] | null | null | null | paddlenlp/ops/faster_transformer/sample/plato_export_model_sample.py | w5688414/PaddleNLP | a267cc1d5364e8f1658c9bd538d7e334cf315e95 | [
"Apache-2.0"
] | null | null | null | paddlenlp/ops/faster_transformer/sample/plato_export_model_sample.py | w5688414/PaddleNLP | a267cc1d5364e8f1658c9bd538d7e334cf315e95 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle 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 appli... | 31.65625 | 122 | 0.627838 |
f64d7a6b94db2645fafff0693875315daadba4c9 | 21,363 | py | Python | testing/tools/test_runner.py | gscloudplugin/pdfium | 2cc2fb8ddaaf821601f5e8f51597f8bd86c30a3c | [
"Apache-2.0"
] | null | null | null | testing/tools/test_runner.py | gscloudplugin/pdfium | 2cc2fb8ddaaf821601f5e8f51597f8bd86c30a3c | [
"Apache-2.0"
] | null | null | null | testing/tools/test_runner.py | gscloudplugin/pdfium | 2cc2fb8ddaaf821601f5e8f51597f8bd86c30a3c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2016 The PDFium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
from __future__ import division
import argparse
import functools
import multiprocessing
import os
... | 36.208475 | 80 | 0.683799 |
91d361452deafdd6dab3224cdbb9cddefd26c126 | 11,032 | py | Python | baselines/baselines/ppo2/ppo2.py | saimouli/RL-Drone-Dynamic-Obstacles | 3d704be6de2cf1e950c6ac929be8b8bbae61496f | [
"MIT"
] | null | null | null | baselines/baselines/ppo2/ppo2.py | saimouli/RL-Drone-Dynamic-Obstacles | 3d704be6de2cf1e950c6ac929be8b8bbae61496f | [
"MIT"
] | null | null | null | baselines/baselines/ppo2/ppo2.py | saimouli/RL-Drone-Dynamic-Obstacles | 3d704be6de2cf1e950c6ac929be8b8bbae61496f | [
"MIT"
] | 1 | 2020-02-09T01:14:39.000Z | 2020-02-09T01:14:39.000Z | import os
import time
import numpy as np
import os.path as osp
from baselines import logger
from collections import deque
from baselines.common import explained_variance, set_global_seeds
from baselines.common.policies import build_policy
try:
from mpi4py import MPI
except ImportError:
MPI = None
from baselines... | 46.352941 | 184 | 0.617295 |
eeb893022fe498a79d32896dcc3b574ed0554b44 | 790 | py | Python | var/spack/repos/builtin/packages/rendercheck/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/rendercheck/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 32 | 2020-12-15T17:29:20.000Z | 2022-03-21T15:08:31.000Z | var/spack/repos/builtin/packages/rendercheck/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2018-04-06T09:04:11.000Z | 2020-01-24T12:52:12.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Rendercheck(AutotoolsPackage, XorgPackage):
"""rendercheck is a program to test a Render e... | 32.916667 | 93 | 0.74557 |
d7c15697366d49e7481efeb90f98f8b28ca632e6 | 407 | py | Python | cowsay/lib/cows/bearface.py | Ovlic/cowsay_py | 1ee8d11d6d895d7695d57e26003d71ce18379d3b | [
"MIT"
] | null | null | null | cowsay/lib/cows/bearface.py | Ovlic/cowsay_py | 1ee8d11d6d895d7695d57e26003d71ce18379d3b | [
"MIT"
] | null | null | null | cowsay/lib/cows/bearface.py | Ovlic/cowsay_py | 1ee8d11d6d895d7695d57e26003d71ce18379d3b | [
"MIT"
] | null | null | null | def Bearface(thoughts, eyes, eye, tongue):
return f"""
{thoughts}
{thoughts}
.--. .--.
: (\\ ". _......_ ." /) :
'. \` \` .'
/' _ _ \`\\
/ {eye}"""+'}'+' '+'{'+f"""{eye} \\
| / \\ |
| /' \`\\ |
\... | 27.133333 | 53 | 0.176904 |
823e4a71cc18f60803885901f859f6b54c2dfd5c | 11,424 | py | Python | deps/mozjs/src/jit-test/jit_test.py | ktrzeciaknubisa/jxcore-binary-packaging | 5759df084be10a259a4a4f1b38c214c6084a7c0f | [
"Apache-2.0"
] | 2,494 | 2015-02-11T04:34:13.000Z | 2022-03-31T14:21:47.000Z | deps/mozjs/src/jit-test/jit_test.py | ktrzeciaknubisa/jxcore-binary-packaging | 5759df084be10a259a4a4f1b38c214c6084a7c0f | [
"Apache-2.0"
] | 685 | 2015-02-11T17:14:26.000Z | 2021-04-13T09:58:39.000Z | deps/mozjs/src/jit-test/jit_test.py | ktrzeciaknubisa/jxcore-binary-packaging | 5759df084be10a259a4a4f1b38c214c6084a7c0f | [
"Apache-2.0"
] | 442 | 2015-02-12T13:45:46.000Z | 2022-03-21T05:28:05.000Z | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import print_function, unicode_literals
import math, os, posixpath, shlex, shutil... | 44.27907 | 113 | 0.610819 |
a539e8b20e567c4a649b0399a28f225d4c3b0e94 | 19 | py | Python | shotmanager/sim/__init__.py | meee1/OpenSolo | 6f299639adbad1e8d573c8ae1135832711b600e4 | [
"Apache-2.0"
] | 68 | 2019-09-23T03:27:05.000Z | 2022-03-12T03:00:41.000Z | shotmanager/sim/__init__.py | meee1/OpenSolo | 6f299639adbad1e8d573c8ae1135832711b600e4 | [
"Apache-2.0"
] | 22 | 2019-10-26T20:15:56.000Z | 2022-02-12T05:41:56.000Z | shotmanager/sim/__init__.py | meee1/OpenSolo | 6f299639adbad1e8d573c8ae1135832711b600e4 | [
"Apache-2.0"
] | 33 | 2019-09-29T19:52:19.000Z | 2022-03-12T03:00:43.000Z | import rc_ipc_shim
| 9.5 | 18 | 0.894737 |
c6a473c25a9c0c216adfcfdc49541a7e69117d20 | 1,733 | py | Python | aws/commands-ec2-lambda.py | ianuragbhatt/ipython-jupyter-notebooks | bf0919be937a16860c5bc7863d585c133abac4e1 | [
"MIT"
] | null | null | null | aws/commands-ec2-lambda.py | ianuragbhatt/ipython-jupyter-notebooks | bf0919be937a16860c5bc7863d585c133abac4e1 | [
"MIT"
] | 4 | 2021-04-30T21:05:15.000Z | 2021-07-11T17:28:53.000Z | aws/commands-ec2-lambda.py | 4nur4g/Medium_Articles | bf0919be937a16860c5bc7863d585c133abac4e1 | [
"MIT"
] | null | null | null | import time
import json
import boto3
def str_decode(val):
val = val.split('\n')
ip_adress = val[0]
launch_time = val[1]
uptime = int(float(val[2].split(' ', 1)[0]))
os_version = val[4]
return ip_adress, launch_time, uptime, os_version
def lambda_handler(event, context):
# boto3 clien... | 32.698113 | 107 | 0.639354 |
cfdd1b5be388fdbe28cfcc007e90fe5864293f59 | 2,366 | py | Python | stadyn/icnn.py | mcx-lab/stable-set-dynamics | f6d4b3f5b92f90cdd924017571abaa0f7bdf5dab | [
"MIT"
] | 1 | 2022-03-28T07:45:17.000Z | 2022-03-28T07:45:17.000Z | stadyn/icnn.py | mcx-lab/stable-set-dynamics | f6d4b3f5b92f90cdd924017571abaa0f7bdf5dab | [
"MIT"
] | null | null | null | stadyn/icnn.py | mcx-lab/stable-set-dynamics | f6d4b3f5b92f90cdd924017571abaa0f7bdf5dab | [
"MIT"
] | 1 | 2022-03-28T07:45:20.000Z | 2022-03-28T07:45:20.000Z | import math
import torch
import torch.nn as nn
class ICNN(nn.Module):
"""Input-convex neural network.
"""
def __init__(self, dim_in:int, dims_hidden:list,
activation:str='elu', batchnorm:bool=False):
super(ICNN, self).__init__()
dims_all = [dim_in,] + dims_hidden + [1,]
... | 36.4 | 88 | 0.5765 |
b112e2cec8ef4e713b742be9cc335911017015b6 | 2,899 | py | Python | tests/unit_tests/db_engine_specs/test_base.py | 7vikpeculiar/superset | 800ced5e257d5d83d6dbe4ced0e7318ac40d026f | [
"Apache-2.0"
] | 2 | 2021-12-21T15:57:16.000Z | 2022-01-31T02:22:02.000Z | tests/unit_tests/db_engine_specs/test_base.py | 7vikpeculiar/superset | 800ced5e257d5d83d6dbe4ced0e7318ac40d026f | [
"Apache-2.0"
] | 10 | 2022-01-05T01:31:07.000Z | 2022-03-16T01:09:46.000Z | tests/unit_tests/db_engine_specs/test_base.py | 7vikpeculiar/superset | 800ced5e257d5d83d6dbe4ced0e7318ac40d026f | [
"Apache-2.0"
] | 2 | 2021-12-21T13:41:18.000Z | 2021-12-26T22:16:43.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 27.609524 | 85 | 0.683684 |
353db8ae0b3d247489cde16474af6b60071f31a3 | 12,716 | py | Python | examples/expectations/column_aggregate_expectation_template.py | victorcouste/great_expectations | 9ee46d83feb87e13c769e2ae35b899b3f18d73a4 | [
"Apache-2.0"
] | 6,451 | 2017-09-11T16:32:53.000Z | 2022-03-31T23:27:49.000Z | examples/expectations/column_aggregate_expectation_template.py | victorcouste/great_expectations | 9ee46d83feb87e13c769e2ae35b899b3f18d73a4 | [
"Apache-2.0"
] | 3,892 | 2017-09-08T18:57:50.000Z | 2022-03-31T23:15:20.000Z | examples/expectations/column_aggregate_expectation_template.py | victorcouste/great_expectations | 9ee46d83feb87e13c769e2ae35b899b3f18d73a4 | [
"Apache-2.0"
] | 1,023 | 2017-09-08T15:22:05.000Z | 2022-03-31T21:17:08.000Z | import json
from typing import Any, Dict, Optional, Tuple
import numpy as np
import pandas as pd
from great_expectations.core import ExpectationConfiguration
from great_expectations.execution_engine import (
ExecutionEngine,
PandasExecutionEngine,
SparkDFExecutionEngine,
)
from great_expectations.executio... | 37.072886 | 120 | 0.565036 |
7abc9fceca95885570616908489f0df029b6e8c6 | 1,697 | py | Python | fiction_outlines/admin.py | maceoutliner/django-fiction-outlines | cd76078b133c8327dc7c6c481c0664cefb5ce422 | [
"BSD-3-Clause-Clear"
] | 3 | 2018-04-23T11:05:27.000Z | 2018-10-17T23:18:48.000Z | fiction_outlines/admin.py | maceoutliner/django-fiction-outlines | cd76078b133c8327dc7c6c481c0664cefb5ce422 | [
"BSD-3-Clause-Clear"
] | 24 | 2018-04-02T11:38:55.000Z | 2022-03-28T02:05:20.000Z | fiction_outlines/admin.py | maceoutliner/django-fiction-outlines | cd76078b133c8327dc7c6c481c0664cefb5ce422 | [
"BSD-3-Clause-Clear"
] | null | null | null | from django.contrib import admin
from treebeard.admin import TreeAdmin
from treebeard.forms import movenodeform_factory
from .models import Series, Character, CharacterInstance, Location, LocationInstance
from .models import Outline, Arc, ArcElementNode, StoryElementNode
# Register your models here.
class SeriesAdmi... | 30.854545 | 84 | 0.777843 |
faa2e11012ea97c73093d444670e43322a5b310e | 2,216 | py | Python | wf_bash_vocabularysearch/odict.py | forAllBright/mbpTools | ec8213c58d6fba34f68f17bb89d78c8d54880009 | [
"MIT"
] | null | null | null | wf_bash_vocabularysearch/odict.py | forAllBright/mbpTools | ec8213c58d6fba34f68f17bb89d78c8d54880009 | [
"MIT"
] | null | null | null | wf_bash_vocabularysearch/odict.py | forAllBright/mbpTools | ec8213c58d6fba34f68f17bb89d78c8d54880009 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import sys
import requests
# import textwrap
from workflow import Workflow
from bs4 import BeautifulSoup
import logging
reload(sys)
sys.setdefaultencoding(u'utf8')
def main(wf, short_def_text=''):
logger = logging.getLogger('http connection')
qu... | 33.074627 | 139 | 0.61417 |
f0bed0ba352905842e93dc2f98bfdb24945a44bb | 10,466 | py | Python | apps/vit/signals.py | Visualway/Vitary | c7db9a25837fa7390b2177b9db48e73c6f1ab3c8 | [
"BSD-3-Clause"
] | 4 | 2021-12-24T16:07:44.000Z | 2022-03-04T02:30:20.000Z | apps/vit/signals.py | Visualway/Vitary | c7db9a25837fa7390b2177b9db48e73c6f1ab3c8 | [
"BSD-3-Clause"
] | 4 | 2021-12-30T13:32:56.000Z | 2022-03-15T03:58:48.000Z | apps/vit/signals.py | Visualway/Vitary | c7db9a25837fa7390b2177b9db48e73c6f1ab3c8 | [
"BSD-3-Clause"
] | null | null | null | import json
import re
import requests
from bs4 import BeautifulSoup
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.conf import settings
from django.urls import reverse_lazy
from django.core.mail import EmailMultiAlternatives
from django.template.loader import render_t... | 45.504348 | 112 | 0.409517 |
4e6ba27412651625d03ce1fb5325ab18c402e4b0 | 1,451 | py | Python | app/auth/views.py | dgkilolo/Blog | 9faf040ed7b9c753796d2cbee097c8336011f2ec | [
"MIT"
] | null | null | null | app/auth/views.py | dgkilolo/Blog | 9faf040ed7b9c753796d2cbee097c8336011f2ec | [
"MIT"
] | null | null | null | app/auth/views.py | dgkilolo/Blog | 9faf040ed7b9c753796d2cbee097c8336011f2ec | [
"MIT"
] | null | null | null | from flask import render_template,redirect,url_for,flash,request
from flask_login import login_user, logout_user, login_required
from . import auth
from ..models import Writer
from .forms import RegistrationForm, LoginForm
from .. import db
# from ..email import mail_message
@auth.route('/register',methods = ["GET",... | 30.87234 | 105 | 0.736044 |
2c40a18c3f5345881e48385c93e047578c51e541 | 13,810 | py | Python | test_scripts/yolo-pisciculturedb-tracking-opencv/fish_detector.py | open-pisciculture/prueba_concepto | 2914fe53f58da273abea2f1f69cba6b2e4c9fef8 | [
"MIT"
] | null | null | null | test_scripts/yolo-pisciculturedb-tracking-opencv/fish_detector.py | open-pisciculture/prueba_concepto | 2914fe53f58da273abea2f1f69cba6b2e4c9fef8 | [
"MIT"
] | null | null | null | test_scripts/yolo-pisciculturedb-tracking-opencv/fish_detector.py | open-pisciculture/prueba_concepto | 2914fe53f58da273abea2f1f69cba6b2e4c9fef8 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# USAGE
# To read and write back out to video:
# python fish_detector.py --yoloconf yolov4-tiny_testing_3chan.cfg \
# --weights yolov4-tiny-detector_best_pisciculturedb.weights --input true \
# --output true
#
# To read from webcam and write back out to disk:
# python fish_detector.py --yoloconf y... | 36.246719 | 145 | 0.673932 |
4afb687efec1b36bedbc929764074e7782830209 | 4,055 | py | Python | {{cookiecutter.project_slug}}/tests.py | sarahJeanneT/django-init | d3c8d32683d6fadc8c55c74d4cc020360e291174 | [
"MIT"
] | 3 | 2019-10-22T00:16:49.000Z | 2021-07-15T07:44:43.000Z | {{cookiecutter.project_slug}}/tests.py | sarahJeanneT/django-init | d3c8d32683d6fadc8c55c74d4cc020360e291174 | [
"MIT"
] | 1,183 | 2018-04-19T18:40:30.000Z | 2022-03-31T21:05:05.000Z | {{cookiecutter.project_slug}}/tests.py | sarahJeanneT/django-init | d3c8d32683d6fadc8c55c74d4cc020360e291174 | [
"MIT"
] | 12 | 2018-04-17T19:16:42.000Z | 2022-01-27T00:19:59.000Z | import os
import sys
import inspect
# Paths
REPOSITORY_PATH = os.path.abspath(os.path.dirname(sys.argv[0]))
PROJECT_PATH = REPOSITORY_PATH
# Color constant to console print
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
ENDC = '\033[0m'
class Test:
"""
A little class to it... | 28.556338 | 76 | 0.553144 |
ca72f3f22bb9e8b6ce010d70c89f040c3e9b22ea | 901 | py | Python | larvik/generators.py | jhnnsrs/arbeider | 4c5637913331c998a262ae0deca516b236845200 | [
"MIT"
] | null | null | null | larvik/generators.py | jhnnsrs/arbeider | 4c5637913331c998a262ae0deca516b236845200 | [
"MIT"
] | null | null | null | larvik/generators.py | jhnnsrs/arbeider | 4c5637913331c998a262ae0deca516b236845200 | [
"MIT"
] | null | null | null | import random
import string
class ArnheimGenerator(object):
def __init__(self, model, group, overwrite = False):
self.model = model
self.group = group
self.overwrite = overwrite
self._name = None
if self.group is None:
raise NotImplementedError("Please specify... | 24.351351 | 82 | 0.603774 |
f767471aea0217f39113eeeac7831319ad0cfb44 | 2,292 | py | Python | functions/all_functions.py | kefir/snakee | a17734d4b2d7dfd3e6c7b195baa128fbc84d197b | [
"MIT"
] | null | null | null | functions/all_functions.py | kefir/snakee | a17734d4b2d7dfd3e6c7b195baa128fbc84d197b | [
"MIT"
] | null | null | null | functions/all_functions.py | kefir/snakee | a17734d4b2d7dfd3e6c7b195baa128fbc84d197b | [
"MIT"
] | null | null | null | try: # Assume we're a sub-module in a package.
from functions.basic_functions import (
partial, const, defined, is_none, not_none, nonzero, equal, not_equal,
at_least, more_than, safe_more_than, less_than, between, not_between, is_ordered,
apply_dict,
)
from functions.cast_functions... | 48.765957 | 105 | 0.717714 |
a20448f668e3a3aa88cf70c514ddc7ccff965449 | 4,810 | py | Python | app/config.py | mtmworg/mtmw-kerkoapp | bf9bb07e912651ea66f77ba07d7d2b24b0aa3812 | [
"BSD-3-Clause"
] | null | null | null | app/config.py | mtmworg/mtmw-kerkoapp | bf9bb07e912651ea66f77ba07d7d2b24b0aa3812 | [
"BSD-3-Clause"
] | null | null | null | app/config.py | mtmworg/mtmw-kerkoapp | bf9bb07e912651ea66f77ba07d7d2b24b0aa3812 | [
"BSD-3-Clause"
] | null | null | null | import pathlib
from environs import Env
from flask_babelex import lazy_gettext as _
from kerko.composer import Composer
from kerko.specs import CollectionFacetSpec
env = Env() # pylint: disable=invalid-name
env.read_env()
@env.parser_for('collection_spec')
def collection_spec_parser(value):
try:
retur... | 43.727273 | 99 | 0.718919 |
9e2270609bd42ee45cef7f18c4354fd21f0f60c1 | 98 | py | Python | simple_avk/__init__.py | megahomyak/simple_avk | 59528cd73e34cee0058fc8765e03cb762879ab6f | [
"Unlicense"
] | 6 | 2020-06-08T13:42:18.000Z | 2022-02-09T19:54:58.000Z | simple_avk/__init__.py | megahomyak/simple_avk | 59528cd73e34cee0058fc8765e03cb762879ab6f | [
"Unlicense"
] | null | null | null | simple_avk/__init__.py | megahomyak/simple_avk | 59528cd73e34cee0058fc8765e03cb762879ab6f | [
"Unlicense"
] | null | null | null | from simple_avk.AVK import SimpleAVK
from simple_avk.exceptions import MethodError, LongpollError
| 32.666667 | 60 | 0.877551 |
59947f98f87517d2b46688953591ad1aa205087f | 1,632 | py | Python | saleor/core/utils/json_serializer.py | acabezasg/urpi-master | 7c9cd0fbe6d89dad70652482712ca38b21ba6f84 | [
"BSD-3-Clause"
] | 7 | 2019-05-17T14:27:13.000Z | 2021-12-17T22:52:40.000Z | saleor/core/utils/json_serializer.py | acabezasg/urpi-master | 7c9cd0fbe6d89dad70652482712ca38b21ba6f84 | [
"BSD-3-Clause"
] | 64 | 2019-02-11T17:02:05.000Z | 2021-06-25T15:16:57.000Z | saleor/core/utils/json_serializer.py | acabezasg/urpi-master | 7c9cd0fbe6d89dad70652482712ca38b21ba6f84 | [
"BSD-3-Clause"
] | 2 | 2019-01-08T02:32:42.000Z | 2021-07-05T14:05:55.000Z | import json
from django.core.serializers.base import DeserializationError
from django.core.serializers.json import (
DjangoJSONEncoder, PythonDeserializer, Serializer as JsonSerializer)
from prices import Money
MONEY_TYPE = 'Money'
class Serializer(JsonSerializer):
def _init_options(self):
super()._... | 33.306122 | 79 | 0.692402 |
1744103fdf6bd301d1309183951c59c108fd6458 | 8,237 | py | Python | quantization/adaround/utils.py | vuiseng9/transformer-quantization | b236017cbf5c0a8cf89ac8e6197812e4aebff8cd | [
"BSD-3-Clause-Clear"
] | 26 | 2021-10-08T07:31:58.000Z | 2022-03-15T19:48:04.000Z | quantization/adaround/utils.py | Ayyub29/transformer-quantization | 0af66d0cfcd335a6cb15b3ffa1f660b7e75f270f | [
"BSD-3-Clause-Clear"
] | 1 | 2021-12-10T17:11:52.000Z | 2021-12-10T17:11:52.000Z | quantization/adaround/utils.py | Ayyub29/transformer-quantization | 0af66d0cfcd335a6cb15b3ffa1f660b7e75f270f | [
"BSD-3-Clause-Clear"
] | 7 | 2021-12-27T22:04:17.000Z | 2022-03-22T20:26:03.000Z | # Copyright (c) 2021 Qualcomm Technologies, Inc.
# All Rights Reserved.
import logging
from enum import Flag, auto
from math import ceil
import numpy as np
import torch
import torch.nn.functional as F
from utils.utils import StopForwardException
# setup logger
logger = logging.getLogger('AdaRound')
logger.setLevel... | 32.557312 | 96 | 0.624378 |
8ea2bba115719e5e517da174d2f63e3c6e951ea4 | 183 | py | Python | src/609C.py | viing937/codeforces | d694eb6967cd56af02963c3a662066048cb78d07 | [
"MIT"
] | 2 | 2016-08-19T09:47:03.000Z | 2016-10-01T10:15:03.000Z | src/609C.py | viing937/codeforces | d694eb6967cd56af02963c3a662066048cb78d07 | [
"MIT"
] | null | null | null | src/609C.py | viing937/codeforces | d694eb6967cd56af02963c3a662066048cb78d07 | [
"MIT"
] | 1 | 2015-07-01T23:57:32.000Z | 2015-07-01T23:57:32.000Z | n = int(input())
m = sorted(map(int, input().split(' ')), reverse=True)
s = sum(m)
t, r = s//n, s%n
for i in range(r):
m[i] -= 1
print(sum(map(lambda a:a-t if a>t else 0, m)))
| 16.636364 | 54 | 0.540984 |
2107376c640907060ef5b56afc1d543c1d104972 | 510 | py | Python | sib_notes/notes/migrations/0002_note_parent_folder.py | errantsky/sib_notes_django_rest | 5f5aba284955f8e8ba3def60b4bd5b834770e276 | [
"MIT"
] | null | null | null | sib_notes/notes/migrations/0002_note_parent_folder.py | errantsky/sib_notes_django_rest | 5f5aba284955f8e8ba3def60b4bd5b834770e276 | [
"MIT"
] | null | null | null | sib_notes/notes/migrations/0002_note_parent_folder.py | errantsky/sib_notes_django_rest | 5f5aba284955f8e8ba3def60b4bd5b834770e276 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.13 on 2021-08-12 16:20
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('folders', '0001_initial'),
('notes', '0001_initial'),
]
operations = [
migrations.AddField(
... | 24.285714 | 113 | 0.62549 |
a81198b1003c2082d96b21e9a46167e378edd43e | 4,679 | py | Python | testscripts/RDKB/component/HAL_Platform/TS_platform_stub_hal_DocsisParamsDBInit.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/HAL_Platform/TS_platform_stub_hal_DocsisParamsDBInit.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/HAL_Platform/TS_platform_stub_hal_DocsisParamsDBInit.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | # ===========================================================================
# Copyright 2016-2018 Intel Corporation
# 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.o... | 42.153153 | 129 | 0.70934 |
c9429ee279377b923a9f78915a35773546362186 | 8,772 | py | Python | paco/pacoRun.py | fabianlischka/paco | 82a3d14df8ccc7628bdafde9dd2a7293be9bf94e | [
"MIT"
] | 1 | 2018-01-18T10:11:31.000Z | 2018-01-18T10:11:31.000Z | paco/pacoRun.py | fabianlischka/paco | 82a3d14df8ccc7628bdafde9dd2a7293be9bf94e | [
"MIT"
] | null | null | null | paco/pacoRun.py | fabianlischka/paco | 82a3d14df8ccc7628bdafde9dd2a7293be9bf94e | [
"MIT"
] | null | null | null | import logging
import numpy as np
import os
import os.path
import pacoUtils as pu
import subprocess
import yaml
def fvm(vv, q, u, where): # finite volume method
"""Finite volume method.
Inputs:
vv: int, 3. Vertices defining this face: v1, v2, v3. Zero-based (!)
q : float, 3 x 2. For each of t... | 37.012658 | 88 | 0.569311 |
86e0d74233d8a9e53b8c8d9976d75a2470f61067 | 2,271 | py | Python | aiofiles/base.py | iiSeymour/aiofiles | cba6910a491f585f2dc4a87e215f5f52ebde6f48 | [
"Apache-2.0"
] | null | null | null | aiofiles/base.py | iiSeymour/aiofiles | cba6910a491f585f2dc4a87e215f5f52ebde6f48 | [
"Apache-2.0"
] | 1 | 2018-04-04T12:13:40.000Z | 2018-05-03T07:57:52.000Z | sandbox/lib/pythonbin/aiofiles/base.py | Jumpscale/sandbox_linux | 2aacd36b467ef30ac83718abfa82c6883b67a02f | [
"Apache-2.0"
] | 1 | 2018-09-19T15:45:51.000Z | 2018-09-19T15:45:51.000Z | """Various base classes."""
import asyncio
from ._compat import PY_35
class AsyncBase:
def __init__(self, file, loop, executor):
self._file = file
self._loop = loop
self._executor = executor
if PY_35:
@asyncio.coroutine
def __aiter__(self):
"""We are our o... | 22.71 | 57 | 0.575517 |
9858f0e095d20e88dc2b3890e8012c32dee38ec2 | 471 | py | Python | ServidorPython/python32_web/Lib/site-packages/matplotlib/_version.py | mak213k/Servidor_automatizado_python | 4403ef8027a2f814220baacc95856cf5fbf01d21 | [
"MIT"
] | 4 | 2019-07-26T11:32:22.000Z | 2019-09-11T05:34:59.000Z | ServidorPython/python32_web/Lib/site-packages/matplotlib/_version.py | mak213k/Servidor_automatizado_python | 4403ef8027a2f814220baacc95856cf5fbf01d21 | [
"MIT"
] | 26 | 2020-03-24T18:07:06.000Z | 2022-03-12T00:12:27.000Z | ServidorPython/python32_web/Lib/site-packages/matplotlib/_version.py | mak213k/Servidor_automatizado_python | 4403ef8027a2f814220baacc95856cf5fbf01d21 | [
"MIT"
] | 2 | 2019-10-16T15:47:47.000Z | 2020-02-10T16:06:50.000Z |
# This file was generated by 'versioneer.py' (0.15) from
# revision-control system data, or from the parent directory name of an
# unpacked source archive. Distribution tarballs contain a pre-generated copy
# of this file.
import json
import sys
version_json = '''
{
"dirty": false,
"error": null,
"full-revisionid... | 21.409091 | 77 | 0.730361 |
5387b57f776c3044bcf1333ce3cd8d6699161821 | 380 | py | Python | setup.py | ryanwcyin/StockCrawler | 166078336fd1647833fdc66d087d56fc3f9d6aa8 | [
"MIT"
] | null | null | null | setup.py | ryanwcyin/StockCrawler | 166078336fd1647833fdc66d087d56fc3f9d6aa8 | [
"MIT"
] | null | null | null | setup.py | ryanwcyin/StockCrawler | 166078336fd1647833fdc66d087d56fc3f9d6aa8 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='StockCrawler',
version='0.1',
author='ryanwcyin',
author_email='ryanwcyin@gmail.com',
packages=['StockCrawler', 'StockCrawler.tests'],
license='LICENSE',
description='Get the historical stock price from yahoo',
long_description=open('README.md'... | 22.352941 | 60 | 0.657895 |
2a421b8dbbe3dc00099b5dc0fea9b585437ae08d | 5,166 | py | Python | setup_window_tk.py | ORyanHampton/Canvas_Reminders | d5c557c76b026669b96d4ddde1a826c261de21a5 | [
"MIT"
] | null | null | null | setup_window_tk.py | ORyanHampton/Canvas_Reminders | d5c557c76b026669b96d4ddde1a826c261de21a5 | [
"MIT"
] | null | null | null | setup_window_tk.py | ORyanHampton/Canvas_Reminders | d5c557c76b026669b96d4ddde1a826c261de21a5 | [
"MIT"
] | null | null | null | import os
import plistlib
import pathlib
import logging
import sys
import subprocess
import Canvas_TODO_grab
# import PIL
import tkinter as tk
from tkinter import filedialog
import tkinter.ttk as ttk
# from PIL import Image, ImageTk
class canvas_reminders_driver(tk.Tk):
def __init__(self, *args, **kwargs):
... | 29.352273 | 107 | 0.550329 |
60b5a5a55aca33b91e803685105ab79c32d6e673 | 540 | py | Python | pacote-download/Ex58.py | nkonai/Curso-em-video-Python | c05a60b3daa7d448e1e7f0d4d23f62df5d2c8df2 | [
"MIT"
] | null | null | null | pacote-download/Ex58.py | nkonai/Curso-em-video-Python | c05a60b3daa7d448e1e7f0d4d23f62df5d2c8df2 | [
"MIT"
] | null | null | null | pacote-download/Ex58.py | nkonai/Curso-em-video-Python | c05a60b3daa7d448e1e7f0d4d23f62df5d2c8df2 | [
"MIT"
] | null | null | null | import random
pc = random.randint(0,10)
print('Sou seu computador...Acabei de pensar em um numero de 0 a 10.')
print('Consegue adivinhar qual foi?')
count = 0
acertou = False
while not acertou:
guess = int(input('Qual e seu palpite? '))
count = count + 1
if guess == pc:
acertou = True
else:
... | 25.714286 | 74 | 0.605556 |
631c097955dfdc6749d967022a11046c1345b5e5 | 401 | py | Python | empyrical/periods.py | Investabit/empyrical | c096e3f36f20aba2ffcb88b2a07309c6d7aeb2ba | [
"Apache-2.0"
] | null | null | null | empyrical/periods.py | Investabit/empyrical | c096e3f36f20aba2ffcb88b2a07309c6d7aeb2ba | [
"Apache-2.0"
] | null | null | null | empyrical/periods.py | Investabit/empyrical | c096e3f36f20aba2ffcb88b2a07309c6d7aeb2ba | [
"Apache-2.0"
] | null | null | null | APPROX_BDAYS_PER_MONTH = 21
APPROX_BDAYS_PER_YEAR = 252
APPROX_BDAYS_PER_YEAR_CRYPTO = 365
MONTHS_PER_YEAR = 12
WEEKS_PER_YEAR = 52
CRYPTO = 'crypto'
DAILY = 'daily'
WEEKLY = 'weekly'
MONTHLY = 'monthly'
YEARLY = 'yearly'
ANNUALIZATION_FACTORS = {
CRYPTO: APPROX_BDAYS_PER_YEAR_CRYPTO,
DAILY: APPROX_BDAYS_PER... | 19.095238 | 41 | 0.753117 |
3f295d37fa8e64abedeef1f875696a8ff15797dc | 465 | py | Python | data/scripts/templates/object/mobile/shared_dressed_dark_force_crystal_hunter.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/mobile/shared_dressed_dark_force_crystal_hunter.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/mobile/shared_dressed_dark_force_crystal_hunter.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_dressed_dark_force_crystal_hunter.iff"
result.attribute_templa... | 27.352941 | 79 | 0.741935 |
619d41b26e01df7b4189e7ac1f366c289e161825 | 8,786 | py | Python | intersight/model/firmware_dimm_descriptor_list_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/firmware_dimm_descriptor_list_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/firmware_dimm_descriptor_list_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... | 49.920455 | 1,678 | 0.64193 |
3b46232689bf09f26342a50a4b7244b0d149de7b | 688 | py | Python | URI online judge/media3.py | josefloresgabriel/Exercicios-in-python | 1fd7fc73ae5ddb628010dfec50a26b974b202088 | [
"MIT"
] | 1 | 2020-07-15T02:04:57.000Z | 2020-07-15T02:04:57.000Z | URI online judge/media3.py | josefloresgabriel/Exercicios-in-python | 1fd7fc73ae5ddb628010dfec50a26b974b202088 | [
"MIT"
] | null | null | null | URI online judge/media3.py | josefloresgabriel/Exercicios-in-python | 1fd7fc73ae5ddb628010dfec50a26b974b202088 | [
"MIT"
] | null | null | null | notas = str(input()).split()
nota1 = float(notas[0])
nota2 = float(notas[1])
nota3 = float(notas[2])
nota4 = float(notas[3])
media = (nota1 * 2 + nota2 * 3 + nota3 * 4 + nota4 * 1) / 10
print('Media: {:.1f}'.format(media))
if media >= 7.0:
print('Aluno aprovado.')
elif media < 5:
print('Aluno reprovado.')
else:... | 31.272727 | 60 | 0.597384 |
2046a6bba7909c77dd79cb2212b992cb6cbdf43f | 5,895 | py | Python | src/gui/searchablecombobox.py | larashores/spotify-analyzer | 98022b178ce3ef1b07a8f005aeba2aeb573125ee | [
"MIT"
] | null | null | null | src/gui/searchablecombobox.py | larashores/spotify-analyzer | 98022b178ce3ef1b07a8f005aeba2aeb573125ee | [
"MIT"
] | null | null | null | src/gui/searchablecombobox.py | larashores/spotify-analyzer | 98022b178ce3ef1b07a8f005aeba2aeb573125ee | [
"MIT"
] | null | null | null | import contextlib
import tkinter as tk
from tkinter import ttk
from typing import Iterable, List, Optional
from type_hints import Parent
class SearchableComboBox(ttk.Frame):
def __init__(
self,
parent: Parent = None,
*,
textvariable: Optional[tk.Variable] = None,
values: O... | 35.727273 | 119 | 0.584902 |
03bece1ac71a0340f9a3e4a7e3c033bf49d35b43 | 2,445 | py | Python | meshless/espim/tests/test_calc_linear_buckling.py | compmech/particles | d23ae69ad4c79024b997a232247b4ae0e1e7031c | [
"BSD-2-Clause"
] | 8 | 2017-06-16T15:50:43.000Z | 2021-12-01T10:20:36.000Z | meshless/espim/tests/test_calc_linear_buckling.py | compmech/particles | d23ae69ad4c79024b997a232247b4ae0e1e7031c | [
"BSD-2-Clause"
] | 2 | 2017-12-27T11:07:04.000Z | 2019-01-22T19:34:33.000Z | meshless/espim/tests/test_calc_linear_buckling.py | compmech/particles | d23ae69ad4c79024b997a232247b4ae0e1e7031c | [
"BSD-2-Clause"
] | 4 | 2017-05-17T17:53:20.000Z | 2019-04-03T01:57:58.000Z | import os
import inspect
import numpy as np
from scipy.sparse import coo_matrix
from composites.laminate import read_stack
from structsolve import solve, lb
from meshless.espim.read_mesh import read_mesh
from meshless.espim.plate2d_calc_k0 import calc_k0
from meshless.espim.plate2d_calc_kG import calc_kG
from meshles... | 35.434783 | 82 | 0.556237 |
5173351f35e6ac652b6fa2032edeaeeddae7712f | 1,966 | py | Python | rtui/tui.py | trickeydan/rtui | 581c3984127e673eae09b9660f66b11d9afec7a9 | [
"MIT"
] | null | null | null | rtui/tui.py | trickeydan/rtui | 581c3984127e673eae09b9660f66b11d9afec7a9 | [
"MIT"
] | null | null | null | rtui/tui.py | trickeydan/rtui | 581c3984127e673eae09b9660f66b11d9afec7a9 | [
"MIT"
] | null | null | null | """The TUI class."""
import asyncio
from prompt_toolkit import PromptSession, print_formatted_text
from rtui.astoria import AstoriaIntegration
from .commands import COMMANDS
from .parser import parse_command
from .validator import CommandValidator
class TUI:
"""The Terminal User Interface."""
def __init_... | 28.492754 | 89 | 0.610885 |
b86a23f2fa73336970e53c830cf898da7e34d31e | 42,976 | py | Python | tensorflow_federated/python/core/impl/executors/federating_executor_test.py | harshkasyap/federated | ecf51cdf8b86cbd000f6edc5715dc904bce07540 | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/core/impl/executors/federating_executor_test.py | harshkasyap/federated | ecf51cdf8b86cbd000f6edc5715dc904bce07540 | [
"Apache-2.0"
] | 8 | 2019-08-06T06:12:07.000Z | 2019-12-19T02:06:17.000Z | tensorflow_federated/python/core/impl/executors/federating_executor_test.py | Junyangz/federated | ecf51cdf8b86cbd000f6edc5715dc904bce07540 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2019, The TensorFlow Federated 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 ... | 45.525424 | 95 | 0.760052 |
0af59d90b033502d2c2b42ca7c1d580ffc3e6080 | 2,959 | py | Python | fluent_contents/plugins/oembeditem/backend.py | django-fluent/django-fluent-contents | 5577567303d29b56fd48128c22c7dc5d8b2c7476 | [
"Apache-2.0"
] | 82 | 2016-07-21T08:43:47.000Z | 2021-12-21T09:23:42.000Z | fluent_contents/plugins/oembeditem/backend.py | edoburu/django-fluent-contents | 5577567303d29b56fd48128c22c7dc5d8b2c7476 | [
"Apache-2.0"
] | 47 | 2015-01-30T22:08:12.000Z | 2016-05-30T16:18:17.000Z | fluent_contents/plugins/oembeditem/backend.py | django-fluent/django-fluent-contents | 5577567303d29b56fd48128c22c7dc5d8b2c7476 | [
"Apache-2.0"
] | 17 | 2016-09-03T05:38:52.000Z | 2020-10-04T03:19:16.000Z | """
Backend for fetching OEmbed data.
This module can also be used by other external apps.
"""
import threading
from django.core.exceptions import ImproperlyConfigured
from micawber import Provider, ProviderRegistry, bootstrap_basic, bootstrap_embedly
from micawber.providers import bootstrap_noembed # Export was mis... | 31.478723 | 111 | 0.703616 |
895d012fd21cbc129ba7863135c9966ccf4544da | 715 | py | Python | manage.py | Chamane/django-starter-project | 11ee773c3d105826d9d9b8ee492bb57252c2e75c | [
"MIT"
] | 1 | 2019-10-20T05:11:33.000Z | 2019-10-20T05:11:33.000Z | manage.py | Chamane/django-skeleton | 11ee773c3d105826d9d9b8ee492bb57252c2e75c | [
"MIT"
] | 4 | 2021-06-08T20:30:10.000Z | 2022-03-12T00:02:36.000Z | manage.py | Chamane/django-foundation | 11ee773c3d105826d9d9b8ee492bb57252c2e75c | [
"MIT"
] | 1 | 2020-08-12T10:49:25.000Z | 2020-08-12T10:49:25.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
# config.settings.production to config.settings.local if running in local
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.production')
try:
from django.core.managem... | 31.086957 | 81 | 0.696503 |
08ffa47c81a70209914229c58fd14751648c8fe9 | 959 | py | Python | app/dataset/utils.py | toshiks/number_recognizer | 5dee9da830d1a790578eceb923ebf7ffc776339b | [
"MIT"
] | null | null | null | app/dataset/utils.py | toshiks/number_recognizer | 5dee9da830d1a790578eceb923ebf7ffc776339b | [
"MIT"
] | null | null | null | app/dataset/utils.py | toshiks/number_recognizer | 5dee9da830d1a790578eceb923ebf7ffc776339b | [
"MIT"
] | null | null | null | from typing import Dict
from .word_to_number_dicts import COMPONENT_NUMBERS, THOUSANDS
def get_alphabet() -> str:
"""
:return: alphabet with last blank symbol
"""
return ' абвгдеёжзийклмнопрстуфхцчшщъыьэюя_'
def get_blank_id() -> int:
return get_alphabet().index('_')
def get_letter_to_index_m... | 22.833333 | 73 | 0.626694 |
4bb6e3b9bb724a63b8bc4ee0c6272a0074e3149a | 8,796 | py | Python | slalom/bayesnet/expressionnet.py | dburkhardt/slalom | 547a56316e5c3ccc63e592eb907dc53b00212466 | [
"Apache-2.0"
] | 24 | 2017-10-30T13:58:51.000Z | 2021-08-14T17:07:46.000Z | slalom/bayesnet/expressionnet.py | dburkhardt/slalom | 547a56316e5c3ccc63e592eb907dc53b00212466 | [
"Apache-2.0"
] | 6 | 2017-11-11T04:49:01.000Z | 2019-12-24T13:24:50.000Z | slalom/bayesnet/expressionnet.py | dburkhardt/slalom | 547a56316e5c3ccc63e592eb907dc53b00212466 | [
"Apache-2.0"
] | 5 | 2018-01-09T12:19:31.000Z | 2019-11-26T17:01:57.000Z | # Copyright(c) 2016, The f-scLVM developers (Florian Buettner, Oliver Stegle)
#
#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... | 38.077922 | 275 | 0.656207 |
28e6305afc6a41773e26951a1f962724ab876d78 | 8,781 | py | Python | sdk/python/pulumi_azure_native/apimanagement/v20200601preview/get_identity_provider.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/v20200601preview/get_identity_provider.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/v20200601preview/get_identity_provider.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 41.419811 | 313 | 0.678738 |
48797ff993ca8371e6596a44d04d160789db95d9 | 2,352 | py | Python | lib/surface/runtime_config/configs/waiters/delete.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/runtime_config/configs/waiters/delete.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/runtime_config/configs/waiters/delete.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 30.153846 | 76 | 0.710884 |
541636f698b77050495d0573c89e5323c340bc09 | 2,080 | py | Python | elsie/slides/slide.py | spirali/elsie | c221ed68f85d1d5c80b1a58bfc7a473eb1b712d5 | [
"MIT"
] | 30 | 2018-05-21T13:26:47.000Z | 2021-11-08T11:25:13.000Z | elsie/slides/slide.py | spirali/elsie | c221ed68f85d1d5c80b1a58bfc7a473eb1b712d5 | [
"MIT"
] | 30 | 2019-01-04T21:21:41.000Z | 2022-02-05T18:05:30.000Z | elsie/slides/slide.py | spirali/elsie | c221ed68f85d1d5c80b1a58bfc7a473eb1b712d5 | [
"MIT"
] | 4 | 2018-08-17T04:59:40.000Z | 2021-01-02T17:03:30.000Z | import os.path
from typing import TYPE_CHECKING
from ..boxtree.box import Box
from ..boxtree.layout import Layout
from ..render import jupyter
from ..render.render import ExportedRenderUnit
from ..utils.geom import Rect
from .show import ShowInfo
if TYPE_CHECKING:
from . import slidedeck
class Slide:
def __... | 25.060241 | 71 | 0.612981 |
7aaa68748b1e1fd6c1d47f46552f941586dd133c | 3,982 | py | Python | mpath/layer/ganglion.py | cantordust/mpath | 1930af78d751cb152e545e52aeaa88c7c3062121 | [
"MIT"
] | 2 | 2021-06-05T12:16:22.000Z | 2021-06-21T07:08:40.000Z | mpath/layer/ganglion.py | cantordust/mpath | 1930af78d751cb152e545e52aeaa88c7c3062121 | [
"MIT"
] | null | null | null | mpath/layer/ganglion.py | cantordust/mpath | 1930af78d751cb152e545e52aeaa88c7c3062121 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Global imports
# ------------------------------------------------------------------------------
# *** Type hints *** #
from typing import Optional
# *** PyTorch & numerical libs *** #
import torch as pt
# ------------------------------... | 26.905405 | 87 | 0.504018 |
b974d78a6533e0f54c27bad591af46b1861ea727 | 2,885 | py | Python | tests/deploy/test_bad_call.py | calestar/cloudformation-helper | 3e329261518a8bef827adbaad59f8e46d4fa7e3a | [
"MIT"
] | null | null | null | tests/deploy/test_bad_call.py | calestar/cloudformation-helper | 3e329261518a8bef827adbaad59f8e46d4fa7e3a | [
"MIT"
] | 7 | 2021-04-30T03:45:34.000Z | 2021-09-04T18:27:16.000Z | tests/deploy/test_bad_call.py | calestar/cloudformation-helper | 3e329261518a8bef827adbaad59f8e46d4fa7e3a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Tests for bad calls to deploy."""
import pytest
import mock
import os
from cloudformation_helper.utils import aws
from ..helpers import call_cfhelper, cfhelper_mocks
HERE = os.path.dirname(os.path.realpath(__file__))
CONFIG_DIR = os.path.join(HERE, "..", "data", "config")
@mock.patch.obj... | 33.16092 | 101 | 0.617331 |
30d77d8d43cddd1a8afc28d0e1b64522eb4eeea6 | 105 | py | Python | rasa_nlu_examples/extractors/__init__.py | armanjindal/rasa-nlu-examples | 05aabf18182a1b9ef8b4fcb40d99c1dd597a63c0 | [
"Apache-2.0"
] | null | null | null | rasa_nlu_examples/extractors/__init__.py | armanjindal/rasa-nlu-examples | 05aabf18182a1b9ef8b4fcb40d99c1dd597a63c0 | [
"Apache-2.0"
] | null | null | null | rasa_nlu_examples/extractors/__init__.py | armanjindal/rasa-nlu-examples | 05aabf18182a1b9ef8b4fcb40d99c1dd597a63c0 | [
"Apache-2.0"
] | null | null | null | from .flashtext_entity_extractor import FlashTextEntityExtractor
__all__ = ["FlashTextEntityExtractor"]
| 26.25 | 64 | 0.866667 |
534220165b486d1cac7c4573662613d33b306e0d | 977 | py | Python | flask_rest_service/__init__.py | Danni40/WODBucket | e77a653ae89bd30c1a69fd578f574dc46e66cb4e | [
"MIT"
] | null | null | null | flask_rest_service/__init__.py | Danni40/WODBucket | e77a653ae89bd30c1a69fd578f574dc46e66cb4e | [
"MIT"
] | 14 | 2018-11-09T18:49:30.000Z | 2018-12-10T23:23:16.000Z | flask_rest_service/__init__.py | Danni40/WODBucket | e77a653ae89bd30c1a69fd578f574dc46e66cb4e | [
"MIT"
] | null | null | null | import os
from flask import Flask
from flask_restful import Resource, Api
from flask_pymongo import PyMongo
from pymongo import MongoClient
from flask import make_response
from bson.json_util import dumps
import requests
#MONGO_URL = os.environ.get('MONGO_URL')
#if not MONGO_URL:
#MONGO_URL = 'mongodb://127.0.0.1... | 28.735294 | 94 | 0.760491 |
3ee47fcbff1b234bb007fa9db2731dfde0b631c5 | 350 | py | Python | src/automotive/core/can/hardware/zlg/__init__.py | philosophy912/automotive | de918611652b789a83545f346c1569c2c2c955a6 | [
"Apache-2.0"
] | null | null | null | src/automotive/core/can/hardware/zlg/__init__.py | philosophy912/automotive | de918611652b789a83545f346c1569c2c2c955a6 | [
"Apache-2.0"
] | null | null | null | src/automotive/core/can/hardware/zlg/__init__.py | philosophy912/automotive | de918611652b789a83545f346c1569c2c2c955a6 | [
"Apache-2.0"
] | 1 | 2022-02-28T07:23:28.000Z | 2022-02-28T07:23:28.000Z | # -*- coding:utf-8 -*-
# --------------------------------------------------------
# Copyright (C), 2016-2020, lizhe, All rights reserved
# --------------------------------------------------------
# @Name: __init__.py.py
# @Author: lizhe
# @Created: 2022/1/26 - 10:15
# ----------------------------... | 38.888889 | 59 | 0.271429 |
a29544b3cec6dc2568b8955375a0bc5b5c7dd202 | 8,880 | py | Python | src/mongoserver.py | canonical/mongodb-k8s-operator | abeb1d1b9bd8ebc3de476d0acc826f9ec8395498 | [
"Apache-2.0"
] | 1 | 2022-03-15T12:07:55.000Z | 2022-03-15T12:07:55.000Z | src/mongoserver.py | canonical/mongodb-k8s-operator | abeb1d1b9bd8ebc3de476d0acc826f9ec8395498 | [
"Apache-2.0"
] | 13 | 2021-12-07T14:43:01.000Z | 2022-03-01T10:41:09.000Z | src/mongoserver.py | canonical/mongodb-k8s-operator | abeb1d1b9bd8ebc3de476d0acc826f9ec8395498 | [
"Apache-2.0"
] | 2 | 2022-01-26T00:05:42.000Z | 2022-03-15T09:43:29.000Z | import secrets
import string
from pymongo import MongoClient
from pymongo.errors import (
AutoReconnect,
OperationFailure,
ServerSelectionTimeoutError
)
import logging
logger = logging.getLogger(__name__)
# We expect the mongodb container to use the
# default ports
MONGODB_PORT = 27017
class MongoDB()... | 30 | 85 | 0.553941 |
e61364cd4a8fb65801ff24c1e87770b220bf65e7 | 2,307 | py | Python | epytope/Data/pssms/smm/mat/A_32_01_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 7 | 2021-02-01T18:11:28.000Z | 2022-01-31T19:14:07.000Z | epytope/Data/pssms/smm/mat/A_32_01_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 22 | 2021-01-02T15:25:23.000Z | 2022-03-14T11:32:53.000Z | epytope/Data/pssms/smm/mat/A_32_01_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 4 | 2021-05-28T08:50:38.000Z | 2022-03-14T11:45:32.000Z | A_32_01_9 = {0: {'A': -0.259, 'C': 0.369, 'E': 0.72, 'D': 0.401, 'G': 0.124, 'F': 0.273, 'I': -0.124, 'H': -0.215, 'K': -1.069, 'M': -0.616, 'L': 0.1, 'N': 0.448, 'Q': -0.166, 'P': 0.53, 'S': -0.364, 'R': -0.993, 'T': 0.085, 'W': 0.196, 'V': 0.187, 'Y': 0.372}, 1: {'A': 0.041, 'C': -0.147, 'E': 0.323, 'D': 0.625, 'G': ... | 2,307 | 2,307 | 0.394452 |
c3ff9336b58e5b924d3dbd3fc78bf1073cc37cac | 1,278 | bzl | Python | pug/pug_repositories.bzl | LiveHappier/rules_pug | 2618c388c390fbbcf8d87493a35e9fc6682e3fac | [
"MIT"
] | 2 | 2019-09-25T08:19:47.000Z | 2021-06-13T22:02:23.000Z | pug/pug_repositories.bzl | LiveHappier/rules_pug | 2618c388c390fbbcf8d87493a35e9fc6682e3fac | [
"MIT"
] | 1 | 2021-05-10T05:41:05.000Z | 2021-05-10T05:41:05.000Z | pug/pug_repositories.bzl | LiveHappier/rules_pug | 2618c388c390fbbcf8d87493a35e9fc6682e3fac | [
"MIT"
] | null | null | null | # Copyright 2019 LiveHappier. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 37.588235 | 91 | 0.7277 |
652052ba31cadb6addc57e6417d4e096ce84ef1f | 1,547 | py | Python | page_content_extractor.py | Nymphet/sexinsex-content-spider | 392d25b4329b3a771dd43ae23cfd8643fae4c241 | [
"Apache-2.0"
] | 28 | 2016-02-08T13:31:18.000Z | 2021-07-11T21:56:55.000Z | page_content_extractor.py | Nymphet/sexinsex-content-spider | 392d25b4329b3a771dd43ae23cfd8643fae4c241 | [
"Apache-2.0"
] | 1 | 2018-04-26T15:59:44.000Z | 2018-04-26T15:59:44.000Z | page_content_extractor.py | Nymphet/sexinsex-content-spider | 392d25b4329b3a771dd43ae23cfd8643fae4c241 | [
"Apache-2.0"
] | 12 | 2016-04-26T13:30:33.000Z | 2021-05-22T14:17:58.000Z | # -*- coding: utf-8 -*-
''' Used to extract the main contents of html files saved in ./html folder.
Extracted contents are saved in ./text folder. '''
from urllib import parse
import os, re
path = os.path.abspath('.')
title = re.compile(r'''<title>(.*)</title>''')
contentline = re.compile(r'''(.*)<br />''')
fa... | 28.648148 | 89 | 0.465417 |
3cb31c7c3fa246763f0964530c696276930bd81f | 5,896 | py | Python | systems/naturalNonCondon/monomerDoubleMass.py | jgoodknight/spectroscopy | 5c41852dff8d02fe49395ecc5cd36902ec867033 | [
"MIT"
] | 6 | 2017-04-06T00:47:24.000Z | 2020-05-12T19:33:39.000Z | systems/naturalNonCondon/monomerDoubleMass.py | jgoodknight/spectroscopy | 5c41852dff8d02fe49395ecc5cd36902ec867033 | [
"MIT"
] | null | null | null | systems/naturalNonCondon/monomerDoubleMass.py | jgoodknight/spectroscopy | 5c41852dff8d02fe49395ecc5cd36902ec867033 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Jan 04 13:23:27 2013
@author: Joey
"""
import numpy as np
import spectroscopy.Spacetime as Spacetime
import spectroscopy.ElectronicOperator as ElectronicOperator
import spectroscopy.NuclearWavefunction as NuclearWavefunction
import spectroscopy.NuclearOperator as ... | 42.724638 | 148 | 0.711839 |
b70b904adca0d7c8b66bb198e05025f12d2c55a2 | 2,163 | py | Python | Face_detection/face_detect.py | NikhilMunna/Computer-Vision | 8c988e96444001a627a781e2dfe2f66967097e47 | [
"Apache-2.0"
] | null | null | null | Face_detection/face_detect.py | NikhilMunna/Computer-Vision | 8c988e96444001a627a781e2dfe2f66967097e47 | [
"Apache-2.0"
] | null | null | null | Face_detection/face_detect.py | NikhilMunna/Computer-Vision | 8c988e96444001a627a781e2dfe2f66967097e47 | [
"Apache-2.0"
] | null | null | null | # USAGE
# python face_detect.py --image rooster.jpg --prototxt deploy.prototxt.txt --model res10_300x300_ssd_iter_140000.caffemodel
import numpy as np
import argparse
import cv2
class Detect():
def __init__(self,image,args):
self.image = image
self.args = args
def load_model(self):
... | 31.808824 | 123 | 0.565881 |
5477382dfc831472da8a69788181f2242f0a5eb0 | 2,425 | py | Python | azure-servicefabric/azure/servicefabric/models/service_replica_description.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-servicefabric/azure/servicefabric/models/service_replica_description.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-servicefabric/azure/servicefabric/models/service_replica_description.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-10-16T13:08:23.000Z | 2018-10-16T13:08:23.000Z | # 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 ... | 44.090909 | 93 | 0.66268 |
24420e75a21d3cd6411f0968583089a531197047 | 416 | py | Python | pytest_masksecret.py | lockefox/pytest-masksecret | 3a882f31812cc5f3b80d89dc5d5fc2c49c73284b | [
"MIT"
] | null | null | null | pytest_masksecret.py | lockefox/pytest-masksecret | 3a882f31812cc5f3b80d89dc5d5fc2c49c73284b | [
"MIT"
] | null | null | null | pytest_masksecret.py | lockefox/pytest-masksecret | 3a882f31812cc5f3b80d89dc5d5fc2c49c73284b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
def pytest_addoption(parser):
group = parser.getgroup('masksecret')
group.addoption(
'--foo',
action='store',
dest='dest_foo',
default='2019',
help='Set the value for the fixture "bar".'
)
parser.addini('HELLO', 'Dummy pyt... | 18.909091 | 54 | 0.612981 |
0c382c1d75baf5c3f44bbdd91b91d3b80095d76d | 199 | py | Python | Su_An.py | cafesao/Programas_Python | 5ccd619ff1d0ef95a85a40296b032bf49892bf15 | [
"MIT"
] | 1 | 2019-09-14T00:21:59.000Z | 2019-09-14T00:21:59.000Z | Su_An.py | cafesao/Programas_Python | 5ccd619ff1d0ef95a85a40296b032bf49892bf15 | [
"MIT"
] | null | null | null | Su_An.py | cafesao/Programas_Python | 5ccd619ff1d0ef95a85a40296b032bf49892bf15 | [
"MIT"
] | null | null | null | # Mostra o sucessor e o antecessor do numero informado.
n1 = int(input('Digite um numero: '))
s = n1 + 1
a = n1 - 1
print(f'O valor informado foi {n1}, o sucessor é {s} e o antecessor é {a}') | 28.428571 | 75 | 0.638191 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.