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
f7570968e2e69af18bc54d033adef3cba461d766
3,448
py
Python
harvardcs50/project1env/lib/python3.7/site-packages/passwordmeter/test_passwordmeter.py
snowyrainkun/webdevelop
9792d8d05b70f35586616a95ba26ed0daf1f72b3
[ "MIT" ]
22
2015-03-18T20:33:59.000Z
2021-05-13T15:01:33.000Z
harvardcs50/project1env/lib/python3.7/site-packages/passwordmeter/test_passwordmeter.py
snowyrainkun/webdevelop
9792d8d05b70f35586616a95ba26ed0daf1f72b3
[ "MIT" ]
2
2015-04-03T19:48:46.000Z
2015-10-01T23:23:19.000Z
harvardcs50/project1env/lib/python3.7/site-packages/passwordmeter/test_passwordmeter.py
snowyrainkun/webdevelop
9792d8d05b70f35586616a95ba26ed0daf1f72b3
[ "MIT" ]
10
2015-06-19T03:21:56.000Z
2021-08-31T15:02:58.000Z
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # file: $Id$ # auth: Philip J Grabner <grabner@cadit.com> # date: 2013/10/29 # copy: (C) Copyright 2013 Cadit Health Inc., All Rights Reserved. #-----------------------------------------------------------------------...
35.546392
88
0.453306
import unittest import passwordmeter as pwm class TestFactor(pwm.Factor): category = 'test' def __init__(self, prefix='test value is', *args, **kw): self.prefix = prefix super(TestFactor, self).__init__(*args, **kw) def test(self, value, extra): return (0.5, self.prefix + ': ' + value) class TestPa...
true
true
f75709ac1fc41efd76b4e3b7c7cc60eaa877b19d
8,820
py
Python
pool/singleton.py
spacefarmers/pool-reference
275db66215340acb6309dd7ca14e67019e61459b
[ "Apache-2.0" ]
null
null
null
pool/singleton.py
spacefarmers/pool-reference
275db66215340acb6309dd7ca14e67019e61459b
[ "Apache-2.0" ]
null
null
null
pool/singleton.py
spacefarmers/pool-reference
275db66215340acb6309dd7ca14e67019e61459b
[ "Apache-2.0" ]
null
null
null
from typing import List, Optional, Tuple import logging from blspy import G2Element from chia.consensus.coinbase import pool_parent_id from chia.pools.pool_puzzles import ( create_absorb_spend, solution_to_pool_state, get_most_recent_singleton_coin_from_coin_spend, pool_state_to_inner_puzzle, creat...
41.603774
120
0.710544
from typing import List, Optional, Tuple import logging from blspy import G2Element from chia.consensus.coinbase import pool_parent_id from chia.pools.pool_puzzles import ( create_absorb_spend, solution_to_pool_state, get_most_recent_singleton_coin_from_coin_spend, pool_state_to_inner_puzzle, creat...
true
true
f75709afe9370dd6017f269ac132886b391d8188
3,643
py
Python
monitor_http.py
EliHar/CryptoMonitor
0f81c20211bea5b3c4df9555582bcea7c7efd9fb
[ "MIT" ]
null
null
null
monitor_http.py
EliHar/CryptoMonitor
0f81c20211bea5b3c4df9555582bcea7c7efd9fb
[ "MIT" ]
null
null
null
monitor_http.py
EliHar/CryptoMonitor
0f81c20211bea5b3c4df9555582bcea7c7efd9fb
[ "MIT" ]
null
null
null
import getpass import sys import urllib2 import json import smtplib import time from email.mime.text import MIMEText print "\nLoging into your mail server...\n" EMAIL = raw_input("Email address: ") PWD = getpass.getpass("Email password: ") # IFTT trigger email REC = 'trigger@applet.ifttt.com' SUBJECT = 'TradeAlert!' ...
24.952055
88
0.637661
import getpass import sys import urllib2 import json import smtplib import time from email.mime.text import MIMEText print "\nLoging into your mail server...\n" EMAIL = raw_input("Email address: ") PWD = getpass.getpass("Email password: ") REC = 'trigger@applet.ifttt.com' SUBJECT = 'TradeAlert!' SMTP = 'smtp.gmail.c...
false
true
f7570a06461d0a7f3169f48ab9b4b2488d352e53
933
py
Python
avwx/data/build_navaids.py
flyinactor91/AVWX-Engine
0d3ce2c6e962d2a3ec9db711caf9d1c94658fa80
[ "MIT" ]
30
2015-09-08T20:38:41.000Z
2019-03-10T07:10:47.000Z
avwx/data/build_navaids.py
sthagen/avwx-engine
af235b9d26e5495f04076ed5499cf8cd131d4efc
[ "MIT" ]
5
2015-08-12T15:50:07.000Z
2019-04-16T00:42:12.000Z
avwx/data/build_navaids.py
sthagen/avwx-engine
af235b9d26e5495f04076ed5499cf8cd131d4efc
[ "MIT" ]
11
2016-01-17T10:10:29.000Z
2019-01-13T17:55:36.000Z
""" Build navaid coordinate map """ import json from pathlib import Path import httpx # redirect https://ourairports.com/data/navaids.csv URL = "https://davidmegginson.github.io/ourairports-data/navaids.csv" OUTPUT_PATH = Path(__file__).parent / "files" / "navaids.json" def main(): """Builds the navaid coordina...
24.552632
80
0.585209
import json from pathlib import Path import httpx URL = "https://davidmegginson.github.io/ourairports-data/navaids.csv" OUTPUT_PATH = Path(__file__).parent / "files" / "navaids.json" def main(): text = httpx.get(URL).text lines = text.strip().split("\n") lines.pop(0) data = {} for line in lines:...
true
true
f7570a6dcb5ac4fa320728619fa097b43aaaeb08
3,281
py
Python
examples/legacy/evaluate_defaults_live.py
pfistfl/openml-defaults
0678167f807512bd0c957f82a83ff8181461090c
[ "BSD-3-Clause" ]
1
2019-08-01T13:44:47.000Z
2019-08-01T13:44:47.000Z
examples/legacy/evaluate_defaults_live.py
pfistfl/openml-defaults
0678167f807512bd0c957f82a83ff8181461090c
[ "BSD-3-Clause" ]
null
null
null
examples/legacy/evaluate_defaults_live.py
pfistfl/openml-defaults
0678167f807512bd0c957f82a83ff8181461090c
[ "BSD-3-Clause" ]
1
2019-08-29T15:54:38.000Z
2019-08-29T15:54:38.000Z
import argparse import copy import matplotlib.pyplot as plt import seaborn as sns import openmldefaults import os import pandas as pd # sshfs jv2657@habanero.rcs.columbia.edu:/rigel/home/jv2657/experiments ~/habanero_experiments def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--datas...
36.865169
214
0.698263
import argparse import copy import matplotlib.pyplot as plt import seaborn as sns import openmldefaults import os import pandas as pd def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--dataset_path', type=str, default=os.path.expanduser('~') + '/data/openml-def...
true
true
f7570b284543607a989de10f3477bc095ba3cf10
2,301
py
Python
torchnlp/encoders/encoder.py
MPetrochuk/PyTorch-NLP
d7814a297811c9b0dfb285fe0475098b86f3d348
[ "BSD-3-Clause" ]
2,125
2018-03-17T23:31:03.000Z
2022-03-31T12:20:14.000Z
torchnlp/encoders/encoder.py
zhengmingzhang/PyTorch-NLP
34a98b5fa5d2e13761546b94770aed12388528f2
[ "BSD-3-Clause" ]
109
2018-03-21T00:38:51.000Z
2021-12-24T08:34:55.000Z
torchnlp/encoders/encoder.py
zhengmingzhang/PyTorch-NLP
34a98b5fa5d2e13761546b94770aed12388528f2
[ "BSD-3-Clause" ]
270
2018-03-18T16:47:01.000Z
2022-03-17T08:01:58.000Z
class Encoder(object): """ Base class for a encoder employing an identity function. Args: enforce_reversible (bool, optional): Check for reversibility on ``Encoder.encode`` and ``Encoder.decode``. Formally, reversible means: ``Encoder.decode(Encoder.encode(object_)) == object_``...
31.520548
94
0.579313
class Encoder(object): def __init__(self, enforce_reversible=False): self.enforce_reversible = enforce_reversible def encode(self, object_): if self.enforce_reversible: self.enforce_reversible = False encoded_decoded = self.decode(self.encode(object_)) self....
true
true
f7570c4691610dfebb9f130a70ada62e5039c3b0
37,895
py
Python
scripts/irods/test/test_rulebase.py
stefan-wolfsheimer/irods
f6eb6c72786288878706e2562a370b91b7d0802e
[ "BSD-3-Clause" ]
null
null
null
scripts/irods/test/test_rulebase.py
stefan-wolfsheimer/irods
f6eb6c72786288878706e2562a370b91b7d0802e
[ "BSD-3-Clause" ]
null
null
null
scripts/irods/test/test_rulebase.py
stefan-wolfsheimer/irods
f6eb6c72786288878706e2562a370b91b7d0802e
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest import copy import inspect import json import os import socket import tempfile import time # remove once file hash fix is committed #2279 import subprocess from .. import lib from...
49.150454
211
0.651036
from __future__ import print_function import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest import copy import inspect import json import os import socket import tempfile import time import subprocess from .. import lib from .. import paths from .. import test from . imp...
true
true
f7570cb11e4b5ec29ee283c6e19ad9d094add547
21,262
py
Python
tiledb_cli/tests/test_convert_from.py
TileDB-Inc/TileDB-CLI
e18e148fe5c6044b87d28595f5370eecac0b3c8f
[ "MIT" ]
3
2021-09-15T12:55:59.000Z
2021-12-22T16:39:38.000Z
tiledb_cli/tests/test_convert_from.py
TileDB-Inc/TileDB-CLI
e18e148fe5c6044b87d28595f5370eecac0b3c8f
[ "MIT" ]
7
2021-09-24T00:12:51.000Z
2022-02-03T20:30:34.000Z
tiledb_cli/tests/test_convert_from.py
TileDB-Inc/TileDB-CLI
e18e148fe5c6044b87d28595f5370eecac0b3c8f
[ "MIT" ]
null
null
null
import tiledb from tiledb_cli.root import root from tiledb_cli.convert_from import parse_kwargs from click.testing import CliRunner import os import numpy as np import pandas as pd import pytest @pytest.fixture(autouse=True, scope="session") def create_test_simple_csv(temp_rootdir): """ Create a simple dense...
31.734328
107
0.523704
import tiledb from tiledb_cli.root import root from tiledb_cli.convert_from import parse_kwargs from click.testing import CliRunner import os import numpy as np import pandas as pd import pytest @pytest.fixture(autouse=True, scope="session") def create_test_simple_csv(temp_rootdir): path = os.path.abspath(os.pat...
true
true
f7570ccad063c348517c633cdb082a5dc19d41b1
873
py
Python
tests/test_linenotipy.py
10mohi6/line-notify-python
f2c41b2c77b92116a62f6e7829b82a086e05f3ad
[ "MIT" ]
2
2019-10-06T13:09:58.000Z
2021-10-18T10:46:08.000Z
tests/test_linenotipy.py
10mohi6/line-notify-python
f2c41b2c77b92116a62f6e7829b82a086e05f3ad
[ "MIT" ]
3
2020-02-24T19:56:08.000Z
2021-12-06T15:01:32.000Z
tests/test_linenotipy.py
10mohi6/line-notify-python
f2c41b2c77b92116a62f6e7829b82a086e05f3ad
[ "MIT" ]
2
2019-10-23T15:19:33.000Z
2021-12-17T05:27:34.000Z
import os import pytest import time from linenotipy import Line @pytest.fixture(scope="module", autouse=True) def scope_module(): token = os.environ["line_notify_token"] yield Line(token=token) @pytest.fixture(scope="function", autouse=True) def line(scope_module): time.sleep(1) yield scope_module ...
22.973684
82
0.705613
import os import pytest import time from linenotipy import Line @pytest.fixture(scope="module", autouse=True) def scope_module(): token = os.environ["line_notify_token"] yield Line(token=token) @pytest.fixture(scope="function", autouse=True) def line(scope_module): time.sleep(1) yield scope_module ...
true
true
f7570d3ec598c1374ebc8619a8097ea681c2c49d
3,584
py
Python
ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_metadata.py
alexa-labs/alexa-apis-for-python
52838be4f57ee1a2479402ea78b1247b56017942
[ "Apache-2.0" ]
90
2018-09-19T21:56:42.000Z
2022-03-30T11:25:21.000Z
ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_metadata.py
ishitaojha/alexa-apis-for-python
a68f94b7a0e41f819595d6fe56e800403e8a4194
[ "Apache-2.0" ]
11
2018-09-23T12:16:48.000Z
2021-06-10T19:49:45.000Z
ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_metadata.py
ishitaojha/alexa-apis-for-python
a68f94b7a0e41f819595d6fe56e800403e8a4194
[ "Apache-2.0" ]
28
2018-09-19T22:30:38.000Z
2022-02-22T22:57:07.000Z
# coding: utf-8 # # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file # except in compliance with the License. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "lice...
32.581818
115
0.610491
import pprint import re import six import typing from enum import Enum if typing.TYPE_CHECKING: from typing import Dict, List, Optional, Union, Any from datetime import datetime from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_info import HostedSkillInfo as HostedSkillInfo_de0ff179 class Hoste...
true
true
f7570de1002cb227589ce907c00d73a4c07f4621
1,554
py
Python
yingzi_csv.py
Admingyu/csv-GPS-data-wash
9e99ef4323d58a97d0b09377cc59724a7f9d3ab8
[ "MIT" ]
null
null
null
yingzi_csv.py
Admingyu/csv-GPS-data-wash
9e99ef4323d58a97d0b09377cc59724a7f9d3ab8
[ "MIT" ]
null
null
null
yingzi_csv.py
Admingyu/csv-GPS-data-wash
9e99ef4323d58a97d0b09377cc59724a7f9d3ab8
[ "MIT" ]
null
null
null
import csv import os # csv文件路径 path = './csv/' # 定义数据清洗函数data_wash, 接收filename[文件名], la_max[最大纬度], ln_max[最大精度]参数, def data_wash(filename, la_max, ln_max): # 定义csv文件和写入器,用于保存生成的csv文件,保存的文件名为:原文件文件名+_output csv_out_file = open(path + filename + '_output', 'w') csv_writer = csv.writer(csv_out_file) # ...
28.777778
80
0.598456
import csv import os path = './csv/' def data_wash(filename, la_max, ln_max): csv_out_file = open(path + filename + '_output', 'w') csv_writer = csv.writer(csv_out_file) with open(path + filename, 'r') as csv_file: csv_reader = csv.reader(csv_file) line_count = 0 ...
true
true
f7570e570d93ed50d34880b89b90c050d905a54d
866
py
Python
streamdeck_manager/samples/tiled_image.py
vgonisanz/streamdeck_manager
f022094dfc88f5d39a6a7535406ab4ac986f50a9
[ "MIT" ]
8
2021-08-14T14:55:47.000Z
2022-01-28T12:24:18.000Z
streamdeck_manager/samples/tiled_image.py
vgonisanz/streamdeck_manager
f022094dfc88f5d39a6a7535406ab4ac986f50a9
[ "MIT" ]
null
null
null
streamdeck_manager/samples/tiled_image.py
vgonisanz/streamdeck_manager
f022094dfc88f5d39a6a7535406ab4ac986f50a9
[ "MIT" ]
2
2022-01-18T14:57:05.000Z
2022-01-27T22:53:59.000Z
import os import typer from streamdeck_manager.core import Core def end_sample_callback(): exit(0) def main(asset_path: str=os.path.join(os.path.dirname(__file__), "..", "assets"), photo: str="Harold.jpg"): core = Core() if len(core.streamdecks) <= 0: print("Not Stream deck found") ...
24.742857
111
0.670901
import os import typer from streamdeck_manager.core import Core def end_sample_callback(): exit(0) def main(asset_path: str=os.path.join(os.path.dirname(__file__), "..", "assets"), photo: str="Harold.jpg"): core = Core() if len(core.streamdecks) <= 0: print("Not Stream deck found") ...
true
true
f7570e927df59101cc117c0fa21dfad5e68671e9
59
py
Python
tests/plugins/export.py
mobyw/nonebot2
36663f1a8a51bd89f4a60110047e73719adcc73d
[ "MIT" ]
1
2022-01-26T12:52:33.000Z
2022-01-26T12:52:33.000Z
tests/plugins/export.py
mobyw/nonebot2
36663f1a8a51bd89f4a60110047e73719adcc73d
[ "MIT" ]
null
null
null
tests/plugins/export.py
mobyw/nonebot2
36663f1a8a51bd89f4a60110047e73719adcc73d
[ "MIT" ]
null
null
null
from nonebot import export @export() def test(): ...
8.428571
26
0.610169
from nonebot import export @export() def test(): ...
true
true
f757100a8e2fe00830c58e5cd56b5af6557dcbef
253
py
Python
examples/logger.py
CzaOrz/loggus
2bf3f75af268aaec95eeee2e798963290fa81c48
[ "MIT" ]
5
2020-11-04T04:56:51.000Z
2021-05-10T12:32:39.000Z
examples/logger.py
czasg/loggus
b29815a6a420051eabd9ff88208dd6057189b197
[ "MIT" ]
1
2021-10-14T03:22:07.000Z
2021-10-14T03:22:07.000Z
examples/logger.py
czasg/loggus
b29815a6a420051eabd9ff88208dd6057189b197
[ "MIT" ]
null
null
null
# coding: utf-8 import loggus if __name__ == '__main__': logger1 = loggus.NewLogger() logger1.SetFormatter(loggus.JsonFormatter) logger1.info("logger1 output json") logger2 = loggus.NewLogger() logger2.info("but logger2 is text")
21.083333
46
0.699605
import loggus if __name__ == '__main__': logger1 = loggus.NewLogger() logger1.SetFormatter(loggus.JsonFormatter) logger1.info("logger1 output json") logger2 = loggus.NewLogger() logger2.info("but logger2 is text")
true
true
f75710fe7c4d9af216ba4c379fed6801e10471bc
605
py
Python
trails/feeds/blocklist.py
jayvdb/maltrail
4a23621cea36309a195bffb8703d42fb2ab88908
[ "MIT" ]
2
2020-03-26T14:55:59.000Z
2020-12-16T09:13:51.000Z
trails/feeds/blocklist.py
BUGUB/maltrail
09873f89c1d1592a8d6867e5ad6ab7ad0f4ea26e
[ "MIT" ]
null
null
null
trails/feeds/blocklist.py
BUGUB/maltrail
09873f89c1d1592a8d6867e5ad6ab7ad0f4ea26e
[ "MIT" ]
1
2020-11-09T07:16:27.000Z
2020-11-09T07:16:27.000Z
#!/usr/bin/env python """ Copyright (c) 2014-2020 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://lists.blocklist.de/lists/all.txt" __info__ = "known attacker" __reference__ = "blocklist.de" def...
24.2
83
0.667769
from core.common import retrieve_content __url__ = "https://lists.blocklist.de/lists/all.txt" __info__ = "known attacker" __reference__ = "blocklist.de" def fetch(): retval = {} content = retrieve_content(__url__) for line in content.split('\n'): line = line.strip() if not line or line....
true
true
f7571119a4f449f503918fe65ae8ed84cb10b619
8,152
py
Python
efficientnetv2/efficientnet_v2.py
hankyul2/EfficientNetV2-pytorch
bce59dae3ce69e3e7e8aa99e4f32214b015dd1f8
[ "Apache-2.0" ]
9
2021-11-13T08:49:10.000Z
2022-03-24T12:37:26.000Z
efficientnetv2/efficientnet_v2.py
hankyul2/EfficientNetV2-pytorch
bce59dae3ce69e3e7e8aa99e4f32214b015dd1f8
[ "Apache-2.0" ]
2
2021-11-12T02:07:32.000Z
2021-11-22T04:50:04.000Z
efficientnetv2/efficientnet_v2.py
hankyul2/EfficientNetV2-pytorch
bce59dae3ce69e3e7e8aa99e4f32214b015dd1f8
[ "Apache-2.0" ]
3
2021-11-30T03:03:54.000Z
2022-01-08T14:47:35.000Z
import copy from functools import partial from collections import OrderedDict import torch from torch import nn from efficientnetv2 import get_efficientnet_v2_structure from efficientnetv2 import load_from_zoo class ConvBNAct(nn.Sequential): """Convolution-Normalization-Activation Module""" def __init__(sel...
39.572816
142
0.654809
import copy from functools import partial from collections import OrderedDict import torch from torch import nn from efficientnetv2 import get_efficientnet_v2_structure from efficientnetv2 import load_from_zoo class ConvBNAct(nn.Sequential): def __init__(self, in_channel, out_channel, kernel_size, stride, group...
true
true
f75711e7673714e980140d95602d3fe767cbd7d4
135
py
Python
super32emu/__init__.py
xsjad0/Super32
75cf5828b17cdbce144447a69ff3d1be7ad601f2
[ "BSD-3-Clause" ]
1
2019-12-07T01:56:31.000Z
2019-12-07T01:56:31.000Z
super32emu/__init__.py
xsjad0/Super32
75cf5828b17cdbce144447a69ff3d1be7ad601f2
[ "BSD-3-Clause" ]
42
2019-11-30T12:57:07.000Z
2020-02-26T16:30:33.000Z
super32emu/__init__.py
xsjad0/Super32
75cf5828b17cdbce144447a69ff3d1be7ad601f2
[ "BSD-3-Clause" ]
4
2019-11-27T15:05:33.000Z
2020-05-13T06:51:21.000Z
""" Super32 Emulator """ import logging from logging import NullHandler logging.getLogger(__name__).addHandler(logging.NullHandler())
16.875
61
0.8
import logging from logging import NullHandler logging.getLogger(__name__).addHandler(logging.NullHandler())
true
true
f757124e654aece197d1dcbf7c5ec93394e6cf15
3,712
py
Python
server_cluster/app.py
nlp-tlp/quickgraph
34d888b055a78939095005f9cef363c0430664be
[ "Apache-2.0" ]
1
2022-02-20T09:22:54.000Z
2022-02-20T09:22:54.000Z
server_cluster/app.py
nlp-tlp/quickgraph
34d888b055a78939095005f9cef363c0430664be
[ "Apache-2.0" ]
null
null
null
server_cluster/app.py
nlp-tlp/quickgraph
34d888b055a78939095005f9cef363c0430664be
[ "Apache-2.0" ]
1
2022-02-20T09:22:56.000Z
2022-02-20T09:22:56.000Z
''' API for rank order clustering documents. ''' import itertools import pathlib from collections import Counter, defaultdict from enum import Enum from typing import List, Optional import numpy as np import uvicorn from fastapi import Body, FastAPI, HTTPException from loguru import logger from nltk import FreqDi...
30.677686
112
0.718481
import itertools import pathlib from collections import Counter, defaultdict from enum import Enum from typing import List, Optional import numpy as np import uvicorn from fastapi import Body, FastAPI, HTTPException from loguru import logger from nltk import FreqDist from pydantic import BaseModel, Field from sentenc...
true
true
f7571269c35f6cafcdd3ec54798dd1693e704794
130
py
Python
abc/abc036/abc036c.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
1
2019-08-21T00:49:34.000Z
2019-08-21T00:49:34.000Z
abc/abc036/abc036c.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
abc/abc036/abc036c.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
N, *a = map(int, open(0).read().split()) d = {} for i, j in enumerate(sorted(set(a))): d[j] = i for e in a: print(d[e])
14.444444
40
0.507692
N, *a = map(int, open(0).read().split()) d = {} for i, j in enumerate(sorted(set(a))): d[j] = i for e in a: print(d[e])
true
true
f75713a82b3ca7ea21958a0f7eab14947aff9966
4,213
py
Python
tests/data23/recipe-440622.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-06-05T08:53:26.000Z
2020-06-05T08:53:26.000Z
tests/data23/recipe-440622.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-06-04T13:47:19.000Z
2020-06-04T13:47:57.000Z
tests/data23/recipe-440622.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-11-07T17:02:46.000Z
2020-11-07T17:02:46.000Z
from random import randint, seed from time import time def game(): print('Welcome to WAR V2!') print() asking = True while asking: try: players = int(input('How many players are there? ')) if players < 2: print('There must be at least two players.') ...
36.008547
99
0.468787
from random import randint, seed from time import time def game(): print('Welcome to WAR V2!') print() asking = True while asking: try: players = int(input('How many players are there? ')) if players < 2: print('There must be at least two players.') ...
true
true
f7571559e5144cb153e821436b665f483807d888
20,304
py
Python
lib/googleappengine/python/google/appengine/ext/remote_api/throttle.py
mtktauseef/wordpresstoblogger
151cc2e1b6c7f4f835dc51dfb8f50a1b0d5caa74
[ "Apache-2.0" ]
1
2015-10-28T21:28:29.000Z
2015-10-28T21:28:29.000Z
lib/googleappengine/python/google/appengine/ext/remote_api/throttle.py
mtktauseef/wordpresstoblogger
151cc2e1b6c7f4f835dc51dfb8f50a1b0d5caa74
[ "Apache-2.0" ]
null
null
null
lib/googleappengine/python/google/appengine/ext/remote_api/throttle.py
mtktauseef/wordpresstoblogger
151cc2e1b6c7f4f835dc51dfb8f50a1b0d5caa74
[ "Apache-2.0" ]
5
2016-05-26T18:35:17.000Z
2020-04-15T06:53:24.000Z
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
31.52795
80
0.717199
import logging import threading import time import urllib2 import urlparse from google.appengine.api import apiproxy_stub_map from google.appengine.ext.remote_api import remote_api_stub from google.appengine.tools import appengine_rpc logger = logging.getLogger('google.appengine.ext.remote_api.throttle') MINIMUM_...
true
true
f75715b999ee3bc1949b08a263b317462848461d
10,745
py
Python
flopy/modflow/mfdrn.py
ritchie46/flopy
8e7284dcb3aaf5c12293d442248c2c2d9959f835
[ "CC0-1.0", "BSD-3-Clause" ]
1
2019-11-03T15:06:10.000Z
2019-11-03T15:06:10.000Z
flopy/modflow/mfdrn.py
ritchie46/flopy
8e7284dcb3aaf5c12293d442248c2c2d9959f835
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
flopy/modflow/mfdrn.py
ritchie46/flopy
8e7284dcb3aaf5c12293d442248c2c2d9959f835
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
""" mfdrn module. Contains the ModflowDrn class. Note that the user can access the ModflowDrn class as `flopy.modflow.ModflowDrn`. Additional information for this MODFLOW package can be found at the `Online MODFLOW Guide <http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/index.html?drn.htm>`_. """ import...
36.300676
99
0.54993
import sys import numpy as np from ..pakbase import Package from ..utils.util_list import MfList from ..utils.recarray_utils import create_empty_recarray class ModflowDrn(Package): def __init__(self, model, ipakcb=None, stress_period_data=None, dtype=None, extension='drn', unitnumber=N...
true
true
f75715c992563c935c5c4a9bce26002ed30c1cbb
27,513
py
Python
python/ray/serve/api.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
1
2022-03-07T06:40:06.000Z
2022-03-07T06:40:06.000Z
python/ray/serve/api.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
29
2021-11-24T00:50:07.000Z
2022-03-19T07:11:36.000Z
python/ray/serve/api.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
null
null
null
import collections import inspect import logging from typing import ( Any, Callable, Dict, Optional, Tuple, Union, overload, ) from fastapi import APIRouter, FastAPI from starlette.requests import Request from uvicorn.config import Config from uvicorn.lifespan.on import LifespanOn from ray...
38.533613
88
0.66067
import collections import inspect import logging from typing import ( Any, Callable, Dict, Optional, Tuple, Union, overload, ) from fastapi import APIRouter, FastAPI from starlette.requests import Request from uvicorn.config import Config from uvicorn.lifespan.on import LifespanOn from ray...
true
true
f75715ebd4823aa5650615c2e818d3cbd1f61b3f
3,085
py
Python
scripts/e72.py
JackKelly/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
38
2015-08-14T14:38:52.000Z
2021-12-15T03:21:04.000Z
scripts/e72.py
VidipG/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
null
null
null
scripts/e72.py
VidipG/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
26
2015-09-24T20:55:26.000Z
2021-12-07T15:42:09.000Z
from __future__ import print_function, division from neuralnilm import Net, RealApplianceSource, BLSTMLayer, SubsampleLayer, DimshuffleLayer from lasagne.nonlinearities import sigmoid, rectify from lasagne.objectives import crossentropy from lasagne.init import Uniform, Normal from lasagne.layers import LSTMLayer, Dens...
25.286885
92
0.62269
from __future__ import print_function, division from neuralnilm import Net, RealApplianceSource, BLSTMLayer, SubsampleLayer, DimshuffleLayer from lasagne.nonlinearities import sigmoid, rectify from lasagne.objectives import crossentropy from lasagne.init import Uniform, Normal from lasagne.layers import LSTMLayer, Dens...
true
true
f757177f79c39ea8eee8f6b41f61f93db9413dc6
5,168
py
Python
src/mongoengine/queryset/visitor.py
saurabh1e/flask-mongo-starter
8bceac18bddb0b4c6632940cb6a41220fa338a16
[ "MIT" ]
1
2016-08-13T11:30:48.000Z
2016-08-13T11:30:48.000Z
src/mongoengine/queryset/visitor.py
saurabh1e/flask-mongo-starter
8bceac18bddb0b4c6632940cb6a41220fa338a16
[ "MIT" ]
null
null
null
src/mongoengine/queryset/visitor.py
saurabh1e/flask-mongo-starter
8bceac18bddb0b4c6632940cb6a41220fa338a16
[ "MIT" ]
null
null
null
import copy from mongoengine.errors import InvalidQueryError from mongoengine.python_support import product, reduce from mongoengine.queryset import transform __all__ = ('Q',) class QNodeVisitor(object): """Base visitor class for visiting Q-object nodes in a query tree. """ def visit_combination(self,...
29.19774
117
0.605457
import copy from mongoengine.errors import InvalidQueryError from mongoengine.python_support import product, reduce from mongoengine.queryset import transform __all__ = ('Q',) class QNodeVisitor(object): def visit_combination(self, combination): return combination def visit_query(self, query): ...
true
true
f75718fb615d2a27cdca73136a1917afd91199b5
981
py
Python
src/tweetengine/utils.py
Arachnid/tweetengine
2e111a8cfb5316c868f644a10536e25edca9a179
[ "Apache-2.0" ]
2
2017-09-03T20:55:23.000Z
2020-05-31T17:07:57.000Z
src/tweetengine/utils.py
Arachnid/tweetengine
2e111a8cfb5316c868f644a10536e25edca9a179
[ "Apache-2.0" ]
null
null
null
src/tweetengine/utils.py
Arachnid/tweetengine
2e111a8cfb5316c868f644a10536e25edca9a179
[ "Apache-2.0" ]
null
null
null
from tweetengine import model from google.appengine.api import users def setConfiguration(): account_name='tweet_engine' password='passwd' oauth_key='fookey' oauth_secret='foosecret' conf = model.Configuration.instance() conf.oauth_key = oauth_key conf.oauth_secret = oauth_secret con...
25.153846
61
0.647299
from tweetengine import model from google.appengine.api import users def setConfiguration(): account_name='tweet_engine' password='passwd' oauth_key='fookey' oauth_secret='foosecret' conf = model.Configuration.instance() conf.oauth_key = oauth_key conf.oauth_secret = oauth_secret con...
true
true
f7571902dc7e51b184bce055e1e57c45c40cd3a5
591
py
Python
ticketing/forms.py
Receiling/cinema_ticketing
fb88606fb6aa304bd661368b855464de6388f82c
[ "MIT" ]
null
null
null
ticketing/forms.py
Receiling/cinema_ticketing
fb88606fb6aa304bd661368b855464de6388f82c
[ "MIT" ]
null
null
null
ticketing/forms.py
Receiling/cinema_ticketing
fb88606fb6aa304bd661368b855464de6388f82c
[ "MIT" ]
null
null
null
from django import forms from ticketing.models import Customer, Employee, Movie_comment, Cinema_comment class MovieCommentForm(forms.ModelForm): """电影评价的表单""" class Meta: model = Movie_comment fields = ['comment', 'score'] labels = {'comment': '评论', 'score': '评分'} widgets = {'...
26.863636
78
0.610829
from django import forms from ticketing.models import Customer, Employee, Movie_comment, Cinema_comment class MovieCommentForm(forms.ModelForm): class Meta: model = Movie_comment fields = ['comment', 'score'] labels = {'comment': '评论', 'score': '评分'} widgets = {'email': forms.Text...
true
true
f75719347e1136a7cea1252419992ace23bc9a89
5,399
py
Python
configs/_trans_drone_wide/yolact_r50_1x8_coco_mix.py
qilei123/mmdetection
6c18ff0866938d982f4555a8c43979733dba1c7a
[ "Apache-2.0" ]
null
null
null
configs/_trans_drone_wide/yolact_r50_1x8_coco_mix.py
qilei123/mmdetection
6c18ff0866938d982f4555a8c43979733dba1c7a
[ "Apache-2.0" ]
null
null
null
configs/_trans_drone_wide/yolact_r50_1x8_coco_mix.py
qilei123/mmdetection
6c18ff0866938d982f4555a8c43979733dba1c7a
[ "Apache-2.0" ]
null
null
null
_base_ = '../_base_/default_runtime.py' # model settings img_size = 550 classes=('Small 1-piece vehicle', 'Large 1-piece vehicle', 'Extra-large 2-piece truck') model = dict( type='YOLACT', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices...
31.946746
79
0.587146
_base_ = '../_base_/default_runtime.py' img_size = 550 classes=('Small 1-piece vehicle', 'Large 1-piece vehicle', 'Extra-large 2-piece truck') model = dict( type='YOLACT', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), ...
true
true
f7571b2326313cfc6d04bd98a426a256b8b2935d
8,362
py
Python
NYS-covasim/second_wave_scenarios.py
molkjar/bachelor
a0591691b820c6c8a45d16f8d55f3a7e80ea384b
[ "MIT" ]
null
null
null
NYS-covasim/second_wave_scenarios.py
molkjar/bachelor
a0591691b820c6c8a45d16f8d55f3a7e80ea384b
[ "MIT" ]
null
null
null
NYS-covasim/second_wave_scenarios.py
molkjar/bachelor
a0591691b820c6c8a45d16f8d55f3a7e80ea384b
[ "MIT" ]
null
null
null
import covasim as cv import covasim.utils as cvu import optuna as op import sciris as sc import pandas as pd import numpy as np import os from collections import defaultdict import population ## Interesting part starts around line 200 ## First part is setup, optimization workers and alike - Important to run before ana...
26.13125
154
0.603683
import covasim as cv import covasim.utils as cvu import optuna as op import sciris as sc import pandas as pd import numpy as np import os from collections import defaultdict import population start_day = '2020-03-01' end_day = '2022-03-01' NYSonPause = '2020-03-22' schoolsClosure = '2020-03-16' liftin...
true
true
f7571bd88ea0a8b7b7a00fd973906d50ad04a2e3
17,990
py
Python
tutorials/bios-boot-tutorial/bios-boot-tutorial.py
Arielce/dio
eb8035664f605783f86b41d34006aeb9ef861f13
[ "MIT" ]
null
null
null
tutorials/bios-boot-tutorial/bios-boot-tutorial.py
Arielce/dio
eb8035664f605783f86b41d34006aeb9ef861f13
[ "MIT" ]
null
null
null
tutorials/bios-boot-tutorial/bios-boot-tutorial.py
Arielce/dio
eb8035664f605783f86b41d34006aeb9ef861f13
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse import json import numpy import os import random import re import subprocess import sys import time args = None logFile = None unlockTimeout = 999999999 fastUnstakeSystem = './fast.refund/dccio.system/dccio.system.wasm' systemAccounts = [ 'dccio.bpay', 'dccio.msig', ...
43.878049
213
0.610506
import argparse import json import numpy import os import random import re import subprocess import sys import time args = None logFile = None unlockTimeout = 999999999 fastUnstakeSystem = './fast.refund/dccio.system/dccio.system.wasm' systemAccounts = [ 'dccio.bpay', 'dccio.msig', 'dccio.names', 'd...
true
true
f7571e04ac8ca85cd53068ab3e54b8dd6a8e7028
1,069
py
Python
problems/center_inpainting.py
11BP11/inverse_problems_GAN
1d8ece55f7de1610b5481d39945b083a4ed3fcc0
[ "MIT" ]
null
null
null
problems/center_inpainting.py
11BP11/inverse_problems_GAN
1d8ece55f7de1610b5481d39945b083a4ed3fcc0
[ "MIT" ]
null
null
null
problems/center_inpainting.py
11BP11/inverse_problems_GAN
1d8ece55f7de1610b5481d39945b083a4ed3fcc0
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np from problems.problem import * name = "center inpainting" g_tf_info_placeholder = tf.placeholder(tf.float32, [None], name='g_transform_info') def problem_loss(x_tformed, g_tformed): return tf.reduce_mean(tf.abs(x_tformed-g_tformed),[1,2,3]) def m...
26.073171
84
0.663237
import tensorflow as tf import numpy as np from problems.problem import * name = "center inpainting" g_tf_info_placeholder = tf.placeholder(tf.float32, [None], name='g_transform_info') def problem_loss(x_tformed, g_tformed): return tf.reduce_mean(tf.abs(x_tformed-g_tformed),[1,2,3]) def m...
true
true
f7571e6e5eed99afa89ff300dae22708d5cd6a6f
971
py
Python
src/lib/scrape/src/ArticleMetadata/arxiv.py
fausecteam/faustctf-2020-marsu
8ad6892dc76b79b0e508fd6a39ff2825dba1c4f4
[ "0BSD" ]
null
null
null
src/lib/scrape/src/ArticleMetadata/arxiv.py
fausecteam/faustctf-2020-marsu
8ad6892dc76b79b0e508fd6a39ff2825dba1c4f4
[ "0BSD" ]
null
null
null
src/lib/scrape/src/ArticleMetadata/arxiv.py
fausecteam/faustctf-2020-marsu
8ad6892dc76b79b0e508fd6a39ff2825dba1c4f4
[ "0BSD" ]
null
null
null
import requests from bs4 import BeautifulSoup from .handler import add_handler @add_handler(r'https://arxiv.org/abs/(\d+.\d+)') def download(url): metadata = dict() metadata['importer'] = 'arxiv' data = requests.get(url) soup = BeautifulSoup(data.text, "lxml") authortags = soup.find_all("meta", a...
40.458333
100
0.646756
import requests from bs4 import BeautifulSoup from .handler import add_handler @add_handler(r'https://arxiv.org/abs/(\d+.\d+)') def download(url): metadata = dict() metadata['importer'] = 'arxiv' data = requests.get(url) soup = BeautifulSoup(data.text, "lxml") authortags = soup.find_all("meta", a...
true
true
f7572092aeb8947b3740f66e397f54baea9bd8b5
379
py
Python
onmt/modules/__init__.py
isl-mt/NMTGMinor
573504d0ed2e40240e4186eb4af28275f0e3f422
[ "MIT" ]
null
null
null
onmt/modules/__init__.py
isl-mt/NMTGMinor
573504d0ed2e40240e4186eb4af28275f0e3f422
[ "MIT" ]
null
null
null
onmt/modules/__init__.py
isl-mt/NMTGMinor
573504d0ed2e40240e4186eb4af28275f0e3f422
[ "MIT" ]
1
2018-10-27T10:28:05.000Z
2018-10-27T10:28:05.000Z
from onmt.modules.GlobalAttention import GlobalAttention from onmt.modules.ImageEncoder import ImageEncoder from onmt.modules.BaseModel import Generator, NMTModel from onmt.modules.LayerNorm import LayerNorm from onmt.modules.StaticDropout import StaticDropout # For flake8 compatibility. __all__ = [GlobalAttention, Im...
42.111111
88
0.854881
from onmt.modules.GlobalAttention import GlobalAttention from onmt.modules.ImageEncoder import ImageEncoder from onmt.modules.BaseModel import Generator, NMTModel from onmt.modules.LayerNorm import LayerNorm from onmt.modules.StaticDropout import StaticDropout __all__ = [GlobalAttention, ImageEncoder, Generator, NMTMo...
true
true
f75721d3789a1ab469f5e1d4feca269eb287d244
3,190
py
Python
config/presets/Modes/Python/S - Perspective Lines LFO/main.py
The-XOR/EYESY_OS
6a5e3d0bc5574ba2311e0c7e81c600c3af7a3e34
[ "BSD-3-Clause" ]
18
2021-03-06T05:39:30.000Z
2022-03-25T17:59:23.000Z
presets/Modes/Python/S - Perspective Lines LFO/main.py
jqrsound/EYESY_OS_for_RasPiSound
ac117b91cd84ad4c0566bd1a7d4c7b1ccc01cf62
[ "BSD-3-Clause" ]
null
null
null
presets/Modes/Python/S - Perspective Lines LFO/main.py
jqrsound/EYESY_OS_for_RasPiSound
ac117b91cd84ad4c0566bd1a7d4c7b1ccc01cf62
[ "BSD-3-Clause" ]
4
2021-03-14T18:38:42.000Z
2021-07-11T14:31:18.000Z
import os import pygame import time import random import glob import math last_point = [] class LFO : #uses three arguments: start point, max, and how far each step is. def __init__(self, start, max, step): self.start = start self.max = max self.step = step self.current = 0 ...
32.886598
94
0.52069
import os import pygame import time import random import glob import math last_point = [] class LFO : def __init__(self, start, max, step): self.start = start self.max = max self.step = step self.current = 0 self.direction = 1 def update(self): ...
true
true
f757221b321d0c889f2ef9e6a804df3d56dbfec3
2,870
py
Python
leibnizgym/envs/trifinger/sample.py
nicoguertler/leibnizgym
2c1cb14fbfece09644445d58fe7ac28c41611e5f
[ "BSD-3-Clause" ]
27
2021-07-12T20:58:05.000Z
2022-03-19T20:29:08.000Z
leibnizgym/envs/trifinger/sample.py
nicoguertler/leibnizgym
2c1cb14fbfece09644445d58fe7ac28c41611e5f
[ "BSD-3-Clause" ]
3
2021-11-16T15:28:27.000Z
2022-02-28T21:34:39.000Z
leibnizgym/envs/trifinger/sample.py
nicoguertler/leibnizgym
2c1cb14fbfece09644445d58fe7ac28c41611e5f
[ "BSD-3-Clause" ]
5
2021-07-09T21:19:12.000Z
2022-03-14T13:36:42.000Z
""" @author Mayank Mittal @email mittalma@ethz.ch @brief Defines sampling stratergies. # TODO: These functions are generic. Can put in leibnizgym.utils.torch_utils module. """ # leibnizgym from leibnizgym.utils.torch_utils import quaternion_from_euler_xyz # python from typing import Union, List, Tuple i...
32.988506
109
0.703833
from leibnizgym.utils.torch_utils import quaternion_from_euler_xyz from typing import Union, List, Tuple import numpy as np import torch import torch.nn.functional @torch.jit.script def random_xy(num: int, max_com_distance_to_center: float, device: str) -> Tuple[torch.Tensor, torch.Tensor]: radius = torch.s...
true
true
f757228012d38800acba6e1a2a4704a79774bb66
4,078
py
Python
commands/build_legend.py
furti/FreeCAD-Toolbox
c1ef60463d844e254e9bfd07cbf7795af8bdcd78
[ "MIT" ]
3
2020-04-22T13:00:27.000Z
2020-08-27T20:13:14.000Z
commands/build_legend.py
furti/FreeCAD-Toolbox
c1ef60463d844e254e9bfd07cbf7795af8bdcd78
[ "MIT" ]
null
null
null
commands/build_legend.py
furti/FreeCAD-Toolbox
c1ef60463d844e254e9bfd07cbf7795af8bdcd78
[ "MIT" ]
null
null
null
import FreeCAD import FreeCADGui from app import section_vector_renderer from PySide2 import QtGui, QtCore, QtWidgets SVG_TEMPLATE = """<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www...
30.432836
148
0.636341
import FreeCAD import FreeCADGui from app import section_vector_renderer from PySide2 import QtGui, QtCore, QtWidgets SVG_TEMPLATE = """<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www...
true
true
f757228d5fea5b3bf2061f502391aec8ace89643
11,937
py
Python
lale/expressions.py
vishalbelsare/lale
654ca29ec0234b478d26724a25df28b28f5c0bc0
[ "Apache-2.0" ]
null
null
null
lale/expressions.py
vishalbelsare/lale
654ca29ec0234b478d26724a25df28b28f5c0bc0
[ "Apache-2.0" ]
null
null
null
lale/expressions.py
vishalbelsare/lale
654ca29ec0234b478d26724a25df28b28f5c0bc0
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 IBM Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
28.833333
88
0.626623
import ast import pprint import typing from copy import deepcopy from io import StringIO from typing import Any, Dict, Optional, Union import astunparse AstLits = (ast.Num, ast.Str, ast.List, ast.Tuple, ast.Set, ast.Dict) AstLit = Union[ast.Num, ast.Str, ast.List, ast.Tuple, ast.Set, ast.Dict] AstExprs = ( *Ast...
true
true
f75723549b46c0f30f2ab70c0c6d2ec2f2113717
99
py
Python
MeetingScheduler/meetingsched/apps.py
joseph-njogu/meeting-scheduler
07ebc4a72466b167e6e447dd8c93d66e0a3e5a7c
[ "MIT" ]
null
null
null
MeetingScheduler/meetingsched/apps.py
joseph-njogu/meeting-scheduler
07ebc4a72466b167e6e447dd8c93d66e0a3e5a7c
[ "MIT" ]
2
2022-02-12T13:38:05.000Z
2022-02-12T13:39:30.000Z
MeetingScheduler/meetingsched/apps.py
joseph-njogu/meeting-scheduler
07ebc4a72466b167e6e447dd8c93d66e0a3e5a7c
[ "MIT" ]
null
null
null
from django.apps import AppConfig class MeetingschedConfig(AppConfig): name = 'meetingsched'
16.5
36
0.777778
from django.apps import AppConfig class MeetingschedConfig(AppConfig): name = 'meetingsched'
true
true
f757248e9261017e719975d34bbac09380be7da2
7,120
py
Python
zipline/pipeline/loaders/events.py
magne-max/zipline
41172cd3a320806c4116bcfafa6a607fa300acde
[ "Apache-2.0" ]
null
null
null
zipline/pipeline/loaders/events.py
magne-max/zipline
41172cd3a320806c4116bcfafa6a607fa300acde
[ "Apache-2.0" ]
null
null
null
zipline/pipeline/loaders/events.py
magne-max/zipline
41172cd3a320806c4116bcfafa6a607fa300acde
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd from six import viewvalues from toolz import groupby, merge from .base import PipelineLoader from .frame import DataFrameLoader from zipline.pipeline.common import ( EVENT_DATE_FIELD_NAME, SID_FIELD_NAME, TS_FIELD_NAME, ) from zipline.pipeline.loaders.utils import ( ...
32.511416
79
0.620506
import numpy as np import pandas as pd from six import viewvalues from toolz import groupby, merge from .base import PipelineLoader from .frame import DataFrameLoader from zipline.pipeline.common import ( EVENT_DATE_FIELD_NAME, SID_FIELD_NAME, TS_FIELD_NAME, ) from zipline.pipeline.loaders.utils import ( ...
true
true
f757262f3ac0b41dbe636c37c369f8dbd42c7f42
5,893
py
Python
lib/stolgo/nasdaq.py
gmtpritam/stolgo
8ced9b4c3ea2b0a89c929c2d2765ebc8593d00b2
[ "MIT" ]
125
2020-05-24T19:37:25.000Z
2022-03-10T10:15:20.000Z
lib/stolgo/nasdaq.py
gmtpritam/stolgo
8ced9b4c3ea2b0a89c929c2d2765ebc8593d00b2
[ "MIT" ]
84
2020-05-05T13:04:38.000Z
2021-12-21T01:51:42.000Z
lib/stolgo/nasdaq.py
gmtpritam/stolgo
8ced9b4c3ea2b0a89c929c2d2765ebc8593d00b2
[ "MIT" ]
38
2020-05-05T17:05:26.000Z
2022-02-25T15:30:16.000Z
import requests import io from datetime import timedelta import pandas as pd from stolgo.helper import get_date_range,get_formated_dateframe from stolgo.request import RequestUrl,Curl #default params for url connection DEFAULT_TIMEOUT = 5 # seconds MAX_RETRIES = 2 #default periods DEFAULT_DAYS = 250 class NasdaqUrl...
41.5
148
0.594095
import requests import io from datetime import timedelta import pandas as pd from stolgo.helper import get_date_range,get_formated_dateframe from stolgo.request import RequestUrl,Curl DEFAULT_TIMEOUT = 5 MAX_RETRIES = 2 DEFAULT_DAYS = 250 class NasdaqUrls: def __init__(self): self.STK_DATA_PRE_URL = r"...
true
true
f75726a12c85e8679e2649421358d8f464cf5a0e
12,688
py
Python
qiskit/qasm3/ast.py
snsunx/qiskit-terra
48916d887f4bf39d4e99da7da0dda759efc98a37
[ "Apache-2.0" ]
null
null
null
qiskit/qasm3/ast.py
snsunx/qiskit-terra
48916d887f4bf39d4e99da7da0dda759efc98a37
[ "Apache-2.0" ]
null
null
null
qiskit/qasm3/ast.py
snsunx/qiskit-terra
48916d887f4bf39d4e99da7da0dda759efc98a37
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
23.715888
101
0.653452
import enum from typing import Optional, List, Union class ASTNode: class Statement(ASTNode): pass class Pragma(ASTNode): def __init__(self, content): self.content = content class CalibrationGrammarDeclaration(Statement): def __init__(self, name): self.name = name class Progr...
true
true
f757273018dc461b989d3eb8ad62e80f91c3d8df
96,147
py
Python
angr/analyses/reassembler.py
MarSoft/angr
c46e848d4921dafca8d4c304bfadcad4d043bda9
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/reassembler.py
MarSoft/angr
c46e848d4921dafca8d4c304bfadcad4d043bda9
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/reassembler.py
MarSoft/angr
c46e848d4921dafca8d4c304bfadcad4d043bda9
[ "BSD-2-Clause" ]
null
null
null
import logging import re import string import struct from collections import defaultdict from itertools import count import capstone import cffi import cle import networkx import pyvex from . import Analysis from ..knowledge_base import KnowledgeBase from ..sim_variable import SimMemoryVariable, SimTemporaryVariable...
34.167377
135
0.54321
import logging import re import string import struct from collections import defaultdict from itertools import count import capstone import cffi import cle import networkx import pyvex from . import Analysis from ..knowledge_base import KnowledgeBase from ..sim_variable import SimMemoryVariable, SimTemporaryVariable...
true
true
f757282a3989322f0fd4ecdee2c6e1a2dc60426e
19,548
py
Python
tschartslib/enthistoryextra/enthistoryextra.py
DaleProctor/tscharts
5447395e0aef0b949bef8426febdec2093cf37ef
[ "Apache-2.0" ]
16
2016-08-17T21:39:10.000Z
2021-11-24T12:14:28.000Z
tschartslib/enthistoryextra/enthistoryextra.py
DaleProctor/tscharts
5447395e0aef0b949bef8426febdec2093cf37ef
[ "Apache-2.0" ]
55
2017-04-23T18:12:04.000Z
2021-08-08T08:25:18.000Z
tschartslib/enthistoryextra/enthistoryextra.py
DaleProctor/tscharts
5447395e0aef0b949bef8426febdec2093cf37ef
[ "Apache-2.0" ]
8
2017-08-11T02:11:46.000Z
2021-07-06T22:58:42.000Z
#(C) Copyright Syd Logan 2020 #(C) Copyright Thousand Smiles Foundation 2020 # #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 a...
31.993453
83
0.572897
import unittest import getopt, sys import json from tschartslib.service.serviceapi import ServiceAPI from tschartslib.tscharts.tscharts import Login, Logout from tschartslib.patient.patient import CreatePatient, DeletePatient from tschartslib.enthistory.enthistory import CreateENTHistory, DeleteENTHistory from tscha...
true
true
f75729632bbd54a6cb3c5abfe3a098bd36c7a8f0
5,142
py
Python
docs/conf.py
gabephun/MolSSI_geometry_analysis
da382c3d69e543935b888968c43eada526033b8e
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
gabephun/MolSSI_geometry_analysis
da382c3d69e543935b888968c43eada526033b8e
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
gabephun/MolSSI_geometry_analysis
da382c3d69e543935b888968c43eada526033b8e
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Path setup ------------------------------------------------------------...
30.975904
79
0.655776
project = 'geometry_analysis' copyright = ("2019, Gabe. Project structure based on the " "Computational Molecular Science Python Cookiecutter version 1.0") author = 'Gabe' version = '' release = '' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.autosummary', ...
true
true
f7572b9436ba7e251ee5f16016857384e6d3549e
909
py
Python
jmetal/operator/__init__.py
Amgroot-w/jMetalPy
fcfc5bf436734c6318c89dde0e543fbfd8551ba0
[ "MIT" ]
null
null
null
jmetal/operator/__init__.py
Amgroot-w/jMetalPy
fcfc5bf436734c6318c89dde0e543fbfd8551ba0
[ "MIT" ]
null
null
null
jmetal/operator/__init__.py
Amgroot-w/jMetalPy
fcfc5bf436734c6318c89dde0e543fbfd8551ba0
[ "MIT" ]
null
null
null
from .crossover import NullCrossover, SBXCrossover, SPXCrossover, DifferentialEvolutionCrossover, IntegerSBXCrossover from .mutation import NullMutation, BitFlipMutation, PolynomialMutation, IntegerPolynomialMutation, UniformMutation, \ SimpleRandomMutation from .selection import BestSolutionSelection, BinaryTourna...
64.928571
118
0.834983
from .crossover import NullCrossover, SBXCrossover, SPXCrossover, DifferentialEvolutionCrossover, IntegerSBXCrossover from .mutation import NullMutation, BitFlipMutation, PolynomialMutation, IntegerPolynomialMutation, UniformMutation, \ SimpleRandomMutation from .selection import BestSolutionSelection, BinaryTourna...
true
true
f7572c8d67c545ac5ac6a3f5d491e139fbeaa55a
222
py
Python
bootstrap_message/urls.py
aronysidoro/django-boostrap-messages
8b1a9ef638b35abf76b0823d4acc38da7d562c6e
[ "MIT" ]
null
null
null
bootstrap_message/urls.py
aronysidoro/django-boostrap-messages
8b1a9ef638b35abf76b0823d4acc38da7d562c6e
[ "MIT" ]
null
null
null
bootstrap_message/urls.py
aronysidoro/django-boostrap-messages
8b1a9ef638b35abf76b0823d4acc38da7d562c6e
[ "MIT" ]
null
null
null
from django.conf.urls import include, url from django.contrib import admin from bootstrap_message import views urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^$', views.index, name='index'), ]
20.181818
46
0.707207
from django.conf.urls import include, url from django.contrib import admin from bootstrap_message import views urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^$', views.index, name='index'), ]
true
true
f7572db8ffe731808bd84ef6466985a06394f11c
704
py
Python
dynamic_programming/kadane_algorithm.py
bharathikannann/Python-Data-Structures-and-Algorithms
61aca26940e486a00cd293fae36c1391b7ef3864
[ "MIT" ]
3
2021-08-23T21:40:01.000Z
2022-02-24T10:55:25.000Z
dynamic_programming/kadane_algorithm.py
bharathikannann/Python-Data-Structures-and-Algorithms
61aca26940e486a00cd293fae36c1391b7ef3864
[ "MIT" ]
null
null
null
dynamic_programming/kadane_algorithm.py
bharathikannann/Python-Data-Structures-and-Algorithms
61aca26940e486a00cd293fae36c1391b7ef3864
[ "MIT" ]
null
null
null
# Largest sub array problem def kadane_algorithm(arr: list) -> int: l = len(arr) maxhere = arr[0] maxoutput = 0 # For getting the max subarray value for i in range(1,l): # If adding the element to prev max is greater or the current number is greater maxhere = max(arr[i], arr[i] +...
35.2
87
0.53267
def kadane_algorithm(arr: list) -> int: l = len(arr) maxhere = arr[0] maxoutput = 0 for i in range(1,l): maxhere = max(arr[i], arr[i] + maxhere) maxoutput = max(maxhere, maxoutput) return maxoutput if __name__ == '__main__': print(kadane_algorithm([-2,-3...
true
true
f7572e19d0a6dacc260e59acdd774272079c0d16
1,160
py
Python
datasets/mnist.py
guoyang328/pytorch-dann
21ad0622ce948002fdc90d5e8a2b498c94429218
[ "MIT" ]
1
2020-08-06T02:00:50.000Z
2020-08-06T02:00:50.000Z
datasets/mnist.py
Richard456/Dann
1971cf1a7b9ecadc17932a8ecb3f0c34609751a3
[ "MIT" ]
null
null
null
datasets/mnist.py
Richard456/Dann
1971cf1a7b9ecadc17932a8ecb3f0c34609751a3
[ "MIT" ]
null
null
null
"""Dataset setting and data loader for MNIST.""" import torch from torchvision import datasets, transforms import os def get_mnist(dataset_root, batch_size, train): """Get MNIST datasets loader.""" # image pre-processing pre_process = transforms.Compose([transforms.Resize(28), # different img size settin...
36.25
128
0.530172
import torch from torchvision import datasets, transforms import os def get_mnist(dataset_root, batch_size, train): pre_process = transforms.Compose([transforms.Resize(28), transforms.ToTensor(), transforms.Normalize( ...
true
true
f7572e46cf84f9f71326eba212a7083feb98b102
391
py
Python
smcpy/utils/progress_bar.py
HarshilShrivastava/SMCPy
e3c958023aab3f3143e70de5a52e3c195e536dd1
[ "NASA-1.3" ]
1
2020-02-11T22:37:43.000Z
2020-02-11T22:37:43.000Z
smcpy/utils/progress_bar.py
HarshilShrivastava/SMCPy
e3c958023aab3f3143e70de5a52e3c195e536dd1
[ "NASA-1.3" ]
null
null
null
smcpy/utils/progress_bar.py
HarshilShrivastava/SMCPy
e3c958023aab3f3143e70de5a52e3c195e536dd1
[ "NASA-1.3" ]
null
null
null
def set_bar(pbar, t, last_ess, ess, acceptance_ratio, resample_status): pbar.set_description("Step number: {:2d} | Last ess: {:8.2f} | " "Current ess: {:8.2f} | Samples accepted: " "{:.1%} | {} |" .format(t + 1, last_ess, ess, acceptance_rat...
48.875
72
0.478261
def set_bar(pbar, t, last_ess, ess, acceptance_ratio, resample_status): pbar.set_description("Step number: {:2d} | Last ess: {:8.2f} | " "Current ess: {:8.2f} | Samples accepted: " "{:.1%} | {} |" .format(t + 1, last_ess, ess, acceptance_rat...
true
true
f7572e78639f3bb43b7242bb214ecc0eedd092e0
1,379
py
Python
ooobuild/dyn/rendering/x_bitmap_palette.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/rendering/x_bitmap_palette.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/rendering/x_bitmap_palette.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
37.27027
87
0.771574
from typing import TYPE_CHECKING from ooo.oenv.env_const import UNO_ENVIRONMENT, UNO_RUNTIME _DYNAMIC = False if (not TYPE_CHECKING) and UNO_RUNTIME and UNO_ENVIRONMENT: _DYNAMIC = True if not TYPE_CHECKING and _DYNAMIC: from com.sun.star.rendering import XBitmapPalette as XBitmapPalette setattr(XBitmapPal...
true
true
f7572f400a07fec537b19f54dfe9870c2ed97c9d
1,228
py
Python
attendees/occasions/views/api/assembly_meet_gatherings.py
xjlin0/attendees32
25913c75ea8d916dcb065a23f2fa68bea558f77c
[ "MIT" ]
null
null
null
attendees/occasions/views/api/assembly_meet_gatherings.py
xjlin0/attendees32
25913c75ea8d916dcb065a23f2fa68bea558f77c
[ "MIT" ]
5
2022-01-21T03:26:40.000Z
2022-02-04T17:32:16.000Z
attendees/occasions/views/api/assembly_meet_gatherings.py
xjlin0/attendees32
25913c75ea8d916dcb065a23f2fa68bea558f77c
[ "MIT" ]
null
null
null
import time from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from rest_framework import viewsets from rest_framework.exceptions import AuthenticationFailed from attendees.occasions.serializers import GatheringSerializer from attendees.occasions.services im...
34.111111
85
0.728827
import time from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from rest_framework import viewsets from rest_framework.exceptions import AuthenticationFailed from attendees.occasions.serializers import GatheringSerializer from attendees.occasions.services im...
true
true
f7572f5a4f9eca9d287dd9d5d6494abca5b71ef2
703
py
Python
silver/models/billing_entities/__init__.py
DocTocToc/silver
f1b4a8871fc4a37c8813d3c010bc70dc59c0a6e5
[ "Apache-2.0" ]
222
2017-01-15T10:30:57.000Z
2022-03-08T20:34:46.000Z
silver/models/billing_entities/__init__.py
DocTocToc/silver
f1b4a8871fc4a37c8813d3c010bc70dc59c0a6e5
[ "Apache-2.0" ]
141
2017-01-11T10:56:49.000Z
2021-10-12T11:51:00.000Z
silver/models/billing_entities/__init__.py
DocTocToc/silver
f1b4a8871fc4a37c8813d3c010bc70dc59c0a6e5
[ "Apache-2.0" ]
76
2017-01-10T13:50:27.000Z
2022-03-25T21:37:00.000Z
# Copyright (c) 2016 Presslabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
41.352941
74
0.782361
from silver.models.billing_entities.customer import Customer from silver.models.billing_entities.provider import Provider
true
true
f757307eeb866a0bac043fab7f488011e6470c5e
7,817
py
Python
examples/text/news_topic_classification.py
heiseApple/learn2learn
d726b10c8139a19057ecf1a034d33477b410a1c5
[ "MIT" ]
1
2022-03-16T09:42:08.000Z
2022-03-16T09:42:08.000Z
examples/text/news_topic_classification.py
OliverWang-Au/learn2learn
df3c3291b4681440a80a69a7815090a4bd3cd661
[ "MIT" ]
null
null
null
examples/text/news_topic_classification.py
OliverWang-Au/learn2learn
df3c3291b4681440a80a69a7815090a4bd3cd661
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse import random import torch from torch import nn, optim from torch.nn import functional as F from tqdm import tqdm import learn2learn as l2l class Net(nn.Module): """Head for sentence-level classification tasks.""" def __init__(self, num_classes, input_dim=768, inner_...
37.401914
114
0.618396
import argparse import random import torch from torch import nn, optim from torch.nn import functional as F from tqdm import tqdm import learn2learn as l2l class Net(nn.Module): def __init__(self, num_classes, input_dim=768, inner_dim=200, pooler_dropout=0.3): super().__init__() self.dense = n...
true
true
f7573264d13032c6f74c2e0bf65df45235c25f71
1,889
py
Python
user-test.py
obewas/PasswordLocker
1476c09d5d317e9b24cef3c414fc75c292256a08
[ "Unlicense" ]
null
null
null
user-test.py
obewas/PasswordLocker
1476c09d5d317e9b24cef3c414fc75c292256a08
[ "Unlicense" ]
null
null
null
user-test.py
obewas/PasswordLocker
1476c09d5d317e9b24cef3c414fc75c292256a08
[ "Unlicense" ]
null
null
null
import unittest from User import User class TestUser(unittest.TestCase): def setUp(self): self.new_user = User("John","Paul") def tearDown(self): ''' clean up after each test to prevent errors ''' User.userList = [] #2nd test def test__init(self): ...
24.855263
60
0.586554
import unittest from User import User class TestUser(unittest.TestCase): def setUp(self): self.new_user = User("John","Paul") def tearDown(self): User.userList = [] def test__init(self): self.assertEqual(self.new_user.username, "John") self.assertEqual(self.new_us...
true
true
f757327f2d9e3c820a2c1079c7eefe52b824c5c5
789
py
Python
packages/tool_util/tests/util.py
lawrence14701/galaxy
7eb2fcb708e7b63e17800c87613ddfa5497c0654
[ "CC-BY-3.0" ]
2
2017-03-28T12:11:41.000Z
2017-04-22T02:58:25.000Z
packages/tool_util/tests/util.py
lawrence14701/galaxy
7eb2fcb708e7b63e17800c87613ddfa5497c0654
[ "CC-BY-3.0" ]
12
2020-07-24T23:55:19.000Z
2021-12-19T11:40:06.000Z
packages/tool_util/tests/util.py
lawrence14701/galaxy
7eb2fcb708e7b63e17800c87613ddfa5497c0654
[ "CC-BY-3.0" ]
1
2019-01-16T22:21:54.000Z
2019-01-16T22:21:54.000Z
from contextlib import contextmanager from os import environ import pytest external_dependency_management = pytest.mark.skipif( not environ.get('GALAXY_TEST_INCLUDE_SLOW'), reason="GALAXY_TEST_INCLUDE_SLOW not set" ) @contextmanager def modify_environ(values, keys_to_remove=None): """ Modify the env...
26.3
82
0.667934
from contextlib import contextmanager from os import environ import pytest external_dependency_management = pytest.mark.skipif( not environ.get('GALAXY_TEST_INCLUDE_SLOW'), reason="GALAXY_TEST_INCLUDE_SLOW not set" ) @contextmanager def modify_environ(values, keys_to_remove=None): old_environ = environ....
true
true
f7573388ca354885ad72ae5acad19821b233e44c
1,357
py
Python
setup.py
erdogant/imagesc
55b0248d1de297c9ea71044b16efac35b07b6af9
[ "MIT" ]
2
2020-08-15T07:00:55.000Z
2020-08-18T11:56:35.000Z
setup.py
erdogant/imagesc
55b0248d1de297c9ea71044b16efac35b07b6af9
[ "MIT" ]
1
2020-08-18T11:50:19.000Z
2021-03-23T12:09:55.000Z
setup.py
erdogant/imagesc
55b0248d1de297c9ea71044b16efac35b07b6af9
[ "MIT" ]
2
2020-08-15T07:01:00.000Z
2022-01-05T00:14:33.000Z
import setuptools import re # Version control -------- VERSIONFILE="imagesc/__init__.py" getversion = re.search( r"^__version__ = ['\"]([^'\"]*)['\"]", open(VERSIONFILE, "rt").read(), re.M) if getversion: new_version = getversion.group(1) else: raise RuntimeError("Unable to find version string in %s." % (VERSI...
37.694444
101
0.674282
import setuptools import re VERSIONFILE="imagesc/__init__.py" getversion = re.search( r"^__version__ = ['\"]([^'\"]*)['\"]", open(VERSIONFILE, "rt").read(), re.M) if getversion: new_version = getversion.group(1) else: raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) # Setup file ---...
true
true
f75733d8865854e3cd9e156db0282a391bb41dc0
2,148
py
Python
tests/sentry/rules/test_processor.py
Ali-Tahir/sentry
aa7b306c5ea671ac002a3524982563679557cb31
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/rules/test_processor.py
Ali-Tahir/sentry
aa7b306c5ea671ac002a3524982563679557cb31
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/rules/test_processor.py
Ali-Tahir/sentry
aa7b306c5ea671ac002a3524982563679557cb31
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from datetime import timedelta from django.utils import timezone from sentry.models import GroupRuleStatus, Rule from sentry.plugins.base import plugins from sentry.testutils import TestCase from sentry.rules.processor import EventCompatibilityProxy, Rul...
33.046154
98
0.643855
from __future__ import absolute_import from datetime import timedelta from django.utils import timezone from sentry.models import GroupRuleStatus, Rule from sentry.plugins.base import plugins from sentry.testutils import TestCase from sentry.rules.processor import EventCompatibilityProxy, RuleProcessor class RuleP...
true
true
f757347ab18029f3153f4ff4845c89c4bd17925a
1,921
py
Python
fractalis/data/etls/ada/handler_ada.py
LCSB-BioCore/Fractalis
a9f7f8da7675b55c5996d2f32d7baa7313b0350e
[ "Apache-2.0" ]
7
2018-06-01T12:17:26.000Z
2019-08-23T13:15:34.000Z
fractalis/data/etls/ada/handler_ada.py
LCSB-BioCore/Fractalis
a9f7f8da7675b55c5996d2f32d7baa7313b0350e
[ "Apache-2.0" ]
2
2018-10-23T14:12:27.000Z
2018-11-15T09:11:25.000Z
fractalis/data/etls/ada/handler_ada.py
LCSB-BioCore/Fractalis
a9f7f8da7675b55c5996d2f32d7baa7313b0350e
[ "Apache-2.0" ]
3
2018-08-02T16:42:50.000Z
2018-12-14T18:16:22.000Z
"""This module provides AdaHandler, an implementation of ETLHandler for ADA.""" import logging import requests from fractalis.data.etlhandler import ETLHandler logger = logging.getLogger(__name__) class AdaHandler(ETLHandler): """This ETLHandler provides integration with ADA. 'Ada provides key infrastru...
35.574074
79
0.580427
import logging import requests from fractalis.data.etlhandler import ETLHandler logger = logging.getLogger(__name__) class AdaHandler(ETLHandler): _handler = 'ada' @staticmethod def make_label(descriptor: dict) -> str: return '{} ({})'.format(descriptor['dictionary']['label'], ...
true
true
f7573541179084eade9f41cc88a354012c0200ea
8,729
py
Python
pymarket/bids/demand_curves.py
taqtiqa-mark/pymarket
2f8db92010d5f9407a72941788500351e92cbe81
[ "MIT" ]
null
null
null
pymarket/bids/demand_curves.py
taqtiqa-mark/pymarket
2f8db92010d5f9407a72941788500351e92cbe81
[ "MIT" ]
null
null
null
pymarket/bids/demand_curves.py
taqtiqa-mark/pymarket
2f8db92010d5f9407a72941788500351e92cbe81
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from typing import Tuple, Union from pymarket.bids import BidManager def demand_curve_from_bids( bids: pd.DataFrame) -> Tuple[np.ndarray, np.ndarray]: """ Creates a demand curve from a set of buying bids. It is the inverse cumulative distribution of quantity ...
28.903974
79
0.582541
import numpy as np import pandas as pd from typing import Tuple, Union from pymarket.bids import BidManager def demand_curve_from_bids( bids: pd.DataFrame) -> Tuple[np.ndarray, np.ndarray]: buying = bids[bids.buying] buying = buying.sort_values('price', ascending=False) buying['acum'] = buying.qua...
true
true
f7573674d0f0e365c393e7337c3c2c7c84ff858c
723
py
Python
app/__init__.py
towa/acab_gen
f974d4f709e0d592344f9d2144648089f5b48bf0
[ "MIT" ]
null
null
null
app/__init__.py
towa/acab_gen
f974d4f709e0d592344f9d2144648089f5b48bf0
[ "MIT" ]
null
null
null
app/__init__.py
towa/acab_gen
f974d4f709e0d592344f9d2144648089f5b48bf0
[ "MIT" ]
null
null
null
from flask import Flask, jsonify, request from flask_limiter import Limiter from flask_sqlalchemy import SQLAlchemy from flask_marshmallow import Marshmallow from flask_restful import Api from flask_cors import CORS app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///acab.db' db = SQLAlchemy(app) ...
31.434783
77
0.77455
from flask import Flask, jsonify, request from flask_limiter import Limiter from flask_sqlalchemy import SQLAlchemy from flask_marshmallow import Marshmallow from flask_restful import Api from flask_cors import CORS app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///acab.db' db = SQLAlchemy(app) ...
true
true
f757372be2396ac72bc00a97d601503c1778969d
3,225
py
Python
isi_sdk_8_2_0/isi_sdk_8_2_0/models/compatibilities_ssd_active.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_2_0/isi_sdk_8_2_0/models/compatibilities_ssd_active.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_2_0/isi_sdk_8_2_0/models/compatibilities_ssd_active.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 7 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_2_0.models.compati...
28.043478
125
0.587597
import pprint import re import six from isi_sdk_8_2_0.models.compatibilities_ssd_active_active_item import CompatibilitiesSsdActiveActiveItem class CompatibilitiesSsdActive(object): swagger_types = { 'active': 'list[CompatibilitiesSsdActiveActiveItem]' } attribute_map = { 'active'...
true
true
f75737fccb2e228e6db13846619546a8aa81ea8f
1,102
py
Python
Video/Shotcut.app/Resources/askpass.py
alphamodh0/Utilities
d02caf12728bd2aa74eeed0952975798c7ac7cd1
[ "BSD-2-Clause" ]
19
2021-01-07T12:56:40.000Z
2022-01-25T18:58:44.000Z
Video/Shotcut.app/Resources/askpass.py
alphamodh0/Utilities
d02caf12728bd2aa74eeed0952975798c7ac7cd1
[ "BSD-2-Clause" ]
129
2020-11-29T13:15:45.000Z
2022-03-31T18:29:37.000Z
Video/Shotcut.app/Resources/askpass.py
alphamodh0/Utilities
d02caf12728bd2aa74eeed0952975798c7ac7cd1
[ "BSD-2-Clause" ]
24
2021-01-07T12:55:16.000Z
2022-01-23T18:08:39.000Z
#!/usr/bin/env python3 # man sudo(8) # -A, --askpass # Normally, if sudo requires a password, it will read it from # the user's terminal. If the -A (askpass) option is # specified, a (possibly graphical) helper program is executed # to read the...
39.357143
101
0.595281
# specified, a (possibly graphical) helper program is executed # to read the user's password and output the password to the from PyQt5 import QtWidgets app = QtWidgets.QApplication([]) password, ok = QtWidgets.QInputDialog.getText(None, "sudo", "Password", QtWidgets.QLineEdit.Pass...
true
true
f7573808afb448369591143f95251ddd64abfba1
3,714
py
Python
routes/user.py
ivanjrju/backend
2b8ac8300096f4909743c6917f30779f4efcd890
[ "MIT" ]
null
null
null
routes/user.py
ivanjrju/backend
2b8ac8300096f4909743c6917f30779f4efcd890
[ "MIT" ]
null
null
null
routes/user.py
ivanjrju/backend
2b8ac8300096f4909743c6917f30779f4efcd890
[ "MIT" ]
null
null
null
from models.main import * from models.appendix import * from flask import Blueprint, request, render_template from flask_jwt_extended import (jwt_required, get_jwt_identity) from flask_jwt_extended import create_access_token, decode_token from .utils import tryCommit from datetime import datetime, timedelta from sqlalc...
32.867257
108
0.656166
from models.main import * from models.appendix import * from flask import Blueprint, request, render_template from flask_jwt_extended import (jwt_required, get_jwt_identity) from flask_jwt_extended import create_access_token, decode_token from .utils import tryCommit from datetime import datetime, timedelta from sqlalc...
true
true
f757386e8da2e22eb92bcafe51154793b89adec6
43,873
py
Python
saleor/order/tests/test_order.py
TGalioAutomation/web-saleor
2936aea6267b23e038828eef11795dce9fd04f93
[ "CC-BY-4.0" ]
null
null
null
saleor/order/tests/test_order.py
TGalioAutomation/web-saleor
2936aea6267b23e038828eef11795dce9fd04f93
[ "CC-BY-4.0" ]
1
2022-01-06T19:01:21.000Z
2022-01-06T19:01:21.000Z
saleor/order/tests/test_order.py
TGalioAutomation/web-saleor
2936aea6267b23e038828eef11795dce9fd04f93
[ "CC-BY-4.0" ]
null
null
null
from decimal import Decimal from unittest.mock import MagicMock, Mock, patch import pytest from prices import Money, TaxedMoney from ...core.weight import zero_weight from ...discount import OrderDiscountType from ...discount.models import ( DiscountValueType, NotApplicable, Voucher, VoucherChannelLis...
33.465294
88
0.726962
from decimal import Decimal from unittest.mock import MagicMock, Mock, patch import pytest from prices import Money, TaxedMoney from ...core.weight import zero_weight from ...discount import OrderDiscountType from ...discount.models import ( DiscountValueType, NotApplicable, Voucher, VoucherChannelLis...
true
true
f757389f30d1e57fe17c843b84e12138938dbdae
6,299
py
Python
official/transformer/utils/tokenizer_test.py
zcdzcdzcd/models
a31b526a7617a152a138a865b5689bf5b59f655d
[ "Apache-2.0" ]
357
2019-01-23T23:54:30.000Z
2022-03-31T05:32:25.000Z
official/transformer/utils/tokenizer_test.py
zcdzcdzcd/models
a31b526a7617a152a138a865b5689bf5b59f655d
[ "Apache-2.0" ]
65
2019-02-06T15:35:35.000Z
2022-03-25T09:56:48.000Z
official/transformer/utils/tokenizer_test.py
zcdzcdzcd/models
a31b526a7617a152a138a865b5689bf5b59f655d
[ "Apache-2.0" ]
164
2019-02-06T15:05:57.000Z
2022-03-31T11:48:14.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.420765
80
0.67598
import collections import tempfile import tensorflow as tf from official.transformer.utils import tokenizer class SubtokenizerTest(tf.test.TestCase): def _init_subtokenizer(self, vocab_list): temp_file = tempfile.NamedTemporaryFile(delete=False) with tf.io.gfile.GFile(temp_file.name, "w") as w: f...
true
true
f7573977f4b946b41467326a21959bbfded2b458
735
py
Python
bluebottle/cms/migrations/0032_migrate_projects_3.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/cms/migrations/0032_migrate_projects_3.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/cms/migrations/0032_migrate_projects_3.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 2017-10-10 15:38 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0031_migrate_projects_2'), ] operations = [ migrations.RemoveField( ...
22.272727
48
0.563265
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0031_migrate_projects_2'), ] operations = [ migrations.RemoveField( model_name='projects', name='projects', ), ...
true
true
f75739a9d3341380bad816fb37c329f8be9eb961
1,084
py
Python
test/unittests/test_NRUNCON.py
mudkipmaster/gwlf-e
9e058445537dd32d1916f76c4b73ca64261771cd
[ "Apache-2.0" ]
null
null
null
test/unittests/test_NRUNCON.py
mudkipmaster/gwlf-e
9e058445537dd32d1916f76c4b73ca64261771cd
[ "Apache-2.0" ]
6
2018-07-24T22:46:28.000Z
2018-07-29T19:13:09.000Z
test/unittests/test_NRUNCON.py
mudkipmaster/gwlf-e
9e058445537dd32d1916f76c4b73ca64261771cd
[ "Apache-2.0" ]
1
2018-07-24T18:22:01.000Z
2018-07-24T18:22:01.000Z
import numpy as np from VariableUnittest import VariableUnitTest from gwlfe.BMPs.AgAnimal import NRUNCON class TestNRUNCON(VariableUnitTest): def test_NRUNCON(self): z = self.z np.testing.assert_array_almost_equal( NRUNCON.NRUNCON_f(z.NYrs, z.GrazingAnimal_0, z.NumAnimals, z.AvgAnima...
49.272727
116
0.592251
import numpy as np from VariableUnittest import VariableUnitTest from gwlfe.BMPs.AgAnimal import NRUNCON class TestNRUNCON(VariableUnitTest): def test_NRUNCON(self): z = self.z np.testing.assert_array_almost_equal( NRUNCON.NRUNCON_f(z.NYrs, z.GrazingAnimal_0, z.NumAnimals, z.AvgAnima...
true
true
f75739dbd26bd2aeb75bc5c7e7ef371585bfbb6e
28,992
py
Python
lhrhost/robot/axes.py
ethanjli/liquid-handling-robotics
999ab03c225b4c5382ab9fcac6a4988d0c232c67
[ "BSD-3-Clause" ]
null
null
null
lhrhost/robot/axes.py
ethanjli/liquid-handling-robotics
999ab03c225b4c5382ab9fcac6a4988d0c232c67
[ "BSD-3-Clause" ]
null
null
null
lhrhost/robot/axes.py
ethanjli/liquid-handling-robotics
999ab03c225b4c5382ab9fcac6a4988d0c232c67
[ "BSD-3-Clause" ]
1
2018-08-03T17:17:31.000Z
2018-08-03T17:17:31.000Z
"""Abstractions for the axes of a liquid-handling robot.""" # Standard imports import logging from abc import abstractmethod # Local package imiports from lhrhost.protocol.linear_actuator import Receiver as LinearActuatorReceiver from lhrhost.util.containers import add_to_tree, get_from_tree from lhrhost.util.files i...
40.661992
92
0.654146
import logging from abc import abstractmethod from lhrhost.protocol.linear_actuator import Receiver as LinearActuatorReceiver from lhrhost.util.containers import add_to_tree, get_from_tree from lhrhost.util.files import load_from_json, save_to_json from lhrhost.util.interfaces import InterfaceClass import scipy.stat...
true
true
f75739f48daa9a5d1aeb1447320251a15a455566
157
py
Python
HelloWorld/Python01/Core Python Applications Programming 3rd/ch01/rewho.py
grtlinux/KieaPython
5539a9e3625864aa20624b8d684dbe5828dac3d1
[ "Apache-2.0" ]
1
2022-01-29T08:32:11.000Z
2022-01-29T08:32:11.000Z
HelloWorld/Python01/Core Python Applications Programming 3rd/ch01/rewho.py
grtlinux/KieaPython
5539a9e3625864aa20624b8d684dbe5828dac3d1
[ "Apache-2.0" ]
null
null
null
HelloWorld/Python01/Core Python Applications Programming 3rd/ch01/rewho.py
grtlinux/KieaPython
5539a9e3625864aa20624b8d684dbe5828dac3d1
[ "Apache-2.0" ]
1
2022-01-29T08:32:12.000Z
2022-01-29T08:32:12.000Z
#!/usr/bin/env python import os import re f = os.popen('who', 'r') for eachLine in f: print re.split('\s\s+|\t', eachLine.rstrip()) f.close()
15.7
50
0.585987
import os import re f = os.popen('who', 'r') for eachLine in f: print re.split('\s\s+|\t', eachLine.rstrip()) f.close()
false
true
f7573a1a64c0edb0400ef640f024435b62eda62a
8,643
py
Python
djangosige/apps/compras/forms/compras.py
lafitehhq/djangoSIGE
b88d36d04871a28a7adea8edecf7173d3e0ae759
[ "MIT" ]
7
2018-07-22T08:15:34.000Z
2022-01-30T20:41:14.000Z
djangosige/apps/compras/forms/compras.py
lafitehhq/djangoSIGE
b88d36d04871a28a7adea8edecf7173d3e0ae759
[ "MIT" ]
8
2020-06-05T18:29:57.000Z
2022-03-11T23:25:47.000Z
djangosige/apps/compras/forms/compras.py
lafitehhq/djangoSIGE
b88d36d04871a28a7adea8edecf7173d3e0ae759
[ "MIT" ]
4
2018-12-06T18:07:53.000Z
2020-11-24T09:16:10.000Z
# -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _ from django.forms import inlineformset_factory from djangosige.apps.compras.models import OrcamentoCompra, PedidoCompra, ItensCompra, Compra class CompraForm(forms.ModelForm): def __init__(self, *args, **kw...
45.251309
126
0.599098
from django import forms from django.utils.translation import ugettext_lazy as _ from django.forms import inlineformset_factory from djangosige.apps.compras.models import OrcamentoCompra, PedidoCompra, ItensCompra, Compra class CompraForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(Com...
true
true
f7573aa8c6854a34fece4c4335733a8aeb897ac1
594
py
Python
course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/main.py
vvmar/machine-learning-engineering-for-production-public
0350e2e79eebc1dc2edb9e7b5e6f582b40fa74be
[ "Apache-2.0" ]
null
null
null
course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/main.py
vvmar/machine-learning-engineering-for-production-public
0350e2e79eebc1dc2edb9e7b5e6f582b40fa74be
[ "Apache-2.0" ]
null
null
null
course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/main.py
vvmar/machine-learning-engineering-for-production-public
0350e2e79eebc1dc2edb9e7b5e6f582b40fa74be
[ "Apache-2.0" ]
null
null
null
import pickle import numpy as np from typing import List from fastapi import FastAPI from pydantic import BaseModel, conlist # rev 1 app = FastAPI(title="Predicting Wine Class with batching") # Open classifier in global scope with open("models/wine-95-fixed.pkl", "rb") as file: clf = pickle.load(file) class Wi...
22.846154
71
0.725589
import pickle import numpy as np from typing import List from fastapi import FastAPI from pydantic import BaseModel, conlist app = FastAPI(title="Predicting Wine Class with batching") with open("models/wine-95-fixed.pkl", "rb") as file: clf = pickle.load(file) class Wine(BaseModel): batches: List[conlist(i...
true
true
f7573b2e315c776022911d6eaf3b6dbd5aa61707
7,927
py
Python
lib/django-1.4/django/core/cache/backends/base.py
MiCHiLU/google_appengine_sdk
3da9f20d7e65e26c4938d2c4054bc4f39cbc5522
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
AppServer/lib/django-1.4/django/core/cache/backends/base.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
AppServer/lib/django-1.4/django/core/cache/backends/base.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
"Base Cache class." import warnings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning from django.utils.encoding import smart_str from django.utils.importlib import import_module class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRuntimeWarning): ...
35.388393
87
0.621168
import warnings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning from django.utils.encoding import smart_str from django.utils.importlib import import_module class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRuntimeWarning): pass MEMCACHE_MA...
true
true
f7573be600041cd0a815a92c65e1ae26ffe0fa5f
3,350
py
Python
yang2rest/json2yang.py
fortinet-solutions-cse/netconf-rest
2147cc5d37eda848d9d87a8d74b26df9bc487384
[ "Apache-2.0" ]
7
2018-04-13T17:57:22.000Z
2022-02-08T11:49:18.000Z
yang2rest/json2yang.py
fortinet-solutions-cse/netconf-rest
2147cc5d37eda848d9d87a8d74b26df9bc487384
[ "Apache-2.0" ]
null
null
null
yang2rest/json2yang.py
fortinet-solutions-cse/netconf-rest
2147cc5d37eda848d9d87a8d74b26df9bc487384
[ "Apache-2.0" ]
2
2020-01-18T19:20:37.000Z
2021-05-21T18:55:33.000Z
#!/usr/bin/env python # coding=utf-8 """ #************************************************ # Copyright 2018 Fortinet, Inc. # # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apa...
29.130435
75
0.582388
import json try: from lxml import etree except ImportError: from xml.etree import ElementTree as etree __author__ = "Miguel Angel Muñoz González (magonzalez at fortinet.com)" __copyright__ = "Copyright 2018, Fortinet, Inc." __credits__ = "Miguel Angel Muñoz" __license__ = "Apache 2.0" __version__ = "0.6" __...
true
true
f7573c21e54bfdac65987331bc2cac9667ced39d
7,776
py
Python
docs/conf.py
BrianHicks/em
19a86c2392b136c9e857000798ccaa525aa0ed84
[ "MIT" ]
6
2015-05-10T14:09:54.000Z
2021-01-04T10:09:38.000Z
docs/conf.py
techdragon/emit
19a86c2392b136c9e857000798ccaa525aa0ed84
[ "MIT" ]
null
null
null
docs/conf.py
techdragon/emit
19a86c2392b136c9e857000798ccaa525aa0ed84
[ "MIT" ]
3
2015-04-04T15:37:55.000Z
2015-08-21T08:08:45.000Z
# -*- coding: utf-8 -*- # # Emit documentation build configuration file, created by # sphinx-quickstart on Thu Jan 3 19:10:48 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
31.738776
80
0.712191
import sys, os sys.path.append(os.path.abspath('..')) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'Emit' copyright = u'2013, Brian Hicks' # |version| and |release|, also used in various other places through...
true
true
f7573e8c8a724bbc65c2f3314b29997c792fc0e8
3,507
py
Python
museosMadrid/models.py
AlbertoCoding/X-Serv-Practica-Museos
5d3e3c99b8750ece9973f4e04ae3c3bfe77f3946
[ "Apache-2.0" ]
null
null
null
museosMadrid/models.py
AlbertoCoding/X-Serv-Practica-Museos
5d3e3c99b8750ece9973f4e04ae3c3bfe77f3946
[ "Apache-2.0" ]
null
null
null
museosMadrid/models.py
AlbertoCoding/X-Serv-Practica-Museos
5d3e3c99b8750ece9973f4e04ae3c3bfe77f3946
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.contrib.auth.models import User # Create your models here. # Datos de cada museo: # ID-ENTIDAD (PK), NOMBRE, DESCRIPCION-ENTIDAD, HORARIO, TRANSPORTE, ACCESIBILIDAD, CONTENT-URL, LOCALIZACION{NOMBRE-VIA, CLASE-VIAL, TIPO-NUM, NUM, LOCALIDAD, PROVINCIA, CODIGO-POSTAL, BARRIO,...
45.545455
273
0.738523
from django.db import models from django.contrib.auth.models import User class Museo(models.Model): museo_id = models.PositiveIntegerField(primary_key=True) nombre = models.CharField(max_length=200) descripcion = models.TextField() horario = models.TextField(blank=True, null=True) equipam...
true
true
f7573f6045dce2178d9c780df6717663f40a0871
8,379
py
Python
python/paddle/fluid/trainer_factory.py
jiansowa/Paddle
488152a6d076eac91ef0921ff6e16c65777f814d
[ "Apache-2.0" ]
8
2019-06-16T12:36:11.000Z
2021-03-05T05:33:21.000Z
python/paddle/fluid/trainer_factory.py
wozna/Paddle
0ecf441af14d554c85f69a206e3e3a9bdd86fb13
[ "Apache-2.0" ]
1
2020-09-10T09:05:52.000Z
2020-09-10T09:06:22.000Z
python/paddle/fluid/trainer_factory.py
wozna/Paddle
0ecf441af14d554c85f69a206e3e3a9bdd86fb13
[ "Apache-2.0" ]
25
2019-12-07T02:14:14.000Z
2021-12-30T06:16:30.000Z
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
43.414508
90
0.573457
import threading import time import logging import numpy as np from paddle.fluid.log_helper import get_logger local_logger = get_logger( __name__, logging.INFO, fmt='%(asctime)s-%(levelname)s: %(message)s') from .trainer_desc import MultiTrainer, DistMultiTrainer, PipelineTrainer, HeterXpuTrainer from .device_wo...
true
true
f7573fb67e439587611e8fd6fd426d611f9a5809
577
py
Python
logger.py
RollLife/automation_webhard
bbc5756dac85c3cefeca8b94947ca3cf6246a649
[ "MIT" ]
null
null
null
logger.py
RollLife/automation_webhard
bbc5756dac85c3cefeca8b94947ca3cf6246a649
[ "MIT" ]
null
null
null
logger.py
RollLife/automation_webhard
bbc5756dac85c3cefeca8b94947ca3cf6246a649
[ "MIT" ]
null
null
null
import logging # 로그 생성 logger = logging.getLogger() # 로그의 출력 기준 설정 logger.setLevel(logging.INFO) # log 출력 형식 formatter = logging.Formatter('[%(asctime)s][%(filename)s-%(funcName)s:%(lineno)d][%(levelname)s] - %(message)s') # log 출력 stream_handler = logging.StreamHandler() stream_handler.setFormatter(formatter) logg...
25.086957
113
0.715771
import logging logger = logging.getLogger() logger.setLevel(logging.INFO) formatter = logging.Formatter('[%(asctime)s][%(filename)s-%(funcName)s:%(lineno)d][%(levelname)s] - %(message)s') stream_handler = logging.StreamHandler() stream_handler.setFormatter(formatter) logger.addHandler(stream_handler) if __name__ =...
true
true
f7573fe0ba7996b6fb1038a88e8dec09e69eb3c9
929
py
Python
tests/invalid_mode_test.py
karlch/vimiv
acbb83e003805e5304131be1f73d7f66528606d6
[ "MIT" ]
268
2015-11-15T22:41:27.000Z
2022-02-07T21:54:52.000Z
tests/invalid_mode_test.py
karlch/vimiv
acbb83e003805e5304131be1f73d7f66528606d6
[ "MIT" ]
92
2015-12-12T00:35:54.000Z
2021-04-26T16:16:30.000Z
tests/invalid_mode_test.py
karlch/vimiv
acbb83e003805e5304131be1f73d7f66528606d6
[ "MIT" ]
15
2015-12-11T19:42:15.000Z
2020-09-24T13:00:36.000Z
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4 """Fail functions because called from wrong mode test for vimiv's test suite.""" from unittest import main from vimiv_testcase import VimivTestCase class FailingModeTest(VimivTestCase): """Failing Mode Tests.""" @classmethod def setUpClass(cls): ...
29.03125
80
0.679225
from unittest import main from vimiv_testcase import VimivTestCase class FailingModeTest(VimivTestCase): @classmethod def setUpClass(cls): cls.init_test(cls) cls.cmdline = cls.vimiv["commandline"] def test_fail_focus_slider(self): self.vimiv["manipulate"].focus_slider("bri") ...
true
true
f757411b853bacb9e03fc42fa2ef6593c3cde00f
3,583
py
Python
python/paddle/fluid/__init__.py
ghevinn/Paddle
544159c3de2f74a38a5795c635a2f1bda170379f
[ "ECL-2.0", "Apache-2.0" ]
4
2019-04-28T13:29:41.000Z
2022-01-09T16:54:20.000Z
python/paddle/fluid/__init__.py
ghevinn/Paddle
544159c3de2f74a38a5795c635a2f1bda170379f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
python/paddle/fluid/__init__.py
ghevinn/Paddle
544159c3de2f74a38a5795c635a2f1bda170379f
[ "ECL-2.0", "Apache-2.0" ]
1
2018-04-25T03:44:51.000Z
2018-04-25T03:44:51.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
29.130081
78
0.715043
from __future__ import print_function import framework from framework import * import executor from executor import * import io import evaluator import initializer import layers import nets import optimizer import backward import regularizer import average import metrics from param_attr import ParamAttr, WeightNormPa...
true
true
f757437446e421adec36d64b88c6cc0664060a8c
6,179
py
Python
demo/main.py
clevermindgames/KivMob27
4d92d394b21962cf2ee7cae9427d96cdf5605e6a
[ "MIT" ]
null
null
null
demo/main.py
clevermindgames/KivMob27
4d92d394b21962cf2ee7cae9427d96cdf5605e6a
[ "MIT" ]
null
null
null
demo/main.py
clevermindgames/KivMob27
4d92d394b21962cf2ee7cae9427d96cdf5605e6a
[ "MIT" ]
null
null
null
from kivmob import KivMob import kivy.utils from kivy.app import App from kivy.lang import Builder from kivy.config import Config from kivy.properties import ListProperty from kivy.utils import platform from kivy.uix.anchorlayout import AnchorLayout from kivy.uix.floatlayout import FloatLayout from kivy.uix.boxlayout ...
32.521053
73
0.574527
from kivmob import KivMob import kivy.utils from kivy.app import App from kivy.lang import Builder from kivy.config import Config from kivy.properties import ListProperty from kivy.utils import platform from kivy.uix.anchorlayout import AnchorLayout from kivy.uix.floatlayout import FloatLayout from kivy.uix.boxlayout ...
true
true
f757441117b1a65b44f2c07c7608a809f155273f
577
py
Python
src/main/python/wrappers/camera/CameraStream.py
jjoyce0510/autonomous-shipping-vessel
6757ecd77ad6ef422223413c57f60278b88b543b
[ "MIT" ]
1
2017-11-08T15:20:09.000Z
2017-11-08T15:20:09.000Z
src/main/python/wrappers/camera/CameraStream.py
jjoyce0510/autonomous-shipping-vessel
6757ecd77ad6ef422223413c57f60278b88b543b
[ "MIT" ]
null
null
null
src/main/python/wrappers/camera/CameraStream.py
jjoyce0510/autonomous-shipping-vessel
6757ecd77ad6ef422223413c57f60278b88b543b
[ "MIT" ]
null
null
null
from Camera import CameraController import time import cv2 class CameraStream: def __init__(self, resolution=(320,240), framerate=32): self.stream = CameraController() def start(self): return self.stream.start() def stop(self): return self.stream.stop() def display(self): end_time = time.time() + 10 ...
19.896552
57
0.710572
from Camera import CameraController import time import cv2 class CameraStream: def __init__(self, resolution=(320,240), framerate=32): self.stream = CameraController() def start(self): return self.stream.start() def stop(self): return self.stream.stop() def display(self): end_time = time.time() + 10 ...
true
true
f757446d7b889ac60cf234b0b6ebcc278aefa883
1,668
py
Python
pictures/migrations/0001_initial.py
FestusMutie/photo-gallery
60e7f9fac1f0077c45b578a3e8a12aaeff6818f4
[ "MIT" ]
null
null
null
pictures/migrations/0001_initial.py
FestusMutie/photo-gallery
60e7f9fac1f0077c45b578a3e8a12aaeff6818f4
[ "MIT" ]
null
null
null
pictures/migrations/0001_initial.py
FestusMutie/photo-gallery
60e7f9fac1f0077c45b578a3e8a12aaeff6818f4
[ "MIT" ]
null
null
null
# Generated by Django 3.2.4 on 2021-07-06 18:59 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ...
36.26087
117
0.559353
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.BigAutoField(auto_create...
true
true
f7574558dd2fd4ac691ebe55b613a9713e8d419b
5,148
py
Python
model.py
rishikksh20/TalkNet2-pytorch
baa6bf90c054634185932ed4b17a6ce8866feaba
[ "MIT" ]
53
2021-04-19T08:00:50.000Z
2022-03-24T02:28:23.000Z
model.py
rishikksh20/TalkNet2-pytorch
baa6bf90c054634185932ed4b17a6ce8866feaba
[ "MIT" ]
3
2021-04-21T17:48:58.000Z
2022-01-20T21:11:49.000Z
model.py
rishikksh20/TalkNet2-pytorch
baa6bf90c054634185932ed4b17a6ce8866feaba
[ "MIT" ]
2
2021-11-15T15:02:18.000Z
2022-02-01T08:00:22.000Z
import torch.nn as nn from torch.nn import functional as F from utils import get_mask_from_lengths from embedding import GaussianEmbedding from quartznet import QuartzNet5x5, QuartzNet9x5 from module import MaskedInstanceNorm1d, StyleResidual, Postnet class GraphemeDuration(nn.Module): def __init__(self, idim,...
35.260274
115
0.61014
import torch.nn as nn from torch.nn import functional as F from utils import get_mask_from_lengths from embedding import GaussianEmbedding from quartznet import QuartzNet5x5, QuartzNet9x5 from module import MaskedInstanceNorm1d, StyleResidual, Postnet class GraphemeDuration(nn.Module): def __init__(self, idim,...
true
true
f7574566da3572fd06d533da827885b8420e3ec0
199,917
py
Python
tests/hwsim/test_dpp.py
kimocoder/dragonslayer
818d7761442cfc0dd32fbf220a750d87676d8d31
[ "Unlicense" ]
106
2019-04-11T03:18:10.000Z
2022-02-11T10:48:47.000Z
tests/hwsim/test_dpp.py
kimocoder/dragonslayer
818d7761442cfc0dd32fbf220a750d87676d8d31
[ "Unlicense" ]
2
2019-04-11T14:07:38.000Z
2020-06-04T14:03:38.000Z
tests/hwsim/test_dpp.py
kimocoder/dragonslayer
818d7761442cfc0dd32fbf220a750d87676d8d31
[ "Unlicense" ]
31
2019-04-11T05:21:41.000Z
2021-08-10T17:55:36.000Z
# Test cases for Device Provisioning Protocol (DPP) # Copyright (c) 2017, Qualcomm Atheros, Inc. # Copyright (c) 2018-2019, The Linux Foundation # # This software may be distributed under the terms of the BSD license. # See README for more details. import base64 import binascii import hashlib import logging logger = l...
45.559936
1,038
0.675305
import base64 import binascii import hashlib import logging logger = logging.getLogger() import os import struct import subprocess import time import hostapd import hwsim_utils from utils import HwsimSkip, alloc_fail, fail_test, wait_fail_trigger from wpasupplicant import WpaSupplicant try: import OpenSSL op...
true
true
f7574669b6820d8579f41aa08745e182422dfe97
16,581
py
Python
tests/test_octodns_manager.py
patcon/octodns
ade8d54df34a93becad70239c7f1f5a2f7126020
[ "MIT" ]
null
null
null
tests/test_octodns_manager.py
patcon/octodns
ade8d54df34a93becad70239c7f1f5a2f7126020
[ "MIT" ]
null
null
null
tests/test_octodns_manager.py
patcon/octodns
ade8d54df34a93becad70239c7f1f5a2f7126020
[ "MIT" ]
null
null
null
# # # from __future__ import absolute_import, division, print_function, \ unicode_literals from os import environ from os.path import dirname, join from six import text_type from unittest import TestCase from octodns.record import Record from octodns.manager import _AggregateTarget, MainThreadExecutor, Manager, ...
40.940741
79
0.613594
from __future__ import absolute_import, division, print_function, \ unicode_literals from os import environ from os.path import dirname, join from six import text_type from unittest import TestCase from octodns.record import Record from octodns.manager import _AggregateTarget, MainThreadExecutor, Manager, \ ...
true
true
f7574693e630b36cb620ec5066447ff15cfa974b
7,144
py
Python
sdk/python/pulumi_azure_nextgen/web/latest/web_app_domain_ownership_identifier_slot.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/web/latest/web_app_domain_ownership_identifier_slot.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/web/latest/web_app_domain_ownership_identifier_slot.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
47.946309
739
0.674132
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = ['WebAppDomainOwnershipIdentifierSlot'] warnings.warn("""The 'latest' version is deprecated. Please migrate to the resource in the top-lev...
true
true
f75746a88819a06eb3a28cc45d815dd54c02ec93
496
py
Python
meraki_sdk/models/type_5_enum.py
meraki/meraki-python-sdk
9894089eb013318243ae48869cc5130eb37f80c0
[ "MIT" ]
37
2019-04-24T14:01:33.000Z
2022-01-28T01:37:21.000Z
meraki_sdk/models/type_5_enum.py
ankita66666666/meraki-python-sdk
9894089eb013318243ae48869cc5130eb37f80c0
[ "MIT" ]
10
2019-07-09T16:35:11.000Z
2021-12-07T03:47:53.000Z
meraki_sdk/models/type_5_enum.py
ankita66666666/meraki-python-sdk
9894089eb013318243ae48869cc5130eb37f80c0
[ "MIT" ]
17
2019-04-30T23:53:21.000Z
2022-02-07T22:57:44.000Z
# -*- coding: utf-8 -*- """ meraki_sdk This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ). """ class Type5Enum(object): """Implementation of the 'Type5' enum. One of "delete" or "restrict processing" Attributes: DELETE: TODO: type d...
19.84
95
0.620968
class Type5Enum(object): DELETE = 'delete' ENUM_RESTRICT_PROCESSING = 'restrict processing'
true
true
f75746e2006864216df62da50202b68b2225919e
108,146
py
Python
applications/app1/venv/lib/python2.7/site-packages/gluon/validators.py
link-money-dev/link-api-web-service
3da226c7115ee4267f8346620029b710b9987e74
[ "BSD-3-Clause" ]
null
null
null
applications/app1/venv/lib/python2.7/site-packages/gluon/validators.py
link-money-dev/link-api-web-service
3da226c7115ee4267f8346620029b710b9987e74
[ "BSD-3-Clause" ]
1
2021-06-01T22:32:25.000Z
2021-06-01T22:32:25.000Z
applications/app1/venv/lib/python2.7/site-packages/gluon/validators.py
link-money-dev/link-api-web-service
3da226c7115ee4267f8346620029b710b9987e74
[ "BSD-3-Clause" ]
null
null
null
#!/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Thanks to ga2arch for help with IS_IN_DB and IS_NOT_IN_DB on GAE """ import os import re import datetime impor...
33.183799
258
0.547723
""" This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Thanks to ga2arch for help with IS_IN_DB and IS_NOT_IN_DB on GAE """ import os import re import datetime import time import cgi import urllib import str...
false
true
f75746e9afba189e6890295fcbdf9fd790401f61
1,071
py
Python
vmc/python/SGD_alphas.py
kmaasrud/vmc-fys4411
e96e2f6b1403118ee48ad5b5ff38582310ba4d2a
[ "MIT" ]
2
2021-01-23T22:44:35.000Z
2021-06-03T00:34:43.000Z
vmc/python/SGD_alphas.py
kmaasrud/vmc-fys4411
e96e2f6b1403118ee48ad5b5ff38582310ba4d2a
[ "MIT" ]
47
2021-01-14T14:13:32.000Z
2021-04-05T10:32:02.000Z
vmc/python/SGD_alphas.py
kmaasrud/vmc-fys4411
e96e2f6b1403118ee48ad5b5ff38582310ba4d2a
[ "MIT" ]
null
null
null
import pandas as pd import os import matplotlib.pyplot as plt import numpy as np #location for files and plots PLOT_DIR = "../plots/" DATA_DIR = "../data" FILENAME_PLOT = 'SGD_alphas' PLOT_DIR = "./" #figure size and resolution fig = plt.figure() plt.style.use("seaborn") #colour, linewith, linestyle #boundaries ...
19.125
86
0.650794
import pandas as pd import os import matplotlib.pyplot as plt import numpy as np PLOT_DIR = "../plots/" DATA_DIR = "../data" FILENAME_PLOT = 'SGD_alphas' PLOT_DIR = "./" fig = plt.figure() plt.style.use("seaborn") plt.ylim(0.15, 0.95) plt.legend(loc = 'best', prop = {'size':14}, frameon = False) plt.rc('font', s...
true
true
f757477857d753bd2a8206380aafdea94fbe01e1
30,453
py
Python
cime/scripts/lib/CIME/hist_utils.py
jingxianwen/E3SM
bced6ba5e9247d6db6c8445b5fb828772a929b1b
[ "zlib-acknowledgement", "RSA-MD", "FTL" ]
3
2020-02-24T21:58:57.000Z
2020-09-29T23:06:45.000Z
cime/scripts/lib/CIME/hist_utils.py
jingxianwen/E3SM
bced6ba5e9247d6db6c8445b5fb828772a929b1b
[ "zlib-acknowledgement", "RSA-MD", "FTL" ]
16
2019-09-27T02:16:37.000Z
2020-08-01T17:51:12.000Z
cime/scripts/lib/CIME/hist_utils.py
jingxianwen/E3SM
bced6ba5e9247d6db6c8445b5fb828772a929b1b
[ "zlib-acknowledgement", "RSA-MD", "FTL" ]
2
2020-12-09T07:30:20.000Z
2022-03-18T04:22:25.000Z
""" Functions for actions pertaining to history files. """ from CIME.XML.standard_module_setup import * from CIME.test_status import TEST_NO_BASELINES_COMMENT, TEST_STATUS_FILENAME from CIME.utils import get_current_commit, get_timestamp, get_model, safe_copy, SharedArea, parse_test_name import logging, os, re, filecm...
46.210926
178
0.632483
from CIME.XML.standard_module_setup import * from CIME.test_status import TEST_NO_BASELINES_COMMENT, TEST_STATUS_FILENAME from CIME.utils import get_current_commit, get_timestamp, get_model, safe_copy, SharedArea, parse_test_name import logging, os, re, filecmp logger = logging.getLogger(__name__) BLESS_LOG_NAME = "b...
true
true
f75747c1d3308cba1df8363344bb61c7bbc3939c
11,690
py
Python
appdaemon/apps/device_monitor.py
snjoetw/appdaemon_apps
bfc318fac142e324e730d47b008167f738dd411d
[ "MIT" ]
null
null
null
appdaemon/apps/device_monitor.py
snjoetw/appdaemon_apps
bfc318fac142e324e730d47b008167f738dd411d
[ "MIT" ]
null
null
null
appdaemon/apps/device_monitor.py
snjoetw/appdaemon_apps
bfc318fac142e324e730d47b008167f738dd411d
[ "MIT" ]
null
null
null
import re from datetime import datetime from enum import Enum from typing import List from configurable_automation import ConfigurableAutomation from lib.actions import Action from lib.core.component import Component from lib.helper import to_float, to_datetime CHECKER_RESULT_CACHE = {} class Checker(Component): ...
29.594937
98
0.635843
import re from datetime import datetime from enum import Enum from typing import List from configurable_automation import ConfigurableAutomation from lib.actions import Action from lib.core.component import Component from lib.helper import to_float, to_datetime CHECKER_RESULT_CACHE = {} class Checker(Component): ...
true
true
f757480ae4fd1c291985e17ac7399b560c17c310
9,366
py
Python
example.py
labscript-suite-temp-2-archive/fanyangphy-labscript--forked-from--labscript_suite-labscript
f708a6e709b9c8ec192c42fa0c0bfccae7c42b88
[ "BSD-2-Clause" ]
null
null
null
example.py
labscript-suite-temp-2-archive/fanyangphy-labscript--forked-from--labscript_suite-labscript
f708a6e709b9c8ec192c42fa0c0bfccae7c42b88
[ "BSD-2-Clause" ]
null
null
null
example.py
labscript-suite-temp-2-archive/fanyangphy-labscript--forked-from--labscript_suite-labscript
f708a6e709b9c8ec192c42fa0c0bfccae7c42b88
[ "BSD-2-Clause" ]
null
null
null
##################################################################### # # # /example.py # # # # Copyright 2013, Monash University ...
51.180328
198
0.721332
import __init__ from labscript import * from labscript_devices.PulseBlaster import PulseBlaster from labscript_devices.NI_PCIe_6363 import NI_PCIe_6363 from labscript_devices.NovaTechDDS9M import NovaTechDDS9M from labscript_devices.Camera import Camera from labscript_devices.PineBlaster import PineBlaster from labscr...
true
true
f757497c16d282569cd63012e90390d36fa1ca26
1,909
py
Python
py/plot_slices.py
idies/RMHDConverter
24ff6e5ae2767b3aac4d24e9d6f1a116ef002eba
[ "Apache-2.0" ]
null
null
null
py/plot_slices.py
idies/RMHDConverter
24ff6e5ae2767b3aac4d24e9d6f1a116ef002eba
[ "Apache-2.0" ]
null
null
null
py/plot_slices.py
idies/RMHDConverter
24ff6e5ae2767b3aac4d24e9d6f1a116ef002eba
[ "Apache-2.0" ]
null
null
null
######################################################################## # # Copyright 2015 Johns Hopkins University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
30.301587
90
0.545836
import numpy as np import matplotlib.pyplot as plt import subprocess def slice_plotter(n0 = 4, n1 = 8): ax = plt.figure(figsize = (8, 8)).add_axes([.0, .0, 1., 1.]) ax.set_axis_off() for i in range(n0, n1, 4): print('plotting frame ', i) data = np.load( '/export/scratch0/cla...
true
true
f7574a127871a41af9a90b30ed866fbd120b62f4
317
py
Python
serpent/package.py
phr34k/serpent
b19e6475fa87bca581cb081882deaceaf55bb5d4
[ "MIT" ]
1
2016-03-22T19:06:21.000Z
2016-03-22T19:06:21.000Z
serpent/package.py
phr34k/serpent
b19e6475fa87bca581cb081882deaceaf55bb5d4
[ "MIT" ]
null
null
null
serpent/package.py
phr34k/serpent
b19e6475fa87bca581cb081882deaceaf55bb5d4
[ "MIT" ]
null
null
null
import binascii print("#include <string>"); print("unsigned char rawData[] = {"); with open('serpent.py', 'rb') as f: for chunk in iter(lambda: f.read(1), b''): print("0x" + str(binascii.hexlify(chunk),'ascii') + ","); print("};"); print("std::string data((char*)&rawData[0], sizeof(rawData));");
35.222222
66
0.59306
import binascii print("#include <string>"); print("unsigned char rawData[] = {"); with open('serpent.py', 'rb') as f: for chunk in iter(lambda: f.read(1), b''): print("0x" + str(binascii.hexlify(chunk),'ascii') + ","); print("};"); print("std::string data((char*)&rawData[0], sizeof(rawData));");
true
true
f7574b276e84a64b9805b1d94aa1160ba7e20840
15,670
py
Python
ocs_ci/cleanup/aws/cleanup.py
agarwal-mudit/ocs-ci
a27583a4aa6283850e1a5678e684701fd932ccda
[ "MIT" ]
null
null
null
ocs_ci/cleanup/aws/cleanup.py
agarwal-mudit/ocs-ci
a27583a4aa6283850e1a5678e684701fd932ccda
[ "MIT" ]
null
null
null
ocs_ci/cleanup/aws/cleanup.py
agarwal-mudit/ocs-ci
a27583a4aa6283850e1a5678e684701fd932ccda
[ "MIT" ]
1
2020-07-28T07:32:09.000Z
2020-07-28T07:32:09.000Z
import tempfile import argparse import logging import datetime import threading import os import re from botocore.exceptions import ClientError from ocs_ci.framework import config from ocs_ci.ocs.constants import CLEANUP_YAML, TEMPLATE_CLEANUP_DIR from ocs_ci.ocs.exceptions import CommandFailed from ocs_ci.utility.u...
35.213483
105
0.604084
import tempfile import argparse import logging import datetime import threading import os import re from botocore.exceptions import ClientError from ocs_ci.framework import config from ocs_ci.ocs.constants import CLEANUP_YAML, TEMPLATE_CLEANUP_DIR from ocs_ci.ocs.exceptions import CommandFailed from ocs_ci.utility.u...
true
true
f7574b824f2e74680e87050cf8ce276607f96678
1,766
py
Python
trainer/dataset.py
jessica-dl/2XB3-ML-Training
aa82d64c7b8b35eb79060a7bd7d22d09323b1c06
[ "MIT" ]
null
null
null
trainer/dataset.py
jessica-dl/2XB3-ML-Training
aa82d64c7b8b35eb79060a7bd7d22d09323b1c06
[ "MIT" ]
null
null
null
trainer/dataset.py
jessica-dl/2XB3-ML-Training
aa82d64c7b8b35eb79060a7bd7d22d09323b1c06
[ "MIT" ]
null
null
null
from tensorflow.python.lib.io import file_io import h5py import numpy as np class Dataset: def __init__(self, path, local): """ Initialize the dataset :param path: Path to the hdf5 dataset file :param local: True if the path is to a local file, False otherwise """ ...
27.169231
82
0.511891
from tensorflow.python.lib.io import file_io import h5py import numpy as np class Dataset: def __init__(self, path, local): self.path = path self.local = local if not local: with file_io.FileIO(path, mode='rb') as dataset_f: with open('dataset.h5', 'wb') as lo...
true
true
f7574d91b66fa57cbd33d7c1cd898389edb971b5
4,062
py
Python
python/tests/test_ambassador_module_validation.py
Ashokm96/ambassador
f368059b34f682107facff1f0e6bcdf001b5197d
[ "Apache-2.0" ]
null
null
null
python/tests/test_ambassador_module_validation.py
Ashokm96/ambassador
f368059b34f682107facff1f0e6bcdf001b5197d
[ "Apache-2.0" ]
1
2021-03-04T10:33:23.000Z
2021-05-03T12:27:51.000Z
python/tests/test_ambassador_module_validation.py
Ashokm96/ambassador
f368059b34f682107facff1f0e6bcdf001b5197d
[ "Apache-2.0" ]
1
2021-12-13T08:40:18.000Z
2021-12-13T08:40:18.000Z
from typing import List, Tuple import logging import pytest logging.basicConfig( level=logging.INFO, format="%(asctime)s test %(levelname)s: %(message)s", datefmt='%Y-%m-%d %H:%M:%S' ) logger = logging.getLogger("ambassador") from ambassador import Cache, IR from ambassador.compile import Compile def ...
26.900662
208
0.6871
from typing import List, Tuple import logging import pytest logging.basicConfig( level=logging.INFO, format="%(asctime)s test %(levelname)s: %(message)s", datefmt='%Y-%m-%d %H:%M:%S' ) logger = logging.getLogger("ambassador") from ambassador import Cache, IR from ambassador.compile import Compile def ...
true
true
f7574e750bc07746a6cce995f0c41a9c5ad80745
4,337
py
Python
tests/hikari/test_embeds.py
81CuongVn/hikaki
5e4ccffaccf411ea5c13fd64264cadda72d197fb
[ "MIT" ]
8
2020-08-15T09:14:39.000Z
2020-09-03T22:39:35.000Z
tests/hikari/test_embeds.py
81CuongVn/hikaki
5e4ccffaccf411ea5c13fd64264cadda72d197fb
[ "MIT" ]
228
2020-08-16T15:52:42.000Z
2020-10-11T09:45:40.000Z
tests/hikari/test_embeds.py
81CuongVn/hikaki
5e4ccffaccf411ea5c13fd64264cadda72d197fb
[ "MIT" ]
9
2020-08-15T09:29:24.000Z
2020-09-30T11:59:33.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020 Nekokatt # Copyright (c) 2021-present davfsa # # 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 t...
39.072072
111
0.73092
import mock import pytest from hikari import embeds class TestEmbedResource: @pytest.fixture() def resource(self): return embeds.EmbedResource(resource=mock.Mock()) def test_url(self, resource): assert resource.url is resource.resource.url def test_filename(self, resource): ...
true
true
f757501183e3b196e6ea398903434857dba07fb5
2,046
py
Python
fasttest_selenium/runner/test_case.py
zym27187/fasttest_selenium
607160eada1826401dfc79daf767179f92f93ba3
[ "MIT" ]
1
2021-02-13T10:56:51.000Z
2021-02-13T10:56:51.000Z
fasttest_selenium/runner/test_case.py
zym27187/fasttest_selenium
607160eada1826401dfc79daf767179f92f93ba3
[ "MIT" ]
null
null
null
fasttest_selenium/runner/test_case.py
zym27187/fasttest_selenium
607160eada1826401dfc79daf767179f92f93ba3
[ "MIT" ]
1
2021-02-13T10:56:46.000Z
2021-02-13T10:56:46.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import re import unittest import traceback from fasttest_selenium.common import * class TestCase(unittest.TestCase): def __getattr__(self, item): try: return self.__getattribute__(item) except: attrvalue = None ...
40.92
140
0.542522
import os import re import unittest import traceback from fasttest_selenium.common import * class TestCase(unittest.TestCase): def __getattr__(self, item): try: return self.__getattribute__(item) except: attrvalue = None self.__setattr__(item, attrvalue) ...
true
true
f75750161d286a62f8000c5d915a870879e0afa0
2,060
py
Python
Solutions/Q0005_Smallest_Evenly_Divisible_Number.py
SigfriedHache/euler-project
7c38deee65a793a441830a6d0916da61e86b8cf7
[ "Apache-2.0" ]
null
null
null
Solutions/Q0005_Smallest_Evenly_Divisible_Number.py
SigfriedHache/euler-project
7c38deee65a793a441830a6d0916da61e86b8cf7
[ "Apache-2.0" ]
null
null
null
Solutions/Q0005_Smallest_Evenly_Divisible_Number.py
SigfriedHache/euler-project
7c38deee65a793a441830a6d0916da61e86b8cf7
[ "Apache-2.0" ]
null
null
null
""" https://projecteuler.net/problem=5 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? """ from numpy import prod from Common.Logger import get_logger, init_logg...
37.454545
120
0.737864
from numpy import prod from Common.Logger import get_logger, init_logger from Common.Numbers import prime_factorization from Common.Utilities import performance_run PERFORMANCE_RUNS = 100_000 UPPER_BOUND = 20 def fastest(ceiling: int = UPPER_BOUND) -> int: return prime_tally(ceiling) def prime_tally(ceiling: ...
true
true