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
08fbce9d86d231346f4f8865b0c88221420bb308
1,112
py
Python
test_king.py
smabe777/chess_master
a3d67da86ec0849f4c720ea85a9b9c70049edff7
[ "Apache-2.0" ]
null
null
null
test_king.py
smabe777/chess_master
a3d67da86ec0849f4c720ea85a9b9c70049edff7
[ "Apache-2.0" ]
null
null
null
test_king.py
smabe777/chess_master
a3d67da86ec0849f4c720ea85a9b9c70049edff7
[ "Apache-2.0" ]
null
null
null
from test import Test from position import Position from king import King from chess import Chess class Test_King (Test): def __init__(self, game): self.game = game self.king = King(game, Chess.WHITE, Position(game,'E5')) def test_valid_move(self): self.t_assert("K-E5 -> E6 is OK", self...
42.769231
104
0.65018
from test import Test from position import Position from king import King from chess import Chess class Test_King (Test): def __init__(self, game): self.game = game self.king = King(game, Chess.WHITE, Position(game,'E5')) def test_valid_move(self): self.t_assert("K-E5 -> E6 is OK", self...
true
true
08fbced2a9dae98e2c65e378c104d9e23adb0994
3,447
py
Python
meraki/api/switch_port_schedules.py
fsandberg/dashboard-api-python
c01ff038643a39bd12660d2719375eeb05c7ba24
[ "MIT" ]
null
null
null
meraki/api/switch_port_schedules.py
fsandberg/dashboard-api-python
c01ff038643a39bd12660d2719375eeb05c7ba24
[ "MIT" ]
null
null
null
meraki/api/switch_port_schedules.py
fsandberg/dashboard-api-python
c01ff038643a39bd12660d2719375eeb05c7ba24
[ "MIT" ]
null
null
null
class SwitchPortSchedules(object): def __init__(self, session): super(SwitchPortSchedules, self).__init__() self._session = session def getNetworkSwitchPortSchedules(self, networkId: str): """ **List switch port schedules** https://developer.cisco.com/docs/meraki-api...
37.467391
120
0.630983
class SwitchPortSchedules(object): def __init__(self, session): super(SwitchPortSchedules, self).__init__() self._session = session def getNetworkSwitchPortSchedules(self, networkId: str): metadata = { 'tags': ['Switch port schedules'], 'operation': 'getNetw...
true
true
08fbced37f98f25cd248e3306e86088c8daac578
2,186
py
Python
src/user/service.py
wuttinanhi/flask-simple-auth
03755791cb7ef9e16c928741cbe4b3fbc2e65be5
[ "MIT" ]
null
null
null
src/user/service.py
wuttinanhi/flask-simple-auth
03755791cb7ef9e16c928741cbe4b3fbc2e65be5
[ "MIT" ]
null
null
null
src/user/service.py
wuttinanhi/flask-simple-auth
03755791cb7ef9e16c928741cbe4b3fbc2e65be5
[ "MIT" ]
null
null
null
""" user service class """ # pylint: disable=no-member from __future__ import annotations import bcrypt from sqlalchemy.exc import IntegrityError from sqlalchemy.orm.session import Session from src.database import db from src.exception import UserAlreadyExistsException from src.exception.user_not_found import UserN...
30.788732
78
0.629918
from __future__ import annotations import bcrypt from sqlalchemy.exc import IntegrityError from sqlalchemy.orm.session import Session from src.database import db from src.exception import UserAlreadyExistsException from src.exception.user_not_found import UserNotFoundException from src.user.model import User class Us...
true
true
08fbceedda41492761dc9082a13cd3b64712e1b1
4,198
py
Python
xmas_final.py
pwicks86/Weihnachtsmann
afcf8a49ad69779b387de2dfe314f5db5b820944
[ "MIT" ]
null
null
null
xmas_final.py
pwicks86/Weihnachtsmann
afcf8a49ad69779b387de2dfe314f5db5b820944
[ "MIT" ]
null
null
null
xmas_final.py
pwicks86/Weihnachtsmann
afcf8a49ad69779b387de2dfe314f5db5b820944
[ "MIT" ]
null
null
null
import board import random import neopixel import time from touchio import TouchIn from math import floor from digitalio import DigitalInOut, Direction, Pull numpix = 60 strip = neopixel.NeoPixel(board.D1, numpix, brightness=1, auto_write=False) blue = (0,0,255) green = (0,255,0) red = (255,0,0) white = (255,255,255...
25.91358
93
0.556932
import board import random import neopixel import time from touchio import TouchIn from math import floor from digitalio import DigitalInOut, Direction, Pull numpix = 60 strip = neopixel.NeoPixel(board.D1, numpix, brightness=1, auto_write=False) blue = (0,0,255) green = (0,255,0) red = (255,0,0) white = (255,255,255...
true
true
08fbcef7625ee61528bacd5a4e20cf187c3a998d
4,060
py
Python
cookiecutter/repository.py
dianakolusheva/cookiecutter
72322521b7c401916ed71a2a4f0aec048f5060d2
[ "BSD-3-Clause" ]
3
2015-07-23T09:53:27.000Z
2016-08-13T14:46:54.000Z
cookiecutter/repository.py
dianakolusheva/cookiecutter
72322521b7c401916ed71a2a4f0aec048f5060d2
[ "BSD-3-Clause" ]
1
2019-09-19T16:43:34.000Z
2019-09-19T16:43:34.000Z
cookiecutter/repository.py
dianakolusheva/cookiecutter
72322521b7c401916ed71a2a4f0aec048f5060d2
[ "BSD-3-Clause" ]
2
2017-10-20T13:12:25.000Z
2022-02-14T05:30:32.000Z
# -*- coding: utf-8 -*- """Cookiecutter repository functions.""" from __future__ import unicode_literals import os import re from .exceptions import RepositoryNotFound from .vcs import clone from .zipfile import unzip REPO_REGEX = re.compile(r""" # something like git:// ssh:// file:// etc. ((((git|hg)\+)?(git|ssh|f...
32.48
79
0.666256
from __future__ import unicode_literals import os import re from .exceptions import RepositoryNotFound from .vcs import clone from .zipfile import unzip REPO_REGEX = re.compile(r""" # something like git:// ssh:// file:// etc. ((((git|hg)\+)?(git|ssh|file|https?):(//)?) | # or ...
true
true
08fbcf86b309491c0e2a4e6935df1b952f5a864d
22,485
py
Python
lib/markdown/blockprocessors.py
ParadiseDS/sublimetext-markdown-slideshow
b2bb2600e373341ccb9f8a0ba9ad2b799ab5b380
[ "MIT" ]
50
2015-01-13T04:57:49.000Z
2021-04-10T21:51:52.000Z
lib/markdown/blockprocessors.py
ParadiseDS/sublimetext-markdown-slideshow
b2bb2600e373341ccb9f8a0ba9ad2b799ab5b380
[ "MIT" ]
6
2015-01-03T04:00:39.000Z
2018-03-03T08:40:05.000Z
lib/markdown/blockprocessors.py
ParadiseDS/sublimetext-markdown-slideshow
b2bb2600e373341ccb9f8a0ba9ad2b799ab5b380
[ "MIT" ]
11
2015-01-17T17:58:36.000Z
2019-12-15T17:34:08.000Z
""" CORE MARKDOWN BLOCKPARSER =========================================================================== This parser handles basic parsing of Markdown blocks. It doesn't concern itself with inline elements such as **bold** or *italics*, but rather just catches blocks, lists, quotes, etc. The BlockParser is made up ...
40.223614
102
0.56958
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import logging import re from . import util from .blockparser import BlockParser logger = logging.getLogger('MARKDOWN') def build_block_parser(md_instance, **kwargs): parser = BlockParser(md_instance)...
true
true
08fbd17d167ce9a396a4d7e91b58a80054961792
14,743
py
Python
tools/odrive/tests/uart_ascii_test.py
deafloo/ODrive
bae459bb71b39c0169f4b8a322b7371eada58112
[ "MIT" ]
1,068
2016-05-31T22:39:08.000Z
2020-12-20T22:13:01.000Z
tools/odrive/tests/uart_ascii_test.py
deafloo/ODrive
bae459bb71b39c0169f4b8a322b7371eada58112
[ "MIT" ]
389
2017-10-16T09:44:20.000Z
2020-12-21T14:19:38.000Z
tools/odrive/tests/uart_ascii_test.py
deafloo/ODrive
bae459bb71b39c0169f4b8a322b7371eada58112
[ "MIT" ]
681
2016-06-12T01:41:00.000Z
2020-12-21T12:49:32.000Z
import test_runner import struct import time import os import io import functools import operator from fibre.utils import Logger from odrive.enums import * from test_runner import * def append_checksum(command): return command + b'*' + str(functools.reduce(operator.xor, command)).encode('ascii') def strip_che...
43.489676
170
0.627416
import test_runner import struct import time import os import io import functools import operator from fibre.utils import Logger from odrive.enums import * from test_runner import * def append_checksum(command): return command + b'*' + str(functools.reduce(operator.xor, command)).encode('ascii') def strip_che...
true
true
08fbd1ca724dd10b2a46069cfa3ac397dcbd99cb
473
py
Python
Lib/site-packages/plotly/validators/violin/_width.py
tytanya/my-first-blog
2b40adb0816c3546e90ad6ca1e7fb50d924c1536
[ "bzip2-1.0.6" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/violin/_width.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
6
2021-03-18T22:27:08.000Z
2022-03-11T23:40:50.000Z
plotly/validators/violin/_width.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name='width', parent_name='violin', **kwargs): super(WidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit...
31.533333
76
0.627907
import _plotly_utils.basevalidators class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name='width', parent_name='violin', **kwargs): super(WidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit...
true
true
08fbd2337a9045fc13f3c800ca04b0696df22ee2
4,834
py
Python
personal_env/lib/python3.8/site-packages/astroid/brain/brain_subprocess.py
jestinmwilson/personal-website
6e47a7f33ed3b1ca5c1d42c89c5380d22992ed74
[ "MIT" ]
null
null
null
personal_env/lib/python3.8/site-packages/astroid/brain/brain_subprocess.py
jestinmwilson/personal-website
6e47a7f33ed3b1ca5c1d42c89c5380d22992ed74
[ "MIT" ]
null
null
null
personal_env/lib/python3.8/site-packages/astroid/brain/brain_subprocess.py
jestinmwilson/personal-website
6e47a7f33ed3b1ca5c1d42c89c5380d22992ed74
[ "MIT" ]
null
null
null
# Copyright (c) 2016-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2017 Hugo <hugovk@users.noreply.github.com> # Copyright (c) 2018 Peter Talley <peterctalley@gmail.com> # Copyright (c) 2018 Bryce Guinta <bryce.paul.guinta@gmail.com> # Copyright (c) 2019 Hugo van Kemenade <hugovk@users.noreply.github.co...
32.884354
87
0.532478
import sys import textwrap import astroid PY37 = sys.version_info >= (3, 7) PY36 = sys.version_info >= (3, 6) def _subprocess_transform(): communicate = (bytes("string", "ascii"), bytes("string", "ascii")) communicate_signature = "def communicate(self, input=None, timeout=None)" if PY3...
true
true
08fbd2caaba4bfcce30f566e05b356d741dbf22e
6,264
py
Python
tests/test_client.py
mjcaley/spamc
67c4f2b13d569238ea24794eb5253a1416226a2a
[ "MIT" ]
null
null
null
tests/test_client.py
mjcaley/spamc
67c4f2b13d569238ea24794eb5253a1416226a2a
[ "MIT" ]
null
null
null
tests/test_client.py
mjcaley/spamc
67c4f2b13d569238ea24794eb5253a1416226a2a
[ "MIT" ]
null
null
null
import pytest from aiospamc.client import Client from aiospamc.exceptions import ( BadResponse, UsageException, DataErrorException, NoInputException, NoUserException, NoHostException, UnavailableException, InternalSoftwareException, OSErrorException, OSFileException, CantCre...
30.115385
88
0.773467
import pytest from aiospamc.client import Client from aiospamc.exceptions import ( BadResponse, UsageException, DataErrorException, NoInputException, NoUserException, NoHostException, UnavailableException, InternalSoftwareException, OSErrorException, OSFileException, CantCre...
true
true
08fbd31ee34dffa3d0ccdaa9ab6ecbf06f70f4ab
4,507
py
Python
venv1/Lib/site-packages/tensorflow/contrib/bayesflow/python/ops/custom_grad_impl.py
Soum-Soum/Tensorflow_Face_Finder
fec6c15d2df7012608511ad87f4b55731bf99478
[ "Apache-2.0", "MIT" ]
null
null
null
venv1/Lib/site-packages/tensorflow/contrib/bayesflow/python/ops/custom_grad_impl.py
Soum-Soum/Tensorflow_Face_Finder
fec6c15d2df7012608511ad87f4b55731bf99478
[ "Apache-2.0", "MIT" ]
1
2021-05-20T00:58:04.000Z
2021-05-20T00:58:04.000Z
venv1/Lib/site-packages/tensorflow/contrib/bayesflow/python/ops/custom_grad_impl.py
Soum-Soum/Tensorflow_Face_Finder
fec6c15d2df7012608511ad87f4b55731bf99478
[ "Apache-2.0", "MIT" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
40.603604
81
0.647437
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import ops from tensorflow.python.ops import array_ops from tensorflow.python.ops import math_ops __all__ = [ "custom_gradient", ] def custom_gradient(fx, ...
true
true
08fbd32c5633d4953f8e7ea4324beb44104aa13f
1,343
py
Python
lightly/loss/negative_cosine_similarity.py
CodeGuy-007/lightly
64143fe8a477c04288009c65fa1265cef8aa48f8
[ "MIT" ]
1
2022-03-10T00:22:30.000Z
2022-03-10T00:22:30.000Z
lightly/loss/negative_cosine_similarity.py
CodeGuy-007/lightly
64143fe8a477c04288009c65fa1265cef8aa48f8
[ "MIT" ]
null
null
null
lightly/loss/negative_cosine_similarity.py
CodeGuy-007/lightly
64143fe8a477c04288009c65fa1265cef8aa48f8
[ "MIT" ]
null
null
null
""" Negative Cosine Similarity Loss Function """ # Copyright (c) 2020. Lightly AG and its affiliates. # All Rights Reserved import torch from torch.nn.functional import cosine_similarity class NegativeCosineSimilarity(torch.nn.Module): """Implementation of the Negative Cosine Simililarity used in the SimSiam[0]...
30.522727
87
0.601638
import torch from torch.nn.functional import cosine_similarity class NegativeCosineSimilarity(torch.nn.Module): def __init__(self, dim: int = 1, eps: float = 1e-8) -> None: super().__init__() self.dim = dim self.eps = eps def forward(self, x0: torch.Tensor, x1: torch.Tensor) -> tor...
true
true
08fbd37de1eb2207b666f5d675cc301d30a4e808
7,966
py
Python
Notebooks/common/utils.py
brucew2099/Machine-Learning-for-Time-Series-Forecasting
53d6b9cf8dcc3fb9c4ec22675143e9815d72a72e
[ "MIT" ]
66
2020-12-11T08:22:47.000Z
2022-03-23T20:35:46.000Z
Notebooks/common/utils.py
ravishankar-as/Machine-Learning-for-Time-Series-Forecasting
53d6b9cf8dcc3fb9c4ec22675143e9815d72a72e
[ "MIT" ]
1
2022-03-31T13:35:32.000Z
2022-03-31T13:35:32.000Z
Notebooks/common/utils.py
ravishankar-as/Machine-Learning-for-Time-Series-Forecasting
53d6b9cf8dcc3fb9c4ec22675143e9815d72a72e
[ "MIT" ]
55
2020-12-14T03:13:54.000Z
2022-03-31T14:29:31.000Z
import os import re import sys import zipfile from collections import UserDict import numpy as np import pandas as pd import requests # This function unzips the GEFCom2014 data zip file and extracts the 'extended' # load forecasting competition data. Data is saved in energy.csv def extract_data(data_dir): GEFCom...
37.051163
148
0.618629
import os import re import sys import zipfile from collections import UserDict import numpy as np import pandas as pd import requests def extract_data(data_dir): GEFCom_dir = os.path.join(data_dir, "GEFCom2014", "GEFCom2014 Data") GEFCom_zipfile = os.path.join(data_dir, "GEFCom2014.zip") if not os.path....
true
true
08fbd449a1b68997f17cfd786aacbe8c1ab90f67
4,265
py
Python
homeassistant/components/recollect_waste/sensor.py
williamvdev/core
2a48fe519930a4bd031fd77ceb3ed4724ce3f6d8
[ "Apache-2.0" ]
1
2021-07-06T03:46:47.000Z
2021-07-06T03:46:47.000Z
homeassistant/components/recollect_waste/sensor.py
williamvdev/core
2a48fe519930a4bd031fd77ceb3ed4724ce3f6d8
[ "Apache-2.0" ]
64
2020-10-01T06:39:48.000Z
2022-03-31T06:02:17.000Z
homeassistant/components/recollect_waste/sensor.py
bbbates/core
74029a094821b6368c8e08afe320b73fe9d0ef65
[ "Apache-2.0" ]
1
2019-10-24T21:00:24.000Z
2019-10-24T21:00:24.000Z
"""Support for ReCollect Waste sensors.""" from __future__ import annotations from aiorecollect.client import PickupType import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.const impor...
32.807692
87
0.705275
from __future__ import annotations from aiorecollect.client import PickupType import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.const import ( ATTR_ATTRIBUTION, CONF_FRIENDLY...
true
true
08fbd6437347cb8c357dace2273bf41008a97175
5,490
py
Python
skgaip/tspdb/tspdb/src/algorithms/pymf/sivm_search.py
danielsuo/toy_flood
471d3c4091d86d4a00fbf910937d4e60fdaf79a1
[ "MIT" ]
43
2019-12-10T00:05:51.000Z
2022-03-31T21:21:20.000Z
skgaip/tspdb/tspdb/src/algorithms/pymf/sivm_search.py
danielsuo/toy_flood
471d3c4091d86d4a00fbf910937d4e60fdaf79a1
[ "MIT" ]
5
2021-05-09T01:12:31.000Z
2022-03-29T17:34:15.000Z
skgaip/tspdb/tspdb/src/algorithms/pymf/sivm_search.py
danielsuo/toy_flood
471d3c4091d86d4a00fbf910937d4e60fdaf79a1
[ "MIT" ]
14
2020-01-13T21:20:07.000Z
2022-03-31T02:11:26.000Z
# Authors: Christian Thurau # License: BSD 3 Clause """ PyMF Simplex Volume Maximization [1] SIVM_SEARCH: class for search-SiVM [1] C. Thurau, K. Kersting, and C. Bauckhage. Yes We Can - Simplex Volume Maximization for Descriptive Web-Scale Matrix Factorization. In Proc. Int. Conf. on Information and ...
34.528302
85
0.539162
import scipy.sparse import numpy as np from dist import pdist from vol import * from sivm import SIVM __all__ = ["SIVM_SEARCH"] class SIVM_SEARCH(SIVM): def _update_w(self): def h(sel, D, k): mv = np.max(D) ...
true
true
08fbd686b877451daf3516f5166a31f542b651df
4,946
py
Python
networking_6wind/ml2_drivers/openvswitch/mech_driver/mech_ovs_fp.py
6WIND/networking-6wind
fd1ca644420af3d06d5a0a463dc25ad5918796e3
[ "Apache-2.0" ]
null
null
null
networking_6wind/ml2_drivers/openvswitch/mech_driver/mech_ovs_fp.py
6WIND/networking-6wind
fd1ca644420af3d06d5a0a463dc25ad5918796e3
[ "Apache-2.0" ]
null
null
null
networking_6wind/ml2_drivers/openvswitch/mech_driver/mech_ovs_fp.py
6WIND/networking-6wind
fd1ca644420af3d06d5a0a463dc25ad5918796e3
[ "Apache-2.0" ]
null
null
null
# Copyright 2015-2019 6WIND S.A. # # 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...
45.376147
79
0.692883
from neutron_lib.api.definitions import portbindings from neutron_lib import constants as n_constants from neutron_lib.plugins.ml2 import api from oslo_config import cfg from oslo_log import log from networking_6wind.common import constants from networking_6wind.common.utils import get_socket_path from neutron.plugins...
true
true
08fbd73ce1f34602c6f74c28ca47b6b78f7ad76a
3,020
py
Python
contrib/runners/action_chain_runner/tests/unit/test_actionchain_notifications.py
ekhavana/st2
2b47b0e317a2dfd7d92d63ec6dcf706493148890
[ "Apache-2.0" ]
null
null
null
contrib/runners/action_chain_runner/tests/unit/test_actionchain_notifications.py
ekhavana/st2
2b47b0e317a2dfd7d92d63ec6dcf706493148890
[ "Apache-2.0" ]
null
null
null
contrib/runners/action_chain_runner/tests/unit/test_actionchain_notifications.py
ekhavana/st2
2b47b0e317a2dfd7d92d63ec6dcf706493148890
[ "Apache-2.0" ]
null
null
null
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
40.810811
94
0.740397
import mock from st2actions.container.service import RunnerContainerService from st2common.constants.action import LIVEACTION_STATUS_SUCCEEDED from st2common.services import action as action_service from st2common.util import action_db as action_db_util from st2tests import DbTestCase from st2tests.fixturesloader imp...
true
true
08fbd78fe2c7660be58e94732cc30849e16d3bbc
78
py
Python
PersonalCV/__init__.py
kerusey/PersonalCV
d992f7bb8f45b257a294fac672af572869645a9a
[ "MIT" ]
null
null
null
PersonalCV/__init__.py
kerusey/PersonalCV
d992f7bb8f45b257a294fac672af572869645a9a
[ "MIT" ]
5
2021-08-19T14:14:54.000Z
2021-09-01T15:41:07.000Z
PersonalCV/__init__.py
kerusey/PersonalCV
d992f7bb8f45b257a294fac672af572869645a9a
[ "MIT" ]
1
2021-08-22T18:34:14.000Z
2021-08-22T18:34:14.000Z
""" This Personal CV python package file, nothing really interesting here """
26
73
0.75641
true
true
08fbd84d24dd837a424b0191acef3e7f8d5d94ce
5,304
py
Python
mugicli/pydu.py
mugiseyebrows/mugi-cli
4381086d4bd5a781248cd2cc5ef0e1042534942e
[ "MIT" ]
null
null
null
mugicli/pydu.py
mugiseyebrows/mugi-cli
4381086d4bd5a781248cd2cc5ef0e1042534942e
[ "MIT" ]
null
null
null
mugicli/pydu.py
mugiseyebrows/mugi-cli
4381086d4bd5a781248cd2cc5ef0e1042534942e
[ "MIT" ]
null
null
null
import argparse import os from collections import defaultdict from itertools import count, zip_longest import re from .shared import glob_paths # todo cleanup unused code # todo human readible # todo summary # todo --files def int_ceil(num, den): return (num + den - 1) // den def is_path_in(path1, path2): i...
26.923858
92
0.530354
import argparse import os from collections import defaultdict from itertools import count, zip_longest import re from .shared import glob_paths def int_ceil(num, den): return (num + den - 1) // den def is_path_in(path1, path2): if len(path1) < len(path2): return False for n1, n2 in zip(path1, pa...
true
true
08fbd892dd44c126b5915f03e59a677471619ceb
2,091
py
Python
Sources/Workflows/Rotten-Tomatoes/rt.py
yagosys/AlfredWorkflow.com
9e5087e61fb89640a7a6ca89ba554303aec0b037
[ "MIT" ]
2,177
2015-01-02T09:56:51.000Z
2022-03-27T01:48:37.000Z
Sources/Workflows/Rotten-Tomatoes/rt.py
yagosys/AlfredWorkflow.com
9e5087e61fb89640a7a6ca89ba554303aec0b037
[ "MIT" ]
24
2015-01-02T19:11:51.000Z
2021-01-27T07:20:33.000Z
Sources/Workflows/Rotten-Tomatoes/rt.py
yagosys/AlfredWorkflow.com
9e5087e61fb89640a7a6ca89ba554303aec0b037
[ "MIT" ]
516
2015-01-02T18:48:29.000Z
2022-01-26T07:12:35.000Z
import sys import os import PyAl def search_for(query): args = {'q': query, 'page_limit': '9', 'page': '1', "apikey": "88c6ww77pac55ybxsn5dmhqp"} rt_api = "http://api.rottentomatoes.com/api/public/v1.0/movies.json" myScraper = PyAl.Request(rt_api, args) theResult = myScraper.request.json return th...
26.807692
93
0.583453
import sys import os import PyAl def search_for(query): args = {'q': query, 'page_limit': '9', 'page': '1', "apikey": "88c6ww77pac55ybxsn5dmhqp"} rt_api = "http://api.rottentomatoes.com/api/public/v1.0/movies.json" myScraper = PyAl.Request(rt_api, args) theResult = myScraper.request.json return th...
false
true
08fbd8bdd017654a77463c7372a5e74ca4b3eca8
1,181
py
Python
smartbetas/db.py
epfeff/smartbetas
08f4ecbe01c16a40967baed0351f7768dc22eba8
[ "MIT" ]
3
2019-06-17T11:34:31.000Z
2019-11-27T15:29:52.000Z
smartbetas/db.py
epfeff/smartbetas
08f4ecbe01c16a40967baed0351f7768dc22eba8
[ "MIT" ]
null
null
null
smartbetas/db.py
epfeff/smartbetas
08f4ecbe01c16a40967baed0351f7768dc22eba8
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- """:mod:`db.py` manages the database. """ from pydal import DAL, Field import os os.mkdir('db') if not os.path.isdir('db') else None # DB file definition folder = os.getcwd()+('/db' if os.name != 'nt' else '\db') db = DAL('sqlite://storage.sqlite', folder=folder, migrate_enabled=True) db.defin...
31.078947
72
0.467401
from pydal import DAL, Field import os os.mkdir('db') if not os.path.isdir('db') else None folder = os.getcwd()+('/db' if os.name != 'nt' else '\db') db = DAL('sqlite://storage.sqlite', folder=folder, migrate_enabled=True) db.define_table('investments', Field('date', 'datetime'), Field...
true
true
08fbd8f2fdb3f60e1e60e5a7bfca421440b55ef8
12,404
py
Python
watson/utils.py
RichardHladik/Watson
ffcb8858d08c3381a510c032a246b3c66f171a9e
[ "MIT" ]
1
2020-12-30T00:17:51.000Z
2020-12-30T00:17:51.000Z
watson/utils.py
RichardHladik/Watson
ffcb8858d08c3381a510c032a246b3c66f171a9e
[ "MIT" ]
null
null
null
watson/utils.py
RichardHladik/Watson
ffcb8858d08c3381a510c032a246b3c66f171a9e
[ "MIT" ]
null
null
null
import collections as co import csv import datetime import itertools import json import operator import os import shutil import sys import tempfile try: from StringIO import StringIO except ImportError: from io import StringIO import click import arrow import watson as _watson from .fullmoon import get_last_...
29.323877
84
0.610368
import collections as co import csv import datetime import itertools import json import operator import os import shutil import sys import tempfile try: from StringIO import StringIO except ImportError: from io import StringIO import click import arrow import watson as _watson from .fullmoon import get_last_...
true
true
08fbda2349c169f42877f950c2088c0bc00009b4
4,468
py
Python
Fall detection.py
ashwani227/humanBodyFallDetection
41e33f0c820d4a2b72c2998c6095d234ff698ab2
[ "MIT" ]
2
2021-08-18T04:01:52.000Z
2021-12-16T12:30:18.000Z
Fall detection.py
ashwani227/humanBodyFallDetection
41e33f0c820d4a2b72c2998c6095d234ff698ab2
[ "MIT" ]
1
2021-09-16T15:00:14.000Z
2021-09-16T15:00:14.000Z
Fall detection.py
ashwani227/humanBodyFallDetection
41e33f0c820d4a2b72c2998c6095d234ff698ab2
[ "MIT" ]
2
2020-06-29T06:36:25.000Z
2021-06-05T19:25:25.000Z
import cv2 import numpy as np import math import winsound import time cap = cv2.VideoCapture("C:\\Users\\singl\\Downloads\\MM803\\Video DataSet\\Office\\Video (3).avi") #cap = cv2.VideoCapture("C:\\Users\\singl\\Downloads\\MM803\\Video DataSet\\Home_02\\video (41).avi") #cap = cv2.VideoCapture("C:\\Users\\singl\...
34.90625
178
0.572292
import cv2 import numpy as np import math import winsound import time cap = cv2.VideoCapture("C:\\Users\\singl\\Downloads\\MM803\\Video DataSet\\Office\\Video (3).avi") count = 0 count1 =0 slope=0 slope1 = 100 minArea = 120*100 radianToDegree=57.324 minimumLengthOfLine=150.0 minAngle=18 maxAngle=7...
true
true
08fbdad02e34eed6b8eb4151781376f1de9ceaf1
4,329
py
Python
queue_/queue_test.py
marina-kaz/programming-2021-19fpl
cb5e250067634f6f773339c2ecb62804ba2bc7b8
[ "MIT" ]
null
null
null
queue_/queue_test.py
marina-kaz/programming-2021-19fpl
cb5e250067634f6f773339c2ecb62804ba2bc7b8
[ "MIT" ]
null
null
null
queue_/queue_test.py
marina-kaz/programming-2021-19fpl
cb5e250067634f6f773339c2ecb62804ba2bc7b8
[ "MIT" ]
null
null
null
# pylint: disable=duplicate-code """ Programming for linguists Tests for Queue class. """ import unittest from queue_.queue_ import Queue_ # from queue_ import Queue_ class QueueTestCase(unittest.TestCase): """ This Case of tests checks the functionality of the implementation of Queue """ def test...
31.830882
85
0.583738
import unittest from queue_.queue_ import Queue_ class QueueTestCase(unittest.TestCase): def test_new_queue_is_empty(self): queue = Queue_() self.assertTrue(queue.empty()) self.assertEqual(queue.size(), 0) def test_get_element(self): data = (1, 2, 3, 4) queue = Queu...
true
true
08fbdc72f00ea8df0ae679ada5c8270af08ae702
957
py
Python
scratch/update_wv_redis.py
yonghee12/doc-embedder
e30c77acd8e72f085248f1b86cd9303f284b2411
[ "MIT" ]
null
null
null
scratch/update_wv_redis.py
yonghee12/doc-embedder
e30c77acd8e72f085248f1b86cd9303f284b2411
[ "MIT" ]
null
null
null
scratch/update_wv_redis.py
yonghee12/doc-embedder
e30c77acd8e72f085248f1b86cd9303f284b2411
[ "MIT" ]
null
null
null
import sys from pathlib import Path ROOT = str(Path(__file__).parent.parent.absolute()) sys.path.insert(0, ROOT) import pickle import numpy as np from time import perf_counter as now from direct_redis import DirectRedis from tqdm import tqdm from progress_timer import Timer from _config import * from doc_embedder.mo...
22.785714
62
0.758621
import sys from pathlib import Path ROOT = str(Path(__file__).parent.parent.absolute()) sys.path.insert(0, ROOT) import pickle import numpy as np from time import perf_counter as now from direct_redis import DirectRedis from tqdm import tqdm from progress_timer import Timer from _config import * from doc_embedder.mo...
true
true
08fbdd34c0d9c27556699fcce620b4ebdca63232
13,291
py
Python
src/se3_distributions/training/multiobject_feature_grid_training.py
Mostafa-Mansour/se3_distributions
3c1c2c754e9102a031ae6ff14b703cee0163c413
[ "MIT" ]
1
2021-09-19T18:35:42.000Z
2021-09-19T18:35:42.000Z
src/se3_distributions/training/multiobject_feature_grid_training.py
Mostafa-Mansour/se3_distributions
3c1c2c754e9102a031ae6ff14b703cee0163c413
[ "MIT" ]
null
null
null
src/se3_distributions/training/multiobject_feature_grid_training.py
Mostafa-Mansour/se3_distributions
3c1c2c754e9102a031ae6ff14b703cee0163c413
[ "MIT" ]
3
2021-11-07T12:51:20.000Z
2022-01-07T10:37:07.000Z
# -*- coding: utf-8 -*- """ Created on Thu Jan 4 00:27:44 2018 @author: bokorn """ import torch import torch.multiprocessing torch.multiprocessing.set_sharing_strategy('file_system') from torch.optim import Adam, Adadelta, SGD from torch.utils.data import DataLoader from torch.utils.data import ConcatDataset import...
43.434641
137
0.524791
import torch import torch.multiprocessing torch.multiprocessing.set_sharing_strategy('file_system') from torch.optim import Adam, Adadelta, SGD from torch.utils.data import DataLoader from torch.utils.data import ConcatDataset import os import sys import time import numpy as np from tqdm import tqdm, trange from obj...
true
true
08fbdd89c8f304a199a39ee3a8a64b6b8823a0df
303
py
Python
data/multilingual/Latn.FUR/Mono_16/pdf_to_json_test_Latn.FUR_Mono_16.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
1
2021-09-19T19:47:35.000Z
2021-09-19T19:47:35.000Z
data/multilingual/Latn.FUR/Mono_16/pdf_to_json_test_Latn.FUR_Mono_16.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
data/multilingual/Latn.FUR/Mono_16/pdf_to_json_test_Latn.FUR_Mono_16.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.FUR/Mono_16/udhr_Latn.FUR_Mono_16.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
30.3
73
0.811881
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.FUR/Mono_16/udhr_Latn.FUR_Mono_16.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
true
true
08fbddb2afa4c8729ed12882456d37a7c3ed739d
5,243
py
Python
pluginsmanager/model/bank.py
PedalPi/PluginsManager
bbafe329c40bb0dd2842ec1bc6288400c358579a
[ "Apache-2.0" ]
9
2017-05-24T09:55:34.000Z
2020-06-22T03:55:51.000Z
pluginsmanager/model/bank.py
PedalPi/PluginsManager
bbafe329c40bb0dd2842ec1bc6288400c358579a
[ "Apache-2.0" ]
97
2016-11-17T16:30:35.000Z
2021-10-09T00:27:56.000Z
pluginsmanager/model/bank.py
PedalPi/PluginsManager
bbafe329c40bb0dd2842ec1bc6288400c358579a
[ "Apache-2.0" ]
3
2017-05-21T19:20:38.000Z
2019-11-04T23:53:59.000Z
# Copyright 2017 SrMouraSilva # # 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,...
28.494565
113
0.645623
from pluginsmanager.observer.observable_list import ObservableList from pluginsmanager.observer.update_type import UpdateType, CustomChange from unittest.mock import MagicMock from pluginsmanager.observer.autosaver.indexable import Indexable class Bank(Indexable): def __init__(self, name): super(Bank, s...
true
true
08fbde6a9ed67a82fe47d4ad0657976f71e7a1c9
1,013
py
Python
propnet/models/python/pymatgen_structure_properties.py
dwinston/propnet
9b2761100eec5658d99ebd69bbb839ce1a531451
[ "BSD-3-Clause-LBNL" ]
null
null
null
propnet/models/python/pymatgen_structure_properties.py
dwinston/propnet
9b2761100eec5658d99ebd69bbb839ce1a531451
[ "BSD-3-Clause-LBNL" ]
null
null
null
propnet/models/python/pymatgen_structure_properties.py
dwinston/propnet
9b2761100eec5658d99ebd69bbb839ce1a531451
[ "BSD-3-Clause-LBNL" ]
null
null
null
def plug_in(symbol_values): structure = symbol_values['structure'] return {"num_sites": structure.num_sites, "volume": structure.volume, "composition": structure.composition} DESCRIPTION = """ Properties of a crystal structure, such as the number of sites in its unit cell and its spac...
24.119048
70
0.541955
def plug_in(symbol_values): structure = symbol_values['structure'] return {"num_sites": structure.num_sites, "volume": structure.volume, "composition": structure.composition} DESCRIPTION = """ Properties of a crystal structure, such as the number of sites in its unit cell and its spac...
true
true
08fbdfb26b3f23f04d469581d8a736631b4d1527
812
py
Python
exchangeability/bin/parse-results.py
joaks1/msbayes-experiments
72fcf3c26f6d92bdcc39343372552f45d72d8f7f
[ "CC-BY-4.0" ]
null
null
null
exchangeability/bin/parse-results.py
joaks1/msbayes-experiments
72fcf3c26f6d92bdcc39343372552f45d72d8f7f
[ "CC-BY-4.0" ]
null
null
null
exchangeability/bin/parse-results.py
joaks1/msbayes-experiments
72fcf3c26f6d92bdcc39343372552f45d72d8f7f
[ "CC-BY-4.0" ]
null
null
null
#! /usr/bin/env python import os import sys from pymsbayes.utils.parsing import DMCSimulationResults from pymsbayes.utils.messaging import get_logger _LOG = get_logger(__name__) def main_cli(): bin_dir = os.path.abspath(os.path.dirname(__file__)) project_dir = os.path.abspath(os.path.dirname(bin_dir)) r...
30.074074
70
0.720443
import os import sys from pymsbayes.utils.parsing import DMCSimulationResults from pymsbayes.utils.messaging import get_logger _LOG = get_logger(__name__) def main_cli(): bin_dir = os.path.abspath(os.path.dirname(__file__)) project_dir = os.path.abspath(os.path.dirname(bin_dir)) result_dir = os.path.abs...
true
true
08fbe0d2bf84131e4fd63e2db31af337d30715b8
1,139
py
Python
examples/FastAPI/fastapi_example_app.py
yanoom/pyctuator
b3aff058e1193eb6db8b887b1c1cf8c116819f82
[ "Apache-2.0" ]
1
2020-04-28T18:16:43.000Z
2020-04-28T18:16:43.000Z
examples/FastAPI/fastapi_example_app.py
yanoom/pyctuator
b3aff058e1193eb6db8b887b1c1cf8c116819f82
[ "Apache-2.0" ]
null
null
null
examples/FastAPI/fastapi_example_app.py
yanoom/pyctuator
b3aff058e1193eb6db8b887b1c1cf8c116819f82
[ "Apache-2.0" ]
null
null
null
import datetime import logging import random import socket from fastapi import FastAPI from uvicorn import Server from uvicorn.config import Config from pyctuator.pyctuator import Pyctuator logging.basicConfig(level=logging.INFO) my_logger = logging.getLogger("example") app = FastAPI( title="FastAPI Example Ser...
25.886364
81
0.751536
import datetime import logging import random import socket from fastapi import FastAPI from uvicorn import Server from uvicorn.config import Config from pyctuator.pyctuator import Pyctuator logging.basicConfig(level=logging.INFO) my_logger = logging.getLogger("example") app = FastAPI( title="FastAPI Example Ser...
true
true
08fbe191d496b875e3ea9cd028e9ea86430ba0d5
79,021
py
Python
salt/client/__init__.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
1
2020-03-31T22:51:16.000Z
2020-03-31T22:51:16.000Z
salt/client/__init__.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
null
null
null
salt/client/__init__.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
1
2021-09-30T07:00:01.000Z
2021-09-30T07:00:01.000Z
# -*- coding: utf-8 -*- ''' The client module is used to create a client connection to the publisher The data structure needs to be: {'enc': 'clear', 'load': {'fun': '<mod.callable>', 'arg':, ('arg1', 'arg2', ...), 'tgt': '<glob or id>', 'key': '<read in the key file>'...
37.664919
121
0.50913
from __future__ import absolute_import, print_function, unicode_literals import os import sys import time import random import logging from datetime import datetime import salt.config import salt.cache import salt.defaults.exitcodes import salt.payload import salt.transport.client import salt.loader import salt.utils...
true
true
08fbe2523a97686b74ccdeb593b5a4ee1b917855
2,432
py
Python
backend/appengine/routes/dicas/form.py
analurandis/WebTurismo
fe6a762be346a9e4e1493dff04e4b5e95db46d3f
[ "MIT" ]
null
null
null
backend/appengine/routes/dicas/form.py
analurandis/WebTurismo
fe6a762be346a9e4e1493dff04e4b5e95db46d3f
[ "MIT" ]
null
null
null
backend/appengine/routes/dicas/form.py
analurandis/WebTurismo
fe6a762be346a9e4e1493dff04e4b5e95db46d3f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from google.appengine.ext import ndb from config.template_middleware import TemplateResponse from gaeforms.ndb.form import ModelForm from gaegraph.model import Node from gaepermission.decorator import login_not_required from routes import ...
35.246377
106
0.726151
from __future__ import absolute_import, unicode_literals from google.appengine.ext import ndb from config.template_middleware import TemplateResponse from gaeforms.ndb.form import ModelForm from gaegraph.model import Node from gaepermission.decorator import login_not_required from routes import dicas from tekton import...
true
true
08fbe406cffb2892a67c55bc23d6223cf8b28702
2,912
py
Python
2021/03/main.py
daanbreur/AdventofCode2019
ebc3aafa1091c643a45054c2097446d30f4cb45b
[ "MIT" ]
7
2020-09-29T13:37:08.000Z
2021-03-24T13:34:11.000Z
2021/03/main.py
daanbreur/AdventofCode2019
ebc3aafa1091c643a45054c2097446d30f4cb45b
[ "MIT" ]
null
null
null
2021/03/main.py
daanbreur/AdventofCode2019
ebc3aafa1091c643a45054c2097446d30f4cb45b
[ "MIT" ]
1
2021-12-05T22:28:09.000Z
2021-12-05T22:28:09.000Z
import time import math def part1(inputData): ones, zeros = [0 for _ in range(len(inputData[0]))], [0 for _ in range(len(inputData[0]))] gamma_rate, epsilon_rate = "", "" for byte in inputData: for i, bit in enumerate(byte): if bit == '1': ones[i] += 1 else: zeros[i] += 1 print(f"{ones} {zeros...
44.8
193
0.599245
import time import math def part1(inputData): ones, zeros = [0 for _ in range(len(inputData[0]))], [0 for _ in range(len(inputData[0]))] gamma_rate, epsilon_rate = "", "" for byte in inputData: for i, bit in enumerate(byte): if bit == '1': ones[i] += 1 else: zeros[i] += 1 print(f"{ones} {zeros...
true
true
08fbe5666906810d3e492ce55acad1356492830a
473
py
Python
tensorflow/python/SIMPLE CALCULATOR.py
knightvishal/tensorflow
5d3dd19b7146d954fc1b4e9e44e9881e75d363c1
[ "Apache-2.0" ]
null
null
null
tensorflow/python/SIMPLE CALCULATOR.py
knightvishal/tensorflow
5d3dd19b7146d954fc1b4e9e44e9881e75d363c1
[ "Apache-2.0" ]
null
null
null
tensorflow/python/SIMPLE CALCULATOR.py
knightvishal/tensorflow
5d3dd19b7146d954fc1b4e9e44e9881e75d363c1
[ "Apache-2.0" ]
null
null
null
print("""\t\tSIMPLE CALCULATOR\n""") print("""\t\tPress 1 for ADD\n\t\tPress 2 for SUB\n\t\tPress 3 for MUL\n\t\tPress 4 for DIV""") num1=float(input("Enter the number 1 :")) num2=float(input("Enter the number 2 :")) choice=int(input("SELECT OPERATION :")) if choice==1: result=num1+num2 elif choice==2: ...
26.277778
96
0.651163
print("""\t\tSIMPLE CALCULATOR\n""") print("""\t\tPress 1 for ADD\n\t\tPress 2 for SUB\n\t\tPress 3 for MUL\n\t\tPress 4 for DIV""") num1=float(input("Enter the number 1 :")) num2=float(input("Enter the number 2 :")) choice=int(input("SELECT OPERATION :")) if choice==1: result=num1+num2 elif choice==2: ...
true
true
08fbe621464fbc342e6aa7c8da5290f175823462
5,508
py
Python
khoros/utils/environment.py
truthbyron/khoros
8568209b756abe770c5442f5126b62d8ded44a0d
[ "MIT" ]
null
null
null
khoros/utils/environment.py
truthbyron/khoros
8568209b756abe770c5442f5126b62d8ded44a0d
[ "MIT" ]
null
null
null
khoros/utils/environment.py
truthbyron/khoros
8568209b756abe770c5442f5126b62d8ded44a0d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ :Module: khoros.objects.messages :Synopsis: This module includes functions that identify environment variables for the khoros library :Usage: ``from khoros.utils import environment`` :Example: TBD :Created By: Jeff Shurtliff :Last Modified: ...
34.860759
120
0.704975
import os import json import yaml from .. import errors from ..utils.core_utils import get_file_type ENV_VARIABLE_NAMES = ['KHOROS_URL', 'KHOROS_TENANT_ID', 'KHOROS_DEFAULT_AUTH', 'KHOROS_OAUTH_ID', 'KHOROS_OAUTH_SECRET', 'KHOROS_OAUTH_REDIRECT_URL', 'KHOROS_SESSION_USER', 'KHOROS_SESSION_PW',...
true
true
08fbe62c654f3d85fc070ec595e04b1b44fbc06c
49,772
py
Python
PyCommon/modules/Simulator/test_csVpModel.py
hpgit/HumanFoot
f9a1a341b7c43747bddcd5584b8c98a0d1ac2973
[ "Apache-2.0" ]
null
null
null
PyCommon/modules/Simulator/test_csVpModel.py
hpgit/HumanFoot
f9a1a341b7c43747bddcd5584b8c98a0d1ac2973
[ "Apache-2.0" ]
null
null
null
PyCommon/modules/Simulator/test_csVpModel.py
hpgit/HumanFoot
f9a1a341b7c43747bddcd5584b8c98a0d1ac2973
[ "Apache-2.0" ]
1
2021-07-26T15:13:55.000Z
2021-07-26T15:13:55.000Z
import psyco; psyco.full() from fltk import * import copy, time, math, cPickle import numpy as np import sys sys.path.append('..') import GUI.ysSimpleViewer as ysv import Resource.ysOgreDataLoader as yol import Resource.ysMotionLoader as yf import Renderer.ysRenderer as yr import Util.ysPythonEx as ype imp...
37.878234
388
0.642831
import psyco; psyco.full() from fltk import * import copy, time, math, cPickle import numpy as np import sys sys.path.append('..') import GUI.ysSimpleViewer as ysv import Resource.ysOgreDataLoader as yol import Resource.ysMotionLoader as yf import Renderer.ysRenderer as yr import Util.ysPythonEx as ype imp...
false
true
08fbe66334c86f9df2e065950ce03271c4d5e24a
1,112
py
Python
face detection/FaceDetection.py
younes-assou/some-cv-projects
4480b5066ad8eccc7ce2f589071ff28f9e00b1e2
[ "MIT" ]
null
null
null
face detection/FaceDetection.py
younes-assou/some-cv-projects
4480b5066ad8eccc7ce2f589071ff28f9e00b1e2
[ "MIT" ]
null
null
null
face detection/FaceDetection.py
younes-assou/some-cv-projects
4480b5066ad8eccc7ce2f589071ff28f9e00b1e2
[ "MIT" ]
null
null
null
import cv2 as cv import mediapipe as mp import time mpFaceDetection = mp.solutions.face_detection faceDetector = mpFaceDetection.FaceDetection(0.8) mpDraw = mp.solutions.drawing_utils cap = cv.VideoCapture(0) pTime = 0 while True: succes, frame = cap.read() frameRGB = cv.cvtColor(frame, cv.COLOR_BGR2RGB) ...
27.121951
122
0.654676
import cv2 as cv import mediapipe as mp import time mpFaceDetection = mp.solutions.face_detection faceDetector = mpFaceDetection.FaceDetection(0.8) mpDraw = mp.solutions.drawing_utils cap = cv.VideoCapture(0) pTime = 0 while True: succes, frame = cap.read() frameRGB = cv.cvtColor(frame, cv.COLOR_BGR2RGB) ...
true
true
08fbe75b7f548f053ea3feebc7c00c0cdf455633
7,007
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/_network_management_client_operations.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2019-05-17T21:24:53.000Z
2020-02-12T11:13:42.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/_network_management_client_operations.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
15
2019-07-12T18:18:04.000Z
2019-07-25T20:55:51.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/_network_management_client_operations.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.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 ...
49
221
0.683459
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErro...
true
true
08fbe90c21ed49b9b0f913f2956f44f653e0a3a4
1,657
py
Python
tests/test_oauth2/test_client_credential.py
ashleysommer/sanic-oauthlib
9d25d5b34180678e2b4437efb7d6cd7e0a62b4ce
[ "BSD-3-Clause" ]
2
2020-10-29T02:08:16.000Z
2021-08-30T23:25:41.000Z
tests/test_oauth2/test_client_credential.py
ashleysommer/sanic-oauthlib
9d25d5b34180678e2b4437efb7d6cd7e0a62b4ce
[ "BSD-3-Clause" ]
1
2020-10-29T02:07:33.000Z
2020-10-29T09:34:24.000Z
tests/test_oauth2/test_client_credential.py
ashleysommer/sanic-oauthlib
9d25d5b34180678e2b4437efb7d6cd7e0a62b4ce
[ "BSD-3-Clause" ]
2
2019-12-23T15:32:05.000Z
2020-02-11T02:01:17.000Z
# coding: utf-8 from .._base import to_base64 from .base import TestCase from .base import create_server, sqlalchemy_provider, cache_provider from .base import db, Client, User class TestDefaultProvider(TestCase): def create_server(self): create_server(self.app) def prepare_data(self): self....
29.589286
68
0.612553
from .._base import to_base64 from .base import TestCase from .base import create_server, sqlalchemy_provider, cache_provider from .base import db, Client, User class TestDefaultProvider(TestCase): def create_server(self): create_server(self.app) def prepare_data(self): self.create_server() ...
true
true
08fbe946f6f79cf08a2ed3a9553bf2e9c8028889
17,589
py
Python
src/modules/speech_recognition/distutils/sysconfig.py
akashdeepbansal/eBookNavigator
429204fb2d1e69b2918c7be9084c57ecf676975f
[ "MIT" ]
42
2018-12-12T01:00:59.000Z
2022-03-27T07:32:29.000Z
src/modules/speech_recognition/distutils/sysconfig.py
akashdeepbansal/eBookNavigator
429204fb2d1e69b2918c7be9084c57ecf676975f
[ "MIT" ]
13
2020-11-06T13:50:45.000Z
2022-01-25T07:17:37.000Z
src/modules/speech_recognition/distutils/sysconfig.py
akashdeepbansal/eBookNavigator
429204fb2d1e69b2918c7be9084c57ecf676975f
[ "MIT" ]
8
2020-11-14T04:30:26.000Z
2021-01-16T17:55:19.000Z
"""Provide access to Python's configuration information. The specific configuration variables available depend heavily on the platform and configuration. The values may be retrieved using get_config_var(name), and the list of variables is available via get_config_vars().keys(). Additional convenience functions a...
36.340909
80
0.574734
__revision__ = "$Id$" import os import re import string import sys from distutils.errors import DistutilsPlatformError PREFIX = os.path.normpath(sys.prefix) EXEC_PREFIX = os.path.normpath(sys.exec_prefix) # it'll live in project/PCbuild/amd64. project_base = os.path.dirname(os.path.abspath(sys.execut...
true
true
08fbe9e1df70b29d2aaaf7bf2a35bb70e516cdd0
407
py
Python
tests/constraints/models.py
thomazzo/django
b0d716cbffdd66dd9108895d0524bef2530fc732
[ "PSF-2.0", "BSD-3-Clause" ]
2
2018-12-24T06:48:12.000Z
2018-12-24T07:14:13.000Z
tests/constraints/models.py
thomazzo/django
b0d716cbffdd66dd9108895d0524bef2530fc732
[ "PSF-2.0", "BSD-3-Clause" ]
31
2018-08-26T14:01:16.000Z
2018-10-19T07:35:57.000Z
tests/constraints/models.py
thomazzo/django
b0d716cbffdd66dd9108895d0524bef2530fc732
[ "PSF-2.0", "BSD-3-Clause" ]
1
2018-09-08T11:12:12.000Z
2018-09-08T11:12:12.000Z
from django.db import models class Product(models.Model): name = models.CharField(max_length=255) price = models.IntegerField() discounted_price = models.IntegerField() class Meta: constraints = [ models.CheckConstraint( check=models.Q(price__gt=models.F('discounte...
25.4375
71
0.614251
from django.db import models class Product(models.Model): name = models.CharField(max_length=255) price = models.IntegerField() discounted_price = models.IntegerField() class Meta: constraints = [ models.CheckConstraint( check=models.Q(price__gt=models.F('discounte...
true
true
08fbea8a3655f8de91919da38a256786a186e306
665
py
Python
sdk/python/kfp/v2/dsl.py
votti/pipelines
1c3e2768e6177d5d6e3f4b8eff8fafb9a3b76c1f
[ "Apache-2.0" ]
1
2022-03-30T05:22:19.000Z
2022-03-30T05:22:19.000Z
sdk/python/kfp/v2/dsl.py
votti/pipelines
1c3e2768e6177d5d6e3f4b8eff8fafb9a3b76c1f
[ "Apache-2.0" ]
1
2020-02-06T12:53:44.000Z
2020-02-06T12:53:44.000Z
sdk/python/kfp/v2/dsl.py
votti/pipelines
1c3e2768e6177d5d6e3f4b8eff8fafb9a3b76c1f
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The Kubeflow 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...
39.117647
74
0.766917
from kfp.dsl import *
true
true
08fbead7b63e7098c2bf8806c46c50ebbf8e7e09
864
py
Python
pyyoutube/youtube_utils.py
JoshPaulie/python-youtube
d47da87d03636e4e7166045b4ad9d6426ba43a14
[ "MIT" ]
156
2019-09-01T13:57:49.000Z
2022-03-31T13:51:21.000Z
pyyoutube/youtube_utils.py
JoshPaulie/python-youtube
d47da87d03636e4e7166045b4ad9d6426ba43a14
[ "MIT" ]
88
2019-10-20T16:08:50.000Z
2022-02-08T10:50:54.000Z
pyyoutube/youtube_utils.py
JoshPaulie/python-youtube
d47da87d03636e4e7166045b4ad9d6426ba43a14
[ "MIT" ]
33
2019-10-15T17:46:38.000Z
2022-01-30T04:50:49.000Z
""" This provide some common utils methods for YouTube resource. """ import isodate from isodate.isoerror import ISO8601Error from pyyoutube.error import ErrorMessage, PyYouTubeException def get_video_duration(duration: str) -> int: """ Parse video ISO 8601 duration to seconds. Refer: https://develo...
27
88
0.65162
import isodate from isodate.isoerror import ISO8601Error from pyyoutube.error import ErrorMessage, PyYouTubeException def get_video_duration(duration: str) -> int: try: seconds = isodate.parse_duration(duration).total_seconds() return int(seconds) except ISO8601Error as e: raise PyYo...
true
true
08fbeb428962ecb5b62da3c7aa28717afcf745fe
418
py
Python
Models/nets/GRL.py
Axhk97m/MADA-PL
7e85857acc0207b5326abafcdb5a0a4d103da0e0
[ "MIT" ]
6
2021-11-03T08:31:11.000Z
2022-03-16T13:00:27.000Z
Models/nets/GRL.py
Axhk97m/MADA-PL
7e85857acc0207b5326abafcdb5a0a4d103da0e0
[ "MIT" ]
null
null
null
Models/nets/GRL.py
Axhk97m/MADA-PL
7e85857acc0207b5326abafcdb5a0a4d103da0e0
[ "MIT" ]
4
2021-08-28T06:03:18.000Z
2021-12-20T07:20:18.000Z
from torch.autograd import Function class GRL(Function): @staticmethod def forward(ctx, x, alpha): # Store context for backprop ctx.alpha = alpha # Forward pass is a no-op return x.view_as(x) @staticmethod def backward(ctx, grad_output): # Backward pass is just to -alpha the gradient output = grad_o...
20.9
50
0.720096
from torch.autograd import Function class GRL(Function): @staticmethod def forward(ctx, x, alpha): ctx.alpha = alpha return x.view_as(x) @staticmethod def backward(ctx, grad_output): output = grad_output.neg() * ctx.alpha return output, None
true
true
08fbebbc9c01e364877debf6d68cc97db88db3d9
4,153
py
Python
sourcefinder/utility/uncertain.py
transientskp/PySE
9a59e2f5b4ec50ff5b0d735cfe76c6b9eeaa88ae
[ "BSD-2-Clause" ]
5
2020-07-02T17:34:45.000Z
2021-11-03T11:43:00.000Z
sourcefinder/utility/uncertain.py
transientskp/PySE
9a59e2f5b4ec50ff5b0d735cfe76c6b9eeaa88ae
[ "BSD-2-Clause" ]
16
2017-05-31T15:09:51.000Z
2021-08-06T08:43:10.000Z
sourcefinder/utility/uncertain.py
transientskp/PySE
9a59e2f5b4ec50ff5b0d735cfe76c6b9eeaa88ae
[ "BSD-2-Clause" ]
4
2017-05-31T14:25:44.000Z
2021-07-24T09:32:49.000Z
# # LOFAR Transients Key Project # # Uncertain quantities. # Based on: # (c) Robert Jordens <jordens@debian.org> # Made available freely under the Python license # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/535164 import math class Uncertain(object): """Represents a numeric value with a known small u...
29.453901
76
0.572598
import math class Uncertain(object): def __init__(self, value=0., error=0., *a, **t): self.value = value self.error = abs(error) super(Uncertain, self).__init__(*a, **t) def __str__(self): return "%g+-%g" % (self.value, self.error) def __repr__(self): return "Unc...
true
true
08fbec01d0f8c56d9ededd9f5314f0fb1df27ac3
8,899
py
Python
ion/services/dm/test/test_instrument_integration.py
ooici/coi-services
43246f46a82e597345507afd7dfc7373cb346afa
[ "BSD-2-Clause" ]
3
2016-09-20T09:50:06.000Z
2018-08-10T01:41:38.000Z
ion/services/dm/test/test_instrument_integration.py
ooici/coi-services
43246f46a82e597345507afd7dfc7373cb346afa
[ "BSD-2-Clause" ]
null
null
null
ion/services/dm/test/test_instrument_integration.py
ooici/coi-services
43246f46a82e597345507afd7dfc7373cb346afa
[ "BSD-2-Clause" ]
2
2016-03-16T22:25:49.000Z
2016-11-26T14:54:21.000Z
#!/usr/bin/env python ''' @author Luke Campbell @date Thu May 2 13:19:39 EDT 2013 @file ion/services/dm/test/test_instrument_integration.py @description Integration Test that verifies instrument streaming through DM ''' from ion.services.dm.test.dm_test_case import DMTestCase, FakeProcess from ion.agents.port.port_ag...
55.273292
134
0.721879
''' @author Luke Campbell @date Thu May 2 13:19:39 EDT 2013 @file ion/services/dm/test/test_instrument_integration.py @description Integration Test that verifies instrument streaming through DM ''' from ion.services.dm.test.dm_test_case import DMTestCase, FakeProcess from ion.agents.port.port_agent_process import Por...
false
true
08fbecea3fdd8498db1e5fe2b03e7c4f8b6a598d
14,092
py
Python
Exercise_VPU_and_the_DevCloud.py
ARBUCHELI/EXERCISE-VPU-AND-THE-DEVCLOUD
4e8063ff6710d48a2406d6325f03c9ef8241ab5f
[ "Intel" ]
1
2020-07-01T06:41:38.000Z
2020-07-01T06:41:38.000Z
Exercise_VPU_and_the_DevCloud.py
ARBUCHELI/EXERCISE-VPU-AND-THE-DEVCLOUD
4e8063ff6710d48a2406d6325f03c9ef8241ab5f
[ "Intel" ]
null
null
null
Exercise_VPU_and_the_DevCloud.py
ARBUCHELI/EXERCISE-VPU-AND-THE-DEVCLOUD
4e8063ff6710d48a2406d6325f03c9ef8241ab5f
[ "Intel" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # Exercise: VPU and the DevCloud # # Now that we've walked through the process of requesting a CPU with a VPU (Intel® NCS2) on Intel's DevCloud and loading a model on the Intel® NCS2, you will have the opportunity to do this yourself with the addition of running inference on an...
38.293478
1,813
0.70352
# * Calculate the time it takes to load the model. # * Calculate the time it takes to run inference 100 times. # 2. Write a shell script to submit a job to Intel's DevCloud. get_ipython().run_line_magic('env', 'PATH=/opt/conda/bin:/opt/spark-2.4.3-bin-hadoop2.7/bin:/opt/conda/bin:/usr/local/sbin:/usr/loca...
true
true
08fbee5b0d548afadb0b0011cf51e0e43f303c19
154
py
Python
src/cme/__init__.py
Almas-Ali/CFamily
e1dac3a87cdfdb5ee265295409f758f97e19d8c4
[ "MIT" ]
null
null
null
src/cme/__init__.py
Almas-Ali/CFamily
e1dac3a87cdfdb5ee265295409f758f97e19d8c4
[ "MIT" ]
null
null
null
src/cme/__init__.py
Almas-Ali/CFamily
e1dac3a87cdfdb5ee265295409f758f97e19d8c4
[ "MIT" ]
null
null
null
''' CMe - A CLI for installing C headers in your project. You can spell it as "C Me". It is developed by Md. Almas Ali. Copyrights 2022 License MIT '''
15.4
53
0.701299
true
true
08fbee66eb77924bf076e27b0d2f447a21bd1071
553
py
Python
app/constants.py
iceihehe/easy-note
806527998db08b6860fdd4f0cf395eb09930f4e1
[ "MIT" ]
null
null
null
app/constants.py
iceihehe/easy-note
806527998db08b6860fdd4f0cf395eb09930f4e1
[ "MIT" ]
null
null
null
app/constants.py
iceihehe/easy-note
806527998db08b6860fdd4f0cf395eb09930f4e1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- class Code: SUCCESS = 10000 USERNAME_OR_PASSWORD_ERROR = 10001 NO_SUCH_NOTEBOOK = 10002 NO_SUCH_NOTE = 10003 NO_SUCH_USER = 10004 NO_UPFILE = 10005 NOT_SUPPORTED_FORMAT = 10006 LOGIN_REQUIRED = 10007 MSG = { SUCCESS: '成功', USERNAME_OR_PASS...
21.269231
46
0.614828
class Code: SUCCESS = 10000 USERNAME_OR_PASSWORD_ERROR = 10001 NO_SUCH_NOTEBOOK = 10002 NO_SUCH_NOTE = 10003 NO_SUCH_USER = 10004 NO_UPFILE = 10005 NOT_SUPPORTED_FORMAT = 10006 LOGIN_REQUIRED = 10007 MSG = { SUCCESS: '成功', USERNAME_OR_PASSWORD_ERROR: '账号或密码错误', ...
true
true
08fbee7779237f9d0ca7e2ece1ec84b068d528c6
31,049
py
Python
cvxpy/tests/test_grad.py
QiuWJX/cvxpy
fd1c225b0cdf541618e292cae1a4c7ea25ddc934
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cvxpy/tests/test_grad.py
QiuWJX/cvxpy
fd1c225b0cdf541618e292cae1a4c7ea25ddc934
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cvxpy/tests/test_grad.py
QiuWJX/cvxpy
fd1c225b0cdf541618e292cae1a4c7ea25ddc934
[ "ECL-2.0", "Apache-2.0" ]
1
2016-04-23T10:17:58.000Z
2016-04-23T10:17:58.000Z
""" Copyright 2013 Steven Diamond Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
36.528235
98
0.534349
from __future__ import division import numpy as np import cvxpy as cp from cvxpy import Maximize, Minimize, Problem from cvxpy.expressions.variable import Variable from cvxpy.tests.base_test import BaseTest from cvxpy.transforms import linearize from cvxpy.transforms.partial_optimize import partial_optimize class ...
true
true
08fbeebd0b78b7553aa1e5a28b5bc326797f7fd6
473
py
Python
Firmware/EggbotWireless/buildweb.py
usatiuk/EggbotWireless
4b46fc080c91d4d2b4c5d9c5d559a33500e68c56
[ "MIT" ]
1
2021-09-24T14:39:28.000Z
2021-09-24T14:39:28.000Z
Firmware/EggbotWireless/buildweb.py
usatiuk/EggbotWireless
4b46fc080c91d4d2b4c5d9c5d559a33500e68c56
[ "MIT" ]
4
2020-12-06T14:25:52.000Z
2021-11-15T19:50:37.000Z
Firmware/EggbotWireless/buildweb.py
usatiuk/EggbotWireless
4b46fc080c91d4d2b4c5d9c5d559a33500e68c56
[ "MIT" ]
null
null
null
import shutil import os import gzip os.chdir("../../App") os.system("npm run build") os.chdir("../Firmware/EggbotWireless") try: shutil.rmtree("./data/") except FileNotFoundError: pass shutil.copytree("../../App/prodbuild", "data") for file in os.listdir("./data/"): file = "./data/" + file inf = ope...
18.192308
46
0.602537
import shutil import os import gzip os.chdir("../../App") os.system("npm run build") os.chdir("../Firmware/EggbotWireless") try: shutil.rmtree("./data/") except FileNotFoundError: pass shutil.copytree("../../App/prodbuild", "data") for file in os.listdir("./data/"): file = "./data/" + file inf = ope...
true
true
08fbef5c40f361ece459dcbf3b1d72fcf3efe6df
5,817
py
Python
sdk/python/pulumi_azure_native/network/v20180101/get_route_filter.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20180101/get_route_filter.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20180101/get_route_filter.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "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, overload from ... import _utilities fro...
33.431034
147
0.628503
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetRouteFilterResult', 'AwaitableGetRouteFilterResult', 'get_route_filter', ] @pulumi.output_type class GetRouteFilterResu...
true
true
08fbf12b766ce7ed433f5e3d16a979d202d2b7f7
10,446
py
Python
applications/projectify/models/db.py
aashay201297/projectify
5277b062255235579bdbf7427d7314e7592df29c
[ "BSD-3-Clause" ]
null
null
null
applications/projectify/models/db.py
aashay201297/projectify
5277b062255235579bdbf7427d7314e7592df29c
[ "BSD-3-Clause" ]
null
null
null
applications/projectify/models/db.py
aashay201297/projectify
5277b062255235579bdbf7427d7314e7592df29c
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ######################################################################### ## This scaffolding model makes your app work on Google App Engine too ## File is released under public domain and you can use without limitations ######################################################################### ...
43.525
105
0.657285
from gluon.contrib.appconfig import AppConfig myconf = AppConfig(reload=True) if not request.env.web2py_runtime_gae: db = DAL(myconf.take('db.uri'), pool_size=myconf.take('db.pool_size', cast=int), check_reserved=['all']) else: db = DAL('google:datastore+ndb') session.connect(request, response, db=db) respons...
true
true
08fbf14aeba61664d7fed19ee84c1aeea9133557
1,004
py
Python
deploy/dp/dp.py
webbery/lovechat
51b6fff53957c03b36f8e61d5a3593cccda2ae2c
[ "Apache-2.0" ]
null
null
null
deploy/dp/dp.py
webbery/lovechat
51b6fff53957c03b36f8e61d5a3593cccda2ae2c
[ "Apache-2.0" ]
null
null
null
deploy/dp/dp.py
webbery/lovechat
51b6fff53957c03b36f8e61d5a3593cccda2ae2c
[ "Apache-2.0" ]
null
null
null
import numpy as np np.set_printoptions(suppress=True) import hanlp class SyntacticParser(): def __init__(self): print('begin syntatic') self.tokenizer = hanlp.load('PKU_NAME_MERGED_SIX_MONTHS_CONVSEG') print('begin syntactic_parser') self.syntactic_parser = hanlp.load(hanlp.pretrain...
32.387097
85
0.64243
import numpy as np np.set_printoptions(suppress=True) import hanlp class SyntacticParser(): def __init__(self): print('begin syntatic') self.tokenizer = hanlp.load('PKU_NAME_MERGED_SIX_MONTHS_CONVSEG') print('begin syntactic_parser') self.syntactic_parser = hanlp.load(hanlp.pretrain...
true
true
08fbf2ae4bb35593f962164d03c1fb2930b485c2
4,149
py
Python
ucsmsdk/mometa/macpool/MacpoolPool.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/macpool/MacpoolPool.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/macpool/MacpoolPool.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for MacpoolPool ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class MacpoolPoolConsts: ASSIGNMENT_ORDER_DEFAULT = "default" ASSIGNMENT_ORDER_SEQUENTIAL = "sequential" ...
57.625
249
0.639913
from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class MacpoolPoolConsts: ASSIGNMENT_ORDER_DEFAULT = "default" ASSIGNMENT_ORDER_SEQUENTIAL = "sequential" INT_ID_NONE = "none" POLICY_OWNER_LOCAL = "local" POLICY_OWNER_PENDING_P...
true
true
08fbf36e0391486bc8409baaf37e150a843daf02
25,216
py
Python
electrumx/server/db.py
UbuntuEvangelist/electrumx
3577dbc31cb9f661682dd7587a9a4ac400305f38
[ "CNRI-Python" ]
null
null
null
electrumx/server/db.py
UbuntuEvangelist/electrumx
3577dbc31cb9f661682dd7587a9a4ac400305f38
[ "CNRI-Python" ]
null
null
null
electrumx/server/db.py
UbuntuEvangelist/electrumx
3577dbc31cb9f661682dd7587a9a4ac400305f38
[ "CNRI-Python" ]
null
null
null
# Copyright (c) 2016-2021, Neil Booth # Copyright (c) 2017, the ElectrumX authors # # All rights reserved. # # This file is licensed under the Open BSV License version 3, see LICENCE for details. '''Interface to the blockchain database.''' import ast import copy import os import time from array import array from bis...
40.3456
96
0.605409
import ast import copy import os import time from array import array from bisect import bisect_right from collections import namedtuple import attr from aiorpcx import run_in_thread, sleep from electrumx.lib import util from electrumx.lib.hash import hash_to_hex_str from electrumx.lib.merkle import Merkle, MerkleC...
true
true
08fbf673c3b6d6014342f307774fa29f2c027fc5
444
py
Python
lake/models/passthru_model.py
StanfordAHA/Lake
34df001db107e1a0824b7fdb05b9f2145bf49a3e
[ "BSD-3-Clause" ]
11
2019-10-14T02:05:38.000Z
2022-03-10T14:10:22.000Z
lake/models/passthru_model.py
StanfordAHA/Lake
34df001db107e1a0824b7fdb05b9f2145bf49a3e
[ "BSD-3-Clause" ]
29
2019-09-02T05:49:40.000Z
2022-02-26T00:57:54.000Z
lake/models/passthru_model.py
StanfordAHA/Lake
34df001db107e1a0824b7fdb05b9f2145bf49a3e
[ "BSD-3-Clause" ]
1
2021-04-16T20:26:13.000Z
2021-04-16T20:26:13.000Z
from lake.models.model import Model class PassthruModel(Model): def __init__(self): self._val = 0 def set_config(self, new_config): # Configure top level for key, config_val in new_config.items(): if key not in self.config: AssertionError("Gave bad config....
23.368421
52
0.587838
from lake.models.model import Model class PassthruModel(Model): def __init__(self): self._val = 0 def set_config(self, new_config): for key, config_val in new_config.items(): if key not in self.config: AssertionError("Gave bad config...") else:...
true
true
08fbf8ee45b3aa606edc1dcabdff01012556540c
840
py
Python
src/currency/models.py
arturchesnokov/currency_exchange
62fc52b755174ea888aca94f421b57ab085b57c9
[ "MIT" ]
null
null
null
src/currency/models.py
arturchesnokov/currency_exchange
62fc52b755174ea888aca94f421b57ab085b57c9
[ "MIT" ]
6
2021-03-19T08:38:28.000Z
2022-03-12T00:19:16.000Z
src/currency/models.py
arturchesnokov/currency_exchange
62fc52b755174ea888aca94f421b57ab085b57c9
[ "MIT" ]
null
null
null
from django.core.cache import cache from django.db import models from currency import model_choices as mch from currency.utils import generate_rate_cache_key class Rate(models.Model): created = models.DateTimeField(auto_now_add=True) currency = models.PositiveSmallIntegerField(choices=mch.CURRENCY_CHOICES) ...
36.521739
85
0.732143
from django.core.cache import cache from django.db import models from currency import model_choices as mch from currency.utils import generate_rate_cache_key class Rate(models.Model): created = models.DateTimeField(auto_now_add=True) currency = models.PositiveSmallIntegerField(choices=mch.CURRENCY_CHOICES) ...
true
true
08fbf91937cb0b3f5a8a6e2a5d338581dc0065b6
2,531
py
Python
enterprise_warp/bilby_warp.py
andrewzic/enterprise_warp
0c53b6fba09c4b972b23bb4542cb549f5de38bf7
[ "MIT" ]
null
null
null
enterprise_warp/bilby_warp.py
andrewzic/enterprise_warp
0c53b6fba09c4b972b23bb4542cb549f5de38bf7
[ "MIT" ]
null
null
null
enterprise_warp/bilby_warp.py
andrewzic/enterprise_warp
0c53b6fba09c4b972b23bb4542cb549f5de38bf7
[ "MIT" ]
null
null
null
import bilby class PTABilbyLikelihood(bilby.Likelihood): """ The class that wraps Enterprise likelihood in Bilby likelihood. Parameters ---------- pta: enterprise.signals.signal_base.PTA Enterprise PTA object that contains pulsar data and noise models parameters: list A list of sig...
34.671233
77
0.597392
import bilby class PTABilbyLikelihood(bilby.Likelihood): def __init__(self, pta, parameters): self.pta = pta self.parameters = parameters self._marginalized_parameters = [] def log_likelihood(self): return self.pta.get_lnlikelihood(self.parameters) def get_one_sample(self)...
true
true
08fbf9dd27ca1bf72780f20b625fcf285e540d13
2,260
py
Python
board_old.py
dan-r95/ChessVision
aebac788df841394ef055f5743bf3a70f2d0240d
[ "MIT" ]
1
2021-02-21T20:11:56.000Z
2021-02-21T20:11:56.000Z
board_old.py
rhudock/ChessVision
736fff64f5743d9070bec7c817b7381a76944d57
[ "MIT" ]
null
null
null
board_old.py
rhudock/ChessVision
736fff64f5743d9070bec7c817b7381a76944d57
[ "MIT" ]
null
null
null
import cv2 import numpy as np from utils import convertTo8U from math import * img = cv2.imread('img1.jpg',0) im = cv2.resize(img, (int(0.2*img.shape[1]), int(0.2*img.shape[0]))) # Otsu's thresholding - doesn't work # ret,thresh = cv2.threshold(im,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU) # cv2.imshow('otsu', thresh) ...
24.565217
72
0.65177
import cv2 import numpy as np from utils import convertTo8U from math import * img = cv2.imread('img1.jpg',0) im = cv2.resize(img, (int(0.2*img.shape[1]), int(0.2*img.shape[0]))) edges = cv2.Canny(im, 100, 300) dst = cv2.cornerHarris(im,5,5,0.01) f = np.vectorize(convertTo8U) dst = f(dst) cv2.imshow('scaleabs', ds...
true
true
08fbfbe97f1a9cb04c24100df058b144e2314e75
3,887
py
Python
app_scripts/get_next_available_open_timeset.py
gemerden/make_my_day_planner
dbd7a170d8ac4688df278063568ab424e5768462
[ "MIT" ]
2
2020-02-20T14:25:51.000Z
2020-02-20T14:26:01.000Z
app_scripts/get_next_available_open_timeset.py
gemerden/make_my_day_planner
dbd7a170d8ac4688df278063568ab424e5768462
[ "MIT" ]
1
2019-12-18T12:46:41.000Z
2019-12-19T14:37:31.000Z
app_scripts/get_next_available_open_timeset.py
gemerden/make_my_day_planner
dbd7a170d8ac4688df278063568ab424e5768462
[ "MIT" ]
2
2020-02-08T14:13:09.000Z
2020-03-21T21:17:25.000Z
from datetime import datetime from app_scripts.print_time_data import print_time_data from app_scripts.validate_update_timestamp import validate_update_timestamp def get_next_available_open_timeset( a_timestamp: str, list_of_timesets: list, debug_mode: bool = False ) -> dict: """ This function will h...
38.87
134
0.655004
from datetime import datetime from app_scripts.print_time_data import print_time_data from app_scripts.validate_update_timestamp import validate_update_timestamp def get_next_available_open_timeset( a_timestamp: str, list_of_timesets: list, debug_mode: bool = False ) -> dict: results = {"next_free_times...
true
true
08fbfcb0fe70b8a7f500353cc5e9aa840ae65ae3
581
py
Python
contxt/cli/commands/orgs.py
ndustrialio/contxt-sdk-python-control
e87930eb65853a314eb118ea5cbc0386d2188db2
[ "0BSD" ]
4
2019-06-04T17:59:52.000Z
2020-09-09T17:33:30.000Z
contxt/cli/commands/orgs.py
ndustrialio/contxt-sdk-python-control
e87930eb65853a314eb118ea5cbc0386d2188db2
[ "0BSD" ]
61
2019-05-24T17:49:56.000Z
2022-03-24T15:22:57.000Z
contxt/cli/commands/orgs.py
ndustrialio/contxt-sdk-python-control
e87930eb65853a314eb118ea5cbc0386d2188db2
[ "0BSD" ]
2
2021-12-07T01:03:56.000Z
2022-02-18T16:40:24.000Z
from typing import List import click from contxt.cli.clients import Clients from contxt.cli.utils import fields_option, print_table, sort_option from contxt.models.facilities import Organization @click.group() def orgs() -> None: """Organizations.""" @orgs.command() @fields_option(default=["id", "name", "slug...
25.26087
68
0.73494
from typing import List import click from contxt.cli.clients import Clients from contxt.cli.utils import fields_option, print_table, sort_option from contxt.models.facilities import Organization @click.group() def orgs() -> None: @orgs.command() @fields_option(default=["id", "name", "slug"], obj=Organization) @so...
true
true
08fbfdadaeadbd9fb96782d283abda129c7e58b5
1,339
py
Python
aliyun-python-sdk-drds/aliyunsdkdrds/request/v20190123/RemoveDrdsDbRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-drds/aliyunsdkdrds/request/v20190123/RemoveDrdsDbRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
1
2020-05-31T14:51:47.000Z
2020-05-31T14:51:47.000Z
aliyun-python-sdk-drds/aliyunsdkdrds/request/v20190123/RemoveDrdsDbRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may ...
36.189189
73
0.751307
from aliyunsdkcore.request import RpcRequest class RemoveDrdsDbRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Drds', '2019-01-23', 'RemoveDrdsDb','drds') def get_DbName(self): return self.get_query_params().get('DbName') def set_DbName(self,DbName): self.add_query_param('D...
true
true
08fbfe20523fbf3a3b8cf75992bcdd152273f476
3,814
py
Python
sandbox/apps/python/stencil/minifluxdiv/builder.py
bondhugula/polymage-ppopp-2018-ae
a8a101b808cb62625f41c66cf6b83dd9951aa815
[ "Apache-2.0" ]
null
null
null
sandbox/apps/python/stencil/minifluxdiv/builder.py
bondhugula/polymage-ppopp-2018-ae
a8a101b808cb62625f41c66cf6b83dd9951aa815
[ "Apache-2.0" ]
null
null
null
sandbox/apps/python/stencil/minifluxdiv/builder.py
bondhugula/polymage-ppopp-2018-ae
a8a101b808cb62625f41c66cf6b83dd9951aa815
[ "Apache-2.0" ]
null
null
null
from __init__ import * import sys import subprocess sys.path.insert(0, ROOT+'apps/python/') from cpp_compiler import c_compile from loader import load_lib from polymage_mfd import minifluxdiv from compiler import * from constructs import * def codegen(pipe, file_name, app_data): print("") print("[builder]:...
27.049645
78
0.583639
from __init__ import * import sys import subprocess sys.path.insert(0, ROOT+'apps/python/') from cpp_compiler import c_compile from loader import load_lib from polymage_mfd import minifluxdiv from compiler import * from constructs import * def codegen(pipe, file_name, app_data): print("") print("[builder]:...
true
true
08fbfe85902315dc1bcce6c6f94c799c8a285e54
1,003
py
Python
storyboard/db/migration/alembic_migrations/versions/063_index_story_storytags.py
Sitcode-Zoograf/storyboard
5833f87e20722c524a1e4a0b8e1fb82206fb4e5c
[ "Apache-2.0" ]
null
null
null
storyboard/db/migration/alembic_migrations/versions/063_index_story_storytags.py
Sitcode-Zoograf/storyboard
5833f87e20722c524a1e4a0b8e1fb82206fb4e5c
[ "Apache-2.0" ]
null
null
null
storyboard/db/migration/alembic_migrations/versions/063_index_story_storytags.py
Sitcode-Zoograf/storyboard
5833f87e20722c524a1e4a0b8e1fb82206fb4e5c
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
27.108108
75
0.740778
revision = '063' down_revision = '062' from alembic import op def upgrade(active_plugins=None, options=None): op.create_index('story_storytags_idx', 'story_storytags', ['story_id']) def downgrade(active_plugins=None, options=None): op.drop_index('story_storytags_idx')
true
true
08fbfea9800fa309b8523bb56b2fafae8ad75a4b
10,038
py
Python
docker/sds-api/spine-directory-service/sds/request/tests/request_handler_test_base.py
uk-gov-mirror/nhsdigital.spine-directory-service-api
f57b9e6bb64eb9f09fddf9bb7ee4bebd00b1575f
[ "MIT" ]
null
null
null
docker/sds-api/spine-directory-service/sds/request/tests/request_handler_test_base.py
uk-gov-mirror/nhsdigital.spine-directory-service-api
f57b9e6bb64eb9f09fddf9bb7ee4bebd00b1575f
[ "MIT" ]
null
null
null
docker/sds-api/spine-directory-service/sds/request/tests/request_handler_test_base.py
uk-gov-mirror/nhsdigital.spine-directory-service-api
f57b9e6bb64eb9f09fddf9bb7ee4bebd00b1575f
[ "MIT" ]
null
null
null
import json import unittest.mock import uuid from abc import ABC from typing import Optional import tornado.testing import tornado.web from request import routing_reliability_handler, accredited_system_handler from request.http_headers import HttpHeaders from utilities import message_utilities ORG_CODE = "org" SERVI...
49.693069
172
0.685395
import json import unittest.mock import uuid from abc import ABC from typing import Optional import tornado.testing import tornado.web from request import routing_reliability_handler, accredited_system_handler from request.http_headers import HttpHeaders from utilities import message_utilities ORG_CODE = "org" SERVI...
true
true
08fbff720c9e9de1f2ed58689e356b34edeb4bf4
1,328
py
Python
examples/write.py
clranc/micropython-mfrc522
c5ec231853a2fa5d265364c57d521c29d5d66a29
[ "MIT" ]
2
2018-04-14T21:48:49.000Z
2018-05-20T10:56:13.000Z
examples/write.py
clranc/micropython-mfrc522
c5ec231853a2fa5d265364c57d521c29d5d66a29
[ "MIT" ]
null
null
null
examples/write.py
clranc/micropython-mfrc522
c5ec231853a2fa5d265364c57d521c29d5d66a29
[ "MIT" ]
null
null
null
import mfrc522 from os import uname def do_write(esp=None): if uname()[0] == 'WiPy': rdr = mfrc522.MFRC522("GP14", "GP16", "GP15", "GP22", "GP17") elif uname()[0] == 'esp8266': if esp == 1: rdr = mfrc522.MFRC522(rst=2,cs=16,spiblk=1) else: rdr = mfrc522.MFRC522(rst=2,cs=16,sck=14,mosi=13,miso=12) else...
24.592593
95
0.603163
import mfrc522 from os import uname def do_write(esp=None): if uname()[0] == 'WiPy': rdr = mfrc522.MFRC522("GP14", "GP16", "GP15", "GP22", "GP17") elif uname()[0] == 'esp8266': if esp == 1: rdr = mfrc522.MFRC522(rst=2,cs=16,spiblk=1) else: rdr = mfrc522.MFRC522(rst=2,cs=16,sck=14,mosi=13,miso=12) else...
true
true
08fc00d0aed5add080855b0cd38513a93db3a138
297
py
Python
sense_energy_prometheus_exporter/sense_energy_prometheus_exporter/__init__.py
davidwilemski/sense_energy_prometheus_exporter
6966ee0fc48d56e262285677fc7b81500aea7dee
[ "MIT" ]
8
2021-07-29T22:11:31.000Z
2022-03-04T17:34:20.000Z
sense_energy_prometheus_exporter/sense_energy_prometheus_exporter/__init__.py
davidwilemski/sense_energy_prometheus_exporter
6966ee0fc48d56e262285677fc7b81500aea7dee
[ "MIT" ]
5
2021-07-16T15:08:15.000Z
2022-01-07T05:05:44.000Z
sense_energy_prometheus_exporter/sense_energy_prometheus_exporter/__init__.py
davidwilemski/sense_energy_prometheus_exporter
6966ee0fc48d56e262285677fc7b81500aea7dee
[ "MIT" ]
1
2021-08-03T05:22:51.000Z
2021-08-03T05:22:51.000Z
from .client import SenseClient,SenseAccount from .collectors import AccountCollector,DeviceCollector,CurrentCollector,FrequencyCollector,PowerCollector,VoltageCollector,TrendCollector from .constants import EnvironmentVariableKeys,LogLevelOptions from .parser import EnvironmentParser,FileParser
59.4
139
0.902357
from .client import SenseClient,SenseAccount from .collectors import AccountCollector,DeviceCollector,CurrentCollector,FrequencyCollector,PowerCollector,VoltageCollector,TrendCollector from .constants import EnvironmentVariableKeys,LogLevelOptions from .parser import EnvironmentParser,FileParser
true
true
08fc00fa1ed7a67813882fa47f9258c4d456fed3
1,157
py
Python
airflow/contrib/sensors/sftp_sensor.py
dorranh/airflow
1a9a2cadcf8606cfcb729d1323dd33dfacc64633
[ "Apache-2.0" ]
null
null
null
airflow/contrib/sensors/sftp_sensor.py
dorranh/airflow
1a9a2cadcf8606cfcb729d1323dd33dfacc64633
[ "Apache-2.0" ]
1
2020-05-24T15:53:39.000Z
2020-05-24T15:53:39.000Z
airflow/contrib/sensors/sftp_sensor.py
dorranh/airflow
1a9a2cadcf8606cfcb729d1323dd33dfacc64633
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
35.060606
83
0.757131
import warnings from airflow.providers.sftp.sensors.sftp import SFTPSensor warnings.warn( "This module is deprecated. Please use `airflow.providers.sftp.sensors.sftp`.", DeprecationWarning, stacklevel=2, )
true
true
08fc01abd04d114d15db65c75d041cbff4dab90b
365
py
Python
main.py
emilarner/slow-python
b06127635a327736d2e02c01b2691ee5b635fe33
[ "MIT" ]
null
null
null
main.py
emilarner/slow-python
b06127635a327736d2e02c01b2691ee5b635fe33
[ "MIT" ]
null
null
null
main.py
emilarner/slow-python
b06127635a327736d2e02c01b2691ee5b635fe33
[ "MIT" ]
null
null
null
import slow import os import sys def main(): interpreter = slow.SlowInterpreter("Original") # The script should parse the file. if (len(sys.argv) > 1): for line in open(sys.argv[1], "r"): interpreter.interpret_line(line) while True: interpreter.interpret_line(input("slow>...
20.277778
50
0.624658
import slow import os import sys def main(): interpreter = slow.SlowInterpreter("Original") if (len(sys.argv) > 1): for line in open(sys.argv[1], "r"): interpreter.interpret_line(line) while True: interpreter.interpret_line(input("slow>")) if (__name__ == "__main__"): ...
true
true
08fc022531577ef34322205e7cd8ee56f17e2686
15,861
py
Python
tests/unit/test_select.py
KoffieLabs/python-bigquery-sqlalchemy
8315ce5a4d9cd3428cbf8bfe8a7db9ae3990a2da
[ "MIT" ]
null
null
null
tests/unit/test_select.py
KoffieLabs/python-bigquery-sqlalchemy
8315ce5a4d9cd3428cbf8bfe8a7db9ae3990a2da
[ "MIT" ]
null
null
null
tests/unit/test_select.py
KoffieLabs/python-bigquery-sqlalchemy
8315ce5a4d9cd3428cbf8bfe8a7db9ae3990a2da
[ "MIT" ]
null
null
null
# Copyright (c) 2021 The sqlalchemy-bigquery Authors # # 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, mer...
35.404018
88
0.605069
import datetime from decimal import Decimal import packaging.version import pytest import sqlalchemy import sqlalchemy_bigquery from .conftest import ( setup_table, sqlalchemy_version, sqlalchemy_1_3_or_higher, sqlalchemy_1_4_or_higher, sqlalchemy_before_1_4, ) def test_labels_not_forced(faux_...
true
true
08fc02739fd6ce7a03377844ca160acb107cfb01
32,967
py
Python
src/python/WMCore/WorkQueue/WorkQueueBackend.py
vkuznet/WMCore
001cc51651052405a7ecd811cde91da611b1dc57
[ "Apache-2.0" ]
21
2015-11-19T16:18:45.000Z
2021-12-02T18:20:39.000Z
src/python/WMCore/WorkQueue/WorkQueueBackend.py
vkuznet/WMCore
001cc51651052405a7ecd811cde91da611b1dc57
[ "Apache-2.0" ]
5,671
2015-01-06T14:38:52.000Z
2022-03-31T22:11:14.000Z
src/python/WMCore/WorkQueue/WorkQueueBackend.py
vkuznet/WMCore
001cc51651052405a7ecd811cde91da611b1dc57
[ "Apache-2.0" ]
67
2015-01-21T15:55:38.000Z
2022-02-03T19:53:13.000Z
#!/usr/bin/env python """ WorkQueueBackend Interface to WorkQueue persistent storage """ from builtins import object from future.utils import viewitems import json import random import time from WMCore.Database.CMSCouch import CouchServer, CouchNotFoundError, Document from WMCore.Lexicon import sanitizeURL from WM...
46.62942
120
0.586283
from builtins import object from future.utils import viewitems import json import random import time from WMCore.Database.CMSCouch import CouchServer, CouchNotFoundError, Document from WMCore.Lexicon import sanitizeURL from WMCore.WMSpec.WMWorkload import WMWorkloadHelper from WMCore.WorkQueue.DataStructs.CouchWork...
true
true
08fc02cb64417d1401c32bec72dee972a56443ba
8,854
py
Python
c4.py
csvance/machine-learning-connect-four
faec52280a82183f7dfd8ed6d9253af9093811eb
[ "MIT" ]
2
2018-08-08T00:56:08.000Z
2021-05-29T10:11:48.000Z
c4.py
csvance/machine-learning-connect-four
faec52280a82183f7dfd8ed6d9253af9093811eb
[ "MIT" ]
null
null
null
c4.py
csvance/machine-learning-connect-four
faec52280a82183f7dfd8ed6d9253af9093811eb
[ "MIT" ]
1
2018-03-19T15:30:02.000Z
2018-03-19T15:30:02.000Z
import argparse import csv import os import numpy as np from c4_game import C4Game, C4MoveResult, C4Team, C4Action from c4_model import C4Model def human_vs_human(weights_file: str): c4 = C4Game() c4ai = C4Model(epsilon_start=0., epsilon_end=0.) c4ai.load(weights_file) print(c4.display()) whil...
32.07971
116
0.548566
import argparse import csv import os import numpy as np from c4_game import C4Game, C4MoveResult, C4Team, C4Action from c4_model import C4Model def human_vs_human(weights_file: str): c4 = C4Game() c4ai = C4Model(epsilon_start=0., epsilon_end=0.) c4ai.load(weights_file) print(c4.display()) whil...
true
true
08fc03890f3b75196ac97964d2fd0b3afe2ac6a0
5,201
py
Python
alphafold/model/model.py
milot-mirdita/alphafold
8a24cc8d22feb2b7ae9bf78f910ce97e9d4403e8
[ "Apache-2.0" ]
45
2021-07-18T05:26:21.000Z
2022-03-15T18:22:48.000Z
alphafold/model/model.py
milot-mirdita/alphafold
8a24cc8d22feb2b7ae9bf78f910ce97e9d4403e8
[ "Apache-2.0" ]
33
2021-08-12T14:06:16.000Z
2022-03-31T18:47:49.000Z
alphafold/model/model.py
milot-mirdita/alphafold
8a24cc8d22feb2b7ae9bf78f910ce97e9d4403e8
[ "Apache-2.0" ]
20
2021-07-18T03:34:47.000Z
2022-02-19T02:51:09.000Z
# Copyright 2021 DeepMind Technologies Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
36.118056
80
0.708902
from typing import Any, Mapping, Optional, Union from absl import logging import haiku as hk import jax import ml_collections import numpy as np import tensorflow.compat.v1 as tf import tree from alphafold.common import confidence from alphafold.model import features from alphafold.model import modules def get_con...
true
true
08fc042e8037ec9532fe873b009f0cde0d759cbf
6,749
py
Python
dogfootermacro_main.py
dogfooter-master/dogfooter
e1e39375703fe3019af7976f97c44cf2cb7ca0fa
[ "MIT" ]
null
null
null
dogfootermacro_main.py
dogfooter-master/dogfooter
e1e39375703fe3019af7976f97c44cf2cb7ca0fa
[ "MIT" ]
null
null
null
dogfootermacro_main.py
dogfooter-master/dogfooter
e1e39375703fe3019af7976f97c44cf2cb7ca0fa
[ "MIT" ]
null
null
null
import threading import time import collections import sys import os import likeyoubot_logger import likeyoubot_win import signal from PIL import ImageGrab import cv2 import numpy as np from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWebEngineWidgets import * from PyQt5.QtWidgets import * from PyQt5...
33.410891
105
0.76678
import threading import time import collections import sys import os import likeyoubot_logger import likeyoubot_win import signal from PIL import ImageGrab import cv2 import numpy as np from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWebEngineWidgets import * from PyQt5.QtWidgets import * from PyQt5...
true
true
08fc05b8c06b71cdcb5ea2b6aea4a08a3b12a6e5
401
py
Python
bluebottle/projects/migrations/0085_auto_20181207_1552.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/projects/migrations/0085_auto_20181207_1552.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/projects/migrations/0085_auto_20181207_1552.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
9
2015-02-20T13:19:30.000Z
2022-03-08T14:09:17.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-12-07 14:52 from __future__ import unicode_literals import bluebottle.utils.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0084_auto_20181207_1435'), ] operations = [ ...
20.05
48
0.653367
from __future__ import unicode_literals import bluebottle.utils.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0084_auto_20181207_1435'), ] operations = [ migrations.DeleteModel( name='ProjectDocument', )...
true
true
08fc05f59d0a8380fe59d19377b5257144371eb4
456
py
Python
tests/e2e/test_mappings.py
JavierLuna/datastorm
c1876cd96862a010176eda111426228fff6b1366
[ "MIT" ]
13
2018-08-31T16:45:16.000Z
2020-11-06T23:53:26.000Z
tests/e2e/test_mappings.py
JavierLuna/datastorm
c1876cd96862a010176eda111426228fff6b1366
[ "MIT" ]
18
2019-08-04T19:58:33.000Z
2019-11-02T23:05:35.000Z
tests/e2e/test_mappings.py
JavierLuna/datastorm
c1876cd96862a010176eda111426228fff6b1366
[ "MIT" ]
2
2018-08-31T16:45:26.000Z
2019-08-02T07:11:26.000Z
from datastorm import fields def test_create_fetch_entity_with_list(ds_entity): entity_key = "test_entity" datastore_field_name = "datastore" class CustomEntity(ds_entity): aliased_field = fields.AnyField(field_name=datastore_field_name) test_entity = CustomEntity(entity_key) test_entity...
28.5
72
0.780702
from datastorm import fields def test_create_fetch_entity_with_list(ds_entity): entity_key = "test_entity" datastore_field_name = "datastore" class CustomEntity(ds_entity): aliased_field = fields.AnyField(field_name=datastore_field_name) test_entity = CustomEntity(entity_key) test_entity...
true
true
08fc08a7ae96121e333940ac3338e95193335977
31,743
py
Python
nenupy/observation/sqldatabase.py
coutouly/nenupy
76cf9f6a6a93e9eed16f8450e3cfe385440a212e
[ "MIT" ]
4
2018-10-02T16:32:32.000Z
2022-03-08T10:55:36.000Z
nenupy/observation/sqldatabase.py
coutouly/nenupy
76cf9f6a6a93e9eed16f8450e3cfe385440a212e
[ "MIT" ]
54
2018-10-16T14:48:29.000Z
2022-02-24T11:02:59.000Z
nenupy/observation/sqldatabase.py
coutouly/nenupy
76cf9f6a6a93e9eed16f8450e3cfe385440a212e
[ "MIT" ]
2
2020-10-12T14:29:17.000Z
2021-11-24T13:11:16.000Z
#! /usr/bin/python3 # -*- coding: utf-8 -*- """ ************ SQL Database ************ Query obs containing 19 antennas in database: SELECT * FROM observation o inner join analogbeam a on o.id = a.observation_id where a.nAntennas = 19; Query obs containing MA 55 in...
40.54023
143
0.571685
__author__ = 'Alan Loh' __copyright__ = 'Copyright 2020, nenupy' __credits__ = ['Alan Loh'] __maintainer__ = 'Alan' __email__ = 'alan.loh@obspm.fr' __status__ = 'Production' __all__ = [ 'SchedulingTable', 'AnalogBeamTable', 'DigitalBeamTable', 'ParsetDataBase' ] import numpy as np from os.path imp...
true
true
08fc08da201a5deb4620f5d36e77935b3ad45970
21,210
py
Python
models.py
charliezou/muzero-general
342e35fcdb97cd200d8b4534b0546eee1da8c04e
[ "MIT" ]
null
null
null
models.py
charliezou/muzero-general
342e35fcdb97cd200d8b4534b0546eee1da8c04e
[ "MIT" ]
null
null
null
models.py
charliezou/muzero-general
342e35fcdb97cd200d8b4534b0546eee1da8c04e
[ "MIT" ]
null
null
null
import math from abc import ABC, abstractmethod import torch class MuZeroNetwork: def __new__(cls, config): if config.network == "fullyconnected": return MuZeroFullyConnectedNetwork( config.observation_shape, config.stacked_observations, len(con...
33.140625
115
0.587883
import math from abc import ABC, abstractmethod import torch class MuZeroNetwork: def __new__(cls, config): if config.network == "fullyconnected": return MuZeroFullyConnectedNetwork( config.observation_shape, config.stacked_observations, len(con...
true
true
08fc09cfd4330ac2c80f071e3c5d9784d2eb5b6a
15,111
py
Python
example/ui/mw_menus_pyside_ui.py
Harshadb/QDarkStyleSheet
885e9441286fa59521e00c216c2e6b2060932d17
[ "CC-BY-4.0" ]
null
null
null
example/ui/mw_menus_pyside_ui.py
Harshadb/QDarkStyleSheet
885e9441286fa59521e00c216c2e6b2060932d17
[ "CC-BY-4.0" ]
null
null
null
example/ui/mw_menus_pyside_ui.py
Harshadb/QDarkStyleSheet
885e9441286fa59521e00c216c2e6b2060932d17
[ "CC-BY-4.0" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mw_menus.ui' # # Created: Thu Nov 1 16:06:04 2018 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_MainWindow(object): def setupUi(...
73.712195
738
0.741513
from PySide import QtCore, QtGui class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(742, 439) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLay...
true
true
08fc0a6157001aa817e8b654705fcc065cd1046a
16,565
py
Python
src/geocat/comp/eofunc.py
dimaclimate/geocat-comp
dcb55e22d69d96762b683652cf83f6b9ef4fcc38
[ "Apache-2.0" ]
null
null
null
src/geocat/comp/eofunc.py
dimaclimate/geocat-comp
dcb55e22d69d96762b683652cf83f6b9ef4fcc38
[ "Apache-2.0" ]
null
null
null
src/geocat/comp/eofunc.py
dimaclimate/geocat-comp
dcb55e22d69d96762b683652cf83f6b9ef4fcc38
[ "Apache-2.0" ]
null
null
null
import warnings from typing import Iterable import numpy as np import xarray as xr from eofs.xarray import Eof def _generate_eofs_solver(data, time_dim=0, weights=None, center=True, ddof=1): """Convenience function to be used in both `eofunc_eofs` and `eofunc_pcs` functions.""" # ''' Start of boilerplat...
47.737752
120
0.665801
import warnings from typing import Iterable import numpy as np import xarray as xr from eofs.xarray import Eof def _generate_eofs_solver(data, time_dim=0, weights=None, center=True, ddof=1): if not isinstance(data, xr.DataArray): data = np.asarray(data) if (time_dim >= data.ndim) or (time_...
true
true
08fc0a693a0a0cdf476f48154752e4caf3f7df39
15,493
py
Python
src/backend/common/manipulators/tests/base_manipulator_test.py
dracco1993/the-blue-alliance
2b1bd0734b9498e394722165dd92c22d0ec8cafd
[ "MIT" ]
null
null
null
src/backend/common/manipulators/tests/base_manipulator_test.py
dracco1993/the-blue-alliance
2b1bd0734b9498e394722165dd92c22d0ec8cafd
[ "MIT" ]
219
2018-11-02T11:17:28.000Z
2022-03-31T21:51:09.000Z
src/backend/common/manipulators/tests/base_manipulator_test.py
dracco1993/the-blue-alliance
2b1bd0734b9498e394722165dd92c22d0ec8cafd
[ "MIT" ]
null
null
null
import json from typing import Any, Dict, Generator, List, Optional, Set import pytest from google.appengine.ext import deferred from google.appengine.ext import ndb from pyre_extensions import none_throws from backend.common.cache_clearing.get_affected_queries import TCacheKeyAndQuery from backend.common.consts.api_...
29.680077
87
0.700768
import json from typing import Any, Dict, Generator, List, Optional, Set import pytest from google.appengine.ext import deferred from google.appengine.ext import ndb from pyre_extensions import none_throws from backend.common.cache_clearing.get_affected_queries import TCacheKeyAndQuery from backend.common.consts.api_...
true
true
08fc0b7adbcd0594028b76068f9933be63999b5c
2,149
py
Python
abe_or_ishihara/learning/save_image_by_link.py
maedamikio/public
1f1aed0451141009ecfeca03f3fe9523443ad429
[ "MIT" ]
3
2019-05-21T13:44:41.000Z
2020-01-20T12:18:45.000Z
abe_or_ishihara/learning/save_image_by_link.py
maedamikio/public
1f1aed0451141009ecfeca03f3fe9523443ad429
[ "MIT" ]
10
2019-05-13T21:15:08.000Z
2022-02-10T00:36:24.000Z
abe_or_ishihara/learning/save_image_by_link.py
maedamikio/public
1f1aed0451141009ecfeca03f3fe9523443ad429
[ "MIT" ]
2
2019-02-12T04:40:47.000Z
2022-01-15T13:06:42.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """画像のダウンロードと保存.""" import argparse import io import os import requests from PIL import Image, ImageFile from config import CLASSES, LINK_PATH, DOWNLOAD_PATH ImageFile.LOAD_TRUNCATED_IMAGES = True def download(query): """データのダウンロード、データのチェック、画像の保存.""" lin...
25.282353
98
0.597487
import argparse import io import os import requests from PIL import Image, ImageFile from config import CLASSES, LINK_PATH, DOWNLOAD_PATH ImageFile.LOAD_TRUNCATED_IMAGES = True def download(query): linkfile = os.path.join(LINK_PATH, '{}.txt'.format(query)) if not os.path.isfile(linkfile): pri...
true
true
08fc0c177b47f0f7112199a3b4b84c3be2860f89
2,054
py
Python
fetcher/ukfetcher/base.py
blxlrsmb/uknow
b4438b5fab9e0f4b6fa3a36d4f8962ef1dfc1937
[ "WTFPL" ]
null
null
null
fetcher/ukfetcher/base.py
blxlrsmb/uknow
b4438b5fab9e0f4b6fa3a36d4f8962ef1dfc1937
[ "WTFPL" ]
null
null
null
fetcher/ukfetcher/base.py
blxlrsmb/uknow
b4438b5fab9e0f4b6fa3a36d4f8962ef1dfc1937
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # $File: base.py # $Date: Fri Dec 13 00:31:10 2013 +0800 # $Author: jiakai <jia.kai66@gmail.com> from .prefilter import AbortItemProcessing from .context import FetcherContext import ukconfig import uklogger from abc import ABCMeta, abstractmethod from functools import ...
28.527778
78
0.635346
from .prefilter import AbortItemProcessing from .context import FetcherContext import ukconfig import uklogger from abc import ABCMeta, abstractmethod from functools import wraps class register_fetcher_base(object): __metaclass__ = ABCMeta fetcher_name = None _callback = None _fetcher_name_regis...
true
true
08fc0c4c6e150430907f9682e14577b9c797f5ae
16,626
py
Python
UBXCFGGEN.py
honglan3/dji-sdk-dji-DJI_FC_Patcher
42b1ab34f6cb101e92164a5a13efdb02f95ccca4
[ "Linux-OpenIB" ]
52
2018-08-24T08:44:37.000Z
2022-03-25T13:52:46.000Z
UBXCFGGEN.py
validev/DJI_FC_Patcher
e8d97d7326a64379f09d05e6898547eb119b311c
[ "Linux-OpenIB" ]
27
2018-08-26T13:56:25.000Z
2022-01-19T13:27:08.000Z
UBXCFGGEN.py
validev/DJI_FC_Patcher
e8d97d7326a64379f09d05e6898547eb119b311c
[ "Linux-OpenIB" ]
26
2018-08-24T07:46:54.000Z
2020-10-20T15:34:43.000Z
#!/usr/bin/env python # # By @Matioupi # provided under dbad licence http://dbad-license.org/ # # Version 1.1 # # Written from U-BLOX document UBX-13003221 - R14 # plus some trials/checks with u-center 18.05.02 # # This class targets generating some UBLOX M8 config frames # for DJI Spark / Mavic Pro / P4 ...
42.19797
1,555
0.543005
import binascii import sys import math from struct import * symbols = {} class UBXCFGGEN: def __init__(self): print("Initializing UBXCFG Frames Generator") def addCRC(self, pre_built_frame): data=binascii.unhexlify(pre_built_frame) crc_a = 0 crc_b = 0 length_data...
true
true
08fc0c619a4867481d47fd3144ca36cf0ed7a3c4
14,373
py
Python
dizoo/multiagent_particle/envs/multiagent/environment.py
uuid0000/DI-engine
cc2713fa01e5288bae21cfeb595729d665e092d1
[ "Apache-2.0" ]
2
2021-07-30T15:55:45.000Z
2021-07-30T16:35:10.000Z
dizoo/multiagent_particle/envs/multiagent/environment.py
yifan123/DI-engine
cf382d7274d328e6fcc5beb9c08bbc11e94a3850
[ "Apache-2.0" ]
null
null
null
dizoo/multiagent_particle/envs/multiagent/environment.py
yifan123/DI-engine
cf382d7274d328e6fcc5beb9c08bbc11e94a3850
[ "Apache-2.0" ]
null
null
null
import gym from gym import spaces from gym.envs.registration import EnvSpec import numpy as np from dizoo.multiagent_particle.envs.multiagent.multi_discrete import MultiDiscrete # environment for all agents in the multiagent world # currently code assumes that no agents will be created/destroyed at runtime! class Mul...
38.124668
118
0.559382
import gym from gym import spaces from gym.envs.registration import EnvSpec import numpy as np from dizoo.multiagent_particle.envs.multiagent.multi_discrete import MultiDiscrete class MultiAgentEnv(gym.Env): metadata = {'render.modes': ['human', 'rgb_array']} def __init__( self, world, ...
true
true
08fc0c8031b53597daae6616047e6b991bccc436
515
py
Python
class and objects/Create an Abstract class to override default constructor.py
ZephyrAveryl777/Python-Programs
26de85c31af28382d406d27d54186b966a7b1bfc
[ "MIT" ]
6
2020-08-13T11:49:29.000Z
2021-03-07T05:46:17.000Z
class and objects/Create an Abstract class to override default constructor.py
ZephyrAveryl777/Python-Programs
26de85c31af28382d406d27d54186b966a7b1bfc
[ "MIT" ]
null
null
null
class and objects/Create an Abstract class to override default constructor.py
ZephyrAveryl777/Python-Programs
26de85c31af28382d406d27d54186b966a7b1bfc
[ "MIT" ]
1
2021-04-24T06:12:48.000Z
2021-04-24T06:12:48.000Z
''' Making the __init__ an abstract method ''' from abc import ABCMeta, abstractmethod print(__doc__,end="") print('\n'+'-'*35+'Abstract Class to override default constructor'+'-'*35) class AbstractClass(object,metaclass=ABCMeta): @abstractmethod def __init__(self,n): self.n=n class Employee(AbstractCla...
27.105263
82
0.714563
from abc import ABCMeta, abstractmethod print(__doc__,end="") print('\n'+'-'*35+'Abstract Class to override default constructor'+'-'*35) class AbstractClass(object,metaclass=ABCMeta): @abstractmethod def __init__(self,n): self.n=n class Employee(AbstractClass): def __init__(self,salary,name): self.sal...
true
true
08fc0cd604712a003b119c844386fec1fb0c5562
18,812
py
Python
src/openapi_client/model/task.py
Nozbe/NTImporters
12fa898efd41954b5c29bae383aba5ac56044e87
[ "MIT" ]
6
2022-01-03T07:07:18.000Z
2022-03-21T08:13:49.000Z
src/openapi_client/model/task.py
Nozbe/NTImporters
12fa898efd41954b5c29bae383aba5ac56044e87
[ "MIT" ]
1
2022-02-02T13:01:05.000Z
2022-02-10T12:01:17.000Z
src/openapi_client/model/task.py
Nozbe/NTImporters
12fa898efd41954b5c29bae383aba5ac56044e87
[ "MIT" ]
1
2022-02-10T11:53:55.000Z
2022-02-10T11:53:55.000Z
""" Nozbe Teams API Nozbe Teams API specification # noqa: E501 The version of the OpenAPI document: 0.0.1 Contact: support@nozbe.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from openapi_client.exceptions import ApiAttributeError from op...
43.953271
115
0.571231
import re import sys from openapi_client.exceptions import ApiAttributeError from openapi_client.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, OpenApiModel, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, dateti...
true
true
08fc0cda57db50daa43c951d0d3a2030a2e58fe7
23,835
py
Python
gtfs_csv_to_rdf.py
diarmuidr3d/gtfs_csv_to_rdf.py
e003b9d12c2301220bebc72b2e48ce3d4ce91ec7
[ "CC0-1.0" ]
null
null
null
gtfs_csv_to_rdf.py
diarmuidr3d/gtfs_csv_to_rdf.py
e003b9d12c2301220bebc72b2e48ce3d4ce91ec7
[ "CC0-1.0" ]
1
2015-11-21T10:05:50.000Z
2015-11-21T10:35:49.000Z
gtfs_csv_to_rdf.py
diarmuidr3d/gtfs_csv_to_rdf.py
e003b9d12c2301220bebc72b2e48ce3d4ce91ec7
[ "CC0-1.0" ]
null
null
null
from datetime import datetime import os import shutil from zipfile import ZipFile from rdflib import Graph, Namespace, RDF, Literal, XSD, URIRef from csv import DictReader from rdflib.namespace import FOAF, DCTERMS from rdflib.resource import Resource import sys __author__ = 'Diarmuid' class GtfsCsvToRdf: GEO =...
55.430233
153
0.63176
from datetime import datetime import os import shutil from zipfile import ZipFile from rdflib import Graph, Namespace, RDF, Literal, XSD, URIRef from csv import DictReader from rdflib.namespace import FOAF, DCTERMS from rdflib.resource import Resource import sys __author__ = 'Diarmuid' class GtfsCsvToRdf: GEO =...
true
true
08fc0ce7eda054888e71a956f910c27a3722a9b5
9,907
py
Python
fractalis/data/etlhandler.py
LCSB-BioCore/Fractalis
a9f7f8da7675b55c5996d2f32d7baa7313b0350e
[ "Apache-2.0" ]
7
2018-06-01T12:17:26.000Z
2019-08-23T13:15:34.000Z
fractalis/data/etlhandler.py
LCSB-BioCore/Fractalis
a9f7f8da7675b55c5996d2f32d7baa7313b0350e
[ "Apache-2.0" ]
2
2018-10-23T14:12:27.000Z
2018-11-15T09:11:25.000Z
fractalis/data/etlhandler.py
LCSB-BioCore/Fractalis
a9f7f8da7675b55c5996d2f32d7baa7313b0350e
[ "Apache-2.0" ]
3
2018-08-02T16:42:50.000Z
2018-12-14T18:16:22.000Z
"""This module provides the ETLHandler class.""" import os import abc import json import logging from uuid import uuid4 from typing import List, Union from werkzeug.exceptions import Unauthorized from fractalis.cleanup import janitor from fractalis import app, redis, celery from fractalis.data.etl import ETL logge...
42.702586
79
0.61502
import os import abc import json import logging from uuid import uuid4 from typing import List, Union from werkzeug.exceptions import Unauthorized from fractalis.cleanup import janitor from fractalis import app, redis, celery from fractalis.data.etl import ETL logger = logging.getLogger(__name__) class ETLHandle...
true
true
08fc0d061814a7d86c8f674fb5e954791fc316c0
876
py
Python
xlsxwriter/test/workbook/test_write_file_version.py
shareablee/XlsxWriter
3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/workbook/test_write_file_version.py
shareablee/XlsxWriter
3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/workbook/test_write_file_version.py
shareablee/XlsxWriter
3cfcbe18fbc4526158ffbb5e7bb5227f78e3f5f9
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...workbook import Workbook class TestWriteFileVersion(unittest.TestCase): """ ...
24.333333
95
0.597032
import unittest from ...compatibility import StringIO from ...workbook import Workbook class TestWriteFileVersion(unittest.TestCase): def setUp(self): self.fh = StringIO() self.workbook = Workbook() self.workbook._set_filehandle(self.fh) def test_write_file_version(self): s...
true
true
08fc0dd4f15a8076e9f4df16fcb988e3357354e0
1,130
py
Python
src/mobi/devices/device.py
vsobolmaven/mobi.devices
90aa22bda5e05f8a49bd752d485145756f134d5c
[ "BSD-4-Clause" ]
null
null
null
src/mobi/devices/device.py
vsobolmaven/mobi.devices
90aa22bda5e05f8a49bd752d485145756f134d5c
[ "BSD-4-Clause" ]
null
null
null
src/mobi/devices/device.py
vsobolmaven/mobi.devices
90aa22bda5e05f8a49bd752d485145756f134d5c
[ "BSD-4-Clause" ]
null
null
null
# Copyright (c) 2010 Infrae. All rights reserved. # See also LICENSE.txt. from builtins import str from builtins import object from zope.interface import implementer from mobi.interfaces.devices import (IDevice, IStandardDeviceType, IAdvancedDeviceType, IBasicDeviceType) class Device(object): implementer(IDev...
26.904762
64
0.668142
from builtins import str from builtins import object from zope.interface import implementer from mobi.interfaces.devices import (IDevice, IStandardDeviceType, IAdvancedDeviceType, IBasicDeviceType) class Device(object): implementer(IDevice) def __init__(self, user_agent, type_, platform=u"computer"): ...
true
true
08fc0ebcf3cf1d4af309a978fdb34d02c75764a8
723
py
Python
src/deepproblog/examples/Poker/cfg/generate_cfg.py
vossenwout/gtadeepproblog
65509b740518af422b96e84ef10716e0ac246e75
[ "Apache-2.0" ]
54
2021-06-23T08:03:23.000Z
2022-03-10T01:02:43.000Z
src/deepproblog/examples/Poker/cfg/generate_cfg.py
Damzwan/deepproblog
56bcf5208e79c17510b5d288068fabc6cd64f3cf
[ "Apache-2.0" ]
2
2021-06-30T23:48:25.000Z
2022-03-18T10:45:05.000Z
src/deepproblog/examples/Poker/cfg/generate_cfg.py
Damzwan/deepproblog
56bcf5208e79c17510b5d288068fabc6cd64f3cf
[ "Apache-2.0" ]
12
2021-06-30T10:47:52.000Z
2022-03-09T23:51:48.000Z
from deepproblog.utils import check_path template = """ [Default] batch_size = {0} infoloss = {1} name = poker_batch_{0}_infoloss_{1} """ i = 0 check_path("parameter_cfg/0.cfg") for batch_size in [10, 25, 50, 100]: for infoloss in [0, 0.5, 1.0, 2.0, 4.0]: with open("parameter_cfg/{}.cfg".format(i), "w") ...
20.657143
62
0.609959
from deepproblog.utils import check_path template = """ [Default] batch_size = {0} infoloss = {1} name = poker_batch_{0}_infoloss_{1} """ i = 0 check_path("parameter_cfg/0.cfg") for batch_size in [10, 25, 50, 100]: for infoloss in [0, 0.5, 1.0, 2.0, 4.0]: with open("parameter_cfg/{}.cfg".format(i), "w") ...
true
true
08fc12b995cebae9ed93a84bd46d256a977f766e
40
py
Python
lib/server/lib/__init__.py
foozzi/Loki
3a91382831a714a1a3f3159753fb1982c94cea7c
[ "MIT" ]
null
null
null
lib/server/lib/__init__.py
foozzi/Loki
3a91382831a714a1a3f3159753fb1982c94cea7c
[ "MIT" ]
null
null
null
lib/server/lib/__init__.py
foozzi/Loki
3a91382831a714a1a3f3159753fb1982c94cea7c
[ "MIT" ]
1
2020-01-23T06:21:23.000Z
2020-01-23T06:21:23.000Z
# Date: 07/20/2018 # Author: Pure-L0G1C
20
20
0.675
true
true
08fc12c2990821d841beac74aa73fe8f73908efe
401
py
Python
backend/newapp_28748/wsgi.py
crowdbotics-apps/newapp-28748
8c1ad59d491b9cda7fd7e5bca58585e870b80bbe
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/newapp_28748/wsgi.py
crowdbotics-apps/newapp-28748
8c1ad59d491b9cda7fd7e5bca58585e870b80bbe
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/newapp_28748/wsgi.py
crowdbotics-apps/newapp-28748
8c1ad59d491b9cda7fd7e5bca58585e870b80bbe
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" WSGI config for newapp_28748 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_...
23.588235
78
0.790524
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "newapp_28748.settings") application = get_wsgi_application()
true
true
08fc139ac4857baa67f95759382c45d24e1b6f6f
1,055
py
Python
hooks/pre_gen_project.py
blueyed/cookiecutter-tox-plugin
e405a9446a5370e24d443a4522cf84452f95370c
[ "MIT" ]
null
null
null
hooks/pre_gen_project.py
blueyed/cookiecutter-tox-plugin
e405a9446a5370e24d443a4522cf84452f95370c
[ "MIT" ]
null
null
null
hooks/pre_gen_project.py
blueyed/cookiecutter-tox-plugin
e405a9446a5370e24d443a4522cf84452f95370c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import re import sys logging.basicConfig(level=logging.DEBUG) log = logging.getLogger('pre_gen_project') def validate_plugin_name(name): matcher = re.compile(r'^(?!tox)[-_a-zA-Z][-_a-zA-Z0-9]+$') if not re.match(matcher, name): log.error('...
31.029412
78
0.648341
import logging import re import sys logging.basicConfig(level=logging.DEBUG) log = logging.getLogger('pre_gen_project') def validate_plugin_name(name): matcher = re.compile(r'^(?!tox)[-_a-zA-Z][-_a-zA-Z0-9]+$') if not re.match(matcher, name): log.error('Invalid value for plugin_name "%s"', name) ...
true
true
08fc139c7b77ce653eb579ca8c7e50f73b6627b8
7,584
py
Python
ServidorPython/python32_web/Lib/site-packages/nbconvert/exporters/pdf.py
mak213k/Servidor_automatizado_python
4403ef8027a2f814220baacc95856cf5fbf01d21
[ "MIT" ]
4
2019-07-26T11:32:22.000Z
2019-09-11T05:34:59.000Z
ServidorPython/python32_web/Lib/site-packages/nbconvert/exporters/pdf.py
mak213k/Servidor_automatizado_python
4403ef8027a2f814220baacc95856cf5fbf01d21
[ "MIT" ]
1
2021-09-02T17:44:02.000Z
2021-09-02T17:44:02.000Z
ServidorPython/python32_web/Lib/site-packages/nbconvert/exporters/pdf.py
mak213k/Servidor_automatizado_python
4403ef8027a2f814220baacc95856cf5fbf01d21
[ "MIT" ]
2
2019-08-28T14:57:54.000Z
2019-11-26T16:18:30.000Z
"""Export to PDF via latex""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import subprocess import os import sys from ipython_genutils.py3compat import which, cast_bytes_py2, getcwd from traitlets import Integer, List, Bool, Instance, Unicode, default from tes...
37.92
92
0.604562
import subprocess import os import sys from ipython_genutils.py3compat import which, cast_bytes_py2, getcwd from traitlets import Integer, List, Bool, Instance, Unicode, default from testpath.tempdir import TemporaryWorkingDirectory from .latex import LatexExporter class LatexFailed(IOError): def __init__(self,...
true
true
08fc141bdc0935490a47976fa6bfd17133f6869e
3,178
py
Python
control/latrd/detector/test_control_interface.py
dls-controls/LATRD
5e2fb343c31ee5c55d89fea3f37b8877d3691284
[ "Apache-2.0" ]
null
null
null
control/latrd/detector/test_control_interface.py
dls-controls/LATRD
5e2fb343c31ee5c55d89fea3f37b8877d3691284
[ "Apache-2.0" ]
null
null
null
control/latrd/detector/test_control_interface.py
dls-controls/LATRD
5e2fb343c31ee5c55d89fea3f37b8877d3691284
[ "Apache-2.0" ]
null
null
null
""" Created on 19 September 2017 @author: Alan Greer """ from __future__ import print_function import logging import argparse from latrd_channel import LATRDChannel from latrd_message import LATRDMessage, GetMessage, PutMessage, PostMessage, ResponseMessage def options(): parser = argparse.ArgumentParser() ...
33.104167
103
0.671177
from __future__ import print_function import logging import argparse from latrd_channel import LATRDChannel from latrd_message import LATRDMessage, GetMessage, PutMessage, PostMessage, ResponseMessage def options(): parser = argparse.ArgumentParser() parser.add_argument("-c", "--control", default="tcp://172....
true
true
08fc1565e5a9f226dbd5cf68e6faea13272dd008
548
py
Python
source/framework/python/test/algorithm/sin_test.py
pcraster/lue
e64c18f78a8b6d8a602b7578a2572e9740969202
[ "MIT" ]
1
2019-04-14T15:51:12.000Z
2019-04-14T15:51:12.000Z
source/framework/python/test/algorithm/sin_test.py
pcraster/lue
e64c18f78a8b6d8a602b7578a2572e9740969202
[ "MIT" ]
262
2016-08-11T10:12:02.000Z
2020-10-13T18:09:16.000Z
source/framework/python/test/algorithm/sin_test.py
pcraster/lue
e64c18f78a8b6d8a602b7578a2572e9740969202
[ "MIT" ]
1
2020-03-11T09:49:41.000Z
2020-03-11T09:49:41.000Z
import lue.framework as lfr import lue_test import numpy as np def setUpModule(): lue_test.start_hpx_runtime() def tearDownModule(): return lue_test.stop_hpx_runtime() class SinTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): array_shape = (60, 40) ...
20.296296
95
0.669708
import lue.framework as lfr import lue_test import numpy as np def setUpModule(): lue_test.start_hpx_runtime() def tearDownModule(): return lue_test.stop_hpx_runtime() class SinTest(lue_test.TestCase): @lue_test.framework_test_case def test_overloads(self): array_shape = (60, 40) ...
true
true