hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
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
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
7c95189e29221df76384eca468cfdaea3f4e1f18
379
py
Python
sonicPiTest.py
YMLkris/PiCamp9-11_2019
f7962cfc835de954d94f75a80a62d9871d858f20
[ "MIT" ]
null
null
null
sonicPiTest.py
YMLkris/PiCamp9-11_2019
f7962cfc835de954d94f75a80a62d9871d858f20
[ "MIT" ]
null
null
null
sonicPiTest.py
YMLkris/PiCamp9-11_2019
f7962cfc835de954d94f75a80a62d9871d858f20
[ "MIT" ]
null
null
null
from time import sleep from blinkt import * from pythonosc import osc_message_builder from pythonosc import udp_client sender = udp_client.SimpleUDPClient('127.0.0.1', 4559) set_all(255,0,0) show() while True: sender.send_message('/play_this', 60) sleep(.1) set_brightness(1) for i in range(5): ...
22.294118
54
0.680739
from time import sleep from blinkt import * from pythonosc import osc_message_builder from pythonosc import udp_client sender = udp_client.SimpleUDPClient('127.0.0.1', 4559) set_all(255,0,0) show() while True: sender.send_message('/play_this', 60) sleep(.1) set_brightness(1) for i in range(5): ...
0
0
0
ee0475e1a4461205fe0067a99777c052eb86bb64
597
py
Python
word_vectorizer/tests/unittest/models/test_modelDataLoader.py
RodSernaPerez/WordVectorizer
097b2ccfc284b39ad43f56047ee25e393b7525ec
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
word_vectorizer/tests/unittest/models/test_modelDataLoader.py
RodSernaPerez/WordVectorizer
097b2ccfc284b39ad43f56047ee25e393b7525ec
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
word_vectorizer/tests/unittest/models/test_modelDataLoader.py
RodSernaPerez/WordVectorizer
097b2ccfc284b39ad43f56047ee25e393b7525ec
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from unittest import TestCase from unittest.mock import patch, MagicMock from word_vectorizer.models.model_data import ModelData from word_vectorizer.models.model_data_loader import ModelDataLoader
37.3125
77
0.788945
from unittest import TestCase from unittest.mock import patch, MagicMock from word_vectorizer.models.model_data import ModelData from word_vectorizer.models.model_data_loader import ModelDataLoader class TestModelDataLoader(TestCase): @patch('word_vectorizer.models.model_data_loader.ModelData') def test_load...
268
106
23
46c175cd534b91567390ca88eaf4496d7223de95
4,447
py
Python
tommy2tommy/layers/attention_test.py
tommyreddad/tommy2tommy
c634bedbc8b498abd272eecb27ca8dd2d013cdc8
[ "MIT" ]
null
null
null
tommy2tommy/layers/attention_test.py
tommyreddad/tommy2tommy
c634bedbc8b498abd272eecb27ca8dd2d013cdc8
[ "MIT" ]
3
2021-08-25T15:10:22.000Z
2022-02-10T03:57:44.000Z
tommy2tommy/layers/attention_test.py
tommyreddad/tommy2tommy
c634bedbc8b498abd272eecb27ca8dd2d013cdc8
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np from tommy2tommy.layers import attention if __name__ == "__main__": tf.test.main()
31.316901
82
0.624466
import tensorflow as tf import numpy as np from tommy2tommy.layers import attention class TestSplitHeads(tf.test.TestCase): def test_output_shape(self): batch_size = 2 num_heads = 2 length = 10 d_model = 4 x = tf.ones([batch_size, length, d_model]) split_heads = at...
3,820
110
380
ceecd80a38b154f1a3da864e5a0a3ddfade61dc4
1,069
py
Python
data_processing.py
Jumas-Cola/performance_prediction
ca5c116e40c322647ad28d8080c283821d5749c2
[ "MIT" ]
null
null
null
data_processing.py
Jumas-Cola/performance_prediction
ca5c116e40c322647ad28d8080c283821d5749c2
[ "MIT" ]
null
null
null
data_processing.py
Jumas-Cola/performance_prediction
ca5c116e40c322647ad28d8080c283821d5749c2
[ "MIT" ]
null
null
null
import streamlit as st import math import itertools as it import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import plotly.express as px from dataframe import df def data_processing(): """ Страница предварительного анализа исходных данных. """ st.title('Предварительный анали...
24.295455
61
0.613658
import streamlit as st import math import itertools as it import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import plotly.express as px from dataframe import df def data_processing(): """ Страница предварительного анализа исходных данных. """ st.title('Предварительный анали...
0
0
0
40ccf855636e5a0b2d5ae4d85cb29e89f86246d7
4,210
py
Python
medperf/medperf/__main__.py
aristizabal95/medical
17e5317d7c33a90aadda19151bde18d751068350
[ "Apache-2.0" ]
null
null
null
medperf/medperf/__main__.py
aristizabal95/medical
17e5317d7c33a90aadda19151bde18d751068350
[ "Apache-2.0" ]
null
null
null
medperf/medperf/__main__.py
aristizabal95/medical
17e5317d7c33a90aadda19151bde18d751068350
[ "Apache-2.0" ]
null
null
null
import os import yaml import typer import requests from pathlib import Path from yaspin import yaspin import subprocess from .config import config from .server import Server from .utils import get_file_sha1, init_storage, cleanup, pretty_error app = typer.Typer() @app.command("prepare") if __name__ == "__main_...
30.071429
99
0.639905
import os import yaml import typer import requests from pathlib import Path from yaspin import yaspin import subprocess from .config import config from .server import Server from .utils import get_file_sha1, init_storage, cleanup, pretty_error app = typer.Typer() @app.command("prepare") def prepare( benchmark_u...
3,787
0
91
e2637792a627d9845ae272906732d12cf72ebc24
6,132
py
Python
python/genericIMDbQuery.py
JustgeekDE/imdb-visualizations
ebadb8b06b956f0a07a344370457926ad496434e
[ "Unlicense" ]
null
null
null
python/genericIMDbQuery.py
JustgeekDE/imdb-visualizations
ebadb8b06b956f0a07a344370457926ad496434e
[ "Unlicense" ]
null
null
null
python/genericIMDbQuery.py
JustgeekDE/imdb-visualizations
ebadb8b06b956f0a07a344370457926ad496434e
[ "Unlicense" ]
null
null
null
''' Created on 10.08.2014 @author: Philip Peter <philip.peter@justgeek.de> As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Philip Peter ''' class IMDbQuery(object): ''' A generic class for ...
25.234568
154
0.592792
''' Created on 10.08.2014 @author: Philip Peter <philip.peter@justgeek.de> As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Philip Peter ''' class IMDbQuery(object): ''' A generic class for ...
713
0
114
b8fc882ccb0358bc2efc1b0352858d6f59981c92
22
py
Python
sendgrid/version.py
gmt2027/sendgrid-python
ed0b3ff73dfcb3b8188199106b7730f7b1d69f16
[ "MIT" ]
null
null
null
sendgrid/version.py
gmt2027/sendgrid-python
ed0b3ff73dfcb3b8188199106b7730f7b1d69f16
[ "MIT" ]
null
null
null
sendgrid/version.py
gmt2027/sendgrid-python
ed0b3ff73dfcb3b8188199106b7730f7b1d69f16
[ "MIT" ]
null
null
null
__version__ = '6.9.2'
11
21
0.636364
__version__ = '6.9.2'
0
0
0
46acc25838978c067d6b699eadef832dfe7e6359
1,834
py
Python
power_meter.py
chucksspencer/analog_solar_power_meter
7a7c23a15a12809f0d59e3ce0ae5e0766f9f1323
[ "MIT" ]
null
null
null
power_meter.py
chucksspencer/analog_solar_power_meter
7a7c23a15a12809f0d59e3ce0ae5e0766f9f1323
[ "MIT" ]
null
null
null
power_meter.py
chucksspencer/analog_solar_power_meter
7a7c23a15a12809f0d59e3ce0ae5e0766f9f1323
[ "MIT" ]
null
null
null
import sys import time import configparser from datetime import datetime from volt_meter import VoltMeter from sense_client import SenseClient from solar_edge_client import SolarEdgeClient daily_power_meter = VoltMeter(25, .03, 2.35) power_consumed_meter = VoltMeter(23, .03, 2.25) solar_output_meter = VoltMeter(17, .0...
36.68
124
0.663577
import sys import time import configparser from datetime import datetime from volt_meter import VoltMeter from sense_client import SenseClient from solar_edge_client import SolarEdgeClient daily_power_meter = VoltMeter(25, .03, 2.35) power_consumed_meter = VoltMeter(23, .03, 2.25) solar_output_meter = VoltMeter(17, .0...
989
0
23
18765a4cc7e6b6938f24643ce107554a3c9be26f
8,319
py
Python
GmailWrapper_JE/venv/Lib/site-packages/google/api/system_parameter_pb2.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
GmailWrapper_JE/venv/Lib/site-packages/google/api/system_parameter_pb2.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
GmailWrapper_JE/venv/Lib/site-packages/google/api/system_parameter_pb2.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
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 applic...
33.011905
609
0.629162
# -*- 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 applic...
0
0
0
7eb344933a545c5f5f3bf08f1d6b6ea1f413c2fd
99
py
Python
packages/grid/apps/worker/src/main/core/infrastructure/providers/__init__.py
exityan/PySyft
35166c487a5be57f9ad28929ed88a8ba6bdd5aeb
[ "Apache-2.0" ]
425
2019-09-22T06:14:53.000Z
2022-03-30T02:17:34.000Z
packages/grid/apps/worker/src/main/core/infrastructure/providers/__init__.py
Metrix1010/PySyft
6477f64b63dc285059c3766deab3993653cead2e
[ "Apache-2.0" ]
352
2019-09-17T15:32:51.000Z
2022-03-12T01:07:35.000Z
packages/grid/apps/worker/src/main/core/infrastructure/providers/__init__.py
Metrix1010/PySyft
6477f64b63dc285059c3766deab3993653cead2e
[ "Apache-2.0" ]
208
2019-09-18T18:32:10.000Z
2022-03-24T01:10:11.000Z
# grid relative from .aws import * from .azure import * from .gcp import * from .provider import *
16.5
23
0.717172
# grid relative from .aws import * from .azure import * from .gcp import * from .provider import *
0
0
0
9563e83b08fb0ceb11989095403e1547ed9cee01
16,848
py
Python
src/scNet.py
BlackParure/AI-StarCraft-II
7feee4addff9881b3c735791f4a43421f813fcfc
[ "Apache-2.0" ]
7
2019-01-17T16:46:24.000Z
2020-09-09T06:35:26.000Z
src/scNet.py
BlackParure/AI-StarCraft-II
7feee4addff9881b3c735791f4a43421f813fcfc
[ "Apache-2.0" ]
null
null
null
src/scNet.py
BlackParure/AI-StarCraft-II
7feee4addff9881b3c735791f4a43421f813fcfc
[ "Apache-2.0" ]
null
null
null
from torch import nn from lib.layers.Replicate_unit import Replicate_unit1d from lib.layers.FC_LSTM_unit import FC_lstm_stacked from lib.layers.Conv_LSTM_unit import CONV_lstm_unit import random import torch.nn.functional as F import torch from pysc2.lib import actions import numpy as np if __name__ == "__main__": ...
41.6
125
0.64708
from torch import nn from lib.layers.Replicate_unit import Replicate_unit1d from lib.layers.FC_LSTM_unit import FC_lstm_stacked from lib.layers.Conv_LSTM_unit import CONV_lstm_unit import random import torch.nn.functional as F import torch from pysc2.lib import actions import numpy as np class scNet(nn.Module): de...
15,138
2
180
af43ecbeeaeaa41d86c5114fbd9c5107419c6047
8,483
py
Python
crazycar/algos_tf/sac.py
nutorbit/crazycar
f265c3f799525774c66529bb39ccc8380c2a3b2e
[ "MIT" ]
1
2020-03-25T10:16:50.000Z
2020-03-25T10:16:50.000Z
crazycar/algos_tf/sac.py
nutorbit/CrazyCar
f265c3f799525774c66529bb39ccc8380c2a3b2e
[ "MIT" ]
3
2021-06-08T21:12:21.000Z
2022-03-12T00:27:30.000Z
crazycar/algos_tf/sac.py
nutorbit/CrazyCar
f265c3f799525774c66529bb39ccc8380c2a3b2e
[ "MIT" ]
null
null
null
import tensorflow as tf import sonnet as snt from tensorflow_probability import distributions from crazycar.algos_tf.common import make_mlp from crazycar.algos_tf.base import BaseModel, BaseNetwork EPS = 1e-16 class Actor(BaseNetwork): """ Actor for DDPG Args: encoder: class from crazycar.enc...
29.660839
97
0.585288
import tensorflow as tf import sonnet as snt from tensorflow_probability import distributions from crazycar.algos_tf.common import make_mlp from crazycar.algos_tf.base import BaseModel, BaseNetwork EPS = 1e-16 class Actor(BaseNetwork): """ Actor for DDPG Args: encoder: class from crazycar.enc...
4,985
71
314
9bfbe31d5f7b32da83bfe57c1e8284230003d4f9
191
py
Python
baidupcs_py/common/random.py
EVAyo/BaiduPCS-Py
f329f3137842e8becedb854db9451f5c189e63ea
[ "MIT" ]
335
2021-01-13T14:03:13.000Z
2022-03-24T16:13:24.000Z
baidupcs_py/common/random.py
EVAyo/BaiduPCS-Py
f329f3137842e8becedb854db9451f5c189e63ea
[ "MIT" ]
78
2021-01-22T07:21:30.000Z
2022-03-11T02:17:21.000Z
baidupcs_py/common/random.py
EVAyo/BaiduPCS-Py
f329f3137842e8becedb854db9451f5c189e63ea
[ "MIT" ]
68
2021-01-22T09:35:24.000Z
2022-03-29T05:01:45.000Z
import random import os import struct from functools import partial MAX_U64 = 1 << 64 shuffle = partial( random.shuffle, random=lambda: struct.unpack("Q", os.urandom(8))[0] / MAX_U64 )
17.363636
81
0.722513
import random import os import struct from functools import partial MAX_U64 = 1 << 64 shuffle = partial( random.shuffle, random=lambda: struct.unpack("Q", os.urandom(8))[0] / MAX_U64 )
0
0
0
13ce79e7bc833caaa58f53c306073d5399820e19
4,042
py
Python
test/unit/app/dependencies/test_deps.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
test/unit/app/dependencies/test_deps.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
6
2021-11-11T20:57:49.000Z
2021-12-10T15:30:33.000Z
test/unit/app/dependencies/test_deps.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
import os from contextlib import contextmanager from shutil import rmtree from tempfile import mkdtemp from galaxy.dependencies import ConditionalDependencies AZURE_BLOB_TEST_CONFIG = """<object_store type="azure_blob"> blah... </object_store> """ AZURE_BLOB_TEST_CONFIG_YAML = """ type: azure_blob other_attribute...
26.768212
100
0.668976
import os from contextlib import contextmanager from shutil import rmtree from tempfile import mkdtemp from galaxy.dependencies import ConditionalDependencies AZURE_BLOB_TEST_CONFIG = """<object_store type="azure_blob"> blah... </object_store> """ AZURE_BLOB_TEST_CONFIG_YAML = """ type: azure_blob other_attribute...
3,022
-1
332
9b69e1bab544c0b203d401c1fb7bc5bdbe433e3f
2,973
py
Python
atest/testdata/keywords/type_conversion/KeywordDecoratorWithAliases.py
phil-davis/robotframework
4d4ce686cbe01e293bb86ea6ff34330e8c45fc43
[ "ECL-2.0", "Apache-2.0" ]
9
2020-04-22T08:30:52.000Z
2020-12-07T08:25:09.000Z
atest/testdata/keywords/type_conversion/KeywordDecoratorWithAliases.py
phil-davis/robotframework
4d4ce686cbe01e293bb86ea6ff34330e8c45fc43
[ "ECL-2.0", "Apache-2.0" ]
63
2020-03-04T17:31:39.000Z
2022-03-01T09:12:16.000Z
atest/testdata/keywords/type_conversion/KeywordDecoratorWithAliases.py
phil-davis/robotframework
4d4ce686cbe01e293bb86ea6ff34330e8c45fc43
[ "ECL-2.0", "Apache-2.0" ]
1
2020-11-23T03:44:31.000Z
2020-11-23T03:44:31.000Z
# Imports needed for evaluating expected result. from datetime import datetime, date, timedelta from decimal import Decimal from robot.api.deco import keyword from robot.utils import unicode @keyword(types=['Integer']) # type always is given as str @keyword(types=[u'INT']) # type g...
24.570248
78
0.707703
# Imports needed for evaluating expected result. from datetime import datetime, date, timedelta from decimal import Decimal from robot.api.deco import keyword from robot.utils import unicode @keyword(types=['Integer']) # type always is given as str def integer(argument, expected=None): _validate_t...
1,492
0
485
d63b957e2a710b67b94309a970cf17e93327f59d
935
py
Python
once-for-all-GM/distributed/simple_sync.py
skhu101/GM-NAS
cf2c8f8201690d929ec1d286c7f7cbc53e76012b
[ "MIT" ]
4
2022-03-17T09:06:42.000Z
2022-03-24T02:38:01.000Z
once-for-all-GM/distributed/simple_sync.py
skhu101/GM-NAS
cf2c8f8201690d929ec1d286c7f7cbc53e76012b
[ "MIT" ]
null
null
null
once-for-all-GM/distributed/simple_sync.py
skhu101/GM-NAS
cf2c8f8201690d929ec1d286c7f7cbc53e76012b
[ "MIT" ]
null
null
null
import torch from . import misc
31.166667
103
0.687701
import torch from . import misc def sync_state(network, src = 0): if misc.get_world_size() == 1: return tensor_list = list(network.state_dict().values()) if src == 'all': misc.all_reduce_mean(tensor_list) else: misc.broadcast(tensor_list, src) def sync_grad_mean(network): if misc...
809
0
92
90c547e5cbf832a0c59ac508a5d4621eb1ce17d8
525
py
Python
users/tests/test_endpoints.py
vanessa/pokebattle
3017ad226bc05cc06cb5eb34455c13d959be10ab
[ "MIT" ]
2
2018-03-16T15:33:31.000Z
2018-05-08T17:53:22.000Z
users/tests/test_endpoints.py
vanessa/pokebattle
3017ad226bc05cc06cb5eb34455c13d959be10ab
[ "MIT" ]
3
2018-05-02T18:38:51.000Z
2018-05-08T20:03:43.000Z
users/tests/test_endpoints.py
vanessa/pokebattle
3017ad226bc05cc06cb5eb34455c13d959be10ab
[ "MIT" ]
2
2018-03-16T02:32:20.000Z
2018-03-16T14:17:15.000Z
from django.urls import reverse from common.utils.tests import TestCaseUtils
32.8125
60
0.748571
from django.urls import reverse from common.utils.tests import TestCaseUtils class TestUserDetailsEndpoint(TestCaseUtils): def test_authenticated_user_access_their_own_info(self): view_url = reverse('api-users:user-details') response = self.auth_client.get(view_url) self.assertResponse200...
346
24
76
24776fc5a9f3669323d22924084771bc45406d73
628
py
Python
tests/cluster_profiles/test_cgems.py
Monia234/NCI-GwasQc
9e3ca52085c891e1d4d7972e5337c4a1888f992c
[ "MIT" ]
null
null
null
tests/cluster_profiles/test_cgems.py
Monia234/NCI-GwasQc
9e3ca52085c891e1d4d7972e5337c4a1888f992c
[ "MIT" ]
43
2021-03-02T04:10:01.000Z
2022-03-16T20:26:55.000Z
tests/cluster_profiles/test_cgems.py
Monia234/NCI-GwasQc
9e3ca52085c891e1d4d7972e5337c4a1888f992c
[ "MIT" ]
2
2021-03-02T12:27:00.000Z
2021-12-16T03:22:20.000Z
import os from pathlib import Path import pytest import snakemake @pytest.mark.skipif( os.environ.get("GITHUB_ACTIONS", "false") == "true", reason="Broken on GitHub Actions" )
23.259259
90
0.576433
import os from pathlib import Path import pytest import snakemake @pytest.mark.skipif( os.environ.get("GITHUB_ACTIONS", "false") == "true", reason="Broken on GitHub Actions" ) def test_cgems_submission_end_to_end(tmp_path, qsub): with pytest.raises(SystemExit) as exc: args = [ "-j", ...
423
0
22
f111eeff42c88d9c3ec0cc2fd6c6d2e7e54cbb73
3,381
py
Python
functions.py
mohammad-ali-barati/survey_stats
ccce97a665148014d28417ce864f642e9894c655
[ "MIT" ]
null
null
null
functions.py
mohammad-ali-barati/survey_stats
ccce97a665148014d28417ce864f642e9894c655
[ "MIT" ]
null
null
null
functions.py
mohammad-ali-barati/survey_stats
ccce97a665148014d28417ce864f642e9894c655
[ "MIT" ]
null
null
null
from typing import Union import numpy as np
30.1875
93
0.511387
from typing import Union import numpy as np def number_of_digits(n:int, decimals:float=0)->int: return len(str(int(n*10**decimals)/10**decimals)) def subsets(a_set:set)->set: if len(a_set) == 0: return [[]] else: s = subsets(a_set[:-1]) return s + [i + [a_set[-1]] for i in s] def ...
3,130
0
207
e70bac611bf0cb576fdd47ff1cffe53ad81bfa65
1,700
py
Python
python/course/leetcode/1~27/20. Valid Parentheses.py
TimVan1596/ACM-ICPC
07f7d728db1ecd09c5a3d0f05521930b14eb9883
[ "Apache-2.0" ]
1
2019-05-22T07:12:34.000Z
2019-05-22T07:12:34.000Z
python/course/leetcode/1~27/20. Valid Parentheses.py
TimVan1596/ACM-ICPC
07f7d728db1ecd09c5a3d0f05521930b14eb9883
[ "Apache-2.0" ]
3
2021-12-10T01:13:54.000Z
2021-12-14T21:18:42.000Z
python/course/leetcode/1~27/20. Valid Parentheses.py
TimVan1596/ACM-ICPC
07f7d728db1ecd09c5a3d0f05521930b14eb9883
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # @Time:2020/6/21 16:22 # @Author:TimVan # @File:20. Valid Parentheses.py # @Software:PyCharm # 20. Valid Parentheses.py # Given a string containing just the characters '(', ')', '{', '}', '[' and ']', # determine if the input string is valid. # An input string is valid if: # Open brackets must ...
22.972973
80
0.510588
# -*- coding:utf-8 -*- # @Time:2020/6/21 16:22 # @Author:TimVan # @File:20. Valid Parentheses.py # @Software:PyCharm # 20. Valid Parentheses.py # Given a string containing just the characters '(', ')', '{', '}', '[' and ']', # determine if the input string is valid. # An input string is valid if: # Open brackets must ...
851
-6
49
1b27ba5a8a409c01d0c82515c5f1919028edc5e7
563
py
Python
DS1302/LCD1602_clock/main.py
maysrp/pico_micropython
f9c27168fd48c769000aa6e4c8b96cbd0331dda0
[ "Apache-2.0" ]
31
2021-02-11T05:17:29.000Z
2022-03-29T10:51:00.000Z
DS1302/LCD1602_clock/main.py
tanjunkai2001/pico_micropython
f9c27168fd48c769000aa6e4c8b96cbd0331dda0
[ "Apache-2.0" ]
null
null
null
DS1302/LCD1602_clock/main.py
tanjunkai2001/pico_micropython
f9c27168fd48c769000aa6e4c8b96cbd0331dda0
[ "Apache-2.0" ]
11
2021-05-13T07:43:12.000Z
2022-03-01T23:44:11.000Z
import DS1302 from machine import I2C, Pin from esp8266_i2c_lcd import I2cLcd import time DEFAULT_I2C_ADDR = 0x27 i2c = I2C(0,sda=Pin(0),scl=Pin(1),freq=400000) lcd = I2cLcd(i2c, DEFAULT_I2C_ADDR, 2, 16) ds = DS1302.DS1302(Pin(2),Pin(3),Pin(4)) while True: d=ds.DateTime() date1=str(d[0])+"-"+str(d[1])+"-"+str...
25.590909
75
0.602131
import DS1302 from machine import I2C, Pin from esp8266_i2c_lcd import I2cLcd import time DEFAULT_I2C_ADDR = 0x27 i2c = I2C(0,sda=Pin(0),scl=Pin(1),freq=400000) lcd = I2cLcd(i2c, DEFAULT_I2C_ADDR, 2, 16) ds = DS1302.DS1302(Pin(2),Pin(3),Pin(4)) while True: d=ds.DateTime() date1=str(d[0])+"-"+str(d[1])+"-"+str...
0
0
0
82a44347e96ba5d94524251a6da1515e1e1868eb
2,729
py
Python
Recipes/Convert_Files_Into_JSON_And_CSV/JsonToCsvConverter.py
Lotame/DataStream_Cookbook
3ec7ded6bd1e3a59fa4d06bb76e81be9da9c97a6
[ "MIT" ]
1
2022-02-28T10:40:53.000Z
2022-02-28T10:40:53.000Z
Recipes/Convert_Files_Into_JSON_And_CSV/JsonToCsvConverter.py
Lotame/DataStream_Cookbook
3ec7ded6bd1e3a59fa4d06bb76e81be9da9c97a6
[ "MIT" ]
2
2021-01-08T17:51:10.000Z
2021-03-29T11:36:07.000Z
Recipes/Convert_Files_Into_JSON_And_CSV/JsonToCsvConverter.py
Lotame/DataStream_Cookbook
3ec7ded6bd1e3a59fa4d06bb76e81be9da9c97a6
[ "MIT" ]
3
2020-01-26T23:31:23.000Z
2022-02-18T19:29:30.000Z
#!/usr/bin/python # # Filename: # # JsonToCsvConverter.py # # # Basic Usage: # # python JsonToCsvConverter.py /directory/containing/datastream/json/files # # Utilities import sys, os, re, glob, json if __name__ == '__main__': sys.exit(main())
41.984615
118
0.502382
#!/usr/bin/python # # Filename: # # JsonToCsvConverter.py # # # Basic Usage: # # python JsonToCsvConverter.py /directory/containing/datastream/json/files # # Utilities import sys, os, re, glob, json def writeCsvHeader(csv_file=None): csv_file.write("id,type,region,country,client_id,behavior_id,timestamp...
2,398
0
69
adeb408fc1a89c2fd97c9e45ce7aacd642215c2a
996
py
Python
benchmarks/CS_mobicom09/test.py
cuhk-cse/CloudMonitor
09c40243019d5340508739353368dc1ccb24e908
[ "MIT" ]
null
null
null
benchmarks/CS_mobicom09/test.py
cuhk-cse/CloudMonitor
09c40243019d5340508739353368dc1ccb24e908
[ "MIT" ]
null
null
null
benchmarks/CS_mobicom09/test.py
cuhk-cse/CloudMonitor
09c40243019d5340508739353368dc1ccb24e908
[ "MIT" ]
null
null
null
from matplotlib.pyplot import plot, show, figure, title import matplotlib as plt import numpy as np from numpy import linalg as LA from scipy.fftpack import dct, idct, fft, ifft from scipy.sparse import coo_matrix from sklearn.linear_model import Lasso import sys, random Fs = 40e3 #Sample rate duration = 1./8 N_samps...
17.473684
89
0.687751
from matplotlib.pyplot import plot, show, figure, title import matplotlib as plt import numpy as np from numpy import linalg as LA from scipy.fftpack import dct, idct, fft, ifft from scipy.sparse import coo_matrix from sklearn.linear_model import Lasso import sys, random Fs = 40e3 #Sample rate duration = 1./8 N_samps...
0
0
0
c9af05c0ac18f8004ac1cec88752135ac9641f34
224
py
Python
scripts/portal/evantalk01.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
2
2020-08-25T06:55:19.000Z
2021-03-15T14:37:34.000Z
scripts/portal/evantalk01.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
null
null
null
scripts/portal/evantalk01.py
Snewmy/swordie
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
[ "MIT" ]
3
2020-08-25T06:55:25.000Z
2020-12-01T13:07:43.000Z
# Portal & Balloon Msgs for Evan Intro | Dream World: Dream Forest Entrance (900010000) # Author: Tiger # "What was that? I heard something!" sm.avatarOriented("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon01")
37.333333
87
0.776786
# Portal & Balloon Msgs for Evan Intro | Dream World: Dream Forest Entrance (900010000) # Author: Tiger # "What was that? I heard something!" sm.avatarOriented("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon01")
0
0
0
4e89ae040dacecacde89228fce8974f49769ad92
13,844
py
Python
service/test.py
khromiumos/chromiumos-chromite
a42a85481cdd9d635dc40a04585e427f89f3bb3f
[ "BSD-3-Clause" ]
null
null
null
service/test.py
khromiumos/chromiumos-chromite
a42a85481cdd9d635dc40a04585e427f89f3bb3f
[ "BSD-3-Clause" ]
2
2021-03-26T00:29:32.000Z
2021-04-30T21:29:33.000Z
service/test.py
khromiumos/chromiumos-chromite
a42a85481cdd9d635dc40a04585e427f89f3bb3f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2019 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Test service. Handles test related functionality. """ from __future__ import print_function import os import re import shuti...
33.520581
80
0.682895
# -*- coding: utf-8 -*- # Copyright 2019 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Test service. Handles test related functionality. """ from __future__ import print_function import os import re import shuti...
61
0
24
3a8e9c42bbbe8ae41e0eb64f6943cab9711b4272
983
py
Python
shop_app/urls.py
syz247179876/e_mall
f94e39e091e098242342f532ae371b8ff127542f
[ "Apache-2.0" ]
7
2021-04-10T13:20:56.000Z
2022-03-29T15:00:29.000Z
shop_app/urls.py
syz247179876/E_mall
f94e39e091e098242342f532ae371b8ff127542f
[ "Apache-2.0" ]
9
2021-05-11T03:53:31.000Z
2022-03-12T00:58:03.000Z
shop_app/urls.py
syz247179876/E_mall
f94e39e091e098242342f532ae371b8ff127542f
[ "Apache-2.0" ]
2
2020-11-24T08:59:22.000Z
2020-11-24T14:10:59.000Z
from django.conf import settings from django.urls import path from rest_framework.routers import DefaultRouter from shop_app.apis.carousel_api import CarouselApiView from shop_app.apis.display_api import CommodityCardDisplay, CommodityDetailDisplay, CommodityCategoryDisplay app_name = 'shop_app' urlpatterns = [ ...
42.73913
112
0.786368
from django.conf import settings from django.urls import path from rest_framework.routers import DefaultRouter from shop_app.apis.carousel_api import CarouselApiView from shop_app.apis.display_api import CommodityCardDisplay, CommodityDetailDisplay, CommodityCategoryDisplay app_name = 'shop_app' urlpatterns = [ ...
0
0
0
5a8d52fdeb95a6343f239fa3b69f0daa3368354c
103
py
Python
config.py
mkrum/das
76559ffa3055d718590e9c457675cdf9a885f656
[ "MIT" ]
null
null
null
config.py
mkrum/das
76559ffa3055d718590e9c457675cdf9a885f656
[ "MIT" ]
null
null
null
config.py
mkrum/das
76559ffa3055d718590e9c457675cdf9a885f656
[ "MIT" ]
null
null
null
import model import data from yamlargs import expose_module expose_module(model) expose_module(data)
12.875
34
0.84466
import model import data from yamlargs import expose_module expose_module(model) expose_module(data)
0
0
0
f72f2ae2da1a8824ea37a9d9fc536ef3fce7fc12
1,481
py
Python
tests/test.py
icetana-james/python-onvif-zeep
9947a3c203037857fbc04c9fafabc722e3436a13
[ "MIT" ]
null
null
null
tests/test.py
icetana-james/python-onvif-zeep
9947a3c203037857fbc04c9fafabc722e3436a13
[ "MIT" ]
null
null
null
tests/test.py
icetana-james/python-onvif-zeep
9947a3c203037857fbc04c9fafabc722e3436a13
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*-coding=utf-8 from __future__ import print_function, division import unittest from onvif import ONVIFCamera, ONVIFError CAM_HOST = '10.1.3.10' CAM_PORT = 80 CAM_USER = 'root' CAM_PASS = 'password' DEBUG = False if __name__ == '__main__': unittest.main()
26.927273
69
0.627279
#!/usr/bin/python # -*-coding=utf-8 from __future__ import print_function, division import unittest from onvif import ONVIFCamera, ONVIFError CAM_HOST = '10.1.3.10' CAM_PORT = 80 CAM_USER = 'root' CAM_PASS = 'password' DEBUG = False def log(ret): if DEBUG: print(ret) class TestDevice(unittest.TestCas...
77
1,071
46
c703b16b8e51448f4e5f56de4047c70ac76ccd2a
1,342
py
Python
PhysicsTools/PatExamples/bin/PatBasicFWLiteJetAnalyzer_Selector_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
PhysicsTools/PatExamples/bin/PatBasicFWLiteJetAnalyzer_Selector_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
PhysicsTools/PatExamples/bin/PatBasicFWLiteJetAnalyzer_Selector_cfg.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms process = cms.Process("FWLitePlots") #input stuff for Run/Lumi selection with the "JSON"-formatted files from the PVT group import FWCore.PythonUtilities.LumiList as LumiList # setup process process = cms.Process("FWLitePlots") # get JSON file correctly parced JSONfile = 'D...
26.313725
86
0.735469
import FWCore.ParameterSet.Config as cms process = cms.Process("FWLitePlots") #input stuff for Run/Lumi selection with the "JSON"-formatted files from the PVT group import FWCore.PythonUtilities.LumiList as LumiList # setup process process = cms.Process("FWLitePlots") # get JSON file correctly parced JSONfile = 'D...
0
0
0
70d8487d11189ecb812601fb8749c8cac7076293
426
py
Python
core/management/commands/flushcontenttypes.py
j3ygh/ctdb
3c4b90c5265125fc37aa9ac569b7f39ffd5b13c9
[ "MIT" ]
2
2020-09-03T00:09:50.000Z
2021-12-02T07:39:55.000Z
core/management/commands/flushcontenttypes.py
j3ygithub/django-delete-migrations
89cac3787719cdb971bea3abf31967bf1992d543
[ "MIT" ]
null
null
null
core/management/commands/flushcontenttypes.py
j3ygithub/django-delete-migrations
89cac3787719cdb971bea3abf31967bf1992d543
[ "MIT" ]
1
2022-03-14T06:52:48.000Z
2022-03-14T06:52:48.000Z
from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand
30.428571
102
0.711268
from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand class Command(BaseCommand): help = ( "Delete `ContentType` objects from database, including those related to it like `Permission`." ) def handle(self, *app_labels, **options): co...
136
155
23
a1cc77e635f020343b387d6c8813e4e191853739
449
py
Python
tests/test_2_tesseract.py
JoelStansbury/ipypdf
624907dce2ca2b5c8d1af3562eb8cd11e277a86d
[ "MIT" ]
null
null
null
tests/test_2_tesseract.py
JoelStansbury/ipypdf
624907dce2ca2b5c8d1af3562eb8cd11e277a86d
[ "MIT" ]
2
2022-02-09T18:09:25.000Z
2022-03-02T20:39:10.000Z
tests/test_2_tesseract.py
JoelStansbury/ipypdf
624907dce2ca2b5c8d1af3562eb8cd11e277a86d
[ "MIT" ]
null
null
null
from ipypdf.widgets.node_tools import AutoTools def test_parse_text(app, pdf_nodes): """ Check that the ocr model runs and adds content properly """ doc_node = pdf_nodes[0] app.tree.remove_children(doc_node) # clear any previously defined nodes AutoTools(doc_node).extract_text() assert l...
28.0625
86
0.721604
from ipypdf.widgets.node_tools import AutoTools def test_parse_text(app, pdf_nodes): """ Check that the ocr model runs and adds content properly """ doc_node = pdf_nodes[0] app.tree.remove_children(doc_node) # clear any previously defined nodes AutoTools(doc_node).extract_text() assert l...
0
0
0
67ab2f18f9b97d3c4e25877cd077c99da77ec069
10,242
py
Python
plugin.video.yatp/site-packages/hachoir_parser/program/dex.py
mesabib/kodi.yatp
d874df43047b5b58f84cb3760fc891d9a133a69f
[ "CNRI-Python" ]
194
2016-12-23T19:11:09.000Z
2020-12-07T04:04:10.000Z
lib/hachoir_parser/program/dex.py
nosmokingbandit/Autolycus
37b376ba2fc27aa7e98f0071b457ebfbc605d4ab
[ "ECL-2.0", "Apache-2.0" ]
236
2016-11-20T07:56:15.000Z
2017-04-12T12:10:00.000Z
lib/hachoir_parser/program/dex.py
nosmokingbandit/Autolycus
37b376ba2fc27aa7e98f0071b457ebfbc605d4ab
[ "ECL-2.0", "Apache-2.0" ]
51
2016-11-20T08:05:33.000Z
2021-01-26T13:22:40.000Z
''' Dalvik Executable (dex) parser. References: - http://www.dalvikvm.com/ - http://code.google.com/p/androguard/source/browse/core/bytecodes/dvm.py - http://androguard.googlecode.com/hg/specs/dalvik/dex-format.html Author: Robert Xiao Creation Date: May 29, 2011 ''' from hachoir_parser import HachoirParser from hac...
42.853556
130
0.662859
''' Dalvik Executable (dex) parser. References: - http://www.dalvikvm.com/ - http://code.google.com/p/androguard/source/browse/core/bytecodes/dvm.py - http://androguard.googlecode.com/hg/specs/dalvik/dex-format.html Author: Robert Xiao Creation Date: May 29, 2011 ''' from hachoir_parser import HachoirParser from hac...
7,862
1,054
449
5f10243ff02ef3d8c8b023f97dba0f740ac40d23
5,994
py
Python
backend-api/views.py
tarun-chakravarthy/movie-list-api
bf8eac41c133666735483acb730525d683c37fcf
[ "MIT" ]
null
null
null
backend-api/views.py
tarun-chakravarthy/movie-list-api
bf8eac41c133666735483acb730525d683c37fcf
[ "MIT" ]
null
null
null
backend-api/views.py
tarun-chakravarthy/movie-list-api
bf8eac41c133666735483acb730525d683c37fcf
[ "MIT" ]
null
null
null
from django.http import JsonResponse
39.176471
99
0.452953
from django.http import JsonResponse def movie_times(request): data = [ { "id": "2030c64ce72b4e4605cb01f2ba405b7d", "name": "Arclight", "showtimes": { "b4c2c326a4d335da654d4fd944bf88d0": [ "11:30 pm", "2:45 pm", "8:35 pm", "4:15 pm",...
5,909
0
46
7beaa8b171e8f929a0a4c770a4a7bd858f471c3e
2,661
py
Python
examples/tiktok.py
Michael-fore/py_collector
0b5207b5029c018367f2ed1ceda295df2584338a
[ "MIT" ]
null
null
null
examples/tiktok.py
Michael-fore/py_collector
0b5207b5029c018367f2ed1ceda295df2584338a
[ "MIT" ]
null
null
null
examples/tiktok.py
Michael-fore/py_collector
0b5207b5029c018367f2ed1ceda295df2584338a
[ "MIT" ]
null
null
null
from py_collector import Scheduler, Manager, Collector from datetime import datetime try: from pymongo.write_concern import WriteConcern from pymodm.connection import connect from pymodm import MongoModel, fields from bs4 import BeautifulSoup import requests except: raise ImportError('Please mak...
35.013158
108
0.585118
from py_collector import Scheduler, Manager, Collector from datetime import datetime try: from pymongo.write_concern import WriteConcern from pymodm.connection import connect from pymodm import MongoModel, fields from bs4 import BeautifulSoup import requests except: raise ImportError('Please mak...
1,134
952
46
738f9a06edf2bd2baf594e0cdd9c59088f4acbf6
1,430
py
Python
1_image_classification/make_folders_and_data_downloads.py
Yuya382/LearnPyTorchBook
d4b4f35568102a522049c68587b55659898452a1
[ "MIT" ]
null
null
null
1_image_classification/make_folders_and_data_downloads.py
Yuya382/LearnPyTorchBook
d4b4f35568102a522049c68587b55659898452a1
[ "MIT" ]
null
null
null
1_image_classification/make_folders_and_data_downloads.py
Yuya382/LearnPyTorchBook
d4b4f35568102a522049c68587b55659898452a1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # 「第1章 画像分類」の準備ファイル # # - 本ファイルでは、第1章で使用するフォルダの作成とファイルのダウンロードを行います。 # # In[1]: import os import urllib.request import zipfile # In[2]: # フォルダ「data」が存在しない場合は作成する data_dir = "./data/" if not os.path.exists(data_dir): os.mkdir(data_dir) # In[3]: # ImageNetのclass_inde...
19.589041
92
0.741259
#!/usr/bin/env python # coding: utf-8 # # 「第1章 画像分類」の準備ファイル # # - 本ファイルでは、第1章で使用するフォルダの作成とファイルのダウンロードを行います。 # # In[1]: import os import urllib.request import zipfile # In[2]: # フォルダ「data」が存在しない場合は作成する data_dir = "./data/" if not os.path.exists(data_dir): os.mkdir(data_dir) # In[3]: # ImageNetのclass_inde...
0
0
0
d1c6581c8803a466a8c61d0974ac08dad9038d1d
658
py
Python
xoeuf/fields/timezone.py
merchise-autrement/xoeuf
583a0faa345480e73110d467203eefd142b0a710
[ "BSD-3-Clause" ]
3
2015-05-16T04:40:14.000Z
2016-01-26T05:36:20.000Z
xoeuf/fields/timezone.py
merchise-autrement/xoeuf
583a0faa345480e73110d467203eefd142b0a710
[ "BSD-3-Clause" ]
null
null
null
xoeuf/fields/timezone.py
merchise-autrement/xoeuf
583a0faa345480e73110d467203eefd142b0a710
[ "BSD-3-Clause" ]
1
2017-03-23T23:08:50.000Z
2017-03-23T23:08:50.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) Merchise Autrement [~º/~] and Contributors # All rights reserved. # # This is free software; you can do what the LICENCE file allows you to. # from odoo import api, fields @api.model ...
26.32
79
0.586626
#!/usr/bin/env python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) Merchise Autrement [~º/~] and Contributors # All rights reserved. # # This is free software; you can do what the LICENCE file allows you to. # from odoo import api, fields @api.model d...
168
0
22
d6e8525e3ca6c88315853cd448437ed80346d224
2,065
py
Python
.venv/lib/python2.7/site-packages/celery/contrib/sphinx.py
MansoorHanif/FYP-web-app
918008d3b5eedaa904f3e720296afde9d73ac3f4
[ "BSD-3-Clause" ]
null
null
null
.venv/lib/python2.7/site-packages/celery/contrib/sphinx.py
MansoorHanif/FYP-web-app
918008d3b5eedaa904f3e720296afde9d73ac3f4
[ "BSD-3-Clause" ]
null
null
null
.venv/lib/python2.7/site-packages/celery/contrib/sphinx.py
MansoorHanif/FYP-web-app
918008d3b5eedaa904f3e720296afde9d73ac3f4
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Sphinx documentation plugin used to document tasks. Introduction ============ Usage ----- Add the extension to your :file:`docs/conf.py` configuration module: .. code-block:: python extensions = (..., 'celery.contrib.sphinx') If you'd like to change the prefix for ...
27.905405
78
0.694431
# -*- coding: utf-8 -*- """Sphinx documentation plugin used to document tasks. Introduction ============ Usage ----- Add the extension to your :file:`docs/conf.py` configuration module: .. code-block:: python extensions = (..., 'celery.contrib.sphinx') If you'd like to change the prefix for ...
492
0
107
475d035f005b75b6d141dc53f0090286fa83148e
3,534
py
Python
app/auth/views.py
Sunnywillow/blog2
16c37e1687dfdfa42c13bbad68ce00d5f06c2344
[ "MIT" ]
null
null
null
app/auth/views.py
Sunnywillow/blog2
16c37e1687dfdfa42c13bbad68ce00d5f06c2344
[ "MIT" ]
null
null
null
app/auth/views.py
Sunnywillow/blog2
16c37e1687dfdfa42c13bbad68ce00d5f06c2344
[ "MIT" ]
null
null
null
from flask import render_template, request, url_for, flash, redirect from flask_login import login_user, logout_user, login_required, current_user from . import auth from .. import db from ..models import User from .forms import LoginForm, RegistrationForm from ..email import send_email @auth.before_app_requ...
36.061224
80
0.642615
from flask import render_template, request, url_for, flash, redirect from flask_login import login_user, logout_user, login_required, current_user from . import auth from .. import db from ..models import User from .forms import LoginForm, RegistrationForm from ..email import send_email @auth.before_app_requ...
3,150
0
160
0e4308b4afcb644d7891ff59d5af04d6df7d7562
13,054
py
Python
loss_landscape_anim/model.py
lindsey98/loss-landscape-anim
8cecd75d65a96c5f587c4f36e35d6c8aa0e8d6e0
[ "MIT" ]
null
null
null
loss_landscape_anim/model.py
lindsey98/loss-landscape-anim
8cecd75d65a96c5f587c4f36e35d6c8aa0e8d6e0
[ "MIT" ]
null
null
null
loss_landscape_anim/model.py
lindsey98/loss-landscape-anim
8cecd75d65a96c5f587c4f36e35d6c8aa0e8d6e0
[ "MIT" ]
null
null
null
"""GenericModel class and its child classes. The GenericModel class enables flattening of the model parameters for tracking. MLP and LeNet are example models. Add your own PyTorch model by inheriting from GenericModel and organizing it into the pytorch lightning style. """ # pylint: disable = no-member import pytorch_...
33.818653
88
0.579975
"""GenericModel class and its child classes. The GenericModel class enables flattening of the model parameters for tracking. MLP and LeNet are example models. Add your own PyTorch model by inheriting from GenericModel and organizing it into the pytorch lightning style. """ # pylint: disable = no-member import pytorch_...
701
0
81
f10f31f168334907ca5cbd6dc35cda1ddeb96c6a
4,554
py
Python
pyinjective/proto/exchange/injective_insurance_rpc_pb2_grpc.py
CtheSky/sdk-python
c1b1ae931f4970832466a004eb193027bdc1dea5
[ "Apache-2.0" ]
10
2021-09-07T08:03:52.000Z
2022-03-08T08:39:30.000Z
pyinjective/proto/exchange/injective_insurance_rpc_pb2_grpc.py
CtheSky/sdk-python
c1b1ae931f4970832466a004eb193027bdc1dea5
[ "Apache-2.0" ]
39
2021-08-19T20:09:35.000Z
2022-03-22T19:51:59.000Z
pyinjective/proto/exchange/injective_insurance_rpc_pb2_grpc.py
CtheSky/sdk-python
c1b1ae931f4970832466a004eb193027bdc1dea5
[ "Apache-2.0" ]
5
2021-11-02T16:23:48.000Z
2022-01-20T22:30:05.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from exchange import injective_insurance_rpc_pb2 as exchange_dot_injective__insurance__rpc__pb2 class InjectiveInsuranceRPCStub(object): """InjectiveInsura...
43.371429
123
0.701142
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from exchange import injective_insurance_rpc_pb2 as exchange_dot_injective__insurance__rpc__pb2 class InjectiveInsuranceRPCStub(object): """InjectiveInsura...
2,351
0
75
3269fc7e1ba7414ee7bf4529babe43113962d576
5,704
py
Python
tag2hierarchy/utils/utils.py
cesarali/Tag2Hierarchy
182bc948a1b4c497a991b12a29ff56023f98c05a
[ "MIT" ]
null
null
null
tag2hierarchy/utils/utils.py
cesarali/Tag2Hierarchy
182bc948a1b4c497a991b12a29ff56023f98c05a
[ "MIT" ]
1
2017-06-13T13:08:12.000Z
2017-06-13T13:08:12.000Z
tag2hierarchy/utils/utils.py
cesarali/Tag2Hierarchy
182bc948a1b4c497a991b12a29ff56023f98c05a
[ "MIT" ]
null
null
null
''' Created on May 27, 2016 @author: cesar ''' from scipy.stats import norm, pareto, lognorm, gamma, weibull_min, weibull_max, gengamma, expon import numpy as np from scipy.stats import kstest import sys from matplotlib import pyplot as plt from scipy import interpolate from scipy.integrate import quadrature from sci...
36.8
130
0.577139
''' Created on May 27, 2016 @author: cesar ''' from scipy.stats import norm, pareto, lognorm, gamma, weibull_min, weibull_max, gengamma, expon import numpy as np from scipy.stats import kstest import sys from matplotlib import pyplot as plt from scipy import interpolate from scipy.integrate import quadrature from sci...
0
0
0
14acd7a0d3d2dc2a291175d8446cd0f2ff838072
29,701
py
Python
Live Feeds Health Check/LiveFeedsHealthCheck.py
ChrisMahlke/LiveFeedsServiceAggregator
db635a591d0dcb3e04fffdb29781e98197882ee2
[ "Unlicense" ]
1
2021-01-29T16:32:10.000Z
2021-01-29T16:32:10.000Z
Live Feeds Health Check/LiveFeedsHealthCheck.py
ChrisMahlke/LiveFeedsServiceAggregator
db635a591d0dcb3e04fffdb29781e98197882ee2
[ "Unlicense" ]
14
2020-11-05T03:03:05.000Z
2022-01-05T00:19:08.000Z
Live Feeds Health Check/LiveFeedsHealthCheck.py
ChrisMahlke/LiveFeedsServiceAggregator
db635a591d0dcb3e04fffdb29781e98197882ee2
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2020, Esri. 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...
47.982229
130
0.586344
#!/usr/bin/env python3 # Copyright 2020, Esri. 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...
27,633
0
131
7147b8cb87b85cc85829b4adfb67d9f4b42e59e7
9,053
py
Python
insights/parsers/systemd/unitfiles.py
mglantz/insights-core
6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4
[ "Apache-2.0" ]
1
2020-02-19T06:36:22.000Z
2020-02-19T06:36:22.000Z
insights/parsers/systemd/unitfiles.py
mglantz/insights-core
6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4
[ "Apache-2.0" ]
10
2018-04-16T15:38:04.000Z
2018-05-15T18:43:02.000Z
insights/parsers/systemd/unitfiles.py
mglantz/insights-core
6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4
[ "Apache-2.0" ]
null
null
null
""" Units Manged By Systemctl (services) ==================================== Parsers included in this module are: ListUnits - command ``/bin/systemctl list-units`` ------------------------------------------------- UnitFiles - command ``/bin/systemctl list-unit-files`` -----------------------------------------------...
37.878661
106
0.583784
""" Units Manged By Systemctl (services) ==================================== Parsers included in this module are: ListUnits - command ``/bin/systemctl list-units`` ------------------------------------------------- UnitFiles - command ``/bin/systemctl list-unit-files`` -----------------------------------------------...
1,372
0
80
f00096d5b66650a394e072c39d5e3c080a3b9833
484
py
Python
day10/django/app3/dateview/teachCourse.py
Vanessa-kriby/Python
1fbef67852fb362712fc48fa5c3c29eac68fe202
[ "Apache-2.0" ]
null
null
null
day10/django/app3/dateview/teachCourse.py
Vanessa-kriby/Python
1fbef67852fb362712fc48fa5c3c29eac68fe202
[ "Apache-2.0" ]
null
null
null
day10/django/app3/dateview/teachCourse.py
Vanessa-kriby/Python
1fbef67852fb362712fc48fa5c3c29eac68fe202
[ "Apache-2.0" ]
null
null
null
from app1.models import * from app1.util.utils import * def teachCourse(request): ''' get: http://127.0.0.1:8000/app3/teachCourse?tno=001 调用参数: tno:工号 ''' tid=request.GET.get("tno") result=Inventory.objects.filter(teachPlan__teacher__tno=tid).values("teachPlan__teach...
37.230769
219
0.71281
from app1.models import * from app1.util.utils import * def teachCourse(request): ''' get: http://127.0.0.1:8000/app3/teachCourse?tno=001 调用参数: tno:工号 ''' tid=request.GET.get("tno") result=Inventory.objects.filter(teachPlan__teacher__tno=tid).values("teachPlan__teach...
0
0
0
9258bba928805ebeed2869595a96799e99e14915
1,180
py
Python
CTCI/SherlockAndAnagrams.py
PsiPhiTheta/HackerRank
fafbed5ae4f6f134666796b91640901eda79de30
[ "Unlicense" ]
null
null
null
CTCI/SherlockAndAnagrams.py
PsiPhiTheta/HackerRank
fafbed5ae4f6f134666796b91640901eda79de30
[ "Unlicense" ]
null
null
null
CTCI/SherlockAndAnagrams.py
PsiPhiTheta/HackerRank
fafbed5ae4f6f134666796b91640901eda79de30
[ "Unlicense" ]
null
null
null
import math import os import random import re import sys if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') q = int(input()) for q_itr in range(q): s = input() result = sherlockAndAnagrams(s) fptr.write(str(result) + '\n') fptr.close()
30.25641
231
0.588136
import math import os import random import re import sys def sherlockAndAnagrams(s): dct = {} cnt = 0 for i in range(len(s)): for j in range(i+1,len(s)+1): list1 = list(s[i:j].strip()) # extract all substrings, convert to list print(list1) list1.sort() # sort t...
851
0
27
91b3843162560f4dfc9bcccecec9b14448b5f2cb
4,126
py
Python
env/lib/python2.7/site-packages/guess_language/data/models/kk.py
Eric-Muthemba/qontroverse
1f12d0e3bbdee628a88bac77dc53426ded220755
[ "MIT" ]
null
null
null
env/lib/python2.7/site-packages/guess_language/data/models/kk.py
Eric-Muthemba/qontroverse
1f12d0e3bbdee628a88bac77dc53426ded220755
[ "MIT" ]
1
2021-06-02T01:45:42.000Z
2021-06-02T01:45:42.000Z
env/lib/python2.7/site-packages/guess_language/data/models/kk.py
Eric-Muthemba/qontroverse
1f12d0e3bbdee628a88bac77dc53426ded220755
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- model = { u'ан ': 0, u'ен ': 1, u'ың ': 2, u' қа': 3, u' ба': 4, u'ай ': 5, u'нда': 6, u'ын ': 7, u' са': 8, u' ал': 9, u'ді ': 10, u'ары': 11, u'ды ': 12, u'ып ': 13, u' мұ': 14, u' бі': 15, u'асы': 16, u'да ': 17, u'най': 18, u' жа': 19, u'мұн': 20, u'ста': 21, u'ған': 2...
13.572368
23
0.453708
# -*- coding: utf-8 -*- model = { u'ан ': 0, u'ен ': 1, u'ың ': 2, u' қа': 3, u' ба': 4, u'ай ': 5, u'нда': 6, u'ын ': 7, u' са': 8, u' ал': 9, u'ді ': 10, u'ары': 11, u'ды ': 12, u'ып ': 13, u' мұ': 14, u' бі': 15, u'асы': 16, u'да ': 17, u'най': 18, u' жа': 19, u'мұн': 20, u'ста': 21, u'ған': 2...
0
0
0
89636aecd496cf952f6912a8da2cb6f589cbae98
88
py
Python
my_spot/apps.py
amin-da71/Benbb96
0c9e37425d0665e403ba6fecf0c4b17669c29ada
[ "MIT" ]
null
null
null
my_spot/apps.py
amin-da71/Benbb96
0c9e37425d0665e403ba6fecf0c4b17669c29ada
[ "MIT" ]
13
2021-02-13T20:15:18.000Z
2022-03-11T23:57:07.000Z
my_spot/apps.py
amin-da71/Benbb96
0c9e37425d0665e403ba6fecf0c4b17669c29ada
[ "MIT" ]
null
null
null
from django.apps import AppConfig
14.666667
33
0.75
from django.apps import AppConfig class MySpotConfig(AppConfig): name = 'my_spot'
0
30
23
ede79887465f5759dccd80d2685303ac2af75cd5
276
py
Python
tests/test_printable_chars.py
glami/cortex-serving-client
bc5b46fe87601e2c55702d4a7aff2ae250201979
[ "Apache-2.0" ]
12
2020-08-18T11:54:45.000Z
2021-11-15T13:43:56.000Z
tests/test_printable_chars.py
glami/cortex-serving-client
bc5b46fe87601e2c55702d4a7aff2ae250201979
[ "Apache-2.0" ]
2
2021-09-23T07:54:21.000Z
2021-12-15T15:21:15.000Z
tests/test_printable_chars.py
glami/cortex-serving-client
bc5b46fe87601e2c55702d4a7aff2ae250201979
[ "Apache-2.0" ]
1
2022-01-18T15:38:46.000Z
2022-01-18T15:38:46.000Z
import unittest from cortex_serving_client.printable_chars import remove_non_printable
27.6
98
0.797101
import unittest from cortex_serving_client.printable_chars import remove_non_printable class PrintableCharsTest(unittest.TestCase): def test_remove_non_printable(self): self.assertEqual('test test text text', remove_non_printable('test test \b text \btext'))
114
23
50
e181953468272f868d24c2d955c8e9dfb8508327
3,081
py
Python
helpers.py
ivRodriguezCA/decrypt-ios-apps-script
9a8f4ae5007c5154f1a3b283b12465a4c37f6673
[ "MIT" ]
69
2018-11-19T07:03:08.000Z
2022-01-26T10:40:03.000Z
helpers.py
ivRodriguezCA/decrypt-ios-apps-script
9a8f4ae5007c5154f1a3b283b12465a4c37f6673
[ "MIT" ]
null
null
null
helpers.py
ivRodriguezCA/decrypt-ios-apps-script
9a8f4ae5007c5154f1a3b283b12465a4c37f6673
[ "MIT" ]
16
2018-11-19T07:19:00.000Z
2022-01-21T22:14:49.000Z
import termios import socket import select import enum import sys import tty from paramiko.py3compat import u
32.431579
119
0.519636
import termios import socket import select import enum import sys import tty from paramiko.py3compat import u class Decryption(enum.Enum): bfinject = 0 clutch = 1 def interactive_shell(chan, callback=None): oldtty = termios.tcgetattr(sys.stdin) try: tty.setraw(sys.stdin.fileno()) tty....
2,793
39
138
b60af05590ea54ca4292e8237ab7b93afa4b24ef
309
py
Python
pyslobs/slobs/selectionservice.py
onyx-and-iris/PySLOBS
5d3133df5a3e64e89c030cc6a2ec55975c2d8b23
[ "MIT" ]
12
2021-01-30T21:17:10.000Z
2021-11-24T07:37:47.000Z
pyslobs/slobs/selectionservice.py
onyx-and-iris/PySLOBS
5d3133df5a3e64e89c030cc6a2ec55975c2d8b23
[ "MIT" ]
10
2021-02-14T01:55:52.000Z
2021-12-28T17:30:26.000Z
pyslobs/slobs/selectionservice.py
onyx-and-iris/PySLOBS
5d3133df5a3e64e89c030cc6a2ec55975c2d8b23
[ "MIT" ]
4
2021-02-13T14:22:00.000Z
2021-06-28T12:39:52.000Z
from ..apibase import SlobsService from .selectionbase import SelectionBase from .selection import Selection # For the side-effects
30.9
56
0.776699
from ..apibase import SlobsService from .selectionbase import SelectionBase from .selection import Selection # For the side-effects class SelectionService(SlobsService, SelectionBase): def __init__(self, connection): SlobsService.__init__(self, connection) SelectionBase.__init__(self)
95
31
49
71e0d6a3c5d9e1787b217194bd17b8662da31c02
993
py
Python
src/analysis/regression.py
mtb0/flightmodel
1a8b33d30ca1af704504f1e17e8cc659248b8afa
[ "MIT" ]
null
null
null
src/analysis/regression.py
mtb0/flightmodel
1a8b33d30ca1af704504f1e17e8cc659248b8afa
[ "MIT" ]
null
null
null
src/analysis/regression.py
mtb0/flightmodel
1a8b33d30ca1af704504f1e17e8cc659248b8afa
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Estimate parameters of models that predict SchTime using available info: SchDep, SchArr, Carrier, Date, Distance, Origin and Dest coordinates.""" import numpy as np import pandas as pd from sklearn import linear_model from analysis.filter import get_jetstream def regression(year, month, ...
33.1
101
0.680765
#!/usr/bin/env python """Estimate parameters of models that predict SchTime using available info: SchDep, SchArr, Carrier, Date, Distance, Origin and Dest coordinates.""" import numpy as np import pandas as pd from sklearn import linear_model from analysis.filter import get_jetstream def regression(year, month, ...
0
0
0
11311d7fc15baf206f15c5399847ac0d8332f140
241
py
Python
Python/Fundamentals/RegEx/Exercises/Find Variable Names In Sentences.py
EduardV777/Softuni-Python-Exercises
79db667028aea7dfecb3dbbd834c752180c50f44
[ "Unlicense" ]
null
null
null
Python/Fundamentals/RegEx/Exercises/Find Variable Names In Sentences.py
EduardV777/Softuni-Python-Exercises
79db667028aea7dfecb3dbbd834c752180c50f44
[ "Unlicense" ]
null
null
null
Python/Fundamentals/RegEx/Exercises/Find Variable Names In Sentences.py
EduardV777/Softuni-Python-Exercises
79db667028aea7dfecb3dbbd834c752180c50f44
[ "Unlicense" ]
null
null
null
import re text=input() lookForVars=re.compile(r"\b([_])([A-Za-z]+)\b") varNames=lookForVars.findall(text) output="" for k in range(0,len(varNames)): output+=varNames[k][1] if not k==len(varNames)-1: output+="," print(output)
21.909091
47
0.643154
import re text=input() lookForVars=re.compile(r"\b([_])([A-Za-z]+)\b") varNames=lookForVars.findall(text) output="" for k in range(0,len(varNames)): output+=varNames[k][1] if not k==len(varNames)-1: output+="," print(output)
0
0
0
65ab47f6621d2895f92dea9c013e3a8cd1ed8e5c
2,455
py
Python
EntityRDFizer/entityrdfizer/PropertyReader.py
mdhillmancmcl/TheWorldAvatar-CMCL-Fork
011aee78c016b76762eaf511c78fabe3f98189f4
[ "MIT" ]
null
null
null
EntityRDFizer/entityrdfizer/PropertyReader.py
mdhillmancmcl/TheWorldAvatar-CMCL-Fork
011aee78c016b76762eaf511c78fabe3f98189f4
[ "MIT" ]
null
null
null
EntityRDFizer/entityrdfizer/PropertyReader.py
mdhillmancmcl/TheWorldAvatar-CMCL-Fork
011aee78c016b76762eaf511c78fabe3f98189f4
[ "MIT" ]
null
null
null
########################################## # Author: Feroz Farazi (msff2@cam.ac.uk) # # Date: 07 Dec 2020 # ########################################## import configparser import pkg_resources import os ENTRDF_PROP_FILE = pkg_resources.resource_filename(__name__,os.path.join('conf','EntityRDFizer.p...
28.882353
108
0.731976
########################################## # Author: Feroz Farazi (msff2@cam.ac.uk) # # Date: 07 Dec 2020 # ########################################## import configparser import pkg_resources import os ENTRDF_PROP_FILE = pkg_resources.resource_filename(__name__,os.path.join('conf','EntityRDFizer.p...
828
0
276
83c62c57e701fe20872a2f102415c3563515d7fc
1,723
py
Python
src/PyCRA/files_content.py
moaz-elesawey/py-cra
b8c97b1750a6f0d1be72bf73eb1c28ae0b187f7f
[ "MIT" ]
1
2021-12-06T09:59:50.000Z
2021-12-06T09:59:50.000Z
src/PyCRA/files_content.py
Moaz-Mohammed-Elesawey/py-cra
b8c97b1750a6f0d1be72bf73eb1c28ae0b187f7f
[ "MIT" ]
null
null
null
src/PyCRA/files_content.py
Moaz-Mohammed-Elesawey/py-cra
b8c97b1750a6f0d1be72bf73eb1c28ae0b187f7f
[ "MIT" ]
1
2021-12-06T10:00:36.000Z
2021-12-06T10:00:36.000Z
BABELRC_CONTENT = u'''{ "presets": [ "@babel/preset-env", "@babel/preset-react" ] }''' WEBPACK_CONFIG_JS_CONTENT = u'''module.exports = { watch: true, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { ...
21.810127
74
0.538015
BABELRC_CONTENT = u'''{ "presets": [ "@babel/preset-env", "@babel/preset-react" ] }''' WEBPACK_CONFIG_JS_CONTENT = u'''module.exports = { watch: true, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { ...
0
0
0
097a4e5cdabd02d07b5dacb8d66cb3920dccf5d0
2,200
py
Python
test_serializable_fails_if_updating_different_rows.py
michalc/django-postgres-isolation-levels
566c37816aca18fb28e9fe244c47938539c5f91b
[ "MIT" ]
2
2020-10-23T23:58:43.000Z
2021-10-16T16:38:14.000Z
test_serializable_fails_if_updating_different_rows.py
michalc/django-postgres-isolation-levels
566c37816aca18fb28e9fe244c47938539c5f91b
[ "MIT" ]
null
null
null
test_serializable_fails_if_updating_different_rows.py
michalc/django-postgres-isolation-levels
566c37816aca18fb28e9fe244c47938539c5f91b
[ "MIT" ]
1
2020-10-12T13:58:35.000Z
2020-10-12T13:58:35.000Z
############## # Setup Django import django django.setup() ############# # Test proper import threading import time import pytest from django.db import DatabaseError, connection, transaction from django.db.models import F, Subquery from app.models import Sock @pytest.mark.django_db
29.72973
82
0.642727
############## # Setup Django import django django.setup() ############# # Test proper import threading import time import pytest from django.db import DatabaseError, connection, transaction from django.db.models import F, Subquery from app.models import Sock @pytest.mark.django_db def test_serializable_fails_if_...
1,889
0
22
24a92ffefc2e23015dba631364a3ea7e6e63eeb5
1,059
py
Python
library/test.py
BaptisteGerondeau/ansible-role-mr-provisioner
acf38aeee5b9c9ed712f0eb9907400558a23755f
[ "BSD-2-Clause" ]
1
2018-05-15T02:44:47.000Z
2018-05-15T02:44:47.000Z
library/test.py
BaptisteGerondeau/ansible-role-mr-provisioner
acf38aeee5b9c9ed712f0eb9907400558a23755f
[ "BSD-2-Clause" ]
8
2018-01-18T08:18:26.000Z
2018-05-09T13:50:15.000Z
library/test.py
BaptisteGerondeau/ansible-role-mr-provisioner
acf38aeee5b9c9ed712f0eb9907400558a23755f
[ "BSD-2-Clause" ]
4
2017-11-08T21:27:14.000Z
2018-04-03T03:47:36.000Z
import requests #from urlparse import urljoin from future.standard_library import install_aliases install_aliases() from urllib.parse import urljoin # curl -X POST "http://192.168.0.3:5000/api/v1/image" # -H "accept: application/json" # -H "Authorization: DEADBEEF" # -H "content-type: multipart/form-data" # -F "file=...
34.16129
94
0.634561
import requests #from urlparse import urljoin from future.standard_library import install_aliases install_aliases() from urllib.parse import urljoin # curl -X POST "http://192.168.0.3:5000/api/v1/image" # -H "accept: application/json" # -H "Authorization: DEADBEEF" # -H "content-type: multipart/form-data" # -F "file=...
0
0
0
a66dc25a4ad943ada8c203a441607cd9d4a82f3b
2,218
py
Python
autoClone/getRepos/parserRepos.py
RylynnLai/py-practise
aebcc7343a03f4256cc24f91100fdcdf10d31fa8
[ "MIT" ]
null
null
null
autoClone/getRepos/parserRepos.py
RylynnLai/py-practise
aebcc7343a03f4256cc24f91100fdcdf10d31fa8
[ "MIT" ]
null
null
null
autoClone/getRepos/parserRepos.py
RylynnLai/py-practise
aebcc7343a03f4256cc24f91100fdcdf10d31fa8
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: UTF-8 -*- import os, sys, requests from bs4 import BeautifulSoup from biplist import * #python在安装时,默认的编码是ascii,当程序中出现非ascii编码时,python的处理常常会报类似这样的错误。 #python没办法处理非ascii编码的,此时需要自己设置将python的默认编码,一般设置为utf8的编码格式。 reload(sys) sys.setdefaultencoding('utf8') #创建文件夹路劲 #保存Html文件 #解析用户列表 ...
22.18
121
0.62128
#!/usr/bin/python # -*- coding: UTF-8 -*- import os, sys, requests from bs4 import BeautifulSoup from biplist import * #python在安装时,默认的编码是ascii,当程序中出现非ascii编码时,python的处理常常会报类似这样的错误。 #python没办法处理非ascii编码的,此时需要自己设置将python的默认编码,一般设置为utf8的编码格式。 reload(sys) sys.setdefaultencoding('utf8') #创建文件夹路劲 def mkdir(path): ...
2,276
0
89
f4379a33719265674e9db1e0b7909fe98a9d8639
675
py
Python
setup.py
Bartekkz/DeepX
4ba2dfc7f2be3919fb9a64021bca154422e539ee
[ "MIT" ]
1
2020-04-03T16:58:57.000Z
2020-04-03T16:58:57.000Z
setup.py
Bartekkz/DeepX
4ba2dfc7f2be3919fb9a64021bca154422e539ee
[ "MIT" ]
null
null
null
setup.py
Bartekkz/DeepX
4ba2dfc7f2be3919fb9a64021bca154422e539ee
[ "MIT" ]
1
2020-04-01T11:42:00.000Z
2020-04-01T11:42:00.000Z
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup( name="bearx", version="0.1", scripts=['bearx'], author="Bartek Szmelczynski", author_email="bartek.szmelczynski@gmail.com", description=("deep learning library created in ord...
28.125
69
0.644444
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup( name="bearx", version="0.1", scripts=['bearx'], author="Bartek Szmelczynski", author_email="bartek.szmelczynski@gmail.com", description=("deep learning library created in ord...
0
0
0
fe84d982666e5a96f67cc80648c47bb45af29406
5,407
py
Python
openmdao.lib/src/openmdao/lib/drivers/sensitivity.py
OzanCKN/OpenMDAO-Framework
05e9d4b9bc41d0ec00a7073545146c925cd33b0b
[ "Apache-2.0" ]
1
2015-11-05T11:14:45.000Z
2015-11-05T11:14:45.000Z
openmdao.lib/src/openmdao/lib/drivers/sensitivity.py
janus/OpenMDAO-Framework
05e9d4b9bc41d0ec00a7073545146c925cd33b0b
[ "Apache-2.0" ]
null
null
null
openmdao.lib/src/openmdao/lib/drivers/sensitivity.py
janus/OpenMDAO-Framework
05e9d4b9bc41d0ec00a7073545146c925cd33b0b
[ "Apache-2.0" ]
1
2020-07-15T02:45:54.000Z
2020-07-15T02:45:54.000Z
""" sensitivity.py -- Driver to calculate the gradient of a workflow, and return it as a driver output. SensitivityDriver includes a differentiator slot where the differentiation method can be plugged. Fake finite difference is supported. """ # pylint: disable-msg=C0103 #public symbols __all__ =...
43.604839
96
0.614944
""" sensitivity.py -- Driver to calculate the gradient of a workflow, and return it as a driver output. SensitivityDriver includes a differentiator slot where the differentiation method can be plugged. Fake finite difference is supported. """ # pylint: disable-msg=C0103 #public symbols __all__ =...
0
0
0
a514e7c2d23362392762154ae975a5923ddf86fd
526
py
Python
operators/di_replication/checkdata/checkdata_test.py
thhapke/dilocal
1d3c1b7b1a4513e9bff7efd77f680f66014ff499
[ "MIT" ]
null
null
null
operators/di_replication/checkdata/checkdata_test.py
thhapke/dilocal
1d3c1b7b1a4513e9bff7efd77f680f66014ff499
[ "MIT" ]
null
null
null
operators/di_replication/checkdata/checkdata_test.py
thhapke/dilocal
1d3c1b7b1a4513e9bff7efd77f680f66014ff499
[ "MIT" ]
null
null
null
import checkdata from archive.utils.mock_di_api import mock_api from archive.utils.operator_test import operator_test api = mock_api(__file__) # class instance of mock_api mock_api.print_send_msg = True # set class variable for printing api.send optest = operator_test(__file__) # config parameter msg ...
35.066667
76
0.731939
import checkdata from archive.utils.mock_di_api import mock_api from archive.utils.operator_test import operator_test api = mock_api(__file__) # class instance of mock_api mock_api.print_send_msg = True # set class variable for printing api.send optest = operator_test(__file__) # config parameter msg ...
0
0
0
121de1e5c031739c4a511ea5fac1332b1d00287b
347
py
Python
main.py
thewillboy/meu_equipamento
2f5c6a4553f251a66692889ae3a2607b972893dd
[ "MIT" ]
null
null
null
main.py
thewillboy/meu_equipamento
2f5c6a4553f251a66692889ae3a2607b972893dd
[ "MIT" ]
null
null
null
main.py
thewillboy/meu_equipamento
2f5c6a4553f251a66692889ae3a2607b972893dd
[ "MIT" ]
null
null
null
''' Descrição: Interface para visualizar as especificações de hardware do computador Desenvolvedor: William Hoeflich Versão: 0.1 ''' # Importando as bibliotecas utilizadas no projeto from ui import Interface if __name__ == "__main__": main()
23.133333
81
0.720461
''' Descrição: Interface para visualizar as especificações de hardware do computador Desenvolvedor: William Hoeflich Versão: 0.1 ''' # Importando as bibliotecas utilizadas no projeto from ui import Interface def main(): # Instanciando a interface do aplicativo interface = Interface() if __name__...
65
0
25
ab6c5ffd4f708a5db0fd5074679f1e6ed07a725b
2,529
py
Python
apps/GNNAutoScale/gnn_models/gat.py
zbmain/PGL
dbded6a1543248b0a33c05eb476ddc513401a774
[ "Apache-2.0" ]
1
2022-03-25T12:04:51.000Z
2022-03-25T12:04:51.000Z
apps/GNNAutoScale/gnn_models/gat.py
zbmain/PGL
dbded6a1543248b0a33c05eb476ddc513401a774
[ "Apache-2.0" ]
null
null
null
apps/GNNAutoScale/gnn_models/gat.py
zbmain/PGL
dbded6a1543248b0a33c05eb476ddc513401a774
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
30.841463
74
0.570581
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
1,705
104
23
b8c43eb1805eabe06a85e4001c58b43e247cb551
2,895
py
Python
anyprog.py
Rajpratik71/devel-scripts
068285719a13b02889b1314361cc5bdb764d9a3a
[ "Apache-2.0" ]
null
null
null
anyprog.py
Rajpratik71/devel-scripts
068285719a13b02889b1314361cc5bdb764d9a3a
[ "Apache-2.0" ]
null
null
null
anyprog.py
Rajpratik71/devel-scripts
068285719a13b02889b1314361cc5bdb764d9a3a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python """Inspect path to locate possible completions for cmd. Walk through the entries in the current PATH env var and look for things that might match a cmd. Argument is a text string S; we dump out any program on the path that contains S. If SHELL is set to bash, then we also test to see if any bash fun...
27.571429
71
0.632815
#!/usr/bin/python """Inspect path to locate possible completions for cmd. Walk through the entries in the current PATH env var and look for things that might match a cmd. Argument is a text string S; we dump out any program on the path that contains S. If SHELL is set to bash, then we also test to see if any bash fun...
0
0
0
16188fd3ca1e2933ce60ddbba2c219a53bb334d9
8,519
py
Python
src/blade/thrift_library.py
kerr-huang/blade
a98f35a8bbed13a14213c7c696485b742a13e7aa
[ "BSD-3-Clause" ]
841
2016-11-11T21:44:15.000Z
2022-03-13T09:00:56.000Z
src/blade/thrift_library.py
kerr-huang/blade
a98f35a8bbed13a14213c7c696485b742a13e7aa
[ "BSD-3-Clause" ]
21
2016-11-17T04:24:06.000Z
2019-04-11T09:36:52.000Z
src/blade/thrift_library.py
kerr-huang/blade
a98f35a8bbed13a14213c7c696485b742a13e7aa
[ "BSD-3-Clause" ]
343
2016-11-11T11:06:19.000Z
2022-03-21T09:07:45.000Z
# Copyright (c) 2012 iQIYI Inc. # Copyright (c) 2013 Tencent Inc. # All rights reserved. # # Author: Jingxu Chen <chenjingxu@qiyi.com> # Feng Chen <chen3feng@gmail.com> # Date: October 13, 2012 """ A helper class to get the files generated from thrift IDL files. """ import os import blade import config...
32.14717
86
0.538678
# Copyright (c) 2012 iQIYI Inc. # Copyright (c) 2013 Tencent Inc. # All rights reserved. # # Author: Jingxu Chen <chenjingxu@qiyi.com> # Feng Chen <chen3feng@gmail.com> # Date: October 13, 2012 """ A helper class to get the files generated from thrift IDL files. """ import os import blade import config...
0
0
0
ac28bc429e8250e1d859821cec80a5a2b2676daf
1,032
py
Python
split.py
MaggieChenchen/SingleGan_new
06180be2479ce931af464b2dfdd091a646cc9b61
[ "MIT" ]
89
2018-10-13T03:20:11.000Z
2022-03-15T17:36:53.000Z
split.py
MaggieChenchen/SingleGan_new
06180be2479ce931af464b2dfdd091a646cc9b61
[ "MIT" ]
10
2018-10-18T07:53:54.000Z
2020-10-25T20:01:53.000Z
split.py
MaggieChenchen/SingleGan_new
06180be2479ce931af464b2dfdd091a646cc9b61
[ "MIT" ]
16
2018-10-16T07:08:28.000Z
2022-03-21T21:02:12.000Z
import sys import os from glob import glob from PIL import Image from tqdm import trange from util import util import shutil image_path = sys.argv[1] path_trainA = os.path.join(image_path,'trainA') path_trainB = os.path.join(image_path,'trainB') path_testA = os.path.join(image_path,'testA') path_testB = os.path.join(i...
32.25
60
0.684109
import sys import os from glob import glob from PIL import Image from tqdm import trange from util import util import shutil image_path = sys.argv[1] path_trainA = os.path.join(image_path,'trainA') path_trainB = os.path.join(image_path,'trainB') path_testA = os.path.join(image_path,'testA') path_testB = os.path.join(i...
0
0
0
5f9958c8911c0aafcecb6e320d4c753a2e7ac226
3,750
py
Python
dompetku/handler/services.py
blackshirt/dompetku
51b907dc25c927ef42b4522499c1884affd42980
[ "BSD-2-Clause" ]
1
2016-05-15T16:58:54.000Z
2016-05-15T16:58:54.000Z
dompetku/handler/services.py
blackshirt/dompetku
51b907dc25c927ef42b4522499c1884affd42980
[ "BSD-2-Clause" ]
null
null
null
dompetku/handler/services.py
blackshirt/dompetku
51b907dc25c927ef42b4522499c1884affd42980
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright @2014 blackshirtmuslim@yahoo.com # Licensed: see Python license """Module to handle json services.""" import datetime import json import peewee import tornado.web import tornado.escape from dompetku.handler import base from dompetku.utils import jsonify from dompetku.model import ...
30
92
0.533867
#!/usr/bin/env python # # Copyright @2014 blackshirtmuslim@yahoo.com # Licensed: see Python license """Module to handle json services.""" import datetime import json import peewee import tornado.web import tornado.escape from dompetku.handler import base from dompetku.utils import jsonify from dompetku.model import ...
2,983
159
229
23dd3c4b0d83f35a4b5d57e7cab871a170cec778
380
py
Python
blowdrycss/unit_tests/test_all.py
acnagy/test-blowdrycss
bd9603dc87dc304b811213e3e6c3c97afa7f5966
[ "MIT" ]
null
null
null
blowdrycss/unit_tests/test_all.py
acnagy/test-blowdrycss
bd9603dc87dc304b811213e3e6c3c97afa7f5966
[ "MIT" ]
null
null
null
blowdrycss/unit_tests/test_all.py
acnagy/test-blowdrycss
bd9603dc87dc304b811213e3e6c3c97afa7f5966
[ "MIT" ]
null
null
null
""" Test all test files. """ # import glob # import unittest # # test_files = glob.glob('test_*.py') # module_strings = [test_file[0:len(test_file)-3] for test_file in test_files] # suites = [unittest.defaultTestLoader.loadTestsFromName(test_file) for test_file in module_strings] # testSuite = unittest.TestSuite(suite...
29.230769
100
0.757895
""" Test all test files. """ # import glob # import unittest # # test_files = glob.glob('test_*.py') # module_strings = [test_file[0:len(test_file)-3] for test_file in test_files] # suites = [unittest.defaultTestLoader.loadTestsFromName(test_file) for test_file in module_strings] # testSuite = unittest.TestSuite(suite...
0
0
0
1fb8b9f45d44f90f40cd16747be3e15d79326496
749
py
Python
Project/motorCode.py
aaronjohnsabu1999/sudoku-solver-itsp-2018
5f2bc40704bb206490e2c7f60f0d035ff47ee02e
[ "MIT" ]
1
2021-01-17T17:30:28.000Z
2021-01-17T17:30:28.000Z
Project/motorCode.py
aaronjohnsabu1999/sudoku-solver-itsp-2018
5f2bc40704bb206490e2c7f60f0d035ff47ee02e
[ "MIT" ]
null
null
null
Project/motorCode.py
aaronjohnsabu1999/sudoku-solver-itsp-2018
5f2bc40704bb206490e2c7f60f0d035ff47ee02e
[ "MIT" ]
1
2019-12-24T14:03:21.000Z
2019-12-24T14:03:21.000Z
YStepsPerBlock = 225 XStepsPerBlock = 227 Delay = 0.0008
19.710526
50
0.59012
YStepsPerBlock = 225 XStepsPerBlock = 227 Delay = 0.0008 def cam_stepper_y(): YStepCount = YStepsPerBlock * 10 return YStepCount def move_stepper_x(prev_x, cur_x): XStepCount = XStepsPerBlock * (cur_x - prev_x) return XStepCount def move_stepper_y(prev_y, cur_y): YStepCount = YStepsPerBlock ...
592
0
96
fa87aa9a2f89e1c0eaa299f3cecfccd866e78d88
6,865
py
Python
_unittests/ut_pycode/test_profiling.py
Pandinosaurus/pyquickhelper
326276f656cf88989e4d0fcd006ada0d3735bd9e
[ "MIT" ]
18
2015-11-10T08:09:23.000Z
2022-02-16T11:46:45.000Z
_unittests/ut_pycode/test_profiling.py
Pandinosaurus/pyquickhelper
326276f656cf88989e4d0fcd006ada0d3735bd9e
[ "MIT" ]
321
2015-06-14T21:34:28.000Z
2021-11-28T17:10:03.000Z
_unittests/ut_pycode/test_profiling.py
Pandinosaurus/pyquickhelper
326276f656cf88989e4d0fcd006ada0d3735bd9e
[ "MIT" ]
10
2015-06-20T01:35:00.000Z
2022-01-19T15:54:32.000Z
""" @brief test tree node (time=5s) """ import sys import os import unittest import warnings import time try: from pstats import SortKey except ImportError: # python < 3.7 from pyquickhelper.pycode.profiling import SortKey import pandas from pyquickhelper.pycode import ExtTestCase from pyquickhelper.pa...
30.376106
78
0.52032
""" @brief test tree node (time=5s) """ import sys import os import unittest import warnings import time try: from pstats import SortKey except ImportError: # python < 3.7 from pyquickhelper.pycode.profiling import SortKey import pandas from pyquickhelper.pycode import ExtTestCase from pyquickhelper.pa...
6,004
298
23
fa54d9fc53c9cd9ddc969b162a82d4f7e0586af3
252
py
Python
notebooks/exercise_solutions/n04_inertia_define-rigid-body.py
pydy/pydy-tutorial-human-standing
72b1d8513e339e9b10e501bd3490caa3fa997bc4
[ "CC-BY-4.0" ]
134
2015-05-19T15:24:18.000Z
2022-03-12T09:39:03.000Z
notebooks/exercise_solutions/n04_inertia_define-rigid-body.py
pydy/pydy-tutorial-human-standing
72b1d8513e339e9b10e501bd3490caa3fa997bc4
[ "CC-BY-4.0" ]
46
2015-05-05T18:08:20.000Z
2022-01-28T11:12:42.000Z
notebooks/exercise_solutions/n04_inertia_define-rigid-body.py
pydy/pydy-tutorial-pycon-2014
72b1d8513e339e9b10e501bd3490caa3fa997bc4
[ "CC-BY-4.0" ]
62
2015-06-16T01:50:51.000Z
2022-02-26T07:39:41.000Z
upper_leg = RigidBody('Upper Leg', upper_leg_mass_center, upper_leg_frame, upper_leg_mass, upper_leg_central_inertia) torso = RigidBody('Torso', torso_mass_center, torso_frame, torso_mass, torso_central_inertia)
50.4
74
0.710317
upper_leg = RigidBody('Upper Leg', upper_leg_mass_center, upper_leg_frame, upper_leg_mass, upper_leg_central_inertia) torso = RigidBody('Torso', torso_mass_center, torso_frame, torso_mass, torso_central_inertia)
0
0
0
26dddec2d8782ad044b0b6cf17aaab8eca61b899
989
py
Python
substance/command/run.py
romelperez/substance
9f1c1992cb27cc94fc21bfc57aaea90d88e010a1
[ "Apache-2.0" ]
21
2017-06-12T20:55:32.000Z
2021-04-20T20:15:32.000Z
substance/command/run.py
romelperez/substance
9f1c1992cb27cc94fc21bfc57aaea90d88e010a1
[ "Apache-2.0" ]
46
2017-07-24T16:14:36.000Z
2021-04-30T02:14:09.000Z
substance/command/run.py
romelperez/substance
9f1c1992cb27cc94fc21bfc57aaea90d88e010a1
[ "Apache-2.0" ]
8
2018-02-19T20:24:54.000Z
2021-04-28T23:39:15.000Z
from substance import (Engine, Command) from substance.exceptions import (LinkCommandError) # Disable parsing for this command
26.026316
82
0.626896
from substance import (Engine, Command) from substance.exceptions import (LinkCommandError) class Run(Command): def getUsage(self): return "substance run JOBCONTAINER [ARGS...]" def getHelpTitle(self): return "Run a job container with arguments" def getShellOptions(self, optparser): ...
674
-2
184
ff3427b9d859910345294bf4b5465ecba9122bb3
4,320
py
Python
pretix_eth/signals.py
mikulas-mrva/pretix-eth-payment-plugin
948a456e99823129620bab5a7fad9bb4d9e5bea4
[ "Apache-2.0" ]
19
2019-06-04T23:15:46.000Z
2022-03-14T16:26:54.000Z
pretix_eth/signals.py
mikulas-mrva/pretix-eth-payment-plugin
948a456e99823129620bab5a7fad9bb4d9e5bea4
[ "Apache-2.0" ]
152
2019-06-04T22:41:06.000Z
2022-03-25T08:08:54.000Z
pretix_eth/signals.py
mikulas-mrva/pretix-eth-payment-plugin
948a456e99823129620bab5a7fad9bb4d9e5bea4
[ "Apache-2.0" ]
12
2019-06-05T08:16:14.000Z
2021-06-17T14:45:26.000Z
from django.dispatch import receiver from django.urls import resolve, reverse from django.utils.translation import gettext_lazy as _ from django.template.loader import get_template from pretix.base.middleware import _parse_csp, _merge_csp, _render_csp from pretix.presale.signals import ( html_head, process_res...
33.75
120
0.671528
from django.dispatch import receiver from django.urls import resolve, reverse from django.utils.translation import gettext_lazy as _ from django.template.loader import get_template from pretix.base.middleware import _parse_csp, _merge_csp, _render_csp from pretix.presale.signals import ( html_head, process_res...
2,972
0
154
b49383d73cdc04f76cd176c970fbf409e3e216c6
1,309
py
Python
bot/utils.py
darksidecat/telegram-2048-bot
2c5efbb8fc7c02e0139502506fa2104a1495d1b8
[ "MIT" ]
9
2021-09-28T11:47:11.000Z
2022-03-07T10:08:45.000Z
bot/utils.py
darksidecat/telegram-2048-bot
2c5efbb8fc7c02e0139502506fa2104a1495d1b8
[ "MIT" ]
null
null
null
bot/utils.py
darksidecat/telegram-2048-bot
2c5efbb8fc7c02e0139502506fa2104a1495d1b8
[ "MIT" ]
2
2022-03-06T20:58:53.000Z
2022-03-31T06:38:13.000Z
from typing import List
25.173077
88
0.569901
from typing import List def horizontal_line( field: List[List[int]], c_symbol: str, h_symbol: str, min_cell_sizes: List[int], ): line = [] for x in range(len(field)): line.extend([c_symbol + h_symbol * min_cell_sizes[x]]) line.extend([c_symbol, "\n"]) return line def draw_ta...
1,237
0
46
ebea6f15e3db82b709db81df32d647649d6a8a93
2,889
py
Python
node_registry/decorators.py
rahulkatiyar19955/node_registry
42a2ed4ea7271a312223c724543e278ff9c9f54c
[ "BSD-3-Clause" ]
2
2021-07-05T12:36:29.000Z
2021-12-24T08:20:13.000Z
node_registry/decorators.py
rahulkatiyar19955/node_registry
42a2ed4ea7271a312223c724543e278ff9c9f54c
[ "BSD-3-Clause" ]
null
null
null
node_registry/decorators.py
rahulkatiyar19955/node_registry
42a2ed4ea7271a312223c724543e278ff9c9f54c
[ "BSD-3-Clause" ]
4
2021-06-30T04:22:58.000Z
2021-12-19T06:06:34.000Z
#!/usr/bin/env python3 # Copyright (c) 2021, DeepX-inc # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and t...
35.666667
77
0.695396
#!/usr/bin/env python3 # Copyright (c) 2021, DeepX-inc # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and t...
97
0
26
d240b6a414bfe4d22c22e839f7db47dec3fc7dec
410
py
Python
inst/tdda/constraints/examples/elements_constraint_discovery.py
noamross/tdda
c105496561a0328ac73b6bce872f94f2566ed835
[ "MIT" ]
4
2016-11-14T02:35:01.000Z
2016-11-14T07:54:09.000Z
inst/tdda/constraints/examples/elements_constraint_discovery.py
noamross/tdda
c105496561a0328ac73b6bce872f94f2566ed835
[ "MIT" ]
1
2016-11-14T03:57:27.000Z
2016-11-14T03:57:27.000Z
inst/tdda/constraints/examples/elements_constraint_discovery.py
noamross/tdda
c105496561a0328ac73b6bce872f94f2566ed835
[ "MIT" ]
null
null
null
# elements_constraints_discovery.py from __future__ import print_function import pandas as pd from tdda.constraints.pdconstraints import discover_constraints, verify_df df = pd.read_csv('../testdata/elements92.csv') constraints = discover_constraints(df) with open('elements92.tdda', 'w') as f: f.write(constraint...
22.777778
74
0.782927
# elements_constraints_discovery.py from __future__ import print_function import pandas as pd from tdda.constraints.pdconstraints import discover_constraints, verify_df df = pd.read_csv('../testdata/elements92.csv') constraints = discover_constraints(df) with open('elements92.tdda', 'w') as f: f.write(constraint...
0
0
0
470388ba998feb4d4e15d3e237870f6eda6ccee0
6,510
py
Python
cayenne/model_io.py
Heuro-labs/pyssa
d2f368787eeb90e3459d405a0cf769035103433f
[ "Apache-2.0" ]
9
2020-07-18T21:41:35.000Z
2020-10-24T16:34:51.000Z
cayenne/model_io.py
Heuro-labs/pyssa
d2f368787eeb90e3459d405a0cf769035103433f
[ "Apache-2.0" ]
86
2018-12-01T22:45:17.000Z
2020-07-11T21:07:24.000Z
cayenne/model_io.py
Heuro-labs/pyssa
d2f368787eeb90e3459d405a0cf769035103433f
[ "Apache-2.0" ]
1
2020-08-15T18:38:57.000Z
2020-08-15T18:38:57.000Z
""" The class that handles model IO """ import numpy as np import antimony as sb class ModelIO: """ Class for loading and parsing models Parameters --------- model_contents : str Either the model string or the file path content_type : str, {"ModelStr...
35.380435
88
0.62427
""" The class that handles model IO """ import numpy as np import antimony as sb class ModelError(Exception): pass class InitialStateError(ModelError): pass class RateConstantError(ModelError): pass class ChemFlagError(ModelError): pass class VolumeError(ModelError): pass class Mod...
739
102
142
98ccf30d7e46ccb831be21b3f20a95078139f504
2,044
py
Python
data2vec/ema.py
AryanShekarlaban/data2vec-pytorch
39245c4874d1098ca8e2fa583444e21c98b950ac
[ "MIT" ]
30
2022-02-18T08:30:41.000Z
2022-03-25T12:04:31.000Z
data2vec/ema.py
ishine/data2vec-pytorch
39245c4874d1098ca8e2fa583444e21c98b950ac
[ "MIT" ]
null
null
null
data2vec/ema.py
ishine/data2vec-pytorch
39245c4874d1098ca8e2fa583444e21c98b950ac
[ "MIT" ]
2
2022-02-18T09:25:56.000Z
2022-03-29T02:58:36.000Z
import torch import torch.nn as nn class EMA: """ Modified version of class fairseq.models.ema.EMAModule. Args: model (nn.Module): cfg (DictConfig): device (str): skip_keys (list): The keys to skip assigning averaged weights to. """ def step(self, new_model: nn.Mo...
28.388889
85
0.584149
import torch import torch.nn as nn class EMA: """ Modified version of class fairseq.models.ema.EMAModule. Args: model (nn.Module): cfg (DictConfig): device (str): skip_keys (list): The keys to skip assigning averaged weights to. """ def __init__(self, model: nn.Mo...
358
0
54
93081e5c8f1e1557dd46d29a25c687a8397b1a5c
647
py
Python
models/love.py
hand-code/pbs
d5d8dc00d949b70f96118fc09c2ba8e627625591
[ "MIT" ]
null
null
null
models/love.py
hand-code/pbs
d5d8dc00d949b70f96118fc09c2ba8e627625591
[ "MIT" ]
null
null
null
models/love.py
hand-code/pbs
d5d8dc00d949b70f96118fc09c2ba8e627625591
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ package.module ~~~~~~~~~~~~~~ A brief description goes here. :copyright: (c) 2016 by chenxiaofeng. :license: LICENSE_NAME, see LICENSE_FILE for more details. """ from datetime import datetime from .base import db
21.566667
68
0.646059
# -*- coding: utf-8 -*- """ package.module ~~~~~~~~~~~~~~ A brief description goes here. :copyright: (c) 2016 by chenxiaofeng. :license: LICENSE_NAME, see LICENSE_FILE for more details. """ from datetime import datetime from .base import db class Love(db.Model): __tablename__ = 'love' i...
120
240
23
518d6034da48b45d59aa40ca94323ef347ca9d81
3,022
py
Python
Tests/TestGenericCell.py
HSZittauGoerlitz/EnSySim
7094b803785e14610351f5fa6a40b2e7bc827a28
[ "MIT" ]
1
2021-12-03T23:11:42.000Z
2021-12-03T23:11:42.000Z
Tests/TestGenericCell.py
HSZittauGoerlitz/EnSySim
7094b803785e14610351f5fa6a40b2e7bc827a28
[ "MIT" ]
1
2021-04-06T11:33:46.000Z
2021-04-13T07:17:24.000Z
Tests/TestGenericCell.py
HSZittauGoerlitz/EnSySim
7094b803785e14610351f5fa6a40b2e7bc827a28
[ "MIT" ]
1
2021-09-28T06:09:32.000Z
2021-09-28T06:09:32.000Z
# To add a new cell, type '# %%' # To add a new markdown cell, type '# %% [markdown]' # %% # Imports from BoundaryConditions.Simulation.SimulationData import getSimData from Controller.Cell.CHP_SystemThermal import CtrlDefault from GenericModel.Design import _check_pBTypes, generateGenericCell from GenericModel.PARAMET...
29.627451
73
0.647253
# To add a new cell, type '# %%' # To add a new markdown cell, type '# %% [markdown]' # %% # Imports from BoundaryConditions.Simulation.SimulationData import getSimData from Controller.Cell.CHP_SystemThermal import CtrlDefault from GenericModel.Design import _check_pBTypes, generateGenericCell from GenericModel.PARAMET...
0
0
0
56979ff60c88b550bba5a3ec85536dcf816b0ce0
613
py
Python
Chapter3-Resizing_Croping.py
iamavx/OpenCV_Tutorial
908a2a91122888245f69dcc8b10c6c9f0e684f08
[ "MIT" ]
1
2021-09-10T09:28:18.000Z
2021-09-10T09:28:18.000Z
Chapter3-Resizing_Croping.py
iamavx/OpenCV_Tutorial
908a2a91122888245f69dcc8b10c6c9f0e684f08
[ "MIT" ]
null
null
null
Chapter3-Resizing_Croping.py
iamavx/OpenCV_Tutorial
908a2a91122888245f69dcc8b10c6c9f0e684f08
[ "MIT" ]
null
null
null
# Hey Dear , the convention of plotting the graph is different from mathematical representation # x-axis is same as x-axis and y-axis is opposite to y-axis import cv2 img = cv2.imread("/Users/abhishekraj/Downloads/xa.jpeg") # Image is just the array of pixel or matrix print(img.shape) # Resize the image imgResize =...
26.652174
95
0.748777
# Hey Dear , the convention of plotting the graph is different from mathematical representation # x-axis is same as x-axis and y-axis is opposite to y-axis import cv2 img = cv2.imread("/Users/abhishekraj/Downloads/xa.jpeg") # Image is just the array of pixel or matrix print(img.shape) # Resize the image imgResize =...
0
0
0
603ecd0bc66f07365339135fc944eed79f9b4719
1,104
py
Python
pil/resize_images.py
DaviNakamuraCardoso/Projeto-ATMCP
ac4bbde04294681091d916e83c20c27be67c623a
[ "MIT" ]
null
null
null
pil/resize_images.py
DaviNakamuraCardoso/Projeto-ATMCP
ac4bbde04294681091d916e83c20c27be67c623a
[ "MIT" ]
null
null
null
pil/resize_images.py
DaviNakamuraCardoso/Projeto-ATMCP
ac4bbde04294681091d916e83c20c27be67c623a
[ "MIT" ]
null
null
null
from PIL import Image def quarter(filename): """ :param filename: the filename :return: redefined image """ image = Image.open(filename) width, height = image.size quarter_sized = image.resize((int(width/2), int(height/2))) quarter_sized.save('quarter_sized_%s.png' % filename.strip('....
21.647059
71
0.664855
from PIL import Image def quarter(filename): """ :param filename: the filename :return: redefined image """ image = Image.open(filename) width, height = image.size quarter_sized = image.resize((int(width/2), int(height/2))) quarter_sized.save('quarter_sized_%s.png' % filename.strip('....
0
0
0
5ea8211a68e3e881416fb12591e3895b886d0c2f
4,234
py
Python
conans/test/integration/options_test.py
JosiahOne/conan
4e64c29e7d878230829560b9b51e9e192fc0b8b6
[ "MIT" ]
null
null
null
conans/test/integration/options_test.py
JosiahOne/conan
4e64c29e7d878230829560b9b51e9e192fc0b8b6
[ "MIT" ]
null
null
null
conans/test/integration/options_test.py
JosiahOne/conan
4e64c29e7d878230829560b9b51e9e192fc0b8b6
[ "MIT" ]
null
null
null
import unittest from conans.test.utils.tools import TestClient from conans.paths import CONANINFO from conans.util.files import load import os
34.422764
89
0.624705
import unittest from conans.test.utils.tools import TestClient from conans.paths import CONANINFO from conans.util.files import load import os class OptionsTest(unittest.TestCase): def parsing_test(self): client = TestClient() conanfile = ''' from conans import ConanFile class EqualerrorConan(Con...
3,970
16
104
0fb2ec2756a2a6f552006a936c1e5d61783044d7
60,753
py
Python
toy.py
Gattocrucco/sipmfilter
74215d6c53b998808fc6c677b46030234d996bdf
[ "CC-BY-4.0", "MIT" ]
null
null
null
toy.py
Gattocrucco/sipmfilter
74215d6c53b998808fc6c677b46030234d996bdf
[ "CC-BY-4.0", "MIT" ]
null
null
null
toy.py
Gattocrucco/sipmfilter
74215d6c53b998808fc6c677b46030234d996bdf
[ "CC-BY-4.0", "MIT" ]
null
null
null
""" Module to run a simulation of photodetection signals and test various filters. Classes ------- Toy : the main class to run the simulations Noise : abstract class to generate noise, see concrete subclasses WhiteNoise : generate white noise DataCycleNoise : generate noise copying it from a source array Filter : clas...
37.594678
130
0.545734
""" Module to run a simulation of photodetection signals and test various filters. Classes ------- Toy : the main class to run the simulations Noise : abstract class to generate noise, see concrete subclasses WhiteNoise : generate white noise DataCycleNoise : generate noise copying it from a source array Filter : clas...
15,080
41,470
173
75e0f19fcdc2b334476dff4f3220ae21f3088cb3
1,146
py
Python
ObjectOrientedPython/MultiLevelInheritance.py
dsabhrawal/python-examples
55b3dd6c9fd0b992bcfe3422765dc80fb143a54b
[ "MIT" ]
1
2020-03-01T17:24:20.000Z
2020-03-01T17:24:20.000Z
ObjectOrientedPython/MultiLevelInheritance.py
dsabhrawal/python-examples
55b3dd6c9fd0b992bcfe3422765dc80fb143a54b
[ "MIT" ]
null
null
null
ObjectOrientedPython/MultiLevelInheritance.py
dsabhrawal/python-examples
55b3dd6c9fd0b992bcfe3422765dc80fb143a54b
[ "MIT" ]
null
null
null
# Child class is able to access parent class methods and variables # When one sub-child class is extending child which extends Parent class P = Parent() P.displayP() #P.displayC() #output error as Parent doesn't inherit child methods C = Child() C.displayC() #Child class display C.displayP() #Inherited from pa...
21.622642
72
0.691972
# Child class is able to access parent class methods and variables # When one sub-child class is extending child which extends Parent class class Parent: def __init__(self): super().__init__() print('Parent constructor') def displayP(self): print('Parent Display') class Child(Paren...
276
26
235
276ceaa857bcc924ee73bd6edc9b7ab70190dcd7
3,490
py
Python
RNN/Embedding/Embedding_RNN.py
JimCurryWang/Deep-Learning-Jot
b72e36b54089f7a8b92409b69b7187e84103f76e
[ "MIT" ]
null
null
null
RNN/Embedding/Embedding_RNN.py
JimCurryWang/Deep-Learning-Jot
b72e36b54089f7a8b92409b69b7187e84103f76e
[ "MIT" ]
null
null
null
RNN/Embedding/Embedding_RNN.py
JimCurryWang/Deep-Learning-Jot
b72e36b54089f7a8b92409b69b7187e84103f76e
[ "MIT" ]
null
null
null
import torch import torchvision import torch.nn.functional as F import torchvision.datasets as datasets import torchvision.transforms as transforms from torch import optim from torch import nn from torch.utils.data import DataLoader from tqdm import tqdm # Set device device = torch.device("cuda" if torch.cuda.is_...
30.347826
99
0.667622
import torch import torchvision import torch.nn.functional as F import torchvision.datasets as datasets import torchvision.transforms as transforms from torch import optim from torch import nn from torch.utils.data import DataLoader from tqdm import tqdm # Set device device = torch.device("cuda" if torch.cuda.is_...
394
0
26
e9b777358be7790fcff0d62bac6d7a0a9a8952e4
39,495
py
Python
pa-mixer-mk3.py
mk-fg/pulseaudio-mixer-cli
1d88123d9a060775adf13a0356e8918151dd5995
[ "BSD-3-Clause" ]
67
2015-01-02T07:49:42.000Z
2022-03-18T03:37:53.000Z
pa-mixer-mk3.py
mk-fg/pulseaudio-mixer-cli
1d88123d9a060775adf13a0356e8918151dd5995
[ "BSD-3-Clause" ]
8
2015-03-08T19:04:44.000Z
2018-04-01T09:41:27.000Z
pa-mixer-mk3.py
mk-fg/pulseaudio-mixer-cli
1d88123d9a060775adf13a0356e8918151dd5995
[ "BSD-3-Clause" ]
16
2015-01-02T02:03:22.000Z
2021-05-21T17:31:50.000Z
#!/usr/bin/env python3 import itertools as it, operator as op, functools as ft from collections import OrderedDict, defaultdict, deque, namedtuple from contextlib import contextmanager import os, sys, io, re, time, logging, configparser import base64, hashlib, unicodedata, math import signal, threading from pulsectl ...
36.468144
97
0.691682
#!/usr/bin/env python3 import itertools as it, operator as op, functools as ft from collections import OrderedDict, defaultdict, deque, namedtuple from contextlib import contextmanager import os, sys, io, re, time, logging, configparser import base64, hashlib, unicodedata, math import signal, threading from pulsectl ...
28,166
10,007
600
306bef8e39c23bcd0cf71a704440b1dc3caee8b9
489
py
Python
Curso em Video/ex052.py
CamilliCerutti/Exercicios-de-Python-curso-em-video
6571a5c5cb7b4398352a7778c55588c0c16f13c2
[ "MIT" ]
null
null
null
Curso em Video/ex052.py
CamilliCerutti/Exercicios-de-Python-curso-em-video
6571a5c5cb7b4398352a7778c55588c0c16f13c2
[ "MIT" ]
null
null
null
Curso em Video/ex052.py
CamilliCerutti/Exercicios-de-Python-curso-em-video
6571a5c5cb7b4398352a7778c55588c0c16f13c2
[ "MIT" ]
null
null
null
# NÚMEROS PRIMOS # Faça um programa que leia um número inteiro e diga se ele é ou não um número primo. num = int(input('Digite um numero inteiro: ')) tot = 0 for c in range(1, num + 1): if num % c == 0: print('\033[33m', end='') tot += 1 else: print('\033[31m', end='') print(f'{c} '...
25.736842
85
0.574642
# NÚMEROS PRIMOS # Faça um programa que leia um número inteiro e diga se ele é ou não um número primo. num = int(input('Digite um numero inteiro: ')) tot = 0 for c in range(1, num + 1): if num % c == 0: print('\033[33m', end='') tot += 1 else: print('\033[31m', end='') print(f'{c} '...
0
0
0
6322c42493f30683e459f88fa95afca45d67fb0f
125
py
Python
cli.py
dhaneshnm/nexus-cli
9c210c86c9e7924532b1feb262b67319a7bb8ec6
[ "Apache-2.0" ]
3
2018-09-03T09:04:34.000Z
2019-08-18T15:18:45.000Z
cli.py
dhaneshnm/nexus-cli
9c210c86c9e7924532b1feb262b67319a7bb8ec6
[ "Apache-2.0" ]
5
2018-09-03T09:03:07.000Z
2019-07-09T10:01:19.000Z
cli.py
dhaneshnm/nexus-cli
9c210c86c9e7924532b1feb262b67319a7bb8ec6
[ "Apache-2.0" ]
10
2018-09-03T09:04:38.000Z
2021-12-09T09:45:35.000Z
import click @click.group() import profiles import auth import orgs import projects import resources
8.928571
16
0.752
import click @click.group() def cli(): pass import profiles import auth import orgs import projects import resources
-2
0
22
150188eef1c9e7a46e73130b781732f794cea4ae
4,181
py
Python
pygmt/src/x2sys_init.py
jbusecke/pygmt
9ef6338dbb9bdd4c31dda94da6d4126852a6cd85
[ "BSD-3-Clause" ]
326
2019-02-13T09:33:39.000Z
2022-03-25T17:24:05.000Z
pygmt/src/x2sys_init.py
jbusecke/pygmt
9ef6338dbb9bdd4c31dda94da6d4126852a6cd85
[ "BSD-3-Clause" ]
1,153
2019-01-22T19:14:32.000Z
2022-03-31T22:07:03.000Z
pygmt/src/x2sys_init.py
jbusecke/pygmt
9ef6338dbb9bdd4c31dda94da6d4126852a6cd85
[ "BSD-3-Clause" ]
160
2019-02-10T15:24:19.000Z
2022-03-31T09:07:41.000Z
""" x2sys_init - Initialize a new x2sys track database. """ from pygmt.clib import Session from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias @fmt_docstring @use_alias( D="fmtfile", E="suffix", F="force", G="discontinuity", I="spacing", N="units", R="re...
36.356522
87
0.626405
""" x2sys_init - Initialize a new x2sys track database. """ from pygmt.clib import Session from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias @fmt_docstring @use_alias( D="fmtfile", E="suffix", F="force", G="discontinuity", I="spacing", N="units", R="re...
0
0
0
de0ab9ba82e5cb46cd900a055eb265d9a380f676
3,023
py
Python
ahoproc_tools/io.py
BaiYuhaoSpiceeYJ/SEGAN_denoise
5bf65ae72b9f0a996ae338c53c68c4967e08cd59
[ "MIT" ]
null
null
null
ahoproc_tools/io.py
BaiYuhaoSpiceeYJ/SEGAN_denoise
5bf65ae72b9f0a996ae338c53c68c4967e08cd59
[ "MIT" ]
null
null
null
ahoproc_tools/io.py
BaiYuhaoSpiceeYJ/SEGAN_denoise
5bf65ae72b9f0a996ae338c53c68c4967e08cd59
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2016 Santi Dsp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
37.7875
78
0.691697
""" MIT License Copyright (c) 2016 Santi Dsp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
1,647
0
92
9c0729a0d2a687ca071649142967c9392dd275c4
40,307
py
Python
GraphPackage/GraphLibrary.py
dtklinh/Protein-Rigid-Domains-Estimation
a27152ef5437eb87ee31c317091356c4787f82a4
[ "MIT" ]
null
null
null
GraphPackage/GraphLibrary.py
dtklinh/Protein-Rigid-Domains-Estimation
a27152ef5437eb87ee31c317091356c4787f82a4
[ "MIT" ]
null
null
null
GraphPackage/GraphLibrary.py
dtklinh/Protein-Rigid-Domains-Estimation
a27152ef5437eb87ee31c317091356c4787f82a4
[ "MIT" ]
null
null
null
import igraph as ig from igraph import Graph import numpy as np import sys, os from GraphPackage.AssistantObjects import Feature_Workhouse from GraphPackage.AssistantObjects import DynDomEntry from csb.bio.utils import rmsd from mainPackage.PathAndDir import Dir2TmpFile #from GraphPackage.Graph_Config import Path2Viter...
47.308685
164
0.543131
import igraph as ig from igraph import Graph import numpy as np import sys, os from GraphPackage.AssistantObjects import Feature_Workhouse from GraphPackage.AssistantObjects import DynDomEntry from csb.bio.utils import rmsd from mainPackage.PathAndDir import Dir2TmpFile #from GraphPackage.Graph_Config import Path2Viter...
30,405
7,247
46
f3f9a9fe3f72fc5d2c4970e22cf834c38f3d9c8d
45
py
Python
23/02/1.py
pylangstudy/201706
f1cc6af6b18e5bd393cda27f5166067c4645d4d3
[ "CC0-1.0" ]
null
null
null
23/02/1.py
pylangstudy/201706
f1cc6af6b18e5bd393cda27f5166067c4645d4d3
[ "CC0-1.0" ]
70
2017-06-01T11:02:51.000Z
2017-06-30T00:35:32.000Z
23/02/1.py
pylangstudy/201706
f1cc6af6b18e5bd393cda27f5166067c4645d4d3
[ "CC0-1.0" ]
null
null
null
import sys sys.exit() print('after exit()')
9
21
0.666667
import sys sys.exit() print('after exit()')
0
0
0
b9cba7bccaf2517549a84a89a591b46c6c50958c
1,726
py
Python
src/sciencedates/tests/test_msis.py
scienceopen/sciencedates
8cfe3540b77dba4083e42aa91bb32942e1e26a04
[ "MIT" ]
2
2019-01-18T17:47:07.000Z
2019-08-02T12:43:48.000Z
src/sciencedates/tests/test_msis.py
geospace-code/sciencedates
8cfe3540b77dba4083e42aa91bb32942e1e26a04
[ "MIT" ]
null
null
null
src/sciencedates/tests/test_msis.py
geospace-code/sciencedates
8cfe3540b77dba4083e42aa91bb32942e1e26a04
[ "MIT" ]
2
2018-04-09T06:48:36.000Z
2018-10-26T02:32:15.000Z
""" tests for time conversions relevant to MSISE00 """ from __future__ import annotations import datetime import typing import numpy as np from pytest import approx import sciencedates as sd T: list[typing.Any] = [datetime.datetime(2013, 7, 2, 12, 0, 0)] T.append(T[0].date()) T.append(np.datetime64(T[0])) T.append(...
19.393258
63
0.589803
""" tests for time conversions relevant to MSISE00 """ from __future__ import annotations import datetime import typing import numpy as np from pytest import approx import sciencedates as sd T: list[typing.Any] = [datetime.datetime(2013, 7, 2, 12, 0, 0)] T.append(T[0].date()) T.append(np.datetime64(T[0])) T.append(...
1,251
0
138
5a1cb2a78ede26e932787cec83704b27437a2196
1,978
py
Python
app/views.py
emrpla/PokemonApp
3d64334ef88f3b941181d8ef0d7c3fc40da3a592
[ "MIT" ]
null
null
null
app/views.py
emrpla/PokemonApp
3d64334ef88f3b941181d8ef0d7c3fc40da3a592
[ "MIT" ]
null
null
null
app/views.py
emrpla/PokemonApp
3d64334ef88f3b941181d8ef0d7c3fc40da3a592
[ "MIT" ]
null
null
null
from .serializers import PokemonsSerializer,SinglePokemonSerializer from rest_framework.response import Response from rest_framework.views import APIView import json import requests # PokeList view allows the whole pokemon list to be returned. # SinglePoke view ensures that the pokemon whose id is given will return...
37.320755
136
0.641557
from .serializers import PokemonsSerializer,SinglePokemonSerializer from rest_framework.response import Response from rest_framework.views import APIView import json import requests # PokeList view allows the whole pokemon list to be returned. class PokeList(APIView): def get(self,request): poke_list = []...
1,544
8
96
921849f14036446ebee04a41e8512d8d5fe28969
167
py
Python
multi_add.py
sleepyknife/pchome-api
fa7a91bd79d764259efbc7726a3e4eef006fc953
[ "MIT" ]
null
null
null
multi_add.py
sleepyknife/pchome-api
fa7a91bd79d764259efbc7726a3e4eef006fc953
[ "MIT" ]
null
null
null
multi_add.py
sleepyknife/pchome-api
fa7a91bd79d764259efbc7726a3e4eef006fc953
[ "MIT" ]
null
null
null
import os add_list = ["DBAG0K-A9009ZRQC-000","DBAG0K-1900AZBJY-000"] for index in add_list: os.system("node multi_add_cart.js {} {}".format(index,len(add_list)))
27.833333
73
0.718563
import os add_list = ["DBAG0K-A9009ZRQC-000","DBAG0K-1900AZBJY-000"] for index in add_list: os.system("node multi_add_cart.js {} {}".format(index,len(add_list)))
0
0
0
7c3f9a339d73794c25d19396a757319c0357208c
2,438
py
Python
neutron/pecan_wsgi/hooks/context.py
ISCAS-VDI/neutron-base
687f03d7131839ae8bc324d5823194d1245bb050
[ "Apache-2.0" ]
1
2016-03-25T21:13:13.000Z
2016-03-25T21:13:13.000Z
neutron/pecan_wsgi/hooks/context.py
ISCAS-VDI/neutron-base
687f03d7131839ae8bc324d5823194d1245bb050
[ "Apache-2.0" ]
3
2015-02-27T00:48:55.000Z
2015-04-21T05:29:37.000Z
neutron/pecan_wsgi/hooks/context.py
ISCAS-VDI/neutron-base
687f03d7131839ae8bc324d5823194d1245bb050
[ "Apache-2.0" ]
3
2015-02-26T00:55:17.000Z
2020-03-01T17:05:40.000Z
# Copyright 2012 New Dream Network, LLC (DreamHost) # 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 # # ...
39.967213
78
0.661608
# Copyright 2012 New Dream Network, LLC (DreamHost) # 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 # # ...
1,041
0
27
ed45f65ae6266c8fc0b18d4ceb1c91e3bbb76114
1,420
py
Python
microservices/nris_api/backend/app/nris/utils/apm.py
ActionAnalytics/mds
7ac61b0b73b1d310db7dcf2d830b5746b851fe4a
[ "Apache-2.0" ]
null
null
null
microservices/nris_api/backend/app/nris/utils/apm.py
ActionAnalytics/mds
7ac61b0b73b1d310db7dcf2d830b5746b851fe4a
[ "Apache-2.0" ]
null
null
null
microservices/nris_api/backend/app/nris/utils/apm.py
ActionAnalytics/mds
7ac61b0b73b1d310db7dcf2d830b5746b851fe4a
[ "Apache-2.0" ]
1
2020-01-22T14:19:16.000Z
2020-01-22T14:19:16.000Z
from app.extensions import sched from elasticapm import Client from flask import current_app def register_apm(name=None): """This decorator wraps a passed function with a call to the app's registered Elastic APM instance :param object: Function to be wrapped and decorator parameters by calling :type obj...
33.809524
102
0.583099
from app.extensions import sched from elasticapm import Client from flask import current_app def register_apm(name=None): """This decorator wraps a passed function with a call to the app's registered Elastic APM instance :param object: Function to be wrapped and decorator parameters by calling :type obj...
946
0
27
5582d53957768833391f6254515e16a0ade24abf
81
py
Python
src/hist/core.py
VANRao-Stack/my_hist
0ddca0593038f7916fb5e7b0bf862dc9a9500e10
[ "MIT" ]
null
null
null
src/hist/core.py
VANRao-Stack/my_hist
0ddca0593038f7916fb5e7b0bf862dc9a9500e10
[ "MIT" ]
null
null
null
src/hist/core.py
VANRao-Stack/my_hist
0ddca0593038f7916fb5e7b0bf862dc9a9500e10
[ "MIT" ]
null
null
null
from boost_histogram import Histogram
13.5
38
0.740741
from boost_histogram import Histogram class BaseHist(Histogram): pass
0
15
25
a404cec6aaf3a557fd5bc8b1e937f7be03a217d4
2,980
py
Python
20_Stats_for_Featurizer.py
bjascob/amr_coref
e062fcf39b3db82889a58e52fd2cfdb772a279dc
[ "MIT" ]
1
2021-03-04T13:02:04.000Z
2021-03-04T13:02:04.000Z
20_Stats_for_Featurizer.py
bjascob/amr_coref
e062fcf39b3db82889a58e52fd2cfdb772a279dc
[ "MIT" ]
1
2021-12-05T18:48:58.000Z
2021-12-05T18:48:58.000Z
20_Stats_for_Featurizer.py
bjascob/amr_coref
e062fcf39b3db82889a58e52fd2cfdb772a279dc
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import numpy from tqdm import tqdm from collections import defaultdict from amr_coref.utils.logging import setup_logging, ERROR from amr_coref.coref.coref_mention_data import CorefMentionData from amr_coref.utils.data_utils import load_json from amr_coref.coref.vocab_embeddings import loa...
44.477612
103
0.643624
#!/usr/bin/python3 import numpy from tqdm import tqdm from collections import defaultdict from amr_coref.utils.logging import setup_logging, ERROR from amr_coref.coref.coref_mention_data import CorefMentionData from amr_coref.utils.data_utils import load_json from amr_coref.coref.vocab_embeddings import loa...
0
0
0
6fa47628b7be9fbafae3dc5de18b3ec5d702f81e
970
py
Python
nlplingo/tasks/eventpair/feature.py
BBN-E/nlplingo
32ff17b1320937faa3d3ebe727032f4b3e7a353d
[ "Apache-2.0" ]
3
2020-10-22T13:28:00.000Z
2022-03-24T19:57:22.000Z
nlplingo/tasks/eventpair/feature.py
BBN-E/nlplingo
32ff17b1320937faa3d3ebe727032f4b3e7a353d
[ "Apache-2.0" ]
null
null
null
nlplingo/tasks/eventpair/feature.py
BBN-E/nlplingo
32ff17b1320937faa3d3ebe727032f4b3e7a353d
[ "Apache-2.0" ]
1
2020-10-22T13:29:51.000Z
2020-10-22T13:29:51.000Z
# +1 # +1 # This class is very simple because it does not actually generate features itself. # Instead, it simply uses the features generated by the trigger model. Currently, to represent a pair of event mentions, # it uses just the embeddings associated with the two anchors (with optional window size)
34.642857
120
0.730928
# +1 class EventPairFeature(object): def __init__(self, features): """ :type features: list[str] """ self.feature_strings = features self.c_trigger_window_vector1 = 'trigger_window_vector1' self.c_trigger_window_vector2 = 'trigger_window_vector2' self.trig...
137
453
70