hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
7909572bede990f9b53097f120a918d09550c5b9
49,660
py
Python
homeassistant/helpers/template.py
sjapkuh/core
8ce74e598d844d0b51aeb29983a2d7f114447c50
[ "Apache-2.0" ]
1
2021-04-28T09:51:08.000Z
2021-04-28T09:51:08.000Z
homeassistant/helpers/template.py
sjapkuh/core
8ce74e598d844d0b51aeb29983a2d7f114447c50
[ "Apache-2.0" ]
null
null
null
homeassistant/helpers/template.py
sjapkuh/core
8ce74e598d844d0b51aeb29983a2d7f114447c50
[ "Apache-2.0" ]
null
null
null
"""Template helper methods for rendering strings with Home Assistant data.""" from __future__ import annotations from ast import literal_eval import asyncio import base64 import collections.abc from contextlib import suppress from contextvars import ContextVar from datetime import datetime, timedelta from functools im...
31.853752
269
0.627608
from __future__ import annotations from ast import literal_eval import asyncio import base64 import collections.abc from contextlib import suppress from contextvars import ContextVar from datetime import datetime, timedelta from functools import partial, wraps import json import logging import math from operator impor...
true
true
790957303a40af280cf03c383e65c99b8f7a1584
2,732
py
Python
unit_tests_programs.py
agissaud/DeepSynth
b99c517dce2aad8413f97816cfb63599a32297f0
[ "MIT" ]
21
2021-07-16T10:01:26.000Z
2022-03-10T20:54:55.000Z
unit_tests_programs.py
agissaud/DeepSynth
b99c517dce2aad8413f97816cfb63599a32297f0
[ "MIT" ]
1
2022-02-28T10:13:03.000Z
2022-03-20T11:43:47.000Z
unit_tests_programs.py
agissaud/DeepSynth
b99c517dce2aad8413f97816cfb63599a32297f0
[ "MIT" ]
1
2022-02-19T13:59:38.000Z
2022-02-19T13:59:38.000Z
import logging import unittest import random from math import sqrt from scipy.stats import chisquare from type_system import Type, PolymorphicType, PrimitiveType, Arrow, List, UnknownType, INT, BOOL, STRING from program import Program, Function, Variable, BasicPrimitive, New from program_as_list import evaluation_from...
35.025641
105
0.640922
import logging import unittest import random from math import sqrt from scipy.stats import chisquare from type_system import Type, PolymorphicType, PrimitiveType, Arrow, List, UnknownType, INT, BOOL, STRING from program import Program, Function, Variable, BasicPrimitive, New from program_as_list import evaluation_from...
true
true
790958e7c2ae5383a0fadfe6f7a7949967b32877
1,446
py
Python
cogscripts/codegen/source.py
DaelonSuzuka/XC8-Toolchain
aaf2bca7ba471cf05875902beb6a46f9eb3086ea
[ "MIT" ]
6
2020-06-08T03:06:35.000Z
2021-12-15T03:09:23.000Z
cogscripts/codegen/source.py
DaelonSuzuka/XC8-Toolchain
aaf2bca7ba471cf05875902beb6a46f9eb3086ea
[ "MIT" ]
2
2020-06-13T18:23:19.000Z
2020-06-13T19:23:30.000Z
cogscripts/codegen/source.py
DaelonSuzuka/Easy-XC8
dcb5da0c6561236f533fb014655f3296d64bd17b
[ "MIT" ]
1
2020-06-08T02:48:03.000Z
2020-06-08T02:48:03.000Z
from pathlib import Path from .utils import hrule, fmt class SourceFile: def __init__(self, name='', contents=[], includes=[]): self.contents = [] self.includes = [] self.name = name self.add_contents(contents) self.add_includes(includes) def add_includes(self, include...
25.821429
73
0.514523
from pathlib import Path from .utils import hrule, fmt class SourceFile: def __init__(self, name='', contents=[], includes=[]): self.contents = [] self.includes = [] self.name = name self.add_contents(contents) self.add_includes(includes) def add_includes(self, include...
true
true
79095acfc9f96ae6b1ed9b0caee97024b4bae24f
627
py
Python
contrib/qt_translations.py
PsyTeck/astercoin
62bd370211e666259092e4de1db668be474fa954
[ "MIT" ]
null
null
null
contrib/qt_translations.py
PsyTeck/astercoin
62bd370211e666259092e4de1db668be474fa954
[ "MIT" ]
null
null
null
contrib/qt_translations.py
PsyTeck/astercoin
62bd370211e666259092e4de1db668be474fa954
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Helpful little script that spits out a comma-separated list of # language codes for Qt icons that should be included # in binary Astercoin Core distributions import glob import os import re import sys if len(sys.argv) != 3: sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%...
27.26087
112
0.685805
import glob import os import re import sys if len(sys.argv) != 3: sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%sys.argv[0]) d1 = sys.argv[1] d2 = sys.argv[2] l1 = set([ re.search(r'qt_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d1, 'qt_*.qm')) ]) l2 = set([ re.search(r'asterco...
false
true
79095bd6f921f19d13fce7759de8d36354ff739c
633
py
Python
Blog/urls.py
Roy-Kid/my_blog
5f59629c7bff8c2ccef271b7dec600da7076008d
[ "MIT" ]
null
null
null
Blog/urls.py
Roy-Kid/my_blog
5f59629c7bff8c2ccef271b7dec600da7076008d
[ "MIT" ]
null
null
null
Blog/urls.py
Roy-Kid/my_blog
5f59629c7bff8c2ccef271b7dec600da7076008d
[ "MIT" ]
null
null
null
from django.urls import path, include from .views import * from django.contrib import admin app_name = 'Blog' urlpatterns = [ path('', Blog_index.as_view(), name='blog_index'), path('', include('Usermanagement.urls', namespace='Usermanagement'), name='usermanagement'), path('create_article/', article_cre...
39.5625
100
0.71406
from django.urls import path, include from .views import * from django.contrib import admin app_name = 'Blog' urlpatterns = [ path('', Blog_index.as_view(), name='blog_index'), path('', include('Usermanagement.urls', namespace='Usermanagement'), name='usermanagement'), path('create_article/', article_cre...
true
true
79095c5bde54651b2c24d633d01769c5df3f7fb7
2,048
py
Python
lda/offline_analysis/ms2lda_runfull_test.py
sdrogers/ms2ldaviz
ba311bc80891da595d2d6cef4abda95ab583c201
[ "MIT" ]
6
2017-10-27T02:37:55.000Z
2020-11-07T15:43:57.000Z
lda/offline_analysis/ms2lda_runfull_test.py
sdrogers/ms2ldaviz
ba311bc80891da595d2d6cef4abda95ab583c201
[ "MIT" ]
134
2016-07-20T08:35:34.000Z
2020-07-22T13:51:49.000Z
lda/offline_analysis/ms2lda_runfull_test.py
sdrogers/ms2ldaviz
ba311bc80891da595d2d6cef4abda95ab583c201
[ "MIT" ]
9
2016-07-19T15:39:27.000Z
2020-02-11T16:13:14.000Z
import json # try: # redis_connection = redis.Redis(host='dorresteinappshub.ucsd.edu', port=6378, db=0) # except: # redis_connection = None redis_connection = None def acquire_motifdb(db_list): db_list_key = json.dumps(db_list) if redis_connection is not None: if redis_connection.exists(db_li...
32
120
0.708984
import json redis_connection = None def acquire_motifdb(db_list): db_list_key = json.dumps(db_list) if redis_connection is not None: if redis_connection.exists(db_list_key): cached_data = json.loads(redis_connection.get(db_list_key)) return cached_data["motifdb_spectra"], ...
true
true
79095d1a9a26805dd72d249005317e0933a0e56a
1,796
py
Python
test/utils/test_subgraph.py
LingxiaoShawn/pytorch_geometric
50b7bfc4a59b5b6f7ec547ff862985f3b2e22798
[ "MIT" ]
1
2022-02-21T13:23:19.000Z
2022-02-21T13:23:19.000Z
test/utils/test_subgraph.py
LingxiaoShawn/pytorch_geometric
50b7bfc4a59b5b6f7ec547ff862985f3b2e22798
[ "MIT" ]
null
null
null
test/utils/test_subgraph.py
LingxiaoShawn/pytorch_geometric
50b7bfc4a59b5b6f7ec547ff862985f3b2e22798
[ "MIT" ]
null
null
null
import torch from torch_geometric.utils import k_hop_subgraph, subgraph def test_subgraph(): edge_index = torch.tensor([ [0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6], [1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5], ]) edge_attr = torch.Tensor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) idx = torch.tensor...
33.886792
79
0.505011
import torch from torch_geometric.utils import k_hop_subgraph, subgraph def test_subgraph(): edge_index = torch.tensor([ [0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6], [1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5], ]) edge_attr = torch.Tensor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) idx = torch.tensor...
true
true
79095d3d24ae820ec02e92a2821bfe50c6cdb766
14,769
py
Python
InteractiveHtmlBom/dialog/settings_dialog.py
instalator/InteractiveHtmlBom
c9cc30ae157af9f7d01420b87cbc9a29c7074dd7
[ "MIT" ]
2,101
2018-07-25T12:21:29.000Z
2022-03-31T19:49:14.000Z
InteractiveHtmlBom/dialog/settings_dialog.py
janf228/InteractiveHtmlBom
a3293076d33f547ee6f00271cc537a09d94a48af
[ "MIT" ]
281
2018-07-26T05:15:25.000Z
2022-03-23T18:53:19.000Z
InteractiveHtmlBom/dialog/settings_dialog.py
janf228/InteractiveHtmlBom
a3293076d33f547ee6f00271cc537a09d94a48af
[ "MIT" ]
270
2018-07-31T11:49:04.000Z
2022-03-29T11:05:10.000Z
import os import re import wx import wx.grid from . import dialog_base def pop_error(msg): wx.MessageBox(msg, 'Error', wx.OK | wx.ICON_ERROR) class SettingsDialog(dialog_base.SettingsDialogBase): def __init__(self, extra_data_func, extra_data_wildcard, config_save_func, file_name_format_h...
41.957386
79
0.644458
import os import re import wx import wx.grid from . import dialog_base def pop_error(msg): wx.MessageBox(msg, 'Error', wx.OK | wx.ICON_ERROR) class SettingsDialog(dialog_base.SettingsDialogBase): def __init__(self, extra_data_func, extra_data_wildcard, config_save_func, file_name_format_h...
true
true
79095d614b0f790eca41bfdb5c6bedbf76809a7c
5,163
py
Python
tools/pot/tests/test_wrong_config.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
1,127
2018-10-15T14:36:58.000Z
2020-04-20T09:29:44.000Z
tools/pot/tests/test_wrong_config.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
439
2018-10-20T04:40:35.000Z
2020-04-19T05:56:25.000Z
tools/pot/tests/test_wrong_config.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
414
2018-10-17T05:53:46.000Z
2020-04-16T17:29:53.000Z
# Copyright (C) 2020-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import os import pytest from openvino.tools.pot.configs.config import Config from .utils.path import TOOL_CONFIG_PATH ALGORITHM_SETTINGS = { 'wrong_preset': ( { 'name': 'MinMaxQuantization', 'params'...
32.26875
103
0.427077
import os import pytest from openvino.tools.pot.configs.config import Config from .utils.path import TOOL_CONFIG_PATH ALGORITHM_SETTINGS = { 'wrong_preset': ( { 'name': 'MinMaxQuantization', 'params': { 'perset': 'accuracy', 'stat_subset_size': 1 ...
true
true
79095db862ccd9fa49f3ae5abeb1aa6fb7a65a18
4,529
py
Python
Django_app/Django_app/settings.py
MartinBruveris/FinalYearProject
96c109bbce745c52b53b41c757ab3ca431e79493
[ "MIT" ]
null
null
null
Django_app/Django_app/settings.py
MartinBruveris/FinalYearProject
96c109bbce745c52b53b41c757ab3ca431e79493
[ "MIT" ]
null
null
null
Django_app/Django_app/settings.py
MartinBruveris/FinalYearProject
96c109bbce745c52b53b41c757ab3ca431e79493
[ "MIT" ]
null
null
null
""" Django settings for Django_app project. Generated by 'django-admin startproject' using Django 1.11.5. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import...
25.587571
91
0.666372
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'oy*@!577+db+r(d$6d1x*ftp*5v-0#+3cac^0f7-+c0%6xhg$$' DEBUG = True ALLOWED_HOSTS = ['*', ] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.co...
true
true
79095dbf1c8a9e7b21bba3e2ae8a8347eafaeb43
819
py
Python
test/asyncpg/test_postgresql.py
adriangb/migri
691713c8f3efbfc433a339072fba66f0b8c163de
[ "MIT" ]
11
2020-11-25T18:25:04.000Z
2022-03-09T20:27:03.000Z
test/asyncpg/test_postgresql.py
adriangb/migri
691713c8f3efbfc433a339072fba66f0b8c163de
[ "MIT" ]
46
2019-12-11T16:24:44.000Z
2022-02-21T23:45:54.000Z
test/asyncpg/test_postgresql.py
adriangb/migri
691713c8f3efbfc433a339072fba66f0b8c163de
[ "MIT" ]
1
2022-02-15T06:38:34.000Z
2022-02-15T06:38:34.000Z
import pytest from migri.backends.postgresql import PostgreSQLConnection from test import QUERIES @pytest.mark.parametrize( "query_element,expected_query,expected_values", [ (QUERIES[0], "INSERT INTO mytable (a) VALUES ($1), ($2)", [150, 300]), (QUERIES[1], "UPDATE tbl SET info=$2 WHERE id=$1...
30.333333
78
0.589744
import pytest from migri.backends.postgresql import PostgreSQLConnection from test import QUERIES @pytest.mark.parametrize( "query_element,expected_query,expected_values", [ (QUERIES[0], "INSERT INTO mytable (a) VALUES ($1), ($2)", [150, 300]), (QUERIES[1], "UPDATE tbl SET info=$2 WHERE id=$1...
true
true
79095e078b9d5efc3c6bd59cedd2e6f83016271b
2,081
py
Python
Music/play.py
Aggis15/T4NK0R
05d1791e51f50bcb44c56ca936e5a11b7de21fb1
[ "MIT" ]
null
null
null
Music/play.py
Aggis15/T4NK0R
05d1791e51f50bcb44c56ca936e5a11b7de21fb1
[ "MIT" ]
null
null
null
Music/play.py
Aggis15/T4NK0R
05d1791e51f50bcb44c56ca936e5a11b7de21fb1
[ "MIT" ]
null
null
null
import asyncio import discord from discord.ext import commands from discord.commands import slash_command, Option import wavelink import json from dotenv import load_dotenv import os load_dotenv() # Initiate json file = open("config.json") data = json.load(file) # Public variables guildID = data["guildID"][0] clas...
30.15942
98
0.623258
import asyncio import discord from discord.ext import commands from discord.commands import slash_command, Option import wavelink import json from dotenv import load_dotenv import os load_dotenv() file = open("config.json") data = json.load(file) guildID = data["guildID"][0] class musicPlay(commands.Cog): de...
true
true
79095e1867949a8bdede7f885705472ef86e6972
2,622
py
Python
bdd/contact_steps.py
kasiazubielik/python_training
471a5eb726f238b02ccef5819a7dbffdf20e5deb
[ "Apache-2.0" ]
null
null
null
bdd/contact_steps.py
kasiazubielik/python_training
471a5eb726f238b02ccef5819a7dbffdf20e5deb
[ "Apache-2.0" ]
null
null
null
bdd/contact_steps.py
kasiazubielik/python_training
471a5eb726f238b02ccef5819a7dbffdf20e5deb
[ "Apache-2.0" ]
null
null
null
from pytest_bdd import given, when, then from model.contact import Contact import random @given('a contact list') def contact_list(db): return db.get_contact_list() @given('a contact with <firstname> and <lastname>') def new_contact(firstname, lastname): return Contact(firstname=firstname, lastname=lastname...
39.134328
123
0.764302
from pytest_bdd import given, when, then from model.contact import Contact import random @given('a contact list') def contact_list(db): return db.get_contact_list() @given('a contact with <firstname> and <lastname>') def new_contact(firstname, lastname): return Contact(firstname=firstname, lastname=lastname...
true
true
79095e3e743cad98ec718443620355332fe8ee5b
41,298
py
Python
testing/test_doctest.py
NNRepos/pytest
4946cc82825c277754979cf6ea995482e5b1e2d5
[ "MIT" ]
null
null
null
testing/test_doctest.py
NNRepos/pytest
4946cc82825c277754979cf6ea995482e5b1e2d5
[ "MIT" ]
null
null
null
testing/test_doctest.py
NNRepos/pytest
4946cc82825c277754979cf6ea995482e5b1e2d5
[ "MIT" ]
null
null
null
import inspect import textwrap import pytest from _pytest.compat import MODULE_NOT_FOUND_ERROR from _pytest.doctest import _get_checker from _pytest.doctest import _is_mocked from _pytest.doctest import _patch_unwrap_mock_aware from _pytest.doctest import DoctestItem from _pytest.doctest import DoctestModule from _pyt...
29.477516
109
0.46041
import inspect import textwrap import pytest from _pytest.compat import MODULE_NOT_FOUND_ERROR from _pytest.doctest import _get_checker from _pytest.doctest import _is_mocked from _pytest.doctest import _patch_unwrap_mock_aware from _pytest.doctest import DoctestItem from _pytest.doctest import DoctestModule from _pyt...
true
true
79095fc06e525157da9a345ef3156a6d72964deb
25,387
py
Python
sdks/python/apache_beam/io/textio.py
rohdesamuel/beam
b4f02888aed20f6f066d07f4ff26e6688a6f848e
[ "Apache-2.0", "BSD-3-Clause" ]
1
2020-08-25T21:17:10.000Z
2020-08-25T21:17:10.000Z
sdks/python/apache_beam/io/textio.py
rohdesamuel/beam
b4f02888aed20f6f066d07f4ff26e6688a6f848e
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
sdks/python/apache_beam/io/textio.py
rohdesamuel/beam
b4f02888aed20f6f066d07f4ff26e6688a6f848e
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# # 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 us...
39.605304
97
0.697483
from __future__ import absolute_import import logging from builtins import object from builtins import range from functools import partial from typing import Optional from past.builtins import long from apache_beam.coders import coders from apache_beam.io import filebasedsink from apache_beam.io ...
true
true
79096012f896fd03eee06a8d7b964aa02cee5156
2,186
py
Python
classifiers/robust_classifier.py
csmiler/ProbeGAN
6155f5ff33b0673df20b9dbbcbc3e63b75228ef0
[ "MIT" ]
null
null
null
classifiers/robust_classifier.py
csmiler/ProbeGAN
6155f5ff33b0673df20b9dbbcbc3e63b75228ef0
[ "MIT" ]
null
null
null
classifiers/robust_classifier.py
csmiler/ProbeGAN
6155f5ff33b0673df20b9dbbcbc3e63b75228ef0
[ "MIT" ]
null
null
null
################################################# # Retrieve robust classifier from: # https://github.com/MadryLab/robustness ################################################# from robustness.datasets import CIFAR, RestrictedImageNet, ImageNet from robustness.model_utils import make_and_restore_model def get_robust_c...
43.72
104
0.603385
true
true
790961361f911ee1014d8d3244a4139f7f4976a3
99,028
py
Python
mesonbuild/build.py
jmesmon/meson
4bfe0a25681f1abb8710aba1a89220dc328ee589
[ "Apache-2.0" ]
null
null
null
mesonbuild/build.py
jmesmon/meson
4bfe0a25681f1abb8710aba1a89220dc328ee589
[ "Apache-2.0" ]
null
null
null
mesonbuild/build.py
jmesmon/meson
4bfe0a25681f1abb8710aba1a89220dc328ee589
[ "Apache-2.0" ]
null
null
null
# Copyright 2012-2017 The Meson development team # 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 agree...
42.758204
183
0.610474
import copy, os, re from collections import OrderedDict import itertools, pathlib import hashlib import pickle from functools import lru_cache from . import environment from . import dependencies from . import mlog from .mesonlib import ( File, MesonException, listify, extract_as_list, OrderedSet, ...
true
true
79096172eb0dcbed46639138d3cd85733894920e
1,625
py
Python
code_runner/app.py
thephilomaths/code-runner-as-a-service
be12f497c6ae14a8f9417c373f046ce671a7b374
[ "MIT" ]
2
2021-02-07T13:17:28.000Z
2021-02-09T04:03:12.000Z
code_runner/app.py
thephilomaths/code-runner-as-a-service
be12f497c6ae14a8f9417c373f046ce671a7b374
[ "MIT" ]
null
null
null
code_runner/app.py
thephilomaths/code-runner-as-a-service
be12f497c6ae14a8f9417c373f046ce671a7b374
[ "MIT" ]
1
2021-02-08T16:17:58.000Z
2021-02-08T16:17:58.000Z
import logging import sys from pathlib import Path from dotenv import load_dotenv from flask import Flask from code_runner.extensions import db, limiter from . import code def create_app(config_object='code_runner.settings'): """Creates and returns flask app instance as well as register all the extensions and b...
28.508772
102
0.721231
import logging import sys from pathlib import Path from dotenv import load_dotenv from flask import Flask from code_runner.extensions import db, limiter from . import code def create_app(config_object='code_runner.settings'): app = Flask(__name__) register_environment() app.config.from_object(config_obj...
true
true
790961b95f5d478a62a55fb363377bbd7e4a9fde
2,450
py
Python
prmlmy/plot_util.py
jms7446/PRML
39325e085597cb48623f331d63726eea0dc9a714
[ "MIT" ]
2
2020-09-07T04:21:58.000Z
2020-09-24T23:32:05.000Z
prmlmy/plot_util.py
jms7446/PRML
39325e085597cb48623f331d63726eea0dc9a714
[ "MIT" ]
null
null
null
prmlmy/plot_util.py
jms7446/PRML
39325e085597cb48623f331d63726eea0dc9a714
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np from prmlmy.util import cv_, norm2s, calc_range def plot_decision_boundary(model, X_train, y_train=None, x1_range=None, x2_range=None, points=300, title=None, pad_ratio=0.2, ax=None): ax = ax or plt x1_range = x1_range or calc_range...
39.516129
100
0.647347
import matplotlib.pyplot as plt import numpy as np from prmlmy.util import cv_, norm2s, calc_range def plot_decision_boundary(model, X_train, y_train=None, x1_range=None, x2_range=None, points=300, title=None, pad_ratio=0.2, ax=None): ax = ax or plt x1_range = x1_range or calc_range...
true
true
7909645c57228c9a1e51071f96221abb70851c12
821
py
Python
demo/flask_mutatio/environment.py
Kazanz/mutatio-python
546689ace8c0c60e97fe18c1d61e55134005c689
[ "MIT" ]
2
2015-10-08T16:04:18.000Z
2016-05-10T18:56:54.000Z
demo/flask_mutatio/environment.py
Kazanz/mutatio-python
546689ace8c0c60e97fe18c1d61e55134005c689
[ "MIT" ]
null
null
null
demo/flask_mutatio/environment.py
Kazanz/mutatio-python
546689ace8c0c60e97fe18c1d61e55134005c689
[ "MIT" ]
null
null
null
from jinja2.environment import Environment from jinja2.loaders import FileSystemLoader class _MutatioEnvironmentMeta(type): """Collects the mutatio tags into Mongo for the admin page.""" def __init__(cls, name, bases, dct): super(_MutatioEnvironmentMeta, cls).__init__(name, bases, dct) class Mutatio...
32.84
73
0.705238
from jinja2.environment import Environment from jinja2.loaders import FileSystemLoader class _MutatioEnvironmentMeta(type): def __init__(cls, name, bases, dct): super(_MutatioEnvironmentMeta, cls).__init__(name, bases, dct) class MutatioEnvironment(Environment, metaclass=_MutatioEnvironmentMeta): de...
true
true
7909647153350adcce02853b06f63988691d8864
8,669
py
Python
rbb_tools/src/rbb_tools/plugins/rviz_recorder.py
SK4P3/rbb_core
618617270314af5335de30179072244e1f440c4c
[ "MIT" ]
55
2019-05-09T06:43:05.000Z
2021-12-08T05:56:43.000Z
rbb_tools/src/rbb_tools/plugins/rviz_recorder.py
SK4P3/rbb_core
618617270314af5335de30179072244e1f440c4c
[ "MIT" ]
5
2019-09-08T15:33:28.000Z
2021-04-17T17:30:53.000Z
rbb_tools/src/rbb_tools/plugins/rviz_recorder.py
SK4P3/rbb_core
618617270314af5335de30179072244e1f440c4c
[ "MIT" ]
16
2019-08-08T07:15:35.000Z
2021-12-07T15:34:41.000Z
# AMZ-Driverless # Copyright (c) 2019 Authors: # - Huub Hendrikx <hhendrik@ethz.ch> # # 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 ...
41.677885
259
0.614834
import datetime import os import time import yaml from rbb_tools.common.shell import CommandGroup from rbb_tools.extraction.extractor import AbstractExtractionPlugin from rbb_tools.extraction.registry import Product class RvizRecorderPlugin(AbstractExtractionPlugin): def __init__(self, co...
true
true
790964774b95883c6f307d4d328cc136f0aaf172
160
py
Python
Python/Math/triangle_quest_2.py
abivilion/Hackerank-Solutions-
e195fb1fce1588171cf12d99d38da32ca5c8276a
[ "MIT" ]
null
null
null
Python/Math/triangle_quest_2.py
abivilion/Hackerank-Solutions-
e195fb1fce1588171cf12d99d38da32ca5c8276a
[ "MIT" ]
null
null
null
Python/Math/triangle_quest_2.py
abivilion/Hackerank-Solutions-
e195fb1fce1588171cf12d99d38da32ca5c8276a
[ "MIT" ]
null
null
null
for i in range(1,int(input())+1): #More than 2 lines will result in 0 score. Do not leave a blank line also print((pow(int(pow(10, i)//9), 2)))
20
108
0.6
for i in range(1,int(input())+1): print((pow(int(pow(10, i)//9), 2)))
true
true
7909655ace1e2f590e26f67246277d6bf5ac54ae
45,743
py
Python
lib/matplotlib/contour.py
leejjoon/Matplotlib--JJ-s-dev
77d7020f7333ec0a94fe3fb0cf51be40462f22f0
[ "PSF-2.0", "BSD-3-Clause" ]
1
2016-03-15T10:04:31.000Z
2016-03-15T10:04:31.000Z
lib/matplotlib/contour.py
leejjoon/Matplotlib--JJ-s-dev
77d7020f7333ec0a94fe3fb0cf51be40462f22f0
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
lib/matplotlib/contour.py
leejjoon/Matplotlib--JJ-s-dev
77d7020f7333ec0a94fe3fb0cf51be40462f22f0
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
""" These are classes to support contour plotting and labelling for the axes class """ from __future__ import division import warnings import matplotlib as mpl import numpy as np from numpy import ma import matplotlib._cntr as _cntr import matplotlib.path as mpath import matplotlib.ticker as ticker import matplotlib.c...
37.617599
83
0.563387
""" These are classes to support contour plotting and labelling for the axes class """ from __future__ import division import warnings import matplotlib as mpl import numpy as np from numpy import ma import matplotlib._cntr as _cntr import matplotlib.path as mpath import matplotlib.ticker as ticker import matplotlib.c...
false
true
790965a17e52d460b935459d45d87408814899af
17,308
py
Python
tools/Vitis-AI-Quantizer/vai_q_pytorch/pytorch_binding/pytorch_nndct/export/op_descriptor.py
hito0512/Vitis-AI
996459fb96cb077ed2f7e789d515893b1cccbc95
[ "Apache-2.0" ]
1
2022-02-17T22:13:23.000Z
2022-02-17T22:13:23.000Z
tools/Vitis-AI-Quantizer/vai_q_pytorch/pytorch_binding/pytorch_nndct/export/op_descriptor.py
hito0512/Vitis-AI
996459fb96cb077ed2f7e789d515893b1cccbc95
[ "Apache-2.0" ]
null
null
null
tools/Vitis-AI-Quantizer/vai_q_pytorch/pytorch_binding/pytorch_nndct/export/op_descriptor.py
hito0512/Vitis-AI
996459fb96cb077ed2f7e789d515893b1cccbc95
[ "Apache-2.0" ]
null
null
null
# # Copyright 2019 Xilinx 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 writi...
35.467213
115
0.633175
from nndct_shared.base import NNDCT_CONSTANT, NNDCT_OP from nndct_shared.nndct_graph import Tensor from .code_template import CodeTemplate class OpDescriptor(object): @staticmethod def input(ctx, node, output_str): return "{} = args[{}]".format(output_str, int(node.name.split('_')[-1])) ...
true
true
790965a5f2ac78f448ba381ad1ea5eaf7539f24f
546
py
Python
manage.py
serverlessplus/django-example
9508c05723d7c05e6b697b8b573e1054e5cdb2e5
[ "Apache-2.0" ]
2
2019-11-30T14:23:08.000Z
2019-12-03T01:42:10.000Z
manage.py
serverlessplus/django-example
9508c05723d7c05e6b697b8b573e1054e5cdb2e5
[ "Apache-2.0" ]
null
null
null
manage.py
serverlessplus/django-example
9508c05723d7c05e6b697b8b573e1054e5cdb2e5
[ "Apache-2.0" ]
1
2019-04-29T04:29:54.000Z
2019-04-29T04:29:54.000Z
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_example.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Djang...
34.125
78
0.690476
import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_example.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's ...
true
true
79096613ed7a5172c39ca2ffe574ec787e239dd6
3,215
py
Python
colab_ssh/launch_ssh_cloudflared.py
CharleoY/colab-ssh
9ea4c3e7540ddcccdf3bfee634a9a9832561e0e3
[ "MIT" ]
null
null
null
colab_ssh/launch_ssh_cloudflared.py
CharleoY/colab-ssh
9ea4c3e7540ddcccdf3bfee634a9a9832561e0e3
[ "MIT" ]
null
null
null
colab_ssh/launch_ssh_cloudflared.py
CharleoY/colab-ssh
9ea4c3e7540ddcccdf3bfee634a9a9832561e0e3
[ "MIT" ]
null
null
null
from colab_ssh.utils.packages.installer import create_deb_installer from colab_ssh.utils.ui.render_html import render_template from subprocess import Popen, PIPE import shlex from colab_ssh._command import run_command, run_with_pipe import os import time from colab_ssh.get_tunnel_config import get_argo_tunnel_config fr...
32.806122
147
0.670295
from colab_ssh.utils.packages.installer import create_deb_installer from colab_ssh.utils.ui.render_html import render_template from subprocess import Popen, PIPE import shlex from colab_ssh._command import run_command, run_with_pipe import os import time from colab_ssh.get_tunnel_config import get_argo_tunnel_config fr...
true
true
790967a01be8768935bb9b5f2897f38a5ba7fdad
7,179
py
Python
code/utils/parse_config.py
weinajin/evaluate_multimodal_medical_image_heatmap_explanation
c022613ea05818c842e0760c44a0a2cb9cc0c424
[ "MIT" ]
1
2022-03-02T12:23:46.000Z
2022-03-02T12:23:46.000Z
code/utils/parse_config.py
weinajin/evaluate_multimodal_medical_image_heatmap_explanation
c022613ea05818c842e0760c44a0a2cb9cc0c424
[ "MIT" ]
null
null
null
code/utils/parse_config.py
weinajin/evaluate_multimodal_medical_image_heatmap_explanation
c022613ea05818c842e0760c44a0a2cb9cc0c424
[ "MIT" ]
1
2022-02-05T11:56:19.000Z
2022-02-05T11:56:19.000Z
import os import logging, glob from pathlib import Path from functools import reduce, partial from operator import getitem from datetime import datetime # from .logger import setup_logging # import logger.setup_logging # from . import logger from .logger import setup_logging from .util import read_json, write_json # pr...
39.016304
142
0.630868
import os import logging, glob from pathlib import Path from functools import reduce, partial from operator import getitem from datetime import datetime from .logger import setup_logging from .util import read_json, write_json class ConfigParser: def __init__(self, config, resume=None, modification=None, run_i...
true
true
790967bb26e9e7cf56861a057acc6146dc026728
726
py
Python
constants.py
hqsss/hypixel-guild-chat-python
fa4b680e2bff113ab33f213e3e819b321bec7b30
[ "MIT" ]
null
null
null
constants.py
hqsss/hypixel-guild-chat-python
fa4b680e2bff113ab33f213e3e819b321bec7b30
[ "MIT" ]
null
null
null
constants.py
hqsss/hypixel-guild-chat-python
fa4b680e2bff113ab33f213e3e819b321bec7b30
[ "MIT" ]
null
null
null
import os from dotenv import load_dotenv # The prefix the bot responds to for commands PREFIX = '!' # Emojis the bot should use for certain events EMOJIS = { 'DISCORD': '🗨️', # When a message is sent from Discord 'HYPIXEL': '🎮', # When a message is sent from Hypixel 'JOIN': '📥', # When a member joins...
31.565217
61
0.717631
import os from dotenv import load_dotenv PREFIX = '!' EMOJIS = { 'DISCORD': '🗨️', 'HYPIXEL': '🎮', 'JOIN': '📥', 'LEAVE': '📤' } OWNER_IDS = [635097068741853204] load_dotenv() TOKEN = os.getenv("TOKEN") GUILD_CHAT_CHANNEL = int(os.getenv("GUILD_CHAT_CHANNEL")) MINECRAFT_EMAIL = os.getenv...
true
true
790967f9e8e99f7dc79b5d600469b0d0b4b689a3
1,398
py
Python
setup.py
Chattersum/tweetProcessor
01296e6d7e188a210184ba6720362f16e7bd781e
[ "MIT" ]
null
null
null
setup.py
Chattersum/tweetProcessor
01296e6d7e188a210184ba6720362f16e7bd781e
[ "MIT" ]
7
2021-02-08T20:21:20.000Z
2022-03-11T23:18:46.000Z
setup.py
Chattersum/tweetProcessor
01296e6d7e188a210184ba6720362f16e7bd781e
[ "MIT" ]
1
2015-05-26T18:05:42.000Z
2015-05-26T18:05:42.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup readme = open('README.rst').read() requirements = [ 'tweepy>=2.1', 'pymongo>=2.8.0', 'tendo>=0.0.18', 'boto>=0.0.1', 'nltk>=0.0.1', 'zc.lockfile>=0.0....
23.694915
49
0.584406
try: from setuptools import setup except ImportError: from distutils.core import setup readme = open('README.rst').read() requirements = [ 'tweepy>=2.1', 'pymongo>=2.8.0', 'tendo>=0.0.18', 'boto>=0.0.1', 'nltk>=0.0.1', 'zc.lockfile>=0.0.1', 'flask>=0.0.1', 'flask-bootstrap...
true
true
7909680b349cebf034c4b25a3656474a5fcf9f7c
3,962
py
Python
alipay/aop/api/domain/AlipayUserAccountBindingSyncModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayUserAccountBindingSyncModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayUserAccountBindingSyncModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayUserAccountBindingSyncModel(object): def __init__(self): self._alipay_user_id = None self._create_time = None self._data_version = None self._havana_user_id ...
30.244275
79
0.59364
import json from alipay.aop.api.constant.ParamConstants import * class AlipayUserAccountBindingSyncModel(object): def __init__(self): self._alipay_user_id = None self._create_time = None self._data_version = None self._havana_user_id = None self._modify_time = None ...
true
true
7909692c43386bd754780313c2a51dcbdbbc4e97
1,664
py
Python
tests/test_sql.py
vprakash-ucl/pyrate
42f67a5f8a89740bd6ef31458383550dba5a09ca
[ "MIT" ]
22
2015-03-17T14:36:39.000Z
2022-03-14T12:31:08.000Z
tests/test_sql.py
vprakash-ucl/pyrate
42f67a5f8a89740bd6ef31458383550dba5a09ca
[ "MIT" ]
31
2015-09-02T10:52:55.000Z
2016-08-23T09:00:36.000Z
tests/test_sql.py
UCL-ShippingGroup/pyrate
4887316d8935f7aaeaa18144dd1acd274d7dced0
[ "MIT" ]
10
2015-12-23T13:01:07.000Z
2022-03-15T10:52:46.000Z
""" Tests the creation of tables, and the methods of the sql class """ from pyrate.repositories.sql import Table from utilities import setup_database class TestSql: """ Tests the Sql class """ def test_get_list_of_columns(self, setup_database): db = setup_database rows = [{'unit': 'days', ...
33.959184
71
0.558293
from pyrate.repositories.sql import Table from utilities import setup_database class TestSql: def test_get_list_of_columns(self, setup_database): db = setup_database rows = [{'unit': 'days', 'description': 'At berth/anchor', 'name': 's_berth_day'}, ...
true
true
790969c563c6e61ce77dedea067f84f8d71ec12f
95
py
Python
bot/__init__.py
CaffeineDuck/BoilerBot
c9038990a9e602a9dd8567b7cc99f22616ec1a79
[ "MIT" ]
null
null
null
bot/__init__.py
CaffeineDuck/BoilerBot
c9038990a9e602a9dd8567b7cc99f22616ec1a79
[ "MIT" ]
null
null
null
bot/__init__.py
CaffeineDuck/BoilerBot
c9038990a9e602a9dd8567b7cc99f22616ec1a79
[ "MIT" ]
1
2021-08-12T12:15:40.000Z
2021-08-12T12:15:40.000Z
"""This is the core module for accessing using and accessing the bot""" from .core import Bot
23.75
71
0.747368
from .core import Bot
true
true
790969dcb50153dd87f4c0760c2410612fe28917
7,638
py
Python
contrib/tsperf/cross_validation/cross_validation.py
cristinanichiforov/forecasting
ea8a9f47eb0bae70e47e292bf858b4b9d06bef9d
[ "MIT" ]
4
2020-07-24T08:12:33.000Z
2021-07-08T10:24:55.000Z
contrib/tsperf/cross_validation/cross_validation.py
sts-sadr/forecasting
10352e07c74f7cae2f68629fdfb89877596fcc6d
[ "MIT" ]
3
2020-09-25T22:02:53.000Z
2022-02-10T01:27:09.000Z
contrib/tsperf/cross_validation/cross_validation.py
sts-sadr/forecasting
10352e07c74f7cae2f68629fdfb89877596fcc6d
[ "MIT" ]
2
2020-08-24T05:01:12.000Z
2021-07-08T02:51:45.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import json import os import itertools from datetime import datetime from dateutil.relativedelta import relativedelta import subprocess from ..train_utils import TSCVSplitter class ParameterSweeper: """ The function of this class i...
38.771574
97
0.626997
import json import os import itertools from datetime import datetime from dateutil.relativedelta import relativedelta import subprocess from ..train_utils import TSCVSplitter class ParameterSweeper: def __init__(self, config): self.work_directory = config["WorkDirectory"] data_config = confi...
true
true
79096a8346292bfd6ff343f4fd6a6669e3524ac6
632
py
Python
Curso Python/Aula06/CondicoesAinhada.py
ElHa07/Python
d8014948a6472daa3dd0c9be5e536fc79742f02e
[ "MIT" ]
null
null
null
Curso Python/Aula06/CondicoesAinhada.py
ElHa07/Python
d8014948a6472daa3dd0c9be5e536fc79742f02e
[ "MIT" ]
null
null
null
Curso Python/Aula06/CondicoesAinhada.py
ElHa07/Python
d8014948a6472daa3dd0c9be5e536fc79742f02e
[ "MIT" ]
null
null
null
#Curso Python #06 - Condições Aninhadas #Primeiro Exemplo #nome = str(input('Qual é seu Nome: ')) #if nome == 'Jefferson': # print('Que Nome Bonito') #else: # print('Seu nome é bem normal.') #print('Tenha um bom dia, {}'.format(nome)) #Segundo Exemplo nome = str(input('Qual é seu Nome: ')) if nome == 'Jeffers...
27.478261
60
0.648734
nput('Qual é seu Nome: ')) if nome == 'Jefferson': print('Que Nome Bonito') elif nome == 'Pedro' or nome == 'Marcos' or nome == 'Paulo': print('Seu nome é bem popular no Brasil.') elif nome in 'Jennifer Vitoria Mariana Deborah': print('Belo nome você tem em !') else: print('Seu nome é bem normal.') prin...
true
true
79096ae895e19f8a8461c2965a3023a938be80b7
53
py
Python
tapis_cli/clients/services/gitlab/__init__.py
shwetagopaul92/tapis-cli-ng
6f424b8352c0d034d4f5547fac21d5c8dd097a7f
[ "BSD-3-Clause" ]
null
null
null
tapis_cli/clients/services/gitlab/__init__.py
shwetagopaul92/tapis-cli-ng
6f424b8352c0d034d4f5547fac21d5c8dd097a7f
[ "BSD-3-Clause" ]
null
null
null
tapis_cli/clients/services/gitlab/__init__.py
shwetagopaul92/tapis-cli-ng
6f424b8352c0d034d4f5547fac21d5c8dd097a7f
[ "BSD-3-Clause" ]
null
null
null
"""On-premise Gitlab clients """ # from .v4 import *
13.25
28
0.641509
true
true
79096b95c309bed1c5577141acc553402a4e1906
2,160
py
Python
pneumoRL/image_util.py
richielo/Medical_Localization_RL
58653170824ee087f10b6c8650ee9bc8e05b64e9
[ "MIT" ]
7
2018-12-24T05:43:37.000Z
2021-12-27T08:57:45.000Z
pneumoRL/image_util.py
richielo/Medical_Localization_RL
58653170824ee087f10b6c8650ee9bc8e05b64e9
[ "MIT" ]
7
2019-09-10T06:15:28.000Z
2022-03-11T23:32:47.000Z
pneumoRL/image_util.py
richielo/Medical_Localization_RL
58653170824ee087f10b6c8650ee9bc8e05b64e9
[ "MIT" ]
null
null
null
import os import sys import numpy as np from PIL import Image import torch #TODO - add save function, these functions can be used to check movement def crop_image(image_array, bb): image_array_copy = image_array.clone() y_min = int(bb[0]) x_min = int(bb[1]) height = int(bb[2]) width = int(bb[3]) ...
31.764706
77
0.683333
import os import sys import numpy as np from PIL import Image import torch def crop_image(image_array, bb): image_array_copy = image_array.clone() y_min = int(bb[0]) x_min = int(bb[1]) height = int(bb[2]) width = int(bb[3]) y_max = y_min + height x_max = x_min + width return image_arr...
true
true
79096c33178f11b2f6d1ae48e86bafbe7ffc5864
596
py
Python
edge/app.py
datawire/hello-forge-network
c64418c20dad79225a641950703868136436e151
[ "Apache-2.0" ]
1
2018-01-11T02:37:57.000Z
2018-01-11T02:37:57.000Z
edge/app.py
datawire/hello-forge-network
c64418c20dad79225a641950703868136436e151
[ "Apache-2.0" ]
null
null
null
edge/app.py
datawire/hello-forge-network
c64418c20dad79225a641950703868136436e151
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import requests, time from flask import Flask, Response, stream_with_context app = Flask(__name__) START = time.time() def elapsed(): running = time.time() - START minutes, seconds = divmod(running, 60) hours, minutes = divmod(minutes, 60) return "%d:%02d:%02d" % (hours, minutes, se...
27.090909
104
0.674497
import requests, time from flask import Flask, Response, stream_with_context app = Flask(__name__) START = time.time() def elapsed(): running = time.time() - START minutes, seconds = divmod(running, 60) hours, minutes = divmod(minutes, 60) return "%d:%02d:%02d" % (hours, minutes, seconds) @app.rout...
true
true
79096d0930bf4ca95a7a285840bf9b2fedd144d7
104
py
Python
pyinspirehep/__init__.py
javadebadi/pyinspirehep
7e20b0f274bd6a44425588896b50cc64f71a7248
[ "MIT" ]
null
null
null
pyinspirehep/__init__.py
javadebadi/pyinspirehep
7e20b0f274bd6a44425588896b50cc64f71a7248
[ "MIT" ]
null
null
null
pyinspirehep/__init__.py
javadebadi/pyinspirehep
7e20b0f274bd6a44425588896b50cc64f71a7248
[ "MIT" ]
null
null
null
""" The pyinspirehep is A python wrapper for Inspirehep API. """ from pyinspirehep.client import Client
20.8
56
0.778846
from pyinspirehep.client import Client
true
true
79096e48c29307522275f52575080cc258245cbe
1,573
py
Python
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat_client.py
nexr/ambari
8452f207d7b9343a162698f2a2b79bf2c512e9d3
[ "Apache-2.0" ]
1
2015-05-04T12:19:05.000Z
2015-05-04T12:19:05.000Z
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat_client.py
nexr/ambari
8452f207d7b9343a162698f2a2b79bf2c512e9d3
[ "Apache-2.0" ]
null
null
null
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat_client.py
nexr/ambari
8452f207d7b9343a162698f2a2b79bf2c512e9d3
[ "Apache-2.0" ]
1
2021-01-07T08:55:01.000Z
2021-01-07T08:55:01.000Z
#!/usr/bin/env python """ 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");...
28.089286
77
0.779402
import sys from resource_management import * from hcat import hcat from ambari_commons import OSConst from ambari_commons.os_family_impl import OsFamilyImpl class HCatClient(Script): def install(self, env): import params self.install_packages(env, exclude_packages=params.hive_exclude_packages) self.co...
true
true
79096e8a4e268b925287384ac322d0e7f14ad6e9
2,145
py
Python
lndgrpc/errors.py
ibz/lnd-grpc-client
f57a9db20e202b4560e9173081c713a72f7e1340
[ "MIT" ]
19
2022-01-03T02:06:24.000Z
2022-02-23T09:59:16.000Z
lndgrpc/errors.py
ziggie1984/lnd-grpc-client
a487386f5e501774f8239eeb3d3b58634b26f665
[ "MIT" ]
7
2021-12-20T21:01:57.000Z
2022-03-28T10:49:27.000Z
lndgrpc/errors.py
ziggie1984/lnd-grpc-client
a487386f5e501774f8239eeb3d3b58634b26f665
[ "MIT" ]
2
2022-01-26T15:37:03.000Z
2022-02-10T06:12:43.000Z
import grpc from functools import wraps class WalletEncryptedError(Exception): def __init__(self, message=None): message = message or 'Wallet is encrypted. Please unlock or set ' \ 'password if this is the first time starting lnd. ' super().__init__(message) def han...
38.303571
129
0.558042
import grpc from functools import wraps class WalletEncryptedError(Exception): def __init__(self, message=None): message = message or 'Wallet is encrypted. Please unlock or set ' \ 'password if this is the first time starting lnd. ' super().__init__(message) def han...
true
true
79096eae6ee51fa5e3aca16d7d68fa16689f9d59
53,068
py
Python
CadVlan/Pool/views.py
pantuza/GloboNetworkAPI-WebUI
d5ee88fbd0785a3afbd81b3839d6a661504ab5e5
[ "Apache-2.0" ]
null
null
null
CadVlan/Pool/views.py
pantuza/GloboNetworkAPI-WebUI
d5ee88fbd0785a3afbd81b3839d6a661504ab5e5
[ "Apache-2.0" ]
null
null
null
CadVlan/Pool/views.py
pantuza/GloboNetworkAPI-WebUI
d5ee88fbd0785a3afbd81b3839d6a661504ab5e5
[ "Apache-2.0" ]
null
null
null
# -*- 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 "Lic...
35.237716
128
0.618772
import json import logging from django.contrib import messages from django.core.urlresolvers import reverse from django.http import HttpResponse from django.http import HttpResponseServerError from django.shortcuts import redirect from django.shortcuts import render from django.shortcuts import render_t...
false
true
79096f1b8106dc095b764c0b9581caeebaccefbf
2,274
py
Python
generator/contact.py
vdenPython/python_traning
56f11d18ea9099064153c6ea19e672a23ba0bc15
[ "Apache-2.0" ]
null
null
null
generator/contact.py
vdenPython/python_traning
56f11d18ea9099064153c6ea19e672a23ba0bc15
[ "Apache-2.0" ]
null
null
null
generator/contact.py
vdenPython/python_traning
56f11d18ea9099064153c6ea19e672a23ba0bc15
[ "Apache-2.0" ]
null
null
null
import random import string import os.path import jsonpickle import getopt import sys from model.contact import Contact try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["namber of group", "file"]) except getopt.GetoptError as err: getopt.usage() sys.exit(2) n = 5 f = "/data/contacts.json" for o, a ...
44.588235
103
0.474934
import random import string import os.path import jsonpickle import getopt import sys from model.contact import Contact try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["namber of group", "file"]) except getopt.GetoptError as err: getopt.usage() sys.exit(2) n = 5 f = "/data/contacts.json" for o, a ...
true
true
790970a53a0d226be53300bf7254d17691cb0813
3,150
py
Python
color.py
mhhm2005eg/CarND-Advanced-Lane-Lines
1f571e4714df0dcca21fbf2b09b5af73caddb8f4
[ "MIT" ]
null
null
null
color.py
mhhm2005eg/CarND-Advanced-Lane-Lines
1f571e4714df0dcca21fbf2b09b5af73caddb8f4
[ "MIT" ]
null
null
null
color.py
mhhm2005eg/CarND-Advanced-Lane-Lines
1f571e4714df0dcca21fbf2b09b5af73caddb8f4
[ "MIT" ]
null
null
null
import numpy as np import cv2 from PIL import Image img_form = "jpg" img_out_dir = "./output_images" vid_form = "mp4" vid_out_dir = "./test_videos_output" class array_image: def __init__(self): self.image = None self.binary_image = None def store(self, name): name = img_out_dir + "/" ...
34.615385
128
0.563492
import numpy as np import cv2 from PIL import Image img_form = "jpg" img_out_dir = "./output_images" vid_form = "mp4" vid_out_dir = "./test_videos_output" class array_image: def __init__(self): self.image = None self.binary_image = None def store(self, name): name = img_out_dir + "/" ...
true
true
79097144d6fcecdb2e2968b042f73f19f2de4231
19,318
py
Python
pyscf/mcscf/test/test_addons.py
mfkasim1/pyscf
7be5e015b2b40181755c71d888449db936604660
[ "Apache-2.0" ]
1
2021-01-24T13:35:42.000Z
2021-01-24T13:35:42.000Z
pyscf/mcscf/test/test_addons.py
mfkasim1/pyscf
7be5e015b2b40181755c71d888449db936604660
[ "Apache-2.0" ]
null
null
null
pyscf/mcscf/test/test_addons.py
mfkasim1/pyscf
7be5e015b2b40181755c71d888449db936604660
[ "Apache-2.0" ]
1
2021-09-30T14:38:46.000Z
2021-09-30T14:38:46.000Z
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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...
44.20595
100
0.604255
import copy import unittest from functools import reduce import numpy, scipy from pyscf import lib from pyscf import gto from pyscf import scf from pyscf import mcscf from pyscf import fci b = 1.4 mol = gto.Mole() mol.build( verbose = 7, output = '/dev/null', atom = [ ['N',( 0.000000, 0.000000, -b...
true
true
7909716cb19a415cbb92710c9f64f514e248e4cb
2,397
py
Python
guillotina_elasticsearch/__init__.py
vjove/guillotina_elasticsearch
1c04f86caa19cb37f0f182cc97b09bacbcf5d729
[ "BSD-2-Clause" ]
null
null
null
guillotina_elasticsearch/__init__.py
vjove/guillotina_elasticsearch
1c04f86caa19cb37f0f182cc97b09bacbcf5d729
[ "BSD-2-Clause" ]
null
null
null
guillotina_elasticsearch/__init__.py
vjove/guillotina_elasticsearch
1c04f86caa19cb37f0f182cc97b09bacbcf5d729
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from guillotina import configure from guillotina.catalog.utils import get_index_fields from guillotina.component import get_utilities_for from guillotina.content import IResourceFactory from guillotina.utils import get_dotted_name from packaging import version import aioelasticsearch ES_CLIEN...
33.291667
98
0.629537
from guillotina import configure from guillotina.catalog.utils import get_index_fields from guillotina.component import get_utilities_for from guillotina.content import IResourceFactory from guillotina.utils import get_dotted_name from packaging import version import aioelasticsearch ES_CLIENT_VERSION = version.par...
true
true
7909717f81c39797c9837b9504d8621cc74a8642
2,277
py
Python
server/actor_libs/auth/base.py
goodfree/ActorCloud
e8db470830ea6f6f208ad43c2e56a2e8976bc468
[ "Apache-2.0" ]
173
2019-06-10T07:14:49.000Z
2022-03-31T08:42:36.000Z
server/actor_libs/auth/base.py
zlyz12345/ActorCloud
9c34b371c23464981323ef9865d9913bde1fe09c
[ "Apache-2.0" ]
27
2019-06-12T08:25:29.000Z
2022-02-26T11:37:15.000Z
server/actor_libs/auth/base.py
zlyz12345/ActorCloud
9c34b371c23464981323ef9865d9913bde1fe09c
[ "Apache-2.0" ]
67
2019-06-10T08:40:05.000Z
2022-03-09T03:43:56.000Z
# coding: utf-8 import arrow from flask import current_app, request, g from itsdangerous import TimedJSONWebSignatureSerializer as JWT from actor_libs.errors import AuthFailed from app.models import Application, User __all__ = ['basic_auth', 'token_auth'] def basic_auth(username, password) -> bool: """ HTTP b...
32.070423
82
0.635485
import arrow from flask import current_app, request, g from itsdangerous import TimedJSONWebSignatureSerializer as JWT from actor_libs.errors import AuthFailed from app.models import Application, User __all__ = ['basic_auth', 'token_auth'] def basic_auth(username, password) -> bool: query_result = Applicati...
true
true
79097227753279f3a6d8ee2285f3a726e5dc72df
861
py
Python
examples/generate_alert_message.py
ramakrishnamekala129/tradingviewwebhooksbotByRK
dcb6a19325715ada6bf473177af8bd932dbf2800
[ "MIT" ]
null
null
null
examples/generate_alert_message.py
ramakrishnamekala129/tradingviewwebhooksbotByRK
dcb6a19325715ada6bf473177af8bd932dbf2800
[ "MIT" ]
null
null
null
examples/generate_alert_message.py
ramakrishnamekala129/tradingviewwebhooksbotByRK
dcb6a19325715ada6bf473177af8bd932dbf2800
[ "MIT" ]
3
2021-08-18T02:51:47.000Z
2021-10-14T18:17:05.000Z
from auth import get_token """ This function will take a lot of the tedious work out of generating alert messages! Simply follow the onscreen input prompts, at the end a string with everything you need will be output, allowing you to copy and paste into tradingview! """ def generate_alert_message(): print('Enter...
26.90625
105
0.630662
from auth import get_token def generate_alert_message(): print('Enter type: (limit, market, etc.)') type = input() print('Enter Side (buy or sell):') side = input() print('Enter Amount:') amount = input() print('Enter Symbol:') symbol = input() if type == 'limit': print('E...
true
true
7909733e00cbb3e96b5963581dccac8e04ff1e72
18,527
py
Python
.tox/scenario/lib/python2.7/site-packages/oslo_config/tests/test_types.py
bdrich/neutron-lbaas
b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd
[ "Apache-2.0" ]
null
null
null
.tox/scenario/lib/python2.7/site-packages/oslo_config/tests/test_types.py
bdrich/neutron-lbaas
b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd
[ "Apache-2.0" ]
null
null
null
.tox/scenario/lib/python2.7/site-packages/oslo_config/tests/test_types.py
bdrich/neutron-lbaas
b4711abfe0207c4fdd5d7fb7ecbf017e753abbfd
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Mirantis, 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 agr...
33.442238
78
0.601231
import re import unittest from oslo_config import types class TypeTestHelper(object): def setUp(self): super(TypeTestHelper, self).setUp() self.type_instance = self.type def assertConvertedValue(self, s, expected): self.assertEqual(expected, self.type_instance(s)) ...
true
true
7909737cb248793ba2609acff32b0a4298d04b84
22,229
py
Python
dcase_util/keras/data.py
ankitshah009/dcase_util
738571ce78faf60b0fdfa1d59fd42f42c8944f3d
[ "MIT" ]
null
null
null
dcase_util/keras/data.py
ankitshah009/dcase_util
738571ce78faf60b0fdfa1d59fd42f42c8944f3d
[ "MIT" ]
null
null
null
dcase_util/keras/data.py
ankitshah009/dcase_util
738571ce78faf60b0fdfa1d59fd42f42c8944f3d
[ "MIT" ]
null
null
null
# !/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, absolute_import import numpy import copy from dcase_util.ui import FancyStringifier, FancyLogger from dcase_util.containers import ContainerMixin from dcase_util.data import DataBuffer def get_keras_data_sequence_class(): # Use...
34.787167
120
0.519951
from __future__ import print_function, absolute_import import numpy import copy from dcase_util.ui import FancyStringifier, FancyLogger from dcase_util.containers import ContainerMixin from dcase_util.data import DataBuffer def get_keras_data_sequence_class(): from keras.utils import Sequence c...
true
true
7909743cfea6c03d7c57fb70eccc27510a969076
1,192
py
Python
ssseg/cfgs/deeplabv3/cfgs_ade20k_resnet101os16.py
zhizhangxian/sssegmentation
90613f6e0abf4cdd729cf382ab2a915e106d8649
[ "MIT" ]
2
2021-10-31T21:52:30.000Z
2021-12-21T12:35:37.000Z
ssseg/cfgs/deeplabv3/cfgs_ade20k_resnet101os16.py
zhizhangxian/sssegmentation
90613f6e0abf4cdd729cf382ab2a915e106d8649
[ "MIT" ]
null
null
null
ssseg/cfgs/deeplabv3/cfgs_ade20k_resnet101os16.py
zhizhangxian/sssegmentation
90613f6e0abf4cdd729cf382ab2a915e106d8649
[ "MIT" ]
null
null
null
'''define the config file for ade20k and resnet101os16''' import os from .base_cfg import * # modify dataset config DATASET_CFG = DATASET_CFG.copy() DATASET_CFG.update({ 'type': 'ade20k', 'rootdir': os.path.join(os.getcwd(), 'ADE20k'), }) # modify dataloader config DATALOADER_CFG = DATALOADER_CFG.copy() # mod...
25.913043
106
0.71896
import os from .base_cfg import * DATASET_CFG = DATASET_CFG.copy() DATASET_CFG.update({ 'type': 'ade20k', 'rootdir': os.path.join(os.getcwd(), 'ADE20k'), }) DATALOADER_CFG = DATALOADER_CFG.copy() OPTIMIZER_CFG = OPTIMIZER_CFG.copy() OPTIMIZER_CFG.update( { 'max_epochs': 130 } ) LOSSES_CFG ...
true
true
790975179ee6737385fa324910eab029a106824e
5,409
py
Python
reserway/bookings/models.py
shobhit907/reserway
fac3a4c4bde59dd5d9ca6817d0a0203fc1dc321f
[ "MIT" ]
null
null
null
reserway/bookings/models.py
shobhit907/reserway
fac3a4c4bde59dd5d9ca6817d0a0203fc1dc321f
[ "MIT" ]
null
null
null
reserway/bookings/models.py
shobhit907/reserway
fac3a4c4bde59dd5d9ca6817d0a0203fc1dc321f
[ "MIT" ]
null
null
null
from django.db import models from django.core.validators import MinValueValidator, MaxValueValidator from accounts.models import BookingAgent class Station(models.Model): name=models.CharField(max_length=30) def __str__(self): return self.name # Create your models here. class Train(models.Model): ...
30.559322
118
0.659641
from django.db import models from django.core.validators import MinValueValidator, MaxValueValidator from accounts.models import BookingAgent class Station(models.Model): name=models.CharField(max_length=30) def __str__(self): return self.name class Train(models.Model): id = models.AutoField(prim...
true
true
7909755773191c2bcdbd0c49e7e58a8ae6c16d90
2,103
py
Python
analyze.py
IanDoarn/kit_cannibalization
50309a740eee0a59fe05eb661a73c4da8b3cb8bd
[ "MIT" ]
null
null
null
analyze.py
IanDoarn/kit_cannibalization
50309a740eee0a59fe05eb661a73c4da8b3cb8bd
[ "MIT" ]
null
null
null
analyze.py
IanDoarn/kit_cannibalization
50309a740eee0a59fe05eb661a73c4da8b3cb8bd
[ "MIT" ]
null
null
null
import cannibalize import xlsxwriter import sys import os desktop = os.path.join(os.path.join(os.environ['USERPROFILE']), 'Desktop') usage = "Kit Cannibaliztion\n" \ "usage: analyze.py kit_number serial1 serial2 serial3 ..." if len(sys.argv) < 2: print(usage) else: KIT = sys.argv[1] SERIALS = [str...
33.919355
89
0.543509
import cannibalize import xlsxwriter import sys import os desktop = os.path.join(os.path.join(os.environ['USERPROFILE']), 'Desktop') usage = "Kit Cannibaliztion\n" \ "usage: analyze.py kit_number serial1 serial2 serial3 ..." if len(sys.argv) < 2: print(usage) else: KIT = sys.argv[1] SERIALS = [str...
true
true
7909756fd37eb6e030d6eb99d8d2fad056c695ad
3,770
py
Python
register/utils.py
cds-snc/covid-alert-portal
e7d56fa9fa4a2ad2d60f056eae063713661bd260
[ "MIT" ]
43
2020-07-31T14:38:06.000Z
2022-03-07T11:28:28.000Z
register/utils.py
cds-snc/covid-alert-portal
e7d56fa9fa4a2ad2d60f056eae063713661bd260
[ "MIT" ]
322
2020-07-23T19:38:26.000Z
2022-03-31T19:15:45.000Z
register/utils.py
cds-snc/covid-alert-portal
e7d56fa9fa4a2ad2d60f056eae063713661bd260
[ "MIT" ]
6
2020-11-28T19:30:20.000Z
2021-07-29T18:06:55.000Z
import random import string from django.conf import settings from nacl.signing import SigningKey from nacl.encoding import Base64Encoder import segno import io import cairosvg from django.template.loader import render_to_string import base64 import PyPDF2 import os # Will generate a random alphanumeric string with 62...
25.821918
88
0.687268
import random import string from django.conf import settings from nacl.signing import SigningKey from nacl.encoding import Base64Encoder import segno import io import cairosvg from django.template.loader import render_to_string import base64 import PyPDF2 import os def generate_random_key(length=8): return "".jo...
true
true
7909757efc83c57cf57cb11c232b61cfa262db0f
32,187
py
Python
greenberry/server/server.py
greenberrycoin/gbch-blockchain
d99843d720c6e7bd7baaf8bb4639a46dbb56caed
[ "Apache-2.0" ]
null
null
null
greenberry/server/server.py
greenberrycoin/gbch-blockchain
d99843d720c6e7bd7baaf8bb4639a46dbb56caed
[ "Apache-2.0" ]
null
null
null
greenberry/server/server.py
greenberrycoin/gbch-blockchain
d99843d720c6e7bd7baaf8bb4639a46dbb56caed
[ "Apache-2.0" ]
null
null
null
import asyncio import logging import ssl import time import traceback from ipaddress import IPv6Address, ip_address, ip_network, IPv4Network, IPv6Network from pathlib import Path from secrets import token_bytes from typing import Any, Callable, Dict, List, Optional, Union, Set, Tuple from aiohttp import ClientSession,...
45.655319
119
0.623047
import asyncio import logging import ssl import time import traceback from ipaddress import IPv6Address, ip_address, ip_network, IPv4Network, IPv6Network from pathlib import Path from secrets import token_bytes from typing import Any, Callable, Dict, List, Optional, Union, Set, Tuple from aiohttp import ClientSession,...
true
true
790975a0928a23f7ad06ee41d01f5aadfecf2c7d
627
py
Python
tethys_apps/base/testing/environment.py
quyendong/tethys
99bcb524d5b2021b88d5fa15b7ed6b8acb460997
[ "BSD-2-Clause" ]
1
2020-10-08T20:38:33.000Z
2020-10-08T20:38:33.000Z
tethys_apps/base/testing/environment.py
quyendong/tethys
99bcb524d5b2021b88d5fa15b7ed6b8acb460997
[ "BSD-2-Clause" ]
1
2018-04-14T19:40:54.000Z
2018-04-14T19:40:54.000Z
tethys_apps/base/testing/environment.py
quyendong/tethys
99bcb524d5b2021b88d5fa15b7ed6b8acb460997
[ "BSD-2-Clause" ]
1
2021-09-07T14:47:11.000Z
2021-09-07T14:47:11.000Z
from os import environ, unsetenv TESTING_DB_FLAG = 'tethys-testing_' def set_testing_environment(val): if val: environ['TETHYS_TESTING_IN_PROGRESS'] = 'true' else: environ['TETHYS_TESTING_IN_PROGRESS'] = '' del environ['TETHYS_TESTING_IN_PROGRESS'] unsetenv('TETHYS_TESTING_IN_...
24.115385
66
0.712919
from os import environ, unsetenv TESTING_DB_FLAG = 'tethys-testing_' def set_testing_environment(val): if val: environ['TETHYS_TESTING_IN_PROGRESS'] = 'true' else: environ['TETHYS_TESTING_IN_PROGRESS'] = '' del environ['TETHYS_TESTING_IN_PROGRESS'] unsetenv('TETHYS_TESTING_IN_...
true
true
79097709946944cccf778ab9dd9a3fe544457b5a
462
py
Python
soc_site/usettings/urls.py
nathanielCherian/socSite
e13ea1be15fde3511b46070038906930250e7f76
[ "MIT" ]
null
null
null
soc_site/usettings/urls.py
nathanielCherian/socSite
e13ea1be15fde3511b46070038906930250e7f76
[ "MIT" ]
8
2020-07-16T23:37:06.000Z
2022-03-12T00:35:18.000Z
soc_site/usettings/urls.py
nathanielCherian/socSite
e13ea1be15fde3511b46070038906930250e7f76
[ "MIT" ]
null
null
null
from django.urls import path from django.contrib.auth import views as auth_views from . import views urlpatterns = [ path('security/', auth_views.PasswordChangeView.as_view(), name='security_settings'), path('security/done/', auth_views.PasswordChangeDoneView.as_view(), name='password_change_done'), path('...
42
101
0.755411
from django.urls import path from django.contrib.auth import views as auth_views from . import views urlpatterns = [ path('security/', auth_views.PasswordChangeView.as_view(), name='security_settings'), path('security/done/', auth_views.PasswordChangeDoneView.as_view(), name='password_change_done'), path('...
true
true
790977996c18a84a2fe41a7e0631adef0a19b8db
1,070
py
Python
project/example/urls.py
sewi2/simple-django-template
b575b884f03ee82d0db02268cf42c554e964c4f5
[ "BSD-3-Clause" ]
null
null
null
project/example/urls.py
sewi2/simple-django-template
b575b884f03ee82d0db02268cf42c554e964c4f5
[ "BSD-3-Clause" ]
null
null
null
project/example/urls.py
sewi2/simple-django-template
b575b884f03ee82d0db02268cf42c554e964c4f5
[ "BSD-3-Clause" ]
null
null
null
"""project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
35.666667
90
0.71028
from django.contrib import admin from django.urls import path from . import views as example_views app_name = 'example' urlpatterns = [ path('', admin.site.urls), path('users/<int:pk>/', example_views.UserDetailView().as_view(), name='user_detail'), path('users/', example_views.UserCreateListView()....
true
true
790977a6c8a4f23c95657a3a5336353b908007e8
8,124
py
Python
src/cdk/stacks/outbound/stack.py
originsecurity/telemetry
e814de52e33c94eac682d2f729761b3c0d6f40aa
[ "MIT" ]
20
2020-05-12T23:41:33.000Z
2020-10-01T15:59:02.000Z
src/cdk/stacks/outbound/stack.py
originsecurity/telemetry
e814de52e33c94eac682d2f729761b3c0d6f40aa
[ "MIT" ]
null
null
null
src/cdk/stacks/outbound/stack.py
originsecurity/telemetry
e814de52e33c94eac682d2f729761b3c0d6f40aa
[ "MIT" ]
5
2020-05-13T01:07:32.000Z
2020-05-13T08:01:08.000Z
import os from aws_cdk import ( core, aws_dynamodb as ddb, aws_ec2 as ec2, aws_ecs as ecs, aws_ecr as ecr, aws_iam as iam, aws_logs as cwl, aws_secretsmanager as sm, aws_kinesis as ks, ) class LogstashOutStack(core.Stack): def __init__(self, scope: core.Construct, id: st...
38.870813
169
0.58481
import os from aws_cdk import ( core, aws_dynamodb as ddb, aws_ec2 as ec2, aws_ecs as ecs, aws_ecr as ecr, aws_iam as iam, aws_logs as cwl, aws_secretsmanager as sm, aws_kinesis as ks, ) class LogstashOutStack(core.Stack): def __init__(self, scope: core.Construct, id: st...
true
true
79097832141604ba45a0e6d4dab4229a4cfc5ce3
1,599
py
Python
tocenv/components/direction.py
KevinJeon/The-Tragedy-of-the-commons
7151faf25fd91732de19a843b39cd1f2614f34ca
[ "Apache-2.0" ]
5
2021-03-21T15:04:36.000Z
2021-06-22T14:09:00.000Z
tocenv/components/direction.py
KevinJeon/The-Tragedy-of-the-commons
7151faf25fd91732de19a843b39cd1f2614f34ca
[ "Apache-2.0" ]
5
2021-04-10T08:16:16.000Z
2021-09-12T09:28:42.000Z
tocenv/components/direction.py
KevinJeon/The-Tragedy-of-the-commons
7151faf25fd91732de19a843b39cd1f2614f34ca
[ "Apache-2.0" ]
2
2021-04-26T22:33:19.000Z
2021-06-08T18:13:49.000Z
from tocenv.components.position import Position class DirectionType: # Clock-wise numbering Up = 0 Down = 2 Left = 1 Right = 3 class Direction(object): def __init__(self): pass class Direction(object): def __init__(self, direction_type): self.direction = direction_...
23.514706
57
0.595372
from tocenv.components.position import Position class DirectionType: Up = 0 Down = 2 Left = 1 Right = 3 class Direction(object): def __init__(self): pass class Direction(object): def __init__(self, direction_type): self.direction = direction_type def turn_rig...
true
true
7909799a4d0eefc525b213bbd58cdfb3c2c7601b
861
py
Python
testing_solution.py
diwadd/TerrainCrossing
f64d15c8b0bdb93a5e811eea49357a1b3628153a
[ "MIT" ]
null
null
null
testing_solution.py
diwadd/TerrainCrossing
f64d15c8b0bdb93a5e811eea49357a1b3628153a
[ "MIT" ]
null
null
null
testing_solution.py
diwadd/TerrainCrossing
f64d15c8b0bdb93a5e811eea49357a1b3628153a
[ "MIT" ]
null
null
null
import os import time import sys total = 0.0 N = 10001 # number of cases (seeds) to test for seed in range(1,N): #vis_command = "java TerrainCrossingVis -exec \"/home/dawid/TopCoder/TerrainCrossing/./TerrainCrossing\" -novis -seed " vis_command = "java TerrainCrossingVis -exec \"$PWD/./TerrainCrossing\" -no...
26.90625
123
0.630662
import os import time import sys total = 0.0 N = 10001 for seed in range(1,N): vis_command = "java TerrainCrossingVis -exec \"$PWD/./TerrainCrossing\" -novis -seed " vis_command = vis_command + str(seed) start_time = time.time() output = os.popen(vis_command).readlines() finish_time = tim...
true
true
79097a23f11022243874f800db7e0bb6aff4c435
30,248
py
Python
utilities/kit.py
jaimeaguilera/Investing-projects
8b598a6ce9fee626964008fa65d0c3e551091564
[ "MIT" ]
1
2022-02-16T22:09:02.000Z
2022-02-16T22:09:02.000Z
utilities/kit.py
jaimeaguilera/Investing-projects
8b598a6ce9fee626964008fa65d0c3e551091564
[ "MIT" ]
null
null
null
utilities/kit.py
jaimeaguilera/Investing-projects
8b598a6ce9fee626964008fa65d0c3e551091564
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from numpy.linalg import inv def get_ffme_returns(): """ Load the Fama-French Dataset for the returns of the Top and Bottom Deciles by MarketCap """ me_m = pd.read_csv("data/Portfolios_Formed_on_ME_monthly_EW.csv", header=0, index_col=0, na_...
35.79645
161
0.647811
import pandas as pd import numpy as np from numpy.linalg import inv def get_ffme_returns(): me_m = pd.read_csv("data/Portfolios_Formed_on_ME_monthly_EW.csv", header=0, index_col=0, na_values=-99.99) rets = me_m[['Lo 10', 'Hi 10']] rets.columns = ['SmallCap', 'LargeCap'] rets = re...
true
true
79097a8b22440e831a1fcc3c5eb9851af106949c
3,349
py
Python
profiles_project/settings.py
achrefabdennebi/profiles-rest-api
f30f6caf5f1f6f120e25ed66b7ee4427230f4ae9
[ "MIT" ]
null
null
null
profiles_project/settings.py
achrefabdennebi/profiles-rest-api
f30f6caf5f1f6f120e25ed66b7ee4427230f4ae9
[ "MIT" ]
null
null
null
profiles_project/settings.py
achrefabdennebi/profiles-rest-api
f30f6caf5f1f6f120e25ed66b7ee4427230f4ae9
[ "MIT" ]
null
null
null
""" Django settings for profiles_project project. Generated by 'django-admin startproject' using Django 3.1.5. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ impo...
25.761538
91
0.697522
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = '_q_mx#x+8x13+_m=0*vp(!di0evkomq0*!@z7^-l+7!2izak14' DEBUG = bool(int(os.environ.get('DEBUG',1))) ALLOWED_HOSTS = [ 'ec2-15-188-8-39.eu-west-3.compute.amazonaws.com', '127.0.0.1' ] # Application defini...
true
true
79097b0bb90e64cc219157b677702ad787027067
1,871
py
Python
apps/snippets/serializers.py
minicloudsky/MxShop
c99836bcfc8d1bf38a41206420d5725ebc70b751
[ "Apache-2.0" ]
null
null
null
apps/snippets/serializers.py
minicloudsky/MxShop
c99836bcfc8d1bf38a41206420d5725ebc70b751
[ "Apache-2.0" ]
6
2020-06-06T01:03:41.000Z
2022-02-10T12:29:36.000Z
apps/snippets/serializers.py
minicloudsky/MxShop
c99836bcfc8d1bf38a41206420d5725ebc70b751
[ "Apache-2.0" ]
null
null
null
from rest_framework import serializers, generics from snippets.models import Snippet, LANGUAGE_CHOICES, STYLE_CHOICES from users.models import UserProfile # class SnippetSerializer(serializers.Serializer): # id = serializers.IntegerField(read_only=True) # title = serializers.CharField(required=False, allow_bl...
41.577778
92
0.691074
from rest_framework import serializers, generics from snippets.models import Snippet, LANGUAGE_CHOICES, STYLE_CHOICES from users.models import UserProfile # 给定验证过的数据创建并返回一个新的 Snippet 实例。 # """ # 根据已验证的数据更新并返回已存在的 Snippet 实例。 # """ class SnippetSerializer(serializer...
true
true
79097ba5aa1ca5ce50d48cd05e8ab1bfb0ec3a16
2,889
py
Python
Xianyang_dwt/projects/esvr_one_step.py
zjy8006/MonthlyRunoffForecastByAutoReg
661fcb5dcdfbbb2ec6861e1668a035b50e69f7c2
[ "MIT" ]
2
2020-05-18T06:45:04.000Z
2021-05-18T06:38:23.000Z
Xianyang_dwt/projects/esvr_one_step.py
zjy8006/MonthlyRunoffForecastByAutoReg
661fcb5dcdfbbb2ec6861e1668a035b50e69f7c2
[ "MIT" ]
null
null
null
Xianyang_dwt/projects/esvr_one_step.py
zjy8006/MonthlyRunoffForecastByAutoReg
661fcb5dcdfbbb2ec6861e1668a035b50e69f7c2
[ "MIT" ]
1
2020-01-17T02:56:18.000Z
2020-01-17T02:56:18.000Z
import sys import matplotlib.pyplot as plt import os root_path = os.path.dirname(os.path.abspath('__file__')) sys.path.append(root_path) from tools.models import one_step_esvr, one_step_esvr_multi_seed from Xianyang_dwt.projects.variables import variables if __name__ == '__main__': one_step_esvr_multi_seed( ...
40.125
158
0.688474
import sys import matplotlib.pyplot as plt import os root_path = os.path.dirname(os.path.abspath('__file__')) sys.path.append(root_path) from tools.models import one_step_esvr, one_step_esvr_multi_seed from Xianyang_dwt.projects.variables import variables if __name__ == '__main__': one_step_esvr_multi_seed( ...
true
true
79097dc707da47c9a7f25adcb8377cac7c771190
388
py
Python
server/recognition/config/__init__.py
jphacks/FK_1908
1d85364715706b934ad61bbe1a842a3ead2f8932
[ "MIT" ]
null
null
null
server/recognition/config/__init__.py
jphacks/FK_1908
1d85364715706b934ad61bbe1a842a3ead2f8932
[ "MIT" ]
16
2019-10-19T16:27:17.000Z
2020-08-08T02:00:01.000Z
server/recognition/config/__init__.py
jphacks/FK_1908
1d85364715706b934ad61bbe1a842a3ead2f8932
[ "MIT" ]
2
2019-10-19T01:14:38.000Z
2019-10-23T10:28:51.000Z
from config.configure import Configure conf = Configure() conf.model_name = 'vgg16.h5' conf.classes = ['no_breads', 'breads'] conf.no_breads_path = './dataset/data/pool/no_breads/*' conf.breads_path = './dataset/data/pool/breads/*' # conf.baked_breads_path = './dataset/data/pool/breads/*' conf.lr = 1e-4 conf.momentu...
24.25
57
0.726804
from config.configure import Configure conf = Configure() conf.model_name = 'vgg16.h5' conf.classes = ['no_breads', 'breads'] conf.no_breads_path = './dataset/data/pool/no_breads/*' conf.breads_path = './dataset/data/pool/breads/*' conf.lr = 1e-4 conf.momentum = 0.9 conf.batch_size = 20 conf.epochs = 20 conf.image_...
true
true
79097ddac904974a45a8f9447118fad590ed7ea4
681
py
Python
master-node-docker/sentinel/logs/errors.py
ramesh-kr/sentinel
ff65bc9200f6c940aa184c0ec0872fdcfef25363
[ "MIT" ]
342
2017-08-21T20:12:56.000Z
2022-03-19T17:58:25.000Z
master-node-docker/sentinel/logs/errors.py
ramesh-kr/sentinel
ff65bc9200f6c940aa184c0ec0872fdcfef25363
[ "MIT" ]
57
2017-11-13T11:16:47.000Z
2022-03-01T13:54:31.000Z
master-node-docker/sentinel/logs/errors.py
smtcrms/sentinel
ff65bc9200f6c940aa184c0ec0872fdcfef25363
[ "MIT" ]
72
2017-11-23T05:13:24.000Z
2022-02-25T14:18:33.000Z
# coding=utf-8 import json import falcon from ..db import db class LogTheError(object): def on_post(self, req, resp): os = str(req.body['os']).lower() account_addr = str(req.body['account_addr']).lower() error_str = str(req.body['error_str']).lower() log_type = 'error' _...
22.7
60
0.543319
import json import falcon from ..db import db class LogTheError(object): def on_post(self, req, resp): os = str(req.body['os']).lower() account_addr = str(req.body['account_addr']).lower() error_str = str(req.body['error_str']).lower() log_type = 'error' _ = db.logs.ins...
true
true
79097e6ce535cc881ef98e967912fbda2771441a
4,673
py
Python
cracking-the-coding-interview/1-chapter4_1.py
tranquan/coding-dojo
538a1bdab2bae2df2a68ca2b4fb4ad11070c6049
[ "MIT" ]
1
2019-02-24T18:51:25.000Z
2019-02-24T18:51:25.000Z
cracking-the-coding-interview/1-chapter4_1.py
tranquan/coding-dojo
538a1bdab2bae2df2a68ca2b4fb4ad11070c6049
[ "MIT" ]
null
null
null
cracking-the-coding-interview/1-chapter4_1.py
tranquan/coding-dojo
538a1bdab2bae2df2a68ca2b4fb4ad11070c6049
[ "MIT" ]
1
2020-07-02T13:50:21.000Z
2020-07-02T13:50:21.000Z
import os import sys import math import copy from binary_tree import BinaryTreeNode, BinaryTree, BinarySearchTree from graph import GraphNode, Graph # 4.6 find the next node (in-order) of a given node in a Binary Tree # -> back to root and using in-order travelsal until meet the current node. get the next def get_ne...
22.042453
88
0.682217
import os import sys import math import copy from binary_tree import BinaryTreeNode, BinaryTree, BinarySearchTree from graph import GraphNode, Graph def get_next_node(node): root = get_root_node(node) is_next = [False] next_node = get_next_node_in_order_of_node(node, root, is_next) return next_node def ge...
true
true
79097f06b99bb09eeec62f28a0f714beb153a348
12,700
py
Python
tests/test_time_frequency.py
timgates42/kapre
e0fffbbd2f9a8d1bcc4d337d15389d059646b2a8
[ "MIT" ]
null
null
null
tests/test_time_frequency.py
timgates42/kapre
e0fffbbd2f9a8d1bcc4d337d15389d059646b2a8
[ "MIT" ]
null
null
null
tests/test_time_frequency.py
timgates42/kapre
e0fffbbd2f9a8d1bcc4d337d15389d059646b2a8
[ "MIT" ]
null
null
null
import pytest import numpy as np import tensorflow as tf import tensorflow.keras import librosa from kapre import STFT, Magnitude, Phase, Delta, InverseSTFT, ApplyFilterbank from kapre.composed import ( get_melspectrogram_layer, get_log_frequency_spectrogram_layer, get_stft_mag_phase, get_perfectly_reco...
35.376045
112
0.682598
import pytest import numpy as np import tensorflow as tf import tensorflow.keras import librosa from kapre import STFT, Magnitude, Phase, Delta, InverseSTFT, ApplyFilterbank from kapre.composed import ( get_melspectrogram_layer, get_log_frequency_spectrogram_layer, get_stft_mag_phase, get_perfectly_reco...
true
true
79097f2849d32797a565e5e511c53bd73682abd2
16,831
py
Python
lib/pygments-1.2.2-patched/pygments/lexers/math.py
artdent/jgments
2a0c01daf1c787a9c20a4e916e243b08fef4a43d
[ "BSD-2-Clause" ]
3
2015-08-12T01:11:03.000Z
2018-09-21T11:51:03.000Z
lib/pygments-1.2.2-patched/pygments/lexers/math.py
artdent/jgments
2a0c01daf1c787a9c20a4e916e243b08fef4a43d
[ "BSD-2-Clause" ]
null
null
null
lib/pygments-1.2.2-patched/pygments/lexers/math.py
artdent/jgments
2a0c01daf1c787a9c20a4e916e243b08fef4a43d
[ "BSD-2-Clause" ]
1
2015-01-21T06:42:28.000Z
2015-01-21T06:42:28.000Z
# -*- coding: utf-8 -*- """ pygments.lexers.math ~~~~~~~~~~~~~~~~~~~~ Lexers for math languages. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re try: set except NameError: from sets import Set as set from pygments.l...
40.07381
86
0.503297
import re try: set except NameError: from sets import Set as set from pygments.lexer import Lexer, RegexLexer, bygroups, include, do_insertions from pygments.token import Comment, String, Punctuation, Keyword, Name, \ Operator, Number, Text, Generic from pygments.lexers.agile import PythonLexer __all__...
true
true
79097f340e2f2648a96497697dffe80e749af723
33,648
py
Python
lib/doconce/jupyterbook.py
aless80/doconce
ead1bbafa253ea9959ec81007344b58654c75233
[ "BSD-3-Clause" ]
34
2017-01-04T13:11:31.000Z
2022-03-10T20:24:51.000Z
lib/doconce/jupyterbook.py
aless80/doconce
ead1bbafa253ea9959ec81007344b58654c75233
[ "BSD-3-Clause" ]
93
2020-01-19T09:10:03.000Z
2022-01-22T11:51:12.000Z
lib/doconce/jupyterbook.py
aless80/doconce
ead1bbafa253ea9959ec81007344b58654c75233
[ "BSD-3-Clause" ]
8
2019-06-27T17:07:16.000Z
2022-03-14T10:36:38.000Z
import os, sys, shutil, glob, math import regex as re from doconce import globals from .doconce import read_file, write_file, doconce2format, handle_index_and_bib, preprocess from .misc import option, help_print_options, check_command_line_options, system, _abort, \ find_file_with_extensions, folder_checker, doconc...
46.156379
125
0.642118
import os, sys, shutil, glob, math import regex as re from doconce import globals from .doconce import read_file, write_file, doconce2format, handle_index_and_bib, preprocess from .misc import option, help_print_options, check_command_line_options, system, _abort, \ find_file_with_extensions, folder_checker, doconc...
true
true
79097f3a0e2d500368f791260f95d3a945a9bc9b
10,908
py
Python
tools/systrace_parser/parser/tracker.py
aosp-goes-brrbrr/packages_modules_NeuralNetworks
87a14e21ce905ce7c4584fe9a53e4397a4d33c67
[ "Apache-2.0" ]
null
null
null
tools/systrace_parser/parser/tracker.py
aosp-goes-brrbrr/packages_modules_NeuralNetworks
87a14e21ce905ce7c4584fe9a53e4397a4d33c67
[ "Apache-2.0" ]
null
null
null
tools/systrace_parser/parser/tracker.py
aosp-goes-brrbrr/packages_modules_NeuralNetworks
87a14e21ce905ce7c4584fe9a53e4397a4d33c67
[ "Apache-2.0" ]
2
2021-11-28T11:20:31.000Z
2021-11-28T11:28:38.000Z
""" NNAPI Systrace parser - tracking of call tree based on trace lines See contract-between-code-and-parser.txt for the specification (cases in the specification are referred to with SPEC). """ import re import sys from parser.naming import (subphases, translate_hidl_mark_to_nn_and_tag, ...
42.11583
160
0.660799
import re import sys from parser.naming import (subphases, translate_hidl_mark_to_nn_and_tag, get_function_name_from_mark, make_tag) from parser.naming import LAYER_CPU, LAYER_DRIVER, LAYER_RUNTIME, LAYER_APPLICATION from parser.naming import MARKER_SWITCH, MARKER_SUBTRACT from parser.naming...
true
true
79097f5d8f55c020a05b28ca07f4649a2597eccb
53,858
py
Python
test/functional/test_framework/test_framework.py
THYMESIA-SECURITIES/T-Notes
f8fc409bb8659940e3854ae7d41dc3b09db0ff53
[ "MIT" ]
1
2021-12-30T23:59:31.000Z
2021-12-30T23:59:31.000Z
test/functional/test_framework/test_framework.py
martin-braun/T-Notes
f8fc409bb8659940e3854ae7d41dc3b09db0ff53
[ "MIT" ]
null
null
null
test/functional/test_framework/test_framework.py
martin-braun/T-Notes
f8fc409bb8659940e3854ae7d41dc3b09db0ff53
[ "MIT" ]
1
2022-01-10T22:12:48.000Z
2022-01-10T22:12:48.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Base class for RPC testing.""" from enum import Enum from io import BytesIO import logging import optp...
42.374508
310
0.606038
from enum import Enum from io import BytesIO import logging import optparse import os import pdb import shutil from struct import pack import sys import tempfile import time from . import coverage from .address import wif_to_privkey from .authproxy import JSONRPCException from .blocktools import ( create_bloc...
true
true
790980eb4e788e001d5b6137d3b7b4df985f8dff
9,665
py
Python
pyrimaa/tests/test_aei.py
TFiFiE/AEI
dd7f1900ce1f2bba6710cdf1e7210ae959255a10
[ "MIT" ]
null
null
null
pyrimaa/tests/test_aei.py
TFiFiE/AEI
dd7f1900ce1f2bba6710cdf1e7210ae959255a10
[ "MIT" ]
null
null
null
pyrimaa/tests/test_aei.py
TFiFiE/AEI
dd7f1900ce1f2bba6710cdf1e7210ae959255a10
[ "MIT" ]
null
null
null
# Copyright (c) 2015 Brian Haskin Jr. # # 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, publish, di...
33.213058
87
0.58148
import os.path import socket import unittest from pyrimaa import aei, board from pyrimaa.aei import EngineController, EngineException, EngineResponse class MockEngine: def __init__(self, expected): self.log = None self.expected = expected self.event = 0 self._c...
true
true
79098116b40022dd798deadd81d7b5092dca94ce
11,365
bzl
Python
pytorch-frontend/third_party/XNNPACK/build_defs.bzl
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
40
2021-06-01T07:37:59.000Z
2022-03-25T01:42:09.000Z
pytorch-frontend/third_party/XNNPACK/build_defs.bzl
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
14
2021-06-01T11:52:46.000Z
2022-03-25T02:13:08.000Z
pytorch-frontend/third_party/XNNPACK/build_defs.bzl
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
7
2021-07-20T19:34:26.000Z
2022-03-13T21:07:36.000Z
"""Build definitions and rules for XNNPACK.""" load(":emscripten.bzl", "xnnpack_emscripten_benchmark_linkopts", "xnnpack_emscripten_deps", "xnnpack_emscripten_minimal_linkopts", "xnnpack_emscripten_test_linkopts") def xnnpack_visibility(): """Visibility of :XNNPACK target. All other targets have private visi...
35.295031
166
0.594017
load(":emscripten.bzl", "xnnpack_emscripten_benchmark_linkopts", "xnnpack_emscripten_deps", "xnnpack_emscripten_minimal_linkopts", "xnnpack_emscripten_test_linkopts") def xnnpack_visibility(): return ["//visibility:public"] def xnnpack_min_size_copts(): return ["-Os"] def xnnpack_std_copts(): return ["-...
true
true
79098144e8215ee50c099284b5be9479eb1b1a99
2,934
py
Python
ci/nur/update.py
nixos-users/NUR
4d011c6967bd90abb701ef3ce4658c823f103cb9
[ "MIT" ]
6
2018-02-28T19:36:34.000Z
2018-03-03T16:24:58.000Z
ci/nur/update.py
nixos-users/NUR
4d011c6967bd90abb701ef3ce4658c823f103cb9
[ "MIT" ]
null
null
null
ci/nur/update.py
nixos-users/NUR
4d011c6967bd90abb701ef3ce4658c823f103cb9
[ "MIT" ]
1
2018-02-28T18:57:02.000Z
2018-02-28T18:57:02.000Z
import logging import os import subprocess import tempfile from argparse import Namespace from pathlib import Path from .error import EvalError from .manifest import Repo, load_manifest, update_lock_file from .path import EVALREPO_PATH, LOCK_PATH, MANIFEST_PATH, nixpkgs_path from .prefetch import prefetch logger = lo...
31.212766
114
0.582822
import logging import os import subprocess import tempfile from argparse import Namespace from pathlib import Path from .error import EvalError from .manifest import Repo, load_manifest, update_lock_file from .path import EVALREPO_PATH, LOCK_PATH, MANIFEST_PATH, nixpkgs_path from .prefetch import prefetch logger = lo...
true
true
790981546ed345e2e3d0c1aa0e47e301c3a0425c
1,959
py
Python
setup.py
Ball-Man/pyglet
9c910615559a2140cc4294f653b0c48b17669b15
[ "BSD-3-Clause" ]
null
null
null
setup.py
Ball-Man/pyglet
9c910615559a2140cc4294f653b0c48b17669b15
[ "BSD-3-Clause" ]
null
null
null
setup.py
Ball-Man/pyglet
9c910615559a2140cc4294f653b0c48b17669b15
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from setuptools import setup, find_packages # Parse version number from pyglet/__init__.py: with open('pyglet/__init__.py') as f: info = {} for line in f: if line.startswith('version'): exec(line, info) break setup_info = dict( name='pyglet', ver...
33.775862
79
0.616641
from setuptools import setup, find_packages with open('pyglet/__init__.py') as f: info = {} for line in f: if line.startswith('version'): exec(line, info) break setup_info = dict( name='pyglet', version=info['version'], author='Alex Holkner', author_email='A...
true
true
7909842045bd5c7d18ca19057a97446c1df79e5d
8,400
py
Python
tools/download/flickr/src/metadata.py
IQTLabs/WITW
36154fb9388dbdc5b2776fc9d49699b26a08f8ae
[ "Apache-2.0" ]
null
null
null
tools/download/flickr/src/metadata.py
IQTLabs/WITW
36154fb9388dbdc5b2776fc9d49699b26a08f8ae
[ "Apache-2.0" ]
null
null
null
tools/download/flickr/src/metadata.py
IQTLabs/WITW
36154fb9388dbdc5b2776fc9d49699b26a08f8ae
[ "Apache-2.0" ]
null
null
null
import json import os import httpx import time def get_cities(cfg): return cfg['cities'].keys() def get_usable_bounding_boxes(nominal_boxes, cfg): FLICKR_PUBLIC = get_secret('flickr_api_key') FLICKR_SECRET = get_secret('flickr_api_secret') flickr = FlickrAPI(FLICKR_PUBLIC, FLICKR_SECRET, format='parsed-j...
37.168142
97
0.542143
import json import os import httpx import time def get_cities(cfg): return cfg['cities'].keys() def get_usable_bounding_boxes(nominal_boxes, cfg): FLICKR_PUBLIC = get_secret('flickr_api_key') FLICKR_SECRET = get_secret('flickr_api_secret') flickr = FlickrAPI(FLICKR_PUBLIC, FLICKR_SECRET, format='parsed-j...
true
true
790984c2eef16a3216560f07dbdaa093bbfa15c5
78
py
Python
scripts/quest/autogen_q32226s.py
doriyan13/doristory
438caf3b123922da3f5f3b16fcc98a26a8ab85ce
[ "MIT" ]
null
null
null
scripts/quest/autogen_q32226s.py
doriyan13/doristory
438caf3b123922da3f5f3b16fcc98a26a8ab85ce
[ "MIT" ]
null
null
null
scripts/quest/autogen_q32226s.py
doriyan13/doristory
438caf3b123922da3f5f3b16fcc98a26a8ab85ce
[ "MIT" ]
null
null
null
# Character field ID when accessed: 100000201 # ParentID: 32226 # ObjectID: 0
19.5
45
0.75641
true
true
790985c3fc5c27ea03c607d77f8ea862d555a0bb
588
py
Python
chromosomer/exception.py
gtamazian/Chromosomer
f32c00e07cf9f087aa3a3afd28120c0ef104f069
[ "MIT" ]
33
2016-08-27T13:20:13.000Z
2022-02-07T09:20:29.000Z
chromosomer/exception.py
kkapuria3/chromosomer
f32c00e07cf9f087aa3a3afd28120c0ef104f069
[ "MIT" ]
24
2016-05-08T18:54:11.000Z
2021-11-28T16:42:04.000Z
chromosomer/exception.py
gtamazian/Chromosomer
f32c00e07cf9f087aa3a3afd28120c0ef104f069
[ "MIT" ]
10
2016-12-28T12:15:31.000Z
2021-01-29T09:12:57.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 by Gaik Tamazian # gaik (dot) tamazian (at) gmail (dot) com class Error(Exception): """ The class describes a basic error that may occur in any of the Chromosomer-related routines. """ pass class MapError(Error): """ The...
19.6
68
0.653061
class Error(Exception): pass class MapError(Error): pass class AlignmentToMapError(Error): pass
true
true
79098620e69704763c2a9b64055fe7acdc00bfad
4,335
py
Python
submit-to-cuckoo.py
seanthegeek/cuckoo-modified-utils
ad8bf46b33eeea22e5665538d2ee1be16fe96ded
[ "Apache-2.0" ]
4
2016-06-14T04:12:22.000Z
2018-10-18T08:09:00.000Z
submit-to-cuckoo.py
seanthegeek/cuckoo-modified-utils
ad8bf46b33eeea22e5665538d2ee1be16fe96ded
[ "Apache-2.0" ]
null
null
null
submit-to-cuckoo.py
seanthegeek/cuckoo-modified-utils
ad8bf46b33eeea22e5665538d2ee1be16fe96ded
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Submits files or a URL to Cuckoo""" from builtins import input from argparse import ArgumentParser from distutils.util import strtobool from io import BytesIO from time import sleep from glob import glob from zipfile import ZipFile from os.path import basename from cu...
35.243902
113
0.655363
from builtins import input from argparse import ArgumentParser from distutils.util import strtobool from io import BytesIO from time import sleep from glob import glob from zipfile import ZipFile from os.path import basename from cuckooutils import Cuckoo, get_file_hash __version__ = "1.0.0" __license = """Copyri...
true
true
790986e7ab580cc18b91f362d96e88ad4cf9db2f
59,271
py
Python
kmip/pie/client.py
eniltonj/PyKMIP
c549e843e9340c404d136a58ee65b5e77ea8c83b
[ "Apache-2.0" ]
null
null
null
kmip/pie/client.py
eniltonj/PyKMIP
c549e843e9340c404d136a58ee65b5e77ea8c83b
[ "Apache-2.0" ]
1
2021-06-25T15:43:48.000Z
2021-06-25T15:43:48.000Z
kmip/pie/client.py
eniltonj/PyKMIP
c549e843e9340c404d136a58ee65b5e77ea8c83b
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 The Johns Hopkins University/Applied Physics Laboratory # 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/LICEN...
42.36669
79
0.585278
import logging import six from kmip.core import enums from kmip.core import primitives from kmip.core import objects as cobjects from kmip.core.factories import attributes from kmip.core.attributes import CryptographicParameters from kmip.core.attributes import DerivationParameters from kmip.pie impo...
true
true
7909877c41e2c9ca15b79417d6d3a0d3ac96a500
1,970
py
Python
historical_prices.py
pedroeml/stock-projection-service
5dcee8aa963bf66587f1ac2316306b537ab91449
[ "MIT" ]
null
null
null
historical_prices.py
pedroeml/stock-projection-service
5dcee8aa963bf66587f1ac2316306b537ab91449
[ "MIT" ]
null
null
null
historical_prices.py
pedroeml/stock-projection-service
5dcee8aa963bf66587f1ac2316306b537ab91449
[ "MIT" ]
null
null
null
from gzip import decompress from http import cookiejar from json import loads, dumps from os import environ from time import strftime, gmtime from urllib import request def get_url(ticker): env = environ.get('FLASK_ENV', 'development') if env == 'development': url = 'https://www.fundamentus.com.br/am...
35.178571
162
0.658883
from gzip import decompress from http import cookiejar from json import loads, dumps from os import environ from time import strftime, gmtime from urllib import request def get_url(ticker): env = environ.get('FLASK_ENV', 'development') if env == 'development': url = 'https://www.fundamentus.com.br/am...
true
true
790989ca6ca7a112d9880037f18a1b8ba22b57d3
3,055
py
Python
app/routes.py
konstantingoretzki/spamdetection-web
272654b78bc87df6b0032c86acd4c79dce0e0d18
[ "MIT" ]
null
null
null
app/routes.py
konstantingoretzki/spamdetection-web
272654b78bc87df6b0032c86acd4c79dce0e0d18
[ "MIT" ]
1
2021-10-01T18:22:08.000Z
2021-10-01T18:33:14.000Z
app/routes.py
konstantingoretzki/spamdetection-web
272654b78bc87df6b0032c86acd4c79dce0e0d18
[ "MIT" ]
1
2021-10-01T18:19:51.000Z
2021-10-01T18:19:51.000Z
from flask import render_template, url_for, request, flash, redirect, make_response import email from app import app from werkzeug.utils import secure_filename from app.predict_email import Prediction import tempfile predict_email = Prediction() def parse_email(email_raw): parser = email.parser.BytesParser() ...
32.157895
99
0.614403
from flask import render_template, url_for, request, flash, redirect, make_response import email from app import app from werkzeug.utils import secure_filename from app.predict_email import Prediction import tempfile predict_email = Prediction() def parse_email(email_raw): parser = email.parser.BytesParser() ...
true
true
79098af28f0006246248094623e55921a1319fb2
1,709
py
Python
generation/generateMakeflows.py
Nekel-Seyew/mpi-paper-tests
9606e0aa1c79dd389db2a289cd7968e83d99b414
[ "MIT" ]
null
null
null
generation/generateMakeflows.py
Nekel-Seyew/mpi-paper-tests
9606e0aa1c79dd389db2a289cd7968e83d99b414
[ "MIT" ]
null
null
null
generation/generateMakeflows.py
Nekel-Seyew/mpi-paper-tests
9606e0aa1c79dd389db2a289cd7968e83d99b414
[ "MIT" ]
null
null
null
#1KiB with open("Makeflow1KiB","w+") as f: f.write("CORES=1\nMEMORY=1000\nDISK=1\n\n") for x in range(100): f.write("out%i.txt:generate\n\t./generate out%i.txt %i\n\n"%(x,x,1024*1)) #10KiB with open("Makeflow10KiB","w+") as f: f.write("CORES=1\nMEMORY=1000\nDISK=1\n\n") for x in range(100): ...
34.877551
100
0.600936
with open("Makeflow1KiB","w+") as f: f.write("CORES=1\nMEMORY=1000\nDISK=1\n\n") for x in range(100): f.write("out%i.txt:generate\n\t./generate out%i.txt %i\n\n"%(x,x,1024*1)) with open("Makeflow10KiB","w+") as f: f.write("CORES=1\nMEMORY=1000\nDISK=1\n\n") for x in range(100): f.write(...
false
true
79098aff41ce884d4960225611f197388c0e18d5
3,077
py
Python
cli/tests/test_cli/test_artifacts.py
polyaxon/cli
3543c0220a8a7c06fc9573cd2a740f8ae4930641
[ "Apache-2.0" ]
null
null
null
cli/tests/test_cli/test_artifacts.py
polyaxon/cli
3543c0220a8a7c06fc9573cd2a740f8ae4930641
[ "Apache-2.0" ]
1
2022-01-24T11:26:47.000Z
2022-03-18T23:17:58.000Z
cli/tests/test_cli/test_artifacts.py
polyaxon/cli
3543c0220a8a7c06fc9573cd2a740f8ae4930641
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2022 Polyaxon, 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 ...
39.448718
88
0.702632
import pytest from mock import MagicMock, patch from polyaxon.cli.artifacts import artifacts from polyaxon_sdk import V1ProjectVersionKind from tests.test_cli.utils import BaseCommandTestCase @pytest.mark.cli_mark class TestCliArtifacts(BaseCommandTestCase): @patch("polyaxon_sdk.ProjectsV1Api.cr...
true
true
79098d551370154b2ff8d4f0aac06ee98901fdbb
154
py
Python
aiocloudflare/api/accounts/registrar/domains/domains.py
Stewart86/aioCloudflare
341c0941f8f888a8b7e696e64550bce5da4949e6
[ "MIT" ]
2
2021-09-14T13:20:55.000Z
2022-02-24T14:18:24.000Z
aiocloudflare/api/accounts/registrar/domains/domains.py
Stewart86/aioCloudflare
341c0941f8f888a8b7e696e64550bce5da4949e6
[ "MIT" ]
46
2021-09-08T08:39:45.000Z
2022-03-29T12:31:05.000Z
aiocloudflare/api/accounts/registrar/domains/domains.py
Stewart86/aioCloudflare
341c0941f8f888a8b7e696e64550bce5da4949e6
[ "MIT" ]
1
2021-12-30T23:02:23.000Z
2021-12-30T23:02:23.000Z
from aiocloudflare.commons.auth import Auth class Domains(Auth): _endpoint1 = "accounts" _endpoint2 = "registrar/domains" _endpoint3 = None
19.25
43
0.727273
from aiocloudflare.commons.auth import Auth class Domains(Auth): _endpoint1 = "accounts" _endpoint2 = "registrar/domains" _endpoint3 = None
true
true
79098dc6fd7a4682129a7a53c90fb3fd027f4ac5
28,030
py
Python
code/learningutil.py
jiaxx/temporal_learning_paper
abffd5bfb36aaad7139485a9b8bd29f3858389e8
[ "MIT" ]
null
null
null
code/learningutil.py
jiaxx/temporal_learning_paper
abffd5bfb36aaad7139485a9b8bd29f3858389e8
[ "MIT" ]
null
null
null
code/learningutil.py
jiaxx/temporal_learning_paper
abffd5bfb36aaad7139485a9b8bd29f3858389e8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Oct 4 16:39:50 2013 @author: Xiaoxuan Jia """ import json import csv import re import scipy.io import scipy.stats import random import numpy as np import os import itertools import cPickle as pk import pymongo import scipy from scipy.stats import norm import matplotlib.pyplo...
42.728659
206
0.506136
import json import csv import re import scipy.io import scipy.stats import random import numpy as np import os import itertools import cPickle as pk import pymongo import scipy from scipy.stats import norm import matplotlib.pyplot as plt def SBcorrection(corr, mult_factor): pred = (mult_factor*corr)/(1+(mult_fac...
true
true
79098e40c5c8aee6b091a115bc342676ea726e35
5,835
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_resource_skus_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_resource_skus_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_resource_skus_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.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 may ...
46.309524
153
0.65587
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
79098e7856e0b96498aa889adb2f57e10d375f5a
1,158
py
Python
main.py
mhgzadeh/unit-testing-python
565fe4d61a8b4c9b1b72ea811ae0cfcabfb32f9f
[ "MIT" ]
null
null
null
main.py
mhgzadeh/unit-testing-python
565fe4d61a8b4c9b1b72ea811ae0cfcabfb32f9f
[ "MIT" ]
null
null
null
main.py
mhgzadeh/unit-testing-python
565fe4d61a8b4c9b1b72ea811ae0cfcabfb32f9f
[ "MIT" ]
null
null
null
from models import Supervisor import unittest class SupervisorTestCase(unittest.TestCase): def setUp(self): self.supervisor = Supervisor.login('Mohammad', '1234', '0123456') self.sample = Supervisor.sample() def test_all_data(self): self.assertIsInstance(self.supervisor, Supervisor, ...
41.357143
73
0.609672
from models import Supervisor import unittest class SupervisorTestCase(unittest.TestCase): def setUp(self): self.supervisor = Supervisor.login('Mohammad', '1234', '0123456') self.sample = Supervisor.sample() def test_all_data(self): self.assertIsInstance(self.supervisor, Supervisor, ...
true
true
79098e7b2dcb8fb3210f7ee4c96faea4f5ca54d0
367
py
Python
kiwi-content/kiwi/TransferTypes.py
bubblegumsoldier/kiwi
91701c1806dcfbc1b038fecf7c2cab8bb07a01d4
[ "MIT" ]
null
null
null
kiwi-content/kiwi/TransferTypes.py
bubblegumsoldier/kiwi
91701c1806dcfbc1b038fecf7c2cab8bb07a01d4
[ "MIT" ]
null
null
null
kiwi-content/kiwi/TransferTypes.py
bubblegumsoldier/kiwi
91701c1806dcfbc1b038fecf7c2cab8bb07a01d4
[ "MIT" ]
null
null
null
from collections import namedtuple Vote = namedtuple('Vote', 'user post vote') def create_vote(vote_dict, cutoff): """ changes the vote to the [-1, 1] range """ modified_vote = 1 if float(vote_dict['vote']) > cutoff else -1 return Vote( user=str(vote_dict['user']), post=str(vote_d...
22.9375
66
0.621253
from collections import namedtuple Vote = namedtuple('Vote', 'user post vote') def create_vote(vote_dict, cutoff): modified_vote = 1 if float(vote_dict['vote']) > cutoff else -1 return Vote( user=str(vote_dict['user']), post=str(vote_dict['post']), vote=modified_vote )
true
true
790990df676815bf0fd8a03c4bade925f934c204
5,633
py
Python
examples/07-filter/09-buffer.py
pepsipepsi/nodebox_opengl_python3
cfb2633df1055a028672b11311603cc2241a1378
[ "BSD-3-Clause" ]
1
2017-03-19T16:56:46.000Z
2017-03-19T16:56:46.000Z
examples/07-filter/09-buffer.py
pepsipepsi/nodebox_opengl_python3
cfb2633df1055a028672b11311603cc2241a1378
[ "BSD-3-Clause" ]
null
null
null
examples/07-filter/09-buffer.py
pepsipepsi/nodebox_opengl_python3
cfb2633df1055a028672b11311603cc2241a1378
[ "BSD-3-Clause" ]
null
null
null
import os, sys sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics.context import * from nodebox.graphics import * from nodebox.graphics.geometry import coordinates from nodebox.graphics.shader import dropshadow, OffscreenBuffer, transparent, stretch from time import time flower = Image("cell.png") ...
37.304636
91
0.606071
import os, sys sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics.context import * from nodebox.graphics import * from nodebox.graphics.geometry import coordinates from nodebox.graphics.shader import dropshadow, OffscreenBuffer, transparent, stretch from time import time flower = Image("cell.png") ...
true
true
7909915319d47ac7a4983be349b54c6ae045052c
7,108
py
Python
scripts/canvas.py
hsmohammed/rudaux
673b2bb2d6b08f9d9c34a2ed6e284d9def1a0fc7
[ "MIT" ]
1
2020-09-10T20:36:56.000Z
2020-09-10T20:36:56.000Z
scripts/canvas.py
hsmohammed/rudaux
673b2bb2d6b08f9d9c34a2ed6e284d9def1a0fc7
[ "MIT" ]
null
null
null
scripts/canvas.py
hsmohammed/rudaux
673b2bb2d6b08f9d9c34a2ed6e284d9def1a0fc7
[ "MIT" ]
null
null
null
import requests import urllib.parse import posixpath import pandas as pd def get_enrollment_dates(course): '''Takes a course object and returns student dates of enrollment. Useful for handling late registrations and modified deadlines. Example: course.get_enrollment_date()''' url_path = posixpath....
37.808511
134
0.638295
import requests import urllib.parse import posixpath import pandas as pd def get_enrollment_dates(course): url_path = posixpath.join("api", "v1", "courses", course['course_id'], "enrollments") api_url = urllib.parse.urljoin(course['hostname'], url_path) token = course['token'] resp = None students ...
true
true
7909931f8408e609b8e7160d9642616367995e78
246
py
Python
students/k3342/laboratory_works/Nikonchuk_Anna/Lr1/minos/minos/views.py
nikonura/ITMO_ICT_WebProgramming_2020
f930041ce4a0fe64782f67716ca8056abb8a9792
[ "MIT" ]
null
null
null
students/k3342/laboratory_works/Nikonchuk_Anna/Lr1/minos/minos/views.py
nikonura/ITMO_ICT_WebProgramming_2020
f930041ce4a0fe64782f67716ca8056abb8a9792
[ "MIT" ]
null
null
null
students/k3342/laboratory_works/Nikonchuk_Anna/Lr1/minos/minos/views.py
nikonura/ITMO_ICT_WebProgramming_2020
f930041ce4a0fe64782f67716ca8056abb8a9792
[ "MIT" ]
null
null
null
from django.template.backends import django from django.shortcuts import render, redirect def main_board(request): return render(request, 'main_page.html') def redirect_main(request): return redirect('main_boar_url', permanent=True)
20.5
52
0.780488
from django.template.backends import django from django.shortcuts import render, redirect def main_board(request): return render(request, 'main_page.html') def redirect_main(request): return redirect('main_boar_url', permanent=True)
true
true
7909937e459dc34380eb31c3ba0d952341278cac
576
py
Python
ex100.py
juniorpedroso/Exercicios-CEV-Python
4adad3b6f3994cf61f9ead5564124b8b9c58d304
[ "MIT" ]
null
null
null
ex100.py
juniorpedroso/Exercicios-CEV-Python
4adad3b6f3994cf61f9ead5564124b8b9c58d304
[ "MIT" ]
null
null
null
ex100.py
juniorpedroso/Exercicios-CEV-Python
4adad3b6f3994cf61f9ead5564124b8b9c58d304
[ "MIT" ]
null
null
null
from random import randint from time import sleep def sorteio(lista): print('-=' * 30) print('Sorteando 5 valores da lista: ', end='') for i in range(0, 5): lista.append(randint(1, 10)) print(f'{lista[i]} ', end='', flush=True) sleep(0.3) print('PRONTO!') def somaPar(lista): ...
22.153846
64
0.574653
from random import randint from time import sleep def sorteio(lista): print('-=' * 30) print('Sorteando 5 valores da lista: ', end='') for i in range(0, 5): lista.append(randint(1, 10)) print(f'{lista[i]} ', end='', flush=True) sleep(0.3) print('PRONTO!') def somaPar(lista): ...
true
true
79099452b4043d9bd4ad3b1f997f7dbcc9a34dee
139
py
Python
reddit2telegram/channels/r_rainbow6/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
187
2016-09-20T09:15:54.000Z
2022-03-29T12:22:33.000Z
reddit2telegram/channels/r_rainbow6/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
84
2016-09-22T14:25:07.000Z
2022-03-19T01:26:17.000Z
reddit2telegram/channels/r_rainbow6/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
172
2016-09-21T15:39:39.000Z
2022-03-16T15:15:58.000Z
#encoding:utf-8 subreddit = 'rainbow6' t_channel = '@r_rainbow6' def send_post(submission, r2t): return r2t.send_simple(submission)
15.444444
38
0.741007
subreddit = 'rainbow6' t_channel = '@r_rainbow6' def send_post(submission, r2t): return r2t.send_simple(submission)
true
true
790994971c923a91faea43b5aff0923f43c04c43
1,401
py
Python
cloudinit/install-certificates.py
cisagov/openvpn-server-tf-module
d8b68980a4175f85e884a33eebbd54542af8ad48
[ "CC0-1.0" ]
4
2020-07-29T09:47:11.000Z
2021-07-15T22:58:52.000Z
cloudinit/install-certificates.py
cisagov/openvpn-server-tf-module
d8b68980a4175f85e884a33eebbd54542af8ad48
[ "CC0-1.0" ]
19
2019-07-30T14:37:37.000Z
2022-02-25T19:33:58.000Z
cloudinit/install-certificates.py
cisagov/openvpn-server-tf-module
d8b68980a4175f85e884a33eebbd54542af8ad48
[ "CC0-1.0" ]
1
2021-01-01T11:32:12.000Z
2021-01-01T11:32:12.000Z
#!/usr/bin/env python3 """Install certificates from AWS S3. This file is a template. It should be processed by Terraform. """ # Third-Party Libraries import boto3 # Inputs from terraform CERT_BUCKET_NAME = "${cert_bucket_name}" CERT_READ_ROLE_ARN = "${cert_read_role_arn}" SERVER_FQDN = "${server_fqdn}" # These fi...
28.591837
74
0.734475
import boto3 CERT_BUCKET_NAME = "${cert_bucket_name}" CERT_READ_ROLE_ARN = "${cert_read_role_arn}" SERVER_FQDN = "${server_fqdn}" INSTALLATION_MAP = { "fullchain.pem": "/etc/openvpn/server/server.crt", "privkey.pem": "/etc/openvpn/server/server.key", } sts = boto3.client("sts") stsresponse = sts.as...
true
true
790994e466649896abafcb30c4ebeef1a3705628
2,424
py
Python
tests/view/lists/templatetags/test_pagination.py
mbeko/moztrap
db75e1f8756ef2c0c39652a66302b19c8afa0256
[ "BSD-2-Clause" ]
1
2015-02-10T15:09:42.000Z
2015-02-10T15:09:42.000Z
tests/view/lists/templatetags/test_pagination.py
mbeko/moztrap
db75e1f8756ef2c0c39652a66302b19c8afa0256
[ "BSD-2-Clause" ]
null
null
null
tests/view/lists/templatetags/test_pagination.py
mbeko/moztrap
db75e1f8756ef2c0c39652a66302b19c8afa0256
[ "BSD-2-Clause" ]
null
null
null
""" Tests for pagination template tags and filters. """ from mock import Mock from django import template from tests import case class PaginateTest(case.DBTestCase): """Tests for paginate template tag.""" def test_paginate(self): """Places Pager object in context with size/num from request.""" ...
32.756757
77
0.625413
from mock import Mock from django import template from tests import case class PaginateTest(case.DBTestCase): def test_paginate(self): from moztrap.model.tags.models import Tag tpl = template.Template( "{% load pagination %}{% paginate queryset as pager %}" "{% for obj ...
true
true
790995256658a48ba39d1d7b1b9f417252197373
3,411
py
Python
windows/src/install.py
PeachyPrinter/peachyinstaller
0ee0ad36eb6acd13b6a11d022d53a196de4963c3
[ "Apache-2.0" ]
2
2017-03-08T02:47:07.000Z
2019-06-24T09:47:26.000Z
windows/src/install.py
PeachyPrinter/peachyinstaller
0ee0ad36eb6acd13b6a11d022d53a196de4963c3
[ "Apache-2.0" ]
null
null
null
windows/src/install.py
PeachyPrinter/peachyinstaller
0ee0ad36eb6acd13b6a11d022d53a196de4963c3
[ "Apache-2.0" ]
8
2016-05-11T11:38:49.000Z
2020-02-15T09:55:40.000Z
import sys import os from win32com.shell import shell import logging import argparse from Tkinter import * import tkMessageBox from config import default_config_url from ui import InstallerUI from installer_api import InstallerAPI def get_logfile_path(): profile = os.getenv('USERPROFILE') company_name...
39.206897
183
0.660803
import sys import os from win32com.shell import shell import logging import argparse from Tkinter import * import tkMessageBox from config import default_config_url from ui import InstallerUI from installer_api import InstallerAPI def get_logfile_path(): profile = os.getenv('USERPROFILE') company_name...
true
true
79099572056e8f4d7b864e19b78d61a59027140f
9,810
py
Python
audio_synthesizer.py
danielkrause/DCASE2022-data-generator
b0ff595e7cf7e5581d9a0ee4d3292a41117db8e5
[ "RSA-MD" ]
null
null
null
audio_synthesizer.py
danielkrause/DCASE2022-data-generator
b0ff595e7cf7e5581d9a0ee4d3292a41117db8e5
[ "RSA-MD" ]
null
null
null
audio_synthesizer.py
danielkrause/DCASE2022-data-generator
b0ff595e7cf7e5581d9a0ee4d3292a41117db8e5
[ "RSA-MD" ]
null
null
null
import numpy as np import scipy.io import utils import os import mat73 import scipy.signal as signal import soundfile class AudioSynthesizer(object): def __init__( self, params, mixtures, mixture_setup, db_config, audio_format ): self._mixtures = mixtures self._...
55.11236
191
0.504383
import numpy as np import scipy.io import utils import os import mat73 import scipy.signal as signal import soundfile class AudioSynthesizer(object): def __init__( self, params, mixtures, mixture_setup, db_config, audio_format ): self._mixtures = mixtures self._...
true
true
7909960b472053cc9cd4dd32501fa91bf02f1340
4,018
py
Python
tests/locals/underload/test_trivial.py
beloglazov/openstack-neat
a5a853ae2affb0cdc582e3ab641737f5ebd3d0a7
[ "Apache-2.0" ]
34
2015-01-04T08:02:37.000Z
2022-02-19T14:43:47.000Z
tests/locals/underload/test_trivial.py
MisterPup/OpenStack-Neat-Ceilometer
4e6685ea1a9deb75d1186e60097a357251eaed8d
[ "Apache-2.0" ]
3
2015-01-23T07:45:15.000Z
2019-07-03T11:16:27.000Z
tests/locals/underload/test_trivial.py
MisterPup/OpenStack-Neat-Ceilometer
4e6685ea1a9deb75d1186e60097a357251eaed8d
[ "Apache-2.0" ]
22
2015-01-14T17:54:46.000Z
2021-08-09T06:09:17.000Z
# Copyright 2012 Anton Beloglazov # # 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 writ...
42.294737
79
0.595819
from mocktest import * from pyqcy import * import neat.locals.underload.trivial as trivial import logging logging.disable(logging.CRITICAL) class Trivial(TestCase): @qc(10) def always_underloaded_factory( time_step=int_(min=0, max=10), migration_time=float_(min=0, max=10), ...
true
true