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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f7104bc49d07210082b385fe7fdff2047bffb718
9,835
py
Python
env/lib/python3.6/site-packages/jet/dashboard/dashboard.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
2
2019-12-04T16:24:44.000Z
2020-04-06T21:49:34.000Z
env/lib/python3.6/site-packages/jet/dashboard/dashboard.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
21
2021-02-04T01:37:44.000Z
2022-03-12T01:00:55.000Z
env/lib/python3.6/site-packages/jet/dashboard/dashboard.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
null
null
null
from importlib import import_module try: from django.core.urlresolvers import reverse except ImportError: # Django 1.11 from django.urls import reverse from django.template.loader import render_to_string from jet.dashboard import modules from jet.dashboard.models import UserDashboardModule from django.utils.tr...
30.927673
106
0.54306
from importlib import import_module try: from django.core.urlresolvers import reverse except ImportError: from django.urls import reverse from django.template.loader import render_to_string from jet.dashboard import modules from jet.dashboard.models import UserDashboardModule from django.utils.translation imp...
true
true
f7104c3230ed827c44d1fa39deafc95074822af7
2,126
py
Python
gateware/info/git.py
paddatrapper/HDMI2USB-litex-firmware
6a0235abe0ce9195b1717742c13c0dc4d45c3f4d
[ "BSD-2-Clause" ]
4
2018-08-19T03:50:15.000Z
2020-07-24T23:08:48.000Z
gateware/info/git.py
bunnie/litex-buildenv
7a704884a7f139716880ea02fec9309e253878e4
[ "BSD-2-Clause" ]
null
null
null
gateware/info/git.py
bunnie/litex-buildenv
7a704884a7f139716880ea02fec9309e253878e4
[ "BSD-2-Clause" ]
null
null
null
import binascii import os import subprocess import sys from migen.fhdl import * from litex.soc.interconnect.csr import * def git_root(): if sys.platform == "win32": # Git on Windows is likely to use Unix-style paths (`/c/path/to/repo`), # whereas directories passed to Python should be Windows-styl...
28.72973
83
0.574788
import binascii import os import subprocess import sys from migen.fhdl import * from litex.soc.interconnect.csr import * def git_root(): if sys.platform == "win32": git = subprocess.Popen( "git rev-parse --show-toplevel", cwd=os.path.dirname(__fi...
true
true
f7104c78c2bdf22a9a4177a3028c98b9bd1f60e0
20,626
py
Python
conans/model/build_info.py
pasrom/conan
5704fafa72e6619abb9714d99df5d13081d6f357
[ "MIT" ]
null
null
null
conans/model/build_info.py
pasrom/conan
5704fafa72e6619abb9714d99df5d13081d6f357
[ "MIT" ]
null
null
null
conans/model/build_info.py
pasrom/conan
5704fafa72e6619abb9714d99df5d13081d6f357
[ "MIT" ]
null
null
null
import os from collections import OrderedDict from copy import copy from conans.errors import ConanException from conans.util.conan_v2_mode import conan_v2_behavior DEFAULT_INCLUDE = "include" DEFAULT_LIB = "lib" DEFAULT_BIN = "bin" DEFAULT_RES = "res" DEFAULT_SHARE = "share" DEFAULT_BUILD = "" DEFAULT_FRAMEWORK = "F...
36.832143
101
0.635412
import os from collections import OrderedDict from copy import copy from conans.errors import ConanException from conans.util.conan_v2_mode import conan_v2_behavior DEFAULT_INCLUDE = "include" DEFAULT_LIB = "lib" DEFAULT_BIN = "bin" DEFAULT_RES = "res" DEFAULT_SHARE = "share" DEFAULT_BUILD = "" DEFAULT_FRAMEWORK = "F...
true
true
f7104c814506d615d1761157b853952abbef975d
4,425
py
Python
regression/run/arrayclass/python/test.py
ExternalRepositories/shroud
86c39d2324d947d28055f9024f52cc493eb0c813
[ "BSD-3-Clause" ]
73
2017-10-11T17:01:50.000Z
2022-01-01T21:42:12.000Z
regression/run/arrayclass/python/test.py
ExternalRepositories/shroud
86c39d2324d947d28055f9024f52cc493eb0c813
[ "BSD-3-Clause" ]
29
2018-03-21T19:34:29.000Z
2022-02-04T18:13:14.000Z
regression/run/arrayclass/python/test.py
ExternalRepositories/shroud
86c39d2324d947d28055f9024f52cc493eb0c813
[ "BSD-3-Clause" ]
8
2017-11-22T14:27:01.000Z
2022-03-30T08:49:03.000Z
# Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC and # other Shroud Project Developers. # See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (BSD-3-Clause) # ####################################################################### # # Test Python API generated from references....
33.522727
73
0.629153
Equal((10,), arr6.shape) self.assertEqual(10, arr6.size) arr7 = arrinst.fetchArrayPtrConst() self.assertIsInstance(arr4, np.ndarray) self.assertEqual('float64', arr7.dtype.name) self.assertEqual(1, arr7.ndim) self.assertEqual((10,), arr7.shape) self.assertEq...
true
true
f7104cdb14a8ffefb3c373799881a44789831177
522
py
Python
project_version/help.py
dmytrostriletskyi/project-version
c4c29f2e7b633a69eda1f89d022eadff3fe33d41
[ "MIT" ]
7
2022-01-18T20:12:29.000Z
2022-01-25T18:04:09.000Z
project_version/help.py
dmytrostriletskyi/project-version
c4c29f2e7b633a69eda1f89d022eadff3fe33d41
[ "MIT" ]
3
2022-01-29T15:46:46.000Z
2022-01-29T16:19:40.000Z
project_version/help.py
dmytrostriletskyi/project-version
c4c29f2e7b633a69eda1f89d022eadff3fe33d41
[ "MIT" ]
null
null
null
""" Provide help message for command line interface commands. """ PROVIDER_NAME_HELP = 'A provider of hosting for software development and version control name.' ORGANIZATION_NAME_HELP = "The provider's organization name." REPOSITORY_NAME_HELP = "The provider's repository name." BRANCH = 'A branch.' BASE_BRANCH = 'A br...
47.454545
95
0.781609
PROVIDER_NAME_HELP = 'A provider of hosting for software development and version control name.' ORGANIZATION_NAME_HELP = "The provider's organization name." REPOSITORY_NAME_HELP = "The provider's repository name." BRANCH = 'A branch.' BASE_BRANCH = 'A branch to compare a project version with. Usually, a default branch....
true
true
f7104d2f9d9499f3cf55c7355a54c7358562d6b1
1,015
py
Python
examples/classify_names/rough_work.py
huangruizhe/espresso
ee658bcc959bfbe8a7a61d7374d532d082d2aa26
[ "MIT" ]
null
null
null
examples/classify_names/rough_work.py
huangruizhe/espresso
ee658bcc959bfbe8a7a61d7374d532d082d2aa26
[ "MIT" ]
null
null
null
examples/classify_names/rough_work.py
huangruizhe/espresso
ee658bcc959bfbe8a7a61d7374d532d082d2aa26
[ "MIT" ]
null
null
null
# Online Python compiler (interpreter) to run Python online. # Write Python 3 code in this online editor and run it. import numpy as np list_a = [] for i in range(2): for j in range(5): list_a.append(i) list_a = np.random.permutation(list_a) print('class labels') print(list_a) list_a = np.array(list_a) i...
30.757576
85
0.782266
import numpy as np list_a = [] for i in range(2): for j in range(5): list_a.append(i) list_a = np.random.permutation(list_a) print('class labels') print(list_a) list_a = np.array(list_a) index_i = 0 classid_of_index0=list_a[index_i] print('class_of_index0: ', classid_of_index0) classid_of_index0_locati...
true
true
f7104d4af3e8e0b0704eb63303567f70590746a2
16,667
py
Python
calipy/viewer.py
jaedong27/calipy
ed5b5af2654b2a25e16af4267683cafc83d72729
[ "MIT" ]
1
2020-02-17T10:50:41.000Z
2020-02-17T10:50:41.000Z
calipy/viewer.py
jaedong27/calipy
ed5b5af2654b2a25e16af4267683cafc83d72729
[ "MIT" ]
1
2020-02-17T10:51:27.000Z
2020-02-17T10:51:27.000Z
calipy/viewer.py
jaedong27/calipy
ed5b5af2654b2a25e16af4267683cafc83d72729
[ "MIT" ]
null
null
null
import vtk from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor import math import numpy as np import numpy.matlib import os import json import cv2 # Z # / # / # / # ---------- X # | # | # | # Y class vtkRenderer(): def __init__(self, widget=None...
39.032787
141
0.628427
import vtk from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor import math import numpy as np import numpy.matlib import os import json import cv2 class vtkRenderer(): def __init__(self, widget=None): self.ren = vtk.vtkRenderer() if widget is not None: ...
true
true
f7104d857d6a0526aa83bfe43b03b59f697ae241
1,653
py
Python
setup.py
DiegoHeer/QuickFSScraping
cd0622eb56a9b3bee13dd3c8960a1c95e2c2443e
[ "MIT" ]
1
2021-01-19T09:15:06.000Z
2021-01-19T09:15:06.000Z
setup.py
DiegoHeer/QuickFSScraping
cd0622eb56a9b3bee13dd3c8960a1c95e2c2443e
[ "MIT" ]
null
null
null
setup.py
DiegoHeer/QuickFSScraping
cd0622eb56a9b3bee13dd3c8960a1c95e2c2443e
[ "MIT" ]
1
2021-01-19T10:04:29.000Z
2021-01-19T10:04:29.000Z
from distutils.core import setup from setuptools import find_packages import os # User-friendly description from README.md current_directory = os.path.dirname(os.path.abspath(__file__)) package_name = os.path.basename(current_directory) try: with open(os.path.join(current_directory, 'README.md'), encoding='utf-8')...
33.734694
92
0.69026
from distutils.core import setup from setuptools import find_packages import os current_directory = os.path.dirname(os.path.abspath(__file__)) package_name = os.path.basename(current_directory) try: with open(os.path.join(current_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read()...
true
true
f7104e042a9381fe9862f42a9135c2bac0fc99aa
14,268
py
Python
cdippy/stndata.py
wdar/cdippy
ef38b3445351ec8d9d7ea30b5b0d15825d794b0b
[ "BSD-3-Clause" ]
null
null
null
cdippy/stndata.py
wdar/cdippy
ef38b3445351ec8d9d7ea30b5b0d15825d794b0b
[ "BSD-3-Clause" ]
278
2018-10-28T13:48:18.000Z
2022-03-28T11:07:24.000Z
cdippy/stndata.py
wdar/cdippy
ef38b3445351ec8d9d7ea30b5b0d15825d794b0b
[ "BSD-3-Clause" ]
null
null
null
from datetime import datetime, timedelta from bisect import bisect_left import numpy.ma as ma from cdippy.cdippy import CDIPnc, Archive, Realtime, RealtimeXY, Historic import cdippy.timestamp_utils as tsu import cdippy.utils as cu class StnData(CDIPnc): """ Returns data and metadata for the specified s...
41.597668
124
0.584665
from datetime import datetime, timedelta from bisect import bisect_left import numpy.ma as ma from cdippy.cdippy import CDIPnc, Archive, Realtime, RealtimeXY, Historic import cdippy.timestamp_utils as tsu import cdippy.utils as cu class StnData(CDIPnc): max_deployments = 99 parameter_vars = ['waveHs...
true
true
f7104e1171ca3c5b939f29866585440a8400cd28
19,337
py
Python
Interface/Reduce.py
shaesaert/TuLiPXML
56cf4d58a9d7e17b6f6aebe6de8d5a1231035671
[ "BSD-3-Clause" ]
1
2021-05-28T23:44:28.000Z
2021-05-28T23:44:28.000Z
Interface/Reduce.py
shaesaert/TuLiPXML
56cf4d58a9d7e17b6f6aebe6de8d5a1231035671
[ "BSD-3-Clause" ]
2
2017-10-03T18:54:08.000Z
2018-08-21T09:50:09.000Z
Interface/Reduce.py
shaesaert/TuLiPXML
56cf4d58a9d7e17b6f6aebe6de8d5a1231035671
[ "BSD-3-Clause" ]
1
2018-10-06T12:58:52.000Z
2018-10-06T12:58:52.000Z
""" Local routines Written by S.Haesaert CONTENT helpfull functions for JPL project Bridging Tulip with the Statechart autocoder DATE 2 June """ # TODO : Check whether output set of reduced mealy machines (i,e.,ctrl.outputs) is too big? from __future__ import absolute_import from __future__ import...
42.875831
128
0.584734
from __future__ import absolute_import from __future__ import print_function import logging from itertools import product as it_product from networkx.algorithms.minors import equivalence_classes from tulip import transys from Interface import synth2 as synth logger = logging.getLogger(__name__) def remove_aux_in...
true
true
f7104e5f53580b564470d7f299654cf1542444e0
469
py
Python
env/Lib/site-packages/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_value.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
env/Lib/site-packages/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_value.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
env/Lib/site-packages/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_value.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class ValueValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="value", parent_name="scatterpolar.marker.colorbar.tickformatstop", **kwargs ): super(ValueValidator, self).__init__( plot...
27.588235
67
0.637527
import _plotly_utils.basevalidators class ValueValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="value", parent_name="scatterpolar.marker.colorbar.tickformatstop", **kwargs ): super(ValueValidator, self).__init__( plot...
true
true
f7104f1742e63a1113fe4bfce148895fa8e5ac2d
2,699
py
Python
twilio/access_token.py
quippp/twilio-python
22b84cdfd19a6b1bde84350053870a7c507af410
[ "MIT" ]
14
2016-12-10T18:44:38.000Z
2020-08-05T21:09:42.000Z
twilio/access_token.py
quippp/twilio-python
22b84cdfd19a6b1bde84350053870a7c507af410
[ "MIT" ]
1
2016-05-26T21:39:12.000Z
2016-05-26T21:39:14.000Z
v/lib/python2.7/site-packages/twilio/access_token.py
josh6beasttt/HangWithFriends
0c5113bf1203190364d4922754c21eb5d87a5c25
[ "Apache-2.0" ]
5
2017-01-08T13:00:25.000Z
2020-06-03T09:46:17.000Z
import time from twilio import jwt class IpMessagingGrant(object): """ Grant to access Twilio IP Messaging """ def __init__(self, service_sid=None, endpoint_id=None, deployment_role_sid=None, push_credential_sid=None): self.service_sid = service_sid self.endpoint_id = endpoint...
28.410526
79
0.603557
import time from twilio import jwt class IpMessagingGrant(object): def __init__(self, service_sid=None, endpoint_id=None, deployment_role_sid=None, push_credential_sid=None): self.service_sid = service_sid self.endpoint_id = endpoint_id self.deployment_role_sid = deploymen...
true
true
f7104f79652ee5e3c7047f0cf3b972ab698cbea7
6,962
py
Python
nova/console/websocketproxy.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/console/websocketproxy.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/console/websocketproxy.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
1
2020-07-24T00:41:18.000Z
2020-07-24T00:41:18.000Z
# Copyright (c) 2012 OpenStack Foundation # 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 ...
40.011494
78
0.620511
import socket import sys from oslo_log import log as logging from six.moves import http_cookies as Cookie import six.moves.urllib.parse as urlparse import websockify import nova.conf from nova.consoleauth import rpcapi as consoleauth_rpcapi from nova import context from nova import exception from nova...
true
true
f710508ef545bbdf41fe33a0d1d1d6589a1d0706
1,215
py
Python
sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/models/get_personal_preferences_response.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/models/get_personal_preferences_response.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/labservices/azure-mgmt-labservices/azure/mgmt/labservices/models/get_personal_preferences_response.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
36.818182
88
0.61893
from msrest.serialization import Model class GetPersonalPreferencesResponse(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'favorite_lab_resource_ids': {'key': 'favoriteLabResourceIds', 'type': '[str]'}, } def __init__(self, **kwargs): super(GetPersonal...
true
true
f71050d4778b9b286032e81da7a40b8d26399ce8
5,024
py
Python
model/model.py
zoumt1633/pytorch-project-template
871e00ebde6c2191de5f61b4cb7010c72b93c198
[ "Apache-2.0" ]
1
2021-04-23T03:26:55.000Z
2021-04-23T03:26:55.000Z
model/model.py
zoumt1633/pytorch-project-template
871e00ebde6c2191de5f61b4cb7010c72b93c198
[ "Apache-2.0" ]
null
null
null
model/model.py
zoumt1633/pytorch-project-template
871e00ebde6c2191de5f61b4cb7010c72b93c198
[ "Apache-2.0" ]
1
2021-09-06T02:38:50.000Z
2021-09-06T02:38:50.000Z
import torch import torch.nn from torch.nn.parallel import DistributedDataParallel as DDP from collections import OrderedDict import os.path as osp import wandb from utils.utils import DotDict class Model: def __init__(self, hp, net_arch, loss_f, rank=0, world_size=1): self.hp = hp self.device =...
36.405797
87
0.579618
import torch import torch.nn from torch.nn.parallel import DistributedDataParallel as DDP from collections import OrderedDict import os.path as osp import wandb from utils.utils import DotDict class Model: def __init__(self, hp, net_arch, loss_f, rank=0, world_size=1): self.hp = hp self.device =...
true
true
f71050ebef8199c7d5a9e55369e430fba92d5a18
366
py
Python
5th May Assignments/case study 1/question_2.py
JangirSumit/data_science
a1957122f8a4c66e3b4c7b7c93a74c53a2db1fe4
[ "MIT" ]
15
2019-05-05T04:48:42.000Z
2022-02-15T12:08:33.000Z
5th May Assignments/case study 1/question_2.py
JangirSumit/data_science
a1957122f8a4c66e3b4c7b7c93a74c53a2db1fe4
[ "MIT" ]
null
null
null
5th May Assignments/case study 1/question_2.py
JangirSumit/data_science
a1957122f8a4c66e3b4c7b7c93a74c53a2db1fe4
[ "MIT" ]
53
2019-11-10T05:09:25.000Z
2022-03-28T01:26:32.000Z
# 2. Write a code which accepts a sequence of words as input # and prints the words in a sequence after sorting them alphabetically. print("Enter sequence of words") print("For example -\nMy name is Sumit\n") words = input(">>> ") temp = words.split(" ") temp.sort() sorted_string = " ".join(temp) print("string afte...
24.4
71
0.702186
print("Enter sequence of words") print("For example -\nMy name is Sumit\n") words = input(">>> ") temp = words.split(" ") temp.sort() sorted_string = " ".join(temp) print("string after sorting is - \n") print(f"{sorted_string}")
true
true
f7105223a14265887aab39c6802321ba32a7ba59
1,840
py
Python
test/test_precision.py
HubBucket-Team/tensorforce
92c987424c89e96238a3689aa4018df0d9d40504
[ "Apache-2.0" ]
1
2019-09-23T18:39:57.000Z
2019-09-23T18:39:57.000Z
test/test_precision.py
VonRosenchild/tensorforce
92c987424c89e96238a3689aa4018df0d9d40504
[ "Apache-2.0" ]
null
null
null
test/test_precision.py
VonRosenchild/tensorforce
92c987424c89e96238a3689aa4018df0d9d40504
[ "Apache-2.0" ]
1
2019-09-23T18:40:00.000Z
2019-09-23T18:40:00.000Z
# Copyright 2018 Tensorforce Team. 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 la...
33.454545
105
0.634783
import pytest import unittest import numpy as np import tensorflow as tf from tensorforce import util from test.unittest_base import UnittestBase class TestPrecision(UnittestBase, unittest.TestCase): exclude_bounded_action = True require_observe = True def test_precision(self): ...
true
true
f710538cddf41d04cf71c058a094540469e6a98f
1,910
py
Python
src/exoplanet/distributions/physical_test.py
ericagol/exoplanet
ec270622f28cd53d3052ed44d20f30b5d2b4dcb6
[ "MIT" ]
null
null
null
src/exoplanet/distributions/physical_test.py
ericagol/exoplanet
ec270622f28cd53d3052ed44d20f30b5d2b4dcb6
[ "MIT" ]
null
null
null
src/exoplanet/distributions/physical_test.py
ericagol/exoplanet
ec270622f28cd53d3052ed44d20f30b5d2b4dcb6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import pymc3 as pm from scipy.stats import kstest from .base_test import _Base from .physical import ImpactParameter, QuadLimbDark class TestPhysical(_Base): random_seed = 19860925 def test_quad_limb_dark(self): with self._model(): dist = QuadL...
28.507463
76
0.517277
import numpy as np import pymc3 as pm from scipy.stats import kstest from .base_test import _Base from .physical import ImpactParameter, QuadLimbDark class TestPhysical(_Base): random_seed = 19860925 def test_quad_limb_dark(self): with self._model(): dist = QuadLimbDark("u", shape=2) ...
true
true
f710547f67632e5a20d33fad4e5177244d58a71a
2,670
py
Python
azure/mgmt/network/v2017_03_01/models/connectivity_information.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
azure/mgmt/network/v2017_03_01/models/connectivity_information.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
azure/mgmt/network/v2017_03_01/models/connectivity_information.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
39.264706
76
0.63221
from msrest.serialization import Model class ConnectivityInformation(Model): _validation = { 'hops': {'readonly': True}, 'connection_status': {'readonly': True}, 'avg_latency_in_ms': {'readonly': True}, 'min_latency_in_ms': {'readonly': True}, 'max_latency_in_ms...
true
true
f71055aa651cf305c9a8166cdce7eaafefa9e974
29
py
Python
code/abc039_b_01.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
3
2019-08-16T16:55:48.000Z
2021-04-11T10:21:40.000Z
code/abc039_b_01.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
null
null
null
code/abc039_b_01.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
null
null
null
print(int(int(input())**.25))
29
29
0.62069
print(int(int(input())**.25))
true
true
f7105759a01a9f8a1433c4a5979ba50ebcbdd63e
311,762
py
Python
python/phonenumbers/carrierdata/data0.py
elineda/python-phonenumbers
112c05ea2c1bf0b346494456832ffd0fef29be63
[ "Apache-2.0" ]
null
null
null
python/phonenumbers/carrierdata/data0.py
elineda/python-phonenumbers
112c05ea2c1bf0b346494456832ffd0fef29be63
[ "Apache-2.0" ]
null
null
null
python/phonenumbers/carrierdata/data0.py
elineda/python-phonenumbers
112c05ea2c1bf0b346494456832ffd0fef29be63
[ "Apache-2.0" ]
null
null
null
"""Per-prefix data, mapping each prefix to a dict of locale:name. Auto-generated file, do not edit by hand. """ from ..util import u # Copyright (C) 2011-2020 The Libphonenumber Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licens...
31.104659
125
0.53265
from ..util import u data = { '1242357':{'en': 'BaTelCo'}, '1242359':{'en': 'BaTelCo'}, '1242375':{'en': 'BaTelCo'}, '1242376':{'en': 'BaTelCo'}, '1242395':{'en': 'BaTelCo'}, '124242':{'en': 'BaTelCo'}, '124243':{'en': 'BaTelCo'}, '124244':{'en': 'BaTelCo'}, '124245':{'en': 'BaTelCo'}, '1242462...
true
true
f7105885e9a4c5e32b25abca7ec9383fb427430d
22,990
py
Python
python/mxnet/image.py
Leopard-X/MXNET
7ac046c58f0815223712f77288722a7b06755ec3
[ "Apache-2.0" ]
1
2019-09-10T17:06:29.000Z
2019-09-10T17:06:29.000Z
python/mxnet/image.py
Leopard-X/MXNET
7ac046c58f0815223712f77288722a7b06755ec3
[ "Apache-2.0" ]
null
null
null
python/mxnet/image.py
Leopard-X/MXNET
7ac046c58f0815223712f77288722a7b06755ec3
[ "Apache-2.0" ]
null
null
null
# pylint: disable=no-member, too-many-lines, redefined-builtin, protected-access, unused-import, invalid-name # pylint: disable=too-many-arguments, too-many-locals, no-name-in-module, too-many-branches, too-many-statements """Read invidual image files and perform augmentations.""" from __future__ import absolute_impor...
31.666667
130
0.588473
from __future__ import absolute_import, print_function import os import random import logging import numpy as np try: import cv2 except ImportError: cv2 = None from .base import numeric_types from . import ndarray as nd from . import _ndarray_internal as _internal from ._ndarray_internal import _cvimresiz...
true
true
f71058b38f7fbd38e77a131f05712abc41a0e552
1,539
py
Python
mqtt-servers/server2.py
pranaypareek/cc
1d8ee42d3bbe5295543ad0119053baf1cfdbd7d3
[ "Apache-2.0" ]
null
null
null
mqtt-servers/server2.py
pranaypareek/cc
1d8ee42d3bbe5295543ad0119053baf1cfdbd7d3
[ "Apache-2.0" ]
null
null
null
mqtt-servers/server2.py
pranaypareek/cc
1d8ee42d3bbe5295543ad0119053baf1cfdbd7d3
[ "Apache-2.0" ]
null
null
null
""" A small Test application to show how to use Flask-MQTT. """ import eventlet import json from flask import Flask, render_template from flask_mqtt import Mqtt from flask_socketio import SocketIO from flask_bootstrap import Bootstrap eventlet.monkey_patch() app = Flask(__name__) app.config['SECRET'] = 'my secret ...
26.534483
87
0.7141
import eventlet import json from flask import Flask, render_template from flask_mqtt import Mqtt from flask_socketio import SocketIO from flask_bootstrap import Bootstrap eventlet.monkey_patch() app = Flask(__name__) app.config['SECRET'] = 'my secret key' app.config['TEMPLATES_AUTO_RELOAD'] = True app.config['MQTT_B...
true
true
f7105bfdf7b8d86c2077099103949015886a8533
15,565
py
Python
Detection/MtcnnDetector.py
qma16443/AIcamp_MTCNN
431c3ce1cabf24266690322d525bdf7133666dc0
[ "MIT" ]
null
null
null
Detection/MtcnnDetector.py
qma16443/AIcamp_MTCNN
431c3ce1cabf24266690322d525bdf7133666dc0
[ "MIT" ]
null
null
null
Detection/MtcnnDetector.py
qma16443/AIcamp_MTCNN
431c3ce1cabf24266690322d525bdf7133666dc0
[ "MIT" ]
null
null
null
import cv2 import time import numpy as np import sys sys.path.append("../") from train_models.MTCNN_config import config from Detection.nms import py_nms class MtcnnDetector(object): def __init__(self, detectors, min_face_size=25, stride=2, thr...
34.743304
123
0.477739
import cv2 import time import numpy as np import sys sys.path.append("../") from train_models.MTCNN_config import config from Detection.nms import py_nms class MtcnnDetector(object): def __init__(self, detectors, min_face_size=25, stride=2, thr...
true
true
f7105ca75b04c3c8c1d2283faf3211318318e6be
2,694
py
Python
tk/users/views.py
ShinJungJae/TK-backend
b58b54a4d664e6512188ade63ca192a1fdf36382
[ "MIT" ]
null
null
null
tk/users/views.py
ShinJungJae/TK-backend
b58b54a4d664e6512188ade63ca192a1fdf36382
[ "MIT" ]
null
null
null
tk/users/views.py
ShinJungJae/TK-backend
b58b54a4d664e6512188ade63ca192a1fdf36382
[ "MIT" ]
null
null
null
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from . import models, serializers class ExploreUsers(APIView): def get(self, request, format=None): last_five = models.User.objects.all().order_by('-date_joined')[:5] serializ...
26.15534
79
0.690052
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from . import models, serializers class ExploreUsers(APIView): def get(self, request, format=None): last_five = models.User.objects.all().order_by('-date_joined')[:5] serializ...
true
true
f7105db64aa4eae243200441bceaf95732ded3c3
104
py
Python
tests/example_files/imports_template.py
kracekumar/pep585-upgrade
949a8d6d9afeee4b178ee4a1d534aa174e5adb7d
[ "BSD-3-Clause" ]
null
null
null
tests/example_files/imports_template.py
kracekumar/pep585-upgrade
949a8d6d9afeee4b178ee4a1d534aa174e5adb7d
[ "BSD-3-Clause" ]
null
null
null
tests/example_files/imports_template.py
kracekumar/pep585-upgrade
949a8d6d9afeee4b178ee4a1d534aa174e5adb7d
[ "BSD-3-Clause" ]
null
null
null
from __future__ import annotations from typing import List x: List def b(*, x: list[str]): pass
10.4
34
0.692308
from __future__ import annotations from typing import List x: List def b(*, x: list[str]): pass
true
true
f7105f00c7bb9e047b58c19b604412f60319b49d
430
py
Python
maluforce/__version__.py
rmcferrao/maluforce
12c776dc129c8d778086e22fd8ad9de996816081
[ "MIT" ]
null
null
null
maluforce/__version__.py
rmcferrao/maluforce
12c776dc129c8d778086e22fd8ad9de996816081
[ "MIT" ]
null
null
null
maluforce/__version__.py
rmcferrao/maluforce
12c776dc129c8d778086e22fd8ad9de996816081
[ "MIT" ]
null
null
null
"""Version details for maluforce""" __title__ = "maluforce" __description__ = "A basic Salesforce and Pandas interface" __url__ = "https://github.com/rodrigoelemesmo/maluforce" __version__ = "0.0.6" __author__ = "Rodrigo Maluf" __author_email__ = "rodrigo1793@gmail.com" __license__ = "None" __maintainer__ = "Rodrigo M...
33.076923
59
0.781395
__title__ = "maluforce" __description__ = "A basic Salesforce and Pandas interface" __url__ = "https://github.com/rodrigoelemesmo/maluforce" __version__ = "0.0.6" __author__ = "Rodrigo Maluf" __author_email__ = "rodrigo1793@gmail.com" __license__ = "None" __maintainer__ = "Rodrigo Maluf" __maintainer_email__ = "rodrig...
true
true
f710618df3ce59a74e0e72dab814554fa94101d9
7,201
py
Python
graph4nlp/pytorch/test/seq_decoder/graph2seq/src/g2s_v2/core/utils/vocab_utils.py
stjordanis/graph4nlp
c6ebde32bc77d3a7b78f86a93f19b1c057963ffa
[ "Apache-2.0" ]
18
2020-09-09T03:33:29.000Z
2021-07-22T11:17:16.000Z
graph4nlp/pytorch/test/seq_decoder/graph2seq/src/g2s_v2/core/utils/vocab_utils.py
stjordanis/graph4nlp
c6ebde32bc77d3a7b78f86a93f19b1c057963ffa
[ "Apache-2.0" ]
null
null
null
graph4nlp/pytorch/test/seq_decoder/graph2seq/src/g2s_v2/core/utils/vocab_utils.py
stjordanis/graph4nlp
c6ebde32bc77d3a7b78f86a93f19b1c057963ffa
[ "Apache-2.0" ]
1
2021-11-01T08:41:26.000Z
2021-11-01T08:41:26.000Z
# -*- coding: utf-8 -*- from __future__ import print_function import os import re import pickle import numpy as np from collections import Counter from functools import lru_cache from . import constants from .data_utils import tokenize word_detector = re.compile('\w') class VocabModel(object): def __init__(self,...
37.118557
129
0.617831
from __future__ import print_function import os import re import pickle import numpy as np from collections import Counter from functools import lru_cache from . import constants from .data_utils import tokenize word_detector = re.compile('\w') class VocabModel(object): def __init__(self, data_set, config): ...
true
true
f710621a406cb46d8fd1148a07770249421a7f62
2,190
py
Python
config/settings/local.py
sahilpysquad/SMT
b03d5d2e32fcda26cdbae35588cfd0f785c02d3a
[ "MIT" ]
null
null
null
config/settings/local.py
sahilpysquad/SMT
b03d5d2e32fcda26cdbae35588cfd0f785c02d3a
[ "MIT" ]
1
2022-03-30T20:23:58.000Z
2022-03-30T20:23:58.000Z
config/settings/local.py
sahilpysquad/SMT
b03d5d2e32fcda26cdbae35588cfd0f785c02d3a
[ "MIT" ]
null
null
null
from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = True # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY...
39.818182
97
0.583105
from .base import * from .base import env = True = env( "DJANGO_SECRET_KEY", default="Zn3KXHlnNzLcEZ9pnrLwkkhwzlkzJp7bjgy6DqXLLqyGP59Ayn1J7ZrlpxcnVxWe", ) = ["localhost", "0.0.0.0", "127.0.0.1"] = { "default": { "BACKEND": "django.core.cache.backends.locmem.LocMemCache", "LOCATIO...
true
true
f71062ea8686c0a6c55bd7f8ff2dfe5d3c51b140
4,096
py
Python
sandpileModel_v0_0_1.py
Alex-Github-Programmer/fractal
ab463a715a6a9883b43a4eefe899c1af549f5ddd
[ "MIT" ]
null
null
null
sandpileModel_v0_0_1.py
Alex-Github-Programmer/fractal
ab463a715a6a9883b43a4eefe899c1af549f5ddd
[ "MIT" ]
null
null
null
sandpileModel_v0_0_1.py
Alex-Github-Programmer/fractal
ab463a715a6a9883b43a4eefe899c1af549f5ddd
[ "MIT" ]
null
null
null
import array class bmp: """ bmp data structure """ def __init__(self, w=1080, h=1920): self.w = w self.h = h def calc_data_size (self): if((self.w*3)%4 == 0): self.dataSize = self.w * 3 * self.h else: self.dataSize = (((self.w * 3) // 4 + 1) * 4) * se...
33.57377
80
0.523682
import array class bmp: def __init__(self, w=1080, h=1920): self.w = w self.h = h def calc_data_size (self): if((self.w*3)%4 == 0): self.dataSize = self.w * 3 * self.h else: self.dataSize = (((self.w * 3) // 4 + 1) * 4) * self.h self.fileSize = s...
true
true
f71063a4b5711bb34d16be052982c1c2e1e50f81
9,849
py
Python
detectron2/export/api.py
YinchaoGao/detectron2
04958b93e1232935e126c2fd9e6ccd3f57c3a8f3
[ "Apache-2.0" ]
null
null
null
detectron2/export/api.py
YinchaoGao/detectron2
04958b93e1232935e126c2fd9e6ccd3f57c3a8f3
[ "Apache-2.0" ]
null
null
null
detectron2/export/api.py
YinchaoGao/detectron2
04958b93e1232935e126c2fd9e6ccd3f57c3a8f3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import copy import logging import os import torch from caffe2.proto import caffe2_pb2 from torch import nn from detectron2.config import CfgNode as CN from .caffe2_export import export_caffe2_detection_model from .caffe2_export import export_onnx...
36.076923
98
0.653873
import copy import logging import os import torch from caffe2.proto import caffe2_pb2 from torch import nn from detectron2.config import CfgNode as CN from .caffe2_export import export_caffe2_detection_model from .caffe2_export import export_onnx_model as export_onnx_model_impl from .caffe2_export import run_and_sav...
true
true
f7106495e4d1a8e150aa9de84bcd4cc085c2136a
5,775
py
Python
code/old_FINDER_CN_cost_tf/my_testReal_v2.py
faraz2023/FINDER
170255f9a442b11e1a27483fe6eaf2ee61766454
[ "MIT" ]
null
null
null
code/old_FINDER_CN_cost_tf/my_testReal_v2.py
faraz2023/FINDER
170255f9a442b11e1a27483fe6eaf2ee61766454
[ "MIT" ]
null
null
null
code/old_FINDER_CN_cost_tf/my_testReal_v2.py
faraz2023/FINDER
170255f9a442b11e1a27483fe6eaf2ee61766454
[ "MIT" ]
null
null
null
import sys,os sys.path.append(os.path.dirname(__file__) + os.sep + '../') from FINDER import FINDER import numpy as np from tqdm import tqdm import time import networkx as nx import pandas as pd import pickle as cp import random def mkdir(path): if not os.path.exists(path): os.mkdir(path) g_type = "barab...
42.153285
127
0.56658
import sys,os sys.path.append(os.path.dirname(__file__) + os.sep + '../') from FINDER import FINDER import numpy as np from tqdm import tqdm import time import networkx as nx import pandas as pd import pickle as cp import random def mkdir(path): if not os.path.exists(path): os.mkdir(path) g_type = "barab...
true
true
f710660d6ad8ecf6f6d600d86493d14a6e55249c
326,598
py
Python
pandas/core/frame.py
UrielMaD/pandas
b5233c447f3ed0ecfe256501e357326b82ce9120
[ "BSD-3-Clause" ]
null
null
null
pandas/core/frame.py
UrielMaD/pandas
b5233c447f3ed0ecfe256501e357326b82ce9120
[ "BSD-3-Clause" ]
null
null
null
pandas/core/frame.py
UrielMaD/pandas
b5233c447f3ed0ecfe256501e357326b82ce9120
[ "BSD-3-Clause" ]
null
null
null
""" DataFrame --------- An efficient 2D container for potentially mixed-type time series or other labeled data series. Similar to its R counterpart, data.frame, except providing automatic data alignment and a host of useful data manipulation methods having to do with the labeling information """ from __future__ import...
34.371501
170
0.531602
from __future__ import annotations import collections from collections import abc import datetime from io import StringIO import itertools import mmap from textwrap import dedent from typing import ( IO, TYPE_CHECKING, Any, AnyStr, Dict, FrozenSet, Hashable, Iterable, Iterator, ...
true
true
f710668d288a186a66be2bcf743c10315b88fa0a
2,738
py
Python
taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/compat.py
hectormartinez/rougexstem
32da9eab253cb88fc1882e59026e8b5b40900a25
[ "Apache-2.0" ]
null
null
null
taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/compat.py
hectormartinez/rougexstem
32da9eab253cb88fc1882e59026e8b5b40900a25
[ "Apache-2.0" ]
null
null
null
taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/compat.py
hectormartinez/rougexstem
32da9eab253cb88fc1882e59026e8b5b40900a25
[ "Apache-2.0" ]
null
null
null
# Natural Language Toolkit: Compatibility Functions # # Copyright (C) 2001-2008 University of Pennsylvania # Author: Steven Bird <sb@csse.unimelb.edu.au> # Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT """ Backwards compatibility with previ...
34.658228
70
0.597516
true
true
f710673561a8d0361c9a9589feaf7aab93ae560e
231
py
Python
servermanager/admin.py
wjzhangcsu/MyDjangoBlog
6f1a1d9205ad84b38ba1cbc1bf3bdba46eaaa9d7
[ "MIT" ]
1
2018-04-23T06:29:22.000Z
2018-04-23T06:29:22.000Z
servermanager/admin.py
lxguidu/DjangoBlog
620ab1d8131cc7124d5a85fc1ef153a4271d4abc
[ "MIT" ]
15
2020-02-11T21:37:20.000Z
2022-03-11T23:12:25.000Z
servermanager/admin.py
wjzhangcsu/MyDjangoBlog
6f1a1d9205ad84b38ba1cbc1bf3bdba46eaaa9d7
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import commands class CommandsAdmin(admin.ModelAdmin): list_display = ('title', 'command', 'describe') admin.site.register(commands, CommandsAdmin)
21
51
0.766234
from django.contrib import admin from .models import commands class CommandsAdmin(admin.ModelAdmin): list_display = ('title', 'command', 'describe') admin.site.register(commands, CommandsAdmin)
true
true
f71069b14bf1ad73d77cf9f7bb28f95c8cd7322e
1,506
py
Python
lib/surface/compute/vpn_tunnels/__init__.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/compute/vpn_tunnels/__init__.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/compute/vpn_tunnels/__init__.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2014 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
34.227273
117
0.749668
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.calliope import base class VpnTunnels(base.Group): detailed_help = None VpnTunnels.category = base.NETWORKING_CATEGORY VpnTunnels.detailed_help = { 'DESCRIP...
true
true
f7106e85bf3410c064655c4349ec8f21e9e33c1d
450
py
Python
src/conreality/sdk/message.py
conreality/conreality.py
7c5d40367aebdc69eb2c77bc71793b8dd5737c29
[ "Unlicense" ]
4
2017-06-16T21:21:06.000Z
2018-06-06T10:20:48.000Z
src/conreality/sdk/message.py
conreality/conreality.py
7c5d40367aebdc69eb2c77bc71793b8dd5737c29
[ "Unlicense" ]
2
2020-07-02T04:41:51.000Z
2022-02-11T06:31:54.000Z
src/conreality/sdk/message.py
conreality/conreality.py
7c5d40367aebdc69eb2c77bc71793b8dd5737c29
[ "Unlicense" ]
null
null
null
# This is free and unencumbered software released into the public domain. class Message: """A message.""" def __init__(self, id=None): self.id = id def __repr__(self): """Returns a human-readable string representation of this object.""" return "message{{id={}}}".format(self.id) ...
28.125
76
0.642222
class Message: def __init__(self, id=None): self.id = id def __repr__(self): return "message{{id={}}}".format(self.id) def __str__(self): return self.__repr__()
true
true
f7106e89f73ac2d0682993b85172d2beb9988f1a
3,271
py
Python
exchangelib/configuration.py
ifour92/exchangelib
eb86f2ab9f9a16e07f0d19e0dcf69065b02d9f8a
[ "BSD-2-Clause" ]
null
null
null
exchangelib/configuration.py
ifour92/exchangelib
eb86f2ab9f9a16e07f0d19e0dcf69065b02d9f8a
[ "BSD-2-Clause" ]
null
null
null
exchangelib/configuration.py
ifour92/exchangelib
eb86f2ab9f9a16e07f0d19e0dcf69065b02d9f8a
[ "BSD-2-Clause" ]
null
null
null
import logging from cached_property import threaded_cached_property from .credentials import BaseCredentials from .protocol import RetryPolicy, FailFast from .transport import AUTH_TYPE_MAP from .util import split_url from .version import Version log = logging.getLogger(__name__) class Configuration: """ A...
43.039474
120
0.682972
import logging from cached_property import threaded_cached_property from .credentials import BaseCredentials from .protocol import RetryPolicy, FailFast from .transport import AUTH_TYPE_MAP from .util import split_url from .version import Version log = logging.getLogger(__name__) class Configuration: def __ini...
true
true
f710702e90b4523c81be699400931b542b2a5907
668
py
Python
libraries/boost-build/src/example/python_modules/python_helpers.py
austinkeller/pwiz
aa8e575cb40fd5e97cc7d922e4d8da44c9277cca
[ "Apache-2.0" ]
198
2015-01-13T05:47:18.000Z
2022-03-09T04:46:46.000Z
libs/boost/tools/build/example/python_modules/python_helpers.py
flingone/frameworks_base_cmds_remoted
4509d9f0468137ed7fd8d100179160d167e7d943
[ "Apache-2.0" ]
61
2015-05-27T11:20:11.000Z
2019-12-20T15:06:21.000Z
libs/boost/tools/build/example/python_modules/python_helpers.py
flingone/frameworks_base_cmds_remoted
4509d9f0468137ed7fd8d100179160d167e7d943
[ "Apache-2.0" ]
139
2015-01-15T20:09:31.000Z
2022-01-31T15:21:16.000Z
# Copyright 2006 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Declare a couple of functions called from Boost.Build # # Each function will receive as many arguments as there ":"-separated # argument...
37.111111
82
0.715569
def test1(l): return ["foo", "bar"] def test2(l, l2): return [l[0], l2[0]]
true
true
f7107105fc2ad424c38b5ad9e757ac35f41dbfc7
3,837
py
Python
aiida/cmdline/commands/cmd_data/cmd_remote.py
lekah/aiida_core
54b22a221657b47044483dc9d4f51788ce8ab6b2
[ "BSD-2-Clause" ]
null
null
null
aiida/cmdline/commands/cmd_data/cmd_remote.py
lekah/aiida_core
54b22a221657b47044483dc9d4f51788ce8ab6b2
[ "BSD-2-Clause" ]
null
null
null
aiida/cmdline/commands/cmd_data/cmd_remote.py
lekah/aiida_core
54b22a221657b47044483dc9d4f51788ce8ab6b2
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
40.389474
105
0.614021
true
true
f71071d4bb2196aec59b0c0f18d4ae62abec55f4
1,313
py
Python
api/clean/sequence_nick.py
Latent-Lxx/dazhou-dw
902b4b625cda4c9e4eb205017b8955b81f37a0b5
[ "MIT" ]
null
null
null
api/clean/sequence_nick.py
Latent-Lxx/dazhou-dw
902b4b625cda4c9e4eb205017b8955b81f37a0b5
[ "MIT" ]
null
null
null
api/clean/sequence_nick.py
Latent-Lxx/dazhou-dw
902b4b625cda4c9e4eb205017b8955b81f37a0b5
[ "MIT" ]
1
2022-02-11T04:44:37.000Z
2022-02-11T04:44:37.000Z
# !/usr/bin/python3 # -*- coding: utf-8 -*- # @Time : 2021/7/5 下午5:29 # @Author : Latent # @Email : latentsky@gmail.com # @File : sequence_nick.py # @Software: PyCharm # @class : 清晰店铺的相关信息 """ 字段说明: 1.nick_id ---->数据库自增 2.nick_name 3.nick 4.brand 5.company_name 6.platform """ from tools_class import Tools_Class cla...
20.84127
57
0.529322
from tools_class import Tools_Class class Sequence_Nick(object): @classmethod def sequence_brand(cls, data): seller = Sequence_Nick.sequence_seller(data=data) sid = Tools_Class.tools_md5(nick=seller) brand = data['public']['brand'] ...
true
true
f710733735df4a859b306164419416ca4ee1c954
889
py
Python
setup.py
whitehead-internal/DialogTag
226def810db21fd34c1ac9363e841a3357dacf96
[ "MIT" ]
null
null
null
setup.py
whitehead-internal/DialogTag
226def810db21fd34c1ac9363e841a3357dacf96
[ "MIT" ]
null
null
null
setup.py
whitehead-internal/DialogTag
226def810db21fd34c1ac9363e841a3357dacf96
[ "MIT" ]
null
null
null
import setuptools with open("README.md", mode="r", encoding="utf-8") as readme_file: long_description = readme_file.read() setuptools.setup( name="DialogTag", version="1.1.3", author="Bhavitvya Malik", author_email="bhavitvya.malik@gmail.com", description="A python library to classify dialogue...
30.655172
70
0.662542
import setuptools with open("README.md", mode="r", encoding="utf-8") as readme_file: long_description = readme_file.read() setuptools.setup( name="DialogTag", version="1.1.3", author="Bhavitvya Malik", author_email="bhavitvya.malik@gmail.com", description="A python library to classify dialogue...
true
true
f7107448bde30ae16755d5ac91e74e290f2cc800
1,086
py
Python
autodiff/examples/svm.py
gwtaylor/pyautodiff
7973e26f1c233570ed4bb10d08634ec7378e2152
[ "BSD-3-Clause" ]
59
2015-02-03T20:50:59.000Z
2020-05-26T05:38:54.000Z
autodiff/examples/svm.py
gwtaylor/pyautodiff
7973e26f1c233570ed4bb10d08634ec7378e2152
[ "BSD-3-Clause" ]
3
2015-05-10T06:22:45.000Z
2016-12-06T02:20:58.000Z
autodiff/examples/svm.py
gwtaylor/pyautodiff
7973e26f1c233570ed4bb10d08634ec7378e2152
[ "BSD-3-Clause" ]
11
2015-04-15T16:52:09.000Z
2017-06-28T12:10:39.000Z
""" Linear SVM ========== This script fits a linear support vector machine classifier to random data. It illustrates how a function defined purely by NumPy operations can be minimized directly with a gradient-based solver. """ import numpy as np from autodiff.optimize import fmin_l_bfgs_b def test_svm(): rng =...
24.681818
79
0.632597
import numpy as np from autodiff.optimize import fmin_l_bfgs_b def test_svm(): rng = np.random.RandomState(1) x = rng.rand(10, 5) y = 2 * (rng.rand(10) > 0.5) - 1 l2_regularization = 1e-4 def loss_fn(weights, bias): margin = y * (np.dot(x, weights) + bias) loss = np.max...
true
true
f71075962ac4461a97d97f6545a5d430a4db8c29
1,259
py
Python
PyRemoteConsole/common_connection.py
Wykleph/PyRemoteConsole
98c4df6c78060c1506681965a05d5240165eb111
[ "MIT" ]
null
null
null
PyRemoteConsole/common_connection.py
Wykleph/PyRemoteConsole
98c4df6c78060c1506681965a05d5240165eb111
[ "MIT" ]
null
null
null
PyRemoteConsole/common_connection.py
Wykleph/PyRemoteConsole
98c4df6c78060c1506681965a05d5240165eb111
[ "MIT" ]
null
null
null
try: from prawframe.obfuscation import Scrambler except ImportError: from .obfuscation import Encryptor def bytes_packet(_bytes, termination_string=']'): """ Create a packet containing the amount of bytes for the proceeding data. :param _bytes: :param termination_string: :return: """ ...
24.686275
75
0.656076
try: from prawframe.obfuscation import Scrambler except ImportError: from .obfuscation import Encryptor def bytes_packet(_bytes, termination_string=']'): return '{}{}'.format(len(_bytes), termination_string) def scrambles_input_unscrambles_output(func): scrambler = Encryptor().load_key_file() ...
true
true
f710765d0c0048687b632aaad0876e54da59b574
2,249
py
Python
lib/models/resnet_trans_head.py
hz-ants/CDPN-source-
625f9a80858f8a2fb9e74f88ea83073495141693
[ "Apache-2.0" ]
31
2020-12-21T09:36:30.000Z
2022-03-04T03:27:48.000Z
lib/models/resnet_trans_head.py
hz-ants/CDPN-source-
625f9a80858f8a2fb9e74f88ea83073495141693
[ "Apache-2.0" ]
3
2021-03-29T10:54:41.000Z
2021-04-28T08:33:48.000Z
lib/models/resnet_trans_head.py
hz-ants/CDPN-source-
625f9a80858f8a2fb9e74f88ea83073495141693
[ "Apache-2.0" ]
13
2020-12-21T09:42:05.000Z
2022-03-25T06:04:24.000Z
import torch.nn as nn import torch class TransHeadNet(nn.Module): def __init__(self, in_channels, num_layers=3, num_filters=256, kernel_size=3, output_dim=3, freeze=False, with_bias_end=True): super(TransHeadNet, self).__init__() self.freeze = freeze if kernel_size == 3: ...
37.483333
134
0.549133
import torch.nn as nn import torch class TransHeadNet(nn.Module): def __init__(self, in_channels, num_layers=3, num_filters=256, kernel_size=3, output_dim=3, freeze=False, with_bias_end=True): super(TransHeadNet, self).__init__() self.freeze = freeze if kernel_size == 3: ...
true
true
f710769b0ae8210f3a325400b468f41629c87e45
4,382
py
Python
pipelines/cont_pipeline.py
SurvivorT/SRTP
1ddc0c4ec31d61daf9f4292c533722e61818eb51
[ "MIT" ]
489
2017-02-21T21:40:22.000Z
2022-03-31T08:01:30.000Z
pipelines/cont_pipeline.py
AliBeikmohammadi/MADRL
3156eb6d6a1e8a4c91ff1dce9f5fc565b2c25c94
[ "MIT" ]
35
2017-03-10T12:28:11.000Z
2022-02-14T14:58:21.000Z
pipelines/cont_pipeline.py
AliBeikmohammadi/MADRL
3156eb6d6a1e8a4c91ff1dce9f5fc565b2c25c94
[ "MIT" ]
121
2017-02-24T20:13:53.000Z
2022-03-08T08:56:32.000Z
#!/usr/bin/env python # # File: cont_pipeline.py # # Created: Friday, July 15 2016 by rejuvyesh <mail@rejuvyesh.com> # import argparse import os import yaml import shutil import rltools from pipelines import pipeline # Fix python 2.x try: input = raw_input except NameError: pass def phase_train(spec, spec_f...
43.82
166
0.438384
import argparse import os import yaml import shutil import rltools from pipelines import pipeline try: input = raw_input except NameError: pass def phase_train(spec, spec_file): rltools.util.header('=== Running {} ==='.format(spec_file)) storagedir = spec['options']['storagedir'] n_...
true
true
f71076ba0db1bec326551e5faa965b228c3a02be
1,296
py
Python
src/resnet_model/read_lmdb.py
Granular-data/cloudless
e45d93b48b8e668a8a6cea6fab51d59f389591a8
[ "Apache-2.0" ]
null
null
null
src/resnet_model/read_lmdb.py
Granular-data/cloudless
e45d93b48b8e668a8a6cea6fab51d59f389591a8
[ "Apache-2.0" ]
null
null
null
src/resnet_model/read_lmdb.py
Granular-data/cloudless
e45d93b48b8e668a8a6cea6fab51d59f389591a8
[ "Apache-2.0" ]
null
null
null
import sys sys.path.insert(0,'../../../deeplab-public-ver2/python') import caffe import leveldb import numpy as np from caffe.proto import caffe_pb2 import csv import cv2 # Wei Yang 2015-08-19 # Source # Read LevelDB/LMDB # ================== # http://research.beenfrog.com/code/2015/03/28/read-leveldb-lmdb-f...
25.411765
97
0.623457
import sys sys.path.insert(0,'../../../deeplab-public-ver2/python') import caffe import leveldb import numpy as np from caffe.proto import caffe_pb2 import csv import cv2 leveldb_dir = "../../../../datasets/planet_cloudless/leveldb/train_leveldb" PC_DIR = "../../../../datasets/planet_cloudless/" OUT_DIR =...
true
true
f71076f22cf14b8fce877f67e5317aca94dd9306
7,920
py
Python
docs/conf.py
determined-ai/pedl_sphinx_theme
9edfa7c6ce6926def9fc69b8ddd7666f3419a907
[ "MIT" ]
null
null
null
docs/conf.py
determined-ai/pedl_sphinx_theme
9edfa7c6ce6926def9fc69b8ddd7666f3419a907
[ "MIT" ]
2
2020-03-10T00:15:46.000Z
2020-04-04T19:39:15.000Z
docs/conf.py
determined-ai/pedl_sphinx_theme
9edfa7c6ce6926def9fc69b8ddd7666f3419a907
[ "MIT" ]
null
null
null
import sys import os sys.path.append(os.path.abspath('..')) sys.path.append(os.path.abspath('./demo/')) from determined_ai_sphinx_theme import __version__ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # do...
31.935484
80
0.716162
import sys import os sys.path.append(os.path.abspath('..')) sys.path.append(os.path.abspath('./demo/')) from determined_ai_sphinx_theme import __version__ extensions = [ 'sphinx.ext.intersphinx', 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinxcontrib.httpdomain', ] suppress_warning...
true
true
f710770cd6b6cc55fa5e3661cb8e82cfeb494a6f
313
py
Python
console/widgets/extra.py
dustinlacewell/console
b65f63354dd8ba60f211e3e169e53c078b99fdf8
[ "MIT" ]
11
2015-06-10T22:23:03.000Z
2021-02-16T10:55:55.000Z
console/widgets/extra.py
rrosajp/console
b65f63354dd8ba60f211e3e169e53c078b99fdf8
[ "MIT" ]
1
2015-07-01T00:04:50.000Z
2015-08-19T16:40:18.000Z
console/widgets/extra.py
rrosajp/console
b65f63354dd8ba60f211e3e169e53c078b99fdf8
[ "MIT" ]
5
2015-06-20T11:08:32.000Z
2022-03-07T00:01:50.000Z
import urwid class AlwaysFocusedEdit(urwid.Edit): """ This Edit widget is convinced that it is always in focus. This is so that it will respond to input events even if it isn't.' """ def render(self, size, focus=False): return super(AlwaysFocusedEdit, self).render(size, focus=True)
28.454545
77
0.690096
import urwid class AlwaysFocusedEdit(urwid.Edit): def render(self, size, focus=False): return super(AlwaysFocusedEdit, self).render(size, focus=True)
true
true
f7107796de3cb4b1078c5b12ab816311e6504df2
3,833
py
Python
ui/tests/test_base.py
iqre8/kubeinit
ef5988e8b8649452bb9c94f465add4626a660def
[ "Apache-2.0" ]
null
null
null
ui/tests/test_base.py
iqre8/kubeinit
ef5988e8b8649452bb9c94f465add4626a660def
[ "Apache-2.0" ]
null
null
null
ui/tests/test_base.py
iqre8/kubeinit
ef5988e8b8649452bb9c94f465add4626a660def
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ Copyright 2019 Kubeinit (kubeinit.com). 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 ...
24.729032
75
0.559614
from logging import CRITICAL, disable disable(CRITICAL) urls = { '': ( '/fixed_sidebar', '/fixed_footer', '/plain_page', '/page_403', '/page_404', '/page_500' ), '/home': ( '/index', '/index2', '/index3' ), '/forms': ( ...
true
true
f71077ad9b03cf9d6c21b1546d2812ac45c55448
1,010
py
Python
Examples/first_vscode/robot2.py
slowrunner/GoPiLgc
e86505d83b2d2e7b1c5c2a04c1eed19774cf76b0
[ "CC0-1.0" ]
null
null
null
Examples/first_vscode/robot2.py
slowrunner/GoPiLgc
e86505d83b2d2e7b1c5c2a04c1eed19774cf76b0
[ "CC0-1.0" ]
null
null
null
Examples/first_vscode/robot2.py
slowrunner/GoPiLgc
e86505d83b2d2e7b1c5c2a04c1eed19774cf76b0
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/python3 # FILE: robot2.py # PURPOSE: Test reading distance sensor and ultrasonic sensor from easygopigo3 import EasyGoPiGo3 import time import logging logging.basicConfig(level=logging.INFO, format='%(asctime)s %(funcName)s: %(message)s') DIODE_DROP = 0.7 ULTRASONIC_CORRECTION_AT_100mm = 17.0 # mm ToF_C...
28.055556
111
0.654455
from easygopigo3 import EasyGoPiGo3 import time import logging logging.basicConfig(level=logging.INFO, format='%(asctime)s %(funcName)s: %(message)s') DIODE_DROP = 0.7 ULTRASONIC_CORRECTION_AT_100mm = 17.0 ToF_CORRECTION_AT_100mm = -5.0 def main(): egpg = EasyGoPiGo3(use_mutex=True) egpg.ds = egpg.in...
true
true
f71077dfaecb2df505c4d5574b2fd9f2d6699926
3,190
py
Python
app.py
sejaldua/duolingogogo
226a2a9417238f9c3f0ce738d491b58cdf4dcbdc
[ "MIT" ]
null
null
null
app.py
sejaldua/duolingogogo
226a2a9417238f9c3f0ce738d491b58cdf4dcbdc
[ "MIT" ]
null
null
null
app.py
sejaldua/duolingogogo
226a2a9417238f9c3f0ce738d491b58cdf4dcbdc
[ "MIT" ]
null
null
null
import streamlit as st import pandas as pd import yaml import duolingo import seaborn as sns import matplotlib.pyplot as plt import matplotlib.font_manager from datetime import timezone, timedelta matplotlib.rcParams['font.family'] = ['Source Han Sans CN'] with open("duo_credentials.yaml", 'r') as stream: creds = ...
43.108108
145
0.70094
import streamlit as st import pandas as pd import yaml import duolingo import seaborn as sns import matplotlib.pyplot as plt import matplotlib.font_manager from datetime import timezone, timedelta matplotlib.rcParams['font.family'] = ['Source Han Sans CN'] with open("duo_credentials.yaml", 'r') as stream: creds = ...
true
true
f71077e6e85282814575b8276103abfbb46cbf21
25,589
py
Python
big-fish/bigfish/stack/postprocess.py
Henley13/paper_translation_factories_2020
77558ed70467cf91062abf62e46c794bfbc08e4a
[ "BSD-3-Clause" ]
2
2020-09-03T20:50:53.000Z
2020-10-02T14:39:31.000Z
big-fish/bigfish/stack/postprocess.py
Henley13/paper_translation_factories_2020
77558ed70467cf91062abf62e46c794bfbc08e4a
[ "BSD-3-Clause" ]
4
2020-01-15T10:26:14.000Z
2020-10-01T18:36:39.000Z
big-fish/bigfish/stack/postprocess.py
Henley13/paper_translation_factories_2020
77558ed70467cf91062abf62e46c794bfbc08e4a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Functions used to format and clean any intermediate results loaded in or returned by a bigfish method. """ import numpy as np from scipy import ndimage as ndi from .utils import check_array, check_parameter, get_offset_value from skimage.measure import regionprops, find_contours from ski...
34.57973
79
0.626754
import numpy as np from scipy import ndimage as ndi from .utils import check_array, check_parameter, get_offset_value from skimage.measure import regionprops, find_contours from skimage.draw import polygon_perimeter (mask_nuc, ndim=2, dtype=[bool], allow_nan=False)...
true
true
f710797ab784835c1442fbb48d68ecbf113174ad
88
py
Python
det3d/datasets/waymo/__init__.py
alsun-oven/CenterPoint
cafd89c4008270e648e97202bc256aff968e8109
[ "MIT" ]
1,124
2020-06-22T00:48:18.000Z
2022-03-31T22:03:35.000Z
det3d/datasets/waymo/__init__.py
alsun-oven/CenterPoint
cafd89c4008270e648e97202bc256aff968e8109
[ "MIT" ]
290
2020-06-23T01:29:04.000Z
2022-03-29T16:27:32.000Z
det3d/datasets/waymo/__init__.py
alsun-oven/CenterPoint
cafd89c4008270e648e97202bc256aff968e8109
[ "MIT" ]
326
2020-06-22T01:48:10.000Z
2022-03-31T08:15:08.000Z
from .waymo import WaymoDataset from .waymo_common import * __all__ = ["WaymoDataset"]
17.6
31
0.772727
from .waymo import WaymoDataset from .waymo_common import * __all__ = ["WaymoDataset"]
true
true
f7107b0890bd09696c94ec6fab76c27c05bdde01
6,696
py
Python
deprecated/code/datacleaning.py
metamoles/metamoles
251de6672029566d8becf2538684c0506fc297d0
[ "MIT" ]
3
2019-04-04T22:44:00.000Z
2020-07-30T18:16:56.000Z
deprecated/code/datacleaning.py
metamoles/metamoles
251de6672029566d8becf2538684c0506fc297d0
[ "MIT" ]
null
null
null
deprecated/code/datacleaning.py
metamoles/metamoles
251de6672029566d8becf2538684c0506fc297d0
[ "MIT" ]
null
null
null
#!/usr/bin/env python import Bio from Bio.KEGG import REST from Bio.KEGG import Enzyme import re from Bio.KEGG import Compound import gzip import pandas as pd import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns def create_enzyme_df(path_to_file): """ input:path_to...
30.162162
172
0.670251
import Bio from Bio.KEGG import REST from Bio.KEGG import Enzyme import re from Bio.KEGG import Compound import gzip import pandas as pd import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns def create_enzyme_df(path_to_file): enzyme_fields = [method for method in dir...
true
true
f7107b1d4396af6ead7cd03880a25ba2d1787e88
12,815
py
Python
TP07 PB.py
JPFigueredo/Hardware-Monitoring-System_Incomplete-Version
c8bcec269907382ea07c0355b2314007dcb36821
[ "Apache-2.0" ]
1
2021-08-06T19:55:34.000Z
2021-08-06T19:55:34.000Z
TP07 PB.py
JPFigueredo/Hardware-Monitoring-System_Incomplete-Version
c8bcec269907382ea07c0355b2314007dcb36821
[ "Apache-2.0" ]
null
null
null
TP07 PB.py
JPFigueredo/Hardware-Monitoring-System_Incomplete-Version
c8bcec269907382ea07c0355b2314007dcb36821
[ "Apache-2.0" ]
null
null
null
import pygame import psutil import cpuinfo import socket import time import nmap from cpuinfo import get_cpu_info red = (200,0,0) white = (210,214,217) blue = (0,0,200) grey = (105,105,105) black = (0,0,0) largura_tela, altura_tela = 1024,760 pygame.init() pygame.font.init() font = pygame.font.Font(N...
36.40625
119
0.569957
import pygame import psutil import cpuinfo import socket import time import nmap from cpuinfo import get_cpu_info red = (200,0,0) white = (210,214,217) blue = (0,0,200) grey = (105,105,105) black = (0,0,0) largura_tela, altura_tela = 1024,760 pygame.init() pygame.font.init() font = pygame.font.Font(N...
true
true
f7107ca561761e166b2411668c743cfd45a39430
453
py
Python
crawler/crawler/items.py
suchkultur/trueffelschwein
189ffccb8a26d852107ab66d055879c39f7dcebd
[ "MIT" ]
null
null
null
crawler/crawler/items.py
suchkultur/trueffelschwein
189ffccb8a26d852107ab66d055879c39f7dcebd
[ "MIT" ]
null
null
null
crawler/crawler/items.py
suchkultur/trueffelschwein
189ffccb8a26d852107ab66d055879c39f7dcebd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy from scrapy.item import Item, Field class CrawlerItem(scrapy.Item): url = Field() html_title = Field() html_h1 = Field() html_h2 = Field...
19.695652
51
0.637969
import scrapy from scrapy.item import Item, Field class CrawlerItem(scrapy.Item): url = Field() html_title = Field() html_h1 = Field() html_h2 = Field() html_h3 = Field() html_h4 = Field() html_h5 = Field() html_h6 = Field() html_p = Field() html_a = Field()
true
true
f7107dc6017ef5f07ab6acc581e8700372001f5a
391
py
Python
src/application/tables/table.py
cruz-f/protrend
b72c17fa1606b4cf5ca6d60c51737b43ba3fdbc1
[ "MIT" ]
null
null
null
src/application/tables/table.py
cruz-f/protrend
b72c17fa1606b4cf5ca6d60c51737b43ba3fdbc1
[ "MIT" ]
1
2022-02-11T18:38:39.000Z
2022-02-11T18:38:39.000Z
src/application/tables/table.py
cruz-f/protrend
b72c17fa1606b4cf5ca6d60c51737b43ba3fdbc1
[ "MIT" ]
null
null
null
class Table: context = '' fields = () columns = () sortable = () types = () def context_dict(self): return {field: {'field': field, 'column': col, 'sortable': sort, 'type': type_} for field, col, sor...
27.928571
105
0.460358
class Table: context = '' fields = () columns = () sortable = () types = () def context_dict(self): return {field: {'field': field, 'column': col, 'sortable': sort, 'type': type_} for field, col, sor...
true
true
f7107f13b8744297c5a93ee8a1e0309058d01042
2,855
py
Python
moxom/compiler/astparser.py
sikrinick/moxom
75e1e59b93ea1c8eea2141c0105d083089e25ca9
[ "MIT" ]
4
2020-10-26T01:06:37.000Z
2022-02-02T18:35:03.000Z
moxom/compiler/astparser.py
sikrinick/moxom
75e1e59b93ea1c8eea2141c0105d083089e25ca9
[ "MIT" ]
null
null
null
moxom/compiler/astparser.py
sikrinick/moxom
75e1e59b93ea1c8eea2141c0105d083089e25ca9
[ "MIT" ]
null
null
null
from dataclasses import dataclass from moxom.compiler.lexer import OperatorToken, IdentifierToken, AtomTokens from typing import Union, Optional from .cstparser import CstNode, Expr import ast from moxom.compiler.operators import operator_dict, AssignOperator, AndOperator, ThenOperator @dataclass class AtomNode: ...
32.078652
93
0.6669
from dataclasses import dataclass from moxom.compiler.lexer import OperatorToken, IdentifierToken, AtomTokens from typing import Union, Optional from .cstparser import CstNode, Expr import ast from moxom.compiler.operators import operator_dict, AssignOperator, AndOperator, ThenOperator @dataclass class AtomNode: ...
true
true
f7107f2436acaf4ce2118c270a01d52b337bb5df
20,619
py
Python
lib/surface/init.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/surface/init.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/surface/init.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
1
2020-07-24T20:13:29.000Z
2020-07-24T20:13:29.000Z
# Copyright 2014 Google 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 by applicable law or ag...
41.073705
80
0.668461
import os from googlecloudsdk.calliope import base from googlecloudsdk.calliope import exceptions as c_exc from googlecloudsdk.calliope import usage_text from googlecloudsdk.command_lib import init_util from googlecloudsdk.core import config from googlecloudsdk.core import execution_utils from googleclo...
true
true
f7107fda7c5bfabbde90193d9508ada61985db57
1,954
py
Python
.cf_status.py
pointtonull/888
a7a576a91c92b76f9e4d33e8f7ef83cbe9e68429
[ "MIT" ]
null
null
null
.cf_status.py
pointtonull/888
a7a576a91c92b76f9e4d33e8f7ef83cbe9e68429
[ "MIT" ]
null
null
null
.cf_status.py
pointtonull/888
a7a576a91c92b76f9e4d33e8f7ef83cbe9e68429
[ "MIT" ]
null
null
null
import json from pprint import pprint, pformat from dateutil.parser import parse as parsetimestamp SILENCE_STATUSES = [ "CREATE_COMPLETE", "CREATE_IN_PROGRESS", "DELETE_COMPLETE", "DELETE_IN_PROGRESS", "REVIEW_IN_PROGRESS", "ROLLBACK_COMPLETE", "ROLLBACK_IN_PRO...
27.521127
67
0.627943
import json from pprint import pprint, pformat from dateutil.parser import parse as parsetimestamp SILENCE_STATUSES = [ "CREATE_COMPLETE", "CREATE_IN_PROGRESS", "DELETE_COMPLETE", "DELETE_IN_PROGRESS", "REVIEW_IN_PROGRESS", "ROLLBACK_COMPLETE", "ROLLBACK_IN_PRO...
true
true
f710810b12384c37843d991e733d7c74f738237f
1,160
py
Python
tflitehub/mobilenet_quant_test.py
rsuderman/iree-samples
e7ba8e639c1bdd763793a6cf21930fb238607b3f
[ "Apache-2.0" ]
12
2021-08-18T07:01:50.000Z
2022-03-30T18:19:12.000Z
tflitehub/mobilenet_quant_test.py
rsuderman/iree-samples
e7ba8e639c1bdd763793a6cf21930fb238607b3f
[ "Apache-2.0" ]
10
2021-09-29T01:23:47.000Z
2022-03-25T21:59:04.000Z
tflitehub/mobilenet_quant_test.py
rsuderman/iree-samples
e7ba8e639c1bdd763793a6cf21930fb238607b3f
[ "Apache-2.0" ]
12
2021-09-09T00:58:53.000Z
2022-03-03T17:35:32.000Z
# RUN: %PYTHON %s import absl.testing import numpy import test_util import urllib.request from PIL import Image model_path = "https://tfhub.dev/tensorflow/lite-model/mobilenet_v2_1.0_224_quantized/1/default/1?lite-format=tflite" class MobilenetQuantTest(test_util.TFLiteModelTest): def __init__(self, *args, **kwar...
33.142857
116
0.743966
import absl.testing import numpy import test_util import urllib.request from PIL import Image model_path = "https://tfhub.dev/tensorflow/lite-model/mobilenet_v2_1.0_224_quantized/1/default/1?lite-format=tflite" class MobilenetQuantTest(test_util.TFLiteModelTest): def __init__(self, *args, **kwargs): super(Mo...
true
true
f7108151b0c3aa3b406dfde25785279e911d6bea
6,443
py
Python
logtools/_parse.py
AlainLich/logtools
584e575d25f0ebcd7a51cc6d5aefb530f80f6d22
[ "Apache-2.0" ]
2
2021-06-08T21:48:18.000Z
2022-03-09T05:50:13.000Z
logtools/_parse.py
AlainLich/logtools
584e575d25f0ebcd7a51cc6d5aefb530f80f6d22
[ "Apache-2.0" ]
null
null
null
logtools/_parse.py
AlainLich/logtools
584e575d25f0ebcd7a51cc6d5aefb530f80f6d22
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
38.580838
121
0.609809
import sys import logging from operator import and_ from optparse import OptionParser from functools import reduce import json import logtools.parsers import logtools.parsers2 from ._config import interpolate_config, AttrDict, setLoglevel from ._config import checkDpath from .parsers2 import File...
true
true
f7108264cb02420e9950c61ae9763e056ed2199c
807
py
Python
Core Concepts/Deep Learning/3_RELU_activation_function.py
WyckliffeAluga/data-chronicles
5219fe9cdbafb9fd7be88727483952c4c13f2790
[ "MIT" ]
null
null
null
Core Concepts/Deep Learning/3_RELU_activation_function.py
WyckliffeAluga/data-chronicles
5219fe9cdbafb9fd7be88727483952c4c13f2790
[ "MIT" ]
null
null
null
Core Concepts/Deep Learning/3_RELU_activation_function.py
WyckliffeAluga/data-chronicles
5219fe9cdbafb9fd7be88727483952c4c13f2790
[ "MIT" ]
1
2021-02-09T12:22:55.000Z
2021-02-09T12:22:55.000Z
import numpy as np def relu(input): '''Define your relu activation function here''' # Calculate the value for the output of the relu function: output output = max(input, 0) # Return the value just calculated return(output) input_data = np.array([3,5]) # Calculate node 0 value: node_0_output ...
27.827586
69
0.739777
import numpy as np def relu(input): output = max(input, 0) return(output) input_data = np.array([3,5]) node_0_input = (input_data * weights['node_0']).sum() node_0_output = relu(node_0_input) node_1_input = (input_data * weights['node_1']).sum() node_1_output = relu(node_1_input) hidden_l...
true
true
f7108274340407b2057c752d7910bfe615395f11
28,071
py
Python
misc/config_tools/launch_config/com.py
lifeix/acrn-hypervisor
0d12dacc2549c72a96b3703d6cfe900ed904c302
[ "BSD-3-Clause" ]
null
null
null
misc/config_tools/launch_config/com.py
lifeix/acrn-hypervisor
0d12dacc2549c72a96b3703d6cfe900ed904c302
[ "BSD-3-Clause" ]
1
2021-07-26T22:16:18.000Z
2021-07-26T22:16:18.000Z
misc/config_tools/launch_config/com.py
Surfndez/acrn-hypervisor
69fef2e685597e51ce2103e8701e90d210ec0640
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2019 Intel Corporation. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # import scenario_cfg_lib import launch_cfg_lib import common import pt def is_nuc_whl_linux(names, vmid): uos_type = names['uos_types'][vmid] board_name = names['board_name'] if launch_cfg_lib.is_linu...
40.565029
144
0.5858
import scenario_cfg_lib import launch_cfg_lib import common import pt def is_nuc_whl_linux(names, vmid): uos_type = names['uos_types'][vmid] board_name = names['board_name'] if launch_cfg_lib.is_linux_like(uos_type) and board_name not in ("apl-mrb", "apl-up2"): return True return False ...
true
true
f71082af93d1c265ed09483c58f606154391284b
11,088
py
Python
astro_dynamo/model.py
cwegg/astro-dynamo
024f8aad8785488e9ae3328095d3d9c53b3e31b0
[ "MIT" ]
null
null
null
astro_dynamo/model.py
cwegg/astro-dynamo
024f8aad8785488e9ae3328095d3d9c53b3e31b0
[ "MIT" ]
null
null
null
astro_dynamo/model.py
cwegg/astro-dynamo
024f8aad8785488e9ae3328095d3d9c53b3e31b0
[ "MIT" ]
null
null
null
import math from typing import List, Union, Tuple import torch import torch.nn as nn from astro_dynamo.snap import SnapShot from .snaptools import align_bar def _symmetrize_matrix(x, dim): """Symmetrize a tensor along dimension dim""" return (x + x.flip(dims=[dim])) / 2 class DynamicalModel(nn.Module): ...
45.818182
123
0.578734
import math from typing import List, Union, Tuple import torch import torch.nn as nn from astro_dynamo.snap import SnapShot from .snaptools import align_bar def _symmetrize_matrix(x, dim): return (x + x.flip(dims=[dim])) / 2 class DynamicalModel(nn.Module): def __init__(self, snap, potentials, targets, s...
true
true
f710835d66959fdc467c2e264eac9c235841223e
6,455
py
Python
src/dataset/transforms.py
HennyJie/BrainGB
96cf6711e2f2e6fa48b699ce3c0d6e318955c4de
[ "MIT" ]
3
2022-03-17T01:34:49.000Z
2022-03-22T07:53:17.000Z
src/dataset/transforms.py
HennyJie/BrainGB
96cf6711e2f2e6fa48b699ce3c0d6e318955c4de
[ "MIT" ]
null
null
null
src/dataset/transforms.py
HennyJie/BrainGB
96cf6711e2f2e6fa48b699ce3c0d6e318955c4de
[ "MIT" ]
null
null
null
import torch from node2vec import Node2Vec as Node2Vec_ from .brain_data import BrainData from torch_geometric.data import Data from networkx.convert_matrix import from_numpy_matrix from .utils import binning, LDP import networkx as nx from .base_transform import BaseTransform from numpy import linalg as LA import nump...
33.273196
104
0.604028
import torch from node2vec import Node2Vec as Node2Vec_ from .brain_data import BrainData from torch_geometric.data import Data from networkx.convert_matrix import from_numpy_matrix from .utils import binning, LDP import networkx as nx from .base_transform import BaseTransform from numpy import linalg as LA import nump...
true
true
f710836a29ffda363d4610fc11190b6952224671
2,208
py
Python
tensorflow_probability/python/bijectors/tanh.py
oahziur/probability
11645be43d2845da65a4fbafde4cfa95780280c0
[ "Apache-2.0" ]
1
2020-04-29T11:29:25.000Z
2020-04-29T11:29:25.000Z
tensorflow_probability/python/bijectors/tanh.py
jinxin0924/probability
ca14fa8924749593fd21e2b6389551f964527eec
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/bijectors/tanh.py
jinxin0924/probability
ca14fa8924749593fd21e2b6389551f964527eec
[ "Apache-2.0" ]
null
null
null
# 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...
29.837838
80
0.639493
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from tensorflow_probability.python.bijectors import bijector __all__ = [ "Tanh", ] class Tanh(bijector.Bijector): def __init__(self, validate...
true
true
f71084351b782abccdb2e0b46a99a1a1615969c0
8,206
py
Python
qualcoder/settings.py
WPFilmmaker/QualCoder
6d9529031358e3f85ef702a99e6ccfedb59efcd5
[ "MIT" ]
null
null
null
qualcoder/settings.py
WPFilmmaker/QualCoder
6d9529031358e3f85ef702a99e6ccfedb59efcd5
[ "MIT" ]
null
null
null
qualcoder/settings.py
WPFilmmaker/QualCoder
6d9529031358e3f85ef702a99e6ccfedb59efcd5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' Copyright (c) 2019 Colin Curtain Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, mer...
44.11828
117
0.672069
from PyQt5 import QtGui, QtWidgets, QtCore import os import sys import logging import traceback from GUI.ui_dialog_settings import Ui_Dialog_settings home = os.path.expanduser('~') path = os.path.abspath(os.path.dirname(__file__)) logger = logging.getLogger(__name__) def exception_handler(exception_type, value, t...
true
true
f710846c80ef3b7e1dcd8677b178febf876f4ee5
126
py
Python
flask_sample_program.py
Divya-Madhuri/ppty_mgmnt
c57c2dbdb5ecc224b825e8e084c228085d6ff5e7
[ "MIT" ]
null
null
null
flask_sample_program.py
Divya-Madhuri/ppty_mgmnt
c57c2dbdb5ecc224b825e8e084c228085d6ff5e7
[ "MIT" ]
10
2018-07-11T08:59:26.000Z
2018-11-11T07:47:07.000Z
flask_sample_program.py
Divya-Madhuri/ppty_mgmnt
c57c2dbdb5ecc224b825e8e084c228085d6ff5e7
[ "MIT" ]
null
null
null
from flask import Flask app = Flask(__name__) @app.route("/") def sample_program(): return "This is sample flask program"
21
41
0.722222
from flask import Flask app = Flask(__name__) @app.route("/") def sample_program(): return "This is sample flask program"
true
true
f710852baef6447333c4f3c0bfd0f7c232311700
368
py
Python
products/urls.py
zerobug110/Syfters_project
3fac21dee2e0ff9dea4efa62e325ca02b4811c5b
[ "MIT" ]
null
null
null
products/urls.py
zerobug110/Syfters_project
3fac21dee2e0ff9dea4efa62e325ca02b4811c5b
[ "MIT" ]
null
null
null
products/urls.py
zerobug110/Syfters_project
3fac21dee2e0ff9dea4efa62e325ca02b4811c5b
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('', views.Home, name="home"), path('portfolio', views.portfolio, name="portfolio"), path('news', views.news, name="new"), path('contacts', views.contacts, name="contacts"), path('about', views.about, name="about"), path('prod...
30.666667
59
0.649457
from django.urls import path from . import views urlpatterns = [ path('', views.Home, name="home"), path('portfolio', views.portfolio, name="portfolio"), path('news', views.news, name="new"), path('contacts', views.contacts, name="contacts"), path('about', views.about, name="about"), path('prod...
true
true
f7108595916ac71d85b22900f9d5e26db9ef5485
167
py
Python
t4proj/apps/survey/templatetags/survey_extra.py
mivanov-utwente/t4proj
78b717dc6e7ab8db6a3fc69cea64a640c050dc5c
[ "BSD-2-Clause" ]
null
null
null
t4proj/apps/survey/templatetags/survey_extra.py
mivanov-utwente/t4proj
78b717dc6e7ab8db6a3fc69cea64a640c050dc5c
[ "BSD-2-Clause" ]
null
null
null
t4proj/apps/survey/templatetags/survey_extra.py
mivanov-utwente/t4proj
78b717dc6e7ab8db6a3fc69cea64a640c050dc5c
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django import template register = template.Library() @register.filter(name='times') def times(value, arg): return value * int(arg)
16.7
30
0.676647
from django import template register = template.Library() @register.filter(name='times') def times(value, arg): return value * int(arg)
true
true
f71085e653a5d2a7a7371d23a0bed36878d58053
353
py
Python
main.py
manji6/scraping_playstation
8f68dcd862ea6018fea566a271a473ad0226eb4a
[ "MIT" ]
null
null
null
main.py
manji6/scraping_playstation
8f68dcd862ea6018fea566a271a473ad0226eb4a
[ "MIT" ]
null
null
null
main.py
manji6/scraping_playstation
8f68dcd862ea6018fea566a271a473ad0226eb4a
[ "MIT" ]
null
null
null
import os from flask import Flask, jsonify from scraper import Scraper app = Flask(__name__) scraper = Scraper() @app.route("/") def store_playstation(): return jsonify(scraper.store_playstation("https://store.playstation.com/ja-jp/category/1b6c3e7d-4445-4cef-a046-efd94a1085b7/")) if __name__ == "__main__": ...
20.764706
131
0.745042
import os from flask import Flask, jsonify from scraper import Scraper app = Flask(__name__) scraper = Scraper() @app.route("/") def store_playstation(): return jsonify(scraper.store_playstation("https://store.playstation.com/ja-jp/category/1b6c3e7d-4445-4cef-a046-efd94a1085b7/")) if __name__ == "__main__": ...
true
true
f71085ec739d1449547fd29afdf7e03034eab25f
5,960
py
Python
scenario analysis/portfolio_evaluation.py
iamlmn/monte_carlo_analysis
45f7af2b439f80bce429a94257a1167c9d5f4a2c
[ "MIT" ]
null
null
null
scenario analysis/portfolio_evaluation.py
iamlmn/monte_carlo_analysis
45f7af2b439f80bce429a94257a1167c9d5f4a2c
[ "MIT" ]
null
null
null
scenario analysis/portfolio_evaluation.py
iamlmn/monte_carlo_analysis
45f7af2b439f80bce429a94257a1167c9d5f4a2c
[ "MIT" ]
1
2022-03-12T02:43:40.000Z
2022-03-12T02:43:40.000Z
import yfinance import pandas as pd import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm def _simulate_returns(historical_returns,forecast_days): return historical_returns.sample(n = forecast_days, replace = True).reset_index(drop = True) def simulate_modifie...
32.043011
122
0.696477
import yfinance import pandas as pd import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm def _simulate_returns(historical_returns,forecast_days): return historical_returns.sample(n = forecast_days, replace = True).reset_index(drop = True) def simulate_modifie...
true
true
f71086a27c8d2575723b4d063f71368735eda0f7
547
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractWriterupdatesCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractWriterupdatesCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractWriterupdatesCom.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractWriterupdatesCom(item): ''' Parser for 'writerupdates.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'), ('Loiterous', 'Loi...
24.863636
104
0.632541
def extractWriterupdatesCom(item): vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'), ('Loiterous', 'Loiterous', 'oel'), ] for t...
true
true
f7108744cd51bdd0a03c5f6fc838c34d3a33e864
2,948
py
Python
tests/factors/test_selector.py
eru1030/zvt
8a2cc66a0c24a587cc28b9b7b3df99738c59c684
[ "MIT" ]
6
2021-08-15T10:00:35.000Z
2022-03-14T14:40:46.000Z
tests/factors/test_selector.py
eru1030/zvt
8a2cc66a0c24a587cc28b9b7b3df99738c59c684
[ "MIT" ]
null
null
null
tests/factors/test_selector.py
eru1030/zvt
8a2cc66a0c24a587cc28b9b7b3df99738c59c684
[ "MIT" ]
5
2021-07-18T08:27:37.000Z
2022-03-31T14:10:21.000Z
# -*- coding: utf-8 -*- from zvt.contract import IntervalLevel from zvt.factors.target_selector import TargetSelector from zvt.factors.ma.ma_factor import CrossMaFactor from zvt.factors import BullFactor from ..context import init_test_context init_test_context() class TechnicalSelector(TargetSelector): def init...
38.789474
115
0.623474
from zvt.contract import IntervalLevel from zvt.factors.target_selector import TargetSelector from zvt.factors.ma.ma_factor import CrossMaFactor from zvt.factors import BullFactor from ..context import init_test_context init_test_context() class TechnicalSelector(TargetSelector): def init_factors(self, entity_i...
true
true
f71089cb130f4b31517af470738fe6f309467cf0
4,535
py
Python
tests/plugins/test_docker_api.py
MartinBasti/atomic-reactor
4431225c5a474c7f88c63ec1f25216d4b84a0f1d
[ "BSD-3-Clause" ]
null
null
null
tests/plugins/test_docker_api.py
MartinBasti/atomic-reactor
4431225c5a474c7f88c63ec1f25216d4b84a0f1d
[ "BSD-3-Clause" ]
1
2018-04-25T12:42:14.000Z
2018-04-29T20:31:00.000Z
tests/plugins/test_docker_api.py
MartinBasti/atomic-reactor
4431225c5a474c7f88c63ec1f25216d4b84a0f1d
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2017 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals import docker import requests from dockerfile_parse import DockerfileParser from atomic_reactor.pl...
30.641892
77
0.690849
from __future__ import unicode_literals import docker import requests from dockerfile_parse import DockerfileParser from atomic_reactor.plugin import PluginFailedException from atomic_reactor.build import InsideBuilder, BuildResult from atomic_reactor.util import ImageName, CommandResult from atomic_reactor.inner i...
true
true
f7108f493a2b4e0859207074f20dfc4dc12a43b2
167
py
Python
utils/models/common_models/blocks/__init__.py
voldemortX/DeeplabV3_PyTorch1.3_Codebase
d22d23e74800fafb58eeb61d6649008745c1a287
[ "BSD-3-Clause" ]
1
2020-09-17T06:21:39.000Z
2020-09-17T06:21:39.000Z
utils/models/common_models/blocks/__init__.py
voldemortX/pytorch-segmentation
9c62c0a721d11c8ea6bf312ecf1c7b238a54dcda
[ "BSD-3-Clause" ]
null
null
null
utils/models/common_models/blocks/__init__.py
voldemortX/pytorch-segmentation
9c62c0a721d11c8ea6bf312ecf1c7b238a54dcda
[ "BSD-3-Clause" ]
null
null
null
from .inverted_residual import InvertedResidual, InvertedResidualV3 from .non_bottleneck_1d import non_bottleneck_1d from .dilated_bottleneck import DilatedBottleneck
41.75
67
0.898204
from .inverted_residual import InvertedResidual, InvertedResidualV3 from .non_bottleneck_1d import non_bottleneck_1d from .dilated_bottleneck import DilatedBottleneck
true
true
f7108f52cfbe4b54cdab9073d5746e1107e734cd
2,368
py
Python
pypeerassets/kutil.py
sparklecoin/pypeerassets
51a0597d45dd23768d7f4eb41558400f758020fc
[ "BSD-3-Clause" ]
null
null
null
pypeerassets/kutil.py
sparklecoin/pypeerassets
51a0597d45dd23768d7f4eb41558400f758020fc
[ "BSD-3-Clause" ]
null
null
null
pypeerassets/kutil.py
sparklecoin/pypeerassets
51a0597d45dd23768d7f4eb41558400f758020fc
[ "BSD-3-Clause" ]
null
null
null
from hashlib import sha256 from os import urandom from btcpy.structs.crypto import PublicKey, PrivateKey from btcpy.structs.transaction import MutableTransaction, TxOut from btcpy.structs.sig import P2pkhSolver from pypeerassets.networks import net_query class Kutil: def __init__(self, network: str, privkey: ...
34.823529
84
0.616976
from hashlib import sha256 from os import urandom from btcpy.structs.crypto import PublicKey, PrivateKey from btcpy.structs.transaction import MutableTransaction, TxOut from btcpy.structs.sig import P2pkhSolver from pypeerassets.networks import net_query class Kutil: def __init__(self, network: str, privkey: ...
true
true
f7108f756f946059be6c4f65b83a9a568d67d595
4,743
py
Python
evalie.py
ferhatgec/evalie
caa85312e015df46a75855998adffd3df7df61d2
[ "MIT" ]
1
2022-03-19T13:53:47.000Z
2022-03-19T13:53:47.000Z
evalie.py
ferhatgec/evalie
caa85312e015df46a75855998adffd3df7df61d2
[ "MIT" ]
null
null
null
evalie.py
ferhatgec/evalie
caa85312e015df46a75855998adffd3df7df61d2
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2022 Ferhat Geçdoğan All Rights Reserved. # Distributed under the terms of the MIT License. # # # evalie - a toy evaluator using # shunting-yard algorithm. # ------ # github.com/ferhatgec/evalie # import math class evalie: def __init__(self): self.precedence = { ...
27.736842
102
0.452456
import math class evalie: def __init__(self): self.precedence = { '+': 2, '-': 2, '*': 3, '/': 3, '!': 4, '^': 4, '%': 4 } self.left = 0 self.right = 0 self.op = '' sel...
true
true
f7108fa0fd5d5b3741acce8fdb783ffafa07316b
1,592
py
Python
Scrap11888/lib/DataManagement/Cacher.py
GeorgeVasiliadis/Scrap11888
f485ac894c681489e15c71597b4110859cfc7645
[ "MIT" ]
1
2021-12-14T22:28:43.000Z
2021-12-14T22:28:43.000Z
Scrap11888/lib/DataManagement/Cacher.py
GeorgeVasiliadis/Scrap11888
f485ac894c681489e15c71597b4110859cfc7645
[ "MIT" ]
null
null
null
Scrap11888/lib/DataManagement/Cacher.py
GeorgeVasiliadis/Scrap11888
f485ac894c681489e15c71597b4110859cfc7645
[ "MIT" ]
null
null
null
import os import pickle from .Utils import purify, staticPath def cacheIn(dir, name, data): """ Store given `data` under ./cache/dir/name.pickle file. Note that `dir` and `name` are "purified" before used! -dir: string of sub-directory to be created. Cache-file will be stored in it. It should...
27.929825
81
0.641332
import os import pickle from .Utils import purify, staticPath def cacheIn(dir, name, data): path = staticPath(__file__, "cache") dir = purify(dir) name = purify(name) path = os.path.join(path, dir) os.makedirs(path, exist_ok=True) filename = name + ".pickle" path = os.path.join(pat...
true
true
f7108fcbde1f439374e9925f785ce0a7eab9e618
2,076
py
Python
website_cloner/website_cloner.py
tre3x/awesomeScripts
e70cd64eff7791cfac05f069fb9f7037c1bf05bf
[ "MIT" ]
245
2020-09-24T03:49:20.000Z
2021-01-31T20:09:57.000Z
website_cloner/website_cloner.py
tre3x/awesomeScripts
e70cd64eff7791cfac05f069fb9f7037c1bf05bf
[ "MIT" ]
252
2020-09-28T02:19:44.000Z
2021-01-23T09:00:34.000Z
website_cloner/website_cloner.py
tre3x/awesomeScripts
e70cd64eff7791cfac05f069fb9f7037c1bf05bf
[ "MIT" ]
219
2020-09-23T18:51:42.000Z
2021-01-23T09:54:40.000Z
"""" Program name : Website cloner author : https://github.com/codeperfectplus How to use : Check README.md """ import os import sys import requests from bs4 import BeautifulSoup class CloneWebsite: def __init__(self, website_name): self.website_name = website_name def crawl_website(sel...
29.239437
79
0.560694
import os import sys import requests from bs4 import BeautifulSoup class CloneWebsite: def __init__(self, website_name): self.website_name = website_name def crawl_website(self): content = requests.get(website_name) if content.status_code == 200: return content def c...
true
true
f7108fee8a89713ce266ef09bd13226718600bc7
7,474
py
Python
tfx/orchestration/portable/python_executor_operator_test.py
rtg0795/tfx
63c31b719896eef645df3850d0e6b946e44cd059
[ "Apache-2.0" ]
null
null
null
tfx/orchestration/portable/python_executor_operator_test.py
rtg0795/tfx
63c31b719896eef645df3850d0e6b946e44cd059
[ "Apache-2.0" ]
null
null
null
tfx/orchestration/portable/python_executor_operator_test.py
rtg0795/tfx
63c31b719896eef645df3850d0e6b946e44cd059
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
37.18408
98
0.677816
import os from typing import Any, Dict, List import tensorflow as tf from tfx import types from tfx.dsl.components.base import base_executor from tfx.dsl.io import fileio from tfx.orchestration.portable import data_types from tfx.orchestration.portable import outputs_utils from tfx.orchestration.portable...
true
true
f71092382f306099163685134981cd5673eeb335
3,980
py
Python
visualisation/drift_paper/plot_ohc_drift.py
DamienIrving/ocean-analysis
23a6dbf616fb84e6e158e32534ffd394e0df2e3e
[ "MIT" ]
7
2017-06-06T20:20:58.000Z
2020-02-05T23:28:41.000Z
visualisation/drift_paper/plot_ohc_drift.py
DamienIrving/ocean-analysis
23a6dbf616fb84e6e158e32534ffd394e0df2e3e
[ "MIT" ]
17
2017-04-06T04:46:37.000Z
2021-07-01T00:47:50.000Z
visualisation/drift_paper/plot_ohc_drift.py
DamienIrving/ocean-analysis
23a6dbf616fb84e6e158e32534ffd394e0df2e3e
[ "MIT" ]
4
2021-01-19T01:31:40.000Z
2022-03-15T00:50:11.000Z
""" Filename: plot_ohc_drift.py Author: Damien Irving, irving.damien@gmail.com Description: Create a bar chart showing drift in ocean heat content and its thermal and barystatic components """ # Import general Python modules import sys import os import re import pdb import argparse import...
33.728814
113
0.634422
import sys import os import re import pdb import argparse import numpy as np import pandas as pd import matplotlib.pyplot as plt import cmdline_provenance as cmdprov cwd = os.getcwd() repo_dir = '/' for directory in cwd.split('/')[1:]: repo_dir = os.path.join(repo_dir, directory) if directory == 'ocean-an...
true
true
f710927746bde172fc3423890b8ea4a1489a2714
8,943
py
Python
gui.py
FengZiYjun/Secret-Chat
8b77afa0d90ad400cf3d2965626f56df5f7cc6d4
[ "Apache-2.0" ]
3
2019-04-10T03:37:30.000Z
2020-05-19T18:23:48.000Z
gui.py
FengZiYjun/Secret-Words
8b77afa0d90ad400cf3d2965626f56df5f7cc6d4
[ "Apache-2.0" ]
1
2021-05-03T19:59:02.000Z
2021-05-03T19:59:02.000Z
gui.py
FengZiYjun/Secret-Words
8b77afa0d90ad400cf3d2965626f56df5f7cc6d4
[ "Apache-2.0" ]
1
2020-03-04T06:09:41.000Z
2020-03-04T06:09:41.000Z
import tkinter as tk import threading from tkinter import scrolledtext from tkinter import messagebox ENCODING = 'utf-8' class GUI(threading.Thread): def __init__(self, client): super().__init__(daemon=False, target=self.run) self.font = ('Helvetica', 13) self.client = client self...
35.772
95
0.620933
import tkinter as tk import threading from tkinter import scrolledtext from tkinter import messagebox ENCODING = 'utf-8' class GUI(threading.Thread): def __init__(self, client): super().__init__(daemon=False, target=self.run) self.font = ('Helvetica', 13) self.client = client self...
true
true
f71093e41ef3731d1456d1c31f98330463d1f376
1,613
py
Python
whoahqa/views/request_methods.py
onaio/who-adolescent-hqa
108a7e60b025d0723247f5f02eab2c4d41f5a02a
[ "Apache-2.0" ]
null
null
null
whoahqa/views/request_methods.py
onaio/who-adolescent-hqa
108a7e60b025d0723247f5f02eab2c4d41f5a02a
[ "Apache-2.0" ]
2
2018-01-09T08:58:11.000Z
2019-01-18T09:20:14.000Z
whoahqa/views/request_methods.py
onaio/who-adolescent-hqa
108a7e60b025d0723247f5f02eab2c4d41f5a02a
[ "Apache-2.0" ]
null
null
null
from sqlalchemy.orm.exc import NoResultFound from whoahqa.models import ( ClinicFactory, User, ) from whoahqa.constants import groups from whoahqa.constants import permissions as perms def get_request_user(request): user_id = request.authenticated_userid try: return User.get(User.id == user_...
23.720588
59
0.66708
from sqlalchemy.orm.exc import NoResultFound from whoahqa.models import ( ClinicFactory, User, ) from whoahqa.constants import groups from whoahqa.constants import permissions as perms def get_request_user(request): user_id = request.authenticated_userid try: return User.get(User.id == user_...
true
true
f71094846216537592d2d28a0f6ffcbe78b79a5d
684
py
Python
goals/finance_goal/migrations/0001_initial.py
hornd/django-finance
40647a00509f5f0aa651af86c3b6f11730228041
[ "Apache-2.0" ]
null
null
null
goals/finance_goal/migrations/0001_initial.py
hornd/django-finance
40647a00509f5f0aa651af86c3b6f11730228041
[ "Apache-2.0" ]
null
null
null
goals/finance_goal/migrations/0001_initial.py
hornd/django-finance
40647a00509f5f0aa651af86c3b6f11730228041
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-11 01:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Goal', ...
26.307692
114
0.587719
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Goal', fields=[ ('id', models.AutoField(auto_crea...
true
true
f710949d97ae83f867dbea8919f8385218e938f6
501
py
Python
Multiplication.py
13472889991/DataStructures-Algorithms
3eb219460f0f8108bb3c07c4de5544df412e189e
[ "MIT" ]
null
null
null
Multiplication.py
13472889991/DataStructures-Algorithms
3eb219460f0f8108bb3c07c4de5544df412e189e
[ "MIT" ]
null
null
null
Multiplication.py
13472889991/DataStructures-Algorithms
3eb219460f0f8108bb3c07c4de5544df412e189e
[ "MIT" ]
null
null
null
from math import ceil def karatsuba(a,b): if a < 10 and b < 10: return a*b n = max(len(str(a)), len(str(b))) m = int(ceil(float(n)/2)) a1 = int(a // 10**m) a2 = int(a % (10**m)) b1 = int(b // 10**m) b2 = int(b % (10**m)) ...
19.269231
45
0.373253
from math import ceil def karatsuba(a,b): if a < 10 and b < 10: return a*b n = max(len(str(a)), len(str(b))) m = int(ceil(float(n)/2)) a1 = int(a // 10**m) a2 = int(a % (10**m)) b1 = int(b // 10**m) b2 = int(b % (10**m)) ...
true
true
f710978296da5c053d75a954fe654c6f36c7a147
518
py
Python
social_core/backends/withings.py
astofsel/package_2
149672d16048a1f0d4b158379432034f0234e168
[ "BSD-3-Clause" ]
1
2017-03-05T01:43:57.000Z
2017-03-05T01:43:57.000Z
social_core/backends/withings.py
astofsel/package_2
149672d16048a1f0d4b158379432034f0234e168
[ "BSD-3-Clause" ]
2
2022-02-10T16:51:56.000Z
2022-02-10T18:23:52.000Z
social_core/backends/withings.py
astofsel/package_2
149672d16048a1f0d4b158379432034f0234e168
[ "BSD-3-Clause" ]
null
null
null
from .oauth import BaseOAuth1 class WithingsOAuth(BaseOAuth1): name = 'withings' AUTHORIZATION_URL = 'https://oauth.withings.com/account/authorize' REQUEST_TOKEN_URL = 'https://oauth.withings.com/account/request_token' ACCESS_TOKEN_URL = 'https://oauth.withings.com/account/access_token' ID_KEY = '...
34.533333
74
0.685328
from .oauth import BaseOAuth1 class WithingsOAuth(BaseOAuth1): name = 'withings' AUTHORIZATION_URL = 'https://oauth.withings.com/account/authorize' REQUEST_TOKEN_URL = 'https://oauth.withings.com/account/request_token' ACCESS_TOKEN_URL = 'https://oauth.withings.com/account/access_token' ID_KEY = '...
true
true
f7109950a5b343a22646337789e00f664d4489bb
53,193
py
Python
heat/tests/engine/test_scheduler.py
larsks/heat
11064586e90166a037f8868835e6ce36f7306276
[ "Apache-2.0" ]
null
null
null
heat/tests/engine/test_scheduler.py
larsks/heat
11064586e90166a037f8868835e6ce36f7306276
[ "Apache-2.0" ]
null
null
null
heat/tests/engine/test_scheduler.py
larsks/heat
11064586e90166a037f8868835e6ce36f7306276
[ "Apache-2.0" ]
null
null
null
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
30.103565
79
0.579531
import contextlib import itertools import eventlet import six from heat.common.i18n import repr_wrapper from heat.common import timeutils from heat.engine import dependencies from heat.engine import scheduler from heat.tests import common class DummyTask(object): def __init__(self, num_steps=3, del...
true
true
f7109b54b5906c81389c8ba2757f70f271fff476
1,249
py
Python
examples/servers_by_group.py
mphbig/cyberwatch_api_toolbox
26058b0e25aea11b3e2d49efe5ad713db7164dc4
[ "MIT" ]
null
null
null
examples/servers_by_group.py
mphbig/cyberwatch_api_toolbox
26058b0e25aea11b3e2d49efe5ad713db7164dc4
[ "MIT" ]
null
null
null
examples/servers_by_group.py
mphbig/cyberwatch_api_toolbox
26058b0e25aea11b3e2d49efe5ad713db7164dc4
[ "MIT" ]
null
null
null
"""Example: Find all servers per group""" import os from configparser import ConfigParser from cbw_api_toolbox.cbw_api import CBWApi CONF = ConfigParser() CONF.read(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'api.conf')) CLIENT = CBWApi(CONF.get('cyberwatch', 'url'), CONF.get('cyberwatch', 'api_ke...
31.225
119
0.689351
import os from configparser import ConfigParser from cbw_api_toolbox.cbw_api import CBWApi CONF = ConfigParser() CONF.read(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'api.conf')) CLIENT = CBWApi(CONF.get('cyberwatch', 'url'), CONF.get('cyberwatch', 'api_key'), CONF.get('cyberwatch', 'secret_key'))...
true
true
f7109b8dd0c34cf93c9e4fe141288fdbca2bd1bc
1,541
py
Python
tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py
atulep/gapic-generator-python
ea6cfe6d6a4276894dba9b4a2efe458df86a08a0
[ "Apache-2.0" ]
null
null
null
tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py
atulep/gapic-generator-python
ea6cfe6d6a4276894dba9b4a2efe458df86a08a0
[ "Apache-2.0" ]
null
null
null
tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py
atulep/gapic-generator-python
ea6cfe6d6a4276894dba9b4a2efe458df86a08a0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
31.44898
85
0.757949
from google.cloud import logging_v2 def sample_get_cmek_settings(): client = logging_v2.ConfigServiceV2Client() project = "my-project-id" name = f"projects/{project}/cmekSettings" request = logging_v2.GetCmekSettingsRequest( name=name, ) resp...
true
true
f7109beea6f6b9d5cc94d3efdcd05188c671498a
6,705
py
Python
bindings/python/ensmallen_graph/datasets/string/azotobactervinelandii.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/azotobactervinelandii.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/azotobactervinelandii.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Azotobacter vinelandii. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021...
35.47619
223
0.704549
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def AzotobacterVinelandii( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: ...
true
true
f7109c9004fba9b86d167445229f2126cfcf0b42
295
py
Python
movies/urls.py
huseyinyilmaz/django-movie-search
29a989eb04d46319a7218daf776b8a0ec831845b
[ "MIT" ]
null
null
null
movies/urls.py
huseyinyilmaz/django-movie-search
29a989eb04d46319a7218daf776b8a0ec831845b
[ "MIT" ]
null
null
null
movies/urls.py
huseyinyilmaz/django-movie-search
29a989eb04d46319a7218daf776b8a0ec831845b
[ "MIT" ]
null
null
null
from django.conf.urls import url from movies import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='movies-index'), url(r'^name/$', views.NameSearchView.as_view(), name='movies-name-search'), url(r'^id/$', views.IDSearchView.as_view(), name='movies-id-search'), ]
32.777778
79
0.681356
from django.conf.urls import url from movies import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='movies-index'), url(r'^name/$', views.NameSearchView.as_view(), name='movies-name-search'), url(r'^id/$', views.IDSearchView.as_view(), name='movies-id-search'), ]
true
true
f7109ced9584331781ae4dbeffdd97a368c81513
65,460
py
Python
elevenclock/__init__.py
wanderleihuttel/ElevenClock
de4272a650111233acf36c909c7e269c8dc810d2
[ "Apache-2.0" ]
null
null
null
elevenclock/__init__.py
wanderleihuttel/ElevenClock
de4272a650111233acf36c909c7e269c8dc810d2
[ "Apache-2.0" ]
null
null
null
elevenclock/__init__.py
wanderleihuttel/ElevenClock
de4272a650111233acf36c909c7e269c8dc810d2
[ "Apache-2.0" ]
null
null
null
try: import time FirstTime = time.time() import os import io import sys import time import glob import socket import locale import hashlib import tempfile import datetime import subprocess from ctypes import windll from urllib.request import urlopen try...
50.981308
324
0.557195
try: import time FirstTime = time.time() import os import io import sys import time import glob import socket import locale import hashlib import tempfile import datetime import subprocess from ctypes import windll from urllib.request import urlopen try...
true
true
f7109ddb17e4780f3af2f2375fee8cd66928aded
1,069
py
Python
Chapter03/scrapelxml.py
elephantscale/Hands-On-Web-Scraping-with-Python
013069a23c5bc3846ab475c5774bc6ff9a27c348
[ "MIT" ]
43
2019-03-05T12:37:35.000Z
2022-01-24T11:43:37.000Z
Chapter03/scrapelxml.py
elephantscale/Hands-On-Web-Scraping-with-Python
013069a23c5bc3846ab475c5774bc6ff9a27c348
[ "MIT" ]
1
2019-12-29T10:34:13.000Z
2020-08-10T07:19:28.000Z
Chapter03/scrapelxml.py
elephantscale/Hands-On-Web-Scraping-with-Python
013069a23c5bc3846ab475c5774bc6ff9a27c348
[ "MIT" ]
42
2019-05-02T10:28:35.000Z
2022-02-16T16:45:48.000Z
import lxml.html musicUrl= "http://books.toscrape.com/catalogue/category/books/music_14/index.html" doc = lxml.html.parse(musicUrl) #base element articles = doc.xpath("//*[@id='default']/div/div/div/div/section/div[2]/ol/li[1]/article")[0] #individual element inside base title = articles.xpath("//h3/a/text()") pri...
35.633333
105
0.715622
import lxml.html musicUrl= "http://books.toscrape.com/catalogue/category/books/music_14/index.html" doc = lxml.html.parse(musicUrl) articles = doc.xpath("//*[@id='default']/div/div/div/div/section/div[2]/ol/li[1]/article")[0] title = articles.xpath("//h3/a/text()") price = articles.xpath("//div[2]/p[contains(@cl...
true
true
f7109e2a81729843d72c0ff010349421f9434137
3,018
py
Python
sdk/monitor/azure-monitor-query/setup.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1
2021-09-16T02:33:52.000Z
2021-09-16T02:33:52.000Z
sdk/monitor/azure-monitor-query/setup.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1
2019-08-05T19:14:28.000Z
2019-08-05T19:30:05.000Z
sdk/monitor/azure-monitor-query/setup.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1
2016-04-19T22:15:47.000Z
2016-04-19T22:15:47.000Z
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------...
33.164835
85
0.60603
import re import os.path from io import open from setuptools import find_packages, setup PACKAGE_NAME = "azure-monitor-query" PACKAGE_PPRINT_NAME = "Azure Monitor Query" package_folder_path = PACKAGE_NAME.replace('-', '/') namespace_name = PACKAGE_NAME.replace('-', '.') try: import azure try: ...
true
true
f7109e5f329e34712969175bcdd6c832599f7ef5
1,218
py
Python
mandala/tests/test_call_graph.py
amakelov/mandala
a9ec051ef730ada4eed216c62a07b033126e78d5
[ "Apache-2.0" ]
9
2022-02-22T19:24:01.000Z
2022-03-23T04:46:41.000Z
mandala/tests/test_call_graph.py
amakelov/mandala
a9ec051ef730ada4eed216c62a07b033126e78d5
[ "Apache-2.0" ]
null
null
null
mandala/tests/test_call_graph.py
amakelov/mandala
a9ec051ef730ada4eed216c62a07b033126e78d5
[ "Apache-2.0" ]
null
null
null
from .utils import * from .funcs import * def test_unit(): storage = Storage() @op(storage) def f(x:int) -> int: return x + 1 @superop(storage) def f_twice(x:int) -> int: return f(f(x)) with run(storage, autocommit=True): f_twice(42) cg = storage.cal...
24.857143
85
0.587028
from .utils import * from .funcs import * def test_unit(): storage = Storage() @op(storage) def f(x:int) -> int: return x + 1 @superop(storage) def f_twice(x:int) -> int: return f(f(x)) with run(storage, autocommit=True): f_twice(42) cg = storage.cal...
true
true
f7109e8ff05634250514692e37d4f0e4532aeadd
364
py
Python
tests/conanbuilder/test_remote.py
arnaudgelas/mumoco
f38db5bdccc93473e2b8bfeb8e7f2884063fd9de
[ "MIT" ]
null
null
null
tests/conanbuilder/test_remote.py
arnaudgelas/mumoco
f38db5bdccc93473e2b8bfeb8e7f2884063fd9de
[ "MIT" ]
null
null
null
tests/conanbuilder/test_remote.py
arnaudgelas/mumoco
f38db5bdccc93473e2b8bfeb8e7f2884063fd9de
[ "MIT" ]
null
null
null
import pytest from src.conanbuilder.remote import Remote @pytest.fixture def remote(): return Remote("myName", "myUrl") def test_default_values(remote): assert remote.name == "myName" assert remote.url == "myUrl" assert remote.verify_ssl is True assert remote.priority == 0 assert remote.forc...
21.411765
42
0.717033
import pytest from src.conanbuilder.remote import Remote @pytest.fixture def remote(): return Remote("myName", "myUrl") def test_default_values(remote): assert remote.name == "myName" assert remote.url == "myUrl" assert remote.verify_ssl is True assert remote.priority == 0 assert remote.forc...
true
true
f7109ec47cb12c07cbd7c2c04ebf2dc466ee9099
423
py
Python
commons/templatetags/common_tags.py
lsalta/mapground
d927d283dab6f756574bd88b3251b9e68f000ca7
[ "MIT" ]
null
null
null
commons/templatetags/common_tags.py
lsalta/mapground
d927d283dab6f756574bd88b3251b9e68f000ca7
[ "MIT" ]
3
2020-02-11T23:04:56.000Z
2021-06-10T18:07:53.000Z
commons/templatetags/common_tags.py
lsalta/mapground
d927d283dab6f756574bd88b3251b9e68f000ca7
[ "MIT" ]
1
2021-08-20T14:49:09.000Z
2021-08-20T14:49:09.000Z
from django import template from django.conf import settings from django.utils.safestring import mark_safe register = template.Library() # settings value @register.simple_tag def settings_value(name): defaults = { 'SITE_HEADER': '<b>Map</b>Ground', 'SITE_TITLE': 'MapGround' } if name in d...
22.263158
65
0.680851
from django import template from django.conf import settings from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag def settings_value(name): defaults = { 'SITE_HEADER': '<b>Map</b>Ground', 'SITE_TITLE': 'MapGround' } if name in defaults: ...
true
true