hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08f8b01c81d0a6ce9da68065aefd3e9e5420c8a2
13,830
py
Python
reactorch/import_kinetics.py
Zeracesharon/reactorch
cc7b34ee2a19d5cbc717e6a29e0cd18257abb914
[ "MIT" ]
1
2021-05-22T22:24:25.000Z
2021-05-22T22:24:25.000Z
reactorch/import_kinetics.py
Zeracesharon/code_transfer_rt
b394fb6c322b2dc6f0f5dbcb93baf52f94032772
[ "MIT" ]
null
null
null
reactorch/import_kinetics.py
Zeracesharon/code_transfer_rt
b394fb6c322b2dc6f0f5dbcb93baf52f94032772
[ "MIT" ]
null
null
null
import torch def set_nasa(self): self.species_names=self.gas.species_names self.nasa_low = torch.zeros([self.n_species, 7]).to(self.device) self.nasa_high = torch.zeros([self.n_species, 7]).to(self.device) for i in range(self.n_species): j=0 while True: i...
36.68435
112
0.557484
import torch def set_nasa(self): self.species_names=self.gas.species_names self.nasa_low = torch.zeros([self.n_species, 7]).to(self.device) self.nasa_high = torch.zeros([self.n_species, 7]).to(self.device) for i in range(self.n_species): j=0 while True: i...
true
true
08f8b0676fc77af217cd8a4390d2db2f41ad90d4
375
py
Python
spiders/python/Eastmoney/Eastmoney/pipelines.py
leiphp/crawlab-running
4466112499a109f30fab2961ad533575253b2ad8
[ "Apache-2.0" ]
1
2021-11-13T06:31:22.000Z
2021-11-13T06:31:22.000Z
spiders/python/Eastmoney/Eastmoney/pipelines.py
leiphp/crawlab-running
4466112499a109f30fab2961ad533575253b2ad8
[ "Apache-2.0" ]
null
null
null
spiders/python/Eastmoney/Eastmoney/pipelines.py
leiphp/crawlab-running
4466112499a109f30fab2961ad533575253b2ad8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html # 引入保存结果方法 from crawlab import save_item class EastmoneyPipeline(object): def process_item(self, item, spider): p...
25
66
0.704
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html # 引入保存结果方法 from crawlab import save_item class EastmoneyPipeline(object): def process_item(self, item, spider): print(item) save_item(item) return item
true
true
08f8b069ced936ee3a067338dd6ca6419231944e
18,675
py
Python
chb/simulation/SimMemory.py
orinatic/CodeHawk-Binary
8b4fd728213e629736d5ece840ea3b43cea53f30
[ "MIT" ]
null
null
null
chb/simulation/SimMemory.py
orinatic/CodeHawk-Binary
8b4fd728213e629736d5ece840ea3b43cea53f30
[ "MIT" ]
null
null
null
chb/simulation/SimMemory.py
orinatic/CodeHawk-Binary
8b4fd728213e629736d5ece840ea3b43cea53f30
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------ # CodeHawk Binary Analyzer # Author: Henny Sipma # ------------------------------------------------------------------------------ # The MIT License (MIT) # # Copyright (c) 2016-2020 Kestrel Technology LLC # Copyright (c) 2020 Henny Si...
36.545988
83
0.523534
from typing import cast, Dict, List, Sequence, TYPE_CHECKING import chb.simulation.SimSymbolicValue as SSV import chb.simulation.SimUtil as SU import chb.simulation.SimValue as SV import chb.util.fileutil as UF if TYPE_CHECKING: from chb.simulation.SimulationState import SimulationState class SimMemoryByteLin...
true
true
08f8b097e65e0f72780721ca648b46eab3b198f2
1,710
py
Python
src/redfish/ris/sharedtypes.py
andreaslangnevyjel/python-ilorest-library
cd40e5ed9dfd615074d34ec6bb929dc8ea04a797
[ "Apache-2.0" ]
214
2016-04-04T12:24:52.000Z
2022-03-28T11:35:46.000Z
src/redfish/ris/sharedtypes.py
andreaslangnevyjel/python-ilorest-library
cd40e5ed9dfd615074d34ec6bb929dc8ea04a797
[ "Apache-2.0" ]
139
2016-04-02T04:22:29.000Z
2022-03-25T06:54:45.000Z
src/redfish/ris/sharedtypes.py
andreaslangnevyjel/python-ilorest-library
cd40e5ed9dfd615074d34ec6bb929dc8ea04a797
[ "Apache-2.0" ]
116
2016-04-04T20:39:42.000Z
2021-11-13T06:53:41.000Z
### # Copyright 2020 Hewlett Packard Enterprise, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
30.535714
82
0.646784
import logging import jsonpatch from redfish.rest.containers import JSONEncoder LOGGER = logging.getLogger(__name__) class JSONEncoder(JSONEncoder): def default(self, obj): if isinstance(obj, Dictable): return obj.to_dict() elif isinstance(obj, set): ...
true
true
08f8b0d39ca17d0e383a9a4d1fedc5211ae55a86
1,229
py
Python
jaysblog/settings.py
cRiii/jaysblog
f96ecd82f17750a47147ae3c5e72cf1320be21e5
[ "MIT" ]
5
2019-10-14T01:51:02.000Z
2019-11-07T15:01:14.000Z
jaysblog/settings.py
cRiii/jaysblog
f96ecd82f17750a47147ae3c5e72cf1320be21e5
[ "MIT" ]
1
2019-11-07T06:58:26.000Z
2019-11-07T06:58:26.000Z
jaysblog/settings.py
cRiii/jaysblog
f96ecd82f17750a47147ae3c5e72cf1320be21e5
[ "MIT" ]
null
null
null
# !/usr/bin/env python3 # -*- coding: utf-8 -*- """ @Time : 2019/9/17 15:07 @Author : Jay Chen @FileName: settings.py @GitHub : https://github.com/cRiii """ import logging import os class BaseConfig(object): # 添加mysql数据库的配置 SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:rootadmin@127.0.0.1:3306/ja...
22.759259
99
0.698129
import logging import os class BaseConfig(object): SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:rootadmin@127.0.0.1:3306/jaysblog?charset=utf8" SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_COMMIT_ON_TEARDOWN = True SQLALCHEMY_ECHO = True REDIS_URL = "redis://localhost...
true
true
08f8b390c70e233d205596530267a1d103288ea5
8,430
py
Python
QuantumUnit.py
nelimeee/quantum-tools
b9d19c6a1bdcb4e30316f152d9c441fb63ace6ec
[ "CECILL-B" ]
10
2018-07-09T18:13:38.000Z
2022-03-08T17:33:52.000Z
QuantumUnit.py
nelimeee/quantum-tools
b9d19c6a1bdcb4e30316f152d9c441fb63ace6ec
[ "CECILL-B" ]
null
null
null
QuantumUnit.py
nelimeee/quantum-tools
b9d19c6a1bdcb4e30316f152d9c441fb63ace6ec
[ "CECILL-B" ]
2
2019-04-13T10:43:05.000Z
2020-10-14T17:42:28.000Z
# ====================================================================== # Copyright CERFACS (February 2018) # Contributor: Adrien Suau (suau@cerfacs.fr) # # This software is governed by the CeCILL-B license under French law and # abiding by the rules of distribution of free software. You can use, # modify and/or ...
41.940299
107
0.64484
# the economic rights, and the successive licensors have only limited # liability. # # In this respect, the user's attention is drawn to the risks associated # their requirements in conditions enabling the security of their # systems and/or data to be ensured and, more generally, to use and # operate it ...
true
true
08f8b47864f4e10b6814ad5bc11ad084dbf65db6
1,127
py
Python
nested_stacks/elasticsearch/custom_resources/fetch_client_id/index.py
mats16/serverless-social-media-dashboard
0564bd0d7ac7a8e0f869888a90df76e565907451
[ "MIT-0" ]
3
2020-03-09T09:36:00.000Z
2021-12-15T07:32:05.000Z
nested_stacks/elasticsearch/custom_resources/fetch_client_id/index.py
mats16/serverless-social-media-dashboard
0564bd0d7ac7a8e0f869888a90df76e565907451
[ "MIT-0" ]
1
2020-03-09T01:25:09.000Z
2020-03-09T01:25:09.000Z
nested_stacks/elasticsearch/custom_resources/fetch_client_id/index.py
mats16/serverless-social-media-dashboard
0564bd0d7ac7a8e0f869888a90df76e565907451
[ "MIT-0" ]
1
2020-03-15T09:36:56.000Z
2020-03-15T09:36:56.000Z
# -*- coding: utf-8 -*- from __future__ import print_function from crhelper import CfnResource import logging import json import boto3 try: logger = logging.getLogger(__name__) helper = CfnResource(json_logging=False, log_level='DEBUG', boto_level='CRITICAL') client = boto3.client('cognito-idp') except Exc...
32.2
97
0.724933
from __future__ import print_function from crhelper import CfnResource import logging import json import boto3 try: logger = logging.getLogger(__name__) helper = CfnResource(json_logging=False, log_level='DEBUG', boto_level='CRITICAL') client = boto3.client('cognito-idp') except Exception as e: helper....
true
true
08f8b60b125f859641a9889e4e91a27b0466edda
1,522
py
Python
mariner/server/tests/test_utils.py
milescsmith/mariner
cb7b81cfb37535578dc2049d4407f6a55c7fe3ca
[ "MIT" ]
null
null
null
mariner/server/tests/test_utils.py
milescsmith/mariner
cb7b81cfb37535578dc2049d4407f6a55c7fe3ca
[ "MIT" ]
null
null
null
mariner/server/tests/test_utils.py
milescsmith/mariner
cb7b81cfb37535578dc2049d4407f6a55c7fe3ca
[ "MIT" ]
null
null
null
from unittest import TestCase from unittest.mock import patch from mariner.server.utils import retry class RetryTest(TestCase): num_attempts: int = 0 def setUp(self) -> None: self.sleep_patcher = patch("mariner.server.utils.time.sleep") self.sleep_patcher.start() def tearDown(self) -> N...
28.185185
69
0.613009
from unittest import TestCase from unittest.mock import patch from mariner.server.utils import retry class RetryTest(TestCase): num_attempts: int = 0 def setUp(self) -> None: self.sleep_patcher = patch("mariner.server.utils.time.sleep") self.sleep_patcher.start() def tearDown(self) -> N...
true
true
08f8b7e0a9d2f2f744c5f44fe9ce9dd326fd099a
1,938
py
Python
resources/libraries/python/MLRsearch/AbstractSearchAlgorithm.py
preym17/csit
3151c98618c78e3782e48bbe4d9c8f906c126f69
[ "Apache-2.0" ]
null
null
null
resources/libraries/python/MLRsearch/AbstractSearchAlgorithm.py
preym17/csit
3151c98618c78e3782e48bbe4d9c8f906c126f69
[ "Apache-2.0" ]
null
null
null
resources/libraries/python/MLRsearch/AbstractSearchAlgorithm.py
preym17/csit
3151c98618c78e3782e48bbe4d9c8f906c126f69
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 Cisco and/or its affiliates. # 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 ag...
37.269231
80
0.70485
from abc import ABCMeta, abstractmethod class AbstractSearchAlgorithm(object): __metaclass__ = ABCMeta def __init__(self, measurer): self.measurer = measurer @abstractmethod def narrow_down_ndr_and_pdr( self, fail_rate, line_rate, packet_loss_ratio): pa...
true
true
08f8b84271c744dd99052fa3108b34388c9a1129
5,735
py
Python
docs/conf.py
dgilland/schemable
768413b1737293586c2838d602d9b071ee4e9ea3
[ "MIT" ]
2
2019-05-29T19:18:44.000Z
2019-10-14T09:58:43.000Z
docs/conf.py
dgilland/schemable
768413b1737293586c2838d602d9b071ee4e9ea3
[ "MIT" ]
null
null
null
docs/conf.py
dgilland/schemable
768413b1737293586c2838d602d9b071ee4e9ea3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
29.410256
79
0.661203
import os import sys sys.path.insert(0, os.path.abspath('..')) from email import message_from_string from pkg_resources import get_distribution dist = get_distribution('schemable') if hasattr(dist, '_parsed_pkg_info'): pkg_info = dict(dist._parsed_pkg_info) else: pkg_info = dict( message_from_s...
true
true
08f8b898907948fdc1e176ffffc178bf504300bf
3,156
py
Python
Covid19SMS.py
Ayresia/COVID19-SMSSender
11bc072efac943c2075cc976c55e6ba61c6f766d
[ "MIT" ]
2
2020-04-07T19:33:57.000Z
2021-07-10T12:29:52.000Z
Covid19SMS.py
Ayresia/COVID19-SMSSender
11bc072efac943c2075cc976c55e6ba61c6f766d
[ "MIT" ]
null
null
null
Covid19SMS.py
Ayresia/COVID19-SMSSender
11bc072efac943c2075cc976c55e6ba61c6f766d
[ "MIT" ]
null
null
null
# Project: COVID19-SMSSender # Developer: Ayresia # Date: 24th March 2020 import requests import time import configparser import os import sys from urllib import request from twilio.rest import Client from datetime import datetime from pathlib import Path config = configparser.ConfigParser() configur...
31.247525
102
0.609316
import requests import time import configparser import os import sys from urllib import request from twilio.rest import Client from datetime import datetime from pathlib import Path config = configparser.ConfigParser() configuration_file = Path('config.ini') def get_config(section, key): config....
true
true
08f8b89e228b64fdfd8453aa3343faab10867a87
2,713
py
Python
zaza/utilities/ceph.py
grebennikov/zaza
b3996949b803f99716614a3bd09e195159c7f8a3
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
zaza/utilities/ceph.py
grebennikov/zaza
b3996949b803f99716614a3bd09e195159c7f8a3
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
zaza/utilities/ceph.py
grebennikov/zaza
b3996949b803f99716614a3bd09e195159c7f8a3
[ "ECL-2.0", "Apache-2.0" ]
1
2019-06-25T09:52:11.000Z
2019-06-25T09:52:11.000Z
"""Module containing Ceph related utilities.""" import logging import zaza.utilities.openstack as openstack_utils import zaza.model as zaza_model def get_expected_pools(radosgw=False): """Get expected ceph pools. Return a list of expected ceph pools in a ceph + cinder + glance test scenario, based on O...
28.557895
71
0.602285
import logging import zaza.utilities.openstack as openstack_utils import zaza.model as zaza_model def get_expected_pools(radosgw=False): current_release = openstack_utils.get_os_release() trusty_icehouse = openstack_utils.get_os_release('trusty_icehouse') trusty_kilo = openstack_utils.get_os_release('tr...
true
true
08f8b91d8c6723b673d6b640948eb06e667ee182
1,010
py
Python
zspider/dupefilters.py
Zephor5/zspider
49178415137d67d7c88f2904bcb204df32082204
[ "MIT" ]
12
2015-12-23T10:13:31.000Z
2021-04-25T17:12:39.000Z
zspider/dupefilters.py
Zephor5/zspider
49178415137d67d7c88f2904bcb204df32082204
[ "MIT" ]
1
2022-03-02T14:53:18.000Z
2022-03-02T14:53:18.000Z
zspider/dupefilters.py
Zephor5/zspider
49178415137d67d7c88f2904bcb204df32082204
[ "MIT" ]
1
2017-09-18T08:51:51.000Z
2017-09-18T08:51:51.000Z
# coding=utf-8 import logging import memcache from scrapy.dupefilters import BaseDupeFilter from scrapy.utils.request import request_fingerprint __author__ = "zephor" logger = logging.getLogger(__name__) class MemcachedDupeFilter(BaseDupeFilter): """Request Fingerprint duplicates filter""" def __init__(s...
24.047619
76
0.659406
import logging import memcache from scrapy.dupefilters import BaseDupeFilter from scrapy.utils.request import request_fingerprint __author__ = "zephor" logger = logging.getLogger(__name__) class MemcachedDupeFilter(BaseDupeFilter): def __init__(self, servers): self.mc = memcache.Client(servers) ...
true
true
08f8ba62fcc89a587551d411260272fe739ac565
3,035
py
Python
autokeras/utils.py
dickronez/autokeras
b31f2cafe77bf3a2f738289a89438fb72936117c
[ "MIT" ]
1
2019-09-06T07:47:40.000Z
2019-09-06T07:47:40.000Z
autokeras/utils.py
dickronez/autokeras
b31f2cafe77bf3a2f738289a89438fb72936117c
[ "MIT" ]
null
null
null
autokeras/utils.py
dickronez/autokeras
b31f2cafe77bf3a2f738289a89438fb72936117c
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf from tensorflow.python.util import nest def get_global_average_pooling(shape): return [tf.keras.layers.GlobalAveragePooling1D, tf.keras.layers.GlobalAveragePooling2D, tf.keras.layers.GlobalAveragePooling3D][len(shape) - 3] def get_global_max_poo...
28.364486
78
0.647117
import numpy as np import tensorflow as tf from tensorflow.python.util import nest def get_global_average_pooling(shape): return [tf.keras.layers.GlobalAveragePooling1D, tf.keras.layers.GlobalAveragePooling2D, tf.keras.layers.GlobalAveragePooling3D][len(shape) - 3] def get_global_max_poo...
true
true
08f8baad3ad52ca67229889075d2a359cf188b0d
1,753
py
Python
Projekt.py
NovakVed/graph-drawing-algorithm
9a73b3b7b6afe0f6222994166fe01c1e49698b60
[ "MIT" ]
null
null
null
Projekt.py
NovakVed/graph-drawing-algorithm
9a73b3b7b6afe0f6222994166fe01c1e49698b60
[ "MIT" ]
null
null
null
Projekt.py
NovakVed/graph-drawing-algorithm
9a73b3b7b6afe0f6222994166fe01c1e49698b60
[ "MIT" ]
null
null
null
import grandalf from grandalf.layouts import SugiyamaLayout import networkx as nx import matplotlib.pyplot as plt import csv G = nx.DiGraph() # Build your networkx graph here filename = input("Napiši naziv datoteke koje želiš dodati: ") with open(f"{filename}.csv") as file: reader = csv.reader(file) for row ...
26.560606
148
0.673132
import grandalf from grandalf.layouts import SugiyamaLayout import networkx as nx import matplotlib.pyplot as plt import csv G = nx.DiGraph() filename = input("Napiši naziv datoteke koje želiš dodati: ") with open(f"{filename}.csv") as file: reader = csv.reader(file) for row in reader: G.add_edge(row...
true
true
08f8babb80e649ef2ee3d7767a08d64682565bab
1,145
py
Python
pkg_repo_tools/utils/my_htm_parser.py
AOSPworking/repo_crawler
b2a927076a8c3ca63e78a84a91bc5a96e4f9e5ef
[ "MIT" ]
null
null
null
pkg_repo_tools/utils/my_htm_parser.py
AOSPworking/repo_crawler
b2a927076a8c3ca63e78a84a91bc5a96e4f9e5ef
[ "MIT" ]
null
null
null
pkg_repo_tools/utils/my_htm_parser.py
AOSPworking/repo_crawler
b2a927076a8c3ca63e78a84a91bc5a96e4f9e5ef
[ "MIT" ]
null
null
null
from typing import List import bs4 from bs4 import BeautifulSoup from pkg_repo_tools.models.repo import RepoLink from pkg_repo_tools.utils.my_exceptions import ParseException def marshalRepoLinks(html: str) -> List[RepoLink]: """ 给定一个 html,提取其中的 RepoLink。""" soup = BeautifulSoup(html, features="html.pa...
39.482759
85
0.658515
from typing import List import bs4 from bs4 import BeautifulSoup from pkg_repo_tools.models.repo import RepoLink from pkg_repo_tools.utils.my_exceptions import ParseException def marshalRepoLinks(html: str) -> List[RepoLink]: soup = BeautifulSoup(html, features="html.parser") repo_list_items = soup.fin...
true
true
08f8bc9d859e81073a5b9e99ebaaa65ee9f381b5
7,766
py
Python
ansys/dpf/core/operators/math/centroid_fc.py
jfthuong/pydpf-core
bf2895ebc546e0004f759289bfc9a23196559ac3
[ "MIT" ]
18
2021-10-16T10:38:29.000Z
2022-03-29T11:26:42.000Z
ansys/dpf/core/operators/math/centroid_fc.py
jfthuong/pydpf-core
bf2895ebc546e0004f759289bfc9a23196559ac3
[ "MIT" ]
79
2021-10-11T23:18:54.000Z
2022-03-29T14:53:14.000Z
ansys/dpf/core/operators/math/centroid_fc.py
jfthuong/pydpf-core
bf2895ebc546e0004f759289bfc9a23196559ac3
[ "MIT" ]
5
2021-11-29T18:35:37.000Z
2022-03-16T16:49:21.000Z
""" centroid_fc =============== Autogenerated DPF operator classes. """ from warnings import warn from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs from ansys.dpf.core.operators.specification import PinSpecification, Spe...
30.81746
95
0.582926
from warnings import warn from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs from ansys.dpf.core.operators.specification import PinSpecification, Specification class centroid_fc(Operator): def __init__( sel...
true
true
08f8bd30dfff7f08b1f252c978423b3f37f71156
2,953
py
Python
cvu/preprocess/image/letterbox.py
makaveli10/cvu
50b65cc0a6caa9e636804d3ce10a3ee611b44cd8
[ "Apache-2.0" ]
35
2021-08-02T09:34:25.000Z
2022-03-31T02:22:55.000Z
cvu/preprocess/image/letterbox.py
makaveli10/cvu
50b65cc0a6caa9e636804d3ce10a3ee611b44cd8
[ "Apache-2.0" ]
5
2021-08-28T17:34:00.000Z
2022-03-01T11:47:34.000Z
cvu/preprocess/image/letterbox.py
makaveli10/cvu
50b65cc0a6caa9e636804d3ce10a3ee611b44cd8
[ "Apache-2.0" ]
8
2021-08-05T00:50:35.000Z
2022-03-15T20:32:40.000Z
"""Original Code Taken From ultralytics/yolov5 URL: https://github.com/ultralytics/yolov5/blob/master/utils/datasets.py """ from typing import Tuple import numpy as np import cv2 def letterbox(img: np.ndarray, new_shape: Tuple[int] = (640, 640), color: Tuple[int] = (114, 114, 114), ...
33.556818
97
0.593295
from typing import Tuple import numpy as np import cv2 def letterbox(img: np.ndarray, new_shape: Tuple[int] = (640, 640), color: Tuple[int] = (114, 114, 114), auto: bool = True, scale_fill: bool = False, scaleup: bool = True, stride:...
true
true
08f8be19aee33d9e640cfaff131a766a7cef9a6c
311
py
Python
test.py
james-c-lars/Occult-Library
aa2286771b73d27d7e21a402edb06e898fe9f9f7
[ "MIT" ]
null
null
null
test.py
james-c-lars/Occult-Library
aa2286771b73d27d7e21a402edb06e898fe9f9f7
[ "MIT" ]
null
null
null
test.py
james-c-lars/Occult-Library
aa2286771b73d27d7e21a402edb06e898fe9f9f7
[ "MIT" ]
null
null
null
import entity import combat import item #entity.Mummy(), entity.Automaton(), entity.Siren(), entity.Gargoyle(), entity.Bogeyman() monsters = [combat.Player.make_player(entity.Bogeyman()), entity.Mummy(), entity.Automaton(), entity.Siren(), entity.Gargoyle()] battle = combat.Battle(monsters) battle.begin()
25.916667
128
0.745981
import entity import combat import item monsters = [combat.Player.make_player(entity.Bogeyman()), entity.Mummy(), entity.Automaton(), entity.Siren(), entity.Gargoyle()] battle = combat.Battle(monsters) battle.begin()
true
true
08f8be3bbb3b3ece54f303ae5efdc1ddf93400ac
3,400
py
Python
tests/integration-tests/tests/cloudwatch_logging/cloudwatch_logging_boto3_utils.py
agobeaux/aws-parallelcluster
ec337c6b8341f9b84616b6bbbe8687a0a5f71126
[ "Apache-2.0" ]
1
2020-10-15T16:33:20.000Z
2020-10-15T16:33:20.000Z
tests/integration-tests/tests/cloudwatch_logging/cloudwatch_logging_boto3_utils.py
agobeaux/aws-parallelcluster
ec337c6b8341f9b84616b6bbbe8687a0a5f71126
[ "Apache-2.0" ]
109
2020-05-29T08:20:29.000Z
2022-02-21T09:32:47.000Z
tests/integration-tests/tests/cloudwatch_logging/cloudwatch_logging_boto3_utils.py
demartinofra/aws-parallelcluster
6f8e978b9ef2cea8855a80112b26b9968543a7e5
[ "Apache-2.0" ]
null
null
null
import json import logging import boto3 import utils from botocore.exceptions import ClientError LOGGER = logging.getLogger(__name__) def _dumps_json(obj): """Dump obj to a JSON string.""" return json.dumps(obj, indent=2) def get_cluster_log_groups_from_boto3(cluster_log_group_prefix): """ Get log...
33.009709
120
0.699118
import json import logging import boto3 import utils from botocore.exceptions import ClientError LOGGER = logging.getLogger(__name__) def _dumps_json(obj): return json.dumps(obj, indent=2) def get_cluster_log_groups_from_boto3(cluster_log_group_prefix): try: log_groups = ( boto3.client...
true
true
08f8be8f9c1f91eb2bcc3a08f1255b34dcb1d04b
1,591
py
Python
tests/test_decoder_end_to_end.py
neillytan/NLP-Project
b468937cf0fae74e70e4189a55521b77775c3654
[ "MIT" ]
null
null
null
tests/test_decoder_end_to_end.py
neillytan/NLP-Project
b468937cf0fae74e70e4189a55521b77775c3654
[ "MIT" ]
null
null
null
tests/test_decoder_end_to_end.py
neillytan/NLP-Project
b468937cf0fae74e70e4189a55521b77775c3654
[ "MIT" ]
1
2020-12-18T00:36:58.000Z
2020-12-18T00:36:58.000Z
""" Test functionality of decoder module """ import unittest import os,sys,inspect import mxnet as mx currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0,parentdir) from NLP.src.decoder import decoder from NLP.src.training im...
34.586957
110
0.655563
import unittest import os,sys,inspect import mxnet as mx currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0,parentdir) from NLP.src.decoder import decoder from NLP.src.training import utils, model, training class UnitTests...
true
true
08f8bee724136bab3da99ac487c010571ed019a0
4,018
py
Python
mistral/lang/v2/task_defaults.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
null
null
null
mistral/lang/v2/task_defaults.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
mistral/lang/v2/task_defaults.py
soda-research/mistral
550a3de9c2defc7ce26336cb705d9c8d87bbaddd
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# Copyright 2014 - Mirantis, Inc. # Copyright 2015 - StackStorm, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
33.206612
77
0.662519
import six from mistral.lang import types from mistral.lang.v2 import base from mistral.lang.v2 import on_clause from mistral.lang.v2 import policies from mistral.lang.v2 import retry_policy # one because they address different use cases. class TaskDefaultsSpec(base.BaseSpec): # See http://json-schema.org ...
true
true
08f8bf85441c58bff887a7e1f3dbebb50ec3a144
7,460
py
Python
cnn/model_builder.py
maindolaamit/mllib
03f46089b1d6661dcc3245118b7d108d124e645c
[ "MIT" ]
null
null
null
cnn/model_builder.py
maindolaamit/mllib
03f46089b1d6661dcc3245118b7d108d124e645c
[ "MIT" ]
null
null
null
cnn/model_builder.py
maindolaamit/mllib
03f46089b1d6661dcc3245118b7d108d124e645c
[ "MIT" ]
null
null
null
import importlib import os from pathlib import Path import pandas as pd from keras.callbacks import EarlyStopping, ModelCheckpoint, ReduceLROnPlateau from livelossplot.inputs.keras import PlotLossesCallback from sklearn.model_selection import KFold from tensorflow.keras.layers import Dropout from tensorflow.keras.opti...
43.121387
109
0.597453
import importlib import os from pathlib import Path import pandas as pd from keras.callbacks import EarlyStopping, ModelCheckpoint, ReduceLROnPlateau from livelossplot.inputs.keras import PlotLossesCallback from sklearn.model_selection import KFold from tensorflow.keras.layers import Dropout from tensorflow.keras.opti...
true
true
08f8bfa7c6af112478d4ca9763583bd7ce2a3e17
5,687
py
Python
src/Indexation/Parser.py
hanouticelina/search_engine
2db76ed07d7c5885003bd9a5d7a89450128361fc
[ "MIT" ]
null
null
null
src/Indexation/Parser.py
hanouticelina/search_engine
2db76ed07d7c5885003bd9a5d7a89450128361fc
[ "MIT" ]
null
null
null
src/Indexation/Parser.py
hanouticelina/search_engine
2db76ed07d7c5885003bd9a5d7a89450128361fc
[ "MIT" ]
null
null
null
# TODO: modifier la méthode build afin de pouvoir extraire d'autres balises import sys sys.path.append('./') sys.path.append('../') from utils import porter as pt import numpy as np import Indexation.TextRepresenter as tr import collections import re other_balises = {'.I', '.T', '.B', '.A', '.K', '.W', '.X'} balise_I ...
36.928571
122
0.446633
import sys sys.path.append('./') sys.path.append('../') from utils import porter as pt import numpy as np import Indexation.TextRepresenter as tr import collections import re other_balises = {'.I', '.T', '.B', '.A', '.K', '.W', '.X'} balise_I = '.I' balise_T = '.T' class Document: def __init__(self,id,text): ...
true
true
08f8c0727e800959c051f86d1fb21fe2575a1670
5,461
py
Python
uuv_simulator/uuv_control/uuv_thruster_manager/scripts/thruster_allocator.py
laughlinbarker/underice_ekf
d74a83b2d02cef986fc904cf588a408382d728a6
[ "BSD-2-Clause" ]
2
2021-06-03T05:56:33.000Z
2021-07-08T06:29:34.000Z
uuv_simulator/uuv_control/uuv_thruster_manager/scripts/thruster_allocator.py
laughlinbarker/underice_ekf
d74a83b2d02cef986fc904cf588a408382d728a6
[ "BSD-2-Clause" ]
2
2019-06-13T10:58:38.000Z
2019-09-24T14:09:05.000Z
uuv_simulator/uuv_control/uuv_thruster_manager/scripts/thruster_allocator.py
laughlinbarker/underice_ekf
d74a83b2d02cef986fc904cf588a408382d728a6
[ "BSD-2-Clause" ]
2
2017-10-24T15:02:53.000Z
2019-04-02T15:14:58.000Z
#!/usr/bin/env python # Copyright (c) 2016 The UUV Simulator Authors. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
38.188811
92
0.657938
import numpy import rospy import tf import tf.transformations as trans from os.path import isdir, join from copy import deepcopy import yaml from uuv_thrusters import ThrusterManager from geometry_msgs.msg import Wrench from uuv_thruster_manager.srv import * class ThrusterAllocatorNode(ThrusterManager): """ ...
false
true
08f8c08c69897e95b2f0db8e6a64c973154d0e62
409
py
Python
photon/timer.py
jamesturk/photon
23e07942a70118a3dfbdfe17a214612c59dab1bf
[ "Zlib" ]
2
2016-02-28T14:33:23.000Z
2016-02-28T14:33:35.000Z
photon/timer.py
jamesturk/photon
23e07942a70118a3dfbdfe17a214612c59dab1bf
[ "Zlib" ]
null
null
null
photon/timer.py
jamesturk/photon
23e07942a70118a3dfbdfe17a214612c59dab1bf
[ "Zlib" ]
null
null
null
import ctypes from .internal import _SDL _SDL.SDL_GetPerformanceCounter.restype = ctypes.c_uint64 _SDL.SDL_GetPerformanceFrequency.restype = ctypes.c_uint64 _SDL.SDL_GetTicks.restype = ctypes.c_uint32 def get_performance_counter(): return _SDL.SDL_GetPerformanceCounter() def get_performance_frequency(): ret...
22.722222
58
0.814181
import ctypes from .internal import _SDL _SDL.SDL_GetPerformanceCounter.restype = ctypes.c_uint64 _SDL.SDL_GetPerformanceFrequency.restype = ctypes.c_uint64 _SDL.SDL_GetTicks.restype = ctypes.c_uint32 def get_performance_counter(): return _SDL.SDL_GetPerformanceCounter() def get_performance_frequency(): ret...
true
true
08f8c158571269e71229687ba606d57f6f9b0f8a
2,556
py
Python
files/iozone_xls_to_graph.py
iamh2o/oxfs
991e2f9dd2fc5e0e693b57298027a0edffc87fbb
[ "MIT" ]
59
2019-05-10T10:04:20.000Z
2021-01-12T09:12:47.000Z
files/iozone_xls_to_graph.py
iamh2o/oxfs
991e2f9dd2fc5e0e693b57298027a0edffc87fbb
[ "MIT" ]
6
2021-05-16T14:33:16.000Z
2022-01-12T02:59:30.000Z
files/iozone_xls_to_graph.py
iamh2o/oxfs
991e2f9dd2fc5e0e693b57298027a0edffc87fbb
[ "MIT" ]
10
2019-07-05T04:55:47.000Z
2020-12-10T06:13:39.000Z
#!/usr/bin/env python import pandas as pd import matplotlib.pyplot as plt import matplotlib class XlxToGraph(object): def __init__(self): self.oxfs_iozone_xls = './oxfs_iozone.xls' self.sshfs_iozone_xls = './sshfs_iozone.xls' self.oxfs_xls = pd.read_excel(self.oxfs_iozone_xls) self...
31.95
88
0.581768
import pandas as pd import matplotlib.pyplot as plt import matplotlib class XlxToGraph(object): def __init__(self): self.oxfs_iozone_xls = './oxfs_iozone.xls' self.sshfs_iozone_xls = './sshfs_iozone.xls' self.oxfs_xls = pd.read_excel(self.oxfs_iozone_xls) self.sshfs_xls = pd.read_e...
true
true
08f8c2111351571434dcfae803f6eac6f1fbf36b
166
py
Python
src/managers/__init__.py
vineetjc/pygame-Coin-Fall-
0d8629afa73f41edb4eea11bf0b7e346008499f1
[ "MIT" ]
5
2018-12-11T12:38:46.000Z
2022-02-13T05:29:18.000Z
src/managers/__init__.py
vineetjc/pygame-Coin-Fall-
0d8629afa73f41edb4eea11bf0b7e346008499f1
[ "MIT" ]
56
2018-11-27T06:52:57.000Z
2019-01-05T21:09:55.000Z
src/managers/__init__.py
vineetjc/pygame-Coin-Fall-
0d8629afa73f41edb4eea11bf0b7e346008499f1
[ "MIT" ]
31
2018-11-30T23:09:13.000Z
2019-11-21T04:21:56.000Z
from .resources import Resources from .game_manager import Game_Manager from .sound_manager import Sound_Manager from .gameplay_parameters import Gameplay_Parameters
33.2
52
0.879518
from .resources import Resources from .game_manager import Game_Manager from .sound_manager import Sound_Manager from .gameplay_parameters import Gameplay_Parameters
true
true
08f8c3052f3bea18b95f7f054a0ee972014962c3
1,005
py
Python
aioinflux/serialization/common.py
claashk/aioinflux
545b798dbf3d6f1791d89ef5a497dafed3cfa30d
[ "MIT" ]
120
2018-08-12T11:07:48.000Z
2022-03-28T10:09:23.000Z
aioinflux/serialization/common.py
claashk/aioinflux
545b798dbf3d6f1791d89ef5a497dafed3cfa30d
[ "MIT" ]
26
2018-08-31T13:26:21.000Z
2022-01-25T10:59:23.000Z
aioinflux/serialization/common.py
claashk/aioinflux
545b798dbf3d6f1791d89ef5a497dafed3cfa30d
[ "MIT" ]
26
2018-08-21T20:41:51.000Z
2022-02-22T17:27:52.000Z
import warnings # Special characters documentation: # https://docs.influxdata.com/influxdb/v1.4/write_protocols/line_protocol_reference/#special-characters # Although not in the official docs, new line characters are removed in order to avoid issues. # Go implementation: https://github.com/influxdata/influxdb/blob/mas...
47.857143
103
0.602985
import warnings key_escape = str.maketrans({'\\': '\\\\', ',': r'\,', ' ': r'\ ', '=': r'\=', '\n': ''}) tag_escape = str.maketrans({'\\': '\\\\', ',': r'\,', ' ': r'\ ', '=': r'\=', '\n': ''}) str_escape = str.maketrans({'\\': '\\\\', '"': r'\"', '\n': ''}) measurement_escape = str.maketrans({'\\': '\\\\', ',': r'\,'...
true
true
08f8c3ca3b93e0664a70a148c9b0ba9c3723e5a8
6,145
py
Python
demo_opt_gtmr_with_cv_multi_y.py
hkaneko1985/dcek
13d9228b2dc2fd87c2e08a01721e1b1b220f2e19
[ "MIT" ]
25
2019-08-23T12:39:14.000Z
2022-03-30T08:58:15.000Z
demo_opt_gtmr_with_cv_multi_y.py
hkaneko1985/dcek
13d9228b2dc2fd87c2e08a01721e1b1b220f2e19
[ "MIT" ]
2
2022-01-06T11:21:21.000Z
2022-01-18T22:11:12.000Z
demo_opt_gtmr_with_cv_multi_y.py
hkaneko1985/dcek
13d9228b2dc2fd87c2e08a01721e1b1b220f2e19
[ "MIT" ]
16
2019-12-12T08:20:48.000Z
2022-01-26T00:34:31.000Z
# -*- coding: utf-8 -*- # %reset -f """ @author: Hiromasa Kaneko """ # Demonstration of GTMR (Generative Topographic Mapping Regression) with multiple y-variables import matplotlib.figure as figure import matplotlib.pyplot as plt import numpy as np from dcekit.generative_model import GTM from sklearn.datas...
46.908397
128
0.658584
import matplotlib.figure as figure import matplotlib.pyplot as plt import numpy as np from dcekit.generative_model import GTM from sklearn.datasets.samples_generator import make_s_curve from sklearn.model_selection import train_test_split fold_number = 2 candidates_of_shape_of_map = np.arange(30, 31, dtype=i...
true
true
08f8c5431e8c647d89857124ac8e8148f547b7d7
1,797
py
Python
Exercicios/Exercicio_10.py
kaiquesouzasantos/python-aperfeicoamento
3f53d7fa74e5ae94f62e6ad41667ebf6edfbdb67
[ "MIT" ]
null
null
null
Exercicios/Exercicio_10.py
kaiquesouzasantos/python-aperfeicoamento
3f53d7fa74e5ae94f62e6ad41667ebf6edfbdb67
[ "MIT" ]
null
null
null
Exercicios/Exercicio_10.py
kaiquesouzasantos/python-aperfeicoamento
3f53d7fa74e5ae94f62e6ad41667ebf6edfbdb67
[ "MIT" ]
null
null
null
''' As Organizações Tabajara resolveram dar um aumento de salário aos seus colaboradores e lhe contraram para desenvolver o programa que calculará os reajustes. Faça um programa que recebe o salário de um colaborador e o reajuste segundo o seguinte critério, baseado no salário atual: salários até R$ 280,00 (incluind...
33.90566
157
0.668893
salario = float(input('Digite o salario do colaborador: ')) if salario <= 280: aumento = salario * 0.2 sal_reajuste = salario+aumento print(f''' Salario Antes do Reajuste: {salario} Percentual de Reajuste: 20% Aumento: {aumento} Novo Salario: {sal_reajuste} ''') elif salari...
true
true
08f8c5744a84dffda03904afd30d44cac42f2917
4,128
py
Python
youtube_dl/extractor/southpark.py
chendaiming/youtube-dl
bfedb2cc5adf57fbb2ecd15f39337d716ac36d82
[ "Unlicense" ]
null
null
null
youtube_dl/extractor/southpark.py
chendaiming/youtube-dl
bfedb2cc5adf57fbb2ecd15f39337d716ac36d82
[ "Unlicense" ]
null
null
null
youtube_dl/extractor/southpark.py
chendaiming/youtube-dl
bfedb2cc5adf57fbb2ecd15f39337d716ac36d82
[ "Unlicense" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals from .mtv import MTVServicesInfoExtractor class SouthParkIE(MTVServicesInfoExtractor): IE_NAME = 'southpark.cc.com' _VALID_URL = r'https?://(?:www\.)?(?P<url>southpark\.cc\.com/(?:clips|full-episodes)/(?P<id>.+?)(\?|#|$))' _FEED_URL = 'http://www.s...
39.692308
195
0.600291
from __future__ import unicode_literals from .mtv import MTVServicesInfoExtractor class SouthParkIE(MTVServicesInfoExtractor): IE_NAME = 'southpark.cc.com' _VALID_URL = r'https?://(?:www\.)?(?P<url>southpark\.cc\.com/(?:clips|full-episodes)/(?P<id>.+?)(\?|#|$))' _FEED_URL = 'http://www.southparkstudios....
true
true
08f8c7a220df407cd848a73f76afa4e22fb3a01b
4,318
py
Python
localization_flow/jtlocalize/core/localization_diff.py
joytunes/JTLocalize
291edb037f0ccd37b09bed42bf8b9786b858d522
[ "MIT" ]
53
2015-03-10T18:22:36.000Z
2021-09-09T09:47:58.000Z
localization_flow/jtlocalize/core/localization_diff.py
joytunes/JTLocalize
291edb037f0ccd37b09bed42bf8b9786b858d522
[ "MIT" ]
7
2015-03-10T16:43:06.000Z
2020-08-02T04:06:11.000Z
localization_flow/jtlocalize/core/localization_diff.py
joytunes/JTLocalize
291edb037f0ccd37b09bed42bf8b9786b858d522
[ "MIT" ]
5
2015-02-16T08:26:26.000Z
2020-02-27T07:46:28.000Z
#!/usr/bin/env python from localization_utils import * import argparse VALUE_PLACEHOLDER = "XXX" def parse_args(): """ Parses the arguments given in the command line Returns: args: The configured arguments will be attributes of the returned object. """ parser = argparse.ArgumentParser( ...
44.515464
119
0.723715
from localization_utils import * import argparse VALUE_PLACEHOLDER = "XXX" def parse_args(): parser = argparse.ArgumentParser( description='Perform a diff on the new localizable file, and the file we already translated.') parser.add_argument("input_localizable_file", help="The file that requires tr...
true
true
08f8c7c152c105c3dc23e50cba2b432566635228
698
py
Python
Number guessing.py
bartoszwojcik/Warsztaty_1
220633b6d07a826219110aae73ebda477dff8971
[ "Unlicense" ]
null
null
null
Number guessing.py
bartoszwojcik/Warsztaty_1
220633b6d07a826219110aae73ebda477dff8971
[ "Unlicense" ]
null
null
null
Number guessing.py
bartoszwojcik/Warsztaty_1
220633b6d07a826219110aae73ebda477dff8971
[ "Unlicense" ]
null
null
null
#! python3 from random import randint def number_guess(secret_number): """ Run a guessing game; asks user for input and displays either "too low" or "too high". :param secret_number: :return: None """ while True: try: guess = int(input("Zgadnij liczbę:")) except V...
23.266667
89
0.560172
from random import randint def number_guess(secret_number): while True: try: guess = int(input("Zgadnij liczbę:")) except ValueError: print("To nie jest liczba.") continue if int(guess) < secret_number: print("Za mało!") elif int(gu...
true
true
08f8c855cff16d26f72381aade4688d2486a2982
69
py
Python
cv01/ctverec.py
xtompok/uvod-do-prg_20
01c9a27402bbbd89ecb69264ce1a9db405005ec3
[ "MIT" ]
3
2020-10-28T10:47:06.000Z
2020-12-20T13:25:27.000Z
cv01/ctverec.py
xtompok/uvod-do-prg_20
01c9a27402bbbd89ecb69264ce1a9db405005ec3
[ "MIT" ]
null
null
null
cv01/ctverec.py
xtompok/uvod-do-prg_20
01c9a27402bbbd89ecb69264ce1a9db405005ec3
[ "MIT" ]
1
2021-01-04T10:47:45.000Z
2021-01-04T10:47:45.000Z
strana = 2.5 print("Obvod je ",strana*4,"a obsah je ",strana*strana)
23
55
0.681159
strana = 2.5 print("Obvod je ",strana*4,"a obsah je ",strana*strana)
true
true
08f8c91f1fdcb57b54d546ac171971b269957a13
1,124
py
Python
models/channel_selection.py
alexchungio/Slimming-Pytorch
98ee08fffa7642d578cc4994b0eb8f534ebc5fb1
[ "Apache-2.0" ]
null
null
null
models/channel_selection.py
alexchungio/Slimming-Pytorch
98ee08fffa7642d578cc4994b0eb8f534ebc5fb1
[ "Apache-2.0" ]
null
null
null
models/channel_selection.py
alexchungio/Slimming-Pytorch
98ee08fffa7642d578cc4994b0eb8f534ebc5fb1
[ "Apache-2.0" ]
null
null
null
import numpy as np import torch import torch.nn as nn class channel_selection(nn.Module): """ Select channels from the output of BatchNorm2d layer. It should be put directly after BatchNorm2d layer. The output shape of this layer is determined by the number of 1 in `self.indexes`. """ def __init__...
38.758621
111
0.648577
import numpy as np import torch import torch.nn as nn class channel_selection(nn.Module): def __init__(self, num_channels): super(channel_selection, self).__init__() self.indexes = nn.Parameter(torch.ones(num_channels)) def forward(self, input_tensor): selected_index = np.squeeze(np.a...
true
true
08f8cdb61640ab96405a046615d12081776ffafd
2,139
py
Python
randompatterns/random_patterns.py
Just-Jojo/JojosSillyIdeas
1d41187c538b5e387b129a8ca96cd1eb10df4102
[ "MIT" ]
null
null
null
randompatterns/random_patterns.py
Just-Jojo/JojosSillyIdeas
1d41187c538b5e387b129a8ca96cd1eb10df4102
[ "MIT" ]
1
2022-01-09T04:29:35.000Z
2022-01-09T04:35:11.000Z
randompatterns/random_patterns.py
Just-Jojo/JojosSillyIdeas
1d41187c538b5e387b129a8ca96cd1eb10df4102
[ "MIT" ]
null
null
null
# Copyright (c) 2021 - Jojo#7791 # Licensed under MIT from redbot.core import commands from redbot.core.bot import Red from redbot.core.utils.chat_formatting import ( box, humanize_number as hn, humanize_list as hl, ) import random import discord from discord.utils import copy_doc from functools import pa...
29.30137
76
0.588125
from redbot.core import commands from redbot.core.bot import Red from redbot.core.utils.chat_formatting import ( box, humanize_number as hn, humanize_list as hl, ) import random import discord from discord.utils import copy_doc from functools import partial @copy_doc(hl) def humanize_list(items, **kwarg...
true
true
08f8ce95f1bfa83e3e61482914d758577df4e309
10,342
py
Python
tcc/alignment.py
fatemehtd/Echo-SyncNet
ebb280e83a67b31436c4cfa420f9c06a92ac8c12
[ "MIT" ]
6
2021-03-19T16:55:30.000Z
2022-03-15T08:41:56.000Z
tcc/alignment.py
matiasmolinas/Echo-SyncNet
f7f81ead7a24d7574c0668df3765ef58fd71d54d
[ "MIT" ]
3
2021-10-01T22:15:44.000Z
2022-03-25T03:12:47.000Z
tcc/alignment.py
matiasmolinas/Echo-SyncNet
f7f81ead7a24d7574c0668df3765ef58fd71d54d
[ "MIT" ]
3
2021-03-19T16:55:35.000Z
2022-02-03T10:40:48.000Z
# coding=utf-8 # Copyright 2019 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
47.009091
80
0.695997
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v2 as tf from tcc.deterministic_alignment import compute_deterministic_alignment_loss from tcc.stochastic_alignment import compute_stochastic_alignment_loss def compute_alignment_l...
true
true
08f8cec4eada74786724055193a077278d74a215
7,394
py
Python
DAD/Jogador/jogadores.py
Gustavolsl/Falculdade_Impacta_3s
bf1a12c81fd088c4e1a0cd9182600730b43dcd63
[ "Apache-2.0" ]
null
null
null
DAD/Jogador/jogadores.py
Gustavolsl/Falculdade_Impacta_3s
bf1a12c81fd088c4e1a0cd9182600730b43dcd63
[ "Apache-2.0" ]
6
2021-03-19T03:57:08.000Z
2022-03-12T00:00:33.000Z
DAD/Jogador/jogadores.py
Gustavolsl/Falculdade_Impacta_3s
bf1a12c81fd088c4e1a0cd9182600730b43dcd63
[ "Apache-2.0" ]
null
null
null
import sqlite3 class JogadorNaoExisteException(Exception): pass connection = sqlite3.connect("rpg.db") #1o passo: criar uma conexao create_sql = """ CREATE TABLE IF NOT EXISTS Jogador ( id INTEGER PRIMARY KEY, nome TEXT NOT NULL, email TEXT NOT NULL UNIQUE ) """ cursor = connection.cursor() #2o passo:...
33.008929
106
0.651609
import sqlite3 class JogadorNaoExisteException(Exception): pass connection = sqlite3.connect("rpg.db") create_sql = """ CREATE TABLE IF NOT EXISTS Jogador ( id INTEGER PRIMARY KEY, nome TEXT NOT NULL, email TEXT NOT NULL UNIQUE ) """ cursor = connection.cursor() cursor.execute(create_sql) connection.c...
true
true
08f8cf457353e1c35b0cd036c26da6c8a1ab07c3
348
py
Python
telegram_bot/app.py
LD31D/teaching_bot
3aacd395a00509eaceab41845779d5fa1a12bf70
[ "MIT" ]
2
2020-10-19T07:49:16.000Z
2020-10-19T07:50:54.000Z
telegram_bot/app.py
LD31D/teaching_bot
3aacd395a00509eaceab41845779d5fa1a12bf70
[ "MIT" ]
null
null
null
telegram_bot/app.py
LD31D/teaching_bot
3aacd395a00509eaceab41845779d5fa1a12bf70
[ "MIT" ]
null
null
null
async def on_startup(dp): import filters import middlewares filters.setup(dp) middlewares.setup(dp) from utils.notify_admins import on_startup_notify await on_startup_notify(dp) if __name__ == '__main__': from aiogram import executor from handlers import dp executor.start_polling...
21.75
53
0.738506
async def on_startup(dp): import filters import middlewares filters.setup(dp) middlewares.setup(dp) from utils.notify_admins import on_startup_notify await on_startup_notify(dp) if __name__ == '__main__': from aiogram import executor from handlers import dp executor.start_polling...
true
true
08f8d0a63531f6c4159b49c112badce1cc1cd7f6
1,845
py
Python
auto_post/main.py
susmote/WeiboTools
659232b4525bcbedf350da1127d382ff6c6e9e71
[ "MIT" ]
3
2018-11-11T22:07:23.000Z
2019-03-08T08:20:31.000Z
auto_post/main.py
susmote/WeiboTools
659232b4525bcbedf350da1127d382ff6c6e9e71
[ "MIT" ]
null
null
null
auto_post/main.py
susmote/WeiboTools
659232b4525bcbedf350da1127d382ff6c6e9e71
[ "MIT" ]
1
2021-08-31T06:44:54.000Z
2021-08-31T06:44:54.000Z
# -*- coding: utf-8 -*- """ Created on 2018/10/30 @author: susmote """ import requests import json import time def auto_post_weibo(account_cookies, weibo_content, printToGui, conn): print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))) begin_time = time.time() for i in range(0, len(acc...
36.9
111
0.590786
import requests import json import time def auto_post_weibo(account_cookies, weibo_content, printToGui, conn): print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))) begin_time = time.time() for i in range(0, len(account_cookies)): session = requests.session() post_weibo_u...
true
true
08f8d0c90e58cfb47ed38c7879042e17c54437cd
742
py
Python
04_dict_set/namespace.py
jumploop/high_performance_python
da5b11735601b51f141975f9d59f14293cab16bb
[ "MIT" ]
null
null
null
04_dict_set/namespace.py
jumploop/high_performance_python
da5b11735601b51f141975f9d59f14293cab16bb
[ "MIT" ]
null
null
null
04_dict_set/namespace.py
jumploop/high_performance_python
da5b11735601b51f141975f9d59f14293cab16bb
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- import math from math import sin def test1(x): """ >>> %timeit test1(123_456) 162 µs ± 3.82 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) """ res = 1 for _ in range(1000): res += math.sin(x) return res def test2(x): ""...
19.526316
76
0.533693
import math from math import sin def test1(x): res = 1 for _ in range(1000): res += math.sin(x) return res def test2(x): res = 1 for _ in range(1000): res += sin(x) return res def test3(x, sin=math.sin): res = 1 for _ in range(1000): res += sin(x) return...
true
true
08f8d1856a5acad23d295a5939ac79284160f406
1,580
py
Python
test/test_ezsignbulksendtransmission_get_object_v1_response_m_payload.py
ezmaxinc/eZmax-SDK-python
6794b8001abfb7d9ae18a3b87aba164839b925a0
[ "MIT" ]
null
null
null
test/test_ezsignbulksendtransmission_get_object_v1_response_m_payload.py
ezmaxinc/eZmax-SDK-python
6794b8001abfb7d9ae18a3b87aba164839b925a0
[ "MIT" ]
null
null
null
test/test_ezsignbulksendtransmission_get_object_v1_response_m_payload.py
ezmaxinc/eZmax-SDK-python
6794b8001abfb7d9ae18a3b87aba164839b925a0
[ "MIT" ]
null
null
null
""" eZmax API Definition (Full) This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501 The version of the OpenAPI document: 1.1.7 Contact: support-api@ezmax.ca Generated by: https://openapi-generator.tech """ import sys import unittest import eZmaxApi from...
36.744186
140
0.810759
import sys import unittest import eZmaxApi from eZmaxApi.model.common_audit import CommonAudit from eZmaxApi.model.custom_ezsignfoldertransmission_response import CustomEzsignfoldertransmissionResponse from eZmaxApi.model.ezsignbulksendtransmission_response_compound import EzsignbulksendtransmissionResponseCompound ...
true
true
08f8d2162ca67f655a663b92cebb7b4c59283c11
3,572
py
Python
tests/test_bonesShow.py
eudoxos/imfractal
a33c5ae5771ba9d4437cb665c0c48dc492e74025
[ "BSD-3-Clause" ]
null
null
null
tests/test_bonesShow.py
eudoxos/imfractal
a33c5ae5771ba9d4437cb665c0c48dc492e74025
[ "BSD-3-Clause" ]
null
null
null
tests/test_bonesShow.py
eudoxos/imfractal
a33c5ae5771ba9d4437cb665c0c48dc492e74025
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2013 Rodrigo Baravalle All rights reserved. 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, this list of conditions and the following...
31.333333
91
0.602184
from imfractal import * from PIL import Image import time import matplotlib.pyplot as plt from pylab import * import os import sys sys.path.append('/home/rodrigo/imfractal/imfractal/Algorithm/') import qs3D def createFolders(dirs): for f in dirs: if not os.path.isdir(f): os.mkdir (f) de...
true
true
08f8d2c06abc9b59bfe29ff26d54997c0bac9b3e
10,432
py
Python
xadmin/views/detail.py
Crackpot/xadmin
5d1553eda53be9c8a62f60930fcb1492a472f7aa
[ "BSD-3-Clause" ]
1
2021-07-25T16:27:18.000Z
2021-07-25T16:27:18.000Z
xadmin/views/detail.py
Crackpot/xadmin
5d1553eda53be9c8a62f60930fcb1492a472f7aa
[ "BSD-3-Clause" ]
null
null
null
xadmin/views/detail.py
Crackpot/xadmin
5d1553eda53be9c8a62f60930fcb1492a472f7aa
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import copy import six from crispy_forms.utils import TEMPLATE_PACK from django import forms from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.db import models from django.forms.models i...
37.52518
111
0.605637
from __future__ import absolute_import import copy import six from crispy_forms.utils import TEMPLATE_PACK from django import forms from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.db import models from django.forms.models i...
true
true
08f8d3c46d97edeb764349ee1cbce93a4d0fa7d4
2,223
py
Python
cloudroast/compute/admin/actions/test_lock_server.py
MUSABALOYI/cloudroast
dcccce6b3af9d150cb667fc05bd051e97b5f6e2c
[ "Apache-2.0" ]
null
null
null
cloudroast/compute/admin/actions/test_lock_server.py
MUSABALOYI/cloudroast
dcccce6b3af9d150cb667fc05bd051e97b5f6e2c
[ "Apache-2.0" ]
null
null
null
cloudroast/compute/admin/actions/test_lock_server.py
MUSABALOYI/cloudroast
dcccce6b3af9d150cb667fc05bd051e97b5f6e2c
[ "Apache-2.0" ]
1
2020-04-06T22:36:55.000Z
2020-04-06T22:36:55.000Z
""" Copyright 2013 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
39
76
0.730994
from cloudcafe.compute.common.exceptions import ActionInProgress, BadRequest from cloudcafe.compute.common.types import NovaServerRebootTypes from cloudroast.compute.fixtures import ComputeAdminFixture class LockServerTests(ComputeAdminFixture): @classmethod def setUpClass(cls): super(LockServerTest...
true
true
08f8d3c93f583894423b78b1f5f16c4de753c428
1,446
py
Python
speedtest/parse_speedtest_json.py
samyun/Network-Pi
f353c8b02456771e19b1a5521fb576536b45bfde
[ "MIT" ]
null
null
null
speedtest/parse_speedtest_json.py
samyun/Network-Pi
f353c8b02456771e19b1a5521fb576536b45bfde
[ "MIT" ]
null
null
null
speedtest/parse_speedtest_json.py
samyun/Network-Pi
f353c8b02456771e19b1a5521fb576536b45bfde
[ "MIT" ]
null
null
null
#!/usr/local/bin/python import json import datetime from pytz import timezone import pytz utc = pytz.utc eastern = timezone('US/Eastern') fmt = '%Y-%m-%d %H:%M:%S' failed_speedtest = False with open('/home/pi/speedtest/unfiltered.json', 'r') as json_file: data_json = json_file.read() if len(data_json) == 0:...
32.863636
84
0.687414
import json import datetime from pytz import timezone import pytz utc = pytz.utc eastern = timezone('US/Eastern') fmt = '%Y-%m-%d %H:%M:%S' failed_speedtest = False with open('/home/pi/speedtest/unfiltered.json', 'r') as json_file: data_json = json_file.read() if len(data_json) == 0: failed_speedtest ...
true
true
08f8d4572a2dd63a2aec4f9e8fda96aece8dd41c
5,520
py
Python
aifeynman/S_gen_sym.py
pranjukn/AI-Feynman
92e67b01fc2b00ed6ebcacc67edf6122b4219ac7
[ "MIT" ]
470
2019-11-14T16:04:38.000Z
2022-03-31T13:22:18.000Z
aifeynman/S_gen_sym.py
pranjukn/AI-Feynman
92e67b01fc2b00ed6ebcacc67edf6122b4219ac7
[ "MIT" ]
55
2020-04-18T03:10:40.000Z
2022-03-31T18:40:32.000Z
aifeynman/S_gen_sym.py
pranjukn/AI-Feynman
92e67b01fc2b00ed6ebcacc67edf6122b4219ac7
[ "MIT" ]
117
2019-11-21T09:26:00.000Z
2022-03-20T05:42:02.000Z
import numpy as np from .RPN_to_eq import RPN_to_eq from scipy.optimize import fsolve from sympy import lambdify, N import torch import copy import torch.nn as nn import torch.nn.functional as F from .get_pareto import Point, ParetoSet from .S_get_expr_complexity import get_expr_complexity from . import test_points imp...
35.844156
98
0.583696
import numpy as np from .RPN_to_eq import RPN_to_eq from scipy.optimize import fsolve from sympy import lambdify, N import torch import copy import torch.nn as nn import torch.nn.functional as F from .get_pareto import Point, ParetoSet from .S_get_expr_complexity import get_expr_complexity from . import test_points imp...
true
true
08f8d4aabee7b519c2a44d1a2828458e4e91f00c
2,359
py
Python
hddcoin/rpc/harvester_rpc_api.py
JakubSido/hddcoin-blockchain
7b9da03edee3512295c0f142c07c4759512ccbca
[ "Apache-2.0" ]
37
2021-07-08T23:42:01.000Z
2022-03-26T21:30:10.000Z
hddcoin/rpc/harvester_rpc_api.py
JakubSido/hddcoin-blockchain
7b9da03edee3512295c0f142c07c4759512ccbca
[ "Apache-2.0" ]
13
2021-07-11T15:12:01.000Z
2022-03-15T08:36:18.000Z
hddcoin/rpc/harvester_rpc_api.py
JakubSido/hddcoin-blockchain
7b9da03edee3512295c0f142c07c4759512ccbca
[ "Apache-2.0" ]
19
2021-07-10T14:09:07.000Z
2022-03-14T11:17:05.000Z
from typing import Callable, Dict, List from hddcoin.harvester.harvester import Harvester from hddcoin.util.ws_message import WsRpcMessage, create_payload_dict class HarvesterRpcApi: def __init__(self, harvester: Harvester): self.service = harvester self.service_name = "hddcoin_harvester" de...
38.048387
92
0.652819
from typing import Callable, Dict, List from hddcoin.harvester.harvester import Harvester from hddcoin.util.ws_message import WsRpcMessage, create_payload_dict class HarvesterRpcApi: def __init__(self, harvester: Harvester): self.service = harvester self.service_name = "hddcoin_harvester" de...
true
true
08f8d4ce2a34cab753c8d95167ec041c8de19901
2,488
py
Python
benchmark/startPyquil1720.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startPyquil1720.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startPyquil1720.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=5 # total number=63 import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() # circuit begin prog += H(0) # number=3 pr...
25.649485
64
0.535772
import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() prog += H(0) prog += H(1) prog += H(2) prog += H(3) prog += H(0)...
false
true
08f8d501c8cd5a2495a4c4ad555788e3fb6b37c6
5,331
py
Python
auto/unity_test_summary.py
rafaelghp/TesteEConfiabilidadeDeSistemasTurma590
da3dac714160d87d0446ab80ff2cc3f71ae046da
[ "MIT" ]
2
2020-04-04T21:09:56.000Z
2020-04-08T17:00:58.000Z
unity_my/auto/unity_test_summary.py
rafixcs/TestsAndConf_Travis
0068bb630eba1021f972f86b83c69f86aebf28a9
[ "MIT" ]
13
2020-04-11T21:50:57.000Z
2020-04-19T03:19:48.000Z
unity_my/auto/unity_test_summary.py
rafixcs/TestsAndConf_Travis
0068bb630eba1021f972f86b83c69f86aebf28a9
[ "MIT" ]
null
null
null
#! python3 # ========================================== # Unity Project - A Test Framework for C # Copyright (c) 2015 Alexander Mueller / XelaRellum@web.de # [Released under MIT License. Please refer to license.txt for details] # Based on the ruby script by Mike Karlesky, Mark VanderVoord, Greg Williams ...
38.078571
182
0.522041
import sys import os import re from glob import glob class UnityTestSummary: def __init__(self): self.report = '' self.total_tests = 0 self.failures = 0 self.ignored = 0 def run(self): results = [] for target in self.targets: r...
true
true
08f8d53de23537dd5ccf7ca1fc133c331721d7eb
689
py
Python
src/core/tests/test_position.py
weisongye/saycbridge
3cc4e3363008d7d9232bcde18db28823dae042ae
[ "BSD-3-Clause" ]
16
2015-03-19T09:21:00.000Z
2021-08-13T08:21:39.000Z
src/core/tests/test_position.py
weisongye/saycbridge
3cc4e3363008d7d9232bcde18db28823dae042ae
[ "BSD-3-Clause" ]
19
2015-01-05T06:13:49.000Z
2016-08-11T00:00:25.000Z
src/core/tests/test_position.py
weisongye/saycbridge
3cc4e3363008d7d9232bcde18db28823dae042ae
[ "BSD-3-Clause" ]
10
2015-09-03T00:48:55.000Z
2020-11-09T09:29:59.000Z
# Copyright (c) 2013 The SAYCBridge Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest2 from core.position import * class PositionTest(unittest2.TestCase): def test_partner(self): self.assertEquals(NORTH.part...
29.956522
72
0.719884
import unittest2 from core.position import * class PositionTest(unittest2.TestCase): def test_partner(self): self.assertEquals(NORTH.partner, SOUTH) self.assertEquals(EAST.partner, WEST) def test_calls_between(self): self.assertEquals(NORTH.calls_between(NORTH), 0) self.asser...
true
true
08f8d54f9006bd67ca68a72e4d9f44bec7162982
25,320
py
Python
switchboard/tests_s3_util.py
Duke-GCB/D4S2
47bef4b632967440608f2cc7a3fc31c32b2060fa
[ "MIT" ]
null
null
null
switchboard/tests_s3_util.py
Duke-GCB/D4S2
47bef4b632967440608f2cc7a3fc31c32b2060fa
[ "MIT" ]
138
2016-09-23T18:09:18.000Z
2022-03-03T15:50:19.000Z
switchboard/tests_s3_util.py
Duke-GCB/D4S2
47bef4b632967440608f2cc7a3fc31c32b2060fa
[ "MIT" ]
null
null
null
from django.test import TestCase from mock import patch, Mock, call from d4s2_api.models import S3Bucket, S3User, S3UserTypes, S3Delivery, User, S3Endpoint, State, EmailTemplateSet from switchboard.s3_util import S3Resource, S3DeliveryUtil, S3DeliveryDetails, S3BucketUtil, \ S3NoSuchBucket, S3DeliveryType, S3Transf...
47.063197
118
0.676975
from django.test import TestCase from mock import patch, Mock, call from d4s2_api.models import S3Bucket, S3User, S3UserTypes, S3Delivery, User, S3Endpoint, State, EmailTemplateSet from switchboard.s3_util import S3Resource, S3DeliveryUtil, S3DeliveryDetails, S3BucketUtil, \ S3NoSuchBucket, S3DeliveryType, S3Transf...
true
true
08f8d68c1cf7e6fb449e5a6bc940630eb159c047
4,759
py
Python
eth_account/transactions.py
pipermerriam/eth-account
343cddac6161766964f74b5e316cfb75278c99a8
[ "MIT" ]
2
2020-05-16T08:38:34.000Z
2020-10-01T01:32:57.000Z
eth_account/transactions.py
pipermerriam/eth-account
343cddac6161766964f74b5e316cfb75278c99a8
[ "MIT" ]
1
2021-03-25T21:51:01.000Z
2021-03-25T21:51:01.000Z
venv/lib/python3.6/site-packages/eth_account/internal/transactions.py
chrisbsd/vulidityevm
7caac3bb56866114188f3f21243dca8c949a9a1a
[ "MIT" ]
null
null
null
import itertools from cytoolz import ( curry, dissoc, identity, merge, partial, pipe, ) from eth_rlp import ( HashableRLP, ) from eth_utils.curried import ( apply_formatters_to_dict, apply_one_of_formatters, hexstr_if_str, is_0x_prefixed, is_bytes, is_checksum_addres...
26.005464
100
0.685438
import itertools from cytoolz import ( curry, dissoc, identity, merge, partial, pipe, ) from eth_rlp import ( HashableRLP, ) from eth_utils.curried import ( apply_formatters_to_dict, apply_one_of_formatters, hexstr_if_str, is_0x_prefixed, is_bytes, is_checksum_addres...
true
true
08f8d6ac60d3ae792f7a4e2aa92c51dfee668339
44,957
py
Python
Lib/site-packages/wx-3.0-msw/wx/build/config.py
jickieduan/python27
c752b552396bbed68d8555080d475718cea2edd0
[ "bzip2-1.0.6" ]
1
2021-02-13T22:40:50.000Z
2021-02-13T22:40:50.000Z
Lib/site-packages/wx-3.0-msw/wx/build/config.py
jickieduan/python27
c752b552396bbed68d8555080d475718cea2edd0
[ "bzip2-1.0.6" ]
1
2018-07-28T20:07:04.000Z
2018-07-30T18:28:34.000Z
Lib/site-packages/wx-3.0-msw/wx/build/config.py
jickieduan/python27
c752b552396bbed68d8555080d475718cea2edd0
[ "bzip2-1.0.6" ]
2
2019-12-02T01:39:10.000Z
2021-02-13T22:41:00.000Z
#---------------------------------------------------------------------- # Name: wx.build.config # Purpose: Most of the contents of this module used to be located # in wxPython's setup.py script. It was moved here so # it would be installed with the rest of wxPython and # ...
35.708499
113
0.561247
# it would be installed with the rest of wxPython and # could therefore be used by the setup.py for other # projects that needed this same info and functionality # (most likely in order to be compatible with wxPython.) # # This split from setup.py is stil...
false
true
08f8d720dfc313f2b74c853cfb1c886caf05843e
274
py
Python
desafios/desafio006.py
EricBerlim/PYTHON
68a90fe89185f9ed09b89dd60547e696bf1a8082
[ "MIT" ]
null
null
null
desafios/desafio006.py
EricBerlim/PYTHON
68a90fe89185f9ed09b89dd60547e696bf1a8082
[ "MIT" ]
null
null
null
desafios/desafio006.py
EricBerlim/PYTHON
68a90fe89185f9ed09b89dd60547e696bf1a8082
[ "MIT" ]
null
null
null
print('====== DESAFIO 006 ======') n1 = int(input('Digite um número: ')) dob = n1 * 2 tri = n1 * 3 raiz = n1 ** (1/2) print('O dobro de {} é {}.'.format(n1, dob)) print('O triplo de {} é {}.'.format(n1, tri)) print('A raiz quadrada de {} é igual a {:.3}.'.format(n1, raiz))
30.444444
64
0.547445
print('====== DESAFIO 006 ======') n1 = int(input('Digite um número: ')) dob = n1 * 2 tri = n1 * 3 raiz = n1 ** (1/2) print('O dobro de {} é {}.'.format(n1, dob)) print('O triplo de {} é {}.'.format(n1, tri)) print('A raiz quadrada de {} é igual a {:.3}.'.format(n1, raiz))
true
true
08f8d7d1426ab886a32c7a608676f4ff90f5acf0
2,452
py
Python
core/passenger.py
zhzhussupovkz/taxi-py
ca0e2a3d54d049705db483c6dbf6f90c4150dc48
[ "MIT" ]
null
null
null
core/passenger.py
zhzhussupovkz/taxi-py
ca0e2a3d54d049705db483c6dbf6f90c4150dc48
[ "MIT" ]
null
null
null
core/passenger.py
zhzhussupovkz/taxi-py
ca0e2a3d54d049705db483c6dbf6f90c4150dc48
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015 Zhassulan Zhussupov # Author zhzhussupovkz@gmail.com # Passenger class import random import time class Passenger: def __init__(self, world, screen, x, y): self.pygame = world.pygame self.screen, self.world = screen, world model = random.choice([...
34.055556
92
0.553426
import random import time class Passenger: def __init__(self, world, screen, x, y): self.pygame = world.pygame self.screen, self.world = screen, world model = random.choice(["boy.png", "girl.png"]) self.image = self.pygame.image.load("./images/passengers/" + model) self.x, ...
true
true
08f8d88812a4638bdac745914b8196f0700a8c97
1,056
py
Python
pyvisdk/do/customization_adapter_mapping.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/customization_adapter_mapping.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/customization_adapter_mapping.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def CustomizationAdapterMapping(vim, *args, **kwargs): '''Data object type to associate a...
32
124
0.61553
import logging from pyvisdk.exceptions import InvalidArgumentError log = logging.getLogger(__name__) def CustomizationAdapterMapping(vim, *args, **kwargs): obj = vim.client.factory.create('{urn:vim25}CustomizationAdapterMapping') if (len(args) + len(kwargs)) < 1: raise IndexError('Expected at ...
true
true
08f8d8e21bbec81856e49caf48f0cae58b6c47ab
25,727
py
Python
python/ray/tests/test_runtime_env.py
zuston/ray
992437eafe634728390e0d24e39335ee79cbff8f
[ "Apache-2.0" ]
1
2021-06-08T12:34:57.000Z
2021-06-08T12:34:57.000Z
python/ray/tests/test_runtime_env.py
zuston/ray
992437eafe634728390e0d24e39335ee79cbff8f
[ "Apache-2.0" ]
64
2021-06-19T07:06:15.000Z
2022-03-26T07:13:16.000Z
python/ray/tests/test_runtime_env.py
kira-lin/ray
7802ff66d4346bf8cc39c060b2b78e223edce800
[ "Apache-2.0" ]
null
null
null
import os import pytest import sys import random import tempfile import requests from pathlib import Path import ray from ray.test_utils import ( run_string_as_driver, run_string_as_driver_nonblocking, get_wheel_filename, get_master_wheel_url, get_release_wheel_url) import ray.experimental.internal_kv as kv fro...
36.911047
79
0.645237
import os import pytest import sys import random import tempfile import requests from pathlib import Path import ray from ray.test_utils import ( run_string_as_driver, run_string_as_driver_nonblocking, get_wheel_filename, get_master_wheel_url, get_release_wheel_url) import ray.experimental.internal_kv as kv fro...
true
true
08f8d8f0153164820143cff3c499bf2fb674aeb5
723
py
Python
tests/test_clustering/test_log_frames.py
smok-serwis/coolamqp
d57ada0d478bd1ca94743ae341f6819ba85ea253
[ "MIT" ]
4
2018-06-20T13:59:35.000Z
2021-08-31T12:03:59.000Z
tests/test_clustering/test_log_frames.py
piotrmaslanka/coolamqp
d57ada0d478bd1ca94743ae341f6819ba85ea253
[ "MIT" ]
33
2016-06-03T11:41:09.000Z
2020-07-09T17:48:28.000Z
tests/test_clustering/test_log_frames.py
smok-serwis/coolamqp
d57ada0d478bd1ca94743ae341f6819ba85ea253
[ "MIT" ]
null
null
null
# coding=UTF-8 from __future__ import print_function, absolute_import, division import logging import os import time import unittest from coolamqp.clustering import Cluster from coolamqp.objects import NodeDefinition from coolamqp.tracing import HoldingFrameTracer NODE = NodeDefinition(os.environ.get('AMQP_HOST', '...
25.821429
95
0.749654
from __future__ import print_function, absolute_import, division import logging import os import time import unittest from coolamqp.clustering import Cluster from coolamqp.objects import NodeDefinition from coolamqp.tracing import HoldingFrameTracer NODE = NodeDefinition(os.environ.get('AMQP_HOST', '127.0.0.1'), 'g...
true
true
08f8d9a377d65dbc55c1a0152078134b1aab43b5
431
py
Python
pyrefinebio/annotation.py
AlexsLemonade/refinebio-py
fb71c1372d4bd8d3ff431d05444e24674ae1c6fc
[ "BSD-3-Clause" ]
null
null
null
pyrefinebio/annotation.py
AlexsLemonade/refinebio-py
fb71c1372d4bd8d3ff431d05444e24674ae1c6fc
[ "BSD-3-Clause" ]
41
2020-10-02T16:12:17.000Z
2022-03-10T17:52:03.000Z
pyrefinebio/annotation.py
AlexsLemonade/refinebio-py
fb71c1372d4bd8d3ff431d05444e24674ae1c6fc
[ "BSD-3-Clause" ]
1
2022-01-11T18:16:52.000Z
2022-01-11T18:16:52.000Z
from pyrefinebio.base import Base from pyrefinebio.util import parse_date class Annotation(Base): def __init__( self, id=None, data=None, is_ccdl=None, created_at=None, last_modified=None ): self.id = id self.data = data self.is_ccdl = i...
21.55
54
0.617169
from pyrefinebio.base import Base from pyrefinebio.util import parse_date class Annotation(Base): def __init__( self, id=None, data=None, is_ccdl=None, created_at=None, last_modified=None ): self.id = id self.data = data self.is_ccdl = i...
true
true
08f8d9a604384e317e52e3dffa49d95d6ab889eb
21,686
py
Python
exe/portable-python/App/Lib/test/test_wsgiref.py
jaredmusil/iawsc-data-toolbox
65b97d45e13813935017f8b3c5726784027b065f
[ "MIT" ]
null
null
null
exe/portable-python/App/Lib/test/test_wsgiref.py
jaredmusil/iawsc-data-toolbox
65b97d45e13813935017f8b3c5726784027b065f
[ "MIT" ]
1
2018-04-15T22:59:15.000Z
2018-04-15T22:59:15.000Z
exe/portable-python/App/Lib/test/test_wsgiref.py
jaredmusil/iawsc-data-toolbox
65b97d45e13813935017f8b3c5726784027b065f
[ "MIT" ]
null
null
null
from __future__ import nested_scopes # Backward compat for 2.1 from unittest import TestCase from wsgiref.util import setup_testing_defaults from wsgiref.headers import Headers from wsgiref.handlers import BaseHandler, BaseCGIHandler from wsgiref import util from wsgiref.validate import validator from wsgiref.simple...
34.642173
80
0.556304
from __future__ import nested_scopes from unittest import TestCase from wsgiref.util import setup_testing_defaults from wsgiref.headers import Headers from wsgiref.handlers import BaseHandler, BaseCGIHandler from wsgiref import util from wsgiref.validate import validator from wsgiref.simple_server import WSGIServer,...
true
true
08f8d9c12c35456af8f8c8c1ee83269ae8c065a4
2,798
py
Python
pcapkit/vendor/ipx/packet.py
chellvs/PyPCAPKit
f8d66f9955904196b71a6143e49ff4ec4c4922dc
[ "BSD-3-Clause" ]
131
2018-10-12T09:45:44.000Z
2022-03-31T18:58:14.000Z
pcapkit/vendor/ipx/packet.py
chellvs/PyPCAPKit
f8d66f9955904196b71a6143e49ff4ec4c4922dc
[ "BSD-3-Clause" ]
39
2018-08-18T12:15:04.000Z
2022-03-07T20:28:08.000Z
pcapkit/vendor/ipx/packet.py
chellvs/PyPCAPKit
f8d66f9955904196b71a6143e49ff4ec4c4922dc
[ "BSD-3-Clause" ]
23
2018-10-12T09:45:52.000Z
2022-03-05T15:23:00.000Z
# -*- coding: utf-8 -*- # pylint: disable=wrong-import-position """IPX Packet Types""" ############################################################################### # NOTE: fix duplicated name of ``socket``` import sys path = sys.path.pop(0) ##########################################################################...
28.55102
133
0.471766
import sys path = sys.path.pop(0) import re import bs4 from pcapkit.vendor.default import Vendor sys.path.insert(0, path) __all__ = ['Packet'] class Packet(Vendor): FLAG = 'isinstance(value, int) and 0 <= value <= 255' LINK = 'https://en.wikipedia.org/wiki/Internetwork_Packet_Exchange#IPX_pack...
true
true
08f8d9cf0126698b68692e110ff8d2436d220896
12,153
py
Python
components/kubeflow/kfserving/src/kfservingdeployer.py
jppgks/kfp-tekton
33493a23ea94472d41b5c995af76ddce69cc97a8
[ "Apache-2.0" ]
1
2020-10-01T20:09:29.000Z
2020-10-01T20:09:29.000Z
components/kubeflow/kfserving/src/kfservingdeployer.py
jppgks/kfp-tekton
33493a23ea94472d41b5c995af76ddce69cc97a8
[ "Apache-2.0" ]
1
2021-02-23T19:35:06.000Z
2021-02-23T19:35:06.000Z
components/kubeflow/kfserving/src/kfservingdeployer.py
jppgks/kfp-tekton
33493a23ea94472d41b5c995af76ddce69cc97a8
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 kubeflow.org. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
35.639296
147
0.661236
import json import argparse import os import requests import re from kubernetes import client from kfserving import KFServingClient from kfserving import constants from kfserving import V1alpha2EndpointSpec from kfserving import V1alpha2PredictorSpec from kfserving import V1alpha2TensorflowSpec from kfserving import...
true
true
08f8da03c7d4480b598a6e6824bd02219f0e29da
3,179
py
Python
cellphonedb/src/core/methods/cpdb_analysis_helper.py
Charlesyip2016/cellphonedb
5556e61e44e6c876decf9d7b656a052172e811bd
[ "MIT" ]
null
null
null
cellphonedb/src/core/methods/cpdb_analysis_helper.py
Charlesyip2016/cellphonedb
5556e61e44e6c876decf9d7b656a052172e811bd
[ "MIT" ]
null
null
null
cellphonedb/src/core/methods/cpdb_analysis_helper.py
Charlesyip2016/cellphonedb
5556e61e44e6c876decf9d7b656a052172e811bd
[ "MIT" ]
null
null
null
import pandas as pd def percent_analysis(clusters: dict, threshold: float, interactions: pd.DataFrame, cluster_interactions: list, base_result: pd.DataFrame, separator: str, ) -> pd.DataFrame:...
38.301205
115
0.676942
import pandas as pd def percent_analysis(clusters: dict, threshold: float, interactions: pd.DataFrame, cluster_interactions: list, base_result: pd.DataFrame, separator: str, ) -> pd.DataFrame:...
true
true
08f8da278a90a9a0d434ccfe7e1ad60ede4af57e
18,053
py
Python
airflow/providers/google/cloud/example_dags/example_datacatalog.py
daemon-demon/airflow
6f96e81f0123b30750fb68ec496246023bf63f35
[ "Apache-2.0" ]
79
2021-10-15T07:32:27.000Z
2022-03-28T04:10:19.000Z
airflow/providers/google/cloud/example_dags/example_datacatalog.py
daemon-demon/airflow
6f96e81f0123b30750fb68ec496246023bf63f35
[ "Apache-2.0" ]
153
2021-10-15T05:23:46.000Z
2022-02-23T06:07:10.000Z
airflow/providers/google/cloud/example_dags/example_datacatalog.py
daemon-demon/airflow
6f96e81f0123b30750fb68ec496246023bf63f35
[ "Apache-2.0" ]
23
2021-10-15T02:36:37.000Z
2022-03-17T02:59:27.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
39.940265
110
0.748131
from google.cloud.datacatalog_v1beta1.proto.tags_pb2 import FieldType, TagField, TagTemplateField from airflow import models from airflow.operators.bash_operator import BashOperator from airflow.providers.google.cloud.operators.datacatalog import ( CloudDataCatalogCreateEntryGroupOperator, CloudDataCatalogCre...
true
true
08f8dac9fb4ecdd60ff00eead48747b518a66507
655
py
Python
parliament/misc.py
piax93/parliament
e9332f14be45ab353c86e8e5b914ebbffea593a5
[ "BSD-3-Clause" ]
null
null
null
parliament/misc.py
piax93/parliament
e9332f14be45ab353c86e8e5b914ebbffea593a5
[ "BSD-3-Clause" ]
null
null
null
parliament/misc.py
piax93/parliament
e9332f14be45ab353c86e8e5b914ebbffea593a5
[ "BSD-3-Clause" ]
null
null
null
import jsoncfg def make_list(v): """ If the object is not a list already, it converts it to one Examples: [1, 2, 3] -> [1, 2, 3] [1] -> [1] 1 -> [1] """ if not jsoncfg.node_is_array(v): if jsoncfg.node_is_scalar(v): location = jsoncfg.node_location(v) li...
21.129032
64
0.554198
import jsoncfg def make_list(v): if not jsoncfg.node_is_array(v): if jsoncfg.node_is_scalar(v): location = jsoncfg.node_location(v) line = location.line column = location.column else: line = v.line column = v.column a = jsoncfg.c...
true
true
08f8db57f440071e044b67a71cd589b57865a768
11,350
py
Python
python/pyspark/ml/tuning.py
HuJiayin/spark
f6fba2b196346103256fa32a797438fbd5cc001c
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
74
2015-12-15T17:45:55.000Z
2022-02-10T02:23:02.000Z
python/pyspark/ml/tuning.py
HuJiayin/spark
f6fba2b196346103256fa32a797438fbd5cc001c
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
13
2015-11-25T05:57:00.000Z
2017-05-17T16:47:30.000Z
python/pyspark/ml/tuning.py
HuJiayin/spark
f6fba2b196346103256fa32a797438fbd5cc001c
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "BSD-3-Clause" ]
97
2016-01-06T00:50:01.000Z
2022-02-11T14:22:24.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
34.923077
97
0.621498
import itertools import numpy as np from pyspark import since from pyspark.ml import Estimator, Model from pyspark.ml.param import Params, Param from pyspark.ml.param.shared import HasSeed from pyspark.ml.util import keyword_only from pyspark.sql.functions import rand __all__ = ['ParamGridBuilder', 'CrossValidator',...
true
true
08f8db6b3c18e7f8c827d0210af94ce25185bcf7
9,188
py
Python
analysis/weekly-report.py
ProjectPepperHSB/Backend-Services
06f0a6e58dbc06fc29e8144a149be4978363f036
[ "MIT" ]
null
null
null
analysis/weekly-report.py
ProjectPepperHSB/Backend-Services
06f0a6e58dbc06fc29e8144a149be4978363f036
[ "MIT" ]
null
null
null
analysis/weekly-report.py
ProjectPepperHSB/Backend-Services
06f0a6e58dbc06fc29e8144a149be4978363f036
[ "MIT" ]
null
null
null
# ----- I M P O R T S ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- import sys, getpass, traceback import warnings import pandas as pd import numpy as np # from sklearn.linear_model import LinearRegression from datetime import datetime, timedelta import matplotlib.pyplot as plt from matplo...
45.485149
151
0.602416
import sys, getpass, traceback import warnings import pandas as pd import numpy as np from datetime import datetime, timedelta import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages from dotenv import dotenv_values from Client import Client __version__ = 'v1.0.0' __description__ = '...
true
true
08f8dbdb1c0ba1a0cb74dbd594dc1ecea341d0aa
1,530
py
Python
project/meter/tests.py
identitynr8/nlp
0d8436ebef6692f472f81082265aade9c3052088
[ "MIT" ]
null
null
null
project/meter/tests.py
identitynr8/nlp
0d8436ebef6692f472f81082265aade9c3052088
[ "MIT" ]
null
null
null
project/meter/tests.py
identitynr8/nlp
0d8436ebef6692f472f81082265aade9c3052088
[ "MIT" ]
null
null
null
import json from django.test import TestCase, Client from django.urls import reverse class MeterTests(TestCase): def setUp(self): self.client = Client() def test_buzzmeter_page_doesnt_crash(self): response = self.client.get(reverse('buzzmeter')) self.assertEqual(response.status_code...
36.428571
123
0.61634
import json from django.test import TestCase, Client from django.urls import reverse class MeterTests(TestCase): def setUp(self): self.client = Client() def test_buzzmeter_page_doesnt_crash(self): response = self.client.get(reverse('buzzmeter')) self.assertEqual(response.status_code...
true
true
08f8dc7e8090966796c0fef288d44d013126b9cf
1,196
py
Python
fe/live/projects/operations.py
egnartsms/livejs
e421fb52c5be58a4064a2238a1570e99a11ccdde
[ "MIT" ]
2
2019-11-21T21:16:32.000Z
2020-01-31T09:44:06.000Z
fe/live/projects/operations.py
egnartsms/livejs
e421fb52c5be58a4064a2238a1570e99a11ccdde
[ "MIT" ]
null
null
null
fe/live/projects/operations.py
egnartsms/livejs
e421fb52c5be58a4064a2238a1570e99a11ccdde
[ "MIT" ]
null
null
null
import json import os.path import sublime from live.gstate import config from live.gstate import fe_projects from live.settings import setting from live.common.misc import first_or_none def assign_window_for_livejs_project(): for window in sublime.windows(): if setting.project_id[window] == config.livejs...
24.916667
87
0.740803
import json import os.path import sublime from live.gstate import config from live.gstate import fe_projects from live.settings import setting from live.common.misc import first_or_none def assign_window_for_livejs_project(): for window in sublime.windows(): if setting.project_id[window] == config.livejs...
true
true
08f8dc9cf242ad593a6aa896d8cba3d2d863567f
1,590
py
Python
backend/secure_backend/migrations/0001_initial.py
CS-twop/Secure-django-reacthook
3d7b3e65c7e1f1e015dcd3ddf2838acdab7cab17
[ "MIT" ]
null
null
null
backend/secure_backend/migrations/0001_initial.py
CS-twop/Secure-django-reacthook
3d7b3e65c7e1f1e015dcd3ddf2838acdab7cab17
[ "MIT" ]
null
null
null
backend/secure_backend/migrations/0001_initial.py
CS-twop/Secure-django-reacthook
3d7b3e65c7e1f1e015dcd3ddf2838acdab7cab17
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2020-11-16 08:23 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
40.769231
143
0.621384
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
08f8dd378d1b45882d0f22f2f91a841f25929404
1,199
py
Python
commanderbot/ext/automod/automod_action.py
CommanderBot-Dev/commanderbot-ext
c8798b4475b892c234a1e4ffbfb4fed3fb702938
[ "MIT" ]
4
2020-09-25T19:22:48.000Z
2021-06-16T18:08:49.000Z
commanderbot/ext/automod/automod_action.py
CommanderBot-Dev/commanderbot-py
835841f733e466c5a0e6724d4020747c55856fe3
[ "MIT" ]
23
2021-08-30T04:07:29.000Z
2021-11-08T17:44:41.000Z
commanderbot/ext/automod/automod_action.py
CommanderBot-Dev/commanderbot-py
835841f733e466c5a0e6724d4020747c55856fe3
[ "MIT" ]
3
2020-09-25T19:23:22.000Z
2021-03-16T18:19:48.000Z
from dataclasses import dataclass from typing import Any, Iterable, List, Optional, Protocol from commanderbot.ext.automod import actions from commanderbot.ext.automod.automod_entity import ( AutomodEntity, AutomodEntityBase, deserialize_entities, ) from commanderbot.ext.automod.automod_event import Automo...
24.469388
68
0.706422
from dataclasses import dataclass from typing import Any, Iterable, List, Optional, Protocol from commanderbot.ext.automod import actions from commanderbot.ext.automod.automod_entity import ( AutomodEntity, AutomodEntityBase, deserialize_entities, ) from commanderbot.ext.automod.automod_event import Automo...
true
true
08f8dd4573c8eb7a7a974a6db3e914f5ac738779
4,270
py
Python
tests/secrets/test_secrets_backends.py
daemon-demon/airflow
6f96e81f0123b30750fb68ec496246023bf63f35
[ "Apache-2.0" ]
2
2020-10-23T18:55:03.000Z
2021-07-13T04:45:49.000Z
tests/secrets/test_secrets_backends.py
daemon-demon/airflow
6f96e81f0123b30750fb68ec496246023bf63f35
[ "Apache-2.0" ]
20
2021-01-23T12:33:08.000Z
2021-12-07T22:30:37.000Z
tests/secrets/test_secrets_backends.py
daemon-demon/airflow
6f96e81f0123b30750fb68ec496246023bf63f35
[ "Apache-2.0" ]
2
2020-10-23T18:55:05.000Z
2022-02-16T21:53:10.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
41.057692
91
0.713817
import os import unittest from unittest import mock from parameterized import parameterized from airflow.models.connection import Connection from airflow.models.variable import Variable from airflow.secrets.base_secrets import BaseSecretsBackend from airflow.secrets.environment_variables import EnvironmentVariablesBa...
true
true
08f8dece5b05d08e1a71f9a29be544bb026e6e2c
8,456
py
Python
build/X86_MESI_Two_Level/python/m5/internal/X86ISA_vector.py
hoho20000000/gem5-fy
b59f6feed22896d6752331652c4d8a41a4ca4435
[ "BSD-3-Clause" ]
null
null
null
build/X86_MESI_Two_Level/python/m5/internal/X86ISA_vector.py
hoho20000000/gem5-fy
b59f6feed22896d6752331652c4d8a41a4ca4435
[ "BSD-3-Clause" ]
1
2020-08-20T05:53:30.000Z
2020-08-20T05:53:30.000Z
build/X86_MESI_Two_Level/python/m5/internal/X86ISA_vector.py
hoho20000000/gem5-fy
b59f6feed22896d6752331652c4d8a41a4ca4435
[ "BSD-3-Clause" ]
null
null
null
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.12 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info as _swig_python_version_info if _swig_python_version_info >= (2, 7, 0): def swig_im...
30.637681
107
0.687796
from sys import version_info as _swig_python_version_info if _swig_python_version_info >= (2, 7, 0): def swig_import_helper(): import importlib pkg = __name__.rpartition('.')[0] mname = '.'.join((pkg, '_X86ISA_vector')).lstrip('.') try: return importlib.import_module(mna...
true
true
08f8dedfc83769c3576683acbfa9e08a3bb85784
2,811
py
Python
ykdl/util/m3u8_wrap.py
Miloxing/ykdl
2d485cbb326327ad1d28c5cea4dffcace777032d
[ "MIT" ]
3
2018-09-04T09:33:51.000Z
2021-11-01T09:03:27.000Z
ykdl/util/m3u8_wrap.py
MichioY/bilibiliupload
623e0d06e6acb4b5f2c3d6291450f27bbf83667e
[ "MIT" ]
null
null
null
ykdl/util/m3u8_wrap.py
MichioY/bilibiliupload
623e0d06e6acb4b5f2c3d6291450f27bbf83667e
[ "MIT" ]
1
2019-12-26T18:00:47.000Z
2019-12-26T18:00:47.000Z
#!/usr/bin/env python from logging import getLogger logger = getLogger("m3u8_wrap") try: import m3u8 import time import signal stop = False def m3u8_live_stopper(): default_INT_handle = None def handle(sig, x): print("stopping m3u8 live download!!") global ...
29.589474
157
0.530772
from logging import getLogger logger = getLogger("m3u8_wrap") try: import m3u8 import time import signal stop = False def m3u8_live_stopper(): default_INT_handle = None def handle(sig, x): print("stopping m3u8 live download!!") global stop stop ...
true
true
08f8dfcd4207be745cb28303bb4d45dc6d687201
28
py
Python
tests/data/__init__.py
matz-e/sphinx-bluebrain-theme
fb2a48fcc95705c04f50bfb5306fdb476765f956
[ "MIT" ]
2
2020-08-08T18:47:51.000Z
2021-07-23T13:56:51.000Z
tests/data/__init__.py
matz-e/sphinx-bluebrain-theme
fb2a48fcc95705c04f50bfb5306fdb476765f956
[ "MIT" ]
15
2020-04-09T13:24:12.000Z
2022-03-29T08:24:45.000Z
tests/data/__init__.py
matz-e/sphinx-bluebrain-theme
fb2a48fcc95705c04f50bfb5306fdb476765f956
[ "MIT" ]
2
2021-04-22T08:15:13.000Z
2021-12-22T08:23:37.000Z
"""Regression test data."""
14
27
0.642857
true
true
08f8e1154130b24c7f5a50048d2abdec5b2f2bbc
4,811
py
Python
tests/unit/test_decorator.py
mike0615/curie
e25691f465c23cf53c39be157fcfa2eea4978b26
[ "MIT" ]
4
2019-02-26T05:18:13.000Z
2020-07-15T00:34:41.000Z
tests/unit/test_decorator.py
nutanix/curie
e25691f465c23cf53c39be157fcfa2eea4978b26
[ "MIT" ]
3
2021-03-31T18:55:50.000Z
2021-04-20T17:13:31.000Z
tests/unit/test_decorator.py
mike0615/curie
e25691f465c23cf53c39be157fcfa2eea4978b26
[ "MIT" ]
2
2020-01-09T02:24:00.000Z
2020-11-04T23:09:02.000Z
# # Copyright (c) 2017 Nutanix Inc. All rights reserved. # import unittest import mock from flask import Flask, Response from google.protobuf.message import EncodeError from curie.curie_error_pb2 import CurieError from curie.decorator import curie_api_handler, validate_parameter from curie.exception import CurieExcep...
30.06875
78
0.667221
import unittest import mock from flask import Flask, Response from google.protobuf.message import EncodeError from curie.curie_error_pb2 import CurieError from curie.decorator import curie_api_handler, validate_parameter from curie.exception import CurieException from curie.util import CurieUtil class TestDecorator...
true
true
08f8e1744a1ba95504f9a4ddaea5d88d58394701
384
py
Python
Curso de Desarrollo Web con Flask/Flask/checkdb.py
Emir-97/My-practices-with-Flask
747d78ae647c164d0943527dd2d93a9e21310a67
[ "Apache-2.0" ]
null
null
null
Curso de Desarrollo Web con Flask/Flask/checkdb.py
Emir-97/My-practices-with-Flask
747d78ae647c164d0943527dd2d93a9e21310a67
[ "Apache-2.0" ]
null
null
null
Curso de Desarrollo Web con Flask/Flask/checkdb.py
Emir-97/My-practices-with-Flask
747d78ae647c164d0943527dd2d93a9e21310a67
[ "Apache-2.0" ]
null
null
null
from example7 import dataBase, Person #Se agrega la información de la nueva columna country creada en example7.py y luego agregada a la tabla person = Person.query.get(1) person.country = 'Argentina' person4 = Person.query.get(2) person4.country = 'China' dataBase.session.add_all([person, person4]) dataBase.se...
29.538462
104
0.752604
from example7 import dataBase, Person person = Person.query.get(1) person.country = 'Argentina' person4 = Person.query.get(2) person4.country = 'China' dataBase.session.add_all([person, person4]) dataBase.session.commit() persons = Person.query.all() print(persons)
true
true
08f8e19e5badba4c5c3cfd6c1daf4300995acd45
875
py
Python
setup.py
NGL321/github-to-sqlite
f7dae365ab7c10c91ea4627368aa8be9802d9296
[ "Apache-2.0" ]
null
null
null
setup.py
NGL321/github-to-sqlite
f7dae365ab7c10c91ea4627368aa8be9802d9296
[ "Apache-2.0" ]
null
null
null
setup.py
NGL321/github-to-sqlite
f7dae365ab7c10c91ea4627368aa8be9802d9296
[ "Apache-2.0" ]
null
null
null
from setuptools import setup import os VERSION = "0.7" def get_long_description(): with open( os.path.join(os.path.dirname(os.path.abspath(__file__)), "README.md"), encoding="utf8", ) as fp: return fp.read() setup( name="github-to-sqlite", description="Save data from GitHub ...
26.515152
78
0.662857
from setuptools import setup import os VERSION = "0.7" def get_long_description(): with open( os.path.join(os.path.dirname(os.path.abspath(__file__)), "README.md"), encoding="utf8", ) as fp: return fp.read() setup( name="github-to-sqlite", description="Save data from GitHub ...
true
true
08f8e1e011450fe12238753c20ca7d8f620049f3
6,226
py
Python
miRmedon_src/alignments_filter.py
Ally-s-Lab/miRmedon
a34aa5b3bb24ddc11edbca4baa60720790289f10
[ "MIT" ]
2
2019-09-26T13:47:03.000Z
2020-05-06T11:37:54.000Z
miRmedon_src/alignments_filter.py
Ally-s-Lab/miRmedon
a34aa5b3bb24ddc11edbca4baa60720790289f10
[ "MIT" ]
null
null
null
miRmedon_src/alignments_filter.py
Ally-s-Lab/miRmedon
a34aa5b3bb24ddc11edbca4baa60720790289f10
[ "MIT" ]
1
2021-02-09T03:03:11.000Z
2021-02-09T03:03:11.000Z
################################################################################################################### # This script includes 3 three functions for filtering bam file after alignment to e-miRbase with STAR. The script # filter alignment accriding to these 3 creiteria: # 1. Read wasn't soft-clipped more ...
47.526718
142
0.654192
# 2. Mis matches aren't located at the putatve editing position import pickle import re import pysam import argparse def get_mismatch_pos(alignment): reference_sequence = alignment.get_reference_sequence() try: pos = re.search(r'[a-z]', reference_sequence).start() except AttributeError: ...
true
true
08f8e1e9679a5a4715938e35a517a7276a3f63d7
11,728
py
Python
docassemble_base/docassemble/base/read_config.py
sadpe/docassemble
023fe1202d9ee8cc8a503811f8ecc4363a320c9e
[ "MIT" ]
1
2020-06-01T15:46:11.000Z
2020-06-01T15:46:11.000Z
docassemble_base/docassemble/base/read_config.py
sadpe/docassemble
023fe1202d9ee8cc8a503811f8ecc4363a320c9e
[ "MIT" ]
6
2021-02-08T20:44:14.000Z
2022-01-13T02:42:41.000Z
docassemble_base/docassemble/base/read_config.py
sadpe/docassemble
023fe1202d9ee8cc8a503811f8ecc4363a320c9e
[ "MIT" ]
null
null
null
import sys import os import re separator = re.compile(r' *[,;] *') if __name__ == "__main__": import docassemble.base.config docassemble.base.config.load(arguments=sys.argv) from docassemble.base.config import daconfig, parse_redis_uri if 'timezone' in daconfig and daconfig['timezone'] is not None: ...
55.847619
105
0.604195
import sys import os import re separator = re.compile(r' *[,;] *') if __name__ == "__main__": import docassemble.base.config docassemble.base.config.load(arguments=sys.argv) from docassemble.base.config import daconfig, parse_redis_uri if 'timezone' in daconfig and daconfig['timezone'] is not None: ...
true
true
08f8e206327721c224035335154f071ee43c29da
2,464
py
Python
os_apply_config/collect_config.py
openstack/os-apply-config
474068e4871e1eaa373ef9718661685ce9b59e67
[ "Apache-2.0" ]
33
2015-01-29T20:10:45.000Z
2021-10-07T06:20:32.000Z
os_apply_config/collect_config.py
openstack/os-apply-config
474068e4871e1eaa373ef9718661685ce9b59e67
[ "Apache-2.0" ]
null
null
null
os_apply_config/collect_config.py
openstack/os-apply-config
474068e4871e1eaa373ef9718661685ce9b59e67
[ "Apache-2.0" ]
7
2015-01-06T11:05:34.000Z
2020-03-14T15:00:36.000Z
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.704225
79
0.665179
import copy import json import os from os_apply_config import config_exception as exc def read_configs(config_files): for input_path in [x for x in config_files if x]: if os.path.exists(input_path): try: with open(input_path) as input_file: yield((input_fi...
true
true
08f8e2614fcfac309a67475257e46048c06a42c9
44,415
py
Python
pypy/lib-python/3/test/test_httpservers.py
Clear-Sight/cython-vs-pypy-performance
a81df5e1dbc115468ddfd60670ddfad448a5c992
[ "MIT" ]
1
2021-06-02T23:02:09.000Z
2021-06-02T23:02:09.000Z
pypy/lib-python/3/test/test_httpservers.py
Clear-Sight/cython-vs-pypy-performance
a81df5e1dbc115468ddfd60670ddfad448a5c992
[ "MIT" ]
1
2021-03-30T18:08:41.000Z
2021-03-30T18:08:41.000Z
pypy/lib-python/3/test/test_httpservers.py
Clear-Sight/cython-vs-pypy-performance
a81df5e1dbc115468ddfd60670ddfad448a5c992
[ "MIT" ]
null
null
null
"""Unittests for the various HTTPServer modules. Written by Cody A.W. Somerville <cody-somerville@ubuntu.com>, Josip Dzolonga, and Michael Otteneder for the 2007/08 GHOP contest. """ from http.server import BaseHTTPRequestHandler, HTTPServer, \ SimpleHTTPRequestHandler, CGIHTTPRequestHandler from http import ser...
39.028998
93
0.617427
from http.server import BaseHTTPRequestHandler, HTTPServer, \ SimpleHTTPRequestHandler, CGIHTTPRequestHandler from http import server, HTTPStatus import os import sys import re import base64 import ntpath import shutil import email.message import email.utils import html import http.client import urllib.parse imp...
true
true
08f8e3144480d8eb66c7234d96d0b60a62563c66
21,291
py
Python
swift/common/middleware/tempauth.py
dreamhost/swift
e90424e88bfaae17bf16f5c32b4d18deb5a6e71f
[ "Apache-2.0" ]
null
null
null
swift/common/middleware/tempauth.py
dreamhost/swift
e90424e88bfaae17bf16f5c32b4d18deb5a6e71f
[ "Apache-2.0" ]
null
null
null
swift/common/middleware/tempauth.py
dreamhost/swift
e90424e88bfaae17bf16f5c32b4d18deb5a6e71f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2011 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
44.080745
79
0.574421
from time import gmtime, strftime, time from traceback import format_exc from urllib import quote, unquote from uuid import uuid4 from hashlib import sha1 import hmac import base64 from eventlet import Timeout from webob import Response, Request from webob.exc import HTTPBadRequest, HTTPForbidden, HTTPNotFound, \ ...
false
true
08f8e64b59fb611d2aec17fbefb2baa0bb748e3c
4,864
py
Python
test/am/test_secondary_edge_status.py
dlminvestments/apple-llvm-infrastructure-tools
0322311e0b9356eb3b00ea9e0692f89da417ba1c
[ "Apache-2.0" ]
null
null
null
test/am/test_secondary_edge_status.py
dlminvestments/apple-llvm-infrastructure-tools
0322311e0b9356eb3b00ea9e0692f89da417ba1c
[ "Apache-2.0" ]
29
2020-11-22T18:49:48.000Z
2022-02-25T15:14:53.000Z
test/am/test_secondary_edge_status.py
dlminvestments/apple-llvm-infrastructure-tools
0322311e0b9356eb3b00ea9e0692f89da417ba1c
[ "Apache-2.0" ]
null
null
null
""" Tests for the AM secondary edge status logic. """ import os import pytest from git_apple_llvm.am.main import am from git_apple_llvm.git_tools import git import json from click.testing import CliRunner @pytest.fixture(scope='session') def am_tool_git_repo(tmp_path_factory) -> str: path = str(tmp_path_factor...
40.533333
112
0.664885
import os import pytest from git_apple_llvm.am.main import am from git_apple_llvm.git_tools import git import json from click.testing import CliRunner @pytest.fixture(scope='session') def am_tool_git_repo(tmp_path_factory) -> str: path = str(tmp_path_factory.mktemp('simple-am-dir')) am_c...
true
true
08f8e65b5bebec401ed92eb33591bfb3e5c30a09
5,089
py
Python
models/TESTS.py
LRHammond/pv4dsrl
7053ea392f9ddbf3672a0ac348d61abe6b7264d9
[ "MIT" ]
null
null
null
models/TESTS.py
LRHammond/pv4dsrl
7053ea392f9ddbf3672a0ac348d61abe6b7264d9
[ "MIT" ]
2
2020-03-24T16:31:16.000Z
2020-03-31T00:56:57.000Z
models/TESTS.py
LRHammond/pv4dsrl
7053ea392f9ddbf3672a0ac348d61abe6b7264d9
[ "MIT" ]
null
null
null
from pydc import HYPE hype = HYPE("test.pl", 100) result = hype.plan_step( "[observation(x_pos(obj0)) ~= 0, observation(y_pos(obj0)) ~= 0, observation(x_size(obj0)) ~= small, observation(y_size(obj0)) ~= small, observation(colour(obj0)) ~= wall, observation(shape(obj0)) ~= square, observation(nothing(obj0)) ~= no,...
363.5
4,858
0.709963
from pydc import HYPE hype = HYPE("test.pl", 100) result = hype.plan_step( "[observation(x_pos(obj0)) ~= 0, observation(y_pos(obj0)) ~= 0, observation(x_size(obj0)) ~= small, observation(y_size(obj0)) ~= small, observation(colour(obj0)) ~= wall, observation(shape(obj0)) ~= square, observation(nothing(obj0)) ~= no,...
false
true
08f8e6dd9ec771271eaf45c86d8e9e3469837576
8,183
py
Python
models/language_translation/tensorflow/transformer_lt_official/inference/fp32/infer_ab.py
hekaplex/resnet_dl
fc8d4dcc0adffbe22d01d333e6cf5db955f2f011
[ "Apache-2.0" ]
null
null
null
models/language_translation/tensorflow/transformer_lt_official/inference/fp32/infer_ab.py
hekaplex/resnet_dl
fc8d4dcc0adffbe22d01d333e6cf5db955f2f011
[ "Apache-2.0" ]
null
null
null
models/language_translation/tensorflow/transformer_lt_official/inference/fp32/infer_ab.py
hekaplex/resnet_dl
fc8d4dcc0adffbe22d01d333e6cf5db955f2f011
[ "Apache-2.0" ]
null
null
null
# # -*- coding: utf-8 -*- # # Copyright (c) 2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
35.120172
118
0.66907
import tensorflow as tf from tensorflow.python.framework import ops from google.protobuf import text_format from tensorflow.core.framework import graph_pb2 import numpy as np from utils import tokenizer from utils.tokenizer import Subtokenizer from tensorflow.python.platform import flags as flags_lib from...
true
true
08f8e749217d01f92363c3e4be18927297cda7f7
1,041
py
Python
sandbox/lib/jumpscale/JumpscaleLibs/clients/gitea/GiteaRepoPublicKeys.py
threefoldtech/threebot_prebuilt
1f0e1c65c14cef079cd80f73927d7c8318755c48
[ "Apache-2.0" ]
null
null
null
sandbox/lib/jumpscale/JumpscaleLibs/clients/gitea/GiteaRepoPublicKeys.py
threefoldtech/threebot_prebuilt
1f0e1c65c14cef079cd80f73927d7c8318755c48
[ "Apache-2.0" ]
117
2019-09-01T11:59:19.000Z
2020-07-14T11:10:08.000Z
sandbox/lib/jumpscale/JumpscaleLibs/clients/gitea/GiteaRepoPublicKeys.py
threefoldtech/threebot_prebuilt
1f0e1c65c14cef079cd80f73927d7c8318755c48
[ "Apache-2.0" ]
2
2020-04-06T15:21:23.000Z
2020-05-07T04:29:53.000Z
import requests from Jumpscale import j from .GiteaRepoPublicKey import GiteaRepoPublicKey JSBASE = j.baseclasses.object class GiteaRepoPublicKeys(j.baseclasses.object): def __init__(self, user, repo): JSBASE.__init__(self) self.user = user self.position = 0 self.repo = repo ...
28.916667
115
0.62536
import requests from Jumpscale import j from .GiteaRepoPublicKey import GiteaRepoPublicKey JSBASE = j.baseclasses.object class GiteaRepoPublicKeys(j.baseclasses.object): def __init__(self, user, repo): JSBASE.__init__(self) self.user = user self.position = 0 self.repo = repo ...
true
true
08f8e8d809d063570b3c3427e5cda40485c2881d
3,756
py
Python
moler/events/unix/wait4prompts.py
jochenparm/moler
0253d677e0ef150206758c7991197ba5687d0965
[ "BSD-3-Clause" ]
57
2018-02-20T08:16:47.000Z
2022-03-28T10:36:57.000Z
moler/events/unix/wait4prompts.py
jochenparm/moler
0253d677e0ef150206758c7991197ba5687d0965
[ "BSD-3-Clause" ]
377
2018-07-19T11:56:27.000Z
2021-07-09T13:08:12.000Z
moler/events/unix/wait4prompts.py
jochenparm/moler
0253d677e0ef150206758c7991197ba5687d0965
[ "BSD-3-Clause" ]
24
2018-04-14T20:49:40.000Z
2022-03-29T10:44:26.000Z
# -*- coding: utf-8 -*- __author__ = 'Michal Ernst, Marcin Usielski' __copyright__ = 'Copyright (C) 2019-2021, Nokia' __email__ = 'michal.ernst@nokia.com, marcin.usielski@nokia.com' import datetime import re from moler.events.unix.genericunix_textualevent import GenericUnixTextualEvent from moler.exceptions import Pa...
32.66087
117
0.636848
__author__ = 'Michal Ernst, Marcin Usielski' __copyright__ = 'Copyright (C) 2019-2021, Nokia' __email__ = 'michal.ernst@nokia.com, marcin.usielski@nokia.com' import datetime import re from moler.events.unix.genericunix_textualevent import GenericUnixTextualEvent from moler.exceptions import ParsingDone from operator ...
true
true
08f8e9a72b5c51dc156aa1c86094a6741749ca7c
873
py
Python
course/views/index.py
fsr/course-management
189ef5a2fc17114603fc6ff93cbf01594a74dc0e
[ "BSD-3-Clause" ]
11
2015-11-09T19:15:56.000Z
2021-09-27T16:56:57.000Z
course/views/index.py
fsr/course-management
189ef5a2fc17114603fc6ff93cbf01594a74dc0e
[ "BSD-3-Clause" ]
97
2015-11-12T19:02:08.000Z
2021-11-03T10:45:51.000Z
course/views/index.py
fsr/course-management
189ef5a2fc17114603fc6ff93cbf01594a74dc0e
[ "BSD-3-Clause" ]
11
2015-11-09T19:15:32.000Z
2021-11-05T14:28:22.000Z
from course.models import news from django.shortcuts import render, render_to_response from django.utils.translation import ugettext as _ def index(request): return render( request, 'index.html', { 'title': _('Welcome'), 'news': news.News.objects.order_by('-id') ...
22.973684
72
0.641466
from course.models import news from django.shortcuts import render, render_to_response from django.utils.translation import ugettext as _ def index(request): return render( request, 'index.html', { 'title': _('Welcome'), 'news': news.News.objects.order_by('-id') ...
true
true
08f8ea381199df01089b68d097fce9325f4d2c52
370
py
Python
workshops/programacion_python_ESO/empty_display_v0.py
vicente-gonzalez-ruiz/python-tutorial
e6a79510a0b3663786d6476a40e79fc8e8726f61
[ "CC0-1.0" ]
4
2017-03-06T09:49:11.000Z
2019-10-16T00:09:38.000Z
workshops/programacion_python_ESO/empty_display_v0.py
vicente-gonzalez-ruiz/python-tutorial
e6a79510a0b3663786d6476a40e79fc8e8726f61
[ "CC0-1.0" ]
null
null
null
workshops/programacion_python_ESO/empty_display_v0.py
vicente-gonzalez-ruiz/python-tutorial
e6a79510a0b3663786d6476a40e79fc8e8726f61
[ "CC0-1.0" ]
7
2017-11-02T11:00:30.000Z
2020-01-31T22:41:27.000Z
import pygame pygame.init() screen_width = 800 screen_height = 600 screen_size = (screen_width, screen_height) screen = pygame.display.set_mode(screen_size) pygame.display.set_caption("Empty Screen") running = True while running: event = pygame.event.wait() print(event) if event.type == pygame.QUIT: ...
21.764706
45
0.72973
import pygame pygame.init() screen_width = 800 screen_height = 600 screen_size = (screen_width, screen_height) screen = pygame.display.set_mode(screen_size) pygame.display.set_caption("Empty Screen") running = True while running: event = pygame.event.wait() print(event) if event.type == pygame.QUIT: ...
true
true
08f8ea552da0f93ee3d7030c6908e113c896c369
18,478
py
Python
core/data_process.py
tutu96177/mult_regression
6c8f48f24f1a8c3cb0e8d3446c4a1f9404acdb64
[ "Apache-2.0" ]
null
null
null
core/data_process.py
tutu96177/mult_regression
6c8f48f24f1a8c3cb0e8d3446c4a1f9404acdb64
[ "Apache-2.0" ]
null
null
null
core/data_process.py
tutu96177/mult_regression
6c8f48f24f1a8c3cb0e8d3446c4a1f9404acdb64
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*-# #------------------------------------------------------------------------------- # Name: HLK-20C02(4℃) # Description: # Author: shichao # Date: 2019/7/17 #------------------------------------------------------------------------------- import os import numpy as np impor...
38.177686
149
0.66176
import os import numpy as np import pandas as pd import time import datetime pd.set_option('display.max_columns', 1000) pd.set_option('display.width', 1000) pd.set_option('display.max_colwidth', 1000) def read_df(file_name): file_dir = './raw_data/' file_path = os.path.join(file_dir, file_name) file_pa...
true
true
08f8eaf567baa1ce08d478cd57c1704c988348e0
1,898
py
Python
services/locrec/locrec-api.py
sosi-org/locationsp
f097e0e1ff1df59166fb2bab7b10984b2c58e4bd
[ "Unlicense" ]
null
null
null
services/locrec/locrec-api.py
sosi-org/locationsp
f097e0e1ff1df59166fb2bab7b10984b2c58e4bd
[ "Unlicense" ]
null
null
null
services/locrec/locrec-api.py
sosi-org/locationsp
f097e0e1ff1df59166fb2bab7b10984b2c58e4bd
[ "Unlicense" ]
null
null
null
# Location receiver #!locrec/bin/python """ Microservice/API for receiving locations: storage. """ from flask import Flask from flask import jsonify from flask import request import logging log = logging.getLogger('werkzeug') log.setLevel(logging.ERROR) import sys sys.path.insert(0,'..') #from ...services impor...
21.088889
162
0.712856
from flask import Flask from flask import jsonify from flask import request import logging log = logging.getLogger('werkzeug') log.setLevel(logging.ERROR) import sys sys.path.insert(0,'..') import rest as REST from rest import ERROR_404 from rest import make_response_jsonified API_ENDPOINT_URL = "/v1.0" CLI...
true
true
08f8ec7e814e649fde248a2ed4e3265c101a1778
2,485
py
Python
utils/deffe_slurm.py
miniskar/deffe
9d919248b954af4ded9cd69e95b770dab2941e23
[ "BSD-3-Clause" ]
2
2021-10-12T02:24:12.000Z
2022-02-21T16:01:58.000Z
utils/deffe_slurm.py
miniskar/deffe
9d919248b954af4ded9cd69e95b770dab2941e23
[ "BSD-3-Clause" ]
null
null
null
utils/deffe_slurm.py
miniskar/deffe
9d919248b954af4ded9cd69e95b770dab2941e23
[ "BSD-3-Clause" ]
null
null
null
## Copyright 2020 UT-Battelle, LLC. See LICENSE.txt for more information. ### # @author Narasinga Rao Miniskar, Frank Liu, Dwaipayan Chakraborty, Jeffrey Vetter # miniskarnr@ornl.gov # # Modification: # Baseline code # Date: Apr, 2020 # ******************************************************...
38.828125
88
0.537626
import os import pdb class DeffeSlurm: def __init__(self, framework, slurm_config=None): self.framework = framework if slurm_config != None: self.config = slurm_config else: self.config = self.framework.config.GetSlurm() self.nodes = self.config.nodes ...
true
true
08f8ed376ef1d25e7754e1a846c63b9f5b3c1a82
352,861
py
Python
tests/unit/gapic/aiplatform_v1beta1/test_metadata_service.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/aiplatform_v1beta1/test_metadata_service.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/aiplatform_v1beta1/test_metadata_service.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
38.831408
130
0.694741
import os import mock import packaging.version import grpc from grpc.experimental import aio import math import pytest from proto.marshal.rules.dates import DurationRule, TimestampRule from google.api_core import client_options from google.api_core import exceptions as core_exceptions from google.api_core import fut...
true
true
08f8edc5e2298d4a66b5d5b103d6de37b40b696d
7,017
py
Python
evalml/objectives/objective_base.py
BlockchainClimateInstitute/price_microservice
11d1cff8965fe1befc997e9da3dc09efceed4579
[ "BSD-3-Clause" ]
null
null
null
evalml/objectives/objective_base.py
BlockchainClimateInstitute/price_microservice
11d1cff8965fe1befc997e9da3dc09efceed4579
[ "BSD-3-Clause" ]
null
null
null
evalml/objectives/objective_base.py
BlockchainClimateInstitute/price_microservice
11d1cff8965fe1befc997e9da3dc09efceed4579
[ "BSD-3-Clause" ]
null
null
null
from abc import ABC, abstractmethod import numpy as np import pandas as pd import woodwork as ww from evalml.problem_types import handle_problem_types from evalml.utils import _convert_woodwork_types_wrapper, classproperty class ObjectiveBase(ABC): """Base class for all objectives.""" problem_types = None ...
42.017964
297
0.673792
from abc import ABC, abstractmethod import numpy as np import pandas as pd import woodwork as ww from evalml.problem_types import handle_problem_types from evalml.utils import _convert_woodwork_types_wrapper, classproperty class ObjectiveBase(ABC): problem_types = None @property @classmethod @abst...
true
true
08f8ee7bd14100357c555f28462e321888b0f246
208
py
Python
exe048.py
libaniaraujo/Python-Curso-em-Video
593ddbbbdf1e83101f535228fa05351f35b8817f
[ "MIT" ]
null
null
null
exe048.py
libaniaraujo/Python-Curso-em-Video
593ddbbbdf1e83101f535228fa05351f35b8817f
[ "MIT" ]
null
null
null
exe048.py
libaniaraujo/Python-Curso-em-Video
593ddbbbdf1e83101f535228fa05351f35b8817f
[ "MIT" ]
null
null
null
# Soma ímpares múltiplos de três soma = 0 cont = 0 for c in range(1, 501, 2): if c % 3 == 0: soma += c cont += 1 print('A soma de todos os {} valores solicitados é {}'.format(cont, soma))
23.111111
74
0.572115
soma = 0 cont = 0 for c in range(1, 501, 2): if c % 3 == 0: soma += c cont += 1 print('A soma de todos os {} valores solicitados é {}'.format(cont, soma))
true
true
08f8ef4e23fc622e1c99e296deb37ac752bb8207
263
py
Python
Integer/3.Reverse a number/Python/App.py
iamsomraj/Coding
536ec6e3091aa8f687cb9d2247cdcb323cfd7146
[ "MIT" ]
null
null
null
Integer/3.Reverse a number/Python/App.py
iamsomraj/Coding
536ec6e3091aa8f687cb9d2247cdcb323cfd7146
[ "MIT" ]
null
null
null
Integer/3.Reverse a number/Python/App.py
iamsomraj/Coding
536ec6e3091aa8f687cb9d2247cdcb323cfd7146
[ "MIT" ]
1
2020-02-24T17:46:57.000Z
2020-02-24T17:46:57.000Z
def reverseNumber(temp): rev = 0 while(temp!=0): rem = temp % 10 rev = rev * 10 + rem temp = temp // 10 return rev number = int(input("\nEnter the number: \n")) reverseNum = reverseNumber(number) print("The reverse number is %d"%(reverseNum))
20.230769
46
0.631179
def reverseNumber(temp): rev = 0 while(temp!=0): rem = temp % 10 rev = rev * 10 + rem temp = temp // 10 return rev number = int(input("\nEnter the number: \n")) reverseNum = reverseNumber(number) print("The reverse number is %d"%(reverseNum))
true
true
08f8efe090cc8309474dab3bded2bdee745b8cb6
29,282
py
Python
rest_framework_serializer_extensions/serializers.py
Reyvel/django-rest-framework-serializer-extensions
e2d24a74be85f230d69ba2b29d5ce8e286074247
[ "BSD-2-Clause" ]
null
null
null
rest_framework_serializer_extensions/serializers.py
Reyvel/django-rest-framework-serializer-extensions
e2d24a74be85f230d69ba2b29d5ce8e286074247
[ "BSD-2-Clause" ]
null
null
null
rest_framework_serializer_extensions/serializers.py
Reyvel/django-rest-framework-serializer-extensions
e2d24a74be85f230d69ba2b29d5ce8e286074247
[ "BSD-2-Clause" ]
null
null
null
from __future__ import absolute_import from collections import OrderedDict from pprint import pformat from django.core.exceptions import FieldDoesNotExist from django.db.models import Prefetch from django.db.models.fields.related import ForeignKey from django.db.models.query import QuerySet from django.utils import si...
34.53066
79
0.612014
from __future__ import absolute_import from collections import OrderedDict from pprint import pformat from django.core.exceptions import FieldDoesNotExist from django.db.models import Prefetch from django.db.models.fields.related import ForeignKey from django.db.models.query import QuerySet from django.utils import si...
true
true