hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f77baa3094195a608b08c02186330fd47b5c8750
2,571
py
Python
src/petronia/defimpl/timer/tests/timer_test.py
groboclown/petronia
486338023d19cee989e92f0c5692680f1a37811f
[ "MIT" ]
19
2017-06-21T10:28:24.000Z
2021-12-31T11:49:28.000Z
src/petronia/defimpl/timer/tests/timer_test.py
groboclown/petronia
486338023d19cee989e92f0c5692680f1a37811f
[ "MIT" ]
10
2016-11-11T18:57:57.000Z
2021-02-01T15:33:43.000Z
src/petronia/defimpl/timer/tests/timer_test.py
groboclown/petronia
486338023d19cee989e92f0c5692680f1a37811f
[ "MIT" ]
3
2017-09-17T03:29:35.000Z
2019-06-03T10:43:08.000Z
""" Tests for the timer impl extension """ import unittest import threading from typing import List, Callable from ....base import EventBus from ....boot.bootstrap.bus import bootstrap_event_bus from ....core.timer.api.bootstrap import bootstrap_timer_api from ....core.state.api.events import EVENT_ID_UPDATED_STATE, ...
32.1375
84
0.65072
import unittest import threading from typing import List, Callable from ....base import EventBus from ....boot.bootstrap.bus import bootstrap_event_bus from ....core.timer.api.bootstrap import bootstrap_timer_api from ....core.state.api.events import EVENT_ID_UPDATED_STATE, StateStoreUpdatedEvent from ....core.state....
true
true
f77baa715d85911de76a622fd35d9d57d404fc47
539
py
Python
keras_contrib/backend/numpy_backend.py
HaemanthSP/keras-contrib
f183ff70afb0450475b9d0381d4b9c7c07941fbc
[ "MIT" ]
1
2020-09-15T10:00:05.000Z
2020-09-15T10:00:05.000Z
keras_contrib/backend/numpy_backend.py
HaemanthSP/keras-contrib
f183ff70afb0450475b9d0381d4b9c7c07941fbc
[ "MIT" ]
null
null
null
keras_contrib/backend/numpy_backend.py
HaemanthSP/keras-contrib
f183ff70afb0450475b9d0381d4b9c7c07941fbc
[ "MIT" ]
2
2020-07-24T07:59:46.000Z
2021-02-07T16:25:35.000Z
import numpy as np from tensorflow.keras import backend as K def extract_image_patches(X, ksizes, strides, padding='valid', data_format='channels_first'): raise NotImplementedError def depth_to_space(input, scale, data_format=None): raise NotImplementedErr...
28.368421
65
0.686456
import numpy as np from tensorflow.keras import backend as K def extract_image_patches(X, ksizes, strides, padding='valid', data_format='channels_first'): raise NotImplementedError def depth_to_space(input, scale, data_format=None): raise NotImplementedErr...
true
true
f77baba36c172e50acd4eef24b861e8ca25d9cd1
464
py
Python
ex48/skeleton/skeleton/setup.py
Ma-Min-Min/python-exercises
1b0d63456d88b4750f89821782812becf4177375
[ "MIT" ]
null
null
null
ex48/skeleton/skeleton/setup.py
Ma-Min-Min/python-exercises
1b0d63456d88b4750f89821782812becf4177375
[ "MIT" ]
null
null
null
ex48/skeleton/skeleton/setup.py
Ma-Min-Min/python-exercises
1b0d63456d88b4750f89821782812becf4177375
[ "MIT" ]
null
null
null
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'My Project', 'author': 'My Name', 'url': 'URL to get it at.', 'download_url': 'Where to download it.', 'author_email': 'My email.', 'version': '0.1', ...
24.421053
48
0.534483
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'My Project', 'author': 'My Name', 'url': 'URL to get it at.', 'download_url': 'Where to download it.', 'author_email': 'My email.', 'version': '0.1', ...
true
true
f77bac78c4d68d3f0c66622f87f9ff693455d4f0
31,901
py
Python
electrum/gui/qt/util.py
Huynhanh883/electrum
5773097b085e5fa1993505aec63318138dc409bd
[ "MIT" ]
2
2019-11-10T11:21:20.000Z
2021-07-05T01:28:33.000Z
electrum/gui/qt/util.py
Huynhanh883/electrum
5773097b085e5fa1993505aec63318138dc409bd
[ "MIT" ]
null
null
null
electrum/gui/qt/util.py
Huynhanh883/electrum
5773097b085e5fa1993505aec63318138dc409bd
[ "MIT" ]
null
null
null
import asyncio import os.path import time import sys import platform import queue import traceback import os import webbrowser from functools import partial, lru_cache from typing import NamedTuple, Callable, Optional, TYPE_CHECKING, Union, List, Dict from PyQt5.QtGui import (QFont, QColor, QCursor, QPixmap, QStandar...
34.979167
124
0.630012
import asyncio import os.path import time import sys import platform import queue import traceback import os import webbrowser from functools import partial, lru_cache from typing import NamedTuple, Callable, Optional, TYPE_CHECKING, Union, List, Dict from PyQt5.QtGui import (QFont, QColor, QCursor, QPixmap, QStandar...
true
true
f77badda9f79c4b2f43c096eea6f0e15d4956aba
65
py
Python
covid_xrays/app/models/__init__.py
hosamshahin/covid_xrays
3f5aa6f7bd8522a8b1c083a3514216d47f96a0d4
[ "MIT" ]
1
2020-11-19T02:38:42.000Z
2020-11-19T02:38:42.000Z
covid_xrays/app/models/__init__.py
hosamshahin/covid_xrays
3f5aa6f7bd8522a8b1c083a3514216d47f96a0d4
[ "MIT" ]
null
null
null
covid_xrays/app/models/__init__.py
hosamshahin/covid_xrays
3f5aa6f7bd8522a8b1c083a3514216d47f96a0d4
[ "MIT" ]
1
2021-01-09T19:45:56.000Z
2021-01-09T19:45:56.000Z
from .users import User, Permission from .logs import save_access
32.5
35
0.830769
from .users import User, Permission from .logs import save_access
true
true
f77bae2d679cba172fec1914430635d2740ad374
1,264
py
Python
examples/example_disconnect.py
marvin-w/xknx
9f8b80fa0906a345c7def519ac3c92c955990a26
[ "MIT" ]
null
null
null
examples/example_disconnect.py
marvin-w/xknx
9f8b80fa0906a345c7def519ac3c92c955990a26
[ "MIT" ]
1
2019-01-06T11:40:16.000Z
2019-01-06T11:40:16.000Z
examples/example_disconnect.py
marvin-w/xknx
9f8b80fa0906a345c7def519ac3c92c955990a26
[ "MIT" ]
null
null
null
"""Example on how to disconnect/reset all available tunneling channels.""" import asyncio from xknx import XKNX from xknx.io import ConnectionState, Disconnect, GatewayScanner, UDPClient async def main(): """Search for a Tunnelling device, walk through all possible channels and disconnect them.""" xknx = XKN...
26.333333
97
0.679589
import asyncio from xknx import XKNX from xknx.io import ConnectionState, Disconnect, GatewayScanner, UDPClient async def main(): xknx = XKNX() gatewayscanner = GatewayScanner(xknx) gateways = await gatewayscanner.scan() if not gateways: print("No Gateways found") return gateway...
true
true
f77bae2e07085de5a2ad7deb62f0923281d4e0ad
4,771
py
Python
userbot/modules/blacklist.py
im-bb/CyberUserBot
945c2d6a4c05b11592611b2451a7cf15a40c3530
[ "MIT" ]
2
2021-09-24T06:19:40.000Z
2021-09-30T12:24:56.000Z
userbot/modules/blacklist.py
im-bb/CyberUserBot
945c2d6a4c05b11592611b2451a7cf15a40c3530
[ "MIT" ]
null
null
null
userbot/modules/blacklist.py
im-bb/CyberUserBot
945c2d6a4c05b11592611b2451a7cf15a40c3530
[ "MIT" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # # TheCyberUserBot - Luciferxz import io import re import userbot.modules.sql_helper.blacklist_sql as sql from userbo...
36.984496
175
0.611612
import io import re import userbot.modules.sql_helper.blacklist_sql as sql from userbot import CMD_HELP from userbot.events import register from requests import get from userbot.cmdhelp import CmdHelp from userbot.language import get_value LANG = get_value("blacklist") KUFURLER = get('https://raw.githubuserconte...
true
true
f77baf08feb5317b49a79ca505dcace937c70ff2
9,142
py
Python
deepr/jobs/optimize_saved_model.py
Jasputtar/deepr
e887a3b2c55e7e760ca61f8c99978a8284834ac8
[ "Apache-2.0" ]
null
null
null
deepr/jobs/optimize_saved_model.py
Jasputtar/deepr
e887a3b2c55e7e760ca61f8c99978a8284834ac8
[ "Apache-2.0" ]
null
null
null
deepr/jobs/optimize_saved_model.py
Jasputtar/deepr
e887a3b2c55e7e760ca61f8c99978a8284834ac8
[ "Apache-2.0" ]
null
null
null
"""Converts SavedModel into an optimized protobuf for inference""" from dataclasses import dataclass, field import logging import re from typing import List, Dict, Iterable, Union import tensorflow as tf from tensorflow.python.tools.freeze_graph import freeze_graph_with_def_protos from tensorflow.python.framework.gra...
38.411765
116
0.651717
from dataclasses import dataclass, field import logging import re from typing import List, Dict, Iterable, Union import tensorflow as tf from tensorflow.python.tools.freeze_graph import freeze_graph_with_def_protos from tensorflow.python.framework.graph_util import extract_sub_graph from deepr.io import Path from de...
true
true
f77baf2322e74066e5dc85abaccf437de525c52f
108
py
Python
lasier/adapters/caches/__init__.py
rafa-acioly/lasier
b518f93207ff15ba32b286f466f3ca3cea231b4c
[ "MIT" ]
null
null
null
lasier/adapters/caches/__init__.py
rafa-acioly/lasier
b518f93207ff15ba32b286f466f3ca3cea231b4c
[ "MIT" ]
null
null
null
lasier/adapters/caches/__init__.py
rafa-acioly/lasier
b518f93207ff15ba32b286f466f3ca3cea231b4c
[ "MIT" ]
null
null
null
from .aiocache import Adapter as AiocacheAdapter # noqa from .redis import Adapter as RedisAdapter # noqa
36
56
0.796296
from .aiocache import Adapter as AiocacheAdapter from .redis import Adapter as RedisAdapter
true
true
f77baf4eaf31cc4d408063e61dd6138ef236d8c3
819
py
Python
lkmltools/linter/rules/filerules/data_source_rule.py
m-deck/lookml-tools
26c4194a76e0d69f9d555b642926b61171d9aaf1
[ "Apache-2.0" ]
73
2019-06-10T20:28:36.000Z
2022-03-04T03:13:23.000Z
lkmltools/linter/rules/filerules/data_source_rule.py
mborukhava/lookml-tools
cded1fd6a916cedebfd4a5b21993ce117a4a1a11
[ "Apache-2.0" ]
6
2019-06-11T14:21:39.000Z
2019-10-19T18:11:57.000Z
lkmltools/linter/rules/filerules/data_source_rule.py
mborukhava/lookml-tools
cded1fd6a916cedebfd4a5b21993ce117a4a1a11
[ "Apache-2.0" ]
14
2019-06-19T18:09:52.000Z
2022-01-03T20:17:33.000Z
''' A data source rule Authors: Carl Anderson (carl.anderson@weightwatchers.com) ''' from lkmltools.linter.rule import Rule class DataSourceRule(Rule): ''' does source contain a sql_table_name or derived_table? ''' def run(self, lookml): '''does source contain a sql_ta...
24.088235
75
0.576313
from lkmltools.linter.rule import Rule class DataSourceRule(Rule): def run(self, lookml): if not lookml.has_views(): return False, None v = lookml.views()[0] if 'sql_table_name' in v or 'derived_table' in v: return True, True return True, False
true
true
f77bafb7e16fdfcebba1e076bd84b8b996732a6a
6,319
py
Python
Auctions/Digital Marketplace/expected_prices/expected_prices.py
kubkon/Phd-python
5dccd6a107204a3b196e42205e691025539311aa
[ "MIT", "Unlicense" ]
null
null
null
Auctions/Digital Marketplace/expected_prices/expected_prices.py
kubkon/Phd-python
5dccd6a107204a3b196e42205e691025539311aa
[ "MIT", "Unlicense" ]
null
null
null
Auctions/Digital Marketplace/expected_prices/expected_prices.py
kubkon/Phd-python
5dccd6a107204a3b196e42205e691025539311aa
[ "MIT", "Unlicense" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ expected_prices.py Created by Jakub Konka on 2012-10-13. Copyright (c) 2012 University of Strathclyde. All rights reserved. """ import argparse import csv import matplotlib import matplotlib.pyplot as plt from matplotlib import rc import numpy as np import os import progress...
41.300654
135
0.580788
import argparse import csv import matplotlib import matplotlib.pyplot as plt from matplotlib import rc import numpy as np import os import progressbar as pb import scipy.stats as stats import warnings warnings.simplefilter("ignore", RuntimeWarning) widgets = ['Calculating: ', pb.Percentage(), pb.Bar(marker=pb.Rotating...
true
true
f77bb182ebdfb6ac17514ca98dd5910927c0c624
1,770
py
Python
amx_control.py
jack-h/amx_control
47e286769da754e3451405f070e1d44a207ab498
[ "BSD-2-Clause" ]
null
null
null
amx_control.py
jack-h/amx_control
47e286769da754e3451405f070e1d44a207ab498
[ "BSD-2-Clause" ]
null
null
null
amx_control.py
jack-h/amx_control
47e286769da754e3451405f070e1d44a207ab498
[ "BSD-2-Clause" ]
null
null
null
import telnetlib import time OK = 0 ERROR = 1 RESPONSE_DELAY_MS = 100 class AMXNMX(object): def __init__(self, host, port=50002, response_delay_ms=RESPONSE_DELAY_MS): self.conn = telnetlib.Telnet(host, port=port) self.response_delay_sec = response_delay_ms / 1000. self._initialize() ...
27.230769
81
0.627119
import telnetlib import time OK = 0 ERROR = 1 RESPONSE_DELAY_MS = 100 class AMXNMX(object): def __init__(self, host, port=50002, response_delay_ms=RESPONSE_DELAY_MS): self.conn = telnetlib.Telnet(host, port=port) self.response_delay_sec = response_delay_ms / 1000. self._initialize() ...
true
true
f77bb1b886e8bd0a1deebf8ae2af1cbae57f6593
15,206
py
Python
.history/src/Simulador_20200712172903.py
eduardodut/Trabalho_final_estatistica_cd
fbedbbea6bdd7a79e1d62030cde0fab4e93fc338
[ "MIT" ]
null
null
null
.history/src/Simulador_20200712172903.py
eduardodut/Trabalho_final_estatistica_cd
fbedbbea6bdd7a79e1d62030cde0fab4e93fc338
[ "MIT" ]
null
null
null
.history/src/Simulador_20200712172903.py
eduardodut/Trabalho_final_estatistica_cd
fbedbbea6bdd7a79e1d62030cde0fab4e93fc338
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from Matriz_esferica import Matriz_esferica from Individuo import Individuo, Fabrica_individuo import random from itertools import permutations import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from scipy.sparse import csr_matrix, lil_matrix import math...
40.766756
160
0.657109
import pandas as pd import numpy as np from Matriz_esferica import Matriz_esferica from Individuo import Individuo, Fabrica_individuo import random from itertools import permutations import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from scipy.sparse import csr_matrix, lil_matrix import math...
true
true
f77bb399102b93df3a9de71d385948cb8a2c5f0b
6,406
py
Python
src/boondh/utils/arrange_files.py
rohit-mehra/boondh
a9662a7dccdb3c0aa3fbe8bc972e4e089018c4a8
[ "MIT" ]
null
null
null
src/boondh/utils/arrange_files.py
rohit-mehra/boondh
a9662a7dccdb3c0aa3fbe8bc972e4e089018c4a8
[ "MIT" ]
null
null
null
src/boondh/utils/arrange_files.py
rohit-mehra/boondh
a9662a7dccdb3c0aa3fbe8bc972e4e089018c4a8
[ "MIT" ]
null
null
null
import logging from os import listdir from os.path import isfile, join, isdir, dirname import os import shutil from tqdm import tqdm from typing import Dict, List class ManageDir: """Commonly used directory functions to manage a directory.""" suffix = "_" @staticmethod def assert_file_exists(file_pa...
31.712871
90
0.591945
import logging from os import listdir from os.path import isfile, join, isdir, dirname import os import shutil from tqdm import tqdm from typing import Dict, List class ManageDir: suffix = "_" @staticmethod def assert_file_exists(file_path: str) -> None: dir = dirname(file_path) assert d...
true
true
f77bb406dbbbe8356c50f25f55b0a9d6972b51e1
2,561
py
Python
test/integration/src/config.py
exec-helper/source
8869989a59b352f340406ae8859958bf343be776
[ "BSD-3-Clause" ]
1
2020-01-28T13:24:30.000Z
2020-01-28T13:24:30.000Z
test/integration/src/config.py
exec-helper/source
8869989a59b352f340406ae8859958bf343be776
[ "BSD-3-Clause" ]
null
null
null
test/integration/src/config.py
exec-helper/source
8869989a59b352f340406ae8859958bf343be776
[ "BSD-3-Clause" ]
1
2018-07-03T11:11:19.000Z
2018-07-03T11:11:19.000Z
from pathlib import Path import os import yaml import command class Config(object): def __init__(self, directory, filename = '.exec-helper'): self._settings_file = Path(directory).joinpath(filename) self._directory = directory self._commands = dict() self._patterns = set() ...
30.488095
110
0.623194
from pathlib import Path import os import yaml import command class Config(object): def __init__(self, directory, filename = '.exec-helper'): self._settings_file = Path(directory).joinpath(filename) self._directory = directory self._commands = dict() self._patterns = set() ...
true
true
f77bb4a5bc01c676e59d10414b2896216664c221
3,365
py
Python
changedes.py
itheodoridis/nornirchangewandes
7131c66065644bbc33159611636cd8152b76ee32
[ "MIT" ]
6
2019-06-03T10:11:44.000Z
2020-11-01T14:58:16.000Z
changedes.py
itheodoridis/nornirchangewandes
7131c66065644bbc33159611636cd8152b76ee32
[ "MIT" ]
null
null
null
changedes.py
itheodoridis/nornirchangewandes
7131c66065644bbc33159611636cd8152b76ee32
[ "MIT" ]
1
2020-01-15T11:34:29.000Z
2020-01-15T11:34:29.000Z
from netmiko import ConnectHandler, ssh_exception from paramiko.ssh_exception import SSHException import os import sys import subprocess import openpyxl import ipdb from nornir import InitNornir from nornir.plugins.tasks import networking from nornir.plugins.functions.text import print_result from nornir.pl...
39.588235
146
0.707578
from netmiko import ConnectHandler, ssh_exception from paramiko.ssh_exception import SSHException import os import sys import subprocess import openpyxl import ipdb from nornir import InitNornir from nornir.plugins.tasks import networking from nornir.plugins.functions.text import print_result from nornir.pl...
true
true
f77bb4e940a2a37626788b3c78ed45ea82c78a96
3,306
py
Python
tests/src/Semester/check_semester_choose_district_block.py
JalajaTR/cQube
6bf58ab25f0c36709630987ab730bbd5d9192c03
[ "MIT" ]
null
null
null
tests/src/Semester/check_semester_choose_district_block.py
JalajaTR/cQube
6bf58ab25f0c36709630987ab730bbd5d9192c03
[ "MIT" ]
null
null
null
tests/src/Semester/check_semester_choose_district_block.py
JalajaTR/cQube
6bf58ab25f0c36709630987ab730bbd5d9192c03
[ "MIT" ]
null
null
null
import csv import os import re import time from selenium.webdriver.support.select import Select from Data.parameters import Data from filenames import file_extention from get_dir import pwd from reuse_func import GetData class DistrictsBlock(): def __init__(self, driver): self.driver = driver def ...
45.916667
172
0.53902
import csv import os import re import time from selenium.webdriver.support.select import Select from Data.parameters import Data from filenames import file_extention from get_dir import pwd from reuse_func import GetData class DistrictsBlock(): def __init__(self, driver): self.driver = driver def ...
true
true
f77bb55293d6d02515fb2b3eb4f94a88a08a28c4
5,011
py
Python
src/common.py
TeaM-TL/FotoKilof
e3a78070fa084b71f0a28773ab1f3fae4d493691
[ "MIT" ]
86
2019-09-10T07:07:47.000Z
2022-03-29T19:24:52.000Z
src/common.py
TeaM-TL/FotoKilof
e3a78070fa084b71f0a28773ab1f3fae4d493691
[ "MIT" ]
117
2019-10-02T13:21:18.000Z
2022-03-10T18:23:06.000Z
src/common.py
TeaM-TL/FotoKilof
e3a78070fa084b71f0a28773ab1f3fae4d493691
[ "MIT" ]
11
2019-10-03T13:04:32.000Z
2022-01-26T23:19:25.000Z
# -*- coding: utf-8 -*- """ Copyright (c) 2019-2021 Tomasz Łuczak, TeaM-TL Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, cop...
31.515723
113
0.618639
import fnmatch import os import re import mswindows def humansize(nbytes): suffixes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'] i = 0 while nbytes >= 1024 and i < len(suffixes)-1: nbytes /= 1024. i += 1 value = ('%.2f' % nbytes).rstrip('0').rstrip('.') return '%s %s' % (value, suffixe...
true
true
f77bb6a1231b763b2308e49f46de346ccd47946e
1,386
py
Python
zilencer/management/commands/compare_messages.py
dehnert/zulip
f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5
[ "Apache-2.0" ]
null
null
null
zilencer/management/commands/compare_messages.py
dehnert/zulip
f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5
[ "Apache-2.0" ]
null
null
null
zilencer/management/commands/compare_messages.py
dehnert/zulip
f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function from typing import Any from six.moves import zip import ijson from django.core.management.base import BaseCommand, CommandParser class Command(BaseCommand): help = """ Render messages to a file. Usage: python manage.py render_...
36.473684
88
0.606061
from __future__ import absolute_import from __future__ import print_function from typing import Any from six.moves import zip import ijson from django.core.management.base import BaseCommand, CommandParser class Command(BaseCommand): help = """ Render messages to a file. Usage: python manage.py render_...
true
true
f77bb6ac2e3eff6494f11e4fd553b2b39fa31764
2,491
py
Python
crypto_wallet.py
ryanschwarting/Blockchain-Wallets-Streamlit
be51a62ac165ce76aa7617163f76cee293378c39
[ "ADSL" ]
1
2022-01-20T20:50:21.000Z
2022-01-20T20:50:21.000Z
crypto_wallet.py
ryanschwarting/Blockchain-Wallets-Streamlit
be51a62ac165ce76aa7617163f76cee293378c39
[ "ADSL" ]
null
null
null
crypto_wallet.py
ryanschwarting/Blockchain-Wallets-Streamlit
be51a62ac165ce76aa7617163f76cee293378c39
[ "ADSL" ]
null
null
null
# Cryptocurrency Wallet ################################################################################ # This file contains the Ethereum transaction functions that you have created throughout this module’s lessons. By using import statements, you will integrate this `crypto_wallet.py` Python script into the Finte...
33.662162
286
0.630269
import os import requests from dotenv import load_dotenv load_dotenv() from bip44 import Wallet from web3 import Account from web3 import middleware from web3.gas_strategies.time_based import medium_gas_price_strategy def generate_account(): mnemonic = os.getenv("MNEMONIC") wallet = ...
true
true
f77bb6b7714fde35200c4fd5837ebc59b6a5fe2f
7,764
py
Python
data_steward/tools/fitbit/generate_fitbit_dataset.py
dcarbone/curation
68f9ba9466646d73509d424567b64566856fb8e8
[ "MIT" ]
1
2019-03-18T18:22:41.000Z
2019-03-18T18:22:41.000Z
data_steward/tools/fitbit/generate_fitbit_dataset.py
nishanthpp93/curation
ac9f38b2f4580ae806121dd929293159132c7d2a
[ "MIT" ]
null
null
null
data_steward/tools/fitbit/generate_fitbit_dataset.py
nishanthpp93/curation
ac9f38b2f4580ae806121dd929293159132c7d2a
[ "MIT" ]
1
2021-09-16T14:25:19.000Z
2021-09-16T14:25:19.000Z
""" Generate and clean fitbit dataset """ import logging from argparse import ArgumentParser, RawDescriptionHelpFormatter from google.cloud.bigquery import Table from cdr_cleaner import clean_cdr, args_parser from common import FITBIT_TABLES, JINJA_ENV from utils import auth, bq, pipeline_logging from constants.cdr_c...
36.796209
96
0.607805
import logging from argparse import ArgumentParser, RawDescriptionHelpFormatter from google.cloud.bigquery import Table from cdr_cleaner import clean_cdr, args_parser from common import FITBIT_TABLES, JINJA_ENV from utils import auth, bq, pipeline_logging from constants.cdr_cleaner import clean_cdr as consts LOGGER ...
true
true
f77bb783de15bc344f4323323e8713c700faeef1
327
py
Python
src/pcc/api/instance/stop_all_instance.py
ymstmsys/pcc-cli
8805ecaa39c99092352e22986fbf7dba9bac4efb
[ "Apache-2.0" ]
null
null
null
src/pcc/api/instance/stop_all_instance.py
ymstmsys/pcc-cli
8805ecaa39c99092352e22986fbf7dba9bac4efb
[ "Apache-2.0" ]
1
2016-07-22T05:22:32.000Z
2016-07-22T05:29:16.000Z
src/pcc/api/instance/stop_all_instance.py
ymstmsys/pcc-cli
8805ecaa39c99092352e22986fbf7dba9bac4efb
[ "Apache-2.0" ]
1
2019-07-24T05:34:57.000Z
2019-07-24T05:34:57.000Z
# -*- coding: utf-8 -*- def command(): return "stop-all-instance" def init_argument(parser): parser.add_argument("--farm-no", required=True) def execute(requester, args): farm_no = args.farm_no parameters = {} parameters["FarmNo"] = farm_no return requester.execute("/StopAllInstance", param...
20.4375
60
0.672783
def command(): return "stop-all-instance" def init_argument(parser): parser.add_argument("--farm-no", required=True) def execute(requester, args): farm_no = args.farm_no parameters = {} parameters["FarmNo"] = farm_no return requester.execute("/StopAllInstance", parameters)
true
true
f77bb82006c25f9af22b4c01921e8e2c67b19fef
1,339
py
Python
test/test_settings_reporting_eula_item.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
test/test_settings_reporting_eula_item.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
test/test_settings_reporting_eula_item.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
# coding: utf-8 """ Copyright 2016 SmartBear Software 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 l...
27.326531
94
0.74832
from __future__ import absolute_import import os import sys import unittest import swagger_client from swagger_client.rest import ApiException from swagger_client.models.settings_reporting_eula_item import SettingsReportingEulaItem class TestSettingsReportingEulaItem(unittest.TestCase): def setUp(self): ...
true
true
f77bbb50bdfa4f328073cbe8ed44f3d7b25703cc
932
py
Python
37-For/Script.py
dikyindrah/Python-Pemrograman-Dasar
0dbac8b28a47e67015abcc3656c309cea274f87b
[ "MIT" ]
null
null
null
37-For/Script.py
dikyindrah/Python-Pemrograman-Dasar
0dbac8b28a47e67015abcc3656c309cea274f87b
[ "MIT" ]
null
null
null
37-For/Script.py
dikyindrah/Python-Pemrograman-Dasar
0dbac8b28a47e67015abcc3656c309cea274f87b
[ "MIT" ]
null
null
null
# For print('\n==========For==========\n') print('\n| Tampilkan 5 angka |\n') for i in range(5): print(i) print('\n| Tampilkan angka 1 sampai 5 |\n') for i in range(1, 5+1): print(i) print('\n| Tampilkan 5 angka secara ascending |\n') for i in range(0, 5, 1): print(i) print('\n| Tampilkan 5 angka secar...
21.674419
84
0.609442
print('\n==========For==========\n') print('\n| Tampilkan 5 angka |\n') for i in range(5): print(i) print('\n| Tampilkan angka 1 sampai 5 |\n') for i in range(1, 5+1): print(i) print('\n| Tampilkan 5 angka secara ascending |\n') for i in range(0, 5, 1): print(i) print('\n| Tampilkan 5 angka secara desc...
true
true
f77bbba886136d0429694ac48fd279f9cfe1b048
364
py
Python
src/ScientificProgrammingPrimer/ch_01/interest_rate.py
bmoretz/Python-Playground
a367ec7659b85c24363c21b5c0ac25db08ffa1f6
[ "MIT" ]
null
null
null
src/ScientificProgrammingPrimer/ch_01/interest_rate.py
bmoretz/Python-Playground
a367ec7659b85c24363c21b5c0ac25db08ffa1f6
[ "MIT" ]
null
null
null
src/ScientificProgrammingPrimer/ch_01/interest_rate.py
bmoretz/Python-Playground
a367ec7659b85c24363c21b5c0ac25db08ffa1f6
[ "MIT" ]
null
null
null
# Let p be a bank’s interest rate in percent per year. # An initial amount A has then grown to A ( 1 + p/100)^ n after n years. # Make a program for computing how much money 1000 euros have grown to after three years with 5 percent interest rate. A = 1000 N = 5.0 p = 0.05 def R( amount, rate, time ): return amo...
30.333333
118
0.662088
A = 1000 N = 5.0 p = 0.05 def R( amount, rate, time ): return amount * ( 1 + rate/100 ) ** time R( A, N, p )
true
true
f77bbcb87b909ccaedda08b4b0c5e6e1b0c38344
672
py
Python
stdplugins/howtogoogle.py
IshwaranRudhara/PepeBot
5c0bd4c19e076bee73cf62a4dc804681045754d3
[ "Apache-2.0" ]
6
2020-04-21T04:52:42.000Z
2020-06-19T09:33:02.000Z
stdplugins/howtogoogle.py
faquario/PepeBorg
be9be790b4e2b5456536162786dbd1ead71be024
[ "Apache-2.0" ]
1
2021-02-08T20:49:02.000Z
2021-02-08T20:49:02.000Z
stdplugins/howtogoogle.py
prono69/LazyAF-Pepe
b78d4b9f174a65b77b6b5f4969386aa6dd3359ce
[ "Apache-2.0" ]
3
2020-04-21T05:45:54.000Z
2020-05-01T15:03:40.000Z
#Modded from dagd.py """ Animate How To Google Command .ggl Search Query By @loxxi """ import requests from uniborg.util import admin_cmd @borg.on(admin_cmd(pattern="ggl (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) sample_url = "https://da.gd/s?url...
30.545455
129
0.672619
import requests from uniborg.util import admin_cmd @borg.on(admin_cmd(pattern="ggl (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) sample_url = "https://da.gd/s?url=https://lmgtfy.com/?q={}%26iie=1".format(input_str.replace(" ","+")) response_api ...
true
true
f77bbd7fc4763281e01ac825e1f4e630cfb87624
2,710
py
Python
sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/workflow.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
40.447761
139
0.620295
from .proxy_resource import ProxyResource class Workflow(ProxyResource): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'st...
true
true
f77bbe1bcf81598995e1b1d8bb50c86e832d981d
10,707
py
Python
magenta/models/drums_rnn/drums_rnn_generate.py
sleep-yearning/magenta
a03a14ef5a691ee9e3d336aa621281028dc5af32
[ "Apache-2.0" ]
1
2020-02-24T06:12:09.000Z
2020-02-24T06:12:09.000Z
magenta/models/drums_rnn/drums_rnn_generate.py
sleep-yearning/magenta
a03a14ef5a691ee9e3d336aa621281028dc5af32
[ "Apache-2.0" ]
null
null
null
magenta/models/drums_rnn/drums_rnn_generate.py
sleep-yearning/magenta
a03a14ef5a691ee9e3d336aa621281028dc5af32
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
40.403774
83
0.713739
import ast import os import time import magenta from magenta.models.drums_rnn import drums_rnn_config_flags from magenta.models.drums_rnn import drums_rnn_model from magenta.models.drums_rnn import drums_rnn_sequence_generator from magenta.models.shared import sequence_generator from magenta.models.shared import seq...
true
true
f77bbf7d2cd838c79afac0bd3bf751deea8f5363
4,029
py
Python
alipay/aop/api/request/KoubeiCateringPosPracticeQueryRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/KoubeiCateringPosPracticeQueryRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/KoubeiCateringPosPracticeQueryRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.KoubeiCateringPosPracticeQueryModel import KoubeiCateringPosPracticeQueryModel class KoubeiCateringPosPracticeQueryReq...
27.786207
166
0.647803
import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.KoubeiCateringPosPracticeQueryModel import KoubeiCateringPosPracticeQueryModel class KoubeiCateringPosPracticeQueryRequest(object): def __init__(self, biz_mode...
true
true
f77bc13dee20200157f827551e1cb9e8b177dbda
12,137
py
Python
Eso.API.Statistics/statistics-env/Lib/site-packages/sanic_routing/router.py
afgbeveridge/EsotericLanguagesToolkit
05f391f5c03c9fc7dd60f7f4ef89e480315dc1bc
[ "MIT" ]
1
2021-07-14T23:39:19.000Z
2021-07-14T23:39:19.000Z
Eso.API.Statistics/statistics-env/Lib/site-packages/sanic_routing/router.py
afgbeveridge/EsotericLanguagesToolkit
05f391f5c03c9fc7dd60f7f4ef89e480315dc1bc
[ "MIT" ]
null
null
null
Eso.API.Statistics/statistics-env/Lib/site-packages/sanic_routing/router.py
afgbeveridge/EsotericLanguagesToolkit
05f391f5c03c9fc7dd60f7f4ef89e480315dc1bc
[ "MIT" ]
null
null
null
import typing as t from abc import ABC, abstractmethod from types import SimpleNamespace from .exceptions import BadMethod, FinalizationError, NoMethod, NotFound from .line import Line from .patterns import REGEX_TYPES from .route import Route from .tree import Tree from .utils import parts_to_path, path_to_parts # T...
32.891599
79
0.51792
import typing as t from abc import ABC, abstractmethod from types import SimpleNamespace from .exceptions import BadMethod, FinalizationError, NoMethod, NotFound from .line import Line from .patterns import REGEX_TYPES from .route import Route from .tree import Tree from .utils import parts_to_path, path_to_parts imp...
true
true
f77bc15a1c4067ec6ee7850b5fcbbeabaf5d7129
5,403
py
Python
function/oci_handler_machine.py
metron-labs/cybereason-oci
c6e7f0c218dd44717c06904e55e5251b2fe925bb
[ "MIT" ]
2
2021-05-03T08:31:06.000Z
2021-05-18T07:24:04.000Z
function/oci_handler_machine.py
metron-labs/cybereason-oci
c6e7f0c218dd44717c06904e55e5251b2fe925bb
[ "MIT" ]
null
null
null
function/oci_handler_machine.py
metron-labs/cybereason-oci
c6e7f0c218dd44717c06904e55e5251b2fe925bb
[ "MIT" ]
null
null
null
# Copyright (c) 2021 Cybereason Inc # This code is licensed under MIT license (see LICENSE.md for details) import json import requests import oci import io import base64 import logging import hashlib from fdk import response from cybereason_connection import get_cybereason_connection from cybereason_machine_suspicio...
49.568807
219
0.705719
import json import requests import oci import io import base64 import logging import hashlib from fdk import response from cybereason_connection import get_cybereason_connection from cybereason_machine_suspicions import is_suspicious from cybereason_isolate_machine import isolate_machine from oci_utils import * from...
true
true
f77bc1bc45c8533800fa48f3763878704a047f1f
471
py
Python
envs/anaconda-project-dev/Lib/site-packages/binstar_client/_version.py
vertingo/Anaconda_Videos_Tutos
f30f2a0549a7b81c17f4d5d249edc59eb3c05458
[ "BSD-3-Clause" ]
null
null
null
envs/anaconda-project-dev/Lib/site-packages/binstar_client/_version.py
vertingo/Anaconda_Videos_Tutos
f30f2a0549a7b81c17f4d5d249edc59eb3c05458
[ "BSD-3-Clause" ]
null
null
null
envs/anaconda-project-dev/Lib/site-packages/binstar_client/_version.py
vertingo/Anaconda_Videos_Tutos
f30f2a0549a7b81c17f4d5d249edc59eb3c05458
[ "BSD-3-Clause" ]
null
null
null
# This file was generated by 'versioneer.py' (0.15) from # revision-control system data, or from the parent directory name of an # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. import json import sys version_json = ''' { "dirty": false, "error": null, "full-revisionid...
21.409091
77
0.730361
import json import sys version_json = ''' { "dirty": false, "error": null, "full-revisionid": "b276f0572744c73c184a8b43a897cfa7fc1dc523", "version": "1.7.2" } ''' def get_versions(): return json.loads(version_json)
true
true
f77bc21d028ab6cbfaa172d5cbae0972b9b647c6
611
py
Python
project_euler/Problem25/p25.py
bernardosequeir/CTFfiles
36a6ceba49d9a9019056d3669c5e8f84aa83b618
[ "MIT" ]
null
null
null
project_euler/Problem25/p25.py
bernardosequeir/CTFfiles
36a6ceba49d9a9019056d3669c5e8f84aa83b618
[ "MIT" ]
5
2020-09-23T18:28:25.000Z
2020-09-23T18:28:41.000Z
project_euler/Problem25/p25.py
bernardosequeir/CTFSolutions
503944617cb18826d12ab98fa33fd761e791328a
[ "MIT" ]
null
null
null
import sys sys.setrecursionlimit(10**6) def fibonacci(term_num): if(term_num == 1 or term_num == 2): return 1 else: return (fibonacci(term_num-1)+fibonacci(term_num-2)) def check_first_fib_term_over(limit): third_last_term = 1 second_last_term = 1 last_term = 2 term_index = ...
21.068966
60
0.657938
import sys sys.setrecursionlimit(10**6) def fibonacci(term_num): if(term_num == 1 or term_num == 2): return 1 else: return (fibonacci(term_num-1)+fibonacci(term_num-2)) def check_first_fib_term_over(limit): third_last_term = 1 second_last_term = 1 last_term = 2 term_index = ...
true
true
f77bc28ee46b108383dc258f0c5ad1c5ced82a81
1,493
py
Python
datachunkpy/tests/datachunk_test.py
nipuntalukdar/datachunkpy
7f8f7b483913ade36b416a34769b04ad80c03a28
[ "MIT" ]
null
null
null
datachunkpy/tests/datachunk_test.py
nipuntalukdar/datachunkpy
7f8f7b483913ade36b416a34769b04ad80c03a28
[ "MIT" ]
null
null
null
datachunkpy/tests/datachunk_test.py
nipuntalukdar/datachunkpy
7f8f7b483913ade36b416a34769b04ad80c03a28
[ "MIT" ]
null
null
null
#!/usr/bin/python from __future__ import print_function from struct import pack import random import unittest from datachunkpy.datachunk import DataChunk, MessageHandler class MyMsgHandler(MessageHandler): def __init__(self): self.msg_processed = 0 self.bytes_processed = 0 def handle_msg(se...
25.741379
59
0.567314
from __future__ import print_function from struct import pack import random import unittest from datachunkpy.datachunk import DataChunk, MessageHandler class MyMsgHandler(MessageHandler): def __init__(self): self.msg_processed = 0 self.bytes_processed = 0 def handle_msg(self, data): ...
true
true
f77bc459a032c9b360fd485fdbfa24b91103516b
71,557
py
Python
python/ccxt/async_support/ftx.py
xCuri0/ccxt
bf3d10e0d3c1defb9aba9e81caa57cad0187fa5c
[ "MIT" ]
null
null
null
python/ccxt/async_support/ftx.py
xCuri0/ccxt
bf3d10e0d3c1defb9aba9e81caa57cad0187fa5c
[ "MIT" ]
null
null
null
python/ccxt/async_support/ftx.py
xCuri0/ccxt
bf3d10e0d3c1defb9aba9e81caa57cad0187fa5c
[ "MIT" ]
1
2020-09-11T18:44:37.000Z
2020-09-11T18:44:37.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange # ----------------------------------------------------------------------------- try...
41.21947
175
0.445826
from ccxt.async_support.base.exchange import Exchange try: basestring except NameError: basestring = str import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import BadRequest from ccxt.base.errors import InsufficientFunds from cc...
true
true
f77bc4639e0af60d5894da98244a91824fd652b3
1,623
py
Python
release/scripts/addons/presets/operator/mesh.landscape_add/billow.py
noorbeast/BlenderSource
65ebecc5108388965678b04b43463b85f6c69c1d
[ "Naumen", "Condor-1.1", "MS-PL" ]
3
2019-09-16T10:29:19.000Z
2022-02-11T14:43:18.000Z
engine/2.80/scripts/addons/presets/operator/mesh.landscape_add/billow.py
byteinc/Phasor
f7d23a489c2b4bcc3c1961ac955926484ff8b8d9
[ "Unlicense" ]
null
null
null
engine/2.80/scripts/addons/presets/operator/mesh.landscape_add/billow.py
byteinc/Phasor
f7d23a489c2b4bcc3c1961ac955926484ff8b8d9
[ "Unlicense" ]
null
null
null
import bpy op = bpy.context.active_operator op.ant_terrain_name = 'Landscape' op.land_material = '' op.water_material = '' op.texture_block = '' op.at_cursor = True op.smooth_mesh = True op.tri_face = False op.sphere_mesh = False op.subdivision_x = 128 op.subdivision_y = 128 op.mesh_size = 2.0 op.mesh_size_x = 2.0 op....
21.932432
38
0.735059
import bpy op = bpy.context.active_operator op.ant_terrain_name = 'Landscape' op.land_material = '' op.water_material = '' op.texture_block = '' op.at_cursor = True op.smooth_mesh = True op.tri_face = False op.sphere_mesh = False op.subdivision_x = 128 op.subdivision_y = 128 op.mesh_size = 2.0 op.mesh_size_x = 2.0 op....
true
true
f77bc467ceec50dd91a49de18aa82da0d914c132
30,996
py
Python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/operations/_deployments_operations.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/operations/_deployments_operations.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
null
null
null
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/operations/_deployments_operations.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
45.582353
304
0.679023
import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error f...
true
true
f77bc483b0f79ebcd6e17a35de0bdd3622ce1318
1,878
py
Python
ac_dc/download_sentencepiece_kenlm_models.py
ruinunca/data_tooling
297e1f8c2898d00b523ccafb7bdd19c6d6aac9ff
[ "Apache-2.0" ]
1
2022-02-14T15:45:20.000Z
2022-02-14T15:45:20.000Z
ac_dc/download_sentencepiece_kenlm_models.py
ruinunca/data_tooling
297e1f8c2898d00b523ccafb7bdd19c6d6aac9ff
[ "Apache-2.0" ]
null
null
null
ac_dc/download_sentencepiece_kenlm_models.py
ruinunca/data_tooling
297e1f8c2898d00b523ccafb7bdd19c6d6aac9ff
[ "Apache-2.0" ]
null
null
null
"""Download Sentencepiece and KenLM models for supported languages. Usage: python download_sentencepiece_kenlm_models.py --output_dir_path /tmp/ All Sentencepiece and KenLM language models will be saved under /tmp. """ import argparse import subprocess from languages_id import langs_id def download_sentencepi...
36.115385
192
0.674121
import argparse import subprocess from languages_id import langs_id def download_sentencepiece_kenlm_models(output_dir_path: str) -> None: supported_sentencepiece_langs = langs_id["sentencepiece_id"].dropna().unique() for lang in supported_sentencepiece_langs: try: output_sentencepiece =...
true
true
f77bc49a88fc14491cdb02551f2d9ace69d7c83b
32,290
py
Python
code/model_noattn.py
niwtr/VQA-GAN
61275bf7e5b3f37fd8fbc0ec9ce4e0045343e299
[ "MIT" ]
4
2020-06-16T12:09:57.000Z
2020-10-11T16:43:37.000Z
code/model_noattn.py
niwtr/VQA-GAN
61275bf7e5b3f37fd8fbc0ec9ce4e0045343e299
[ "MIT" ]
6
2021-01-15T07:00:21.000Z
2022-03-12T00:49:10.000Z
code/model_noattn.py
niwtr/VQA-GAN
61275bf7e5b3f37fd8fbc0ec9ce4e0045343e299
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.parallel from torch.autograd import Variable from torchvision import models import torch.utils.model_zoo as model_zoo import torch.nn.functional as F from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from miscc.config import cfg from GlobalAtte...
36.94508
104
0.594921
import torch import torch.nn as nn import torch.nn.parallel from torch.autograd import Variable from torchvision import models import torch.utils.model_zoo as model_zoo import torch.nn.functional as F from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from miscc.config import cfg from GlobalAtte...
true
true
f77bc53d2476ca1e35141436840363adba35d048
13,387
py
Python
project2_multiagent/multiagent/multiAgents_fyq.py
fyqqyf/UC-Berkeley-CS188-2020
b926b319e4e76f9fb0aa4cdfb5ad005f3befbd4c
[ "MIT" ]
2
2021-01-18T09:21:22.000Z
2021-11-08T14:34:12.000Z
project2_multiagent/multiagent/multiAgents_fyq.py
fyqqyf/UC-Berkeley-CS188-2020
b926b319e4e76f9fb0aa4cdfb5ad005f3befbd4c
[ "MIT" ]
null
null
null
project2_multiagent/multiagent/multiAgents_fyq.py
fyqqyf/UC-Berkeley-CS188-2020
b926b319e4e76f9fb0aa4cdfb5ad005f3befbd4c
[ "MIT" ]
2
2021-09-08T14:42:46.000Z
2022-02-03T22:28:01.000Z
# multiAgents.py # -------------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.e...
39.143275
136
0.657877
from util import manhattanDistance from game import Directions import random, util from game import Agent class ReflexAgent(Agent): def getAction(self, gameState): legalMoves = gameState.getLegalActions() scores = [self.evaluationFunction(gameState, action) for action in legal...
true
true
f77bc66af4ca66eebf7b8eb966c5694d09c15014
13,570
py
Python
instapy/quota_supervisor.py
bardascat/InstaPy
ca55fc1422bb4a526e20382d998cfb5290b2c8ee
[ "MIT" ]
null
null
null
instapy/quota_supervisor.py
bardascat/InstaPy
ca55fc1422bb4a526e20382d998cfb5290b2c8ee
[ "MIT" ]
null
null
null
instapy/quota_supervisor.py
bardascat/InstaPy
ca55fc1422bb4a526e20382d998cfb5290b2c8ee
[ "MIT" ]
null
null
null
""" Realtime and sophisticated quota supervising mechanisms """ import time as epoch_time from datetime import time, timedelta, date, datetime import random from sys import platform import sqlite3 from .time_util import sleep_actual from .time_util import get_time from .database_engine import get_database from .settin...
35.804749
139
0.583272
import time as epoch_time from datetime import time, timedelta, date, datetime import random from sys import platform import sqlite3 from .time_util import sleep_actual from .time_util import get_time from .database_engine import get_database from .settings import Settings from .settings import Storage def quota_s...
true
true
f77bc6ef15c8e27e4f26f701ad36070ba477cd0a
733
py
Python
TDT4195/image_processing/A1/assignment1/dataloaders.py
jorgstei/Datateknologi
6fea7bf2c557cd93981c6996c7f4cca02f343d9e
[ "MIT" ]
null
null
null
TDT4195/image_processing/A1/assignment1/dataloaders.py
jorgstei/Datateknologi
6fea7bf2c557cd93981c6996c7f4cca02f343d9e
[ "MIT" ]
null
null
null
TDT4195/image_processing/A1/assignment1/dataloaders.py
jorgstei/Datateknologi
6fea7bf2c557cd93981c6996c7f4cca02f343d9e
[ "MIT" ]
null
null
null
import torchvision import torch def load_dataset(batch_size, image_transform, root_dir="data/"): dataset_train = torchvision.datasets.MNIST( root=root_dir, download=True, transform=image_transform ) dataset_test = torchvision.datasets.MNIST( ...
23.645161
51
0.631651
import torchvision import torch def load_dataset(batch_size, image_transform, root_dir="data/"): dataset_train = torchvision.datasets.MNIST( root=root_dir, download=True, transform=image_transform ) dataset_test = torchvision.datasets.MNIST( ...
true
true
f77bc72434203be120993ca350a490fa53665ab9
1,741
py
Python
djangocms_page_image/cms_toolbars.py
nburlett/djangocms-page-image
6307ad10506f7d7f1773a236cf8097dcd0fb96a3
[ "MIT" ]
null
null
null
djangocms_page_image/cms_toolbars.py
nburlett/djangocms-page-image
6307ad10506f7d7f1773a236cf8097dcd0fb96a3
[ "MIT" ]
2
2020-11-12T00:38:34.000Z
2021-03-26T09:53:31.000Z
djangocms_page_image/cms_toolbars.py
nburlett/djangocms-page-image
6307ad10506f7d7f1773a236cf8097dcd0fb96a3
[ "MIT" ]
1
2020-11-11T18:44:39.000Z
2020-11-11T18:44:39.000Z
from cms.extensions.toolbar import ExtensionToolbar from cms.toolbar_pool import toolbar_pool from cms.utils import get_language_list from django.utils.translation import get_language, ugettext_lazy as _ from . import models @toolbar_pool.register class ImageExtensionToolbar(ExtensionToolbar): model = models.Im...
35.530612
95
0.651924
from cms.extensions.toolbar import ExtensionToolbar from cms.toolbar_pool import toolbar_pool from cms.utils import get_language_list from django.utils.translation import get_language, ugettext_lazy as _ from . import models @toolbar_pool.register class ImageExtensionToolbar(ExtensionToolbar): model = models.Im...
true
true
f77bc7d8e0a055e38b8430a6a4502024b16b10c6
14,077
py
Python
var/spack/repos/builtin/packages/qt/package.py
rafael233/spack
89a873af8e0425388338db2cb0ac6628fb92afe4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/qt/package.py
rafael233/spack
89a873af8e0425388338db2cb0ac6628fb92afe4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/qt/package.py
rafael233/spack
89a873af8e0425388338db2cb0ac6628fb92afe4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import platform import os import sys class Qt(Package): """Qt is a comprehensive cross-platform ...
36.658854
108
0.553527
from spack import * import platform import os import sys class Qt(Package): homepage = 'http://qt.io' url = 'http://download.qt.io/archive/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz' list_url = 'http://download.qt.io/archive/qt/' list_depth = 3 version('5.11.2', 'c610...
true
true
f77bc95d3089c6f68712844d59ebb0b0409c8009
1,049
py
Python
scripts/calc_q.py
larsbratholm/cs-proteins
785815c535e345fc907d3a6c3843374c11908679
[ "Unlicense" ]
null
null
null
scripts/calc_q.py
larsbratholm/cs-proteins
785815c535e345fc907d3a6c3843374c11908679
[ "Unlicense" ]
null
null
null
scripts/calc_q.py
larsbratholm/cs-proteins
785815c535e345fc907d3a6c3843374c11908679
[ "Unlicense" ]
null
null
null
import sys import subprocess #native = "../../native.pdb" #native = "~/steno/folds/novo/profasi_native/1ubq/native.pdb" pales = "~/programs/pales-linux" rdc = "/home/lab/steno/folds/novo/ubiquitin.rdc" #settings = "-ph 6.6 -temp 304 -nacl 0.01 -bestFit -qRms" settings = "-bestFit -qRms -r1 1 -rN 72" pdb_files = sy...
25.585366
88
0.601525
import sys import subprocess pales = "~/programs/pales-linux" rdc = "/home/lab/steno/folds/novo/ubiquitin.rdc" settings = "-bestFit -qRms -r1 1 -rN 72" pdb_files = sys.argv[1:] meas = [] diff = [] for f in pdb_files: out = subprocess.check_output(pales+" -inD "+rdc+" -pdb "+f+" "+settings,shell=True) lin...
false
true
f77bc9bea6936da4b33aa2b9045fc8c633d61686
8,092
py
Python
mns/subscription.py
suAdminWen/aliyun-mns
3a4bd18ea72ef5a1bc88237f236b6b9383112a57
[ "MIT" ]
17
2017-07-24T08:49:13.000Z
2020-08-05T13:23:41.000Z
mns/subscription.py
suAdminWen/aliyun-mns
3a4bd18ea72ef5a1bc88237f236b6b9383112a57
[ "MIT" ]
null
null
null
mns/subscription.py
suAdminWen/aliyun-mns
3a4bd18ea72ef5a1bc88237f236b6b9383112a57
[ "MIT" ]
14
2017-08-25T06:39:57.000Z
2020-07-29T02:32:03.000Z
#coding=utf-8 # Copyright (C) 2015, Alibaba Cloud Computing #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
42.366492
461
0.638038
import time from .mns_client import MNSClient from .mns_request import * from .mns_exception import * class Subscription: def __init__(self, topic_name, subscription_name, mns_client, debug=False): self.topic_name = topic_name self.subscription_name = subscription_name self.mns_client =...
true
true
f77bcac6ba4157719c6e72bad9082c0758137d41
4,333
py
Python
downloads/simpe_tic_tac_toe_game.py
safnyk23/safnyk23.github.io
e2133fcb7dacfcdab4183fa58266da11001fdbb4
[ "CC-BY-3.0" ]
null
null
null
downloads/simpe_tic_tac_toe_game.py
safnyk23/safnyk23.github.io
e2133fcb7dacfcdab4183fa58266da11001fdbb4
[ "CC-BY-3.0" ]
null
null
null
downloads/simpe_tic_tac_toe_game.py
safnyk23/safnyk23.github.io
e2133fcb7dacfcdab4183fa58266da11001fdbb4
[ "CC-BY-3.0" ]
1
2018-12-09T00:05:37.000Z
2018-12-09T00:05:37.000Z
# coding: utf-8 # In[1]: from IPython.display import clear_output def display_board(board): clear_output() # Remember, this only works in jupyter! print(' | |') print(' ' + board[7] + ' | ' + board[8] + ' | ' + board[9]) print(' | |') print('-----------') print(' | |') ...
20.060185
92
0.514886
from IPython.display import clear_output def display_board(board): clear_output() print(' | |') print(' ' + board[7] + ' | ' + board[8] + ' | ' + board[9]) print(' | |') print('-----------') print(' | |') print(' ' + board[4] + ' | ' + board[5] + ' | ' + board[6]) p...
true
true
f77bcb141885ffad50f0b5a28a922a918bc30930
21,579
py
Python
msticpy/analysis/anomalous_sequence/utils/cmds_params_values.py
kubajir/msticpy
7b319b71b191b5f75dcf9afd87492523a74b5ad7
[ "MIT" ]
1
2022-01-17T13:47:46.000Z
2022-01-17T13:47:46.000Z
msticpy/analysis/anomalous_sequence/utils/cmds_params_values.py
kubajir/msticpy
7b319b71b191b5f75dcf9afd87492523a74b5ad7
[ "MIT" ]
null
null
null
msticpy/analysis/anomalous_sequence/utils/cmds_params_values.py
kubajir/msticpy
7b319b71b191b5f75dcf9afd87492523a74b5ad7
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ Helper...
34.974068
88
0.646091
from collections import defaultdict from typing import Tuple, List, Union, DefaultDict import copy import numpy as np from ..utils.data_structures import StateMatrix, Cmd from ..utils.laplace_smooth import ( laplace_smooth_cmd_counts, laplace_smooth_param_counts, laplace_smooth_value_counts, ) from ....c...
true
true
f77bcb409994ed6d301a48a4561cb86b08824a1f
21,870
py
Python
perfkitbenchmarker/linux_benchmarks/netperf_benchmark.py
jojoya/PerfKitBenchmarker
46c6db0e20de7f751601a9b7b7cbb19c786d395b
[ "Apache-2.0" ]
2
2021-01-15T09:40:28.000Z
2021-01-15T09:40:36.000Z
perfkitbenchmarker/linux_benchmarks/netperf_benchmark.py
jojoya/PerfKitBenchmarker
46c6db0e20de7f751601a9b7b7cbb19c786d395b
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/linux_benchmarks/netperf_benchmark.py
jojoya/PerfKitBenchmarker
46c6db0e20de7f751601a9b7b7cbb19c786d395b
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
40.12844
83
0.689163
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import csv import json import logging import os import re from absl import flags from perfkitbenchmarker import configs from perfkitbenchmarker import data from perfkitbenchmarker import err...
true
true
f77bccaab4ef434f2d1fd635ada7ff5a748ac7e7
4,065
py
Python
test_scrollbar.py
sharksmhi/SHARKtools_pre_system_Svea
c25688589437666200b84ee95e83b46c11e05007
[ "MIT" ]
null
null
null
test_scrollbar.py
sharksmhi/SHARKtools_pre_system_Svea
c25688589437666200b84ee95e83b46c11e05007
[ "MIT" ]
null
null
null
test_scrollbar.py
sharksmhi/SHARKtools_pre_system_Svea
c25688589437666200b84ee95e83b46c11e05007
[ "MIT" ]
null
null
null
from tkinter import * class scrollingFrame(Frame): def __init__(self, parentObject, background): Frame.__init__(self, parentObject, background = background) self.canvas = Canvas(self, borderwidth=0, background = background, highlightthickness=0) self.frame = Frame(self.canvas, background = ...
35.043103
105
0.666667
from tkinter import * class scrollingFrame(Frame): def __init__(self, parentObject, background): Frame.__init__(self, parentObject, background = background) self.canvas = Canvas(self, borderwidth=0, background = background, highlightthickness=0) self.frame = Frame(self.canvas, background = ...
true
true
f77bcd3141581e56d599e2e279b55cf1983d84f5
217
py
Python
monet/workflows/__init__.py
flo-compbio/monet
1cb561dfa9ea64973bd5325123b9e480bffd2cb3
[ "BSD-3-Clause" ]
39
2020-06-10T06:01:25.000Z
2021-06-05T07:34:13.000Z
monet/workflows/__init__.py
flo-compbio/monet
1cb561dfa9ea64973bd5325123b9e480bffd2cb3
[ "BSD-3-Clause" ]
1
2020-06-10T06:11:29.000Z
2020-06-19T15:51:55.000Z
monet/workflows/__init__.py
flo-compbio/monet
1cb561dfa9ea64973bd5325123b9e480bffd2cb3
[ "BSD-3-Clause" ]
9
2020-06-12T03:56:13.000Z
2020-06-22T16:11:39.000Z
# Copyright (c) 2021 Florian Wagner # # This file is part of Monet. from .nonlinear import * from .clustering import * from .denoising import * from .heatmap import * from .preprocess import * from .scvelo import *
19.727273
35
0.732719
from .nonlinear import * from .clustering import * from .denoising import * from .heatmap import * from .preprocess import * from .scvelo import *
true
true
f77bcd54281250ee23b87aecfdb0b75a5a914393
348
py
Python
test/test_abi.py
zurgeg/openxr.py
bfb05884d9e1295304037a01b9cde229563364f4
[ "Unlicense" ]
8
2020-05-05T15:03:34.000Z
2022-02-17T02:01:40.000Z
test/test_abi.py
zurgeg/openxr.py
bfb05884d9e1295304037a01b9cde229563364f4
[ "Unlicense" ]
2
2020-07-28T18:19:28.000Z
2020-11-12T22:05:33.000Z
test/test_abi.py
zurgeg/openxr.py
bfb05884d9e1295304037a01b9cde229563364f4
[ "Unlicense" ]
2
2020-08-26T14:08:24.000Z
2021-11-11T20:31:05.000Z
#!/usr/bin/env python3 # This is free and unencumbered software released into the public domain. """Test cases for the openxr.abi module.""" from openxr.abi import * import ctypes def test_XrBaseStructure(): assert(ctypes.sizeof(XrBaseStructure) == 16) if __name__ == '__main__': import pytest, sys sys....
21.75
73
0.727011
from openxr.abi import * import ctypes def test_XrBaseStructure(): assert(ctypes.sizeof(XrBaseStructure) == 16) if __name__ == '__main__': import pytest, sys sys.exit(pytest.main(__file__))
true
true
f77bcd77c9a4c9640f48e93745a772048ec73ccd
3,356
py
Python
data/multiviews.py
YoungXIAO13/6DPoseEstimationDatasets
b9cb1d9842870860a15bf3cf600cdfb68d1e195e
[ "MIT" ]
383
2019-09-03T15:29:22.000Z
2022-03-28T02:01:15.000Z
data/multiviews.py
Fang-Haoshu/ObjectPoseEstimationSummary
2a11797e6b01e1820105740fcaeb7c049094c57f
[ "MIT" ]
5
2019-10-18T13:04:07.000Z
2021-09-29T05:26:52.000Z
data/multiviews.py
Fang-Haoshu/ObjectPoseEstimationSummary
2a11797e6b01e1820105740fcaeb7c049094c57f
[ "MIT" ]
63
2019-09-17T12:13:51.000Z
2022-03-28T03:06:05.000Z
from tqdm import tqdm import argparse import os from os.path import join, isdir import sys sys.path.append('..') from blender_render.render_grid import dodecahedron_vertex_coord, semi_sphere_coord, RenderMachine parser = argparse.ArgumentParser() parser.add_argument('--dataset_dir', type=str, help='dataset directory...
45.351351
152
0.667759
from tqdm import tqdm import argparse import os from os.path import join, isdir import sys sys.path.append('..') from blender_render.render_grid import dodecahedron_vertex_coord, semi_sphere_coord, RenderMachine parser = argparse.ArgumentParser() parser.add_argument('--dataset_dir', type=str, help='dataset directory...
true
true
f77bcdb912610c209c1efc044c33d17752be6f23
3,089
py
Python
docs/gensidebar.py
TaoSunVoyage/renku-python
858fe84ce2925a49d9b62638dc601f581e24353e
[ "Apache-2.0" ]
26
2018-06-04T15:21:50.000Z
2022-02-11T17:31:24.000Z
docs/gensidebar.py
TaoSunVoyage/renku-python
858fe84ce2925a49d9b62638dc601f581e24353e
[ "Apache-2.0" ]
1,655
2018-05-17T22:07:50.000Z
2022-03-31T21:22:01.000Z
docs/gensidebar.py
TaoSunVoyage/renku-python
858fe84ce2925a49d9b62638dc601f581e24353e
[ "Apache-2.0" ]
19
2018-05-18T14:12:25.000Z
2022-03-30T19:51:35.000Z
# -*- coding: utf-8 -*- # # Copyright 2017-2021 - Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in c...
31.845361
78
0.61541
import os def write_if_changed(fname, contents): try: with open(fname, "r") as fp: old_contents = fp.read() except FileNotFoundError: old_contents = "" if old_contents != contents: with open(fname, "w") as fp: fp.write(contents) def generate_sidebar(on_r...
true
true
f77bd063e3c72586bf7b1209f1f1b13577090050
917
py
Python
tests/data/test_wrds_comp_anncomp.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
31
2020-06-17T13:19:12.000Z
2022-03-27T08:56:38.000Z
tests/data/test_wrds_comp_anncomp.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
null
null
null
tests/data/test_wrds_comp_anncomp.py
mgao6767/wrds
7dca2651a181bf38c61ebde675c9f64d6c96f608
[ "MIT" ]
8
2020-06-14T15:21:51.000Z
2021-09-29T06:28:53.000Z
import unittest import pandas as pd from frds.data.wrds.execucomp import Anncomp from frds.io.wrds import load class AnncompLoadTestCase(unittest.TestCase): def setUp(self) -> None: self.ANNCOMP = load(Anncomp, use_cache=False, save=False, obs=100) def test_load_anncomp(self): self.assertIsIn...
29.580645
74
0.664122
import unittest import pandas as pd from frds.data.wrds.execucomp import Anncomp from frds.io.wrds import load class AnncompLoadTestCase(unittest.TestCase): def setUp(self) -> None: self.ANNCOMP = load(Anncomp, use_cache=False, save=False, obs=100) def test_load_anncomp(self): self.assertIsIn...
true
true
f77bd0b2e24f389abd7c1474e9673d2ec4d82505
1,464
py
Python
website/urls.py
khushi0205/DSAII
0a9c2b52346d8c71821854d8b84d52a92bf87449
[ "MIT" ]
null
null
null
website/urls.py
khushi0205/DSAII
0a9c2b52346d8c71821854d8b84d52a92bf87449
[ "MIT" ]
1
2022-03-12T01:05:20.000Z
2022-03-12T01:05:20.000Z
website/urls.py
khushi0205/DSAII
0a9c2b52346d8c71821854d8b84d52a92bf87449
[ "MIT" ]
null
null
null
"""website URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
35.707317
77
0.726093
from django.contrib import admin from django.urls import path, include from django import views from django.conf.urls import url from website.settings import STATIC_URL from django.conf import settings from django.conf.urls.static import static from dsaii.views import Index, Blogs,Team, Login, Events from django.views...
true
true
f77bd1102aea5868533b906554de84d2dc43c2a1
2,242
py
Python
tethys_portal/views/error.py
ezrajrice/tethys
238271ebb09913f1f57b0d127fd5c81bb4780a0a
[ "BSD-2-Clause" ]
null
null
null
tethys_portal/views/error.py
ezrajrice/tethys
238271ebb09913f1f57b0d127fd5c81bb4780a0a
[ "BSD-2-Clause" ]
1
2020-12-15T21:55:47.000Z
2020-12-15T21:55:47.000Z
tethys_portal/views/error.py
Aquaveo/tethys
15f67c3fb9458d3af2733542be5ea6391f33b222
[ "BSD-2-Clause" ]
null
null
null
""" ******************************************************************************** * Name: error.py * Author: Nathan Swain * Created On: 2014 * Copyright: (c) Brigham Young University 2014 * License: BSD 2-Clause ******************************************************************************** """ from django.shortcut...
35.03125
117
0.590544
from django.shortcuts import render def handler_400(request, exception, *args, **kwargs): context = {'error_code': '400', 'error_title': 'Bad Request', 'error_message': "Sorry, but we can't process your request. Try something different.", 'error_image': '/static/tethys...
true
true
f77bd2c348f751f5c816de2c376d393003d7f4f9
9,825
py
Python
student/views.py
AhteshamSid/College_school_management_system
a8504708ea2f347d18d4ac59198f29d05c0374d2
[ "MIT" ]
null
null
null
student/views.py
AhteshamSid/College_school_management_system
a8504708ea2f347d18d4ac59198f29d05c0374d2
[ "MIT" ]
null
null
null
student/views.py
AhteshamSid/College_school_management_system
a8504708ea2f347d18d4ac59198f29d05c0374d2
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from academic.models import ClassRegistration from .forms import * from .models import * def load_upazilla(request): district_id = request.GET.get('district') upazilla = Upazilla.objects.filter(district_id=district_id).order_by('name') upazilla_id = r...
47.463768
290
0.707074
from django.shortcuts import render, redirect from academic.models import ClassRegistration from .forms import * from .models import * def load_upazilla(request): district_id = request.GET.get('district') upazilla = Upazilla.objects.filter(district_id=district_id).order_by('name') upazilla_id = r...
true
true
f77bd318dc516d19672a540433b6528e94b8b84a
1,075
py
Python
tests/unit/test_tagging.py
jorges119/localstack
a8a78cda6c13b2e42bc46301b23c7143580132fb
[ "Apache-2.0" ]
31,928
2017-07-04T03:06:28.000Z
2022-03-31T22:33:27.000Z
tests/unit/test_tagging.py
jorges119/localstack
a8a78cda6c13b2e42bc46301b23c7143580132fb
[ "Apache-2.0" ]
5,216
2017-07-04T11:45:41.000Z
2022-03-31T22:02:14.000Z
tests/unit/test_tagging.py
jorges119/localstack
a8a78cda6c13b2e42bc46301b23c7143580132fb
[ "Apache-2.0" ]
3,056
2017-06-05T13:29:11.000Z
2022-03-31T20:54:43.000Z
import unittest from localstack.utils.tagging import TaggingService class TestTaggingService(unittest.TestCase): svc = TaggingService() def test_list_empty(self): result = self.svc.list_tags_for_resource("test") self.assertEqual({"Tags": []}, result) def test_create_tag(self): t...
34.677419
73
0.636279
import unittest from localstack.utils.tagging import TaggingService class TestTaggingService(unittest.TestCase): svc = TaggingService() def test_list_empty(self): result = self.svc.list_tags_for_resource("test") self.assertEqual({"Tags": []}, result) def test_create_tag(self): t...
true
true
f77bd39fe20adbfca32955f3c84e2ac8a0d7f782
14,066
py
Python
work_dirs/wlnet_test_icdar/wlnet_test_icdar.py
zzx0226/mmocr
50354895244339a392b4f1af5a35963883923cca
[ "Apache-2.0" ]
null
null
null
work_dirs/wlnet_test_icdar/wlnet_test_icdar.py
zzx0226/mmocr
50354895244339a392b4f1af5a35963883923cca
[ "Apache-2.0" ]
null
null
null
work_dirs/wlnet_test_icdar/wlnet_test_icdar.py
zzx0226/mmocr
50354895244339a392b4f1af5a35963883923cca
[ "Apache-2.0" ]
null
null
null
checkpoint_config = dict(interval=5) log_config = dict( interval=5, hooks=[dict(type='TextLoggerHook'), dict(type='TensorboardLoggerHook')]) dist_params = dict(backend='nccl') log_level = 'INFO' load_from = None resume_from = None workflow = [('train', 1)] optimizer = dict(type='Adam', lr=0.0001) opt...
34.903226
91
0.551685
checkpoint_config = dict(interval=5) log_config = dict( interval=5, hooks=[dict(type='TextLoggerHook'), dict(type='TensorboardLoggerHook')]) dist_params = dict(backend='nccl') log_level = 'INFO' load_from = None resume_from = None workflow = [('train', 1)] optimizer = dict(type='Adam', lr=0.0001) opt...
true
true
f77bd48d7ad8370a1142d05db86188aea9cfe2af
14,355
py
Python
d_graph.py
MohamedAl-Hussein/pyGraphs
43346b1f25332dd7ab80cdd9656b3ed7af21d4d2
[ "MIT" ]
null
null
null
d_graph.py
MohamedAl-Hussein/pyGraphs
43346b1f25332dd7ab80cdd9656b3ed7af21d4d2
[ "MIT" ]
null
null
null
d_graph.py
MohamedAl-Hussein/pyGraphs
43346b1f25332dd7ab80cdd9656b3ed7af21d4d2
[ "MIT" ]
null
null
null
# Course: CS261 - Data Structures # Author: Mohamed Al-Hussein # Assignment: 06 # Description: Directed graph implementation. from collections import deque import heapq class DirectedGraph: """ Class to implement directed weighted graph - duplicate edges not allowed - loops not allowed - only pos...
33.618267
117
0.585023
from collections import deque import heapq class DirectedGraph: def __init__(self, start_edges=None): self.v_count = 0 self.adj_matrix = [] if start_edges is not None: v_count = 0 for u, v, _ in start_edges: v_count = max(v_count, ...
true
true
f77bd4caf852a875c9ec0fe156a7c5ae532d6136
1,026
py
Python
pythonutils/sftpNode.py
ucguy4u/Utilities
70686c6ca83a6b2a0f1286e493bc4de6d2611070
[ "Apache-2.0" ]
null
null
null
pythonutils/sftpNode.py
ucguy4u/Utilities
70686c6ca83a6b2a0f1286e493bc4de6d2611070
[ "Apache-2.0" ]
null
null
null
pythonutils/sftpNode.py
ucguy4u/Utilities
70686c6ca83a6b2a0f1286e493bc4de6d2611070
[ "Apache-2.0" ]
null
null
null
import paramiko import os class MySFTPClient(paramiko.SFTPClient): def put_dir(self, source, target): """ Uploads the contents of the source directory to the target path. The target directory needs to exists. All subdirectories in source are created under target. "...
38
85
0.560429
import paramiko import os class MySFTPClient(paramiko.SFTPClient): def put_dir(self, source, target): for item in os.listdir(source): if os.path.isfile(os.path.join(source, item)): self.put(os.path.join(source, item), '%s/%s' % (target, item)) else: ...
true
true
f77bd5dfde1043ed49187f63789de7d7ab073930
1,064
py
Python
uploadFiles.py
AbhigyanRanjan0505/P328958dsgjok
d5929ca45489ac8d9823da73fce42f4eea5b6eda
[ "MIT" ]
null
null
null
uploadFiles.py
AbhigyanRanjan0505/P328958dsgjok
d5929ca45489ac8d9823da73fce42f4eea5b6eda
[ "MIT" ]
null
null
null
uploadFiles.py
AbhigyanRanjan0505/P328958dsgjok
d5929ca45489ac8d9823da73fce42f4eea5b6eda
[ "MIT" ]
null
null
null
import os import dropbox from dropbox.files import WriteMode class TransferData: def __init__(self, access_token): self.access_token = access_token def upload(self, file_from, file_to): dbx = dropbox.Dropbox(self.access_token) for root, dirs, files in os.walk(file_from): ...
33.25
74
0.62688
import os import dropbox from dropbox.files import WriteMode class TransferData: def __init__(self, access_token): self.access_token = access_token def upload(self, file_from, file_to): dbx = dropbox.Dropbox(self.access_token) for root, dirs, files in os.walk(file_from): ...
true
true
f77bd664c34fa576f8130aa605227eaba4d6236e
552
py
Python
src/ChampernowneConstant.py
NischayaSharma/project-euler
db64ab6dd61825263f420e74498618465f32597e
[ "MIT" ]
null
null
null
src/ChampernowneConstant.py
NischayaSharma/project-euler
db64ab6dd61825263f420e74498618465f32597e
[ "MIT" ]
null
null
null
src/ChampernowneConstant.py
NischayaSharma/project-euler
db64ab6dd61825263f420e74498618465f32597e
[ "MIT" ]
null
null
null
import numpy as np; def listToNum(listOfDigit): num = map(str, listOfDigit); num = ''.join(num); num = int(num); return num; def numToList(num): string = str(num); listOfDigit = []; for digit in string: listOfDigit.append(int(digit)); return listOfDigit; arrOfNum = np.arange(1...
26.285714
131
0.695652
import numpy as np; def listToNum(listOfDigit): num = map(str, listOfDigit); num = ''.join(num); num = int(num); return num; def numToList(num): string = str(num); listOfDigit = []; for digit in string: listOfDigit.append(int(digit)); return listOfDigit; arrOfNum = np.arange(1...
false
true
f77bd6bbdcdb137eca5b11d1ee0202dc700c38ab
15,684
py
Python
cogdl/models/nn/diffpool.py
li-ziang/cogdl
60022d3334e3abae2d2a505e6e049a26acf10f39
[ "MIT" ]
6
2020-07-09T02:48:41.000Z
2021-06-16T09:04:14.000Z
cogdl/models/nn/diffpool.py
li-ziang/cogdl
60022d3334e3abae2d2a505e6e049a26acf10f39
[ "MIT" ]
null
null
null
cogdl/models/nn/diffpool.py
li-ziang/cogdl
60022d3334e3abae2d2a505e6e049a26acf10f39
[ "MIT" ]
1
2020-05-19T11:45:45.000Z
2020-05-19T11:45:45.000Z
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from scipy.linalg import block_diag from cogdl.layers import SAGELayer from cogdl.utils import split_dataset_general from .. import BaseModel class EntropyLoss(nn.Module): # Return Scalar def forward(self, adj, anext, s_l)...
36.559441
120
0.615723
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from scipy.linalg import block_diag from cogdl.layers import SAGELayer from cogdl.utils import split_dataset_general from .. import BaseModel class EntropyLoss(nn.Module): def forward(self, adj, anext, s_l): ...
true
true
f77bd78b4ed3f72b8e7781d9a6d704e180793433
449
py
Python
blogapp/migrations/0008_alter_blogpost_cover_image.py
heyylateef/lateeflab
4d7cdf3232eb22fe1151bd92beb04b7789cf9f71
[ "MIT" ]
null
null
null
blogapp/migrations/0008_alter_blogpost_cover_image.py
heyylateef/lateeflab
4d7cdf3232eb22fe1151bd92beb04b7789cf9f71
[ "MIT" ]
null
null
null
blogapp/migrations/0008_alter_blogpost_cover_image.py
heyylateef/lateeflab
4d7cdf3232eb22fe1151bd92beb04b7789cf9f71
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-22 03:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blogapp', '0007_alter_blogpost_cover_image'), ] operations = [ migrations.AlterField( model_name='blogpost', name='c...
23.631579
98
0.632517
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blogapp', '0007_alter_blogpost_cover_image'), ] operations = [ migrations.AlterField( model_name='blogpost', name='cover_image', field=models.ImageField...
true
true
f77bd97b1f0e0f5e9035d58b2a5f58e02c0da137
1,524
py
Python
models/taudecay_UFO/couplings.py
valassi/mg5amc_test
2e04f23353051f64e1604b23105fe3faabd32869
[ "NCSA" ]
1
2016-07-09T00:05:56.000Z
2016-07-09T00:05:56.000Z
models/taudecay_UFO/couplings.py
valassi/mg5amc_test
2e04f23353051f64e1604b23105fe3faabd32869
[ "NCSA" ]
4
2022-03-10T09:13:31.000Z
2022-03-30T16:15:01.000Z
models/taudecay_UFO/couplings.py
valassi/mg5amc_test
2e04f23353051f64e1604b23105fe3faabd32869
[ "NCSA" ]
1
2022-03-10T09:02:00.000Z
2022-03-10T09:02:00.000Z
# This file was automatically created by FeynRules 2.0.25 # Mathematica version: 8.0 for Mac OS X x86 (64-bit) (February 23, 2011) # Date: Thu 8 May 2014 12:30:33 from __future__ import absolute_import from .object_library import all_couplings, Coupling from .function_library import complexconjugate, re, im, csc, se...
33.866667
116
0.538714
from __future__ import absolute_import from .object_library import all_couplings, Coupling from .function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot GC_1 = Coupling(name = 'GC_1', value = '2*F0*complex(0,1)*Gf*cmath.sqrt(2)', order = {'EFT':1,'QED':2}) GC_2...
true
true
f77bda5536340e3e1c6c1410f16f9a4f5576fd5c
2,876
py
Python
tests/marketmaking/orderchain/test_biasquoteonpositionelement.py
neilfutureftr/mango-explorer
d8d5740cc53da90414323e8f62f5b6fbfc6ea5ed
[ "MIT" ]
null
null
null
tests/marketmaking/orderchain/test_biasquoteonpositionelement.py
neilfutureftr/mango-explorer
d8d5740cc53da90414323e8f62f5b6fbfc6ea5ed
[ "MIT" ]
null
null
null
tests/marketmaking/orderchain/test_biasquoteonpositionelement.py
neilfutureftr/mango-explorer
d8d5740cc53da90414323e8f62f5b6fbfc6ea5ed
[ "MIT" ]
null
null
null
import argparse from ...context import mango from decimal import Decimal from mango.marketmaking.orderchain.biasquoteonpositionelement import BiasQuoteOnPositionElement def test_from_args(): args: argparse.Namespace = argparse.Namespace(biasquoteonposition_bias=Decimal(17)) actual: BiasQuoteOnPositionEleme...
38.346667
109
0.730529
import argparse from ...context import mango from decimal import Decimal from mango.marketmaking.orderchain.biasquoteonpositionelement import BiasQuoteOnPositionElement def test_from_args(): args: argparse.Namespace = argparse.Namespace(biasquoteonposition_bias=Decimal(17)) actual: BiasQuoteOnPositionEleme...
true
true
f77bda5ac73933800a58ec311e4413f140bbe953
878
py
Python
tests/factories/indemnity.py
diogolundberg/deputy-overwatch
2f309a2b84c6e57f6ee88c00f06027f135aee795
[ "MIT" ]
2
2017-07-05T14:26:19.000Z
2022-03-13T12:29:22.000Z
tests/factories/indemnity.py
diogolundberg/deputy-overwatch
2f309a2b84c6e57f6ee88c00f06027f135aee795
[ "MIT" ]
1
2021-07-09T10:23:39.000Z
2021-07-09T10:23:39.000Z
tests/factories/indemnity.py
diogolundberg/deputy-overwatch
2f309a2b84c6e57f6ee88c00f06027f135aee795
[ "MIT" ]
null
null
null
import factory import logging from overwatch import db from overwatch.models import Indemnity from faker.providers.date_time import Provider from faker import Faker from factories import DeputyFactory from datetime import datetime logging.getLogger("factory").setLevel(logging.WARN) faker = Faker('pt_BR') faker.add_pr...
30.275862
80
0.740319
import factory import logging from overwatch import db from overwatch.models import Indemnity from faker.providers.date_time import Provider from faker import Faker from factories import DeputyFactory from datetime import datetime logging.getLogger("factory").setLevel(logging.WARN) faker = Faker('pt_BR') faker.add_pr...
true
true
f77bdbbf0d87a406999e4061c255792a9c325326
97
py
Python
src/ptpip/constants/device/functional_mode.py
DethCount/ptpip-d5300
ed2f8a46600f2bb3330a7e5f4d5d47cf93fc10bd
[ "MIT" ]
null
null
null
src/ptpip/constants/device/functional_mode.py
DethCount/ptpip-d5300
ed2f8a46600f2bb3330a7e5f4d5d47cf93fc10bd
[ "MIT" ]
null
null
null
src/ptpip/constants/device/functional_mode.py
DethCount/ptpip-d5300
ed2f8a46600f2bb3330a7e5f4d5d47cf93fc10bd
[ "MIT" ]
null
null
null
from enum import Enum class FunctionalMode(Enum): Normal = 0x00 Sleeping = 0x01
16.166667
27
0.649485
from enum import Enum class FunctionalMode(Enum): Normal = 0x00 Sleeping = 0x01
true
true
f77bdc8bfa1a0a1060a233d9147e5e4175835174
1,541
py
Python
mmcv/ops/ball_query.py
ngonhi/mmcv
fa873fa38f935b016eadd9005454be5c208aa1b2
[ "Apache-2.0" ]
3,748
2018-10-12T08:39:46.000Z
2022-03-31T17:22:55.000Z
mmcv/ops/ball_query.py
ngonhi/mmcv
fa873fa38f935b016eadd9005454be5c208aa1b2
[ "Apache-2.0" ]
1,637
2018-10-12T06:06:18.000Z
2022-03-31T02:20:53.000Z
mmcv/ops/ball_query.py
ngonhi/mmcv
fa873fa38f935b016eadd9005454be5c208aa1b2
[ "Apache-2.0" ]
1,234
2018-10-12T09:28:20.000Z
2022-03-31T15:56:24.000Z
# Copyright (c) OpenMMLab. All rights reserved. import torch from torch.autograd import Function from ..utils import ext_loader ext_module = ext_loader.load_ext('_ext', ['ball_query_forward']) class BallQuery(Function): """Find nearby points in spherical space.""" @staticmethod def forward(ctx, min_rad...
32.787234
77
0.62427
import torch from torch.autograd import Function from ..utils import ext_loader ext_module = ext_loader.load_ext('_ext', ['ball_query_forward']) class BallQuery(Function): @staticmethod def forward(ctx, min_radius: float, max_radius: float, sample_num: int, xyz: torch.Tensor, center_xyz: to...
true
true
f77bdd2058c98a9f48521817f8fe1c5ebc29873f
8,386
py
Python
cmlkit/tune/search/hyperopt.py
sirmarcel/cmlk
e099bf3e255b60675e8e1b3ad29db750dbd6faf3
[ "MIT" ]
24
2018-06-22T17:31:20.000Z
2022-03-29T14:52:49.000Z
cmlkit/tune/search/hyperopt.py
sirmarcel/cmlk
e099bf3e255b60675e8e1b3ad29db750dbd6faf3
[ "MIT" ]
8
2019-06-06T14:51:57.000Z
2021-06-30T19:43:13.000Z
cmlkit/tune/search/hyperopt.py
sirmarcel/cmlk
e099bf3e255b60675e8e1b3ad29db750dbd6faf3
[ "MIT" ]
5
2018-07-30T18:53:08.000Z
2022-02-10T09:12:15.000Z
"""Hyperopt search algorithm.""" import numpy as np from copy import deepcopy import hyperopt as hpo import logging from itertools import count from cmlkit.engine import Component from cmlkit.utility.config_helpers import ( find_pattern_apply_f, find_pattern, tuples_to_lists, ) class Hyperopt(Component)...
32.757813
93
0.63451
import numpy as np from copy import deepcopy import hyperopt as hpo import logging from itertools import count from cmlkit.engine import Component from cmlkit.utility.config_helpers import ( find_pattern_apply_f, find_pattern, tuples_to_lists, ) class Hyperopt(Component): kind = "search_hyperopt" ...
true
true
f77bdd7b4d0db3a77bdd5f79e2f579e6c3d694ad
203
py
Python
conftest.py
4dn-dcic/python-lambda
059f6c3db8847f0ba8295752d2728065efcca1d2
[ "MIT" ]
1
2020-09-24T18:55:57.000Z
2020-09-24T18:55:57.000Z
conftest.py
4dn-dcic/python-lambda
059f6c3db8847f0ba8295752d2728065efcca1d2
[ "MIT" ]
2
2020-03-16T19:21:34.000Z
2022-02-25T22:07:46.000Z
conftest.py
4dn-dcic/python-lambda
059f6c3db8847f0ba8295752d2728065efcca1d2
[ "MIT" ]
2
2019-10-14T14:36:57.000Z
2020-06-17T22:03:32.000Z
import boto3 import pytest from aws_lambda.aws_lambda import ( deploy_function, get_role_name, get_account_id, get_client, function_exists, delete_function, invoke_function )
16.916667
35
0.738916
import boto3 import pytest from aws_lambda.aws_lambda import ( deploy_function, get_role_name, get_account_id, get_client, function_exists, delete_function, invoke_function )
true
true
f77bde4266c97cd1642f7fb3762de8975a805081
14,529
py
Python
program-tester.py
jubias/program-tester-python
cb6371116c56f9aa72588dd629014eab583d3cb0
[ "BSD-3-Clause" ]
1
2017-07-17T18:06:33.000Z
2017-07-17T18:06:33.000Z
program-tester.py
jubias/program-tester-python
cb6371116c56f9aa72588dd629014eab583d3cb0
[ "BSD-3-Clause" ]
null
null
null
program-tester.py
jubias/program-tester-python
cb6371116c56f9aa72588dd629014eab583d3cb0
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # # BSD 3-Clause License # # Copyright (c) 2021, Jakub Romanowski (kotoko) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain ...
24.625424
106
0.688416
import argparse import enum import gettext import os import subprocess import sys import tempfile import textwrap import timeit __version__ = "0.13" app = "program-tester" gettext.bindtextdomain( app, os.path.join( os.path.dirname(os.path.realpath(__file__)), "l10n" ) ) gettext.textdomain(app) _ = get...
true
true
f77bdea451c1738b386e6629ae841cf1d6a2d46c
2,829
py
Python
pype/hosts/celaction/api/cli.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
pype/hosts/celaction/api/cli.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
pype/hosts/celaction/api/cli.py
simonebarbieri/pype
a6dc83aa1300738749cbe8e5e2e6d2d1794e0289
[ "MIT" ]
null
null
null
import os import sys import copy import argparse from avalon import io from avalon.tools import publish import pyblish.api import pyblish.util from pype.api import Logger import pype import pype.hosts.celaction from pype.hosts.celaction import api as celaction log = Logger().get_logger("Celaction_cli_publisher") p...
26.439252
74
0.660304
import os import sys import copy import argparse from avalon import io from avalon.tools import publish import pyblish.api import pyblish.util from pype.api import Logger import pype import pype.hosts.celaction from pype.hosts.celaction import api as celaction log = Logger().get_logger("Celaction_cli_publisher") p...
true
true
f77be0a35b0a2f8a1dd75102afe09fca7f87e284
1,080
py
Python
env/Lib/site-packages/OpenGL/GLES2/APPLE/texture_max_level.py
5gconnectedbike/Navio2
8c3f2b5d8bbbcea1fc08739945183c12b206712c
[ "BSD-3-Clause" ]
210
2016-04-09T14:26:00.000Z
2022-03-25T18:36:19.000Z
env/Lib/site-packages/OpenGL/GLES2/APPLE/texture_max_level.py
5gconnectedbike/Navio2
8c3f2b5d8bbbcea1fc08739945183c12b206712c
[ "BSD-3-Clause" ]
72
2016-09-04T09:30:19.000Z
2022-03-27T17:06:53.000Z
env/Lib/site-packages/OpenGL/GLES2/APPLE/texture_max_level.py
5gconnectedbike/Navio2
8c3f2b5d8bbbcea1fc08739945183c12b206712c
[ "BSD-3-Clause" ]
64
2016-04-09T14:26:49.000Z
2022-03-21T11:19:47.000Z
'''OpenGL extension APPLE.texture_max_level This module customises the behaviour of the OpenGL.raw.GLES2.APPLE.texture_max_level to provide a more Python-friendly API Overview (from the spec) This extension allows an application to specify the maximum (coarsest) mipmap level that may be selected for the specif...
36
75
0.811111
from OpenGL import platform, constant, arrays from OpenGL import extensions, wrapper import ctypes from OpenGL.raw.GLES2 import _types, _glgets from OpenGL.raw.GLES2.APPLE.texture_max_level import * from OpenGL.raw.GLES2.APPLE.texture_max_level import _EXTENSION_NAME def glInitTextureMaxLevelAPPLE(): from OpenGL i...
true
true
f77be16b7f89d79aebe1a26f3209f23949df85a3
9,815
py
Python
tests/utils_tests/test_jslex.py
JBKahn/django
32265361279b3316f5bce8efa71f2049409461e3
[ "PSF-2.0", "BSD-3-Clause" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
tests/utils_tests/test_jslex.py
287977288/test
142e3626ab3c676574631383ae6b5a4eced5a10e
[ "PSF-2.0", "BSD-3-Clause" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
tests/utils_tests/test_jslex.py
287977288/test
142e3626ab3c676574631383ae6b5a4eced5a10e
[ "PSF-2.0", "BSD-3-Clause" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# -*- coding: utf-8 -*- """Tests for jslex.""" # originally from https://bitbucket.org/ned/jslex from __future__ import unicode_literals from django.test import SimpleTestCase from django.utils.jslex import JsLexer, prepare_js_for_gettext class JsTokensTest(SimpleTestCase): LEX_CASES = [ # ids ("...
42.489177
168
0.371065
from __future__ import unicode_literals from django.test import SimpleTestCase from django.utils.jslex import JsLexer, prepare_js_for_gettext class JsTokensTest(SimpleTestCase): LEX_CASES = [ ("a ABC $ _ a123", ["id a", "id ABC", "id $", "id _", "id a123"]), ("\\u1234 abc\\u0020 \\u0065_\...
true
true
f77be2d37013be1fd2a38ec3e056605f63f5b510
6,037
py
Python
bot/cogs/games/hangman.py
janaSunrise/HotWired-Bot
5be765e4e8ca8cd690675a402d5ced452077c989
[ "MIT" ]
16
2020-06-15T02:48:04.000Z
2020-08-28T16:35:05.000Z
bot/cogs/games/hangman.py
Codin-Nerds/HotWired-Bot
5be765e4e8ca8cd690675a402d5ced452077c989
[ "MIT" ]
52
2020-06-10T11:20:42.000Z
2020-08-06T09:15:51.000Z
bot/cogs/games/hangman.py
janaSunrise/HotWired-Bot
5be765e4e8ca8cd690675a402d5ced452077c989
[ "MIT" ]
22
2020-06-18T20:58:06.000Z
2020-08-29T05:27:56.000Z
import random import re import typing as t from collections import defaultdict from os import path from discord import Color, Embed, Guild, Member, Message, TextChannel from discord.ext.commands import Context from bot import config from bot.core.bot import Bot DIR_PATH = path.dirname(__file__) # TODO: Define global...
32.632432
127
0.51996
import random import re import typing as t from collections import defaultdict from os import path from discord import Color, Embed, Guild, Member, Message, TextChannel from discord.ext.commands import Context from bot import config from bot.core.bot import Bot DIR_PATH = path.dirname(__file__) class HangmanGame: ...
true
true
f77be3d10e8dd22f6055cf226ece5749f04386d5
2,716
py
Python
tests/unit/test_r.py
xhochy/repo2docker
67412908b7e5b2cff04789876739e382d1e164ae
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_r.py
xhochy/repo2docker
67412908b7e5b2cff04789876739e382d1e164ae
[ "BSD-3-Clause" ]
2
2019-02-13T20:59:41.000Z
2020-02-12T12:54:15.000Z
tests/unit/test_r.py
xhochy/repo2docker
67412908b7e5b2cff04789876739e382d1e164ae
[ "BSD-3-Clause" ]
null
null
null
from datetime import date import pytest from repo2docker import buildpacks def test_unsupported_version(tmpdir): tmpdir.chdir() with open("runtime.txt", "w") as f: f.write("r-3.8-2019-01-01") r = buildpacks.RBuildPack() with pytest.raises(ValueError) as excinfo: # access the proper...
24.690909
83
0.618189
from datetime import date import pytest from repo2docker import buildpacks def test_unsupported_version(tmpdir): tmpdir.chdir() with open("runtime.txt", "w") as f: f.write("r-3.8-2019-01-01") r = buildpacks.RBuildPack() with pytest.raises(ValueError) as excinfo: _ = r.r_ver...
true
true
f77be50bfc986ea8b7ce683cde5a6c1ea67d205d
1,250
py
Python
losses.py
williamdjones/cv_assignment_5
d1fc46b26e44ab0fd14b62ea4f8f12b7c8d43678
[ "MIT" ]
null
null
null
losses.py
williamdjones/cv_assignment_5
d1fc46b26e44ab0fd14b62ea4f8f12b7c8d43678
[ "MIT" ]
null
null
null
losses.py
williamdjones/cv_assignment_5
d1fc46b26e44ab0fd14b62ea4f8f12b7c8d43678
[ "MIT" ]
null
null
null
import numpy as np from keras import backend as K # # Tuning these will adjust the output of your network # class_weights[0] = penalty for misclassifying background # class_weights[1] = penalty for misclassifying unknown # class_weights[2] = penalty for misclassifying foreground # Setting class_weights = [.25,0,1] ...
29.761905
83
0.6984
import numpy as np from keras import backend as K # def load_myloss(weights=None): if weights is None: class_weights = [0.25, 0, 1] else: class_weights = weights class_weights = np.array(class_weights, dtype=np.float32).reshape((1, 1, 1, 3)) def myloss(y_true, y_pred): y_tr...
true
true
f77be56a5aad59861f011f067b06242e8b9714f2
1,264
py
Python
9term/fipt/P2PLending/lending/migrations/0002_auto_20161203_0618.py
nik-sergeson/bsuir-informatics-labs
14805fb83b8e2324580b6253158565068595e804
[ "Apache-2.0" ]
null
null
null
9term/fipt/P2PLending/lending/migrations/0002_auto_20161203_0618.py
nik-sergeson/bsuir-informatics-labs
14805fb83b8e2324580b6253158565068595e804
[ "Apache-2.0" ]
null
null
null
9term/fipt/P2PLending/lending/migrations/0002_auto_20161203_0618.py
nik-sergeson/bsuir-informatics-labs
14805fb83b8e2324580b6253158565068595e804
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import djmoney.models.fields class Migration(migrations.Migration): dependencies = [ ('lending', '0001_initial'), ] operations = [ migrations.CreateModel( name='...
33.263158
139
0.61788
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import djmoney.models.fields class Migration(migrations.Migration): dependencies = [ ('lending', '0001_initial'), ] operations = [ migrations.CreateModel( name='...
true
true
f77be56f323c130bf005b3a30797628fe0031f20
9,134
py
Python
json_loader.py
sandy358/data-warehouse-client
c8fe154f1268cf3263d4cbce484b5b00f9a16cfc
[ "Apache-2.0" ]
null
null
null
json_loader.py
sandy358/data-warehouse-client
c8fe154f1268cf3263d4cbce484b5b00f9a16cfc
[ "Apache-2.0" ]
null
null
null
json_loader.py
sandy358/data-warehouse-client
c8fe154f1268cf3263d4cbce484b5b00f9a16cfc
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Newcastle University. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
41.330317
123
0.664112
import data_warehouse import json import sys def load_json_file(fname:str): try: with open(fname, 'r') as jIn: j = json.load(jIn) return j except Exception as e: sys.exit("Unable to load the json file! Exiting.\n" + str(e)) def mk_01(s:str): if s == 'N': ...
true
true
f77be638b34581fe7605e08233714651a4715b25
707
py
Python
CAAPR/CAAPR_AstroMagic/PTS/pts/modeling/config/fit_sed.py
wdobbels/CAAPR
50d0b32642a61af614c22f1c6dc3c4a00a1e71a3
[ "MIT" ]
7
2016-05-20T21:56:39.000Z
2022-02-07T21:09:48.000Z
CAAPR/CAAPR_AstroMagic/PTS/pts/modeling/config/fit_sed.py
wdobbels/CAAPR
50d0b32642a61af614c22f1c6dc3c4a00a1e71a3
[ "MIT" ]
1
2019-03-21T16:10:04.000Z
2019-03-22T17:21:56.000Z
CAAPR/CAAPR_AstroMagic/PTS/pts/modeling/config/fit_sed.py
wdobbels/CAAPR
50d0b32642a61af614c22f1c6dc3c4a00a1e71a3
[ "MIT" ]
1
2020-05-19T16:17:17.000Z
2020-05-19T16:17:17.000Z
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** # ...
35.35
67
0.429986
from pts.core.basics.configuration import ConfigurationDefinition definition = Configuration() definition.add_flag("visualise", "make visualisations")
true
true
f77be70f6f574eaf783f1c16fe62a26b7a1410dd
7,551
py
Python
monoscene/loss/sscMetrics.py
Teaksters/MonoScene
0a5803052b54e57eb98556e53d3bf45be890b269
[ "Apache-2.0" ]
122
2021-12-02T05:18:29.000Z
2022-03-31T13:07:16.000Z
monoscene/loss/sscMetrics.py
Teaksters/MonoScene
0a5803052b54e57eb98556e53d3bf45be890b269
[ "Apache-2.0" ]
16
2021-12-17T02:59:21.000Z
2022-03-25T10:47:46.000Z
monoscene/loss/sscMetrics.py
Teaksters/MonoScene
0a5803052b54e57eb98556e53d3bf45be890b269
[ "Apache-2.0" ]
17
2021-12-09T11:34:16.000Z
2022-03-17T03:26:23.000Z
""" Part of the code is taken from https://github.com/waterljwant/SSC/blob/master/sscMetrics.py """ import numpy as np from sklearn.metrics import accuracy_score, precision_recall_fscore_support def get_iou(iou_sum, cnt_class): _C = iou_sum.shape[0] # 12 iou = np.zeros(_C, dtype=np.float32) # iou for each c...
36.834146
98
0.553569
import numpy as np from sklearn.metrics import accuracy_score, precision_recall_fscore_support def get_iou(iou_sum, cnt_class): _C = iou_sum.shape[0] iou = np.zeros(_C, dtype=np.float32) for idx in range(_C): iou[idx] = iou_sum[idx] / cnt_class[idx] if cnt_class[idx] else 0 mean_iou = np.su...
true
true
f77be8dc4d71a18ac3b94f4adcce6c844248a322
635
py
Python
docs/source/setup.py
jayanthyetukuri/CARLA
c3f3aaf11a5a8499c4bec5065e0c17ec8e6f5950
[ "MIT" ]
140
2021-08-03T21:53:32.000Z
2022-03-20T08:52:02.000Z
docs/source/setup.py
jayanthyetukuri/CARLA
c3f3aaf11a5a8499c4bec5065e0c17ec8e6f5950
[ "MIT" ]
54
2021-03-07T18:22:16.000Z
2021-08-03T12:06:31.000Z
docs/source/setup.py
jayanthyetukuri/CARLA
c3f3aaf11a5a8499c4bec5065e0c17ec8e6f5950
[ "MIT" ]
16
2021-08-23T12:14:58.000Z
2022-03-01T00:52:58.000Z
from setuptools import setup VERSION = "0.0.1" setup( name="carla", version=VERSION, package_dir={"carla": "carla"}, install_requires=[ "scipy==1.6.2", "lime==0.2.0.1", "mip==1.12.0", "numpy==1.19.4", "pandas==1.1.4", "scikit-learn==0.23.2", "ten...
21.166667
48
0.453543
from setuptools import setup VERSION = "0.0.1" setup( name="carla", version=VERSION, package_dir={"carla": "carla"}, install_requires=[ "scipy==1.6.2", "lime==0.2.0.1", "mip==1.12.0", "numpy==1.19.4", "pandas==1.1.4", "scikit-learn==0.23.2", "ten...
true
true
f77be96f3c8bb9c286a5a6e13bccfa632d1cc207
1,321
py
Python
etc/conf/dev/base.py
abhi27-web/scancode-toolk
66f59168fb7824ab9be332712dcaf16340e1aa22
[ "Apache-2.0", "CC0-1.0" ]
1
2020-06-24T16:03:52.000Z
2020-06-24T16:03:52.000Z
etc/conf/dev/base.py
abhi27-web/scancode-toolk
66f59168fb7824ab9be332712dcaf16340e1aa22
[ "Apache-2.0", "CC0-1.0" ]
1
2021-06-02T02:54:43.000Z
2021-06-02T02:54:43.000Z
etc/conf/dev/base.py
abhi27-web/scancode-toolk
66f59168fb7824ab9be332712dcaf16340e1aa22
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
from __future__ import absolute_import """ This base config script gets automatically executed for all platforms via configure if the "dev" sub-configuration is specified (which is the default). """ from os import makedirs from os import path import shutil scancode_root_dir = path.dirname( # etc path.dirnam...
25.403846
92
0.67676
from __future__ import absolute_import from os import makedirs from os import path import shutil scancode_root_dir = path.dirname( path.dirname( path.dirname( path.dirname(__file__) ) ) ) def setup_dev_mode(): with open(path.join(scancode_root_dir, '...
true
true
f77bea12822f57d26dac684025d36f411ca35294
1,700
py
Python
my_emcee/moves/move.py
s-ilic/emcee
2d6dc5f0e298dfabbdf7460bccc81c1ef1053b5e
[ "MIT" ]
null
null
null
my_emcee/moves/move.py
s-ilic/emcee
2d6dc5f0e298dfabbdf7460bccc81c1ef1053b5e
[ "MIT" ]
null
null
null
my_emcee/moves/move.py
s-ilic/emcee
2d6dc5f0e298dfabbdf7460bccc81c1ef1053b5e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division, print_function import numpy as np __all__ = ["Move"] class Move(object): def tune(self, state, accepted): pass def update(self, old_state, new_state, accepted, subset=None): ...
32.692308
77
0.583529
from __future__ import division, print_function import numpy as np __all__ = ["Move"] class Move(object): def tune(self, state, accepted): pass def update(self, old_state, new_state, accepted, subset=None): if subset is None: ...
true
true
f77bea247762110434edfe4aeced5ba20c6a5e10
2,297
py
Python
OthelloAI/src/ai/gameState.py
mario31274/Othello-AI
e3ca177a4e9167f67286fe6a0075a2f51e1ab836
[ "MIT" ]
null
null
null
OthelloAI/src/ai/gameState.py
mario31274/Othello-AI
e3ca177a4e9167f67286fe6a0075a2f51e1ab836
[ "MIT" ]
null
null
null
OthelloAI/src/ai/gameState.py
mario31274/Othello-AI
e3ca177a4e9167f67286fe6a0075a2f51e1ab836
[ "MIT" ]
null
null
null
from src.game.gameBoard import INIT_BOARD class GameState: def __init__(self, state = None): if state != None: if len(state) != 8: raise Exception("init Error: Board size error") for l in state: if len(l) != 8: raise Exception("ini...
31.902778
84
0.533304
from src.game.gameBoard import INIT_BOARD class GameState: def __init__(self, state = None): if state != None: if len(state) != 8: raise Exception("init Error: Board size error") for l in state: if len(l) != 8: raise Exception("ini...
true
true
f77beaafc8bc3feb8275b7f1cbae14355194a021
1,601
py
Python
Classification/NaiveBayesNumpy.py
VallabhK/MachineLearning
bbe900e3449dc4aa154679be9435746703bc8b73
[ "MIT" ]
null
null
null
Classification/NaiveBayesNumpy.py
VallabhK/MachineLearning
bbe900e3449dc4aa154679be9435746703bc8b73
[ "MIT" ]
1
2021-06-08T20:33:32.000Z
2021-06-08T20:33:32.000Z
Classification/NaiveBayesNumpy.py
VallabhK/MachineLearning
bbe900e3449dc4aa154679be9435746703bc8b73
[ "MIT" ]
null
null
null
#Naive Bayes Classifier using Numpy import numpy as np class NaiveBayes: def fit(self, X, y): """Function to establish relation between dependent and independent variable Args: X: Independent variable y: Dependent variable Returns: None """ n_samples, ...
32.02
81
0.562149
import numpy as np class NaiveBayes: def fit(self, X, y): """Function to establish relation between dependent and independent variable Args: X: Independent variable y: Dependent variable Returns: None """ n_samples, n_features = X.shape self._cl...
false
true
f77bec31eb11665c0e28202e48a6ea977ae99e7c
447
py
Python
async/p23.py
ls-2018/tips
1f5f5195d7181b5dd4616db02166f7f92c97f1cd
[ "MIT" ]
2
2019-05-07T03:08:25.000Z
2020-05-22T10:10:00.000Z
async/p23.py
ls-2018/tips
1f5f5195d7181b5dd4616db02166f7f92c97f1cd
[ "MIT" ]
7
2020-05-22T13:29:42.000Z
2021-09-23T23:30:25.000Z
async/p23.py
ls-2018/py
1f5f5195d7181b5dd4616db02166f7f92c97f1cd
[ "MIT" ]
null
null
null
import asyncio import random async def work(i): print(await asyncio.sleep(random.randint(0, i))) result = f'work {i}' async def main(): # print(work(1),type(work(1))) # print(asyncio.ensure_future(work(1)),type(asyncio.ensure_future(work(1)))) # tasks = [asyncio.ensure_future(work(i)) for i in r...
11.175
80
0.626398
import asyncio import random async def work(i): print(await asyncio.sleep(random.randint(0, i))) result = f'work {i}' async def main(): tasks = [work(i) for i in range(10)] await asyncio.gather(*tasks) asyncio.run(main())
true
true
f77bec757bb0bf35d3bd6f4adb22ab5abc1fe10a
517
py
Python
cryptography/functions/utils/generateKey.py
ItaloPussi/pythonProjects
319475bb7d8f80a9648f18760d8b675b1f4a4151
[ "MIT" ]
1
2021-06-05T23:07:17.000Z
2021-06-05T23:07:17.000Z
cryptography/functions/utils/generateKey.py
ItaloPussi/pythonProjects
319475bb7d8f80a9648f18760d8b675b1f4a4151
[ "MIT" ]
null
null
null
cryptography/functions/utils/generateKey.py
ItaloPussi/pythonProjects
319475bb7d8f80a9648f18760d8b675b1f4a4151
[ "MIT" ]
null
null
null
def generateKey(userKey): valueSum = 0 for idx,value in enumerate(userKey): # It's even? If so multiply the index by ascii code and then put on sum variable if(idx % 2 == 0 and idx!=0): valueSum+=(idx*ord(value)) # If not, just put the ascii code in the sum variable ...
28.722222
88
0.611219
def generateKey(userKey): valueSum = 0 for idx,value in enumerate(userKey): if(idx % 2 == 0 and idx!=0): valueSum+=(idx*ord(value)) # If not, just put the ascii code in the sum variable else: valueSum+=ord(value) valueSum = str(valueSum % 100000) ...
true
true
f77bec81f49df4807d805d016f28e7df288fd1db
7,891
py
Python
Models/common/model_builder.py
UTS-AnimalLogicAcademy/nuke-ML-server
3bec5e9efc1f3101e7506401eb57e7b8c955f84c
[ "Apache-2.0" ]
123
2019-05-14T19:50:42.000Z
2022-03-21T11:32:30.000Z
Models/common/model_builder.py
UTS-AnimalLogicAcademy/nuke-ML-server
3bec5e9efc1f3101e7506401eb57e7b8c955f84c
[ "Apache-2.0" ]
30
2019-05-23T18:48:29.000Z
2021-06-26T01:17:13.000Z
Models/common/model_builder.py
UTS-AnimalLogicAcademy/nuke-ML-server
3bec5e9efc1f3101e7506401eb57e7b8c955f84c
[ "Apache-2.0" ]
34
2019-05-14T17:43:26.000Z
2021-11-10T23:53:02.000Z
# Copyright (c) 2019 Foundry. # # 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,...
45.612717
126
0.622101
from builtins import range import tensorflow as tf class ResNetBlock(tf.keras.layers.Layer): def __init__(self, new_dim=32, ksize=5, name='resblock'): super(ResNetBlock, self).__init__(name=name) self.conv2D_1 = tf.keras.layers.Conv2D( filters=new_dim, kernel_size=ksize, padding='SAME...
true
true
f77bedbffa962349ccbb1e6cdbe26aa53149d7fd
1,617
py
Python
marrow/mailer/logger.py
digiturtle/mailer
3b718f415a4a955ba0fdb7e7ae135c0ab1f9d900
[ "MIT" ]
166
2016-02-17T01:48:21.000Z
2022-03-21T13:46:48.000Z
marrow/mailer/logger.py
digiturtle/mailer
3b718f415a4a955ba0fdb7e7ae135c0ab1f9d900
[ "MIT" ]
47
2016-02-15T13:31:24.000Z
2022-02-22T05:07:58.000Z
marrow/mailer/logger.py
digiturtle/mailer
3b718f415a4a955ba0fdb7e7ae135c0ab1f9d900
[ "MIT" ]
49
2016-02-26T10:14:38.000Z
2022-03-19T01:37:14.000Z
# encoding: utf-8 import logging from marrow.mailer import Mailer class MailHandler(logging.Handler): """A class which sends records out via e-mail. This handler should be configured using the same configuration directives that Marrow Mailer itself understands. Be careful how many notific...
27.87931
76
0.612863
import logging from marrow.mailer import Mailer class MailHandler(logging.Handler): def __init__(self, *args, **config): logging.Handler.__init__(self) self.config = dict() if args: config.update(dict(zip(*[iter(args)]*2))) se...
true
true
f77bede2a534068ad8fa829f9665781f66011484
13,114
py
Python
sdk/python/pulumi_azure_native/network/v20191101/express_route_circuit_authorization.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20191101/express_route_circuit_authorization.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20191101/express_route_circuit_authorization.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
82.477987
6,429
0.753317
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from ._enums import * __all__ = ['ExpressRouteCircuitAuthorization'] class ExpressRouteCircuitAuthorization(pulumi.CustomResource): def __init__(__self__, ...
true
true
f77bedfe3bfca571f9517817dac6d31b300b55cf
4,370
py
Python
3. Python Advanced (September 2021)/3.2 Python OOP (October 2021)/10. Exercise - Static and Class Methods/03_document_management/main.py
kzborisov/SoftUni
ccb2b8850adc79bfb2652a45124c3ff11183412e
[ "MIT" ]
2
2022-03-04T11:39:03.000Z
2022-03-13T07:13:23.000Z
3. Python Advanced (September 2021)/3.2 Python OOP (October 2021)/10. Exercise - Static and Class Methods/03_document_management/main.py
kzborisov/softuni
9c5b45c74fa7d9748e9b3ea65a5ae4e15c142751
[ "MIT" ]
null
null
null
3. Python Advanced (September 2021)/3.2 Python OOP (October 2021)/10. Exercise - Static and Class Methods/03_document_management/main.py
kzborisov/softuni
9c5b45c74fa7d9748e9b3ea65a5ae4e15c142751
[ "MIT" ]
null
null
null
from project.category import Category from project.document import Document from project.storage import Storage from project.topic import Topic import unittest class TestDocumentManagement(unittest.TestCase): def setUp(self): self.c = Category(1, "C") self.t = Topic(1, "T", "C:\\user") se...
32.61194
86
0.6373
from project.category import Category from project.document import Document from project.storage import Storage from project.topic import Topic import unittest class TestDocumentManagement(unittest.TestCase): def setUp(self): self.c = Category(1, "C") self.t = Topic(1, "T", "C:\\user") se...
true
true
f77bee1982f65a718acd0d06c69f7f1116bdff0e
5,145
py
Python
pyaimsalgo/python/soma/aimsalgo/tests/test_geometric.py
brainvisa/aims-free
5852c1164292cadefc97cecace022d14ab362dc4
[ "CECILL-B" ]
4
2019-07-09T05:34:10.000Z
2020-10-16T00:03:15.000Z
pyaimsalgo/python/soma/aimsalgo/tests/test_geometric.py
brainvisa/aims-free
5852c1164292cadefc97cecace022d14ab362dc4
[ "CECILL-B" ]
72
2018-10-31T14:52:50.000Z
2022-03-04T11:22:51.000Z
pyaimsalgo/python/soma/aimsalgo/tests/test_geometric.py
brainvisa/aims-free
5852c1164292cadefc97cecace022d14ab362dc4
[ "CECILL-B" ]
null
null
null
# -*- coding: utf-8 -*- # This software and supporting documentation are distributed by # Institut Federatif de Recherche 49 # CEA/NeuroSpin, Batiment 145, # 91191 Gif-sur-Yvette cedex # France # # This software is governed by the CeCILL-B license under # French law and abiding by the rules of dist...
38.395522
79
0.566181
# economic rights, and the successive licensors have only limited # liability. # # In this respect, the user's attention is drawn to the risks associated # requirements in conditions enabling the security of their systems and/or # data to be ensured and, more generally, to use and operate it in the # same condition...
true
true
f77bee5a7179054a8bcb217193e7a613175e4efe
18,314
py
Python
data/user_params.py
yafeiwang89/immunesys_ode
7de737f809985034131cd521cb46bf69e44798eb
[ "BSD-3-Clause" ]
null
null
null
data/user_params.py
yafeiwang89/immunesys_ode
7de737f809985034131cd521cb46bf69e44798eb
[ "BSD-3-Clause" ]
null
null
null
data/user_params.py
yafeiwang89/immunesys_ode
7de737f809985034131cd521cb46bf69e44798eb
[ "BSD-3-Clause" ]
null
null
null
# This file is auto-generated from a Python script that parses a PhysiCell configuration (.xml) file. # # Edit at your own risk. # import os from ipywidgets import Label,Text,Checkbox,Button,HBox,VBox,FloatText,IntText,BoundedIntText,BoundedFloatText,Layout,Box class UserTab(object): def __init__(...
54.996997
136
0.691111
import os from ipywidgets import Label,Text,Checkbox,Button,HBox,VBox,FloatText,IntText,BoundedIntText,BoundedFloatText,Layout,Box class UserTab(object): def __init__(self): micron_units = Label('micron') constWidth = '180px' tab_height = '500px' stepsi...
true
true
f77bef42e0575584a3aea34da0926a8363863c11
2,030
py
Python
loss/grad_loss.py
zhigangjiang/LGT-Net
d9a619158b2dc66a50c100e7fa7e491f1df16fd7
[ "MIT" ]
11
2022-03-03T17:49:33.000Z
2022-03-25T11:23:11.000Z
loss/grad_loss.py
zhigangjiang/LGT-Net
d9a619158b2dc66a50c100e7fa7e491f1df16fd7
[ "MIT" ]
null
null
null
loss/grad_loss.py
zhigangjiang/LGT-Net
d9a619158b2dc66a50c100e7fa7e491f1df16fd7
[ "MIT" ]
1
2022-03-04T06:39:50.000Z
2022-03-04T06:39:50.000Z
""" @Date: 2021/08/12 @description: """ import torch import torch.nn as nn import numpy as np from visualization.grad import get_all class GradLoss(nn.Module): def __init__(self): super().__init__() self.loss = nn.L1Loss() self.cos = nn.CosineSimilarity(dim=-1, eps=0) self.grad...
35
113
0.667488
import torch import torch.nn as nn import numpy as np from visualization.grad import get_all class GradLoss(nn.Module): def __init__(self): super().__init__() self.loss = nn.L1Loss() self.cos = nn.CosineSimilarity(dim=-1, eps=0) self.grad_conv = nn.Conv1d(1, 1, kernel_size=3, st...
true
true
f77befa83cf2914313d51ff9e7931425c66499dd
6,847
py
Python
src/code_submission/2_pasanju/preprocessing/prepredict.py
NehzUx/AutoGraph-KDDCup2020
d2fc228f4ccc5785db3129cca0445a80b6fef11d
[ "MIT" ]
1
2021-12-06T14:59:55.000Z
2021-12-06T14:59:55.000Z
src/code_submission/2_pasanju/preprocessing/prepredict.py
NehzUx/AutoGraph-Benchmark
d2fc228f4ccc5785db3129cca0445a80b6fef11d
[ "MIT" ]
null
null
null
src/code_submission/2_pasanju/preprocessing/prepredict.py
NehzUx/AutoGraph-Benchmark
d2fc228f4ccc5785db3129cca0445a80b6fef11d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time: 2020/5/14 20:41 # @Author: Mecthew import time import numpy as np import pandas as pd import scipy from sklearn.svm import LinearSVC from sklearn.linear_model import logistic from sklearn.calibration import CalibratedClassifierCV from sklearn.metrics import ac...
43.062893
117
0.676355
import time import numpy as np import pandas as pd import scipy from sklearn.svm import LinearSVC from sklearn.linear_model import logistic from sklearn.calibration import CalibratedClassifierCV from sklearn.metrics import accuracy_score from sklearn.preprocessing import OneHotEncoder import scipy.sparse as sp from ut...
true
true
f77bf267b1e3ec6fdf2abc84a20c8b118e2533e0
1,708
py
Python
profiles_api/migrations/0001_initial.py
acrylicus/profiles-rest-api
9d0755267c69739fe5df54e52f37295d2d349e27
[ "MIT" ]
null
null
null
profiles_api/migrations/0001_initial.py
acrylicus/profiles-rest-api
9d0755267c69739fe5df54e52f37295d2d349e27
[ "MIT" ]
6
2021-03-19T11:42:04.000Z
2022-02-10T11:54:16.000Z
profiles_api/migrations/0001_initial.py
acrylicus/profiles-rest-api
9d0755267c69739fe5df54e52f37295d2d349e27
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-07-02 13:17 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserProfile', ...
50.235294
266
0.638759
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserProfile', fields=[ ('id', models.Aut...
true
true