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
f75825b9304a0a543ba934ea188b28635efe4a85
1,499
py
Python
bfxhfindicators/mass_index.py
Harsh-Sanklecha/stockanalysis
f5c6a454863ff72e0bac5e29035033cbf1bb3a06
[ "MIT" ]
29
2018-10-30T11:01:17.000Z
2021-11-27T10:51:35.000Z
bfxhfindicators/mass_index.py
Harsh-Sanklecha/stockanalysis
f5c6a454863ff72e0bac5e29035033cbf1bb3a06
[ "MIT" ]
7
2018-11-08T09:09:50.000Z
2020-11-21T09:14:41.000Z
bfxhfindicators/mass_index.py
bitfinexcom/bfx-hf-indicators-py
de707031bb6a8d23dc70be34220e9a95d4d4d861
[ "Apache-2.0" ]
18
2018-10-27T16:53:47.000Z
2021-10-17T15:47:24.000Z
from bfxhfindicators.indicator import Indicator from bfxhfindicators.ema import EMA class MassIndex(Indicator): def __init__(self, period, cache_size=None): self._smoothing = period self._singleEMA = EMA(9, cache_size) self._doubleEMA = EMA(9, cache_size) self._buffer = [] super().__init__({ ...
25.844828
68
0.625751
from bfxhfindicators.indicator import Indicator from bfxhfindicators.ema import EMA class MassIndex(Indicator): def __init__(self, period, cache_size=None): self._smoothing = period self._singleEMA = EMA(9, cache_size) self._doubleEMA = EMA(9, cache_size) self._buffer = [] super().__init__({ ...
true
true
f75826450100c6663c32b663d99d7b2b17805604
2,788
py
Python
test.py
ikding/census-parser
3b736af83fcd8000ffda8eab49567617fb37deb1
[ "0BSD" ]
1
2018-05-20T01:45:21.000Z
2018-05-20T01:45:21.000Z
test.py
ikding/census-parser
3b736af83fcd8000ffda8eab49567617fb37deb1
[ "0BSD" ]
null
null
null
test.py
ikding/census-parser
3b736af83fcd8000ffda8eab49567617fb37deb1
[ "0BSD" ]
null
null
null
#!/usr/bin/python """ Test census2text.py by pulling down data for Knox County, TN and cross checking with API results usage: test.py Assumes that census2text can be found in the current working directory. """ from os import environ import json from urllib2 import urlopen import re from sys import argv from csv impo...
32.418605
129
0.644907
""" Test census2text.py by pulling down data for Knox County, TN and cross checking with API results usage: test.py Assumes that census2text can be found in the current working directory. """ from os import environ import json from urllib2 import urlopen import re from sys import argv from csv import DictReader impo...
false
true
f7582650e8d0a44057cb836222689255ed8775cc
2,308
py
Python
primeiros_models/dense_features.py
luizapozzobon/myo_project
ce35149c444dee5a13dc7d1f1915046066ba47e2
[ "MIT" ]
1
2019-05-02T16:38:12.000Z
2019-05-02T16:38:12.000Z
primeiros_models/dense_features.py
luizapozzobon/myo_project
ce35149c444dee5a13dc7d1f1915046066ba47e2
[ "MIT" ]
null
null
null
primeiros_models/dense_features.py
luizapozzobon/myo_project
ce35149c444dee5a13dc7d1f1915046066ba47e2
[ "MIT" ]
null
null
null
from sklearn.model_selection import train_test_split import numpy as np import pandas as pd import matplotlib.pyplot as plt import tensorflow as tf def load_compilado(arquivo): path = '/home/luiza/UFSM/Myo/myo_project/datasets/oficial/' + arquivo df = pd.read_csv(path) return df df = load_compilado('featu...
29.974026
111
0.741768
from sklearn.model_selection import train_test_split import numpy as np import pandas as pd import matplotlib.pyplot as plt import tensorflow as tf def load_compilado(arquivo): path = '/home/luiza/UFSM/Myo/myo_project/datasets/oficial/' + arquivo df = pd.read_csv(path) return df df = load_compilado('featu...
true
true
f758273d3758ecb02b358bbae4f0b9bc06cbd770
3,554
py
Python
accounting/accounting/doctype/sales_invoice/test_sales_invoice.py
noahjacob/Accounting
6be90c4f82867156532ca71b1faa9d017e3269af
[ "MIT" ]
1
2021-04-05T06:22:16.000Z
2021-04-05T06:22:16.000Z
accounting/accounting/doctype/sales_invoice/test_sales_invoice.py
mohsinalimat/Accounting
6be90c4f82867156532ca71b1faa9d017e3269af
[ "MIT" ]
null
null
null
accounting/accounting/doctype/sales_invoice/test_sales_invoice.py
mohsinalimat/Accounting
6be90c4f82867156532ca71b1faa9d017e3269af
[ "MIT" ]
2
2021-04-05T06:22:17.000Z
2021-04-10T06:05:36.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2021, Noah Jacob and Contributors # See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, nowdate import unittest class TestSalesInvoice(unittest.TestCase): def test_new_sales_invoice_totals(self): si = create_sales_invoice('Noah...
25.385714
155
0.703151
from __future__ import unicode_literals import frappe from frappe.utils import flt, nowdate import unittest class TestSalesInvoice(unittest.TestCase): def test_new_sales_invoice_totals(self): si = create_sales_invoice('Noah','Nintendo Switch',1,30000,True,False) si.append('items', { "item_name":'Nintendo S...
true
true
f758283893c27936782ec080a5461b712f9a4509
882
py
Python
blog/urls.py
Jafte/jasn.ru
09d2945825c5bbfa2896c4acfc30acb6138c9ac9
[ "MIT" ]
null
null
null
blog/urls.py
Jafte/jasn.ru
09d2945825c5bbfa2896c4acfc30acb6138c9ac9
[ "MIT" ]
4
2021-06-04T21:30:01.000Z
2021-09-22T17:39:12.000Z
blog/urls.py
Jafte/jasn.ru
09d2945825c5bbfa2896c4acfc30acb6138c9ac9
[ "MIT" ]
null
null
null
from django.conf.urls import url from blog.views import BlogDetail, BlogPostDetail, BlogList, BlogUpdate, BlogCreate, BlogPostCreate, BlogPostUpdate, \ BlogPostImageCreate urlpatterns = [ url(r'^$', BlogList.as_view(), name='blog-list'), url(r'^add/$', BlogCreate.as_view(), name='blog-create'), url(r'^...
58.8
118
0.650794
from django.conf.urls import url from blog.views import BlogDetail, BlogPostDetail, BlogList, BlogUpdate, BlogCreate, BlogPostCreate, BlogPostUpdate, \ BlogPostImageCreate urlpatterns = [ url(r'^$', BlogList.as_view(), name='blog-list'), url(r'^add/$', BlogCreate.as_view(), name='blog-create'), url(r'^...
true
true
f7582d34708e51508312861c53b1a870d70ffa66
3,660
py
Python
transformers/depmap/python-flask-server/openapi_server/controllers/depmap_transformer.py
mapleknight/molecular-data-provider
111418ed7efab3c393c22116854fd322ff367fb9
[ "MIT" ]
5
2020-08-28T09:30:16.000Z
2021-12-29T16:00:26.000Z
transformers/depmap/python-flask-server/openapi_server/controllers/depmap_transformer.py
mapleknight/molecular-data-provider
111418ed7efab3c393c22116854fd322ff367fb9
[ "MIT" ]
19
2021-04-26T22:19:16.000Z
2022-03-09T21:09:55.000Z
transformers/depmap/python-flask-server/openapi_server/controllers/depmap_transformer.py
mapleknight/molecular-data-provider
111418ed7efab3c393c22116854fd322ff367fb9
[ "MIT" ]
8
2020-07-09T18:50:57.000Z
2022-01-20T16:01:33.000Z
import collections import sqlite3 from collections import defaultdict from transformers.transformer import Transformer from openapi_server.models.names import Names from openapi_server.models.attribute import Attribute from openapi_server.models.element import Element from openapi_server.models.connection import Conn...
42.068966
120
0.636339
import collections import sqlite3 from collections import defaultdict from transformers.transformer import Transformer from openapi_server.models.names import Names from openapi_server.models.attribute import Attribute from openapi_server.models.element import Element from openapi_server.models.connection import Conn...
true
true
f7582dcac663a465c6947a841857e841013d60e6
856
py
Python
spug_api/apps/apis/utils.py
showsmall/spug
9c878d37c3bd732808d43a2a3958735a9ad07cfe
[ "MIT" ]
2
2020-08-10T14:29:46.000Z
2021-05-21T09:06:20.000Z
spug_api/apps/apis/utils.py
xiaoyiios/spug
67c137da9ea1bc451bfa1c34ebfb35c4821825c2
[ "MIT" ]
null
null
null
spug_api/apps/apis/utils.py
xiaoyiios/spug
67c137da9ea1bc451bfa1c34ebfb35c4821825c2
[ "MIT" ]
1
2020-09-07T03:48:44.000Z
2020-09-07T03:48:44.000Z
from collections import defaultdict from apps.configuration.models import Environment class MapConfigValues(object): def __init__(self, values, env_id): environments = Environment.query.all() sort_environments = sorted([x for x in environments if x.id != env_id], key=lambda x: x.priority) ...
34.24
105
0.654206
from collections import defaultdict from apps.configuration.models import Environment class MapConfigValues(object): def __init__(self, values, env_id): environments = Environment.query.all() sort_environments = sorted([x for x in environments if x.id != env_id], key=lambda x: x.priority) ...
true
true
f7582dd63ad830b63f900923a3a740c745d95833
3,197
py
Python
VAE/vae.py
alexborio/Projects
a85ad4aab370b009de14e3696e06aad92ca4859f
[ "MIT" ]
null
null
null
VAE/vae.py
alexborio/Projects
a85ad4aab370b009de14e3696e06aad92ca4859f
[ "MIT" ]
null
null
null
VAE/vae.py
alexborio/Projects
a85ad4aab370b009de14e3696e06aad92ca4859f
[ "MIT" ]
null
null
null
from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import numpy as np import matplotlib.pyplot as plt encoder_layers = [] decoder_layers = [] Normal = tf.contrib.distributions.Normal Bernoulli = tf.contrib.distributions.Bernoulli class Layer(object): def __init__(self, n, m, f=tf...
24.782946
93
0.650297
from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import numpy as np import matplotlib.pyplot as plt encoder_layers = [] decoder_layers = [] Normal = tf.contrib.distributions.Normal Bernoulli = tf.contrib.distributions.Bernoulli class Layer(object): def __init__(self, n, m, f=tf...
true
true
f7583015bcdece55da2bde58328180a753742c9f
631
py
Python
backend/manage.py
crowdbotics-apps/arkde-31785
d4f4189b8c7a4f0b94763b651cbd6b5ba23304a3
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/arkde-31785
d4f4189b8c7a4f0b94763b651cbd6b5ba23304a3
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/arkde-31785
d4f4189b8c7a4f0b94763b651cbd6b5ba23304a3
[ "FTL", "AML", "RSA-MD" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "arkde_31785.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise Im...
28.681818
75
0.684628
import os import sys def main(): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "arkde_31785.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f75830beecd393eba8f152294cb9f5a7ec1f2583
1,314
py
Python
torch_geometric/transforms/one_hot_degree.py
itamblyn/pytorch_geometric
67ed16492863378b8434b03713a75924f0cc5df1
[ "MIT" ]
2
2020-08-06T16:14:15.000Z
2021-11-08T07:33:21.000Z
torch_geometric/transforms/one_hot_degree.py
ChenShengsGitHub/pytorch_geometric
86308313d6f1af56e5931e2ca89bb1a867c10ff3
[ "MIT" ]
1
2021-06-05T10:32:22.000Z
2021-06-05T10:32:22.000Z
torch_geometric/transforms/one_hot_degree.py
ChenShengsGitHub/pytorch_geometric
86308313d6f1af56e5931e2ca89bb1a867c10ff3
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F from torch_geometric.utils import degree from torch_geometric.transforms import BaseTransform class OneHotDegree(BaseTransform): r"""Adds the node degree as one hot encodings to the node features. Args: max_degree (int): Maximum degree. in_degree ...
33.692308
77
0.627093
import torch import torch.nn.functional as F from torch_geometric.utils import degree from torch_geometric.transforms import BaseTransform class OneHotDegree(BaseTransform): def __init__(self, max_degree, in_degree=False, cat=True): self.max_degree = max_degree self.in_degree = in_degree ...
true
true
f75830e863cb5c6f441abbd75d0faad66b975aa1
324
py
Python
ffmpeg_db/ffmpeg_db.py
audo-ai/ffmpeg-db
1f82aaf366950a9d5f9b086503ce1976a47456c4
[ "MIT" ]
null
null
null
ffmpeg_db/ffmpeg_db.py
audo-ai/ffmpeg-db
1f82aaf366950a9d5f9b086503ce1976a47456c4
[ "MIT" ]
null
null
null
ffmpeg_db/ffmpeg_db.py
audo-ai/ffmpeg-db
1f82aaf366950a9d5f9b086503ce1976a47456c4
[ "MIT" ]
null
null
null
import json from pkg_resources import resource_filename def load_resource(name): with open(resource_filename('ffmpeg_db', name)) as f: return json.load(f) def ext_to_codecs_json(): return load_resource('data/ext-to-codecs.json') def codec_info_json(): return load_resource('data/codec-info.jso...
19.058824
57
0.737654
import json from pkg_resources import resource_filename def load_resource(name): with open(resource_filename('ffmpeg_db', name)) as f: return json.load(f) def ext_to_codecs_json(): return load_resource('data/ext-to-codecs.json') def codec_info_json(): return load_resource('data/codec-info.jso...
true
true
f758314622fafbd4c3126bb8b4f787fee1ba65a8
1,318
py
Python
examples/python/unit-test-simple/bugzilla_test.py
AlaminMahamud/Test-Driven-Development---Notes
5acf9e15858a6af6209ead5c0f13ddb903a3277a
[ "MIT" ]
null
null
null
examples/python/unit-test-simple/bugzilla_test.py
AlaminMahamud/Test-Driven-Development---Notes
5acf9e15858a6af6209ead5c0f13ddb903a3277a
[ "MIT" ]
null
null
null
examples/python/unit-test-simple/bugzilla_test.py
AlaminMahamud/Test-Driven-Development---Notes
5acf9e15858a6af6209ead5c0f13ddb903a3277a
[ "MIT" ]
null
null
null
from .bugzilla import MyBugzilla import unittest import requests_mock from unittest import mock import requests class TestBugZilla(unittest.TestCase): def test_bug_id(self): zilla = MyBugzilla( 'tarek@mozilla.com', server='http://example.com' ) link = zilla.bug_link...
31.380952
90
0.621396
from .bugzilla import MyBugzilla import unittest import requests_mock from unittest import mock import requests class TestBugZilla(unittest.TestCase): def test_bug_id(self): zilla = MyBugzilla( 'tarek@mozilla.com', server='http://example.com' ) link = zilla.bug_link...
true
true
f75832cee606f4cd93e46fc18235c4a9a42ebba2
5,295
py
Python
src/quinductor/__init__.py
dkalpakchi/quinductor
8cb78f8130636e7f4532673fb396b4d153b6a7d3
[ "MIT" ]
null
null
null
src/quinductor/__init__.py
dkalpakchi/quinductor
8cb78f8130636e7f4532673fb396b4d153b6a7d3
[ "MIT" ]
null
null
null
src/quinductor/__init__.py
dkalpakchi/quinductor
8cb78f8130636e7f4532673fb396b4d153b6a7d3
[ "MIT" ]
null
null
null
""" Common utilities for Stanza resources. """ import os import glob import requests from pathlib import Path import json import hashlib import zipfile import shutil import dill from tqdm.auto import tqdm from .common import ( DEFAULT_TEMPLATES_DIR, QUINDUCTOR_RESOURCES_GITHUB, MODELS, get_logger, get_defaul...
34.383117
112
0.646648
import os import glob import requests from pathlib import Path import json import hashlib import zipfile import shutil import dill from tqdm.auto import tqdm from .common import ( DEFAULT_TEMPLATES_DIR, QUINDUCTOR_RESOURCES_GITHUB, MODELS, get_logger, get_default_model_path, load_pos_ngrams ) from .guards im...
true
true
f758333f786c7ad853aad380dcbda7990b36db84
70
py
Python
extensions.py
KhajaPythonMicroservices/Catalog
3e6b16698032ced829a69c8d484bcf8e52c9de8b
[ "Apache-2.0" ]
null
null
null
extensions.py
KhajaPythonMicroservices/Catalog
3e6b16698032ced829a69c8d484bcf8e52c9de8b
[ "Apache-2.0" ]
null
null
null
extensions.py
KhajaPythonMicroservices/Catalog
3e6b16698032ced829a69c8d484bcf8e52c9de8b
[ "Apache-2.0" ]
1
2022-03-09T10:44:12.000Z
2022-03-09T10:44:12.000Z
from flask_sqlalchemy import SQLAlchemy db: SQLAlchemy = SQLAlchemy()
23.333333
39
0.828571
from flask_sqlalchemy import SQLAlchemy db: SQLAlchemy = SQLAlchemy()
true
true
f75833484ec80be96b4b893f5e39b86d93445fc0
6,575
py
Python
graphsense/model/taxonomy.py
graphsense/graphsense-python
c0dafc97a04bc3dbf0caf08a981bb591bd1e430a
[ "MIT" ]
9
2020-11-26T12:26:36.000Z
2022-02-07T22:08:16.000Z
graphsense/model/taxonomy.py
graphsense/graphsense-python
c0dafc97a04bc3dbf0caf08a981bb591bd1e430a
[ "MIT" ]
14
2020-11-17T13:28:08.000Z
2022-01-24T09:21:43.000Z
graphsense/model/taxonomy.py
graphsense/graphsense-python
c0dafc97a04bc3dbf0caf08a981bb591bd1e430a
[ "MIT" ]
3
2022-02-03T09:24:27.000Z
2022-02-16T10:13:55.000Z
""" GraphSense API GraphSense API # noqa: E501 The version of the OpenAPI document: 0.5 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from graphsense.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, Mod...
37.787356
110
0.575817
import re import sys from graphsense.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) class Ta...
true
true
f7583452a80cdbdc8e4eefc58e308f48fab0ef29
74,411
py
Python
convert_smileys_python_2.py
deojosh17/Whatsapp-Xtract
03e8d5868ed080f783c5ed1c0e9bb7bf25024252
[ "MIT" ]
47
2016-05-23T17:36:22.000Z
2021-12-10T14:05:31.000Z
convert_smileys_python_2.py
kbaseio/Whatsapp-Xtract
03e8d5868ed080f783c5ed1c0e9bb7bf25024252
[ "MIT" ]
5
2015-06-16T07:57:20.000Z
2021-02-09T00:31:46.000Z
convert_smileys_python_2.py
kbaseio/Whatsapp-Xtract
03e8d5868ed080f783c5ed1c0e9bb7bf25024252
[ "MIT" ]
13
2017-05-21T13:25:23.000Z
2021-06-22T16:50:41.000Z
def convertsmileys_python2 (text): newtext = str(text) # new emojis newtext = newtext.replace(u'\U0001F0CF', '<img src="data/emoji_new/1F0CF.png" alt=""/>') newtext = newtext.replace(u'\U0001F191', '<img src="data/emoji_new/1F191.png" alt=""/>') newtext = newtext.replace(u'\U0001F193', '<img sr...
80.706074
92
0.63453
def convertsmileys_python2 (text): newtext = str(text) newtext = newtext.replace(u'\U0001F0CF', '<img src="data/emoji_new/1F0CF.png" alt=""/>') newtext = newtext.replace(u'\U0001F191', '<img src="data/emoji_new/1F191.png" alt=""/>') newtext = newtext.replace(u'\U0001F193', '<img src="data/emoji...
true
true
f758355ad052c97d8ad8db05b91b6d3c111a72fd
5,441
py
Python
flsim/optimizers/tests/test_optimizer_factories.py
JohnlNguyen/FLSim
a5ed7c0b84499cd9dbc5fe95f8bcb4ba8ab5a5cb
[ "BSD-3-Clause" ]
79
2021-12-09T18:05:09.000Z
2022-03-23T20:43:46.000Z
flsim/optimizers/tests/test_optimizer_factories.py
JohnlNguyen/FLSim
a5ed7c0b84499cd9dbc5fe95f8bcb4ba8ab5a5cb
[ "BSD-3-Clause" ]
11
2021-12-30T17:54:04.000Z
2022-03-23T17:23:00.000Z
flsim/optimizers/tests/test_optimizer_factories.py
JohnlNguyen/FLSim
a5ed7c0b84499cd9dbc5fe95f8bcb4ba8ab5a5cb
[ "BSD-3-Clause" ]
9
2021-12-09T19:55:22.000Z
2022-03-15T00:02:08.000Z
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import pytest from flsim.common.pytest_helper import assertEqual, assertTrue from flsim....
40.007353
88
0.651718
import pytest from flsim.common.pytest_helper import assertEqual, assertTrue from flsim.optimizers.async_aggregators import ( AsyncAggregatorConfig, FedAdamAsyncAggregatorConfig, FedAvgWithLRAsyncAggregatorConfig, HybridAggregatorConfig, FedAdamHybridAggregatorConfig, FedAvgWithLRHybridAggregat...
true
true
f75835679a143d21f97223c08a039ea1ec9f57a5
524
py
Python
setup.py
elbow-jason/Uno
4ad07d7b84e5b6e3e2b2c89db69448906f24b4e4
[ "MIT" ]
null
null
null
setup.py
elbow-jason/Uno
4ad07d7b84e5b6e3e2b2c89db69448906f24b4e4
[ "MIT" ]
3
2015-11-09T19:25:22.000Z
2016-06-07T15:02:03.000Z
setup.py
elbow-jason/Uno
4ad07d7b84e5b6e3e2b2c89db69448906f24b4e4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup long_description = """ Extremely fast and easy feature based HTML generator. """ project = 'uno' setup( name=project, version='0.3.3', description=long_description, author='Jason Goldberger', author_email='jason@datamelon.io', url='https:/...
19.407407
53
0.624046
from setuptools import setup long_description = """ Extremely fast and easy feature based HTML generator. """ project = 'uno' setup( name=project, version='0.3.3', description=long_description, author='Jason Goldberger', author_email='jason@datamelon.io', url='https://github.com/jlgoldb2/Uno...
true
true
f75835bcab76179996c049644ca8bb9cf32ec97b
13,340
py
Python
tensorflow_probability/python/distributions/inverse_gamma.py
bhgedigital/probability
df70fe68491f839df438628fa79cb3378888039e
[ "Apache-2.0" ]
4
2019-03-07T05:15:13.000Z
2019-06-13T20:35:45.000Z
tensorflow_probability/python/distributions/inverse_gamma.py
datasailors/probability
df70fe68491f839df438628fa79cb3378888039e
[ "Apache-2.0" ]
1
2019-02-28T21:28:01.000Z
2019-02-28T21:28:01.000Z
tensorflow_probability/python/distributions/inverse_gamma.py
datasailors/probability
df70fe68491f839df438628fa79cb3378888039e
[ "Apache-2.0" ]
1
2019-09-18T15:17:53.000Z
2019-09-18T15:17:53.000Z
# Copyright 2018 The TensorFlow Probability 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 applicable law o...
36.547945
92
0.677961
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from tensorflow_probability.python.distributions import distribution from tensorflow_probability.python.internal import distribution_util from tensorflow_probability...
true
true
f75836f2e16db67aba57e7cec1e066c06a78865f
1,571
py
Python
rooms/E11_R1.py
stfbnc/TrovaEscapeBackEnd
ca32523c14f44e65ddac475f44ed0467eb8c3552
[ "MIT" ]
1
2020-12-09T21:01:07.000Z
2020-12-09T21:01:07.000Z
rooms/E11_R1.py
stfbnc/TrovaEscapeBackEnd
ca32523c14f44e65ddac475f44ed0467eb8c3552
[ "MIT" ]
null
null
null
rooms/E11_R1.py
stfbnc/TrovaEscapeBackEnd
ca32523c14f44e65ddac475f44ed0467eb8c3552
[ "MIT" ]
null
null
null
import Room import Constants as c from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.expected_conditions import presence_of_element_located from selenium.webdriver.firefox.options import Options class E11_R...
34.152174
118
0.65818
import Room import Constants as c from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.expected_conditions import presence_of_element_located from selenium.webdriver.firefox.options import Options class E11_R...
true
true
f7583a089b5d2d57f0a5a543485bb54a604c5147
2,747
py
Python
src/plot.py
brynhayder/metapop
2a5f25a904cba7133c398c9ce7fff6ad7a5d8705
[ "MIT" ]
null
null
null
src/plot.py
brynhayder/metapop
2a5f25a904cba7133c398c9ce7fff6ad7a5d8705
[ "MIT" ]
null
null
null
src/plot.py
brynhayder/metapop
2a5f25a904cba7133c398c9ce7fff6ad7a5d8705
[ "MIT" ]
null
null
null
from argparse import ArgumentParser import os import matplotlib.pyplot as plt import pandas as pd filenames = "susceptible.csv exposed.csv infected.csv recovered.csv".split() def title(ax, region): return ax.set_title(region, x=0.95, y=0.9, ha="right", va="top") def legend(fig, ax): lins, labs = ax.get_l...
30.865169
88
0.577721
from argparse import ArgumentParser import os import matplotlib.pyplot as plt import pandas as pd filenames = "susceptible.csv exposed.csv infected.csv recovered.csv".split() def title(ax, region): return ax.set_title(region, x=0.95, y=0.9, ha="right", va="top") def legend(fig, ax): lins, labs = ax.get_l...
true
true
f7583a5e781e59536644f685bfba554486f83923
738
py
Python
Chapter 03/butifulSoapExamples.py
Prakshal2607/Effective-Python-Penetration-Testing
f49fedc172a1add45edb21f66f74746dfa9c944a
[ "MIT" ]
346
2016-06-21T11:39:39.000Z
2022-01-26T03:19:29.000Z
Chapter 03/butifulSoapExamples.py
liceaga/Effective-Python-Penetration-Testing
0b043885231662efd63402eec3c9cb413b9693e2
[ "MIT" ]
1
2016-06-21T11:44:42.000Z
2016-11-17T05:10:08.000Z
Chapter 03/butifulSoapExamples.py
liceaga/Effective-Python-Penetration-Testing
0b043885231662efd63402eec3c9cb413b9693e2
[ "MIT" ]
210
2016-06-22T12:08:47.000Z
2022-03-16T15:54:30.000Z
from bs4 import BeautifulSoup import re parse = BeautifulSoup('<html><head><title>Title of the page</title></head><body><p id="para1" align="center">This is a paragraph<b>one</b><a href="http://example1.com">Example Link 1</a> </p><p id="para2">This is a paragraph<b>two</b><a href="http://example.2com">Example Link 2<...
20.5
302
0.596206
from bs4 import BeautifulSoup import re parse = BeautifulSoup('<html><head><title>Title of the page</title></head><body><p id="para1" align="center">This is a paragraph<b>one</b><a href="http://example1.com">Example Link 1</a> </p><p id="para2">This is a paragraph<b>two</b><a href="http://example.2com">Example Link 2<...
false
true
f7583a6da1ba5e83eaab50f4119829365135e081
1,105
py
Python
source/app/processing/engine/validate_finn_code.py
seemir/stressa
7c3b178cf13f74ee010dbd44ce99188de3862ef7
[ "MIT" ]
null
null
null
source/app/processing/engine/validate_finn_code.py
seemir/stressa
7c3b178cf13f74ee010dbd44ce99188de3862ef7
[ "MIT" ]
337
2019-09-27T12:26:14.000Z
2022-03-31T04:13:04.000Z
source/app/processing/engine/validate_finn_code.py
seemir/stressa
7c3b178cf13f74ee010dbd44ce99188de3862ef7
[ "MIT" ]
1
2019-11-08T13:40:30.000Z
2019-11-08T13:40:30.000Z
# -*- coding: utf-8 -*- """ Validate Finn code validator """ __author__ = 'Samir Adrik' __email__ = 'samir.adrik@gmail.com' from source.util import Assertor, Tracking from .operation import Operation from ...scrapers import Finn class ValidateFinnCode(Operation): """ Operation for validating a Finn code ...
21.25
92
0.567421
__author__ = 'Samir Adrik' __email__ = 'samir.adrik@gmail.com' from source.util import Assertor, Tracking from .operation import Operation from ...scrapers import Finn class ValidateFinnCode(Operation): @Tracking def __init__(self, finn_code: str): self.name = self.__class__.__name__ Asser...
true
true
f7583b24831d79bebf36a237cba7b80b44561529
3,000
py
Python
strategies/tests/test_strategyType.py
pchaos/wanggeService
839f7c6c52a685fcdc4b6a70cf8e9d6c8cc78255
[ "MIT" ]
11
2018-05-15T18:02:31.000Z
2020-05-07T03:57:33.000Z
strategies/tests/test_strategyType.py
pchaos/wanggeService
839f7c6c52a685fcdc4b6a70cf8e9d6c8cc78255
[ "MIT" ]
1
2018-05-16T11:27:32.000Z
2018-07-07T10:56:58.000Z
strategies/tests/test_strategyType.py
pchaos/wanggeService
839f7c6c52a685fcdc4b6a70cf8e9d6c8cc78255
[ "MIT" ]
13
2018-05-15T18:02:27.000Z
2022-03-23T06:18:29.000Z
# -*- coding: utf-8 -*- """ ------------------------------------------------- @File : test_strategyType.py Description : @Author : pchaos date: 18-5-2 ------------------------------------------------- Change Activity: 18-5-2: @Contact : p19992003#gmail.com -------...
45.454545
215
0.612667
from django.test import TestCase from strategies.models import StrategyType __author__ = 'pchaos' class TestStrategyType(TestCase): def test_baseStrategyType(self): oldcount = StrategyType.objects.all().count() code = 'test01' name = 'testStrategyType name 01' remark = 'test rema...
true
true
f7583bd21c6fc0c6b654b698dfe2f9f40a7b4227
188
py
Python
katas/kyu_8/the_if_function.py
the-zebulan/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
40
2016-03-09T12:26:20.000Z
2022-03-23T08:44:51.000Z
katas/kyu_8/the_if_function.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
null
null
null
katas/kyu_8/the_if_function.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
36
2016-11-07T19:59:58.000Z
2022-03-31T11:18:27.000Z
def _if(bool, func, func2): func() if bool else func2() def truthy(): print('True') def falsey(): print('False') _if(True, truthy, falsey) # prints 'True' to the console
14.461538
57
0.617021
def _if(bool, func, func2): func() if bool else func2() def truthy(): print('True') def falsey(): print('False') _if(True, truthy, falsey)
true
true
f7583c571ef1441289679d07d575677b6cf56de3
9,564
py
Python
libraries/botbuilder-ai/botbuilder/ai/qna/qnamaker.py
Fl4v/botbuilder-python
4003d713beb8fb986a01cfd11632eabc65858618
[ "MIT" ]
388
2019-05-07T15:53:21.000Z
2022-03-28T20:29:46.000Z
libraries/botbuilder-ai/botbuilder/ai/qna/qnamaker.py
Fl4v/botbuilder-python
4003d713beb8fb986a01cfd11632eabc65858618
[ "MIT" ]
1,286
2019-05-07T23:38:19.000Z
2022-03-31T10:44:16.000Z
libraries/botbuilder-ai/botbuilder/ai/qna/qnamaker.py
Fl4v/botbuilder-python
4003d713beb8fb986a01cfd11632eabc65858618
[ "MIT" ]
168
2019-05-14T20:23:25.000Z
2022-03-16T06:49:14.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import json from typing import Dict, List, NamedTuple, Union from aiohttp import ClientSession, ClientTimeout from botbuilder.schema import Activity from botbuilder.core import BotTelemetryClient, NullTelemetryClient...
36.643678
114
0.645546
import json from typing import Dict, List, NamedTuple, Union from aiohttp import ClientSession, ClientTimeout from botbuilder.schema import Activity from botbuilder.core import BotTelemetryClient, NullTelemetryClient, TurnContext from .models import FeedbackRecord, QueryResult, QueryResults from .utils impo...
true
true
f7583c9314b2909566c73fa6897fe9d3b81c3384
8,398
py
Python
leo/plugins/livecode.py
gamtiq/leo-editor
3f51986fea4c16ed0713699b088bc8a8abd738c3
[ "MIT" ]
1
2020-11-07T23:22:12.000Z
2020-11-07T23:22:12.000Z
leo/plugins/livecode.py
gamtiq/leo-editor
3f51986fea4c16ed0713699b088bc8a8abd738c3
[ "MIT" ]
null
null
null
leo/plugins/livecode.py
gamtiq/leo-editor
3f51986fea4c16ed0713699b088bc8a8abd738c3
[ "MIT" ]
null
null
null
#@+leo-ver=5-thin #@+node:tbrown.20140806084727.30174: * @file ../plugins/livecode.py """ Show results of code in another pane as it's edited. livecode-show opens the livecode pane on c.p. Thereafter, pressing return in that body pane re-evaluates the code. The livecode pane shows the results of each line. """ # By...
34.846473
77
0.569659
import leo.core.leoGlobals as g from leo.core.leoQt import QtWidgets import ast from collections import namedtuple try: from meta import asttools except ImportError: asttools = None warning_given = False def init(): global warning_given if g.unitTesting: return False if not asttools: ...
true
true
f7583c93b9288d5cc2c657d2da78dfae2dbfebb7
10,140
py
Python
pandas/tests/io/generate_legacy_storage_files.py
dequadras/pandas
8a7fbbeb8e3a88f8e355093eb1b68f361e65b6aa
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/io/generate_legacy_storage_files.py
dequadras/pandas
8a7fbbeb8e3a88f8e355093eb1b68f361e65b6aa
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/io/generate_legacy_storage_files.py
dequadras/pandas
8a7fbbeb8e3a88f8e355093eb1b68f361e65b6aa
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 """ self-contained to write legacy storage pickle files To use this script. Create an environment where you want generate pickles, say its for 0.20.3, with your pandas clone in ~/pandas . activate pandas_0.20.3 cd ~/ $ python pandas/pandas/tests/io/generate_legacy_storage_files.py \ panda...
28.166667
87
0.566765
from datetime import timedelta from distutils.version import LooseVersion import os import pickle import platform as pl import sys import numpy as np import pandas from pandas import ( Categorical, DataFrame, Index, MultiIndex, NaT, Period, RangeIndex, Series, Timestamp, bdat...
true
true
f7583cc08441e2dee8f0f07db5cb2c7b8f06c13d
1,775
py
Python
myapp/views.py
free20064u/flower
fa8dd4b522ede930baf8cd4e533c869ebf9cf009
[ "MIT" ]
null
null
null
myapp/views.py
free20064u/flower
fa8dd4b522ede930baf8cd4e533c869ebf9cf009
[ "MIT" ]
null
null
null
myapp/views.py
free20064u/flower
fa8dd4b522ede930baf8cd4e533c869ebf9cf009
[ "MIT" ]
null
null
null
from django.http.response import HttpResponseRedirect from .forms import MyForm from django.shortcuts import get_object_or_404, render from .models import Flower # Create your views here. def index(request): q = request.GET.get("q" , None) if q is None or q == '': flowers = Flower.objects.all() e...
23.666667
59
0.609014
from django.http.response import HttpResponseRedirect from .forms import MyForm from django.shortcuts import get_object_or_404, render from .models import Flower def index(request): q = request.GET.get("q" , None) if q is None or q == '': flowers = Flower.objects.all() else: flowers = Flo...
true
true
f7583d24b76d4172a735df22a8593c1a04c0e69d
97,511
py
Python
lib/googlecloudsdk/third_party/apis/container/v1/container_v1_client.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/third_party/apis/container/v1/container_v1_client.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/third_party/apis/container/v1/container_v1_client.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
1
2020-07-24T20:13:29.000Z
2020-07-24T20:13:29.000Z
"""Generated client library for container version v1.""" # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.py import base_api from googlecloudsdk.third_party.apis.container.v1 import container_v1_messages as messages class ContainerV1(base_api.BaseApiClient): """Generated clien...
41.529387
162
0.699983
from apitools.base.py import base_api from googlecloudsdk.third_party.apis.container.v1 import container_v1_messages as messages class ContainerV1(base_api.BaseApiClient): MESSAGES_MODULE = messages BASE_URL = u'https://container.googleapis.com/' _PACKAGE = u'container' _SCOPES = [u'https://www.googleapis.c...
true
true
f7583dd942600278f04742baafdc8f5ae25e0747
956
py
Python
example/example.py
joongh/configbuilder
37362fad27c921695fc746b9f1766ee280bc9002
[ "MIT" ]
null
null
null
example/example.py
joongh/configbuilder
37362fad27c921695fc746b9f1766ee280bc9002
[ "MIT" ]
8
2016-04-19T01:25:28.000Z
2021-03-25T21:27:18.000Z
example/example.py
joongh/configbuilder
37362fad27c921695fc746b9f1766ee280bc9002
[ "MIT" ]
null
null
null
#!/usr/bin/env python #-*- coding: utf-8 -*- from configbuilder.validator import Validator from configbuilder.parser import create_parser import pprint class MyValidator(Validator): def validate_protocol(self, value): """ Add validator method for type "Protocol" "Protocol" is a sub type of string. ...
34.142857
67
0.655858
from configbuilder.validator import Validator from configbuilder.parser import create_parser import pprint class MyValidator(Validator): def validate_protocol(self, value): """ Add validator method for type "Protocol" "Protocol" is a sub type of string. """ supporting_protocol = ['s...
false
true
f7583f3c89da3d4e9ea5d5c4fffa4b29559b7e57
4,814
py
Python
py/desispec/scripts/humidity_corrected_fiberflat.py
echaussidon/desispec
8a8bd59653861509dd630ffc8e1cd6c67f6cdd51
[ "BSD-3-Clause" ]
null
null
null
py/desispec/scripts/humidity_corrected_fiberflat.py
echaussidon/desispec
8a8bd59653861509dd630ffc8e1cd6c67f6cdd51
[ "BSD-3-Clause" ]
null
null
null
py/desispec/scripts/humidity_corrected_fiberflat.py
echaussidon/desispec
8a8bd59653861509dd630ffc8e1cd6c67f6cdd51
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, division import os import fitsio import argparse import numpy as np from desiutil.log import get_logger from desispec.io import read_fiberflat,write_fiberflat,findfile,read_frame from desispec.io.fiberflat_vs_humidity import get_humidity,read_fiberflat_vs_humidity from desisp...
42.60177
162
0.706689
from __future__ import absolute_import, division import os import fitsio import argparse import numpy as np from desiutil.log import get_logger from desispec.io import read_fiberflat,write_fiberflat,findfile,read_frame from desispec.io.fiberflat_vs_humidity import get_humidity,read_fiberflat_vs_humidity from desisp...
true
true
f7583fb701918f9c6e7a5e121889947b3be0dd37
2,457
py
Python
aliyun-python-sdk-pvtz/setup.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-pvtz/setup.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-pvtz/setup.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
#!/usr/bin/python ''' 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"...
31.5
69
0.667074
from setuptools import setup, find_packages import os import sys PACKAGE = "aliyunsdkpvtz" NAME = "aliyun-python-sdk-pvtz" DESCRIPTION = "The pvtz module of Aliyun Python sdk." AUTHOR = "Aliyun" AUTHOR_EMAIL = "aliyun-developers-efficiency@list.alibaba-inc.com" URL = "http://develop.aliyun.com/sdk/python" TOPDIR = ...
true
true
f7583fc4c9097b64056f608e2672e22f661db942
501
py
Python
classes/phsyics.py
hey-waffles/dungeon-crawler
ca410b3c9200eed3ac060a3cdbdd3773cfca5889
[ "MIT" ]
null
null
null
classes/phsyics.py
hey-waffles/dungeon-crawler
ca410b3c9200eed3ac060a3cdbdd3773cfca5889
[ "MIT" ]
3
2018-11-18T15:36:47.000Z
2019-04-21T03:30:38.000Z
classes/phsyics.py
hey-waffles/dungeon-crawler
ca410b3c9200eed3ac060a3cdbdd3773cfca5889
[ "MIT" ]
null
null
null
def getVelocity(speed, vector): """ Converts a speed and vector into a velocity array [x, y, z] X is horizontal movement, Y is vertical movement, and Z is movement in/out of screen arg speed - the speed scalar arg vector - the direction in radians that the object is moving in Returns an array with the x, y, z...
38.538462
85
0.718563
def getVelocity(speed, vector): # In the future, add functionality for two angles return [math.cos(vector) * speed, math.sin(vector) * speed, 0]
true
true
f758409ca3b168b5ac51eca59e77dc234241290c
2,538
py
Python
funcmeasure/funcmeasure.py
kkristof200/py_funcmeasure
0cf910e7759466df60bcd6fa411051d36088f97d
[ "MIT" ]
null
null
null
funcmeasure/funcmeasure.py
kkristof200/py_funcmeasure
0cf910e7759466df60bcd6fa411051d36088f97d
[ "MIT" ]
null
null
null
funcmeasure/funcmeasure.py
kkristof200/py_funcmeasure
0cf910e7759466df60bcd6fa411051d36088f97d
[ "MIT" ]
null
null
null
# --------------------------------------------------------------- Imports ---------------------------------------------------------------- # # System from typing import List, Callable, Union, Tuple, Dict, Optional # Local from ._utils import FunctionMeasurer, Renderer from .models import FunctionStats, TableFormat #...
39.65625
184
0.50985
from typing import List, Callable, Union, Tuple, Dict, Optional from ._utils import FunctionMeasurer, Renderer from .models import FunctionStats, TableFormat def measure( funcs: Union[List[Union[Callable, Tuple[Callable, str]]], Dict[Callable, Optional[str]]], times: int = 1000, print_benchmark: bool...
true
true
f75841daa753f5286d83b38d623784021e0d1c2a
231
py
Python
hiddeneye_reborn/hiddeneye_reborn.py
Mr-Anonymous002/HiddenEyeReborn
3a7542d9fd68bd193897f702930c208dceed0994
[ "Unlicense" ]
2
2021-06-24T17:14:11.000Z
2022-01-26T13:44:21.000Z
hiddeneye_reborn/hiddeneye_reborn.py
Mr-Anonymous002/HiddenEyeReborn
3a7542d9fd68bd193897f702930c208dceed0994
[ "Unlicense" ]
1
2021-12-13T20:55:32.000Z
2021-12-13T20:55:32.000Z
hiddeneye_reborn/hiddeneye_reborn.py
Mr-Anonymous002/HiddenEyeReborn
3a7542d9fd68bd193897f702930c208dceed0994
[ "Unlicense" ]
1
2021-06-24T17:14:16.000Z
2021-06-24T17:14:16.000Z
def main(): print("Success, you can access this via terminal!") print("Hey, if you can - contact that lazy developer and make him code! Would be glad if you contribute, as well...") if __name__ == "__main__": main()
25.666667
121
0.666667
def main(): print("Success, you can access this via terminal!") print("Hey, if you can - contact that lazy developer and make him code! Would be glad if you contribute, as well...") if __name__ == "__main__": main()
true
true
f7584364fa4db48ae168dd840e39d935cba8338f
1,787
py
Python
negative-affect/pain_regression.py
bjsmith/reversallearning
023304731d41c3109bacbfd49d4c850a92353978
[ "Apache-2.0" ]
null
null
null
negative-affect/pain_regression.py
bjsmith/reversallearning
023304731d41c3109bacbfd49d4c850a92353978
[ "Apache-2.0" ]
null
null
null
negative-affect/pain_regression.py
bjsmith/reversallearning
023304731d41c3109bacbfd49d4c850a92353978
[ "Apache-2.0" ]
2
2017-08-15T22:00:15.000Z
2019-05-11T22:40:20.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Aug 19 17:53:46 2017 @author: benjaminsmith """ #do the regression in the #we need a design matrix #with linear, square, cubic time point regressors #plus intercept #plus whatever Design_Matrix files we want to put in. onsets_convolved.head() onsets...
26.279412
84
0.711248
onsets_convolved.head() onsets_convolved['linearterm']=range(1,361) onsets_convolved['quadraticterm']=[pow(x,2) for x in onsets_convolved['linearterm']] onsets_convolved['cubicterm']=[pow(x,3) for x in onsets_convolved['linearterm']] onsets_convolved['ones']=[1]*360 c.head() onsets_convolved.heatmap() onsets_convo...
true
true
f758437e33f3e38aaadde6205d21e4585761a216
2,724
py
Python
InputPipeline/AlignedDataset.py
Wenyuan-Vincent-Li/SSL_Seg_GAN
8f6c45fd000ea12468dccf211b376fadbf4759c6
[ "Apache-2.0" ]
1
2022-03-09T11:51:22.000Z
2022-03-09T11:51:22.000Z
InputPipeline/AlignedDataset.py
Wenyuan-Vincent-Li/SSL_Seg_GAN
8f6c45fd000ea12468dccf211b376fadbf4759c6
[ "Apache-2.0" ]
null
null
null
InputPipeline/AlignedDataset.py
Wenyuan-Vincent-Li/SSL_Seg_GAN
8f6c45fd000ea12468dccf211b376fadbf4759c6
[ "Apache-2.0" ]
null
null
null
import os.path from InputPipeline.base_dataset import BaseDataset, get_params, get_transform, get_downscale_transform from InputPipeline.image_folder import make_dataset from PIL import Image import torchvision.transforms as transforms from Training.imresize import imresize_single class AlignedDataset(BaseDataset): ...
38.914286
120
0.638032
import os.path from InputPipeline.base_dataset import BaseDataset, get_params, get_transform, get_downscale_transform from InputPipeline.image_folder import make_dataset from PIL import Image import torchvision.transforms as transforms from Training.imresize import imresize_single class AlignedDataset(BaseDataset): ...
true
true
f75843f527605b2b86b9ce3419f95852942e5038
3,935
py
Python
scvi/model/_scvi.py
morris-frank/scvi-tools
b828c75455bdd9e9558882d0b110ed97ba135184
[ "BSD-3-Clause" ]
1
2019-05-21T04:57:35.000Z
2019-05-21T04:57:35.000Z
scvi/model/_scvi.py
morris-frank/scvi-tools
b828c75455bdd9e9558882d0b110ed97ba135184
[ "BSD-3-Clause" ]
null
null
null
scvi/model/_scvi.py
morris-frank/scvi-tools
b828c75455bdd9e9558882d0b110ed97ba135184
[ "BSD-3-Clause" ]
1
2020-01-17T13:34:51.000Z
2020-01-17T13:34:51.000Z
import logging from anndata import AnnData from scvi._compat import Literal from scvi.model.base import UnsupervisedTrainingMixin from scvi.module import VAE from .base import ArchesMixin, BaseModelClass, RNASeqMixin, VAEMixin logger = logging.getLogger(__name__) class SCVI( RNASeqMixin, VAEMixin, ArchesMixin...
33.347458
110
0.622618
import logging from anndata import AnnData from scvi._compat import Literal from scvi.model.base import UnsupervisedTrainingMixin from scvi.module import VAE from .base import ArchesMixin, BaseModelClass, RNASeqMixin, VAEMixin logger = logging.getLogger(__name__) class SCVI( RNASeqMixin, VAEMixin, ArchesMixin...
true
true
f758456d77fa915c2fee922ac139a2dd4efb71c8
5,642
py
Python
Assignment 2/Second Part/russian_classifier.py
egryaznov/nlpmovies
4f2c5ffbcff12f279dc2622471e1b19175607f67
[ "MIT" ]
null
null
null
Assignment 2/Second Part/russian_classifier.py
egryaznov/nlpmovies
4f2c5ffbcff12f279dc2622471e1b19175607f67
[ "MIT" ]
null
null
null
Assignment 2/Second Part/russian_classifier.py
egryaznov/nlpmovies
4f2c5ffbcff12f279dc2622471e1b19175607f67
[ "MIT" ]
null
null
null
# IMDB Movie Review Sentiment Classification # Second Assignment Solution # NLP Course, Innopolis University, Spring 2017 # Author: Evgeny Gryaznov import numpy import ru_otzyv as ru import matplotlib.pyplot as plt from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM from ke...
37.613333
101
0.697093
import numpy import ru_otzyv as ru import matplotlib.pyplot as plt from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM from keras.layers.embeddings import Embedding from keras.preprocessing import sequence def compile_model(topn=20000, max_review_length=300, embedding_vec...
true
true
f758457ada034f543c09876f2a8c925a58b2723d
22,318
py
Python
tests/integration/ci-runner.py
evryfs/ClickHouse
a9648af0b9e2506ce783106315814ed8dbd0a952
[ "Apache-2.0" ]
null
null
null
tests/integration/ci-runner.py
evryfs/ClickHouse
a9648af0b9e2506ce783106315814ed8dbd0a952
[ "Apache-2.0" ]
null
null
null
tests/integration/ci-runner.py
evryfs/ClickHouse
a9648af0b9e2506ce783106315814ed8dbd0a952
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import logging import subprocess import os import time import shutil from collections import defaultdict import random import json import csv MAX_RETRY = 2 SLEEP_BETWEEN_RETRIES = 5 CLICKHOUSE_BINARY_PATH = "/usr/bin/clickhouse" CLICKHOUSE_ODBC_BRIDGE_BINARY_PATH = "/usr/bin/clickhouse-odbc-br...
42.510476
176
0.602608
import logging import subprocess import os import time import shutil from collections import defaultdict import random import json import csv MAX_RETRY = 2 SLEEP_BETWEEN_RETRIES = 5 CLICKHOUSE_BINARY_PATH = "/usr/bin/clickhouse" CLICKHOUSE_ODBC_BRIDGE_BINARY_PATH = "/usr/bin/clickhouse-odbc-bridge" TRIES_COUNT = 10...
true
true
f75846725ca7593ba2f2a50621f67a566b73f02a
13,108
py
Python
main/huts/HutDescription.py
wodore/mtn-huts
c52b26ee6a367b8552bf12b62e5303006ca1e873
[ "MIT" ]
null
null
null
main/huts/HutDescription.py
wodore/mtn-huts
c52b26ee6a367b8552bf12b62e5303006ca1e873
[ "MIT" ]
null
null
null
main/huts/HutDescription.py
wodore/mtn-huts
c52b26ee6a367b8552bf12b62e5303006ca1e873
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Sep 13 07:10:14 2020 @author: tobias """ # import requests # import time import datetime import locale from flask_babel import _ # import threading # from concurrent.futures import Future # try: # from .GPSConverter import GPSConverter # except ImportError: # for local t...
32.526055
887
0.550504
import datetime import locale from flask_babel import _ STYLE = """ <style> .hut-info a:link, .hut-info a:visited { text-decoration: none; color: #31708f; } .hut-info a:hover { text-decoration: underline; color: #31708f; } #hut-icon-title { width: 30px; } .img-text { vertica...
true
true
f7584971ab0c21c1fa32e7b97b0f81d198afecc2
18,433
py
Python
formencode/schema.py
pgajdos/formencode
fe29722f3398fd0b1df7d7db4278a0b2d5f8fda3
[ "MIT" ]
63
2015-02-14T11:49:59.000Z
2022-02-02T22:15:16.000Z
formencode/schema.py
pgajdos/formencode
fe29722f3398fd0b1df7d7db4278a0b2d5f8fda3
[ "MIT" ]
102
2015-01-08T18:01:46.000Z
2022-01-25T01:20:09.000Z
formencode/schema.py
pgajdos/formencode
fe29722f3398fd0b1df7d7db4278a0b2d5f8fda3
[ "MIT" ]
44
2015-01-11T13:22:57.000Z
2021-12-02T08:54:17.000Z
from __future__ import absolute_import import warnings from .api import _, is_validator, FancyValidator, Invalid, NoDefault from . import declarative from .exc import FERuntimeWarning import six from six.moves import map from six.moves import zip __all__ = ['Schema'] class Schema(FancyValidator): """ A sch...
36.792415
79
0.565942
from __future__ import absolute_import import warnings from .api import _, is_validator, FancyValidator, Invalid, NoDefault from . import declarative from .exc import FERuntimeWarning import six from six.moves import map from six.moves import zip __all__ = ['Schema'] class Schema(FancyValidator): pre_vali...
true
true
f75849a4d756f9f38bad81fb5022bd95fbec0096
12,595
py
Python
1-lxastro0/code_local/utils/create_dataset.py
remtav/SpaceNet7_Multi-Temporal_Solutions
ee535c61fc22bffa45331519239c6d1b044b1514
[ "Apache-2.0" ]
null
null
null
1-lxastro0/code_local/utils/create_dataset.py
remtav/SpaceNet7_Multi-Temporal_Solutions
ee535c61fc22bffa45331519239c6d1b044b1514
[ "Apache-2.0" ]
null
null
null
1-lxastro0/code_local/utils/create_dataset.py
remtav/SpaceNet7_Multi-Temporal_Solutions
ee535c61fc22bffa45331519239c6d1b044b1514
[ "Apache-2.0" ]
null
null
null
import collections import logging import os import warnings from pathlib import Path from typing import List, Union import h5py from torch.utils.data import Dataset import numpy as np import models.coordconv from utils.utils import get_key_def, ordereddict_eval, compare_config_yamls from utils.geoutils import get_key...
49.782609
176
0.634458
import collections import logging import os import warnings from pathlib import Path from typing import List, Union import h5py from torch.utils.data import Dataset import numpy as np import models.coordconv from utils.utils import get_key_def, ordereddict_eval, compare_config_yamls from utils.geoutils import get_key...
true
true
f75849d7bcd3f303c88b6e46349b086eafb378a8
5,263
py
Python
configs/yolact/yolact_r50_1x8_coco.py
hmtrii/mmdetection
a998e0ac45118482b4a1fa320c2f0611f35fb0d1
[ "Apache-2.0" ]
null
null
null
configs/yolact/yolact_r50_1x8_coco.py
hmtrii/mmdetection
a998e0ac45118482b4a1fa320c2f0611f35fb0d1
[ "Apache-2.0" ]
null
null
null
configs/yolact/yolact_r50_1x8_coco.py
hmtrii/mmdetection
a998e0ac45118482b4a1fa320c2f0611f35fb0d1
[ "Apache-2.0" ]
null
null
null
_base_ = '../_base_/default_runtime.py' # model settings img_size = 550 model = dict( type='YOLACT', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=-1, # do not freeze stem norm_cfg=dict(type='BN', requi...
32.689441
80
0.566407
_base_ = '../_base_/default_runtime.py' img_size = 550 model = dict( type='YOLACT', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=-1, norm_cfg=dict(type='BN', requires_grad=True), norm_eval=False...
true
true
f7584a7fd7602205edac40036cdc87da3b088b26
6,860
py
Python
tests/test_requests_api.py
Morloth1274/EVE-Online-POCO-manager
f35e6ac49c4451a16011a8c15115c5229b3ce887
[ "MIT" ]
1
2017-05-06T22:58:13.000Z
2017-05-06T22:58:13.000Z
tests/test_requests_api.py
Morloth1274/EVE-Online-POCO-manager
f35e6ac49c4451a16011a8c15115c5229b3ce887
[ "MIT" ]
null
null
null
tests/test_requests_api.py
Morloth1274/EVE-Online-POCO-manager
f35e6ac49c4451a16011a8c15115c5229b3ce887
[ "MIT" ]
null
null
null
import mock from xml.etree import ElementTree from tests.compat import unittest from evelink.thirdparty.six.moves.urllib.parse import parse_qs import evelink.api as evelink_api # Python 2.6's ElementTree raises xml.parsers.expat.ExpatError instead # of ElementTree.ParseError _xml_error = getattr(ElementTree, 'ParseE...
36.88172
105
0.625802
import mock from xml.etree import ElementTree from tests.compat import unittest from evelink.thirdparty.six.moves.urllib.parse import parse_qs import evelink.api as evelink_api # of ElementTree.ParseError _xml_error = getattr(ElementTree, 'ParseError', None) if _xml_error is None: import xml.parsers.expat _x...
true
true
f7584b6177457bcab0bb36bcf72d754b6319fecc
20
py
Python
simple_playgrounds/playgrounds/collection/rl/__init__.py
Asjidkalam/simple-playgrounds
72ec42987a33175103191fa9722e0e002f889954
[ "MIT" ]
32
2015-09-16T08:43:17.000Z
2021-03-16T13:37:11.000Z
simple_playgrounds/playgrounds/collection/rl/__init__.py
Asjidkalam/simple-playgrounds
72ec42987a33175103191fa9722e0e002f889954
[ "MIT" ]
8
2015-08-30T18:34:21.000Z
2017-12-04T10:06:06.000Z
simple_playgrounds/playgrounds/collection/rl/__init__.py
Asjidkalam/simple-playgrounds
72ec42987a33175103191fa9722e0e002f889954
[ "MIT" ]
21
2015-08-27T03:01:50.000Z
2020-04-13T03:07:22.000Z
from .basic import *
20
20
0.75
from .basic import *
true
true
f7584bc1f9e815782db85c982d7f553715c306be
2,482
py
Python
angel-ps/python/pyangel/find_angel_home.py
weien8899/angel
829ce1a02e147d1f93b6375c2d07208ea31e53a2
[ "Apache-2.0", "BSD-3-Clause" ]
1
2017-11-24T07:40:30.000Z
2017-11-24T07:40:30.000Z
angel-ps/python/pyangel/find_angel_home.py
weien8899/angel
829ce1a02e147d1f93b6375c2d07208ea31e53a2
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
angel-ps/python/pyangel/find_angel_home.py
weien8899/angel
829ce1a02e147d1f93b6375c2d07208ea31e53a2
[ "Apache-2.0", "BSD-3-Clause" ]
1
2018-09-28T00:31:04.000Z
2018-09-28T00:31:04.000Z
# # Tencent is pleased to support the open source community by making Angel available. # # Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of ...
36.5
102
0.654311
from __future__ import print_function import os import sys def _find_angel_home(): if "ANGEL_HOME" in os.environ: return os.environ["ANGEL_HOME"] def is_angel_home(path): return (os.path.isfile(os.path.join(path, "bin/angel-submit")) and (os.path.isdir(os.path.join(path, ...
true
true
f7584bf8b7690e366cf53d850ec7fca1e154d458
5,206
py
Python
hivemind/compression/quantization.py
artek0chumak/hivemind
762f116ffcd6c194b888ed64c8a82033cc97dce7
[ "MIT" ]
6
2020-03-11T17:52:24.000Z
2020-03-23T07:27:12.000Z
hivemind/compression/quantization.py
artek0chumak/hivemind
762f116ffcd6c194b888ed64c8a82033cc97dce7
[ "MIT" ]
14
2020-03-01T21:07:05.000Z
2020-03-28T17:54:50.000Z
hivemind/compression/quantization.py
learning-at-home/tesseract
c6b2b2d84ccfc890314a2bfece8eef238372d410
[ "MIT" ]
null
null
null
import math import os from abc import ABC, abstractmethod from concurrent.futures import ThreadPoolExecutor from typing import Tuple import numpy as np import torch from hivemind.compression.base import CompressionBase, CompressionInfo from hivemind.proto import runtime_pb2 EXECUTOR = ThreadPoolExecutor(max_workers=...
45.269565
119
0.716673
import math import os from abc import ABC, abstractmethod from concurrent.futures import ThreadPoolExecutor from typing import Tuple import numpy as np import torch from hivemind.compression.base import CompressionBase, CompressionInfo from hivemind.proto import runtime_pb2 EXECUTOR = ThreadPoolExecutor(max_workers=...
true
true
f7584c3a5f1fddb2f0f2a430e5e0087e4d39125e
4,550
py
Python
train.py
PangYunsheng8/CGIPool
2cf22019bad510804021f768c6a0d76bf79b62f6
[ "MIT" ]
1
2022-01-28T02:57:38.000Z
2022-01-28T02:57:38.000Z
train.py
LiuChuang0059/CGIPool
2cf22019bad510804021f768c6a0d76bf79b62f6
[ "MIT" ]
null
null
null
train.py
LiuChuang0059/CGIPool
2cf22019bad510804021f768c6a0d76bf79b62f6
[ "MIT" ]
5
2021-06-14T04:42:39.000Z
2021-12-21T03:39:19.000Z
import os import torch import torch.nn.functional as F import csv import glob import argparse from datasets.dataloader import build_loader parser = argparse.ArgumentParser(description="Graph Pooling") parser.add_argument('--model', type=str, default="SAGNet", help='model name') parser.add_argument('--see...
35.546875
127
0.601538
import os import torch import torch.nn.functional as F import csv import glob import argparse from datasets.dataloader import build_loader parser = argparse.ArgumentParser(description="Graph Pooling") parser.add_argument('--model', type=str, default="SAGNet", help='model name') parser.add_argument('--see...
true
true
f7584c69a79ef45a48253f8fffd7a1444d27e499
10,703
py
Python
assembly/sspace.py
wyim-pgl/jcvi
f79ead2fb30a80ead4e3b9602e0bc4a256995864
[ "BSD-2-Clause" ]
2
2019-02-22T12:56:39.000Z
2020-03-02T03:51:45.000Z
assembly/sspace.py
wyim-pgl/jcvi
f79ead2fb30a80ead4e3b9602e0bc4a256995864
[ "BSD-2-Clause" ]
null
null
null
assembly/sspace.py
wyim-pgl/jcvi
f79ead2fb30a80ead4e3b9602e0bc4a256995864
[ "BSD-2-Clause" ]
1
2019-09-07T02:57:58.000Z
2019-09-07T02:57:58.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ SSPACE scaffolding-related operations. """ import os.path as op import sys import logging from copy import deepcopy from jcvi.formats.fasta import gaps from jcvi.formats.sizes import Sizes from jcvi.formats.base import BaseFile, read_block, write_file from jcvi.form...
28.69437
79
0.571989
import os.path as op import sys import logging from copy import deepcopy from jcvi.formats.fasta import gaps from jcvi.formats.sizes import Sizes from jcvi.formats.base import BaseFile, read_block, write_file from jcvi.formats.agp import AGP, AGPLine, reindex, tidy from jcvi.utils.iter import pairwise from jcvi.alg...
true
true
f7584c7159a6a97b4bacf6169fa0927792f31e06
3,509
py
Python
python/taichi/examples/simulation/mpm3d.py
rwilliams251/taichi
442710331be55baf5af17f9667db650c19cbb0b2
[ "MIT" ]
1
2022-01-04T03:47:15.000Z
2022-01-04T03:47:15.000Z
python/taichi/examples/simulation/mpm3d.py
rwilliams251/taichi
442710331be55baf5af17f9667db650c19cbb0b2
[ "MIT" ]
1
2022-01-27T09:15:00.000Z
2022-01-27T09:15:00.000Z
python/taichi/examples/simulation/mpm3d.py
rwilliams251/taichi
442710331be55baf5af17f9667db650c19cbb0b2
[ "MIT" ]
null
null
null
export_file = '' # use '/tmp/mpm3d.ply' for exporting result to disk import numpy as np import taichi as ti ti.init(arch=ti.gpu) #dim, n_grid, steps, dt = 2, 128, 20, 2e-4 #dim, n_grid, steps, dt = 2, 256, 32, 1e-4 dim, n_grid, steps, dt = 3, 32, 25, 4e-4 #dim, n_grid, steps, dt = 3, 64, 25, 2e-4 #dim, n_grid, ste...
29.487395
77
0.517241
export_file = '' import numpy as np import taichi as ti ti.init(arch=ti.gpu) dim, n_grid, steps, dt = 3, 32, 25, 4e-4 n_particles = n_grid**dim // 2**(dim - 1) dx = 1 / n_grid p_rho = 1 p_vol = (dx * 0.5)**2 p_mass = p_vol * p_rho gravity = 9.8 bound = 3 E = 400 x = ti.Vector.field(dim, float, n_particles) v = ...
true
true
f7584cd887ec0a229f4618ded7a9c9540e4ceb3c
467
py
Python
web_server/web_server/tests/test_model_user.py
vidyakanekal/project-vending-machine
44412fb573963bb595d403489c871d6674e15ea5
[ "MIT" ]
null
null
null
web_server/web_server/tests/test_model_user.py
vidyakanekal/project-vending-machine
44412fb573963bb595d403489c871d6674e15ea5
[ "MIT" ]
1
2019-01-30T00:55:53.000Z
2019-01-30T01:23:28.000Z
web_server/web_server/tests/test_model_user.py
vidyakanekal/project-vending-machine
44412fb573963bb595d403489c871d6674e15ea5
[ "MIT" ]
null
null
null
from django.test import TestCase from web_server.models import User class UserTest(TestCase): def create_user(self, github_username='Al Gore'): return User.objects.create(github_username=github_username) def test_user_creation(self): o1 = self.create_user() o2 = self.create_user(githu...
31.133333
67
0.72591
from django.test import TestCase from web_server.models import User class UserTest(TestCase): def create_user(self, github_username='Al Gore'): return User.objects.create(github_username=github_username) def test_user_creation(self): o1 = self.create_user() o2 = self.create_user(githu...
true
true
f7584d1d7c3f290c18fe05c7e40f93e32022f6bb
939
py
Python
checkov/kubernetes/checks/ContainerSecurityContext.py
cclauss/checkov
60a385fcaff1499cf00c2d0018575fe5ab71f556
[ "Apache-2.0" ]
1
2020-07-26T17:56:20.000Z
2020-07-26T17:56:20.000Z
checkov/kubernetes/checks/ContainerSecurityContext.py
cclauss/checkov
60a385fcaff1499cf00c2d0018575fe5ab71f556
[ "Apache-2.0" ]
1
2021-06-02T03:40:50.000Z
2021-06-02T03:40:50.000Z
checkov/kubernetes/checks/ContainerSecurityContext.py
cclauss/checkov
60a385fcaff1499cf00c2d0018575fe5ab71f556
[ "Apache-2.0" ]
1
2021-11-28T09:51:01.000Z
2021-11-28T09:51:01.000Z
from checkov.common.models.enums import CheckCategories, CheckResult from checkov.kubernetes.base_spec_check import BaseK8Check class ContainerSecurityContext(BaseK8Check): def __init__(self): # CIS-1.5 5.7.3 name = "Apply security context to your pods and containers" # Security context ...
33.535714
100
0.689031
from checkov.common.models.enums import CheckCategories, CheckResult from checkov.kubernetes.base_spec_check import BaseK8Check class ContainerSecurityContext(BaseK8Check): def __init__(self): name = "Apply security context to your pods and containers" id = "CKV_K8S_30" ...
true
true
f7584d5e770b59d30e4124f7691fae5be6c012ed
2,436
py
Python
graphchain/utils.py
gield/graphchain
fd8b02b3fc9b6ac925df3a5ff3e62e8ef40922ea
[ "MIT" ]
51
2018-10-25T08:59:51.000Z
2022-03-09T05:05:27.000Z
graphchain/utils.py
gield/graphchain
fd8b02b3fc9b6ac925df3a5ff3e62e8ef40922ea
[ "MIT" ]
22
2019-04-29T04:39:35.000Z
2022-03-28T05:25:59.000Z
graphchain/utils.py
gield/graphchain
fd8b02b3fc9b6ac925df3a5ff3e62e8ef40922ea
[ "MIT" ]
11
2018-10-20T16:07:33.000Z
2022-01-04T09:37:43.000Z
"""Utility functions used by graphchain.""" import string import sys from typing import Any, Optional, Set def _fast_get_size(obj: Any) -> int: if hasattr(obj, '__len__') and len(obj) <= 0: return 0 if hasattr(obj, 'sample') and hasattr(obj, 'memory_usage'): # DF, Series. n = min(len(obj), 10...
28.658824
78
0.583333
import string import sys from typing import Any, Optional, Set def _fast_get_size(obj: Any) -> int: if hasattr(obj, '__len__') and len(obj) <= 0: return 0 if hasattr(obj, 'sample') and hasattr(obj, 'memory_usage'): n = min(len(obj), 1000) s = obj.sample(n=n).memory_usage(index=True, d...
true
true
f7584d6ef0d1055fd8b02a3ad3fdd7190572afa4
10,580
py
Python
baconian/core/agent.py
cap-ntu/baconian-project
e84508da60877e387344133a11039edaac35c5bf
[ "MIT" ]
69
2020-01-31T17:44:43.000Z
2022-03-28T13:09:11.000Z
baconian/core/agent.py
yitongx/baconian-project
e84508da60877e387344133a11039edaac35c5bf
[ "MIT" ]
5
2019-04-28T07:24:26.000Z
2020-01-29T01:49:51.000Z
baconian/core/agent.py
yitongx/baconian-project
e84508da60877e387344133a11039edaac35c5bf
[ "MIT" ]
6
2019-05-04T02:18:11.000Z
2019-12-04T22:05:52.000Z
from baconian.core.core import Basic, Env, EnvSpec from baconian.envs.env_wrapper import Wrapper, ObservationWrapper, StepObservationWrapper from baconian.common.sampler.sampler import Sampler from baconian.common.error import * from baconian.algo.algo import Algo from typeguard import typechecked from baconian.algo.mi...
46
119
0.622023
from baconian.core.core import Basic, Env, EnvSpec from baconian.envs.env_wrapper import Wrapper, ObservationWrapper, StepObservationWrapper from baconian.common.sampler.sampler import Sampler from baconian.common.error import * from baconian.algo.algo import Algo from typeguard import typechecked from baconian.algo.mi...
true
true
f7584e17b5bbc4d25feff69f125fbd44865e8745
13,874
py
Python
Examples/DataManipulation/Python/BuildUGrid.py
Lin1225/vtk_v5.10.0
b54ac74f4716572862365fbff28cd0ecb8d08c3d
[ "BSD-3-Clause" ]
83
2015-01-05T14:50:50.000Z
2021-09-17T19:45:26.000Z
Examples/DataManipulation/Python/BuildUGrid.py
Armand0s/homemade_vtk
6bc7b595a4a7f86e8fa969d067360450fa4e0a6a
[ "BSD-3-Clause" ]
254
2015-01-02T20:39:19.000Z
2018-11-28T17:16:44.000Z
Examples/DataManipulation/Python/BuildUGrid.py
Armand0s/homemade_vtk
6bc7b595a4a7f86e8fa969d067360450fa4e0a6a
[ "BSD-3-Clause" ]
40
2015-04-17T16:46:36.000Z
2021-09-28T22:43:24.000Z
#!/usr/bin/env python # This example shows how to manually construct unstructured grids # using Python. Unstructured grids require explicit point and cell # representations, so every point and cell must be created, and then # added to the vtkUnstructuredGrid instance. import vtk # Create several unstructured grids ...
35.850129
75
0.787877
import vtk voxelPoints = vtk.vtkPoints() voxelPoints.SetNumberOfPoints(8) voxelPoints.InsertPoint(0, 0, 0, 0) voxelPoints.InsertPoint(1, 1, 0, 0) voxelPoints.InsertPoint(2, 0, 1, 0) voxelPoints.InsertPoint(3, 1, 1, 0) voxelPoints.InsertPoint(4, 0, 0, 1) voxelPoints.InsertPoint(5, 1, 0, 1) voxelPoints.InsertPoint(6, ...
true
true
f7584e510705e78ec24105bf7fd393a8584dfc78
8,870
py
Python
ICLR_2022/Flight_delay/PIVEN/PIVEN_flight_delay.py
streeve/PI3NN
f7f08a195096e0388bb9230bc67c6acd6f41581a
[ "Apache-2.0" ]
11
2021-11-08T20:38:50.000Z
2022-01-30T02:46:39.000Z
ICLR_2022/Flight_delay/PIVEN/PIVEN_flight_delay.py
streeve/PI3NN
f7f08a195096e0388bb9230bc67c6acd6f41581a
[ "Apache-2.0" ]
1
2022-01-13T19:46:32.000Z
2022-02-09T16:23:56.000Z
ICLR_2022/Flight_delay/PIVEN/PIVEN_flight_delay.py
streeve/PI3NN
f7f08a195096e0388bb9230bc67c6acd6f41581a
[ "Apache-2.0" ]
1
2021-12-17T18:38:26.000Z
2021-12-17T18:38:26.000Z
# -*- coding: utf-8 -*- """ Run method, and save results. Run as: python main.py --dataset <ds> --method <met> where dataset name should be in UCI_Datasets folder and method is piven, qd, deep-ens, mid or only-rmse. """ import argparse import json import datetime import tensorflow as tf # import tensorflow....
35.48
154
0.641375
import argparse import json import datetime import tensorflow as tf import scipy.stats as stats import itertools import os import random import numpy as np import data_loader from DataGen import DataGenerator from DeepNetPI import TfNetwork from utils import * from sklearn.model_selection import train_test_split st...
true
true
f7584f7dd84e5a7a13ad8bd159aaa286fe0194d4
2,291
py
Python
flexget/ui/plugins/archive/archive.py
tvcsantos/Flexget
e08ce2957dd4f0668911d1e56347369939e4d0a5
[ "MIT" ]
null
null
null
flexget/ui/plugins/archive/archive.py
tvcsantos/Flexget
e08ce2957dd4f0668911d1e56347369939e4d0a5
[ "MIT" ]
1
2018-06-09T18:03:35.000Z
2018-06-09T18:03:35.000Z
flexget/ui/plugins/archive/archive.py
tvcsantos/Flexget
e08ce2957dd4f0668911d1e56347369939e4d0a5
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import import logging from flexget.ui.webui import db_session, app from flask import request, render_template, flash, Blueprint from flexget.plugin import DependencyError try: from flexget.plugins.generic.archive import ArchiveEntry, search except ImportE...
33.691176
106
0.665212
from __future__ import unicode_literals, division, absolute_import import logging from flexget.ui.webui import db_session, app from flask import request, render_template, flash, Blueprint from flexget.plugin import DependencyError try: from flexget.plugins.generic.archive import ArchiveEntry, search except ImportE...
true
true
f7584f951380967145b47e882cd060d7364b0d87
17,666
py
Python
glacier/concurrent.py
Rome84/AWS
32f5b6a83e37e62b0e33658bdab03ea493c905cb
[ "MIT" ]
null
null
null
glacier/concurrent.py
Rome84/AWS
32f5b6a83e37e62b0e33658bdab03ea493c905cb
[ "MIT" ]
null
null
null
glacier/concurrent.py
Rome84/AWS
32f5b6a83e37e62b0e33658bdab03ea493c905cb
[ "MIT" ]
null
null
null
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the ri...
41.469484
92
0.603928
import os import math import threading import hashlib import time import logging from boto.compat import Queue import binascii from boto.glacier.utils import DEFAULT_PART_SIZE, minimum_part_size, \ chunk_hashes, tree_hash, bytes_to_hex from boto.glacier.exceptions import Uploa...
true
true
f75850ea5142321fb87bc26eda108faf0e561b35
24,929
py
Python
src/chatbots/util/text_util.py
leolani/cltl-chatbots
45a2300c87853911b53f19e53ab7c8a4705ba2e6
[ "Apache-2.0" ]
null
null
null
src/chatbots/util/text_util.py
leolani/cltl-chatbots
45a2300c87853911b53f19e53ab7c8a4705ba2e6
[ "Apache-2.0" ]
14
2021-11-02T08:33:53.000Z
2022-03-30T16:00:01.000Z
src/chatbots/util/text_util.py
leolani/cltl-chatbots
45a2300c87853911b53f19e53ab7c8a4705ba2e6
[ "Apache-2.0" ]
1
2021-12-11T11:54:29.000Z
2021-12-11T11:54:29.000Z
#### Example of an annotation function that adds annotations to a Signal #### It adds NERC annotations to the TextSignal and returns a list of entities detected from typing import Text import requests import uuid import jsonpickle import time from emissor.representation.annotation import AnnotationType, Token, NER fro...
31.595691
153
0.496249
from typing import Text import requests import uuid import jsonpickle import time from emissor.representation.annotation import AnnotationType, Token, NER from emissor.representation.container import Index from emissor.representation.scenario import TextSignal, Mention, Annotation from emissor.representation.entity im...
true
true
f7585161d9aa0514e9efc6cd05e6daecc37d4846
1,506
py
Python
scripts/write_Crosswalk_BLS_QCEW.py
cchiq/flowsa
fc21e8da7c3ba66ca4ae4a0c72f568af7ef5e6c0
[ "CC0-1.0" ]
null
null
null
scripts/write_Crosswalk_BLS_QCEW.py
cchiq/flowsa
fc21e8da7c3ba66ca4ae4a0c72f568af7ef5e6c0
[ "CC0-1.0" ]
null
null
null
scripts/write_Crosswalk_BLS_QCEW.py
cchiq/flowsa
fc21e8da7c3ba66ca4ae4a0c72f568af7ef5e6c0
[ "CC0-1.0" ]
null
null
null
# write_Crosswalk_BLS_QCEW.py (scripts) # !/usr/bin/env python3 # coding=utf-8 # ingwersen.wesley@epa.gov """ Create a crosswalk for BLS QCEW to NAICS 2012. Downloaded data is already provided in NAICS """ import pandas as pd from flowsa.common import datapath, fbaoutputpath def unique_activity_names(datasource, year...
34.227273
102
0.665339
import pandas as pd from flowsa.common import datapath, fbaoutputpath def unique_activity_names(datasource, years): df = [] for y in years: df = pd.read_parquet(fbaoutputpath + datasource + "_" + str(y) + ".parquet", engine="pyarrow") df.append(df) df = df[['SourceName', 'ActivityProducedB...
true
true
f75851ecb573e8b0a6d39f6419b6d9de524d03ba
10,432
py
Python
src/adb_long_duration_recorder_old.py
louiscklaw/adb_long_duration_recorder
9bb43833de9255e6e3e5dd7302d2184b0c05897a
[ "MIT" ]
null
null
null
src/adb_long_duration_recorder_old.py
louiscklaw/adb_long_duration_recorder
9bb43833de9255e6e3e5dd7302d2184b0c05897a
[ "MIT" ]
null
null
null
src/adb_long_duration_recorder_old.py
louiscklaw/adb_long_duration_recorder
9bb43833de9255e6e3e5dd7302d2184b0c05897a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding:utf-8 #! /usr/env python3 # -*- coding: utf-8 -*- """Example Google style docstrings. This module demonstrates documentation as specified by the `Google Python Style Guide`_. Docstrings may extend over multiple lines. Sections are created with a section header and a colon followed by a...
30.592375
169
0.664206
import os import sys import logging import traceback import subprocess import shlex import math import logging import time from pprint import pprint import os.path as op from adb import adb_commands from adb import sign_m2crypto def get_host_command_output(command): result = subprocess.check_output(shlex.sp...
true
true
f758520505eac1e5a43b7818a1de184e682857df
32,553
py
Python
sklearn/impute/_base.py
talahajeer/scikit-learn
d66b42708a5912039740cd08f747229433e579b5
[ "BSD-3-Clause" ]
2
2021-08-24T21:08:38.000Z
2021-09-11T02:27:04.000Z
sklearn/impute/_base.py
talahajeer/scikit-learn
d66b42708a5912039740cd08f747229433e579b5
[ "BSD-3-Clause" ]
26
2019-11-11T18:17:02.000Z
2020-05-14T02:57:37.000Z
sklearn/impute/_base.py
talahajeer/scikit-learn
d66b42708a5912039740cd08f747229433e579b5
[ "BSD-3-Clause" ]
9
2019-11-22T17:07:16.000Z
2020-03-30T06:11:33.000Z
# Authors: Nicolas Tresegnie <nicolas.tresegnie@gmail.com> # Sergey Feldman <sergeyfeldman@gmail.com> # License: BSD 3 clause import numbers import warnings from collections import Counter import numpy as np import numpy.ma as ma from scipy import sparse as sp from scipy import stats from ..base import Base...
35.772527
88
0.58179
import numbers import warnings from collections import Counter import numpy as np import numpy.ma as ma from scipy import sparse as sp from scipy import stats from ..base import BaseEstimator, TransformerMixin from ..utils.sparsefuncs import _get_median from ..utils.validation import check_is_fitted from ..utils.val...
true
true
f75853102a76118bd47a798f7b0e0ec15ac0c439
11,856
py
Python
applications/pytorch/miniDALL-E/train.py
payoto/graphcore_examples
46d2b7687b829778369fc6328170a7b14761e5c6
[ "MIT" ]
260
2019-11-18T01:50:00.000Z
2022-03-28T23:08:53.000Z
applications/pytorch/miniDALL-E/train.py
payoto/graphcore_examples
46d2b7687b829778369fc6328170a7b14761e5c6
[ "MIT" ]
27
2020-01-28T23:07:50.000Z
2022-02-14T15:37:06.000Z
applications/pytorch/miniDALL-E/train.py
payoto/graphcore_examples
46d2b7687b829778369fc6328170a7b14761e5c6
[ "MIT" ]
56
2019-11-18T02:13:12.000Z
2022-02-28T14:36:09.000Z
# Copyright (c) 2021 Graphcore Ltd. All rights reserved. # Copyright (c) 2021 lucidrains # This file has been modified by Graphcore import argparse from pathlib import Path import datetime import time from glob import glob import os import shutil from log import Logger import torch import poptorch import popart impo...
34.768328
144
0.641363
import argparse from pathlib import Path import datetime import time from glob import glob import os import shutil from log import Logger import torch import poptorch import popart import wandb from poptorch.optim import Adam, AdamW from torch.optim.lr_scheduler import ReduceLROnPlateau from models.dalle import de...
true
true
f758534c7768e14f87e2c79bd6c56cff40958c2e
1,726
py
Python
setup.py
ben-hudson/tsplib95
c9edc6bf905ff33e38c0f475e855b3d866d72dcd
[ "Apache-2.0" ]
45
2018-10-06T18:45:11.000Z
2022-03-24T08:42:45.000Z
setup.py
ben-hudson/tsplib95
c9edc6bf905ff33e38c0f475e855b3d866d72dcd
[ "Apache-2.0" ]
17
2018-10-02T05:37:55.000Z
2021-11-15T17:47:41.000Z
setup.py
ben-hudson/tsplib95
c9edc6bf905ff33e38c0f475e855b3d866d72dcd
[ "Apache-2.0" ]
11
2018-10-01T11:51:46.000Z
2021-07-28T06:36:10.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'Click>=6.0', 'Deprecated~=1...
27.83871
61
0.632097
from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'Click>=6.0', 'Deprecated~=1.2.9', 'networkx~=2.1', 'tabulate~=0.8.7', ] setup_requiremen...
true
true
f758534ead4a148a333ca4102bec7180fee8258d
1,347
py
Python
tf_throttle/build/catkin_generated/generate_cached_setup.py
xplorer-robot/xplorer
51e43613017455331864a166b1bb830819e823a0
[ "MIT" ]
null
null
null
tf_throttle/build/catkin_generated/generate_cached_setup.py
xplorer-robot/xplorer
51e43613017455331864a166b1bb830819e823a0
[ "MIT" ]
null
null
null
tf_throttle/build/catkin_generated/generate_cached_setup.py
xplorer-robot/xplorer
51e43613017455331864a166b1bb830819e823a0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function import argparse import os import stat import sys # find the import for catkin's python package - either from source space or from an installed underlay if os.path.exists(os.path.join('/opt/ros/kinetic/share/catkin/cmake', 'catkinConfig.cmake.in')): sys....
43.451613
102
0.740906
from __future__ import print_function import argparse import os import stat import sys if os.path.exists(os.path.join('/opt/ros/kinetic/share/catkin/cmake', 'catkinConfig.cmake.in')): sys.path.insert(0, os.path.join('/opt/ros/kinetic/share/catkin/cmake', '..', 'python')) try: from catkin.environment_cache impo...
true
true
f7585366496998ea108d1e61c84fc39874cdaf25
211
py
Python
kobra_kombat_game/kobra_game/snack.py
Codigos-de-Guerra/KobraKombat
01178bbb91002793972fce35ecbfdf4906a83038
[ "MIT" ]
null
null
null
kobra_kombat_game/kobra_game/snack.py
Codigos-de-Guerra/KobraKombat
01178bbb91002793972fce35ecbfdf4906a83038
[ "MIT" ]
1
2019-11-27T15:24:16.000Z
2019-12-06T04:39:26.000Z
kobra_kombat_game/kobra_game/snack.py
Codigos-de-Guerra/KobraKombat
01178bbb91002793972fce35ecbfdf4906a83038
[ "MIT" ]
null
null
null
import pygame from .cube import Cube # hehe to usando herença class Snack(Cube):# {{{ def __init__(self, pos):# {{{ self.pos = pos Cube.__init__(self,self.pos,(0,255,0), (0, 0))# }}} # }}}
19.181818
59
0.57346
import pygame from .cube import Cube class Snack(Cube): def __init__(self, pos): self.pos = pos Cube.__init__(self,self.pos,(0,255,0), (0, 0))
true
true
f75854839b5773e9e3c664fa15e5fd71bcce1f8e
3,862
py
Python
other_codes/perfProf.py
deno750/VRP_Optimization
653c950b59acb3a1cd96d1e96bb334c90655eaa2
[ "MIT" ]
2
2021-03-06T13:33:46.000Z
2021-09-25T00:15:49.000Z
other_codes/perfProf.py
deno750/VRP_Optimization
653c950b59acb3a1cd96d1e96bb334c90655eaa2
[ "MIT" ]
null
null
null
other_codes/perfProf.py
deno750/VRP_Optimization
653c950b59acb3a1cd96d1e96bb334c90655eaa2
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 from __future__ import print_function import numpy as np import matplotlib #matplotlib.use('PDF') import matplotlib.pyplot as plt import sys from optparse import OptionParser # parameters defLW = 1.2 # default line width defMS = 7 # default marker size dashes = ['-', # solid line '--', # ...
31.145161
119
0.666235
from __future__ import print_function import numpy as np import matplotlib import matplotlib.pyplot as plt import sys from optparse import OptionParser defLW = 1.2 defMS = 7 dashes = ['-', '--', '-.', ':', '-', '--'] markers = ['+', 'x', 's', '^', 'o', 'd'] colors = ['r', 'b', 'y', 'g', 'm', 'c'] class...
true
true
f7585620c0df3e32c3cef8a51fdd7422e37ec2c9
4,007
py
Python
doc/source/conf.py
pyansys/dev-guide
c7b68ab0346215f0677baa9946cfaabf49526230
[ "MIT" ]
14
2021-10-20T13:09:14.000Z
2022-02-28T10:07:32.000Z
doc/source/conf.py
pyansys/dev-guide
c7b68ab0346215f0677baa9946cfaabf49526230
[ "MIT" ]
36
2021-10-19T06:08:04.000Z
2022-03-31T13:32:50.000Z
doc/source/conf.py
pyansys/dev-guide
c7b68ab0346215f0677baa9946cfaabf49526230
[ "MIT" ]
2
2021-11-11T18:43:22.000Z
2022-03-16T18:29:31.000Z
"""Sphinx documentation configuration file for the pyansys developer's guide.""" from datetime import datetime from ansys_sphinx_theme import ( __version__, ansys_logo_white, ansys_logo_white_cropped, pyansys_logo_black, watermark, ) from ansys_sphinx_theme.latex import generate_preamble # Project...
30.823077
92
0.687547
from datetime import datetime from ansys_sphinx_theme import ( __version__, ansys_logo_white, ansys_logo_white_cropped, pyansys_logo_black, watermark, ) from ansys_sphinx_theme.latex import generate_preamble project = "PyAnsys Developer's Guide" copyright = f"(c) {datetime.now().year} ANSYS, Inc. ...
true
true
f758564d8084b220aa31d3a65fc2bb951eb6a90c
3,637
py
Python
tests/functional/models/test_slate_model.py
Pocket/recommendation-api
f13fc101054b102b0467b3c0ff31f3e091b2818f
[ "Apache-2.0" ]
14
2021-03-03T15:43:39.000Z
2022-03-27T02:45:50.000Z
tests/functional/models/test_slate_model.py
Pocket/recommendation-api
f13fc101054b102b0467b3c0ff31f3e091b2818f
[ "Apache-2.0" ]
325
2021-03-03T22:07:45.000Z
2022-03-31T16:07:35.000Z
tests/functional/models/test_slate_model.py
Pocket/recommendation-api
f13fc101054b102b0467b3c0ff31f3e091b2818f
[ "Apache-2.0" ]
2
2021-07-25T16:41:32.000Z
2021-08-06T13:15:28.000Z
from unittest.mock import patch from tests.functional.test_dynamodb_base import TestDynamoDBBase from app.models.slate_config import SlateConfigModel from app.models.slate_experiment import SlateExperimentModel from app.models.slate import SlateModel slate_config_id = 'test-slate_lineup-config-id' slate_experiment =...
37.885417
118
0.59857
from unittest.mock import patch from tests.functional.test_dynamodb_base import TestDynamoDBBase from app.models.slate_config import SlateConfigModel from app.models.slate_experiment import SlateExperimentModel from app.models.slate import SlateModel slate_config_id = 'test-slate_lineup-config-id' slate_experiment =...
true
true
f7585830afdbad55248cb31272466579e42ffc24
13,400
py
Python
isi_sdk_9_0_0/isi_sdk_9_0_0/models/network_groupnet_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_9_0_0/isi_sdk_9_0_0/models/network_groupnet_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_9_0_0/isi_sdk_9_0_0/models/network_groupnet_extended.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 10 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_9_0_0.models.networ...
34.358974
227
0.626418
import pprint import re import six from isi_sdk_9_0_0.models.network_groupnet import NetworkGroupnet class NetworkGroupnetExtended(object): swagger_types = { 'allow_wildcard_subdomains': 'bool', 'description': 'str', 'dns_cache_enabled': 'bool', 'dns_options': 'list[str]', ...
true
true
f7585970b2213a2785366acbce6a1d8633865539
284
py
Python
Tuplas, Listas, Dicio/ex77.py
viniTWL/Python-Projects
1c4d2417efd896623263287b1d2391f7c551674c
[ "MIT" ]
1
2021-10-17T13:00:19.000Z
2021-10-17T13:00:19.000Z
Tuplas, Listas, Dicio/ex77.py
viniTWL/Python-Projects
1c4d2417efd896623263287b1d2391f7c551674c
[ "MIT" ]
null
null
null
Tuplas, Listas, Dicio/ex77.py
viniTWL/Python-Projects
1c4d2417efd896623263287b1d2391f7c551674c
[ "MIT" ]
null
null
null
print('=== IDENTIFICANDO VOGAIS =====') words = ('Computador', 'Programaçao', 'Cadeira', 'Mousepad', 'Fone') vogais = ('a', 'e', 'i', 'o', 'u') for c in words: print(f'\nNa palavra {c} temos', end=' ') for v in c: if v.lower() in 'aeiou': print(v, end='')
31.555556
68
0.517606
print('=== IDENTIFICANDO VOGAIS =====') words = ('Computador', 'Programaçao', 'Cadeira', 'Mousepad', 'Fone') vogais = ('a', 'e', 'i', 'o', 'u') for c in words: print(f'\nNa palavra {c} temos', end=' ') for v in c: if v.lower() in 'aeiou': print(v, end='')
true
true
f7585982c307e0e4e4385d5612d1ae2e428469c9
294
py
Python
corporatebonds/pipelines.py
casbeebc/corporate-bonds
27e4a2806f0889c35e2b5587528e9a676d26144a
[ "MIT" ]
1
2022-02-03T06:07:24.000Z
2022-02-03T06:07:24.000Z
corporatebonds/pipelines.py
casbeebc/corporate-bonds
27e4a2806f0889c35e2b5587528e9a676d26144a
[ "MIT" ]
null
null
null
corporatebonds/pipelines.py
casbeebc/corporate-bonds
27e4a2806f0889c35e2b5587528e9a676d26144a
[ "MIT" ]
2
2019-05-28T19:11:38.000Z
2020-03-24T03:36:04.000Z
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html class CorporateBondsPipeline(object): def process_item(self, item, spider): return item
24.5
65
0.717687
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html class CorporateBondsPipeline(object): def process_item(self, item, spider): return item
true
true
f7585a342aec8d60c4407c089d6b180f0d85f4f6
21
py
Python
src/python/config.py
DannaShirley/aws-eventbridge-oauth-client-delete-blueprint
e85a0e5966beac1ac292a6f52299ebb1879cc98c
[ "MIT" ]
null
null
null
src/python/config.py
DannaShirley/aws-eventbridge-oauth-client-delete-blueprint
e85a0e5966beac1ac292a6f52299ebb1879cc98c
[ "MIT" ]
1
2022-02-17T19:05:52.000Z
2022-02-17T19:05:52.000Z
src/python/config.py
DannaShirley/aws-eventbridge-oauth-client-delete-blueprint
e85a0e5966beac1ac292a6f52299ebb1879cc98c
[ "MIT" ]
1
2022-02-17T19:05:39.000Z
2022-02-17T19:05:39.000Z
pager_duty_token = ''
21
21
0.761905
pager_duty_token = ''
true
true
f7585c1b9e4fe3421c038f696894a0ca0f0c4d35
1,955
py
Python
docs/source/conf.py
yds05238/interview-prep
5f4b0e6603bbe27e318f5c162f5ab9585ddd4cf1
[ "MIT" ]
null
null
null
docs/source/conf.py
yds05238/interview-prep
5f4b0e6603bbe27e318f5c162f5ab9585ddd4cf1
[ "MIT" ]
null
null
null
docs/source/conf.py
yds05238/interview-prep
5f4b0e6603bbe27e318f5c162f5ab9585ddd4cf1
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
33.706897
79
0.663939
project = 'Coding Interview Prep' copyright = '2021, Jaemok Yoon' author = 'Jaemok Yoon' release = '0.1' extensions = [ 'sphinx.ext.duration', 'myst_parser', ] templates_path = ['_templates'] exclude_patterns = [] html_theme = 'sphinx_book_theme' html_static_path = ['_static']
true
true
f7585f0fa4de05484ab23180aa19789eb7c21413
3,275
py
Python
deepchem/feat/base_classes.py
martonlanga/deepchem
af2db874484603ade489fa513eac193b38ce6d56
[ "MIT" ]
3
2022-02-06T09:13:51.000Z
2022-02-19T15:03:35.000Z
deepchem/feat/base_classes.py
martonlanga/deepchem
af2db874484603ade489fa513eac193b38ce6d56
[ "MIT" ]
1
2020-07-13T18:59:49.000Z
2020-07-13T18:59:49.000Z
deepchem/feat/base_classes.py
fenomeinc/deepchem
1c007fbae899a49fe3c40f41e7273ed21867fef9
[ "MIT" ]
1
2021-04-06T20:32:02.000Z
2021-04-06T20:32:02.000Z
""" Feature calculations. """ import logging import types import numpy as np import multiprocessing __author__ = "Steven Kearnes" __copyright__ = "Copyright 2014, Stanford University" __license__ = "BSD 3-clause" def _featurize_complex(featurizer, mol_pdb_file, protein_pdb_file, log_message): logging.info(log_mess...
24.62406
80
0.659237
import logging import types import numpy as np import multiprocessing __author__ = "Steven Kearnes" __copyright__ = "Copyright 2014, Stanford University" __license__ = "BSD 3-clause" def _featurize_complex(featurizer, mol_pdb_file, protein_pdb_file, log_message): logging.info(log_message) return featurizer._feat...
true
true
f758608a88ac8c9dd2010d2bf00577529442ed58
61,669
py
Python
bigtable/google/cloud/bigtable_admin_v2/gapic/bigtable_table_admin_client.py
deryrahman/google-cloud-python
b55058c4b2328fde32f29bfd8ea04708fcc578e0
[ "Apache-2.0" ]
null
null
null
bigtable/google/cloud/bigtable_admin_v2/gapic/bigtable_table_admin_client.py
deryrahman/google-cloud-python
b55058c4b2328fde32f29bfd8ea04708fcc578e0
[ "Apache-2.0" ]
null
null
null
bigtable/google/cloud/bigtable_admin_v2/gapic/bigtable_table_admin_client.py
deryrahman/google-cloud-python
b55058c4b2328fde32f29bfd8ea04708fcc578e0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
45.145681
172
0.592486
import functools import pkg_resources import warnings from google.oauth2 import service_account import google.api_core.gapic_v1.client_info import google.api_core.gapic_v1.config import google.api_core.gapic_v1.method import google.api_core.gapic_v1.routing_header import google.api_core.grpc_helpers import google.api...
true
true
f75860daca32753d06169bc262f13e1370200c9a
1,650
py
Python
tfx/benchmarks/tft_benchmark_chicago_taxi.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
1,813
2019-02-04T17:17:30.000Z
2022-03-29T13:39:30.000Z
tfx/benchmarks/tft_benchmark_chicago_taxi.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
2,710
2019-02-14T00:41:00.000Z
2022-03-31T07:23:00.000Z
tfx/benchmarks/tft_benchmark_chicago_taxi.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
731
2019-02-04T17:59:18.000Z
2022-03-31T06:45:51.000Z
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
34.375
89
0.744848
from absl import flags from tfx.benchmarks import tft_benchmark_base from tfx.benchmarks.datasets.chicago_taxi import dataset from tensorflow.python.platform import test FLAGS = flags.FLAGS flags.DEFINE_integer("num_analyzers_wide", 10, "Number of analyzers in the TFT preprocessing function. " ...
true
true
f75861427e5b15eeabfa148fa1de5edd3d43917b
3,339
py
Python
dataloaders/wrapper.py
parvex/residual-continual-learning-benchmark
8eeb2e57ecf0711e075eb02e8ed06fc8e7b9f20d
[ "MIT" ]
null
null
null
dataloaders/wrapper.py
parvex/residual-continual-learning-benchmark
8eeb2e57ecf0711e075eb02e8ed06fc8e7b9f20d
[ "MIT" ]
null
null
null
dataloaders/wrapper.py
parvex/residual-continual-learning-benchmark
8eeb2e57ecf0711e075eb02e8ed06fc8e7b9f20d
[ "MIT" ]
null
null
null
from os import path import torch import torch.utils.data as data class CacheClassLabel(data.Dataset): """ A dataset wrapper that has a quick access to all labels of data. """ def __init__(self, dataset): super(CacheClassLabel, self).__init__() self.dataset = dataset self.labels...
31.8
109
0.632225
from os import path import torch import torch.utils.data as data class CacheClassLabel(data.Dataset): def __init__(self, dataset): super(CacheClassLabel, self).__init__() self.dataset = dataset self.labels = torch.LongTensor(len(dataset)).fill_(-1) label_cache_filename = path.join(...
true
true
f75861bfe73550bc8171c261af5d02cf30101bbc
503
py
Python
deal/_cli/_common.py
life4/deal
65e3191198dbc0573e88ff2cfd5d9cd3b5f0907e
[ "MIT" ]
311
2019-10-04T04:27:42.000Z
2022-03-30T23:38:30.000Z
deal/_cli/_common.py
life4/deal
65e3191198dbc0573e88ff2cfd5d9cd3b5f0907e
[ "MIT" ]
42
2019-09-29T17:05:05.000Z
2022-03-18T08:10:00.000Z
deal/_cli/_common.py
life4/deal
65e3191198dbc0573e88ff2cfd5d9cd3b5f0907e
[ "MIT" ]
17
2019-09-29T20:08:39.000Z
2022-03-04T08:22:13.000Z
from pathlib import Path from typing import Iterator def get_paths(path: Path) -> Iterator[Path]: """Recursively yields python files. """ if not path.exists(): raise FileNotFoundError(str(path)) if path.is_file(): if path.suffix == '.py': yield path return for s...
25.15
44
0.582505
from pathlib import Path from typing import Iterator def get_paths(path: Path) -> Iterator[Path]: if not path.exists(): raise FileNotFoundError(str(path)) if path.is_file(): if path.suffix == '.py': yield path return for subpath in path.iterdir(): if subpath.nam...
true
true
f75862260854dc163119d547a30c4fb0201e8cf3
7,018
py
Python
hs_logisticregression.py
Davjes15/ardas_platform
d962e7280ac4477fc3ee71280e90aeab58f74bd6
[ "MIT" ]
1
2022-01-08T18:35:51.000Z
2022-01-08T18:35:51.000Z
hs_logisticregression.py
Davjes15/ardas_platform
d962e7280ac4477fc3ee71280e90aeab58f74bd6
[ "MIT" ]
null
null
null
hs_logisticregression.py
Davjes15/ardas_platform
d962e7280ac4477fc3ee71280e90aeab58f74bd6
[ "MIT" ]
null
null
null
# Implementation of Random Forest model to classify failures in a hydraulic process # Hydraulic system can be found : https://archive.ics.uci.edu/ml/datasets/Condition+monitoring+of+hydraulic+systems # The data set contains raw process sensor data (i.e. without feature extraction) which are structured as matrices (tab-...
37.329787
134
0.65674
import pandas as pd import numpy as np import os, sys import pickle import sklearn as sk from pathlib import Path from sklearn import preprocessing from sklearn.metrics import confusion_matrix, recall_score, precision_score, accuracy_score from sklearn.model_selection import train_test_split from sklearn.linear_m...
true
true
f7586258a5997bfa6c8bb15913277eb714fe87ac
88
py
Python
config/development.py
librazh/financial-analysis
f252f5248e2b9b062945b5c9930577f9656a7ebc
[ "Apache-2.0" ]
null
null
null
config/development.py
librazh/financial-analysis
f252f5248e2b9b062945b5c9930577f9656a7ebc
[ "Apache-2.0" ]
null
null
null
config/development.py
librazh/financial-analysis
f252f5248e2b9b062945b5c9930577f9656a7ebc
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Created on 2018-09-16 @author: Basel ''' DEBUG = True
12.571429
24
0.534091
DEBUG = True
true
true
f75863a91ae8648f388fd4dd5010b38274efa7fc
1,017
py
Python
flask/api/models/user.py
mktung/tvgs-crm
be992a19b46f7d7eeaf90c9c9105a3630ff20292
[ "MIT" ]
1
2019-10-18T00:49:27.000Z
2019-10-18T00:49:27.000Z
flask/api/models/user.py
mktung/tvgs-crm
be992a19b46f7d7eeaf90c9c9105a3630ff20292
[ "MIT" ]
null
null
null
flask/api/models/user.py
mktung/tvgs-crm
be992a19b46f7d7eeaf90c9c9105a3630ff20292
[ "MIT" ]
null
null
null
from uuid import uuid4 from api.core import Mixin from .base import db as DB class User(Mixin, DB.Model): """User model.""" __tablename__ = "users" id = DB.Column( DB.Integer, nullable=False, primary_key=True ) uuid = DB.Column( DB.String(32), unique=True...
21.638298
64
0.618486
from uuid import uuid4 from api.core import Mixin from .base import db as DB class User(Mixin, DB.Model): __tablename__ = "users" id = DB.Column( DB.Integer, nullable=False, primary_key=True ) uuid = DB.Column( DB.String(32), unique=True, nullable=Fal...
true
true
f75863db66151b6a76c2896cade3d83f738f4814
193
py
Python
bangumi/spiders/bangumi_anime_list_spider.py
project-nichijou/nichijou.server.spider.bangumi
e84b13b0e8624a34185ced052ad0f4d41bf5bead
[ "MIT" ]
3
2021-06-24T14:39:43.000Z
2021-07-30T06:25:01.000Z
bangumi/spiders/bangumi_anime_list_spider.py
project-nichijou/bangumi-spider
e84b13b0e8624a34185ced052ad0f4d41bf5bead
[ "MIT" ]
12
2021-06-20T16:08:20.000Z
2021-06-29T02:43:54.000Z
bangumi/spiders/bangumi_anime_list_spider.py
project-nichijou/nichijou.server.spider.bangumi
e84b13b0e8624a34185ced052ad0f4d41bf5bead
[ "MIT" ]
1
2021-06-25T14:28:54.000Z
2021-06-25T14:28:54.000Z
import scrapy from bangumi.spiders.bangumi_list_spider import BangumiListSpider class BangumiAnimeListSpider(BangumiListSpider): name = 'bangumi_anime_list' type = 'anime' start_page = 1
19.3
65
0.818653
import scrapy from bangumi.spiders.bangumi_list_spider import BangumiListSpider class BangumiAnimeListSpider(BangumiListSpider): name = 'bangumi_anime_list' type = 'anime' start_page = 1
true
true
f75863e7fe4871742672f4aa4de9e6a42addb1ce
520
py
Python
examples/progress.py
takelushi/combu
a0df46301ef9432de825719ccca2a29a66fe49f7
[ "MIT" ]
1
2020-12-16T03:58:10.000Z
2020-12-16T03:58:10.000Z
examples/progress.py
takelushi/combu
a0df46301ef9432de825719ccca2a29a66fe49f7
[ "MIT" ]
9
2020-12-15T21:47:46.000Z
2021-01-27T13:49:59.000Z
examples/progress.py
takelushi/combu
a0df46301ef9432de825719ccca2a29a66fe49f7
[ "MIT" ]
null
null
null
"""Progress.""" import time import combu def _f(v1, v2): time.sleep(0.1) return v1 * v2 params_a = {'v1': range(1, 3), 'v2': range(1, 3)} for _, _ in combu.execute(_f, params_a, progress=True): pass comb = combu.Combu(_f, progress=True) params_b = {'v1': [1, 10, 100], 'v2': range(1, 11)} for _, _ in...
18.571429
73
0.5
import time import combu def _f(v1, v2): time.sleep(0.1) return v1 * v2 params_a = {'v1': range(1, 3), 'v2': range(1, 3)} for _, _ in combu.execute(_f, params_a, progress=True): pass comb = combu.Combu(_f, progress=True) params_b = {'v1': [1, 10, 100], 'v2': range(1, 11)} for _, _ in comb.execute(pa...
true
true
f758646802809f7bccea0e6ebcc14cbf7e999532
414
py
Python
python/tests/test_knapsack_branching.py
vincenzopalazzo/benchmarks
3187a57d86bc3ac41cd98e4f08e6e809f3ef3a71
[ "BSD-3-Clause" ]
null
null
null
python/tests/test_knapsack_branching.py
vincenzopalazzo/benchmarks
3187a57d86bc3ac41cd98e4f08e6e809f3ef3a71
[ "BSD-3-Clause" ]
null
null
null
python/tests/test_knapsack_branching.py
vincenzopalazzo/benchmarks
3187a57d86bc3ac41cd98e4f08e6e809f3ef3a71
[ "BSD-3-Clause" ]
null
null
null
"""Testing the implementation with some small input""" from benchamarks.bm.knapsack_branching import knapsack_branching from benchamarks.bm.knapsack_comm import Entry def test_knapsack_branching_one() -> None: inputs = [ Entry(40, 2), Entry(50, 3.14), Entry(100, 1.98), Entry(95, 5...
24.352941
64
0.647343
from benchamarks.bm.knapsack_branching import knapsack_branching from benchamarks.bm.knapsack_comm import Entry def test_knapsack_branching_one() -> None: inputs = [ Entry(40, 2), Entry(50, 3.14), Entry(100, 1.98), Entry(95, 5), Entry(30, 3), ] res = knapsack_branc...
true
true
f75864e6c78e386ea8721e6aeacb596a65629ad8
3,051
py
Python
byceps/blueprints/admin/authentication/login/views.py
homeworkprod/byceps
cd0f9f37f7b5eb517106ec761acc7e0bdf75e22e
[ "BSD-3-Clause" ]
23
2015-08-03T23:28:54.000Z
2018-12-12T20:11:45.000Z
byceps/blueprints/admin/authentication/login/views.py
homeworkprod/byceps
cd0f9f37f7b5eb517106ec761acc7e0bdf75e22e
[ "BSD-3-Clause" ]
1
2018-09-30T18:18:24.000Z
2018-09-30T18:18:24.000Z
byceps/blueprints/admin/authentication/login/views.py
homeworkprod/byceps
cd0f9f37f7b5eb517106ec761acc7e0bdf75e22e
[ "BSD-3-Clause" ]
9
2015-08-06T16:41:36.000Z
2018-09-25T11:17:31.000Z
""" byceps.blueprints.admin.authentication.login.views ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2014-2022 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from flask import abort, g, redirect, request from flask_babel import gettext from .....services.authenticati...
27.736364
75
0.686988
from flask import abort, g, redirect, request from flask_babel import gettext from .....services.authentication.exceptions import AuthenticationFailed from .....services.authentication import service as authentication_service from .....services.authentication.session import service as session_service from .....signal...
true
true
f75867bec64d5afe1c82e1432ae20c2f59366240
3,270
py
Python
airflow/upgrade/rules/import_changes.py
shrutimantri/airflow
61eaaacd20ab0f743786df895cf8f232b3b2a48c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
airflow/upgrade/rules/import_changes.py
shrutimantri/airflow
61eaaacd20ab0f743786df895cf8f232b3b2a48c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
26
2019-08-05T13:44:11.000Z
2022-03-30T10:06:18.000Z
airflow/upgrade/rules/import_changes.py
shrutimantri/airflow
61eaaacd20ab0f743786df895cf8f232b3b2a48c
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
8
2019-08-26T07:47:05.000Z
2021-11-23T19:55:18.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 u...
36.333333
107
0.679511
from typing import NamedTuple, Optional, List from cached_property import cached_property from airflow import conf from airflow.upgrade.rules.base_rule import BaseRule from airflow.upgrade.rules.renamed_classes import ALL from airflow.utils.dag_processing import list_py_file_paths class ImportChange( NamedTupl...
true
true
f75867c6ad71fe59c16a1b18a544ef53289c324c
1,048
py
Python
setup.py
Anton-4/flowpipe
ce63a14424a1d0b08ed50a65fb29821904a3fcbc
[ "MIT" ]
null
null
null
setup.py
Anton-4/flowpipe
ce63a14424a1d0b08ed50a65fb29821904a3fcbc
[ "MIT" ]
null
null
null
setup.py
Anton-4/flowpipe
ce63a14424a1d0b08ed50a65fb29821904a3fcbc
[ "MIT" ]
1
2020-07-29T15:24:19.000Z
2020-07-29T15:24:19.000Z
from setuptools import setup from setuptools import find_packages with open('README.md') as stream: long_description = stream.read() REQUIREMENTS = [ 'ascii-canvas>=1.2.2', 'ordereddict>=1.1', 'strip-hints>=0.1.7' ] setup(name='flowpipe', version='0.6.0', author='Paul Schweizer', a...
31.757576
66
0.616412
from setuptools import setup from setuptools import find_packages with open('README.md') as stream: long_description = stream.read() REQUIREMENTS = [ 'ascii-canvas>=1.2.2', 'ordereddict>=1.1', 'strip-hints>=0.1.7' ] setup(name='flowpipe', version='0.6.0', author='Paul Schweizer', a...
true
true
f75867eb387f54905f50e3898a0c076e96b8b2ce
7,709
py
Python
run_lib.py
NCIA-Diffusion/ScoreSDE
b5a562908daf66e6dcf0b791beb83f1fcb61174b
[ "MIT" ]
2
2022-03-02T06:54:28.000Z
2022-03-02T06:56:45.000Z
run_lib.py
NCIA-Diffusion/ScoreSDE
b5a562908daf66e6dcf0b791beb83f1fcb61174b
[ "MIT" ]
null
null
null
run_lib.py
NCIA-Diffusion/ScoreSDE
b5a562908daf66e6dcf0b791beb83f1fcb61174b
[ "MIT" ]
2
2022-02-23T11:49:15.000Z
2022-03-02T06:56:46.000Z
import os import logging import copy from tqdm import trange from datetime import datetime import numpy as np import torch from torch.utils.tensorboard import SummaryWriter from torchvision.utils import save_image from utils import ema from lib.dataset import DataLooper from lib.sde import VPSDE from lib.model.ddpm i...
30.113281
87
0.550396
import os import logging import copy from tqdm import trange from datetime import datetime import numpy as np import torch from torch.utils.tensorboard import SummaryWriter from torchvision.utils import save_image from utils import ema from lib.dataset import DataLooper from lib.sde import VPSDE from lib.model.ddpm i...
true
true
f75869e2132bb7e4e1e57bc54c7bf500bf0d35a2
11,371
py
Python
miyu_bot/commands/master_filter/event_filter.py
qwewqa/miyu-bot
dddd533d803a056651b8233b632a86b86e35a388
[ "MIT" ]
11
2021-01-29T07:16:11.000Z
2022-02-25T01:40:22.000Z
miyu_bot/commands/master_filter/event_filter.py
qwewqa/miyu-bot
dddd533d803a056651b8233b632a86b86e35a388
[ "MIT" ]
null
null
null
miyu_bot/commands/master_filter/event_filter.py
qwewqa/miyu-bot
dddd533d803a056651b8233b632a86b86e35a388
[ "MIT" ]
3
2021-02-13T02:06:39.000Z
2021-05-08T18:43:12.000Z
import datetime as dt import re from typing import Optional, Union import discord from d4dj_utils.master.common_enums import EventType from d4dj_utils.master.event_master import EventMaster, EventState from miyu_bot.bot.bot import PrefContext from miyu_bot.bot.servers import Server from miyu_bot.commands.common.asset...
51.220721
257
0.594583
import datetime as dt import re from typing import Optional, Union import discord from d4dj_utils.master.common_enums import EventType from d4dj_utils.master.event_master import EventMaster, EventState from miyu_bot.bot.bot import PrefContext from miyu_bot.bot.servers import Server from miyu_bot.commands.common.asset...
true
true
f7586a6f10340e7608d72e2e86670bd8967e483f
22,114
py
Python
tests/test_do_spaces.py
mcueto/django-storages
3908c94b928cc5c97a443d51e473656813776fd7
[ "BSD-3-Clause" ]
null
null
null
tests/test_do_spaces.py
mcueto/django-storages
3908c94b928cc5c97a443d51e473656813776fd7
[ "BSD-3-Clause" ]
null
null
null
tests/test_do_spaces.py
mcueto/django-storages
3908c94b928cc5c97a443d51e473656813776fd7
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import gzip import pickle import threading import warnings from datetime import datetime from unittest import skipIf from botocore.exceptions import ClientError from django.conf import settings from django.core.exceptions import ImproperlyConfigured from...
36.552066
111
0.608619
from __future__ import unicode_literals import gzip import pickle import threading import warnings from datetime import datetime from unittest import skipIf from botocore.exceptions import ClientError from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.base ...
true
true
f7586b000eecdff1b43a09575d4a94ba7e456fa0
6,061
py
Python
tests/test_core.py
joshfp/fastai
eb455070adaea072b4771e340d48a371c6c0c4e2
[ "Apache-2.0" ]
1
2019-01-29T22:13:29.000Z
2019-01-29T22:13:29.000Z
tests/test_core.py
jamesrequa/fastai
794365cd7f734b5e1027d7e19c99e648fbb9a12b
[ "Apache-2.0" ]
null
null
null
tests/test_core.py
jamesrequa/fastai
794365cd7f734b5e1027d7e19c99e648fbb9a12b
[ "Apache-2.0" ]
null
null
null
import pytest, torch import numpy as np from fastai import * from tempfile import TemporaryDirectory def test_cpus(): assert num_cpus() >= 1 @pytest.mark.parametrize("p, q, expected", [ (5 , 1 , [5]), (5 , [1,1], [5, 5]), ([5], 1 , [5]), ([5], [1,1], [5, 5]), ("ab" , "cd" , ["a", "...
31.9
159
0.538855
import pytest, torch import numpy as np from fastai import * from tempfile import TemporaryDirectory def test_cpus(): assert num_cpus() >= 1 @pytest.mark.parametrize("p, q, expected", [ (5 , 1 , [5]), (5 , [1,1], [5, 5]), ([5], 1 , [5]), ([5], [1,1], [5, 5]), ("ab" , "cd" , ["a", "...
true
true
f7586bb0cf519b2b9edb83099c9177de960aa7af
1,085
py
Python
networkit/viztasks.py
maxvogel/NetworKit-mirror2
02a1805a4eda56fbdd647852afcfac26bcb77099
[ "MIT" ]
null
null
null
networkit/viztasks.py
maxvogel/NetworKit-mirror2
02a1805a4eda56fbdd647852afcfac26bcb77099
[ "MIT" ]
null
null
null
networkit/viztasks.py
maxvogel/NetworKit-mirror2
02a1805a4eda56fbdd647852afcfac26bcb77099
[ "MIT" ]
null
null
null
# local imports from . import nxadapter from . import community from _NetworKit import ParallelPartitionCoarsening # external imports import networkx def save(name, dir="."): """ Save a figure """ savefig(os.path.join(dir, "{0}.pdf".format(name)), bbox_inches="tight", transparent=True) def coloringToColorList(G, ...
30.138889
140
0.723502
from . import nxadapter from . import community from _NetworKit import ParallelPartitionCoarsening import networkx def save(name, dir="."): savefig(os.path.join(dir, "{0}.pdf".format(name)), bbox_inches="tight", transparent=True) def coloringToColorList(G, coloring): clist = [] nColors = len(coloring.keys()) ...
true
true
f7586bede3552194d7502b885bc1a013a2fbcfaa
1,016
py
Python
mmtbx/ions/tst_pick_approx_zn.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
mmtbx/ions/tst_pick_approx_zn.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
mmtbx/ions/tst_pick_approx_zn.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
from __future__ import division import os from libtbx import easy_run import time def exercise(): from mmtbx.regression.make_fake_anomalous_data import generate_zinc_inputs base = "tst_pick_approx_zn" mtz_file, pdb_file = generate_zinc_inputs(file_base=base, anonymize = True) time.sleep(2) args = ["\"%s\"" ...
31.75
77
0.679134
from __future__ import division import os from libtbx import easy_run import time def exercise(): from mmtbx.regression.make_fake_anomalous_data import generate_zinc_inputs base = "tst_pick_approx_zn" mtz_file, pdb_file = generate_zinc_inputs(file_base=base, anonymize = True) time.sleep(2) args = ["\"%s\"" ...
false
true
f7586c8c660677be36c10f179505e6fcf6e3a3ee
1,783
py
Python
PyBank/main.py
EstherBaili/python-Challenge
3f36338f93c3b1222614697231cad8c630391e75
[ "ADSL" ]
null
null
null
PyBank/main.py
EstherBaili/python-Challenge
3f36338f93c3b1222614697231cad8c630391e75
[ "ADSL" ]
null
null
null
PyBank/main.py
EstherBaili/python-Challenge
3f36338f93c3b1222614697231cad8c630391e75
[ "ADSL" ]
null
null
null
import csv import os csvPath = os.path.abspath("C:/Users/li116/OneDrive/Desktop/python-Challenge/PyBank/resource/budget_data.csv") with open(csvPath,"r") as input_csv_file: csvreader = csv.reader(input_csv_file, delimiter=",") #exclude header next(csvreader) #get months list months = [ ] amounts...
28.758065
109
0.652271
import csv import os csvPath = os.path.abspath("C:/Users/li116/OneDrive/Desktop/python-Challenge/PyBank/resource/budget_data.csv") with open(csvPath,"r") as input_csv_file: csvreader = csv.reader(input_csv_file, delimiter=",") next(csvreader) months = [ ] amounts = [ ] dates = [ ] for ro...
true
true
f7586c9150bc6a53dd42fa442d453f6d9dc9032e
6,036
py
Python
dexy/filters/git.py
dsoto/dexy
0f2090250040c3c54c8481a16de8e476b559e87c
[ "MIT" ]
null
null
null
dexy/filters/git.py
dsoto/dexy
0f2090250040c3c54c8481a16de8e476b559e87c
[ "MIT" ]
null
null
null
dexy/filters/git.py
dsoto/dexy
0f2090250040c3c54c8481a16de8e476b559e87c
[ "MIT" ]
null
null
null
from dexy.exceptions import UserFeedback, InternalDexyProblem from dexy.filter import DexyFilter import os import tempfile import json try: import pygit2 AVAILABLE = True except ImportError: AVAILABLE = False def repo_from_path(path): """ Initializes a pygit Repository instance from a local repo a...
30.331658
80
0.591451
from dexy.exceptions import UserFeedback, InternalDexyProblem from dexy.filter import DexyFilter import os import tempfile import json try: import pygit2 AVAILABLE = True except ImportError: AVAILABLE = False def repo_from_path(path): """ Initializes a pygit Repository instance from a local repo a...
false
true
f7586cb4312ee529245633e03cb80fa101f0a741
36,828
py
Python
google/cloud/dialogflowcx_v3/services/experiments/async_client.py
nicain/python-dialogflow-cx
2292ff540aea24c3c831a5ffe1604c2c022ccb82
[ "Apache-2.0" ]
null
null
null
google/cloud/dialogflowcx_v3/services/experiments/async_client.py
nicain/python-dialogflow-cx
2292ff540aea24c3c831a5ffe1604c2c022ccb82
[ "Apache-2.0" ]
null
null
null
google/cloud/dialogflowcx_v3/services/experiments/async_client.py
nicain/python-dialogflow-cx
2292ff540aea24c3c831a5ffe1604c2c022ccb82
[ "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...
40.47033
142
0.627322
from collections import OrderedDict import functools import re from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core.client_options import ClientOptions from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_cor...
true
true
f7586cbe1d57981fcaf7088f8fcea34816737841
4,076
py
Python
varsom_landslide_client/models/alert_info_area_geocode.py
NVE/python-varsom-landslide-client
553f562d463e67545daa9fc9bfdd554f3c5d471c
[ "MIT" ]
null
null
null
varsom_landslide_client/models/alert_info_area_geocode.py
NVE/python-varsom-landslide-client
553f562d463e67545daa9fc9bfdd554f3c5d471c
[ "MIT" ]
null
null
null
varsom_landslide_client/models/alert_info_area_geocode.py
NVE/python-varsom-landslide-client
553f562d463e67545daa9fc9bfdd554f3c5d471c
[ "MIT" ]
null
null
null
# coding: utf-8 """ Jordskredvarsel API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1.0.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 im...
29.536232
119
0.594946
import pprint import re import six class AlertInfoAreaGeocode(object): swagger_types = { 'value_name_field': 'str', 'value_field': 'str' } attribute_map = { 'value_name_field': 'valueNameField', 'value_field': 'valueField' } def __init__(self, value_name_field...
true
true