hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f74709a36f618b31556614f51648ea168bff70d3
2,307
py
Python
jishaku/help_command.py
ExpertTutorials/Hishaku
fcdcd677cde0b580b41fe50b9df549e23eb0edc3
[ "MIT" ]
null
null
null
jishaku/help_command.py
ExpertTutorials/Hishaku
fcdcd677cde0b580b41fe50b9df549e23eb0edc3
[ "MIT" ]
null
null
null
jishaku/help_command.py
ExpertTutorials/Hishaku
fcdcd677cde0b580b41fe50b9df549e23eb0edc3
[ "MIT" ]
1
2021-09-14T16:50:28.000Z
2021-09-14T16:50:28.000Z
# -*- coding: utf-8 -*- """ jishaku.help_command ~~~~~~~~~~~~~~~~~~~~ HelpCommand subclasses with jishaku features :copyright: (c) 2021 Devon (Gorialis) R :license: MIT, see LICENSE for more details. """ from hashcord.ext import commands from jishaku.paginators import PaginatorEmbedInterface, PaginatorInterface ...
30.76
105
0.721283
from hashcord.ext import commands from jishaku.paginators import PaginatorEmbedInterface, PaginatorInterface class DefaultPaginatorHelp(commands.DefaultHelpCommand): def __init__(self, **options): paginator = options.pop('paginator', commands.Paginator(max_size=1985)) super().__init__(pagina...
true
true
f7470bd0387110d3a349147b26ffb6cb9c90b289
149
py
Python
flask_react/config.py
ripitrust/flask_react
a77b8e6ce54d6f58c92863370c3767b9001cc19c
[ "MIT" ]
2
2020-10-12T00:24:38.000Z
2021-07-25T16:59:52.000Z
flask_react/config.py
ripitrust/flask_react
a77b8e6ce54d6f58c92863370c3767b9001cc19c
[ "MIT" ]
null
null
null
flask_react/config.py
ripitrust/flask_react
a77b8e6ce54d6f58c92863370c3767b9001cc19c
[ "MIT" ]
null
null
null
import os class Config(object): def __init__(self, name=None, path=None): self.name = name self.path = os.path.abspath(path)
14.9
45
0.624161
import os class Config(object): def __init__(self, name=None, path=None): self.name = name self.path = os.path.abspath(path)
true
true
f7470bdbbe057c4ef657aa4bddda373025b88a37
2,339
py
Python
aliyun-python-sdk-live/aliyunsdklive/request/v20161101/CreateMixStreamRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-live/aliyunsdklive/request/v20161101/CreateMixStreamRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-live/aliyunsdklive/request/v20161101/CreateMixStreamRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
34.397059
76
0.767422
from aliyunsdkcore.request import RpcRequest from aliyunsdklive.endpoint import endpoint_data class CreateMixStreamRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'live', '2016-11-01', 'CreateMixStream','live') self.set_method('POST') if hasattr(self, "endpoint_map"): ...
true
true
f7470bff190887ccf9bd0ff3eb570902e9594734
11,834
py
Python
src/python/zquantum/core/circuits/conversions/qiskit_conversions.py
alexjuda2/z-quantum-core
c258100dbd091f0b22495b77b36399426ae9abac
[ "Apache-2.0" ]
null
null
null
src/python/zquantum/core/circuits/conversions/qiskit_conversions.py
alexjuda2/z-quantum-core
c258100dbd091f0b22495b77b36399426ae9abac
[ "Apache-2.0" ]
null
null
null
src/python/zquantum/core/circuits/conversions/qiskit_conversions.py
alexjuda2/z-quantum-core
c258100dbd091f0b22495b77b36399426ae9abac
[ "Apache-2.0" ]
null
null
null
import hashlib from typing import Dict, Iterable, List, NamedTuple, Sequence, Tuple, Union import numpy as np import qiskit import sympy from .. import _builtin_gates, _circuit, _gates from ..symbolic.qiskit_expressions import QISKIT_DIALECT, expression_from_qiskit from ..symbolic.sympy_expressions import SYMPY_DIALE...
34.703812
88
0.730522
import hashlib from typing import Dict, Iterable, List, NamedTuple, Sequence, Tuple, Union import numpy as np import qiskit import sympy from .. import _builtin_gates, _circuit, _gates from ..symbolic.qiskit_expressions import QISKIT_DIALECT, expression_from_qiskit from ..symbolic.sympy_expressions import SYMPY_DIALE...
true
true
f7470c0641c7c582a71a487e316ddc405709a1ad
18,129
py
Python
code/final_rrl.py
aalaprana995/Turtlebot_Navigation_Non_Holonomic_Constrains-
9978467def69080fcd4da7c856e54b6ebda98248
[ "Unlicense" ]
null
null
null
code/final_rrl.py
aalaprana995/Turtlebot_Navigation_Non_Holonomic_Constrains-
9978467def69080fcd4da7c856e54b6ebda98248
[ "Unlicense" ]
null
null
null
code/final_rrl.py
aalaprana995/Turtlebot_Navigation_Non_Holonomic_Constrains-
9978467def69080fcd4da7c856e54b6ebda98248
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Apr 28 00:33:10 2019 @author: Aalap """ # -*- coding: utf-8 -* """ Created on Thu Mar 28 18:47:25 2019 @author: Aalap """ import numpy as np import matplotlib.pyplot as plt import math class Node: def __init__(self, nodex, nodey,nodetheta, cost, p...
35.201942
140
0.529097
import numpy as np import matplotlib.pyplot as plt import math class Node: def __init__(self, nodex, nodey,nodetheta, cost, parentnode,vx,vy,vt): self.nodex = nodex self.nodey = nodey self.nodetheta=nodetheta self.cost = cost self.parentnode = parentnode ...
true
true
f7470c3e1cf06d51d9d088d5173d548c73dc2c0d
1,561
py
Python
flowvision/layers/regularization/droppath.py
ZiqiuChi/vision
b5ecf5431f7767d8920a69005e7822185ad31f81
[ "BSD-3-Clause" ]
40
2021-10-19T02:34:56.000Z
2022-03-25T07:49:44.000Z
flowvision/layers/regularization/droppath.py
ZiqiuChi/vision
b5ecf5431f7767d8920a69005e7822185ad31f81
[ "BSD-3-Clause" ]
53
2021-10-22T02:24:44.000Z
2022-03-31T04:20:47.000Z
flowvision/layers/regularization/droppath.py
ZiqiuChi/vision
b5ecf5431f7767d8920a69005e7822185ad31f81
[ "BSD-3-Clause" ]
11
2022-01-06T02:57:07.000Z
2022-03-23T15:19:51.000Z
""" Modified from https://github.com/rwightman/pytorch-image-models/blob/master/timm/models/layers/drop.py """ import oneflow as flow import oneflow.nn as nn import oneflow.nn.functional as F def drop_path(x, drop_prob: float = 0.5, training: bool = False): """Drop paths (Stochastic Depth) per sample (when appli...
39.025
108
0.695708
import oneflow as flow import oneflow.nn as nn import oneflow.nn.functional as F def drop_path(x, drop_prob: float = 0.5, training: bool = False): if drop_prob == 0.0 or not training: return x keep_prob = 1 - drop_prob shape = (x.shape[0],) + (1,) * ( x.ndim - 1 ) random_tensor ...
true
true
f7470cbdec80026c46e3da86152a22f595f8aa0f
4,971
py
Python
ros/src/twist_controller/dbw_node.py
deepakzambre/SystemIntegration
0449c73d5e141b170341eca835b9ca0e3ea282bd
[ "MIT" ]
null
null
null
ros/src/twist_controller/dbw_node.py
deepakzambre/SystemIntegration
0449c73d5e141b170341eca835b9ca0e3ea282bd
[ "MIT" ]
null
null
null
ros/src/twist_controller/dbw_node.py
deepakzambre/SystemIntegration
0449c73d5e141b170341eca835b9ca0e3ea282bd
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy from std_msgs.msg import Bool from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport from geometry_msgs.msg import TwistStamped import math from twist_controller import Controller ''' You can build this node only after you have built (or partially built) th...
38.534884
101
0.665862
import rospy from std_msgs.msg import Bool from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport from geometry_msgs.msg import TwistStamped import math from twist_controller import Controller class DBWNode(object): def __init__(self): rospy.init_node('dbw_node') vehic...
true
true
f7470d2d3cfdfbe078ce683175c4bd4135846fc6
1,587
py
Python
routemaster/gunicorn_application.py
thread/routemaster
1fd997a3bcee5e6760e9f7a60cb54323c3dfdc41
[ "MIT" ]
13
2018-01-16T14:26:27.000Z
2022-03-19T12:43:17.000Z
routemaster/gunicorn_application.py
thread/routemaster
1fd997a3bcee5e6760e9f7a60cb54323c3dfdc41
[ "MIT" ]
86
2018-01-03T17:00:56.000Z
2021-12-06T12:58:06.000Z
routemaster/gunicorn_application.py
thread/routemaster
1fd997a3bcee5e6760e9f7a60cb54323c3dfdc41
[ "MIT" ]
3
2018-02-21T23:13:45.000Z
2022-03-19T12:43:23.000Z
"""Top-level gunicorn application for `routemaster serve`.""" from typing import Callable import gunicorn.app.base from routemaster.utils import WSGICallable class GunicornWSGIApplication(gunicorn.app.base.BaseApplication): """gunicorn application for routemaster.""" def __init__( self, ap...
27.362069
76
0.589792
from typing import Callable import gunicorn.app.base from routemaster.utils import WSGICallable class GunicornWSGIApplication(gunicorn.app.base.BaseApplication): def __init__( self, app: WSGICallable, *, bind: str, debug: bool, workers: int, post_fork: C...
true
true
f7470d3e9c259bf87df531070992f7d07655b318
3,660
py
Python
salt/states/blockdev.py
aletourneau/salt
d7013a2f64eb4b79592220d76274bc5dde609e08
[ "Apache-2.0" ]
null
null
null
salt/states/blockdev.py
aletourneau/salt
d7013a2f64eb4b79592220d76274bc5dde609e08
[ "Apache-2.0" ]
null
null
null
salt/states/blockdev.py
aletourneau/salt
d7013a2f64eb4b79592220d76274bc5dde609e08
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Management of Block Devices =================================== A state module to manage blockdevices .. code-block:: yaml /dev/sda: blockdev.tuned: - read-only: True master-data: blockdev: - tuned: - name : /dev/vg/master-data - read-...
24.4
78
0.531421
from __future__ import absolute_import import os import os.path import salt.utils def __virtual__(): if salt.utils.is_windows(): return False return True def tuned(name, **kwargs): ret = {'changes': {}, 'comment': '', 'name': name, 'result': True} if n...
true
true
f7470d8dd5a2e42d2b128b950c869f1ed56901b5
140
py
Python
twitter_gen/db_migration/0002.addindex.py
liufuyang/twitter_tesla
8a5c0a8e13d8a09aa24b609819ad3b4faf9f7542
[ "MIT" ]
null
null
null
twitter_gen/db_migration/0002.addindex.py
liufuyang/twitter_tesla
8a5c0a8e13d8a09aa24b609819ad3b4faf9f7542
[ "MIT" ]
null
null
null
twitter_gen/db_migration/0002.addindex.py
liufuyang/twitter_tesla
8a5c0a8e13d8a09aa24b609819ad3b4faf9f7542
[ "MIT" ]
null
null
null
__depends__ = ['0001.create'] step( """CREATE INDEX idx_created_at ON tweets(created_at DESC);""", "DROP INDEX idx_created_at", )
17.5
66
0.678571
__depends__ = ['0001.create'] step( """CREATE INDEX idx_created_at ON tweets(created_at DESC);""", "DROP INDEX idx_created_at", )
true
true
f7470f61bb4e99f373e4fbc19aa021a976d225ef
1,211
py
Python
check_brackets.py
mrcrnkovich/random_scripts
a77af23e985c0ceef799f886cb24982ab3f2e7db
[ "MIT" ]
null
null
null
check_brackets.py
mrcrnkovich/random_scripts
a77af23e985c0ceef799f886cb24982ab3f2e7db
[ "MIT" ]
null
null
null
check_brackets.py
mrcrnkovich/random_scripts
a77af23e985c0ceef799f886cb24982ab3f2e7db
[ "MIT" ]
null
null
null
# python3 from collections import namedtuple Bracket = namedtuple("Bracket", ["char", "position"]) def are_matching(left, right): return (left + right) in ["()", "[]", "{}"] def find_mismatch(text): opening_brackets_stack = [] mismatch = [] for i, next in enumerate(text): # Process ...
24.22
68
0.575557
from collections import namedtuple Bracket = namedtuple("Bracket", ["char", "position"]) def are_matching(left, right): return (left + right) in ["()", "[]", "{}"] def find_mismatch(text): opening_brackets_stack = [] mismatch = [] for i, next in enumerate(text): if next in...
true
true
f747101d66f0d799832bde2dc14cbc4b03a9207b
514
py
Python
webui/flaski/models.py
jphacks/NG_1703
0c0bec03d71f467f90d8fbe01b31ed4341f3e1a5
[ "MIT" ]
1
2017-10-31T10:18:08.000Z
2017-10-31T10:18:08.000Z
webui/flaski/models.py
jphacks/NG_1703
0c0bec03d71f467f90d8fbe01b31ed4341f3e1a5
[ "MIT" ]
null
null
null
webui/flaski/models.py
jphacks/NG_1703
0c0bec03d71f467f90d8fbe01b31ed4341f3e1a5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from sqlalchemy import Column, Integer, String, Text, DateTime from flaski.database import Base from datetime import datetime class WikiContent(Base): __tablename__ = 'wikicontents' id = Column(Integer, primary_key = True) title = Column(String(128), unique = True) body = Column(Text) de...
27.052632
97
0.70428
from sqlalchemy import Column, Integer, String, Text, DateTime from flaski.database import Base from datetime import datetime class WikiContent(Base): __tablename__ = 'wikicontents' id = Column(Integer, primary_key = True) title = Column(String(128), unique = True) body = Column(Text) def __init__(self, title...
true
true
f74710349a3103b8f5e0f02169118a02160d0b43
3,437
py
Python
MaixPy/tools/kconfig/Kconfiglib/examples/find_symbol.py
valerio-vaccaro/krux
a3718a4e12ef6f92ada98e02d0d286a971a56434
[ "MIT" ]
302
2015-03-21T06:36:29.000Z
2022-03-27T06:41:04.000Z
MaixPy/tools/kconfig/Kconfiglib/examples/find_symbol.py
valerio-vaccaro/krux
a3718a4e12ef6f92ada98e02d0d286a971a56434
[ "MIT" ]
104
2015-02-16T20:05:48.000Z
2022-03-15T23:50:57.000Z
MaixPy/tools/kconfig/Kconfiglib/examples/find_symbol.py
valerio-vaccaro/krux
a3718a4e12ef6f92ada98e02d0d286a971a56434
[ "MIT" ]
120
2015-02-16T18:05:09.000Z
2022-03-17T02:28:29.000Z
# Prints all menu nodes that reference a given symbol any of their properties # or property conditions, along with their parent menu nodes. # # Usage: # # $ make [ARCH=<arch>] scriptconfig SCRIPT=Kconfiglib/examples/find_symbol.py SCRIPT_ARG=<name> # # Example output for SCRIPT_ARG=X86: # # Found 470 locations that...
30.415929
97
0.637184
import sys import kconfiglib if len(sys.argv) < 3: sys.exit('Pass symbol name (without "CONFIG_" prefix) with SCRIPT_ARG=<name>') kconf = kconfiglib.Kconfig(sys.argv[1]) sym_name = sys.argv[2] if sym_name not in kconf.syms: print("N...
true
true
f747108e65957765e3704f97eb94e1b76555f7c8
2,297
py
Python
src/main/views/comment.py
Karim-Valeev/django-pikabu
8e152cfb9a34f23d21385851bc08ba34fe15d6f1
[ "MIT" ]
1
2021-11-24T13:44:56.000Z
2021-11-24T13:44:56.000Z
src/main/views/comment.py
Karim-Valeev/django-pikabu
8e152cfb9a34f23d21385851bc08ba34fe15d6f1
[ "MIT" ]
1
2021-11-23T11:32:44.000Z
2021-11-27T22:31:41.000Z
src/main/views/comment.py
Karim-Valeev/django-pikabu
8e152cfb9a34f23d21385851bc08ba34fe15d6f1
[ "MIT" ]
null
null
null
from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.urls import reverse_lazy from django.views.generic import CreateView from django.views.generic import DeleteView from django.views.generic import UpdateView f...
35.890625
80
0.709186
from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.urls import reverse_lazy from django.views.generic import CreateView from django.views.generic import DeleteView from django.views.generic import UpdateView f...
true
true
f74710bc2bc8a5f14bd94bf624569c968cdf4474
8,892
py
Python
electrum_ltc/gui/kivy/uix/dialogs/addresses.py
cryptomountain/electrum-ltc
67c080c0fc9e5fd698e47f51fa0664c7c05850af
[ "MIT" ]
null
null
null
electrum_ltc/gui/kivy/uix/dialogs/addresses.py
cryptomountain/electrum-ltc
67c080c0fc9e5fd698e47f51fa0664c7c05850af
[ "MIT" ]
1
2022-03-06T09:22:26.000Z
2022-03-06T09:22:26.000Z
electrum_ltc/gui/kivy/uix/dialogs/addresses.py
isabella232/electrum-ltc
8307e3978b12ae27fc3f750f47cda7f18d5fafe5
[ "MIT" ]
1
2022-03-06T09:16:48.000Z
2022-03-06T09:16:48.000Z
from typing import TYPE_CHECKING from kivy.app import App from kivy.clock import Clock from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from decimal import Decimal from kivy.uix.popup import Popup from electrum_ltc.gui.kivy.i18n import _ from ...util import add...
32.691176
151
0.527103
from typing import TYPE_CHECKING from kivy.app import App from kivy.clock import Clock from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from decimal import Decimal from kivy.uix.popup import Popup from electrum_ltc.gui.kivy.i18n import _ from ...util import add...
true
true
f747110f318718a46688524a6c0e2b265ad4f786
46,193
py
Python
tensorflow/python/framework/func_graph.py
plopresti/tensorflow
8b0c84d30d957596cbb3bcac9245e114c3f0b65b
[ "Apache-2.0" ]
1
2019-07-17T17:37:50.000Z
2019-07-17T17:37:50.000Z
tensorflow/python/framework/func_graph.py
plopresti/tensorflow
8b0c84d30d957596cbb3bcac9245e114c3f0b65b
[ "Apache-2.0" ]
3
2020-10-14T00:35:40.000Z
2022-02-09T22:35:09.000Z
tensorflow/python/framework/func_graph.py
plopresti/tensorflow
8b0c84d30d957596cbb3bcac9245e114c3f0b65b
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.850649
97
0.695062
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections as py_collections import itertools import weakref from tensorflow.core.framework import attr_value_pb2 from tensorflow.python.eager import context from tensorflow.python.eager...
true
true
f7471207e739d6b43f13d746c8edd27468934910
12,835
py
Python
tests/test_sim.py
lydian/mrjob
13028274296f5618d63ffc00301537fd385eef82
[ "Apache-2.0" ]
null
null
null
tests/test_sim.py
lydian/mrjob
13028274296f5618d63ffc00301537fd385eef82
[ "Apache-2.0" ]
null
null
null
tests/test_sim.py
lydian/mrjob
13028274296f5618d63ffc00301537fd385eef82
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Yelp # Copyright 2018 Yelp # # 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 i...
33.337662
78
0.619945
from io import BytesIO import gzip import os import os.path import stat from mrjob import conf from mrjob.inline import InlineMRJobRunner from mrjob.job import MRJob from mrjob.protocol import JSONValueProtocol from mrjob.step import MRStep from tests.mr_group import MRGroup from tests.mr_no_mapper impo...
true
true
f7471237d7612679736c43ff17a0bce3f19bd112
1,965
py
Python
lib/pymedphys/cli/dev.py
dg1an3/pymedphys
bdca9c783aae8b5e1f231e6cb0bc69895e4b9329
[ "Apache-2.0" ]
2
2020-02-04T03:21:20.000Z
2020-04-11T14:17:53.000Z
lib/pymedphys/cli/dev.py
SimonBiggs/pymedphys
83f02eac6549ac155c6963e0a8d1f9284359b652
[ "Apache-2.0" ]
null
null
null
lib/pymedphys/cli/dev.py
SimonBiggs/pymedphys
83f02eac6549ac155c6963e0a8d1f9284359b652
[ "Apache-2.0" ]
null
null
null
from pymedphys._dev import docs, propagate, tests def dev_cli(subparsers): dev_parser = subparsers.add_parser("dev") dev_subparsers = dev_parser.add_subparsers(dest="dev") add_docs_parser(dev_subparsers) add_test_parser(dev_subparsers) add_lint_parser(dev_subparsers) add_propagate_parser(dev_s...
28.071429
87
0.74402
from pymedphys._dev import docs, propagate, tests def dev_cli(subparsers): dev_parser = subparsers.add_parser("dev") dev_subparsers = dev_parser.add_subparsers(dest="dev") add_docs_parser(dev_subparsers) add_test_parser(dev_subparsers) add_lint_parser(dev_subparsers) add_propagate_parser(dev_s...
true
true
f74713ca198f5fbdfd91697317946d09507ab4b6
1,186
py
Python
android/dynamicuniformbuffer/build.py
MNannig/Vulkan-Examples
9d76cea05fadf3a6eefae3094c500f84020f706b
[ "MIT" ]
2
2019-08-06T04:33:35.000Z
2019-10-06T20:03:58.000Z
android/dynamicuniformbuffer/build.py
LiangYue1981816/GraphicsSamples-Vulkan
d15daabc582d4f8b198fdd6ec5651ec4298182a1
[ "MIT" ]
null
null
null
android/dynamicuniformbuffer/build.py
LiangYue1981816/GraphicsSamples-Vulkan
d15daabc582d4f8b198fdd6ec5651ec4298182a1
[ "MIT" ]
1
2022-03-23T20:26:33.000Z
2022-03-23T20:26:33.000Z
import os import shutil import subprocess import sys import glob APK_NAME = "vulkanDynamicuniformbuffer" SHADER_DIR = "dynamicuniformbuffer" if subprocess.call("ndk-build", shell=True) == 0: print("Build successful") os.makedirs("./assets/shaders/base", exist_ok=True) os.makedirs("./assets/shaders/%s"...
33.885714
88
0.610455
import os import shutil import subprocess import sys import glob APK_NAME = "vulkanDynamicuniformbuffer" SHADER_DIR = "dynamicuniformbuffer" if subprocess.call("ndk-build", shell=True) == 0: print("Build successful") os.makedirs("./assets/shaders/base", exist_ok=True) os.makedirs("./assets/shaders/%s"...
true
true
f74713d046f0f74301aae8b800d900e161551d5f
2,936
py
Python
python/orp/orp/content_enrichment/test/test_deontic_language.py
UKGovernmentBEIS/open-regulation-platform-alpha
c1170fc7d9563cbdeda094df87c606ad622bfcf2
[ "MIT" ]
null
null
null
python/orp/orp/content_enrichment/test/test_deontic_language.py
UKGovernmentBEIS/open-regulation-platform-alpha
c1170fc7d9563cbdeda094df87c606ad622bfcf2
[ "MIT" ]
null
null
null
python/orp/orp/content_enrichment/test/test_deontic_language.py
UKGovernmentBEIS/open-regulation-platform-alpha
c1170fc7d9563cbdeda094df87c606ad622bfcf2
[ "MIT" ]
null
null
null
# # Copyright (C) Analytics Engines 2021 # Lauren Stephens (l.stephens@analyticsengines.com) # from re import X import sys import pytest import os sys.path.append('python/orp') from orp.content_enrichment.deontic_language import * @pytest.fixture def xml_doc(): with open('python/orp/orp/content_enrichment/test/...
45.875
265
0.637262
from re import X import sys import pytest import os sys.path.append('python/orp') from orp.content_enrichment.deontic_language import * @pytest.fixture def xml_doc(): with open('python/orp/orp/content_enrichment/test/data/test_akomaNtoso.xml','r') as f: xml_doc = f.read() return xml_doc def te...
true
true
f74714c1eece3a59a437c3b02cf361f5a6d2eb86
1,766
py
Python
ticketflix/taskapp/celery.py
DSW-2018-2/Arquitetura-Desenho-2018-2
d417895904c1a12ba2a9d761d7e60be77b7bcac2
[ "MIT" ]
3
2018-12-12T09:56:36.000Z
2021-11-24T00:03:07.000Z
ticketflix/taskapp/celery.py
DSW-2018-2/Ticketflix
d417895904c1a12ba2a9d761d7e60be77b7bcac2
[ "MIT" ]
20
2018-08-23T11:31:11.000Z
2018-11-22T20:44:09.000Z
ticketflix/taskapp/celery.py
DSW-2018-2/Arquitetura-Desenho-2018-2
d417895904c1a12ba2a9d761d7e60be77b7bcac2
[ "MIT" ]
2
2018-12-14T09:11:05.000Z
2020-08-06T22:45:12.000Z
import os from celery import Celery from django.apps import apps, AppConfig from django.conf import settings if not settings.configured: # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local') # pragma: no cover app = Cele...
36.040816
99
0.697055
import os from celery import Celery from django.apps import apps, AppConfig from django.conf import settings if not settings.configured: os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local') app = Celery('ticketflix') class CeleryAppConfig(AppConfig): name = 'ticketflix.taskapp'...
true
true
f747157d1477c6575daad71673afa8f4d1c93b12
503
py
Python
velarium/color.py
holthe/velarium
c16f608f1f99b1fab6b3556b2da414ea41777f80
[ "MIT" ]
2
2018-04-07T21:38:24.000Z
2020-01-22T19:14:01.000Z
velarium/color.py
holthe/velarium
c16f608f1f99b1fab6b3556b2da414ea41777f80
[ "MIT" ]
null
null
null
velarium/color.py
holthe/velarium
c16f608f1f99b1fab6b3556b2da414ea41777f80
[ "MIT" ]
null
null
null
class Color(object): """Class used for colouring terminal output.""" def __init__(self): pass PURPLE = '\033[95m' CYAN = '\033[96m' DARK_CYAN = '\033[36m' BLUE = '\033[94m' GREEN = '\033[92m' YELLOW = '\033[93m' RED = '\033[91m' BOLD = '\033[1m' UNDERLINE = '\033[4m...
22.863636
60
0.544732
class Color(object): def __init__(self): pass PURPLE = '\033[95m' CYAN = '\033[96m' DARK_CYAN = '\033[36m' BLUE = '\033[94m' GREEN = '\033[92m' YELLOW = '\033[93m' RED = '\033[91m' BOLD = '\033[1m' UNDERLINE = '\033[4m' END = '\033[0m' @classmethod def bold...
true
true
f74715a7429c33b4923912c245fb8fbb9d35f168
3,655
py
Python
test/geocoders/util.py
deliveryhero/geopy
552c699dd8f65394b794275883866be1fd19c22a
[ "MIT" ]
null
null
null
test/geocoders/util.py
deliveryhero/geopy
552c699dd8f65394b794275883866be1fd19c22a
[ "MIT" ]
null
null
null
test/geocoders/util.py
deliveryhero/geopy
552c699dd8f65394b794275883866be1fd19c22a
[ "MIT" ]
null
null
null
import os import json import unittest from collections import defaultdict from geopy.compat import string_compare, py3k from geopy import exc try: env = defaultdict(lambda: None) with open(".test_keys") as fp: env.update(json.loads(fp.read())) except IOError: keys = ( 'ARCGIS_USERNAME', ...
27.689394
74
0.567168
import os import json import unittest from collections import defaultdict from geopy.compat import string_compare, py3k from geopy import exc try: env = defaultdict(lambda: None) with open(".test_keys") as fp: env.update(json.loads(fp.read())) except IOError: keys = ( 'ARCGIS_USERNAME', ...
true
true
f74715a7857b10b5e63996aa67c5ad61f0cd2e4b
40,300
py
Python
pipeline/plot/unit_characteristic_plot.py
hanhou/map-ephys
f0c3b198e113a9caf40cf0e4d249f9ae6afb1555
[ "MIT" ]
7
2017-11-21T02:32:44.000Z
2020-09-18T15:05:12.000Z
pipeline/plot/unit_characteristic_plot.py
mesoscale-activity-map/map-ephys
4262e1ba68671b342a77f386e4ebabcce138c453
[ "MIT" ]
41
2017-11-28T05:04:14.000Z
2022-03-03T17:51:58.000Z
pipeline/plot/unit_characteristic_plot.py
mesoscale-activity-map/map-ephys
4262e1ba68671b342a77f386e4ebabcce138c453
[ "MIT" ]
15
2017-11-16T21:32:29.000Z
2020-11-10T01:46:14.000Z
import numpy as np import datajoint as dj from PIL import ImageColor from collections import Counter import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns import itertools import pandas as pd from pipeline import experiment, ephys, psth, lab, histology, ccf, psth_foraging from pipeline.plot....
42.331933
125
0.622382
import numpy as np import datajoint as dj from PIL import ImageColor from collections import Counter import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns import itertools import pandas as pd from pipeline import experiment, ephys, psth, lab, histology, ccf, psth_foraging from pipeline.plot....
true
true
f74716242b266964d6c5a8b8dde611fda7ca67b4
9,475
py
Python
jumpcutter.py
Azarattum/Jumpcutter
f8439776689c7baecfc68516b2ef3afe743284db
[ "MIT" ]
1
2019-07-10T08:06:44.000Z
2019-07-10T08:06:44.000Z
jumpcutter.py
Azarattum/Jumpcutter
f8439776689c7baecfc68516b2ef3afe743284db
[ "MIT" ]
null
null
null
jumpcutter.py
Azarattum/Jumpcutter
f8439776689c7baecfc68516b2ef3afe743284db
[ "MIT" ]
null
null
null
from contextlib import closing from PIL import Image import subprocess from audiotsm import phasevocoder from audiotsm.io.wav import WavReader, WavWriter from scipy.io import wavfile import numpy as np import re import math from shutil import copyfile, rmtree import os import argparse from pytube import YouTube def do...
38.51626
234
0.707546
from contextlib import closing from PIL import Image import subprocess from audiotsm import phasevocoder from audiotsm.io.wav import WavReader, WavWriter from scipy.io import wavfile import numpy as np import re import math from shutil import copyfile, rmtree import os import argparse from pytube import YouTube def do...
true
true
f7471875e37ea8bd96062ba121843fa578d1defb
306
py
Python
02_Post_Order_Traversing_of_Tree.py
waditya/Trees
5322a69e7174e7f389e870f6081836bb187d0556
[ "Apache-2.0" ]
null
null
null
02_Post_Order_Traversing_of_Tree.py
waditya/Trees
5322a69e7174e7f389e870f6081836bb187d0556
[ "Apache-2.0" ]
null
null
null
02_Post_Order_Traversing_of_Tree.py
waditya/Trees
5322a69e7174e7f389e870f6081836bb187d0556
[ "Apache-2.0" ]
null
null
null
""" Node is defined as self.left (the left child of the node) self.right (the right child of the node) self.data (the value of the node) """ def postOrder(root): #Write your code here if(root == None): return postOrder(root.left) postOrder(root.right) print root.data,
20.4
40
0.643791
""" Node is defined as self.left (the left child of the node) self.right (the right child of the node) self.data (the value of the node) """ def postOrder(root): if(root == None): return postOrder(root.left) postOrder(root.right) print root.data,
false
true
f74718efa836cfa9756e36ca6be0819658ed7db6
10,286
py
Python
tensorforce/core/memories/queue.py
zysilence/tensorforce
7539e5dde66f3a93b881006f9b7f38c926ced21b
[ "Apache-2.0" ]
2
2021-11-14T12:28:24.000Z
2022-02-14T19:23:51.000Z
tensorforce/core/memories/queue.py
zysilence/tensorforce
7539e5dde66f3a93b881006f9b7f38c926ced21b
[ "Apache-2.0" ]
null
null
null
tensorforce/core/memories/queue.py
zysilence/tensorforce
7539e5dde66f3a93b881006f9b7f38c926ced21b
[ "Apache-2.0" ]
3
2021-03-04T17:26:43.000Z
2021-03-04T17:27:10.000Z
# Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
37.816176
118
0.594497
from __future__ import absolute_import from __future__ import print_function from __future__ import division import tensorflow as tf from tensorforce import util from tensorforce.core.memories import Memory class Queue(Memory): def __init__(self, states, internals, actions, include_next_states, ...
true
true
f7471a7b5f92a8e21d2df3783b77501c195c1410
2,108
py
Python
.history/postImages/index_20201008165803.py
Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE
9a8289d8550115362c46dea3ed8570b789c09a10
[ "MIT" ]
2
2020-10-21T22:14:15.000Z
2020-10-21T22:14:16.000Z
.history/postImages/index_20201008165803.py
Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE
9a8289d8550115362c46dea3ed8570b789c09a10
[ "MIT" ]
null
null
null
.history/postImages/index_20201008165803.py
Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE
9a8289d8550115362c46dea3ed8570b789c09a10
[ "MIT" ]
null
null
null
import csv import json df = open("bridgeData3.csv",'r').readlines() fin = open('final.csv','r').readlines() # Skips the header of the csv finCsv = fin[1:] finalCsv = df[1:] obj = {} # loop through the csv with images for i in finalCsv: x = i.split(',') obj[x[1]] = {'bridge_name':x[0],'proj_code':x[1],'before_i...
29.277778
94
0.519924
import csv import json df = open("bridgeData3.csv",'r').readlines() fin = open('final.csv','r').readlines() finCsv = fin[1:] finalCsv = df[1:] obj = {} for i in finalCsv: x = i.split(',') obj[x[1]] = {'bridge_name':x[0],'proj_code':x[1],'before_img':x[2],'after_img':x[3][0:-1]} finalObj = {} for i in finCs...
true
true
f7471b1aefbaf3b3b6de3b420d406d40e6994f59
443
py
Python
selfdrive/debug/internal/mock_process/fake_liveMpc.py
wocsor-com/openpilot
d1372c4890fd45d785789d94d5ed39bc9c8b80b7
[ "MIT" ]
14
2019-05-20T13:20:12.000Z
2020-10-10T07:55:20.000Z
selfdrive/debug/internal/mock_process/fake_liveMpc.py
wocsor-com/openpilot
d1372c4890fd45d785789d94d5ed39bc9c8b80b7
[ "MIT" ]
4
2020-04-12T21:34:03.000Z
2020-04-15T22:22:15.000Z
selfdrive/debug/internal/mock_process/fake_liveMpc.py
wocsor-com/openpilot
d1372c4890fd45d785789d94d5ed39bc9c8b80b7
[ "MIT" ]
3
2019-03-06T20:58:50.000Z
2019-05-21T01:01:37.000Z
#!/usr/bin/env python3 import zmq import time from hexdump import hexdump import cereal.messaging as messaging from cereal.services import service_list from cereal import log def mock_x(): liveMpc = messaging.pub_sock('liveMpc') while 1: m = messaging.new_message('liveMpc') mx = [] for x in range(0, 10...
20.136364
41
0.683973
import zmq import time from hexdump import hexdump import cereal.messaging as messaging from cereal.services import service_list from cereal import log def mock_x(): liveMpc = messaging.pub_sock('liveMpc') while 1: m = messaging.new_message('liveMpc') mx = [] for x in range(0, 100): mx.append(...
true
true
f7471b6efca2868ad1b3290ccfc22121afc28c5f
1,116
py
Python
tooth.py
jposchel/trusty-brusher-python
1ba4c70401f92afb767a0b7d2c213cce8760089e
[ "MIT" ]
null
null
null
tooth.py
jposchel/trusty-brusher-python
1ba4c70401f92afb767a0b7d2c213cce8760089e
[ "MIT" ]
null
null
null
tooth.py
jposchel/trusty-brusher-python
1ba4c70401f92afb767a0b7d2c213cce8760089e
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Tooth.py: Public Tooth class representing tooth entities in the educational game Trusty Brusher.""" class Tooth: """ A Tooth in the Mouth of a Person. self.location: int value indicating location of Tooth in the Mouth self.has_cavity: bool value indicating whether or ...
29.368421
102
0.702509
class Tooth: def __init__(self, init_location, init_cavity_status, init_germ_count): self.location = init_location self.has_cavity = init_cavity_status self.germ_count = init_germ_count def get_location(self): return self.location def set_location(self, new_location...
true
true
f7471c08736090265b66592b4a1cf8e331d53e66
193
py
Python
decaptcha/__init__.py
youngershen/django-easy-captcha
bfcd13bbafface7048139e0bc49358e6628439df
[ "MIT" ]
3
2019-03-02T03:48:35.000Z
2021-11-09T11:06:25.000Z
decaptcha/__init__.py
youngershen/django-easy-captcha
bfcd13bbafface7048139e0bc49358e6628439df
[ "MIT" ]
null
null
null
decaptcha/__init__.py
youngershen/django-easy-captcha
bfcd13bbafface7048139e0bc49358e6628439df
[ "MIT" ]
null
null
null
# PROJECT : django-easy-captcha # TIME : 2018/11/18 11:00 # AUTHOR : Younger Shen # EMAIL : younger.x.shen@gmail.com # CELL : 13811754531 # WECHAT : 13811754531 # WEB : https://youngershen.com
24.125
34
0.704663
true
true
f7471cfddb8ec086d8c1599f5b661789ef071cf7
12,789
py
Python
tensorflow_probability/python/distributions/zipf.py
nagachika/probability
2a5609ceec01a388ec03b583b4f8e813cfbad981
[ "Apache-2.0" ]
1
2020-07-12T22:40:42.000Z
2020-07-12T22:40:42.000Z
tensorflow_probability/python/distributions/zipf.py
nagachika/probability
2a5609ceec01a388ec03b583b4f8e813cfbad981
[ "Apache-2.0" ]
2
2019-08-01T18:31:41.000Z
2019-08-01T19:42:15.000Z
tensorflow_probability/python/distributions/zipf.py
nagachika/probability
2a5609ceec01a388ec03b583b4f8e813cfbad981
[ "Apache-2.0" ]
1
2020-04-17T18:01:47.000Z
2020-04-17T18:01:47.000Z
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
38.87234
81
0.659708
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow.compat.v2 as tf from tensorflow_probability.python.distributions import distribution from tensorflow_probability.python.distributions.seed_stream import Seed...
true
true
f7471d139ca421eceea4cbe3b2c63d5e565d6dd8
19,235
py
Python
stumpy/gpu_aamp.py
profintegra/stumpy
66b3402d91820005b466e1da6fe353b61e6246c5
[ "BSD-3-Clause" ]
1
2021-07-27T11:14:01.000Z
2021-07-27T11:14:01.000Z
stumpy/gpu_aamp.py
profintegra/stumpy
66b3402d91820005b466e1da6fe353b61e6246c5
[ "BSD-3-Clause" ]
null
null
null
stumpy/gpu_aamp.py
profintegra/stumpy
66b3402d91820005b466e1da6fe353b61e6246c5
[ "BSD-3-Clause" ]
null
null
null
# STUMPY # Copyright 2019 TD Ameritrade. Released under the terms of the 3-Clause BSD license. # STUMPY is a trademark of TD Ameritrade IP Company, Inc. All rights reserved. import logging import math import multiprocessing as mp import os import numpy as np from numba import cuda from . import core, config logger =...
32.936644
88
0.621679
import logging import math import multiprocessing as mp import os import numpy as np from numba import cuda from . import core, config logger = logging.getLogger(__name__) @cuda.jit( "(i8, f8[:], f8[:], i8, f8[:], f8[:], f8[:], b1[:], b1[:]," "f8[:], f8[:], i8, b1, i8, f8[:, :], i8[:, :], b1)" ) def _co...
true
true
f7471d6b3b950b18a173e693b62b2283a3f2eeff
118
py
Python
boa3_test/test_sc/interop_test/policy/ImportInteropPolicy.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
25
2020-07-22T19:37:43.000Z
2022-03-08T03:23:55.000Z
boa3_test/test_sc/interop_test/policy/ImportInteropPolicy.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
419
2020-04-23T17:48:14.000Z
2022-03-31T13:17:45.000Z
boa3_test/test_sc/interop_test/policy/ImportInteropPolicy.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
15
2020-05-21T21:54:24.000Z
2021-11-18T06:17:24.000Z
from boa3.builtin import interop, public @public def main() -> int: return interop.policy.get_exec_fee_factor()
16.857143
47
0.745763
from boa3.builtin import interop, public @public def main() -> int: return interop.policy.get_exec_fee_factor()
true
true
f7471e682195f05bb93b896af0758f44a24a232e
5,934
py
Python
experiments/20200324-lod-study-1/station-C-qpcr-map.py
emilyjunkins/covid19
ab57fa9e9d601eef25a12847ca868d86a4799ca2
[ "Apache-2.0" ]
11
2020-03-30T07:20:15.000Z
2022-03-20T08:41:35.000Z
experiments/20200324-lod-study-1/station-C-qpcr-map.py
emilyjunkins/covid19
ab57fa9e9d601eef25a12847ca868d86a4799ca2
[ "Apache-2.0" ]
4
2020-03-31T19:36:37.000Z
2020-05-13T14:06:27.000Z
experiments/20200324-lod-study-1/station-C-qpcr-map.py
emilyjunkins/covid19
ab57fa9e9d601eef25a12847ca868d86a4799ca2
[ "Apache-2.0" ]
7
2020-04-07T12:20:25.000Z
2021-12-04T02:32:43.000Z
metadata = { 'protocolName': 'BP Genomics Station C: 20200324 LOD Study 1', 'author': 'Chaz <chaz@opentrons.com; Anton <acjs@stanford.edu>', 'source': 'COVID-19 Project', 'apiLevel': '2.2' } # Protocol constants # Master mix locations on the eppendorf tube holder REAGENT_LOCATIONS = { 'Endogenous'...
39.039474
107
0.681159
metadata = { 'protocolName': 'BP Genomics Station C: 20200324 LOD Study 1', 'author': 'Chaz <chaz@opentrons.com; Anton <acjs@stanford.edu>', 'source': 'COVID-19 Project', 'apiLevel': '2.2' } REAGENT_LOCATIONS = { 'Endogenous': 'A1', 'Reaction': 'A2', 'Standard': 'A3', 'Water': 'A4', ...
true
true
f7471fc46882626596f22ece7bc56b0a73fdbe0f
444
py
Python
instagram/migrations/0002_user_last_login.py
adrianmurage/instagram-clone
370f9fce104337dfd1cda392296048fd7b5f5c86
[ "MIT" ]
1
2020-01-28T17:08:54.000Z
2020-01-28T17:08:54.000Z
instagram/migrations/0002_user_last_login.py
MainaMurage/instagram-clone
370f9fce104337dfd1cda392296048fd7b5f5c86
[ "MIT" ]
2
2021-06-08T19:55:44.000Z
2021-06-10T21:29:11.000Z
instagram/migrations/0002_user_last_login.py
MainaMurage/instagram-clone
370f9fce104337dfd1cda392296048fd7b5f5c86
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2019-05-22 07:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('instagram', '0001_initial'), ] operations = [ migrations.AddField( ...
21.142857
54
0.612613
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('instagram', '0001_initial'), ] operations = [ migrations.AddField( model_name='user', name='last_login', field...
true
true
f7472067d8665f851495b76a0245b0a9f95cad9e
18,819
py
Python
log_complete/model_437.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_437.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_437.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
91.354369
710
0.806525
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', ...
true
true
f74721146713bf1f3d422620d5d94275d283df1f
1,044
py
Python
src/genui/utils/exceptions.py
Tontolda/genui
c5b7da7c5a99fc16d34878e2170145ac7c8e31c4
[ "0BSD" ]
15
2021-05-31T13:39:17.000Z
2022-03-30T12:04:14.000Z
src/genui/utils/exceptions.py
martin-sicho/genui
ea7f1272030a13e8e253a7a9b6479ac6a78552d3
[ "MIT" ]
3
2021-04-08T22:02:22.000Z
2022-03-16T09:10:20.000Z
src/genui/utils/exceptions.py
Tontolda/genui
c5b7da7c5a99fc16d34878e2170145ac7c8e31c4
[ "0BSD" ]
5
2021-03-04T11:00:54.000Z
2021-12-18T22:59:22.000Z
""" exceptions Created by: Martin Sicho On: 7/23/20, 10:08 AM """ import json import traceback class GenUIException(Exception): def __init__(self, original, *args, **kwargs): super().__init__(*args) self.original = original def getData(self): return '' def __repr__(self): ...
26.1
113
0.554598
import json import traceback class GenUIException(Exception): def __init__(self, original, *args, **kwargs): super().__init__(*args) self.original = original def getData(self): return '' def __repr__(self): return self.asJSON() def asJSON(self): return json....
true
true
f74721699c4c403658383b1e86c9e9cd9264a5a1
1,322
py
Python
ch09_cnn/cifar_tools.py
susantamoh84/TensorFlow-Book
905bd82e6e58c373b566f4813859c5dfc1fa1aa4
[ "MIT" ]
18
2017-02-18T09:22:42.000Z
2021-08-29T15:44:58.000Z
ch09_cnn/cifar_tools.py
susantamoh84/TensorFlow-Book
905bd82e6e58c373b566f4813859c5dfc1fa1aa4
[ "MIT" ]
null
null
null
ch09_cnn/cifar_tools.py
susantamoh84/TensorFlow-Book
905bd82e6e58c373b566f4813859c5dfc1fa1aa4
[ "MIT" ]
29
2016-12-19T12:01:41.000Z
2020-07-05T16:55:56.000Z
import cPickle import numpy as np def unpickle(file): fo = open(file, 'rb') dict = cPickle.load(fo) fo.close() return dict def clean(data): imgs = data.reshape(data.shape[0], 3, 32, 32) grayscale_imgs = imgs.mean(1) cropped_imgs = grayscale_imgs[:, 4:28, 4:28] img_data = cropped_imgs...
28.12766
72
0.610439
import cPickle import numpy as np def unpickle(file): fo = open(file, 'rb') dict = cPickle.load(fo) fo.close() return dict def clean(data): imgs = data.reshape(data.shape[0], 3, 32, 32) grayscale_imgs = imgs.mean(1) cropped_imgs = grayscale_imgs[:, 4:28, 4:28] img_data = cropped_imgs...
true
true
f747217a8b47ab66398d12fc6cb877ccbe0ab6fb
6,769
py
Python
docs/examples/newparallel/wave2D/parallelwave-mpi.py
tinyclues/ipython
71e32606b0242772b81c9be0d40751ba47d95f2c
[ "BSD-3-Clause-Clear" ]
null
null
null
docs/examples/newparallel/wave2D/parallelwave-mpi.py
tinyclues/ipython
71e32606b0242772b81c9be0d40751ba47d95f2c
[ "BSD-3-Clause-Clear" ]
null
null
null
docs/examples/newparallel/wave2D/parallelwave-mpi.py
tinyclues/ipython
71e32606b0242772b81c9be0d40751ba47d95f2c
[ "BSD-3-Clause-Clear" ]
null
null
null
#!/usr/bin/env python """ A simple python program of solving a 2D wave equation in parallel. Domain partitioning and inter-processor communication are done by an object of class MPIRectPartitioner2D (which is a subclass of RectPartitioner2D and uses MPI via mpi4py) An example of running the program is (8 processors, 4...
32.859223
112
0.629635
""" A simple python program of solving a 2D wave equation in parallel. Domain partitioning and inter-processor communication are done by an object of class MPIRectPartitioner2D (which is a subclass of RectPartitioner2D and uses MPI via mpi4py) An example of running the program is (8 processors, 4x2 partition, 400x100...
false
true
f74721fae1a89de30d271e1758736eceb0444307
2,943
py
Python
tests/unit/modules/publish_test.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
3
2015-04-16T18:42:35.000Z
2017-10-30T16:57:49.000Z
tests/unit/modules/publish_test.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
16
2015-11-18T00:44:03.000Z
2018-10-29T20:48:27.000Z
tests/unit/modules/publish_test.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
2
2017-01-05T16:14:59.000Z
2019-01-31T23:15:25.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>` ''' # Import Python Libs from __future__ import absolute_import # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.mock import ( MagicMock, patch, NO_MOCK, NO_MOCK_REASON ) fr...
23.733871
78
0.599728
from __future__ import absolute_import from salttesting import TestCase, skipIf from salttesting.mock import ( MagicMock, patch, NO_MOCK, NO_MOCK_REASON ) from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') from salt.modules import publish import salt.crypt import salt...
true
true
f74722dded4b701ea739cfeabcf1fc83a44f0203
9,770
py
Python
mdrsl/rule_generation/association_rule_mining/apyori_impl/mine_mt_rules_from_dataframe_with_apyori.py
joschout/Multi-Directional-Rule-Set-Learning
ef0620b115f4e0fd7fba3e752d238a8020c1ca6b
[ "Apache-2.0" ]
3
2020-08-03T19:25:44.000Z
2021-06-27T22:25:55.000Z
mdrsl/rule_generation/association_rule_mining/apyori_impl/mine_mt_rules_from_dataframe_with_apyori.py
joschout/Multi-Directional-Rule-Set-Learning
ef0620b115f4e0fd7fba3e752d238a8020c1ca6b
[ "Apache-2.0" ]
null
null
null
mdrsl/rule_generation/association_rule_mining/apyori_impl/mine_mt_rules_from_dataframe_with_apyori.py
joschout/Multi-Directional-Rule-Set-Learning
ef0620b115f4e0fd7fba3e752d238a8020c1ca6b
[ "Apache-2.0" ]
2
2020-08-07T22:54:28.000Z
2021-02-18T06:11:01.000Z
import random import numpy as np from typing import List, Optional, Dict import pandas as pd import time from mdrsl.rule_generation.association_rule_mining.apyori_impl.mine_mt_rules_from_transactions_with_apyori import ( mine_MCARs_from_transactions_using_apyori) from mdrsl.rule_generation.association_rule_mining...
37.722008
138
0.621085
import random import numpy as np from typing import List, Optional, Dict import pandas as pd import time from mdrsl.rule_generation.association_rule_mining.apyori_impl.mine_mt_rules_from_transactions_with_apyori import ( mine_MCARs_from_transactions_using_apyori) from mdrsl.rule_generation.association_rule_mining...
true
true
f747232d507ac2546560667d6f1a6d03447631b0
1,850
py
Python
NLP/LSTM RNN/WSDM - Fake News Classification/Berd generate embeddings/3_bert_encode_ch_test.py
ashishpatel26/ML-DL-scripts
25f930630f6e546955ad13863d6e728c8c702d43
[ "Apache-2.0" ]
2
2020-07-17T10:33:42.000Z
2021-11-08T09:31:27.000Z
NLP/LSTM RNN/WSDM - Fake News Classification/Berd generate embeddings/3_bert_encode_ch_test.py
ashishpatel26/ML-DL-scripts
25f930630f6e546955ad13863d6e728c8c702d43
[ "Apache-2.0" ]
null
null
null
NLP/LSTM RNN/WSDM - Fake News Classification/Berd generate embeddings/3_bert_encode_ch_test.py
ashishpatel26/ML-DL-scripts
25f930630f6e546955ad13863d6e728c8c702d43
[ "Apache-2.0" ]
1
2020-10-15T11:24:52.000Z
2020-10-15T11:24:52.000Z
# Please run bert-serving-start before running this notebook # Setup: https://github.com/hanxiao/bert-as-service # Examples (change folders to your locals) # english cased: bert-serving-start -model_dir /bert-as-service/cased_L-24_H-1024_A-16/ -num_worker=4 # multi cased: bert-serving-start -model_dir /bert-as-service/...
42.045455
136
0.714054
import pandas as pd import torch import os from time import time from tqdm import tqdm from bert_serving.client import BertClient data_folder = os.path.dirname(os.getcwd())+'/data' test = pd.read_csv(data_folder+'/raw/test.csv') bc = BertClient() def gen_encodings(df, column): t0 = time() _list = ...
true
true
f747246cc7b374f413d64c8392d1debce51180be
317
py
Python
implementation/spcTornadoCounts.py
sburgholzer/MSDS-Capstone-Project
4f22149c7ebff5c3dc129bb785d56f161ab138a8
[ "MIT" ]
null
null
null
implementation/spcTornadoCounts.py
sburgholzer/MSDS-Capstone-Project
4f22149c7ebff5c3dc129bb785d56f161ab138a8
[ "MIT" ]
null
null
null
implementation/spcTornadoCounts.py
sburgholzer/MSDS-Capstone-Project
4f22149c7ebff5c3dc129bb785d56f161ab138a8
[ "MIT" ]
null
null
null
import pandas as pd df = pd.read_csv('/mnt/data3/scott/1950-2018_actual_tornadoes.csv') df['date'] = pd.to_datetime(df['date']) mask = (df['date'] >= '1979-1-1') & (df['date'] <= '2013-12-31') df = df.loc[mask] df.groupby('date').size() df.groupby('date').size().to_csv('/mnt/data3/scott/tornadoCounts.csv')
35.222222
70
0.643533
import pandas as pd df = pd.read_csv('/mnt/data3/scott/1950-2018_actual_tornadoes.csv') df['date'] = pd.to_datetime(df['date']) mask = (df['date'] >= '1979-1-1') & (df['date'] <= '2013-12-31') df = df.loc[mask] df.groupby('date').size() df.groupby('date').size().to_csv('/mnt/data3/scott/tornadoCounts.csv')
true
true
f74724d1b925bce70841aaa3c48e33b6ff4945b0
12,862
py
Python
test/functional/fantasygold_header_spam.py
FantasyGold/FantasyGold-Core
afff8871e770045e468e2f536ede9db0dff889d5
[ "MIT" ]
13
2018-04-30T21:43:40.000Z
2020-12-07T11:06:47.000Z
test/functional/fantasygold_header_spam.py
donoel2/FantasyGold-Core
afff8871e770045e468e2f536ede9db0dff889d5
[ "MIT" ]
4
2018-05-10T00:18:18.000Z
2019-07-08T23:12:54.000Z
test/functional/fantasygold_header_spam.py
donoel2/FantasyGold-Core
afff8871e770045e468e2f536ede9db0dff889d5
[ "MIT" ]
13
2018-04-30T17:41:54.000Z
2020-12-08T18:24:06.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from tes...
44.047945
176
0.677655
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.script import * from test_framework.mininode import * from test_framework.messages import * from test_framework.fantasygold import * import sys import time import subprocess import os def get_dir_...
false
true
f747251d43b780ad696ef02d9349531217718609
4,237
py
Python
examples/text_classification/rnn/predict.py
tangzhiyi11/PaddleNLP
c58a1c6c90e146178276cccb122fae8fdafa0143
[ "Apache-2.0" ]
2
2021-06-19T07:27:10.000Z
2021-06-23T06:22:57.000Z
examples/text_classification/rnn/predict.py
xiemoyuan/PaddleNLP
e73a02d09dbc249dcd3aa721c507a81cc905210c
[ "Apache-2.0" ]
1
2021-11-22T08:11:08.000Z
2021-11-22T08:11:08.000Z
examples/text_classification/rnn/predict.py
xiemoyuan/PaddleNLP
e73a02d09dbc249dcd3aa721c507a81cc905210c
[ "Apache-2.0" ]
1
2021-04-28T09:01:37.000Z
2021-04-28T09:01:37.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License" # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.87156
138
0.680906
import argparse import paddle import paddle.nn.functional as F import paddlenlp as ppnlp from paddlenlp.data import JiebaTokenizer, Stack, Tuple, Pad, Vocab from utils import preprocess_prediction_data parser = argparse.ArgumentParser(__doc__) parser.add_argument('--device', choices=['cpu', 'gpu', 'xpu...
true
true
f747258ba52e4861a7e9694ddb35effeb51d531c
1,546
py
Python
app/auth/views.py
Kihara-tony/one-minute-pitch
48a090c46e03257aa8ffacb89767f40b6856c18f
[ "Unlicense" ]
null
null
null
app/auth/views.py
Kihara-tony/one-minute-pitch
48a090c46e03257aa8ffacb89767f40b6856c18f
[ "Unlicense" ]
null
null
null
app/auth/views.py
Kihara-tony/one-minute-pitch
48a090c46e03257aa8ffacb89767f40b6856c18f
[ "Unlicense" ]
1
2019-09-23T11:00:22.000Z
2019-09-23T11:00:22.000Z
from flask import render_template,redirect,url_for, flash,request from flask_login import login_user,logout_user,login_required from . import auth from ..models import User from .forms import LoginForm,RegistrationForm from .. import db from ..email import mail_message @auth.route('/login',methods=['GET','POST']) def ...
38.65
165
0.711514
from flask import render_template,redirect,url_for, flash,request from flask_login import login_user,logout_user,login_required from . import auth from ..models import User from .forms import LoginForm,RegistrationForm from .. import db from ..email import mail_message @auth.route('/login',methods=['GET','POST']) def ...
true
true
f74726314a347037852df136101879ca9471d7c8
7,676
py
Python
src/datahub/disclosure/models.py
project-origin/datahub-service
0c3f27ee4fa0381ce3147f1fffef1108f13dc2c2
[ "MIT" ]
1
2021-04-23T08:19:49.000Z
2021-04-23T08:19:49.000Z
src/datahub/disclosure/models.py
project-origin/datahub-service
0c3f27ee4fa0381ce3147f1fffef1108f13dc2c2
[ "MIT" ]
1
2021-02-10T02:28:52.000Z
2021-02-10T02:28:52.000Z
src/datahub/disclosure/models.py
project-origin/datahub-service
0c3f27ee4fa0381ce3147f1fffef1108f13dc2c2
[ "MIT" ]
null
null
null
import sqlalchemy as sa from enum import Enum from sqlalchemy.orm import relationship, backref from typing import List from datetime import date from dataclasses import dataclass, field from marshmallow import validate from datahub.db import ModelBase, Session from datahub.measurements import MeasurementQuery from dat...
33.086207
138
0.689291
import sqlalchemy as sa from enum import Enum from sqlalchemy.orm import relationship, backref from typing import List from datetime import date from dataclasses import dataclass, field from marshmallow import validate from datahub.db import ModelBase, Session from datahub.measurements import MeasurementQuery from dat...
true
true
f74726abce95aaa55b2d37394f26b9a051db8b8c
3,272
py
Python
tensorflow_datasets/core/__init__.py
harsh020/datasets
b4ad3617b279ec65356e696c4c860458621976f6
[ "Apache-2.0" ]
1
2020-12-10T06:37:27.000Z
2020-12-10T06:37:27.000Z
tensorflow_datasets/core/__init__.py
Jinwook-shim/datasets
815037e87150e3c8a557d91a68b07e8ffb6a2a86
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/core/__init__.py
Jinwook-shim/datasets
815037e87150e3c8a557d91a68b07e8ffb6a2a86
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
35.565217
89
0.811736
from tensorflow_datasets.core import tf_compat tf_compat.ensure_tf_install() from tensorflow_datasets.core import community from tensorflow_datasets.core.constants import add_data_dir from tensorflow_datasets.core.dataset_builder import BeamBasedBuilder from tensorflow_datasets.core.dataset_bui...
true
true
f74726dba0ca3e3b52dc8e78584e136f0570d52f
125
py
Python
Problems/Poetry/main.py
TataSatyaPratheek/Tic-Tac-Toe
fa3da80f9ec9ffa3c8c9aaa34a5bb1e88553fecd
[ "MIT" ]
null
null
null
Problems/Poetry/main.py
TataSatyaPratheek/Tic-Tac-Toe
fa3da80f9ec9ffa3c8c9aaa34a5bb1e88553fecd
[ "MIT" ]
null
null
null
Problems/Poetry/main.py
TataSatyaPratheek/Tic-Tac-Toe
fa3da80f9ec9ffa3c8c9aaa34a5bb1e88553fecd
[ "MIT" ]
null
null
null
print(""" Did that stop the old Grinch? No! The Grinch simply said, "If I can't find a reindeer, I'll make one instead!" """)
20.833333
29
0.688
print(""" Did that stop the old Grinch? No! The Grinch simply said, "If I can't find a reindeer, I'll make one instead!" """)
true
true
f747275eb5c3aecfc0cadd1b024940aa12e99332
10,347
py
Python
code/cloudmanager/sshclient.py
Hybrid-Cloud/cloud_manager
5f4087ef8753dcb4f542e930b5d8642fe5591c1a
[ "Apache-2.0" ]
null
null
null
code/cloudmanager/sshclient.py
Hybrid-Cloud/cloud_manager
5f4087ef8753dcb4f542e930b5d8642fe5591c1a
[ "Apache-2.0" ]
3
2016-03-16T03:26:44.000Z
2016-03-16T03:46:22.000Z
code/cloudmanager/sshclient.py
Hybrid-Cloud/orchard
5f4087ef8753dcb4f542e930b5d8642fe5591c1a
[ "Apache-2.0" ]
null
null
null
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
34.956081
79
0.563255
import os import select import socket import time import paramiko import six from heat.openstack.common import log as logging LOG = logging.getLogger(__name__) class SSHError(Exception): pass class SSHTimeout(SSHError): pass class SSH(object): def __init__(self, user, host, port=22...
true
true
f7472826977f917a91915213388d4e8d7b157112
28,918
py
Python
src/bgraph/parsers/soong_parser.py
pistach3/bgraph
186461b3af7e865f17457e85421e995b10a75010
[ "Apache-2.0" ]
8
2021-06-03T08:13:23.000Z
2022-03-07T04:28:24.000Z
src/bgraph/parsers/soong_parser.py
pistach3/bgraph
186461b3af7e865f17457e85421e995b10a75010
[ "Apache-2.0" ]
2
2021-07-29T09:30:27.000Z
2021-12-14T09:24:05.000Z
src/bgraph/parsers/soong_parser.py
pistach3/bgraph
186461b3af7e865f17457e85421e995b10a75010
[ "Apache-2.0" ]
3
2021-07-28T10:41:07.000Z
2021-11-14T02:54:45.000Z
import collections import base64 import copy import enum import logging import os import pathlib import xml.sax import pyparsing # type: ignore # Improve performance by caching pyparsing.ParserElement.enablePackrat() import untangle # type: ignore import bgraph.exc import bgraph.utils from bgraph.types import ( ...
34.632335
132
0.607615
import collections import base64 import copy import enum import logging import os import pathlib import xml.sax import pyparsing pyparsing.ParserElement.enablePackrat() import untangle import bgraph.exc import bgraph.utils from bgraph.types import ( Any, cast, Dict, Final, List, Literal,...
true
true
f74728cf26a7d1a0690982df93978d8354109551
2,639
py
Python
cesnet_openid_remote/identity.py
oarepo/cesnet-openid-remote
4ca46fc94801e51267b7676e0c212a024e3af3a1
[ "MIT" ]
null
null
null
cesnet_openid_remote/identity.py
oarepo/cesnet-openid-remote
4ca46fc94801e51267b7676e0c212a024e3af3a1
[ "MIT" ]
4
2021-02-19T10:53:28.000Z
2021-04-09T17:15:56.000Z
cesnet_openid_remote/identity.py
oarepo/cesnet-openid-remote
4ca46fc94801e51267b7676e0c212a024e3af3a1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2021 CESNET. # # CESNET-OpenID-Remote is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """CESNET OIDC Auth backend for OARepo""" from datetime import timedelta from flask import current_app, ...
36.150685
100
0.740053
from datetime import timedelta from flask import current_app, session, g from flask_login import current_user, user_logged_out from flask_principal import identity_loaded, AnonymousIdentity, identity_changed, RoleNeed, UserNeed from invenio_oauthclient.models import RemoteAccount from invenio_oauthclient.utils...
true
true
f747292e183708e1ca62fdead2a43cddabafdd57
414
py
Python
lib/resource/config.py
hisyamuddin-jamirun/tests
2a07197ccfa41f99fe73dac82cebe3a0f019615c
[ "Apache-2.0" ]
null
null
null
lib/resource/config.py
hisyamuddin-jamirun/tests
2a07197ccfa41f99fe73dac82cebe3a0f019615c
[ "Apache-2.0" ]
null
null
null
lib/resource/config.py
hisyamuddin-jamirun/tests
2a07197ccfa41f99fe73dac82cebe3a0f019615c
[ "Apache-2.0" ]
null
null
null
from configparser import SafeConfigParser import os def get_config(): config = SafeConfigParser() config_filename = "config_resource.conf" config_filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), config_filename) if os.path.exists(config_filepath) == False: config_filepath = os.path.join(os.g...
27.6
93
0.780193
from configparser import SafeConfigParser import os def get_config(): config = SafeConfigParser() config_filename = "config_resource.conf" config_filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), config_filename) if os.path.exists(config_filepath) == False: config_filepath = os.path.join(os.g...
true
true
f74729912517766e23a1dbfb0cd8ee36a32d87e3
2,084
py
Python
main.py
tbaumer22/rpiAutoGarden
4f35ddb6309939d169cbcd8eaa217220972fef3a
[ "MIT" ]
null
null
null
main.py
tbaumer22/rpiAutoGarden
4f35ddb6309939d169cbcd8eaa217220972fef3a
[ "MIT" ]
null
null
null
main.py
tbaumer22/rpiAutoGarden
4f35ddb6309939d169cbcd8eaa217220972fef3a
[ "MIT" ]
null
null
null
import os import time import datetime as dt import schedule from threading import Timer from weather import Weather, Unit weather = Weather(unit=Unit.CELSIUS) lookup = weather.lookup(2487365) condition = lookup.condition needToWaterEarly = True needToWaterMore = True triggerConditions = ["tropical storm", "showers",...
32.061538
128
0.679463
import os import time import datetime as dt import schedule from threading import Timer from weather import Weather, Unit weather = Weather(unit=Unit.CELSIUS) lookup = weather.lookup(2487365) condition = lookup.condition needToWaterEarly = True needToWaterMore = True triggerConditions = ["tropical storm", "showers",...
true
true
f74729c8371779b2bf4988524e1efd6b300b0239
10,473
py
Python
src/oci/database_tools/models/__init__.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
3
2020-09-10T22:09:45.000Z
2021-12-24T17:00:07.000Z
src/oci/database_tools/models/__init__.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/database_tools/models/__init__.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
81.186047
245
0.905376
from __future__ import absolute_import from .change_database_tools_connection_compartment_details import ChangeDatabaseToolsConnectionCompartmentDetails from .change_database_tools_private_endpoint_compartment_details import ChangeDatabaseToolsPrivateEndpointCompartmentDetails from .create_database_tools_connectio...
true
true
f7472a7c0b7f43dc48a11e24267d88a8bfacbfe1
7,488
py
Python
aw_nas/final/rnn_model.py
Harald-R/aw_nas
8cf0cf48f7bcfd7893e6355dcc3ccbc83fd39783
[ "MIT" ]
195
2020-08-15T17:39:23.000Z
2022-02-28T07:48:03.000Z
aw_nas/final/rnn_model.py
Harald-R/aw_nas
8cf0cf48f7bcfd7893e6355dcc3ccbc83fd39783
[ "MIT" ]
22
2020-08-16T01:44:48.000Z
2022-03-12T00:46:54.000Z
aw_nas/final/rnn_model.py
Harald-R/aw_nas
8cf0cf48f7bcfd7893e6355dcc3ccbc83fd39783
[ "MIT" ]
27
2020-08-16T06:34:56.000Z
2022-03-06T18:16:52.000Z
#pylint: disable=invalid-name import numpy as np import torch from torch import nn from aw_nas import ops from aw_nas.utils.exception import expect, ConfigException from aw_nas.weights_manager.rnn_shared import RNNSharedNet, INIT_RANGE class RNNGenotypeModel(RNNSharedNet): REGISTRY = "final_model" NAME = "rn...
40.918033
118
0.603232
import numpy as np import torch from torch import nn from aw_nas import ops from aw_nas.utils.exception import expect, ConfigException from aw_nas.weights_manager.rnn_shared import RNNSharedNet, INIT_RANGE class RNNGenotypeModel(RNNSharedNet): REGISTRY = "final_model" NAME = "rnn_model" def __init__(sel...
true
true
f7472ab34c5ca0f3f69adf1962d60ecf58aecec6
3,094
py
Python
gym_stag_hunt/envs/abstract_markov_staghunt.py
DavidRother/Gym-Stag-Hunt
2ffc378d58c833b811dabe34c09b8dd864c83e71
[ "MIT" ]
1
2021-06-02T04:10:08.000Z
2021-06-02T04:10:08.000Z
gym_stag_hunt/envs/abstract_markov_staghunt.py
DavidRother/Gym-Stag-Hunt
2ffc378d58c833b811dabe34c09b8dd864c83e71
[ "MIT" ]
null
null
null
gym_stag_hunt/envs/abstract_markov_staghunt.py
DavidRother/Gym-Stag-Hunt
2ffc378d58c833b811dabe34c09b8dd864c83e71
[ "MIT" ]
null
null
null
from abc import ABC from gym import Env from gym_stag_hunt.src.utils import print_matrix class AbstractMarkovStagHuntEnv(Env, ABC): metadata = { 'render.modes': ['human', 'array'], 'obs.types': ['image', 'coords'] } def __init__(self, grid_size=(5, 5), ...
36.4
120
0.585973
from abc import ABC from gym import Env from gym_stag_hunt.src.utils import print_matrix class AbstractMarkovStagHuntEnv(Env, ABC): metadata = { 'render.modes': ['human', 'array'], 'obs.types': ['image', 'coords'] } def __init__(self, grid_size=(5, 5), ...
true
true
f7472b505b51547dca573b4ee0effd9df1a06a05
1,019
py
Python
btsapi/modules/authentication/controllers.py
bodastage/bts-ce-api
ed93b2f70e3ae7c1d364099b767d7cd1272470eb
[ "Apache-2.0" ]
2
2018-04-25T01:12:06.000Z
2018-06-27T22:08:08.000Z
btsapi/modules/authentication/controllers.py
bodastage/bts-ce-api
ed93b2f70e3ae7c1d364099b767d7cd1272470eb
[ "Apache-2.0" ]
1
2019-03-03T09:15:29.000Z
2019-03-03T09:19:03.000Z
btsapi/modules/authentication/controllers.py
bodastage/bts-ce-api
ed93b2f70e3ae7c1d364099b767d7cd1272470eb
[ "Apache-2.0" ]
4
2018-03-10T23:30:00.000Z
2019-12-10T06:21:52.000Z
from flask import Blueprint, request, render_template, \ flash, g, session, redirect, url_for, \ jsonify, make_response from btsapi.modules.users.models import User, UserSchema from btsapi.extensions import db import datetime import base64 # @TODO: Change this endpoint to /api/authe...
31.84375
89
0.672228
from flask import Blueprint, request, render_template, \ flash, g, session, redirect, url_for, \ jsonify, make_response from btsapi.modules.users.models import User, UserSchema from btsapi.extensions import db import datetime import base64 mod_auth = Blueprint('authetication', __na...
true
true
f7472b67caaccda28cf0edd2bff43417639ea849
4,783
py
Python
facebook_business/test/async_ad_docs.py
pasha-r/facebook-python-ads-sdk
76feadd77baed839516b53297628e7a254c8c3c0
[ "CNRI-Python" ]
null
null
null
facebook_business/test/async_ad_docs.py
pasha-r/facebook-python-ads-sdk
76feadd77baed839516b53297628e7a254c8c3c0
[ "CNRI-Python" ]
null
null
null
facebook_business/test/async_ad_docs.py
pasha-r/facebook-python-ads-sdk
76feadd77baed839516b53297628e7a254c8c3c0
[ "CNRI-Python" ]
1
2018-09-24T14:04:48.000Z
2018-09-24T14:04:48.000Z
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
36.51145
76
0.701861
import sys from facebook_business.asyncapi import FacebookAdsAsyncApi from facebook_business.objects import Insights from facebook_business.test.async_docs_utils import * from facebook_business.utils.httpretries import retry_policy class AdDocsTestCase(AsyncDocsTestCase): def setUp(self): ...
true
true
f7472d791f380b8bca0715ab4a4f811a3fff949b
15,246
py
Python
script/hassfest/mypy_config.py
kdanthony/core
bf2d40adfed9b9689bcbb61b18306fa1098f74eb
[ "Apache-2.0" ]
null
null
null
script/hassfest/mypy_config.py
kdanthony/core
bf2d40adfed9b9689bcbb61b18306fa1098f74eb
[ "Apache-2.0" ]
70
2020-08-05T07:20:00.000Z
2022-03-31T06:01:46.000Z
script/hassfest/mypy_config.py
kdanthony/core
bf2d40adfed9b9689bcbb61b18306fa1098f74eb
[ "Apache-2.0" ]
null
null
null
"""Generate mypy config.""" from __future__ import annotations import configparser import io import os from pathlib import Path from typing import Final from .model import Config, Integration # Modules which have type hints which known to be broken. # If you are an author of component listed here, please fix these e...
39.092308
84
0.699659
from __future__ import annotations import configparser import io import os from pathlib import Path from typing import Final from .model import Config, Integration IGNORED_MODULES: Final[list[str]] = [ "homeassistant.components.adguard.*", "homeassistant.components.aemet.*", "homeassistant.components...
true
true
f7472dcd6d23281c3c9432fc53d94a319cb5d280
857
py
Python
make_fingerprint.py
BenWiederhake/random_tweets
ba67cd0973ae7038d5eab23c8b866d9066a29033
[ "MIT" ]
null
null
null
make_fingerprint.py
BenWiederhake/random_tweets
ba67cd0973ae7038d5eab23c8b866d9066a29033
[ "MIT" ]
null
null
null
make_fingerprint.py
BenWiederhake/random_tweets
ba67cd0973ae7038d5eab23c8b866d9066a29033
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import codecs import hashlib import random_tweets import requests import sys def make_fingerprint(url): host = requests.urllib3.util.url.parse_url(url).host if host is None: host = '-INVALID-' fingerprint = hashlib.md5(host.encode('utf-8')).hexdigest() comment = codecs....
25.205882
96
0.606768
import codecs import hashlib import random_tweets import requests import sys def make_fingerprint(url): host = requests.urllib3.util.url.parse_url(url).host if host is None: host = '-INVALID-' fingerprint = hashlib.md5(host.encode('utf-8')).hexdigest() comment = codecs.getencoder('base64')(h...
true
true
f7472ea3c285235f42a541468706ef045ddba91d
1,038
py
Python
app/__init__.py
OjureFred/NoblePitch
cf160d508ca0b79d36a08856598563517831008d
[ "MIT" ]
null
null
null
app/__init__.py
OjureFred/NoblePitch
cf160d508ca0b79d36a08856598563517831008d
[ "MIT" ]
null
null
null
app/__init__.py
OjureFred/NoblePitch
cf160d508ca0b79d36a08856598563517831008d
[ "MIT" ]
null
null
null
from flask import Flask from flask_bootstrap import Bootstrap from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_mail import Mail from flask_simplemde import SimpleMDE from config import config_options bootstrap = Bootstrap() db = SQLAlchemy() mail = Mail() simple = SimpleMDE() log...
25.317073
72
0.76975
from flask import Flask from flask_bootstrap import Bootstrap from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_mail import Mail from flask_simplemde import SimpleMDE from config import config_options bootstrap = Bootstrap() db = SQLAlchemy() mail = Mail() simple = SimpleMDE() log...
true
true
f74730279b8d5dd20cda1f0da248b5120ad98509
12,606
py
Python
detectron/utils/net.py
stephan-who/Detectron
72742be6197d0f610fe53e89c92c486926966974
[ "Apache-2.0" ]
null
null
null
detectron/utils/net.py
stephan-who/Detectron
72742be6197d0f610fe53e89c92c486926966974
[ "Apache-2.0" ]
null
null
null
detectron/utils/net.py
stephan-who/Detectron
72742be6197d0f610fe53e89c92c486926966974
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017-present, Facebook, 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 applicable law or agreed...
42.160535
86
0.617166
if has_momentum: workspace.FeedBlob( dst_name + '_momentum', src_blobs[src_name + '_momentum'].astype( np.float32, copy=False)) for src_name in src_blobs.keys(): if (src_name not...
true
true
f747304d6eb21e2e5723c3fa4b8dd5da8108401d
7,175
py
Python
qhana/backend/elementComparer.py
UST-QuAntiL/qhana
bf499d072dcc37f81efec1b8e17b7d5460db7a04
[ "Apache-2.0" ]
1
2021-03-12T14:06:43.000Z
2021-03-12T14:06:43.000Z
qhana/backend/elementComparer.py
UST-QuAntiL/qhana
bf499d072dcc37f81efec1b8e17b7d5460db7a04
[ "Apache-2.0" ]
null
null
null
qhana/backend/elementComparer.py
UST-QuAntiL/qhana
bf499d072dcc37f81efec1b8e17b7d5460db7a04
[ "Apache-2.0" ]
null
null
null
from abc import ABCMeta from abc import abstractmethod from typing import Any import enum import networkx as nx from networkx import Graph from qhana.backend.taxonomie import Taxonomie from qhana.backend.logger import Logger import numpy as np from qhana.backend.logger import Logger import os import json import math fr...
32.466063
117
0.612683
from abc import ABCMeta from abc import abstractmethod from typing import Any import enum import networkx as nx from networkx import Graph from qhana.backend.taxonomie import Taxonomie from qhana.backend.logger import Logger import numpy as np from qhana.backend.logger import Logger import os import json import math fr...
true
true
f747305a11aa8965636cfeaaed96922c6a9b2aae
637
py
Python
opencv_learn/charpter12/demo_12.06.py
zhangxinzhou/play_game
854448f8416b2d3f98bb2c3ed0f7d834a61593de
[ "Apache-2.0" ]
null
null
null
opencv_learn/charpter12/demo_12.06.py
zhangxinzhou/play_game
854448f8416b2d3f98bb2c3ed0f7d834a61593de
[ "Apache-2.0" ]
null
null
null
opencv_learn/charpter12/demo_12.06.py
zhangxinzhou/play_game
854448f8416b2d3f98bb2c3ed0f7d834a61593de
[ "Apache-2.0" ]
null
null
null
import cv2 import numpy as np o = cv2.imread("contours.bmp") gray = cv2.cvtColor(o, cv2.COLOR_BGR2GRAY) ret, binary = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY) contours, hierarchy = cv2.findContours(binary, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) cv2.imshow("original", o) n = len(contours) contoursImg = [] for ...
31.85
86
0.700157
import cv2 import numpy as np o = cv2.imread("contours.bmp") gray = cv2.cvtColor(o, cv2.COLOR_BGR2GRAY) ret, binary = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY) contours, hierarchy = cv2.findContours(binary, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) cv2.imshow("original", o) n = len(contours) contoursImg = [] for ...
true
true
f747308714b176abe38df4e4001e5c2e31ec0713
4,181
py
Python
gym_learning_to_learn/envs/base_env.py
bstriner/gym-learning-to-learn
4cd93bf7a306255771a32e0d97b3d705b2666656
[ "MIT" ]
1
2021-06-14T15:37:32.000Z
2021-06-14T15:37:32.000Z
gym_learning_to_learn/envs/base_env.py
bstriner/gym-learning-to-learn
4cd93bf7a306255771a32e0d97b3d705b2666656
[ "MIT" ]
null
null
null
gym_learning_to_learn/envs/base_env.py
bstriner/gym-learning-to-learn
4cd93bf7a306255771a32e0d97b3d705b2666656
[ "MIT" ]
1
2017-01-27T05:49:59.000Z
2017-01-27T05:49:59.000Z
from gym import Env from gym.utils import seeding from gym import spaces import numpy as np import keras.backend as K class BaseEnv(Env): metadata = {'render.modes': ['human', 'ansi']} def __init__(self, action_mapping): self._seed() self.verbose = 0 self.viewer = None self.ba...
36.043103
113
0.567807
from gym import Env from gym.utils import seeding from gym import spaces import numpy as np import keras.backend as K class BaseEnv(Env): metadata = {'render.modes': ['human', 'ansi']} def __init__(self, action_mapping): self._seed() self.verbose = 0 self.viewer = None self.ba...
true
true
f74730970ebec6431805c2f723cede34fa4d02ff
15,624
py
Python
venv/Lib/site-packages/pymodbus/payload.py
amalieKo/Balancing-Platform
a8382e51b70480404cb9ec2988e61bc65b9e86c6
[ "MIT" ]
6
2019-01-15T19:50:43.000Z
2021-12-06T03:52:18.000Z
venv/Lib/site-packages/pymodbus/payload.py
amalieKo/Balancing-Platform
a8382e51b70480404cb9ec2988e61bc65b9e86c6
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pymodbus/payload.py
amalieKo/Balancing-Platform
a8382e51b70480404cb9ec2988e61bc65b9e86c6
[ "MIT" ]
6
2018-11-08T13:38:53.000Z
2021-05-28T14:29:14.000Z
""" Modbus Payload Builders ------------------------ A collection of utilities for building and decoding modbus messages payloads. """ from struct import pack, unpack from pymodbus.interfaces import IPayloadBuilder from pymodbus.constants import Endian from pymodbus.utilities import pack_bitstring from pymodbus.util...
33.031712
82
0.588006
from struct import pack, unpack from pymodbus.interfaces import IPayloadBuilder from pymodbus.constants import Endian from pymodbus.utilities import pack_bitstring from pymodbus.utilities import unpack_bitstring from pymodbus.utilities import make_byte_string from pymodbus.exceptions import ParameterException from pymo...
true
true
f747310db40efaff595775bdbf6ab22beac0f310
237
py
Python
python/2.OOP/1Encapsulation/1.3.__str__.py
dunitian/BaseCode
4855ef4c6dd7c95d7239d2048832d8acfe26e084
[ "Apache-2.0" ]
25
2018-06-13T08:13:44.000Z
2020-11-19T14:02:11.000Z
python/2.OOP/1Encapsulation/1.3.__str__.py
dunitian/BaseCode
4855ef4c6dd7c95d7239d2048832d8acfe26e084
[ "Apache-2.0" ]
null
null
null
python/2.OOP/1Encapsulation/1.3.__str__.py
dunitian/BaseCode
4855ef4c6dd7c95d7239d2048832d8acfe26e084
[ "Apache-2.0" ]
13
2018-06-13T08:13:38.000Z
2022-01-06T06:45:07.000Z
class Student(object): def __init__(self, name, age): self.name = name self.age = age # self别忘记写了 def __str__(self): return "姓名:%s,年龄:%s" % (self.name, self.age) lisi = Student("李四", 22) print(lisi)
19.75
52
0.57384
class Student(object): def __init__(self, name, age): self.name = name self.age = age def __str__(self): return "姓名:%s,年龄:%s" % (self.name, self.age) lisi = Student("李四", 22) print(lisi)
true
true
f7473119c94e365fee46f952464de324b16f929c
6,905
py
Python
resources/mls_handler.py
markmelnic/CellTower-Radar
801973498a8de4aa942a237d90b0fd09db5e3bb0
[ "MIT" ]
2
2021-02-03T09:42:45.000Z
2021-12-20T05:31:48.000Z
resources/mls_handler.py
markmelnic/CellTower-Radar
801973498a8de4aa942a237d90b0fd09db5e3bb0
[ "MIT" ]
null
null
null
resources/mls_handler.py
markmelnic/CellTower-Radar
801973498a8de4aa942a237d90b0fd09db5e3bb0
[ "MIT" ]
3
2020-10-06T01:36:00.000Z
2021-12-08T17:43:03.000Z
import os, csv, json, shutil, requests, gzip import pandas as pd from bs4 import BeautifulSoup from scipy import spatial from geopy.distance import great_circle from resources.utils import cartesian from resources.scrape_mccs import scrape_mccs, MCCS_JSON HEADERS = {"User-Agent": 'Mozilla/5.0 (Windows NT 10.0; Win64...
38.361111
143
0.555539
import os, csv, json, shutil, requests, gzip import pandas as pd from bs4 import BeautifulSoup from scipy import spatial from geopy.distance import great_circle from resources.utils import cartesian from resources.scrape_mccs import scrape_mccs, MCCS_JSON HEADERS = {"User-Agent": 'Mozilla/5.0 (Windows NT 10.0; Win64...
true
true
f74731256d0f2d68a38247eb8de514eee59345a7
2,887
py
Python
LSAPlugin.py
movingpictures83/LSA
d28c4be1bbd2d908cf8b414d816680c3bf65f050
[ "MIT" ]
null
null
null
LSAPlugin.py
movingpictures83/LSA
d28c4be1bbd2d908cf8b414d816680c3bf65f050
[ "MIT" ]
null
null
null
LSAPlugin.py
movingpictures83/LSA
d28c4be1bbd2d908cf8b414d816680c3bf65f050
[ "MIT" ]
null
null
null
import sys import numpy import random class LSAPlugin: def input(self, filename): self.myfile = filename def run(self): filestuff = open(self.myfile, 'r') self.firstline = filestuff.readline() lines = [] for line in filestuff: lines.append(line) self.m = len(lines)...
29.459184
91
0.456183
import sys import numpy import random class LSAPlugin: def input(self, filename): self.myfile = filename def run(self): filestuff = open(self.myfile, 'r') self.firstline = filestuff.readline() lines = [] for line in filestuff: lines.append(line) self.m = len(lines)...
true
true
f74732f52e7b1c7648a2f3e5aaba63cc5308de8d
954
py
Python
app/main.py
cryptobellum/ds-bw
ab258b37ae99d78767631c010f6f9e1f615dfffa
[ "MIT" ]
7
2020-07-17T21:18:17.000Z
2021-06-29T04:52:59.000Z
app/main.py
cryptobellum/ds-bw
ab258b37ae99d78767631c010f6f9e1f615dfffa
[ "MIT" ]
2
2020-08-03T14:54:04.000Z
2020-08-28T03:30:27.000Z
app/main.py
cryptobellum/ds-bw
ab258b37ae99d78767631c010f6f9e1f615dfffa
[ "MIT" ]
53
2020-06-16T16:21:59.000Z
2021-06-26T02:08:39.000Z
from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware import uvicorn from app import db, ml, viz description = """ Edit your app's title and description. See [https://fastapi.tiangolo.com/tutorial/metadata/](https://fastapi.tiangolo.com/tutorial/metadata/) To use these interactive docs: - Cl...
25.105263
141
0.720126
from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware import uvicorn from app import db, ml, viz description = """ Edit your app's title and description. See [https://fastapi.tiangolo.com/tutorial/metadata/](https://fastapi.tiangolo.com/tutorial/metadata/) To use these interactive docs: - Cl...
true
true
f747331dcd666e654f47dbc3d679b85925957eaa
3,195
py
Python
segmentron/models/danet.py
cocolord/SegmenTron
bb9415c22b1f6e0a032a71112e5a5a03e5ec6eab
[ "Apache-2.0" ]
654
2019-11-16T16:12:06.000Z
2022-03-31T16:55:34.000Z
segmentron/models/danet.py
nemonameless/SegmenTron
940015dc35614c15bd303f91f611878efbab8796
[ "Apache-2.0" ]
66
2019-11-25T02:15:33.000Z
2021-11-15T02:54:49.000Z
segmentron/models/danet.py
nemonameless/SegmenTron
940015dc35614c15bd303f91f611878efbab8796
[ "Apache-2.0" ]
145
2019-11-16T16:12:10.000Z
2022-03-31T07:21:09.000Z
from __future__ import division import torch import torch.nn as nn import torch.nn.functional as F from .segbase import SegBaseModel from .model_zoo import MODEL_REGISTRY from ..modules import _FCNHead, PAM_Module, CAM_Module __all__ = ['DANet'] @MODEL_REGISTRY.register() class DANet(SegBaseModel): r"""DANet m...
35.5
104
0.593114
from __future__ import division import torch import torch.nn as nn import torch.nn.functional as F from .segbase import SegBaseModel from .model_zoo import MODEL_REGISTRY from ..modules import _FCNHead, PAM_Module, CAM_Module __all__ = ['DANet'] @MODEL_REGISTRY.register() class DANet(SegBaseModel): def __init_...
true
true
f7473326ff2c4f630008242eafe7629b1b3c35b4
2,512
py
Python
automatedDataExtraction/dynamicAnalysisPrototype/fileAccessObservations.py
malus-security/ioracle
d68c005bb1325d87c3267a7ebebd1b895f3390be
[ "BSD-3-Clause" ]
1
2020-08-17T08:06:07.000Z
2020-08-17T08:06:07.000Z
automatedDataExtraction/dynamicAnalysisPrototype/fileAccessObservations.py
malus-security/ioracle
d68c005bb1325d87c3267a7ebebd1b895f3390be
[ "BSD-3-Clause" ]
null
null
null
automatedDataExtraction/dynamicAnalysisPrototype/fileAccessObservations.py
malus-security/ioracle
d68c005bb1325d87c3267a7ebebd1b895f3390be
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python #Note to self: I am assuming that extensions without a class type are generics and labelling them that way in the facts. #we will need to modify this if I'm wrong about how to handle this type of extension. #when there is more time, we should look into these by figuring out who issues them and an...
41.180328
124
0.709395
#when there is more time, we should look into these by figuring out who issues them and analyzing the issuers with IDA. #for now, we don't really care though since the only extensions we're worried about are file type and mach type. import sys import re fileAccessPath = sys.argv[1] processesInfoPath = sys.argv[2]...
true
true
f7473375efdd1601a2d88ef7585ad76adeb74718
322
py
Python
ProgramacaoOO/Loja/pessoa.py
VictorMello1993/CursoPythonUdemy
d3e2e542a7c3d3f9635f2b88d0e75ab4fa84236d
[ "MIT" ]
null
null
null
ProgramacaoOO/Loja/pessoa.py
VictorMello1993/CursoPythonUdemy
d3e2e542a7c3d3f9635f2b88d0e75ab4fa84236d
[ "MIT" ]
4
2021-04-08T21:54:09.000Z
2022-02-10T14:35:13.000Z
ProgramacaoOO/Loja/pessoa.py
VictorMello1993/CursoPythonUdemy
d3e2e542a7c3d3f9635f2b88d0e75ab4fa84236d
[ "MIT" ]
null
null
null
MAIOR_IDADE = 18 class Pessoa: def __init__(self, nome, idade): self.nome = nome self.idade = idade def __str__(self): if not self.idade: return self.nome return f'{self.nome} - {self.idade}' def is_adult(self): return (self.idade or 0) >= MAIOR_IDAD...
17.888889
47
0.571429
MAIOR_IDADE = 18 class Pessoa: def __init__(self, nome, idade): self.nome = nome self.idade = idade def __str__(self): if not self.idade: return self.nome return f'{self.nome} - {self.idade}' def is_adult(self): return (self.idade or 0) >= MAIOR_IDAD...
true
true
f74734436deb6a4b07c419fc84c6752388928560
14,947
py
Python
extensions/rich_text_components/components_test.py
yash10019coder/oppia
8c349c61ac723a2fd507046b20957934cba70e3a
[ "Apache-2.0" ]
2
2022-03-27T23:15:17.000Z
2022-03-27T23:15:32.000Z
extensions/rich_text_components/components_test.py
yash10019coder/oppia
8c349c61ac723a2fd507046b20957934cba70e3a
[ "Apache-2.0" ]
null
null
null
extensions/rich_text_components/components_test.py
yash10019coder/oppia
8c349c61ac723a2fd507046b20957934cba70e3a
[ "Apache-2.0" ]
2
2022-03-22T16:57:32.000Z
2022-03-24T17:38:42.000Z
# coding: utf-8 # # Copyright 2018 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
39.334211
118
0.529404
from __future__ import annotations import inspect import os import re from core import utils from core.tests import test_utils from extensions.rich_text_components import components class ComponentValidationUnitTests(test_utils.GenericTestBase): def check_validation( self, rte_comp...
true
true
f74734d3cadca425572d82d16e2ee61e7cb2b5e4
7,486
py
Python
tests/python/gaia-ui-tests/gaiatest/gcli.py
Delphine/gaia
df92f0ebd89efbc63570a61e70c4304c17b8b555
[ "Apache-2.0" ]
1
2021-11-09T00:27:34.000Z
2021-11-09T00:27:34.000Z
tests/python/gaia-ui-tests/gaiatest/gcli.py
Delphine/gaia
df92f0ebd89efbc63570a61e70c4304c17b8b555
[ "Apache-2.0" ]
null
null
null
tests/python/gaia-ui-tests/gaiatest/gcli.py
Delphine/gaia
df92f0ebd89efbc63570a61e70c4304c17b8b555
[ "Apache-2.0" ]
null
null
null
import argparse import sys from marionette import Marionette import gaiatest class GCli(object): def __init__(self): self.commands = { 'connectwifi': { 'function': self.connect_to_wifi, 'args': [ {'name': 'ssid', 'help...
34.497696
79
0.516297
import argparse import sys from marionette import Marionette import gaiatest class GCli(object): def __init__(self): self.commands = { 'connectwifi': { 'function': self.connect_to_wifi, 'args': [ {'name': 'ssid', 'help...
false
true
f74734ea766659911801f18e1126c9cd8be09958
210
py
Python
assignment1/reducer.py
IITDU-BSSE06/ads-demystifying-the-logs-Farzana0627
96def69a97f900bfc693c5ccf40df35fd9699681
[ "MIT" ]
null
null
null
assignment1/reducer.py
IITDU-BSSE06/ads-demystifying-the-logs-Farzana0627
96def69a97f900bfc693c5ccf40df35fd9699681
[ "MIT" ]
null
null
null
assignment1/reducer.py
IITDU-BSSE06/ads-demystifying-the-logs-Farzana0627
96def69a97f900bfc693c5ccf40df35fd9699681
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys Total = 0 for line in sys.stdin: data = line.strip() if data == "" or data is None: continue if data == "10.99.99.186": Total=Total+1 print Total
14
35
0.566667
import sys Total = 0 for line in sys.stdin: data = line.strip() if data == "" or data is None: continue if data == "10.99.99.186": Total=Total+1 print Total
false
true
f747350ed2fe7ea42b0ccce6f38156b781455d8b
1,003
py
Python
taxamo/models/emailInvoiceIn.py
taxamo/taxamo-python
190bdda68963860c131d2b1e9d31cd88de10d694
[ "Apache-2.0" ]
4
2016-03-14T03:59:08.000Z
2020-06-21T07:58:38.000Z
taxamo/models/emailInvoiceIn.py
taxamo/taxamo-python
190bdda68963860c131d2b1e9d31cd88de10d694
[ "Apache-2.0" ]
2
2016-03-07T13:41:23.000Z
2017-07-11T13:39:44.000Z
taxamo/models/emailInvoiceIn.py
taxamo/taxamo-python
190bdda68963860c131d2b1e9d31cd88de10d694
[ "Apache-2.0" ]
8
2016-01-13T14:32:19.000Z
2021-08-16T11:14:06.000Z
#!/usr/bin/env python """ Copyright 2014-2021 by Taxamo Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applic...
31.34375
90
0.690927
class EmailInvoiceIn: def __init__(self): self.swaggerTypes = { 'buyer_email': 'str' } self.buyer_email = None
true
true
f7473544b1822a3a0d70bbc5fd6b0a198a10e969
90,128
py
Python
test/functional/p2p_segwit.py
thehomosapien/AMLBitcoin
f097ca52c2e8039761f1927d83a9fe0b4c355b1c
[ "MIT" ]
null
null
null
test/functional/p2p_segwit.py
thehomosapien/AMLBitcoin
f097ca52c2e8039761f1927d83a9fe0b4c355b1c
[ "MIT" ]
null
null
null
test/functional/p2p_segwit.py
thehomosapien/AMLBitcoin
f097ca52c2e8039761f1927d83a9fe0b4c355b1c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Copyright (c) 2017-2018 The AmlBitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test segwit transactions and blocks on P2P network....
46.195797
143
0.658253
from test_framework.mininode import * from test_framework.test_framework import AmlBitcoinTestFramework from test_framework.util import * from test_framework.script import * from test_framework.blocktools import create_block, create_coinbase, add_witness_commitment, get_witness_script, WITNESS_COMMITMENT_HEADER f...
true
true
f747357f209b9cc7c44b42ce07202298e507cedd
2,896
py
Python
structy-practice-solutions/99-blackJack.py
RuthraVed/hackerearth-practice-solutions
663f46226a53c20979b8249e96b733b86d09ff8a
[ "MIT" ]
null
null
null
structy-practice-solutions/99-blackJack.py
RuthraVed/hackerearth-practice-solutions
663f46226a53c20979b8249e96b733b86d09ff8a
[ "MIT" ]
null
null
null
structy-practice-solutions/99-blackJack.py
RuthraVed/hackerearth-practice-solutions
663f46226a53c20979b8249e96b733b86d09ff8a
[ "MIT" ]
null
null
null
''' BLACKJACK HIGHEST Basic Blackjack rules: 1. Cards with the numbers 2 through 10 have their face value. 2. Jacks, queens, and kings are valued at 10 points. 3. Aces can be 1 or 11 points. Have the function BlackjackHighest(strArr) take the strArr parameter being passed which will be an array of numbers and letter...
39.135135
201
0.711671
def BlackjackHighest(strArr): cards_list = ['ace','two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'jack', 'queen', 'king'] cards_values = [11,2,3,4,5,6,7,8,9,10,10,10,10] hand_values = [] highest_card_rank = 0 ace_in_deck = False for card in strArr: index_of_card = cards_list.i...
true
true
f74735bd66f1a0261ec32cc6cb85f99786bfa4c2
19,702
py
Python
unyt/tests/test_units.py
thisch/unyt
27894c1edc275205a9ad2e0d9f47d11241e1f5c3
[ "BSD-3-Clause" ]
null
null
null
unyt/tests/test_units.py
thisch/unyt
27894c1edc275205a9ad2e0d9f47d11241e1f5c3
[ "BSD-3-Clause" ]
null
null
null
unyt/tests/test_units.py
thisch/unyt
27894c1edc275205a9ad2e0d9f47d11241e1f5c3
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Test symbolic unit handling. """ # ----------------------------------------------------------------------------- # Copyright (c) 2018, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the LICENSE file, distributed with this sof...
25.45478
88
0.627652
import numpy as np from numpy.testing import ( assert_almost_equal, assert_allclose, assert_array_almost_equal_nulp, assert_equal, ) import operator import pickle import pytest from sympy import Symbol from unyt.testing import assert_allclose_units from unyt.unit_registry import UnitRegistry...
true
true
f74736102e67af2429373697343787ec8b0c3da4
440
py
Python
code/01-intro-asyncio/sync_demo.py
mfonism/us-pycon-2019-tutorial
bdf98b471acd9d9111c633ea6a0b9516539ed8d9
[ "Apache-2.0" ]
56
2019-04-18T11:11:15.000Z
2022-03-28T16:45:12.000Z
code/01-intro-asyncio/sync_demo.py
fcdk1982/us-pycon-2019-tutorial
bdf98b471acd9d9111c633ea6a0b9516539ed8d9
[ "Apache-2.0" ]
11
2019-04-18T18:51:06.000Z
2019-05-02T23:44:48.000Z
code/01-intro-asyncio/sync_demo.py
fcdk1982/us-pycon-2019-tutorial
bdf98b471acd9d9111c633ea6a0b9516539ed8d9
[ "Apache-2.0" ]
15
2019-05-02T17:17:43.000Z
2021-05-18T02:53:26.000Z
import time def long_running_task(time_to_sleep: int) -> None: print(f"Begin sleep for {time_to_sleep}") time.sleep(time_to_sleep) print(f"Awake from {time_to_sleep}") def main() -> None: long_running_task(2) long_running_task(10) long_running_task(5) if __name__ == "__main__": s = tim...
20.952381
53
0.675
import time def long_running_task(time_to_sleep: int) -> None: print(f"Begin sleep for {time_to_sleep}") time.sleep(time_to_sleep) print(f"Awake from {time_to_sleep}") def main() -> None: long_running_task(2) long_running_task(10) long_running_task(5) if __name__ == "__main__": s = tim...
true
true
f7473613deb0766b99315c742b58237acf9fe7aa
3,944
py
Python
tests/test_PolyViz.py
kobejohn/polymaze
c7ac6049bef547f032c353c5c50e8ead95954a33
[ "MIT" ]
21
2015-02-09T17:36:36.000Z
2021-06-01T19:58:59.000Z
tests/test_PolyViz.py
kobejohn/polymaze
c7ac6049bef547f032c353c5c50e8ead95954a33
[ "MIT" ]
1
2017-01-12T13:52:07.000Z
2017-01-12T13:52:07.000Z
tests/test_PolyViz.py
kobejohn/polymaze
c7ac6049bef547f032c353c5c50e8ead95954a33
[ "MIT" ]
4
2017-12-07T15:18:19.000Z
2021-06-01T19:59:20.000Z
import unittest from tests.test_PolyGrid import generic_grid from polymaze.polygrid import PolyGrid, PolyViz # silly workaround to allow tests to work in py2 or py3 try: _assertCountEqual = unittest.TestCase.assertCountEqual # py3 from unittest import mock except (AttributeError, ImportError): _assertCou...
39.838384
78
0.672667
import unittest from tests.test_PolyGrid import generic_grid from polymaze.polygrid import PolyGrid, PolyViz try: _assertCountEqual = unittest.TestCase.assertCountEqual from unittest import mock except (AttributeError, ImportError): _assertCountEqual = unittest.TestCase.assertItemsEqual import mo...
true
true
f7473704d0666a1a2ef0697dc0e706ddb1e68242
1,543
py
Python
notes/algo-ds-practice/problems/divide_conquer/largest_rectangle_in_histogram.py
Anmol-Singh-Jaggi/interview-notes
65af75e2b5725894fa5e13bb5cd9ecf152a0d652
[ "MIT" ]
6
2020-07-05T05:15:19.000Z
2021-01-24T20:17:14.000Z
notes/algo-ds-practice/problems/divide_conquer/largest_rectangle_in_histogram.py
Anmol-Singh-Jaggi/interview-notes
65af75e2b5725894fa5e13bb5cd9ecf152a0d652
[ "MIT" ]
null
null
null
notes/algo-ds-practice/problems/divide_conquer/largest_rectangle_in_histogram.py
Anmol-Singh-Jaggi/interview-notes
65af75e2b5725894fa5e13bb5cd9ecf152a0d652
[ "MIT" ]
2
2020-09-14T06:46:37.000Z
2021-06-15T09:17:21.000Z
''' Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity, assume that all bars have same width and the width is 1 unit. For example, consider the following histogram with 7 bars of heights {6, 2, 5, 4, 5, 2, 6}. The large...
53.206897
188
0.777706
true
true
f74737491bb1036b473979bbb4c7579f4a19d8b1
4,286
py
Python
sdk/python/pulumi_azure_native/securityinsights/v20190101preview/get_threat_intelligence_indicator.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/securityinsights/v20190101preview/get_threat_intelligence_indicator.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/securityinsights/v20190101preview/get_threat_intelligence_indicator.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "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 __a...
34.564516
185
0.640924
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetThreatIntelligenceIndicatorResult', 'AwaitableGetThreatIntelligenceIndicatorResult', 'get_threat_intelligence_indicator', ] @pulumi.output_...
true
true
f74739276decc49faceb2f87efb08f043a224327
367
py
Python
awwards/migrations/0005_auto_20201025_2322.py
Akumucollins/-Awwards
5b40c92f6d948e6bfcd5b7e42eacce94ca158eb2
[ "MIT" ]
null
null
null
awwards/migrations/0005_auto_20201025_2322.py
Akumucollins/-Awwards
5b40c92f6d948e6bfcd5b7e42eacce94ca158eb2
[ "MIT" ]
null
null
null
awwards/migrations/0005_auto_20201025_2322.py
Akumucollins/-Awwards
5b40c92f6d948e6bfcd5b7e42eacce94ca158eb2
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-10-25 20:22 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('awwards', '0004_auto_20201025_2307'), ] operations = [ migrations.RenameField( model_name='project', old_name='comment', ...
19.315789
47
0.588556
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('awwards', '0004_auto_20201025_2307'), ] operations = [ migrations.RenameField( model_name='project', old_name='comment', new_name='comments', ), ]
true
true
f7473958e328aa01b9043eaaea2fe3657ac89c38
759
py
Python
ProjectApplication/evaluation/migrations/0020_adds_proposals_person_to_reviewer.py
code-review-doctor/project-application
d85b40b69572efbcda24ce9c40803f76d8ffd192
[ "MIT" ]
5
2020-07-29T10:00:11.000Z
2022-02-19T11:00:34.000Z
ProjectApplication/evaluation/migrations/0020_adds_proposals_person_to_reviewer.py
code-review-doctor/project-application
d85b40b69572efbcda24ce9c40803f76d8ffd192
[ "MIT" ]
471
2019-09-20T14:37:28.000Z
2022-03-25T14:16:34.000Z
ProjectApplication/evaluation/migrations/0020_adds_proposals_person_to_reviewer.py
code-review-doctor/project-application
d85b40b69572efbcda24ce9c40803f76d8ffd192
[ "MIT" ]
5
2020-03-15T12:42:47.000Z
2022-02-15T18:06:52.000Z
# Generated by Django 3.0.3 on 2020-03-20 11:05 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('project_core', '0111_remove_project_duration_months'), ('evaluation', '0019_historicalcallevaluation'), ] o...
29.192308
129
0.641634
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('project_core', '0111_remove_project_duration_months'), ('evaluation', '0019_historicalcallevaluation'), ] operations = [ migrations.AddField( ...
true
true
f7473a103d567677307fc012622a03ca2e17096a
14,837
py
Python
tests/test_kernel_language.py
pierrick-giffard/parcels
2447d4785b915e17f59f6c1f90703a35d2235c91
[ "MIT" ]
null
null
null
tests/test_kernel_language.py
pierrick-giffard/parcels
2447d4785b915e17f59f6c1f90703a35d2235c91
[ "MIT" ]
null
null
null
tests/test_kernel_language.py
pierrick-giffard/parcels
2447d4785b915e17f59f6c1f90703a35d2235c91
[ "MIT" ]
null
null
null
from parcels import FieldSet, ParticleSet, ScipyParticle, JITParticle, Kernel, Variable, ErrorCode from parcels.kernels.seawaterdensity import polyTEOS10_bsq, UNESCO_Density from parcels import random as parcels_random import numpy as np import pytest import random as py_random from os import path import sys ptype = ...
36.816377
129
0.599245
from parcels import FieldSet, ParticleSet, ScipyParticle, JITParticle, Kernel, Variable, ErrorCode from parcels.kernels.seawaterdensity import polyTEOS10_bsq, UNESCO_Density from parcels import random as parcels_random import numpy as np import pytest import random as py_random from os import path import sys ptype = ...
true
true
f7473a404489d31f42cac88edfc8d83e3eaf808b
6,702
py
Python
code/regreg/algorithms.py
fperez/regreg
e8a2591cb6cff1eec18fc6589c589265ed2b2fa9
[ "BSD-3-Clause" ]
null
null
null
code/regreg/algorithms.py
fperez/regreg
e8a2591cb6cff1eec18fc6589c589265ed2b2fa9
[ "BSD-3-Clause" ]
null
null
null
code/regreg/algorithms.py
fperez/regreg
e8a2591cb6cff1eec18fc6589c589265ed2b2fa9
[ "BSD-3-Clause" ]
4
2016-02-09T02:30:46.000Z
2021-05-05T23:11:55.000Z
import numpy as np class algorithm(object): def __init__(self, problem): self.problem = problem self.debug = False self.inv_step = None @property def output(self): """ Return the 'interesting' part of the problem arguments. In the regression case, this is t...
36.622951
159
0.5188
import numpy as np class algorithm(object): def __init__(self, problem): self.problem = problem self.debug = False self.inv_step = None @property def output(self): """ Return the 'interesting' part of the problem arguments. In the regression case, this is t...
false
true
f7473a899ea8fc8e78ad452175b177ad0c3a03bc
414
py
Python
Hackerearth Set/EasyMultiple.py
Siddharth2016/PYTHON3_prog
9dfa258d87f5b00779d39d9de9a49c1c6cea06be
[ "MIT" ]
2
2019-02-26T14:06:53.000Z
2019-02-27T17:13:01.000Z
Hackerearth Set/EasyMultiple.py
Siddharth2016/PYTHON3_prog
9dfa258d87f5b00779d39d9de9a49c1c6cea06be
[ "MIT" ]
null
null
null
Hackerearth Set/EasyMultiple.py
Siddharth2016/PYTHON3_prog
9dfa258d87f5b00779d39d9de9a49c1c6cea06be
[ "MIT" ]
2
2017-12-26T07:59:57.000Z
2018-06-24T03:35:05.000Z
# EASY MULTIPLE for _ in range(int(input())): n = int(input())-1 if n<3: print('0') continue elif n<5: print('3') continue t3 = n//3 t5 = n//5 t15 = n//15 t3l = t3*3 t5l = t5*5 t15l = t15*15 res3 = (t3*(3+t3l))//2 res5 = (t5*(...
18.818182
32
0.434783
for _ in range(int(input())): n = int(input())-1 if n<3: print('0') continue elif n<5: print('3') continue t3 = n//3 t5 = n//5 t15 = n//15 t3l = t3*3 t5l = t5*5 t15l = t15*15 res3 = (t3*(3+t3l))//2 res5 = (t5*(5+t5l))//2 ...
true
true
f7473aab82457b61ad5a1a6c123f2785f5c13821
2,700
py
Python
gmplot/drawables/symbols/circle.py
tirkarthi/gmplot
0979c51467e25cfe870668d3990ce7885e317f85
[ "MIT" ]
null
null
null
gmplot/drawables/symbols/circle.py
tirkarthi/gmplot
0979c51467e25cfe870668d3990ce7885e317f85
[ "MIT" ]
null
null
null
gmplot/drawables/symbols/circle.py
tirkarthi/gmplot
0979c51467e25cfe870668d3990ce7885e317f85
[ "MIT" ]
null
null
null
from gmplot.color import _get_hex_color from gmplot.utility import _get_value, _format_LatLng class _Circle(object): def __init__(self, lat, lng, radius, **kwargs): ''' Args: lat (float): Latitude of the center of the circle. lng (float): Longitude of the center of the circl...
42.857143
110
0.564444
from gmplot.color import _get_hex_color from gmplot.utility import _get_value, _format_LatLng class _Circle(object): def __init__(self, lat, lng, radius, **kwargs): precision = _get_value(kwargs, ['precision'], 6) self._center = _format_LatLng(lat, lng, precision) self._radius = radius ...
true
true
f7473aba082c9daaf7a230c843b739f19994172f
1,399
py
Python
problems/LongestCommonPrefix.py
strambake/data-structures-and-algorithms
739ded4b9b2feaf0da5a7383558c0ea9d16579ec
[ "Apache-2.0" ]
1
2021-08-11T15:41:19.000Z
2021-08-11T15:41:19.000Z
problems/LongestCommonPrefix.py
strambake/data-structures-and-algorithms
739ded4b9b2feaf0da5a7383558c0ea9d16579ec
[ "Apache-2.0" ]
5
2021-08-11T12:37:08.000Z
2021-09-04T04:49:12.000Z
problems/LongestCommonPrefix.py
strambake/data-structures-and-algorithms
739ded4b9b2feaf0da5a7383558c0ea9d16579ec
[ "Apache-2.0" ]
null
null
null
# Write a function to find the longest common prefix string amongst an array of strings. # If there is no common prefix, return an empty string "". # # Example 1: # Input: strs = ["flower","flow","flight"] # Output: "fl" # # Example 2: # Input: strs = ["dog","racecar","car"] # Output: "" # Explanation: There is no comm...
29.145833
122
0.521086
from typing import List from unittest import TestCase class Solution(): def longestCommonPrefix(self, strs: List[str]) -> str: prefix = '' if strs: for index, char in enumerate(strs[0]): match = True for s in strs[1:]: if...
true
true
f7473ad3988c149aed70525ff06fa9bee50bfa42
3,385
py
Python
resnext_wsl.py
PudPawat/protest-detection-violence-estimation
6469c3ae47a7d99308458174fe16bd2c5c7821aa
[ "MIT" ]
2
2020-12-10T01:22:13.000Z
2021-03-11T08:05:16.000Z
resnext_wsl.py
PudPawat/protest-detection-violence-estimation
6469c3ae47a7d99308458174fe16bd2c5c7821aa
[ "MIT" ]
null
null
null
resnext_wsl.py
PudPawat/protest-detection-violence-estimation
6469c3ae47a7d99308458174fe16bd2c5c7821aa
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # Optional list of dependencies required by the package ''' Code From : https://github.com/facebookresearch/WSL-Image...
40.297619
97
0.721123
dependencies = ['torch', 'torchvision'] try: from torch.hub import load_state_dict_from_url except ImportError: from torch.utils.model_zoo import load_url as load_state_dict_from_url from Res import ResNet, Bottleneck model_urls = { 'resnext101_32x8d': 'https://download.pytorch.org/models/i...
true
true
f7473b06ffd22517f77fcbd81873eb9f34b33b02
6,158
py
Python
src/sqlfluff/rules/L018.py
zhongjiajie/sqlfluff
bedf8018d8b21ae906f49e265d111b322bb6ef7d
[ "MIT" ]
2
2021-08-04T08:58:33.000Z
2021-08-04T18:54:06.000Z
src/sqlfluff/rules/L018.py
linchun3/sqlfluff
0bfa5339380ecd040252e8fa4326a4b4c8c8ed86
[ "MIT" ]
null
null
null
src/sqlfluff/rules/L018.py
linchun3/sqlfluff
0bfa5339380ecd040252e8fa4326a4b4c8c8ed86
[ "MIT" ]
null
null
null
"""Implementation of Rule L018.""" from sqlfluff.core.parser import NewlineSegment, WhitespaceSegment from sqlfluff.core.rules.base import BaseRule, LintFix, LintResult from sqlfluff.core.rules.doc_decorators import document_fix_compatible @document_fix_compatible class Rule_L018(BaseRule): """WITH clause closi...
41.608108
88
0.427736
from sqlfluff.core.parser import NewlineSegment, WhitespaceSegment from sqlfluff.core.rules.base import BaseRule, LintFix, LintResult from sqlfluff.core.rules.doc_decorators import document_fix_compatible @document_fix_compatible class Rule_L018(BaseRule): _works_on_unparsable = False config_keywords = ["t...
true
true
f7473b1160219337ac76c72c05af3b210f68ff11
7,115
py
Python
models/mnist_ses.py
spetrescu/sesn
43ecc5da7083364eea2c66742c17231c18465973
[ "MIT" ]
55
2020-02-13T17:44:25.000Z
2022-03-08T04:26:34.000Z
models/mnist_ses.py
spetrescu/sesn
43ecc5da7083364eea2c66742c17231c18465973
[ "MIT" ]
1
2021-07-09T21:49:17.000Z
2021-07-10T15:12:33.000Z
models/mnist_ses.py
spetrescu/sesn
43ecc5da7083364eea2c66742c17231c18465973
[ "MIT" ]
7
2020-02-13T19:41:46.000Z
2021-09-20T17:23:27.000Z
'''MIT License. Copyright (c) 2020 Ivan Sosnovik, Michał Szmaja''' import torch import torch.nn as nn import torch.nn.functional as F from .impl.ses_conv import SESMaxProjection from .impl.ses_conv import SESConv_Z2_H, SESConv_H_H class MNIST_SES_Scalar(nn.Module): def __init__(self, pool_size=4, kernel_size=11...
32.637615
105
0.561068
import torch import torch.nn as nn import torch.nn.functional as F from .impl.ses_conv import SESMaxProjection from .impl.ses_conv import SESConv_Z2_H, SESConv_H_H class MNIST_SES_Scalar(nn.Module): def __init__(self, pool_size=4, kernel_size=11, scales=[1.0], basis_type='A', **kwargs): super().__init__...
true
true
f7473b6a769b0d0aa12b04c27b125f1650742ad1
603
py
Python
Django/HomeworksProject/home/migrations/0005_friend_current_user.py
svyhlidka/Python-Projects
7c297bf7248a1e61699a69d62eb83f15cf90d352
[ "MIT" ]
null
null
null
Django/HomeworksProject/home/migrations/0005_friend_current_user.py
svyhlidka/Python-Projects
7c297bf7248a1e61699a69d62eb83f15cf90d352
[ "MIT" ]
null
null
null
Django/HomeworksProject/home/migrations/0005_friend_current_user.py
svyhlidka/Python-Projects
7c297bf7248a1e61699a69d62eb83f15cf90d352
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2020-09-01 19:09 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('home', '0004_friend'), ...
27.409091
144
0.676617
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('home', '0004_friend'), ] operations = [ migrations.Add...
true
true
f7473bd19b09010283929cec3e3a14a53e1a3ae6
8,283
py
Python
test/functional/bsv-block-size-activation-generated-default.py
slashrsm/bitcoin-sv
f5503f0fe1a30db70b9a07b2a22e27468bf1b59a
[ "OML" ]
2
2019-08-04T17:48:00.000Z
2021-02-15T19:17:47.000Z
test/functional/bsv-block-size-activation-generated-default.py
slashrsm/bitcoin-sv
f5503f0fe1a30db70b9a07b2a22e27468bf1b59a
[ "OML" ]
null
null
null
test/functional/bsv-block-size-activation-generated-default.py
slashrsm/bitcoin-sv
f5503f0fe1a30db70b9a07b2a22e27468bf1b59a
[ "OML" ]
1
2021-04-03T05:58:34.000Z
2021-04-03T05:58:34.000Z
#!/usr/bin/env python3 # Copyright (c) 2019 Bitcoin Association # Distributed under the Open BSV software license, see the accompanying file LICENSE. """ Test that the new default generated (mined) block size works correctly without the use of the blockmaxsize parameter. In short; if the user doesn't override things v...
45.262295
122
0.698418
import math from test_framework.test_framework import BitcoinTestFramework, SkipTest from test_framework.util import * from test_framework.mininode import * from test_framework.script import CScript, OP_TRUE, OP_RETURN from test_framework.blocktools import * from test_framework.cdefs import (ONE_MEGABYTE, MAX_TX_SI...
true
true
f7473bf34b91a8372b626e42e846963d1c1340ee
3,225
py
Python
Lib/xml/dom/html/HTMLScriptElement.py
M-Spencer-94/configNOW
56828587253202089e77cfdfcf5329f2a7f09b3f
[ "PSF-2.0", "Apache-2.0", "MIT" ]
3
2019-07-09T20:02:48.000Z
2021-11-21T20:00:37.000Z
Lib/xml/dom/html/HTMLScriptElement.py
M-Spencer-94/configNOW
56828587253202089e77cfdfcf5329f2a7f09b3f
[ "PSF-2.0", "Apache-2.0", "MIT" ]
null
null
null
Lib/xml/dom/html/HTMLScriptElement.py
M-Spencer-94/configNOW
56828587253202089e77cfdfcf5329f2a7f09b3f
[ "PSF-2.0", "Apache-2.0", "MIT" ]
null
null
null
######################################################################## # # File Name: HTMLScriptElement # # Documentation: http://docs.4suite.com/4DOM/HTMLScriptElement.html # ### This file is automatically generated by GenerateHtml.py. ### DO NOT EDIT! """ WWW: http://4suite.com/4DOM e-ma...
27.801724
78
0.603101
true
true
f7473c7d54e10cff5326af83ded330b2f0bc80bf
1,402
py
Python
xlsxwriter/test/comparison/test_chart_axis19.py
edparcell/XlsxWriter
d6a5df232ac0091017ae5c65f592bcc776d296ea
[ "BSD-2-Clause-FreeBSD" ]
1
2019-01-09T19:43:43.000Z
2019-01-09T19:43:43.000Z
xlsxwriter/test/comparison/test_chart_axis19.py
edparcell/XlsxWriter
d6a5df232ac0091017ae5c65f592bcc776d296ea
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_axis19.py
edparcell/XlsxWriter
d6a5df232ac0091017ae5c65f592bcc776d296ea
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2018, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
25.490909
79
0.563481
true
true