hexsha stringlengths 40 40 | size int64 2 1.02M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 245 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 245 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 245 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.02M | avg_line_length float64 1 958k | max_line_length int64 1 987k | alphanum_fraction float64 0 1 | content_no_comment stringlengths 0 1.01M | is_comment_constant_removed bool 2
classes | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f73d207bfe6d808270ec68670e0429f84853f359 | 47 | py | Python | optirocket/library/__init__.py | Keith-Maxwell/OptiRocket | d99ac8d2b868b60a2bbf32f5a8a31ecdcaeea5b0 | [
"MIT"
] | null | null | null | optirocket/library/__init__.py | Keith-Maxwell/OptiRocket | d99ac8d2b868b60a2bbf32f5a8a31ecdcaeea5b0 | [
"MIT"
] | 3 | 2021-01-14T15:09:51.000Z | 2021-02-12T17:05:18.000Z | optirocket/library/__init__.py | Keith-Maxwell/OptiRocket | d99ac8d2b868b60a2bbf32f5a8a31ecdcaeea5b0 | [
"MIT"
] | 1 | 2021-01-11T02:34:29.000Z | 2021-01-11T02:34:29.000Z | from . import constants, orbit_lib, rich_print
| 23.5 | 46 | 0.808511 | from . import constants, orbit_lib, rich_print
| true | true |
f73d21ec3854b7b19b2c5e02a0cc60320e1d97fa | 3,715 | py | Python | triple_agent/parsing/timeline/parse_full_timeline.py | andrewzwicky/TripleAgent | 8d056df5c53a3d264dc778bad6771a0a2f62e7e7 | [
"MIT"
] | 3 | 2020-04-25T11:42:03.000Z | 2020-07-08T16:38:26.000Z | triple_agent/parsing/timeline/parse_full_timeline.py | andrewzwicky/TripleAgent | 8d056df5c53a3d264dc778bad6771a0a2f62e7e7 | [
"MIT"
] | 17 | 2019-08-11T19:09:55.000Z | 2021-03-30T17:12:28.000Z | triple_agent/parsing/timeline/parse_full_timeline.py | andrewzwicky/TripleAgent | 8d056df5c53a3d264dc778bad6771a0a2f62e7e7 | [
"MIT"
] | null | null | null | import itertools
import logging
import time
from typing import List, Callable
from pathlib import Path
from triple_agent.constants.paths import DEBUG_CAPTURES
from triple_agent.classes.capture_debug_pictures import capture_debug_picture
from triple_agent.classes.timeline import TimelineCoherency
from triple_agent.pars... | 36.421569 | 95 | 0.62638 | import itertools
import logging
import time
from typing import List, Callable
from pathlib import Path
from triple_agent.constants.paths import DEBUG_CAPTURES
from triple_agent.classes.capture_debug_pictures import capture_debug_picture
from triple_agent.classes.timeline import TimelineCoherency
from triple_agent.pars... | true | true |
f73d225872243a0bfe5ee1078f0b8cdbc4f8c113 | 1,087 | py | Python | metaci/testresults/migrations/0006_testresultasset.py | sfdc-qbranch/MetaCI | 78ac0d2bccd2db381998321ebd71029dd5d9ab39 | [
"BSD-3-Clause"
] | 48 | 2018-10-24T14:52:06.000Z | 2022-03-25T21:14:50.000Z | metaci/testresults/migrations/0006_testresultasset.py | sfdc-qbranch/MetaCI | 78ac0d2bccd2db381998321ebd71029dd5d9ab39 | [
"BSD-3-Clause"
] | 2,034 | 2018-10-31T20:59:16.000Z | 2022-03-22T21:38:03.000Z | metaci/testresults/migrations/0006_testresultasset.py | sfdc-qbranch/MetaCI | 78ac0d2bccd2db381998321ebd71029dd5d9ab39 | [
"BSD-3-Clause"
] | 27 | 2018-12-24T18:16:23.000Z | 2021-12-15T17:57:27.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-08-24 14:34
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("testresults", "0005_testclass_test_type")]
operations = [
... | 28.605263 | 68 | 0.448022 |
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("testresults", "0005_testclass_test_type")]
operations = [
migrations.CreateModel(
name="TestResultAsset",
... | true | true |
f73d22af71eb0aa4999ea66aaf3dcb8e08d60436 | 354 | py | Python | other/dingding/dingtalk/api/rest/OapiAttendanceShiftSearchRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | other/dingding/dingtalk/api/rest/OapiAttendanceShiftSearchRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | other/dingding/dingtalk/api/rest/OapiAttendanceShiftSearchRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | '''
Created by auto_sdk on 2019.07.31
'''
from dingtalk.api.base import RestApi
class OapiAttendanceShiftSearchRequest(RestApi):
def __init__(self,url=None):
RestApi.__init__(self,url)
self.op_user_id = None
self.shift_name = None
def getHttpMethod(self):
return 'POST'
def getapiname(self):
return 'dingt... | 22.125 | 48 | 0.759887 | from dingtalk.api.base import RestApi
class OapiAttendanceShiftSearchRequest(RestApi):
def __init__(self,url=None):
RestApi.__init__(self,url)
self.op_user_id = None
self.shift_name = None
def getHttpMethod(self):
return 'POST'
def getapiname(self):
return 'dingtalk.oapi.attendance.shift.search'
| true | true |
f73d22f4908132b0a65462efa00808da6bb3e936 | 5,628 | py | Python | seathru_mono_e2e.py | benelot/sea-thru | e143b75eca7dcb6887a4ecc98691816e6b9d3b69 | [
"MIT"
] | 1 | 2021-06-17T07:16:28.000Z | 2021-06-17T07:16:28.000Z | seathru_mono_e2e.py | benelot/sea-thru | e143b75eca7dcb6887a4ecc98691816e6b9d3b69 | [
"MIT"
] | null | null | null | seathru_mono_e2e.py | benelot/sea-thru | e143b75eca7dcb6887a4ecc98691816e6b9d3b69 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import os
import argparse
import PIL.Image as pil
import rawpy
import torch
from torchvision import transforms
import numpy as np
import deps.monodepth2.networks as networks
from deps.monodepth2.utils import download_model_if_doesnt_exist
from seathru ... | 46.9 | 127 | 0.706645 | from __future__ import absolute_import, division, print_function
import os
import argparse
import PIL.Image as pil
import rawpy
import torch
from torchvision import transforms
import numpy as np
import deps.monodepth2.networks as networks
from deps.monodepth2.utils import download_model_if_doesnt_exist
from seathru ... | true | true |
f73d23c151e6c4812ac5f37754dfe25ad79c6e32 | 1,526 | py | Python | tests/test_fileio.py | richardt94/landshark | e4f347857a750d050d2cd568c6bcbd8f4a6c1f7f | [
"Apache-2.0"
] | 10 | 2019-03-05T23:53:58.000Z | 2021-12-17T08:27:05.000Z | tests/test_fileio.py | richardt94/landshark | e4f347857a750d050d2cd568c6bcbd8f4a6c1f7f | [
"Apache-2.0"
] | 7 | 2019-03-05T05:39:02.000Z | 2020-02-03T01:10:40.000Z | tests/test_fileio.py | richardt94/landshark | e4f347857a750d050d2cd568c6bcbd8f4a6c1f7f | [
"Apache-2.0"
] | 8 | 2019-03-23T22:55:25.000Z | 2021-01-12T05:14:31.000Z | """Test fileio modeule."""
# Copyright 2019 CSIRO (Data61)
#
# 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... | 35.488372 | 75 | 0.739843 |
import pytest
from landshark.fileio import tifnames
tifs = [
"./integration/data/categorical/PM_Lithology_Unit_Type_missing.tif",
"./integration/data/categorical/Soil_ASC_missing.tif",
"./integration/data/continuous/SirSamualAusGravity2011_ll_missing.tif",
"./integration/data/continuous... | true | true |
f73d241507e9e9cfd2e55c24bb01c66368138271 | 4,826 | py | Python | bc4py/user/api/ep_system.py | namuyan/bc4py | 6484d356096261d0d57e9e1f5ffeae1f9a9865f3 | [
"MIT"
] | 12 | 2018-09-19T14:02:09.000Z | 2020-01-27T16:20:14.000Z | bc4py/user/api/ep_system.py | kumacoinproject/bc4py | 6484d356096261d0d57e9e1f5ffeae1f9a9865f3 | [
"MIT"
] | 1 | 2020-03-19T16:57:30.000Z | 2020-03-19T16:57:30.000Z | bc4py/user/api/ep_system.py | namuyan/bc4py | 6484d356096261d0d57e9e1f5ffeae1f9a9865f3 | [
"MIT"
] | 6 | 2018-11-13T17:20:14.000Z | 2020-02-15T11:46:52.000Z | from bc4py import __version__, __chain_version__, __message__
from bc4py.config import C, V, P
from bc4py.chain.utils import GompertzCurve, DEFAULT_TARGET
from bc4py.chain.difficulty import get_bits_by_hash, get_bias_by_hash
from bc4py.database import obj
from bc4py.user.api.utils import error_response, local_address
f... | 34.471429 | 113 | 0.63448 | from bc4py import __version__, __chain_version__, __message__
from bc4py.config import C, V, P
from bc4py.chain.utils import GompertzCurve, DEFAULT_TARGET
from bc4py.chain.difficulty import get_bits_by_hash, get_bias_by_hash
from bc4py.database import obj
from bc4py.user.api.utils import error_response, local_address
f... | true | true |
f73d246dbd7ffe28388c48dca6f1393c92607979 | 835 | py | Python | schemas/emergency_contact.py | whiletrace/dwellinglybackend | e766b3d612b4c92fd337b82498ab8ef68bd95e1f | [
"MIT"
] | 15 | 2020-07-09T20:51:09.000Z | 2021-11-28T21:59:02.000Z | schemas/emergency_contact.py | codeforpdx/dwellinglybackend | 92fee6d19a68ae00750927b8700eaa7195b57668 | [
"MIT"
] | 148 | 2020-03-28T22:10:30.000Z | 2021-12-19T09:22:59.000Z | schemas/emergency_contact.py | whiletrace/dwellinglybackend | e766b3d612b4c92fd337b82498ab8ef68bd95e1f | [
"MIT"
] | 30 | 2020-03-12T02:31:27.000Z | 2021-07-29T02:40:36.000Z | from ma import ma
from models.emergency_contact import EmergencyContactModel
from marshmallow import fields, validates, ValidationError
from schemas.contact_number import ContactNumberSchema
class EmergencyContactSchema(ma.SQLAlchemyAutoSchema):
class Meta:
model = EmergencyContactModel
contact_numb... | 33.4 | 84 | 0.731737 | from ma import ma
from models.emergency_contact import EmergencyContactModel
from marshmallow import fields, validates, ValidationError
from schemas.contact_number import ContactNumberSchema
class EmergencyContactSchema(ma.SQLAlchemyAutoSchema):
class Meta:
model = EmergencyContactModel
contact_numb... | true | true |
f73d267f5f627caa7450779c2a8f2fceb1113360 | 1,664 | py | Python | ch04/gradient_2d.py | Yuansurex/deep_learning | b3597b414fb6fed2fbb7af8c8ac0b329c9e77417 | [
"MIT"
] | null | null | null | ch04/gradient_2d.py | Yuansurex/deep_learning | b3597b414fb6fed2fbb7af8c8ac0b329c9e77417 | [
"MIT"
] | null | null | null | ch04/gradient_2d.py | Yuansurex/deep_learning | b3597b414fb6fed2fbb7af8c8ac0b329c9e77417 | [
"MIT"
] | null | null | null | # coding: utf-8
# cf.http://d.hatena.ne.jp/white_wheels/20100327/p3
import numpy as np
import matplotlib.pylab as plt
from mpl_toolkits.mplot3d import Axes3D
def _numerical_gradient_no_batch(f, x):
h = 1e-4 # 0.0001
grad = np.zeros_like(x)
for idx in range(x.size):
tmp_val = x[idx]
x[idx]... | 24.115942 | 121 | 0.538462 |
import numpy as np
import matplotlib.pylab as plt
from mpl_toolkits.mplot3d import Axes3D
def _numerical_gradient_no_batch(f, x):
h = 1e-4
grad = np.zeros_like(x)
for idx in range(x.size):
tmp_val = x[idx]
x[idx] = float(tmp_val) + h
fxh1 = f(x)
x[idx] = tmp_v... | true | true |
f73d268b360ce2bfb09eb113e5b444ab9cac137f | 756 | py | Python | python-algorithm/leetcode/problem_1765.py | isudox/leetcode-solution | 60085e64deaf396a171367affc94b18114565c43 | [
"MIT"
] | 5 | 2017-06-11T09:19:34.000Z | 2019-01-16T16:58:31.000Z | python-algorithm/leetcode/problem_1765.py | isudox/leetcode-solution | 60085e64deaf396a171367affc94b18114565c43 | [
"MIT"
] | null | null | null | python-algorithm/leetcode/problem_1765.py | isudox/leetcode-solution | 60085e64deaf396a171367affc94b18114565c43 | [
"MIT"
] | 1 | 2019-03-02T15:50:43.000Z | 2019-03-02T15:50:43.000Z | """1765. Map of Highest Peak
https://leetcode.com/problems/map-of-highest-peak/
"""
from typing import List
class Solution:
def highest_peak(self, is_water: List[List[int]]) -> List[List[int]]:
m, n = len(is_water), len(is_water[0])
ans = [[-1] * n for _ in range(m)]
q = []
for i i... | 31.5 | 73 | 0.419312 | from typing import List
class Solution:
def highest_peak(self, is_water: List[List[int]]) -> List[List[int]]:
m, n = len(is_water), len(is_water[0])
ans = [[-1] * n for _ in range(m)]
q = []
for i in range(m):
for j in range(n):
if is_water[i][j]:
... | true | true |
f73d2b3339e86cb727a6a149211b3c8ff0e9dfcb | 621 | py | Python | divide.py | rharyadi/cryptophrenia | 35fa4b0e4c24079909d73c11ee2fd5398a1ba931 | [
"WTFPL"
] | null | null | null | divide.py | rharyadi/cryptophrenia | 35fa4b0e4c24079909d73c11ee2fd5398a1ba931 | [
"WTFPL"
] | null | null | null | divide.py | rharyadi/cryptophrenia | 35fa4b0e4c24079909d73c11ee2fd5398a1ba931 | [
"WTFPL"
] | null | null | null | #!/usr/bin/env python3
"""
Dividing integer numbers and
returning list [q, r]. Which are quotient and remainder, respectively.
"""
from sys import argv
from errorhandler import zerodiv, inputerror
def divide(a,b):
try:
q = a // b
except ZeroDivisionError:
zerodiv("b")
r = a - b*q
retu... | 18.264706 | 70 | 0.542673 |
from sys import argv
from errorhandler import zerodiv, inputerror
def divide(a,b):
try:
q = a // b
except ZeroDivisionError:
zerodiv("b")
r = a - b*q
return [q,r]
if __name__ == "__main__":
if len(argv) != 3:
inputerror(2)
try:
a, b = int(argv[1]), int(argv[2... | true | true |
f73d2c35e2773ea1a9629cb3506e18df9ed0bb46 | 464 | py | Python | data/scripts/templates/object/tangible/lair/base/shared_poi_all_lair_warren_large_fog_mustard.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/lair/base/shared_poi_all_lair_warren_large_fog_mustard.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/lair/base/shared_poi_all_lair_warren_large_fog_mustard.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/lair/base/shared_poi_all_lair_warren_large_fog_mustard.iff"
result.... | 27.294118 | 95 | 0.734914 | true | true | |
f73d2d574ee01a343eb3a8f97c059592f8cd1389 | 4,004 | py | Python | doc/display/e-Paper-master/RaspberryPi_JetsonNano/python/examples/epd_7in5bc_test.py | bartoszp1992/Tacho2 | b8bf0928775c648b6191b7d90890d09bd87799f0 | [
"MIT"
] | null | null | null | doc/display/e-Paper-master/RaspberryPi_JetsonNano/python/examples/epd_7in5bc_test.py | bartoszp1992/Tacho2 | b8bf0928775c648b6191b7d90890d09bd87799f0 | [
"MIT"
] | null | null | null | doc/display/e-Paper-master/RaspberryPi_JetsonNano/python/examples/epd_7in5bc_test.py | bartoszp1992/Tacho2 | b8bf0928775c648b6191b7d90890d09bd87799f0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding:utf-8 -*-
import sys
import os
picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic')
libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib')
if os.path.exists(libdir):
sys.path.append(libdir)
import logging
from ... | 37.773585 | 102 | 0.633367 |
import sys
import os
picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic')
libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib')
if os.path.exists(libdir):
sys.path.append(libdir)
import logging
from waveshare_epd import epd7in5bc
import t... | true | true |
f73d2e33146abf68afe3b33d48590d307b789078 | 972 | py | Python | app/config.py | ryomahan/read-tracardi-api | d0a012fb097ca81daf046b314000301eb54bfad8 | [
"MIT"
] | null | null | null | app/config.py | ryomahan/read-tracardi-api | d0a012fb097ca81daf046b314000301eb54bfad8 | [
"MIT"
] | null | null | null | app/config.py | ryomahan/read-tracardi-api | d0a012fb097ca81daf046b314000301eb54bfad8 | [
"MIT"
] | null | null | null | import os
class ServerConfig:
def __init__(self, env):
self.update_plugins_on_start_up = env[
'UPDATE_PLUGINS_ON_STARTUP'] if 'UPDATE_PLUGINS_ON_STARTUP' in env else True
self.make_slower_responses = float(
env['DEBUG_MAKE_SLOWER_RESPONSES']) if 'DEBUG_MAKE_SLOWER_RESPONSES... | 51.157895 | 107 | 0.709877 | import os
class ServerConfig:
def __init__(self, env):
self.update_plugins_on_start_up = env[
'UPDATE_PLUGINS_ON_STARTUP'] if 'UPDATE_PLUGINS_ON_STARTUP' in env else True
self.make_slower_responses = float(
env['DEBUG_MAKE_SLOWER_RESPONSES']) if 'DEBUG_MAKE_SLOWER_RESPONSES... | true | true |
f73d2e58f295701cf73dc09621f6476763b761f2 | 8,240 | py | Python | luna16/src/candidates.py | syagev/kaggle_dsb | 4927f9dee59092f513cbdc02cfc5954c4fb5e7eb | [
"Apache-2.0"
] | 9 | 2017-04-24T02:37:22.000Z | 2022-03-04T11:10:09.000Z | luna16/src/candidates.py | syagev/kaggle_dsb | 4927f9dee59092f513cbdc02cfc5954c4fb5e7eb | [
"Apache-2.0"
] | 1 | 2019-03-30T18:16:30.000Z | 2019-03-30T18:16:30.000Z | luna16/src/candidates.py | syagev/kaggle_dsb | 4927f9dee59092f513cbdc02cfc5954c4fb5e7eb | [
"Apache-2.0"
] | 8 | 2017-05-28T11:15:41.000Z | 2022-03-04T11:10:12.000Z | from __future__ import division
import numpy as np
from scipy.spatial.distance import pdist, squareform
from scipy.sparse.csgraph import connected_components
import pandas as pd
from tqdm import tqdm
import blob
import pickle
import glob
import os
import sys
import scipy.misc
from skimage.io import imread
from skimage ... | 31.450382 | 124 | 0.641383 | from __future__ import division
import numpy as np
from scipy.spatial.distance import pdist, squareform
from scipy.sparse.csgraph import connected_components
import pandas as pd
from tqdm import tqdm
import blob
import pickle
import glob
import os
import sys
import scipy.misc
from skimage.io import imread
from skimage ... | true | true |
f73d2f3b56ee16c0c4343aebabe529cb0d21a8aa | 2,328 | py | Python | code/ARAX/NodeSynonymizer/dump_kg2_equivalencies.py | finnagin/RTX | 698fab0d5ac507e92b5190878922f9fa5b72d9a7 | [
"MIT"
] | null | null | null | code/ARAX/NodeSynonymizer/dump_kg2_equivalencies.py | finnagin/RTX | 698fab0d5ac507e92b5190878922f9fa5b72d9a7 | [
"MIT"
] | null | null | null | code/ARAX/NodeSynonymizer/dump_kg2_equivalencies.py | finnagin/RTX | 698fab0d5ac507e92b5190878922f9fa5b72d9a7 | [
"MIT"
] | null | null | null | #!/bin/env python3
"""
This script creates a TSV of node pairs linked by an 'equivalent_to'/'same_as' relationship in KG2. The TSV file is
created in the same directory the script is run from. Example of rows in the output file:
UMLS:C0027358 UMLS:C0014563
UMLS:C0878440 UMLS:C0014563
Usage: python dump_kg2_equivalencie... | 36.375 | 115 | 0.695017 |
import csv
import os
import sys
import traceback
from typing import List, Dict
from neo4j import GraphDatabase
sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/../../")
from RTXConfiguration import RTXConfiguration
def _run_cypher_query(cypher_query: str, kg="KG2") -> List[Dict[str, any]]:
r... | true | true |
f73d2f519490cf42ec8e9c420ca124f654b085c8 | 3,337 | py | Python | sponsor-challenges/csit/part1 source/server2.py | wongwaituck/crossctf-2017-finals-public | bb180bcb3fdb559b7d7040fbe01c4fca98322f11 | [
"MIT"
] | 6 | 2017-06-26T15:07:19.000Z | 2018-10-09T20:03:27.000Z | sponsor-challenges/csit/part1 source/server2.py | wongwaituck/crossctf-2017-finals-public | bb180bcb3fdb559b7d7040fbe01c4fca98322f11 | [
"MIT"
] | null | null | null | sponsor-challenges/csit/part1 source/server2.py | wongwaituck/crossctf-2017-finals-public | bb180bcb3fdb559b7d7040fbe01c4fca98322f11 | [
"MIT"
] | 1 | 2018-08-18T00:49:02.000Z | 2018-08-18T00:49:02.000Z | import socket
import threading
import SocketServer
import crypto
import time
import binascii
from opcode import opcode as opcode_enm
class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):
def handle(self):
while True:
data = self.request.recv(1024)
cur_thread = threading.current_thread()
pr... | 25.090226 | 97 | 0.696734 | import socket
import threading
import SocketServer
import crypto
import time
import binascii
from opcode import opcode as opcode_enm
class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):
def handle(self):
while True:
data = self.request.recv(1024)
cur_thread = threading.current_thread()
pr... | false | true |
f73d3014ce3deda6465ef36663afe41548aa8143 | 1,822 | py | Python | tests/test_diffeq/test_odefilter/test_odefilter_cases.py | fxbriol/probnum | 7e0e94cf9146aaa2b730b02c6d75a022cd629b5c | [
"MIT"
] | null | null | null | tests/test_diffeq/test_odefilter/test_odefilter_cases.py | fxbriol/probnum | 7e0e94cf9146aaa2b730b02c6d75a022cd629b5c | [
"MIT"
] | null | null | null | tests/test_diffeq/test_odefilter/test_odefilter_cases.py | fxbriol/probnum | 7e0e94cf9146aaa2b730b02c6d75a022cd629b5c | [
"MIT"
] | null | null | null | """Test-cases for ODE filters."""
import pytest_cases
from probnum import diffeq, randprocs
import probnum.problems.zoo.diffeq as diffeq_zoo
# logistic.rhs is implemented backend-agnostic,
# thus it works for both numpy and jax
@pytest_cases.case(tags=("numpy", "jax"))
def problem_logistic():
return diffeq_zoo... | 23.063291 | 75 | 0.763996 |
import pytest_cases
from probnum import diffeq, randprocs
import probnum.problems.zoo.diffeq as diffeq_zoo
@pytest_cases.case(tags=("numpy", "jax"))
def problem_logistic():
return diffeq_zoo.logistic()
def steprule_constant():
return diffeq.stepsize.ConstantSteps(0.5)
def steprule_adaptive():
ret... | true | true |
f73d305b487bdcf6bdafdf47ab2a0f5839a18a9e | 91 | py | Python | pardakht/apps.py | riozo-h/django-pardakht | 8ec4455440926d05dd971ef571f11c1ef974fe4f | [
"MIT"
] | 10 | 2018-04-03T07:37:52.000Z | 2019-07-19T21:22:16.000Z | pardakht/apps.py | riozo-h/django-pardakht | 8ec4455440926d05dd971ef571f11c1ef974fe4f | [
"MIT"
] | 4 | 2018-05-26T08:28:41.000Z | 2019-10-26T01:30:00.000Z | pardakht/apps.py | riozo-h/django-pardakht | 8ec4455440926d05dd971ef571f11c1ef974fe4f | [
"MIT"
] | 7 | 2018-04-24T03:14:58.000Z | 2019-12-15T19:12:16.000Z | from django.apps import AppConfig
class PardakhtConfig(AppConfig):
name = 'pardakht'
| 15.166667 | 33 | 0.758242 | from django.apps import AppConfig
class PardakhtConfig(AppConfig):
name = 'pardakht'
| true | true |
f73d311168e8bb8d2be3cc630c2a8d9ae4b33f82 | 3,875 | py | Python | troposphere/licensemanager.py | filipepmo/troposphere | b1590f58ed8cc86ba18a19ed93fc9380d6f7306b | [
"BSD-2-Clause"
] | null | null | null | troposphere/licensemanager.py | filipepmo/troposphere | b1590f58ed8cc86ba18a19ed93fc9380d6f7306b | [
"BSD-2-Clause"
] | null | null | null | troposphere/licensemanager.py | filipepmo/troposphere | b1590f58ed8cc86ba18a19ed93fc9380d6f7306b | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2012-2022, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***
# Resource specification version: 51.0.0
from . import AWSObject, AWSProperty, PropsDictType
from .validators import boolean, integer
class Grant(... | 29.356061 | 164 | 0.653935 |
from . import AWSObject, AWSProperty, PropsDictType
from .validators import boolean, integer
class Grant(AWSObject):
resource_type = "AWS::LicenseManager::Grant"
props: PropsDictType = {
"AllowedOperations": ([str], False),
"GrantName": (str, False),
"HomeRegion": (str, Fals... | true | true |
f73d31b6906aad78335358a191cb79d885c8c887 | 27,081 | py | Python | pieces/protocol.py | SteBry/TDDE35-Building-a-BitTorrent-streaming-client | 35ad1707adcec9c7ef9df6900c3434380566828a | [
"Apache-2.0"
] | 1 | 2019-04-11T08:59:29.000Z | 2019-04-11T08:59:29.000Z | pieces/protocol.py | SteBry/TDDE35-Building-a-BitTorrent-streaming-client | 35ad1707adcec9c7ef9df6900c3434380566828a | [
"Apache-2.0"
] | null | null | null | pieces/protocol.py | SteBry/TDDE35-Building-a-BitTorrent-streaming-client | 35ad1707adcec9c7ef9df6900c3434380566828a | [
"Apache-2.0"
] | null | null | null | #
# pieces - An experimental BitTorrent client
#
# Copyright 2016 markus.eliasson@gmail.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
#
# ... | 35.446335 | 116 | 0.570991 |
import asyncio
import logging
import struct
from asyncio import Queue
from concurrent.futures import CancelledError
import datetime
import bitstring
REQUEST_SIZE = 2**14
HANDSHAKE_TIMEOUT = 4
class ProtocolError(BaseException):
pass
class PeerConnection:
def __init__(self, queue: ... | true | true |
f73d3204a303755adfb5db20409a06b93174a623 | 1,966 | py | Python | t/test_multiple_outputs.py | texttheater/produce | 202e3196daf7ac53c1998ac2ee9b0f8cbb1c6615 | [
"MIT"
] | 14 | 2015-03-04T12:40:25.000Z | 2021-07-07T04:06:09.000Z | t/test_multiple_outputs.py | texttheater/produce | 202e3196daf7ac53c1998ac2ee9b0f8cbb1c6615 | [
"MIT"
] | 43 | 2015-01-27T13:52:39.000Z | 2020-10-17T19:51:20.000Z | t/test_multiple_outputs.py | texttheater/produce | 202e3196daf7ac53c1998ac2ee9b0f8cbb1c6615 | [
"MIT"
] | 2 | 2015-11-23T08:59:07.000Z | 2019-04-17T13:04:49.000Z | import logging
import prodtest
class MultipleOutputsTest(prodtest.ProduceTestCase):
"""
Tests the handling of recipes with multiple outputs.
"""
def test_without(self):
"""
Without the outputs attribute, the recipe is run twice, once for each
target, thus two INFO messages are... | 39.32 | 92 | 0.591048 | import logging
import prodtest
class MultipleOutputsTest(prodtest.ProduceTestCase):
def test_without(self):
self.assertDirectoryContents(['produce.ini', 'Makefile'])
with self.assertLogs(logger='produce', level='INFO') as l:
self.produce('a.txt', 'b.txt', **{'-j': '3'})
self.a... | true | true |
f73d3257f62bc0ae7b535041cfd95569f3b0616a | 4,265 | py | Python | routines/pf/models/_sym.py | cmulvihill/mechdriver | 296cc3b4c154889c11470c7b82315b0382334b98 | [
"Apache-2.0"
] | null | null | null | routines/pf/models/_sym.py | cmulvihill/mechdriver | 296cc3b4c154889c11470c7b82315b0382334b98 | [
"Apache-2.0"
] | null | null | null | routines/pf/models/_sym.py | cmulvihill/mechdriver | 296cc3b4c154889c11470c7b82315b0382334b98 | [
"Apache-2.0"
] | null | null | null | """ Handle symmetry factor stuff
"""
import automol
from autofile import fs
from lib import structure
def symmetry_factor(pf_filesystems, pf_models, spc_dct_i, rotors,
frm_bnd_keys=(), brk_bnd_keys=()):
""" Calculate the symmetry factor for a species
Note: ignoring for saddle pts the ... | 34.674797 | 77 | 0.616882 |
import automol
from autofile import fs
from lib import structure
def symmetry_factor(pf_filesystems, pf_models, spc_dct_i, rotors,
frm_bnd_keys=(), brk_bnd_keys=()):
if 'sym_factor' in spc_dct_i:
sym_factor = spc_dct_i['sym_factor']
print(' - Reading symmetry number input by ... | true | true |
f73d327e2f83cfcb8714c4fa54d314b74ae3fd9f | 432 | py | Python | djangocms_versioning/test_utils/people/models.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | djangocms_versioning/test_utils/people/models.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | djangocms_versioning/test_utils/people/models.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
class Person(models.Model):
name = models.TextField()
def __str__(self):
return "{} ({})".format(self.name, self.pk)
class PersonContent(models.Model):
person = models.ForeignKey(Person, on_delete=models.CASCADE)
language = models.TextField()
text = models.T... | 20.571429 | 64 | 0.655093 | from django.db import models
class Person(models.Model):
name = models.TextField()
def __str__(self):
return "{} ({})".format(self.name, self.pk)
class PersonContent(models.Model):
person = models.ForeignKey(Person, on_delete=models.CASCADE)
language = models.TextField()
text = models.T... | true | true |
f73d349e984d5454ce11e084b531095d6331c012 | 206 | py | Python | solution/app/admin.py | itsnikhil/atlan-challenge | 41fc403f2156a5d1f182f58ce52458d4f04ec0c4 | [
"MIT"
] | null | null | null | solution/app/admin.py | itsnikhil/atlan-challenge | 41fc403f2156a5d1f182f58ce52458d4f04ec0c4 | [
"MIT"
] | null | null | null | solution/app/admin.py | itsnikhil/atlan-challenge | 41fc403f2156a5d1f182f58ce52458d4f04ec0c4 | [
"MIT"
] | null | null | null | from django.contrib import admin
from app.models import DataStore, GameSale
# Show files uploaded in django admin
admin.site.register(DataStore)
# Show record in django admin
admin.site.register(GameSale) | 25.75 | 42 | 0.815534 | from django.contrib import admin
from app.models import DataStore, GameSale
admin.site.register(DataStore)
admin.site.register(GameSale) | true | true |
f73d351428b1cb2945097f900a83553d32216fd3 | 2,240 | py | Python | backend/app/schemas/cars_search_query.py | BartlomiejRasztabiga/Rentally | ba70199d329895a5295ceddd0ecc4c61928890dd | [
"MIT"
] | 2 | 2021-01-11T23:24:29.000Z | 2021-01-12T09:55:58.000Z | backend/app/schemas/cars_search_query.py | BartlomiejRasztabiga/Rentally | ba70199d329895a5295ceddd0ecc4c61928890dd | [
"MIT"
] | null | null | null | backend/app/schemas/cars_search_query.py | BartlomiejRasztabiga/Rentally | ba70199d329895a5295ceddd0ecc4c61928890dd | [
"MIT"
] | null | null | null | import abc
from datetime import datetime
from typing import List, Optional
from pydantic import BaseModel
from sqlalchemy.sql.elements import BinaryExpression
from app.models import Car
from app.models.car import AcType, CarType, DriveType, FuelType, GearboxType
class RangeCriterion(BaseModel):
__metaclass__ = ... | 31.549296 | 83 | 0.674107 | import abc
from datetime import datetime
from typing import List, Optional
from pydantic import BaseModel
from sqlalchemy.sql.elements import BinaryExpression
from app.models import Car
from app.models.car import AcType, CarType, DriveType, FuelType, GearboxType
class RangeCriterion(BaseModel):
__metaclass__ = ... | true | true |
f73d36f0dfeeaff0a96d34b47f6c41f1dd0588cf | 143,997 | py | Python | src/genie/libs/parser/nxos/show_interface.py | psolarcz/genieparser | 811c197a1dab6a635e6dec145b99194648bf4ff4 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/nxos/show_interface.py | psolarcz/genieparser | 811c197a1dab6a635e6dec145b99194648bf4ff4 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/nxos/show_interface.py | psolarcz/genieparser | 811c197a1dab6a635e6dec145b99194648bf4ff4 | [
"Apache-2.0"
] | null | null | null | '''show_interface.py
NXOS parsers for the following show commands:
* show interface
* show vrf all interface
* show ip interface vrf all
* show ipv6 interface detail vrf all
* show interface switchport
* show ip interface brief
* show ip interface brief | vlan
* show interface brief
... | 43.635455 | 133 | 0.496503 |
import re
from genie.metaparser import MetaParser
from genie.metaparser.util.schemaengine import Schema, Any, Optional
from genie.libs.parser.utils.common import Common
class ShowInterfaceSchema(MetaParser):
schema = {
Any():
{Optional('descr... | true | true |
f73d37f0383eae749e39ec21857ae0e174a2118b | 266 | py | Python | Python/grading.py | mimseyedi/Kattis | a99ea2112544e89cc466feb7d81ffe6eb017f7e2 | [
"MIT"
] | null | null | null | Python/grading.py | mimseyedi/Kattis | a99ea2112544e89cc466feb7d81ffe6eb017f7e2 | [
"MIT"
] | null | null | null | Python/grading.py | mimseyedi/Kattis | a99ea2112544e89cc466feb7d81ffe6eb017f7e2 | [
"MIT"
] | null | null | null | a, b, c, d, e = map(int, input().split())
score = int(input())
if 100 >= score >= a:
print('A')
elif a > score >= b:
print('B')
elif b > score >= c:
print('C')
elif c > score >= d:
print('D')
elif d > score >= e:
print('E')
else:
print('F')
| 16.625 | 41 | 0.484962 | a, b, c, d, e = map(int, input().split())
score = int(input())
if 100 >= score >= a:
print('A')
elif a > score >= b:
print('B')
elif b > score >= c:
print('C')
elif c > score >= d:
print('D')
elif d > score >= e:
print('E')
else:
print('F')
| true | true |
f73d380cb15edd93a744b3cbc98bfa32b1a02445 | 20,643 | py | Python | wfs.py | B0und/WaifuFileSort | 377c2c73a1dc0eaf6c6fd709b41c2b85e2658cfd | [
"MIT"
] | 1 | 2021-09-16T22:35:45.000Z | 2021-09-16T22:35:45.000Z | wfs.py | B0und/WaifuFileSort | 377c2c73a1dc0eaf6c6fd709b41c2b85e2658cfd | [
"MIT"
] | null | null | null | wfs.py | B0und/WaifuFileSort | 377c2c73a1dc0eaf6c6fd709b41c2b85e2658cfd | [
"MIT"
] | 1 | 2021-09-16T22:35:46.000Z | 2021-09-16T22:35:46.000Z | # import convert_ui_and_qrc_files
import json
import os
import pathlib
import shutil
import sys
from functools import partial
from pprint import pprint
import imagehash
from PIL import Image
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QColor, QKeySequence, QPalette
fr... | 37.877064 | 98 | 0.614688 |
import json
import os
import pathlib
import shutil
import sys
from functools import partial
from pprint import pprint
import imagehash
from PIL import Image
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QColor, QKeySequence, QPalette
from PyQt5.QtWidgets import (QAbstr... | true | true |
f73d390476569b26a584abed301f23bccace7db5 | 4,340 | py | Python | helps/deap/deap-master/examples/ga/xkcd.py | GrimRanger/GeneticAlgorithm | 93fa476e82d610f8622276526baa269303a058e0 | [
"MIT"
] | 1 | 2019-03-21T15:32:19.000Z | 2019-03-21T15:32:19.000Z | helps/deap/deap-master/examples/ga/xkcd.py | GrimRanger/GeneticAlgorithm | 93fa476e82d610f8622276526baa269303a058e0 | [
"MIT"
] | null | null | null | helps/deap/deap-master/examples/ga/xkcd.py | GrimRanger/GeneticAlgorithm | 93fa476e82d610f8622276526baa269303a058e0 | [
"MIT"
] | null | null | null | # This file is part of DEAP.
#
# DEAP is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# DEAP is distributed ... | 37.73913 | 107 | 0.700461 |
import random
from operator import attrgetter
from collections import Counter
# attributes. Because we create a class that inherit from the Counter, the
# fitness attribute was not copied by the deepcopy.
del Counter.__reduce__
import numpy
from deap import algorithms
from deap import base
from deap i... | true | true |
f73d3af72113a5cab3585ebe6b786dc9ff9d06cd | 818 | py | Python | mher/common/tests/test_schedules.py | YangRui2015/Modular_HER | 77acca83d6849d140ab893ec1b472b71e1da08d4 | [
"MIT"
] | 13 | 2020-10-31T15:01:44.000Z | 2021-11-30T06:51:15.000Z | mher/common/tests/test_schedules.py | YangRui2015/Modular_HER | 77acca83d6849d140ab893ec1b472b71e1da08d4 | [
"MIT"
] | 1 | 2021-06-22T14:25:07.000Z | 2021-06-23T11:47:37.000Z | mher/common/tests/test_schedules.py | YangRui2015/Modular_HER | 77acca83d6849d140ab893ec1b472b71e1da08d4 | [
"MIT"
] | 2 | 2020-11-24T03:26:32.000Z | 2021-05-14T01:20:57.000Z | import numpy as np
from mher.common.schedules import ConstantSchedule, PiecewiseSchedule
def test_piecewise_schedule():
ps = PiecewiseSchedule([(-5, 100), (5, 200), (10, 50), (100, 50), (200, -50)], outside_value=500)
assert np.isclose(ps.value(-10), 500)
assert np.isclose(ps.value(0), 150)
assert n... | 30.296296 | 101 | 0.661369 | import numpy as np
from mher.common.schedules import ConstantSchedule, PiecewiseSchedule
def test_piecewise_schedule():
ps = PiecewiseSchedule([(-5, 100), (5, 200), (10, 50), (100, 50), (200, -50)], outside_value=500)
assert np.isclose(ps.value(-10), 500)
assert np.isclose(ps.value(0), 150)
assert n... | true | true |
f73d3bccaa66ceecd5d19e2515f4373f729193e3 | 18,073 | py | Python | homeassistant/components/here_travel_time/sensor.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 4 | 2020-07-29T17:47:10.000Z | 2020-09-16T13:39:13.000Z | homeassistant/components/here_travel_time/sensor.py | domwillcode/home-assistant | f170c80bea70c939c098b5c88320a1c789858958 | [
"Apache-2.0"
] | 6 | 2020-11-08T19:40:10.000Z | 2022-03-01T11:11:07.000Z | homeassistant/components/here_travel_time/sensor.py | klauern/home-assistant-core | c18ba6aec0627e6afb6442c678edb5ff2bb17db6 | [
"Apache-2.0"
] | 5 | 2020-03-29T00:29:13.000Z | 2021-09-06T20:58:40.000Z | """Support for HERE travel time sensors."""
from datetime import datetime, timedelta
import logging
from typing import Callable, Dict, Optional, Union
import herepy
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
ATTR_ATTRIBUTION,
ATTR_LAT... | 35.646943 | 139 | 0.655176 | from datetime import datetime, timedelta
import logging
from typing import Callable, Dict, Optional, Union
import herepy
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
ATTR_ATTRIBUTION,
ATTR_LATITUDE,
ATTR_LONGITUDE,
ATTR_MODE,
... | true | true |
f73d3dd584cecf1cb71ceacab21635e3578dcecf | 14,681 | py | Python | tensorflow_model_analysis/evaluators/aggregate.py | BioGeek/model-analysis | 03db02c21e21b092bc409c8bf263174b90c4e2ae | [
"Apache-2.0"
] | null | null | null | tensorflow_model_analysis/evaluators/aggregate.py | BioGeek/model-analysis | 03db02c21e21b092bc409c8bf263174b90c4e2ae | [
"Apache-2.0"
] | null | null | null | tensorflow_model_analysis/evaluators/aggregate.py | BioGeek/model-analysis | 03db02c21e21b092bc409c8bf263174b90c4e2ae | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 43.052786 | 98 | 0.727539 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from typing import Any, Dict, Generator, Iterable, List, Optional, Text, Tuple, Union
import apache_beam as beam
import numpy as np
from tensorflow_model_analysis import constants
from tensorf... | true | true |
f73d3e24aacb7656b04f22a6380b4de22def67fb | 8,167 | py | Python | audiophiler/__init__.py | nfatkhiyev/audiophiler | 527d975bdd06604da1a9b3212adcab749c116253 | [
"MIT"
] | null | null | null | audiophiler/__init__.py | nfatkhiyev/audiophiler | 527d975bdd06604da1a9b3212adcab749c116253 | [
"MIT"
] | null | null | null | audiophiler/__init__.py | nfatkhiyev/audiophiler | 527d975bdd06604da1a9b3212adcab749c116253 | [
"MIT"
] | 1 | 2020-02-11T17:52:48.000Z | 2020-02-11T17:52:48.000Z | # File: __init__.py
# Audiophiler main flask functions
import hashlib
import os
import random
import subprocess
import json
import requests
import flask_migrate
from flask import Flask, render_template, request, jsonify, redirect
from flask_pyoidc.provider_configuration import *
from flask_pyoidc.flask_pyoidc import O... | 33.064777 | 86 | 0.691196 |
import hashlib
import os
import random
import subprocess
import json
import requests
import flask_migrate
from flask import Flask, render_template, request, jsonify, redirect
from flask_pyoidc.provider_configuration import *
from flask_pyoidc.flask_pyoidc import OIDCAuthentication
from flask_sqlalchemy import SQLAlc... | true | true |
f73d3e282ad15291ac2386ed566f08d7a326f2dd | 6,522 | py | Python | rubik_solver/Solver/CFOP/F2LSolver.py | kazi92/rubikSolver | d5c7e273ca982ee3ccf5c9b43c522954e232afd4 | [
"MIT"
] | 46 | 2017-04-06T09:55:48.000Z | 2022-03-08T13:55:27.000Z | rubik_solver/Solver/CFOP/F2LSolver.py | kazi92/rubikSolver | d5c7e273ca982ee3ccf5c9b43c522954e232afd4 | [
"MIT"
] | 10 | 2018-07-14T03:37:41.000Z | 2022-03-11T14:05:31.000Z | rubik_solver/Solver/CFOP/F2LSolver.py | kazi92/rubikSolver | d5c7e273ca982ee3ccf5c9b43c522954e232afd4 | [
"MIT"
] | 26 | 2017-10-23T21:50:27.000Z | 2021-12-16T06:34:41.000Z | from rubik_solver.Move import Move
from .. import Solver
from ..Beginner.WhiteFaceSolver import WhiteFaceSolver
class F2LSolver(Solver):
STEPS = {
'FUR': {
'UB': ["R", "U", "R'"],
'FU': ["U'", "F'", "U", "F"],
'FR': ["U", "F'", "U", "F", "U", "F'", "U2", "F"],
... | 46.255319 | 106 | 0.364765 | from rubik_solver.Move import Move
from .. import Solver
from ..Beginner.WhiteFaceSolver import WhiteFaceSolver
class F2LSolver(Solver):
STEPS = {
'FUR': {
'UB': ["R", "U", "R'"],
'FU': ["U'", "F'", "U", "F"],
'FR': ["U", "F'", "U", "F", "U", "F'", "U2", "F"],
... | true | true |
f73d3e7a775663a6c877c5359c98a292147c2678 | 2,169 | py | Python | ctr/model.py | Ottovonxu/islide | 5ee9954e378f0b5a0722292351cb3cc74b95c1b3 | [
"Apache-2.0"
] | null | null | null | ctr/model.py | Ottovonxu/islide | 5ee9954e378f0b5a0722292351cb3cc74b95c1b3 | [
"Apache-2.0"
] | null | null | null | ctr/model.py | Ottovonxu/islide | 5ee9954e378f0b5a0722292351cb3cc74b95c1b3 | [
"Apache-2.0"
] | null | null | null | import torch
from torch import nn
class FCN(nn.Module):
def __init__(self, dimension, num_layers=3, num_class=2):
super(FCN, self).__init__()
self.first_layer = nn.Linear(dimension, 1000)
self.first_layer_relu = nn.ReLU()
mid_layers = []
for i in range(num_layers - 2):
... | 28.539474 | 61 | 0.591978 | import torch
from torch import nn
class FCN(nn.Module):
def __init__(self, dimension, num_layers=3, num_class=2):
super(FCN, self).__init__()
self.first_layer = nn.Linear(dimension, 1000)
self.first_layer_relu = nn.ReLU()
mid_layers = []
for i in range(num_layers - 2):
... | true | true |
f73d3f367af7a111510038a37e6323f994ad0856 | 4,279 | py | Python | plenum/test/view_change/test_re_order_pre_prepares_for_lagged.py | IDunion/indy-plenum | 406afdeca1630be688f803a3cba15115faa20e2b | [
"Apache-2.0"
] | 148 | 2017-07-11T19:05:25.000Z | 2022-03-16T21:31:20.000Z | plenum/test/view_change/test_re_order_pre_prepares_for_lagged.py | IDunion/indy-plenum | 406afdeca1630be688f803a3cba15115faa20e2b | [
"Apache-2.0"
] | 561 | 2017-06-29T17:59:56.000Z | 2022-03-09T15:47:14.000Z | plenum/test/view_change/test_re_order_pre_prepares_for_lagged.py | IDunion/indy-plenum | 406afdeca1630be688f803a3cba15115faa20e2b | [
"Apache-2.0"
] | 378 | 2017-06-29T17:45:27.000Z | 2022-03-26T07:27:59.000Z | import pytest
from plenum.common.constants import DOMAIN_LEDGER_ID, PREPREPARE, PREPARE, COMMIT
from plenum.common.messages.internal_messages import ViewChangeStarted, NewViewCheckpointsApplied
from plenum.common.messages.node_messages import NewView
from plenum.server.consensus.utils import preprepare_to_batch_id
fro... | 56.302632 | 133 | 0.691283 | import pytest
from plenum.common.constants import DOMAIN_LEDGER_ID, PREPREPARE, PREPARE, COMMIT
from plenum.common.messages.internal_messages import ViewChangeStarted, NewViewCheckpointsApplied
from plenum.common.messages.node_messages import NewView
from plenum.server.consensus.utils import preprepare_to_batch_id
fro... | true | true |
f73d3f47ee4db208101959585a2c6ec037551192 | 321 | py | Python | scripts/burn_token.py | lana-shanghai/hodlthevoid | 6eb02d5ce615de36d2c0c5d0140f8b95f96cbd41 | [
"Apache-2.0"
] | null | null | null | scripts/burn_token.py | lana-shanghai/hodlthevoid | 6eb02d5ce615de36d2c0c5d0140f8b95f96cbd41 | [
"Apache-2.0"
] | null | null | null | scripts/burn_token.py | lana-shanghai/hodlthevoid | 6eb02d5ce615de36d2c0c5d0140f8b95f96cbd41 | [
"Apache-2.0"
] | null | null | null | from brownie import Dogeviathan, accounts, config
def main():
dev = accounts.add(config["wallets"]["from_key"])
attacker = accounts.add(config["wallets"]["from_attacker_key"])
dogeviathan = Dogeviathan[len(Dogeviathan) - 1]
dogeviathan.burn(0, {"from": dev})
#dogeviathan.burn(1, {"from": attacker}... | 35.666667 | 67 | 0.688474 | from brownie import Dogeviathan, accounts, config
def main():
dev = accounts.add(config["wallets"]["from_key"])
attacker = accounts.add(config["wallets"]["from_attacker_key"])
dogeviathan = Dogeviathan[len(Dogeviathan) - 1]
dogeviathan.burn(0, {"from": dev})
| true | true |
f73d3f84737b19db6eef7863ab1ba5ec455b8d46 | 40,043 | py | Python | ma_option_vol/update_excel_workbooks.py | ytmimi/Thesis2017 | 2133ec067f1c2972736d4bbeb83f88a62a591332 | [
"MIT"
] | null | null | null | ma_option_vol/update_excel_workbooks.py | ytmimi/Thesis2017 | 2133ec067f1c2972736d4bbeb83f88a62a591332 | [
"MIT"
] | null | null | null | ma_option_vol/update_excel_workbooks.py | ytmimi/Thesis2017 | 2133ec067f1c2972736d4bbeb83f88a62a591332 | [
"MIT"
] | null | null | null | import warnings
import openpyxl
import os
import datetime as dt
import re
from statistics import mean, stdev
from math import ceil, floor
import add_bloomberg_excel_functions as abxl
from CONSTANTS import ( OPTION_DESCRIPTION_PATTERN_INT, OPTION_DESCRIPTION_PATTERN_FLOAT, OPTION_SHEET_PATTERN_INT, OPTION_SHEET_PATTERN_... | 51.535393 | 258 | 0.676348 | import warnings
import openpyxl
import os
import datetime as dt
import re
from statistics import mean, stdev
from math import ceil, floor
import add_bloomberg_excel_functions as abxl
from CONSTANTS import ( OPTION_DESCRIPTION_PATTERN_INT, OPTION_DESCRIPTION_PATTERN_FLOAT, OPTION_SHEET_PATTERN_INT, OPTION_SHEET_PATTERN_... | true | true |
f73d4018da427d7cf2e97adebdc875ce2b8e8f52 | 3,320 | py | Python | passbook/sources/ldap/migrations/0001_initial.py | fossabot/passbook | cba17f6659404445ac3025f11657d89368cc8b4f | [
"MIT"
] | null | null | null | passbook/sources/ldap/migrations/0001_initial.py | fossabot/passbook | cba17f6659404445ac3025f11657d89368cc8b4f | [
"MIT"
] | null | null | null | passbook/sources/ldap/migrations/0001_initial.py | fossabot/passbook | cba17f6659404445ac3025f11657d89368cc8b4f | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2019-10-08 20:43
import django.core.validators
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
("passbook_core", "0001_initial"),
]
operations = [
migrati... | 34.226804 | 75 | 0.413253 |
import django.core.validators
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
("passbook_core", "0001_initial"),
]
operations = [
migrations.CreateModel(
name="LDAPProperty... | true | true |
f73d404d8e57e68853eb007001c653562b62b002 | 102,721 | py | Python | packages/python/plotly/plotly/graph_objs/_funnel.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/_funnel.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/graph_objs/_funnel.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Funnel(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "funnel"
_valid_props = {
"alignmentgroup",
"cliponaxis",
"connector",
"c... | 35.592862 | 140 | 0.565084 | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Funnel(_BaseTraceType):
_parent_path_str = ""
_path_str = "funnel"
_valid_props = {
"alignmentgroup",
"cliponaxis",
"connector",
"constraintext",
"customdata",
... | true | true |
f73d40bb82c0208472099724a0f1c8fc32ee555e | 259 | py | Python | invenio_users_resources/records/mappings/v6/__init__.py | max-moser/invenio-users-resources | fcba667d4fcbf5df9cd0dcbd8118c041a1add6e7 | [
"MIT"
] | null | null | null | invenio_users_resources/records/mappings/v6/__init__.py | max-moser/invenio-users-resources | fcba667d4fcbf5df9cd0dcbd8118c041a1add6e7 | [
"MIT"
] | 7 | 2022-01-27T09:39:58.000Z | 2022-03-29T11:33:52.000Z | invenio_users_resources/records/mappings/v6/__init__.py | max-moser/invenio-users-resources | fcba667d4fcbf5df9cd0dcbd8118c041a1add6e7 | [
"MIT"
] | 4 | 2022-01-27T10:42:57.000Z | 2022-02-16T11:53:16.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2022 TU Wien.
#
# Invenio-Users-Resources is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
"""Elasticsearch version 6 mappings."""
| 25.9 | 74 | 0.706564 | true | true | |
f73d413ddc2041b0e4a587441969c56b3d8ee08c | 633 | py | Python | arvinddhindsa/manage.py | Dhindsa91/Django-blog | 072dfecdc13839370aca9fc5a062eb8f9eea17b5 | [
"bzip2-1.0.6"
] | null | null | null | arvinddhindsa/manage.py | Dhindsa91/Django-blog | 072dfecdc13839370aca9fc5a062eb8f9eea17b5 | [
"bzip2-1.0.6"
] | null | null | null | arvinddhindsa/manage.py | Dhindsa91/Django-blog | 072dfecdc13839370aca9fc5a062eb8f9eea17b5 | [
"bzip2-1.0.6"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'arvinddhindsa.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ... | 28.772727 | 77 | 0.685624 |
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'arvinddhindsa.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "... | true | true |
f73d4212a3c0e401c47f044073a77f35f5bcc306 | 1,484 | py | Python | robo/maximizers/differential_evolution.py | lebrice/RoBO | 0cb58a1622d3a540f7714b239f0cedf048b6fd9f | [
"BSD-3-Clause"
] | 455 | 2015-04-02T06:12:13.000Z | 2022-02-28T10:54:29.000Z | robo/maximizers/differential_evolution.py | lebrice/RoBO | 0cb58a1622d3a540f7714b239f0cedf048b6fd9f | [
"BSD-3-Clause"
] | 66 | 2015-04-07T15:20:55.000Z | 2021-06-04T16:40:46.000Z | robo/maximizers/differential_evolution.py | lebrice/RoBO | 0cb58a1622d3a540f7714b239f0cedf048b6fd9f | [
"BSD-3-Clause"
] | 188 | 2015-04-14T09:42:34.000Z | 2022-03-31T21:04:53.000Z | import sys
import numpy as np
import scipy as sp
from robo.maximizers.base_maximizer import BaseMaximizer
class DifferentialEvolution(BaseMaximizer):
def __init__(self, objective_function, lower, upper, n_iters=20, rng=None):
"""
Parameters
----------
objective_function: acquisi... | 28.538462 | 100 | 0.59097 | import sys
import numpy as np
import scipy as sp
from robo.maximizers.base_maximizer import BaseMaximizer
class DifferentialEvolution(BaseMaximizer):
def __init__(self, objective_function, lower, upper, n_iters=20, rng=None):
self.n_iters = n_iters
super(DifferentialEvolution, self).__init__(obj... | true | true |
f73d42c3790ee20048eca8b989b817adefc2d236 | 622 | py | Python | debug.py | yemaozi88/Intelligibility-MetricGAN | 7aa080aa78f85ada2d85dd5415c3c593fe207891 | [
"BSD-3-Clause"
] | 41 | 2020-04-03T04:37:21.000Z | 2022-02-11T13:46:47.000Z | debug.py | calculusoflambdas/Intelligibility-MetricGAN | 883aa9b022af29a517fb50e860933942367ccf07 | [
"BSD-3-Clause"
] | 4 | 2020-04-06T07:19:56.000Z | 2021-02-04T09:46:11.000Z | debug.py | calculusoflambdas/Intelligibility-MetricGAN | 883aa9b022af29a517fb50e860933942367ccf07 | [
"BSD-3-Clause"
] | 12 | 2020-04-03T15:09:46.000Z | 2021-09-02T10:51:01.000Z | from audio_util import *
from dataloader import *
noise_path = '/home/smg/haoyuli/SiibGAN/database/Train/Noise/'
clean_path = '/home/smg/haoyuli/SiibGAN/database/Train/Clean/'
gen_file_list = get_filepaths('/home/smg/haoyuli/SiibGAN/database/Train/Clean/')
genloader = create_dataloader(gen_file_list,noise_path)
x = ... | 29.619048 | 88 | 0.782958 | from audio_util import *
from dataloader import *
noise_path = '/home/smg/haoyuli/SiibGAN/database/Train/Noise/'
clean_path = '/home/smg/haoyuli/SiibGAN/database/Train/Clean/'
gen_file_list = get_filepaths('/home/smg/haoyuli/SiibGAN/database/Train/Clean/')
genloader = create_dataloader(gen_file_list,noise_path)
x = ... | true | true |
f73d43091f3eaf436c6022660f2def62abd16e3e | 48,352 | py | Python | pyqtgraph/multiprocess/remoteproxy.py | pbmanis/pyqtgraph | 3558216be2b50d6b0069c82e51e5a048dad34c73 | [
"MIT"
] | 150 | 2018-03-27T16:45:37.000Z | 2022-03-30T03:47:56.000Z | pyqtgraph/multiprocess/remoteproxy.py | Jhongesell/pyqtgraph | 229f650adfd04053213fe6567d6308a4751a349b | [
"MIT"
] | 34 | 2018-09-28T00:01:59.000Z | 2022-03-21T15:40:02.000Z | pyqtgraph/multiprocess/remoteproxy.py | Jhongesell/pyqtgraph | 229f650adfd04053213fe6567d6308a4751a349b | [
"MIT"
] | 40 | 2018-04-06T19:42:21.000Z | 2022-01-11T00:34:17.000Z | import os, time, sys, traceback, weakref
import numpy as np
import threading
try:
import __builtin__ as builtins
import cPickle as pickle
except ImportError:
import builtins
import pickle
# color printing for debugging
from ..util import cprint
class ClosedError(Exception):
"""Raised when an event... | 42.865248 | 132 | 0.544197 | import os, time, sys, traceback, weakref
import numpy as np
import threading
try:
import __builtin__ as builtins
import cPickle as pickle
except ImportError:
import builtins
import pickle
from ..util import cprint
class ClosedError(Exception):
pass
class NoResultError(Exception):
pass
... | true | true |
f73d453812bcfc25c8bbd44be64d84d895cd81c9 | 76 | py | Python | main.py | sebanie15/simple_clinic | 4dc942b0549ee6397a0e89dd7aa03eb8580b4a5a | [
"MIT"
] | null | null | null | main.py | sebanie15/simple_clinic | 4dc942b0549ee6397a0e89dd7aa03eb8580b4a5a | [
"MIT"
] | null | null | null | main.py | sebanie15/simple_clinic | 4dc942b0549ee6397a0e89dd7aa03eb8580b4a5a | [
"MIT"
] | null | null | null | # !/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: sebanie15
"""
| 10.857143 | 23 | 0.539474 | true | true | |
f73d45577cc68e12b4eeb5c8da70320946d43fce | 7,327 | py | Python | __init__.py | APRAND/mission | a00532ef1fb6bd1cfc6bbfe1a1ebe3b5a32fead4 | [
"MIT"
] | null | null | null | __init__.py | APRAND/mission | a00532ef1fb6bd1cfc6bbfe1a1ebe3b5a32fead4 | [
"MIT"
] | null | null | null | __init__.py | APRAND/mission | a00532ef1fb6bd1cfc6bbfe1a1ebe3b5a32fead4 | [
"MIT"
] | null | null | null | import os, inspect
from lib import navpy
from util import transformations as tr
from util import SRTM, common, file_tools, mavlink_meta
from shapely.geometry import LineString
from shapely import affinity
# Samuel Dudley
# September 2018
# Mission planning tool for mavlink enabled vehicles
# Setup logging
# gene... | 43.1 | 168 | 0.538965 | import os, inspect
from lib import navpy
from util import transformations as tr
from util import SRTM, common, file_tools, mavlink_meta
from shapely.geometry import LineString
from shapely import affinity
class BaseMission(object):
def __init__(self, missionID, takeoffAlt, takoffLoiterTime, outputDir = ... | true | true |
f73d45bb1ac18fafbdb84aa1438a166e3cb7f30c | 3,727 | py | Python | src/GameManager/gui/subscreen.py | maccam912/Oddyssey | a9d1eca9ea1dfabd9873eb842eae03f2ed83d405 | [
"MIT"
] | null | null | null | src/GameManager/gui/subscreen.py | maccam912/Oddyssey | a9d1eca9ea1dfabd9873eb842eae03f2ed83d405 | [
"MIT"
] | 11 | 2017-03-12T13:59:21.000Z | 2017-03-24T04:42:16.000Z | src/GameManager/gui/subscreen.py | maccam912/Oddyssey | a9d1eca9ea1dfabd9873eb842eae03f2ed83d405 | [
"MIT"
] | null | null | null | import numpy as np
class SubScreen():
def __init__(self, x, y, width, height, curses):
self.x = x
self.y = y
self.width = width
self.height = height
self.curses = curses
def put_char(self, x, y, char=' ', foreground='white', background='transparent'):
if x <... | 43.337209 | 176 | 0.611215 | import numpy as np
class SubScreen():
def __init__(self, x, y, width, height, curses):
self.x = x
self.y = y
self.width = width
self.height = height
self.curses = curses
def put_char(self, x, y, char=' ', foreground='white', background='transparent'):
if x <... | true | true |
f73d464c30b19ff9737340f814e7fc6023b698ec | 13,597 | py | Python | src/oci/database/models/launch_db_system_from_db_system_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/database/models/launch_db_system_from_db_system_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/database/models/launch_db_system_from_db_system_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 40.58806 | 245 | 0.667132 |
from .launch_db_system_base import LaunchDbSystemBase
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel
from oci.decorators import init_model_state_from_kwargs
@init_model_state_from_kwargs
class LaunchDbSystemFromDbSystemDetails(LaunchDbSystemBase):
LIC... | true | true |
f73d4675c3877f27d97fb71562c1364dc1cc2335 | 73 | py | Python | atlasnet_v2/utils/__init__.py | RobinBaumann/TF-AtlasNetV2 | 32bd962407becacc9b9bee6c76c96216818e4c89 | [
"MIT"
] | null | null | null | atlasnet_v2/utils/__init__.py | RobinBaumann/TF-AtlasNetV2 | 32bd962407becacc9b9bee6c76c96216818e4c89 | [
"MIT"
] | null | null | null | atlasnet_v2/utils/__init__.py | RobinBaumann/TF-AtlasNetV2 | 32bd962407becacc9b9bee6c76c96216818e4c89 | [
"MIT"
] | null | null | null | """
Created by Robin Baumann <mail@robin-baumann.com> at 08.06.20.
"""
| 12.166667 | 62 | 0.657534 | true | true | |
f73d493ef3d013bb9c8f0413b28a3fe9217b9a28 | 362 | py | Python | tweet/urls.py | ThatsSoMeta/NotTwitter | c9c1c04d204685aaeeb79d6a29167c374a7071d8 | [
"MIT"
] | 1 | 2021-03-08T18:32:59.000Z | 2021-03-08T18:32:59.000Z | tweet/urls.py | ThatsSoMeta/NotTwitter | c9c1c04d204685aaeeb79d6a29167c374a7071d8 | [
"MIT"
] | null | null | null | tweet/urls.py | ThatsSoMeta/NotTwitter | c9c1c04d204685aaeeb79d6a29167c374a7071d8 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import (
tweet_view,
like_tweet,
unlike_tweet,
tweet_detail_view
)
urlpatterns = [
path('', tweet_view, name='tweet'),
path('<int:id>/', tweet_detail_view, name='tweet'),
path('like/<int:tweet_id>/', like_tweet, name='like'),
path('unlike/<int:tw... | 25.857143 | 64 | 0.654696 | from django.urls import path
from .views import (
tweet_view,
like_tweet,
unlike_tweet,
tweet_detail_view
)
urlpatterns = [
path('', tweet_view, name='tweet'),
path('<int:id>/', tweet_detail_view, name='tweet'),
path('like/<int:tweet_id>/', like_tweet, name='like'),
path('unlike/<int:tw... | true | true |
f73d4a21e0337bacf46a3d78d23ef4a85ccce221 | 1,399 | py | Python | sim2net/propagation/__init__.py | harikuts/dsr_optimization | 796e58da578f7841a060233a8981eb69d92b798b | [
"MIT"
] | 12 | 2018-06-17T05:29:35.000Z | 2022-03-20T23:55:49.000Z | sim2net/propagation/__init__.py | harikuts/dsr_optimization | 796e58da578f7841a060233a8981eb69d92b798b | [
"MIT"
] | 2 | 2020-05-02T16:36:34.000Z | 2021-03-12T17:40:02.000Z | sim2net/propagation/__init__.py | harikuts/dsr_optimization | 796e58da578f7841a060233a8981eb69d92b798b | [
"MIT"
] | 6 | 2015-09-09T00:00:22.000Z | 2020-05-29T20:18:31.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2012 Michal Kalewski <mkalewski at cs.put.poznan.pl>
#
# This file is a part of the Simple Network Simulator (sim2net) project.
# USE, MODIFICATION, COPYING AND DISTRIBUTION OF THIS SOFTWARE IS SUBJECT TO
# THE TERMS AND CONDITIONS OF THE MIT LICENSE. YOU SHOULD H... | 39.971429 | 79 | 0.772695 |
__docformat__ = 'reStructuredText'
__all__ = ['path_loss']
| true | true |
f73d4a3d12fa46ae5bf514d98b31d99a0ff147e8 | 1,169 | py | Python | test/test43_tf_official.py | davidliyutong/Flint | 4e2552dac8d781c21e8998ad68bbf1b986b09258 | [
"MIT"
] | null | null | null | test/test43_tf_official.py | davidliyutong/Flint | 4e2552dac8d781c21e8998ad68bbf1b986b09258 | [
"MIT"
] | 1 | 2020-07-08T02:57:50.000Z | 2020-07-08T02:57:50.000Z | test/test43_tf_official.py | davidliyutong/Flint | 4e2552dac8d781c21e8998ad68bbf1b986b09258 | [
"MIT"
] | null | null | null | from models import Linear3
from core.Optimizers import sgd, bgd
from core.Functions import one_hot_f
import numpy as np
from tensorflow import keras
from core.Dataloader import batch_iterator
def test(model, test_inputs, test_labels):
num_of_sample = test_inputs.shape[0]
cnt_correct, cnt_tot = 0, 0
for i ... | 31.594595 | 84 | 0.746792 | from models import Linear3
from core.Optimizers import sgd, bgd
from core.Functions import one_hot_f
import numpy as np
from tensorflow import keras
from core.Dataloader import batch_iterator
def test(model, test_inputs, test_labels):
num_of_sample = test_inputs.shape[0]
cnt_correct, cnt_tot = 0, 0
for i ... | true | true |
f73d4a7c66a667270b365b586bab3d27bc39b886 | 22,957 | py | Python | google/ads/googleads/v7/services/services/bidding_strategy_service/client.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 285 | 2018-10-05T16:47:58.000Z | 2022-03-31T00:58:39.000Z | google/ads/googleads/v7/services/services/bidding_strategy_service/client.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 425 | 2018-09-10T13:32:41.000Z | 2022-03-31T14:50:05.000Z | google/ads/googleads/v7/services/services/bidding_strategy_service/client.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 369 | 2018-11-28T07:01:00.000Z | 2022-03-28T09:53:22.000Z | # -*- 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... | 41.588768 | 146 | 0.633271 |
from collections import OrderedDict
from distutils import util
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from google.api_core import client_options as client_options_lib
from google.api_core import exceptions
from google.api_core import gapic_v1
from googl... | true | true |
f73d4b482fd19575a1dadbb4b98d39c28bb1748b | 2,428 | py | Python | middleware.py | sesh/django-middleware | 34715542c0fa2a85df9f888e8b448f100da7639b | [
"Unlicense"
] | null | null | null | middleware.py | sesh/django-middleware | 34715542c0fa2a85df9f888e8b448f100da7639b | [
"Unlicense"
] | null | null | null | middleware.py | sesh/django-middleware | 34715542c0fa2a85df9f888e8b448f100da7639b | [
"Unlicense"
] | null | null | null | """
This is free and unencumbered software released into the public domain.
https://github.com/sesh/django-middleware
"""
import logging
logger = logging.getLogger("django")
def set_remote_addr(get_response):
def middleware(request):
request.META["REMOTE_ADDR"] = request.META.get(
"HTTP_X_R... | 25.291667 | 123 | 0.646211 |
import logging
logger = logging.getLogger("django")
def set_remote_addr(get_response):
def middleware(request):
request.META["REMOTE_ADDR"] = request.META.get(
"HTTP_X_REAL_IP", request.META["REMOTE_ADDR"]
)
response = get_response(request)
return response
return... | true | true |
f73d4b5b57293171dab37f88fec8f771af568ea4 | 735 | py | Python | swaggerpy/exception.py | bkbarry/swagger-py | 381b6ab2ac64ee52148c2d99e7cd2e49e8b5addd | [
"BSD-3-Clause"
] | null | null | null | swaggerpy/exception.py | bkbarry/swagger-py | 381b6ab2ac64ee52148c2d99e7cd2e49e8b5addd | [
"BSD-3-Clause"
] | null | null | null | swaggerpy/exception.py | bkbarry/swagger-py | 381b6ab2ac64ee52148c2d99e7cd2e49e8b5addd | [
"BSD-3-Clause"
] | 1 | 2021-03-29T08:07:59.000Z | 2021-03-29T08:07:59.000Z | #!/usr/bin/env python
#
# Copyright (c) 2014, Yelp, Inc.
#
class HTTPError(IOError):
"""Initialize HTTPError with 'response' and 'request' object
"""
def __init__(self, *args, **kwargs):
response = kwargs.pop('response', None)
self.response = response
# populate request either fro... | 28.269231 | 64 | 0.636735 |
class HTTPError(IOError):
def __init__(self, *args, **kwargs):
response = kwargs.pop('response', None)
self.response = response
self.request = kwargs.pop('request', None)
if(response is not None and not self.request and
hasattr(response, 'request')):
... | true | true |
f73d4b730c537d1eeaa19c1715d0d3a4f1b117b7 | 1,070 | py | Python | WaterReader/server.py | kbickar/IoT | 9aeb2822b4139d4491efc60fdf60a2801b3b4f76 | [
"MIT"
] | 49 | 2019-09-04T20:44:04.000Z | 2021-10-05T11:24:53.000Z | WaterReader/server.py | kbickar/IoT | 9aeb2822b4139d4491efc60fdf60a2801b3b4f76 | [
"MIT"
] | 1 | 2019-09-10T15:28:32.000Z | 2019-09-10T15:28:32.000Z | WaterReader/server.py | kbickar/IoT | 9aeb2822b4139d4491efc60fdf60a2801b3b4f76 | [
"MIT"
] | 8 | 2019-09-05T00:00:23.000Z | 2020-06-08T17:32:03.000Z | import socket
import traceback
import datetime
SERVER_IP = '127.0.0.1'
SERVER_PORT = 3341
MAX_UDP = 65507 # Maximum UDP size
f = open("debug.log", "w+")
class ServerSocket():
clients = {}
def __init__(self, ip, port):
self.server_socket = socket.socket(socket.AF_INET,
... | 28.157895 | 68 | 0.566355 | import socket
import traceback
import datetime
SERVER_IP = '127.0.0.1'
SERVER_PORT = 3341
MAX_UDP = 65507
f = open("debug.log", "w+")
class ServerSocket():
clients = {}
def __init__(self, ip, port):
self.server_socket = socket.socket(socket.AF_INET,
socket... | false | true |
f73d4b7b9eeeb895c85c373cde031cd8fcedefda | 2,549 | py | Python | fn_datatable_utils/tests/test_dt_utils_get_row.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 65 | 2017-12-04T13:58:32.000Z | 2022-03-24T18:33:17.000Z | fn_datatable_utils/tests/test_dt_utils_get_row.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 48 | 2018-03-02T19:17:14.000Z | 2022-03-09T22:00:38.000Z | fn_datatable_utils/tests/test_dt_utils_get_row.py | nickpartner-goahead/resilient-community-apps | 097c0dbefddbd221b31149d82af9809420498134 | [
"MIT"
] | 95 | 2018-01-11T16:23:39.000Z | 2022-03-21T11:34:29.000Z | # (c) Copyright IBM Corp. 2019. All Rights Reserved.
# -*- coding: utf-8 -*-
"""Tests using pytest_resilient_circuits"""
from __future__ import print_function
import pytest
from resilient_circuits.util import get_config_data, get_function_definition
from resilient_circuits import SubmitTestFunction, FunctionResult
fro... | 37.485294 | 104 | 0.683798 |
from __future__ import print_function
import pytest
from resilient_circuits.util import get_config_data, get_function_definition
from resilient_circuits import SubmitTestFunction, FunctionResult
from tests.test_helper import *
PACKAGE_NAME = "fn_datatable_utils"
FUNCTION_NAME = "dt_utils_get_row"
config_data = ge... | true | true |
f73d4c09c135a153cfe3787d0d0c6b2d28e44156 | 111 | py | Python | mldato/timeseries.py | Ryanfras/mldato | 34570412eb909c1d1c99b2a5ee15e7907aa1922b | [
"Apache-2.0"
] | null | null | null | mldato/timeseries.py | Ryanfras/mldato | 34570412eb909c1d1c99b2a5ee15e7907aa1922b | [
"Apache-2.0"
] | 2 | 2021-09-28T03:15:55.000Z | 2022-02-26T08:19:41.000Z | mldato/timeseries.py | Ryanfras/mldato | 34570412eb909c1d1c99b2a5ee15e7907aa1922b | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_timeseries.ipynb (unless otherwise specified).
__all__ = [] | 37 | 97 | 0.756757 |
__all__ = [] | true | true |
f73d4c3922ed02c72cc9a6d52ead9ac8b5941e6b | 728 | py | Python | tests/layers/test_reshape_layer.py | vishalbelsare/neupy | 684313cdaddcad326f2169384fb15ec3aa29d991 | [
"MIT"
] | null | null | null | tests/layers/test_reshape_layer.py | vishalbelsare/neupy | 684313cdaddcad326f2169384fb15ec3aa29d991 | [
"MIT"
] | null | null | null | tests/layers/test_reshape_layer.py | vishalbelsare/neupy | 684313cdaddcad326f2169384fb15ec3aa29d991 | [
"MIT"
] | null | null | null | import numpy as np
from neupy import layers
from base import BaseTestCase
class ReshapeLayerTestCase(BaseTestCase):
def test_reshape_layer_1d_shape(self):
x = np.random.random((5, 4, 3, 2, 1))
input_layer = layers.Input((4, 3, 2, 1))
reshape_layer = layers.Reshape()
input_layer ... | 26 | 53 | 0.627747 | import numpy as np
from neupy import layers
from base import BaseTestCase
class ReshapeLayerTestCase(BaseTestCase):
def test_reshape_layer_1d_shape(self):
x = np.random.random((5, 4, 3, 2, 1))
input_layer = layers.Input((4, 3, 2, 1))
reshape_layer = layers.Reshape()
input_layer ... | true | true |
f73d4cb93984c1c76d35fe99d800d82e95c2535f | 479 | py | Python | djangoautoconf/log_utils/log_path_utils.py | weijia/djangoautoconf | 590acfdcc6a3e051a2048ba1dbf980f908a7af91 | [
"BSD-3-Clause"
] | null | null | null | djangoautoconf/log_utils/log_path_utils.py | weijia/djangoautoconf | 590acfdcc6a3e051a2048ba1dbf980f908a7af91 | [
"BSD-3-Clause"
] | null | null | null | djangoautoconf/log_utils/log_path_utils.py | weijia/djangoautoconf | 590acfdcc6a3e051a2048ba1dbf980f908a7af91 | [
"BSD-3-Clause"
] | null | null | null | import os
from ufs_tools.folder_tool import ensure_dir
def get_log_file_path(folder, log_file_name, ext=".log"):
log_folder_relative_path = os.path.join('logs', folder)
log_filename = '%s%s' % (log_file_name, ext)
current_dir = os.path.join(os.getcwd())
folder_log_full_path = os.path.join(current_dir... | 34.214286 | 78 | 0.762004 | import os
from ufs_tools.folder_tool import ensure_dir
def get_log_file_path(folder, log_file_name, ext=".log"):
log_folder_relative_path = os.path.join('logs', folder)
log_filename = '%s%s' % (log_file_name, ext)
current_dir = os.path.join(os.getcwd())
folder_log_full_path = os.path.join(current_dir... | true | true |
f73d4d2f0ece1918c84c49ba7b4a5afc1b2d4427 | 946 | py | Python | demos/helloworld/MainWindow.py | hsoft/xibless | a7393d28b4a31698869b2203d4d8b3398de1de7f | [
"BSD-3-Clause"
] | 2 | 2016-09-13T12:34:34.000Z | 2018-05-15T01:06:53.000Z | demos/helloworld/MainWindow.py | hsoft/xibless | a7393d28b4a31698869b2203d4d8b3398de1de7f | [
"BSD-3-Clause"
] | null | null | null | demos/helloworld/MainWindow.py | hsoft/xibless | a7393d28b4a31698869b2203d4d8b3398de1de7f | [
"BSD-3-Clause"
] | null | null | null | ownerclass = 'AppDelegate'
ownerimport = 'AppDelegate.h'
# Init
result = Window(330, 110, "Tell me your name!")
result.xProportion = 0.8
result.yProportion = 0.2
result.canResize = False
nameLabel = Label(result, text="Name:")
nameLabel.width = 45
nameField = TextField(result, text="")
helloLabel = Label(result, text=... | 30.516129 | 76 | 0.77907 | ownerclass = 'AppDelegate'
ownerimport = 'AppDelegate.h'
result = Window(330, 110, "Tell me your name!")
result.xProportion = 0.8
result.yProportion = 0.2
result.canResize = False
nameLabel = Label(result, text="Name:")
nameLabel.width = 45
nameField = TextField(result, text="")
helloLabel = Label(result, text="")
bu... | true | true |
f73d4d80f07db13a00172fc292bc7b7313bdd9c1 | 904 | py | Python | tests/test.py | rojaster/mdec | 6f338f8838003bab3bf9242063e2531bd5c8e2b4 | [
"MIT"
] | null | null | null | tests/test.py | rojaster/mdec | 6f338f8838003bab3bf9242063e2531bd5c8e2b4 | [
"MIT"
] | null | null | null | tests/test.py | rojaster/mdec | 6f338f8838003bab3bf9242063e2531bd5c8e2b4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import unittest
import subprocess
import tempfile
import requests
import os
TEST_ROOT = os.path.abspath(os.path.dirname(__file__))
class ServicesTest(unittest.TestCase):
@staticmethod
def _test_service(service_name: str, binary_path: str):
print(f'Testing {service_name}')
with open(bin... | 26.588235 | 66 | 0.700221 |
import unittest
import subprocess
import tempfile
import requests
import os
TEST_ROOT = os.path.abspath(os.path.dirname(__file__))
class ServicesTest(unittest.TestCase):
@staticmethod
def _test_service(service_name: str, binary_path: str):
print(f'Testing {service_name}')
with open(binary_path, 'rb') as f:
... | true | true |
f73d4dba28d6b5df37f80d6f3e985f8afbf9b82a | 22,809 | py | Python | pint_server/app.py | SUSE-Enceladus/public-cloud-info-service | bd30aece9599189cd60dbff90c142b6b98cc4724 | [
"Apache-2.0"
] | 3 | 2018-10-15T03:08:18.000Z | 2022-01-28T16:23:40.000Z | pint_server/app.py | SUSE-Enceladus/public-cloud-info-service | bd30aece9599189cd60dbff90c142b6b98cc4724 | [
"Apache-2.0"
] | 67 | 2019-01-05T02:49:12.000Z | 2022-03-03T19:43:43.000Z | pint_server/app.py | SUSE-Enceladus/public-cloud-info-service | bd30aece9599189cd60dbff90c142b6b98cc4724 | [
"Apache-2.0"
] | 8 | 2019-01-07T08:42:06.000Z | 2021-05-18T14:00:48.000Z | # Copyright (c) 2021 SUSE LLC
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 3 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; witho... | 37.391803 | 80 | 0.687536 |
import datetime
import re
from decimal import Decimal
from flask import (abort, Flask, jsonify, make_response, request, redirect,
Response)
from flask_cors import CORS
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import text, or_
from sqlalchemy.exc import DataError
from s... | true | true |
f73d4ea1bd14fc90ef6ba2ed40a68da5d006d904 | 129 | py | Python | atest/resources/testlibs/ctrl_or_command.py | ishandutta2007/SeleniumLibrary | 6b2748122b2af219d8247dab4b6db00d3c49e60d | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2018-03-22T11:27:57.000Z | 2021-03-04T19:15:38.000Z | atest/resources/testlibs/ctrl_or_command.py | ishandutta2007/SeleniumLibrary | 6b2748122b2af219d8247dab4b6db00d3c49e60d | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2018-12-03T17:01:30.000Z | 2019-03-30T16:09:01.000Z | atest/resources/testlibs/ctrl_or_command.py | ishandutta2007/SeleniumLibrary | 6b2748122b2af219d8247dab4b6db00d3c49e60d | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-01-23T16:11:55.000Z | 2018-01-23T16:11:55.000Z | import platform
def ctrl_or_command_key():
if platform.system() == 'Darwin':
return 'COMMAND'
return 'CONTROL'
| 16.125 | 37 | 0.651163 | import platform
def ctrl_or_command_key():
if platform.system() == 'Darwin':
return 'COMMAND'
return 'CONTROL'
| true | true |
f73d4ee3470719281777538e66e70fed17adec9b | 10,558 | py | Python | pipeline_plugins/tests/components/collections/sites/open/monitor_test/alarm_shield/test_v1_1.py | wkma/bk-sops | 8fb5609c0c4495c28d588fbafa9d9f5f2976929b | [
"Apache-2.0"
] | 2 | 2021-07-28T01:48:31.000Z | 2021-11-17T11:02:26.000Z | pipeline_plugins/tests/components/collections/sites/open/monitor_test/alarm_shield/test_v1_1.py | wkma/bk-sops | 8fb5609c0c4495c28d588fbafa9d9f5f2976929b | [
"Apache-2.0"
] | null | null | null | pipeline_plugins/tests/components/collections/sites/open/monitor_test/alarm_shield/test_v1_1.py | wkma/bk-sops | 8fb5609c0c4495c28d588fbafa9d9f5f2976929b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 45.119658 | 120 | 0.61612 |
from django.test import TestCase
from mock import MagicMock
from pipeline.component_framework.test import (
ComponentTestMixin,
ComponentTestCase,
CallAssertion,
ExecuteAssertion,
Call,
Patcher,
)
from pipeline_plugins.components.collections.sites.open.monitor.alarm_shield.v1_1 import Monitor... | true | true |
f73d5082685750c6314f78e71043c8357cb4f17b | 4,912 | py | Python | env/lib/python3.7/genericpath.py | JacobMiske/nuclear-database-APIs | bc9fb6afb9aa0d98dde5d744d8f22b2791597e78 | [
"MIT"
] | null | null | null | env/lib/python3.7/genericpath.py | JacobMiske/nuclear-database-APIs | bc9fb6afb9aa0d98dde5d744d8f22b2791597e78 | [
"MIT"
] | null | null | null | env/lib/python3.7/genericpath.py | JacobMiske/nuclear-database-APIs | bc9fb6afb9aa0d98dde5d744d8f22b2791597e78 | [
"MIT"
] | 1 | 2020-05-01T20:23:35.000Z | 2020-05-01T20:23:35.000Z | """
Path operations common to more than one OS
Do not use directly. The OS specific modules import the appropriate
functions from this module themselves.
"""
import os
import stat
__all__ = ['commonprefix', 'exists', 'getatime', 'getctime', 'getmtime',
'getsize', 'isdir', 'isfile', 'samefile', 'sameopenfil... | 31.487179 | 83 | 0.660423 | import os
import stat
__all__ = ['commonprefix', 'exists', 'getatime', 'getctime', 'getmtime',
'getsize', 'isdir', 'isfile', 'samefile', 'sameopenfile',
'samestat']
def exists(path):
try:
os.stat(path)
except OSError:
return False
return True
def isfile(path):
... | true | true |
f73d50c0410ebc1fc9af26d613df3949dfbb14a3 | 10,672 | py | Python | tests/client/app_search/test_app_search.py | pmusa/enterprise-search-python | 31a64285532373b5e709718a15ea24746b1f3e6e | [
"Apache-2.0"
] | null | null | null | tests/client/app_search/test_app_search.py | pmusa/enterprise-search-python | 31a64285532373b5e709718a15ea24746b1f3e6e | [
"Apache-2.0"
] | 1 | 2021-02-24T07:13:31.000Z | 2021-02-24T07:13:31.000Z | tests/client/app_search/test_app_search.py | pmusa/enterprise-search-python | 31a64285532373b5e709718a15ea24746b1f3e6e | [
"Apache-2.0"
] | null | null | null | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use ... | 46 | 586 | 0.585551 |
import jwt
import pytest
from elastic_enterprise_search import AppSearch, UnauthorizedError
@pytest.fixture()
def app_search():
yield AppSearch(
"http://localhost:3002", http_auth="private-k3ra4bqu12vgnhe3wibdw69f"
)
@pytest.mark.vcr()
def test_list_engines(app_search):
resp = ... | true | true |
f73d51a4605556876ee30be66356a98ed6903bd2 | 1,180 | py | Python | trik/Treading.py | m1raynee/trikset.py-typehint | 2176229fb11628f369eb7a090b89c4b34985a7fd | [
"MIT"
] | 1 | 2022-01-23T21:23:15.000Z | 2022-01-23T21:23:15.000Z | trik/Treading.py | m1raynee/trikset-py-typehint | 2176229fb11628f369eb7a090b89c4b34985a7fd | [
"MIT"
] | null | null | null | trik/Treading.py | m1raynee/trikset-py-typehint | 2176229fb11628f369eb7a090b89c4b34985a7fd | [
"MIT"
] | null | null | null | from typing import Callable
def joinThread(treadId: str) -> None:
"""Ожидает завершения указанного потока.
Параметры
---------
treadId: :class:`str`
id потока
"""
raise NotImplementedError
def killThread(treadId: str) -> None:
"""Заканчивает исполнение указанного потока.
Па... | 20 | 76 | 0.616102 | from typing import Callable
def joinThread(treadId: str) -> None:
raise NotImplementedError
def killThread(treadId: str) -> None:
raise NotImplementedError
def receiveMessage(wait: bool) -> str:
raise NotImplementedError
def sendMessage(treadId: str, message: str) -> None:
raise NotImplementedEr... | true | true |
f73d531b542c0931ce8dda1c1db069885ad1b953 | 701 | py | Python | test.py | bochainwu/self_learning2021 | a80580a4bb82e280f06b093f19d93ff354f7cd17 | [
"MIT"
] | 5 | 2021-07-17T03:34:19.000Z | 2021-11-16T11:28:24.000Z | test.py | bochainwu/self_learning2021 | a80580a4bb82e280f06b093f19d93ff354f7cd17 | [
"MIT"
] | 1 | 2021-07-18T06:33:30.000Z | 2021-07-19T14:11:14.000Z | test.py | bochainwu/self_learning2021 | a80580a4bb82e280f06b093f19d93ff354f7cd17 | [
"MIT"
] | null | null | null | '''
a = [[1 for j in range(5)],
[2 for j in range(5)],
[3 for j in range(5)],
[4 for j in range(5)],
[5 for j in range(5)],
[6 for j in range(5)]]
for i in range(6):
for j in range(5):
print(a[i][j], end='')
print()
print()
x, y = 0, 0
while True:
if x == 6:
print... | 14.914894 | 30 | 0.388017 | true | true | |
f73d535f83d4563314565b1875e6c700ddb87bfd | 5,749 | py | Python | pygimli/physics/traveltime/raplot.py | baender/gimli | eb9a2204669cf11209b9577472f61ac70217a191 | [
"Apache-2.0"
] | 1 | 2022-03-27T18:37:08.000Z | 2022-03-27T18:37:08.000Z | pygimli/physics/traveltime/raplot.py | baender/gimli | eb9a2204669cf11209b9577472f61ac70217a191 | [
"Apache-2.0"
] | null | null | null | pygimli/physics/traveltime/raplot.py | baender/gimli | eb9a2204669cf11209b9577472f61ac70217a191 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""""WRITEME"""
import matplotlib.pyplot as plt
import numpy as np
import pygimli as pg
from pygimli.viewer.mpl import createColorBar # , updateColorBar
from .ratools import shotReceiverDistances
def drawTravelTimeData(ax, data, t=None):
"""
Draw first arr... | 29.182741 | 76 | 0.564968 |
import matplotlib.pyplot as plt
import numpy as np
import pygimli as pg
from pygimli.viewer.mpl import createColorBar
from .ratools import shotReceiverDistances
def drawTravelTimeData(ax, data, t=None):
x = pg.x(data.sensorPositions())
shots = pg.unique(pg.sort(data('s')))
geoph = pg.unique(... | true | true |
f73d538b9d224bd77e936dae668753c1e8e793a8 | 1,658 | py | Python | elasticapm/version.py | bmilescu/apm-agent-python | d4b5378941f5b82406862bbc03f91ebe64559ba9 | [
"BSD-3-Clause"
] | null | null | null | elasticapm/version.py | bmilescu/apm-agent-python | d4b5378941f5b82406862bbc03f91ebe64559ba9 | [
"BSD-3-Clause"
] | null | null | null | elasticapm/version.py | bmilescu/apm-agent-python | d4b5378941f5b82406862bbc03f91ebe64559ba9 | [
"BSD-3-Clause"
] | null | null | null | # BSD 3-Clause License
#
# Copyright (c) 2019, Elasticsearch BV
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, t... | 50.242424 | 81 | 0.767189 |
__version__ = (5, 7, 0)
VERSION = ".".join(map(str, __version__))
| true | true |
f73d5437748b81ea8becf68dd199e9ea54911c3d | 1,121 | py | Python | sfaira/data/utils_scripts/create_meta_and_cache.py | johnmous/sfaira | c50240a74530e614ab7681bf9c63b04cb815b361 | [
"BSD-3-Clause"
] | 110 | 2020-09-08T07:47:15.000Z | 2022-03-29T03:33:56.000Z | sfaira/data/utils_scripts/create_meta_and_cache.py | johnmous/sfaira | c50240a74530e614ab7681bf9c63b04cb815b361 | [
"BSD-3-Clause"
] | 405 | 2020-09-15T15:05:46.000Z | 2022-03-16T14:44:23.000Z | sfaira/data/utils_scripts/create_meta_and_cache.py | johnmous/sfaira | c50240a74530e614ab7681bf9c63b04cb815b361 | [
"BSD-3-Clause"
] | 20 | 2021-03-30T15:30:14.000Z | 2022-03-07T12:52:58.000Z | import os
import sfaira
import sys
# Set global variables.
print("sys.argv", sys.argv)
data_path = str(sys.argv[1])
path_meta = str(sys.argv[2])
path_cache = str(sys.argv[3])
processes = int(str(sys.argv[4]))
ds = sfaira.data.dataloaders.Universe(
data_path=data_path, meta_path=path_meta, cache_path=path_cache
)... | 33.969697 | 88 | 0.633363 | import os
import sfaira
import sys
print("sys.argv", sys.argv)
data_path = str(sys.argv[1])
path_meta = str(sys.argv[2])
path_cache = str(sys.argv[3])
processes = int(str(sys.argv[4]))
ds = sfaira.data.dataloaders.Universe(
data_path=data_path, meta_path=path_meta, cache_path=path_cache
)
for x in ds.dataset_g... | true | true |
f73d552ecc282813a207cf0ea275a12fdeb1d22a | 55,567 | py | Python | tensorlog/testxcomp.py | saraswat/TensorLog | c56cebfa33b5123d5340a7b429e333da09d223d8 | [
"Apache-2.0"
] | 108 | 2016-05-24T16:49:56.000Z | 2022-02-02T19:06:14.000Z | tensorlog/testxcomp.py | saraswat/TensorLog | c56cebfa33b5123d5340a7b429e333da09d223d8 | [
"Apache-2.0"
] | 12 | 2016-09-07T18:04:38.000Z | 2020-12-07T01:18:08.000Z | tensorlog/testxcomp.py | saraswat/TensorLog | c56cebfa33b5123d5340a7b429e333da09d223d8 | [
"Apache-2.0"
] | 22 | 2016-06-17T18:59:18.000Z | 2020-05-28T02:13:59.000Z | # (C) William W. Cohen and Carnegie Mellon University, 2017
import logging
import numpy as np
import os
import unittest
import sys
import collections
import tempfile
from tensorlog import xctargets
if xctargets.tf:
import tensorflow as tf
from tensorlog import tensorflowxcomp
else:
tensorflowxcomp=None
if xct... | 43.175602 | 138 | 0.655857 |
import logging
import numpy as np
import os
import unittest
import sys
import collections
import tempfile
from tensorlog import xctargets
if xctargets.tf:
import tensorflow as tf
from tensorlog import tensorflowxcomp
else:
tensorflowxcomp=None
if xctargets.theano:
import theano
from tensorlog import thea... | true | true |
f73d55686fda574f44e36edee36447e99b6ea541 | 3,326 | py | Python | lcm/ns_vnfs/biz/wait_job.py | onap/vfc-nfvo-lcm | b7d4d015fa96a246d73d863092d3362afcedc284 | [
"Apache-2.0"
] | 4 | 2018-08-29T02:51:38.000Z | 2021-11-16T11:36:11.000Z | lcm/ns_vnfs/biz/wait_job.py | onap/vfc-nfvo-lcm | b7d4d015fa96a246d73d863092d3362afcedc284 | [
"Apache-2.0"
] | null | null | null | lcm/ns_vnfs/biz/wait_job.py | onap/vfc-nfvo-lcm | b7d4d015fa96a246d73d863092d3362afcedc284 | [
"Apache-2.0"
] | 1 | 2019-05-12T08:21:19.000Z | 2019-05-12T08:21:19.000Z | # Copyright 2016 ZTE Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 42.101266 | 130 | 0.699639 |
import time
import datetime
import logging
import math
from lcm.pub.utils.jobutil import JobUtil
from lcm.jobs.enum import JOB_MODEL_STATUS
from lcm.pub.msapi.vnfmdriver import query_vnfm_job
from lcm.pub.utils.values import ignore_case_get
logger = logging.getLogger(__name__)
def calc_progress(vnfm_p... | true | true |
f73d55cb38d30f034e3f27152ae4c3c08c675921 | 5,214 | py | Python | data/p3BR/R2/benchmark/startQiskit_noisy43.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit_noisy43.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit_noisy43.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=7
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from ... | 28.648352 | 140 | 0.626774 |
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from qiskit.test.mock import FakeVigo... | true | true |
f73d56274bb5a4e9fa2a9fe2f5ce429d2af7de69 | 2,511 | py | Python | deeppavlov/core/common/log.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-05-22T08:34:33.000Z | 2019-05-22T08:34:33.000Z | deeppavlov/core/common/log.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | null | null | null | deeppavlov/core/common/log.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-03-17T13:47:44.000Z | 2019-03-17T13:47:44.000Z | # Copyright 2017 Neural Networks and Deep Learning lab, MIPT
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 35.366197 | 114 | 0.683791 |
import json
import logging
import logging.config
import sys
from pathlib import Path
from .paths import get_settings_path
LOG_CONFIG_FILENAME = 'log_config.json'
TRACEBACK_LOGGER_ERRORS = True
root_path = Path(__file__).resolve().parents[3]
logging.getLogger('matplotlib').setLevel(logging.WARNING)
d... | true | true |
f73d570245a9909b89474a189d06893daf585060 | 6,669 | py | Python | python/IECoreMaya/StringVectorParameterUI.py | bradleyhenke/cortex | f8245cc6c9464b1de9e6c6e57068248198e63de0 | [
"BSD-3-Clause"
] | 386 | 2015-01-02T11:10:43.000Z | 2022-03-10T15:12:20.000Z | python/IECoreMaya/StringVectorParameterUI.py | bradleyhenke/cortex | f8245cc6c9464b1de9e6c6e57068248198e63de0 | [
"BSD-3-Clause"
] | 484 | 2015-01-09T18:28:06.000Z | 2022-03-31T16:02:04.000Z | python/IECoreMaya/StringVectorParameterUI.py | bradleyhenke/cortex | f8245cc6c9464b1de9e6c6e57068248198e63de0 | [
"BSD-3-Clause"
] | 99 | 2015-01-28T23:18:04.000Z | 2022-03-27T00:59:39.000Z | ##########################################################################
#
# Copyright (c) 2010, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistribu... | 32.691176 | 131 | 0.700105 | true | true | |
f73d573edbe874512d5985d6bd829910a52df6a0 | 1,000 | py | Python | member/urls/events.py | manens/nadine | 4938afa2d2c69ae5ac54f4360b081d10521a0a2f | [
"Apache-2.0"
] | null | null | null | member/urls/events.py | manens/nadine | 4938afa2d2c69ae5ac54f4360b081d10521a0a2f | [
"Apache-2.0"
] | null | null | null | member/urls/events.py | manens/nadine | 4938afa2d2c69ae5ac54f4360b081d10521a0a2f | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from member.views import events
app_name = 'member'
urlpatterns = [
path('events/', events.events_google, name='events'),
path('booking/create/<username>/', events.create_booking, name='create_booking'),
path('booking/confirm/<room>/<start>/<end>/<date>/<rate>/', events.confir... | 71.428571 | 583 | 0.76 | from django.urls import path
from member.views import events
app_name = 'member'
urlpatterns = [
path('events/', events.events_google, name='events'),
path('booking/create/<username>/', events.create_booking, name='create_booking'),
path('booking/confirm/<room>/<start>/<end>/<date>/<rate>/', events.confir... | true | true |
f73d575a6baa97f373d0338832b8344759df6d4e | 713 | py | Python | sample/collect/service_imp/before_plugin/plugin/handler_req_count_param.py | SelfDown/omnis-collect | 1b865e0070fa4e639a7b757f8443aafb4f94ac34 | [
"MIT"
] | null | null | null | sample/collect/service_imp/before_plugin/plugin/handler_req_count_param.py | SelfDown/omnis-collect | 1b865e0070fa4e639a7b757f8443aafb4f94ac34 | [
"MIT"
] | null | null | null | sample/collect/service_imp/before_plugin/plugin/handler_req_count_param.py | SelfDown/omnis-collect | 1b865e0070fa4e639a7b757f8443aafb4f94ac34 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@Time: 2021/8/11 14:53
@Author: zzhang zzhang@cenboomh.com
@File: extend_param.py
@desc:
"""
from collect.service_imp.before_plugin.before_plugin import BeforePlugin
class HandlerReqCountParam(BeforePlugin):
def handler(self, params, template):
params_result= self.get_params_re... | 33.952381 | 91 | 0.744741 |
from collect.service_imp.before_plugin.before_plugin import BeforePlugin
class HandlerReqCountParam(BeforePlugin):
def handler(self, params, template):
params_result= self.get_params_result(template)
count_params_result = self.handler_req_count_params(params, params_result,template)
... | true | true |
f73d58b03cbe5083c2599fd7be0c1cef3305098c | 9,492 | py | Python | tests/extras/datasets/pandas/test_json_dataset.py | Mu-L/kedro | a925fd59187a642e124527f0f1097e92ea8d1819 | [
"Apache-2.0"
] | null | null | null | tests/extras/datasets/pandas/test_json_dataset.py | Mu-L/kedro | a925fd59187a642e124527f0f1097e92ea8d1819 | [
"Apache-2.0"
] | null | null | null | tests/extras/datasets/pandas/test_json_dataset.py | Mu-L/kedro | a925fd59187a642e124527f0f1097e92ea8d1819 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path, PurePosixPath
import pandas as pd
import pytest
from adlfs import AzureBlobFileSystem
from fsspec.implementations.http import HTTPFileSystem
from fsspec.implementations.local import LocalFileSystem
from gcsfs import GCSFileSystem
from pandas.testing import assert_frame_equal
from s3fs.core im... | 39.22314 | 85 | 0.656869 | from pathlib import Path, PurePosixPath
import pandas as pd
import pytest
from adlfs import AzureBlobFileSystem
from fsspec.implementations.http import HTTPFileSystem
from fsspec.implementations.local import LocalFileSystem
from gcsfs import GCSFileSystem
from pandas.testing import assert_frame_equal
from s3fs.core im... | true | true |
f73d5a959acb0b2d399cca9ecbb4a125dcd43761 | 1,869 | py | Python | pygments_base16/base16-kimber.py | philj56/base16-pygments | 04cf1b28ad4a5603cd3336a3c4dba976cf5f1e5b | [
"MIT"
] | null | null | null | pygments_base16/base16-kimber.py | philj56/base16-pygments | 04cf1b28ad4a5603cd3336a3c4dba976cf5f1e5b | [
"MIT"
] | null | null | null | pygments_base16/base16-kimber.py | philj56/base16-pygments | 04cf1b28ad4a5603cd3336a3c4dba976cf5f1e5b | [
"MIT"
] | null | null | null | from pygments.style import Style
from pygments.token import (
Comment, Error, Keyword, Literal, Name, Number, Operator, String, Text
)
class BaseSixteenStyle(Style):
base00 = '#222222'
base01 = '#313131'
base02 = '#555D55'
base03 = '#644646'
base04 = '#5A5A5A'
base05 = '#DEDEE7'
base06... | 25.256757 | 74 | 0.569823 | from pygments.style import Style
from pygments.token import (
Comment, Error, Keyword, Literal, Name, Number, Operator, String, Text
)
class BaseSixteenStyle(Style):
base00 = '#222222'
base01 = '#313131'
base02 = '#555D55'
base03 = '#644646'
base04 = '#5A5A5A'
base05 = '#DEDEE7'
base06... | true | true |
f73d5bc22b1f78080ea64588d47a166f69e3b32f | 3,595 | py | Python | edb/server/compiler_pool/queue.py | aaronbrighton/edgedb | 4aacd1d4e248ae0d483c075ba93fc462da291ef4 | [
"Apache-2.0"
] | 7,302 | 2018-05-10T18:36:31.000Z | 2022-03-31T17:49:36.000Z | edb/server/compiler_pool/queue.py | aaronbrighton/edgedb | 4aacd1d4e248ae0d483c075ba93fc462da291ef4 | [
"Apache-2.0"
] | 1,602 | 2018-05-10T17:45:38.000Z | 2022-03-31T23:46:19.000Z | edb/server/compiler_pool/queue.py | aaronbrighton/edgedb | 4aacd1d4e248ae0d483c075ba93fc462da291ef4 | [
"Apache-2.0"
] | 236 | 2018-05-13T14:15:29.000Z | 2022-03-29T19:39:19.000Z | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2020-present MagicStack Inc. and the EdgeDB 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... | 31.814159 | 75 | 0.587204 |
from __future__ import annotations
import asyncio
import collections
import typing
W = typing.TypeVar('W')
W2 = typing.TypeVar('W2', contravariant=True)
class _AcquireCondition(typing.Protocol[W2]):
def __call__(self, worker: W2) -> bool:
pass
class WorkerQueue(typing.Generic[W]):
... | true | true |
f73d5be2bf7dce30bc3c5405591875d80be27d0e | 4,644 | py | Python | docs/conf.py | serge1994/incubator-kyuubi | 3594e08d1be1e657bdb6c6a7f45862c2879b57a3 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | serge1994/incubator-kyuubi | 3594e08d1be1e657bdb6c6a7f45862c2879b57a3 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | serge1994/incubator-kyuubi | 3594e08d1be1e657bdb6c6a7f45862c2879b57a3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Li... | 35.181818 | 164 | 0.720284 |
import os
import sys
import shlex
import subprocess
sys.path.insert(0, os.path.abspath('.'))
import sphinx_rtd_theme
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
import sphinx_markdown_tables
import recommonmark
from recommonmark.transform import AutoStructify
from recomm... | true | true |
f73d5da44ad1f79734302ae5a4768e4ede2eae59 | 2,596 | py | Python | chart3/disk_cache.py | fulinmao/webScraping | ae92490b9ee486f72bc926d5c6ee7b88af193e57 | [
"Apache-2.0"
] | null | null | null | chart3/disk_cache.py | fulinmao/webScraping | ae92490b9ee486f72bc926d5c6ee7b88af193e57 | [
"Apache-2.0"
] | null | null | null | chart3/disk_cache.py | fulinmao/webScraping | ae92490b9ee486f72bc926d5c6ee7b88af193e57 | [
"Apache-2.0"
] | null | null | null | import os
import urlparse
import re
import pickle
import zlib
from datetime import timedelta , datetime
from chart3.link_crawler import link_crawler
class DiskCache:
def __init__(self , cache_dir = "cache",max_length = 255, expires=timedelta(days=30) ):
self.cache_dir = cache_dir
self.max_leng... | 27.617021 | 91 | 0.567797 | import os
import urlparse
import re
import pickle
import zlib
from datetime import timedelta , datetime
from chart3.link_crawler import link_crawler
class DiskCache:
def __init__(self , cache_dir = "cache",max_length = 255, expires=timedelta(days=30) ):
self.cache_dir = cache_dir
self.max_leng... | false | true |
f73d5e1f6666922d54c3fae2ec51dec94a939f5d | 54,580 | py | Python | synapse/config/server.py | andybalaam/synapse | 88ce3080d4d064b9872c9867208116dc9db73d7e | [
"Apache-2.0"
] | null | null | null | synapse/config/server.py | andybalaam/synapse | 88ce3080d4d064b9872c9867208116dc9db73d7e | [
"Apache-2.0"
] | null | null | null | synapse/config/server.py | andybalaam/synapse | 88ce3080d4d064b9872c9867208116dc9db73d7e | [
"Apache-2.0"
] | null | null | null | # Copyright 2014-2021 The Matrix.org Foundation C.I.C.
#
# 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... | 39.153515 | 104 | 0.623617 |
import argparse
import itertools
import logging
import os.path
import re
import urllib.parse
from textwrap import indent
from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, Union
import attr
import yaml
from netaddr import AddrFormatError, IPNetwork, IPSet
from twisted.conch.ssh.keys imp... | true | true |
f73d5e2af3530ee880cf4fc95043a8fa3d7d60f7 | 104,466 | py | Python | lib/gflags.py | lakshaysethi/videonotes | 5b3d969d5f41514b9fc8a470e3ec5bad50414573 | [
"MIT"
] | null | null | null | lib/gflags.py | lakshaysethi/videonotes | 5b3d969d5f41514b9fc8a470e3ec5bad50414573 | [
"MIT"
] | null | null | null | lib/gflags.py | lakshaysethi/videonotes | 5b3d969d5f41514b9fc8a470e3ec5bad50414573 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2002, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this ... | 36.437391 | 84 | 0.689507 |
from __future__ import print_function
from builtins import str
from builtins import range
from builtins import object
import cgi
import getopt
import os
import re
import string
import struct
import sys
from future.utils import with_metaclass
try:
import fcntl
except ImportError... | true | true |
f73d5f0ac62fffa7e34b3eb3b3a53cc1314624cd | 3,469 | gyp | Python | gyp/v8.gyp | scroggo/skia | 792c80f5a7b66e75d42664ccb298f31962c6654c | [
"BSD-3-Clause"
] | 2 | 2019-05-09T17:06:47.000Z | 2020-07-06T16:14:13.000Z | gyp/v8.gyp | scroggo/skia | 792c80f5a7b66e75d42664ccb298f31962c6654c | [
"BSD-3-Clause"
] | null | null | null | gyp/v8.gyp | scroggo/skia | 792c80f5a7b66e75d42664ccb298f31962c6654c | [
"BSD-3-Clause"
] | 3 | 2015-03-13T14:30:30.000Z | 2020-07-06T16:13:36.000Z | # GYP file to build a V8 sample.
{
'targets': [
{
'target_name': 'SkV8Example',
'type': 'executable',
'mac_bundle' : 1,
'include_dirs' : [
'../third_party/externals/v8/include',
'../third_party/externals/v8',
],
'sources': [
'../experimental/SkV8Example/... | 36.904255 | 108 | 0.544826 |
{
'targets': [
{
'target_name': 'SkV8Example',
'type': 'executable',
'mac_bundle' : 1,
'include_dirs' : [
'../third_party/externals/v8/include',
'../third_party/externals/v8',
],
'sources': [
'../experimental/SkV8Example/DrawingMethods.cpp',
'..... | true | true |
f73d5f8a8d45a03fee45a2b74e6d0f9d7fa36f86 | 22,931 | py | Python | src/gui/tabs/statistics/html_view.py | sciapp/pyMolDyn | fba6ea91cb185f916b930cd25b4b1d28a22fb4c5 | [
"MIT"
] | 11 | 2016-10-25T09:48:36.000Z | 2021-01-30T18:59:50.000Z | src/gui/tabs/statistics/html_view.py | sciapp/pyMolDyn | fba6ea91cb185f916b930cd25b4b1d28a22fb4c5 | [
"MIT"
] | 1 | 2017-09-19T06:03:36.000Z | 2017-09-28T11:29:23.000Z | src/gui/tabs/statistics/html_view.py | sciapp/pyMolDyn | fba6ea91cb185f916b930cd25b4b1d28a22fb4c5 | [
"MIT"
] | null | null | null | import jinja2
import numpy as np
from PyQt5 import QtCore, QtWidgets
import os.path
import core.elements
import core.bonds
from collections import Counter
from core.calculation.discretization import Discretization
from gui.tabs.statistics.tree_list import TreeList
from gui.util.webview import WebWidget
def render_htm... | 43.845124 | 157 | 0.654703 | import jinja2
import numpy as np
from PyQt5 import QtCore, QtWidgets
import os.path
import core.elements
import core.bonds
from collections import Counter
from core.calculation.discretization import Discretization
from gui.tabs.statistics.tree_list import TreeList
from gui.util.webview import WebWidget
def render_htm... | true | true |
f73d6036f14f039aac3bc55ef3f988375ba45916 | 3,100 | py | Python | composter/models.py | Projeto-ECOmposteira/composteira | 35f9bc18ba7abe621dc725815d12880c2c302e3b | [
"MIT"
] | null | null | null | composter/models.py | Projeto-ECOmposteira/composteira | 35f9bc18ba7abe621dc725815d12880c2c302e3b | [
"MIT"
] | null | null | null | composter/models.py | Projeto-ECOmposteira/composteira | 35f9bc18ba7abe621dc725815d12880c2c302e3b | [
"MIT"
] | 2 | 2021-06-18T02:59:17.000Z | 2021-06-18T03:09:54.000Z | from djongo import models
from datetime import *
class MaterialType(models.Model):
_id = models.ObjectIdField()
typeName = models.CharField(max_length=255, blank=False)
def __str__(self):
return self.typeName
class Material(models.Model):
_id = models.ObjectIdField()
materialType = models... | 33.695652 | 101 | 0.652581 | from djongo import models
from datetime import *
class MaterialType(models.Model):
_id = models.ObjectIdField()
typeName = models.CharField(max_length=255, blank=False)
def __str__(self):
return self.typeName
class Material(models.Model):
_id = models.ObjectIdField()
materialType = models... | true | true |
f73d6065dafa2ae49e0daa5c521580e9a5605366 | 4,441 | py | Python | examples/data/cora.py | acezen/graph-learn | 05292e25b66c4505abb2804903bb838de4cd5e43 | [
"Apache-2.0"
] | 1,088 | 2020-03-26T10:40:53.000Z | 2022-03-31T01:27:21.000Z | examples/data/cora.py | Seventeen17/graph-learn | 77bd92f960e4d178a3606444684f7f04c7f5b738 | [
"Apache-2.0"
] | 134 | 2020-03-27T12:49:43.000Z | 2022-03-31T09:39:40.000Z | examples/data/cora.py | Seventeen17/graph-learn | 77bd92f960e4d178a3606444684f7f04c7f5b738 | [
"Apache-2.0"
] | 230 | 2020-03-27T07:16:30.000Z | 2022-03-29T01:57:47.000Z | # Copyright 2020 Alibaba Group Holding Limited. 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 ... | 38.284483 | 93 | 0.60707 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import numpy as np
import scipy.sparse as sp
from utils import download, extract
def preprocess(dataset):
node_table = "{}/node_table".format(dataset)
edge_table = "{}/edge_tabl... | true | true |
f73d6140a83b2ab3bd0dd3bf09db9ff4114e708a | 161 | py | Python | birding_ear/admin-working.py | annerainywoods/birding_ear | 2268d1286be9cf71ae0295efac77b81ccb8432dc | [
"MIT"
] | null | null | null | birding_ear/admin-working.py | annerainywoods/birding_ear | 2268d1286be9cf71ae0295efac77b81ccb8432dc | [
"MIT"
] | null | null | null | birding_ear/admin-working.py | annerainywoods/birding_ear | 2268d1286be9cf71ae0295efac77b81ccb8432dc | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Bird, State, Bird_type
admin.site.register(Bird)
admin.site.register(State)
admin.site.register(Bird_type)
| 23 | 42 | 0.813665 | from django.contrib import admin
from .models import Bird, State, Bird_type
admin.site.register(Bird)
admin.site.register(State)
admin.site.register(Bird_type)
| true | true |
f73d617e1f8f014f1878eff32f1f1bfc54ec1d7b | 4,873 | py | Python | Containers/containers_controller.py | sagocz/Exploration-Robot-GUI | 3d4ffb88273987a25d7df8d5a29c2fbfd9ab4163 | [
"MIT"
] | null | null | null | Containers/containers_controller.py | sagocz/Exploration-Robot-GUI | 3d4ffb88273987a25d7df8d5a29c2fbfd9ab4163 | [
"MIT"
] | null | null | null | Containers/containers_controller.py | sagocz/Exploration-Robot-GUI | 3d4ffb88273987a25d7df8d5a29c2fbfd9ab4163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from containers_publisher import containersSending
from containers_subscriber import containersReceiver
from containers_ui import Ui_containersUi
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import QObject, QRect
import rospy
greenControl = "../src/containers_gui/src/resources/i... | 35.569343 | 100 | 0.711882 |
from containers_publisher import containersSending
from containers_subscriber import containersReceiver
from containers_ui import Ui_containersUi
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import QObject, QRect
import rospy
greenControl = "../src/containers_gui/src/resources/images/circle_green.sv... | true | true |
f73d61cbecfe6f5651493a4201015a085eaa5025 | 12,806 | py | Python | tests/chainer_tests/functions_tests/pooling_tests/test_unpooling_2d.py | zjzh/chainer | e9da1423255c58c37be9733f51b158aa9b39dc93 | [
"MIT"
] | 3,705 | 2017-06-01T07:36:12.000Z | 2022-03-30T10:46:15.000Z | tests/chainer_tests/functions_tests/pooling_tests/test_unpooling_2d.py | zjzh/chainer | e9da1423255c58c37be9733f51b158aa9b39dc93 | [
"MIT"
] | 5,998 | 2017-06-01T06:40:17.000Z | 2022-03-08T01:42:44.000Z | tests/chainer_tests/functions_tests/pooling_tests/test_unpooling_2d.py | zjzh/chainer | e9da1423255c58c37be9733f51b158aa9b39dc93 | [
"MIT"
] | 1,150 | 2017-06-02T03:39:46.000Z | 2022-03-29T02:29:32.000Z | import unittest
import numpy
import six
import chainer
from chainer.backends import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
from chainer_tests.functions_tests.pooling_tests import pooling_nd_helper
@testing.parameterize(*test... | 37.775811 | 79 | 0.555521 | import unittest
import numpy
import six
import chainer
from chainer.backends import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
from chainer_tests.functions_tests.pooling_tests import pooling_nd_helper
@testing.parameterize(*test... | true | true |
f73d62128946cfa81b92faae9c1d98494e01af3d | 5,423 | py | Python | services/core-api/app/api/now_applications/models/applications_view.py | bcgov/mds | 6c427a66a5edb4196222607291adef8fd6677038 | [
"Apache-2.0"
] | 25 | 2018-07-09T19:04:37.000Z | 2022-03-15T17:27:10.000Z | services/core-api/app/api/now_applications/models/applications_view.py | areyeslo/mds | e8c38e593e09b78e2a57009c0d003d6c4bfa32e6 | [
"Apache-2.0"
] | 983 | 2018-04-25T20:08:07.000Z | 2022-03-31T21:45:20.000Z | services/core-api/app/api/now_applications/models/applications_view.py | areyeslo/mds | e8c38e593e09b78e2a57009c0d003d6c4bfa32e6 | [
"Apache-2.0"
] | 58 | 2018-05-15T22:35:50.000Z | 2021-11-29T19:40:52.000Z | from datetime import datetime
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.ext.hybrid import hybrid_property
from flask import current_app
from app.api.utils.models_mixins import Base
from app.extensions import db
from .now_application im... | 42.03876 | 172 | 0.731145 | from datetime import datetime
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.ext.hybrid import hybrid_property
from flask import current_app
from app.api.utils.models_mixins import Base
from app.extensions import db
from .now_application im... | true | true |
f73d623114bd8fb8c924e4b4775a4ae8e3a399a9 | 10,549 | py | Python | abides-markets/abides_markets/messages/marketdata.py | jpmorganchase/ABIDES-jpmc-gym | 198736a1b1316190072356c980412569579f15a6 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2021-09-23T13:17:26.000Z | 2021-09-23T13:17:26.000Z | abides-markets/abides_markets/messages/marketdata.py | jpmorganchase/ABIDES-gym | 198736a1b1316190072356c980412569579f15a6 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | abides-markets/abides_markets/messages/marketdata.py | jpmorganchase/ABIDES-gym | 198736a1b1316190072356c980412569579f15a6 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | import sys
from abc import ABC
from dataclasses import dataclass, field
from enum import Enum
from typing import List, Tuple
from abides_core import Message, NanosecondTime
from ..orders import Side
@dataclass
class MarketDataSubReqMsg(Message, ABC):
"""
Base class for creating or cancelling market data sub... | 31.966667 | 92 | 0.689828 | import sys
from abc import ABC
from dataclasses import dataclass, field
from enum import Enum
from typing import List, Tuple
from abides_core import Message, NanosecondTime
from ..orders import Side
@dataclass
class MarketDataSubReqMsg(Message, ABC):
symbol: str
cancel: bool = False
@dataclass
class Mark... | true | true |
f73d62800d11a4acb609ffe80b0f649701af57e9 | 1,438 | py | Python | quartz_sphere.py | Substancia/FDTD-Huygens-metasurface | dfb46f43c0653b394b63e7af92a331ae4824d9be | [
"MIT"
] | null | null | null | quartz_sphere.py | Substancia/FDTD-Huygens-metasurface | dfb46f43c0653b394b63e7af92a331ae4824d9be | [
"MIT"
] | null | null | null | quartz_sphere.py | Substancia/FDTD-Huygens-metasurface | dfb46f43c0653b394b63e7af92a331ae4824d9be | [
"MIT"
] | 1 | 2021-07-20T09:30:56.000Z | 2021-07-20T09:30:56.000Z | from fdtd_venv import fdtd_mod as fdtd
from numpy import arange, flip, meshgrid, array
from matplotlib.pyplot import plot, show
def main():
grid = fdtd.Grid(shape=(200, 200, 1), grid_spacing=155e-9)
lens_width = 10
lens_order = 3
lens_radius = 25
x, y = arange(-90, 90, 1), arange(lens_radius-lens_order*lens_widt... | 32.681818 | 135 | 0.656467 | from fdtd_venv import fdtd_mod as fdtd
from numpy import arange, flip, meshgrid, array
from matplotlib.pyplot import plot, show
def main():
grid = fdtd.Grid(shape=(200, 200, 1), grid_spacing=155e-9)
lens_width = 10
lens_order = 3
lens_radius = 25
x, y = arange(-90, 90, 1), arange(lens_radius-lens_order*lens_widt... | true | true |
f73d641635c089dc97b3234aaffe673a93c3d770 | 8,067 | py | Python | third_party/WebKit/Tools/Scripts/webkitpy/tool/bot/commit_announcer.py | xzhan96/chromium.src | 1bd0cf3997f947746c0fc5406a2466e7b5f6159e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2021-01-07T18:51:03.000Z | 2021-01-07T18:51:03.000Z | third_party/WebKit/Tools/Scripts/webkitpy/tool/bot/commit_announcer.py | emilio/chromium.src | 1bd0cf3997f947746c0fc5406a2466e7b5f6159e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | third_party/WebKit/Tools/Scripts/webkitpy/tool/bot/commit_announcer.py | emilio/chromium.src | 1bd0cf3997f947746c0fc5406a2466e7b5f6159e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2013 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 38.414286 | 124 | 0.643858 |
import logging
import re
import threading
import time
from webkitpy.common.checkout.scm.git import Git
from webkitpy.common.system.executive import ScriptError
from webkitpy.thirdparty.irc.ircbot import SingleServerIRCBot
_log = logging.getLogger(__name__)
SERVER = "irc.freenode.net"
PORT = ... | true | true |
f73d647852dd4b911adb574519444ff36409ee5a | 2,013 | py | Python | jdcloud_sdk/services/disk/models/DiskSpec.py | jdcloud-apigateway/jdcloud-sdk-python | 0886769bcf1fb92128a065ff0f4695be099571cc | [
"Apache-2.0"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | jdcloud_sdk/services/disk/models/DiskSpec.py | jdcloud-apigateway/jdcloud-sdk-python | 0886769bcf1fb92128a065ff0f4695be099571cc | [
"Apache-2.0"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | jdcloud_sdk/services/disk/models/DiskSpec.py | jdcloud-apigateway/jdcloud-sdk-python | 0886769bcf1fb92128a065ff0f4695be099571cc | [
"Apache-2.0"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.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 agreed ... | 41.9375 | 165 | 0.702931 |
class DiskSpec(object):
def __init__(self, az, name, diskType, diskSizeGB, description=None, iops=None, snapshotId=None, policyId=None, charge=None, multiAttachable=None, encrypt=None):
self.az = az
self.name = name
self.description = description
self.diskType = ... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.