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
b558f4729be0aa98c2ad900457f20593df16d0f5
17,012
py
Python
openerp/addons/mail/mail_mail.py
ntiufalara/openerp7
903800da0644ec0dd9c1dcd34205541f84d45fe4
[ "MIT" ]
3
2016-01-29T14:39:49.000Z
2018-12-29T22:42:00.000Z
openerp/addons/mail/mail_mail.py
ntiufalara/openerp7
903800da0644ec0dd9c1dcd34205541f84d45fe4
[ "MIT" ]
2
2016-03-23T14:29:41.000Z
2017-02-20T17:11:30.000Z
openerp/addons/mail/mail_mail.py
ntiufalara/openerp7
903800da0644ec0dd9c1dcd34205541f84d45fe4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
51.087087
133
0.6081
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
1,826
0
162
27acaab673252d4b7266cdbbc2d11f4abab7293b
3,043
py
Python
iconsdk/libs/in_memory_zip.py
geometry-labs/icon-sdk-python
e530df02eb16b394c3022d2d7d0383bd972e129a
[ "Apache-2.0" ]
51
2018-08-29T04:15:36.000Z
2022-03-14T10:02:08.000Z
iconsdk/libs/in_memory_zip.py
geometry-labs/icon-sdk-python
e530df02eb16b394c3022d2d7d0383bd972e129a
[ "Apache-2.0" ]
24
2018-09-03T03:16:19.000Z
2022-01-17T08:28:04.000Z
iconsdk/libs/in_memory_zip.py
geometry-labs/icon-sdk-python
e530df02eb16b394c3022d2d7d0383bd972e129a
[ "Apache-2.0" ]
44
2018-09-06T22:36:16.000Z
2022-03-15T06:46:05.000Z
# -*- coding: utf-8 -*- # Copyright 2018 ICON Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
34.191011
95
0.562603
# -*- coding: utf-8 -*- # Copyright 2018 ICON Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
34
0
27
c21fb14af02a04b30a0dc5a0c0615136eac0e954
381
py
Python
CH01_Algorithm_ADS/1.11.Naming_a_slice.py
Chang-Liu-TAMU/Python-Cookbook-reading
7b974c32f77b4b3d7cfeed30d1671081057c566f
[ "MIT" ]
null
null
null
CH01_Algorithm_ADS/1.11.Naming_a_slice.py
Chang-Liu-TAMU/Python-Cookbook-reading
7b974c32f77b4b3d7cfeed30d1671081057c566f
[ "MIT" ]
null
null
null
CH01_Algorithm_ADS/1.11.Naming_a_slice.py
Chang-Liu-TAMU/Python-Cookbook-reading
7b974c32f77b4b3d7cfeed30d1671081057c566f
[ "MIT" ]
null
null
null
a = list(range(10)) slice1 = slice(0, 3) slice2 = slice(4, 8) print(a[slice1]) print(a[slice2]) a[slice2] = ["@", "#", "$", "%"] print(a) del a[slice1] print(a) print(f"slice start: {slice1.start}") print(f"slice stop: {slice1.stop}") print(f"slice step: {slice1.step}") c = slice(0, 100, 3) s = "0as0ef0df0vd0ef0d" ...
17.318182
37
0.603675
a = list(range(10)) slice1 = slice(0, 3) slice2 = slice(4, 8) print(a[slice1]) print(a[slice2]) a[slice2] = ["@", "#", "$", "%"] print(a) del a[slice1] print(a) print(f"slice start: {slice1.start}") print(f"slice stop: {slice1.stop}") print(f"slice step: {slice1.step}") c = slice(0, 100, 3) s = "0as0ef0df0vd0ef0d" ...
0
0
0
d713f5b3fe1e13db25afe646381d31f344f05f8d
2,293
py
Python
provision/08-create-keystone-stuff.py
norcams/himlar-connect
8d375953aa6747471d1b32cf3b8a7b1dd1a1adf4
[ "Apache-2.0" ]
null
null
null
provision/08-create-keystone-stuff.py
norcams/himlar-connect
8d375953aa6747471d1b32cf3b8a7b1dd1a1adf4
[ "Apache-2.0" ]
5
2015-12-10T07:48:20.000Z
2016-03-16T09:44:42.000Z
provision/08-create-keystone-stuff.py
norcams/himlar-connect
8d375953aa6747471d1b32cf3b8a7b1dd1a1adf4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import ConfigParser import requests import json cp = ConfigParser.SafeConfigParser() cp.read('/etc/keystone/keystone.conf') token = cp.get('DEFAULT', 'admin_token') baseurl = 'http://localhost:35357/v3/OS-FEDERATION' headers = { 'X-Auth-Token': token, 'Content-Type': 'application/json',...
35.276923
92
0.63672
#!/usr/bin/env python import ConfigParser import requests import json cp = ConfigParser.SafeConfigParser() cp.read('/etc/keystone/keystone.conf') token = cp.get('DEFAULT', 'admin_token') baseurl = 'http://localhost:35357/v3/OS-FEDERATION' headers = { 'X-Auth-Token': token, 'Content-Type': 'application/json',...
0
0
0
405a8cd18663f1cbb1ec07cd8a60a7e43de9624e
650
py
Python
model-optimizer/unit_tests/extensions/front/tf/concat_ext_test.py
monroid/openvino
8272b3857ef5be0aaa8abbf7bd0d5d5615dc40b6
[ "Apache-2.0" ]
2,406
2020-04-22T15:47:54.000Z
2022-03-31T10:27:37.000Z
model-optimizer/unit_tests/extensions/front/tf/concat_ext_test.py
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
4,948
2020-04-22T15:12:39.000Z
2022-03-31T18:45:42.000Z
model-optimizer/unit_tests/extensions/front/tf/concat_ext_test.py
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
991
2020-04-23T18:21:09.000Z
2022-03-31T18:40:57.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from extensions.front.tf.concat_ext import ConcatFrontExtractor from unit_tests.utils.extractors import PB, BaseExtractorsTestingClass
29.545455
70
0.589231
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 from extensions.front.tf.concat_ext import ConcatFrontExtractor from unit_tests.utils.extractors import PB, BaseExtractorsTestingClass class ConcatExtractorTest(BaseExtractorsTestingClass): def test_concat(self): node = PB(...
349
33
49
de2ba11bf8bbd61c7fd9256c51e91542ed514075
4,034
bzl
Python
tools/project/build_defs.bzl
TokTok/toktok-stack
fe60e13d42d2b45e13ea4a9448a49925bc6a6d89
[ "CNRI-Python", "AML", "Xnet", "Linux-OpenIB", "X11" ]
12
2016-10-16T09:36:50.000Z
2021-12-02T03:59:24.000Z
tools/project/build_defs.bzl
TokTok/toktok-stack
fe60e13d42d2b45e13ea4a9448a49925bc6a6d89
[ "CNRI-Python", "AML", "Xnet", "Linux-OpenIB", "X11" ]
218
2016-12-31T23:35:51.000Z
2022-03-30T15:55:07.000Z
tools/project/build_defs.bzl
TokTok/toktok-stack
fe60e13d42d2b45e13ea4a9448a49925bc6a6d89
[ "CNRI-Python", "AML", "Xnet", "Linux-OpenIB", "X11" ]
6
2016-09-20T12:43:36.000Z
2021-08-06T17:39:52.000Z
"""Defines a project macro used in every TokTok sub-project. It checks constraints such as the use of the correct license and the presence and correctness of the license text. """ _haskell_travis = rule( attrs = { "package": attr.string(mandatory = True), "_template": attr.label( defau...
27.256757
99
0.515865
"""Defines a project macro used in every TokTok sub-project. It checks constraints such as the use of the correct license and the presence and correctness of the license text. """ def _haskell_travis_impl(ctx): ctx.actions.expand_template( template = ctx.file._template, output = ctx.outputs.source...
2,133
0
69
242e324ff0c40c3ccd9b5370c481cb686b1eb1e8
7,658
py
Python
daydayup_submit/model.py
daydayupPro/KDDCup2020_AutoGraph
9ce2e6ecec50c4a6f99d832cd5f8370fe985a519
[ "MIT" ]
1
2020-06-16T00:03:50.000Z
2020-06-16T00:03:50.000Z
daydayup_submit/model.py
daydayupPro/KDDCup2020_AutoGraph
9ce2e6ecec50c4a6f99d832cd5f8370fe985a519
[ "MIT" ]
2
2020-06-16T00:05:46.000Z
2020-11-10T11:17:17.000Z
daydayup_submit/model.py
daydayupPro/KDDCup2020_AutoGraph
9ce2e6ecec50c4a6f99d832cd5f8370fe985a519
[ "MIT" ]
4
2020-06-11T07:17:11.000Z
2020-06-16T00:05:50.000Z
"""the simple baseline for autograph""" import numpy as np import pandas as pd import torch import torch.nn.functional as F from torch.nn import Linear from torch_geometric.nn import GCNConv, JumpingKnowledge from torch_geometric.data import Data from torch_geometric.nn import Node2Vec from torch.utils.dat...
36.122642
217
0.57391
"""the simple baseline for autograph""" import numpy as np import pandas as pd import torch import torch.nn.functional as F from torch.nn import Linear from torch_geometric.nn import GCNConv, JumpingKnowledge from torch_geometric.data import Data from torch_geometric.nn import Node2Vec from torch.utils.dat...
6,701
-9
166
545bdc14f39b8de2b64e34671f1d58d8fef59fff
5,175
py
Python
polling_stations/apps/data_importers/management/commands/import_bolton.py
zuzak/UK-Polling-Stations
bddfd52ad5da09d6310c8e72c9646bed2add2578
[ "BSD-3-Clause" ]
null
null
null
polling_stations/apps/data_importers/management/commands/import_bolton.py
zuzak/UK-Polling-Stations
bddfd52ad5da09d6310c8e72c9646bed2add2578
[ "BSD-3-Clause" ]
364
2020-10-19T07:16:41.000Z
2022-03-31T06:10:55.000Z
polling_stations/apps/data_importers/management/commands/import_bolton.py
zuzak/UK-Polling-Stations
bddfd52ad5da09d6310c8e72c9646bed2add2578
[ "BSD-3-Clause" ]
null
null
null
from data_importers.management.commands import BaseXpressDemocracyClubCsvImporter
55.053191
119
0.622802
from data_importers.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = "E08000001" addresses_name = ( "parl.2019-12-12/Version 1/Democracy_Club__12December2019Bolton.CSV" ) stations_name = "parl.2019-12-12/Version 1/Dem...
4,680
389
23
58c5d7e9701ddb6a19212520e727f15050de1fcc
4,412
py
Python
E2E/utility/utility_np.py
FrancescoMarra/E2E-ForgeryDetection
352a788cdbe00184a6a29158c5c315a9832b326e
[ "BSD-4-Clause-UC" ]
26
2020-04-10T13:25:12.000Z
2022-03-20T12:27:02.000Z
E2E/utility/utility_np.py
FrancescoMarra/E2E-ForgeryDetection
352a788cdbe00184a6a29158c5c315a9832b326e
[ "BSD-4-Clause-UC" ]
10
2020-04-05T10:42:47.000Z
2022-03-12T00:12:23.000Z
E2E/utility/utility_np.py
FrancescoMarra/E2E-ForgeryDetection
352a788cdbe00184a6a29158c5c315a9832b326e
[ "BSD-4-Clause-UC" ]
5
2020-04-05T10:44:36.000Z
2022-03-29T06:41:03.000Z
# -*- coding: utf-8 -*- # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # # Copyright (c) 2019 Image Processing Research Group of University Federico II of Naples ('GRIP-UNINA'). # All rights reserved. # This work should only be used for nonprofit purposes. # # By downloading and/or u...
36.46281
212
0.546464
# -*- coding: utf-8 -*- # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # # Copyright (c) 2019 Image Processing Research Group of University Federico II of Naples ('GRIP-UNINA'). # All rights reserved. # This work should only be used for nonprofit purposes. # # By downloading and/or u...
3,550
0
50
685146d94e80465728e0ac16651b1e598592e6af
46,188
py
Python
sandbox/lib/jumpscale/JumpscaleLibsExtra/clients/racktivity/energyswitch/common/GUIDTable.py
threefoldtech/threebot_prebuilt
1f0e1c65c14cef079cd80f73927d7c8318755c48
[ "Apache-2.0" ]
1
2020-10-05T08:53:57.000Z
2020-10-05T08:53:57.000Z
sandbox/lib/jumpscale/JumpscaleLibsExtra/clients/racktivity/energyswitch/common/GUIDTable.py
threefoldtech/threebot_prebuilt
1f0e1c65c14cef079cd80f73927d7c8318755c48
[ "Apache-2.0" ]
17
2019-11-14T08:41:37.000Z
2020-05-27T09:23:51.000Z
sandbox/lib/jumpscale/JumpscaleLibsExtra/clients/racktivity/energyswitch/common/GUIDTable.py
threefoldtech/threebot_prebuilt
1f0e1c65c14cef079cd80f73927d7c8318755c48
[ "Apache-2.0" ]
null
null
null
# pylint: disable=W0201 from Jumpscale import j JSBASE = j.baseclasses.object # Variables functions = {} func = Functions() functions[1] = func func.guid = 1 func.name = "GeneralModuleStatus" func.description = "General status of a module" func.read = 1 func.write = 0 func.valDef = Value() func.valDef.type = ...
21.442897
257
0.720165
# pylint: disable=W0201 from Jumpscale import j JSBASE = j.baseclasses.object class Value(j.baseclasses.object): def __init__(self, initStr=None, **kwargs): JSBASE.__init__(self) # Initialize everything with None self.fields = ("type", "size", "length", "unit", "version", "scale", "min", ...
961
30
153
132be6fea7c50a7a170c4f9aa91f51ac86857654
576
py
Python
Python/pyworkout/strings/ex7.py
honchardev/Fun
ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc
[ "MIT" ]
null
null
null
Python/pyworkout/strings/ex7.py
honchardev/Fun
ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc
[ "MIT" ]
3
2020-03-24T16:26:35.000Z
2020-04-15T19:40:41.000Z
Python/pyworkout/strings/ex7.py
honchardev/Fun
ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc
[ "MIT" ]
null
null
null
if __name__ == '__main__': main()
20.571429
57
0.600694
def ubbi_dubbi( word: str ) -> str: if len(word) == 0: return word vowels = {'a', 'e', 'i', 'o', 'u'} translated_word_letters = [] for letter in word: if letter.lower() in vowels: prefix_to_add = 'ub' translated_word_letters.append(prefix_to_add) tra...
490
0
45
6fd23260949277ea92d89c10373634f8d0942f55
228
py
Python
app_backend/databases/bearing.py
zhanghe06/bearing_project
78a20fc321f72d3ae05c7ab7e52e01d02904e3fc
[ "MIT" ]
1
2020-06-21T04:08:26.000Z
2020-06-21T04:08:26.000Z
app_backend/databases/bearing.py
zhanghe06/bearing_project
78a20fc321f72d3ae05c7ab7e52e01d02904e3fc
[ "MIT" ]
13
2019-10-18T17:19:32.000Z
2022-01-13T00:44:43.000Z
app_backend/databases/bearing.py
zhanghe06/bearing_project
78a20fc321f72d3ae05c7ab7e52e01d02904e3fc
[ "MIT" ]
5
2019-02-07T03:15:16.000Z
2021-09-04T14:06:28.000Z
#!/usr/bin/env python # encoding: utf-8 """ @author: zhanghe @software: PyCharm @file: bearing.py @time: 2020-02-29 23:23 """ from flask_sqlalchemy import SQLAlchemy from app_backend import app db_bearing = SQLAlchemy(app)
13.411765
39
0.732456
#!/usr/bin/env python # encoding: utf-8 """ @author: zhanghe @software: PyCharm @file: bearing.py @time: 2020-02-29 23:23 """ from flask_sqlalchemy import SQLAlchemy from app_backend import app db_bearing = SQLAlchemy(app)
0
0
0
627df465bd86b19b5a94d072b880cccd05eaaae8
15,404
py
Python
jukio/autoplay.py
tomow1/jukio
5e3e8b06c1350d76c7d1a2e4cca7d9387687256e
[ "MIT" ]
null
null
null
jukio/autoplay.py
tomow1/jukio
5e3e8b06c1350d76c7d1a2e4cca7d9387687256e
[ "MIT" ]
null
null
null
jukio/autoplay.py
tomow1/jukio
5e3e8b06c1350d76c7d1a2e4cca7d9387687256e
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ''' Keeps your MPD playlist filled with music you like Dependencies : python-mpd pysqlite ''' import os import mpd import random import sqlite3 import time import io import sys import socket ## Config playtime = 70 # Percentage of a song that must be pla...
28.57885
91
0.573358
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ''' Keeps your MPD playlist filled with music you like Dependencies : python-mpd pysqlite ''' import os import mpd import random import sqlite3 import time import io import sys import socket ## Config playtime = 70 # Percentage of a song that must be pla...
11,557
0
344
dc4f791b106666858e2a4f2913316894e07b0ff6
2,528
py
Python
igata/handlers/aws/output/sqs.py
kiconiaworks/igata
1d8a4b82a65eb936d5d8f8ff70747ba82ddef31a
[ "BSD-2-Clause" ]
1
2021-12-31T14:29:44.000Z
2021-12-31T14:29:44.000Z
igata/handlers/aws/output/sqs.py
kiconiaworks/igata
1d8a4b82a65eb936d5d8f8ff70747ba82ddef31a
[ "BSD-2-Clause" ]
6
2019-11-25T04:20:26.000Z
2021-12-13T05:23:16.000Z
igata/handlers/aws/output/sqs.py
kiconiaworks/igata
1d8a4b82a65eb936d5d8f8ff70747ba82ddef31a
[ "BSD-2-Clause" ]
null
null
null
import json import logging from collections import Counter from typing import Union import boto3 from .... import settings from . import OutputCtxManagerBase logger = logging.getLogger("cliexecutor") SQS = boto3.client("sqs", endpoint_url=settings.SQS_ENDPOINT, region_name="ap-northeast-1") class SQSRecordOutputCt...
37.731343
142
0.676424
import json import logging from collections import Counter from typing import Union import boto3 from .... import settings from . import OutputCtxManagerBase logger = logging.getLogger("cliexecutor") SQS = boto3.client("sqs", endpoint_url=settings.SQS_ENDPOINT, region_name="ap-northeast-1") class SQSRecordOutputCt...
529
0
81
e9e1e37dad186954ae5ac1b1729fca8e3c617b7a
1,768
py
Python
capsule/net.py
VIVelev/capsnets
dca4bfcd4007977a6bc3534a4676880326fcf94a
[ "MIT" ]
null
null
null
capsule/net.py
VIVelev/capsnets
dca4bfcd4007977a6bc3534a4676880326fcf94a
[ "MIT" ]
null
null
null
capsule/net.py
VIVelev/capsnets
dca4bfcd4007977a6bc3534a4676880326fcf94a
[ "MIT" ]
1
2019-11-03T09:39:49.000Z
2019-11-03T09:39:49.000Z
import torch import torch.nn as nn import torch.nn.functional as F from .layers import ConvLayer, Decoder, DigitCaps, PrimaryCaps __all__ = [ 'CapsNet', ] class CapsNet(nn.Module): '''Capsule Network''' @staticmethod @staticmethod @staticmethod
34
124
0.662896
import torch import torch.nn as nn import torch.nn.functional as F from .layers import ConvLayer, Decoder, DigitCaps, PrimaryCaps __all__ = [ 'CapsNet', ] class CapsNet(nn.Module): '''Capsule Network''' def __init__(self, num_capsules=10, in_channels=1, num_inputs_per_capsule=32*6*6, out_dim=28*28,...
1,352
0
136
b5c3cdefd2b6a2c429eb27b4ed87e962300b20ff
17,030
py
Python
codes/PrepareDataset.py
yanda-wang/ARMGA
f2dcade00b1271e5814dacaa2b6f9de63ea7077a
[ "BSD-3-Clause" ]
4
2021-03-23T23:37:03.000Z
2022-01-13T01:13:28.000Z
codes/PrepareDataset.py
yanda-wang/ARMGA
f2dcade00b1271e5814dacaa2b6f9de63ea7077a
[ "BSD-3-Clause" ]
null
null
null
codes/PrepareDataset.py
yanda-wang/ARMGA
f2dcade00b1271e5814dacaa2b6f9de63ea7077a
[ "BSD-3-Clause" ]
null
null
null
import csv import dill import itertools import math import pandas as pd import numpy as np from itertools import combinations from sklearn.model_selection import train_test_split from tqdm import tqdm med_file = 'data/PRESCRIPTIONS.csv' diag_file = 'data/DIAGNOSES_ICD.csv' procedure_file = 'data/PROCEDURES_ICD.csv' ...
41.740196
150
0.661362
import csv import dill import itertools import math import pandas as pd import numpy as np from itertools import combinations from sklearn.model_selection import train_test_split from tqdm import tqdm med_file = 'data/PRESCRIPTIONS.csv' diag_file = 'data/DIAGNOSES_ICD.csv' procedure_file = 'data/PROCEDURES_ICD.csv' ...
15,128
4
401
1df2694a3bb7653200bc5f5e27eae8c5e5f858e0
5,223
py
Python
tests/unit/workflows/dotnet_clipackage/test_actions.py
wchengru/aws-lambda-builders
0f2abdcb3a83ab46440abd6a6c4350ce67fd1f7a
[ "Apache-2.0" ]
1
2021-07-10T14:34:20.000Z
2021-07-10T14:34:20.000Z
tests/unit/workflows/dotnet_clipackage/test_actions.py
wchengru/aws-lambda-builders
0f2abdcb3a83ab46440abd6a6c4350ce67fd1f7a
[ "Apache-2.0" ]
null
null
null
tests/unit/workflows/dotnet_clipackage/test_actions.py
wchengru/aws-lambda-builders
0f2abdcb3a83ab46440abd6a6c4350ce67fd1f7a
[ "Apache-2.0" ]
null
null
null
from unittest import TestCase from concurrent.futures import ThreadPoolExecutor from mock import patch import os import platform from aws_lambda_builders.actions import ActionFailedError from aws_lambda_builders.workflows.dotnet_clipackage.dotnetcli import DotnetCLIExecutionError from aws_lambda_builders.workflows.do...
38.404412
117
0.684664
from unittest import TestCase from concurrent.futures import ThreadPoolExecutor from mock import patch import os import platform from aws_lambda_builders.actions import ActionFailedError from aws_lambda_builders.workflows.dotnet_clipackage.dotnetcli import DotnetCLIExecutionError from aws_lambda_builders.workflows.do...
4,070
621
45
77628e4e80f121e07de23f836240620bb990306b
3,783
py
Python
htmlfilter/__init__.py
samueladam/htmlfilter
32c9a3ac50214e20bc4f8b85e9e8e5fcd137ff3f
[ "BSD-3-Clause" ]
null
null
null
htmlfilter/__init__.py
samueladam/htmlfilter
32c9a3ac50214e20bc4f8b85e9e8e5fcd137ff3f
[ "BSD-3-Clause" ]
1
2021-04-29T14:29:39.000Z
2021-04-29T14:29:39.000Z
htmlfilter/__init__.py
samueladam/htmlfilter
32c9a3ac50214e20bc4f8b85e9e8e5fcd137ff3f
[ "BSD-3-Clause" ]
null
null
null
import re from collections import defaultdict import rules attrs_re = re.compile(r"""\s*(\w+)\s*=\s*(["'])(.*?)(?<!\\)\2""", re.DOTALL) class HTMLFilter: """Simple HTML white list filter. Usage: hf = HTMLFilter() filtered_html = hf.filter(html) The filter parses the code for < and > ch...
32.059322
84
0.486651
import re from collections import defaultdict import rules attrs_re = re.compile(r"""\s*(\w+)\s*=\s*(["'])(.*?)(?<!\\)\2""", re.DOTALL) class HTMLFilter: """Simple HTML white list filter. Usage: hf = HTMLFilter() filtered_html = hf.filter(html) The filter parses the code for < and > ch...
3,070
0
162
c07709071c9f9eaa1f7eed96069e6eb047c7e7ba
1,280
py
Python
tools/funcutils.py
dineshjoshi/cassandra-dtest-1
18ccbb4d308c27b67a8d81a2c849dc27fc3e2b5c
[ "Apache-2.0" ]
52
2015-02-13T15:49:03.000Z
2020-11-15T10:59:20.000Z
tools/funcutils.py
dineshjoshi/cassandra-dtest-1
18ccbb4d308c27b67a8d81a2c849dc27fc3e2b5c
[ "Apache-2.0" ]
1,232
2015-01-05T19:31:26.000Z
2020-06-07T02:59:43.000Z
tools/funcutils.py
dineshjoshi/cassandra-dtest-1
18ccbb4d308c27b67a8d81a2c849dc27fc3e2b5c
[ "Apache-2.0" ]
105
2017-07-13T14:28:14.000Z
2022-03-23T04:22:46.000Z
import time class get_rate_limited_function(object): """ Close over a function and a time limit in seconds. The resulting object can be called like the function, but will not delegate to the function if that function was called through the object in the time limit. Clients can ignore the time lim...
31.219512
90
0.645313
import time class get_rate_limited_function(object): """ Close over a function and a time limit in seconds. The resulting object can be called like the function, but will not delegate to the function if that function was called through the object in the time limit. Clients can ignore the time lim...
520
0
80
2ad4743e108cbde934ef319c28fa3ec378322843
780
py
Python
jinja2_ospath/extensions.py
Midnighter/jinja2-ospath
624aee8f552dd38d1eea97289e3ab194b105d843
[ "BSD-3-Clause" ]
6
2017-04-05T02:41:52.000Z
2020-10-25T19:42:24.000Z
jinja2_ospath/extensions.py
Midnighter/jinja2-ospath
624aee8f552dd38d1eea97289e3ab194b105d843
[ "BSD-3-Clause" ]
null
null
null
jinja2_ospath/extensions.py
Midnighter/jinja2-ospath
624aee8f552dd38d1eea97289e3ab194b105d843
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Extensions that introduce `basename` and `dirname` as Jinja2 filters. Examples -------- my_path = "/some/absolute/path/with/file.txt" {{ my_path | basename }} Will fill in `file.txt`. """ from __future__ import absolute_import import os.path from jinja2.ext import Extension _...
22.941176
74
0.675641
# -*- coding: utf-8 -*- """ Extensions that introduce `basename` and `dirname` as Jinja2 filters. Examples -------- my_path = "/some/absolute/path/with/file.txt" {{ my_path | basename }} Will fill in `file.txt`. """ from __future__ import absolute_import import os.path from jinja2.ext import Extension _...
0
0
0
3f7a9a00e6eb0b0cea9311cfb15837a64aaa0513
4,190
py
Python
pytest_pdb.py
fschulze/pytest-pdb
88bb88a20c6e69ec4e3da4a2d6cabac9cfb2cd86
[ "MIT" ]
9
2016-07-09T12:22:57.000Z
2019-11-11T17:50:38.000Z
pytest_pdb.py
fschulze/pytest-pdb
88bb88a20c6e69ec4e3da4a2d6cabac9cfb2cd86
[ "MIT" ]
9
2016-08-23T18:38:28.000Z
2019-10-21T07:14:27.000Z
pytest_pdb.py
fschulze/pytest-pdb
88bb88a20c6e69ec4e3da4a2d6cabac9cfb2cd86
[ "MIT" ]
1
2017-01-16T17:55:52.000Z
2017-01-16T17:55:52.000Z
from __future__ import print_function import pdb import pytest import sys
28.120805
74
0.583055
from __future__ import print_function import pdb import pytest import sys def find_test_by_frame(currentframe): frame = currentframe prev = frame while frame: for value in frame.f_locals.values(): if isinstance(value, pytest.Item): return (value, prev) prev = fr...
2,537
1,387
184
90202dc319205aa9dfe44731814dba7ab2969a14
517
py
Python
pct_python_default_test/pct_python_default_test.py
bitranox/pct_python_default_test
1220b36c2fbc345fcabc43f0b9934db8415f682c
[ "MIT" ]
null
null
null
pct_python_default_test/pct_python_default_test.py
bitranox/pct_python_default_test
1220b36c2fbc345fcabc43f0b9934db8415f682c
[ "MIT" ]
1
2020-07-16T21:52:39.000Z
2020-07-16T21:52:39.000Z
pct_python_default_test/pct_python_default_test.py
bitranox/pct_python_default_test
1220b36c2fbc345fcabc43f0b9934db8415f682c
[ "MIT" ]
null
null
null
# STDLIB import sys # main{{{ def main() -> None: """ the main method, prints hello world Parameter ---------- none none Result ---------- none Exceptions ---------- none Examples ---------- >>> main() Hello World - by PizzaCutter """ ...
12.609756
111
0.524178
# STDLIB import sys # main{{{ def main() -> None: """ the main method, prints hello world Parameter ---------- none none Result ---------- none Exceptions ---------- none Examples ---------- >>> main() Hello World - by PizzaCutter """ ...
0
0
0
0bb859a0f09642ca495e7ada8a843bbeabd7c425
1,354
py
Python
receiver/f12021/packets/base.py
f1laps/f1laps-telemetry
0c264f9300d58397fe2f8b3018cd2e9151e28d08
[ "MIT" ]
3
2021-02-23T22:06:13.000Z
2022-02-06T15:05:56.000Z
receiver/f12021/packets/base.py
f1laps/f1laps-telemetry
0c264f9300d58397fe2f8b3018cd2e9151e28d08
[ "MIT" ]
null
null
null
receiver/f12021/packets/base.py
f1laps/f1laps-telemetry
0c264f9300d58397fe2f8b3018cd2e9151e28d08
[ "MIT" ]
null
null
null
import ctypes from lib.logger import log from receiver.game_version import CrossGamePacketHeader class PacketHeader(CrossGamePacketHeader): """ The Packet Header is the same across F12020 and F12021 Hence we use one shared HeaderClass for now May have to upgrade that logic if it changes """ ...
32.238095
113
0.585672
import ctypes from lib.logger import log from receiver.game_version import CrossGamePacketHeader class PacketBase(ctypes.LittleEndianStructure): _pack_ = 1 creates_session_object = False def process(self, session): log.debug("Skipping incoming %s because it doesn't have a '.process()' method" % ...
143
863
23
b9598b4ab45217317e00c390d5206308d71afa14
18,121
py
Python
_build/jupyter_execute/ipynb/04b-plotagem-matplotlib.py
gcpeixoto/FMECD
9bca72574c6630d1594396fffef31cfb8d58dec2
[ "CC0-1.0" ]
null
null
null
_build/jupyter_execute/ipynb/04b-plotagem-matplotlib.py
gcpeixoto/FMECD
9bca72574c6630d1594396fffef31cfb8d58dec2
[ "CC0-1.0" ]
null
null
null
_build/jupyter_execute/ipynb/04b-plotagem-matplotlib.py
gcpeixoto/FMECD
9bca72574c6630d1594396fffef31cfb8d58dec2
[ "CC0-1.0" ]
null
null
null
# Plotagem básica com _matplotlib_ ## Visualização de dados A visualização de dados é um campo do conhecimento bastante antigo que foi trazido à mostra muito recentemente com a expansão do "Big Data". Seu principal objetivo é representar dados e informações graficamente por meio de elementos visuais como tabelas, gr...
41.372146
825
0.698306
# Plotagem básica com _matplotlib_ ## Visualização de dados A visualização de dados é um campo do conhecimento bastante antigo que foi trazido à mostra muito recentemente com a expansão do "Big Data". Seu principal objetivo é representar dados e informações graficamente por meio de elementos visuais como tabelas, gr...
186
0
22
dbe37567374d909bfebaafcf8a547d45b740d7e5
10,249
py
Python
character_tracker/character.py
mwalla/motw
b6e4eaaba46a4f7908db661c20498188f75a558c
[ "MIT" ]
null
null
null
character_tracker/character.py
mwalla/motw
b6e4eaaba46a4f7908db661c20498188f75a558c
[ "MIT" ]
null
null
null
character_tracker/character.py
mwalla/motw
b6e4eaaba46a4f7908db661c20498188f75a558c
[ "MIT" ]
null
null
null
from pprint import pprint as pp from character_tracker.basic_moves import basic_moves from character_tracker.roller import Roller from character_tracker.utils import get_int_input, get_str_input class Character(object): """A Monster of the Week game character. """ @property @charm.setter @prop...
32.128527
99
0.54737
from pprint import pprint as pp from character_tracker.basic_moves import basic_moves from character_tracker.roller import Roller from character_tracker.utils import get_int_input, get_str_input class Character(object): """A Monster of the Week game character. """ def __init__(self): self.name =...
8,831
0
935
6a08aded68a0728240f0327c01b6231d1050cb75
545
py
Python
squalaetp/migrations/0013_auto_20191004_2034.py
Nels885/csd_dashboard
aa5a3b970c50a2a93af722f962bd87c3728f233c
[ "MIT" ]
null
null
null
squalaetp/migrations/0013_auto_20191004_2034.py
Nels885/csd_dashboard
aa5a3b970c50a2a93af722f962bd87c3728f233c
[ "MIT" ]
null
null
null
squalaetp/migrations/0013_auto_20191004_2034.py
Nels885/csd_dashboard
aa5a3b970c50a2a93af722f962bd87c3728f233c
[ "MIT" ]
null
null
null
# Generated by Django 2.2.5 on 2019-10-04 18:34 from django.db import migrations
24.772727
89
0.588991
# Generated by Django 2.2.5 on 2019-10-04 18:34 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('squalaetp', '0012_auto_20190829_1605'), ] operations = [ migrations.AlterModelOptions( name='corvet', options={'ordering': [...
0
440
23
fef2daf4a0ac0128aa8faa54a5ca0dfef20ab933
5,078
py
Python
2d_PSF_code/PIPE2D-347/Provide_PSF_2D.py
Subaru-PFS/dev_pfsmodel
d01cf03a4c4eaa01ba5a9590ccf17744a33bdb05
[ "MIT" ]
null
null
null
2d_PSF_code/PIPE2D-347/Provide_PSF_2D.py
Subaru-PFS/dev_pfsmodel
d01cf03a4c4eaa01ba5a9590ccf17744a33bdb05
[ "MIT" ]
null
null
null
2d_PSF_code/PIPE2D-347/Provide_PSF_2D.py
Subaru-PFS/dev_pfsmodel
d01cf03a4c4eaa01ba5a9590ccf17744a33bdb05
[ "MIT" ]
null
null
null
import numpy as np def provide_PSF_2D(x=None,y=None,PSF_version=None): """ Provides 2D PSF at any position in the detector plane This a version which takes a finite nubmer of pregenerated PSF and \ creates the interpolated version at required position (Future: version which takes interpola...
52.350515
124
0.713864
import numpy as np def provide_PSF_2D(x=None,y=None,PSF_version=None): """ Provides 2D PSF at any position in the detector plane This a version which takes a finite nubmer of pregenerated PSF and \ creates the interpolated version at required position (Future: version which takes interpola...
0
0
0
13933321fe38bfd9e54faf2a5d94361825a6d9ce
155
py
Python
Python/PieceOfCake/src/Main.py
Wabri/AKattisProblem
3780ce312c54b7c01e83e8c6cf6877b6aa24ffcf
[ "MIT" ]
1
2019-03-06T09:24:37.000Z
2019-03-06T09:24:37.000Z
Python/PieceOfCake/src/Main.py
Wabri/AKattisProblem
3780ce312c54b7c01e83e8c6cf6877b6aa24ffcf
[ "MIT" ]
null
null
null
Python/PieceOfCake/src/Main.py
Wabri/AKattisProblem
3780ce312c54b7c01e83e8c6cf6877b6aa24ffcf
[ "MIT" ]
2
2021-05-05T12:01:05.000Z
2021-09-10T18:35:09.000Z
import sys for i in sys.stdin: ab = i.split() n = int(ab[0]) h = int(ab[1]) v = int(ab[2]) print(max(h, n - h) * max(v, n - v) * 4)
14.090909
44
0.451613
import sys for i in sys.stdin: ab = i.split() n = int(ab[0]) h = int(ab[1]) v = int(ab[2]) print(max(h, n - h) * max(v, n - v) * 4)
0
0
0
315ff162a06104a8e332e3d340242a7318f868a6
21,635
py
Python
eval.py
StolasIn/Lafite
a85ad9eec6de6c90ccba63ad3c43e45b0fe5d371
[ "MIT" ]
null
null
null
eval.py
StolasIn/Lafite
a85ad9eec6de6c90ccba63ad3c43e45b0fe5d371
[ "MIT" ]
null
null
null
eval.py
StolasIn/Lafite
a85ad9eec6de6c90ccba63ad3c43e45b0fe5d371
[ "MIT" ]
null
null
null
import torch import numpy as np import pickle import os from PIL import Image from pathlib import Path from tqdm import tqdm import dnnlib, legacy import clip import torch.nn.functional as F import torchvision.transforms as T import scipy import warnings import torchvision.models from pymoo.core.problem import Problem ...
32.387725
121
0.611232
import torch import numpy as np import pickle import os from PIL import Image from pathlib import Path from tqdm import tqdm import dnnlib, legacy import clip import torch.nn.functional as F import torchvision.transforms as T import scipy import warnings import torchvision.models from pymoo.core.problem import Problem ...
16,844
-6
869
efc216ee5e2342ef95305d4f352d31660f7facd5
726
py
Python
ABC145/ABC145c.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
ABC145/ABC145c.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
ABC145/ABC145c.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
# ABC145c if __name__ == '__main__': main()
21.352941
77
0.53168
# ABC145c def main(): import sys import itertools import math input = sys.stdin.readline sys.setrecursionlimit(10**6) # map(int,input().split()) n = int(input()) town = [tuple(map(int, input().split())) for _ in range(n)] ans = 0 def kyori(pos1, pos2): return math.sqr...
652
0
23
4fa93a39bffc9c6d90b2d240bb9e747e50e4cc00
4,269
py
Python
blackjack.py
Alfredooe/twoplayerblackjack
738858edd68b7de1834e53f86487e560bb9ed038
[ "Unlicense" ]
null
null
null
blackjack.py
Alfredooe/twoplayerblackjack
738858edd68b7de1834e53f86487e560bb9ed038
[ "Unlicense" ]
null
null
null
blackjack.py
Alfredooe/twoplayerblackjack
738858edd68b7de1834e53f86487e560bb9ed038
[ "Unlicense" ]
null
null
null
#'random' library import import random #rank list & suit dictionary cardranks = ["Clubs", "Diamonds", "Hearts", "Spades"] cardsuits = {"Ace":11, "One":1, "Two":2, "Three":3, "Four":4, "Five":5, "Six":6, "Seven":7, "Eight":8, "Nine":9, "Ten":10, "Jack":10, "Queen":10, "King":10} #player class w/ public attributes #dec...
33.351563
156
0.585383
#'random' library import import random #rank list & suit dictionary cardranks = ["Clubs", "Diamonds", "Hearts", "Spades"] cardsuits = {"Ace":11, "One":1, "Two":2, "Three":3, "Four":4, "Five":5, "Six":6, "Seven":7, "Eight":8, "Nine":9, "Ten":10, "Jack":10, "Queen":10, "King":10} #player class w/ public attributes class...
2,819
-28
275
4c41018a3dbac3faca5ec4517af07bfca312b2a0
3,685
py
Python
elementpath/regex/codepoints.py
sissaschool/elementpath
a74ce89c04622d8ae98ab739886c3e46f87b024e
[ "MIT" ]
21
2019-10-02T18:36:16.000Z
2022-03-14T15:46:00.000Z
elementpath/regex/codepoints.py
sissaschool/elementpath
a74ce89c04622d8ae98ab739886c3e46f87b024e
[ "MIT" ]
32
2019-08-28T13:04:16.000Z
2021-12-16T17:05:49.000Z
elementpath/regex/codepoints.py
sissaschool/elementpath
a74ce89c04622d8ae98ab739886c3e46f87b024e
[ "MIT" ]
9
2019-08-28T11:24:49.000Z
2022-01-12T23:53:28.000Z
# # Copyright (c), 2016-2020, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/licenses/MIT. # # @author Davide Brunato <brunato@...
29.717742
93
0.609227
# # Copyright (c), 2016-2020, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/licenses/MIT. # # @author Davide Brunato <brunato@...
0
0
0
136655a1d66ff352e8605dae58e21ef5325cc3a5
2,834
py
Python
deep_audio_features/bin/deep_retrieval_build_db.py
nikosmichas/deep_audio_features
ad45cd5681e1550481fdd10064ad2371b39ac05f
[ "MIT" ]
40
2020-07-24T17:09:44.000Z
2022-02-26T10:22:12.000Z
deep_audio_features/bin/deep_retrieval_build_db.py
nikosmichas/deep_audio_features
ad45cd5681e1550481fdd10064ad2371b39ac05f
[ "MIT" ]
40
2020-07-20T17:21:20.000Z
2022-01-28T23:02:07.000Z
deep_audio_features/bin/deep_retrieval_build_db.py
nikosmichas/deep_audio_features
ad45cd5681e1550481fdd10064ad2371b39ac05f
[ "MIT" ]
5
2020-08-20T09:19:00.000Z
2022-01-05T18:29:37.000Z
import argparse import torch from torch.utils.data import DataLoader import sys, os sys.path.insert(0, os.path.join( os.path.dirname(os.path.realpath(__file__)), "../../")) from deep_audio_features.dataloading.dataloading import FeatureExtractorDataset from deep_audio_features.lib.training import test from deep_aud...
32.574713
84
0.659492
import argparse import torch from torch.utils.data import DataLoader import sys, os sys.path.insert(0, os.path.join( os.path.dirname(os.path.realpath(__file__)), "../../")) from deep_audio_features.dataloading.dataloading import FeatureExtractorDataset from deep_audio_features.lib.training import test from deep_aud...
1,778
0
69
cf3c76ac1491fa84c6c4aef6043115fded9327c2
15,383
py
Python
v0.1/optim/optim.py
Chaowu88/etfba
bfba63685ca217937e32038cc55f530a4d980ad8
[ "BSD-3-Clause" ]
null
null
null
v0.1/optim/optim.py
Chaowu88/etfba
bfba63685ca217937e32038cc55f530a4d980ad8
[ "BSD-3-Clause" ]
null
null
null
v0.1/optim/optim.py
Chaowu88/etfba
bfba63685ca217937e32038cc55f530a4d980ad8
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- __author__ = 'Chao Wu' R = 8.315e-3 # gas constant in kJ/mol/K T = 298.15 # absolute temperature in K, or 25 C K = 10000 # big enough constant defaultMW = 40 # default enzyme molecular weight in kDa defaultKcat = 200 # default reaction catalytic rate constant in ...
30.222004
159
0.726581
#!/usr/bin/env python # -*- coding: UTF-8 -*- __author__ = 'Chao Wu' R = 8.315e-3 # gas constant in kJ/mol/K T = 298.15 # absolute temperature in K, or 25 C K = 10000 # big enough constant defaultMW = 40 # default enzyme molecular weight in kDa defaultKcat = 200 # default reaction catalytic rate constant in ...
7,583
7,052
69
c5d6bf89e462376e078860e14efcafac35041ceb
7,921
py
Python
dynamicgem/utils/ts_utils.py
Sujit-O/dyngem
a879bf362d1e9409faa4e1186c345337ad6d0189
[ "MIT" ]
null
null
null
dynamicgem/utils/ts_utils.py
Sujit-O/dyngem
a879bf362d1e9409faa4e1186c345337ad6d0189
[ "MIT" ]
null
null
null
dynamicgem/utils/ts_utils.py
Sujit-O/dyngem
a879bf362d1e9409faa4e1186c345337ad6d0189
[ "MIT" ]
null
null
null
import numpy as np from keras import backend as K from keras.models import Sequential from keras.layers import Dense, Bidirectional, LSTM, GRU from keras.optimizers import Adam from keras.callbacks import EarlyStopping from keras.layers import Conv1D, MaxPooling1D from time import time import pandas as pd # convert a...
38.451456
89
0.562681
import numpy as np from keras import backend as K from keras.models import Sequential from keras.layers import Dense, Bidirectional, LSTM, GRU from keras.optimizers import Adam from keras.callbacks import EarlyStopping from keras.layers import Conv1D, MaxPooling1D from time import time import pandas as pd def construc...
7,493
0
68
44e4fc582229cc7f1dc265d8119e7fa52c25f0cd
8,199
py
Python
pytests/test_kn3_batching_topk.py
gauenk/faiss
f2b5891fb3dacb3caae862824bf72fa42ce77dca
[ "MIT" ]
null
null
null
pytests/test_kn3_batching_topk.py
gauenk/faiss
f2b5891fb3dacb3caae862824bf72fa42ce77dca
[ "MIT" ]
null
null
null
pytests/test_kn3_batching_topk.py
gauenk/faiss
f2b5891fb3dacb3caae862824bf72fa42ce77dca
[ "MIT" ]
null
null
null
# -- python -- import cv2,tqdm,copy import numpy as np import unittest import tempfile import sys from einops import rearrange import shutil from pathlib import Path from easydict import EasyDict as edict # -- vision -- from PIL import Image # -- linalg -- import torch as th import numpy as np # -- package helper i...
30.479554
92
0.56702
# -- python -- import cv2,tqdm,copy import numpy as np import unittest import tempfile import sys from einops import rearrange import shutil from pathlib import Path from easydict import EasyDict as edict # -- vision -- from PIL import Image # -- linalg -- import torch as th import numpy as np # -- package helper i...
7,191
28
335
052cd3f78110394dd7657e73f8d3f7bab57102d4
1,878
py
Python
resources/en/docs/performing_table_joins_pyqgis/scripts/join_attributes.py
spatialthoughts/qgis-tutorials
dc1c6027de72e4875d8d5428fbc1f453b51e0468
[ "CC-BY-4.0" ]
34
2015-05-11T14:54:47.000Z
2022-02-11T06:16:48.000Z
resources/en/docs/performing_table_joins_pyqgis/scripts/join_attributes.py
Santhosh-M31/qgis-tutorials
d22c534219689cff663b9b91b7d6e0e658f83b0d
[ "CC-BY-4.0" ]
16
2016-04-20T10:52:10.000Z
2022-01-08T13:57:11.000Z
resources/en/docs/performing_table_joins_pyqgis/scripts/join_attributes.py
Santhosh-M31/qgis-tutorials
d22c534219689cff663b9b91b7d6e0e658f83b0d
[ "CC-BY-4.0" ]
34
2015-07-23T11:13:22.000Z
2021-12-19T05:50:11.000Z
from PyQt4 import QtGui zip_uri = '/vsizip/C:/Users/Ujaval/Downloads/tl_2013_06_tract.zip/tl_2013_06_tract.shp' shp = QgsVectorLayer(zip_uri, 'tl_2013_06_tract', 'ogr') QgsMapLayerRegistry.instance().addMapLayer(shp) csv_uri = "file:///C:/Users/Ujaval/Downloads/ca_tracts_pop.csv?delimiter=," csv = QgsVectorLayer(csv_...
28.029851
87
0.764643
from PyQt4 import QtGui zip_uri = '/vsizip/C:/Users/Ujaval/Downloads/tl_2013_06_tract.zip/tl_2013_06_tract.shp' shp = QgsVectorLayer(zip_uri, 'tl_2013_06_tract', 'ogr') QgsMapLayerRegistry.instance().addMapLayer(shp) csv_uri = "file:///C:/Users/Ujaval/Downloads/ca_tracts_pop.csv?delimiter=," csv = QgsVectorLayer(csv_...
0
0
0
e9ca77146ed2bffe1b60cd117932ccb63e35a1f2
1,719
py
Python
tests/utils/mindspore/nn/cell.py
fapbatista/mindinsight
db5769eb80cbd13a2a9af7682c11f5667d8bf141
[ "Apache-2.0" ]
216
2020-03-28T02:11:56.000Z
2022-03-31T06:20:09.000Z
tests/utils/mindspore/nn/cell.py
fapbatista/mindinsight
db5769eb80cbd13a2a9af7682c11f5667d8bf141
[ "Apache-2.0" ]
13
2020-03-31T03:00:12.000Z
2021-01-03T13:01:06.000Z
tests/utils/mindspore/nn/cell.py
fapbatista/mindinsight
db5769eb80cbd13a2a9af7682c11f5667d8bf141
[ "Apache-2.0" ]
21
2020-03-28T02:41:06.000Z
2021-11-24T12:20:25.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
31.254545
78
0.658522
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
464
0
80
dd72cf24d5f1b4236d53dfa74ea8753ce33e368d
1,605
py
Python
rosettautil/rosetta/weights.py
decarboxy/py_protein_utils
4cbb5d6d3cf32d4240e0dc9b17e4330775663de0
[ "MIT" ]
10
2015-10-07T08:43:56.000Z
2020-11-11T16:53:06.000Z
rosettautil/rosetta/weights.py
decarboxy/py_protein_utils
4cbb5d6d3cf32d4240e0dc9b17e4330775663de0
[ "MIT" ]
null
null
null
rosettautil/rosetta/weights.py
decarboxy/py_protein_utils
4cbb5d6d3cf32d4240e0dc9b17e4330775663de0
[ "MIT" ]
3
2017-02-06T17:55:14.000Z
2020-09-01T02:00:35.000Z
from rosettautil.util import fileutil aa_codes_in_order = ["ALA","CYS","ASP","GLU","PHE","GLY","HIS","ILE","LYS","LEU","MET","ASN","PRO","GLN","ARG","SER","THR","VAL","TRP","TYR"]
33.4375
141
0.568224
from rosettautil.util import fileutil aa_codes_in_order = ["ALA","CYS","ASP","GLU","PHE","GLY","HIS","ILE","LYS","LEU","MET","ASN","PRO","GLN","ARG","SER","THR","VAL","TRP","TYR"] class WeightFile: def __init__(self): self.ref_energies = {} self.weights = {} def read_file(self,filename): ...
1,199
-4
230
9d0df4002773c9b26be27fbcbcc0c6e20aec5740
9,347
py
Python
bot/starpruuuft/agents/builder.py
PruuuGames/StarPruuuft
865bc7f897ccb97d1ca4334ea7a1621a38285a35
[ "MIT" ]
1
2018-07-07T08:09:44.000Z
2018-07-07T08:09:44.000Z
bot/starpruuuft/agents/builder.py
PruuuGames/StarPruuuft
865bc7f897ccb97d1ca4334ea7a1621a38285a35
[ "MIT" ]
null
null
null
bot/starpruuuft/agents/builder.py
PruuuGames/StarPruuuft
865bc7f897ccb97d1ca4334ea7a1621a38285a35
[ "MIT" ]
2
2018-07-07T20:32:14.000Z
2018-07-08T22:09:37.000Z
from sc2.constants import * from sc2.position import Point2 from bot.starpruuuft.agent_message import AgentMessage from .agent import Agent from .. import utilities # Reconhece um depot localizado na rampa # Faz o cache da localização dos depots de rampa
40.995614
119
0.650476
from sc2.constants import * from sc2.position import Point2 from bot.starpruuuft.agent_message import AgentMessage from .agent import Agent from .. import utilities class BuilderAgent(Agent): def __init__(self, bot): super().__init__(bot) self.add_message_handler(AgentMessage.ENEMIES...
8,623
5
454
3d754a59567807b87116dad0f01ccd707b41b83e
1,234
py
Python
Leetcode/Solutions/Data-Structure/BST/BST_To_Greater_Tree.py
fakecoinbase/sweetpandslashAlgorithms
9641e31320f17c6393b7746312c4b030a7faf015
[ "MIT" ]
3
2021-04-21T07:11:33.000Z
2022-01-09T00:05:55.000Z
Leetcode/Solutions/Data-Structure/BST/BST_To_Greater_Tree.py
sweetpand/Algorithms
2e4dcf2d42de25531fae5b4ec0d96ce100043117
[ "MIT" ]
null
null
null
Leetcode/Solutions/Data-Structure/BST/BST_To_Greater_Tree.py
sweetpand/Algorithms
2e4dcf2d42de25531fae5b4ec0d96ce100043117
[ "MIT" ]
null
null
null
from _DATATYPES import TreeNode #Question: Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST. #Solution: Traverse reverse in order, keep count of sums and adjust each node as nee...
41.133333
203
0.669368
from _DATATYPES import TreeNode #Question: Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST. #Solution: Traverse reverse in order, keep count of sums and adjust each node as nee...
680
45
50
8ed9d98f22c3a8ee19702f3bce74fcc5516af642
1,326
py
Python
tests/test_reslice_coarse.py
shuohan/improc3d
178b91a73a8bb2fabf73ea2a6e9562c39a8299ca
[ "MIT" ]
null
null
null
tests/test_reslice_coarse.py
shuohan/improc3d
178b91a73a8bb2fabf73ea2a6e9562c39a8299ca
[ "MIT" ]
null
null
null
tests/test_reslice_coarse.py
shuohan/improc3d
178b91a73a8bb2fabf73ea2a6e9562c39a8299ca
[ "MIT" ]
null
null
null
#!/usr/bin/env python import numpy as np import nibabel as nib import matplotlib.pyplot as plt from improc3d.reslice import reslice3d, reslice3d_coarse from improc3d.reslice import transform_to_axial from improc3d.reslice import transform_to_coronal from improc3d.reslice import transform_to_sagittal obj = nib.load(...
34
74
0.718703
#!/usr/bin/env python import numpy as np import nibabel as nib import matplotlib.pyplot as plt from improc3d.reslice import reslice3d, reslice3d_coarse from improc3d.reslice import transform_to_axial from improc3d.reslice import transform_to_coronal from improc3d.reslice import transform_to_sagittal obj = nib.load(...
0
0
0
abb207c40a13077c4462b4d2420e15888efa25b3
2,353
py
Python
tests/jit/test_array.py
mswart/topaz
4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae
[ "BSD-3-Clause" ]
1
2016-07-17T09:59:55.000Z
2016-07-17T09:59:55.000Z
tests/jit/test_array.py
mswart/topaz
4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae
[ "BSD-3-Clause" ]
null
null
null
tests/jit/test_array.py
mswart/topaz
4bc02d6f4bf29c20f045223ecb6ae8a5cc9df2ae
[ "BSD-3-Clause" ]
null
null
null
from .base import BaseJITTest
50.06383
131
0.634509
from .base import BaseJITTest class TestArray(BaseJITTest): def test_subscript_assign_simple(self, topaz, tmpdir): traces = self.run(topaz, tmpdir, """ arr = [false] 10000.times { arr[0] = true } """) self.assert_matches(traces[0].loop, """ label(p0, p1, p3, p4, p5,...
2,265
8
49
36cdd3c7289e7770798e8bfc35319a23737ceb61
135
py
Python
atcoder_abc_abc124_d_400_handstand/src/gdbrc.py
miyagaw61/procon
fc00fb9f86dc24df97897a132382243525822500
[ "MIT" ]
null
null
null
atcoder_abc_abc124_d_400_handstand/src/gdbrc.py
miyagaw61/procon
fc00fb9f86dc24df97897a132382243525822500
[ "MIT" ]
null
null
null
atcoder_abc_abc124_d_400_handstand/src/gdbrc.py
miyagaw61/procon
fc00fb9f86dc24df97897a132382243525822500
[ "MIT" ]
null
null
null
e = Exgdb() c = ExgdbCmd() #c.b('atcoder_abc_abc124_d_handstand::main') c.b('main.rs:82') gdb.execute('run') gdb.execute('layout src')
19.285714
44
0.688889
e = Exgdb() c = ExgdbCmd() #c.b('atcoder_abc_abc124_d_handstand::main') c.b('main.rs:82') gdb.execute('run') gdb.execute('layout src')
0
0
0
5b1b776111a0fefa74b895cad563314d46989830
472
py
Python
profileqc/routines/dependencies.py
sharksmhi/profileqc
dfc96445231ce1974be11536cf839299e908d231
[ "MIT" ]
null
null
null
profileqc/routines/dependencies.py
sharksmhi/profileqc
dfc96445231ce1974be11536cf839299e908d231
[ "MIT" ]
1
2022-03-30T09:10:12.000Z
2022-03-30T09:10:12.000Z
profileqc/routines/dependencies.py
sharksmhi/profileqc
dfc96445231ce1974be11536cf839299e908d231
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2022 SMHI, Swedish Meteorological and Hydrological Institute. # License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit). """ Created on 2020-07-08 13:19 @author: a002028 """ class Dependencies: """Doc.""" def __init__(self, **kwargs): """Ini...
23.6
79
0.639831
#!/usr/bin/env python # Copyright (c) 2022 SMHI, Swedish Meteorological and Hydrological Institute. # License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit). """ Created on 2020-07-08 13:19 @author: a002028 """ class Dependencies: """Doc.""" def __init__(self, **kwargs): """Ini...
0
0
0
77ff4f6c72e6b02b94290f2cb8fba003ddf0c962
1,727
py
Python
arte/utils/multiton.py
ArcetriAdaptiveOptics/arte
3d21ae59ba6490be3f52c7957f259097bb42f511
[ "MIT" ]
1
2021-01-11T20:01:29.000Z
2021-01-11T20:01:29.000Z
arte/utils/multiton.py
ArcetriAdaptiveOptics/arte
3d21ae59ba6490be3f52c7957f259097bb42f511
[ "MIT" ]
22
2020-04-15T15:48:14.000Z
2021-07-09T07:57:37.000Z
arte/utils/multiton.py
ArcetriAdaptiveOptics/arte
3d21ae59ba6490be3f52c7957f259097bb42f511
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ######################################################### # # who when what # -------- ---------- --------------------------------- # apuglisi 2019-09-28 Created # ######################################################### def multiton(cls): ''' Multiton decorator ...
29.271186
65
0.583671
# -*- coding: utf-8 -*- ######################################################### # # who when what # -------- ---------- --------------------------------- # apuglisi 2019-09-28 Created # ######################################################### def multiton(cls): ''' Multiton decorator ...
330
0
54
fc0cc9e4c6a73709f706f03f4933cd141b3b0f40
7,208
py
Python
api/serializers.py
yuanlii/heritagesites
2087882fcb8a928de18fbf1a4bef89b61a80aa05
[ "MIT" ]
1
2019-09-13T20:12:43.000Z
2019-09-13T20:12:43.000Z
api/serializers.py
yuanlii/heritagesites
2087882fcb8a928de18fbf1a4bef89b61a80aa05
[ "MIT" ]
null
null
null
api/serializers.py
yuanlii/heritagesites
2087882fcb8a928de18fbf1a4bef89b61a80aa05
[ "MIT" ]
7
2019-08-02T14:37:40.000Z
2021-01-29T18:43:40.000Z
from heritagesites.models import CountryArea, DevStatus, HeritageSite, HeritageSiteCategory, \ HeritageSiteJurisdiction, Location, Planet, Region, SubRegion, IntermediateRegion from rest_framework import response, serializers, status
26.895522
94
0.765261
from heritagesites.models import CountryArea, DevStatus, HeritageSite, HeritageSiteCategory, \ HeritageSiteJurisdiction, Location, Planet, Region, SubRegion, IntermediateRegion from rest_framework import response, serializers, status class PlanetSerializer(serializers.ModelSerializer): class Meta: model = Planet...
1,889
4,844
230
e23c6a492715258836584b050d10ded1372f53ed
17,270
py
Python
auv_simple_motion_planner/scripts/wp_depth_action_planner.py
Jollerprutt/smarc_missions
dd431c82400315c0ebd3d2b8e185f0b94ee9d3e8
[ "BSD-3-Clause" ]
null
null
null
auv_simple_motion_planner/scripts/wp_depth_action_planner.py
Jollerprutt/smarc_missions
dd431c82400315c0ebd3d2b8e185f0b94ee9d3e8
[ "BSD-3-Clause" ]
null
null
null
auv_simple_motion_planner/scripts/wp_depth_action_planner.py
Jollerprutt/smarc_missions
dd431c82400315c0ebd3d2b8e185f0b94ee9d3e8
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # Copyright 2018 Nils Bore, Sriharsha Bhat (nbore@kth.se, svbhat@kth.se) # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, thi...
45.809019
757
0.666589
#!/usr/bin/python # Copyright 2018 Nils Bore, Sriharsha Bhat (nbore@kth.se, svbhat@kth.se) # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, thi...
10,698
4,335
23
4f1cf3c0ae52adf3586dbd9ace2922b02750dbca
347
py
Python
ABC/abc051-abc100/abc057/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
2
2020-06-12T09:54:23.000Z
2021-05-04T01:34:07.000Z
ABC/abc051-abc100/abc057/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
961
2020-06-23T07:26:22.000Z
2022-03-31T21:34:52.000Z
ABC/abc051-abc100/abc057/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
null
null
null
'''input 23 2 1 9 12 21 ''' # -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem A if __name__ == '__main__': current_hour, add_hour = list(map(int, input().split())) contest_hour = current_hour + add_hour if contest_hour < 24: print(contest_hour) else: ...
15.086957
61
0.576369
'''input 23 2 1 9 12 21 ''' # -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem A if __name__ == '__main__': current_hour, add_hour = list(map(int, input().split())) contest_hour = current_hour + add_hour if contest_hour < 24: print(contest_hour) else: ...
0
0
0
a0af9bffe8473b6c0d6be526c0dc67a6cfca8472
1,296
py
Python
Number of Islands.py
sugia/leetcode
6facec2a54d1d9f133f420c9bce1d1043f57ebc6
[ "Apache-2.0" ]
null
null
null
Number of Islands.py
sugia/leetcode
6facec2a54d1d9f133f420c9bce1d1043f57ebc6
[ "Apache-2.0" ]
null
null
null
Number of Islands.py
sugia/leetcode
6facec2a54d1d9f133f420c9bce1d1043f57ebc6
[ "Apache-2.0" ]
null
null
null
''' Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. Example 1: Input: 11110 11010 11000 00000 Output: 1 Exa...
23.563636
256
0.471451
''' Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. Example 1: Input: 11110 11010 11000 00000 Output: 1 Exa...
431
446
23
b9a37f549a9f2cd296ab398602fda182177dac33
24,050
py
Python
original-paas/copy_to_container/www/spdpaas/src/app/features/customizedHandle.py
yishan1331/docker-practice
91a1a434cbffc33790678af5e09de310386812d1
[ "MIT" ]
null
null
null
original-paas/copy_to_container/www/spdpaas/src/app/features/customizedHandle.py
yishan1331/docker-practice
91a1a434cbffc33790678af5e09de310386812d1
[ "MIT" ]
null
null
null
original-paas/copy_to_container/www/spdpaas/src/app/features/customizedHandle.py
yishan1331/docker-practice
91a1a434cbffc33790678af5e09de310386812d1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #Department Module Description """ ============================================================================== created : 03/20/2017 Last update: 02/08/2021 Developer: Wei-Chun Chang Lite Version 2 @Yishan08212019 API version 1.0 Filename: customizedHandle.py Description: basically, all...
38.235294
142
0.57052
# -*- coding: utf-8 -*- #Department Module Description """ ============================================================================== created : 03/20/2017 Last update: 02/08/2021 Developer: Wei-Chun Chang Lite Version 2 @Yishan08212019 API version 1.0 Filename: customizedHandle.py Description: basically, all...
11,214
30
186
6b3efd1aae05ddf74ce1988978831f8593a45457
9,521
py
Python
kubernetes-the-hard-way/system/collections/ansible_collections/community/general/plugins/modules/storage/zfs/zfs_delegate_admin.py
jkroepke/homelab
ffdd849e39b52972870f5552e734fd74cb1254a1
[ "Apache-2.0" ]
5
2020-12-16T21:42:09.000Z
2022-03-28T16:04:32.000Z
kubernetes-the-hard-way/system/collections/ansible_collections/community/general/plugins/modules/storage/zfs/zfs_delegate_admin.py
jkroepke/kubernetes-the-hard-way
70fd096a04addec0777744c9731a4e3fbdc40c8f
[ "Apache-2.0" ]
null
null
null
kubernetes-the-hard-way/system/collections/ansible_collections/community/general/plugins/modules/storage/zfs/zfs_delegate_admin.py
jkroepke/kubernetes-the-hard-way
70fd096a04addec0777744c9731a4e3fbdc40c8f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Nate Coraor <nate@coraor.org> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: zfs_delega...
35.928302
152
0.595106
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Nate Coraor <nate@coraor.org> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: zfs_delega...
1,525
4,383
46
c37c17386d62d65f5ba6388fde11f69c4d3ea317
590
py
Python
1 - Fundamentos Python/Aula14.py
elton-souza/IGTI-Python
2633dd70af8403a6ab52f8f97ee53063dbb0ef77
[ "MIT" ]
null
null
null
1 - Fundamentos Python/Aula14.py
elton-souza/IGTI-Python
2633dd70af8403a6ab52f8f97ee53063dbb0ef77
[ "MIT" ]
null
null
null
1 - Fundamentos Python/Aula14.py
elton-souza/IGTI-Python
2633dd70af8403a6ab52f8f97ee53063dbb0ef77
[ "MIT" ]
null
null
null
#Funções '''' =========================================== def equacao_reta(x): y_x = 2 * x + 1 return y_x x = float(input("Entre com o valor a ser calculado para y(x) = 2x+1: ")) resultado = equacao_reta(x) print("O resultado encontrado foi Y = %.0f" %resultado) ============================================ ''...
24.583333
72
0.540678
#Funções '''' =========================================== def equacao_reta(x): y_x = 2 * x + 1 return y_x x = float(input("Entre com o valor a ser calculado para y(x) = 2x+1: ")) resultado = equacao_reta(x) print("O resultado encontrado foi Y = %.0f" %resultado) ============================================ ''...
34
0
22
c7c474c76f41f3c6859a3bf71ad2eb3dfbade394
5,319
py
Python
backblaze/bucket/blocking/file.py
WardPearce/aiob2
3dcff9c3aa7612ce7b43375fca379c1358121a4a
[ "MIT" ]
null
null
null
backblaze/bucket/blocking/file.py
WardPearce/aiob2
3dcff9c3aa7612ce7b43375fca379c1358121a4a
[ "MIT" ]
null
null
null
backblaze/bucket/blocking/file.py
WardPearce/aiob2
3dcff9c3aa7612ce7b43375fca379c1358121a4a
[ "MIT" ]
1
2019-07-16T03:38:49.000Z
2019-07-16T03:38:49.000Z
from typing import Tuple, cast from ..base import BaseFile from .part import BlockingParts from ...models.file import ( FileModel, UploadUrlModel, FileDeleteModel, PartCancelModel ) from ...settings import DownloadSettings, CopyFileSettings from ...exceptions import AwaitingOnly from ...utils impo...
23.745536
72
0.51645
from typing import Tuple, cast from ..base import BaseFile from .part import BlockingParts from ...models.file import ( FileModel, UploadUrlModel, FileDeleteModel, PartCancelModel ) from ...settings import DownloadSettings, CopyFileSettings from ...exceptions import AwaitingOnly from ...utils impo...
0
4,911
23
dada64951a88cc9b3c1e8529d630a408834f5716
1,649
py
Python
tests/cli/test_capabilities.py
selectel/python-selvpcclient
99955064215c2be18b568e5e9b34f17087ec304f
[ "Apache-2.0" ]
7
2017-07-15T12:44:23.000Z
2020-03-24T09:45:11.000Z
tests/cli/test_capabilities.py
selectel/python-selvpcclient
99955064215c2be18b568e5e9b34f17087ec304f
[ "Apache-2.0" ]
13
2017-07-05T09:34:09.000Z
2021-04-20T08:18:46.000Z
tests/cli/test_capabilities.py
selectel/python-selvpcclient
99955064215c2be18b568e5e9b34f17087ec304f
[ "Apache-2.0" ]
9
2017-06-29T13:51:35.000Z
2021-06-26T21:00:49.000Z
from tests.cli import make_client, run_cmd from tests.util import answers
28.929825
65
0.740449
from tests.cli import make_client, run_cmd from tests.util import answers def test_capabilities_show_licenses(): count_of_licenses = 1 client = make_client(return_value=answers.CAPABILITIES_LIST) args = ['capabilities show licenses'] licenses = run_cmd(args, client, json_output=True) assert len(...
1,455
0
115
c40c41135506377f0f359d5c0a330b5d9eec0701
4,699
py
Python
src/lib/utils/convert_to_unity_json.py
gngdb/ROMP
a940af92e266530f4fe65807ab5920f0b4246511
[ "Apache-2.0" ]
null
null
null
src/lib/utils/convert_to_unity_json.py
gngdb/ROMP
a940af92e266530f4fe65807ab5920f0b4246511
[ "Apache-2.0" ]
null
null
null
src/lib/utils/convert_to_unity_json.py
gngdb/ROMP
a940af92e266530f4fe65807ab5920f0b4246511
[ "Apache-2.0" ]
null
null
null
# Imports import numpy as np import os import json import sys # noinspection PyPep8Naming from scipy.spatial.transform import Rotation # This class converts AMASS SMPLH .npz body animation files into Unity-readable .json files. # See AMASSConverterExamples file for an example on how to use this class. if __name__ ...
35.870229
118
0.633326
# Imports import numpy as np import os import json import sys # noinspection PyPep8Naming from scipy.spatial.transform import Rotation # This class converts AMASS SMPLH .npz body animation files into Unity-readable .json files. # See AMASSConverterExamples file for an example on how to use this class. class AMASSData...
3,418
891
45
16ecfe92c17399c41032ef0e4fe40d1863d16039
5,128
py
Python
parser/fase2/team17/Traduccion/InterpreteF2/IF/SIELSE.py
Josue-Zea/tytus
f9e4be9a8c03eb698fade7a748972e4f52d46685
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
parser/fase2/team17/Traduccion/InterpreteF2/IF/SIELSE.py
Josue-Zea/tytus
f9e4be9a8c03eb698fade7a748972e4f52d46685
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
parser/fase2/team17/Traduccion/InterpreteF2/IF/SIELSE.py
Josue-Zea/tytus
f9e4be9a8c03eb698fade7a748972e4f52d46685
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
from InterpreteF2.NodoAST import NodoArbol from InterpreteF2.Tabla_de_simbolos import Tabla_de_simbolos from InterpreteF2.Arbol import Arbol from InterpreteF2.Valor.Valor import Valor from InterpreteF2.Primitivos.TIPO import TIPO from InterpreteF2.Primitivos.COMPROBADOR_deTipos import COMPROBADOR_deTipos from Interpret...
33.083871
108
0.573908
from InterpreteF2.NodoAST import NodoArbol from InterpreteF2.Tabla_de_simbolos import Tabla_de_simbolos from InterpreteF2.Arbol import Arbol from InterpreteF2.Valor.Valor import Valor from InterpreteF2.Primitivos.TIPO import TIPO from InterpreteF2.Primitivos.COMPROBADOR_deTipos import COMPROBADOR_deTipos from Interpret...
4,447
3
237
b79dfb2731620c5e4b9d0314f5a7523683aeb4e4
577
py
Python
modules/tests/test_strtodate.py
OpenSO2/so2eval
0bc896360f8021e930bdadc707540220fe6b0f9e
[ "MIT" ]
null
null
null
modules/tests/test_strtodate.py
OpenSO2/so2eval
0bc896360f8021e930bdadc707540220fe6b0f9e
[ "MIT" ]
null
null
null
modules/tests/test_strtodate.py
OpenSO2/so2eval
0bc896360f8021e930bdadc707540220fe6b0f9e
[ "MIT" ]
null
null
null
# coding: utf-8 import sys import os sys.path.insert(1, os.path.join(sys.path[0], '..')) from strtodate import strtodate
28.85
137
0.667244
# coding: utf-8 import sys import os sys.path.insert(1, os.path.join(sys.path[0], '..')) from strtodate import strtodate def test_strtodate(): pattern = ".*(?P<year>\w{4})_(?P<month>\w{2})_(?P<day>\w{2})-(?P<hour>\w{2})_(?P<minute>\w{2})_(?P<second>\w{2})_(?P<millisecond>\w{3})" string = "testing_2017_06_08-12_19_4...
432
0
23
4ab81df6dbe52b14c06f999571d26610f09615e1
9,696
py
Python
src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_lb/lib/operations/lb_operations.py
enterstudio/azure-cli
b0504c3b634e17f1afc944a9572864a40da6bc18
[ "MIT" ]
2
2020-07-22T18:53:05.000Z
2021-09-11T05:52:33.000Z
src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_lb/lib/operations/lb_operations.py
enterstudio/azure-cli
b0504c3b634e17f1afc944a9572864a40da6bc18
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_lb/lib/operations/lb_operations.py
enterstudio/azure-cli
b0504c3b634e17f1afc944a9572864a40da6bc18
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
52.129032
694
0.680693
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
1,298
0
119
d68f9630a99eb9518e8240ecbf2ea45e3960cb5d
111
py
Python
Beginner/URI_2753.py
rbshadow/Python_URI
4f7df8cdea0eba5c550bb3016b1a7ab6dc723d56
[ "MIT" ]
3
2016-10-24T13:26:45.000Z
2020-10-12T17:44:00.000Z
Beginner/URI_2753.py
rbshadow/Python_URI
4f7df8cdea0eba5c550bb3016b1a7ab6dc723d56
[ "MIT" ]
null
null
null
Beginner/URI_2753.py
rbshadow/Python_URI
4f7df8cdea0eba5c550bb3016b1a7ab6dc723d56
[ "MIT" ]
null
null
null
if __name__ == '__main__': math()
13.875
29
0.504505
def math(): for i in range(97, 123): print(i, 'e', chr(i)) if __name__ == '__main__': math()
49
0
22
53f161c236da9d5618f68b4dac2da82c740c07d7
4,081
py
Python
LWCProto.py
fmolinagomez/LightWeightCardPrototyping
f2d64e36fd01f0101f33da577bdbeb55959df740
[ "MIT" ]
2
2021-11-02T13:42:16.000Z
2021-11-03T12:23:03.000Z
LWCProto.py
fmolinagomez/LightWeightCardPrototyping
f2d64e36fd01f0101f33da577bdbeb55959df740
[ "MIT" ]
null
null
null
LWCProto.py
fmolinagomez/LightWeightCardPrototyping
f2d64e36fd01f0101f33da577bdbeb55959df740
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 import csv import json import os import pathlib import sys import numpy as np import cairo import argparse import layout from draw_card import drawCard from card_model import CardModel from card_model import CardDeck def extant_file(x): """ 'Type' for argparse - checks that file ex...
33.178862
143
0.668464
#! /usr/bin/env python3 import csv import json import os import pathlib import sys import numpy as np import cairo import argparse import layout from draw_card import drawCard from card_model import CardModel from card_model import CardDeck def extant_file(x): """ 'Type' for argparse - checks that file ex...
0
0
0
059cd05702586a44598f05cc8b421aa9225178a2
1,115
py
Python
shmakovpn/tests/group_by/test_group_by_extended_dict.py
shmakovpn/shmakovpn_tools
85090c9489b0b9fa13b6c42c91459efe9b966a3b
[ "Apache-2.0" ]
null
null
null
shmakovpn/tests/group_by/test_group_by_extended_dict.py
shmakovpn/shmakovpn_tools
85090c9489b0b9fa13b6c42c91459efe9b966a3b
[ "Apache-2.0" ]
null
null
null
shmakovpn/tests/group_by/test_group_by_extended_dict.py
shmakovpn/shmakovpn_tools
85090c9489b0b9fa13b6c42c91459efe9b966a3b
[ "Apache-2.0" ]
null
null
null
import unittest from shmakovpn.extend_builtins import ExtendedDict from functools import reduce from typing import List, Dict, Any class TestGroupByExtendedDict(unittest.TestCase): """ This class contains tests of **groupby** using **ExtendedDict** """ data: List[Dict[str, Any]] = [ ...
30.135135
74
0.453812
import unittest from shmakovpn.extend_builtins import ExtendedDict from functools import reduce from typing import List, Dict, Any class TestGroupByExtendedDict(unittest.TestCase): """ This class contains tests of **groupby** using **ExtendedDict** """ data: List[Dict[str, Any]] = [ ...
0
0
0
10688525c6f04116af3dec2bf611c1965388a673
926
gyp
Python
OpenGL/app/examples/examples.gyp
legendlee1314/GLmacia
67ef41c83404ae0346c522b0045454826c30b8bd
[ "MIT" ]
null
null
null
OpenGL/app/examples/examples.gyp
legendlee1314/GLmacia
67ef41c83404ae0346c522b0045454826c30b8bd
[ "MIT" ]
null
null
null
OpenGL/app/examples/examples.gyp
legendlee1314/GLmacia
67ef41c83404ae0346c522b0045454826c30b8bd
[ "MIT" ]
null
null
null
{ 'variables': { 'project_name': 'examples', 'current_dir': '<(DEPTH)', }, 'targets': [ { 'target_name': 'basic_sample', 'type': 'executable', 'dependencies': [ '<(current_dir)/src/macia.gyp:macia', ], 'sources': [ 'basic_sample.cc', ], 'includ...
19.291667
45
0.449244
{ 'variables': { 'project_name': 'examples', 'current_dir': '<(DEPTH)', }, 'targets': [ { 'target_name': 'basic_sample', 'type': 'executable', 'dependencies': [ '<(current_dir)/src/macia.gyp:macia', ], 'sources': [ 'basic_sample.cc', ], 'includ...
0
0
0
95f29f2a630d78c09ee7af58af38a85efc9c3ba3
4,287
py
Python
AiComponent/Python/main.py
paychex/fredonia-paychex-ansible
05fda7c349953144606cf57e6765493a7dbaf356
[ "Apache-2.0" ]
1
2019-10-28T15:33:07.000Z
2019-10-28T15:33:07.000Z
AiComponent/Python/main.py
paychex/fredonia-paychex-ansible
05fda7c349953144606cf57e6765493a7dbaf356
[ "Apache-2.0" ]
null
null
null
AiComponent/Python/main.py
paychex/fredonia-paychex-ansible
05fda7c349953144606cf57e6765493a7dbaf356
[ "Apache-2.0" ]
null
null
null
from azure.cognitiveservices.language.luis.authoring import LUISAuthoringClient from msrest.authentication import CognitiveServicesCredentials import datetime, json, os, time authoring_key = "bde233f61f5e4e3fa48ff5a11b0f304c" region = "westus" endpoint = "https://{}.api.cognitive.microsoft.com".format(region) # ...
44.195876
116
0.608817
from azure.cognitiveservices.language.luis.authoring import LUISAuthoringClient from msrest.authentication import CognitiveServicesCredentials import datetime, json, os, time authoring_key = "bde233f61f5e4e3fa48ff5a11b0f304c" region = "westus" endpoint = "https://{}.api.cognitive.microsoft.com".format(region) # ...
3,735
0
115
ac906e10a55ee0d9f5ea232d8f09bdca379f1df2
4,164
py
Python
tests/core/test_minmax.py
siliconcompiler/siliconcompiler
6aa2b53441608f228bd520b68c0324fc9cf96377
[ "Apache-2.0" ]
424
2021-12-04T15:45:12.000Z
2022-03-31T20:27:55.000Z
tests/core/test_minmax.py
siliconcompiler/siliconcompiler
6aa2b53441608f228bd520b68c0324fc9cf96377
[ "Apache-2.0" ]
105
2021-12-03T21:25:29.000Z
2022-03-31T22:36:59.000Z
tests/core/test_minmax.py
siliconcompiler/siliconcompiler
6aa2b53441608f228bd520b68c0324fc9cf96377
[ "Apache-2.0" ]
38
2021-12-04T21:26:20.000Z
2022-03-21T02:39:29.000Z
# Copyright 2020 Silicon Compiler Authors. All Rights Reserved. import siliconcompiler import pytest @pytest.fixture ################################## def test_minimum(chip): '''API test for min/max() methods ''' flow = chip.get('option', 'flow') N = len(chip.getkeys('flowgraph', flow , 'syn')) ...
29.118881
98
0.564601
# Copyright 2020 Silicon Compiler Authors. All Rights Reserved. import siliconcompiler import pytest @pytest.fixture def chip(): # Create instance of Chip class chip = siliconcompiler.Chip('oh_add') #sequence flowpipe = ['import', 'syn', 'synmin'] tools = { ...
3,462
0
137
ae23de335349edc7d34e6f29097dd0de8db7fbef
5,314
py
Python
Code/run.py
codedecde/WordEmbeddings
84e6cd5424b74da6e889dd1b6ab7a6c5df9432d9
[ "MIT" ]
2
2018-09-19T01:37:31.000Z
2019-09-22T02:45:09.000Z
Code/run.py
codedecde/WordEmbeddings
84e6cd5424b74da6e889dd1b6ab7a6c5df9432d9
[ "MIT" ]
null
null
null
Code/run.py
codedecde/WordEmbeddings
84e6cd5424b74da6e889dd1b6ab7a6c5df9432d9
[ "MIT" ]
null
null
null
import torch.utils.data as ut import torch import cPickle as cp import numpy as np from utils import Progbar, getdata from model import Word2vec from torch.autograd import Variable import torch.optim as optim from constants import * use_cuda = torch.cuda.is_available() data = filter(lambda x: len(x) > 1, open(TEXT).r...
34.732026
131
0.640196
import torch.utils.data as ut import torch import cPickle as cp import numpy as np from utils import Progbar, getdata from model import Word2vec from torch.autograd import Variable import torch.optim as optim from constants import * use_cuda = torch.cuda.is_available() data = filter(lambda x: len(x) > 1, open(TEXT).r...
1,657
10
126
25203173320d6e81dd19ebeb6706912118a5fe19
1,278
py
Python
utils/scripts/OOOlevelGen/src/levels/Watch_Out.py
fullscreennl/monkeyswipe
c56192e202674dd5ab18023f6cf14cf51e95fbd0
[ "MIT" ]
null
null
null
utils/scripts/OOOlevelGen/src/levels/Watch_Out.py
fullscreennl/monkeyswipe
c56192e202674dd5ab18023f6cf14cf51e95fbd0
[ "MIT" ]
null
null
null
utils/scripts/OOOlevelGen/src/levels/Watch_Out.py
fullscreennl/monkeyswipe
c56192e202674dd5ab18023f6cf14cf51e95fbd0
[ "MIT" ]
null
null
null
import LevelBuilder from sprites import *
91.285714
149
0.726917
import LevelBuilder from sprites import * def render(name,bg): lb = LevelBuilder.LevelBuilder(name+".plist",background=bg) lb.addObject(Beam.BeamSprite(x=147, y=261,width=306,height=14,angle='-4',restitution=0.2,static='true',friction=0.5,density=20 ).setName('Beam')) lb.addObject(Enemy.EnemySprite(x=23, y=...
1,215
0
22
647b67367c0e63e28881482b5c1f510ab1372ef4
6,264
py
Python
core/predictor.py
huynhnhathao/hum_to_find
a0d7ec4bab1a7e2f7175956ff2721e23e2448840
[ "MIT" ]
1
2021-12-22T07:30:18.000Z
2021-12-22T07:30:18.000Z
core/predictor.py
huynhnhathao/hum_to_find
a0d7ec4bab1a7e2f7175956ff2721e23e2448840
[ "MIT" ]
null
null
null
core/predictor.py
huynhnhathao/hum_to_find
a0d7ec4bab1a7e2f7175956ff2721e23e2448840
[ "MIT" ]
1
2022-01-28T02:36:17.000Z
2022-01-28T02:36:17.000Z
from typing import Dict, List import pickle import numpy as np def predict_song(neighbors: Dict[str, List[int]]) -> Dict[str, List[int]]: """predict the ranks of song ids for each hum given its retrieved song neighbors The most importance job is choose the first place song The rules are, given o...
39.898089
114
0.552203
from typing import Dict, List import pickle import numpy as np def predict_song(neighbors: Dict[str, List[int]]) -> Dict[str, List[int]]: """predict the ranks of song ids for each hum given its retrieved song neighbors The most importance job is choose the first place song The rules are, given o...
0
0
0
06eed4751ad15e78692e64926dfd2741664949ce
583
py
Python
utils/model_utils.py
jayleicn/moment_detr
a5d0fa0f0b9ab005cf277327da0cb81ac1455194
[ "MIT" ]
90
2021-07-20T19:44:36.000Z
2022-03-30T06:53:07.000Z
utils/model_utils.py
synchrony10/moment_detr
e93f63ff64d702a446a59350e0cd7bdcc417361c
[ "MIT" ]
12
2021-08-03T03:14:00.000Z
2022-03-24T13:03:27.000Z
utils/model_utils.py
synchrony10/moment_detr
e93f63ff64d702a446a59350e0cd7bdcc417361c
[ "MIT" ]
15
2021-07-21T06:13:58.000Z
2022-03-13T02:10:27.000Z
def count_parameters(model, verbose=True): """Count number of parameters in PyTorch model, References: https://discuss.pytorch.org/t/how-do-i-check-the-number-of-parameters-of-a-model/4325/7. from utils.utils import count_parameters count_parameters(model) import sys sys.exit(1) """ n_a...
36.4375
104
0.689537
def count_parameters(model, verbose=True): """Count number of parameters in PyTorch model, References: https://discuss.pytorch.org/t/how-do-i-check-the-number-of-parameters-of-a-model/4325/7. from utils.utils import count_parameters count_parameters(model) import sys sys.exit(1) """ n_a...
0
0
0
923c97b76b64e523bffcff87a6d47e5eb6f80a73
2,247
py
Python
httpolice/exchange.py
bmwiedemann/httpolice
4da2bde3d14a24b0623ee45ae10afd192d6fa771
[ "MIT" ]
1
2019-04-10T12:46:13.000Z
2019-04-10T12:46:13.000Z
httpolice/exchange.py
bmwiedemann/httpolice
4da2bde3d14a24b0623ee45ae10afd192d6fa771
[ "MIT" ]
null
null
null
httpolice/exchange.py
bmwiedemann/httpolice
4da2bde3d14a24b0623ee45ae10afd192d6fa771
[ "MIT" ]
null
null
null
# -*- coding: utf-8; -*- from httpolice import request, response from httpolice.blackboard import Blackboard from httpolice.known import st def complaint_box(*args, **kwargs): """Create an empty exchange that only carries a single notice. This is used (for example, in :mod:`httpolice.framing1`) to repo...
30.364865
77
0.621273
# -*- coding: utf-8; -*- from httpolice import request, response from httpolice.blackboard import Blackboard from httpolice.known import st class Exchange(Blackboard): # Note that an exchange is a :class:`Blackboard`, # so notices can be reported directly on it. # See :func:`complaint_box`. self_na...
228
1,025
23
331c20c552c40b6bdb2cf47c04c503e2ded9cf8f
2,024
py
Python
python/haarClassifiers/trainHaarCascade.py
NunoDuarte/openCVdevelop
43204a903a3c96758332a86c7d6b10c285d6ed37
[ "MIT" ]
null
null
null
python/haarClassifiers/trainHaarCascade.py
NunoDuarte/openCVdevelop
43204a903a3c96758332a86c7d6b10c285d6ed37
[ "MIT" ]
null
null
null
python/haarClassifiers/trainHaarCascade.py
NunoDuarte/openCVdevelop
43204a903a3c96758332a86c7d6b10c285d6ed37
[ "MIT" ]
null
null
null
import urllib import cv2 import numpy as np import os create_pos_n_neg()
33.180328
99
0.528656
import urllib import cv2 import numpy as np import os def store_raw_images(): neg_images_link = 'http://image-net.org/api/text/imagenet.synset.geturls?wnid=n07942152' #neg_images_link = 'http://image-net.org/api/text/imagenet.synset.geturls?wnid=n00523513' neg_images_urls = urllib.urlopen(neg_images_link)...
1,881
0
69
40d75528c0577bc7d64f4d85d7514f0c5d3b052f
1,819
py
Python
play/EraPostgresProvision/scripts/Substrate_Era_PostgreSQL_DB_Action___pre_create___Task__2GetProfileIDs.py
halsayed/calm
46c93ac2b02227663f0184d149f62d142b2638cc
[ "MIT" ]
null
null
null
play/EraPostgresProvision/scripts/Substrate_Era_PostgreSQL_DB_Action___pre_create___Task__2GetProfileIDs.py
halsayed/calm
46c93ac2b02227663f0184d149f62d142b2638cc
[ "MIT" ]
null
null
null
play/EraPostgresProvision/scripts/Substrate_Era_PostgreSQL_DB_Action___pre_create___Task__2GetProfileIDs.py
halsayed/calm
46c93ac2b02227663f0184d149f62d142b2638cc
[ "MIT" ]
1
2021-11-16T10:28:42.000Z
2021-11-16T10:28:42.000Z
# Set creds and headers era_user = '@@{era_creds.username}@@' era_pass = '@@{era_creds.secret}@@' headers = {'Content-Type': 'application/json', 'Accept': 'application/json'} # Get Software Profile ID url = "https://@@{era_ip}@@:8443/era/v0.8/profiles?type=Software&name=@@{software_profile}@@" resp = urlreq(url, v...
45.475
109
0.706432
# Set creds and headers era_user = '@@{era_creds.username}@@' era_pass = '@@{era_creds.secret}@@' headers = {'Content-Type': 'application/json', 'Accept': 'application/json'} # Get Software Profile ID url = "https://@@{era_ip}@@:8443/era/v0.8/profiles?type=Software&name=@@{software_profile}@@" resp = urlreq(url, v...
0
0
0
effc868ba3985263b54f27c9ba1dafa032b3a960
351
py
Python
services/shortto.py
joshthecoder/shorty-python
35687d010683944d75e3f0dce7799903296172c5
[ "MIT" ]
11
2015-05-29T04:58:28.000Z
2020-05-31T17:07:52.000Z
services/shortto.py
joshthecoder/shorty-python
35687d010683944d75e3f0dce7799903296172c5
[ "MIT" ]
null
null
null
services/shortto.py
joshthecoder/shorty-python
35687d010683944d75e3f0dce7799903296172c5
[ "MIT" ]
2
2015-03-10T06:22:31.000Z
2018-06-18T18:20:59.000Z
## Shorty ## Copyright 2009 Joshua Roesslein ## See LICENSE ## @url short.to
21.9375
65
0.60114
## Shorty ## Copyright 2009 Joshua Roesslein ## See LICENSE ## @url short.to class Shortto(Service): def shrink(self, bigurl): resp = request('http://short.to/s.txt', {'url': bigurl}) return resp.read() def expand(self, tinyurl): resp = request('http://long.to/do.txt', {'url': tinyurl...
194
2
76
d545d30c9fd67772bfbdc34fdd46ac0419574c8a
19,748
py
Python
ws/test_web_services.py
OpenTreeOfLife/otcetera
2b5ff724094f768df9bc37b9f0ffb319abd03a20
[ "BSD-2-Clause", "MIT" ]
4
2015-04-29T09:23:12.000Z
2020-11-30T07:43:07.000Z
ws/test_web_services.py
OpenTreeOfLife/otcetera
2b5ff724094f768df9bc37b9f0ffb319abd03a20
[ "BSD-2-Clause", "MIT" ]
70
2015-03-19T08:19:40.000Z
2022-03-21T19:06:18.000Z
ws/test_web_services.py
OpenTreeOfLife/otcetera
2b5ff724094f768df9bc37b9f0ffb319abd03a20
[ "BSD-2-Clause", "MIT" ]
3
2015-07-03T19:21:20.000Z
2015-12-02T13:24:53.000Z
#!/usr/bin/env python import subprocess import requests import json import time import logging try: from Queue import Queue except: from queue import Queue from threading import Thread, RLock _LOG = logging.getLogger(__name__) _LOG.setLevel(logging.DEBUG) _lh = logging.StreamHandler() _lh.setFormatter(logging.F...
42.377682
239
0.577172
#!/usr/bin/env python import subprocess import requests import json import time import logging try: from Queue import Queue except: from queue import Queue from threading import Thread, RLock _LOG = logging.getLogger(__name__) _LOG.setLevel(logging.DEBUG) _lh = logging.StreamHandler() _lh.setFormatter(logging.F...
10,883
387
183
76e4e379bdb364fc335472dd11b27d14c6dc3696
1,572
py
Python
coinds/cassandra/poll_coins.py
skwongg/coins
fe9840cdee6bdf10854d5312e6fc52154c081dfc
[ "MIT" ]
1
2018-03-06T01:59:57.000Z
2018-03-06T01:59:57.000Z
coinds/cassandra/poll_coins.py
skwongg/coins
fe9840cdee6bdf10854d5312e6fc52154c081dfc
[ "MIT" ]
2
2020-06-05T17:07:09.000Z
2021-06-10T18:10:16.000Z
coinds/cassandra/poll_coins.py
skwongg/coins
fe9840cdee6bdf10854d5312e6fc52154c081dfc
[ "MIT" ]
null
null
null
from cassandra.cluster import Cluster from cassandra.cqlengine import connection from cassandra.cqlengine.management import sync_table from coins import Coin CQLENG_ALLOW_SCHEMA_MANAGEMENT='CQLENG_ALLOW_SCHEMA_MANAGEMENT' cluster=Cluster() connection.setup(['127.0.0.1'], "cassy", protocol_version=3) class CoinPrice a...
46.235294
615
0.771628
from cassandra.cluster import Cluster from cassandra.cqlengine import connection from cassandra.cqlengine.management import sync_table from coins import Coin CQLENG_ALLOW_SCHEMA_MANAGEMENT='CQLENG_ALLOW_SCHEMA_MANAGEMENT' cluster=Cluster() connection.setup(['127.0.0.1'], "cassy", protocol_version=3) class CoinPrice a...
0
0
0
b1edd974dc7790b129ef197cf1042e0dc3dc1c81
3,695
py
Python
genestack_client/data_flow_editor.py
genestack/python-client
083eb0508dc99c7575ba7f115595f2535f007583
[ "MIT" ]
2
2017-08-30T22:32:59.000Z
2021-07-20T10:08:23.000Z
genestack_client/data_flow_editor.py
genestack/python-client
083eb0508dc99c7575ba7f115595f2535f007583
[ "MIT" ]
58
2015-10-19T08:36:00.000Z
2020-12-07T13:48:17.000Z
genestack_client/data_flow_editor.py
genestack/python-client
083eb0508dc99c7575ba7f115595f2535f007583
[ "MIT" ]
6
2015-10-21T21:43:45.000Z
2021-01-06T20:33:53.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() from builtins import * from genestack_client import Application, FilesUtil,...
39.308511
118
0.661434
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() from builtins import * from genestack_client import Application, FilesUtil,...
120
3,201
23
299fd36aab0da8b10d2e00a4a1f71ae4cf849959
12,847
py
Python
examples/defcon27-quals-speedrun-002/exploit_0.py
SQLab/CRAXplusplus
0cef3434c37eea73e72e0e75332c8d67e73741cd
[ "MIT" ]
15
2022-01-04T16:58:52.000Z
2022-03-28T18:01:55.000Z
examples/defcon27-quals-speedrun-002/exploit_0.py
aesophor/CRAXplusplus
caacbeb4fadb5452ac3bf2faf5aff33580d19cca
[ "MIT" ]
7
2022-01-04T13:07:18.000Z
2022-03-24T14:38:13.000Z
examples/defcon27-quals-speedrun-002/exploit_0.py
SQLab/CRAXplusplus
0cef3434c37eea73e72e0e75332c8d67e73741cd
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from pwn import * context.update(arch = 'amd64', os = 'linux', log_level = 'info') target = ELF('./target', checksec=False) libc_2_24_so = ELF('./libc-2.24.so', checksec=False) __libc_csu_init = 0x400840 __libc_csu_init_call_target = 0x400e48 __libc_csu_init_gadget1 = 0x400896 __libc_csu_init_g...
120.065421
9,006
0.732856
#!/usr/bin/env python3 from pwn import * context.update(arch = 'amd64', os = 'linux', log_level = 'info') target = ELF('./target', checksec=False) libc_2_24_so = ELF('./libc-2.24.so', checksec=False) __libc_csu_init = 0x400840 __libc_csu_init_call_target = 0x400e48 __libc_csu_init_gadget1 = 0x400896 __libc_csu_init_g...
0
0
0
4f46a39ae434d903a111c5c0903dc93e04f76bf6
2,447
py
Python
recipe_parser/recipes/allrecipes.py
tyler-a-cox/recipe-parsing
fa883f66a39063cf72912527628b082cda455e76
[ "MIT" ]
null
null
null
recipe_parser/recipes/allrecipes.py
tyler-a-cox/recipe-parsing
fa883f66a39063cf72912527628b082cda455e76
[ "MIT" ]
null
null
null
recipe_parser/recipes/allrecipes.py
tyler-a-cox/recipe-parsing
fa883f66a39063cf72912527628b082cda455e76
[ "MIT" ]
null
null
null
import inspect from bs4 import BeautifulSoup from typing import Optional, Union from ._settings import HEADERS from ._schema import DefaultSchema from ._utils import clean_vulgar_fraction, clean_unicode class AllRecipes(DefaultSchema): """ """ @classmethod def __init__(self, url: str, headers: Opti...
24.47
85
0.509195
import inspect from bs4 import BeautifulSoup from typing import Optional, Union from ._settings import HEADERS from ._schema import DefaultSchema from ._utils import clean_vulgar_fraction, clean_unicode class AllRecipes(DefaultSchema): """ """ @classmethod def host(cls): return "allrecipes.c...
25
0
26
802a3bd1834812a7a38a6c8b32a5bf8db0b48403
879
py
Python
tests/test_docs.py
regebro/passwordmetrics
47f5c6eaad3b3f503094fdb456befa8bcb8a1b19
[ "MIT" ]
6
2015-04-29T17:07:55.000Z
2021-08-06T14:28:20.000Z
tests/test_docs.py
regebro/passwordmetrics
47f5c6eaad3b3f503094fdb456befa8bcb8a1b19
[ "MIT" ]
null
null
null
tests/test_docs.py
regebro/passwordmetrics
47f5c6eaad3b3f503094fdb456befa8bcb8a1b19
[ "MIT" ]
1
2017-12-23T06:36:26.000Z
2017-12-23T06:36:26.000Z
import sys import re import doctest import manuel.doctest import manuel.codeblock import manuel.testing import unittest if sys.version_info[0] < 3: # Just don't do them under Python 3. # Sigh. if __name__ == '__main__': unittest.TextTestRunner().run(additional_tests())
30.310345
83
0.613197
import sys import re import doctest import manuel.doctest import manuel.codeblock import manuel.testing import unittest if sys.version_info[0] < 3: # Just don't do them under Python 3. # Sigh. class CustomChecker(doctest.OutputChecker): def check_output(self, want, got, optionflags): ...
483
22
89
71336ba4933f2a37f7f3b0fdded458adb63b6c1d
1,238
py
Python
final_flask/run_ml.py
madbee99/Final_Project
154edb302b6b4494b277e732f72efd1163589c3e
[ "MIT" ]
null
null
null
final_flask/run_ml.py
madbee99/Final_Project
154edb302b6b4494b277e732f72efd1163589c3e
[ "MIT" ]
null
null
null
final_flask/run_ml.py
madbee99/Final_Project
154edb302b6b4494b277e732f72efd1163589c3e
[ "MIT" ]
null
null
null
import pandas as pd from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler import psycopg2 from sqlalchemy import create_engine from config import db_password #data from: https://www.kaggle.com/malapatiravi/graduate-scho...
34.388889
95
0.753635
import pandas as pd from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler import psycopg2 from sqlalchemy import create_engine from config import db_password #data from: https://www.kaggle.com/malapatiravi/graduate-scho...
865
0
23
289c138c6b453a9bc534345857c55549ca620b34
2,781
py
Python
Code/other/my-epstein/civil_violence/server.py
joekroese/math-of-revolution
c831ea3d5f6c56c3861522f71ec47e1a22f9ff2c
[ "MIT" ]
2
2019-12-07T18:16:46.000Z
2020-06-16T10:54:20.000Z
Code/other/my-epstein/civil_violence/server.py
joekroese/math-of-revolution
c831ea3d5f6c56c3861522f71ec47e1a22f9ff2c
[ "MIT" ]
null
null
null
Code/other/my-epstein/civil_violence/server.py
joekroese/math-of-revolution
c831ea3d5f6c56c3861522f71ec47e1a22f9ff2c
[ "MIT" ]
null
null
null
from mesa.visualization.ModularVisualization import ModularServer from mesa.visualization.modules import CanvasGrid from mesa.visualization.UserParam import UserSettableParameter from mesa.visualization.modules import ChartModule from .model import CivilViolenceModel from .agent import Citizen, Cop COP_COLOR = "Blac...
40.304348
108
0.57749
from mesa.visualization.ModularVisualization import ModularServer from mesa.visualization.modules import CanvasGrid from mesa.visualization.UserParam import UserSettableParameter from mesa.visualization.modules import ChartModule from .model import CivilViolenceModel from .agent import Citizen, Cop COP_COLOR = "Blac...
619
0
23
bb57351e558e0a9c4d003f9fbfa6974828e96c87
4,874
py
Python
tube/etl/outputs/es/writer.py
plooploops/tube
4ca697b7714b057c78fdb80f88edba37e837262e
[ "Apache-2.0" ]
null
null
null
tube/etl/outputs/es/writer.py
plooploops/tube
4ca697b7714b057c78fdb80f88edba37e837262e
[ "Apache-2.0" ]
2
2021-03-24T16:04:22.000Z
2021-03-30T12:54:07.000Z
tube/etl/outputs/es/writer.py
plooploops/tube
4ca697b7714b057c78fdb80f88edba37e837262e
[ "Apache-2.0" ]
null
null
null
import json from elasticsearch import Elasticsearch from tube.etl.outputs.es.timestamp import ( putting_timestamp, get_latest_utc_transaction_time, ) from tube.etl.outputs.es.versioning import Versioning from tube.etl.plugins import post_process_plugins, add_auth_resource_path_mapping from tube.etl.spark_base...
34.814286
86
0.598277
import json from elasticsearch import Elasticsearch from tube.etl.outputs.es.timestamp import ( putting_timestamp, get_latest_utc_transaction_time, ) from tube.etl.outputs.es.versioning import Versioning from tube.etl.plugins import post_process_plugins, add_auth_resource_path_mapping from tube.etl.spark_base...
916
3,524
46
f1f3adb057037033ad40b0b8a142e4de788ee12b
1,724
py
Python
classes/utility.py
aryanmsr/Drone_Delivery
ca682faa4396030fb948e1f289f541bac6e2cf27
[ "MIT" ]
1
2021-09-10T22:36:04.000Z
2021-09-10T22:36:04.000Z
classes/utility.py
aryanmsr/Drone_Delivery
ca682faa4396030fb948e1f289f541bac6e2cf27
[ "MIT" ]
null
null
null
classes/utility.py
aryanmsr/Drone_Delivery
ca682faa4396030fb948e1f289f541bac6e2cf27
[ "MIT" ]
1
2021-03-09T17:17:13.000Z
2021-03-09T17:17:13.000Z
import math from classes.dataframes import * import numpy as np # class Utility: # # def __init__(self): # self.Data = Dataframes() # self.df_orders = self.Data.get_df_orders() # self.grid_rows = self.Data.grid_row # self.grid_cols = self.Data.grid_col # self.df_wrhs = self...
30.245614
82
0.534223
import math from classes.dataframes import * import numpy as np # class Utility: # # def __init__(self): # self.Data = Dataframes() # self.df_orders = self.Data.get_df_orders() # self.grid_rows = self.Data.grid_row # self.grid_cols = self.Data.grid_col # self.df_wrhs = self...
1,222
0
46
ec6d03f3c81832af35ad4292ffbea309d914297d
1,312
py
Python
models/actors.py
wanderindev/udacity-casting-agency
a123ff26ffc565bfff4f4f829ae7613a6ccb366d
[ "MIT" ]
1
2021-01-10T19:34:24.000Z
2021-01-10T19:34:24.000Z
models/actors.py
wanderindev/udacity-casting-agency
a123ff26ffc565bfff4f4f829ae7613a6ccb366d
[ "MIT" ]
1
2021-04-30T21:07:42.000Z
2021-04-30T21:07:42.000Z
models/actors.py
wanderindev/udacity-casting-agency
a123ff26ffc565bfff4f4f829ae7613a6ccb366d
[ "MIT" ]
null
null
null
from typing import Dict, List, Union from sqlalchemy.dialects.postgresql import ENUM from db import db from models.model_mixin import ModelMixin ActorJSON = Dict[str, Union[int, str, List[str]]] gender_enum = ENUM("Male", "Female", name="gender") class ActorModel(db.Model, ModelMixin): """SQLAlchemy ...
29.818182
62
0.623476
from typing import Dict, List, Union from sqlalchemy.dialects.postgresql import ENUM from db import db from models.model_mixin import ModelMixin ActorJSON = Dict[str, Union[int, str, List[str]]] gender_enum = ENUM("Male", "Female", name="gender") class ActorModel(db.Model, ModelMixin): """SQLAlchemy ...
542
0
139
a31eed23d55b6f7f1f91bb159c2db44ee1f8820c
2,535
py
Python
wgs/geno2hierfst.py
trmznt/pys
0f66d52e5d166140c3358f8c6af9ad4cee2e2b7e
[ "MIT" ]
null
null
null
wgs/geno2hierfst.py
trmznt/pys
0f66d52e5d166140c3358f8c6af9ad4cee2e2b7e
[ "MIT" ]
null
null
null
wgs/geno2hierfst.py
trmznt/pys
0f66d52e5d166140c3358f8c6af9ad4cee2e2b7e
[ "MIT" ]
2
2018-09-19T00:52:15.000Z
2021-05-14T23:04:47.000Z
#!/usr/bin/env spcli # this command runs hierarchical FST comparison from seqpy import cout, cerr from seqpy.cmds import arg_parser from seqpy.core.bioio import tabparser import itertools import allel
28.483146
91
0.584615
#!/usr/bin/env spcli # this command runs hierarchical FST comparison from seqpy import cout, cerr from seqpy.cmds import arg_parser from seqpy.core.bioio import tabparser import itertools import allel def init_argparser(p=None): p = tabparser.init_argparser() p.add_argument('--hierfile', required=True, hel...
2,257
0
69
8c203230e3e1b5e416eb97d5dc3c5303073b202d
3,636
py
Python
src/preprocess/vipcup_data_split.py
cmlab-mira/MedicalPro
3918c95197fd24406ce2117cc7ff9ce21bb8c620
[ "MIT" ]
6
2020-02-01T07:19:32.000Z
2021-05-10T13:55:49.000Z
src/preprocess/vipcup_data_split.py
cmlab-mira/MedicalPro
3918c95197fd24406ce2117cc7ff9ce21bb8c620
[ "MIT" ]
1
2020-06-21T08:33:35.000Z
2020-06-21T08:33:35.000Z
src/preprocess/vipcup_data_split.py
cmlab-mira/MedicalPro
3918c95197fd24406ce2117cc7ff9ce21bb8c620
[ "MIT" ]
1
2020-11-11T06:24:12.000Z
2020-11-11T06:24:12.000Z
import argparse import csv import logging import random import numpy as np import nibabel as nib from pathlib import Path if __name__ == "__main__": logging.basicConfig(format='%(asctime)s | %(name)-4s | %(levelname)-4s | %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S') ...
42.776471
121
0.657866
import argparse import csv import logging import random import numpy as np import nibabel as nib from pathlib import Path def main(args): # Randomly split the data into k folds. patient_dirs = sorted(dir_ for dir_ in (args.resampled_data_dir / 'training').iterdir() if dir_.is_dir()) # Testing fold, which...
3,233
0
46
85c4bda8994ba1d1ab30006d431cffaa6357194c
5,887
py
Python
exercises/super_ugly_number.py
David-Jianguang-Ran/LeetCodePracticeHelper
e76a25704eb41980b8d949ee1046a35a6a6ef0f6
[ "MIT" ]
null
null
null
exercises/super_ugly_number.py
David-Jianguang-Ran/LeetCodePracticeHelper
e76a25704eb41980b8d949ee1046a35a6a6ef0f6
[ "MIT" ]
null
null
null
exercises/super_ugly_number.py
David-Jianguang-Ran/LeetCodePracticeHelper
e76a25704eb41980b8d949ee1046a35a6a6ef0f6
[ "MIT" ]
null
null
null
from base import LeetCodeProblem class Problem(LeetCodeProblem): # for behaviours other than exact match between solution output and expected output # see # Testers in README.md """ https://leetcode.com/problems/super-ugly-number/ # first attempt: ## invariant since all prime factor of SU...
36.79375
147
0.515543
from base import LeetCodeProblem class Problem(LeetCodeProblem): # for behaviours other than exact match between solution output and expected output # see # Testers in README.md """ https://leetcode.com/problems/super-ugly-number/ # first attempt: ## invariant since all prime factor of SU...
5,221
0
53
7ea446547a306d0562fe342d35ffc735e55db031
873
py
Python
python/graphscope/nx/tests/algorithms/forward/operators/test_all.py
LI-Mingyu/GraphScope-MY
942060983d3f7f8d3a3377467386e27aba285b33
[ "Apache-2.0" ]
1,521
2020-10-28T03:20:24.000Z
2022-03-31T12:42:51.000Z
python/graphscope/nx/tests/algorithms/forward/operators/test_all.py
LI-Mingyu/GraphScope-MY
942060983d3f7f8d3a3377467386e27aba285b33
[ "Apache-2.0" ]
850
2020-12-15T03:17:32.000Z
2022-03-31T11:40:13.000Z
python/graphscope/nx/tests/algorithms/forward/operators/test_all.py
LI-Mingyu/GraphScope-MY
942060983d3f7f8d3a3377467386e27aba285b33
[ "Apache-2.0" ]
180
2020-11-10T03:43:21.000Z
2022-03-28T11:13:31.000Z
import networkx.algorithms.operators.tests.test_all import pytest from graphscope.nx.utils.compat import import_as_graphscope_nx import_as_graphscope_nx(networkx.algorithms.operators.tests.test_all, decorators=pytest.mark.usefixtures("graphscope_session")) @pytest.mark.skip(reason="not suppo...
22.973684
81
0.776632
import networkx.algorithms.operators.tests.test_all import pytest from graphscope.nx.utils.compat import import_as_graphscope_nx import_as_graphscope_nx(networkx.algorithms.operators.tests.test_all, decorators=pytest.mark.usefixtures("graphscope_session")) @pytest.mark.skip(reason="not suppo...
140
0
132
a1ab316782f87a08c7277aac1d21ca2fcbd66929
3,226
py
Python
analytics/ot-iou/iou_tracker.py
QuPengfei/Smart-City-Sample
d0813666467e030fc8a6bcbffd098273912118f8
[ "BSD-3-Clause" ]
126
2019-07-15T14:44:54.000Z
2022-03-22T11:03:50.000Z
analytics/ot-iou/iou_tracker.py
QuPengfei/Smart-City-Sample
d0813666467e030fc8a6bcbffd098273912118f8
[ "BSD-3-Clause" ]
97
2019-07-16T18:28:29.000Z
2022-03-16T07:27:57.000Z
analytics/ot-iou/iou_tracker.py
QuPengfei/Smart-City-Sample
d0813666467e030fc8a6bcbffd098273912118f8
[ "BSD-3-Clause" ]
74
2019-07-15T14:45:02.000Z
2022-03-23T12:10:03.000Z
import os
44.805556
169
0.583385
import os class IOUTracker(object): def __init__(self,sigma_l=0,sigma_h=0.5,sigma_iou=0.5,t_min=2): super(IOUTracker, self).__init__() self.tracks_active = [] self.tracks_finished = [] self.track_id=0 self.sigma_l=sigma_l self.sigma_h=sigma_h self.sigma_iou...
3,108
4
103
a218acf09f6d2a9040b321e06c6de2132b281baa
2,260
py
Python
src/preprocess.py
Smashh712/chainRec
128a0b4e9c1728930aaab55f364d681410483fbe
[ "Apache-2.0" ]
50
2018-09-22T12:09:30.000Z
2021-05-15T13:14:44.000Z
src/preprocess.py
AkkyPali/chainRec
23badc2a1bb735f6f0a366dcb2c0735f5961b7d6
[ "Apache-2.0" ]
3
2018-11-23T09:10:02.000Z
2019-07-31T07:08:22.000Z
src/preprocess.py
AkkyPali/chainRec
23badc2a1bb735f6f0a366dcb2c0735f5961b7d6
[ "Apache-2.0" ]
18
2018-09-28T04:09:02.000Z
2021-10-04T18:16:54.000Z
import numpy as np import pandas as pd import gzip import sys from collections import Counter import os DATA_DIR = "../data/" if not os.path.exists(DATA_DIR): os.makedirs(DATA_DIR)
35.873016
130
0.516814
import numpy as np import pandas as pd import gzip import sys from collections import Counter import os DATA_DIR = "../data/" if not os.path.exists(DATA_DIR): os.makedirs(DATA_DIR) def process_yoochoose(): print("loading yoochoose data ... ") sys.stdout.flush() data_buy = pd.read_csv...
2,042
0
27
b48167b67139ec28d4ec463e0cfd1adfa33938a1
1,307
py
Python
multyqubit.py
kaitodeesu/project2021
1b6a850f7c7aaced7173e424c0eca21e8349f071
[ "MIT" ]
null
null
null
multyqubit.py
kaitodeesu/project2021
1b6a850f7c7aaced7173e424c0eca21e8349f071
[ "MIT" ]
null
null
null
multyqubit.py
kaitodeesu/project2021
1b6a850f7c7aaced7173e424c0eca21e8349f071
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[17]: import numpy as np from numpy import linalg as LA dimension=2 #次元を指定する v=randomnumber(dimension) e=np.zeros((dimension,dimension),dtype='float64')#エルミット演算子を生成する単位ベクトル u=getu(dimension) print(u) for c in range(0,dimension): e[c]=u[c]/LA.norm(u[c],2)#·ord=2...
13.904255
69
0.589135
#!/usr/bin/env python # coding: utf-8 # In[17]: import numpy as np from numpy import linalg as LA dimension=2 #次元を指定する def randomnumber(dimension): #ランダムな行列の生成 return np.random.random((dimension,dimension)) def gram(a,b): #規格化 return ((np.dot(a,b)/np.dot(a,a))*a) def hermatite(a): #複素共役 return...
458
0
92
4eba4d82b6df63e6d64913d575575baca285af09
865
py
Python
datautil.py
zadiran/DataworksOnline
be8e9c207dd6cbe84e4c8afdf956e9360f905320
[ "MIT" ]
null
null
null
datautil.py
zadiran/DataworksOnline
be8e9c207dd6cbe84e4c8afdf956e9360f905320
[ "MIT" ]
null
null
null
datautil.py
zadiran/DataworksOnline
be8e9c207dd6cbe84e4c8afdf956e9360f905320
[ "MIT" ]
null
null
null
import json import io
22.179487
73
0.647399
import json import io def read_file(filename): with open(filename) as file: lines = [line.strip() for line in file] return lines def get_columns(lines, delimiter): return lines[0].split(delimiter) def get_data(lines, delimiter): data = [] iterator = iter(lines) next(iterator)...
727
0
115
1259747036f2db45257e6dc9bb60b6e03de0137a
4,759
py
Python
messenger/utils/response/response.py
functioncall/rescue-habit
98c9d3f2feff0ed100523f9822865a139f6f7648
[ "MIT" ]
null
null
null
messenger/utils/response/response.py
functioncall/rescue-habit
98c9d3f2feff0ed100523f9822865a139f6f7648
[ "MIT" ]
null
null
null
messenger/utils/response/response.py
functioncall/rescue-habit
98c9d3f2feff0ed100523f9822865a139f6f7648
[ "MIT" ]
null
null
null
import json import os import random import requests from django_project import settings from django.http import HttpResponse, JsonResponse from messenger.utils.response.ResponseTypes.QuickReplyResponse import QuickReplyResponse from messenger.utils.response.ResponseTypes.TextResponse import TextResponse from django.c...
34.737226
120
0.602858
import json import os import random import requests from django_project import settings from django.http import HttpResponse, JsonResponse from messenger.utils.response.ResponseTypes.QuickReplyResponse import QuickReplyResponse from messenger.utils.response.ResponseTypes.TextResponse import TextResponse from django.c...
0
0
0
2802007a914ccea0529db32e456238e601b7bb66
4,238
py
Python
tests/test_web_ui.py
underground-lab/zelezobeton
5afd96c3123b3d8accca107c6e60a3f6fdecdf27
[ "MIT" ]
2
2022-01-10T11:46:46.000Z
2022-01-11T08:32:54.000Z
tests/test_web_ui.py
underground-lab/zelezobeton
5afd96c3123b3d8accca107c6e60a3f6fdecdf27
[ "MIT" ]
1
2022-01-13T09:16:25.000Z
2022-01-14T08:39:12.000Z
tests/test_web_ui.py
underground-lab/zelezobeton
5afd96c3123b3d8accca107c6e60a3f6fdecdf27
[ "MIT" ]
null
null
null
# coding: utf-8 import os from urllib.request import urlopen import pytest from selenium.webdriver import Firefox, ActionChains from selenium.webdriver.common.by import By from selenium.webdriver.firefox.options import Options from selenium.webdriver.support.expected_conditions import staleness_of from selenium.webdr...
37.175439
85
0.717084
# coding: utf-8 import os from urllib.request import urlopen import pytest from selenium.webdriver import Firefox, ActionChains from selenium.webdriver.common.by import By from selenium.webdriver.firefox.options import Options from selenium.webdriver.support.expected_conditions import staleness_of from selenium.webdr...
3,584
0
44
6e64305e1e82509bdea2615d39ca0bdc7b96d09d
1,653
py
Python
new_date_extract.py
Arwain/Undergraduate-Research---Twitter-Sentiment-Analysis
32429604b18ec8c96473836b1cf36bddfad2fe4e
[ "MIT" ]
null
null
null
new_date_extract.py
Arwain/Undergraduate-Research---Twitter-Sentiment-Analysis
32429604b18ec8c96473836b1cf36bddfad2fe4e
[ "MIT" ]
null
null
null
new_date_extract.py
Arwain/Undergraduate-Research---Twitter-Sentiment-Analysis
32429604b18ec8c96473836b1cf36bddfad2fe4e
[ "MIT" ]
null
null
null
import pandas as pd from sklearn.cluster import KMeans import numpy as np import matplotlib.pyplot as plt from datetime import datetime, date, time, timedelta import re import pickle import time as tm df = pd.read_csv("bitcoin_auto.csv", dtype={"COMPOUND": float}) df = df.drop_duplicates() # print(df.he...
24.671642
85
0.640653
import pandas as pd from sklearn.cluster import KMeans import numpy as np import matplotlib.pyplot as plt from datetime import datetime, date, time, timedelta import re import pickle import time as tm df = pd.read_csv("bitcoin_auto.csv", dtype={"COMPOUND": float}) df = df.drop_duplicates() # print(df.he...
0
0
0
2c6a9976f7657424840a5d3cbdfa941b9489f0c1
3,523
py
Python
modules/status.py
NightKey/Server-monitoring-discord-bot
69444953e2c7abd957cbfe7f0e3943f6fbf4b6b4
[ "Unlicense" ]
2
2020-02-24T02:15:30.000Z
2022-03-30T05:26:18.000Z
modules/status.py
NightKey/Server-monitoring-discord-bot
69444953e2c7abd957cbfe7f0e3943f6fbf4b6b4
[ "Unlicense" ]
null
null
null
modules/status.py
NightKey/Server-monitoring-discord-bot
69444953e2c7abd957cbfe7f0e3943f6fbf4b6b4
[ "Unlicense" ]
null
null
null
from typing import Collection, Dict, Union from modules import bar from datetime import timedelta import psutil valid_fstypes = ["ntfs", "ext4", "ext3"] def get_pc_status() -> Union[Dict[str, str], Dict[str, dict], Dict[str, str]]: """With the help of the psutil module, scanns the PC for information about all the ...
37.478723
165
0.599773
from typing import Collection, Dict, Union from modules import bar from datetime import timedelta import psutil valid_fstypes = ["ntfs", "ext4", "ext3"] def get_temp() -> float: if not hasattr(psutil, "sensors_temperatures"): return None temps = psutil.sensors_temperatures() if not temps: r...
674
0
69
3b99b9dd6b06bd5c78b691884ff6d652212f2f36
659
py
Python
wush/common/files.py
wxnacy/wush
30620144f7a6fb676d210dd9463b77894f956b38
[ "MIT" ]
null
null
null
wush/common/files.py
wxnacy/wush
30620144f7a6fb676d210dd9463b77894f956b38
[ "MIT" ]
null
null
null
wush/common/files.py
wxnacy/wush
30620144f7a6fb676d210dd9463b77894f956b38
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: wxnacy@gmail.com """ """ import os import json import yaml
20.59375
47
0.544765
#!/usr/bin/env python # -*- coding:utf-8 -*- # Author: wxnacy@gmail.com """ """ import os import json import yaml class FileUtils: @classmethod def read_dict(cls, filepath): """ 读取字典数据 :param str filepath: 文件地址 """ with open(filepath, 'r') as f: if filepat...
0
554
23
4606bcc51ea2eb49e447b7dd4c5dcabff35dcc25
225
py
Python
Practice/PythonApplication/LeetCode/Facebook/1108.py
kushalbhola/MyStuff
3f1064866487e489af41f8662a875b9954d5d8b0
[ "Apache-2.0" ]
null
null
null
Practice/PythonApplication/LeetCode/Facebook/1108.py
kushalbhola/MyStuff
3f1064866487e489af41f8662a875b9954d5d8b0
[ "Apache-2.0" ]
1
2020-04-29T23:00:26.000Z
2020-04-29T23:00:26.000Z
Practice/PythonApplication/LeetCode/Facebook/1108.py
kushalbhola/MyStuff
3f1064866487e489af41f8662a875b9954d5d8b0
[ "Apache-2.0" ]
null
null
null
import sys if __name__ == '__main__': main()
9.782609
37
0.573333
import sys def main(): input ="1.1.1.1" output = defangIPaddr(input) print(output) def defangIPaddr(input): input = input.replace('.', '[.]') return input if __name__ == '__main__': main()
120
0
44
56ffea9c0aa97af0ce4ad0bdbe4ca4c90c3ff9f1
44
py
Python
dddpy/bases/__init__.py
aeroworks-io/python-ddd
4d9c5de05f33aa63f8b6ca1c6a0cb33238208bee
[ "Apache-2.0" ]
1
2021-10-17T09:23:59.000Z
2021-10-17T09:23:59.000Z
dddpy/bases/__init__.py
aeroworks-io/python-ddd
4d9c5de05f33aa63f8b6ca1c6a0cb33238208bee
[ "Apache-2.0" ]
null
null
null
dddpy/bases/__init__.py
aeroworks-io/python-ddd
4d9c5de05f33aa63f8b6ca1c6a0cb33238208bee
[ "Apache-2.0" ]
null
null
null
from .domain import * from .common import *
14.666667
21
0.727273
from .domain import * from .common import *
0
0
0
b6020f9f3d1ebec20e80cdb91c19f83673740879
857
py
Python
Hw4_get_del_data.py
UWSEDS/hw4-exceptions-and-unit-tests-jahnavijasti
66720cfe29e7f71169e23e5a7ef5f2698581b9ee
[ "MIT" ]
null
null
null
Hw4_get_del_data.py
UWSEDS/hw4-exceptions-and-unit-tests-jahnavijasti
66720cfe29e7f71169e23e5a7ef5f2698581b9ee
[ "MIT" ]
null
null
null
Hw4_get_del_data.py
UWSEDS/hw4-exceptions-and-unit-tests-jahnavijasti
66720cfe29e7f71169e23e5a7ef5f2698581b9ee
[ "MIT" ]
null
null
null
import os import urllib
25.969697
87
0.589265
import os import urllib def get_data(url): try: filename = os.path.basename(url) # urllib.urlopen(url) if not os.path.exists(filename): request = urllib.request.Request(url) with urllib.request.urlopen(request) as response: csv = response.read() ...
786
0
46