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
1c1dff15fc3b9115db92757700fa831c0f0b4f05
16,567
py
Python
2algo/results and data complilation/execution_report_c.py
allengrr/deadlock_project
933878077c45a7df04daa087407bb2620c064617
[ "MIT" ]
null
null
null
2algo/results and data complilation/execution_report_c.py
allengrr/deadlock_project
933878077c45a7df04daa087407bb2620c064617
[ "MIT" ]
null
null
null
2algo/results and data complilation/execution_report_c.py
allengrr/deadlock_project
933878077c45a7df04daa087407bb2620c064617
[ "MIT" ]
1
2021-03-21T17:54:26.000Z
2021-03-21T17:54:26.000Z
import matplotlib.pyplot as plt import data as rd fig = plt.figure() ax1 = fig.add_subplot(461) ax2 = fig.add_subplot(462) ax3 = fig.add_subplot(463) ax4 = fig.add_subplot(464) ax5 = fig.add_subplot(465) ax6 = fig.add_subplot(466) ax7 = fig.add_subplot(467) ax8 = fig.add_subplot(468) ax9 = fig.add_subplot(469) ax10 = ...
44.06117
118
0.665057
import matplotlib.pyplot as plt import data as rd fig = plt.figure() ax1 = fig.add_subplot(461) ax2 = fig.add_subplot(462) ax3 = fig.add_subplot(463) ax4 = fig.add_subplot(464) ax5 = fig.add_subplot(465) ax6 = fig.add_subplot(466) ax7 = fig.add_subplot(467) ax8 = fig.add_subplot(468) ax9 = fig.add_subplot(469) ax10 = ...
true
true
1c1dff820a12e8ca2086e7121da917c841fd7d84
16,716
py
Python
casepro/settings_common.py
lucianomc/casepro
04e37a5ac816b6c7207dc3eed7bd616257efe11f
[ "BSD-3-Clause" ]
null
null
null
casepro/settings_common.py
lucianomc/casepro
04e37a5ac816b6c7207dc3eed7bd616257efe11f
[ "BSD-3-Clause" ]
null
null
null
casepro/settings_common.py
lucianomc/casepro
04e37a5ac816b6c7207dc3eed7bd616257efe11f
[ "BSD-3-Clause" ]
5
2020-01-16T00:55:23.000Z
2020-02-06T17:21:12.000Z
import os import sys from datetime import timedelta from django.utils.translation import ugettext_lazy as _ # ----------------------------------------------------------------------------------- # Sets TESTING to True if this configuration is read during a unit test # --------------------------------------------------...
35.717949
119
0.585846
import os import sys from datetime import timedelta from django.utils.translation import ugettext_lazy as _ TESTING = sys.argv[1:2] == ["test"] if TESTING: PASSWORD_HASHERS = ("django.contrib.auth.hashers.MD5PasswordHasher",) DEBUG = False else: DEBUG = True ADMINS = (("Nyaruka", "code@nyaruka.com"),...
true
true
1c1e0026ec61c791a20597919bf7c53eb6cc8281
331
py
Python
custom/ilsgateway/tanzania/handlers/stop.py
dslowikowski/commcare-hq
ad8885cf8dab69dc85cb64f37aeaf06106124797
[ "BSD-3-Clause" ]
1
2017-02-10T03:14:51.000Z
2017-02-10T03:14:51.000Z
custom/ilsgateway/tanzania/handlers/stop.py
dslowikowski/commcare-hq
ad8885cf8dab69dc85cb64f37aeaf06106124797
[ "BSD-3-Clause" ]
null
null
null
custom/ilsgateway/tanzania/handlers/stop.py
dslowikowski/commcare-hq
ad8885cf8dab69dc85cb64f37aeaf06106124797
[ "BSD-3-Clause" ]
null
null
null
from custom.ilsgateway.tanzania.handlers.keyword import KeywordHandler from custom.ilsgateway.tanzania.reminders import STOP_CONFIRM class StopHandler(KeywordHandler): def help(self): self.handle() def handle(self): self.user.is_active = False self.user.save() self.respond(ST...
25.461538
70
0.722054
from custom.ilsgateway.tanzania.handlers.keyword import KeywordHandler from custom.ilsgateway.tanzania.reminders import STOP_CONFIRM class StopHandler(KeywordHandler): def help(self): self.handle() def handle(self): self.user.is_active = False self.user.save() self.respond(ST...
true
true
1c1e014ba90cc8a14dffe4ef421ee96804dc8b29
959
py
Python
model_deploy/prepare/generate_wiki_index.py
rexarski/ANLY580-final-project
093eeaab7ab9fb382ad695335243e6ded893fb27
[ "MIT" ]
1
2022-01-02T04:23:12.000Z
2022-01-02T04:23:12.000Z
model_deploy/prepare/generate_wiki_index.py
CeleritasML/eli5c
093eeaab7ab9fb382ad695335243e6ded893fb27
[ "MIT" ]
null
null
null
model_deploy/prepare/generate_wiki_index.py
CeleritasML/eli5c
093eeaab7ab9fb382ad695335243e6ded893fb27
[ "MIT" ]
null
null
null
import pickle from time import time import datasets import numpy as np import faiss if __name__ == '__main__': st_time = time() wiki40b_snippets = datasets.load_dataset('wiki_snippets', name='wiki40b_en_100_0')['train'] wiki40b_file_name = 'wiki40b.dat' wiki40b_passage_reps = np.memmap(wiki40b_file_na...
36.884615
95
0.701773
import pickle from time import time import datasets import numpy as np import faiss if __name__ == '__main__': st_time = time() wiki40b_snippets = datasets.load_dataset('wiki_snippets', name='wiki40b_en_100_0')['train'] wiki40b_file_name = 'wiki40b.dat' wiki40b_passage_reps = np.memmap(wiki40b_file_na...
true
true
1c1e015eef8b203ad56c162ad4f5a0609934c828
3,536
py
Python
main.py
wzcwzc05/simulate-gravity
b55ac344278afe394ce73f3723b2b18a73b10645
[ "MIT" ]
3
2021-07-07T08:21:08.000Z
2021-08-02T12:05:31.000Z
main.py
wzcwzc05/simulate-gravity
b55ac344278afe394ce73f3723b2b18a73b10645
[ "MIT" ]
null
null
null
main.py
wzcwzc05/simulate-gravity
b55ac344278afe394ce73f3723b2b18a73b10645
[ "MIT" ]
null
null
null
import pygame import os,sys,time,random,math import easygui as g from matplotlib import pyplot as plot global WIDTH global HEIGHT global multiple global GO global G global BLACK global FPS global NUM NUM = 5 FPS = 120 BLACK = 0, 0, 0 WIDTH = 640 HEIGHT = 640 multiple = 1e10 # 在这里,为了保证演示效果,G扩大10的10次方倍 GO = 6.67408e-1...
26.787879
103
0.52517
import pygame import os,sys,time,random,math import easygui as g from matplotlib import pyplot as plot global WIDTH global HEIGHT global multiple global GO global G global BLACK global FPS global NUM NUM = 5 FPS = 120 BLACK = 0, 0, 0 WIDTH = 640 HEIGHT = 640 multiple = 1e10 GO = 6.67408e-11 G = GO * multiple speed...
true
true
1c1e01e225d71208746b80f40b71459e3772911f
4,824
py
Python
gameanalysis/script/learning.py
calebho/gameanalysis
280726a8aa125850b827a1e10b1203e91f515461
[ "Apache-2.0" ]
null
null
null
gameanalysis/script/learning.py
calebho/gameanalysis
280726a8aa125850b827a1e10b1203e91f515461
[ "Apache-2.0" ]
null
null
null
gameanalysis/script/learning.py
calebho/gameanalysis
280726a8aa125850b827a1e10b1203e91f515461
[ "Apache-2.0" ]
null
null
null
"""Analyze a game using gp learn""" import argparse import json import sys import warnings from gameanalysis import learning from gameanalysis import gamereader from gameanalysis import nash from gameanalysis import regret def add_parser(subparsers): """Parser for learning script""" parser = subparsers.add_p...
41.586207
79
0.620854
import argparse import json import sys import warnings from gameanalysis import learning from gameanalysis import gamereader from gameanalysis import nash from gameanalysis import regret def add_parser(subparsers): parser = subparsers.add_parser( 'learning', help="""Analyze game using learning""", ...
true
true
1c1e037c512e374057485e0a4e5ce2b2f602fdb3
96
py
Python
packages/@jsii/python-runtime/src/jsii/compat.py
NGL321/jsii
a31ebf5ef676391d97f2286edc21e5859c38c96c
[ "Apache-2.0" ]
1,639
2019-07-05T07:21:00.000Z
2022-03-31T09:55:01.000Z
packages/@jsii/python-runtime/src/jsii/compat.py
NGL321/jsii
a31ebf5ef676391d97f2286edc21e5859c38c96c
[ "Apache-2.0" ]
2,704
2019-07-01T23:10:28.000Z
2022-03-31T23:40:12.000Z
packages/@jsii/python-runtime/src/jsii/compat.py
NGL321/jsii
a31ebf5ef676391d97f2286edc21e5859c38c96c
[ "Apache-2.0" ]
146
2019-07-02T14:36:25.000Z
2022-03-26T00:21:27.000Z
# External Compatability Shims from typing_extensions import Protocol __all__ = ["Protocol"]
13.714286
38
0.791667
from typing_extensions import Protocol __all__ = ["Protocol"]
true
true
1c1e079fd7f370b29c80519d420adeada916695e
13,520
py
Python
caper/cromwell_workflow_monitor.py
dfeinzeig/caper
35a693448179674acfae95590e329ab5d1eea0b7
[ "MIT" ]
null
null
null
caper/cromwell_workflow_monitor.py
dfeinzeig/caper
35a693448179674acfae95590e329ab5d1eea0b7
[ "MIT" ]
null
null
null
caper/cromwell_workflow_monitor.py
dfeinzeig/caper
35a693448179674acfae95590e329ab5d1eea0b7
[ "MIT" ]
null
null
null
import logging import re import time from .cromwell_metadata import CromwellMetadata from .cromwell_rest_api import CromwellRestAPI logger = logging.getLogger(__name__) class WorkflowStatusTransition: def __init__(self, regex, status_transitions, auto_write_metadata=False): """ Args: ...
41.472393
143
0.565976
import logging import re import time from .cromwell_metadata import CromwellMetadata from .cromwell_rest_api import CromwellRestAPI logger = logging.getLogger(__name__) class WorkflowStatusTransition: def __init__(self, regex, status_transitions, auto_write_metadata=False): self._regex = regex s...
true
true
1c1e085d95f006b4b3f2e8182e80510c37cf8ebf
166
py
Python
tests/row_test.py
sethvargo/vaex
c610324316b2c0a14b8ceac2a30e202adc9da28b
[ "MIT" ]
337
2016-02-11T07:36:35.000Z
2018-12-10T07:17:35.000Z
tests/row_test.py
sethvargo/vaex
c610324316b2c0a14b8ceac2a30e202adc9da28b
[ "MIT" ]
127
2016-07-06T15:43:14.000Z
2018-12-11T18:46:27.000Z
tests/row_test.py
sethvargo/vaex
c610324316b2c0a14b8ceac2a30e202adc9da28b
[ "MIT" ]
29
2016-10-05T14:15:28.000Z
2018-11-29T10:17:00.000Z
from common import * def test_row(): ds = vaex.from_items(('x', [1,2,3]), ('y', [4,5,6])) assert ds[0] == [1, 4] ds['r'] = ds.x + ds.y assert ds[0] == [1, 4, 5]
20.75
53
0.5
from common import * def test_row(): ds = vaex.from_items(('x', [1,2,3]), ('y', [4,5,6])) assert ds[0] == [1, 4] ds['r'] = ds.x + ds.y assert ds[0] == [1, 4, 5]
true
true
1c1e0a04e6fe6b38004aa6bfd9513462de50da1c
1,059
py
Python
scanner/plugins/cms/dedecms/dedecms_download_redirect.py
UgOrange/onlinetools
06205282965395e37fb3a7fed806682196ad9ccc
[ "MIT" ]
1,207
2018-01-31T06:36:34.000Z
2022-03-31T07:35:35.000Z
scanner/plugins/cms/dedecms/dedecms_download_redirect.py
UgOrange/onlinetools
06205282965395e37fb3a7fed806682196ad9ccc
[ "MIT" ]
21
2018-07-30T03:01:49.000Z
2022-03-28T08:20:39.000Z
scanner/plugins/cms/dedecms/dedecms_download_redirect.py
UgOrange/onlinetools
06205282965395e37fb3a7fed806682196ad9ccc
[ "MIT" ]
310
2018-02-22T01:23:20.000Z
2022-03-28T08:51:37.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' name: dedecms download.php重定向漏洞 referer: http://skyhome.cn/dedecms/357.html author: Lucifer description: 在dedecms 5.7sp1的/plus/download.php中67行存在的代码,即接收参数后未进行域名的判断就进行了跳转。 ''' import sys import requests class dedecms_download_redirect_BaseVerify: def __init__(self...
30.257143
148
0.653447
import sys import requests class dedecms_download_redirect_BaseVerify: def __init__(self, url): self.url = url def run(self): headers = { "User-Agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50" ...
true
true
1c1e0b6f2d248e3ddfb45c33b961ab225699ed3b
5,944
py
Python
metagraph-plugin/tests/test_algorithms.py
vishwanath1306/katana
81a4bbe798d9bee887cadd22c7a349bdab292feb
[ "BSD-3-Clause" ]
null
null
null
metagraph-plugin/tests/test_algorithms.py
vishwanath1306/katana
81a4bbe798d9bee887cadd22c7a349bdab292feb
[ "BSD-3-Clause" ]
null
null
null
metagraph-plugin/tests/test_algorithms.py
vishwanath1306/katana
81a4bbe798d9bee887cadd22c7a349bdab292feb
[ "BSD-3-Clause" ]
null
null
null
import metagraph as mg import numpy as np import pytest # directed graph @pytest.fixture(autouse=True) def kg_from_nx_di_8_12(networkx_weighted_directed_8_12): pg_test_case = mg.translate(networkx_weighted_directed_8_12, mg.wrappers.Graph.KatanaGraph) return pg_test_case # undirected graph @pytest.fixture(a...
43.072464
108
0.771366
import metagraph as mg import numpy as np import pytest @pytest.fixture(autouse=True) def kg_from_nx_di_8_12(networkx_weighted_directed_8_12): pg_test_case = mg.translate(networkx_weighted_directed_8_12, mg.wrappers.Graph.KatanaGraph) return pg_test_case @pytest.fixture(autouse=True) def kg_from_nx_ud_8_1...
true
true
1c1e0c9708d25f68095589a8b404a44031078eb7
2,176
py
Python
nuagevsdsim/simentities/nusimzfbautoassignment.py
pdellaert/vspk-sim
459a84366a9bdde82d74aca18ea866e3d55d62ee
[ "BSD-3-Clause" ]
null
null
null
nuagevsdsim/simentities/nusimzfbautoassignment.py
pdellaert/vspk-sim
459a84366a9bdde82d74aca18ea866e3d55d62ee
[ "BSD-3-Clause" ]
null
null
null
nuagevsdsim/simentities/nusimzfbautoassignment.py
pdellaert/vspk-sim
459a84366a9bdde82d74aca18ea866e3d55d62ee
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2017, Nokia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright no...
39.563636
80
0.753217
from vspk import v5_0 as vsdk from nuagevsdsim.simentities.nusimresource import NUSimResource class NUSimZFBAutoAssignment(NUSimResource): __vspk_class__ = vsdk.NUZFBAutoAssignment __unique_fields__ = ['externalID'] __mandatory_fields__ = ['name', 'priority'] __default_f...
true
true
1c1e0cfb9529a091afc820c138642c1956e9ea2c
780
py
Python
components/container.py
mradrianhh/PID-265DS
963d2f3ce1402cf1600e21ed4e9bc2054dc39024
[ "MIT" ]
null
null
null
components/container.py
mradrianhh/PID-265DS
963d2f3ce1402cf1600e21ed4e9bc2054dc39024
[ "MIT" ]
null
null
null
components/container.py
mradrianhh/PID-265DS
963d2f3ce1402cf1600e21ed4e9bc2054dc39024
[ "MIT" ]
null
null
null
from .component import Component class Container(Component): __fluid_level: float # fluid level in meters def __init__(self, component: Component = None, tag: str = "", name: str = "", desc: str = "", fluid_level = 0): if component != None: super().__init__(component.get_tag(), component.g...
37.142857
116
0.65641
from .component import Component class Container(Component): __fluid_level: float def __init__(self, component: Component = None, tag: str = "", name: str = "", desc: str = "", fluid_level = 0): if component != None: super().__init__(component.get_tag(), component.get_type(), component.ge...
true
true
1c1e0d4c0a53421054d15b1c38ce4355a3b02ecb
444
py
Python
tests/test_to_ISODate_Array.py
VorTECHsa/python-sdk
d85aabd8d9843e4d04d857360492bea002c2b24b
[ "Apache-2.0" ]
9
2020-01-22T15:36:16.000Z
2022-03-14T10:05:19.000Z
tests/test_to_ISODate_Array.py
VorTECHsa/python-sdk
d85aabd8d9843e4d04d857360492bea002c2b24b
[ "Apache-2.0" ]
114
2020-01-08T11:08:24.000Z
2022-03-30T16:42:23.000Z
tests/test_to_ISODate_Array.py
V0RT3X4/python-sdk
4cffae83b90a58a56f1a534057fa1ca1c8671e05
[ "Apache-2.0" ]
6
2020-05-28T00:09:02.000Z
2022-03-14T03:52:44.000Z
from datetime import datetime from unittest import TestCase from vortexasdk.api.shared_types import to_ISODate_Array class TestToISODate(TestCase): def test_to_ISODate(self): assert to_ISODate_Array([]) == [] def test_to_ISODate_with_time(self): assert ( to_ISODate_Array([datetim...
27.75
78
0.668919
from datetime import datetime from unittest import TestCase from vortexasdk.api.shared_types import to_ISODate_Array class TestToISODate(TestCase): def test_to_ISODate(self): assert to_ISODate_Array([]) == [] def test_to_ISODate_with_time(self): assert ( to_ISODate_Array([datetim...
true
true
1c1e0df33ce56edfe6e6d69017527af478c3194c
1,931
py
Python
aliyun-python-sdk-dts/aliyunsdkdts/request/v20200101/SuspendDtsJobRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-dts/aliyunsdkdts/request/v20200101/SuspendDtsJobRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-dts/aliyunsdkdts/request/v20200101/SuspendDtsJobRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
39.408163
77
0.770585
from aliyunsdkcore.request import RpcRequest from aliyunsdkdts.endpoint import endpoint_data class SuspendDtsJobRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Dts', '2020-01-01', 'SuspendDtsJob','dts') self.set_method('POST') if hasattr(self, "endpoint_map"): setat...
true
true
1c1e0ea53101ab658db99fa1f08ceb3adb14af0d
3,623
py
Python
tests/test_minimal.py
facetframer/npcli
f4a79c734e52622ecb355d23d54ba9606b95c559
[ "Apache-2.0" ]
1
2017-05-05T02:17:51.000Z
2017-05-05T02:17:51.000Z
tests/test_minimal.py
facetframer/npcli
f4a79c734e52622ecb355d23d54ba9606b95c559
[ "Apache-2.0" ]
null
null
null
tests/test_minimal.py
facetframer/npcli
f4a79c734e52622ecb355d23d54ba9606b95c559
[ "Apache-2.0" ]
null
null
null
# make code as python 3 compatible as possible from __future__ import (absolute_import, division, print_function, unicode_literals) import io import os import tempfile import unittest from npcli.npcli import run class NpcliTest(unittest.TestCase): def setUp(self): self.direc = tem...
36.969388
123
0.561413
from __future__ import (absolute_import, division, print_function, unicode_literals) import io import os import tempfile import unittest from npcli.npcli import run class NpcliTest(unittest.TestCase): def setUp(self): self.direc = tempfile.mkdtemp() def run_cli(self, stdin, ...
true
true
1c1e0ed6775b6a833d7b6e92245f4a48b4cf0fe1
197
py
Python
app/test/test_file.py
korosuke613/spec2test
956dae7b9965bc0793d79c4dc746f074fe696d05
[ "MIT" ]
4
2017-12-02T02:32:35.000Z
2019-06-17T15:40:48.000Z
app/test/test_file.py
korosuke613/spec2test
956dae7b9965bc0793d79c4dc746f074fe696d05
[ "MIT" ]
32
2017-11-27T17:30:15.000Z
2018-02-26T17:32:19.000Z
app/test/test_file.py
korosuke613/spec2test
956dae7b9965bc0793d79c4dc746f074fe696d05
[ "MIT" ]
1
2019-06-17T15:40:53.000Z
2019-06-17T15:40:53.000Z
import pytest from spec2test import File def test_raise_true(): File("test_file.py", ".py") def test_raise_false(): with pytest.raises(ValueError): File("test_file.py", ".pyc")
16.416667
36
0.675127
import pytest from spec2test import File def test_raise_true(): File("test_file.py", ".py") def test_raise_false(): with pytest.raises(ValueError): File("test_file.py", ".pyc")
true
true
1c1e0ee15c3360140034bce9510d2917ced79ef3
1,701
py
Python
homeassistant/components/verisure/binary_sensor.py
alindeman/home-assistant
b274b10f3874c196f0db8f9cfa5f47eb756d1f8e
[ "Apache-2.0" ]
4
2019-07-03T22:36:57.000Z
2019-08-10T15:33:25.000Z
homeassistant/components/verisure/binary_sensor.py
alindeman/home-assistant
b274b10f3874c196f0db8f9cfa5f47eb756d1f8e
[ "Apache-2.0" ]
7
2019-08-23T05:26:02.000Z
2022-03-11T23:57:18.000Z
homeassistant/components/verisure/binary_sensor.py
alindeman/home-assistant
b274b10f3874c196f0db8f9cfa5f47eb756d1f8e
[ "Apache-2.0" ]
3
2019-04-28T16:35:45.000Z
2020-05-28T15:21:59.000Z
"""Support for Verisure binary sensors.""" import logging from homeassistant.components.binary_sensor import BinarySensorDevice from . import CONF_DOOR_WINDOW, HUB as hub _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the Verisure binary sen...
30.375
74
0.642563
import logging from homeassistant.components.binary_sensor import BinarySensorDevice from . import CONF_DOOR_WINDOW, HUB as hub _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_entities, discovery_info=None): sensors = [] hub.update_overview() if int(hub.config.get(CONF_DOOR_...
true
true
1c1e0f127d15cf4bacbfcffce418d694b7cdc31c
2,075
py
Python
setup.py
stephenfin/django-filter
eef406c1ee429e3024999c8746d1ca5641185bf8
[ "BSD-3-Clause" ]
1
2019-01-09T19:43:43.000Z
2019-01-09T19:43:43.000Z
setup.py
stephenfin/django-filter
eef406c1ee429e3024999c8746d1ca5641185bf8
[ "BSD-3-Clause" ]
null
null
null
setup.py
stephenfin/django-filter
eef406c1ee429e3024999c8746d1ca5641185bf8
[ "BSD-3-Clause" ]
1
2018-11-17T13:40:16.000Z
2018-11-17T13:40:16.000Z
import os import sys from setuptools import setup, find_packages f = open('README.rst') readme = f.read() f.close() version = '2.0.0' if sys.argv[-1] == 'publish': if os.system("pip freeze | grep wheel"): print("wheel not installed.\nUse `pip install wheel`.\nExiting.") sys.exit() if os.syste...
32.936508
78
0.611566
import os import sys from setuptools import setup, find_packages f = open('README.rst') readme = f.read() f.close() version = '2.0.0' if sys.argv[-1] == 'publish': if os.system("pip freeze | grep wheel"): print("wheel not installed.\nUse `pip install wheel`.\nExiting.") sys.exit() if os.syste...
true
true
1c1e0f2aaede41f2fef987ea4e874abbc6fb34fc
421
py
Python
password_manager/utils/logger.py
GrzegorzNieuzyla/PasswordManager
f54ebb7f5f86449d3d1f13542402a536bcf264d7
[ "MIT" ]
null
null
null
password_manager/utils/logger.py
GrzegorzNieuzyla/PasswordManager
f54ebb7f5f86449d3d1f13542402a536bcf264d7
[ "MIT" ]
null
null
null
password_manager/utils/logger.py
GrzegorzNieuzyla/PasswordManager
f54ebb7f5f86449d3d1f13542402a536bcf264d7
[ "MIT" ]
null
null
null
import logging class Logger: """ Helper class for logging """ logger = logging.getLogger("Password manager") @staticmethod def set_level(level: int) -> None: logging.basicConfig() Logger.logger.setLevel(level) @staticmethod def info(msg: str) -> None: Logger.l...
19.136364
50
0.615202
import logging class Logger: logger = logging.getLogger("Password manager") @staticmethod def set_level(level: int) -> None: logging.basicConfig() Logger.logger.setLevel(level) @staticmethod def info(msg: str) -> None: Logger.logger.info(msg) @staticmethod def er...
true
true
1c1e0f878abe0e4075f51d25bcec61e0af9d3d97
892
py
Python
xlsxwriter/test/comparison/test_data_validation01.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
2
2019-07-25T06:08:09.000Z
2019-11-01T02:33:56.000Z
xlsxwriter/test/comparison/test_data_validation01.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
13
2019-07-14T00:29:05.000Z
2019-11-26T06:16:46.000Z
xlsxwriter/test/comparison/test_data_validation01.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
23.473684
79
0.567265
true
true
1c1e0f8824175e04b9a417f575f919babffcb8b1
592
py
Python
events/migrations/0026_event_creator.py
salazarpardo/redinnovacion
3f7c13af0af1887112a0492aea7782871fba0129
[ "CC-BY-3.0" ]
null
null
null
events/migrations/0026_event_creator.py
salazarpardo/redinnovacion
3f7c13af0af1887112a0492aea7782871fba0129
[ "CC-BY-3.0" ]
null
null
null
events/migrations/0026_event_creator.py
salazarpardo/redinnovacion
3f7c13af0af1887112a0492aea7782871fba0129
[ "CC-BY-3.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('events', '0025_auto_20170619_0856'), ...
26.909091
143
0.670608
from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('events', '0025_auto_20170619_0856'), ] operations = [ ...
true
true
1c1e0fcfcb76cfdbfea1cb89c3b83ff1fe0e4407
6,938
py
Python
__app__/crop/db.py
alan-turing-institute/CROP
467956ba8e273daa6afbfafd89bd2c3462a8156e
[ "MIT" ]
9
2020-02-11T17:57:47.000Z
2022-03-22T14:24:55.000Z
__app__/crop/db.py
alan-turing-institute/CROP
467956ba8e273daa6afbfafd89bd2c3462a8156e
[ "MIT" ]
64
2020-02-11T17:35:36.000Z
2022-03-31T13:19:08.000Z
__app__/crop/db.py
alan-turing-institute/CROP
467956ba8e273daa6afbfafd89bd2c3462a8156e
[ "MIT" ]
2
2020-08-16T06:10:24.000Z
2021-04-15T10:11:51.000Z
""" Module for the main functions to create a new database with SQLAlchemy and Postgres, drop database, and check its structure. """ from sqlalchemy import create_engine, inspect from sqlalchemy_utils import database_exists, drop_database from sqlalchemy.orm import RelationshipProperty, sessionmaker from sqlalchemy.ex...
33.038095
93
0.613866
from sqlalchemy import create_engine, inspect from sqlalchemy_utils import database_exists, drop_database from sqlalchemy.orm import RelationshipProperty, sessionmaker from sqlalchemy.ext.declarative.clsregistry import _ModuleMarker from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT from __app__.crop.constant...
true
true
1c1e10fda542a71cfb9918d47155ed4e4a9167f5
249
py
Python
experiments/datadef/definitions/__init__.py
jkvc/modapt
44610e6f03fb151433f2db633e1d23cc0dc470fc
[ "MIT" ]
null
null
null
experiments/datadef/definitions/__init__.py
jkvc/modapt
44610e6f03fb151433f2db633e1d23cc0dc470fc
[ "MIT" ]
null
null
null
experiments/datadef/definitions/__init__.py
jkvc/modapt
44610e6f03fb151433f2db633e1d23cc0dc470fc
[ "MIT" ]
1
2021-04-28T17:09:05.000Z
2021-04-28T17:09:05.000Z
import glob from os.path import basename, dirname, isfile, join # import everything in this dir modules = glob.glob(join(dirname(__file__), "*.py")) __all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith("__init__.py") ]
27.666667
84
0.706827
import glob from os.path import basename, dirname, isfile, join modules = glob.glob(join(dirname(__file__), "*.py")) __all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith("__init__.py") ]
true
true
1c1e112f258bd2b4ba6a6264912b77e41678577b
675
py
Python
Functions.py
neuhier/inception2
b04b2d1499ad3510baed38b7349ae4399d3bc4a0
[ "CC-BY-4.0" ]
null
null
null
Functions.py
neuhier/inception2
b04b2d1499ad3510baed38b7349ae4399d3bc4a0
[ "CC-BY-4.0" ]
null
null
null
Functions.py
neuhier/inception2
b04b2d1499ad3510baed38b7349ae4399d3bc4a0
[ "CC-BY-4.0" ]
null
null
null
# ------------------------------------------------+ # Collection of usefull functions # ------------------------------------------------+ import math import os import pygame # Load an image (assumes images are in a subfolder of the script itself def load_img(path): script_dir = os.path.dirname(__file__) abs...
32.142857
115
0.623704
import math import os import pygame def load_img(path): script_dir = os.path.dirname(__file__) abs_file_path = os.path.join(script_dir, path) this_img = pygame.image.load(abs_file_path).convert() return this_img def getMovingVector(movingthing): return (math.cos((movingthing.angle - 90) *...
true
true
1c1e113a39d763fa12aa0ed89a24690f3282929c
23,455
py
Python
tests/integration/test_internal_endpoints.py
cammeronm/trickster
b7e3d64f2c3b99e986f4fde59a05caa1c7cadac9
[ "MIT" ]
null
null
null
tests/integration/test_internal_endpoints.py
cammeronm/trickster
b7e3d64f2c3b99e986f4fde59a05caa1c7cadac9
[ "MIT" ]
null
null
null
tests/integration/test_internal_endpoints.py
cammeronm/trickster
b7e3d64f2c3b99e986f4fde59a05caa1c7cadac9
[ "MIT" ]
null
null
null
"""Integration tests of internal API endpoints.""" import pytest @pytest.mark.integration class TestInternalEndpoints: def test_get_empty_routes(self, client): response = client.get('/internal/routes') assert response.json == [] def test_add_minimal_route(self, client): response = cl...
30.186615
145
0.390706
import pytest @pytest.mark.integration class TestInternalEndpoints: def test_get_empty_routes(self, client): response = client.get('/internal/routes') assert response.json == [] def test_add_minimal_route(self, client): response = client.post('/internal/routes', json={ 'i...
true
true
1c1e117b13dca0788cd5fd548083c64b577626ed
1,749
py
Python
frappe/core/doctype/report/report.py
khatrijitendra/lumalock-frappe
b3864278dad21dde5c53604be65aa56c79e5d909
[ "MIT" ]
null
null
null
frappe/core/doctype/report/report.py
khatrijitendra/lumalock-frappe
b3864278dad21dde5c53604be65aa56c79e5d909
[ "MIT" ]
7
2020-03-24T17:07:47.000Z
2022-03-11T23:49:25.000Z
frappe/core/doctype/report/report.py
khatrijitendra/lumalock-frappe
b3864278dad21dde5c53604be65aa56c79e5d909
[ "MIT" ]
5
2016-11-12T12:14:58.000Z
2018-03-21T15:45:45.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cint from frappe.model.document import Document from frappe.modules.export_file import export_to_files from frappe.modu...
33
97
0.740995
from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cint from frappe.model.document import Document from frappe.modules.export_file import export_to_files from frappe.modules import make_boilerplate class Report(Document): def validate(self): if not self.module: ...
true
true
1c1e129bee7820645d6ba4caff70b7ee162e174b
1,199
py
Python
外国网站新闻爬取/main.py
13060923171/Crawl-Project2
effab1bf31979635756fc272a7bcc666bb499be2
[ "MIT" ]
14
2020-10-27T05:52:20.000Z
2021-11-07T20:24:55.000Z
外国网站新闻爬取/main.py
13060923171/Crawl-Project2
effab1bf31979635756fc272a7bcc666bb499be2
[ "MIT" ]
1
2021-09-17T07:40:00.000Z
2021-09-17T07:40:00.000Z
外国网站新闻爬取/main.py
13060923171/Crawl-Project2
effab1bf31979635756fc272a7bcc666bb499be2
[ "MIT" ]
8
2020-11-18T14:23:12.000Z
2021-11-12T08:55:08.000Z
from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from bs4 import BeautifulSoup import time browser = webdriver.Chrome...
33.305556
145
0.706422
from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from bs4 import BeautifulSoup import time browser = webdriver.Chrome...
true
true
1c1e1362b509d647078093e60a2f8954c61480d0
4,863
py
Python
docsource/conf.py
pjhartout/fastwlk
deb78923c9a8450099c26bac09da94ae87892d0d
[ "BSD-3-Clause" ]
null
null
null
docsource/conf.py
pjhartout/fastwlk
deb78923c9a8450099c26bac09da94ae87892d0d
[ "BSD-3-Clause" ]
7
2022-03-21T08:46:44.000Z
2022-03-25T16:20:48.000Z
docsource/conf.py
pjhartout/fastwlk
deb78923c9a8450099c26bac09da94ae87892d0d
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # fastwlk documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # 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 # aut...
29.834356
77
0.675303
import os import sys import fastwlk sys.path.insert(0, os.path.abspath("..")) extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"] templates_path = ["_templates"] source_suffix = ".rst" master_doc = "index" project = "FastWLK" copyright = "2022, Philip Hartout" author = ...
true
true
1c1e136c1511aa88bfe91704ed8801d44fbad95d
304
py
Python
LIDAR Visualizer/old/socket_test.py
tranthanh1699/LIDAR-Robot
adebea8c794f189e3cb468805ecfb7f4884b462e
[ "MIT" ]
1
2022-02-04T09:04:48.000Z
2022-02-04T09:04:48.000Z
LIDAR Visualizer/old/socket_test.py
tranthanh1699/LIDAR-Robot
adebea8c794f189e3cb468805ecfb7f4884b462e
[ "MIT" ]
null
null
null
LIDAR Visualizer/old/socket_test.py
tranthanh1699/LIDAR-Robot
adebea8c794f189e3cb468805ecfb7f4884b462e
[ "MIT" ]
null
null
null
import asyncio import websockets async def echo(websocket): async for message in websocket: print(message) await websocket.send("left") async def main(): async with websockets.serve(echo, "192.168.0.107", 8084): await asyncio.Future() # run forever asyncio.run(main())
23.384615
61
0.677632
import asyncio import websockets async def echo(websocket): async for message in websocket: print(message) await websocket.send("left") async def main(): async with websockets.serve(echo, "192.168.0.107", 8084): await asyncio.Future() asyncio.run(main())
true
true
1c1e15a3a9149d6c8167259e8e80233094b16f57
1,474
py
Python
main.py
Armandopdw/selenium-product-availability-check
c1077392de4216daff092010fada19ef1649eba9
[ "MIT" ]
3
2020-10-09T12:39:26.000Z
2021-01-19T13:15:35.000Z
main.py
Armandopdw/selenium-product-availability-check
c1077392de4216daff092010fada19ef1649eba9
[ "MIT" ]
null
null
null
main.py
Armandopdw/selenium-product-availability-check
c1077392de4216daff092010fada19ef1649eba9
[ "MIT" ]
3
2020-10-03T11:41:40.000Z
2020-11-02T21:14:54.000Z
# main.py from loguru import logger as lg # Try to import config file try: from config import Config except ModuleNotFoundError as e: raise RuntimeError( "config.py file has not been set yet, adjust and rename the example_config.py") from mail.mail import Mail from sel.build_selenium import CustomSel...
28.901961
87
0.658752
from loguru import logger as lg try: from config import Config except ModuleNotFoundError as e: raise RuntimeError( "config.py file has not been set yet, adjust and rename the example_config.py") from mail.mail import Mail from sel.build_selenium import CustomSelenium if __name__ == '__main__': ...
true
true
1c1e17b9ea713b03f830df5e67199f69c2b8200e
5,638
py
Python
L3_C1_Bellman.py
Owpac/project-graph-theory
467e37797de1f311fb1e9add757cc83b46137fe7
[ "MIT" ]
null
null
null
L3_C1_Bellman.py
Owpac/project-graph-theory
467e37797de1f311fb1e9add757cc83b46137fe7
[ "MIT" ]
null
null
null
L3_C1_Bellman.py
Owpac/project-graph-theory
467e37797de1f311fb1e9add757cc83b46137fe7
[ "MIT" ]
null
null
null
# Created by Florian on 01/05/2019 from typing import List, Generator, Optional from L3_C1_Cellule import Cellule from L3_C1_affichage import affichage_matrice class BellmanSolveur: matrice_valeurs: List[List[int]] sommets: List[int] pi: List[List[Cellule]] def __init__(self, matrice_valeurs: List[L...
50.792793
117
0.63143
from typing import List, Generator, Optional from L3_C1_Cellule import Cellule from L3_C1_affichage import affichage_matrice class BellmanSolveur: matrice_valeurs: List[List[int]] sommets: List[int] pi: List[List[Cellule]] def __init__(self, matrice_valeurs: List[List[int]], liste_sommets: List[int...
true
true
1c1e1a009b16959932f3d59fa054d881c6c3f3ab
38
py
Python
myprogram.py
m10singh94/Python-programs
a83083044b4a85afcf70c4b7024287a808b01fee
[ "Apache-2.0" ]
null
null
null
myprogram.py
m10singh94/Python-programs
a83083044b4a85afcf70c4b7024287a808b01fee
[ "Apache-2.0" ]
null
null
null
myprogram.py
m10singh94/Python-programs
a83083044b4a85afcf70c4b7024287a808b01fee
[ "Apache-2.0" ]
null
null
null
from mymodule import my_func my_func()
19
28
0.842105
from mymodule import my_func my_func()
true
true
1c1e1b618ddad135899890ed7a5d52efa8a35230
8,911
py
Python
ocs_ci/utility/baremetal.py
annagitel/ocs-ci
284fe04aeb6e3d6cb70c99e65fec8ff1b1ea1dd5
[ "MIT" ]
130
2019-04-08T06:22:53.000Z
2022-03-23T06:11:19.000Z
ocs_ci/utility/baremetal.py
annagitel/ocs-ci
284fe04aeb6e3d6cb70c99e65fec8ff1b1ea1dd5
[ "MIT" ]
4,359
2019-04-09T18:48:47.000Z
2022-03-31T20:04:55.000Z
ocs_ci/utility/baremetal.py
annagitel/ocs-ci
284fe04aeb6e3d6cb70c99e65fec8ff1b1ea1dd5
[ "MIT" ]
183
2019-04-18T15:55:30.000Z
2022-03-11T06:16:50.000Z
import logging import pyipmi import pyipmi.interfaces from ocs_ci.ocs import constants, defaults from ocs_ci.ocs.constants import VM_POWERED_OFF, VM_POWERED_ON from ocs_ci.ocs.exceptions import UnexpectedBehaviour from ocs_ci.ocs.node import wait_for_nodes_status, get_worker_nodes, get_master_nodes from ocs_ci.ocs.oc...
36.223577
90
0.557513
import logging import pyipmi import pyipmi.interfaces from ocs_ci.ocs import constants, defaults from ocs_ci.ocs.constants import VM_POWERED_OFF, VM_POWERED_ON from ocs_ci.ocs.exceptions import UnexpectedBehaviour from ocs_ci.ocs.node import wait_for_nodes_status, get_worker_nodes, get_master_nodes from ocs_ci.ocs.oc...
true
true
1c1e1c2d88618a81a6efddd93ad2198d569c4e56
4,415
py
Python
analyzer/darwin/modules/packages/doc.py
maximejf42/mac-sandbox
cb3ac3f31e97843309d4c8cc81bf703c70132c53
[ "Unlicense" ]
21
2016-07-29T16:03:20.000Z
2022-01-05T23:53:51.000Z
analyzer/darwin/modules/packages/doc.py
maximejf42/mac-sandbox
cb3ac3f31e97843309d4c8cc81bf703c70132c53
[ "Unlicense" ]
null
null
null
analyzer/darwin/modules/packages/doc.py
maximejf42/mac-sandbox
cb3ac3f31e97843309d4c8cc81bf703c70132c53
[ "Unlicense" ]
6
2017-08-09T23:58:44.000Z
2022-01-05T10:33:27.000Z
from lib.common.abstracts import Package import os import os.path import plistlib import logging import subprocess from AppKit import * import Foundation from PyObjCTools import AppHelper #get logger log = logging.getLogger() class OpenDoc(NSObject): def setPath(self, p, test, app): self.path = p ...
33.961538
127
0.608834
from lib.common.abstracts import Package import os import os.path import plistlib import logging import subprocess from AppKit import * import Foundation from PyObjCTools import AppHelper log = logging.getLogger() class OpenDoc(NSObject): def setPath(self, p, test, app): self.path = p self.lo...
true
true
1c1e1d847b7d7bbd3b047b3ebe0e7f27653baf1d
5,374
py
Python
ngraph/python/tests/test_onnx/utils/onnx_backend.py
Andruxin52rus/openvino
d824e371fe7dffb90e6d3d58e4e34adecfce4606
[ "Apache-2.0" ]
1
2022-01-19T15:36:45.000Z
2022-01-19T15:36:45.000Z
ngraph/python/tests/test_onnx/utils/onnx_backend.py
Andruxin52rus/openvino
d824e371fe7dffb90e6d3d58e4e34adecfce4606
[ "Apache-2.0" ]
22
2021-02-03T12:41:51.000Z
2022-02-21T13:04:48.000Z
ngraph/python/tests/test_onnx/utils/onnx_backend.py
mmakridi/openvino
769bb7709597c14debdaa356dd60c5a78bdfa97e
[ "Apache-2.0" ]
null
null
null
# ****************************************************************************** # Copyright 2018-2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
36.310811
97
0.63342
from typing import Any, Dict, List, Optional, Sequence, Text, Tuple import numpy import onnx from onnx.backend.base import Backend, BackendRep from onnx.helper import make_graph, make_model, make_tensor_value_info from ngraph.impl import Function from tests.runtime import get_runtime from tests.test_o...
true
true
1c1e1e6ba67a1ca5ae3534606c8d470dac3f05f2
22,974
py
Python
tests/test_providers.py
hukkelas/paper2remarkable
acc63b4b7328413f41f791caca2a611762f4f3b7
[ "MIT" ]
null
null
null
tests/test_providers.py
hukkelas/paper2remarkable
acc63b4b7328413f41f791caca2a611762f4f3b7
[ "MIT" ]
null
null
null
tests/test_providers.py
hukkelas/paper2remarkable
acc63b4b7328413f41f791caca2a611762f4f3b7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "G.J.J. van den Burg" """Tests""" import hashlib import os import pdfplumber import shutil import tempfile import unittest from pikepdf import Pdf from paper2remarkable.exceptions import URLResolutionError from paper2remarkable.providers import ( ACL, ...
47.466942
1,806
0.710716
__author__ = "G.J.J. van den Burg" import hashlib import os import pdfplumber import shutil import tempfile import unittest from pikepdf import Pdf from paper2remarkable.exceptions import URLResolutionError from paper2remarkable.providers import ( ACL, ACM, Arxiv, CVF, CiteSeerX, HTML, ...
true
true
1c1e1eb88df7f0ad1f1bec5f205fff807f2834f0
633
py
Python
djangodemo_UI/manage.py
adesgautam/django-apache2
4ffbf4483a0fdaaf6a77fe4072447431f5e0af45
[ "MIT" ]
null
null
null
djangodemo_UI/manage.py
adesgautam/django-apache2
4ffbf4483a0fdaaf6a77fe4072447431f5e0af45
[ "MIT" ]
null
null
null
djangodemo_UI/manage.py
adesgautam/django-apache2
4ffbf4483a0fdaaf6a77fe4072447431f5e0af45
[ "MIT" ]
1
2020-12-06T00:34:43.000Z
2020-12-06T00:34:43.000Z
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangodemo_UI.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ...
28.772727
77
0.685624
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangodemo_UI.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and "...
true
true
1c1e1f6a0bad384ddf416cd6f82d24b98fdea7c7
339
py
Python
spacebodies/forecast/exceptions.py
PredictTheSky/spacebodies
a861f786a1bca0bcabef0131fb13f658fa8c735c
[ "MIT" ]
14
2015-01-08T12:39:06.000Z
2018-10-15T06:03:40.000Z
spacebodies/forecast/exceptions.py
PredictTheSky/spacebodies
a861f786a1bca0bcabef0131fb13f658fa8c735c
[ "MIT" ]
4
2015-02-16T22:16:47.000Z
2018-07-28T08:59:20.000Z
spacebodies/forecast/exceptions.py
PredictTheSky/spacebodies
a861f786a1bca0bcabef0131fb13f658fa8c735c
[ "MIT" ]
4
2015-02-13T20:27:25.000Z
2019-03-07T09:46:17.000Z
# -*- coding: utf-8 -*- class ForecastException(Exception): """There was an ambiguous exception that occurred.""" class ForecastNotLoadedError(ForecastException): """The forecast wasn't loaded before being requested.""" class ForecastOutOfRangeError(ForecastException): """There's no forecast available...
24.214286
60
0.731563
class ForecastException(Exception): class ForecastNotLoadedError(ForecastException): class ForecastOutOfRangeError(ForecastException):
true
true
1c1e1fe06358e1fa2a822a4ad518651f5ad12bb7
872
py
Python
kubernetes/test/test_v1_pod.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_pod.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_pod.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
1
2020-05-09T07:16:55.000Z
2020-05-09T07:16:55.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
19.377778
105
0.678899
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1_pod import V1Pod class TestV1Pod(unittest.TestCase): def setUp(self): pass def tearDown(self): pass ...
true
true
1c1e1ff7aeeec3a00730036f9c0c1c4326cba4da
673
py
Python
main.py
JonathanTTSouza/miles-to-km
cc079845cc911e90fee41d7230760df6a3deffff
[ "MIT" ]
null
null
null
main.py
JonathanTTSouza/miles-to-km
cc079845cc911e90fee41d7230760df6a3deffff
[ "MIT" ]
null
null
null
main.py
JonathanTTSouza/miles-to-km
cc079845cc911e90fee41d7230760df6a3deffff
[ "MIT" ]
null
null
null
from tkinter import * def action(): result.config(text=f"{float(miles_input.get()) * 1.689}") window = Tk() window.title("Miles to kilometers converter") window.minsize(width=300, height=100) miles_input = Entry() miles_input.insert(END, string="0") miles_input.grid(column=1, row=0) miles_label = Label(text="...
21.03125
61
0.726597
from tkinter import * def action(): result.config(text=f"{float(miles_input.get()) * 1.689}") window = Tk() window.title("Miles to kilometers converter") window.minsize(width=300, height=100) miles_input = Entry() miles_input.insert(END, string="0") miles_input.grid(column=1, row=0) miles_label = Label(text="...
true
true
1c1e21936e95c06af57e04a935cb67f9e1304b39
710
py
Python
clickuz/models.py
aziz837/ClickUz
75fcb43f025ad994dad1df6b628a284a1a710954
[ "MIT" ]
39
2020-05-02T13:39:25.000Z
2022-03-30T10:12:54.000Z
clickuz/models.py
aziz837/ClickUz
75fcb43f025ad994dad1df6b628a284a1a710954
[ "MIT" ]
null
null
null
clickuz/models.py
aziz837/ClickUz
75fcb43f025ad994dad1df6b628a284a1a710954
[ "MIT" ]
9
2020-05-02T19:41:24.000Z
2022-03-14T08:11:11.000Z
from django.db import models # Create your models here. class Transaction(models.Model): PROCESSING = 'processing' FINISHED = 'finished' CANCELED = 'canceled' STATUS = ((PROCESSING, PROCESSING), (FINISHED, FINISHED), (CANCELED, CANCELED)) click_trans_id = models.CharField(max_length=255) mer...
32.272727
83
0.733803
from django.db import models class Transaction(models.Model): PROCESSING = 'processing' FINISHED = 'finished' CANCELED = 'canceled' STATUS = ((PROCESSING, PROCESSING), (FINISHED, FINISHED), (CANCELED, CANCELED)) click_trans_id = models.CharField(max_length=255) merchant_trans_id = models.Ch...
true
true
1c1e21a388112144e14afd772a8e3cfb6b7935b0
202
py
Python
Easy/count_negative_numbers_in_a_sorted_matrix.py
BrynjarGeir/LeetCode
dbd57e645c5398dec538b6466215b61491c8d1d9
[ "MIT" ]
null
null
null
Easy/count_negative_numbers_in_a_sorted_matrix.py
BrynjarGeir/LeetCode
dbd57e645c5398dec538b6466215b61491c8d1d9
[ "MIT" ]
null
null
null
Easy/count_negative_numbers_in_a_sorted_matrix.py
BrynjarGeir/LeetCode
dbd57e645c5398dec538b6466215b61491c8d1d9
[ "MIT" ]
null
null
null
class Solution: def countNegatives(self, grid: List[List[int]]) -> int: count = 0 for row in grid: for c in row: if c < 0: count += 1 return count
28.857143
59
0.49505
class Solution: def countNegatives(self, grid: List[List[int]]) -> int: count = 0 for row in grid: for c in row: if c < 0: count += 1 return count
true
true
1c1e220aa92b2d9cbbd5837b2f07b97ace8f0d5f
1,247
py
Python
tbuddy.py
WhiteLab/TransferBuddy
cc28c96a4c8ad0d1b7d654c3cf2256eb7e50bd7f
[ "MIT" ]
null
null
null
tbuddy.py
WhiteLab/TransferBuddy
cc28c96a4c8ad0d1b7d654c3cf2256eb7e50bd7f
[ "MIT" ]
null
null
null
tbuddy.py
WhiteLab/TransferBuddy
cc28c96a4c8ad0d1b7d654c3cf2256eb7e50bd7f
[ "MIT" ]
null
null
null
import argparse import requests from eve import Eve def producer(): eve_settings = { 'MONGO_HOST': 'localhost', 'MONGO_PORT': 27017, 'MONGO_DBNAME': 'tbuddy', 'DOMAIN': { 'people': {}, 'things': {} } } app = Eve(settings=eve_settings) a...
27.711111
97
0.627907
import argparse import requests from eve import Eve def producer(): eve_settings = { 'MONGO_HOST': 'localhost', 'MONGO_PORT': 27017, 'MONGO_DBNAME': 'tbuddy', 'DOMAIN': { 'people': {}, 'things': {} } } app = Eve(settings=eve_settings) a...
true
true
1c1e2245ab7f373cf3eef9f2062f098b9d1d27d2
2,983
py
Python
cq_editor/widgets/traceback_viewer.py
adam-trhon/CQ-editor
1fcd42e7e057893b28bfc3321576b71f00e4b620
[ "Apache-2.0" ]
1
2021-12-14T01:59:56.000Z
2021-12-14T01:59:56.000Z
cq_editor/widgets/traceback_viewer.py
adam-trhon/CQ-editor
1fcd42e7e057893b28bfc3321576b71f00e4b620
[ "Apache-2.0" ]
null
null
null
cq_editor/widgets/traceback_viewer.py
adam-trhon/CQ-editor
1fcd42e7e057893b28bfc3321576b71f00e4b620
[ "Apache-2.0" ]
null
null
null
from traceback import extract_tb, format_exception_only from PyQt5.QtWidgets import (QWidget, QTreeWidget, QTreeWidgetItem, QAction, QLabel) from PyQt5.QtCore import Qt, pyqtSlot, pyqtSignal from ..mixins import ComponentMixin from ..utils import layout class TracebackTree(QTreeWidget): ...
31.734043
109
0.512906
from traceback import extract_tb, format_exception_only from PyQt5.QtWidgets import (QWidget, QTreeWidget, QTreeWidgetItem, QAction, QLabel) from PyQt5.QtCore import Qt, pyqtSlot, pyqtSignal from ..mixins import ComponentMixin from ..utils import layout class TracebackTree(QTreeWidget): ...
true
true
1c1e228f4f39f09d73b4c17f677cb644eeceba44
179
py
Python
src/migrations.py
vladimir-grigoriev/flask-app-3rd-week
ac28492b573f2794d32c3e6c3ecef064cb8a0e33
[ "Apache-2.0" ]
null
null
null
src/migrations.py
vladimir-grigoriev/flask-app-3rd-week
ac28492b573f2794d32c3e6c3ecef064cb8a0e33
[ "Apache-2.0" ]
null
null
null
src/migrations.py
vladimir-grigoriev/flask-app-3rd-week
ac28492b573f2794d32c3e6c3ecef064cb8a0e33
[ "Apache-2.0" ]
null
null
null
import json import src.data as data with open('db/teachers.json', 'w') as f: json.dump(data.teachers, f) with open('db/goals.json', 'w') as f: json.dump(data.goals, f)
17.9
40
0.653631
import json import src.data as data with open('db/teachers.json', 'w') as f: json.dump(data.teachers, f) with open('db/goals.json', 'w') as f: json.dump(data.goals, f)
true
true
1c1e232889646bb2aec73d7b7e1920796ae0527e
1,174
py
Python
pyqode/core/api/__init__.py
SunChuquin/pyqode.core
edf29204446e3679701e74343288cf692eb07d86
[ "MIT" ]
42
2018-05-02T07:07:27.000Z
2022-02-01T19:49:49.000Z
pyqode/core/api/__init__.py
SunChuquin/pyqode.core
edf29204446e3679701e74343288cf692eb07d86
[ "MIT" ]
65
2018-03-08T11:53:13.000Z
2018-09-17T09:00:09.000Z
Lib/site-packages/pyqode/core/api/__init__.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
24
2015-01-09T14:16:41.000Z
2021-12-06T15:11:22.000Z
""" This package contains the bases classes of pyqode and some utility functions. """ from .code_edit import CodeEdit from .decoration import TextDecoration from .encodings import ENCODINGS_MAP, convert_to_codec_key from .manager import Manager from .mode import Mode from .panel import Panel from .syntax_highlighter i...
25.521739
66
0.769165
from .code_edit import CodeEdit from .decoration import TextDecoration from .encodings import ENCODINGS_MAP, convert_to_codec_key from .manager import Manager from .mode import Mode from .panel import Panel from .syntax_highlighter import ColorScheme from .syntax_highlighter import PYGMENTS_STYLES from .syntax_highligh...
true
true
1c1e242c11f39ae971e6e0805dadea5037c267a1
1,077
py
Python
search.py
tjguk/search
e6c75b729c2a5e0d8e0e7ecf9c9abf4b5a1d0e73
[ "MIT" ]
null
null
null
search.py
tjguk/search
e6c75b729c2a5e0d8e0e7ecf9c9abf4b5a1d0e73
[ "MIT" ]
null
null
null
search.py
tjguk/search
e6c75b729c2a5e0d8e0e7ecf9c9abf4b5a1d0e73
[ "MIT" ]
null
null
null
#!python3 import os, sys import glob import itertools import re def term_as_regex(term): term = term.replace("*", r"[\w\.]*") term = term.replace("?", r"[\w\.]") return term def find_matches(filepath, terms): with open(filepath, encoding="utf-8") as f: text = f.read() finde...
29.108108
99
0.623027
import os, sys import glob import itertools import re def term_as_regex(term): term = term.replace("*", r"[\w\.]*") term = term.replace("?", r"[\w\.]") return term def find_matches(filepath, terms): with open(filepath, encoding="utf-8") as f: text = f.read() finder = re.com...
true
true
1c1e25aba85047d4715b11b1312dcd647cd3bc8f
924
py
Python
third_party/saltedge/test/test_consents_response.py
ltowarek/budget-supervisor
862a2d720aecd4ad2fded9c63bc839190ebbc77e
[ "MIT" ]
1
2022-03-01T10:28:31.000Z
2022-03-01T10:28:31.000Z
third_party/saltedge/test/test_consents_response.py
ltowarek/budget-supervisor
862a2d720aecd4ad2fded9c63bc839190ebbc77e
[ "MIT" ]
75
2020-11-07T20:14:55.000Z
2021-10-05T15:08:22.000Z
third_party/saltedge/test/test_consents_response.py
ltowarek/budget-supervisor
862a2d720aecd4ad2fded9c63bc839190ebbc77e
[ "MIT" ]
null
null
null
# coding: utf-8 """ Salt Edge Account Information API API Reference for services # noqa: E501 OpenAPI spec version: 5.0.0 Contact: support@saltedge.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_cl...
23.1
90
0.714286
from __future__ import absolute_import import unittest import swagger_client from swagger_client.models.consents_response import ConsentsResponse from swagger_client.rest import ApiException class TestConsentsResponse(unittest.TestCase): def setUp(self): pass def tearDown(self): pass ...
true
true
1c1e25cd782e3eb2f784d66360104ce251294560
3,748
py
Python
alerta/webhooks/pagerduty.py
infernix/alerta
c6eac7b3449a2554a243ffad720cf7f4d372a5e9
[ "Apache-2.0" ]
null
null
null
alerta/webhooks/pagerduty.py
infernix/alerta
c6eac7b3449a2554a243ffad720cf7f4d372a5e9
[ "Apache-2.0" ]
null
null
null
alerta/webhooks/pagerduty.py
infernix/alerta
c6eac7b3449a2554a243ffad720cf7f4d372a5e9
[ "Apache-2.0" ]
null
null
null
from flask import g, jsonify, request from flask_cors import cross_origin from alerta.auth.decorators import permission from alerta.exceptions import ApiError from alerta.models.alert import Alert from . import webhooks def parse_pagerduty(message): try: incident_key = message['data']['incident']['inc...
37.858586
94
0.594984
from flask import g, jsonify, request from flask_cors import cross_origin from alerta.auth.decorators import permission from alerta.exceptions import ApiError from alerta.models.alert import Alert from . import webhooks def parse_pagerduty(message): try: incident_key = message['data']['incident']['inc...
true
true
1c1e263f2cf1bf33e6a4266163d244da4a3e6c2e
544
py
Python
oiio/1.8.5/package.py
UTS-AnimalLogicAcademy/open-source-rez-packages
8c2829dc4880b145662203a2a413609f3c59a44a
[ "MIT" ]
59
2018-01-17T07:17:28.000Z
2022-03-23T06:32:45.000Z
oiio/1.8.5/package.py
UTS-AnimalLogicAcademy/open-source-rez-packages
8c2829dc4880b145662203a2a413609f3c59a44a
[ "MIT" ]
null
null
null
oiio/1.8.5/package.py
UTS-AnimalLogicAcademy/open-source-rez-packages
8c2829dc4880b145662203a2a413609f3c59a44a
[ "MIT" ]
8
2018-01-30T15:33:02.000Z
2022-01-10T23:29:14.000Z
# -*- coding: utf-8 -*- name = 'oiio' version = '1.8.5.1' requires = [ 'openexr', 'ilmbase', 'ocio', 'ffmpeg' ] variants = [ ['platform-linux', 'arch-x86_64', 'boost-1.55'], ['platform-linux', 'arch-x86_64', 'boost-1.61'] ...
20.923077
67
0.505515
name = 'oiio' version = '1.8.5.1' requires = [ 'openexr', 'ilmbase', 'ocio', 'ffmpeg' ] variants = [ ['platform-linux', 'arch-x86_64', 'boost-1.55'], ['platform-linux', 'arch-x86_64', 'boost-1.61'] ] def commands(): ...
true
true
1c1e269eaf10b5a7bd6551abe7d27be87f12c663
42,019
py
Python
dev/Tools/Python/2.7.13/mac/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/io/matlab/tests/test_mio.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
8
2019-10-07T16:33:47.000Z
2020-12-07T03:59:58.000Z
dev/Tools/Python/2.7.13/mac/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/io/matlab/tests/test_mio.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
13
2020-01-28T22:20:14.000Z
2022-03-11T23:20:14.000Z
dev/Tools/Python/2.7.13/mac/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/io/matlab/tests/test_mio.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
5
2020-08-27T20:44:18.000Z
2021-08-21T22:54:11.000Z
# -*- coding: latin-1 -*- ''' Nose test generators Need function load / save / roundtrip tests ''' from __future__ import division, print_function, absolute_import import os from os.path import join as pjoin, dirname from glob import glob from io import BytesIO from tempfile import mkdtemp from scipy._lib.six impor...
34.106331
83
0.618506
from __future__ import division, print_function, absolute_import import os from os.path import join as pjoin, dirname from glob import glob from io import BytesIO from tempfile import mkdtemp from scipy._lib.six import u, text_type, string_types import warnings import shutil import gzip from numpy.testing import (...
true
true
1c1e27333ddfe3cf53ddec23eb051de774ecccbd
452
py
Python
Chapter02/example002.py
JeffreyAsuncion/Packt_DataStructuresAndAlgorithms
dfbe1c815fb8392a3d61cefe3803d8c5b740c616
[ "MIT" ]
null
null
null
Chapter02/example002.py
JeffreyAsuncion/Packt_DataStructuresAndAlgorithms
dfbe1c815fb8392a3d61cefe3803d8c5b740c616
[ "MIT" ]
null
null
null
Chapter02/example002.py
JeffreyAsuncion/Packt_DataStructuresAndAlgorithms
dfbe1c815fb8392a3d61cefe3803d8c5b740c616
[ "MIT" ]
null
null
null
a=7; b=5 e = b**a# The operator (**) calculates power print(e) print(a%b) f = 3 + 5j print(f, "is of type", type(f)) print(f.real) print(f*2) #multiplication print(f+3) #addition print(f-1) #subtraction print(bool(2)) print(bool(-2)) print(bool(0)) print("\n\n") See_boolean = (4 * 3 > 10) and (6 + 5 >= 11) print...
17.384615
46
0.650442
a=7; b=5 e = b**a print(e) print(a%b) f = 3 + 5j print(f, "is of type", type(f)) print(f.real) print(f*2) print(f+3) print(f-1) print(bool(2)) print(bool(-2)) print(bool(0)) print("\n\n") See_boolean = (4 * 3 > 10) and (6 + 5 >= 11) print(See_boolean) if (See_boolean): print("Boolean expression returned ...
true
true
1c1e27c36bac1df2a15a707326c144d655e90b2b
64,209
py
Python
rmgpy/rmg/main.py
nateharms/RMG-Py
80deaebddcbb14b7c41e232b67e1c973e0b18324
[ "MIT" ]
1
2017-12-18T18:43:22.000Z
2017-12-18T18:43:22.000Z
rmgpy/rmg/main.py
nateharms/RMG-Py
80deaebddcbb14b7c41e232b67e1c973e0b18324
[ "MIT" ]
null
null
null
rmgpy/rmg/main.py
nateharms/RMG-Py
80deaebddcbb14b7c41e232b67e1c973e0b18324
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2010 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of c...
50.202502
228
0.583859
Estimator if not self.outputDirectory: self.outputDirectory = os.path.dirname(path) if self.pressureDependence: self.pressureDependence.outputFile = self.outputDirectory self.reactionModel.pressureDependence = self.pressureDependence self...
false
true
1c1e28579f2d268aad513b72800c1c337aa3b4c9
78
py
Python
tests/test_simcore_sdk.py
mguidon/python-simcore-sdk
5a021bfb208c5cd46261cc4a24d70ce009147bf7
[ "MIT" ]
null
null
null
tests/test_simcore_sdk.py
mguidon/python-simcore-sdk
5a021bfb208c5cd46261cc4a24d70ce009147bf7
[ "MIT" ]
null
null
null
tests/test_simcore_sdk.py
mguidon/python-simcore-sdk
5a021bfb208c5cd46261cc4a24d70ce009147bf7
[ "MIT" ]
null
null
null
from simcore_sdk.foo import foo def test_main(): assert foo() == "foo"
11.142857
31
0.653846
from simcore_sdk.foo import foo def test_main(): assert foo() == "foo"
true
true
1c1e2a5118bd4bacab801c14c7f5e651710c97bd
978
py
Python
analysis/scripts/run_jelly.py
mhrvol/genomescope
b2077a5ab0992883edb0273e322ef3234d1717e1
[ "Apache-2.0" ]
null
null
null
analysis/scripts/run_jelly.py
mhrvol/genomescope
b2077a5ab0992883edb0273e322ef3234d1717e1
[ "Apache-2.0" ]
null
null
null
analysis/scripts/run_jelly.py
mhrvol/genomescope
b2077a5ab0992883edb0273e322ef3234d1717e1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2 import os import os.path import sys illuminafile = sys.argv[1] k=int(sys.argv[2]) limit=1000000 histfilename = illuminafile+sys.argv[2]+".hist" outputname = illuminafile+sys.argv[2]+"_output" mergename = illuminafile+sys.argv[2]+"_merge" os.system("jellyfish count -m %s -o %s -c 3 -C -s 10000000000...
39.12
102
0.703476
import os import os.path import sys illuminafile = sys.argv[1] k=int(sys.argv[2]) limit=1000000 histfilename = illuminafile+sys.argv[2]+".hist" outputname = illuminafile+sys.argv[2]+"_output" mergename = illuminafile+sys.argv[2]+"_merge" os.system("jellyfish count -m %s -o %s -c 3 -C -s 10000000000 -t 15 %s" %(k, ou...
false
true
1c1e2ad6b521316bc5ed27fd6531eea06b4a255b
728
py
Python
pyt-ping/pytping/configyaml.py
francois-le-ko4la/sandbox
3d451f32048e282d64c2bec9a644500e271dc21d
[ "DOC" ]
null
null
null
pyt-ping/pytping/configyaml.py
francois-le-ko4la/sandbox
3d451f32048e282d64c2bec9a644500e271dc21d
[ "DOC" ]
null
null
null
pyt-ping/pytping/configyaml.py
francois-le-ko4la/sandbox
3d451f32048e282d64c2bec9a644500e271dc21d
[ "DOC" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ mlk = ConfigYAML("./onfig.yml") print(mlk.config) """ import pathlib import yaml class ConfigYAML(object): def __init__(self, filename): self.filename = filename @property def filename(self): return self.__filename @filename.setter ...
21.411765
67
0.582418
import pathlib import yaml class ConfigYAML(object): def __init__(self, filename): self.filename = filename @property def filename(self): return self.__filename @filename.setter def filename(self, filename): if pathlib.Path(filename).exists(): self.__filena...
true
true
1c1e2c3894bffafd0bc1b80b7768019a561cc205
91
py
Python
src/python/News/apiKeys.py
loadedjd/Capstone-Server
c2e52c941303a2dc06578255cc156b31e37aa18d
[ "MIT" ]
null
null
null
src/python/News/apiKeys.py
loadedjd/Capstone-Server
c2e52c941303a2dc06578255cc156b31e37aa18d
[ "MIT" ]
null
null
null
src/python/News/apiKeys.py
loadedjd/Capstone-Server
c2e52c941303a2dc06578255cc156b31e37aa18d
[ "MIT" ]
null
null
null
# 500 queries a month Init = {"WatsonKey": "8clWpqlyel8YTOaE4L1dMOef-sfOsHwO04o-H9RoPFz1"}
30.333333
68
0.78022
Init = {"WatsonKey": "8clWpqlyel8YTOaE4L1dMOef-sfOsHwO04o-H9RoPFz1"}
true
true
1c1e2caac6b57a234958e3f750dada6a768e7020
5,186
py
Python
monotherapy/monotherapy.py
n1labs/IDentif.AI
dd69e2913c3a8e58e1c09fc0abd9e5c7cac5340a
[ "Apache-2.0" ]
null
null
null
monotherapy/monotherapy.py
n1labs/IDentif.AI
dd69e2913c3a8e58e1c09fc0abd9e5c7cac5340a
[ "Apache-2.0" ]
null
null
null
monotherapy/monotherapy.py
n1labs/IDentif.AI
dd69e2913c3a8e58e1c09fc0abd9e5c7cac5340a
[ "Apache-2.0" ]
null
null
null
import pandas as pd from openpyxl import load_workbook import numpy as np import logging def get_raw_data(file_name, sheet_name): df = pd.read_excel(file_name, sheet_name=sheet_name).astype(float) return df def get_control(df, dmso, extra_str): if dmso: if 'tox' in extra_str: ...
35.520548
101
0.56344
import pandas as pd from openpyxl import load_workbook import numpy as np import logging def get_raw_data(file_name, sheet_name): df = pd.read_excel(file_name, sheet_name=sheet_name).astype(float) return df def get_control(df, dmso, extra_str): if dmso: if 'tox' in extra_str: ...
true
true
1c1e2d40f515bdc4219a707fd3c10ed40901ceee
42
py
Python
examples/toapi-pic/wsgi.py
davidthewatson/toapi
5f77ffa7a53692bcf9f14919a1aa435bf0152bd4
[ "Apache-2.0" ]
null
null
null
examples/toapi-pic/wsgi.py
davidthewatson/toapi
5f77ffa7a53692bcf9f14919a1aa435bf0152bd4
[ "Apache-2.0" ]
null
null
null
examples/toapi-pic/wsgi.py
davidthewatson/toapi
5f77ffa7a53692bcf9f14919a1aa435bf0152bd4
[ "Apache-2.0" ]
null
null
null
from app import api app = api.server.app
10.5
20
0.738095
from app import api app = api.server.app
true
true
1c1e2e85f2626b72688c78bd6d13bd0bd3479b17
4,869
py
Python
azure-kusto-ingest/azure/kusto/ingest/base_ingest_client.py
mitsuo0114/azure-kusto-python
77d89cbf87e764f8c1a7f24a4fbd5a6471124c8e
[ "MIT" ]
134
2018-05-11T07:09:30.000Z
2022-03-30T09:25:59.000Z
azure-kusto-ingest/azure/kusto/ingest/base_ingest_client.py
mitsuo0114/azure-kusto-python
77d89cbf87e764f8c1a7f24a4fbd5a6471124c8e
[ "MIT" ]
176
2018-05-07T20:33:34.000Z
2022-03-31T14:51:06.000Z
azure-kusto-ingest/azure/kusto/ingest/base_ingest_client.py
mitsuo0114/azure-kusto-python
77d89cbf87e764f8c1a7f24a4fbd5a6471124c8e
[ "MIT" ]
85
2018-04-16T08:53:22.000Z
2022-03-29T10:10:55.000Z
import os import tempfile import time import uuid from abc import ABCMeta, abstractmethod from copy import copy from enum import Enum from gzip import GzipFile from io import TextIOWrapper, BytesIO from typing import TYPE_CHECKING, Union, IO, AnyStr, Optional from azure.kusto.data.data_format import DataFormat from ....
36.335821
155
0.688848
import os import tempfile import time import uuid from abc import ABCMeta, abstractmethod from copy import copy from enum import Enum from gzip import GzipFile from io import TextIOWrapper, BytesIO from typing import TYPE_CHECKING, Union, IO, AnyStr, Optional from azure.kusto.data.data_format import DataFormat from ....
true
true
1c1e3094122cdcffb0158243354a672f9f621ed9
1,830
py
Python
tests/tests.py
khodeArman/jalaali-python
837d86a27ef797c96f3e5f72dad3a788c52e876f
[ "MIT" ]
23
2016-10-17T12:01:43.000Z
2022-03-24T22:26:26.000Z
tests/tests.py
khodeArman/jalaali-python
837d86a27ef797c96f3e5f72dad3a788c52e876f
[ "MIT" ]
2
2016-12-17T17:32:02.000Z
2016-12-31T17:38:03.000Z
tests/tests.py
khodeArman/jalaali-python
837d86a27ef797c96f3e5f72dad3a788c52e876f
[ "MIT" ]
8
2016-12-17T17:27:48.000Z
2021-12-03T00:09:27.000Z
from unittest import TestCase from jalaali import Jalaali class JalaaliTest(TestCase): def test_to_jalaali(self): self.assertEqual({'jy': 1367, 'jm': 11, 'jd': 8}, Jalaali.to_jalaali(1989, 1, 28)) self.assertEqual({'jy': 1394, 'jm': 7, 'jd': 18}, Jalaali.to_jalaali(2015, 10, 10)) self.ass...
49.459459
93
0.689071
from unittest import TestCase from jalaali import Jalaali class JalaaliTest(TestCase): def test_to_jalaali(self): self.assertEqual({'jy': 1367, 'jm': 11, 'jd': 8}, Jalaali.to_jalaali(1989, 1, 28)) self.assertEqual({'jy': 1394, 'jm': 7, 'jd': 18}, Jalaali.to_jalaali(2015, 10, 10)) self.ass...
true
true
1c1e31a6a6542badae27db9f0a5ed653f9db0447
2,276
py
Python
src/cipolla/wrapper_service.py
FraMecca/CipollaMod
d982fd0211b6895281d4fa7b99b80f4793ba2498
[ "Zlib" ]
1
2020-03-23T20:28:06.000Z
2020-03-23T20:28:06.000Z
src/cipolla/wrapper_service.py
FraMecca/CipollaMod
d982fd0211b6895281d4fa7b99b80f4793ba2498
[ "Zlib" ]
1
2022-02-05T16:59:53.000Z
2022-02-08T17:30:55.000Z
src/cipolla/wrapper_service.py
FraMecca/CipollaMod
d982fd0211b6895281d4fa7b99b80f4793ba2498
[ "Zlib" ]
null
null
null
import logging import os import shutil import sys from twisted.application.service import MultiService # type: ignore from cipolla.config_manager import * from cipolla.log import CipollaLogger from cipolla.options import Options logging.setLoggerClass(CipollaLogger) logger = logging.getLogger(__name__) import cipol...
31.178082
129
0.748243
import logging import os import shutil import sys from twisted.application.service import MultiService from cipolla.config_manager import * from cipolla.log import CipollaLogger from cipolla.options import Options logging.setLoggerClass(CipollaLogger) logger = logging.getLogger(__name__) import cipolla as cipolla_...
true
true
1c1e32ed42d28678fb06a02079da4281351baf11
49,470
py
Python
EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_core.py
michaelray/Iristyle-ChocolateyPackages
5051538253ff095af4b64d469137b23420f28be0
[ "MIT" ]
18
2015-01-14T13:36:47.000Z
2020-10-22T19:53:57.000Z
EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_core.py
michaelray/Iristyle-ChocolateyPackages
5051538253ff095af4b64d469137b23420f28be0
[ "MIT" ]
12
2015-04-13T13:56:14.000Z
2017-02-04T08:35:35.000Z
EthanBrown.SublimeText2.EditorPackages/tools/PackageCache/BracketHighlighter/bh_core.py
michaelray/Iristyle-ChocolateyPackages
5051538253ff095af4b64d469137b23420f28be0
[ "MIT" ]
30
2015-01-20T12:32:53.000Z
2019-01-26T12:39:02.000Z
from os.path import basename, exists, join, normpath import sublime import sublime_plugin from time import time, sleep import thread import ure from bh_plugin import BracketPlugin, BracketRegion, ImportModule from collections import namedtuple import traceback BH_MATCH_TYPE_NONE = 0 BH_MATCH_TYPE_SELECTION = 1 BH_MATC...
34.936441
135
0.577299
from os.path import basename, exists, join, normpath import sublime import sublime_plugin from time import time, sleep import thread import ure from bh_plugin import BracketPlugin, BracketRegion, ImportModule from collections import namedtuple import traceback BH_MATCH_TYPE_NONE = 0 BH_MATCH_TYPE_SELECTION = 1 BH_MATC...
false
true
1c1e3319ed1d83b02598606d8424df1bc82765b1
5,795
py
Python
excursion/utils.py
irinaespejo/excursion
c5a5c6d882b8dd1008fbabf1a3b81eaba382bef6
[ "Apache-2.0" ]
2
2021-07-09T13:19:06.000Z
2021-08-20T14:30:20.000Z
excursion/utils.py
irinaespejo/excursion
c5a5c6d882b8dd1008fbabf1a3b81eaba382bef6
[ "Apache-2.0" ]
null
null
null
excursion/utils.py
irinaespejo/excursion
c5a5c6d882b8dd1008fbabf1a3b81eaba382bef6
[ "Apache-2.0" ]
4
2020-11-02T10:35:02.000Z
2022-01-14T18:35:05.000Z
from scipy.stats import norm import numpy as np import torch import importlib import sys def cdf(value): return 0.5 * ( 1 + torch.erf((value - self.loc) * self.scale.reciprocal() / math.sqrt(2)) ) def load_example(example): testcase = None if example == "1Dtoyanalysis": testcase = imp...
35.121212
83
0.643486
from scipy.stats import norm import numpy as np import torch import importlib import sys def cdf(value): return 0.5 * ( 1 + torch.erf((value - self.loc) * self.scale.reciprocal() / math.sqrt(2)) ) def load_example(example): testcase = None if example == "1Dtoyanalysis": testcase = imp...
true
true
1c1e331a04543890db867c66034767be77a31ba9
676
py
Python
problems_0_99/problem_2/serialize.py
jedubz/daily-coding-problem
0cdda60eeb461913a245d06cbecc878fcf12d693
[ "MIT" ]
null
null
null
problems_0_99/problem_2/serialize.py
jedubz/daily-coding-problem
0cdda60eeb461913a245d06cbecc878fcf12d693
[ "MIT" ]
null
null
null
problems_0_99/problem_2/serialize.py
jedubz/daily-coding-problem
0cdda60eeb461913a245d06cbecc878fcf12d693
[ "MIT" ]
null
null
null
class Node: def __init__(self, val, left=None, right=None): self.val = val self.left = left self.right = right def serialize(root): if (root != None): result = root.val, serialize(root.left), serialize(root.right) return list(result) return None def deserialize(s): if...
21.806452
70
0.559172
class Node: def __init__(self, val, left=None, right=None): self.val = val self.left = left self.right = right def serialize(root): if (root != None): result = root.val, serialize(root.left), serialize(root.right) return list(result) return None def deserialize(s): if...
true
true
1c1e3346d7840879e0f6075d971c7083f0c9bfd3
2,878
py
Python
glancesync/glance/sync/store/location.py
BruceChiZhang/tricircle
8796babed2ebdd6398aa78076bcc69fcaf25b2e3
[ "Apache-2.0" ]
null
null
null
glancesync/glance/sync/store/location.py
BruceChiZhang/tricircle
8796babed2ebdd6398aa78076bcc69fcaf25b2e3
[ "Apache-2.0" ]
null
null
null
glancesync/glance/sync/store/location.py
BruceChiZhang/tricircle
8796babed2ebdd6398aa78076bcc69fcaf25b2e3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014 OpenStack Foundation. # 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...
29.979167
78
0.647325
import logging import urlparse from stevedore import extension LOG = logging.getLogger(__name__) class LocationCreator(object): def __init__(self): self.scheme = None def creator(self, **kwargs): pass class Location(object): def __init__(self, store_name, store_loc...
true
true
1c1e34757aaa83df5c8acb42fb1a3535ae336acf
342
py
Python
iptv_proxy/providers/streams4us/validations.py
sfanous/IPTVProxy
23047be01a229ef8f69ea6ca55185eae93adc56e
[ "MIT" ]
9
2018-11-02T02:51:50.000Z
2022-01-12T06:22:33.000Z
iptv_proxy/providers/streams4us/validations.py
sfanous/IPTVProxy
23047be01a229ef8f69ea6ca55185eae93adc56e
[ "MIT" ]
3
2019-05-11T21:28:32.000Z
2020-04-27T00:58:46.000Z
iptv_proxy/providers/streams4us/validations.py
sfanous/IPTVProxy
23047be01a229ef8f69ea6ca55185eae93adc56e
[ "MIT" ]
7
2019-01-03T20:31:30.000Z
2022-01-29T04:09:24.000Z
import logging from iptv_proxy.providers.streams4us.constants import Streams4UsConstants from iptv_proxy.providers.iptv_provider.validations import ProviderValidations logger = logging.getLogger(__name__) class Streams4UsValidations(ProviderValidations): __slots__ = [] _provider_name = Streams4UsConstants....
26.307692
78
0.839181
import logging from iptv_proxy.providers.streams4us.constants import Streams4UsConstants from iptv_proxy.providers.iptv_provider.validations import ProviderValidations logger = logging.getLogger(__name__) class Streams4UsValidations(ProviderValidations): __slots__ = [] _provider_name = Streams4UsConstants....
true
true
1c1e35af4feab9a3040dd62316815561800a653b
386
py
Python
packages/python/plotly/plotly/validators/table/_ids.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/table/_ids.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/table/_ids.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="table", **kwargs): super(IdsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type...
32.166667
73
0.663212
import _plotly_utils.basevalidators class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="table", **kwargs): super(IdsValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type...
true
true
1c1e37b825765c1366c93f39c82bd053132d4b9f
936
py
Python
school/urls/theme.py
Hrsn2861/pysat-server
72224bb0e6af8ef825eaf3259587698b5639b8a5
[ "MIT" ]
null
null
null
school/urls/theme.py
Hrsn2861/pysat-server
72224bb0e6af8ef825eaf3259587698b5639b8a5
[ "MIT" ]
7
2020-06-06T01:55:39.000Z
2022-02-10T11:46:31.000Z
school/urls/theme.py
Hrsnnnn/pysat-server
72224bb0e6af8ef825eaf3259587698b5639b8a5
[ "MIT" ]
null
null
null
"""pysat URL Configuration for School.Create """ from django.urls import path from utils.views import view_maker from utils.params import ParamType from utils.permission import ActionType from school.views import theme urlpatterns = [ path('create', view_maker(theme.create_theme, 'POST', [ ParamType.Scho...
29.25
59
0.696581
from django.urls import path from utils.views import view_maker from utils.params import ParamType from utils.permission import ActionType from school.views import theme urlpatterns = [ path('create', view_maker(theme.create_theme, 'POST', [ ParamType.SchoolIdWithDefault, ParamType.ThemeName, ...
true
true
1c1e38afb7afdf449ea9a935e4e855f0c211b310
270
py
Python
examples/mysite/apps/api/urls.py
koordinates/oauth2app
f8205e2146477224a666c03bf115ddf3ff7610ff
[ "MIT" ]
36
2015-03-23T03:43:16.000Z
2021-06-14T19:11:36.000Z
examples/mysite/apps/api/urls.py
koordinates/oauth2app
f8205e2146477224a666c03bf115ddf3ff7610ff
[ "MIT" ]
2
2016-01-19T11:07:34.000Z
2020-05-15T20:31:07.000Z
examples/mysite/apps/api/urls.py
koordinates/oauth2app
f8205e2146477224a666c03bf115ddf3ff7610ff
[ "MIT" ]
20
2015-01-15T03:29:48.000Z
2020-10-15T15:37:44.000Z
#-*- coding: utf-8 -*- from django.conf.urls.defaults import patterns, url urlpatterns = patterns('mysite.apps.api.views', (r'^date_joined/?$', 'date_joined'), (r'^last_login/?$', 'last_login'), (r'^email/?$', 'email') )
33.75
51
0.537037
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('mysite.apps.api.views', (r'^date_joined/?$', 'date_joined'), (r'^last_login/?$', 'last_login'), (r'^email/?$', 'email') )
true
true
1c1e38f8e5b015e7f34ea023e80f57d11c918f2c
6,969
py
Python
salt/modules/sysfs.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
19
2016-01-29T14:37:52.000Z
2022-03-30T18:08:01.000Z
salt/modules/sysfs.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
223
2016-03-02T16:39:41.000Z
2022-03-03T12:26:35.000Z
salt/modules/sysfs.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
64
2016-02-04T19:45:26.000Z
2021-12-15T02:02:31.000Z
# -*- coding: utf-8 -*- """ Module for interfacing with SysFS .. seealso:: https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt .. versionadded:: 2016.3.0 """ # Import Python libs from __future__ import absolute_import, print_function, unicode_literals import logging import os import stat # Import Salt lib...
26.907336
97
0.546276
from __future__ import absolute_import, print_function, unicode_literals import logging import os import stat import salt.utils.files import salt.utils.path import salt.utils.platform from salt.ext import six log = logging.getLogger(__name__) def __virtual__(): return salt.utils.platform.is_linux() def ...
true
true
1c1e390858b2a0f2cd8db4c457ef3c39978114e5
6,024
py
Python
gs_quant/api/gs/backtests.py
webclinic017/gs-quant
ebb8ee5e1d954ab362aa567293906ce51818cfa8
[ "Apache-2.0" ]
null
null
null
gs_quant/api/gs/backtests.py
webclinic017/gs-quant
ebb8ee5e1d954ab362aa567293906ce51818cfa8
[ "Apache-2.0" ]
null
null
null
gs_quant/api/gs/backtests.py
webclinic017/gs-quant
ebb8ee5e1d954ab362aa567293906ce51818cfa8
[ "Apache-2.0" ]
null
null
null
""" Copyright 2019 Goldman Sachs. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
47.809524
115
0.645252
import logging from urllib.parse import urlencode from gs_quant.session import GsSession from gs_quant.target.backtests import * from gs_quant.errors import MqValueError _logger = logging.getLogger(__name__) class GsBacktestApi: @classmethod def get_many_backtests(cls, limit: int...
true
true
1c1e390b558a42e8024822cbfc50e590d994ec6c
3,063
py
Python
Contents/scripts/sisidebar/startup.py
ShikouYamaue/SI-Side-Bar
dbeed77b99a11917067320492a2a6cc5d368d05c
[ "MIT" ]
47
2017-11-13T13:49:43.000Z
2021-04-10T06:03:53.000Z
Contents/scripts/sisidebar/startup.py
ShikouYamaue/SI-Side-Bar
dbeed77b99a11917067320492a2a6cc5d368d05c
[ "MIT" ]
9
2017-11-14T05:12:55.000Z
2021-05-12T07:06:33.000Z
Contents/scripts/sisidebar/startup.py
ShikouYamaue/SI-Side-Bar
dbeed77b99a11917067320492a2a6cc5d368d05c
[ "MIT" ]
11
2017-11-14T05:03:41.000Z
2021-05-13T23:17:01.000Z
# -*- coding: utf-8 -*- from textwrap import dedent import maya.cmds as cmds import maya.mel as mel import maya.utils from . import sisidebar_main from . import sisidebar_sub from . import qt def menu_setup(): #Maya_Windowが見つからない場合はスタートしない if not qt.get_maya_window(): return cmd = ''' ...
25.739496
90
0.583741
from textwrap import dedent import maya.cmds as cmds import maya.mel as mel import maya.utils from . import sisidebar_main from . import sisidebar_sub from . import qt def menu_setup(): if not qt.get_maya_window(): return cmd = ''' buildViewMenu MayaWindow|mainWindowMenu; setPare...
false
true
1c1e396ae6148855ed510fe96e187be049d4fc7a
2,703
py
Python
api/serializers.py
Iki-oops/FR_test
1fd8e9491c74fe8e943f109609c00623856ca3f0
[ "MIT" ]
null
null
null
api/serializers.py
Iki-oops/FR_test
1fd8e9491c74fe8e943f109609c00623856ca3f0
[ "MIT" ]
null
null
null
api/serializers.py
Iki-oops/FR_test
1fd8e9491c74fe8e943f109609c00623856ca3f0
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Answer, Poll, PollQuestion, Question, UserAnswer class QuestionSerializer(serializers.ModelSerializer): class Meta: model = Question fields = ('pk', 'text', 'type',) class PollSerializer(serializers.ModelSerializer): questions ...
32.566265
80
0.667777
from rest_framework import serializers from .models import Answer, Poll, PollQuestion, Question, UserAnswer class QuestionSerializer(serializers.ModelSerializer): class Meta: model = Question fields = ('pk', 'text', 'type',) class PollSerializer(serializers.ModelSerializer): questions ...
true
true
1c1e3c58dc002fd21671e3972b7736233370679d
650
py
Python
code/notebooks/python/demo_utils/demo_utils/new_hyper_params/satellite/none.py
ribes96/TFG
b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a9
[ "MIT" ]
null
null
null
code/notebooks/python/demo_utils/demo_utils/new_hyper_params/satellite/none.py
ribes96/TFG
b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a9
[ "MIT" ]
null
null
null
code/notebooks/python/demo_utils/demo_utils/new_hyper_params/satellite/none.py
ribes96/TFG
b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a9
[ "MIT" ]
null
null
null
def get_satellite_none_dic(): none_dic = {'dt': {'identity': {'min_impurity_decrease': 1e-06}, 'rff': {'min_impurity_decrease': 0.01, 'gamma': 0.001}, 'nystroem': {'min_impurity_decrease': 0.01, 'gamma': 0.001}}, 'logit': {'identity': {'C': 1000}, ...
54.166667
84
0.410769
def get_satellite_none_dic(): none_dic = {'dt': {'identity': {'min_impurity_decrease': 1e-06}, 'rff': {'min_impurity_decrease': 0.01, 'gamma': 0.001}, 'nystroem': {'min_impurity_decrease': 0.01, 'gamma': 0.001}}, 'logit': {'identity': {'C': 1000}, ...
true
true
1c1e3cdb2e13881bdd6f43388e1760d572472fce
1,358
py
Python
google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/image_segmentation.py
dizcology/python-aiplatform
1a135775966c8a2303ded529eba514dcf9db7205
[ "Apache-2.0" ]
2
2021-10-02T02:25:44.000Z
2021-11-17T10:35:01.000Z
google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/image_segmentation.py
pompipo/python-aiplatform
3612b05c62dfb46822cd2c1798fd47349dba33bc
[ "Apache-2.0" ]
1
2021-03-02T18:25:00.000Z
2021-03-02T18:25:00.000Z
google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/types/image_segmentation.py
pompipo/python-aiplatform
3612b05c62dfb46822cd2c1798fd47349dba33bc
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
33.95
74
0.722386
import proto __protobuf__ = proto.module( package="google.cloud.aiplatform.v1beta1.schema.predict.params", manifest={"ImageSegmentationPredictionParams",}, ) class ImageSegmentationPredictionParams(proto.Message): confidence_threshold = proto.Field(proto.FLOAT, number=1,) __all__ = t...
true
true
1c1e3d5f763da3e26c43400a27bef13b63ad06db
5,756
py
Python
game2048/zaixian2048.py
gnniaaa/2048-api
f8383d5173a40532965636fa1fc7026fdae194f0
[ "Apache-2.0" ]
null
null
null
game2048/zaixian2048.py
gnniaaa/2048-api
f8383d5173a40532965636fa1fc7026fdae194f0
[ "Apache-2.0" ]
null
null
null
game2048/zaixian2048.py
gnniaaa/2048-api
f8383d5173a40532965636fa1fc7026fdae194f0
[ "Apache-2.0" ]
null
null
null
import os from torch.autograd import Variable from RNN import RNN1 import torch import torch.nn as nn batch_size = 128 NUM_CLASSES = 4 # 分类数目 NUM_EPOCHS = 20 # 训练的迭代次数 import pandas as pd from game import Game from displays import Display from agents import ExpectiMaxAgent, MyAgent1 import numpy as np from sklearn.mo...
31.113514
105
0.568798
import os from torch.autograd import Variable from RNN import RNN1 import torch import torch.nn as nn batch_size = 128 NUM_CLASSES = 4 NUM_EPOCHS = 20 import pandas as pd from game import Game from displays import Display from agents import ExpectiMaxAgent, MyAgent1 import numpy as np from sklearn.model_selection i...
true
true
1c1e3de2cba7806d6128bc57811b9517d2ec66a2
20,386
py
Python
examples/B738_aerostructural.py
vrsub/openconcept
459aa24269cf54122ee4cfb3edf173c79c880be9
[ "MIT" ]
null
null
null
examples/B738_aerostructural.py
vrsub/openconcept
459aa24269cf54122ee4cfb3edf173c79c880be9
[ "MIT" ]
null
null
null
examples/B738_aerostructural.py
vrsub/openconcept
459aa24269cf54122ee4cfb3edf173c79c880be9
[ "MIT" ]
null
null
null
""" This work was the basis of the following paper. Please cite it if you use this for your own publication! @InProceedings{Adler2022a, author = {Eytan J. Adler and Joaquim R. R. A. Martins}, title = {Aerostructural wing design optimization considering full mission analysis}, booktitle = {AIAA...
55.699454
147
0.593692
from __future__ import division import sys import os import warnings import numpy as np sys.path.insert(0, os.getcwd()) import openmdao.api as om import openconcept.api as oc from openconcept.analysis.openaerostruct.aerostructural import OASAerostructDragPolar, OASAerostructDragPolarExact from examples.aircraft_data...
true
true
1c1e3efa7c6fd6090bea6255638b691d1682fe0c
123
py
Python
essay/apps.py
lukasy2/strona
7ccebfe0553f9fac06bf762d1028c9faf7d830c0
[ "MIT", "Unlicense" ]
null
null
null
essay/apps.py
lukasy2/strona
7ccebfe0553f9fac06bf762d1028c9faf7d830c0
[ "MIT", "Unlicense" ]
null
null
null
essay/apps.py
lukasy2/strona
7ccebfe0553f9fac06bf762d1028c9faf7d830c0
[ "MIT", "Unlicense" ]
null
null
null
from django.apps import AppConfig class essayConfig(AppConfig): name = 'essay' verbose_name = 'Pytania otwarte'
17.571429
37
0.723577
from django.apps import AppConfig class essayConfig(AppConfig): name = 'essay' verbose_name = 'Pytania otwarte'
true
true
1c1e40bbd58657c10f8886c41a0f03559c1a493e
118
py
Python
eth_challenge_base/utils/__init__.py
xhyumiracle/eth-challenge-base
5c9e72beb5995fdcaa0402b7227dc4c8c27df71b
[ "MIT" ]
48
2021-07-06T08:52:50.000Z
2022-03-31T09:27:57.000Z
eth_challenge_base/utils/__init__.py
chainflag/solidity-xinetd
dddd4b6742650973aed2353178d068b8ce12b341
[ "MIT" ]
4
2021-10-06T10:57:15.000Z
2022-03-11T16:49:29.000Z
eth_challenge_base/utils/__init__.py
chainflag/solidity-xinetd
dddd4b6742650973aed2353178d068b8ce12b341
[ "MIT" ]
7
2021-09-30T07:56:08.000Z
2022-01-22T13:48:04.000Z
from .eth import Account, Contract, web3 from .pow import Powser __all__ = ["Account", "Contract", "web3", "Powser"]
23.6
51
0.70339
from .eth import Account, Contract, web3 from .pow import Powser __all__ = ["Account", "Contract", "web3", "Powser"]
true
true
1c1e40ec59808b1a4f6663a09f7389096e34bf8c
4,867
py
Python
tensorflow/python/profiler/profile_context_test.py
jeffdaily/tensorflow-upstream
2ac94cf58dafd29ddeb086a913a130711ae6712e
[ "Apache-2.0" ]
1
2019-03-18T14:11:41.000Z
2019-03-18T14:11:41.000Z
tensorflow/python/profiler/profile_context_test.py
jeffdaily/tensorflow-upstream
2ac94cf58dafd29ddeb086a913a130711ae6712e
[ "Apache-2.0" ]
null
null
null
tensorflow/python/profiler/profile_context_test.py
jeffdaily/tensorflow-upstream
2ac94cf58dafd29ddeb086a913a130711ae6712e
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 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...
37.728682
81
0.679269
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from tensorflow.python.client import session from tensorflow.python.framework import ops from tensorflow.python.framework import test_util from tensorflow.python.ops import variables f...
true
true
1c1e419ad45afc4315b3b0141789e965cf538eef
8,476
py
Python
pdbtools/pdb_wc.py
andrewsb8/pdb-tools
2fecdebd7520505b68ab515c54fa7c128e7a8090
[ "Apache-2.0" ]
192
2015-07-25T02:31:09.000Z
2022-03-29T11:09:45.000Z
pdbtools/pdb_wc.py
andrewsb8/pdb-tools
2fecdebd7520505b68ab515c54fa7c128e7a8090
[ "Apache-2.0" ]
112
2016-08-16T20:00:16.000Z
2022-03-25T00:44:16.000Z
pdbtools/pdb_wc.py
andrewsb8/pdb-tools
2fecdebd7520505b68ab515c54fa7c128e7a8090
[ "Apache-2.0" ]
55
2015-07-24T17:33:30.000Z
2022-03-17T17:36:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2018 João Pedro Rodrigues # # 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 # # Unl...
29.636364
79
0.56135
import os import sys __author__ = "Joao Rodrigues" __email__ = "j.p.g.l.m.rodrigues@gmail.com" USAGE = __doc__.format(__author__, __email__) def check_input(args): option = '' fh = sys.stdin if not len(args): if sys.stdin.isatty(): sys.stderr.wri...
true
true
1c1e43a99b4305c7a7071ff5d8190334ec6fafdd
2,499
py
Python
zfused_maya/zfused_maya/tool/animation/studiolibrary/packages/studioqt/actions/separatoraction.py
zhoulh0322/zfused_outsource_old
3d20c1493c3cffd742b10a7db6e0b1f3bb374af8
[ "Apache-2.0" ]
1
2022-01-14T11:40:35.000Z
2022-01-14T11:40:35.000Z
zfused_maya/zfused_maya/tool/animation/studiolibrary/packages/studioqt/actions/separatoraction.py
zhoulh0322/zfused_outsource_old
3d20c1493c3cffd742b10a7db6e0b1f3bb374af8
[ "Apache-2.0" ]
null
null
null
zfused_maya/zfused_maya/tool/animation/studiolibrary/packages/studioqt/actions/separatoraction.py
zhoulh0322/zfused_outsource_old
3d20c1493c3cffd742b10a7db6e0b1f3bb374af8
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 by Kurt Rathjen. All Rights Reserved. # # This library is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation, either # version 3 of the License, or (at your option) any later version. # This l...
25.762887
78
0.647459
from studioqt import QtGui from studioqt import QtCore from studioqt import QtWidgets __all__ = ["SeparatorAction"] class Line(QtWidgets.QFrame): pass class SeparatorWidgetAction(QtWidgets.QFrame): pass class SeparatorAction(QtWidgets.QWidgetAction): def __init__(self, label="", parent...
true
true
1c1e45f6015e2d11c83f9c81db8706d5c749abc3
664
py
Python
scorecards/migrations/0002_auto_20170411_1452.py
moshthepitt/probsc
9b8cab206bb1c41238e36bd77f5e0573df4d8e2d
[ "MIT" ]
null
null
null
scorecards/migrations/0002_auto_20170411_1452.py
moshthepitt/probsc
9b8cab206bb1c41238e36bd77f5e0573df4d8e2d
[ "MIT" ]
null
null
null
scorecards/migrations/0002_auto_20170411_1452.py
moshthepitt/probsc
9b8cab206bb1c41238e36bd77f5e0573df4d8e2d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-11 11:52 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scorecards', '0001_initial'), ] operations = [ migrations.AlterModelOptions...
26.56
118
0.603916
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scorecards', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='scorecard', options={'ordering': ['-yea...
true
true
1c1e47220a87061f504359bb6ba8dc58ce783f05
6,487
py
Python
env/lib/python3.9/site-packages/ansible/modules/cloud/google/_gcp_spanner_instance_facts.py
unbounce/aws-name-asg-instances
e0379442e3ce71bf66ba9b8975b2cc57a2c7648d
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
env/lib/python3.9/site-packages/ansible/modules/cloud/google/_gcp_spanner_instance_facts.py
unbounce/aws-name-asg-instances
e0379442e3ce71bf66ba9b8975b2cc57a2c7648d
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
env/lib/python3.9/site-packages/ansible/modules/cloud/google/_gcp_spanner_instance_facts.py
unbounce/aws-name-asg-instances
e0379442e3ce71bf66ba9b8975b2cc57a2c7648d
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
33.266667
100
0.623092
from __future__ import absolute_import, division, print_function __metaclass__ = type
true
true
1c1e47365a6e65fff472a689e3a80c36357e8424
5,332
py
Python
scraper.py
FredrikJansson/Website-Directory-Scraper
6ac084f8af12f70143dc1afc666f8c5b4d56f712
[ "MIT" ]
null
null
null
scraper.py
FredrikJansson/Website-Directory-Scraper
6ac084f8af12f70143dc1afc666f8c5b4d56f712
[ "MIT" ]
null
null
null
scraper.py
FredrikJansson/Website-Directory-Scraper
6ac084f8af12f70143dc1afc666f8c5b4d56f712
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ###### Includes import requests import sys import re import os from pathlib import Path class Scraper: # Init check. def __init__(self, url, should_save): self.url = url self.should_save = should_save website_validity = self.__check_website() ...
36.272109
139
0.56114
import Path class Scraper: def __init__(self, url, should_save): self.url = url self.should_save = should_save website_validity = self.__check_website() if website_validity: raise Exception('Website is not valid.') self.__find_links() ...
true
true
1c1e47cd6f792c3c76ae27e880cce8da7f29f868
50,547
py
Python
salt/modules/cmdmod.py
ether42/salt
e6c9cc9a83f3db6c168d951ddedbf9e7b7b56b54
[ "Apache-2.0" ]
null
null
null
salt/modules/cmdmod.py
ether42/salt
e6c9cc9a83f3db6c168d951ddedbf9e7b7b56b54
[ "Apache-2.0" ]
null
null
null
salt/modules/cmdmod.py
ether42/salt
e6c9cc9a83f3db6c168d951ddedbf9e7b7b56b54
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' A module for shelling out Keep in mind that this module is insecure, in that it can give whomever has access to the master root execution access to all salt minions. ''' from __future__ import absolute_import # Import python libs import copy import time import functools import glob import ...
32.195541
121
0.541773
from __future__ import absolute_import import copy import time import functools import glob import logging import os import shutil import subprocess import sys import traceback import shlex from salt.utils import vt import salt.utils import salt.utils.timed_subprocess import salt.grains.extra from salt.ext.six imp...
true
true
1c1e48e439345d7fbb0effb385670672c38e0fd8
2,205
py
Python
scripts/t1_eval.py
victorbocharov/factRuEval-2016
ad5ce5d753cee8307c79b0c4978caeed05ba7d07
[ "MIT" ]
52
2016-01-13T16:54:14.000Z
2022-03-04T19:05:38.000Z
scripts/t1_eval.py
bond005/factRuEval-2016
3a1b4540b1025fa73118d0e065c526437b37df12
[ "MIT" ]
147
2016-01-13T21:18:30.000Z
2021-03-30T10:19:55.000Z
scripts/t1_eval.py
bond005/factRuEval-2016
3a1b4540b1025fa73118d0e065c526437b37df12
[ "MIT" ]
37
2015-12-18T10:36:58.000Z
2022-03-04T19:06:07.000Z
# Runs the evaluation of the task 1 response # Requires python 3 and numpy # Usage: # # <Python3 executable> t1_eval.py -s <std_dir> -t <test_dir> [-l] # -s [std_dir] - path to the standard files directory # -t [test_dir] - path to the response files directory # -l - if included,...
30.205479
89
0.509751

false
true
1c1e48e7372bbe8eed8c8debc46bf3e1cebdf6a9
53,808
py
Python
python/cudf/cudf/core/multiindex.py
ayushdg/cudf
2a82eca39149d474dc9ffb1cb95dcea4a58a78cf
[ "Apache-2.0" ]
null
null
null
python/cudf/cudf/core/multiindex.py
ayushdg/cudf
2a82eca39149d474dc9ffb1cb95dcea4a58a78cf
[ "Apache-2.0" ]
null
null
null
python/cudf/cudf/core/multiindex.py
ayushdg/cudf
2a82eca39149d474dc9ffb1cb95dcea4a58a78cf
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019-2020, NVIDIA CORPORATION. from __future__ import annotations import itertools import numbers import pickle import warnings from collections import OrderedDict from collections.abc import Sequence from typing import Any, List, Tuple, Union import cupy import numpy as np import pandas as pd from pa...
32.809756
79
0.523342
from __future__ import annotations import itertools import numbers import pickle import warnings from collections import OrderedDict from collections.abc import Sequence from typing import Any, List, Tuple, Union import cupy import numpy as np import pandas as pd from pandas._config import get_option import cudf fr...
true
true
1c1e49851eaa81f79a2af9926e6493622cb87aa6
4,548
py
Python
lib_pypy/_cffi_ssl/_cffi_src/openssl/callbacks.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
10
2018-12-18T18:04:28.000Z
2021-04-23T07:31:13.000Z
lib_pypy/_cffi_ssl/_cffi_src/openssl/callbacks.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
null
null
null
lib_pypy/_cffi_ssl/_cffi_src/openssl/callbacks.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
3
2019-06-22T14:16:57.000Z
2021-12-29T22:04:42.000Z
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import sys import cffi INCLUDES = """ #include <openssl/ssl.h> #include...
28.074074
79
0.6781
from __future__ import absolute_import, division, print_function import sys import cffi INCLUDES = """ #include <openssl/ssl.h> #include <openssl/x509.h> #include <openssl/x509_vfy.h> #include <openssl/crypto.h> """ TYPES = """ static const long Cryptography_STATIC_CALLBACKS; /* crypto.h * CRYPTO_set_locking_...
true
true
1c1e499c97a50f6d2c880e867eec65d133521045
3,715
py
Python
api/comments/tests.py
mitrandir-pl/instagram
d622bc5022fbea107ab632f40cc5c6dbbd8ce42a
[ "WTFPL" ]
2
2022-03-07T19:19:12.000Z
2022-03-29T08:26:41.000Z
api/comments/tests.py
mitrandir-pl/instagram
d622bc5022fbea107ab632f40cc5c6dbbd8ce42a
[ "WTFPL" ]
7
2022-03-04T12:12:21.000Z
2022-03-25T17:59:10.000Z
api/comments/tests.py
mitrandir-pl/instagram
d622bc5022fbea107ab632f40cc5c6dbbd8ce42a
[ "WTFPL" ]
2
2022-03-07T19:15:45.000Z
2022-03-22T17:43:04.000Z
from django.test import TestCase from .models import Post, User, Comment import json from rest_framework import status from django.test import TestCase, Client from .serializers import PostSerializer, CommentSerializer, SimpleCommentSerializer # initialize the APIClient app client = Client() class PostTest(TestCas...
39.521277
83
0.670794
from django.test import TestCase from .models import Post, User, Comment import json from rest_framework import status from django.test import TestCase, Client from .serializers import PostSerializer, CommentSerializer, SimpleCommentSerializer client = Client() class PostTest(TestCase): def setUp(self): ...
true
true
1c1e4c6b1184cb7dd56c5c27cd737a93e63f3875
958
py
Python
experiments/divergence/JS.py
gabrielhuang/TheNumericsOfGANs
d7208f40f36634add9aa7b2e3bf09b4b60c8b37f
[ "MIT" ]
46
2017-11-02T02:52:22.000Z
2021-12-18T17:41:23.000Z
experiments/divergence/JS.py
gabrielhuang/TheNumericsOfGANs
d7208f40f36634add9aa7b2e3bf09b4b60c8b37f
[ "MIT" ]
2
2017-10-31T14:35:30.000Z
2021-11-18T03:30:29.000Z
experiments/divergence/JS.py
gabrielhuang/TheNumericsOfGANs
d7208f40f36634add9aa7b2e3bf09b4b60c8b37f
[ "MIT" ]
13
2017-10-17T06:51:30.000Z
2020-03-05T03:43:23.000Z
import os from subprocess import call from os import path import sys # Executables executable = 'python' # Paths rootdir = '../..' scriptname = 'run.py' cwd = os.path.dirname(os.path.abspath(__file__)) outdir = os.path.join(cwd, 'out/JS') args = [ # Architecture '--image-size', '375', '--output-size', '32', '--c-dim...
20.826087
62
0.61691
import os from subprocess import call from os import path import sys executable = 'python' rootdir = '../..' scriptname = 'run.py' cwd = os.path.dirname(os.path.abspath(__file__)) outdir = os.path.join(cwd, 'out/JS') args = [ '--image-size', '375', '--output-size', '32', '--c-dim', '3', '--z-dim', '256', '--gf-di...
true
true
1c1e4da790e62f4dce72b36251d7270e0d7dbb00
1,828
py
Python
pytype/tests/test_six_overlay.py
adamcataldo/pytype
7163e85880b52d53d58044e53157e2a21988308e
[ "Apache-2.0" ]
2
2019-07-25T12:53:02.000Z
2019-08-18T16:26:16.000Z
pytype/tests/test_six_overlay.py
adamcataldo/pytype
7163e85880b52d53d58044e53157e2a21988308e
[ "Apache-2.0" ]
null
null
null
pytype/tests/test_six_overlay.py
adamcataldo/pytype
7163e85880b52d53d58044e53157e2a21988308e
[ "Apache-2.0" ]
null
null
null
"""Tests for methods in six_overlay.py.""" from pytype.tests import test_base class SixTests(test_base.TargetIndependentTest): """Tests for six and six_overlay.""" def test_six_moves_import(self): self.Check(""" import six def use_range(): for x in six.moves.range(1, 10): x ...
22.292683
63
0.541028
from pytype.tests import test_base class SixTests(test_base.TargetIndependentTest): def test_six_moves_import(self): self.Check(""" import six def use_range(): for x in six.moves.range(1, 10): x """) def test_add_metaclass(self): self.Check(""" import abc i...
true
true
1c1e4dc6bc8084e20840637da9f9bf815c57ffd1
19,315
py
Python
numpyro/contrib/control_flow/scan.py
ahoho/numpyro
64e94e346c51a6c0c1ba51aa7b608e73513f158f
[ "Apache-2.0" ]
null
null
null
numpyro/contrib/control_flow/scan.py
ahoho/numpyro
64e94e346c51a6c0c1ba51aa7b608e73513f158f
[ "Apache-2.0" ]
null
null
null
numpyro/contrib/control_flow/scan.py
ahoho/numpyro
64e94e346c51a6c0c1ba51aa7b608e73513f158f
[ "Apache-2.0" ]
null
null
null
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 from collections import OrderedDict from functools import partial from jax import device_put, lax, random, tree_flatten, tree_map, tree_multimap, tree_unflatten import jax.numpy as jnp from jax.tree_util import register_pytree_node_cl...
46.767554
116
0.606627
from collections import OrderedDict from functools import partial from jax import device_put, lax, random, tree_flatten, tree_map, tree_multimap, tree_unflatten import jax.numpy as jnp from jax.tree_util import register_pytree_node_class from numpyro import handlers from numpyro.primitives import _PYRO_STACK, Mess...
true
true
1c1e5018dbcb02615297062b1a438f7ff2181b45
3,432
py
Python
src/RPFramework/RPFrameworkThread.py
RogueProeliator/IndigoPlugins-RPFramework
c6c6c570f5fe3a4ae63a1f5fe5349ce97289e9b1
[ "MIT" ]
1
2016-10-01T00:54:46.000Z
2016-10-01T00:54:46.000Z
src/RPFramework/RPFrameworkThread.py
RogueProeliator/IndigoPlugins-RPFramework
c6c6c570f5fe3a4ae63a1f5fe5349ce97289e9b1
[ "MIT" ]
1
2022-01-18T22:24:01.000Z
2022-01-18T22:24:01.000Z
src/RPFramework/RPFrameworkThread.py
RogueProeliator/IndigoPlugins-RPFramework
c6c6c570f5fe3a4ae63a1f5fe5349ce97289e9b1
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- #///////////////////////////////////////////////////////////////////////////////////////// #///////////////////////////////////////////////////////////////////////////////////////// # RPFrameworkThread by RogueProeliator <adam.d.ashe@gmail.com> # Class for all RogueProeli...
48.338028
96
0.433275
# exception in the thread #///////////////////////////////////////////////////////////////////////////////////////// #///////////////////////////////////////////////////////////////////////////////////////// import ctypes import inspect import threading #/////////////////////////////////////////////////////////...
true
true
1c1e503842e5df3716e020fd03f0be55998f1720
2,399
py
Python
repo/script.module.urlresolver/lib/urlresolver/plugins/videohut.py
Hades01/Addons
710da97ac850197498a3cd64be1811c593610add
[ "Apache-2.0" ]
null
null
null
repo/script.module.urlresolver/lib/urlresolver/plugins/videohut.py
Hades01/Addons
710da97ac850197498a3cd64be1811c593610add
[ "Apache-2.0" ]
null
null
null
repo/script.module.urlresolver/lib/urlresolver/plugins/videohut.py
Hades01/Addons
710da97ac850197498a3cd64be1811c593610add
[ "Apache-2.0" ]
null
null
null
""" urlresolver XBMC Addon Copyright (C) 2011 t0mm0 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
34.271429
104
0.611922
import re import urllib from urlresolver import common from urlresolver.resolver import UrlResolver, ResolverError class VideoHutResolver(UrlResolver): name = "videohut.to" domains = ["videohut.to"] pattern = '(?://|\.)(videohut\.to)/(?:v\/|embed.php\?id=)([0-9a-z]+)' def __init__(self): self...
true
true
1c1e5197a1858a0daad578a542016df37f05654e
3,056
py
Python
PYSEQM/test/test5.py
roehr-lab/SFast-Singlet-Fission-adiabatic-basis-screening
dfda08400bb1328ce6cd45ac6b1dd3e7f9d7d4a6
[ "MIT" ]
null
null
null
PYSEQM/test/test5.py
roehr-lab/SFast-Singlet-Fission-adiabatic-basis-screening
dfda08400bb1328ce6cd45ac6b1dd3e7f9d7d4a6
[ "MIT" ]
null
null
null
PYSEQM/test/test5.py
roehr-lab/SFast-Singlet-Fission-adiabatic-basis-screening
dfda08400bb1328ce6cd45ac6b1dd3e7f9d7d4a6
[ "MIT" ]
null
null
null
import torch from seqm.seqm_functions.constants import Constants from seqm.seqm_functions.parameters import params from seqm.basics import Parser, Hamiltonian, Pack_Parameters, Energy,Force #check computing force torch.set_default_dtype(torch.float64) if torch.cuda.is_available(): device = torch.device('cuda') ...
33.217391
121
0.593259
import torch from seqm.seqm_functions.constants import Constants from seqm.seqm_functions.parameters import params from seqm.basics import Parser, Hamiltonian, Pack_Parameters, Energy,Force torch.set_default_dtype(torch.float64) if torch.cuda.is_available(): device = torch.device('cuda') else: device = tor...
true
true
1c1e5253d1d730ef296d7c63a6789a515fefd248
1,116
py
Python
blog/ctx.py
sonikarichamodur/website
5f4be6325675c17870ccf6f78757047151dbf3dd
[ "Apache-2.0" ]
null
null
null
blog/ctx.py
sonikarichamodur/website
5f4be6325675c17870ccf6f78757047151dbf3dd
[ "Apache-2.0" ]
36
2019-02-01T09:13:24.000Z
2021-06-09T19:00:40.000Z
blog/ctx.py
sonikarichamodur/website
5f4be6325675c17870ccf6f78757047151dbf3dd
[ "Apache-2.0" ]
1
2021-12-11T02:45:28.000Z
2021-12-11T02:45:28.000Z
from django.conf import settings from .models.nav import Nav from .models.maintext import MainText from .models.meeting import Meeting from django.utils import timezone from django.db.models import Q, Count def heroku_info(request): return { 'HEROKU_RELEASE_VERSION': settings.HEROKU_RELEASE_VERSION, ...
34.875
97
0.701613
from django.conf import settings from .models.nav import Nav from .models.maintext import MainText from .models.meeting import Meeting from django.utils import timezone from django.db.models import Q, Count def heroku_info(request): return { 'HEROKU_RELEASE_VERSION': settings.HEROKU_RELEASE_VERSION, ...
true
true
1c1e52f6f9c0851ea6d985f8e831d38e74415e76
599
py
Python
home/urls.py
abdulshak1999/notes
8aad053dd7be4a982a328fa5291cf0cbbb1c1419
[ "Unlicense" ]
2
2021-01-19T13:27:12.000Z
2021-03-20T14:14:19.000Z
home/urls.py
abdulshak1999/notes
8aad053dd7be4a982a328fa5291cf0cbbb1c1419
[ "Unlicense" ]
null
null
null
home/urls.py
abdulshak1999/notes
8aad053dd7be4a982a328fa5291cf0cbbb1c1419
[ "Unlicense" ]
1
2021-01-18T09:31:22.000Z
2021-01-18T09:31:22.000Z
from django.urls import path, include from home import views urlpatterns = [ path('', views.home, name='home'), path('notes/', views.NoteList.as_view(), name='notes'), path('notes/detail/<slug:slug>/', views.NoteDetail.as_view(), name='note-detail'), path('notes/create/', views.CreateNote.as_view(), n...
46.076923
86
0.679466
from django.urls import path, include from home import views urlpatterns = [ path('', views.home, name='home'), path('notes/', views.NoteList.as_view(), name='notes'), path('notes/detail/<slug:slug>/', views.NoteDetail.as_view(), name='note-detail'), path('notes/create/', views.CreateNote.as_view(), n...
true
true