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
f728890a0d42d2f6f6382489586517b38e0aa9d2
6,731
py
Python
test/util/ogfuncoin-util-test.py
ogfuncoin/ogfuncoin
18d00bc1d93335c86ae6f2971321e93e627ae570
[ "MIT" ]
null
null
null
test/util/ogfuncoin-util-test.py
ogfuncoin/ogfuncoin
18d00bc1d93335c86ae6f2971321e93e627ae570
[ "MIT" ]
null
null
null
test/util/ogfuncoin-util-test.py
ogfuncoin/ogfuncoin
18d00bc1d93335c86ae6f2971321e93e627ae570
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2014 BitPay Inc. # Copyright 2016-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. """Test framework for ogfuncoin utils. Runs automatically during `make check`. ...
37.187845
125
0.63735
from __future__ import division,print_function,unicode_literals import argparse import binascii try: import configparser except ImportError: import ConfigParser as configparser import difflib import json import logging import os import pprint import subprocess import sys def main(): config = configp...
true
true
f72889268d2b7490973888397ebf08476e6ac171
7,245
py
Python
main_analysis/40.construct_distribution_plots.py
thodk/proteostasis_imprinting_across_evolution
e6e414b36bbfaf2f4c4ac6fc80a31c6c13c3902e
[ "MIT" ]
null
null
null
main_analysis/40.construct_distribution_plots.py
thodk/proteostasis_imprinting_across_evolution
e6e414b36bbfaf2f4c4ac6fc80a31c6c13c3902e
[ "MIT" ]
null
null
null
main_analysis/40.construct_distribution_plots.py
thodk/proteostasis_imprinting_across_evolution
e6e414b36bbfaf2f4c4ac6fc80a31c6c13c3902e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import numpy import pandas import itertools from matplotlib import pyplot as plt import matplotlib.lines from matplotlib.gridspec import GridSpec from matplotlib.lines import Line2D from matplotlib.legend_handler import HandlerLine2D from scipy.stats import gaussian_kde import matplot...
35.514706
84
0.63147
import os import numpy import pandas import itertools from matplotlib import pyplot as plt import matplotlib.lines from matplotlib.gridspec import GridSpec from matplotlib.lines import Line2D from matplotlib.legend_handler import HandlerLine2D from scipy.stats import gaussian_kde import matplotlib matplotlib.rcParams...
false
true
f72889b91d938b6d23210c99b7478a6dee176746
35,328
py
Python
gui/kivy/main_window.py
gpdionisio/electrum-pivx
d17e7f3f295da745ec4c9839624ec03cf458d524
[ "MIT" ]
1
2019-01-11T01:05:47.000Z
2019-01-11T01:05:47.000Z
gui/kivy/main_window.py
gpdionisio/electrum-pivx
d17e7f3f295da745ec4c9839624ec03cf458d524
[ "MIT" ]
null
null
null
gui/kivy/main_window.py
gpdionisio/electrum-pivx
d17e7f3f295da745ec4c9839624ec03cf458d524
[ "MIT" ]
6
2018-08-30T18:32:58.000Z
2019-10-20T02:38:31.000Z
import re import os import sys import time import datetime import traceback from decimal import Decimal import threading import electrum from electrum.bitcoin import TYPE_ADDRESS from electrum import WalletStorage, Wallet from electrum_gui.kivy.i18n import _ from electrum.paymentrequest import InvoiceStore from electr...
37.663113
127
0.615914
import re import os import sys import time import datetime import traceback from decimal import Decimal import threading import electrum from electrum.bitcoin import TYPE_ADDRESS from electrum import WalletStorage, Wallet from electrum_gui.kivy.i18n import _ from electrum.paymentrequest import InvoiceStore from electr...
true
true
f72889e6429a67c26e47ede38f20bf0484fc1a19
4,695
py
Python
slackups/emoji.py
davr/slackups
21a44f00f2b337716204df2acd8365f5480e13e7
[ "MIT" ]
1
2016-07-29T17:50:16.000Z
2016-07-29T17:50:16.000Z
slackups/emoji.py
davr/slackups
21a44f00f2b337716204df2acd8365f5480e13e7
[ "MIT" ]
null
null
null
slackups/emoji.py
davr/slackups
21a44f00f2b337716204df2acd8365f5480e13e7
[ "MIT" ]
null
null
null
import json import re import unicodedata import string import hashlib def smileys_to_ascii(s): res = [] for i, c in enumerate(s): if c in SMILEYS: res.append(SMILEYS[c]) if i < len(s) - 1 and s[i + 1] in SMILEYS: # separate smileys res.append(' ') elif or...
23.712121
79
0.405112
import json import re import unicodedata import string import hashlib def smileys_to_ascii(s): res = [] for i, c in enumerate(s): if c in SMILEYS: res.append(SMILEYS[c]) if i < len(s) - 1 and s[i + 1] in SMILEYS: res.append(' ') elif ord(c) > 128 and uni...
true
true
f7288b6c97be42cbd408fd69733e079523f6e671
10,446
py
Python
tests/MyGame/MonsterExtra.py
tsturm/flatbuffers
c1daa6ba0cda58f53e1cda35e0be26c55f5fbcbd
[ "Apache-2.0" ]
null
null
null
tests/MyGame/MonsterExtra.py
tsturm/flatbuffers
c1daa6ba0cda58f53e1cda35e0be26c55f5fbcbd
[ "Apache-2.0" ]
null
null
null
tests/MyGame/MonsterExtra.py
tsturm/flatbuffers
c1daa6ba0cda58f53e1cda35e0be26c55f5fbcbd
[ "Apache-2.0" ]
2
2020-09-14T08:16:47.000Z
2021-01-15T10:26:43.000Z
# automatically generated by the FlatBuffers compiler, do not modify # namespace: MyGame import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class MonsterExtra(object): __slots__ = ['_tab'] @classmethod def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode.Get(...
37.985455
135
0.652786
import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class MonsterExtra(object): __slots__ = ['_tab'] @classmethod def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = MonsterExtra() x.Init(buf,...
true
true
f7288b94c92a855c127eb8f1e957ee46cddd8033
597
py
Python
blog_server_django/blog/urls.py
kfrime/yonder_old
f086baba25bed0959ee91ca1b63865bd1fd9cf33
[ "MIT" ]
null
null
null
blog_server_django/blog/urls.py
kfrime/yonder_old
f086baba25bed0959ee91ca1b63865bd1fd9cf33
[ "MIT" ]
4
2021-03-09T08:37:20.000Z
2021-06-10T22:02:22.000Z
blog_server_django/blog/urls.py
kfrime/yonder_old
f086baba25bed0959ee91ca1b63865bd1fd9cf33
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- from django.urls import path, include from rest_framework import routers from . import views api_router = routers.DefaultRouter() api_router.register(r'topics', views.TopicAPIView, base_name='api_topics') api_router.register(r'tags', views.TagAPIView, base_name='api_tags') api_router.register(r...
35.117647
80
0.778894
from django.urls import path, include from rest_framework import routers from . import views api_router = routers.DefaultRouter() api_router.register(r'topics', views.TopicAPIView, base_name='api_topics') api_router.register(r'tags', views.TagAPIView, base_name='api_tags') api_router.register(r'articles', views.Arti...
true
true
f7288c24c41fa9ec41287c08c1264f4516abf764
21,323
py
Python
rusty_green_kernel/test/test_rusty_green_kernel.py
rusty-fast-solvers/rusty-green-kernel
9317f88e873550270c482473005250a9d2df2950
[ "BSD-3-Clause" ]
7
2021-04-26T14:28:44.000Z
2021-06-15T05:09:12.000Z
rusty_green_kernel/test/test_rusty_green_kernel.py
rusty-fast-solvers/rusty-green-kernel
9317f88e873550270c482473005250a9d2df2950
[ "BSD-3-Clause" ]
null
null
null
rusty_green_kernel/test/test_rusty_green_kernel.py
rusty-fast-solvers/rusty-green-kernel
9317f88e873550270c482473005250a9d2df2950
[ "BSD-3-Clause" ]
null
null
null
"""Unit tests for direct assembly and evaluation of kernels.""" import numpy as np import pytest @pytest.mark.parametrize("parallel", [True, False]) @pytest.mark.parametrize("dtype,rtol", [(np.float64, 1e-14), (np.float32, 5e-6)]) def test_laplace_assemble(dtype, rtol, parallel): """Test the Laplace kernel.""" ...
31.777943
88
0.645406
import numpy as np import pytest @pytest.mark.parametrize("parallel", [True, False]) @pytest.mark.parametrize("dtype,rtol", [(np.float64, 1e-14), (np.float32, 5e-6)]) def test_laplace_assemble(dtype, rtol, parallel): from rusty_green_kernel import assemble_laplace_kernel nsources = 10 ntargets = 20 ...
true
true
f7288c510b89bb28931dff9a779183a4991756e6
4,237
py
Python
tools/third_party/pywebsocket3/test/test_memorizingfile.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
2,479
2018-05-28T14:51:29.000Z
2022-03-30T14:41:18.000Z
tools/third_party/pywebsocket3/test/test_memorizingfile.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
7,642
2018-05-28T09:38:03.000Z
2022-03-31T20:55:48.000Z
tools/third_party/pywebsocket3/test/test_memorizingfile.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
1,303
2018-05-29T14:50:02.000Z
2022-03-30T17:30:42.000Z
#!/usr/bin/env python # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
41.950495
73
0.689403
from __future__ import absolute_import import unittest import six import set_sys_path from mod_pywebsocket import memorizingfile class UtilTest(unittest.TestCase): def check(self, memorizing_file, num_read, expected_list): for unused in range(num_read): memor...
true
true
f7288c78704b19f1e03dcd522da15276e219ff1a
3,800
py
Python
STAP/STAP_WCS.py
rscalzo/subpipe
641067a65810ad4acafcc75e7b09cb65712f40f1
[ "BSD-3-Clause" ]
null
null
null
STAP/STAP_WCS.py
rscalzo/subpipe
641067a65810ad4acafcc75e7b09cb65712f40f1
[ "BSD-3-Clause" ]
null
null
null
STAP/STAP_WCS.py
rscalzo/subpipe
641067a65810ad4acafcc75e7b09cb65712f40f1
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python import os import re import math import pyfits import argparse from Utils.Constants import Imager from Utils.TrackableException import TrackableException, ExternalFailure from STAP_comm import STAP_callexternal, print_cmd_line def WCS(imname, outname, astronet=False, timeout=None): """ S...
41.758242
78
0.616842
import os import re import math import pyfits import argparse from Utils.Constants import Imager from Utils.TrackableException import TrackableException, ExternalFailure from STAP_comm import STAP_callexternal, print_cmd_line def WCS(imname, outname, astronet=False, timeout=None): """ Solves for the World Co...
false
true
f7288fd249c2a48ff3791e7fc1c7fb3e4f094bd1
15,189
py
Python
Alg2_ADMM_MNIST_model_1.py
Ialkhouri/Adv_attacks_big_picture_classification
53edffc3b5bb313e476dcdbaf97ec776884cad50
[ "MIT" ]
null
null
null
Alg2_ADMM_MNIST_model_1.py
Ialkhouri/Adv_attacks_big_picture_classification
53edffc3b5bb313e476dcdbaf97ec776884cad50
[ "MIT" ]
null
null
null
Alg2_ADMM_MNIST_model_1.py
Ialkhouri/Adv_attacks_big_picture_classification
53edffc3b5bb313e476dcdbaf97ec776884cad50
[ "MIT" ]
null
null
null
# Importing Libraries from foolbox.criteria import TargetClass from foolbox.criteria import Misclassification from numpy import linalg as LA import matplotlib.pyplot as plt from foolbox.attacks import CarliniWagnerL2Attack from foolbox.attacks import SaliencyMapAttack from foolbox.attacks import GradientSignAttack ...
36.42446
165
0.582724
from foolbox.criteria import TargetClass from foolbox.criteria import Misclassification from numpy import linalg as LA import matplotlib.pyplot as plt from foolbox.attacks import CarliniWagnerL2Attack from foolbox.attacks import SaliencyMapAttack from foolbox.attacks import GradientSignAttack from foolbox.v1.attac...
true
true
f7289065c4d52fe80d6531156b36dfd941d57e04
2,152
py
Python
migrations/versions/0004_notification_stats_date.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
41
2019-11-28T16:58:41.000Z
2022-01-28T21:11:16.000Z
migrations/versions/0004_notification_stats_date.py
cds-snc/notification-api
b1c1064f291eb860b494c3fa65ac256ad70bf47c
[ "MIT" ]
1,083
2019-07-08T12:57:24.000Z
2022-03-08T18:53:40.000Z
migrations/versions/0004_notification_stats_date.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
9
2020-01-24T19:56:43.000Z
2022-01-27T21:36:53.000Z
"""empty message Revision ID: 0004_notification_stats_date Revises: 0003_add_service_history Create Date: 2016-04-20 13:59:01.132535 """ # revision identifiers, used by Alembic. revision = "0004_notification_stats_date" down_revision = "0003_add_service_history" import sqlalchemy as sa from alembic import op def ...
36.474576
152
0.72816
revision = "0004_notification_stats_date" down_revision = "0003_add_service_history" import sqlalchemy as sa from alembic import op def upgrade(): day", new_column_name="day_string") op.add_column("notification_statistics", sa.Column("day", sa.Date(), nullable=True)) op.get_bind() op.execute( ...
true
true
f72890be66b9eb5defdbca1703a26076d1df08f2
517
py
Python
env/lib/python3.8/site-packages/plotly/validators/waterfall/_visible.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/waterfall/_visible.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/waterfall/_visible.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="waterfall", **kwargs): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
36.928571
81
0.646035
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="waterfall", **kwargs): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
f72892821a3d308dd415a1fa6bb4038b413968a2
5,197
py
Python
cogs/tags.py
MiningMark48/Tidal-Bot
8db6ecb220fd35930ffe1df5653af7a1ca03c8e9
[ "MIT" ]
6
2020-08-09T15:43:07.000Z
2022-03-11T15:12:21.000Z
cogs/tags.py
MiningMark48/Tidal-Bot
8db6ecb220fd35930ffe1df5653af7a1ca03c8e9
[ "MIT" ]
6
2020-10-29T02:32:40.000Z
2022-01-13T03:12:45.000Z
cogs/tags.py
MiningMark48/Tidal-Bot
8db6ecb220fd35930ffe1df5653af7a1ca03c8e9
[ "MIT" ]
1
2021-06-09T08:06:31.000Z
2021-06-09T08:06:31.000Z
from discord.ext import commands from discord.utils import escape_markdown from fuzzywuzzy import process as fwp from util.data.guild_data import GuildData class Tags(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command(name="settag", aliases=["edittag", "newtag", "addtag"]) ...
29.697143
114
0.570714
from discord.ext import commands from discord.utils import escape_markdown from fuzzywuzzy import process as fwp from util.data.guild_data import GuildData class Tags(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command(name="settag", aliases=["edittag", "newtag", "addtag"]) ...
true
true
f728933e12b6cec90425b8c9b4184172c1867bfe
2,547
py
Python
epycom/univariate/approximate_entropy.py
ICRC-BME/epycom
5bfa3fb9020f04536b7a08382533c8abf56ca85f
[ "Apache-2.0" ]
null
null
null
epycom/univariate/approximate_entropy.py
ICRC-BME/epycom
5bfa3fb9020f04536b7a08382533c8abf56ca85f
[ "Apache-2.0" ]
1
2020-10-22T19:10:57.000Z
2020-10-22T21:09:02.000Z
epycom/univariate/approximate_entropy.py
ICRC-BME/epycom
5bfa3fb9020f04536b7a08382533c8abf56ca85f
[ "Apache-2.0" ]
1
2021-02-24T10:07:32.000Z
2021-02-24T10:07:32.000Z
# -*- coding: utf-8 -*- # Copyright (c) St. Anne's University Hospital in Brno. International Clinical # Research Center, Biomedical Engineering. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # Third pary imports import numpy as np from numba import njit # Local import...
22.342105
78
0.56066
# Research Center, Biomedical Engineering. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # Third pary imports import numpy as np from numba import njit # Local imports from ..utils.method import Method @njit('f8(f8[:], f8[:])', cache=True) def _maxdist(x_i, x_j): ...
true
true
f7289370a5f8c41fbb9f0232b513bcd3c912330a
42
py
Python
tests/test_inputs/fail.py
bdice/flake8-force
5536c01c09ff202a3a3545a466f39ff08ec1af99
[ "MIT" ]
4
2021-12-04T10:12:46.000Z
2022-02-15T06:35:18.000Z
tests/test_inputs/fail.py
bdice/flake8-force
5536c01c09ff202a3a3545a466f39ff08ec1af99
[ "MIT" ]
null
null
null
tests/test_inputs/fail.py
bdice/flake8-force
5536c01c09ff202a3a3545a466f39ff08ec1af99
[ "MIT" ]
2
2022-02-11T10:51:43.000Z
2022-02-15T23:35:20.000Z
import sys import os print(sys.platform)
8.4
19
0.785714
import sys import os print(sys.platform)
true
true
f728937dbe44547fdf4bac17a2c89b6b24065e31
84,164
py
Python
awswrangler/s3.py
JPFrancoia/aws-data-wrangler
5b08087d79b42683b03be91ba5ebc12ad4bd2d3d
[ "Apache-2.0" ]
null
null
null
awswrangler/s3.py
JPFrancoia/aws-data-wrangler
5b08087d79b42683b03be91ba5ebc12ad4bd2d3d
[ "Apache-2.0" ]
null
null
null
awswrangler/s3.py
JPFrancoia/aws-data-wrangler
5b08087d79b42683b03be91ba5ebc12ad4bd2d3d
[ "Apache-2.0" ]
null
null
null
"""Amazon S3 Module.""" import concurrent.futures import csv import logging import time import uuid from itertools import repeat from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union import boto3 # type: ignore import botocore.exceptions # type: ignore import pandas as pd # type: ignore im...
38.048825
120
0.632907
import concurrent.futures import csv import logging import time import uuid from itertools import repeat from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union import boto3 import botocore.exceptions import pandas as pd import pandas.io.parsers import pyarrow as pa import pyarrow.lib...
true
true
f728938c6b7c6c80232da33a114ac0511acc90c7
24,657
py
Python
test/functional/rpc_rawtransaction.py
minblock/motherofweeddaycoin
eeb0625c0f2f35412b3a69da50bc55f6acd6806d
[ "MIT" ]
null
null
null
test/functional/rpc_rawtransaction.py
minblock/motherofweeddaycoin
eeb0625c0f2f35412b3a69da50bc55f6acd6806d
[ "MIT" ]
null
null
null
test/functional/rpc_rawtransaction.py
minblock/motherofweeddaycoin
eeb0625c0f2f35412b3a69da50bc55f6acd6806d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the rawtransaction RPCs. Test the following RPCs: - createrawtransaction - signrawtransacti...
56.166287
263
0.652634
from collections import OrderedDict from decimal import Decimal from io import BytesIO from test_framework.messages import CTransaction, ToHex from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error, bytes_to_hex_str, connect_nodes_bi, he...
true
true
f72893cc483b92a6b0e156ad62e82c1b9d3307f1
1,638
py
Python
IndexerQuery/model/QueryAnalizer.py
Llambi/Web_Semantica
16f98a7d78ba08366a67caf2bd44f3f45af6ee21
[ "MIT" ]
null
null
null
IndexerQuery/model/QueryAnalizer.py
Llambi/Web_Semantica
16f98a7d78ba08366a67caf2bd44f3f45af6ee21
[ "MIT" ]
null
null
null
IndexerQuery/model/QueryAnalizer.py
Llambi/Web_Semantica
16f98a7d78ba08366a67caf2bd44f3f45af6ee21
[ "MIT" ]
null
null
null
import numpy as np from model.indexer_v1 import Indexer class QueryAnalizer: def __init__(self, query, document_list, enable_stemming=True, filter_stopwords=True): self.__query = Indexer([query], enable_stemming=enable_stemming, filter_stopwords=filter_stopwords) self.__indexer = Indexer(document...
38.093023
115
0.581807
import numpy as np from model.indexer_v1 import Indexer class QueryAnalizer: def __init__(self, query, document_list, enable_stemming=True, filter_stopwords=True): self.__query = Indexer([query], enable_stemming=enable_stemming, filter_stopwords=filter_stopwords) self.__indexer = Indexer(document...
true
true
f728946dae6ce406dd84a940b4c0b218d3e0a20f
1,750
py
Python
extraPackages/matplotlib-3.0.3/examples/images_contours_and_fields/contourf_log.py
dolboBobo/python3_ios
877f8c2c5890f26292ddd14909bea62a04fe2889
[ "BSD-3-Clause" ]
130
2018-02-03T10:25:54.000Z
2022-03-25T22:27:22.000Z
extraPackages/matplotlib-3.0.2/examples/images_contours_and_fields/contourf_log.py
spacetime314/python3_ios
e149f1bc2e50046c8810f83dae7739a8dea939ee
[ "BSD-3-Clause" ]
9
2018-12-14T07:31:42.000Z
2020-12-09T20:29:28.000Z
extraPackages/matplotlib-3.0.2/examples/images_contours_and_fields/contourf_log.py
spacetime314/python3_ios
e149f1bc2e50046c8810f83dae7739a8dea939ee
[ "BSD-3-Clause" ]
64
2018-04-25T08:51:57.000Z
2022-01-29T14:13:57.000Z
""" ============================ Contourf and log color scale ============================ Demonstrate use of a log color scale in contourf """ import matplotlib.pyplot as plt import numpy as np from numpy import ma from matplotlib import ticker, cm N = 100 x = np.linspace(-3.0, 3.0, N) y = np.linspace(-2.0, 2.0, N)...
25.362319
77
0.632571
import matplotlib.pyplot as plt import numpy as np from numpy import ma from matplotlib import ticker, cm N = 100 x = np.linspace(-3.0, 3.0, N) y = np.linspace(-2.0, 2.0, N) X, Y = np.meshgrid(x, y) Z1 = np.exp(-(X)**2 - (Y)**2) Z2 = np.exp(-(X * 10)**2 - (Y * 10)**2) z = Z1 + 50 * Z2 z[:5, :5] = -1 z = ma....
true
true
f728948f490c9d17a2da7ca3ac106a84c306235f
1,262
py
Python
Streaming Tweets from Twitter to Database.py
224alpha/Python
e413cc5a53751191df2ce146f061a6460f6661e0
[ "MIT" ]
null
null
null
Streaming Tweets from Twitter to Database.py
224alpha/Python
e413cc5a53751191df2ce146f061a6460f6661e0
[ "MIT" ]
null
null
null
Streaming Tweets from Twitter to Database.py
224alpha/Python
e413cc5a53751191df2ce146f061a6460f6661e0
[ "MIT" ]
null
null
null
import json import time import MySQLdb from tweepy import OAuthHandler from tweepy import Stream from tweepy.streaming import StreamListener # replace mysql.server with "localhost" if you are running via your own server! # server MySQL username MySQL pass Database name. ...
25.755102
97
0.652932
import json import time import MySQLdb from tweepy import OAuthHandler from tweepy import Stream from tweepy.streaming import StreamListener conn = MySQLdb.connect("mysql.server", "beginneraccount", "cookies", "beginneraccount$tutorial") c = conn.cursor() ckey = "asdfsafsafsaf" csecret = "asdfasdfsa...
true
true
f728962f01068aac485157eee59d8b8eb5b48694
2,034
py
Python
src/arknights/resource/dev/grab_pos.py
WaterHyacinthInNANHU/ArkOS
1919b7a2f22bc407d0a5503a9c1db8e30bbbc092
[ "MIT" ]
null
null
null
src/arknights/resource/dev/grab_pos.py
WaterHyacinthInNANHU/ArkOS
1919b7a2f22bc407d0a5503a9c1db8e30bbbc092
[ "MIT" ]
null
null
null
src/arknights/resource/dev/grab_pos.py
WaterHyacinthInNANHU/ArkOS
1919b7a2f22bc407d0a5503a9c1db8e30bbbc092
[ "MIT" ]
null
null
null
# used to grab template from screen import sys import signal from arknights.player import Player from arknights.resource import save_position import cv2 from arknights.imgops import pil2cv from .common import Bcolors def log(s: str): print(Bcolors.OKGREEN + s + Bcolors.ENDC) def signal_handler(sig): log('Ca...
27.863014
89
0.616519
import sys import signal from arknights.player import Player from arknights.resource import save_position import cv2 from arknights.imgops import pil2cv from .common import Bcolors def log(s: str): print(Bcolors.OKGREEN + s + Bcolors.ENDC) def signal_handler(sig): log('Caught ' + str(sig)) log('Exit') ...
true
true
f728967beaa99aaa7a2879d5cca95a5810880667
4,965
py
Python
kecpkg/create.py
jberends/kecpkg-tools
3c288c5b91b619fe76cd3622615f3ffe43509725
[ "Apache-2.0" ]
null
null
null
kecpkg/create.py
jberends/kecpkg-tools
3c288c5b91b619fe76cd3622615f3ffe43509725
[ "Apache-2.0" ]
7
2017-12-07T11:16:07.000Z
2019-12-11T15:25:07.000Z
kecpkg/create.py
KE-works/kecpkg-tools
3c288c5b91b619fe76cd3622615f3ffe43509725
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import os import subprocess import sys import six from kecpkg.files.rendering import render_to_file from kecpkg.utils import (ensure_dir_exists, get_proper_python, NEED_SUBPROCESS_SHELL, venv, echo_success, echo_failure, echo_info) def create_package(...
40.696721
114
0.69144
from __future__ import print_function import os import subprocess import sys import six from kecpkg.files.rendering import render_to_file from kecpkg.utils import (ensure_dir_exists, get_proper_python, NEED_SUBPROCESS_SHELL, venv, echo_success, echo_failure, echo_info) def create_package(...
true
true
f728969984ccf88bea20ee9c61cec9a023d696fb
1,805
py
Python
app.py
saurabdongre/Covid-19_Assistant
17f2ac4aabe5f5dedda8239cbeafdf1b4da866cd
[ "MIT" ]
null
null
null
app.py
saurabdongre/Covid-19_Assistant
17f2ac4aabe5f5dedda8239cbeafdf1b4da866cd
[ "MIT" ]
null
null
null
app.py
saurabdongre/Covid-19_Assistant
17f2ac4aabe5f5dedda8239cbeafdf1b4da866cd
[ "MIT" ]
null
null
null
from chatbot import chatbot from flask import Flask, render_template, request import random import re import webbrowser import smtplib import os trainer_dict = [] app = Flask(__name__) app.static_folder = 'static' @app.route("/") def home(): return render_template("index.html") @app.route("/get") def get_bot_re...
26.544118
87
0.614404
from chatbot import chatbot from flask import Flask, render_template, request import random import re import webbrowser import smtplib import os trainer_dict = [] app = Flask(__name__) app.static_folder = 'static' @app.route("/") def home(): return render_template("index.html") @app.route("/get") def get_bot_re...
true
true
f72896cff2b507417aa89c6dab562cd14c7684c4
8,522
py
Python
frappe-bench/env/lib/python2.7/site-packages/faker/providers/address/en_CA/__init__.py
ibrahmm22/library-management
b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/faker/providers/address/en_CA/__init__.py
ibrahmm22/library-management
b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506
[ "MIT" ]
null
null
null
frappe-bench/env/lib/python2.7/site-packages/faker/providers/address/en_CA/__init__.py
ibrahmm22/library-management
b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import re from ..en import Provider as AddressProvider class Provider(AddressProvider): # Source: https://www.canadapost.ca/tools/pg/manual/PGaddress-e.asp#1449294 # # 'W' and 'Z' are valid in non-initial position (easily verified in the # wild), but onlin...
22.786096
80
0.443558
from __future__ import unicode_literals import re from ..en import Provider as AddressProvider class Provider(AddressProvider): postal_code_letters = ( 'A', 'B', 'C', 'E', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R', 'S', 'T', 'V', 'X', 'Y', ) city_prefixes = ('North',...
true
true
f72897ac35d6d93b6020380f7e88be2a60683e88
3,957
py
Python
katsdpdisp/test/test_data.py
ska-sa/katsdpdisp
3fd2f5878c0bd3ae56815568446593b876881e3f
[ "BSD-3-Clause" ]
null
null
null
katsdpdisp/test/test_data.py
ska-sa/katsdpdisp
3fd2f5878c0bd3ae56815568446593b876881e3f
[ "BSD-3-Clause" ]
6
2020-03-13T08:17:49.000Z
2021-05-04T14:43:01.000Z
katsdpdisp/test/test_data.py
ska-sa/katsdpdisp
3fd2f5878c0bd3ae56815568446593b876881e3f
[ "BSD-3-Clause" ]
null
null
null
"""Tests for :py:mod:`katsdpdisp.data`.""" import numpy as np from numpy.testing import assert_array_equal from katsdpdisp.data import SparseArray def test_sparsearray(fullslots=100,fullbls=10,fullchan=5,nslots=10,maxbaselines=6,islot_new_bls=6): """Simulates the assignment and retrieval of data as it happens in ...
56.528571
228
0.700531
import numpy as np from numpy.testing import assert_array_equal from katsdpdisp.data import SparseArray def test_sparsearray(fullslots=100,fullbls=10,fullchan=5,nslots=10,maxbaselines=6,islot_new_bls=6): mx=SparseArray(nslots,fullbls,fullchan,maxbaselines,dtype=np.int32) rs = np.random.RandomState(seed=0) ...
true
true
f72897ce8776833e34cd278e916224124f6b7c16
4,321
py
Python
graalpython/lib-graalpython/property.py
muellren/graalpython
9104425805f1d38ad7a521c75e53798a3b79b4f0
[ "UPL-1.0", "Apache-2.0", "OpenSSL" ]
null
null
null
graalpython/lib-graalpython/property.py
muellren/graalpython
9104425805f1d38ad7a521c75e53798a3b79b4f0
[ "UPL-1.0", "Apache-2.0", "OpenSSL" ]
null
null
null
graalpython/lib-graalpython/property.py
muellren/graalpython
9104425805f1d38ad7a521c75e53798a3b79b4f0
[ "UPL-1.0", "Apache-2.0", "OpenSSL" ]
null
null
null
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # The Universal Permissive License (UPL), Version 1.0 # # Subject to the condition set forth below, permission is hereby granted to any # person obtaining a copy of this software, a...
36.618644
89
0.660495
class property(object): def __init__(self, fget=None, fset=None, fdel=None, doc=None, name=None): self.__get = fget self.__set = fset self.__delete = fdel self.doc = doc self.name = name self._owner = None def __get__(self,...
true
true
f7289806ab4063c4ecf5b399d38eaefb24559333
500
py
Python
sameproject/ops/functions/options.py
SAME-Project/same-project
6fb6fdab73d98e1ba8f622c4033dbd8cd351b0f6
[ "Apache-2.0" ]
8
2021-12-17T18:26:24.000Z
2022-03-16T18:21:04.000Z
sameproject/ops/functions/options.py
SAME-Project/same-project
6fb6fdab73d98e1ba8f622c4033dbd8cd351b0f6
[ "Apache-2.0" ]
45
2021-12-18T08:28:56.000Z
2022-03-31T21:24:45.000Z
sameproject/ops/functions/options.py
SAME-Project/same-project
6fb6fdab73d98e1ba8f622c4033dbd8cd351b0f6
[ "Apache-2.0" ]
5
2021-12-17T20:08:38.000Z
2022-03-21T13:51:06.000Z
from sameproject.ops.runtime_options import register_option register_option( "functions_subscription_id", "Azure subscription ID in which to provision backend functions.", backend="functions", schema={ "nullable": True, "type": "string", "regex": r"^[\d\w-]+", }, ) register...
25
93
0.672
from sameproject.ops.runtime_options import register_option register_option( "functions_subscription_id", "Azure subscription ID in which to provision backend functions.", backend="functions", schema={ "nullable": True, "type": "string", "regex": r"^[\d\w-]+", }, ) register...
true
true
f7289866210609234c7d88389a2b7096438ef21c
1,522
py
Python
metaworld/policies/sawyer_coffee_pull_v2_policy.py
rmrafailov/metaworld
463f1afb1bffbe1fa6b50715ee4a1eeff7c4f463
[ "MIT" ]
3
2021-06-25T03:35:59.000Z
2022-03-02T00:08:57.000Z
metaworld/policies/sawyer_coffee_pull_v2_policy.py
zchuning/metaworld
b2cd055e5f2413ec6d66ef29e45d05af989dca3b
[ "MIT" ]
null
null
null
metaworld/policies/sawyer_coffee_pull_v2_policy.py
zchuning/metaworld
b2cd055e5f2413ec6d66ef29e45d05af989dca3b
[ "MIT" ]
1
2021-11-25T14:55:37.000Z
2021-11-25T14:55:37.000Z
import numpy as np from metaworld.policies.action import Action from metaworld.policies.policy import Policy, assert_fully_parsed, move class SawyerCoffeePullV2Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs): return { 'hand_pos': obs[:3], 'mug_pos':...
27.672727
89
0.543364
import numpy as np from metaworld.policies.action import Action from metaworld.policies.policy import Policy, assert_fully_parsed, move class SawyerCoffeePullV2Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs): return { 'hand_pos': obs[:3], 'mug_pos':...
true
true
f728989c89ad4ab3040253e2ff03267c79b8da4a
4,131
py
Python
setup.py
dfm/celeritelib
c6874e23367d47743c27ae2ea432bee1dbe864f1
[ "MIT" ]
null
null
null
setup.py
dfm/celeritelib
c6874e23367d47743c27ae2ea432bee1dbe864f1
[ "MIT" ]
null
null
null
setup.py
dfm/celeritelib
c6874e23367d47743c27ae2ea432bee1dbe864f1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Inspired by: # https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/ import codecs import os import re import sys from pybind11.setup_helpers import Pybind11Extension, build_ext from setuptools import find_packages, setup # PROJECT SPECIFIC NAME = "celerite2" PACKAGES = ...
26.14557
79
0.574195
import codecs import os import re import sys from pybind11.setup_helpers import Pybind11Extension, build_ext from setuptools import find_packages, setup NAME = "celerite2" PACKAGES = find_packages(where="python") META_PATH = os.path.join("python", "celerite2", "__init__.py") CLASSIFIERS = [ "Development Sta...
true
true
f7289931e85f5002dcdb59e6ca982e243c9c3105
43
py
Python
first_digit_after_dot.py
webkadiz/olympiad-problems
620912815904c0f95b91ccd193ca3db0ea20e507
[ "MIT" ]
null
null
null
first_digit_after_dot.py
webkadiz/olympiad-problems
620912815904c0f95b91ccd193ca3db0ea20e507
[ "MIT" ]
null
null
null
first_digit_after_dot.py
webkadiz/olympiad-problems
620912815904c0f95b91ccd193ca3db0ea20e507
[ "MIT" ]
null
null
null
n = float(input()) print(int(n * 10) % 10)
14.333333
23
0.55814
n = float(input()) print(int(n * 10) % 10)
true
true
f7289b84c8a95d21008027ff7a1614f1bb727a13
717
py
Python
stats/data.py
AndreeaMutu/Python-Baseball
6ca5e5006fd01ffa5b55c4859ebad7251a1f35a6
[ "MIT" ]
null
null
null
stats/data.py
AndreeaMutu/Python-Baseball
6ca5e5006fd01ffa5b55c4859ebad7251a1f35a6
[ "MIT" ]
null
null
null
stats/data.py
AndreeaMutu/Python-Baseball
6ca5e5006fd01ffa5b55c4859ebad7251a1f35a6
[ "MIT" ]
null
null
null
import os import glob import pandas as pd game_files = glob.glob(os.path.join(os.getcwd(),'games','*.EVE')) game_files.sort() game_frames = [] for game_file in game_files: game_frame = pd.read_csv(game_file, names=['type','multi2','multi3','multi4','multi5','multi6','event']) game_frames.append(game_frame) g...
31.173913
108
0.687587
import os import glob import pandas as pd game_files = glob.glob(os.path.join(os.getcwd(),'games','*.EVE')) game_files.sort() game_frames = [] for game_file in game_files: game_frame = pd.read_csv(game_file, names=['type','multi2','multi3','multi4','multi5','multi6','event']) game_frames.append(game_frame) g...
true
true
f7289c3ade2665a6c088dfd09ebba24c802d3820
136
py
Python
src/pkg1/__main__.py
p--q/PkgExample
07726905f963bc710f357414e449001b83f01707
[ "Apache-2.0" ]
null
null
null
src/pkg1/__main__.py
p--q/PkgExample
07726905f963bc710f357414e449001b83f01707
[ "Apache-2.0" ]
null
null
null
src/pkg1/__main__.py
p--q/PkgExample
07726905f963bc710f357414e449001b83f01707
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys from . import main # PyDevでの実行にはfrom pkg1 import mainとしないといけない。 sys.exit(main())
22.666667
64
0.698529
import sys from . import main sys.exit(main())
true
true
f7289ced641d513a82cb061fb442261cebeeebdc
3,949
py
Python
main_EUROC.py
KleistvonLiu/denoise-imu-gyro
76e75e194a3804c473be077663b4a668fc0b7c28
[ "MIT" ]
154
2020-02-24T13:45:05.000Z
2022-03-30T15:01:00.000Z
main_EUROC.py
KleistvonLiu/denoise-imu-gyro
76e75e194a3804c473be077663b4a668fc0b7c28
[ "MIT" ]
11
2020-05-07T15:59:51.000Z
2022-03-16T12:46:50.000Z
main_EUROC.py
KleistvonLiu/denoise-imu-gyro
76e75e194a3804c473be077663b4a668fc0b7c28
[ "MIT" ]
50
2020-02-26T16:10:21.000Z
2022-03-21T06:25:39.000Z
import os import torch import src.learning as lr import src.networks as sn import src.losses as sl import src.dataset as ds import numpy as np base_dir = os.path.dirname(os.path.realpath(__file__)) data_dir = '/path/to/EUROC/dataset' # test a given network # address = os.path.join(base_dir, 'results/EUROC/2020_02_18_1...
32.908333
80
0.488985
import os import torch import src.learning as lr import src.networks as sn import src.losses as sl import src.dataset as ds import numpy as np base_dir = os.path.dirname(os.path.realpath(__file__)) data_dir = '/path/to/EUROC/dataset' address = "last"
true
true
f7289e4a6b181dac115dae05e072db607fbbafe4
10,051
py
Python
tests/ignite/contrib/handlers/test_polyaxon_logger.py
nzare/ignite
002b595daa8a8345286c5e096c33e278948686a7
[ "BSD-3-Clause" ]
1
2020-08-29T16:49:36.000Z
2020-08-29T16:49:36.000Z
tests/ignite/contrib/handlers/test_polyaxon_logger.py
alxlampe/ignite
b53c6aeef87754b3cd3638c91172b386dc73af12
[ "BSD-3-Clause" ]
5
2020-08-29T16:49:48.000Z
2020-08-29T17:05:54.000Z
tests/ignite/contrib/handlers/test_polyaxon_logger.py
alxlampe/ignite
b53c6aeef87754b3cd3638c91172b386dc73af12
[ "BSD-3-Clause" ]
1
2020-10-15T06:21:01.000Z
2020-10-15T06:21:01.000Z
import os from unittest.mock import MagicMock, call import pytest import torch from ignite.contrib.handlers.polyaxon_logger import * from ignite.engine import Engine, Events, State os.environ["POLYAXON_NO_OP"] = "1" def test_output_handler_with_wrong_logger_type(): wrapper = OutputHandler("tag", output_transf...
33.392027
119
0.718535
import os from unittest.mock import MagicMock, call import pytest import torch from ignite.contrib.handlers.polyaxon_logger import * from ignite.engine import Engine, Events, State os.environ["POLYAXON_NO_OP"] = "1" def test_output_handler_with_wrong_logger_type(): wrapper = OutputHandler("tag", output_transf...
true
true
f7289e72bef01664b5299fbb7682aeb177fca247
29,390
py
Python
Tests/varLib/varLib_test.py
benkiel/fonttools
d4cd8acf44fdff2f9dec3279810ac5db9ec705c2
[ "MIT", "BSD-3-Clause" ]
null
null
null
Tests/varLib/varLib_test.py
benkiel/fonttools
d4cd8acf44fdff2f9dec3279810ac5db9ec705c2
[ "MIT", "BSD-3-Clause" ]
null
null
null
Tests/varLib/varLib_test.py
benkiel/fonttools
d4cd8acf44fdff2f9dec3279810ac5db9ec705c2
[ "MIT", "BSD-3-Clause" ]
null
null
null
from fontTools.misc.py23 import * from fontTools.ttLib import TTFont, newTable from fontTools.varLib import build from fontTools.varLib.mutator import instantiateVariableFont from fontTools.varLib import main as varLib_main, load_masters from fontTools.varLib import set_default_weight_width_slant from fontTools.designs...
37.344346
87
0.611194
from fontTools.misc.py23 import * from fontTools.ttLib import TTFont, newTable from fontTools.varLib import build from fontTools.varLib.mutator import instantiateVariableFont from fontTools.varLib import main as varLib_main, load_masters from fontTools.varLib import set_default_weight_width_slant from fontTools.designs...
true
true
f7289ecc3ee4be9cb40b74492c2671d44bde5c3d
7,164
py
Python
mamonsu/lib/config.py
hisahin/mamonsu
93524317f8961256b193dc13d13f2d0b679d3352
[ "BSD-3-Clause" ]
null
null
null
mamonsu/lib/config.py
hisahin/mamonsu
93524317f8961256b193dc13d13f2d0b679d3352
[ "BSD-3-Clause" ]
null
null
null
mamonsu/lib/config.py
hisahin/mamonsu
93524317f8961256b193dc13d13f2d0b679d3352
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import socket import os import logging import sys import glob import mamonsu.lib.platform as platform from mamonsu.lib.plugin import Plugin from mamonsu.plugins.pgsql.driver.checks import is_conn_to_db from mamonsu.lib.default_config import DefaultConfig if platform.PY2: import ConfigParse...
37.507853
99
0.590313
import socket import os import logging import sys import glob import mamonsu.lib.platform as platform from mamonsu.lib.plugin import Plugin from mamonsu.plugins.pgsql.driver.checks import is_conn_to_db from mamonsu.lib.default_config import DefaultConfig if platform.PY2: import ConfigParser as configparser else:...
true
true
f7289ff2340b0efc55a36056c729a00c428fcde0
42,279
py
Python
tensorflow/python/ops/math_ops.py
Monnoroch/tensorflow
e4af1c4023826c815135ed330576f7bfeb74f052
[ "Apache-2.0" ]
1
2015-11-12T06:52:22.000Z
2015-11-12T06:52:22.000Z
tensorflow/python/ops/math_ops.py
danilodorgam/tensorflow
1d76583411038767f673a0c96174c80eaf9ff42f
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/math_ops.py
danilodorgam/tensorflow
1d76583411038767f673a0c96174c80eaf9ff42f
[ "Apache-2.0" ]
2
2016-05-18T12:48:06.000Z
2019-03-30T03:56:31.000Z
"""## Arithmetic Operators TensorFlow provides several operations that you can use to add basic arithmetic operators to your graph. @@add @@sub @@mul @@div @@mod ## Basic Math Functions TensorFlow provides several operations that you can use to add basic mathematical functions to your graph. @@add_n @@abs @@neg @@...
32.49731
86
0.682419
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.python.platform import numpy as np import six.moves from tensorflow.python.framework import ops from tensorflow.python.framework import tensor_shape from tensorflow.python.framework import t...
true
true
f728a2d500d44d3bb874d2b540afb4feaafd646c
12,370
py
Python
src/sagemaker/sklearn/estimator.py
anirudh2290/sagemaker-python-sdk
5b15f3006efe90fbba43da7841ff5f0ad790a78e
[ "Apache-2.0" ]
null
null
null
src/sagemaker/sklearn/estimator.py
anirudh2290/sagemaker-python-sdk
5b15f3006efe90fbba43da7841ff5f0ad790a78e
[ "Apache-2.0" ]
1
2019-04-23T19:32:17.000Z
2019-04-23T19:32:17.000Z
src/sagemaker/sklearn/estimator.py
anirudh2290/sagemaker-python-sdk
5b15f3006efe90fbba43da7841ff5f0ad790a78e
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-2020 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
43.710247
100
0.637995
from __future__ import absolute_import import logging from sagemaker import image_uris from sagemaker.deprecations import renamed_kwargs from sagemaker.estimator import Framework from sagemaker.fw_utils import ( framework_name_from_image, framework_version_from_tag, validate_version_or_image_a...
true
true
f728a40684ccb11af39383987c4d9ec79805e783
11,323
py
Python
src/loss/perceptual_similarity/dist_model.py
markveillette/high-fidelity-generative-compression
d88b4d7f1212efa8611e91737ff6bf00bbf36670
[ "Apache-2.0" ]
266
2020-08-25T00:04:58.000Z
2022-03-31T06:41:03.000Z
src/loss/perceptual_similarity/dist_model.py
markveillette/high-fidelity-generative-compression
d88b4d7f1212efa8611e91737ff6bf00bbf36670
[ "Apache-2.0" ]
27
2020-09-01T21:04:27.000Z
2022-03-22T02:24:48.000Z
src/loss/perceptual_similarity/dist_model.py
markveillette/high-fidelity-generative-compression
d88b4d7f1212efa8611e91737ff6bf00bbf36670
[ "Apache-2.0" ]
50
2020-08-28T02:11:46.000Z
2022-02-25T02:44:42.000Z
from __future__ import absolute_import import sys import numpy as np import torch from torch import nn import os from collections import OrderedDict from torch.autograd import Variable import itertools from .base_model import BaseModel from scipy.ndimage import zoom import fractions import functools import skimage.tr...
40.295374
134
0.618387
from __future__ import absolute_import import sys import numpy as np import torch from torch import nn import os from collections import OrderedDict from torch.autograd import Variable import itertools from .base_model import BaseModel from scipy.ndimage import zoom import fractions import functools import skimage.tr...
true
true
f728a40e26f5a734b8142be40f7a803ce264d0f2
3,305
py
Python
src/adafruit_blinka/microcontroller/tegra/t186/pin.py
Jcc99/Adafruit_Blinka
41f8155bab83039ed9d45276addd3d501e83f3e6
[ "MIT" ]
1
2020-11-28T18:22:32.000Z
2020-11-28T18:22:32.000Z
src/adafruit_blinka/microcontroller/tegra/t186/pin.py
Jcc99/Adafruit_Blinka
41f8155bab83039ed9d45276addd3d501e83f3e6
[ "MIT" ]
null
null
null
src/adafruit_blinka/microcontroller/tegra/t186/pin.py
Jcc99/Adafruit_Blinka
41f8155bab83039ed9d45276addd3d501e83f3e6
[ "MIT" ]
null
null
null
"""Tegra T186 pin names""" import atexit import Jetson.GPIO as GPIO GPIO.setmode(GPIO.TEGRA_SOC) GPIO.setwarnings(False) # shh! class Pin: """Pins dont exist in CPython so...lets make our own!""" IN = 0 OUT = 1 LOW = 0 HIGH = 1 PULL_NONE = 0 PULL_UP = 1 PULL_DOWN = 2 id = None...
24.301471
72
0.574584
import atexit import Jetson.GPIO as GPIO GPIO.setmode(GPIO.TEGRA_SOC) GPIO.setwarnings(False) class Pin: IN = 0 OUT = 1 LOW = 0 HIGH = 1 PULL_NONE = 0 PULL_UP = 1 PULL_DOWN = 2 id = None _value = LOW _mode = IN def __init__(self, bcm_number): self.id = bcm_nu...
true
true
f728a4976c0ebc6cacf37854c9e320a7f3a74fd2
1,336
py
Python
src/SimpleCopy.py
sonbyj01/backup_module
614b149b8436411b62fde274c6de84a680a689be
[ "MIT" ]
null
null
null
src/SimpleCopy.py
sonbyj01/backup_module
614b149b8436411b62fde274c6de84a680a689be
[ "MIT" ]
null
null
null
src/SimpleCopy.py
sonbyj01/backup_module
614b149b8436411b62fde274c6de84a680a689be
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from shutil import copy2 from pathlib import Path import sys from .SourceFiles import SourceFiles class SimpleCopy: def __init__(self, source): assert isinstance(source, SourceFiles), 'Not a SourceFiles object.' self.source_object = source self.source_parent = self....
33.4
92
0.69985
from shutil import copy2 from pathlib import Path import sys from .SourceFiles import SourceFiles class SimpleCopy: def __init__(self, source): assert isinstance(source, SourceFiles), 'Not a SourceFiles object.' self.source_object = source self.source_parent = self.source_object.source_p...
true
true
f728a4aa74f8ff0d240dce9a8ab152c1db253469
4,018
py
Python
d3rlpy-master/tests/models/torch/test_dynamics.py
SOPR-T/SOPR-T
3242461fa8b3e917cde70be497beb1158a7b27e6
[ "MIT" ]
1
2021-07-09T22:39:28.000Z
2021-07-09T22:39:28.000Z
d3rlpy-master/tests/models/torch/test_dynamics.py
SOPR-T/SOPR-T
3242461fa8b3e917cde70be497beb1158a7b27e6
[ "MIT" ]
null
null
null
d3rlpy-master/tests/models/torch/test_dynamics.py
SOPR-T/SOPR-T
3242461fa8b3e917cde70be497beb1158a7b27e6
[ "MIT" ]
null
null
null
import pytest import torch from d3rlpy.models.encoders import DefaultEncoderFactory from d3rlpy.models.torch.dynamics import ( ProbabilisticDynamicsModel, ProbabilisticEnsembleDynamicsModel, _compute_ensemble_variance, ) from .model_test import DummyEncoder, check_parameter_updates @pytest.mark.parametr...
36.198198
77
0.725734
import pytest import torch from d3rlpy.models.encoders import DefaultEncoderFactory from d3rlpy.models.torch.dynamics import ( ProbabilisticDynamicsModel, ProbabilisticEnsembleDynamicsModel, _compute_ensemble_variance, ) from .model_test import DummyEncoder, check_parameter_updates @pytest.mark.parametr...
true
true
f728a55ac321560a29e322ee6dcb6c70f2e872ac
386
py
Python
fdk_client/platform/models/SaveAttributeRequest.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/SaveAttributeRequest.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/SaveAttributeRequest.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
"""Platform Models.""" from marshmallow import fields, Schema from marshmallow.validate import OneOf from ..enums import * from ..models.BaseSchema import BaseSchema class SaveAttributeRequest(BaseSchema): # Feedback swagger.json description = fields.Str(required=False) name = fields.Str...
14.846154
44
0.702073
from marshmallow import fields, Schema from marshmallow.validate import OneOf from ..enums import * from ..models.BaseSchema import BaseSchema class SaveAttributeRequest(BaseSchema): description = fields.Str(required=False) name = fields.Str(required=False) slug = fields.Str(re...
true
true
f728a5afcddcf8d1d3f2a2c807ff6efa23a3007b
12,651
py
Python
engine.py
LockdownInnovators/CodeNames
b82fc9c85d4887ae81f331de6f2058e5e2cdccd9
[ "MIT" ]
null
null
null
engine.py
LockdownInnovators/CodeNames
b82fc9c85d4887ae81f331de6f2058e5e2cdccd9
[ "MIT" ]
null
null
null
engine.py
LockdownInnovators/CodeNames
b82fc9c85d4887ae81f331de6f2058e5e2cdccd9
[ "MIT" ]
null
null
null
from __future__ import print_function, division import itertools import re import sys import os import platform import numpy as np import model from config import config CLUE_PATTERN = r'^([a-zA-Z]+) ({0})$' UNLIMITED = "unlimited" # noinspection PyAttributeOutsideInit class GameEngine(object): def __init__(...
37.990991
118
0.550707
from __future__ import print_function, division import itertools import re import sys import os import platform import numpy as np import model from config import config CLUE_PATTERN = r'^([a-zA-Z]+) ({0})$' UNLIMITED = "unlimited" class GameEngine(object): def __init__(self, seed=None, expert=False, word2v...
true
true
f728a5b68285f8b74272b956d5bb3ba8af7d5994
28,367
py
Python
other_train/train_loadCorrMat.py
aaxwaz/youtube-8m
3c3ceae83173d6b9eaef6072308a2804ba56bcf5
[ "Apache-2.0" ]
null
null
null
other_train/train_loadCorrMat.py
aaxwaz/youtube-8m
3c3ceae83173d6b9eaef6072308a2804ba56bcf5
[ "Apache-2.0" ]
null
null
null
other_train/train_loadCorrMat.py
aaxwaz/youtube-8m
3c3ceae83173d6b9eaef6072308a2804ba56bcf5
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
39.453408
120
0.663059
import json import os import time import eval_util import export_model import losses import frame_level_models import video_level_models import readers import tensorflow as tf import tensorflow.contrib.slim as slim from tensorflow import app from tensorflow import flags from tensorflow import gfile from ...
true
true
f728a5dfcbf2e181dfeaa3c0efc4d062bb4f446c
2,624
py
Python
rllab/envs/base.py
Bobeye/rllab
53c0afb73f93c4a78ff21507914d7f7735c21ea9
[ "MIT" ]
1,838
2017-08-10T04:19:28.000Z
2022-03-29T07:41:19.000Z
rllab/envs/base.py
Bobeye/rllab
53c0afb73f93c4a78ff21507914d7f7735c21ea9
[ "MIT" ]
120
2016-10-05T09:16:16.000Z
2017-07-27T22:57:31.000Z
rllab/envs/base.py
Bobeye/rllab
53c0afb73f93c4a78ff21507914d7f7735c21ea9
[ "MIT" ]
498
2017-08-16T03:34:28.000Z
2022-03-31T04:41:32.000Z
from .env_spec import EnvSpec import collections from cached_property import cached_property class Env(object): def step(self, action): """ Run one timestep of the environment's dynamics. When end of episode is reached, reset() should be called to reset the environment's internal state. ...
25.980198
96
0.617378
from .env_spec import EnvSpec import collections from cached_property import cached_property class Env(object): def step(self, action): raise NotImplementedError def reset(self): raise NotImplementedError @property def action_space(self): raise NotImplementedError @prope...
true
true
f728a9896a7e4604ed5bd4ec09647ec748098257
73,983
py
Python
pycqed/measurement/waveform_control/pulsar.py
sergimasot/PycQED_py3
54ad1b14929ffe5cc87cf59423a970e4b9baa3e1
[ "MIT" ]
null
null
null
pycqed/measurement/waveform_control/pulsar.py
sergimasot/PycQED_py3
54ad1b14929ffe5cc87cf59423a970e4b9baa3e1
[ "MIT" ]
null
null
null
pycqed/measurement/waveform_control/pulsar.py
sergimasot/PycQED_py3
54ad1b14929ffe5cc87cf59423a970e4b9baa3e1
[ "MIT" ]
null
null
null
# Originally by Wolfgang Pfaff # Modified by Adriaan Rol 9/2015 # Modified by Ants Remm 5/2017 # Modified by Michael Kerschbaum 5/2019 import os import shutil import ctypes import numpy as np import logging from qcodes.instrument.base import Instrument from qcodes.instrument.parameter import ( ManualParameter, Inst...
45.001825
97
0.524877
import os import shutil import ctypes import numpy as np import logging from qcodes.instrument.base import Instrument from qcodes.instrument.parameter import ( ManualParameter, InstrumentRefParameter) import qcodes.utils.validators as vals import time from pycqed.instrument_drivers.virtual_instruments.virtual_...
true
true
f728aad6629f77a33def0e76786f6f1689baf0e0
13,795
py
Python
sparse_operation_kit/unit_test/test_scripts/tf2/test_sparse_emb_demo_model_multi_worker.py
PeterXingke/HugeCTR
d7552c4c5f93ff18ded961645cac82d5d8b5b785
[ "Apache-2.0" ]
1
2021-12-23T07:31:32.000Z
2021-12-23T07:31:32.000Z
sparse_operation_kit/unit_test/test_scripts/tf2/test_sparse_emb_demo_model_multi_worker.py
PeterXingke/HugeCTR
d7552c4c5f93ff18ded961645cac82d5d8b5b785
[ "Apache-2.0" ]
null
null
null
sparse_operation_kit/unit_test/test_scripts/tf2/test_sparse_emb_demo_model_multi_worker.py
PeterXingke/HugeCTR
d7552c4c5f93ff18ded961645cac82d5d8b5b785
[ "Apache-2.0" ]
null
null
null
""" Copyright (c) 2021, NVIDIA CORPORATION. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
50.904059
149
0.638202
import argparse import sys, os sys.path.append(os.path.abspath(os.path.join( os.path.dirname(os.path.abspath(__file__)), r"../../../"))) import sparse_operation_kit as sok import tensorflow as tf import numpy as np import os, json import pickle import utils from test_sparse_emb_demo_model_single_worker impo...
true
true
f728aad8678accd91f689e9480b5f5a1d385f45c
2,649
py
Python
src/python/src/tests/rmq_new_tests/test_spider_errback_successfully_acked.py
halimov-oa/scrapy-boilerplate
fe3c552fed26bedb0618c245ab923aa34a89ac9d
[ "MIT" ]
34
2019-12-13T10:31:39.000Z
2022-03-09T15:59:07.000Z
src/python/src/tests/rmq_new_tests/test_spider_errback_successfully_acked.py
halimov-oa/scrapy-boilerplate
fe3c552fed26bedb0618c245ab923aa34a89ac9d
[ "MIT" ]
49
2020-02-25T19:41:09.000Z
2022-02-27T12:05:25.000Z
src/python/src/tests/rmq_new_tests/test_spider_errback_successfully_acked.py
halimov-oa/scrapy-boilerplate
fe3c552fed26bedb0618c245ab923aa34a89ac9d
[ "MIT" ]
23
2019-12-23T15:19:42.000Z
2022-03-09T16:00:15.000Z
import logging from typing import Type import pytest from scrapy import Request from scrapy.crawler import CrawlerProcess from scrapy.http import HtmlResponse from scrapy.signalmanager import dispatcher from scrapy.utils.project import get_project_settings from twisted.python.failure import Failure from rmq.utils imp...
32.703704
103
0.729709
import logging from typing import Type import pytest from scrapy import Request from scrapy.crawler import CrawlerProcess from scrapy.http import HtmlResponse from scrapy.signalmanager import dispatcher from scrapy.utils.project import get_project_settings from twisted.python.failure import Failure from rmq.utils imp...
true
true
f728abaefb646a0a709c4f911dfcea1a19f73148
2,659
py
Python
tests/test_frontier.py
avpak/okama
b3c4f6b7dfcc314d3171f20b3bc95cfa04268c1a
[ "MIT" ]
null
null
null
tests/test_frontier.py
avpak/okama
b3c4f6b7dfcc314d3171f20b3bc95cfa04268c1a
[ "MIT" ]
null
null
null
tests/test_frontier.py
avpak/okama
b3c4f6b7dfcc314d3171f20b3bc95cfa04268c1a
[ "MIT" ]
null
null
null
import pytest from pytest import approx from pytest import mark import numpy as np from numpy.testing import assert_allclose from okama import EfficientFrontier @mark.frontier def test_init_efficient_frontier(): with pytest.raises(Exception, match=r'The number of symbols cannot be less than two'): Effic...
35.453333
141
0.787514
import pytest from pytest import approx from pytest import mark import numpy as np from numpy.testing import assert_allclose from okama import EfficientFrontier @mark.frontier def test_init_efficient_frontier(): with pytest.raises(Exception, match=r'The number of symbols cannot be less than two'): Effic...
true
true
f728ac8db271b24289507adc9010ad4b0047f98b
1,243
py
Python
classview/views.py
SeshinWei/django24
73a066f1ebe8caee09b91ab411a76a8fddabb6c3
[ "MIT" ]
null
null
null
classview/views.py
SeshinWei/django24
73a066f1ebe8caee09b91ab411a76a8fddabb6c3
[ "MIT" ]
null
null
null
classview/views.py
SeshinWei/django24
73a066f1ebe8caee09b91ab411a76a8fddabb6c3
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.views import View from django.http import HttpResponse from django.utils.decorators import method_decorator # Create your views here. """ 类视图必须继承View 类视图中的方法名都必须是请求方法名小写 """ def my_decorator(view_func): """定义装饰器""" def wrapper(request, *args, **kwargs): ...
22.6
52
0.666935
from django.shortcuts import render from django.views import View from django.http import HttpResponse from django.utils.decorators import method_decorator def my_decorator(view_func): def wrapper(request, *args, **kwargs): print('装饰器被调用了') return view_func(request, *args, **kwargs) return ...
true
true
f728acca0a7a5018263431ea24aa5a8ba6852f87
154
py
Python
tests/reporting/review/api.py
ctk3b/borderline
7c4ab891b36c97038940dea678718dea8ebf5060
[ "MIT" ]
null
null
null
tests/reporting/review/api.py
ctk3b/borderline
7c4ab891b36c97038940dea678718dea8ebf5060
[ "MIT" ]
4
2021-09-17T00:53:47.000Z
2021-09-24T22:05:13.000Z
tests/reporting/review/api.py
ctk3b/borderline
7c4ab891b36c97038940dea678718dea8ebf5060
[ "MIT" ]
null
null
null
import reporting.report_builder.api import reporting.report_builder.this_is_a_violation import reporting.report_builder.this_is_a_grandfathered_violation
38.5
65
0.922078
import reporting.report_builder.api import reporting.report_builder.this_is_a_violation import reporting.report_builder.this_is_a_grandfathered_violation
true
true
f728b025e2af6db7811c909ca4bae4729748b8f2
7,707
py
Python
Multi_Classification/Multi_Image_Classification.py
KKanda900/Model-Maker
e73c6e1d47b9682657694e4f56ee96a34e3a29ea
[ "MIT" ]
2
2021-09-23T03:09:34.000Z
2021-11-16T12:05:28.000Z
Multi_Classification/Multi_Image_Classification.py
KKanda900/Model-Maker
e73c6e1d47b9682657694e4f56ee96a34e3a29ea
[ "MIT" ]
null
null
null
Multi_Classification/Multi_Image_Classification.py
KKanda900/Model-Maker
e73c6e1d47b9682657694e4f56ee96a34e3a29ea
[ "MIT" ]
null
null
null
# Primary Python Files for Image Classification import numpy as np import pandas as pd import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # dont show any tensorflow warning messages import cv2 # Keras libraries used for making the model and tensorflow import tensorflow, keras from tensorflow.keras.utils import to_ca...
51.724832
171
0.659141
import numpy as np import pandas as pd import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import cv2 import tensorflow, keras from tensorflow.keras.utils import to_categorical from keras.layers import Dense,Conv2D,Flatten,MaxPool2D,Dropout from keras.models import Sequential from sklearn.model_selection import ...
true
true
f728b02e232a41f5db5c09c8b25110c9198edcc1
5,517
py
Python
tests/test_dependencies.py
mmaioli/projects
648f1306a3dde5deb456c9886fb59c73e424d186
[ "Apache-2.0" ]
null
null
null
tests/test_dependencies.py
mmaioli/projects
648f1306a3dde5deb456c9886fb59c73e424d186
[ "Apache-2.0" ]
null
null
null
tests/test_dependencies.py
mmaioli/projects
648f1306a3dde5deb456c9886fb59c73e424d186
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from json import dumps from unittest import TestCase import pytest from werkzeug.exceptions import NotFound from projects.controllers.dependencies import list_dependencies, list_next_operators, \ create_dependency, delete_dependency from projects.controllers.utils import uuid_alpha from pr...
36.296053
222
0.63404
from json import dumps from unittest import TestCase import pytest from werkzeug.exceptions import NotFound from projects.controllers.dependencies import list_dependencies, list_next_operators, \ create_dependency, delete_dependency from projects.controllers.utils import uuid_alpha from projects.database import ...
true
true
f728b0e231c268bd33297e6a7f35127229b428a1
1,689
py
Python
vulcan_medication_bundle/_nbdev.py
pete88b/vulcan_medication_bundle
d0239805ec04430abb5e92572e984e2cd343a49c
[ "Apache-2.0" ]
null
null
null
vulcan_medication_bundle/_nbdev.py
pete88b/vulcan_medication_bundle
d0239805ec04430abb5e92572e984e2cd343a49c
[ "Apache-2.0" ]
null
null
null
vulcan_medication_bundle/_nbdev.py
pete88b/vulcan_medication_bundle
d0239805ec04430abb5e92572e984e2cd343a49c
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"request_headers": "00_core.ipynb", "get_as_raw_json": "00_core.ipynb", "get_next_as_raw_json": "00_core.ipynb", "timestamp_now": "00_core.ipynb", "new_bundle": "00_core.ip...
40.214286
75
0.651273
__all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"request_headers": "00_core.ipynb", "get_as_raw_json": "00_core.ipynb", "get_next_as_raw_json": "00_core.ipynb", "timestamp_now": "00_core.ipynb", "new_bundle": "00_core.ipynb", "new_list": "00_core.ip...
true
true
f728b1674cac977ba891f01d63962d8fc34a7577
312
py
Python
app.py
rob-med/BotPitchfork
d3d2991024dcb36a1077247e11242e3c0ac6ca34
[ "MIT" ]
1
2021-01-05T16:45:36.000Z
2021-01-05T16:45:36.000Z
app.py
rob-med/BotPitchfork
d3d2991024dcb36a1077247e11242e3c0ac6ca34
[ "MIT" ]
null
null
null
app.py
rob-med/BotPitchfork
d3d2991024dcb36a1077247e11242e3c0ac6ca34
[ "MIT" ]
1
2021-12-05T20:29:19.000Z
2021-12-05T20:29:19.000Z
import os from flask import Flask, render_template, request, redirect, url_for app = Flask(__name__) @app.route('/', methods=['GET']) def index(): return render_template('index.html') if __name__ == '__main__': port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port, debug=True)
22.285714
68
0.682692
import os from flask import Flask, render_template, request, redirect, url_for app = Flask(__name__) @app.route('/', methods=['GET']) def index(): return render_template('index.html') if __name__ == '__main__': port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port, debug=True)
true
true
f728b38692c6b8242f4ba96a6d2a1375387a8827
14,292
py
Python
experiments/experiments_img.py
BeeQC/ANODE-reproducibility
9d6b5a297302cdaa0bbc3908de1a94f3c28c0606
[ "MIT" ]
null
null
null
experiments/experiments_img.py
BeeQC/ANODE-reproducibility
9d6b5a297302cdaa0bbc3908de1a94f3c28c0606
[ "MIT" ]
null
null
null
experiments/experiments_img.py
BeeQC/ANODE-reproducibility
9d6b5a297302cdaa0bbc3908de1a94f3c28c0606
[ "MIT" ]
null
null
null
import json import matplotlib matplotlib.use('Agg') # This is hacky (useful for running on VMs) import numpy as np import os import time import torch from anode.models import ODENet from anode.conv_models import ConvODENet from anode.discrete_models import ResNet from anode.training import Trainer from experiments.dat...
44.111111
115
0.559124
import json import matplotlib matplotlib.use('Agg') import numpy as np import os import time import torch from anode.models import ODENet from anode.conv_models import ConvODENet from anode.discrete_models import ResNet from anode.training import Trainer from experiments.dataloaders import mnist, cifar10, tiny_imagen...
true
true
f728b5f2006ff75905c460e9ff9c990b86682b02
12,738
py
Python
twitter-winner/tweepy/models.py
lucasrangit/twitter-winner
2f92d7b7dac0a6bfbcea7304261d256d6d12c212
[ "MIT" ]
10
2020-08-09T16:07:35.000Z
2021-06-19T08:18:44.000Z
twitter-winner/tweepy/models.py
lucasrangit/twitter-winner
2f92d7b7dac0a6bfbcea7304261d256d6d12c212
[ "MIT" ]
13
2020-10-28T16:02:09.000Z
2020-11-16T13:30:05.000Z
twitter-winner/tweepy/models.py
lucasrangit/twitter-winner
2f92d7b7dac0a6bfbcea7304261d256d6d12c212
[ "MIT" ]
2
2020-09-22T12:21:35.000Z
2020-10-27T06:59:30.000Z
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. from tweepy.error import TweepError from tweepy.utils import parse_datetime, parse_html_value, parse_a_href class ResultSet(list): """A list like object that holds results from a Twitter API query.""" def __init__(self, max_id=None, s...
28.75395
87
0.569556
from tweepy.error import TweepError from tweepy.utils import parse_datetime, parse_html_value, parse_a_href class ResultSet(list): def __init__(self, max_id=None, since_id=None): super(ResultSet, self).__init__() self._max_id = max_id self._since_id = since_id @property def ma...
true
true
f728b6f92dca477e111a1125d6b121b5c1e6cb92
26,973
py
Python
vistrails/packages/vtk/vtk_wrapper/specs.py
remram44/VisTrails-mybinder
ee7477b471920d738f3ac430932f01901b56ed44
[ "BSD-3-Clause" ]
83
2015-01-05T14:50:50.000Z
2021-09-17T19:45:26.000Z
vistrails/packages/vtk/vtk_wrapper/specs.py
remram44/VisTrails-mybinder
ee7477b471920d738f3ac430932f01901b56ed44
[ "BSD-3-Clause" ]
254
2015-01-02T20:39:19.000Z
2018-11-28T17:16:44.000Z
vistrails/packages/vtk/vtk_wrapper/specs.py
remram44/VisTrails-mybinder
ee7477b471920d738f3ac430932f01901b56ed44
[ "BSD-3-Clause" ]
40
2015-04-17T16:46:36.000Z
2021-09-28T22:43:24.000Z
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
38.259574
95
0.539169
elt.tag) def get_port_type(self): if self.port_type is None: return "basic:Null" try: port_types = ast.literal_eval(self.port_type) def flatten(t): if not isinstance(t, list): raise Exception("Expected a list") ...
true
true
f728b7aa08823dde508a38f4ea974fa9249ec9d9
30,233
py
Python
silx/gui/plot/actions/io.py
physwkim/silx
e3f39babad34c97db8ec5dfbb8e92287ce059f70
[ "CC0-1.0", "MIT" ]
1
2019-12-11T14:11:03.000Z
2019-12-11T14:11:03.000Z
silx/gui/plot/actions/io.py
physwkim/silx
e3f39babad34c97db8ec5dfbb8e92287ce059f70
[ "CC0-1.0", "MIT" ]
3
2016-09-08T13:14:15.000Z
2017-05-09T07:51:13.000Z
silx/gui/plot/actions/io.py
physwkim/silx
e3f39babad34c97db8ec5dfbb8e92287ce059f70
[ "CC0-1.0", "MIT" ]
1
2017-06-13T13:02:54.000Z
2017-06-13T13:02:54.000Z
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2004-2020 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to d...
36.91453
88
0.586048
else: # Format not supported _logger.error( 'Saving plot snapshot failed: format not supported') return False plot.saveGraph(filename, fileFormat=fileFormat) return True def _getAxesLabels(self, item): # If curve has no associated label, get t...
true
true
f728ba4cdca2ea205374f7b691e644f87e84d989
4,873
py
Python
src/cowrie/telnet/session.py
ProjectZeroDays/cowrie
080c7231c56f84a90c205d8201f3e494c19bd20f
[ "BSD-3-Clause" ]
1
2021-03-14T00:41:14.000Z
2021-03-14T00:41:14.000Z
src/cowrie/telnet/session.py
ProjectZeroDays/cowrie
080c7231c56f84a90c205d8201f3e494c19bd20f
[ "BSD-3-Clause" ]
null
null
null
src/cowrie/telnet/session.py
ProjectZeroDays/cowrie
080c7231c56f84a90c205d8201f3e494c19bd20f
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2015, 2016 GoSecure Inc. """ Telnet User Session management for the Honeypot @author: Olivier Bilodeau <obilodeau@gosecure.ca> """ import traceback from twisted.conch.ssh import session from twisted.conch.telnet import ECHO, SGA, TelnetBootstrapProtocol from twisted.internet import interfaces, proto...
30.841772
116
0.646214
import traceback from twisted.conch.ssh import session from twisted.conch.telnet import ECHO, SGA, TelnetBootstrapProtocol from twisted.internet import interfaces, protocol from twisted.python import log from zope.interface import implementer from cowrie.insults import insults from cowrie.shell import protocol as...
true
true
f728bab1baffa1d80c6916c846a11341858f0334
2,584
py
Python
project/03-asvspoof-mega/03_fuse_score_evaluate.py
Nijta/project-NN-Pytorch-scripts
06a50ab072613fb60b8b8e1cea85c4aa8e75549d
[ "BSD-3-Clause" ]
null
null
null
project/03-asvspoof-mega/03_fuse_score_evaluate.py
Nijta/project-NN-Pytorch-scripts
06a50ab072613fb60b8b8e1cea85c4aa8e75549d
[ "BSD-3-Clause" ]
null
null
null
project/03-asvspoof-mega/03_fuse_score_evaluate.py
Nijta/project-NN-Pytorch-scripts
06a50ab072613fb60b8b8e1cea85c4aa8e75549d
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python """ Wrapper to fuse score and compute EER and min tDCF Simple score averaging. Usage: python 03_fuse_score_evaluate.py log_output_testset_1 log_output_testset_2 ... The log_output_testset is produced by the pytorch code, for example, ./lfcc-lcnn-lstmsum-am/01/__pretrained/log_output_testset It has...
32.3
78
0.630805
import os import sys import numpy as np from sandbox import eval_asvspoof def parse_txt(file_path): bonafide = [] bonafide_file_name = [] spoofed = [] spoofed_file_name = [] with open(file_path, 'r') as file_ptr: for line in file_ptr: if line.startswith('Output,'): ...
true
true
f728bb4c3bd05022e7c882dda3adb58f34d6f4f1
1,873
py
Python
db_test_decl.py
askanio8/sqlalchemyy
73fa16317072455fe3bc2e9ae22601c95c86793f
[ "Apache-2.0" ]
null
null
null
db_test_decl.py
askanio8/sqlalchemyy
73fa16317072455fe3bc2e9ae22601c95c86793f
[ "Apache-2.0" ]
null
null
null
db_test_decl.py
askanio8/sqlalchemyy
73fa16317072455fe3bc2e9ae22601c95c86793f
[ "Apache-2.0" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from alchemy_decl import Base, Book, Author engine = create_engine("mysql+mysqlconnector://root:root@localhost/pylounge2", echo=True) # Флаг echo включает ведение лога через стандартный модуль logging Питона. # Когда он включен, мы увидим все...
33.446429
124
0.728777
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from alchemy_decl import Base, Book, Author engine = create_engine("mysql+mysqlconnector://root:root@localhost/pylounge2", echo=True) session = sessionmaker(bind=engine) s = session() author_one = Author(name="Лутц") s.add(author_one) s...
true
true
f728bd688632fc6b6feb958f4e541b69dd4c20c1
2,108
py
Python
mnist/storage.py
onsabbatical/PoET-BiN
5226cf7e8e34316a3ced73ce30528ac49730ecf4
[ "MIT" ]
null
null
null
mnist/storage.py
onsabbatical/PoET-BiN
5226cf7e8e34316a3ced73ce30528ac49730ecf4
[ "MIT" ]
null
null
null
mnist/storage.py
onsabbatical/PoET-BiN
5226cf7e8e34316a3ced73ce30528ac49730ecf4
[ "MIT" ]
null
null
null
import torch import numpy as np def store_value(main_array,cu_fl,i,name): cu_uint8 = cu_fl.type(torch.ByteTensor) main_array = torch.cat((main_array,cu_uint8),0) #print(i) if (i + 1)%100 == 0: main_array_np = main_array.cpu().numpy() np.save(name + str(int(i/100)) + '.npy',main_array[1:,:,:,:]) main_array...
31.462687
106
0.702562
import torch import numpy as np def store_value(main_array,cu_fl,i,name): cu_uint8 = cu_fl.type(torch.ByteTensor) main_array = torch.cat((main_array,cu_uint8),0) if (i + 1)%100 == 0: main_array_np = main_array.cpu().numpy() np.save(name + str(int(i/100)) + '.npy',main_array[1:,:,:,:]) main_array = torch....
true
true
f728bd8d10117b9a9aeb142dcd5a0b80154096c8
11,964
py
Python
tanager_feeder/dialogs/dialog.py
first-mode/tanager-feeder
ac9d961439caad7d6c9b861ed27d0192de77edb4
[ "MIT" ]
null
null
null
tanager_feeder/dialogs/dialog.py
first-mode/tanager-feeder
ac9d961439caad7d6c9b861ed27d0192de77edb4
[ "MIT" ]
null
null
null
tanager_feeder/dialogs/dialog.py
first-mode/tanager-feeder
ac9d961439caad7d6c9b861ed27d0192de77edb4
[ "MIT" ]
1
2021-04-23T00:03:46.000Z
2021-04-23T00:03:46.000Z
import tkinter as tk from tkinter import Frame, Button, Tk, TclError from typing import Dict, Optional from tanager_feeder import utils class Dialog: def __init__( self, controller, title: str, label: str, buttons: Dict, width: Optional[int] = None, height:...
38.223642
119
0.540288
import tkinter as tk from tkinter import Frame, Button, Tk, TclError from typing import Dict, Optional from tanager_feeder import utils class Dialog: def __init__( self, controller, title: str, label: str, buttons: Dict, width: Optional[int] = None, height:...
true
true
f728bf065f4ac3837c3fe6a2a89d3c689748abef
5,360
py
Python
third_party/tflite-micro/tensorflow/lite/micro/tools/metrics/create_size_log.py
keadwen/CFU-Playground
74c79158e85e1365170ececd1d91ea3fa48faba0
[ "Apache-2.0" ]
1
2022-01-19T13:47:13.000Z
2022-01-19T13:47:13.000Z
third_party/tflite-micro/tensorflow/lite/micro/tools/metrics/create_size_log.py
keadwen/CFU-Playground
74c79158e85e1365170ececd1d91ea3fa48faba0
[ "Apache-2.0" ]
null
null
null
third_party/tflite-micro/tensorflow/lite/micro/tools/metrics/create_size_log.py
keadwen/CFU-Playground
74c79158e85e1365170ececd1d91ea3fa48faba0
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.712329
105
0.624813
import argparse import datetime import os import pandas as pd import subprocess def _build_a_binary(root_dir, binary_name, makefile_options): os.chdir(root_dir) params_list = [ "make", "-f", "tensorflow/lite/micro/tools/make/Makefile", binary_name ] + ["%s=%s" % (key, value) for (key, valu...
true
true
f728bf5b0a13d3b044d905f93c6139c655867979
100
py
Python
spider_project/spider_market/apps.py
Sam1808/SG
4352aebdc35b5d84be09863af5d85b843e039e20
[ "MIT" ]
1
2021-11-22T11:15:41.000Z
2021-11-22T11:15:41.000Z
spider_project/spider_market/apps.py
Sam1808/SG
4352aebdc35b5d84be09863af5d85b843e039e20
[ "MIT" ]
null
null
null
spider_project/spider_market/apps.py
Sam1808/SG
4352aebdc35b5d84be09863af5d85b843e039e20
[ "MIT" ]
null
null
null
from django.apps import AppConfig class SpiderMarketConfig(AppConfig): name = 'spider_market'
16.666667
36
0.78
from django.apps import AppConfig class SpiderMarketConfig(AppConfig): name = 'spider_market'
true
true
f728bf9140687e6e0eb7b82f8867e24dc9c576ad
163
py
Python
tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_PolyTrend_Seasonal_DayOfWeek_NoAR.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_PolyTrend_Seasonal_DayOfWeek_NoAR.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_PolyTrend_Seasonal_DayOfWeek_NoAR.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Difference'] , ['PolyTrend'] , ['Seasonal_DayOfWeek'] , ['NoAR'] );
40.75
90
0.760736
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Difference'] , ['PolyTrend'] , ['Seasonal_DayOfWeek'] , ['NoAR'] );
true
true
f728c00a1d05db7029582e2f2ffa30430698a2a4
3,084
py
Python
flumine/events/events.py
jsphon/flumine
bd5cacf9793d53a99595fe4694aeb9b8d2962abb
[ "MIT" ]
null
null
null
flumine/events/events.py
jsphon/flumine
bd5cacf9793d53a99595fe4694aeb9b8d2962abb
[ "MIT" ]
null
null
null
flumine/events/events.py
jsphon/flumine
bd5cacf9793d53a99595fe4694aeb9b8d2962abb
[ "MIT" ]
null
null
null
import datetime from enum import Enum class EventType(Enum): TERMINATOR = "Terminator" # betfair objects MARKET_CATALOGUE = "MarketCatalogue" MARKET_BOOK = "MarketBook" RAW_DATA = "Raw streaming data" CURRENT_ORDERS = "CurrentOrders" CLEARED_MARKETS = "ClearedMarkets" CLEARED_ORDERS = ...
22.18705
80
0.725032
import datetime from enum import Enum class EventType(Enum): TERMINATOR = "Terminator" MARKET_CATALOGUE = "MarketCatalogue" MARKET_BOOK = "MarketBook" RAW_DATA = "Raw streaming data" CURRENT_ORDERS = "CurrentOrders" CLEARED_MARKETS = "ClearedMarkets" CLEARED_ORDERS = "ClearedOrders" ...
true
true
f728c043d84924a38e28c702e1a7d6055c1310a5
5,071
py
Python
Stimuli/Test2.py
Tom-TBT/QDSpy
8756a6251b870c61294f5e3ad83c57e8f49e8195
[ "MIT" ]
11
2016-04-04T12:54:44.000Z
2022-02-10T10:24:15.000Z
Stimuli/Test2.py
Tom-TBT/QDSpy
8756a6251b870c61294f5e3ad83c57e8f49e8195
[ "MIT" ]
17
2016-04-05T15:43:43.000Z
2019-06-22T08:08:16.000Z
Stimuli/Test2.py
Tom-TBT/QDSpy
8756a6251b870c61294f5e3ad83c57e8f49e8195
[ "MIT" ]
7
2016-01-21T11:23:17.000Z
2021-06-28T14:34:41.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # --------------------------------------------------------------------- import random import QDS import math QDS.Initialize("Test2", "Test for Lightcrafter") #QDS.setColorMode((8,7,7), (0,1,1), 0) #QDS.setColorMode((8,8,8), (0,0,0), 0) #QDS.setColorMode((0,0,0), (0,0,...
27.559783
81
0.566555
import random import QDS import math QDS.Initialize("Test2", "Test for Lightcrafter") nTrials = 120 dt_s = 1.0/60.0 dxScr = 580 dyScr = 580 useStripes= 1 random.seed(1) if useStripes: nRows = 48 nCols = 3 Grad_boxDx = dxScr/float(nCols) Grad_boxDy = dyScr/float...
true
true
f728c118f43ad8e3b4ef9f2c993314d232442789
1,473
py
Python
Codechef/SeptemberLunchtime2021/Unqeq.py
Anubha13kumari/Data-Structures
232c4f2de87f6c0bea7dadc8d46db1be52159f5c
[ "MIT" ]
null
null
null
Codechef/SeptemberLunchtime2021/Unqeq.py
Anubha13kumari/Data-Structures
232c4f2de87f6c0bea7dadc8d46db1be52159f5c
[ "MIT" ]
4
2021-10-01T16:41:34.000Z
2021-10-02T13:30:55.000Z
Codechef/SeptemberLunchtime2021/Unqeq.py
Anubha13kumari/Data-Structures
232c4f2de87f6c0bea7dadc8d46db1be52159f5c
[ "MIT" ]
2
2021-10-01T17:44:31.000Z
2021-10-02T09:07:04.000Z
import math T=int(input()) while T>0: N=int(input()) nums1,nums2=[],[] if N==1: print("NO") elif N==2: print("NO") elif int(N/2)%2==0: l=1 r=N sum1=0 sum2=0 for i in range(int(N/2)): if l<=int(N/4): nums1.app...
20.458333
46
0.334691
import math T=int(input()) while T>0: N=int(input()) nums1,nums2=[],[] if N==1: print("NO") elif N==2: print("NO") elif int(N/2)%2==0: l=1 r=N sum1=0 sum2=0 for i in range(int(N/2)): if l<=int(N/4): nums1.app...
true
true
f728c1290f4433deb303b7da2d4ed30d91a801e5
21,041
py
Python
python/src/cm_shell/cmps.py
cloudsoft/cm_api
85c7179044188c785c793a649677a22e427d2924
[ "Apache-2.0" ]
6
2015-04-28T22:56:49.000Z
2019-05-23T17:25:05.000Z
python/src/cm_shell/cmps.py
cloudsoft/cm_api
85c7179044188c785c793a649677a22e427d2924
[ "Apache-2.0" ]
null
null
null
python/src/cm_shell/cmps.py
cloudsoft/cm_api
85c7179044188c785c793a649677a22e427d2924
[ "Apache-2.0" ]
22
2015-04-28T22:56:31.000Z
2019-02-26T14:34:16.000Z
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
32.621705
120
0.57388
import sys import getpass import argparse import readline import os import cmd from prettytable import PrettyTable from cm_api.api_client import ApiResource, ApiException from urllib2 import URLError CONFIG = {'cluster': None, 'output_type': 'table', 'seperator': None} INIT_PROMPT = "cloudera> " ...
true
true
f728c129fea752ad0a3d91130e6dfa702c2a0db1
2,160
py
Python
tests/unit/server/test_get_model_status_rest.py
rasapala/OpenVINO-model-server
a7cd5c7fe6c2177aefbe2fc258eec1b9ff0dda2b
[ "Apache-2.0" ]
1
2019-08-31T04:02:04.000Z
2019-08-31T04:02:04.000Z
tests/unit/server/test_get_model_status_rest.py
rasapala/OpenVINO-model-server
a7cd5c7fe6c2177aefbe2fc258eec1b9ff0dda2b
[ "Apache-2.0" ]
null
null
null
tests/unit/server/test_get_model_status_rest.py
rasapala/OpenVINO-model-server
a7cd5c7fe6c2177aefbe2fc258eec1b9ff0dda2b
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
41.538462
74
0.52037
def test_get_model_status_successful(client): response = client.simulate_request(method='GET', path='/v1/models/test', headers={ "Content-Type": ...
true
true
f728c16552bf8fb7df83575a84a2183112ee941d
6,493
py
Python
src/analytics/contrail-topology/contrail_topology/config.py
madkiss/contrail-controller
17f622dfe99f8ab4163436399e80f95dd564814c
[ "Apache-2.0" ]
null
null
null
src/analytics/contrail-topology/contrail_topology/config.py
madkiss/contrail-controller
17f622dfe99f8ab4163436399e80f95dd564814c
[ "Apache-2.0" ]
null
null
null
src/analytics/contrail-topology/contrail_topology/config.py
madkiss/contrail-controller
17f622dfe99f8ab4163436399e80f95dd564814c
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. # import argparse, os, ConfigParser, sys, re from pysandesh.sandesh_base import * from pysandesh.gen_py.sandesh.ttypes import SandeshLevel class CfgParser(object): CONF_DEFAULT_PATH = '/etc/contrail/contrail-topology.conf' def __init__(self, ar...
37.97076
79
0.596335
import argparse, os, ConfigParser, sys, re from pysandesh.sandesh_base import * from pysandesh.gen_py.sandesh.ttypes import SandeshLevel class CfgParser(object): CONF_DEFAULT_PATH = '/etc/contrail/contrail-topology.conf' def __init__(self, argv): self._args = None self.__pat = None s...
true
true
f728c2249a621aec123829f2600362674d968847
2,941
py
Python
experiments/utils.py
chandar-lab/IIRC
ae6ffcfc0a42274bcda66e2288e09118604620e4
[ "MIT" ]
23
2021-01-19T11:50:57.000Z
2021-12-12T17:20:22.000Z
experiments/utils.py
chandar-lab/IIRC
ae6ffcfc0a42274bcda66e2288e09118604620e4
[ "MIT" ]
1
2021-04-06T14:35:03.000Z
2021-06-20T08:56:15.000Z
experiments/utils.py
chandar-lab/IIRC
ae6ffcfc0a42274bcda66e2288e09118604620e4
[ "MIT" ]
8
2021-01-05T10:49:19.000Z
2021-12-12T17:20:38.000Z
import numpy as np import torch.nn as nn import json def log(epoch, task_id, log_dict, logbook): log_dict["message"] = f"task_{task_id}_metrics" log_dict["task_id"] = task_id log_dict["task_epoch"] = epoch log_dict["step"] = epoch logbook.write_metric(log_dict) def log_task(task_id, log_dict, lo...
36.7625
98
0.652159
import numpy as np import torch.nn as nn import json def log(epoch, task_id, log_dict, logbook): log_dict["message"] = f"task_{task_id}_metrics" log_dict["task_id"] = task_id log_dict["task_epoch"] = epoch log_dict["step"] = epoch logbook.write_metric(log_dict) def log_task(task_id, log_dict, lo...
true
true
f728c22c6ab2cbd222e594a6ae3da1fe806d67c2
15,817
py
Python
V1_1_0_0/MGC3130/build/lib.linux-armv7l-2.7/MGC3130/MGC3130_DefVar.py
MatteoDestro/RaspberryPi_Gesture_MGC3130
071c7d26dab897786dcfd6fc1e5faac9e3531b4b
[ "BSD-2-Clause" ]
1
2021-04-19T12:09:36.000Z
2021-04-19T12:09:36.000Z
V1_1_0_0/MGC3130/build/lib.linux-armv7l-2.7/MGC3130/MGC3130_DefVar.py
MatteoDestro/RaspberryPi_Gesture_MGC3130
071c7d26dab897786dcfd6fc1e5faac9e3531b4b
[ "BSD-2-Clause" ]
null
null
null
V1_1_0_0/MGC3130/build/lib.linux-armv7l-2.7/MGC3130/MGC3130_DefVar.py
MatteoDestro/RaspberryPi_Gesture_MGC3130
071c7d26dab897786dcfd6fc1e5faac9e3531b4b
[ "BSD-2-Clause" ]
null
null
null
#================================================================================== # ctypes type C type Python type #================================================================================== # c_bool _Bool bool (1) #---------------------------------------------------------------------------...
49.895899
148
0.395208
from ctypes import * ID_DATA_OUTPUT = 0x91 ID_FW_VERSION = 0x83 MASK_GESTURE_RAW = 0x0001F0FF MASK_TOUCH_RAW = 0x00007FFF MASK_FILTER_GESTURE = 0x00000000000000 GESTURE_MASK_TOUCH_SOUTH = 0x0000000000000001 GES...
true
true
f728c26febf42a991a26952f5fa1a3457348f35c
196
py
Python
cofr/exceptions.py
thibault/trezor-keyval
5a345f2ab2bcf88aa7ddf2f47e1f7c693b295712
[ "MIT" ]
3
2018-03-01T12:53:34.000Z
2019-06-01T16:30:57.000Z
cofr/exceptions.py
thibault/trezor-keyval
5a345f2ab2bcf88aa7ddf2f47e1f7c693b295712
[ "MIT" ]
1
2021-06-01T21:37:50.000Z
2021-06-01T21:37:50.000Z
cofr/exceptions.py
thibault/trezor-keyval
5a345f2ab2bcf88aa7ddf2f47e1f7c693b295712
[ "MIT" ]
null
null
null
class NoTrezorFoundError(Exception): """No plugged Trezor wallet was found.""" pass class InvalidCofrFileError(Exception): """The file is invalid and cannot be parsed.""" pass
17.818182
51
0.693878
class NoTrezorFoundError(Exception): pass class InvalidCofrFileError(Exception): pass
true
true
f728c2d60bcb05e26ba4202235a7c822207b8198
3,861
py
Python
ambari-metrics-host-monitoring/src/main/python/core/metric_collector.py
generalmotors/ambari-metrics
a197d284c583be1a96134215d61fbfc2ec62b66c
[ "Apache-2.0" ]
29
2018-10-03T21:50:39.000Z
2022-03-30T04:01:25.000Z
ambari-metrics-host-monitoring/src/main/python/core/metric_collector.py
generalmotors/ambari-metrics
a197d284c583be1a96134215d61fbfc2ec62b66c
[ "Apache-2.0" ]
23
2018-09-25T20:54:54.000Z
2020-12-01T05:51:48.000Z
ambari-metrics-host-monitoring/src/main/python/core/metric_collector.py
generalmotors/ambari-metrics
a197d284c583be1a96134215d61fbfc2ec62b66c
[ "Apache-2.0" ]
48
2018-09-25T20:11:27.000Z
2022-02-10T06:39:06.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")...
37.125
130
0.760166
import logging from time import time from event_definition import HostMetricCollectEvent, ProcessMetricCollectEvent from metering import MeteringMetricHandler logger = logging.getLogger() DEFAULT_HOST_APP_ID = '_HOST' class MetricsCollector(): def __init__(self, emit_queue, application_metric_map, host_info, c...
true
true
f728c3198824a7a9f7d5386087457b8eda71063b
1,721
py
Python
bdd/group_steps.py
russa1995/python_training
0566725a15565c83ebc5bbf2b18470f1c3ab9595
[ "Apache-2.0" ]
null
null
null
bdd/group_steps.py
russa1995/python_training
0566725a15565c83ebc5bbf2b18470f1c3ab9595
[ "Apache-2.0" ]
null
null
null
bdd/group_steps.py
russa1995/python_training
0566725a15565c83ebc5bbf2b18470f1c3ab9595
[ "Apache-2.0" ]
null
null
null
from pytest_bdd import given, when, then from model.group import Group import random @given('a group list') def group_list(db): return db.get_group_list() @given('a group with <name>, <header> and <footer>') def new_group(name, header, footer): return Group(name=name, header=header, footer=footer) @when ('I ...
36.617021
113
0.740267
from pytest_bdd import given, when, then from model.group import Group import random @given('a group list') def group_list(db): return db.get_group_list() @given('a group with <name>, <header> and <footer>') def new_group(name, header, footer): return Group(name=name, header=header, footer=footer) @when ('I ...
true
true
f728c31e556a81c5d46abdcc25bf493c790a601a
84,818
py
Python
Packs/EWS/Integrations/EWSO365/EWSO365.py
ryantoddtq/content
50027658da7189e37e9514fc03057d1c1bc3209f
[ "MIT" ]
2
2020-07-27T10:35:41.000Z
2020-12-14T15:44:18.000Z
Packs/EWS/Integrations/EWSO365/EWSO365.py
Axonius/content
e058add82b7422338015cf14591512b9aad4d3e9
[ "MIT" ]
48
2022-03-08T13:45:00.000Z
2022-03-31T14:32:05.000Z
Packs/EWS/Integrations/EWSO365/EWSO365.py
Axonius/content
e058add82b7422338015cf14591512b9aad4d3e9
[ "MIT" ]
1
2022-01-06T07:09:11.000Z
2022-01-06T07:09:11.000Z
import random import string from typing import Dict import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import sys import traceback import json import os import hashlib from datetime import timedelta from io import StringIO import logging import warnings import email fr...
35.034283
116
0.624691
import random import string from typing import Dict import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import sys import traceback import json import os import hashlib from datetime import timedelta from io import StringIO import logging import warnings import email fr...
true
true
f728c391f0d3f70e7cfa1e9837dfcc22ca3a34d2
3,369
py
Python
tests/PyPoE/poe/test_patchserver.py
Openarl/PyPoE
ab5377e3b16f1920d4d9ada443e1e9059715f0fb
[ "MIT" ]
15
2017-09-19T05:40:42.000Z
2021-04-23T00:59:24.000Z
tests/PyPoE/poe/test_patchserver.py
Openarl/PyPoE
ab5377e3b16f1920d4d9ada443e1e9059715f0fb
[ "MIT" ]
null
null
null
tests/PyPoE/poe/test_patchserver.py
Openarl/PyPoE
ab5377e3b16f1920d4d9ada443e1e9059715f0fb
[ "MIT" ]
3
2018-02-14T00:02:09.000Z
2020-07-26T15:18:55.000Z
""" Tests for PyPoE.poe.patchserver Overview =============================================================================== +----------+------------------------------------------------------------------+ | Path | tests/PyPoE/poe/test_patchserver.py | +----------+---------------------...
33.356436
122
0.344613
import os import re from urllib.error import HTTPError from tempfile import TemporaryDirectory import pytest from PyPoE.poe import patchserver _TEST_URL = 'Data/Wordlists.dat' _re_version = re.compile(r'[\d]+\.[\d]+\.[\d]+\.[\d]+', re.UNICODE) @pytest.fixture(scope='module') def patch(): return ...
true
true
f728c39309dad5b00d332f9ff13663aed2eca343
1,076
py
Python
setup.py
bockstaller/pretix-eventparts
b5cb8f89cb86677facc0509f9a36cf9359c94534
[ "Apache-2.0" ]
null
null
null
setup.py
bockstaller/pretix-eventparts
b5cb8f89cb86677facc0509f9a36cf9359c94534
[ "Apache-2.0" ]
null
null
null
setup.py
bockstaller/pretix-eventparts
b5cb8f89cb86677facc0509f9a36cf9359c94534
[ "Apache-2.0" ]
null
null
null
import os from distutils.command.build import build from django.core import management from setuptools import find_packages, setup from pretix_eventparts import __version__ try: with open( os.path.join(os.path.dirname(__file__), "README.rst"), encoding="utf-8" ) as f: long_description = f.re...
23.391304
79
0.712825
import os from distutils.command.build import build from django.core import management from setuptools import find_packages, setup from pretix_eventparts import __version__ try: with open( os.path.join(os.path.dirname(__file__), "README.rst"), encoding="utf-8" ) as f: long_description = f.re...
true
true
f728c4ae68c4daf5e29a11718ad58e5fdf400b10
498
py
Python
algebreb/listas/ejemplos/lista_ecuaciones_univariables/lista_ecuaciones_grado1.py
Ivan0123456789/algebreb
c1548df99a7fc960b73239d296db4e2c914926cd
[ "MIT" ]
null
null
null
algebreb/listas/ejemplos/lista_ecuaciones_univariables/lista_ecuaciones_grado1.py
Ivan0123456789/algebreb
c1548df99a7fc960b73239d296db4e2c914926cd
[ "MIT" ]
null
null
null
algebreb/listas/ejemplos/lista_ecuaciones_univariables/lista_ecuaciones_grado1.py
Ivan0123456789/algebreb
c1548df99a7fc960b73239d296db4e2c914926cd
[ "MIT" ]
1
2021-12-13T03:20:08.000Z
2021-12-13T03:20:08.000Z
from algebreb.listas.listas_ecuaciones_univariables import ListaEcuacionesGrado1 from sympy.abc import a, b, c, x, y , z import json caracteristicas = {} caracteristicas['cantidad'] = 10 caracteristicas['variables'] = [a] caracteristicas['dominio'] = 'ZZ' caracteristicas['fraccion'] = False caracteristicas['cmin'] = 1...
31.125
80
0.777108
from algebreb.listas.listas_ecuaciones_univariables import ListaEcuacionesGrado1 from sympy.abc import a, b, c, x, y , z import json caracteristicas = {} caracteristicas['cantidad'] = 10 caracteristicas['variables'] = [a] caracteristicas['dominio'] = 'ZZ' caracteristicas['fraccion'] = False caracteristicas['cmin'] = 1...
true
true
f728c5406b686bacc61a455b3a183b0b5467af90
5,386
py
Python
conflowgen/tests/previews/test_vehicle_capacity_exceeded_preview_report.py
1grasse/conflowgen
142330ab6427254109af3b86102a30a13144ba0c
[ "MIT" ]
5
2022-02-16T11:44:42.000Z
2022-02-24T20:02:17.000Z
conflowgen/tests/previews/test_vehicle_capacity_exceeded_preview_report.py
1grasse/conflowgen
142330ab6427254109af3b86102a30a13144ba0c
[ "MIT" ]
90
2021-12-08T14:05:44.000Z
2022-03-24T08:53:31.000Z
conflowgen/tests/previews/test_vehicle_capacity_exceeded_preview_report.py
1grasse/conflowgen
142330ab6427254109af3b86102a30a13144ba0c
[ "MIT" ]
5
2021-12-07T16:05:15.000Z
2022-02-16T08:24:07.000Z
import datetime import unittest from conflowgen.application.models.container_flow_generation_properties import ContainerFlowGenerationProperties from conflowgen.domain_models.distribution_repositories.mode_of_transport_distribution_repository import \ ModeOfTransportDistributionRepository from conflowgen.previews....
49.87037
115
0.576866
import datetime import unittest from conflowgen.application.models.container_flow_generation_properties import ContainerFlowGenerationProperties from conflowgen.domain_models.distribution_repositories.mode_of_transport_distribution_repository import \ ModeOfTransportDistributionRepository from conflowgen.previews....
true
true
f728c57ea266b83ce894b550bd353ddbc7ef393c
22,031
py
Python
preprocessor/legacy_functions/transform_column_values.py
clokman/KFIR
01c9bad491aa5c104adce38294ee2b15bd49b7ec
[ "MIT" ]
1
2021-12-20T03:23:42.000Z
2021-12-20T03:23:42.000Z
preprocessor/legacy_functions/transform_column_values.py
clokman/KFIR
01c9bad491aa5c104adce38294ee2b15bd49b7ec
[ "MIT" ]
null
null
null
preprocessor/legacy_functions/transform_column_values.py
clokman/KFIR
01c9bad491aa5c104adce38294ee2b15bd49b7ec
[ "MIT" ]
1
2022-03-23T08:37:03.000Z
2022-03-23T08:37:03.000Z
def transform_column_values(target_replacement_dictionary, target_column_headers_list, dataset): """ Replaces values in columns by using a dictionary of conversions (e.g., in order to quantify likert scales). :param target_replacement_dictionary: (dict) A dictionary in which *keys* are old (target) values ...
268.670732
8,889
0.631111
def transform_column_values(target_replacement_dictionary, target_column_headers_list, dataset):
true
true
f728c5f4de2c11e28d4609ce1f5201d79318c7af
1,743
py
Python
neutron_lbaas/openstack/common/_i18n.py
citrix-openstack-build/neutron-lbaas
972873d232090b9dae063fd3592447c00b2b74e9
[ "Apache-2.0" ]
null
null
null
neutron_lbaas/openstack/common/_i18n.py
citrix-openstack-build/neutron-lbaas
972873d232090b9dae063fd3592447c00b2b74e9
[ "Apache-2.0" ]
null
null
null
neutron_lbaas/openstack/common/_i18n.py
citrix-openstack-build/neutron-lbaas
972873d232090b9dae063fd3592447c00b2b74e9
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
37.891304
81
0.711991
try: import oslo.i18n _translators = oslo.i18n.TranslatorFactory(domain='neutron_lbaas') _ = _translators.primary _LI = _translators.log_info _LW = _translators.log_warning _LE = _translators.log_error _LC = _translators....
true
true
f728c6ed83c3c076db3a41e77244c07ee28a212f
12,327
py
Python
boozetools/support/interfaces.py
kjosib/booze-tools
ed3333643e0df99231202c024da8c86a9bb5b2bc
[ "MIT" ]
10
2019-01-24T04:45:56.000Z
2020-09-16T14:27:29.000Z
boozetools/support/interfaces.py
kjosib/booze-tools
ed3333643e0df99231202c024da8c86a9bb5b2bc
[ "MIT" ]
40
2019-04-10T21:54:38.000Z
2021-10-04T02:49:11.000Z
boozetools/support/interfaces.py
kjosib/booze-tools
ed3333643e0df99231202c024da8c86a9bb5b2bc
[ "MIT" ]
1
2020-05-22T16:28:02.000Z
2020-05-22T16:28:02.000Z
""" This file aggregates various abstract classes and exception types which BoozeTools deals in. There's a principle of object-oriented design which says "ask not for data, but for help." At first glance the ADTs for FiniteAutomaton and ParseTable appear to respect that dictum only by its violation, as suggested by al...
45.825279
193
0.754523
from typing import Callable from . import pretty END_OF_TOKENS = '<END>' ERROR_SYMBOL = '$error$' DEFAULT_INITIAL_CONDITION = 'INITIAL' class LanguageError(ValueError): class ScannerBlocked(LanguageError): def __init__(self, position, condition): super().__init__(position, condition) self.position, self....
true
true
f728c75bcb4c38d6a6148828f54657f473212313
4,460
py
Python
experiments.py
carlo-/RNNet
995fcce1da58ac2c840afd865bde88d11d81006f
[ "MIT" ]
null
null
null
experiments.py
carlo-/RNNet
995fcce1da58ac2c840afd865bde88d11d81006f
[ "MIT" ]
null
null
null
experiments.py
carlo-/RNNet
995fcce1da58ac2c840afd865bde88d11d81006f
[ "MIT" ]
null
null
null
# # KTH Royal Institute of Technology # DD2424: Deep Learning in Data Science # Assignment 4 # # Carlo Rapisarda (carlora@kth.se) # import numpy as np import matplotlib.pyplot as plt import dataset as dt from os.path import exists from model import RNNet from utilities import compute_grads_numerical, compare_grads, un...
28.407643
106
0.673318
import numpy as np import matplotlib.pyplot as plt import dataset as dt from os.path import exists from model import RNNet from utilities import compute_grads_numerical, compare_grads, unpickle, pickle, eprint, simple_smooth_1d GOBLET_RESULTS_PATH = '../goblet_results.pkl' def check_gradients(): book = ...
true
true
f728c871ef2519e02ec712ca36350b7b9e405031
3,468
py
Python
mysite/settings.py
forfrt/Gelato
fde9cde624658d7168ce56e3606ee9749ad84ac2
[ "Apache-2.0" ]
null
null
null
mysite/settings.py
forfrt/Gelato
fde9cde624658d7168ce56e3606ee9749ad84ac2
[ "Apache-2.0" ]
null
null
null
mysite/settings.py
forfrt/Gelato
fde9cde624658d7168ce56e3606ee9749ad84ac2
[ "Apache-2.0" ]
null
null
null
""" Django settings for mysite project. Generated by 'django-admin startproject' using Django 2.1.5. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os # ...
25.5
91
0.673587
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '&b^mo7i6ep+h^j^)(5+h%t4yt!kj$u$(^=fho=)*dl88=cnr@f' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f728c8790e5b7d441572fd6b0eced63c85fbe802
3,383
py
Python
setup.py
Limych/python-beward
2144f9cd3d99120b5598e09db430df4c87724236
[ "MIT" ]
null
null
null
setup.py
Limych/python-beward
2144f9cd3d99120b5598e09db430df4c87724236
[ "MIT" ]
null
null
null
setup.py
Limych/python-beward
2144f9cd3d99120b5598e09db430df4c87724236
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Library module setup.""" import re import sys from setuptools import find_packages, setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): """PyTest controller.""" # Code from here: # https://docs.pytest.org/en/latest/goodpractices.html#manual-...
29.938053
78
0.652971
import re import sys from setuptools import find_packages, setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): lize_options(self): TestCommand.finalize_options(self) self.test_args = ["-m", "not integration"] self.test_suite = True ...
true
true
f728c8b37d5cb62dc2dc83e99271ab7475335ffc
797
py
Python
biochallenge/apps/challenge/migrations/0002_auto_20190904_0809.py
coolmaksat/biochallenge
792e5ad6d4e2d51017219df67c3f4eb7174e8eb6
[ "BSD-2-Clause" ]
null
null
null
biochallenge/apps/challenge/migrations/0002_auto_20190904_0809.py
coolmaksat/biochallenge
792e5ad6d4e2d51017219df67c3f4eb7174e8eb6
[ "BSD-2-Clause" ]
15
2019-09-04T07:49:40.000Z
2022-02-10T11:31:17.000Z
biochallenge/apps/challenge/migrations/0002_auto_20190904_0809.py
coolmaksat/biochallenge
792e5ad6d4e2d51017219df67c3f4eb7174e8eb6
[ "BSD-2-Clause" ]
1
2019-09-03T03:31:28.000Z
2019-09-03T03:31:28.000Z
# Generated by Django 2.2.5 on 2019-09-04 08:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('challenge', '0001_initial'), ] operations = [ migrations.AddField( model_name='release', name='sparql_endpoint', ...
25.709677
66
0.570891
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('challenge', '0001_initial'), ] operations = [ migrations.AddField( model_name='release', name='sparql_endpoint', field=models.CharField(default='aaa', ...
true
true
f728c9b398e39d694a16f78ea0a8e8989f2a0b89
527
py
Python
scripts/create_cell_data.py
cleopatra-itn/GOAL
73809a755157fc9e51278b7fd246d13d19e2ab59
[ "MIT" ]
null
null
null
scripts/create_cell_data.py
cleopatra-itn/GOAL
73809a755157fc9e51278b7fd246d13d19e2ab59
[ "MIT" ]
12
2020-07-07T18:02:28.000Z
2022-03-12T00:40:03.000Z
scripts/create_cell_data.py
cleopatra-itn/GOAL
73809a755157fc9e51278b7fd246d13d19e2ab59
[ "MIT" ]
1
2020-10-22T09:07:08.000Z
2020-10-22T09:07:08.000Z
import os import json from glob import glob from pathlib import Path ROOT_PATH = Path(os.path.dirname(__file__)).parent # iterate through data files raw_data = json.load(open(f'{ROOT_PATH}/data/raw/raw_data.json')) cell_coord = {} for k, v in raw_data.items(): if v['coordinates_class'] not in cell_coord: ...
29.277778
73
0.732448
import os import json from glob import glob from pathlib import Path ROOT_PATH = Path(os.path.dirname(__file__)).parent raw_data = json.load(open(f'{ROOT_PATH}/data/raw/raw_data.json')) cell_coord = {} for k, v in raw_data.items(): if v['coordinates_class'] not in cell_coord: cell_coord[str(v['coordinat...
true
true
f728ca46394162c18ca5039e6ed4befa7596c6a8
15,328
py
Python
video_level_code/xp_frame_level_models.py
mpekalski/Y8M
24b61107a0f482fdb36ab8b15b768cea24e5808a
[ "Apache-2.0" ]
32
2017-06-16T06:12:40.000Z
2021-09-19T17:22:02.000Z
video_level_code/xp_frame_level_models.py
Kimilovesy/Y8M
24b61107a0f482fdb36ab8b15b768cea24e5808a
[ "Apache-2.0" ]
1
2018-05-21T07:52:04.000Z
2018-05-21T07:52:04.000Z
video_level_code/xp_frame_level_models.py
Kimilovesy/Y8M
24b61107a0f482fdb36ab8b15b768cea24e5808a
[ "Apache-2.0" ]
13
2017-06-11T16:45:48.000Z
2019-12-13T15:04:45.000Z
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
39.002545
85
0.663035
import math import models import video_level_models import tensorflow as tf import model_utils as utils import tensorflow.contrib.slim as slim from tensorflow import flags from tensorflow import logging FLAGS = flags.FLAGS class RangeLogisticModel(models.BaseModel): def create_model(self, model_in...
true
true
f728ca47b3ece41fdc86cad4bcc6bb0bd696850c
4,814
py
Python
ForgeBlog/forgeblog/tests/test_commands.py
99Kies/allura
745ab3c5a9bd287b365b699bd38ef94650afc32e
[ "Apache-2.0" ]
1
2021-12-09T21:52:12.000Z
2021-12-09T21:52:12.000Z
ForgeBlog/forgeblog/tests/test_commands.py
99Kies/allura
745ab3c5a9bd287b365b699bd38ef94650afc32e
[ "Apache-2.0" ]
null
null
null
ForgeBlog/forgeblog/tests/test_commands.py
99Kies/allura
745ab3c5a9bd287b365b699bd38ef94650afc32e
[ "Apache-2.0" ]
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 (t...
35.397059
115
0.645825
from __future__ import unicode_literals from __future__ import absolute_import from datetime import datetime, timedelta from tg import app_globals as g from datadiff.tools import assert_equal from IPython.testing.decorators import module_not_available, skipif import pkg_resources import mock import fee...
true
true
f728cae8d089e59f933fd28ab320f6164d185da9
2,480
py
Python
decoder.py
MaZhanyu007/MSDGAN
037ad33025c29869dbc9cb233a45b8762d31179d
[ "MIT" ]
8
2018-06-04T13:38:35.000Z
2021-05-28T08:42:39.000Z
decoder.py
MaZhanyu007/MSDGAN
037ad33025c29869dbc9cb233a45b8762d31179d
[ "MIT" ]
null
null
null
decoder.py
MaZhanyu007/MSDGAN
037ad33025c29869dbc9cb233a45b8762d31179d
[ "MIT" ]
2
2019-01-15T02:12:22.000Z
2021-08-08T10:35:50.000Z
#!/usr/bin/env python # coding: utf-8 # In[1]: import torch import torch.nn as nn import torch.nn.functional as F # In[2]: class Decoder(nn.Module): def __init__(self, output_dim, emb_dim, enc_hid_dim, dec_hid_dim, dropout_rate, attention): super().__init__() self.output_dim = output...
34.929577
95
0.602016
import torch import torch.nn as nn import torch.nn.functional as F class Decoder(nn.Module): def __init__(self, output_dim, emb_dim, enc_hid_dim, dec_hid_dim, dropout_rate, attention): super().__init__() self.output_dim = output_dim self.emb_dim = emb_dim self.enc...
true
true
f728cbd493181dd21158048ab66c126c7e93eb52
271
py
Python
tests/artificial/transf_Difference/trend_Lag1Trend/cycle_30/ar_/test_artificial_128_Difference_Lag1Trend_30__20.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/artificial/transf_Difference/trend_Lag1Trend/cycle_30/ar_/test_artificial_128_Difference_Lag1Trend_30__20.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/artificial/transf_Difference/trend_Lag1Trend/cycle_30/ar_/test_artificial_128_Difference_Lag1Trend_30__20.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 30, transform = "Difference", sigma = 0.0, exog_count = 20, ar_order = 0);
38.714286
166
0.734317
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 30, transform = "Difference", sigma = 0.0, exog_count = 20, ar_order = 0);
true
true
f728cbe29fe970f9a50eb70f3297589d9896dc90
18,663
py
Python
corehq/apps/accounting/migrations/0005_auto__chg_field_invoice_date_created__chg_field_featurerate_date_creat.py
dslowikowski/commcare-hq
ad8885cf8dab69dc85cb64f37aeaf06106124797
[ "BSD-3-Clause" ]
1
2015-02-10T23:26:39.000Z
2015-02-10T23:26:39.000Z
corehq/apps/accounting/migrations/0005_auto__chg_field_invoice_date_created__chg_field_featurerate_date_creat.py
SEL-Columbia/commcare-hq
992ee34a679c37f063f86200e6df5a197d5e3ff6
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/accounting/migrations/0005_auto__chg_field_invoice_date_created__chg_field_featurerate_date_creat.py
SEL-Columbia/commcare-hq
992ee34a679c37f063f86200e6df5a197d5e3ff6
[ "BSD-3-Clause" ]
null
null
null
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Invoice.date_created' db.alter_column(u'accounting_invoice', 'date_created', self.gf('dj...
76.487705
176
0.595778
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.alter_column(u'accounting_invoice', 'date_created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True)...
true
true
f728cbf9eae1c2d10f23f415ed861466f2e9d67e
1,772
py
Python
jobs/migrations/0011_jobreviewcomment.py
buketkonuk/pythondotorg
4d8d9728eea7c7b2fef32eb6f24fda409cf24a06
[ "Apache-2.0" ]
1
2019-09-02T00:43:27.000Z
2019-09-02T00:43:27.000Z
jobs/migrations/0011_jobreviewcomment.py
buketkonuk/pythondotorg
4d8d9728eea7c7b2fef32eb6f24fda409cf24a06
[ "Apache-2.0" ]
null
null
null
jobs/migrations/0011_jobreviewcomment.py
buketkonuk/pythondotorg
4d8d9728eea7c7b2fef32eb6f24fda409cf24a06
[ "Apache-2.0" ]
1
2019-09-02T00:51:38.000Z
2019-09-02T00:51:38.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import markupfield.fields import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODE...
47.891892
230
0.645598
from __future__ import unicode_literals from django.db import models, migrations import markupfield.fields import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('jobs', '0...
true
true
f728cc0fc288f09ecb77a715285a788cdae8416c
2,286
py
Python
package/data/datasets/cuhk03_np_detected_jpg.py
MikeCun/PersonReID
9c7c122212410f79edc2b5582ed75e8a727ea88a
[ "MIT" ]
1
2020-08-28T05:54:39.000Z
2020-08-28T05:54:39.000Z
package/data/datasets/cuhk03_np_detected_jpg.py
MikeCun/PersonReID
9c7c122212410f79edc2b5582ed75e8a727ea88a
[ "MIT" ]
6
2020-06-05T20:45:43.000Z
2022-03-11T23:45:39.000Z
package/data/datasets/cuhk03_np_detected_jpg.py
MikeCun/PersonReID
9c7c122212410f79edc2b5582ed75e8a727ea88a
[ "MIT" ]
null
null
null
import os.path as osp from PIL import Image import numpy as np from scipy.misc import imsave from tqdm import tqdm import shutil from ...utils.file import walkdir from ...utils.file import may_make_dir from .market1501 import Market1501 class CUHK03NpDetectedJpg(Market1501): has_pap_mask = True has_ps_label =...
43.961538
136
0.654418
import os.path as osp from PIL import Image import numpy as np from scipy.misc import imsave from tqdm import tqdm import shutil from ...utils.file import walkdir from ...utils.file import may_make_dir from .market1501 import Market1501 class CUHK03NpDetectedJpg(Market1501): has_pap_mask = True has_ps_label =...
true
true
f728ccac088840d001707593dd1b8230a93eeb2a
29
py
Python
learn/python/module/Tadd/add.py
zhmz90/Daily
25e13f6334c58d3a075b3fc502ecb34832392be7
[ "MIT" ]
null
null
null
learn/python/module/Tadd/add.py
zhmz90/Daily
25e13f6334c58d3a075b3fc502ecb34832392be7
[ "MIT" ]
25
2016-01-03T14:23:44.000Z
2016-03-05T07:34:40.000Z
learn/python/module/Tadd/add.py
zhmz90/Daily
25e13f6334c58d3a075b3fc502ecb34832392be7
[ "MIT" ]
null
null
null
def add(x,y): return x+y
9.666667
14
0.551724
def add(x,y): return x+y
true
true