hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7fae0f85d85777eb6b303e7ce07c37387dcff7f
8,597
py
Python
packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py
potpath/plotly.py
46cd47f441d8bda9b14b4ba66a33f02731faf8f0
[ "MIT" ]
1
2020-04-06T20:57:36.000Z
2020-04-06T20:57:36.000Z
packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py
potpath/plotly.py
46cd47f441d8bda9b14b4ba66a33f02731faf8f0
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py
potpath/plotly.py
46cd47f441d8bda9b14b4ba66a33f02731faf8f0
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # color # ----- @property def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000'...
37.21645
84
0.569966
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): @property def color(self): return self["color"] @color.setter def color(self, val): self["color"] = val @property ...
true
true
f7fae2385af890f33740936bbe812f72574fa5c1
1,071
py
Python
stations/tests/test_new_list.py
sharksmhi/stations
e0b893d4f14239452ced4b1d0b4fd48f2a444c5f
[ "MIT" ]
null
null
null
stations/tests/test_new_list.py
sharksmhi/stations
e0b893d4f14239452ced4b1d0b4fd48f2a444c5f
[ "MIT" ]
null
null
null
stations/tests/test_new_list.py
sharksmhi/stations
e0b893d4f14239452ced4b1d0b4fd48f2a444c5f
[ "MIT" ]
null
null
null
# Copyright (c) 2020 SMHI, Swedish Meteorological and Hydrological Institute # License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit). """ Created on 2020-10-02 12:18 @author: a002028 """ from stations.main import App if __name__ == '__main__': app = App() new_stations = {'statn': ['H...
32.454545
86
0.623716
from stations.main import App if __name__ == '__main__': app = App() new_stations = {'statn': ['Hästholmen Syd', 'Svartskär Ost'], 'lat_sweref99tm': ['6360582', '6363345'], 'lon_sweref99tm': ['317200', '310970'], 'lat_dd': [], '...
true
true
f7fae249993c94a2f582fc95aaefcc26a86f7bf2
119
py
Python
practice_3/generator.py
VelcroFly/Python.-Algorithms
acd4711e670b6ad7d5b7f20a14984319e6775a3d
[ "MIT" ]
null
null
null
practice_3/generator.py
VelcroFly/Python.-Algorithms
acd4711e670b6ad7d5b7f20a14984319e6775a3d
[ "MIT" ]
null
null
null
practice_3/generator.py
VelcroFly/Python.-Algorithms
acd4711e670b6ad7d5b7f20a14984319e6775a3d
[ "MIT" ]
null
null
null
import random SIZE = 10 MIN_ITEM = 0 MAX_ITEM = 100 array = [random.randint(MIN_ITEM, MAX_ITEM) for _ in range(SIZE)]
17
65
0.731092
import random SIZE = 10 MIN_ITEM = 0 MAX_ITEM = 100 array = [random.randint(MIN_ITEM, MAX_ITEM) for _ in range(SIZE)]
true
true
f7fae24c6c21df916e3345b6bc704fbb3c3986a6
597
py
Python
tests/sandbox/.venv_ccf_sandbox/lib/python3.8/site-packages/sklearn/metrics/cluster/unsupervised.py
iLuSIAnn/test
10d0a20dc1a646b5c1f6c7bff2960e3f5df0510e
[ "Apache-2.0" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
tests/sandbox/.venv_ccf_sandbox/lib/python3.8/site-packages/sklearn/metrics/cluster/unsupervised.py
iLuSIAnn/test
10d0a20dc1a646b5c1f6c7bff2960e3f5df0510e
[ "Apache-2.0" ]
37
2020-10-20T08:30:53.000Z
2020-12-22T13:15:45.000Z
tests/sandbox/.venv_ccf_sandbox/lib/python3.8/site-packages/sklearn/metrics/cluster/unsupervised.py
iLuSIAnn/test
10d0a20dc1a646b5c1f6c7bff2960e3f5df0510e
[ "Apache-2.0" ]
13
2020-09-07T07:24:35.000Z
2022-02-24T04:56:16.000Z
# THIS FILE WAS AUTOMATICALLY GENERATED BY deprecated_modules.py import sys # mypy error: Module X has no attribute y (typically for C extensions) from . import _unsupervised # type: ignore from ...externals._pep562 import Pep562 from ...utils.deprecation import _raise_dep_warning_if_not_pytest deprecated_path = 'sk...
31.421053
70
0.802345
import sys from . import _unsupervised from ...externals._pep562 import Pep562 from ...utils.deprecation import _raise_dep_warning_if_not_pytest deprecated_path = 'sklearn.metrics.cluster.unsupervised' correct_import_path = 'sklearn.metrics.cluster' _raise_dep_warning_if_not_pytest(deprecated_path, correct_impor...
true
true
f7fae2d1bd94eb43bb2ecd9b1b3b04cd44fff7dc
14,973
py
Python
whatwhy/data_analysis/whatwhy_predictor.py
stevengt/whatwhy
bf6f87fd20eebfc89240835c3121ec3079632133
[ "MIT" ]
2
2020-07-29T07:26:47.000Z
2020-07-29T07:26:55.000Z
whatwhy/data_analysis/whatwhy_predictor.py
stevengt/whatwhy
bf6f87fd20eebfc89240835c3121ec3079632133
[ "MIT" ]
null
null
null
whatwhy/data_analysis/whatwhy_predictor.py
stevengt/whatwhy
bf6f87fd20eebfc89240835c3121ec3079632133
[ "MIT" ]
null
null
null
import os import pickle import numpy as np from sklearn.model_selection import train_test_split from .seq2seq_model import Seq2SeqModel from .vectorizer import TokenVectorizer class WhatWhyPredictor(): """ Predicts a sequence of text which answers the question 'why?' given some input 'what'. The predi...
55.66171
151
0.629199
import os import pickle import numpy as np from sklearn.model_selection import train_test_split from .seq2seq_model import Seq2SeqModel from .vectorizer import TokenVectorizer class WhatWhyPredictor(): def __init__( self, word2vec_model=None, max_num_tokens_per_sample=10, ...
true
true
f7fae3098295008416850842b04bffa80d9dbca2
972
py
Python
thenounproject/user.py
yakupadakli/python-thenounproject
937e89e37921c9224713ee64d3b54061f11d3333
[ "MIT" ]
4
2017-12-29T19:00:34.000Z
2021-11-06T04:58:05.000Z
thenounproject/user.py
yakupadakli/python-thenounproject
937e89e37921c9224713ee64d3b54061f11d3333
[ "MIT" ]
null
null
null
thenounproject/user.py
yakupadakli/python-thenounproject
937e89e37921c9224713ee64d3b54061f11d3333
[ "MIT" ]
null
null
null
# coding=utf-8 from thenounproject.client import Client from thenounproject.models import Collection as CollectionModel from thenounproject.models import Icon as IconModel class User(Client): def __init__(self, **kwargs): super(User, self).__init__(**kwargs) self.url = "user" def collections...
38.88
90
0.685185
from thenounproject.client import Client from thenounproject.models import Collection as CollectionModel from thenounproject.models import Icon as IconModel class User(Client): def __init__(self, **kwargs): super(User, self).__init__(**kwargs) self.url = "user" def collections(self, user_id...
true
true
f7fae3c57b300b76afd8e5a485439aee9fefdbbe
4,373
py
Python
pfe/player-feature-extractor/torchreid/utils/loggers.py
dimahwang88/py-mcftracker
b7e845efa3c0f560fe59f2d1c8765087774e78e5
[ "MIT" ]
3,465
2018-03-12T23:07:01.000Z
2022-03-31T10:12:55.000Z
pfe/player-feature-extractor/torchreid/utils/loggers.py
dimahwang88/py-mcftracker
b7e845efa3c0f560fe59f2d1c8765087774e78e5
[ "MIT" ]
477
2018-03-27T14:37:55.000Z
2022-03-28T07:21:53.000Z
pfe/player-feature-extractor/torchreid/utils/loggers.py
dimahwang88/py-mcftracker
b7e845efa3c0f560fe59f2d1c8765087774e78e5
[ "MIT" ]
990
2018-03-15T00:37:16.000Z
2022-03-27T14:30:00.000Z
from __future__ import absolute_import import os import sys import os.path as osp from .tools import mkdir_if_missing __all__ = ['Logger', 'RankLogger'] class Logger(object): """Writes console output to external text file. Imported from `<https://github.com/Cysu/open-reid/blob/master/reid/utils/logging.py>...
29.748299
90
0.536931
from __future__ import absolute_import import os import sys import os.path as osp from .tools import mkdir_if_missing __all__ = ['Logger', 'RankLogger'] class Logger(object): def __init__(self, fpath=None): self.console = sys.stdout self.file = None if fpath is not None: mkd...
true
true
f7fae43b47e0e86cb363499010b040240a6b1465
705
py
Python
master/bopytest-code/code/tasks_proj/src/tasks/config.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
4
2018-09-07T15:35:24.000Z
2019-03-27T09:48:12.000Z
master/bopytest-code/code/tasks_proj/src/tasks/config.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
371
2020-03-04T21:51:56.000Z
2022-03-31T20:59:11.000Z
master/bopytest-code/code/tasks_proj/src/tasks/config.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
3
2019-06-18T19:57:17.000Z
2020-11-06T03:55:08.000Z
from collections import namedtuple try: from configparser import ConfigParser except ImportError: from ConfigParser import ConfigParser import os TasksConfig = namedtuple('TasksConfig', ['db_path', 'db_type',]) def get_config(): parser = ConfigParser() config_file = os.path.expanduser('~/.tasks.confi...
30.652174
64
0.706383
from collections import namedtuple try: from configparser import ConfigParser except ImportError: from ConfigParser import ConfigParser import os TasksConfig = namedtuple('TasksConfig', ['db_path', 'db_type',]) def get_config(): parser = ConfigParser() config_file = os.path.expanduser('~/.tasks.confi...
true
true
f7fae46156e3aa1f08dcb127807cd3a96393759c
56,049
py
Python
sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domains_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domains_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domains_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.04375
240
0.667684
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
f7fae4bee5f3cae66ef8186f4fc0f04234af4809
8,916
py
Python
python_modules/dagster/dagster_tests/cli_tests/workspace_tests/test_repository_load.py
johannkm/dagster-okteto
7ad30528a4a92945967d68e59e27727a1e839c2b
[ "Apache-2.0" ]
1
2020-08-10T23:03:37.000Z
2020-08-10T23:03:37.000Z
python_modules/dagster/dagster_tests/cli_tests/workspace_tests/test_repository_load.py
johannkm/dagster-okteto
7ad30528a4a92945967d68e59e27727a1e839c2b
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster_tests/cli_tests/workspace_tests/test_repository_load.py
johannkm/dagster-okteto
7ad30528a4a92945967d68e59e27727a1e839c2b
[ "Apache-2.0" ]
1
2020-08-20T14:20:31.000Z
2020-08-20T14:20:31.000Z
import os import re from contextlib import contextmanager import click import pytest from click.testing import CliRunner from dagster.cli.workspace.cli_target import ( get_external_repository_from_kwargs, repository_target_argument, ) from dagster.core.host_representation import ExternalRepository from dagste...
32.304348
100
0.682369
import os import re from contextlib import contextmanager import click import pytest from click.testing import CliRunner from dagster.cli.workspace.cli_target import ( get_external_repository_from_kwargs, repository_target_argument, ) from dagster.core.host_representation import ExternalRepository from dagste...
true
true
f7fae54038bdef582ab82ea0531d0a9f591a3b42
4,679
py
Python
import-site-tree-from-csv/import-waf-site-tree-from-csv.py
imperva/mx-toolbox
639e32d169bb96c4f2ae3a4dedaefe1eb81c35f3
[ "MIT" ]
9
2019-10-09T20:15:50.000Z
2022-02-08T07:12:13.000Z
import-site-tree-from-csv/import-waf-site-tree-from-csv.py
imperva/mx-toolbox
639e32d169bb96c4f2ae3a4dedaefe1eb81c35f3
[ "MIT" ]
4
2019-08-22T13:08:17.000Z
2021-04-27T01:16:51.000Z
import-site-tree-from-csv/import-waf-site-tree-from-csv.py
imperva/mx-toolbox
639e32d169bb96c4f2ae3a4dedaefe1eb81c35f3
[ "MIT" ]
8
2019-09-25T10:55:59.000Z
2021-09-01T09:13:37.000Z
#!/usr/bin/env python import ss import sys import json import csv import requests import logging import urllib from subprocess import PIPE,Popen import pyparsing ############ ENV Settings ############ logging.basicConfig(filename="import_site_tree_from_csv.log", filemode='w', format='%(name)s - %(levelname)s - %(mes...
64.09589
1,011
0.613593
import ss import sys import json import csv import requests import logging import urllib from subprocess import PIPE,Popen import pyparsing \",\n\t\t\t\t\t\"pattern\":\"some other text pattern\"\n\t\t\t\t}\n\t\t\t]\n\t\t}]\n\t},\n\t\"newrelic\": {\n\t\t\"enabled\": false,\n\t\t\"account_id\": \"ACCOUNT_ID\",\n\t\t\...
true
true
f7fae543a4087e8a07b08590ae381482a421133e
475
py
Python
meiduo_mall/apps/oauth/models.py
joinik/meiduo_mall
08da8e789941ee0bb4d9cd658c4faaa4f9f0f67a
[ "MIT" ]
null
null
null
meiduo_mall/apps/oauth/models.py
joinik/meiduo_mall
08da8e789941ee0bb4d9cd658c4faaa4f9f0f67a
[ "MIT" ]
null
null
null
meiduo_mall/apps/oauth/models.py
joinik/meiduo_mall
08da8e789941ee0bb4d9cd658c4faaa4f9f0f67a
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. from django.db import models from utils.myModles import BaseModel class OAuthQQUser(BaseModel): """QQ登录用户数据""" user = models.ForeignKey('users.User', on_delete=models.CASCADE, verbose_name='用户',) openid = models.CharField(max_length=64, verbose_nam...
25
88
0.715789
from django.db import models from django.db import models from utils.myModles import BaseModel class OAuthQQUser(BaseModel): user = models.ForeignKey('users.User', on_delete=models.CASCADE, verbose_name='用户',) openid = models.CharField(max_length=64, verbose_name='openid', db_index=True) class Meta: ...
true
true
f7fae54bde4fb44979f1451662ee97c93c65d8c6
1,592
py
Python
upload/oss.py
princewang1994/markdown_image_uploader
a2d6869d3f7b3adf3f3fef458744ed488203403e
[ "MIT" ]
1
2018-11-25T09:02:31.000Z
2018-11-25T09:02:31.000Z
upload/oss.py
princewang1994/markdown_image_uploader
a2d6869d3f7b3adf3f3fef458744ed488203403e
[ "MIT" ]
null
null
null
upload/oss.py
princewang1994/markdown_image_uploader
a2d6869d3f7b3adf3f3fef458744ed488203403e
[ "MIT" ]
null
null
null
import json import oss2 import os def read_config(): config_dir = os.path.join(os.environ['HOME'], '.oss') config_path = os.path.join(config_dir, 'oss.conf') # if config file not exist, make blank one if not os.path.exists(config_path): print('Config file not found, making blank config file to...
27.929825
92
0.601759
import json import oss2 import os def read_config(): config_dir = os.path.join(os.environ['HOME'], '.oss') config_path = os.path.join(config_dir, 'oss.conf') if not os.path.exists(config_path): print('Config file not found, making blank config file to `{}`'.format(config_path)) if not...
true
true
f7fae5b290f5c4d3278b95aa4fa4e6caeea20959
3,257
py
Python
tests/functional/gtcs/test_gtcs_proc_isql_10.py
FirebirdSQL/firebird-qa
96af2def7f905a06f178e2a80a2c8be4a4b44782
[ "MIT" ]
1
2022-02-05T11:37:13.000Z
2022-02-05T11:37:13.000Z
tests/functional/gtcs/test_gtcs_proc_isql_10.py
FirebirdSQL/firebird-qa
96af2def7f905a06f178e2a80a2c8be4a4b44782
[ "MIT" ]
1
2021-09-03T11:47:00.000Z
2021-09-03T12:42:10.000Z
tests/functional/gtcs/test_gtcs_proc_isql_10.py
FirebirdSQL/firebird-qa
96af2def7f905a06f178e2a80a2c8be4a4b44782
[ "MIT" ]
1
2021-06-30T14:14:16.000Z
2021-06-30T14:14:16.000Z
#coding:utf-8 # # id: functional.gtcs.gtcs_proc_isql_10 # title: gtcs-proc-isql-10 # decription: # Original test see in: # https://github.com/FirebirdSQL/fbtcs/blob/master/GTCS/tests/PROC_ISQL_10.script # SQL script for creating test database ('gtc...
30.726415
109
0.480811
import pytest from firebird.qa import db_factory, isql_act, Action substitutions_1 = [('=', ''), ('[ \t]+', ' ')] init_script_1 = """""" db_1 = db_factory(from_backup='gtcs_sp1.fbk', init=init_script_1) test_script_1 = """ set bail on; set term ^; create procedure proc10 returns( a v...
true
true
f7fae5da27627ff16f9469c14ed68b2ee88aca8c
11,860
py
Python
instapy/comment_util.py
kofway/InstaPy
fecc59de48395da55d74fafa93344710ef7d29fd
[ "MIT" ]
null
null
null
instapy/comment_util.py
kofway/InstaPy
fecc59de48395da55d74fafa93344710ef7d29fd
[ "MIT" ]
null
null
null
instapy/comment_util.py
kofway/InstaPy
fecc59de48395da55d74fafa93344710ef7d29fd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Module which handles the commenting features """ import random import emoji from .time_util import sleep from .util import update_activity from .util import add_user_to_blacklist from .util import click_element from .util import get_action_delay from .util import explicit_wait from .util i...
35.297619
127
0.611804
import random import emoji from .time_util import sleep from .util import update_activity from .util import add_user_to_blacklist from .util import click_element from .util import get_action_delay from .util import explicit_wait from .util import extract_text_from_element from .util import web_address_navigator fro...
true
true
f7fae696115bcd6de53129321c3c07b9f6603efc
2,722
py
Python
cnocr/cnocr/hyperparams/cn_hyperparams.py
DCMMC/chineseocr
0b8772615239ea7f212b1ab5bc75183e7e9f16b0
[ "MIT" ]
null
null
null
cnocr/cnocr/hyperparams/cn_hyperparams.py
DCMMC/chineseocr
0b8772615239ea7f212b1ab5bc75183e7e9f16b0
[ "MIT" ]
null
null
null
cnocr/cnocr/hyperparams/cn_hyperparams.py
DCMMC/chineseocr
0b8772615239ea7f212b1ab5bc75183e7e9f16b0
[ "MIT" ]
null
null
null
from __future__ import print_function class CnHyperparams(object): """ Hyperparameters for LSTM network """ def __init__(self): # Training hyper parameters # self._train_epoch_size = 2560000 # self._eval_epoch_size = 3000 self._num_epoch = 20 self.optimizer = "A...
21.776
68
0.608376
from __future__ import print_function class CnHyperparams(object): def __init__(self): self._num_epoch = 20 self.optimizer = "Adam" self._learning_rate = 0.001 self.wd = 0.00001 self.clip_gradient = None # self._momentum = 0.9 # ...
true
true
f7fae754dc0aea9851d4c62e59ef1c34ba7a12f2
1,485
py
Python
Loops.py
ZareefWG/file
5dd86278475fcd901407f300747bac700b947572
[ "BSD-2-Clause" ]
null
null
null
Loops.py
ZareefWG/file
5dd86278475fcd901407f300747bac700b947572
[ "BSD-2-Clause" ]
null
null
null
Loops.py
ZareefWG/file
5dd86278475fcd901407f300747bac700b947572
[ "BSD-2-Clause" ]
null
null
null
variable = input () for x in variable: print (x) fruits = ["apple","banana", "cherry"] for x in fruits: if x == "banana": continue print (x) for x in "Nazrul": print (x) for x in range (20,41,2): print (x) for x in "Nazrul": print (x) if x== "z": break for x in "Nazrul": ...
12.478992
39
0.482828
variable = input () for x in variable: print (x) fruits = ["apple","banana", "cherry"] for x in fruits: if x == "banana": continue print (x) for x in "Nazrul": print (x) for x in range (20,41,2): print (x) for x in "Nazrul": print (x) if x== "z": break for x in "Nazrul": ...
true
true
f7fae762f4cb88518cafe5a28a193b4c2c4fe552
4,006
py
Python
src/models.py
zhao-tong/DeepFD-pyTorch
dc4260af3beabef097a0d3ae3eb926feb21b4793
[ "MIT" ]
21
2019-07-24T19:43:17.000Z
2022-03-29T03:34:24.000Z
src/models.py
JiaWu-Repository/DeepFD-pyTorch
584c00d5814d6803be45433905a4140a6bd4fd18
[ "MIT" ]
null
null
null
src/models.py
JiaWu-Repository/DeepFD-pyTorch
584c00d5814d6803be45433905a4140a6bd4fd18
[ "MIT" ]
47
2020-07-06T01:12:11.000Z
2020-12-02T11:55:14.000Z
__author__ = 'Tong Zhao' __email__ = 'tzhao2@nd.edu' import os import sys import copy import torch import random import numpy as np from scipy.sparse import csr_matrix import torch.nn as nn import torch.nn.functional as F class Classification(nn.Module): def __init__(self, emb_size): super(Classification...
34.834783
85
0.614578
__author__ = 'Tong Zhao' __email__ = 'tzhao2@nd.edu' import os import sys import copy import torch import random import numpy as np from scipy.sparse import csr_matrix import torch.nn as nn import torch.nn.functional as F class Classification(nn.Module): def __init__(self, emb_size): super(Classification...
true
true
f7fae778d5c677e9a791486ca106c6239c3ca5f7
3,650
py
Python
forms.py
lqh-0514/crowdsourcing_vis
c1d6dec7668cf377902ab45fde8c8f3ab575e632
[ "MIT" ]
1
2020-03-02T01:13:11.000Z
2020-03-02T01:13:11.000Z
forms.py
lqh-0514/crowdsourcing_vis
c1d6dec7668cf377902ab45fde8c8f3ab575e632
[ "MIT" ]
null
null
null
forms.py
lqh-0514/crowdsourcing_vis
c1d6dec7668cf377902ab45fde8c8f3ab575e632
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import TextField, IntegerField, TextAreaField, SubmitField, RadioField, SelectField,StringField from wtforms import validators, ValidationError from wtforms.validators import DataRequired def validate_staff(form, field): if field.data == "": raise ValidationError("N...
89.02439
187
0.631233
from flask_wtf import FlaskForm from wtforms import TextField, IntegerField, TextAreaField, SubmitField, RadioField, SelectField,StringField from wtforms import validators, ValidationError from wtforms.validators import DataRequired def validate_staff(form, field): if field.data == "": raise ValidationError("N...
true
true
f7fae844ae67eac2f1c0b866356426490fbcfeec
1,141
py
Python
clustereval/stability.py
vinay-swamy/clustereval
d199cf0f8f232c35602633d8821249e6578d080a
[ "MIT" ]
null
null
null
clustereval/stability.py
vinay-swamy/clustereval
d199cf0f8f232c35602633d8821249e6578d080a
[ "MIT" ]
10
2021-04-07T16:37:18.000Z
2021-06-08T17:54:54.000Z
clustereval/stability.py
vinay-swamy/clustereval
d199cf0f8f232c35602633d8821249e6578d080a
[ "MIT" ]
null
null
null
#%% import pandas as pd import numpy as np import glob import os import re import pickle from multiprocessing import Pool def entropy(exp): # both are dfs with two columsn, Barcode,cluster # calc H_tot entropy = (exp .groupby("labels") .count() .reset_index(drop=True) ...
25.355556
80
0.577564
import pandas as pd import numpy as np import glob import os import re import pickle from multiprocessing import Pool def entropy(exp): entropy = (exp .groupby("labels") .count() .reset_index(drop=True) .assign(prop=lambda x: x/exp.shape[0], ...
true
true
f7fae8bbf7d5d863c086e38eb9777c0898e2a2bc
7,667
py
Python
examples/pwr_run/checkpointing/final/no_safeguard/job68.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/final/no_safeguard/job68.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/final/no_safeguard/job68.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
""" #Trains a ResNet on the CIFAR10 dataset. """ from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRa...
33.190476
118
0.692579
from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRateScheduler from keras.callbacks import ReduceLROn...
true
true
f7fae8d52769b2b31f761614ee04357f2193528a
1,678
py
Python
demo/index_ml_tmdb.py
cxcx/elasticsearch-learning-to-rank
1e0404e1d69da113f3b912191a01617bf7fe9c60
[ "Apache-2.0" ]
3
2018-06-27T06:53:32.000Z
2021-11-24T12:18:38.000Z
demo/index_ml_tmdb.py
mauliksoneji/elasticsearch-learning-to-rank
3075d1cd015c2b5e9f4c24c069bca75674687879
[ "ICU", "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
null
null
null
demo/index_ml_tmdb.py
mauliksoneji/elasticsearch-learning-to-rank
3075d1cd015c2b5e9f4c24c069bca75674687879
[ "ICU", "ECL-2.0", "Apache-2.0", "BSD-3-Clause" ]
2
2018-11-28T08:02:33.000Z
2019-02-07T14:20:01.000Z
import json import elasticsearch.helpers from log_conf import Logger from utils import elastic_connection def enrich(movie): """ Enrich for search purposes """ if 'title' in movie: movie['title_sent'] = 'SENTINEL_BEGIN ' + movie['title'] def reindex(es_connection, analysis_settings=None, mapping_se...
29.438596
105
0.613826
import json import elasticsearch.helpers from log_conf import Logger from utils import elastic_connection def enrich(movie): if 'title' in movie: movie['title_sent'] = 'SENTINEL_BEGIN ' + movie['title'] def reindex(es_connection, analysis_settings=None, mapping_settings=None, movie_dict=None, index='tm...
true
true
f7faea5e916bae45efcab42eb77bb476e521a6bc
89
py
Python
chargeamps/__init__.py
kirei/python-chargeamps
b2412166a33b1bbd0fd37526b3f8c2d28897e58b
[ "BSD-2-Clause" ]
3
2021-02-17T19:20:43.000Z
2022-03-04T20:44:35.000Z
chargeamps/__init__.py
kirei/python-chargeamps
b2412166a33b1bbd0fd37526b3f8c2d28897e58b
[ "BSD-2-Clause" ]
4
2020-12-14T13:29:55.000Z
2022-03-20T13:05:51.000Z
chargeamps/__init__.py
kirei/python-chargeamps
b2412166a33b1bbd0fd37526b3f8c2d28897e58b
[ "BSD-2-Clause" ]
4
2020-06-16T08:39:31.000Z
2022-03-04T18:04:23.000Z
import pkg_resources __version__ = pkg_resources.get_distribution("chargeamps").version
22.25
66
0.853933
import pkg_resources __version__ = pkg_resources.get_distribution("chargeamps").version
true
true
f7faea6537878c37f245956202e2622e18f4d9cb
2,517
py
Python
challenge.py
iraida07/challenge-python-07
348576187aa3c4dd5fba5c60e0338f88068629e7
[ "MIT" ]
null
null
null
challenge.py
iraida07/challenge-python-07
348576187aa3c4dd5fba5c60e0338f88068629e7
[ "MIT" ]
null
null
null
challenge.py
iraida07/challenge-python-07
348576187aa3c4dd5fba5c60e0338f88068629e7
[ "MIT" ]
null
null
null
DATA = [ { 'name': 'Facundo', 'age': 72, 'organization': 'Platzi', 'position': 'Technical Mentor', 'language': 'python', }, { 'name': 'Luisana', 'age': 33, 'organization': 'Globant', 'position': 'UX Designer', 'language': 'javas...
23.091743
131
0.471593
DATA = [ { 'name': 'Facundo', 'age': 72, 'organization': 'Platzi', 'position': 'Technical Mentor', 'language': 'python', }, { 'name': 'Luisana', 'age': 33, 'organization': 'Globant', 'position': 'UX Designer', 'language': 'javas...
true
true
f7faeae7cfb012678091ac2a8a1f2883fd2a8296
8,541
py
Python
biostar/server/middleware.py
Torres63/biostar
b7292abe9d541d5cec003812050f7723fad80d8e
[ "MIT" ]
null
null
null
biostar/server/middleware.py
Torres63/biostar
b7292abe9d541d5cec003812050f7723fad80d8e
[ "MIT" ]
null
null
null
biostar/server/middleware.py
Torres63/biostar
b7292abe9d541d5cec003812050f7723fad80d8e
[ "MIT" ]
null
null
null
__author__ = 'ialbert' from django.contrib import messages from django.conf import settings import hmac, logging, re from datetime import timedelta from django.contrib.auth import authenticate, login, logout from biostar.apps.users.models import User, Profile from biostar import const from django.core.cache import cach...
32.109023
113
0.618429
__author__ = 'ialbert' from django.contrib import messages from django.conf import settings import hmac, logging, re from datetime import timedelta from django.contrib.auth import authenticate, login, logout from biostar.apps.users.models import User, Profile from biostar import const from django.core.cache import cach...
false
true
f7faec20bce35ac87f91e934453793f8592c8220
5,826
py
Python
contrib/linearize/linearize-data.py
Kodacoin/Kodacoin
5d64d00f71b24da16363b3ac80d7b180dd6cbf61
[ "MIT" ]
null
null
null
contrib/linearize/linearize-data.py
Kodacoin/Kodacoin
5d64d00f71b24da16363b3ac80d7b180dd6cbf61
[ "MIT" ]
null
null
null
contrib/linearize/linearize-data.py
Kodacoin/Kodacoin
5d64d00f71b24da16363b3ac80d7b180dd6cbf61
[ "MIT" ]
null
null
null
#!/usr/bin/python # # linearize-data.py: Construct a linear, no-fork version of the chain. # # Copyright (c) 2013 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import json import struct import re imp...
23.211155
85
0.670614
import json import struct import re import os import base64 import httplib import sys import hashlib import datetime import time import ltc_scrypt settings = {} def uint32(x): return x & 0xffffffffL def bytereverse(x): return uint32(( ((x) << 24) | (((x) << 8) & 0x00ff0000) | (((x) >> 8) & 0x000...
false
true
f7faec710ec088ec6beec5ba67275806d5a09312
2,050
py
Python
tests/unit/via/views/debug_test.py
mattdricker/via-1
5f4919518337540d183bc079abbd3ea502a0e281
[ "BSD-2-Clause" ]
113
2015-02-13T23:22:29.000Z
2021-09-09T19:42:10.000Z
tests/unit/via/views/debug_test.py
mattdricker/via-1
5f4919518337540d183bc079abbd3ea502a0e281
[ "BSD-2-Clause" ]
265
2015-02-05T15:32:47.000Z
2022-03-31T17:05:43.000Z
tests/unit/via/views/debug_test.py
mattdricker/via-1
5f4919518337540d183bc079abbd3ea502a0e281
[ "BSD-2-Clause" ]
70
2015-04-17T23:52:08.000Z
2022-03-14T16:50:31.000Z
from unittest.mock import create_autospec, sentinel import pytest from h_matchers import Any from pyramid.testing import DummyRequest from via.views.debug import debug_headers class TestDebugHeaders: def test_it(self, pyramid_request): pyramid_request.headers = {"Key": "Value"} response = debug_...
32.539683
78
0.715122
from unittest.mock import create_autospec, sentinel import pytest from h_matchers import Any from pyramid.testing import DummyRequest from via.views.debug import debug_headers class TestDebugHeaders: def test_it(self, pyramid_request): pyramid_request.headers = {"Key": "Value"} response = debug_...
true
true
f7faed08bee1ae8c8dd512a6057f7be7b40fe7fe
2,002
py
Python
Module2/Module2-lab5.py
irfanki/EDX
272e774d00d05647423fa2f77c8526ceaa30109d
[ "MIT" ]
null
null
null
Module2/Module2-lab5.py
irfanki/EDX
272e774d00d05647423fa2f77c8526ceaa30109d
[ "MIT" ]
null
null
null
Module2/Module2-lab5.py
irfanki/EDX
272e774d00d05647423fa2f77c8526ceaa30109d
[ "MIT" ]
null
null
null
import pandas as pd # TODO: Load up the table, and extract the dataset # out of it. If you're having issues with this, look # carefully at the sample code provided in the reading # # .. your code here .. df = pd.read_html('http://www.espn.com/nhl/statistics/player/_/stat/points/sort/points/year/2015/seasontype/2', h...
24.414634
124
0.671329
import pandas as pd # carefully at the sample code provided in the reading # # .. your code here .. df = pd.read_html('http://www.espn.com/nhl/statistics/player/_/stat/points/sort/points/year/2015/seasontype/2', header=1)[0] print(df.head(5)) # TODO: Rename the columns so that they match the # column definition...
true
true
f7faed14203e675e6310bac51b542fa36e9887e5
1,072
py
Python
insta/forms.py
alvynah/instagram-clone
1e945a2bc4b13c9f1d612e40bfbc1d94dca6e6e3
[ "MIT" ]
1
2021-06-22T16:31:30.000Z
2021-06-22T16:31:30.000Z
insta/forms.py
alvynah/instagram-clone
1e945a2bc4b13c9f1d612e40bfbc1d94dca6e6e3
[ "MIT" ]
null
null
null
insta/forms.py
alvynah/instagram-clone
1e945a2bc4b13c9f1d612e40bfbc1d94dca6e6e3
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from .models import Post,Profile,Comment class SignUpForm(UserCreationForm): email = forms.EmailField(max_length=254) fullname=forms.CharField(max_length=254) class Meta: mo...
28.210526
97
0.656716
from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from .models import Post,Profile,Comment class SignUpForm(UserCreationForm): email = forms.EmailField(max_length=254) fullname=forms.CharField(max_length=254) class Meta: mo...
true
true
f7faee016d77c87b813ba04e896bb40ccfc31484
2,878
py
Python
slack_bolt/adapter/aws_lambda/handler.py
misscoded/bolt-python
ed26ea039c37cbd00551e25deac0fb1871c03aed
[ "MIT" ]
1
2020-11-11T19:19:20.000Z
2020-11-11T19:19:20.000Z
slack_bolt/adapter/aws_lambda/handler.py
misscoded/bolt-python
ed26ea039c37cbd00551e25deac0fb1871c03aed
[ "MIT" ]
null
null
null
slack_bolt/adapter/aws_lambda/handler.py
misscoded/bolt-python
ed26ea039c37cbd00551e25deac0fb1871c03aed
[ "MIT" ]
null
null
null
import base64 import logging from typing import List, Dict, Any from slack_bolt.adapter.aws_lambda.internals import _first_value from slack_bolt.app import App from slack_bolt.logger import get_bolt_app_logger from slack_bolt.oauth import OAuthFlow from slack_bolt.request import BoltRequest from slack_bolt.response im...
33.858824
91
0.602154
import base64 import logging from typing import List, Dict, Any from slack_bolt.adapter.aws_lambda.internals import _first_value from slack_bolt.app import App from slack_bolt.logger import get_bolt_app_logger from slack_bolt.oauth import OAuthFlow from slack_bolt.request import BoltRequest from slack_bolt.response im...
true
true
f7faee6cb336c35495e1fcc4fe3a7778899c6353
1,090
py
Python
run.py
Licht-T/Ant-Cuda
048d99bce4e018cabe2e51853e5fc22dfa476235
[ "MIT" ]
null
null
null
run.py
Licht-T/Ant-Cuda
048d99bce4e018cabe2e51853e5fc22dfa476235
[ "MIT" ]
null
null
null
run.py
Licht-T/Ant-Cuda
048d99bce4e018cabe2e51853e5fc22dfa476235
[ "MIT" ]
2
2020-07-24T14:05:49.000Z
2021-02-03T08:11:31.000Z
import os import subprocess import argparse MAKE_CMD = 'make' FLAG_WIN = False ARG_PARSER = argparse.ArgumentParser( description=( 'A foraging ants multi-agent simulation software.\n' 'The result is output into subdirectories.' ) ) ARG_PARSER.add_argument( '--angle', type=int, required=Tr...
24.222222
66
0.670642
import os import subprocess import argparse MAKE_CMD = 'make' FLAG_WIN = False ARG_PARSER = argparse.ArgumentParser( description=( 'A foraging ants multi-agent simulation software.\n' 'The result is output into subdirectories.' ) ) ARG_PARSER.add_argument( '--angle', type=int, required=Tr...
true
true
f7faf01f357e232e66511bc4071fb2b5ac5bd549
88
py
Python
dglearn/learning/search/__init__.py
syanga/dcglearn
c3faaed7e04431c86649512813c17968de6803eb
[ "MIT" ]
5
2020-07-19T00:11:20.000Z
2021-11-23T16:28:49.000Z
dglearn/learning/search/__init__.py
syanga/dcglearn
c3faaed7e04431c86649512813c17968de6803eb
[ "MIT" ]
null
null
null
dglearn/learning/search/__init__.py
syanga/dcglearn
c3faaed7e04431c86649512813c17968de6803eb
[ "MIT" ]
null
null
null
from .tabu import * from .hill_climb import * from .beam import * from .virtual import *
22
25
0.738636
from .tabu import * from .hill_climb import * from .beam import * from .virtual import *
true
true
f7faf156a343a8a8ce188db9653163be500bcd20
926
py
Python
coworker/place/migrations/0014_auto_20170922_1940.py
flybackl/spacesmap
859f83e564af2c93f506b0fedd1397152e1ccfab
[ "MIT" ]
null
null
null
coworker/place/migrations/0014_auto_20170922_1940.py
flybackl/spacesmap
859f83e564af2c93f506b0fedd1397152e1ccfab
[ "MIT" ]
null
null
null
coworker/place/migrations/0014_auto_20170922_1940.py
flybackl/spacesmap
859f83e564af2c93f506b0fedd1397152e1ccfab
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-09-22 19:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('place', '0013_place_city'), ] operations = [ migrations.RemoveField( ...
27.235294
119
0.564795
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('place', '0013_place_city'), ] operations = [ migrations.RemoveField( model_name='place', name='cs_extra_description', ...
true
true
f7faf26c9813e565a4c581c923daa96e433628cf
442
py
Python
gis/urls.py
thaiseerp/Live-Events-Earthquake-map-using-in-Google-Maps-using-Django
9359b36275cfb60619f2dbcfdd1a83cdbac6ef1f
[ "MIT" ]
null
null
null
gis/urls.py
thaiseerp/Live-Events-Earthquake-map-using-in-Google-Maps-using-Django
9359b36275cfb60619f2dbcfdd1a83cdbac6ef1f
[ "MIT" ]
null
null
null
gis/urls.py
thaiseerp/Live-Events-Earthquake-map-using-in-Google-Maps-using-Django
9359b36275cfb60619f2dbcfdd1a83cdbac6ef1f
[ "MIT" ]
null
null
null
""" Author: Thaiseer Parammal """ from django.conf.urls import include, url from django.contrib import admin from earthquake import views as main_view urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', main_view.home, name='home'), url(r'^earthquake/', include('earthquake.urls')), url(r'^lan...
27.625
69
0.69457
from django.conf.urls import include, url from django.contrib import admin from earthquake import views as main_view urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', main_view.home, name='home'), url(r'^earthquake/', include('earthquake.urls')), url(r'^landslide/', main_view.landslide, nam...
true
true
f7faf28fba1854238d467135bb0491f3fe865c72
246
py
Python
acmicpc/3009.py
juseongkr/BOJ
8f10a2bf9a7d695455493fbe7423347a8b648416
[ "Apache-2.0" ]
7
2020-02-03T10:00:19.000Z
2021-11-16T11:03:57.000Z
acmicpc/3009.py
juseongkr/Algorithm-training
8f10a2bf9a7d695455493fbe7423347a8b648416
[ "Apache-2.0" ]
1
2021-01-03T06:58:24.000Z
2021-01-03T06:58:24.000Z
acmicpc/3009.py
juseongkr/Algorithm-training
8f10a2bf9a7d695455493fbe7423347a8b648416
[ "Apache-2.0" ]
1
2020-01-22T14:34:03.000Z
2020-01-22T14:34:03.000Z
x1, y1 = input().split() x2, y2 = input().split() x3, y3 = input().split() x4, y4 = 0, 0 if x1 == x2: x4 = x3 elif x1 == x3: x4 = x2 else: x4 = x1 if y1 == y2: y4 = y3 elif y1 == y3: y4 = y2 else: y4 = y1 print(x4+' '+y4)
13.666667
24
0.47561
x1, y1 = input().split() x2, y2 = input().split() x3, y3 = input().split() x4, y4 = 0, 0 if x1 == x2: x4 = x3 elif x1 == x3: x4 = x2 else: x4 = x1 if y1 == y2: y4 = y3 elif y1 == y3: y4 = y2 else: y4 = y1 print(x4+' '+y4)
true
true
f7faf2b1cfa8c3091a8c0e1121e22c1259604d14
284,685
py
Python
madgraph/interface/common_run_interface.py
Ceebs93/madgraph
82340bc97bcda1f510598d9f3d7819e22cb922f9
[ "NCSA" ]
5
2018-10-23T14:37:18.000Z
2021-11-22T20:59:02.000Z
madgraph/interface/common_run_interface.py
Ceebs93/madgraph
82340bc97bcda1f510598d9f3d7819e22cb922f9
[ "NCSA" ]
2
2021-01-01T19:42:09.000Z
2022-03-12T12:22:02.000Z
madgraph/interface/common_run_interface.py
Ceebs93/madgraph
82340bc97bcda1f510598d9f3d7819e22cb922f9
[ "NCSA" ]
4
2019-02-18T11:42:18.000Z
2021-11-11T20:46:08.000Z
############################################################################### # # Copyright (c) 2011 The MadGraph5_aMC@NLO Development team and Contributors # # This file is a part of the MadGraph5_aMC@NLO project, an application which # automatically generates Feynman diagrams and matrix elements for arbitrary # hig...
47.487073
276
0.527495
gger.info("-- run delphes on RUN (current one by default)") self.run_options_help([('-f','answer all question by default'), ('--tag=', 'define the tag for the delphes run'), ('--no_default', 'not run if delphes_card not present')]) def help_deca...
false
true
f7faf4388477d5b39cad4364e1f806ea9360bb66
10,802
py
Python
modin/engines/base/io/text/csv_reader.py
reshamas/modin
b01f91fb3a628ce374aa830964d094480f73afca
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
modin/engines/base/io/text/csv_reader.py
reshamas/modin
b01f91fb3a628ce374aa830964d094480f73afca
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
modin/engines/base/io/text/csv_reader.py
reshamas/modin
b01f91fb3a628ce374aa830964d094480f73afca
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
46.360515
88
0.60063
from modin.engines.base.io.text.text_file_reader import TextFileReader from modin.data_management.utils import compute_chunksize from pandas.io.parsers import _validate_usecols_arg import pandas import csv import sys class CSVReader(TextFileReader): @classmethod def _read(cls, filepath_or_buffer,...
true
true
f7faf5d2d4bf2b5616444dc7a52cdfb5ea475ac7
950
py
Python
galileo_screenshots/urls.py
wasmitnetzen/galileo-screenshots
dbac61382b25d82dc413d928f1cd40448173b06f
[ "MIT" ]
null
null
null
galileo_screenshots/urls.py
wasmitnetzen/galileo-screenshots
dbac61382b25d82dc413d928f1cd40448173b06f
[ "MIT" ]
null
null
null
galileo_screenshots/urls.py
wasmitnetzen/galileo-screenshots
dbac61382b25d82dc413d928f1cd40448173b06f
[ "MIT" ]
null
null
null
"""galileo_screenshots URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home')...
38
77
0.727368
from django.contrib import admin from django.urls import path, include from django.conf.urls.static import static from django.conf import settings urlpatterns = [ path('admin/', admin.site.urls), path('', include('frontend.urls')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
true
true
f7faf690dc165a423e33f81289c0d0f2103d27ed
12,860
py
Python
capsulenet.py
bretthandrews/CapsNet-Keras
d9bb39688a048b965bed92114e2836c38e2a960b
[ "MIT" ]
null
null
null
capsulenet.py
bretthandrews/CapsNet-Keras
d9bb39688a048b965bed92114e2836c38e2a960b
[ "MIT" ]
4
2019-05-20T18:01:46.000Z
2019-05-23T01:36:16.000Z
capsulenet.py
bretthandrews/CapsNet-Keras
d9bb39688a048b965bed92114e2836c38e2a960b
[ "MIT" ]
null
null
null
""" Keras implementation of CapsNet in Hinton's paper Dynamic Routing Between Capsules. The current version maybe only works for TensorFlow backend. Actually it will be straightforward to re-write to TF code. Adopting to other backends should be easy, but I have not tested this. Usage: python capsulenet.py ...
34.569892
97
0.639813
from keras import layers, models, optimizers from keras import backend as K from keras.utils import to_categorical import matplotlib.pyplot as plt import numpy as np from PIL import Image from capsulelayers import CapsuleLayer, PrimaryCap, Length, Mask from utils import combine_images, TimeHistory K.set_image_data_f...
true
true
f7faf7e06e3194dff39b62b86ef6da183085945d
1,254
py
Python
test/test_sma.py
Yifei-Liu/uts
64c137d59fcd0c7c016082018d67a56abac0b28e
[ "MIT" ]
1
2021-07-09T15:37:58.000Z
2021-07-09T15:37:58.000Z
test/test_sma.py
Yifei-Liu/uts
64c137d59fcd0c7c016082018d67a56abac0b28e
[ "MIT" ]
1
2021-07-20T22:22:44.000Z
2021-07-20T22:23:04.000Z
test/test_sma.py
Yifei-Liu/uts
64c137d59fcd0c7c016082018d67a56abac0b28e
[ "MIT" ]
1
2021-06-29T20:13:18.000Z
2021-06-29T20:13:18.000Z
import unittest import numpy as np import numpy.testing as npt from uts import sma class TestEMA(unittest.TestCase): def test_sma_last(self): values = np.array([[0.0, 0.0], [1.0, 2.0], [1.2, 4.0], [2.3, 6], [2.9, 8], [5, 10]]) result = sma.last(values, 2.5, 1.0) desire...
35.828571
60
0.491228
import unittest import numpy as np import numpy.testing as npt from uts import sma class TestEMA(unittest.TestCase): def test_sma_last(self): values = np.array([[0.0, 0.0], [1.0, 2.0], [1.2, 4.0], [2.3, 6], [2.9, 8], [5, 10]]) result = sma.last(values, 2.5, 1.0) desire...
true
true
f7faf81985c717e19ab8a28fe75d869200b41a32
3,057
bzl
Python
pw_env_setup/bazel/cipd_setup/cipd_rules.bzl
curtin-space/pigweed
fe2e1743e03fabd2676f01d9de0ac9d34a426076
[ "Apache-2.0" ]
86
2021-03-09T23:49:40.000Z
2022-03-30T08:14:51.000Z
pw_env_setup/bazel/cipd_setup/cipd_rules.bzl
curtin-space/pigweed
fe2e1743e03fabd2676f01d9de0ac9d34a426076
[ "Apache-2.0" ]
4
2021-07-27T20:32:03.000Z
2022-03-08T10:39:07.000Z
pw_env_setup/bazel/cipd_setup/cipd_rules.bzl
curtin-space/pigweed
fe2e1743e03fabd2676f01d9de0ac9d34a426076
[ "Apache-2.0" ]
22
2021-03-11T15:15:47.000Z
2022-02-09T06:16:36.000Z
# Copyright 2021 The Pigweed 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
29.394231
125
0.687275
load( "//pw_env_setup/bazel/cipd_setup/internal:cipd_internal.bzl", _cipd_client_impl = "cipd_client_impl", _cipd_deps_impl = "cipd_deps_impl", _cipd_repository_impl = "cipd_repository_impl", ) _cipd_client_repository = repository_rule( _cipd_client_impl, attrs = { "_cipd_...
true
true
f7faf9654fe3b687b52dbedb0cf2494bb4e739dc
1,782
py
Python
tests/unitary/LiquidityGauge/test_deposit_for.py
AqualisDAO/curve-dao-contracts
beec73a068da8ed01c0f710939dc5adb776d565b
[ "MIT" ]
217
2020-06-24T14:01:21.000Z
2022-03-29T08:35:24.000Z
tests/unitary/LiquidityGauge/test_deposit_for.py
AqualisDAO/curve-dao-contracts
beec73a068da8ed01c0f710939dc5adb776d565b
[ "MIT" ]
25
2020-06-24T09:39:02.000Z
2022-03-22T17:03:00.000Z
tests/unitary/LiquidityGauge/test_deposit_for.py
AqualisDAO/curve-dao-contracts
beec73a068da8ed01c0f710939dc5adb776d565b
[ "MIT" ]
110
2020-07-10T22:45:49.000Z
2022-03-29T02:51:08.000Z
import brownie def test_deposit_for(accounts, liquidity_gauge, mock_lp_token): mock_lp_token.approve(liquidity_gauge, 2 ** 256 - 1, {"from": accounts[0]}) balance = mock_lp_token.balanceOf(accounts[0]) liquidity_gauge.set_approve_deposit(accounts[0], True, {"from": accounts[1]}) liquidity_gauge.deposi...
44.55
86
0.755892
import brownie def test_deposit_for(accounts, liquidity_gauge, mock_lp_token): mock_lp_token.approve(liquidity_gauge, 2 ** 256 - 1, {"from": accounts[0]}) balance = mock_lp_token.balanceOf(accounts[0]) liquidity_gauge.set_approve_deposit(accounts[0], True, {"from": accounts[1]}) liquidity_gauge.deposi...
true
true
f7fafb8904510061e7264b0efd26be396be5c8ea
10,018
py
Python
AutoWorkup/logismosb/utils/fs_thickness_measurements.py
pnlbwh/BRAINSTools
a2fe63ab5b795f03da140a4081d1fef6314dab95
[ "Apache-2.0" ]
89
2015-02-09T16:47:09.000Z
2022-02-21T07:19:27.000Z
AutoWorkup/logismosb/utils/fs_thickness_measurements.py
pnlbwh/BRAINSTools
a2fe63ab5b795f03da140a4081d1fef6314dab95
[ "Apache-2.0" ]
166
2015-01-07T22:14:05.000Z
2021-12-26T06:58:00.000Z
AutoWorkup/logismosb/utils/fs_thickness_measurements.py
BRAINSia/BRAINSTools
f09f74bd28ad07cd2347c2528921b1a43b97fa1d
[ "Apache-2.0" ]
80
2015-01-05T17:18:07.000Z
2022-01-06T12:46:29.000Z
""" fs_thickness_measurements.py ============================== Description: Author: Usage: """ import vtk import SimpleITK as sitk import numpy as np from scipy.spatial import distance from nipype.interfaces.freesurfer import MRIsConvert import os import sys def read_poly_data(filename): """ This function...
23.909308
121
0.669595
import vtk import SimpleITK as sitk import numpy as np from scipy.spatial import distance from nipype.interfaces.freesurfer import MRIsConvert import os import sys def read_poly_data(filename): if ".vtk" in filename: reader = vtk.vtkPolyDataReader() reader.SetFileName(filename) reader...
true
true
f7fafbee44a5e3be184f9e36104920b5900173a0
2,122
py
Python
isiscb/isisdata/operations.py
bgopalachary/IsisCB
c28e3f504eea60ebeff38318d8bb2071abb28ebb
[ "MIT" ]
4
2016-01-25T20:35:33.000Z
2020-04-07T15:39:52.000Z
isiscb/isisdata/operations.py
bgopalachary/IsisCB
c28e3f504eea60ebeff38318d8bb2071abb28ebb
[ "MIT" ]
41
2015-08-19T17:34:41.000Z
2022-03-11T23:19:01.000Z
isiscb/isisdata/operations.py
bgopalachary/IsisCB
c28e3f504eea60ebeff38318d8bb2071abb28ebb
[ "MIT" ]
2
2020-11-25T20:18:18.000Z
2021-06-24T15:15:41.000Z
from __future__ import unicode_literals from builtins import filter from django.db.models import Q from isisdata.models import * def filter_queryset(user, queryset, do=CRUDRule.VIEW): """ Limit a :class:`.QuerySet` to what ``user`` has permission to ``do``. """ roles = user.isiscbrole_set.all() ...
41.607843
147
0.717719
from __future__ import unicode_literals from builtins import filter from django.db.models import Q from isisdata.models import * def filter_queryset(user, queryset, do=CRUDRule.VIEW): roles = user.isiscbrole_set.all() if user.is_superuser: return queryset _not_null = lambda obj: obj is not ...
true
true
f7fafc3eca2a0d5f684ce78dbf8d565f8e0da8a0
787
py
Python
craw/modules/trail/trails/feeds/urlvir.py
xuluhang/DomainBlockList
e9e69138ffdba6a73741fe204306f1f0b66eff19
[ "MIT" ]
19
2019-11-25T09:02:15.000Z
2021-07-24T12:05:28.000Z
craw/modules/trail/trails/feeds/urlvir.py
xuluhang/DomainBlockList
e9e69138ffdba6a73741fe204306f1f0b66eff19
[ "MIT" ]
1
2019-11-25T09:06:08.000Z
2019-11-25T09:06:08.000Z
craw/modules/trail/trails/feeds/urlvir.py
xuluhang/DomainBlockList
e9e69138ffdba6a73741fe204306f1f0b66eff19
[ "MIT" ]
10
2019-11-26T02:42:02.000Z
2021-08-28T07:16:08.000Z
#!/usr/bin/env python2 """ Copyright (c) 2014-2019 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from craw.modules.trail.plugins.util import wget_content __url__ = "http://www.urlvir.com/export-hosts/" __check__ = "Updated on" __info__ = "malware" __ref...
23.848485
83
0.66709
from craw.modules.trail.plugins.util import wget_content __url__ = "http://www.urlvir.com/export-hosts/" __check__ = "Updated on" __info__ = "malware" __reference__ = "urlvir.com" maintainer_url = __reference__ maintainer = "urlvir" list_source_url = __url__ category = __info__ def fetch(): retval = {} c...
true
true
f7fafc50779885f0c4bda2ae7f84ef26ecdce3aa
2,298
py
Python
dummy.py
ShashkovS/poddavki_solver
3062442fdbf65a5e0abe40bb3088d1d5e5d84bd6
[ "MIT" ]
5
2017-12-21T13:06:44.000Z
2018-04-16T19:12:28.000Z
dummy.py
ShashkovS/poddavki_solver
3062442fdbf65a5e0abe40bb3088d1d5e5d84bd6
[ "MIT" ]
null
null
null
dummy.py
ShashkovS/poddavki_solver
3062442fdbf65a5e0abe40bb3088d1d5e5d84bd6
[ "MIT" ]
null
null
null
from copy import deepcopy EMPTY, WHITE, BLACK = '.', 'W', 'B' def free_steps(myboard, fig, need_coordinates=False): board = deepcopy(myboard) nextlin, free_steps = (1 if fig == 'B' else -1), [] for lin in range(0, 8): for col in range(int(lin % 2 == 0), 8, 2): for i in (1, -1): ...
37.064516
131
0.437337
from copy import deepcopy EMPTY, WHITE, BLACK = '.', 'W', 'B' def free_steps(myboard, fig, need_coordinates=False): board = deepcopy(myboard) nextlin, free_steps = (1 if fig == 'B' else -1), [] for lin in range(0, 8): for col in range(int(lin % 2 == 0), 8, 2): for i in (1, -1): ...
true
true
f7fafd7987fff653ffb6447991b1b1bf940fc87e
257
py
Python
app/recipe/urls.py
Chahat001/Recipe-APP-API
62123248256bd287f35884520efe720baa56e7f3
[ "MIT" ]
null
null
null
app/recipe/urls.py
Chahat001/Recipe-APP-API
62123248256bd287f35884520efe720baa56e7f3
[ "MIT" ]
null
null
null
app/recipe/urls.py
Chahat001/Recipe-APP-API
62123248256bd287f35884520efe720baa56e7f3
[ "MIT" ]
null
null
null
from django.urls import path, include from rest_framework.routers import DefaultRouter from recipe import views router = DefaultRouter() router.register('tags', views.TagViewSet) app_name = 'recipe' urlpatterns = [ path('', include(router.urls)) ]
17.133333
48
0.754864
from django.urls import path, include from rest_framework.routers import DefaultRouter from recipe import views router = DefaultRouter() router.register('tags', views.TagViewSet) app_name = 'recipe' urlpatterns = [ path('', include(router.urls)) ]
true
true
f7fafd8fa883aa04cf113a1397eddc0257eddf91
5,284
py
Python
ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py
mkozinenko/ambari
9cfe9559420a1f4af89a2d645af84b1ab20d6737
[ "Apache-2.0", "MIT" ]
1
2015-05-04T12:19:05.000Z
2015-05-04T12:19:05.000Z
ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py
mkozinenko/ambari
9cfe9559420a1f4af89a2d645af84b1ab20d6737
[ "Apache-2.0", "MIT" ]
null
null
null
ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py
mkozinenko/ambari
9cfe9559420a1f4af89a2d645af84b1ab20d6737
[ "Apache-2.0", "MIT" ]
1
2021-01-07T08:55:01.000Z
2021-01-07T08:55:01.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 use this ...
33.232704
112
0.661998
import sys from resource_management import * from ambari_commons import OSConst from ambari_commons.os_family_impl import OsFamilyImpl class MapReduce2ServiceCheck(Script): def service_check(self, env): pass @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY) class MapReduce2ServiceCheckWindows(MapReduce2ServiceC...
true
true
f7fafeb94afdcb33f5ad2d84cc3435cfee3e418b
3,432
py
Python
mailpy/response.py
dn0/mailpy
db382d9d67a34444b8492bb0766b7320e46a0ac0
[ "BSD-3-Clause" ]
1
2015-10-05T12:01:19.000Z
2015-10-05T12:01:19.000Z
mailpy/response.py
dn0/mailpy
db382d9d67a34444b8492bb0766b7320e46a0ac0
[ "BSD-3-Clause" ]
3
2015-08-20T08:47:08.000Z
2015-10-17T13:52:57.000Z
mailpy/response.py
dn0/mailpy
db382d9d67a34444b8492bb0766b7320e46a0ac0
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from email.message import Message from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from .utils import send_mail, decode_header from .request import MailRequest __all__ = ('MailResponse', 'TextMailResponse', 'HtmlMailResponse') class MailResponse(object): ...
32.685714
110
0.615967
from email.message import Message from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from .utils import send_mail, decode_header from .request import MailRequest __all__ = ('MailResponse', 'TextMailResponse', 'HtmlMailResponse') class MailResponse(object): status_code = 200 ...
true
true
f7faff234c8be6121743b94002053f32c4faf470
1,174
py
Python
tests/real_tests/test_real_sqlite_cache.py
guionardo/py-cache-guiosoft
4f9b6805d4b20c2583648bb9b8c43c8cfa73ebdf
[ "MIT" ]
null
null
null
tests/real_tests/test_real_sqlite_cache.py
guionardo/py-cache-guiosoft
4f9b6805d4b20c2583648bb9b8c43c8cfa73ebdf
[ "MIT" ]
11
2020-04-03T17:18:44.000Z
2021-02-10T20:02:53.000Z
tests/real_tests/test_real_sqlite_cache.py
guionardo/py-cache-guiosoft
4f9b6805d4b20c2583648bb9b8c43c8cfa73ebdf
[ "MIT" ]
null
null
null
import os import unittest from time import sleep from cache_gs import CacheGS from cache_gs.utils.filesystem import remove_tree class TestRealSQLiteCache(unittest.TestCase): @classmethod def setUpClass(cls): cls.cache_file = '.cache' if not os.path.isdir(cls.cache_file): os.mkdir...
28.634146
62
0.651618
import os import unittest from time import sleep from cache_gs import CacheGS from cache_gs.utils.filesystem import remove_tree class TestRealSQLiteCache(unittest.TestCase): @classmethod def setUpClass(cls): cls.cache_file = '.cache' if not os.path.isdir(cls.cache_file): os.mkdir...
true
true
f7faff737b0487d907ec123f283b8b9be0268457
716
py
Python
QueueDB/extmodels/GoogleDrive.py
liyao001/BioQueue
2b2c9f023b988fd926a037eb4755f639632b2991
[ "Apache-2.0" ]
33
2017-03-12T16:26:45.000Z
2021-04-30T05:37:35.000Z
QueueDB/extmodels/GoogleDrive.py
liyao001/BioQueue
2b2c9f023b988fd926a037eb4755f639632b2991
[ "Apache-2.0" ]
6
2017-04-21T08:44:47.000Z
2018-11-11T16:20:22.000Z
QueueDB/extmodels/GoogleDrive.py
liyao001/BioQueue
2b2c9f023b988fd926a037eb4755f639632b2991
[ "Apache-2.0" ]
13
2017-03-12T16:26:56.000Z
2020-04-20T05:35:00.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: Li Yao # @Date: 12/29/20 # # BioQueue is free for personal use and is licensed under # the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, # or (at your option) any later version. # # Thi...
32.545455
65
0.75838
from django.db import models from QueueDB.models import _OwnerModel class GoogleDriveConnection(_OwnerModel): credential_pickle = models.CharField(max_length=255) folder_id = models.CharField(max_length=255)
true
true
f7fb0060d5774b4a635cdaa2b52838f02eb1225c
1,155
py
Python
jdaviz/configs/cubeviz/plugins/tests/test_data_retrieval.py
check-spelling/jdaviz
bfd0514d13bdc6fa0b8c8536a603293409270337
[ "MIT", "BSD-3-Clause" ]
55
2019-05-24T18:53:05.000Z
2022-03-14T08:45:52.000Z
jdaviz/configs/cubeviz/plugins/tests/test_data_retrieval.py
check-spelling/jdaviz
bfd0514d13bdc6fa0b8c8536a603293409270337
[ "MIT", "BSD-3-Clause" ]
1,105
2019-05-09T15:17:35.000Z
2022-03-31T21:22:18.000Z
jdaviz/configs/cubeviz/plugins/tests/test_data_retrieval.py
rosteen/jdaviz
e02c08d68ef71c5e40600785f46e65e5ae95e236
[ "MIT", "BSD-3-Clause" ]
49
2019-05-07T18:05:42.000Z
2022-03-22T15:15:34.000Z
import pytest import numpy as np from astropy.utils.data import download_file from jdaviz.app import Application # This file is originally from # https://data.sdss.org/sas/dr14/manga/spectro/redux/v2_1_2/7495/stack/manga-7495-12704-LOGCUBE.fits.gz URL = 'https://stsci.box.com/shared/static/28a88k1qfipo4yxc4p4d40v4ax...
26.860465
103
0.741126
import pytest import numpy as np from astropy.utils.data import download_file from jdaviz.app import Application URL = 'https://stsci.box.com/shared/static/28a88k1qfipo4yxc4p4d40v4axtlal8y.fits' @pytest.fixture def jdaviz_app(): return Application(configuration='cubeviz') @pytest.mark.filterwarnings('ign...
true
true
f7fb00815d89ab463175d1883628cdede1d26c1b
11,396
py
Python
sdk/python/pulumi_azure_nextgen/network/v20190801/express_route_port.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20190801/express_route_port.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20190801/express_route_port.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
43.830769
1,274
0.657687
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['ExpressRoutePort'] class ExpressRoutePort(pulumi.CustomResource): def __init__(__self__, ...
true
true
f7fb00a96ec13f9c034fdb798ce90475d4e94a0f
2,647
py
Python
data/p3BR/R1/benchmark/startPyquil401.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R1/benchmark/startPyquil401.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R1/benchmark/startPyquil401.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=2 # total number=72 import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() # circuit begin prog += H(0) # number=1 pr...
26.737374
64
0.55119
import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() prog += H(0) prog += RX(-0.09738937226128368,2) prog += H(1) pr...
true
true
f7fb00c053b4385a3bee025e96670730d996acab
227
py
Python
apps/project/urls.py
FeiChaiCom/django-netdisk
f9ef4f46a065527f0ace0a65f2b3210d1657b80f
[ "MIT" ]
6
2021-05-22T12:23:29.000Z
2022-01-01T01:38:29.000Z
apps/project/urls.py
gaomugong/django-netdisk
5b2204f5087579bb6a26c6b92972a9f53bd05a7c
[ "MIT" ]
null
null
null
apps/project/urls.py
gaomugong/django-netdisk
5b2204f5087579bb6a26c6b92972a9f53bd05a7c
[ "MIT" ]
1
2021-05-22T15:25:33.000Z
2021-05-22T15:25:33.000Z
from rest_framework import routers from apps.project.views import ProjectViewSet app_name = 'project' router = routers.DefaultRouter() router.register('project', ProjectViewSet, base_name='project') urlpatterns = router.urls
25.222222
63
0.810573
from rest_framework import routers from apps.project.views import ProjectViewSet app_name = 'project' router = routers.DefaultRouter() router.register('project', ProjectViewSet, base_name='project') urlpatterns = router.urls
true
true
f7fb00f9c1bd6ed9ba70af36b34cda97083dc27d
1,889
py
Python
learningAgentKeras.py
kaiobarb/solarescape
18f2c432a48e4b2fe9dc116ec7b9190ee5637401
[ "MIT" ]
1
2019-01-28T04:38:05.000Z
2019-01-28T04:38:05.000Z
learningAgentKeras.py
kaiobarb/solarescape
18f2c432a48e4b2fe9dc116ec7b9190ee5637401
[ "MIT" ]
null
null
null
learningAgentKeras.py
kaiobarb/solarescape
18f2c432a48e4b2fe9dc116ec7b9190ee5637401
[ "MIT" ]
null
null
null
import numpy as np from keras.models import Sequential from keras.layers import Dense, Activation, Flatten from keras.optimizers import Adam from rl.agents.dqn import DQNAgent from rl.policy import BoltzmannQPolicy from rl.memory import SequentialMemory from solarescape_env import SolarescapeEnv import pygame from p...
33.140351
93
0.761779
import numpy as np from keras.models import Sequential from keras.layers import Dense, Activation, Flatten from keras.optimizers import Adam from rl.agents.dqn import DQNAgent from rl.policy import BoltzmannQPolicy from rl.memory import SequentialMemory from solarescape_env import SolarescapeEnv import pygame from p...
true
true
f7fb0310a3caace3fb403a1f221632972c04c435
12,657
py
Python
webshell_sdk/model/container/workload_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
webshell_sdk/model/container/workload_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
webshell_sdk/model/container/workload_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: workload.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf im...
57.794521
1,533
0.771273
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
f7fb03e162ec6cae2b6a91be535496fba35f02f5
3,080
py
Python
examples/example_rlm.py
toobaz/statsmodels
5286dd713a809b0630232508bf9ad5104aae1980
[ "BSD-3-Clause" ]
10
2016-05-18T11:46:33.000Z
2018-12-23T04:52:27.000Z
examples/example_rlm.py
AnaMP/statsmodels
2d4aad9a14619ce0c84d4c7bca9dacd66b2be566
[ "BSD-3-Clause" ]
null
null
null
examples/example_rlm.py
AnaMP/statsmodels
2d4aad9a14619ce0c84d4c7bca9dacd66b2be566
[ "BSD-3-Clause" ]
3
2015-04-01T08:26:54.000Z
2020-02-14T14:34:10.000Z
""" Robust Linear Models Notes ----- The syntax for the arguments will be shortened to accept string arguments in the future. """ import numpy as np import statsmodels.api as sm import matplotlib.pyplot as plt from statsmodels.sandbox.regression.predstd import wls_prediction_std #Estimating RLM #-------------- # Lo...
29.333333
79
0.675
""" Robust Linear Models Notes ----- The syntax for the arguments will be shortened to accept string arguments in the future. """ import numpy as np import statsmodels.api as sm import matplotlib.pyplot as plt from statsmodels.sandbox.regression.predstd import wls_prediction_std data = sm.datasets.stackloss.load...
false
true
f7fb04d71da48b4b0a5c3652d8746dc8f37be144
4,880
py
Python
NLU/pet/config.py
jinfeihu-stan/IPL
7c45e122ccaa0b41c94f56ee58206c7468bfa5ef
[ "MIT" ]
5
2022-02-02T01:53:49.000Z
2022-03-10T07:30:04.000Z
NLU/pet/config.py
jinfeihu-stan/IPL
7c45e122ccaa0b41c94f56ee58206c7468bfa5ef
[ "MIT" ]
null
null
null
NLU/pet/config.py
jinfeihu-stan/IPL
7c45e122ccaa0b41c94f56ee58206c7468bfa5ef
[ "MIT" ]
null
null
null
import json from abc import ABC from typing import List class PetConfig(ABC): """Abstract class for a PET configuration that can be saved to and loaded from a json file.""" def __repr__(self): return repr(self.__dict__) def save(self, path: str): """Save this config to a file.""" ...
37.251908
119
0.608197
import json from abc import ABC from typing import List class PetConfig(ABC): def __repr__(self): return repr(self.__dict__) def save(self, path: str): with open(path, 'w', encoding='utf8') as fh: json.dump(self.__dict__, fh) @classmethod def load(cls, path: str): ...
true
true
f7fb053bc9486bdef2415fecb72c6eab3c45bbdf
433
py
Python
pytrovich/enums.py
alexeyev/pytrovich
81c8d254f8b233abe275eaea1fc05e1e6dc0edd2
[ "MIT" ]
19
2020-06-03T05:56:04.000Z
2022-01-28T09:27:07.000Z
pytrovich/enums.py
alexeyev/pytrovich
81c8d254f8b233abe275eaea1fc05e1e6dc0edd2
[ "MIT" ]
2
2021-05-12T15:06:01.000Z
2022-01-22T21:41:55.000Z
pytrovich/enums.py
petrovich/pytrovich
81c8d254f8b233abe275eaea1fc05e1e6dc0edd2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from enum import Enum class LowerCaseNameEnum(Enum): def str(self): return self.name.lower() class Case(LowerCaseNameEnum): GENITIVE = 0 DATIVE = 1 ACCUSATIVE = 2 INSTRUMENTAL = 3 PREPOSITIONAL = 4 class Gender(LowerCaseNameEnum): MALE = 0 FEMALE = ...
14.931034
34
0.635104
from enum import Enum class LowerCaseNameEnum(Enum): def str(self): return self.name.lower() class Case(LowerCaseNameEnum): GENITIVE = 0 DATIVE = 1 ACCUSATIVE = 2 INSTRUMENTAL = 3 PREPOSITIONAL = 4 class Gender(LowerCaseNameEnum): MALE = 0 FEMALE = 1 ANDROGYNOUS = 2 ...
true
true
f7fb0700d44ecf2fac95836495a34e2e9ea5bcc0
10,436
py
Python
bin/generate_BED_file_of_endpoints.py
wjidea/RILseq
5419a83344cd74098039e8953eacbba930b91e00
[ "MIT" ]
null
null
null
bin/generate_BED_file_of_endpoints.py
wjidea/RILseq
5419a83344cd74098039e8953eacbba930b91e00
[ "MIT" ]
null
null
null
bin/generate_BED_file_of_endpoints.py
wjidea/RILseq
5419a83344cd74098039e8953eacbba930b91e00
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Given already mapped fusions using the reads file (format: gene1 gene2 position1 strand1 position2 strand2 read_name) Use the original BAM to plot the ends of the reads as BED file to be presented by the genome browser. Color code as specified in the parametrs """ import sys import argparse ...
36.746479
87
0.559985
""" Given already mapped fusions using the reads file (format: gene1 gene2 position1 strand1 position2 strand2 read_name) Use the original BAM to plot the ends of the reads as BED file to be presented by the genome browser. Color code as specified in the parametrs """ import sys import argparse import csv from colle...
false
true
f7fb08a3e6e605eb8c5d6f5590b2ce3af4eb9854
1,457
py
Python
backend/backend/settings/deps/ledger.py
AurelienGasser/substra-backend
c963f9b0521c7ebd878ea42fd9be9acfddf9f61d
[ "Apache-2.0" ]
37
2019-10-25T13:31:20.000Z
2021-05-29T05:27:50.000Z
backend/backend/settings/deps/ledger.py
AurelienGasser/substra-backend
c963f9b0521c7ebd878ea42fd9be9acfddf9f61d
[ "Apache-2.0" ]
217
2019-10-29T16:01:03.000Z
2021-05-25T13:06:29.000Z
backend/backend/settings/deps/ledger.py
AurelienGasser/substra-backend
c963f9b0521c7ebd878ea42fd9be9acfddf9f61d
[ "Apache-2.0" ]
13
2019-10-25T13:46:36.000Z
2021-03-16T16:59:04.000Z
import os import json LEDGER_CHANNELS = { channel: settings for channels in json.loads(os.getenv('LEDGER_CHANNELS')) for channel, settings in channels.items() } LEDGER_MSP_ID = os.getenv('LEDGER_MSP_ID') LEDGER_USER_NAME = os.getenv('LEDGER_USER_NAME') LEDGER_PEER_HOST = os.getenv('LEDGER_PEER_HOST') LED...
39.378378
107
0.829101
import os import json LEDGER_CHANNELS = { channel: settings for channels in json.loads(os.getenv('LEDGER_CHANNELS')) for channel, settings in channels.items() } LEDGER_MSP_ID = os.getenv('LEDGER_MSP_ID') LEDGER_USER_NAME = os.getenv('LEDGER_USER_NAME') LEDGER_PEER_HOST = os.getenv('LEDGER_PEER_HOST') LED...
true
true
f7fb0b8e4b048cbec573906d9754b1536c47d721
4,727
py
Python
tree/ID3_Clf.py
HermitSun/ML_for_learner
501634b35fb5bad2576d5a0c3b144603ba61336c
[ "Apache-2.0" ]
81
2019-03-07T03:19:53.000Z
2022-03-12T14:19:22.000Z
tree/ID3_Clf.py
a910773203/ML_for_learner
3014c641800c1408668ff243395bde752c45ec43
[ "Apache-2.0" ]
null
null
null
tree/ID3_Clf.py
a910773203/ML_for_learner
3014c641800c1408668ff243395bde752c45ec43
[ "Apache-2.0" ]
50
2019-08-17T06:44:59.000Z
2021-12-30T05:39:44.000Z
import pandas as pd import numpy as np class ID3: def __init__(self): self.tree = None self.dataset = None def __entropy(self, feature): uni_val, cnt = np.unique(feature, return_counts=True) # 返回独特值与计数 # 熵的计算 H = np.sum([(-cnt[i] / np.sum(cnt)) * np.log2(cnt[i] / np.su...
36.083969
116
0.567167
import pandas as pd import numpy as np class ID3: def __init__(self): self.tree = None self.dataset = None def __entropy(self, feature): uni_val, cnt = np.unique(feature, return_counts=True) H = np.sum([(-cnt[i] / np.sum(cnt)) * np.log2(cnt[i] / np.sum(cnt)) ...
true
true
f7fb0c38fd17ac4b61af5045e5d5b10a78df3e2b
362
py
Python
2021/6/aoc2106a.py
JonasThorsell/AoC
f1fc00a2927336ffbef5f62675c76473c67d09d0
[ "MIT" ]
null
null
null
2021/6/aoc2106a.py
JonasThorsell/AoC
f1fc00a2927336ffbef5f62675c76473c67d09d0
[ "MIT" ]
null
null
null
2021/6/aoc2106a.py
JonasThorsell/AoC
f1fc00a2927336ffbef5f62675c76473c67d09d0
[ "MIT" ]
null
null
null
# Copyright (c) 2021 Jonas Thorsell import sys tl = [0] * 9 for t in [int(x) for x in sys.stdin.readline().split(',')]: tl[t] += 1 for d in range(80): ntl = [0] * 9 for i in range(9): if i == 0: ntl[8] = tl[0] ntl[6] = tl[0] else: ntl[i-1] ...
19.052632
60
0.430939
import sys tl = [0] * 9 for t in [int(x) for x in sys.stdin.readline().split(',')]: tl[t] += 1 for d in range(80): ntl = [0] * 9 for i in range(9): if i == 0: ntl[8] = tl[0] ntl[6] = tl[0] else: ntl[i-1] += tl[i] tl = ntl print(sum(...
true
true
f7fb0d6493a4ce90f45d00994a700ab2d3e5e451
17,648
py
Python
buildscripts/packager-enterprise.py
ibm-linux-on-z/mongo
4d6a2ca26b54958b90aa05801891e8f70f1040a3
[ "Apache-2.0" ]
3
2015-10-20T18:40:10.000Z
2016-01-12T00:32:45.000Z
buildscripts/packager-enterprise.py
ibm-linux-on-z/mongo
4d6a2ca26b54958b90aa05801891e8f70f1040a3
[ "Apache-2.0" ]
null
null
null
buildscripts/packager-enterprise.py
ibm-linux-on-z/mongo
4d6a2ca26b54958b90aa05801891e8f70f1040a3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # This program makes Debian and RPM repositories for MongoDB, by # downloading our tarballs of statically linked executables and # insinuating them into Linux packages. It must be run on a # Debianoid, since Debian provides tools to make RPMs, but RPM-based # systems don't provide debian packaging c...
37.232068
180
0.619107
# Notes: # # * Almost anything that you want to be able to influence about how a # package construction must be embedded in some file that the # packaging tool uses for input (e.g., debian/rules, debian/control, # debian/changelog; or the RPM specfile), and the precise details are # arbitrary and silly. So thi...
false
true
f7fb0e9d28b5bfb3aac3f38811c22a8a7ea1ebac
2,114
py
Python
train.py
bearcatt/single-shot-detector
649d55aa84f1c988afd920ed8abc601512405825
[ "MIT" ]
1
2020-01-31T09:28:54.000Z
2020-01-31T09:28:54.000Z
train.py
bearcatt/single-shot-detector
649d55aa84f1c988afd920ed8abc601512405825
[ "MIT" ]
null
null
null
train.py
bearcatt/single-shot-detector
649d55aa84f1c988afd920ed8abc601512405825
[ "MIT" ]
null
null
null
import os import tensorflow as tf import json from model import model_fn, RestoreMovingAverageHook from detector.input_pipeline import Pipeline tf.logging.set_verbosity('INFO') """ This script does the training. Also it runs the evaluation now and then during the training. """ GPU_TO_USE = '0' CONFIG = 'config.json'...
31.088235
84
0.758278
import os import tensorflow as tf import json from model import model_fn, RestoreMovingAverageHook from detector.input_pipeline import Pipeline tf.logging.set_verbosity('INFO') GPU_TO_USE = '0' CONFIG = 'config.json' params = json.load(open(CONFIG)) def get_input_fn(is_training=True): dataset_path = params[...
true
true
f7fb0ecff3e83cd2094615f1ba6ec6c306e6fdb3
1,949
py
Python
epytope/Data/pssms/hammer/mat/DRB5_0105_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
7
2021-02-01T18:11:28.000Z
2022-01-31T19:14:07.000Z
epytope/Data/pssms/hammer/mat/DRB5_0105_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
22
2021-01-02T15:25:23.000Z
2022-03-14T11:32:53.000Z
epytope/Data/pssms/hammer/mat/DRB5_0105_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
4
2021-05-28T08:50:38.000Z
2022-03-14T11:45:32.000Z
DRB5_0105_9 = {0: {'A': -999.0, 'C': -999.9, 'E': -999.0, 'D': -999.0, 'G': -999.0, 'F': 0.0, 'I': -1.0, 'H': -999.0, 'K': -999.0, 'M': -1.0, 'L': -1.0, 'N': -999.0, 'Q': -999.0, 'P': -999.0, 'S': -999.0, 'R': -999.0, 'T': -999.0, 'W': 0.0, 'V': -1.0, 'Y': 0.0}, 1: {'A': 0.0, 'C': 0.0, 'E': 0.1, 'D': -1.3, 'G': 0.5, 'F...
1,949
1,949
0.300667
DRB5_0105_9 = {0: {'A': -999.0, 'C': -999.9, 'E': -999.0, 'D': -999.0, 'G': -999.0, 'F': 0.0, 'I': -1.0, 'H': -999.0, 'K': -999.0, 'M': -1.0, 'L': -1.0, 'N': -999.0, 'Q': -999.0, 'P': -999.0, 'S': -999.0, 'R': -999.0, 'T': -999.0, 'W': 0.0, 'V': -1.0, 'Y': 0.0}, 1: {'A': 0.0, 'C': 0.0, 'E': 0.1, 'D': -1.3, 'G': 0.5, 'F...
true
true
f7fb1109bf89db5bf87c82699fc7b9493c2500d3
1,035
py
Python
tests/continuous_integration.py
kfaRabi/online-judge-tools
79de8d37e1aa78a7c4c82c6a666f1f1602caf545
[ "MIT" ]
null
null
null
tests/continuous_integration.py
kfaRabi/online-judge-tools
79de8d37e1aa78a7c4c82c6a666f1f1602caf545
[ "MIT" ]
null
null
null
tests/continuous_integration.py
kfaRabi/online-judge-tools
79de8d37e1aa78a7c4c82c6a666f1f1602caf545
[ "MIT" ]
null
null
null
import os import subprocess import sys import unittest # TODO: these command should be written at once, at only .travis.yml or at only here paths = ['oj', 'onlinejudge', 'setup.py', 'tests'] class ContinuousIntegrationTest(unittest.TestCase): """A dummy test to run the commands same to CI on local environments"...
39.807692
127
0.68599
import os import subprocess import sys import unittest paths = ['oj', 'onlinejudge', 'setup.py', 'tests'] class ContinuousIntegrationTest(unittest.TestCase): @unittest.skipIf('CI' in os.environ, 'the same command is call from .travis.yml') def test_isort(self): subprocess.check_call(['isort', '--c...
true
true
f7fb114741c88ed71dd1c4f731e86104ad238dd7
1,516
py
Python
core_marketing/migrations/0015_corevendortestmpttnode.py
amenabe22/ashewa_backend
0c1aba1de3fcb86538482da1b628c68d4e5960a7
[ "MIT" ]
null
null
null
core_marketing/migrations/0015_corevendortestmpttnode.py
amenabe22/ashewa_backend
0c1aba1de3fcb86538482da1b628c68d4e5960a7
[ "MIT" ]
null
null
null
core_marketing/migrations/0015_corevendortestmpttnode.py
amenabe22/ashewa_backend
0c1aba1de3fcb86538482da1b628c68d4e5960a7
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2021-02-17 16:39 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import mptt.fields class Migration(migrations.Migration): dependencies = [ ('vendors', '0008_auto_20210214_2100'), migrations.swappable_depen...
43.314286
192
0.650396
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import mptt.fields class Migration(migrations.Migration): dependencies = [ ('vendors', '0008_auto_20210214_2100'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('core...
true
true
f7fb11bd2f9bc2b26c942f9db475fceba0171778
3,113
py
Python
django_afip/clients.py
odony/django-afip
5907dc0eb144744f423126249ea498595cee366f
[ "ISC" ]
null
null
null
django_afip/clients.py
odony/django-afip
5907dc0eb144744f423126249ea498595cee366f
[ "ISC" ]
null
null
null
django_afip/clients.py
odony/django-afip
5907dc0eb144744f423126249ea498595cee366f
[ "ISC" ]
null
null
null
__all__ = ("get_client",) from urllib.parse import urlparse import pytz from django.utils.functional import LazyObject from requests import Session from requests.adapters import HTTPAdapter from urllib3.util.ssl_ import create_urllib3_context, DEFAULT_CIPHERS from zeep import Client from zeep.cache import SqliteCache...
34.208791
87
0.692258
__all__ = ("get_client",) from urllib.parse import urlparse import pytz from django.utils.functional import LazyObject from requests import Session from requests.adapters import HTTPAdapter from urllib3.util.ssl_ import create_urllib3_context, DEFAULT_CIPHERS from zeep import Client from zeep.cache import SqliteCache...
true
true
f7fb13916043f328c397b1864ebf8d54a6bcf399
4,592
py
Python
masonite/response.py
STejas6/core
0576d50093b4520915636a216ebb26aa72aea9d5
[ "MIT" ]
null
null
null
masonite/response.py
STejas6/core
0576d50093b4520915636a216ebb26aa72aea9d5
[ "MIT" ]
null
null
null
masonite/response.py
STejas6/core
0576d50093b4520915636a216ebb26aa72aea9d5
[ "MIT" ]
null
null
null
"""The Masonite Response Object.""" import json from masonite.exceptions import ResponseError from masonite.helpers.Extendable import Extendable from masonite.view import View from orator.support.collection import Collection from orator import Model from masonite.app import App class Response(Extendable): def...
32.567376
105
0.614547
import json from masonite.exceptions import ResponseError from masonite.helpers.Extendable import Extendable from masonite.view import View from orator.support.collection import Collection from orator import Model from masonite.app import App class Response(Extendable): def __init__(self, app: App): s...
true
true
f7fb140774782e4b4a5d6bfb8bcc6af35d80e8a1
280
py
Python
drivable/configs/drivable/ccnet_r101-d8_512x1024_80k_drivable_bdd100k.py
danielzhangau/bdd100k-models
10311ad98a111b7a34fbfc84f58776175b251ef0
[ "Apache-2.0" ]
null
null
null
drivable/configs/drivable/ccnet_r101-d8_512x1024_80k_drivable_bdd100k.py
danielzhangau/bdd100k-models
10311ad98a111b7a34fbfc84f58776175b251ef0
[ "Apache-2.0" ]
null
null
null
drivable/configs/drivable/ccnet_r101-d8_512x1024_80k_drivable_bdd100k.py
danielzhangau/bdd100k-models
10311ad98a111b7a34fbfc84f58776175b251ef0
[ "Apache-2.0" ]
null
null
null
"""CCNet with ResNet-101-d8.""" _base_ = "./ccnet_r50-d8_512x1024_80k_drivable_bdd100k.py" model = dict(pretrained="open-mmlab://resnet101_v1c", backbone=dict(depth=101)) load_from = "https://dl.cv.ethz.ch/bdd100k/drivable/models/ccnet_r101-d8_512x1024_80k_drivable_bdd100k.pth"
46.666667
107
0.785714
_base_ = "./ccnet_r50-d8_512x1024_80k_drivable_bdd100k.py" model = dict(pretrained="open-mmlab://resnet101_v1c", backbone=dict(depth=101)) load_from = "https://dl.cv.ethz.ch/bdd100k/drivable/models/ccnet_r101-d8_512x1024_80k_drivable_bdd100k.pth"
true
true
f7fb153ab017555bcae740748306748e4bcf1cc1
825
py
Python
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/website_portal_sale/__manifest__.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
1
2019-12-19T01:53:13.000Z
2019-12-19T01:53:13.000Z
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/website_portal_sale/__manifest__.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/website_portal_sale/__manifest__.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Website Portal for Sales', 'category': 'Website', 'summary': 'Add your sales document in the frontend portal (sales order, quotations, invoices)', 'version': '1.0', 'description': """ Add y...
31.730769
207
0.621818
{ 'name': 'Website Portal for Sales', 'category': 'Website', 'summary': 'Add your sales document in the frontend portal (sales order, quotations, invoices)', 'version': '1.0', 'description': """ Add your sales document in the frontend portal. Your customers will be able to connect to their portal...
true
true
f7fb154e2cad7dc11c88f8c9e6d093d24c4375b0
151
py
Python
day06/test01.py
jaywoong/python
99daedd5a9418b72b2d5c3b800080e730eb9b3ea
[ "Apache-2.0" ]
null
null
null
day06/test01.py
jaywoong/python
99daedd5a9418b72b2d5c3b800080e730eb9b3ea
[ "Apache-2.0" ]
null
null
null
day06/test01.py
jaywoong/python
99daedd5a9418b72b2d5c3b800080e730eb9b3ea
[ "Apache-2.0" ]
null
null
null
data = [1,2,3,4,5] su = 0 for d in data: su += d print(su) su2 = 0 for i in range(0,len(data)): su2 += data[i] print(su2) print(sum(data))
10.066667
28
0.549669
data = [1,2,3,4,5] su = 0 for d in data: su += d print(su) su2 = 0 for i in range(0,len(data)): su2 += data[i] print(su2) print(sum(data))
true
true
f7fb15a165389e445d41522b64eaad8073ddaa3f
736
py
Python
exercises/Linked Lists/findKthLastElement.py
RakaPKS/StructuresAlgorithmsAndConcepts
570339f06562ca6dbe4ff7a2f12ec8413b1dcbba
[ "MIT" ]
null
null
null
exercises/Linked Lists/findKthLastElement.py
RakaPKS/StructuresAlgorithmsAndConcepts
570339f06562ca6dbe4ff7a2f12ec8413b1dcbba
[ "MIT" ]
null
null
null
exercises/Linked Lists/findKthLastElement.py
RakaPKS/StructuresAlgorithmsAndConcepts
570339f06562ca6dbe4ff7a2f12ec8413b1dcbba
[ "MIT" ]
null
null
null
# Find k-th last element in a single linked list import sys sys.path.append("../../LinkedList") from LinkedList import Node from LinkedList import LinkedList def findKthElement(node, k, n=0): if node: item, m = findKthElement(node.next, k, n+1) #print("k" + str(k)) #print("n" + str(n)) ...
20.444444
51
0.597826
import sys sys.path.append("../../LinkedList") from LinkedList import Node from LinkedList import LinkedList def findKthElement(node, k, n=0): if node: item, m = findKthElement(node.next, k, n+1) if m-n == k: return (node, m) else: retur...
true
true
f7fb17993e7d481ee3819b26d1d6bef086debfda
2,458
py
Python
src/genie/libs/parser/ios/cat6k/tests/ShowInventory/cli/equal/golden_output_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/ios/cat6k/tests/ShowInventory/cli/equal/golden_output_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/ios/cat6k/tests/ShowInventory/cli/equal/golden_output_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
expected_output = { 'index': { 1: { 'descr': 'Cisco Systems Catalyst 6500 3-slot Chassis System', 'name': 'WS-C6503-E', 'pid': 'WS-C6503-E', 'sn': 'FXS1821Q2H9', 'vid': 'V03', }, 2: { ...
34.138889
89
0.349471
expected_output = { 'index': { 1: { 'descr': 'Cisco Systems Catalyst 6500 3-slot Chassis System', 'name': 'WS-C6503-E', 'pid': 'WS-C6503-E', 'sn': 'FXS1821Q2H9', 'vid': 'V03', }, 2: { ...
true
true
f7fb17c3bb55bbdbb399edfb845e6480f26351f1
1,446
py
Python
core/registration/static/forms.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
22
2015-01-16T01:36:32.000Z
2020-06-08T00:46:18.000Z
core/registration/static/forms.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
8
2015-12-28T18:56:19.000Z
2019-04-01T17:33:48.000Z
core/registration/static/forms.py
jlin/inventory
c098c98e570c3bf9fadfd811eb75e1213f6ea428
[ "BSD-3-Clause" ]
13
2015-01-13T20:56:22.000Z
2022-02-23T06:01:17.000Z
from django import forms from django.forms import widgets from core.registration.static.models import StaticReg from core.utils import resolve_ip_type from mozdns.forms import BaseForm from mozdns.utils import ensure_label_domain class StaticRegForm(BaseForm): class Meta: model = StaticReg fields...
30.125
79
0.613416
from django import forms from django.forms import widgets from core.registration.static.models import StaticReg from core.utils import resolve_ip_type from mozdns.forms import BaseForm from mozdns.utils import ensure_label_domain class StaticRegForm(BaseForm): class Meta: model = StaticReg fields...
true
true
f7fb17e7692aa6aae2d41d6d66cf67f080614521
8,676
py
Python
plugins/time.py
Jeglet/pcbot
89178d4982151adb2fadfacdc3080e46cda9e891
[ "MIT" ]
null
null
null
plugins/time.py
Jeglet/pcbot
89178d4982151adb2fadfacdc3080e46cda9e891
[ "MIT" ]
null
null
null
plugins/time.py
Jeglet/pcbot
89178d4982151adb2fadfacdc3080e46cda9e891
[ "MIT" ]
null
null
null
""" Module for time commands and reminders and such. Commands: when countdown """ import asyncio from operator import itemgetter import discord import pendulum from pytz import all_timezones import bot import plugins from pcbot import Config, Annotate client = plugins.client # type: bot.Client...
35.125506
118
0.653988
import asyncio from operator import itemgetter import discord import pendulum from pytz import all_timezones import bot import plugins from pcbot import Config, Annotate client = plugins.client time_cfg = Config("time", data=dict(countdown={}, timezone={})) dt_format = "%A, %d %B %Y %H:%M:%S" @plugins.argument...
true
true
f7fb180212f335243444030a032a42fb4df9df72
3,887
py
Python
rfm69_test.py
Pythonaire/RFMGate
ccf24dceeec5c6946c6b552863459c375149bbb0
[ "Unlicense" ]
null
null
null
rfm69_test.py
Pythonaire/RFMGate
ccf24dceeec5c6946c6b552863459c375149bbb0
[ "Unlicense" ]
null
null
null
rfm69_test.py
Pythonaire/RFMGate
ccf24dceeec5c6946c6b552863459c375149bbb0
[ "Unlicense" ]
null
null
null
# Simple example to send a message and then wait indefinitely for messages # to be received. This uses the default RadioHead compatible GFSK_Rb250_Fd250 # modulation and packet format for the radio. # Author: Tony DiCola import board import busio import digitalio import adafruit_rfm69 import json # Define radio param...
44.678161
103
0.710831
import board import busio import digitalio import adafruit_rfm69 import json RADIO_FREQ_MHZ = 433.0 CS = digitalio.DigitalInOut(board.CE1) RESET = digitalio.DigitalInOut(board.D25) spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO) rfm69 = adafruit_rfm69.RFM69(spi...
true
true
f7fb1882915956c3078b72bc3dfed7584de6fe07
1,983
py
Python
src/uff/aperture.py
davidbradway/uff.py
118001211018a4fc95d1dd7304ae6335bdf805f9
[ "MIT" ]
7
2021-11-16T17:27:54.000Z
2021-12-25T18:09:35.000Z
src/uff/aperture.py
davidbradway/uff.py
118001211018a4fc95d1dd7304ae6335bdf805f9
[ "MIT" ]
6
2021-11-16T17:27:33.000Z
2022-02-04T08:51:06.000Z
src/uff/aperture.py
davidbradway/uff.py
118001211018a4fc95d1dd7304ae6335bdf805f9
[ "MIT" ]
1
2021-11-16T19:26:36.000Z
2021-11-16T19:26:36.000Z
from dataclasses import dataclass from uff.position import Position from uff.uff_io import Serializable @dataclass class Aperture(Serializable): """ UFF class to define analytically the aperture use in an ultrasound wave. Notes: The class aperture defines the transmit apodization profile. In this ca...
39.66
100
0.648512
from dataclasses import dataclass from uff.position import Position from uff.uff_io import Serializable @dataclass class Aperture(Serializable): @staticmethod def str_name(): return 'aperture' origin: Position fixed_size: float f_number: float = 1.0 wi...
true
true
f7fb194da78bbfc9c441023ad316d3d523a1d956
7,880
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/operations/_load_balancer_probes_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/operations/_load_balancer_probes_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/operations/_load_balancer_probes_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
44.519774
176
0.654315
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from .. import models class LoadBalancerProbesOperations(object): models = models def __init__(self, client, config, serializer, deserializer): self._client = client sel...
true
true
f7fb19e97cd22ca52bdc9cefc711a0ffce8ddc83
16,538
py
Python
arelle/examples/plugin/streamingExtensions.py
theredpea/Arelle
e53097f142a69b2fefc18298a72f1f1b219b973d
[ "Apache-2.0" ]
1
2018-01-04T01:39:04.000Z
2018-01-04T01:39:04.000Z
arelle/examples/plugin/streamingExtensions.py
theredpea/Arelle
e53097f142a69b2fefc18298a72f1f1b219b973d
[ "Apache-2.0" ]
null
null
null
arelle/examples/plugin/streamingExtensions.py
theredpea/Arelle
e53097f142a69b2fefc18298a72f1f1b219b973d
[ "Apache-2.0" ]
null
null
null
''' StreamingExtensions is a plug-in to both GUI menu and command line/web service that provides an alternative approach to big instance documents without building a DOM, to save memory footprint. lxml iterparse is used to parse the big instance. ModelObjects are specialized by features for efficiency and to avoid de...
49.367164
164
0.604245
import io, sys, os, time from decimal import Decimal, InvalidOperation from lxml import etree from collections import defaultdict from arelle import XbrlConst, XmlUtil, XmlValidate, ValidateXbrlDimensions from arelle.ModelDocument import ModelDocument, Type from arelle.ModelObject import ModelObject from arelle.ModelO...
true
true
f7fb1a059a90ee005d1e25c9193e4fb5d5b8dd5d
34
py
Python
kloppy/opta.py
benoitblanc/kloppy
5c3f94ff8806f9e23f8bad095a948a403a06a54c
[ "BSD-3-Clause" ]
null
null
null
kloppy/opta.py
benoitblanc/kloppy
5c3f94ff8806f9e23f8bad095a948a403a06a54c
[ "BSD-3-Clause" ]
null
null
null
kloppy/opta.py
benoitblanc/kloppy
5c3f94ff8806f9e23f8bad095a948a403a06a54c
[ "BSD-3-Clause" ]
null
null
null
from ._providers.opta import load
17
33
0.823529
from ._providers.opta import load
true
true
f7fb1a4a23e6f2290e1aacd696427c417d49f4e9
3,647
py
Python
google/ads/googleads/v4/services/services/location_view_service/transports/base.py
batardo/google-ads-python
a39748521847e85138fca593f3be2681352ad024
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v4/services/services/location_view_service/transports/base.py
batardo/google-ads-python
a39748521847e85138fca593f3be2681352ad024
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v4/services/services/location_view_service/transports/base.py
batardo/google-ads-python
a39748521847e85138fca593f3be2681352ad024
[ "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 o...
34.733333
78
0.674253
import abc import typing import pkg_resources from google import auth from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials from google.ads.googleads.v4.resources.types import location_view from google.ads.googleads.v4.services.typ...
true
true
f7fb1a50b25af0dadbac67140aa797a64ec03336
4,567
py
Python
jms_oidc_rp/middleware.py
BaiJiangJie/jumpserver-django-oidc-rp
b2d6a63dd82214263b8971412a9043268c31ba7f
[ "MIT" ]
1
2021-05-03T16:20:41.000Z
2021-05-03T16:20:41.000Z
jms_oidc_rp/middleware.py
BaiJiangJie/jumpserver-django-oidc-rp
b2d6a63dd82214263b8971412a9043268c31ba7f
[ "MIT" ]
null
null
null
jms_oidc_rp/middleware.py
BaiJiangJie/jumpserver-django-oidc-rp
b2d6a63dd82214263b8971412a9043268c31ba7f
[ "MIT" ]
2
2020-08-14T05:39:56.000Z
2020-09-14T22:26:21.000Z
""" OpenID Connect relying party (RP) middlewares ============================================= This modules defines middlewares allowing to better handle users authenticated using an OpenID Connect provider (OP). One of the main middlewares is responsible for periodically refreshing ID tokens and ...
40.776786
128
0.681848
import time import requests import requests.exceptions from django.contrib import auth from .conf.settings import dynamic_setting as oidc_rp_settings from .utils import validate_and_return_id_token, get_logger from .decorator import ssl_verification logger = get_logger(__file__) class OIDCRefreshIDTokenMiddlewar...
true
true
f7fb1ba6528e00d558dedf9d04faac54f413e044
4,612
py
Python
manubot/cite/zotero.py
benstear/manubot
df184a5c7e5eb98894a3edb43d9772d1ac3e01ab
[ "BSD-3-Clause" ]
null
null
null
manubot/cite/zotero.py
benstear/manubot
df184a5c7e5eb98894a3edb43d9772d1ac3e01ab
[ "BSD-3-Clause" ]
null
null
null
manubot/cite/zotero.py
benstear/manubot
df184a5c7e5eb98894a3edb43d9772d1ac3e01ab
[ "BSD-3-Clause" ]
null
null
null
""" Methods to interact with a Zotero translation-server. https://github.com/zotero/translation-server The Manubot team currently hosts a public translation server at https://translate.manubot.org. More information on this instance at https://github.com/manubot/manubot/issues/82. """ import json import logging impor...
33.664234
98
0.680182
import json import logging import requests from manubot.util import get_manubot_user_agent, is_http_url base_url = "https://translate.manubot.org" def web_query(url): headers = {"User-Agent": get_manubot_user_agent(), "Content-Type": "text/plain"} params = {"single": 1} api_url = f"{base_url}/web" ...
true
true
f7fb1bcc85e55a1c0f7cd1c2ad78746f6eea903b
1,409
py
Python
scripts/pop2.py
yarden-livnat/episim
fc6ad77bb62d3632fc101642c6c68a36813bc08a
[ "MIT" ]
null
null
null
scripts/pop2.py
yarden-livnat/episim
fc6ad77bb62d3632fc101642c6c68a36813bc08a
[ "MIT" ]
null
null
null
scripts/pop2.py
yarden-livnat/episim
fc6ad77bb62d3632fc101642c6c68a36813bc08a
[ "MIT" ]
null
null
null
import csv import time import os.path from sys import argv from collections import defaultdict PERSON_FILE = 'persons_ref.txt' ZIP_COUNTY_FILE = 'zip_county.csv' OUT_COUNTY_FILE = 'county_pop.csv' zip2county = defaultdict(str) pop = defaultdict(int) missing = defaultdict(int) # Init if len(argv) != 2: print 'U...
20.42029
66
0.605394
import csv import time import os.path from sys import argv from collections import defaultdict PERSON_FILE = 'persons_ref.txt' ZIP_COUNTY_FILE = 'zip_county.csv' OUT_COUNTY_FILE = 'county_pop.csv' zip2county = defaultdict(str) pop = defaultdict(int) missing = defaultdict(int) if len(argv) != 2: print 'Usage: ...
false
true
f7fb1cf6551ea08d02fa45fc877faafa31c94109
3,243
py
Python
ooobuild/dyn/sheet/cell_flags.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/sheet/cell_flags.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/sheet/cell_flags.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
34.136842
113
0.653716
from enum import IntFlag from typing import TYPE_CHECKING from ooo.oenv.env_const import UNO_ENVIRONMENT, UNO_RUNTIME _DYNAMIC = False if (not TYPE_CHECKING) and UNO_RUNTIME and UNO_ENVIRONMENT: _DYNAMIC = True if not TYPE_CHECKING and _DYNAMIC: from com.sun.star.sheet import CellFlags as C...
true
true
f7fb1d14e496b53b017c54f11e6c83eae533dbe7
1,070
py
Python
examples/cities/cities/commands/crawl.py
jiansongyang/scrapy-auto-translation-middelware
8107338275f2b1fbebc1e72a5512d4e44435cb57
[ "MIT" ]
4
2020-07-03T11:46:01.000Z
2021-11-15T08:07:45.000Z
examples/cities/cities/commands/crawl.py
jiansongyang/scrapy-auto-translation-middelware
8107338275f2b1fbebc1e72a5512d4e44435cb57
[ "MIT" ]
null
null
null
examples/cities/cities/commands/crawl.py
jiansongyang/scrapy-auto-translation-middelware
8107338275f2b1fbebc1e72a5512d4e44435cb57
[ "MIT" ]
1
2021-11-15T08:32:23.000Z
2021-11-15T08:32:23.000Z
from scrapy.exceptions import UsageError from scrapy.commands.crawl import Command as CrawlCommand import scrapy import re usage_info = """ Congratulations! You have correctly installed scrapy-auto-translation-middelware. The example project will show you how the middleware will work. However, you have to use you...
31.470588
129
0.769159
from scrapy.exceptions import UsageError from scrapy.commands.crawl import Command as CrawlCommand import scrapy import re usage_info = """ Congratulations! You have correctly installed scrapy-auto-translation-middelware. The example project will show you how the middleware will work. However, you have to use you...
true
true
f7fb1df55e38fb95603e4c520767d0651b0eec45
383
py
Python
Exercises/bin/dos.plot.py
addman2/KvantSim
7bfc56f909c6a007aac9ba973227f392c50b33e2
[ "MIT" ]
null
null
null
Exercises/bin/dos.plot.py
addman2/KvantSim
7bfc56f909c6a007aac9ba973227f392c50b33e2
[ "MIT" ]
null
null
null
Exercises/bin/dos.plot.py
addman2/KvantSim
7bfc56f909c6a007aac9ba973227f392c50b33e2
[ "MIT" ]
null
null
null
#!/usr/bin/env python import sys import numpy as np from matplotlib import pyplot as plt E, N = np.loadtxt(sys.argv[1], usecols = (0,1), unpack = True) plt.plot(E, N) try: plt.plot([float(sys.argv[2])] * 2, [max(N),0.0],"r-") except: pass plt.xlim([min(E),max(E)]) plt.ylim([0.0,max(N)]) plt.plot(plt.xlim(...
17.409091
62
0.613577
import sys import numpy as np from matplotlib import pyplot as plt E, N = np.loadtxt(sys.argv[1], usecols = (0,1), unpack = True) plt.plot(E, N) try: plt.plot([float(sys.argv[2])] * 2, [max(N),0.0],"r-") except: pass plt.xlim([min(E),max(E)]) plt.ylim([0.0,max(N)]) plt.plot(plt.xlim(),[0.0]*2,"k-") plt....
true
true
f7fb1f141576c32633397db9e4feba90d4c133ed
6,096
py
Python
tfx/components/tuner/component.py
johnPertoft/tfx
c6335684a54651adbcbe50aa52918b9b9948326e
[ "Apache-2.0" ]
null
null
null
tfx/components/tuner/component.py
johnPertoft/tfx
c6335684a54651adbcbe50aa52918b9b9948326e
[ "Apache-2.0" ]
null
null
null
tfx/components/tuner/component.py
johnPertoft/tfx
c6335684a54651adbcbe50aa52918b9b9948326e
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # 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 req...
45.492537
80
0.713255
from __future__ import absolute_import from __future__ import division from __future__ import print_function from typing import Any, Dict, NamedTuple, Optional, Text from kerastuner.engine import base_tuner from tfx import types from tfx.components.tuner import executor from tfx.components.util import ...
true
true
f7fb1f7937f7f2627bcc9af90dbc20e590ab8f6d
6,375
py
Python
tensorlib/rl/envs/wrappers/atari_wrappers.py
vermouth1992/torchlib
63b2bedb40f670b2d9fbfc0daeab4a8d44623095
[ "MIT" ]
3
2019-07-23T21:32:36.000Z
2022-02-04T23:13:30.000Z
tensorlib/rl/envs/wrappers/atari_wrappers.py
vermouth1992/torchlib
63b2bedb40f670b2d9fbfc0daeab4a8d44623095
[ "MIT" ]
null
null
null
tensorlib/rl/envs/wrappers/atari_wrappers.py
vermouth1992/torchlib
63b2bedb40f670b2d9fbfc0daeab4a8d44623095
[ "MIT" ]
1
2019-07-23T21:32:23.000Z
2019-07-23T21:32:23.000Z
""" Code copied from UC Berkeley CS294-112 """ from collections import deque import cv2 import gym import numpy as np from gym import spaces class NoopResetEnv(gym.Wrapper): def __init__(self, env=None, noop_max=30): """Sample initial states by taking random number of no-ops on reset. No-op is a...
34.090909
88
0.631529
from collections import deque import cv2 import gym import numpy as np from gym import spaces class NoopResetEnv(gym.Wrapper): def __init__(self, env=None, noop_max=30): super(NoopResetEnv, self).__init__(env) self.noop_max = noop_max assert env.unwrapped.get_action_meanings()[0] == 'NOO...
true
true
f7fb21e5c692bc51bb3f7e5c1812bdfdbd037d20
673
py
Python
base/migrations/0018_auto_20181014_0111.py
djangulo/integralpsychology.life
941e6c1ad1f274d7489d8ecdea5ae72f4889cc4b
[ "MIT" ]
null
null
null
base/migrations/0018_auto_20181014_0111.py
djangulo/integralpsychology.life
941e6c1ad1f274d7489d8ecdea5ae72f4889cc4b
[ "MIT" ]
null
null
null
base/migrations/0018_auto_20181014_0111.py
djangulo/integralpsychology.life
941e6c1ad1f274d7489d8ecdea5ae72f4889cc4b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-14 01:11 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('base', '0017_auto_20181014_0105'), ] operations =...
30.590909
231
0.673105
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('base', '0017_auto_20181014_0105'), ] operations = [ migrations.AlterField( model_name='stylesnippet',...
true
true
f7fb223ee06321e39762c1047848e35c70f008d6
215,692
py
Python
tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py
renovate-bot/python-bigtable
a99bf88417d6aec03923447c70c2752f6bb5c459
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py
renovate-bot/python-bigtable
a99bf88417d6aec03923447c70c2752f6bb5c459
[ "Apache-2.0" ]
null
null
null
tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py
renovate-bot/python-bigtable
a99bf88417d6aec03923447c70c2752f6bb5c459
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
38.256829
138
0.696391
import os import mock import packaging.version import grpc from grpc.experimental import aio import math import pytest from proto.marshal.rules.dates import DurationRule, TimestampRule from google.api_core import client_options from google.api_core import exceptions as core_exceptions from google.api_...
true
true
f7fb22471c1dc26094f9fab0f04f6eeabc78b20a
2,263
py
Python
tests/test_bytecode.py
4577/Jawa
23f93020ef6687567e45a9afa09bfd6e0faf6f0a
[ "MIT" ]
null
null
null
tests/test_bytecode.py
4577/Jawa
23f93020ef6687567e45a9afa09bfd6e0faf6f0a
[ "MIT" ]
null
null
null
tests/test_bytecode.py
4577/Jawa
23f93020ef6687567e45a9afa09bfd6e0faf6f0a
[ "MIT" ]
1
2021-01-21T12:17:39.000Z
2021-01-21T12:17:39.000Z
from jawa.util.bytecode import Instruction, Operand, OperandTypes GOOD_TABLE_SWITCH = [ Instruction(mnemonic='iconst_1', opcode=4, operands=[], pos=0), Instruction(mnemonic='tableswitch', opcode=170, operands=[ # DEFAULT Operand(OperandTypes.BRANCH, value=30), # LOW Operand(Ope...
32.797101
68
0.679187
from jawa.util.bytecode import Instruction, Operand, OperandTypes GOOD_TABLE_SWITCH = [ Instruction(mnemonic='iconst_1', opcode=4, operands=[], pos=0), Instruction(mnemonic='tableswitch', opcode=170, operands=[ Operand(OperandTypes.BRANCH, value=30), Operand(OperandTypes.LITE...
true
true
f7fb236444830288f2d7add9e4ac6a27b3bf2e95
9,004
py
Python
cvxportfolio/tests/test_what_if.py
Andreas237/cvxportfolio
46910e9ac62797ffc962bd090bea9bf8eb598053
[ "Apache-2.0" ]
472
2017-05-02T07:09:16.000Z
2022-03-30T14:00:46.000Z
cvxportfolio/tests/test_what_if.py
Andreas237/cvxportfolio
46910e9ac62797ffc962bd090bea9bf8eb598053
[ "Apache-2.0" ]
64
2017-07-18T22:21:53.000Z
2021-12-31T10:36:32.000Z
cvxportfolio/tests/test_what_if.py
Andreas237/cvxportfolio
46910e9ac62797ffc962bd090bea9bf8eb598053
[ "Apache-2.0" ]
190
2017-07-12T18:03:19.000Z
2022-03-10T02:10:26.000Z
""" Copyright 2016 Stephen Boyd, Enzo Busseti, Steven Diamond, BlackRock Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appl...
43.921951
79
0.577077
import os import cvxpy as cvx import numpy as np import pandas as pd import copy from cvxportfolio import simulator, HcostModel, TcostModel, SinglePeriodOpt from cvxportfolio import ReturnsForecast, MultipleReturnsForecasts, FullSigma from .base_test import BaseTest DIR = os.path.dirname(__file__) + os.path.sep c...
true
true
f7fb2368015b9f9a345bcee68ccddb6d92a0896a
3,214
py
Python
tktoolbox/examples/fractal_threaded.py
modal/tktoolbox
bfb1c5166818bf0f0776a10598515b6ec00fc450
[ "Apache-2.0" ]
null
null
null
tktoolbox/examples/fractal_threaded.py
modal/tktoolbox
bfb1c5166818bf0f0776a10598515b6ec00fc450
[ "Apache-2.0" ]
null
null
null
tktoolbox/examples/fractal_threaded.py
modal/tktoolbox
bfb1c5166818bf0f0776a10598515b6ec00fc450
[ "Apache-2.0" ]
null
null
null
import tkinter as tk import threading from queue import Queue #Globals WIDE = 200 # image dimensions HIGH = 200 # REAL_FROM = -2 # bounds of fractal in the complex plane REAL_TO = 1 # IMAG_FROM = -1.5 # imaginary coords => y-direction IMAG_TO = 1.5 # N = 64 class MandelbrotWorker(...
30.037383
78
0.520535
import tkinter as tk import threading from queue import Queue WIDE = 200 HIGH = 200 REAL_FROM = -2 REAL_TO = 1 IMAG_FROM = -1.5 IMAG_TO = 1.5 N = 64 class MandelbrotWorker(threading.Thread): def __init__(self, aQueue, imgWidth, imgHeight, bounds, **kwargs): thre...
true
true
f7fb23b0a7825df7c03f6fbc8d993ef3a45f44f7
2,410
py
Python
workspace_tools/host_tests/host_tests_plugins/module_copy_shell.py
mfiore02/mbed
fd285784c911f5af9ca51a29aa9908857db59b9d
[ "Apache-2.0" ]
54
2015-12-21T13:07:43.000Z
2019-04-16T20:06:25.000Z
workspace_tools/host_tests/host_tests_plugins/module_copy_shell.py
GustavWi/mbed
ea01d61fa18430564b78226045b196bb6bf6b66a
[ "Apache-2.0" ]
10
2015-10-31T15:16:14.000Z
2019-03-12T13:25:29.000Z
workspace_tools/host_tests/host_tests_plugins/module_copy_shell.py
GustavWi/mbed
ea01d61fa18430564b78226045b196bb6bf6b66a
[ "Apache-2.0" ]
30
2015-12-27T21:44:56.000Z
2019-03-26T07:13:26.000Z
""" mbed SDK Copyright (c) 2011-2013 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
37.076923
100
0.671369
import os from os.path import join, basename from host_test_plugins import HostTestPluginBase class HostTestPluginCopyMethod_Shell(HostTestPluginBase): name = 'HostTestPluginCopyMethod_Shell' type = 'CopyMethod' stable = True capabilities = ['shell', 'cp', 'copy', 'xcopy'] required_paramete...
true
true
f7fb23be1884a2204749e3ea4ab7ef13aed04b45
89
py
Python
application/__init__.py
tafowocedric/icarehealthcenterapi
f9c74adc3db1b9b0e2bb0e66d1f7fb2bfffef512
[ "MIT" ]
null
null
null
application/__init__.py
tafowocedric/icarehealthcenterapi
f9c74adc3db1b9b0e2bb0e66d1f7fb2bfffef512
[ "MIT" ]
null
null
null
application/__init__.py
tafowocedric/icarehealthcenterapi
f9c74adc3db1b9b0e2bb0e66d1f7fb2bfffef512
[ "MIT" ]
null
null
null
from sqlalchemy.ext.declarative import declarative_base Base_Model = declarative_base()
22.25
55
0.853933
from sqlalchemy.ext.declarative import declarative_base Base_Model = declarative_base()
true
true
f7fb23cb0953a0e4999ea5a318d8fcc56d66e56f
936
py
Python
restaurants/models.py
electricsheepindream/menu
009576c1da4a35d655abab8be66c31c5ad0d3635
[ "MIT" ]
null
null
null
restaurants/models.py
electricsheepindream/menu
009576c1da4a35d655abab8be66c31c5ad0d3635
[ "MIT" ]
null
null
null
restaurants/models.py
electricsheepindream/menu
009576c1da4a35d655abab8be66c31c5ad0d3635
[ "MIT" ]
null
null
null
from django.conf import settings from django.db import models from django.utils.text import slugify from django.db.models.signals import pre_save from django.core.urlresolvers import reverse # Create your models here. User = settings.AUTH_USER_MODEL class Restaurants(models.Model): owner = models.ForeignKey(User...
30.193548
70
0.742521
from django.conf import settings from django.db import models from django.utils.text import slugify from django.db.models.signals import pre_save from django.core.urlresolvers import reverse User = settings.AUTH_USER_MODEL class Restaurants(models.Model): owner = models.ForeignKey(User) name = models.CharFi...
true
true